diff --git a/.github/workflows/crypress.yml b/.github/workflows/crypress.yml deleted file mode 100644 index d12a5ae..0000000 --- a/.github/workflows/crypress.yml +++ /dev/null @@ -1,88 +0,0 @@ -# name: Cypress Tests with Install Job and UI Chrome Job x 5 -# # https://docs.cypress.io/guides/continuous-integration/github-actions#Worker-Jobs -# on: [push] - -# jobs: -# install: -# runs-on: ubuntu-latest -# container: cypress/browsers:node12.18.3-chrome87-ff82 -# steps: -# - name: Checkout -# uses: actions/checkout@v2 - - -# - name: Cypress install -# uses: cypress-io/github-action@v2 -# with: -# # Disable running of tests within install job -# runTests: false -# build: yarn build - -# - name: Save build folder -# uses: actions/upload-artifact@v2 -# with: -# name: dist -# if-no-files-found: error -# path: dist -# ui-chrome-tests: -# runs-on: ubuntu-latest -# container: cypress/browsers:node12.18.3-chrome87-ff82 -# needs: install -# strategy: -# fail-fast: false -# matrix: -# # run copies of the current job in parallel -# # containers: [1, 2, 3, 4, 5] -# containers: [1] -# steps: -# - name: Checkout -# uses: actions/checkout@v2 - -# - name: Download the build folders -# uses: actions/download-artifact@v2 -# with: -# name: dist -# path: dist - -# - name: 'UI Tests - Chrome' -# uses: cypress-io/github-action@v2 -# with: -# # we have already installed all dependencies above -# install: false -# start: yarn start:ci -# wait-on: 'http://localhost:3000' -# wait-on-timeout: 120 -# browser: chrome -# record: true -# parallel: true -# group: 'UI - Chrome' -# spec: cypress/tests/ui/* -# env: -# CYPRESS_RECORD_KEY: ${{ secrets.DASHBOARDRECORDKEY }} -# # Recommended: pass the GitHub token lets this action correctly -# # determine the unique run id necessary to re-run the checks -# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - - -name: Chrome headless - -on: push - -jobs: - chrome-headless: - runs-on: ubuntu-18.04 - steps: - - name: Checkout - uses: actions/checkout@v1 - - name: Headless Chrome - uses: cypress-io/github-action@v2 - timeout-minutes: 10 - with: - build: npm run build - start: npm start - browser: chrome - headless: true - record: true - env: - # pass the Dashboard record key as an environment variable - CYPRESS_RECORD_KEY: ${{ secrets.dashboardRecordKey }} \ No newline at end of file diff --git a/.github/workflows/webpack.yml b/.github/workflows/webpack.yml deleted file mode 100644 index 9853659..0000000 --- a/.github/workflows/webpack.yml +++ /dev/null @@ -1,34 +0,0 @@ -name: NodeJS with Webpack, and push to github pages - -on: - push: - branches: [ main,master ] - pull_request: - branches: [ main,master ] - -jobs: - build: - runs-on: ubuntu-latest - - strategy: - matrix: - node-version: [12.x, 14.x, 16.x] - - steps: - - uses: actions/checkout@v2 - - - name: Use Node.js ${{ matrix.node-version }} - uses: actions/setup-node@v1 - with: - node-version: ${{ matrix.node-version }} - - - name: Build webpack to dist folder - run: | - yarn - yarn run build - cp ./src/index.html ./dist/index.html - - name: Deploy to GH Page - uses: JamesIves/github-pages-deploy-action@4.1.1 - with: - branch: gh-pages - folder: dist diff --git a/.gitignore b/.gitignore deleted file mode 100644 index d8c9114..0000000 --- a/.gitignore +++ /dev/null @@ -1,25 +0,0 @@ -*.iml -.idea/ -.ipr -.iws - -*~ -~* -*.diff -*.patch -*.bak -.DS_Store -Thumbs.db -.project -.*proj -.svn/ -*.swp -*.swo -*.pyc -*.pyo -node_modules -dist -npm-debug.log* -yarn-debug.log* -yarn-error.log* -.vscode \ No newline at end of file diff --git a/134.index.js b/134.index.js new file mode 100644 index 0000000..4ab3717 --- /dev/null +++ b/134.index.js @@ -0,0 +1,2 @@ +"use strict";(self.webpackChunkreact_monaco_editor_browser_example=self.webpackChunkreact_monaco_editor_browser_example||[]).push([[134,717],{5810:(e,t,n)=>{n.r(t),n.d(t,{conf:()=>r,language:()=>i});var o=n(6717),r=o.conf,i={defaultToken:"invalid",tokenPostfix:".js",keywords:["break","case","catch","class","continue","const","constructor","debugger","default","delete","do","else","export","extends","false","finally","for","from","function","get","if","import","in","instanceof","let","new","null","return","set","super","switch","symbol","this","throw","true","try","typeof","undefined","var","void","while","with","yield","async","await","of"],typeKeywords:[],operators:o.language.operators,symbols:o.language.symbols,escapes:o.language.escapes,digits:o.language.digits,octaldigits:o.language.octaldigits,binarydigits:o.language.binarydigits,hexdigits:o.language.hexdigits,regexpctl:o.language.regexpctl,regexpesc:o.language.regexpesc,tokenizer:o.language.tokenizer}},6717:(e,t,n)=>{n.r(t),n.d(t,{conf:()=>r,language:()=>i});var o=n(9587),r={wordPattern:/(-?\d*\.\d\w*)|([^\`\~\!\@\#\%\^\&\*\(\)\-\=\+\[\{\]\}\\\|\;\:\'\"\,\.\<\>\/\?\s]+)/g,comments:{lineComment:"//",blockComment:["/*","*/"]},brackets:[["{","}"],["[","]"],["(",")"]],onEnterRules:[{beforeText:/^\s*\/\*\*(?!\/)([^\*]|\*(?!\/))*$/,afterText:/^\s*\*\/$/,action:{indentAction:o.Mj.IndentAction.IndentOutdent,appendText:" * "}},{beforeText:/^\s*\/\*\*(?!\/)([^\*]|\*(?!\/))*$/,action:{indentAction:o.Mj.IndentAction.None,appendText:" * "}},{beforeText:/^(\t|(\ \ ))*\ \*(\ ([^\*]|\*(?!\/))*)?$/,action:{indentAction:o.Mj.IndentAction.None,appendText:"* "}},{beforeText:/^(\t|(\ \ ))*\ \*\/\s*$/,action:{indentAction:o.Mj.IndentAction.None,removeText:1}}],autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"',notIn:["string"]},{open:"'",close:"'",notIn:["string","comment"]},{open:"`",close:"`",notIn:["string","comment"]},{open:"/**",close:" */",notIn:["string"]}],folding:{markers:{start:new RegExp("^\\s*//\\s*#?region\\b"),end:new RegExp("^\\s*//\\s*#?endregion\\b")}}},i={defaultToken:"invalid",tokenPostfix:".ts",keywords:["abstract","any","as","asserts","bigint","boolean","break","case","catch","class","continue","const","constructor","debugger","declare","default","delete","do","else","enum","export","extends","false","finally","for","from","function","get","if","implements","import","in","infer","instanceof","interface","is","keyof","let","module","namespace","never","new","null","number","object","package","private","protected","public","override","readonly","require","global","return","set","static","string","super","switch","symbol","this","throw","true","try","type","typeof","undefined","unique","unknown","var","void","while","with","yield","async","await","of"],operators:["<=",">=","==","!=","===","!==","=>","+","-","**","*","/","%","++","--","<<",">",">>>","&","|","^","!","~","&&","||","??","?",":","=","+=","-=","*=","**=","/=","%=","<<=",">>=",">>>=","&=","|=","^=","@"],symbols:/[=>](?!@symbols)/,"@brackets"],[/!(?=([^=]|$))/,"delimiter"],[/@symbols/,{cases:{"@operators":"delimiter","@default":""}}],[/(@digits)[eE]([\-+]?(@digits))?/,"number.float"],[/(@digits)\.(@digits)([eE][\-+]?(@digits))?/,"number.float"],[/0[xX](@hexdigits)n?/,"number.hex"],[/0[oO]?(@octaldigits)n?/,"number.octal"],[/0[bB](@binarydigits)n?/,"number.binary"],[/(@digits)n?/,"number"],[/[;,.]/,"delimiter"],[/"([^"\\]|\\.)*$/,"string.invalid"],[/'([^'\\]|\\.)*$/,"string.invalid"],[/"/,"string","@string_double"],[/'/,"string","@string_single"],[/`/,"string","@string_backtick"]],whitespace:[[/[ \t\r\n]+/,""],[/\/\*\*(?!\/)/,"comment.doc","@jsdoc"],[/\/\*/,"comment","@comment"],[/\/\/.*$/,"comment"]],comment:[[/[^\/*]+/,"comment"],[/\*\//,"comment","@pop"],[/[\/*]/,"comment"]],jsdoc:[[/[^\/*]+/,"comment.doc"],[/\*\//,"comment.doc","@pop"],[/[\/*]/,"comment.doc"]],regexp:[[/(\{)(\d+(?:,\d*)?)(\})/,["regexp.escape.control","regexp.escape.control","regexp.escape.control"]],[/(\[)(\^?)(?=(?:[^\]\\\/]|\\.)+)/,["regexp.escape.control",{token:"regexp.escape.control",next:"@regexrange"}]],[/(\()(\?:|\?=|\?!)/,["regexp.escape.control","regexp.escape.control"]],[/[()]/,"regexp.escape.control"],[/@regexpctl/,"regexp.escape.control"],[/[^\\\/]/,"regexp"],[/@regexpesc/,"regexp.escape"],[/\\\./,"regexp.invalid"],[/(\/)([dgimsuy]*)/,[{token:"regexp",bracket:"@close",next:"@pop"},"keyword.other"]]],regexrange:[[/-/,"regexp.escape.control"],[/\^/,"regexp.invalid"],[/@regexpesc/,"regexp.escape"],[/[^\]]/,"regexp"],[/\]/,{token:"regexp.escape.control",next:"@pop",bracket:"@close"}]],string_double:[[/[^\\"]+/,"string"],[/@escapes/,"string.escape"],[/\\./,"string.escape.invalid"],[/"/,"string","@pop"]],string_single:[[/[^\\']+/,"string"],[/@escapes/,"string.escape"],[/\\./,"string.escape.invalid"],[/'/,"string","@pop"]],string_backtick:[[/\$\{/,{token:"delimiter.bracket",next:"@bracketCounting"}],[/[^\\`$]+/,"string"],[/@escapes/,"string.escape"],[/\\./,"string.escape.invalid"],[/`/,"string","@pop"]],bracketCounting:[[/\{/,"delimiter.bracket","@bracketCounting"],[/\}/,"delimiter.bracket","@pop"],{include:"common"}]}}}}]); +//# sourceMappingURL=134.index.js.map \ No newline at end of file diff --git a/134.index.js.map b/134.index.js.map new file mode 100644 index 0000000..f2d27fd --- /dev/null +++ b/134.index.js.map @@ -0,0 +1 @@ +{"version":3,"file":"134.index.js","mappings":"qNAKWA,EAAO,OACPC,EAAW,CAElBC,aAAc,UACdC,aAAc,MACdC,SAAU,CACN,QACA,OACA,QACA,QACA,WACA,QACA,cACA,WACA,UACA,SACA,KACA,OACA,SACA,UACA,QACA,UACA,MACA,OACA,WACA,MACA,KACA,SACA,KACA,aACA,MACA,MACA,OACA,SACA,MACA,QACA,SACA,SACA,OACA,QACA,OACA,MACA,SACA,YACA,MACA,OACA,QACA,OACA,QACA,QACA,QACA,MAEJC,aAAc,GACdC,UAAW,qBACXC,QAAS,mBACTC,QAAS,mBACTC,OAAQ,kBACRC,YAAa,uBACbC,aAAc,wBACdC,UAAW,qBACXC,UAAW,qBACXC,UAAW,qBACXC,UAAW,uB,uEC/DJf,EAAO,CACdgB,YAAa,uFACbC,SAAU,CACNC,YAAa,KACbC,aAAc,CAAC,KAAM,OAEzBC,SAAU,CACN,CAAC,IAAK,KACN,CAAC,IAAK,KACN,CAAC,IAAK,MAEVC,aAAc,CACV,CAEIC,WAAY,qCACZC,UAAW,YACXC,OAAQ,CACJC,aAAc,gCACdC,WAAY,QAGpB,CAEIJ,WAAY,qCACZE,OAAQ,CACJC,aAAc,uBACdC,WAAY,QAGpB,CAEIJ,WAAY,2CACZE,OAAQ,CACJC,aAAc,uBACdC,WAAY,OAGpB,CAEIJ,WAAY,0BACZE,OAAQ,CACJC,aAAc,uBACdE,WAAY,KAIxBC,iBAAkB,CACd,CAAEC,KAAM,IAAKC,MAAO,KACpB,CAAED,KAAM,IAAKC,MAAO,KACpB,CAAED,KAAM,IAAKC,MAAO,KACpB,CAAED,KAAM,IAAKC,MAAO,IAAKC,MAAO,CAAC,WACjC,CAAEF,KAAM,IAAKC,MAAO,IAAKC,MAAO,CAAC,SAAU,YAC3C,CAAEF,KAAM,IAAKC,MAAO,IAAKC,MAAO,CAAC,SAAU,YAC3C,CAAEF,KAAM,MAAOC,MAAO,MAAOC,MAAO,CAAC,YAEzCC,QAAS,CACLC,QAAS,CACLC,MAAO,IAAIC,OAAO,0BAClBC,IAAK,IAAID,OAAO,gCAIjBlC,EAAW,CAElBC,aAAc,UACdC,aAAc,MACdC,SAAU,CAGN,WACA,MACA,KACA,UACA,SACA,UACA,QACA,OACA,QACA,QACA,WACA,QACA,cACA,WACA,UACA,UACA,SACA,KACA,OACA,OACA,SACA,UACA,QACA,UACA,MACA,OACA,WACA,MACA,KACA,aACA,SACA,KACA,QACA,aACA,YACA,KACA,QACA,MACA,SACA,YACA,QACA,MACA,OACA,SACA,SACA,UACA,UACA,YACA,SACA,WACA,WACA,UACA,SACA,SACA,MACA,SACA,SACA,QACA,SACA,SACA,OACA,QACA,OACA,MACA,OACA,SACA,YACA,SACA,UACA,MACA,OACA,QACA,OACA,QACA,QACA,QACA,MAEJE,UAAW,CACP,KACA,KACA,KACA,KACA,MACA,MACA,KACA,IACA,IACA,KACA,IACA,IACA,IACA,KACA,KACA,KACA,KACA,KACA,MACA,IACA,IACA,IACA,IACA,IACA,KACA,KACA,KACA,IACA,IACA,IACA,KACA,KACA,KACA,MACA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iBACf,CAAC,OAAQ,kBACT,CACI,mBACA,CAAC,CAAEF,MAAO,SAAUC,QAAS,SAAUC,KAAM,QAAU,mBAG/DK,WAAY,CACR,CAAC,IAAK,yBACN,CAAC,KAAM,kBACP,CAAC,aAAc,iBACf,CAAC,QAAS,UACV,CACI,KACA,CACIP,MAAO,wBACPE,KAAM,OACND,QAAS,YAIrBO,cAAe,CACX,CAAC,UAAW,UACZ,CAAC,WAAY,iBACb,CAAC,MAAO,yBACR,CAAC,IAAK,SAAU,SAEpBC,cAAe,CACX,CAAC,UAAW,UACZ,CAAC,WAAY,iBACb,CAAC,MAAO,yBACR,CAAC,IAAK,SAAU,SAEpBC,gBAAiB,CACb,CAAC,OAAQ,CAAEV,MAAO,oBAAqBE,KAAM,qBAC7C,CAAC,WAAY,UACb,CAAC,WAAY,iBACb,CAAC,MAAO,yBACR,CAAC,IAAK,SAAU,SAEpBS,gBAAiB,CACb,CAAC,KAAM,oBAAqB,oBAC5B,CAAC,KAAM,oBAAqB,QAC5B,CAAEd,QAAS","sources":["webpack://react-monaco-editor-browser-example/./node_modules/monaco-editor/esm/vs/basic-languages/javascript/javascript.js","webpack://react-monaco-editor-browser-example/./node_modules/monaco-editor/esm/vs/basic-languages/typescript/typescript.js"],"sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nimport { conf as tsConf, language as tsLanguage } from '../typescript/typescript.js';\r\nexport var conf = tsConf;\r\nexport var language = {\r\n // Set defaultToken to invalid to see what you do not tokenize yet\r\n defaultToken: 'invalid',\r\n tokenPostfix: '.js',\r\n keywords: [\r\n 'break',\r\n 'case',\r\n 'catch',\r\n 'class',\r\n 'continue',\r\n 'const',\r\n 'constructor',\r\n 'debugger',\r\n 'default',\r\n 'delete',\r\n 'do',\r\n 'else',\r\n 'export',\r\n 'extends',\r\n 'false',\r\n 'finally',\r\n 'for',\r\n 'from',\r\n 'function',\r\n 'get',\r\n 'if',\r\n 'import',\r\n 'in',\r\n 'instanceof',\r\n 'let',\r\n 'new',\r\n 'null',\r\n 'return',\r\n 'set',\r\n 'super',\r\n 'switch',\r\n 'symbol',\r\n 'this',\r\n 'throw',\r\n 'true',\r\n 'try',\r\n 'typeof',\r\n 'undefined',\r\n 'var',\r\n 'void',\r\n 'while',\r\n 'with',\r\n 'yield',\r\n 'async',\r\n 'await',\r\n 'of'\r\n ],\r\n typeKeywords: [],\r\n operators: tsLanguage.operators,\r\n symbols: tsLanguage.symbols,\r\n escapes: tsLanguage.escapes,\r\n digits: tsLanguage.digits,\r\n octaldigits: tsLanguage.octaldigits,\r\n binarydigits: tsLanguage.binarydigits,\r\n hexdigits: tsLanguage.hexdigits,\r\n regexpctl: tsLanguage.regexpctl,\r\n regexpesc: tsLanguage.regexpesc,\r\n tokenizer: tsLanguage.tokenizer\r\n};\r\n","/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nimport { languages } from '../fillers/monaco-editor-core.js';\r\nexport var conf = {\r\n wordPattern: /(-?\\d*\\.\\d\\w*)|([^\\`\\~\\!\\@\\#\\%\\^\\&\\*\\(\\)\\-\\=\\+\\[\\{\\]\\}\\\\\\|\\;\\:\\'\\\"\\,\\.\\<\\>\\/\\?\\s]+)/g,\r\n comments: {\r\n lineComment: '//',\r\n blockComment: ['/*', '*/']\r\n },\r\n brackets: [\r\n ['{', '}'],\r\n ['[', ']'],\r\n ['(', ')']\r\n ],\r\n onEnterRules: [\r\n {\r\n // e.g. /** | */\r\n beforeText: /^\\s*\\/\\*\\*(?!\\/)([^\\*]|\\*(?!\\/))*$/,\r\n afterText: /^\\s*\\*\\/$/,\r\n action: {\r\n indentAction: languages.IndentAction.IndentOutdent,\r\n appendText: ' * '\r\n }\r\n },\r\n {\r\n // e.g. /** ...|\r\n beforeText: /^\\s*\\/\\*\\*(?!\\/)([^\\*]|\\*(?!\\/))*$/,\r\n action: {\r\n indentAction: languages.IndentAction.None,\r\n appendText: ' * '\r\n }\r\n },\r\n {\r\n // e.g. * ...|\r\n beforeText: /^(\\t|(\\ \\ ))*\\ \\*(\\ ([^\\*]|\\*(?!\\/))*)?$/,\r\n action: {\r\n indentAction: languages.IndentAction.None,\r\n appendText: '* '\r\n }\r\n },\r\n {\r\n // e.g. */|\r\n beforeText: /^(\\t|(\\ \\ ))*\\ \\*\\/\\s*$/,\r\n action: {\r\n indentAction: languages.IndentAction.None,\r\n removeText: 1\r\n }\r\n }\r\n ],\r\n autoClosingPairs: [\r\n { open: '{', close: '}' },\r\n { open: '[', close: ']' },\r\n { open: '(', close: ')' },\r\n { open: '\"', close: '\"', notIn: ['string'] },\r\n { open: \"'\", close: \"'\", notIn: ['string', 'comment'] },\r\n { open: '`', close: '`', notIn: ['string', 'comment'] },\r\n { open: '/**', close: ' */', notIn: ['string'] }\r\n ],\r\n folding: {\r\n markers: {\r\n start: new RegExp('^\\\\s*//\\\\s*#?region\\\\b'),\r\n end: new RegExp('^\\\\s*//\\\\s*#?endregion\\\\b')\r\n }\r\n }\r\n};\r\nexport var language = {\r\n // Set defaultToken to invalid to see what you do not tokenize yet\r\n defaultToken: 'invalid',\r\n tokenPostfix: '.ts',\r\n keywords: [\r\n // Should match the keys of textToKeywordObj in\r\n // https://github.com/microsoft/TypeScript/blob/master/src/compiler/scanner.ts\r\n 'abstract',\r\n 'any',\r\n 'as',\r\n 'asserts',\r\n 'bigint',\r\n 'boolean',\r\n 'break',\r\n 'case',\r\n 'catch',\r\n 'class',\r\n 'continue',\r\n 'const',\r\n 'constructor',\r\n 'debugger',\r\n 'declare',\r\n 'default',\r\n 'delete',\r\n 'do',\r\n 'else',\r\n 'enum',\r\n 'export',\r\n 'extends',\r\n 'false',\r\n 'finally',\r\n 'for',\r\n 'from',\r\n 'function',\r\n 'get',\r\n 'if',\r\n 'implements',\r\n 'import',\r\n 'in',\r\n 'infer',\r\n 'instanceof',\r\n 'interface',\r\n 'is',\r\n 'keyof',\r\n 'let',\r\n 'module',\r\n 'namespace',\r\n 'never',\r\n 'new',\r\n 'null',\r\n 'number',\r\n 'object',\r\n 'package',\r\n 'private',\r\n 'protected',\r\n 'public',\r\n 'override',\r\n 'readonly',\r\n 'require',\r\n 'global',\r\n 'return',\r\n 'set',\r\n 'static',\r\n 'string',\r\n 'super',\r\n 'switch',\r\n 'symbol',\r\n 'this',\r\n 'throw',\r\n 'true',\r\n 'try',\r\n 'type',\r\n 'typeof',\r\n 'undefined',\r\n 'unique',\r\n 'unknown',\r\n 'var',\r\n 'void',\r\n 'while',\r\n 'with',\r\n 'yield',\r\n 'async',\r\n 'await',\r\n 'of'\r\n ],\r\n operators: [\r\n '<=',\r\n '>=',\r\n '==',\r\n '!=',\r\n '===',\r\n '!==',\r\n '=>',\r\n '+',\r\n '-',\r\n '**',\r\n '*',\r\n '/',\r\n '%',\r\n '++',\r\n '--',\r\n '<<',\r\n '>',\r\n '>>>',\r\n '&',\r\n '|',\r\n '^',\r\n '!',\r\n '~',\r\n '&&',\r\n '||',\r\n '??',\r\n '?',\r\n ':',\r\n '=',\r\n '+=',\r\n '-=',\r\n '*=',\r\n '**=',\r\n '/=',\r\n '%=',\r\n '<<=',\r\n '>>=',\r\n '>>>=',\r\n '&=',\r\n '|=',\r\n '^=',\r\n '@'\r\n ],\r\n // we include these common regular expressions\r\n symbols: /[=>](?!@symbols)/, '@brackets'],\r\n [/!(?=([^=]|$))/, 'delimiter'],\r\n [\r\n /@symbols/,\r\n {\r\n cases: {\r\n '@operators': 'delimiter',\r\n '@default': ''\r\n }\r\n }\r\n ],\r\n // numbers\r\n [/(@digits)[eE]([\\-+]?(@digits))?/, 'number.float'],\r\n [/(@digits)\\.(@digits)([eE][\\-+]?(@digits))?/, 'number.float'],\r\n [/0[xX](@hexdigits)n?/, 'number.hex'],\r\n [/0[oO]?(@octaldigits)n?/, 'number.octal'],\r\n [/0[bB](@binarydigits)n?/, 'number.binary'],\r\n [/(@digits)n?/, 'number'],\r\n // delimiter: after number because of .\\d floats\r\n [/[;,.]/, 'delimiter'],\r\n // strings\r\n [/\"([^\"\\\\]|\\\\.)*$/, 'string.invalid'],\r\n [/'([^'\\\\]|\\\\.)*$/, 'string.invalid'],\r\n [/\"/, 'string', '@string_double'],\r\n [/'/, 'string', '@string_single'],\r\n [/`/, 'string', '@string_backtick']\r\n ],\r\n whitespace: [\r\n [/[ \\t\\r\\n]+/, ''],\r\n [/\\/\\*\\*(?!\\/)/, 'comment.doc', '@jsdoc'],\r\n [/\\/\\*/, 'comment', '@comment'],\r\n [/\\/\\/.*$/, 'comment']\r\n ],\r\n comment: [\r\n [/[^\\/*]+/, 'comment'],\r\n [/\\*\\//, 'comment', '@pop'],\r\n [/[\\/*]/, 'comment']\r\n ],\r\n jsdoc: [\r\n [/[^\\/*]+/, 'comment.doc'],\r\n [/\\*\\//, 'comment.doc', '@pop'],\r\n [/[\\/*]/, 'comment.doc']\r\n ],\r\n // We match regular expression quite precisely\r\n regexp: [\r\n [\r\n /(\\{)(\\d+(?:,\\d*)?)(\\})/,\r\n ['regexp.escape.control', 'regexp.escape.control', 'regexp.escape.control']\r\n ],\r\n [\r\n /(\\[)(\\^?)(?=(?:[^\\]\\\\\\/]|\\\\.)+)/,\r\n ['regexp.escape.control', { token: 'regexp.escape.control', next: '@regexrange' }]\r\n ],\r\n [/(\\()(\\?:|\\?=|\\?!)/, ['regexp.escape.control', 'regexp.escape.control']],\r\n [/[()]/, 'regexp.escape.control'],\r\n [/@regexpctl/, 'regexp.escape.control'],\r\n [/[^\\\\\\/]/, 'regexp'],\r\n [/@regexpesc/, 'regexp.escape'],\r\n [/\\\\\\./, 'regexp.invalid'],\r\n [\r\n /(\\/)([dgimsuy]*)/,\r\n [{ token: 'regexp', bracket: '@close', next: '@pop' }, 'keyword.other']\r\n ]\r\n ],\r\n regexrange: [\r\n [/-/, 'regexp.escape.control'],\r\n [/\\^/, 'regexp.invalid'],\r\n [/@regexpesc/, 'regexp.escape'],\r\n [/[^\\]]/, 'regexp'],\r\n [\r\n /\\]/,\r\n {\r\n token: 'regexp.escape.control',\r\n next: '@pop',\r\n bracket: '@close'\r\n }\r\n ]\r\n ],\r\n string_double: [\r\n [/[^\\\\\"]+/, 'string'],\r\n [/@escapes/, 'string.escape'],\r\n [/\\\\./, 'string.escape.invalid'],\r\n [/\"/, 'string', '@pop']\r\n ],\r\n string_single: [\r\n [/[^\\\\']+/, 'string'],\r\n [/@escapes/, 'string.escape'],\r\n [/\\\\./, 'string.escape.invalid'],\r\n [/'/, 'string', '@pop']\r\n ],\r\n string_backtick: [\r\n [/\\$\\{/, { token: 'delimiter.bracket', next: '@bracketCounting' }],\r\n [/[^\\\\`$]+/, 'string'],\r\n [/@escapes/, 'string.escape'],\r\n [/\\\\./, 'string.escape.invalid'],\r\n [/`/, 'string', '@pop']\r\n ],\r\n bracketCounting: [\r\n [/\\{/, 'delimiter.bracket', '@bracketCounting'],\r\n [/\\}/, 'delimiter.bracket', '@pop'],\r\n { include: 'common' }\r\n ]\r\n }\r\n};\r\n"],"names":["conf","language","defaultToken","tokenPostfix","keywords","typeKeywords","operators","symbols","escapes","digits","octaldigits","binarydigits","hexdigits","regexpctl","regexpesc","tokenizer","wordPattern","comments","lineComment","blockComment","brackets","onEnterRules","beforeText","afterText","action","indentAction","appendText","removeText","autoClosingPairs","open","close","notIn","folding","markers","start","RegExp","end","root","include","common","cases","token","bracket","next","whitespace","comment","jsdoc","regexp","regexrange","string_double","string_single","string_backtick","bracketCounting"],"sourceRoot":""} \ No newline at end of file diff --git a/183.index.js b/183.index.js new file mode 100644 index 0000000..f3bd317 --- /dev/null +++ b/183.index.js @@ -0,0 +1,2 @@ +"use strict";(self.webpackChunkreact_monaco_editor_browser_example=self.webpackChunkreact_monaco_editor_browser_example||[]).push([[183],{8183:(e,t,n)=>{n.r(t),n.d(t,{getJavaScriptWorker:()=>E,getTypeScriptWorker:()=>K,setupJavaScript:()=>N,setupTypeScript:()=>O});var r,i,o=n(1429),s=function(){function e(e,t){var n=this;this._modeId=e,this._defaults=t,this._worker=null,this._client=null,this._configChangeListener=this._defaults.onDidChange((function(){return n._stopWorker()})),this._updateExtraLibsToken=0,this._extraLibsChangeListener=this._defaults.onDidExtraLibsChange((function(){return n._updateExtraLibs()}))}return e.prototype._stopWorker=function(){this._worker&&(this._worker.dispose(),this._worker=null),this._client=null},e.prototype.dispose=function(){this._configChangeListener.dispose(),this._extraLibsChangeListener.dispose(),this._stopWorker()},e.prototype._updateExtraLibs=function(){return e=this,t=void 0,r=function(){var e,t;return function(e,t){var n,r,i,o,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(o){return function(a){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,r=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!((i=(i=s.trys).length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){s=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]0&&i[i.length-1])||6!==o[0]&&2!==o[0])){s=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]0&&(t+=" — "+i.map((function(e){return e.text})).join(" "))}else Array.isArray(e.text)?t+=" — "+e.text.map((function(e){return e.text})).join(" "):e.text&&(t+=" — "+e.text);return t}var _=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.signatureHelpTriggerCharacters=["(",","],t}return l(t,e),t._toSignatureHelpTriggerReason=function(e){switch(e.triggerKind){case o.Mj.SignatureHelpTriggerKind.TriggerCharacter:return e.triggerCharacter?e.isRetrigger?{kind:"retrigger",triggerCharacter:e.triggerCharacter}:{kind:"characterTyped",triggerCharacter:e.triggerCharacter}:{kind:"invoked"};case o.Mj.SignatureHelpTriggerKind.ContentChange:return e.isRetrigger?{kind:"retrigger"}:{kind:"invoked"};case o.Mj.SignatureHelpTriggerKind.Invoke:default:return{kind:"invoked"}}},t.prototype.provideSignatureHelp=function(e,n,r,i){return c(this,void 0,void 0,(function(){var r,o,s,a,u;return d(this,(function(l){switch(l.label){case 0:return r=e.uri,o=e.getOffsetAt(n),[4,this._worker(r)];case 1:return s=l.sent(),e.isDisposed()?[2]:[4,s.getSignatureHelpItems(r.toString(),o,{triggerReason:t._toSignatureHelpTriggerReason(i)})];case 2:return!(a=l.sent())||e.isDisposed()?[2]:(u={activeSignature:a.selectedItemIndex,activeParameter:a.argumentIndex,signatures:[]},a.items.forEach((function(e){var t={label:"",parameters:[]};t.documentation={value:f(e.documentation)},t.label+=f(e.prefixDisplayParts),e.parameters.forEach((function(n,r,i){var o=f(n.displayParts),s={label:o,documentation:{value:f(n.documentation)}};t.label+=o,t.parameters.push(s),r0)for(var u=0,l=n.childItems;u 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\r\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\r\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\r\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\r\n if (t[2]) _.ops.pop();\r\n _.trys.pop(); continue;\r\n }\r\n op = body.call(thisArg, _);\r\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\r\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\r\n }\r\n};\r\nimport { typescriptDefaults } from './monaco.contribution.js';\r\nimport { libFileSet } from './lib/lib.index.js';\r\nimport { editor, languages, Uri, Range, MarkerTag, MarkerSeverity } from './fillers/monaco-editor-core.js';\r\n//#region utils copied from typescript to prevent loading the entire typescriptServices ---\r\nvar IndentStyle;\r\n(function (IndentStyle) {\r\n IndentStyle[IndentStyle[\"None\"] = 0] = \"None\";\r\n IndentStyle[IndentStyle[\"Block\"] = 1] = \"Block\";\r\n IndentStyle[IndentStyle[\"Smart\"] = 2] = \"Smart\";\r\n})(IndentStyle || (IndentStyle = {}));\r\nexport function flattenDiagnosticMessageText(diag, newLine, indent) {\r\n if (indent === void 0) { indent = 0; }\r\n if (typeof diag === 'string') {\r\n return diag;\r\n }\r\n else if (diag === undefined) {\r\n return '';\r\n }\r\n var result = '';\r\n if (indent) {\r\n result += newLine;\r\n for (var i = 0; i < indent; i++) {\r\n result += ' ';\r\n }\r\n }\r\n result += diag.messageText;\r\n indent++;\r\n if (diag.next) {\r\n for (var _i = 0, _a = diag.next; _i < _a.length; _i++) {\r\n var kid = _a[_i];\r\n result += flattenDiagnosticMessageText(kid, newLine, indent);\r\n }\r\n }\r\n return result;\r\n}\r\nfunction displayPartsToString(displayParts) {\r\n if (displayParts) {\r\n return displayParts.map(function (displayPart) { return displayPart.text; }).join('');\r\n }\r\n return '';\r\n}\r\n//#endregion\r\nvar Adapter = /** @class */ (function () {\r\n function Adapter(_worker) {\r\n this._worker = _worker;\r\n }\r\n // protected _positionToOffset(model: editor.ITextModel, position: monaco.IPosition): number {\r\n // \treturn model.getOffsetAt(position);\r\n // }\r\n // protected _offsetToPosition(model: editor.ITextModel, offset: number): monaco.IPosition {\r\n // \treturn model.getPositionAt(offset);\r\n // }\r\n Adapter.prototype._textSpanToRange = function (model, span) {\r\n var p1 = model.getPositionAt(span.start);\r\n var p2 = model.getPositionAt(span.start + span.length);\r\n var startLineNumber = p1.lineNumber, startColumn = p1.column;\r\n var endLineNumber = p2.lineNumber, endColumn = p2.column;\r\n return { startLineNumber: startLineNumber, startColumn: startColumn, endLineNumber: endLineNumber, endColumn: endColumn };\r\n };\r\n return Adapter;\r\n}());\r\nexport { Adapter };\r\n// --- lib files\r\nvar LibFiles = /** @class */ (function () {\r\n function LibFiles(_worker) {\r\n this._worker = _worker;\r\n this._libFiles = {};\r\n this._hasFetchedLibFiles = false;\r\n this._fetchLibFilesPromise = null;\r\n }\r\n LibFiles.prototype.isLibFile = function (uri) {\r\n if (!uri) {\r\n return false;\r\n }\r\n if (uri.path.indexOf('/lib.') === 0) {\r\n return !!libFileSet[uri.path.slice(1)];\r\n }\r\n return false;\r\n };\r\n LibFiles.prototype.getOrCreateModel = function (uri) {\r\n var model = editor.getModel(uri);\r\n if (model) {\r\n return model;\r\n }\r\n if (this.isLibFile(uri) && this._hasFetchedLibFiles) {\r\n return editor.createModel(this._libFiles[uri.path.slice(1)], 'typescript', uri);\r\n }\r\n return null;\r\n };\r\n LibFiles.prototype._containsLibFile = function (uris) {\r\n for (var _i = 0, uris_1 = uris; _i < uris_1.length; _i++) {\r\n var uri = uris_1[_i];\r\n if (this.isLibFile(uri)) {\r\n return true;\r\n }\r\n }\r\n return false;\r\n };\r\n LibFiles.prototype.fetchLibFilesIfNecessary = function (uris) {\r\n return __awaiter(this, void 0, void 0, function () {\r\n return __generator(this, function (_a) {\r\n switch (_a.label) {\r\n case 0:\r\n if (!this._containsLibFile(uris)) {\r\n // no lib files necessary\r\n return [2 /*return*/];\r\n }\r\n return [4 /*yield*/, this._fetchLibFiles()];\r\n case 1:\r\n _a.sent();\r\n return [2 /*return*/];\r\n }\r\n });\r\n });\r\n };\r\n LibFiles.prototype._fetchLibFiles = function () {\r\n var _this = this;\r\n if (!this._fetchLibFilesPromise) {\r\n this._fetchLibFilesPromise = this._worker()\r\n .then(function (w) { return w.getLibFiles(); })\r\n .then(function (libFiles) {\r\n _this._hasFetchedLibFiles = true;\r\n _this._libFiles = libFiles;\r\n });\r\n }\r\n return this._fetchLibFilesPromise;\r\n };\r\n return LibFiles;\r\n}());\r\nexport { LibFiles };\r\n// --- diagnostics --- ---\r\nvar DiagnosticCategory;\r\n(function (DiagnosticCategory) {\r\n DiagnosticCategory[DiagnosticCategory[\"Warning\"] = 0] = \"Warning\";\r\n DiagnosticCategory[DiagnosticCategory[\"Error\"] = 1] = \"Error\";\r\n DiagnosticCategory[DiagnosticCategory[\"Suggestion\"] = 2] = \"Suggestion\";\r\n DiagnosticCategory[DiagnosticCategory[\"Message\"] = 3] = \"Message\";\r\n})(DiagnosticCategory || (DiagnosticCategory = {}));\r\nvar DiagnosticsAdapter = /** @class */ (function (_super) {\r\n __extends(DiagnosticsAdapter, _super);\r\n function DiagnosticsAdapter(_libFiles, _defaults, _selector, worker) {\r\n var _this = _super.call(this, worker) || this;\r\n _this._libFiles = _libFiles;\r\n _this._defaults = _defaults;\r\n _this._selector = _selector;\r\n _this._disposables = [];\r\n _this._listener = Object.create(null);\r\n var onModelAdd = function (model) {\r\n if (model.getModeId() !== _selector) {\r\n return;\r\n }\r\n var maybeValidate = function () {\r\n var onlyVisible = _this._defaults.getDiagnosticsOptions().onlyVisible;\r\n if (onlyVisible) {\r\n if (model.isAttachedToEditor()) {\r\n _this._doValidate(model);\r\n }\r\n }\r\n else {\r\n _this._doValidate(model);\r\n }\r\n };\r\n var handle;\r\n var changeSubscription = model.onDidChangeContent(function () {\r\n clearTimeout(handle);\r\n handle = setTimeout(maybeValidate, 500);\r\n });\r\n var visibleSubscription = model.onDidChangeAttached(function () {\r\n var onlyVisible = _this._defaults.getDiagnosticsOptions().onlyVisible;\r\n if (onlyVisible) {\r\n if (model.isAttachedToEditor()) {\r\n // this model is now attached to an editor\r\n // => compute diagnostics\r\n maybeValidate();\r\n }\r\n else {\r\n // this model is no longer attached to an editor\r\n // => clear existing diagnostics\r\n editor.setModelMarkers(model, _this._selector, []);\r\n }\r\n }\r\n });\r\n _this._listener[model.uri.toString()] = {\r\n dispose: function () {\r\n changeSubscription.dispose();\r\n visibleSubscription.dispose();\r\n clearTimeout(handle);\r\n }\r\n };\r\n maybeValidate();\r\n };\r\n var onModelRemoved = function (model) {\r\n editor.setModelMarkers(model, _this._selector, []);\r\n var key = model.uri.toString();\r\n if (_this._listener[key]) {\r\n _this._listener[key].dispose();\r\n delete _this._listener[key];\r\n }\r\n };\r\n _this._disposables.push(editor.onDidCreateModel(function (model) { return onModelAdd(model); }));\r\n _this._disposables.push(editor.onWillDisposeModel(onModelRemoved));\r\n _this._disposables.push(editor.onDidChangeModelLanguage(function (event) {\r\n onModelRemoved(event.model);\r\n onModelAdd(event.model);\r\n }));\r\n _this._disposables.push({\r\n dispose: function () {\r\n for (var _i = 0, _a = editor.getModels(); _i < _a.length; _i++) {\r\n var model = _a[_i];\r\n onModelRemoved(model);\r\n }\r\n }\r\n });\r\n var recomputeDiagostics = function () {\r\n // redo diagnostics when options change\r\n for (var _i = 0, _a = editor.getModels(); _i < _a.length; _i++) {\r\n var model = _a[_i];\r\n onModelRemoved(model);\r\n onModelAdd(model);\r\n }\r\n };\r\n _this._disposables.push(_this._defaults.onDidChange(recomputeDiagostics));\r\n _this._disposables.push(_this._defaults.onDidExtraLibsChange(recomputeDiagostics));\r\n editor.getModels().forEach(function (model) { return onModelAdd(model); });\r\n return _this;\r\n }\r\n DiagnosticsAdapter.prototype.dispose = function () {\r\n this._disposables.forEach(function (d) { return d && d.dispose(); });\r\n this._disposables = [];\r\n };\r\n DiagnosticsAdapter.prototype._doValidate = function (model) {\r\n return __awaiter(this, void 0, void 0, function () {\r\n var worker, promises, _a, noSyntaxValidation, noSemanticValidation, noSuggestionDiagnostics, allDiagnostics, diagnostics, relatedUris;\r\n var _this = this;\r\n return __generator(this, function (_b) {\r\n switch (_b.label) {\r\n case 0: return [4 /*yield*/, this._worker(model.uri)];\r\n case 1:\r\n worker = _b.sent();\r\n if (model.isDisposed()) {\r\n // model was disposed in the meantime\r\n return [2 /*return*/];\r\n }\r\n promises = [];\r\n _a = this._defaults.getDiagnosticsOptions(), noSyntaxValidation = _a.noSyntaxValidation, noSemanticValidation = _a.noSemanticValidation, noSuggestionDiagnostics = _a.noSuggestionDiagnostics;\r\n if (!noSyntaxValidation) {\r\n promises.push(worker.getSyntacticDiagnostics(model.uri.toString()));\r\n }\r\n if (!noSemanticValidation) {\r\n promises.push(worker.getSemanticDiagnostics(model.uri.toString()));\r\n }\r\n if (!noSuggestionDiagnostics) {\r\n promises.push(worker.getSuggestionDiagnostics(model.uri.toString()));\r\n }\r\n return [4 /*yield*/, Promise.all(promises)];\r\n case 2:\r\n allDiagnostics = _b.sent();\r\n if (!allDiagnostics || model.isDisposed()) {\r\n // model was disposed in the meantime\r\n return [2 /*return*/];\r\n }\r\n diagnostics = allDiagnostics\r\n .reduce(function (p, c) { return c.concat(p); }, [])\r\n .filter(function (d) {\r\n return (_this._defaults.getDiagnosticsOptions().diagnosticCodesToIgnore || []).indexOf(d.code) ===\r\n -1;\r\n });\r\n relatedUris = diagnostics\r\n .map(function (d) { return d.relatedInformation || []; })\r\n .reduce(function (p, c) { return c.concat(p); }, [])\r\n .map(function (relatedInformation) {\r\n return relatedInformation.file ? Uri.parse(relatedInformation.file.fileName) : null;\r\n });\r\n return [4 /*yield*/, this._libFiles.fetchLibFilesIfNecessary(relatedUris)];\r\n case 3:\r\n _b.sent();\r\n if (model.isDisposed()) {\r\n // model was disposed in the meantime\r\n return [2 /*return*/];\r\n }\r\n editor.setModelMarkers(model, this._selector, diagnostics.map(function (d) { return _this._convertDiagnostics(model, d); }));\r\n return [2 /*return*/];\r\n }\r\n });\r\n });\r\n };\r\n DiagnosticsAdapter.prototype._convertDiagnostics = function (model, diag) {\r\n var diagStart = diag.start || 0;\r\n var diagLength = diag.length || 1;\r\n var _a = model.getPositionAt(diagStart), startLineNumber = _a.lineNumber, startColumn = _a.column;\r\n var _b = model.getPositionAt(diagStart + diagLength), endLineNumber = _b.lineNumber, endColumn = _b.column;\r\n var tags = [];\r\n if (diag.reportsUnnecessary) {\r\n tags.push(MarkerTag.Unnecessary);\r\n }\r\n if (diag.reportsDeprecated) {\r\n tags.push(MarkerTag.Deprecated);\r\n }\r\n return {\r\n severity: this._tsDiagnosticCategoryToMarkerSeverity(diag.category),\r\n startLineNumber: startLineNumber,\r\n startColumn: startColumn,\r\n endLineNumber: endLineNumber,\r\n endColumn: endColumn,\r\n message: flattenDiagnosticMessageText(diag.messageText, '\\n'),\r\n code: diag.code.toString(),\r\n tags: tags,\r\n relatedInformation: this._convertRelatedInformation(model, diag.relatedInformation)\r\n };\r\n };\r\n DiagnosticsAdapter.prototype._convertRelatedInformation = function (model, relatedInformation) {\r\n var _this = this;\r\n if (!relatedInformation) {\r\n return [];\r\n }\r\n var result = [];\r\n relatedInformation.forEach(function (info) {\r\n var relatedResource = model;\r\n if (info.file) {\r\n var relatedResourceUri = Uri.parse(info.file.fileName);\r\n relatedResource = _this._libFiles.getOrCreateModel(relatedResourceUri);\r\n }\r\n if (!relatedResource) {\r\n return;\r\n }\r\n var infoStart = info.start || 0;\r\n var infoLength = info.length || 1;\r\n var _a = relatedResource.getPositionAt(infoStart), startLineNumber = _a.lineNumber, startColumn = _a.column;\r\n var _b = relatedResource.getPositionAt(infoStart + infoLength), endLineNumber = _b.lineNumber, endColumn = _b.column;\r\n result.push({\r\n resource: relatedResource.uri,\r\n startLineNumber: startLineNumber,\r\n startColumn: startColumn,\r\n endLineNumber: endLineNumber,\r\n endColumn: endColumn,\r\n message: flattenDiagnosticMessageText(info.messageText, '\\n')\r\n });\r\n });\r\n return result;\r\n };\r\n DiagnosticsAdapter.prototype._tsDiagnosticCategoryToMarkerSeverity = function (category) {\r\n switch (category) {\r\n case DiagnosticCategory.Error:\r\n return MarkerSeverity.Error;\r\n case DiagnosticCategory.Message:\r\n return MarkerSeverity.Info;\r\n case DiagnosticCategory.Warning:\r\n return MarkerSeverity.Warning;\r\n case DiagnosticCategory.Suggestion:\r\n return MarkerSeverity.Hint;\r\n }\r\n return MarkerSeverity.Info;\r\n };\r\n return DiagnosticsAdapter;\r\n}(Adapter));\r\nexport { DiagnosticsAdapter };\r\nvar SuggestAdapter = /** @class */ (function (_super) {\r\n __extends(SuggestAdapter, _super);\r\n function SuggestAdapter() {\r\n return _super !== null && _super.apply(this, arguments) || this;\r\n }\r\n Object.defineProperty(SuggestAdapter.prototype, \"triggerCharacters\", {\r\n get: function () {\r\n return ['.'];\r\n },\r\n enumerable: false,\r\n configurable: true\r\n });\r\n SuggestAdapter.prototype.provideCompletionItems = function (model, position, _context, token) {\r\n return __awaiter(this, void 0, void 0, function () {\r\n var wordInfo, wordRange, resource, offset, worker, info, suggestions;\r\n return __generator(this, function (_a) {\r\n switch (_a.label) {\r\n case 0:\r\n wordInfo = model.getWordUntilPosition(position);\r\n wordRange = new Range(position.lineNumber, wordInfo.startColumn, position.lineNumber, wordInfo.endColumn);\r\n resource = model.uri;\r\n offset = model.getOffsetAt(position);\r\n return [4 /*yield*/, this._worker(resource)];\r\n case 1:\r\n worker = _a.sent();\r\n if (model.isDisposed()) {\r\n return [2 /*return*/];\r\n }\r\n return [4 /*yield*/, worker.getCompletionsAtPosition(resource.toString(), offset)];\r\n case 2:\r\n info = _a.sent();\r\n if (!info || model.isDisposed()) {\r\n return [2 /*return*/];\r\n }\r\n suggestions = info.entries.map(function (entry) {\r\n var _a;\r\n var range = wordRange;\r\n if (entry.replacementSpan) {\r\n var p1 = model.getPositionAt(entry.replacementSpan.start);\r\n var p2 = model.getPositionAt(entry.replacementSpan.start + entry.replacementSpan.length);\r\n range = new Range(p1.lineNumber, p1.column, p2.lineNumber, p2.column);\r\n }\r\n var tags = [];\r\n if (((_a = entry.kindModifiers) === null || _a === void 0 ? void 0 : _a.indexOf('deprecated')) !== -1) {\r\n tags.push(languages.CompletionItemTag.Deprecated);\r\n }\r\n return {\r\n uri: resource,\r\n position: position,\r\n offset: offset,\r\n range: range,\r\n label: entry.name,\r\n insertText: entry.name,\r\n sortText: entry.sortText,\r\n kind: SuggestAdapter.convertKind(entry.kind),\r\n tags: tags\r\n };\r\n });\r\n return [2 /*return*/, {\r\n suggestions: suggestions\r\n }];\r\n }\r\n });\r\n });\r\n };\r\n SuggestAdapter.prototype.resolveCompletionItem = function (item, token) {\r\n return __awaiter(this, void 0, void 0, function () {\r\n var myItem, resource, position, offset, worker, details;\r\n return __generator(this, function (_a) {\r\n switch (_a.label) {\r\n case 0:\r\n myItem = item;\r\n resource = myItem.uri;\r\n position = myItem.position;\r\n offset = myItem.offset;\r\n return [4 /*yield*/, this._worker(resource)];\r\n case 1:\r\n worker = _a.sent();\r\n return [4 /*yield*/, worker.getCompletionEntryDetails(resource.toString(), offset, myItem.label)];\r\n case 2:\r\n details = _a.sent();\r\n if (!details) {\r\n return [2 /*return*/, myItem];\r\n }\r\n return [2 /*return*/, {\r\n uri: resource,\r\n position: position,\r\n label: details.name,\r\n kind: SuggestAdapter.convertKind(details.kind),\r\n detail: displayPartsToString(details.displayParts),\r\n documentation: {\r\n value: SuggestAdapter.createDocumentationString(details)\r\n }\r\n }];\r\n }\r\n });\r\n });\r\n };\r\n SuggestAdapter.convertKind = function (kind) {\r\n switch (kind) {\r\n case Kind.primitiveType:\r\n case Kind.keyword:\r\n return languages.CompletionItemKind.Keyword;\r\n case Kind.variable:\r\n case Kind.localVariable:\r\n return languages.CompletionItemKind.Variable;\r\n case Kind.memberVariable:\r\n case Kind.memberGetAccessor:\r\n case Kind.memberSetAccessor:\r\n return languages.CompletionItemKind.Field;\r\n case Kind.function:\r\n case Kind.memberFunction:\r\n case Kind.constructSignature:\r\n case Kind.callSignature:\r\n case Kind.indexSignature:\r\n return languages.CompletionItemKind.Function;\r\n case Kind.enum:\r\n return languages.CompletionItemKind.Enum;\r\n case Kind.module:\r\n return languages.CompletionItemKind.Module;\r\n case Kind.class:\r\n return languages.CompletionItemKind.Class;\r\n case Kind.interface:\r\n return languages.CompletionItemKind.Interface;\r\n case Kind.warning:\r\n return languages.CompletionItemKind.File;\r\n }\r\n return languages.CompletionItemKind.Property;\r\n };\r\n SuggestAdapter.createDocumentationString = function (details) {\r\n var documentationString = displayPartsToString(details.documentation);\r\n if (details.tags) {\r\n for (var _i = 0, _a = details.tags; _i < _a.length; _i++) {\r\n var tag = _a[_i];\r\n documentationString += \"\\n\\n\" + tagToString(tag);\r\n }\r\n }\r\n return documentationString;\r\n };\r\n return SuggestAdapter;\r\n}(Adapter));\r\nexport { SuggestAdapter };\r\nfunction tagToString(tag) {\r\n var tagLabel = \"*@\" + tag.name + \"*\";\r\n if (tag.name === 'param' && tag.text) {\r\n var _a = tag.text, paramName = _a[0], rest = _a.slice(1);\r\n tagLabel += \"`\" + paramName.text + \"`\";\r\n if (rest.length > 0)\r\n tagLabel += \" \\u2014 \" + rest.map(function (r) { return r.text; }).join(' ');\r\n }\r\n else if (Array.isArray(tag.text)) {\r\n tagLabel += \" \\u2014 \" + tag.text.map(function (r) { return r.text; }).join(' ');\r\n }\r\n else if (tag.text) {\r\n tagLabel += \" \\u2014 \" + tag.text;\r\n }\r\n return tagLabel;\r\n}\r\nvar SignatureHelpAdapter = /** @class */ (function (_super) {\r\n __extends(SignatureHelpAdapter, _super);\r\n function SignatureHelpAdapter() {\r\n var _this = _super !== null && _super.apply(this, arguments) || this;\r\n _this.signatureHelpTriggerCharacters = ['(', ','];\r\n return _this;\r\n }\r\n SignatureHelpAdapter._toSignatureHelpTriggerReason = function (context) {\r\n switch (context.triggerKind) {\r\n case languages.SignatureHelpTriggerKind.TriggerCharacter:\r\n if (context.triggerCharacter) {\r\n if (context.isRetrigger) {\r\n return { kind: 'retrigger', triggerCharacter: context.triggerCharacter };\r\n }\r\n else {\r\n return { kind: 'characterTyped', triggerCharacter: context.triggerCharacter };\r\n }\r\n }\r\n else {\r\n return { kind: 'invoked' };\r\n }\r\n case languages.SignatureHelpTriggerKind.ContentChange:\r\n return context.isRetrigger ? { kind: 'retrigger' } : { kind: 'invoked' };\r\n case languages.SignatureHelpTriggerKind.Invoke:\r\n default:\r\n return { kind: 'invoked' };\r\n }\r\n };\r\n SignatureHelpAdapter.prototype.provideSignatureHelp = function (model, position, token, context) {\r\n return __awaiter(this, void 0, void 0, function () {\r\n var resource, offset, worker, info, ret;\r\n return __generator(this, function (_a) {\r\n switch (_a.label) {\r\n case 0:\r\n resource = model.uri;\r\n offset = model.getOffsetAt(position);\r\n return [4 /*yield*/, this._worker(resource)];\r\n case 1:\r\n worker = _a.sent();\r\n if (model.isDisposed()) {\r\n return [2 /*return*/];\r\n }\r\n return [4 /*yield*/, worker.getSignatureHelpItems(resource.toString(), offset, {\r\n triggerReason: SignatureHelpAdapter._toSignatureHelpTriggerReason(context)\r\n })];\r\n case 2:\r\n info = _a.sent();\r\n if (!info || model.isDisposed()) {\r\n return [2 /*return*/];\r\n }\r\n ret = {\r\n activeSignature: info.selectedItemIndex,\r\n activeParameter: info.argumentIndex,\r\n signatures: []\r\n };\r\n info.items.forEach(function (item) {\r\n var signature = {\r\n label: '',\r\n parameters: []\r\n };\r\n signature.documentation = {\r\n value: displayPartsToString(item.documentation)\r\n };\r\n signature.label += displayPartsToString(item.prefixDisplayParts);\r\n item.parameters.forEach(function (p, i, a) {\r\n var label = displayPartsToString(p.displayParts);\r\n var parameter = {\r\n label: label,\r\n documentation: {\r\n value: displayPartsToString(p.documentation)\r\n }\r\n };\r\n signature.label += label;\r\n signature.parameters.push(parameter);\r\n if (i < a.length - 1) {\r\n signature.label += displayPartsToString(item.separatorDisplayParts);\r\n }\r\n });\r\n signature.label += displayPartsToString(item.suffixDisplayParts);\r\n ret.signatures.push(signature);\r\n });\r\n return [2 /*return*/, {\r\n value: ret,\r\n dispose: function () { }\r\n }];\r\n }\r\n });\r\n });\r\n };\r\n return SignatureHelpAdapter;\r\n}(Adapter));\r\nexport { SignatureHelpAdapter };\r\n// --- hover ------\r\nvar QuickInfoAdapter = /** @class */ (function (_super) {\r\n __extends(QuickInfoAdapter, _super);\r\n function QuickInfoAdapter() {\r\n return _super !== null && _super.apply(this, arguments) || this;\r\n }\r\n QuickInfoAdapter.prototype.provideHover = function (model, position, token) {\r\n return __awaiter(this, void 0, void 0, function () {\r\n var resource, offset, worker, info, documentation, tags, contents;\r\n return __generator(this, function (_a) {\r\n switch (_a.label) {\r\n case 0:\r\n resource = model.uri;\r\n offset = model.getOffsetAt(position);\r\n return [4 /*yield*/, this._worker(resource)];\r\n case 1:\r\n worker = _a.sent();\r\n if (model.isDisposed()) {\r\n return [2 /*return*/];\r\n }\r\n return [4 /*yield*/, worker.getQuickInfoAtPosition(resource.toString(), offset)];\r\n case 2:\r\n info = _a.sent();\r\n if (!info || model.isDisposed()) {\r\n return [2 /*return*/];\r\n }\r\n documentation = displayPartsToString(info.documentation);\r\n tags = info.tags ? info.tags.map(function (tag) { return tagToString(tag); }).join(' \\n\\n') : '';\r\n contents = displayPartsToString(info.displayParts);\r\n return [2 /*return*/, {\r\n range: this._textSpanToRange(model, info.textSpan),\r\n contents: [\r\n {\r\n value: '```typescript\\n' + contents + '\\n```\\n'\r\n },\r\n {\r\n value: documentation + (tags ? '\\n\\n' + tags : '')\r\n }\r\n ]\r\n }];\r\n }\r\n });\r\n });\r\n };\r\n return QuickInfoAdapter;\r\n}(Adapter));\r\nexport { QuickInfoAdapter };\r\n// --- occurrences ------\r\nvar OccurrencesAdapter = /** @class */ (function (_super) {\r\n __extends(OccurrencesAdapter, _super);\r\n function OccurrencesAdapter() {\r\n return _super !== null && _super.apply(this, arguments) || this;\r\n }\r\n OccurrencesAdapter.prototype.provideDocumentHighlights = function (model, position, token) {\r\n return __awaiter(this, void 0, void 0, function () {\r\n var resource, offset, worker, entries;\r\n var _this = this;\r\n return __generator(this, function (_a) {\r\n switch (_a.label) {\r\n case 0:\r\n resource = model.uri;\r\n offset = model.getOffsetAt(position);\r\n return [4 /*yield*/, this._worker(resource)];\r\n case 1:\r\n worker = _a.sent();\r\n if (model.isDisposed()) {\r\n return [2 /*return*/];\r\n }\r\n return [4 /*yield*/, worker.getOccurrencesAtPosition(resource.toString(), offset)];\r\n case 2:\r\n entries = _a.sent();\r\n if (!entries || model.isDisposed()) {\r\n return [2 /*return*/];\r\n }\r\n return [2 /*return*/, entries.map(function (entry) {\r\n return {\r\n range: _this._textSpanToRange(model, entry.textSpan),\r\n kind: entry.isWriteAccess\r\n ? languages.DocumentHighlightKind.Write\r\n : languages.DocumentHighlightKind.Text\r\n };\r\n })];\r\n }\r\n });\r\n });\r\n };\r\n return OccurrencesAdapter;\r\n}(Adapter));\r\nexport { OccurrencesAdapter };\r\n// --- definition ------\r\nvar DefinitionAdapter = /** @class */ (function (_super) {\r\n __extends(DefinitionAdapter, _super);\r\n function DefinitionAdapter(_libFiles, worker) {\r\n var _this = _super.call(this, worker) || this;\r\n _this._libFiles = _libFiles;\r\n return _this;\r\n }\r\n DefinitionAdapter.prototype.provideDefinition = function (model, position, token) {\r\n return __awaiter(this, void 0, void 0, function () {\r\n var resource, offset, worker, entries, result, _i, entries_1, entry, uri, refModel, matchedLibFile, libModel;\r\n return __generator(this, function (_a) {\r\n switch (_a.label) {\r\n case 0:\r\n resource = model.uri;\r\n offset = model.getOffsetAt(position);\r\n return [4 /*yield*/, this._worker(resource)];\r\n case 1:\r\n worker = _a.sent();\r\n if (model.isDisposed()) {\r\n return [2 /*return*/];\r\n }\r\n return [4 /*yield*/, worker.getDefinitionAtPosition(resource.toString(), offset)];\r\n case 2:\r\n entries = _a.sent();\r\n if (!entries || model.isDisposed()) {\r\n return [2 /*return*/];\r\n }\r\n // Fetch lib files if necessary\r\n return [4 /*yield*/, this._libFiles.fetchLibFilesIfNecessary(entries.map(function (entry) { return Uri.parse(entry.fileName); }))];\r\n case 3:\r\n // Fetch lib files if necessary\r\n _a.sent();\r\n if (model.isDisposed()) {\r\n return [2 /*return*/];\r\n }\r\n result = [];\r\n for (_i = 0, entries_1 = entries; _i < entries_1.length; _i++) {\r\n entry = entries_1[_i];\r\n uri = Uri.parse(entry.fileName);\r\n refModel = this._libFiles.getOrCreateModel(uri);\r\n if (refModel) {\r\n result.push({\r\n uri: uri,\r\n range: this._textSpanToRange(refModel, entry.textSpan)\r\n });\r\n }\r\n else {\r\n matchedLibFile = typescriptDefaults.getExtraLibs()[entry.fileName];\r\n if (matchedLibFile) {\r\n libModel = editor.createModel(matchedLibFile.content, 'typescript', uri);\r\n return [2 /*return*/, {\r\n uri: uri,\r\n range: this._textSpanToRange(libModel, entry.textSpan)\r\n }];\r\n }\r\n }\r\n }\r\n return [2 /*return*/, result];\r\n }\r\n });\r\n });\r\n };\r\n return DefinitionAdapter;\r\n}(Adapter));\r\nexport { DefinitionAdapter };\r\n// --- references ------\r\nvar ReferenceAdapter = /** @class */ (function (_super) {\r\n __extends(ReferenceAdapter, _super);\r\n function ReferenceAdapter(_libFiles, worker) {\r\n var _this = _super.call(this, worker) || this;\r\n _this._libFiles = _libFiles;\r\n return _this;\r\n }\r\n ReferenceAdapter.prototype.provideReferences = function (model, position, context, token) {\r\n return __awaiter(this, void 0, void 0, function () {\r\n var resource, offset, worker, entries, result, _i, entries_2, entry, uri, refModel;\r\n return __generator(this, function (_a) {\r\n switch (_a.label) {\r\n case 0:\r\n resource = model.uri;\r\n offset = model.getOffsetAt(position);\r\n return [4 /*yield*/, this._worker(resource)];\r\n case 1:\r\n worker = _a.sent();\r\n if (model.isDisposed()) {\r\n return [2 /*return*/];\r\n }\r\n return [4 /*yield*/, worker.getReferencesAtPosition(resource.toString(), offset)];\r\n case 2:\r\n entries = _a.sent();\r\n if (!entries || model.isDisposed()) {\r\n return [2 /*return*/];\r\n }\r\n // Fetch lib files if necessary\r\n return [4 /*yield*/, this._libFiles.fetchLibFilesIfNecessary(entries.map(function (entry) { return Uri.parse(entry.fileName); }))];\r\n case 3:\r\n // Fetch lib files if necessary\r\n _a.sent();\r\n if (model.isDisposed()) {\r\n return [2 /*return*/];\r\n }\r\n result = [];\r\n for (_i = 0, entries_2 = entries; _i < entries_2.length; _i++) {\r\n entry = entries_2[_i];\r\n uri = Uri.parse(entry.fileName);\r\n refModel = this._libFiles.getOrCreateModel(uri);\r\n if (refModel) {\r\n result.push({\r\n uri: uri,\r\n range: this._textSpanToRange(refModel, entry.textSpan)\r\n });\r\n }\r\n }\r\n return [2 /*return*/, result];\r\n }\r\n });\r\n });\r\n };\r\n return ReferenceAdapter;\r\n}(Adapter));\r\nexport { ReferenceAdapter };\r\n// --- outline ------\r\nvar OutlineAdapter = /** @class */ (function (_super) {\r\n __extends(OutlineAdapter, _super);\r\n function OutlineAdapter() {\r\n return _super !== null && _super.apply(this, arguments) || this;\r\n }\r\n OutlineAdapter.prototype.provideDocumentSymbols = function (model, token) {\r\n return __awaiter(this, void 0, void 0, function () {\r\n var resource, worker, items, convert, result;\r\n var _this = this;\r\n return __generator(this, function (_a) {\r\n switch (_a.label) {\r\n case 0:\r\n resource = model.uri;\r\n return [4 /*yield*/, this._worker(resource)];\r\n case 1:\r\n worker = _a.sent();\r\n if (model.isDisposed()) {\r\n return [2 /*return*/];\r\n }\r\n return [4 /*yield*/, worker.getNavigationBarItems(resource.toString())];\r\n case 2:\r\n items = _a.sent();\r\n if (!items || model.isDisposed()) {\r\n return [2 /*return*/];\r\n }\r\n convert = function (bucket, item, containerLabel) {\r\n var result = {\r\n name: item.text,\r\n detail: '',\r\n kind: (outlineTypeTable[item.kind] || languages.SymbolKind.Variable),\r\n range: _this._textSpanToRange(model, item.spans[0]),\r\n selectionRange: _this._textSpanToRange(model, item.spans[0]),\r\n tags: [],\r\n };\r\n if (containerLabel)\r\n result.containerName = containerLabel;\r\n if (item.childItems && item.childItems.length > 0) {\r\n for (var _i = 0, _a = item.childItems; _i < _a.length; _i++) {\r\n var child = _a[_i];\r\n convert(bucket, child, result.name);\r\n }\r\n }\r\n bucket.push(result);\r\n };\r\n result = [];\r\n items.forEach(function (item) { return convert(result, item); });\r\n return [2 /*return*/, result];\r\n }\r\n });\r\n });\r\n };\r\n return OutlineAdapter;\r\n}(Adapter));\r\nexport { OutlineAdapter };\r\nvar Kind = /** @class */ (function () {\r\n function Kind() {\r\n }\r\n Kind.unknown = '';\r\n Kind.keyword = 'keyword';\r\n Kind.script = 'script';\r\n Kind.module = 'module';\r\n Kind.class = 'class';\r\n Kind.interface = 'interface';\r\n Kind.type = 'type';\r\n Kind.enum = 'enum';\r\n Kind.variable = 'var';\r\n Kind.localVariable = 'local var';\r\n Kind.function = 'function';\r\n Kind.localFunction = 'local function';\r\n Kind.memberFunction = 'method';\r\n Kind.memberGetAccessor = 'getter';\r\n Kind.memberSetAccessor = 'setter';\r\n Kind.memberVariable = 'property';\r\n Kind.constructorImplementation = 'constructor';\r\n Kind.callSignature = 'call';\r\n Kind.indexSignature = 'index';\r\n Kind.constructSignature = 'construct';\r\n Kind.parameter = 'parameter';\r\n Kind.typeParameter = 'type parameter';\r\n Kind.primitiveType = 'primitive type';\r\n Kind.label = 'label';\r\n Kind.alias = 'alias';\r\n Kind.const = 'const';\r\n Kind.let = 'let';\r\n Kind.warning = 'warning';\r\n return Kind;\r\n}());\r\nexport { Kind };\r\nvar outlineTypeTable = Object.create(null);\r\noutlineTypeTable[Kind.module] = languages.SymbolKind.Module;\r\noutlineTypeTable[Kind.class] = languages.SymbolKind.Class;\r\noutlineTypeTable[Kind.enum] = languages.SymbolKind.Enum;\r\noutlineTypeTable[Kind.interface] = languages.SymbolKind.Interface;\r\noutlineTypeTable[Kind.memberFunction] = languages.SymbolKind.Method;\r\noutlineTypeTable[Kind.memberVariable] = languages.SymbolKind.Property;\r\noutlineTypeTable[Kind.memberGetAccessor] = languages.SymbolKind.Property;\r\noutlineTypeTable[Kind.memberSetAccessor] = languages.SymbolKind.Property;\r\noutlineTypeTable[Kind.variable] = languages.SymbolKind.Variable;\r\noutlineTypeTable[Kind.const] = languages.SymbolKind.Variable;\r\noutlineTypeTable[Kind.localVariable] = languages.SymbolKind.Variable;\r\noutlineTypeTable[Kind.variable] = languages.SymbolKind.Variable;\r\noutlineTypeTable[Kind.function] = languages.SymbolKind.Function;\r\noutlineTypeTable[Kind.localFunction] = languages.SymbolKind.Function;\r\n// --- formatting ----\r\nvar FormatHelper = /** @class */ (function (_super) {\r\n __extends(FormatHelper, _super);\r\n function FormatHelper() {\r\n return _super !== null && _super.apply(this, arguments) || this;\r\n }\r\n FormatHelper._convertOptions = function (options) {\r\n return {\r\n ConvertTabsToSpaces: options.insertSpaces,\r\n TabSize: options.tabSize,\r\n IndentSize: options.tabSize,\r\n IndentStyle: IndentStyle.Smart,\r\n NewLineCharacter: '\\n',\r\n InsertSpaceAfterCommaDelimiter: true,\r\n InsertSpaceAfterSemicolonInForStatements: true,\r\n InsertSpaceBeforeAndAfterBinaryOperators: true,\r\n InsertSpaceAfterKeywordsInControlFlowStatements: true,\r\n InsertSpaceAfterFunctionKeywordForAnonymousFunctions: true,\r\n InsertSpaceAfterOpeningAndBeforeClosingNonemptyParenthesis: false,\r\n InsertSpaceAfterOpeningAndBeforeClosingNonemptyBrackets: false,\r\n InsertSpaceAfterOpeningAndBeforeClosingTemplateStringBraces: false,\r\n PlaceOpenBraceOnNewLineForControlBlocks: false,\r\n PlaceOpenBraceOnNewLineForFunctions: false\r\n };\r\n };\r\n FormatHelper.prototype._convertTextChanges = function (model, change) {\r\n return {\r\n text: change.newText,\r\n range: this._textSpanToRange(model, change.span)\r\n };\r\n };\r\n return FormatHelper;\r\n}(Adapter));\r\nexport { FormatHelper };\r\nvar FormatAdapter = /** @class */ (function (_super) {\r\n __extends(FormatAdapter, _super);\r\n function FormatAdapter() {\r\n return _super !== null && _super.apply(this, arguments) || this;\r\n }\r\n FormatAdapter.prototype.provideDocumentRangeFormattingEdits = function (model, range, options, token) {\r\n return __awaiter(this, void 0, void 0, function () {\r\n var resource, startOffset, endOffset, worker, edits;\r\n var _this = this;\r\n return __generator(this, function (_a) {\r\n switch (_a.label) {\r\n case 0:\r\n resource = model.uri;\r\n startOffset = model.getOffsetAt({\r\n lineNumber: range.startLineNumber,\r\n column: range.startColumn\r\n });\r\n endOffset = model.getOffsetAt({\r\n lineNumber: range.endLineNumber,\r\n column: range.endColumn\r\n });\r\n return [4 /*yield*/, this._worker(resource)];\r\n case 1:\r\n worker = _a.sent();\r\n if (model.isDisposed()) {\r\n return [2 /*return*/];\r\n }\r\n return [4 /*yield*/, worker.getFormattingEditsForRange(resource.toString(), startOffset, endOffset, FormatHelper._convertOptions(options))];\r\n case 2:\r\n edits = _a.sent();\r\n if (!edits || model.isDisposed()) {\r\n return [2 /*return*/];\r\n }\r\n return [2 /*return*/, edits.map(function (edit) { return _this._convertTextChanges(model, edit); })];\r\n }\r\n });\r\n });\r\n };\r\n return FormatAdapter;\r\n}(FormatHelper));\r\nexport { FormatAdapter };\r\nvar FormatOnTypeAdapter = /** @class */ (function (_super) {\r\n __extends(FormatOnTypeAdapter, _super);\r\n function FormatOnTypeAdapter() {\r\n return _super !== null && _super.apply(this, arguments) || this;\r\n }\r\n Object.defineProperty(FormatOnTypeAdapter.prototype, \"autoFormatTriggerCharacters\", {\r\n get: function () {\r\n return [';', '}', '\\n'];\r\n },\r\n enumerable: false,\r\n configurable: true\r\n });\r\n FormatOnTypeAdapter.prototype.provideOnTypeFormattingEdits = function (model, position, ch, options, token) {\r\n return __awaiter(this, void 0, void 0, function () {\r\n var resource, offset, worker, edits;\r\n var _this = this;\r\n return __generator(this, function (_a) {\r\n switch (_a.label) {\r\n case 0:\r\n resource = model.uri;\r\n offset = model.getOffsetAt(position);\r\n return [4 /*yield*/, this._worker(resource)];\r\n case 1:\r\n worker = _a.sent();\r\n if (model.isDisposed()) {\r\n return [2 /*return*/];\r\n }\r\n return [4 /*yield*/, worker.getFormattingEditsAfterKeystroke(resource.toString(), offset, ch, FormatHelper._convertOptions(options))];\r\n case 2:\r\n edits = _a.sent();\r\n if (!edits || model.isDisposed()) {\r\n return [2 /*return*/];\r\n }\r\n return [2 /*return*/, edits.map(function (edit) { return _this._convertTextChanges(model, edit); })];\r\n }\r\n });\r\n });\r\n };\r\n return FormatOnTypeAdapter;\r\n}(FormatHelper));\r\nexport { FormatOnTypeAdapter };\r\n// --- code actions ------\r\nvar CodeActionAdaptor = /** @class */ (function (_super) {\r\n __extends(CodeActionAdaptor, _super);\r\n function CodeActionAdaptor() {\r\n return _super !== null && _super.apply(this, arguments) || this;\r\n }\r\n CodeActionAdaptor.prototype.provideCodeActions = function (model, range, context, token) {\r\n return __awaiter(this, void 0, void 0, function () {\r\n var resource, start, end, formatOptions, errorCodes, worker, codeFixes, actions;\r\n var _this = this;\r\n return __generator(this, function (_a) {\r\n switch (_a.label) {\r\n case 0:\r\n resource = model.uri;\r\n start = model.getOffsetAt({\r\n lineNumber: range.startLineNumber,\r\n column: range.startColumn\r\n });\r\n end = model.getOffsetAt({\r\n lineNumber: range.endLineNumber,\r\n column: range.endColumn\r\n });\r\n formatOptions = FormatHelper._convertOptions(model.getOptions());\r\n errorCodes = context.markers\r\n .filter(function (m) { return m.code; })\r\n .map(function (m) { return m.code; })\r\n .map(Number);\r\n return [4 /*yield*/, this._worker(resource)];\r\n case 1:\r\n worker = _a.sent();\r\n if (model.isDisposed()) {\r\n return [2 /*return*/];\r\n }\r\n return [4 /*yield*/, worker.getCodeFixesAtPosition(resource.toString(), start, end, errorCodes, formatOptions)];\r\n case 2:\r\n codeFixes = _a.sent();\r\n if (!codeFixes || model.isDisposed()) {\r\n return [2 /*return*/, { actions: [], dispose: function () { } }];\r\n }\r\n actions = codeFixes\r\n .filter(function (fix) {\r\n // Removes any 'make a new file'-type code fix\r\n return fix.changes.filter(function (change) { return change.isNewFile; }).length === 0;\r\n })\r\n .map(function (fix) {\r\n return _this._tsCodeFixActionToMonacoCodeAction(model, context, fix);\r\n });\r\n return [2 /*return*/, {\r\n actions: actions,\r\n dispose: function () { }\r\n }];\r\n }\r\n });\r\n });\r\n };\r\n CodeActionAdaptor.prototype._tsCodeFixActionToMonacoCodeAction = function (model, context, codeFix) {\r\n var edits = [];\r\n for (var _i = 0, _a = codeFix.changes; _i < _a.length; _i++) {\r\n var change = _a[_i];\r\n for (var _b = 0, _c = change.textChanges; _b < _c.length; _b++) {\r\n var textChange = _c[_b];\r\n edits.push({\r\n resource: model.uri,\r\n edit: {\r\n range: this._textSpanToRange(model, textChange.span),\r\n text: textChange.newText\r\n }\r\n });\r\n }\r\n }\r\n var action = {\r\n title: codeFix.description,\r\n edit: { edits: edits },\r\n diagnostics: context.markers,\r\n kind: 'quickfix'\r\n };\r\n return action;\r\n };\r\n return CodeActionAdaptor;\r\n}(FormatHelper));\r\nexport { CodeActionAdaptor };\r\n// --- rename ----\r\nvar RenameAdapter = /** @class */ (function (_super) {\r\n __extends(RenameAdapter, _super);\r\n function RenameAdapter() {\r\n return _super !== null && _super.apply(this, arguments) || this;\r\n }\r\n RenameAdapter.prototype.provideRenameEdits = function (model, position, newName, token) {\r\n return __awaiter(this, void 0, void 0, function () {\r\n var resource, fileName, offset, worker, renameInfo, renameLocations, edits, _i, renameLocations_1, renameLocation, resource_1, model_1;\r\n return __generator(this, function (_a) {\r\n switch (_a.label) {\r\n case 0:\r\n resource = model.uri;\r\n fileName = resource.toString();\r\n offset = model.getOffsetAt(position);\r\n return [4 /*yield*/, this._worker(resource)];\r\n case 1:\r\n worker = _a.sent();\r\n if (model.isDisposed()) {\r\n return [2 /*return*/];\r\n }\r\n return [4 /*yield*/, worker.getRenameInfo(fileName, offset, {\r\n allowRenameOfImportPath: false\r\n })];\r\n case 2:\r\n renameInfo = _a.sent();\r\n if (renameInfo.canRename === false) {\r\n // use explicit comparison so that the discriminated union gets resolved properly\r\n return [2 /*return*/, {\r\n edits: [],\r\n rejectReason: renameInfo.localizedErrorMessage\r\n }];\r\n }\r\n if (renameInfo.fileToRename !== undefined) {\r\n throw new Error('Renaming files is not supported.');\r\n }\r\n return [4 /*yield*/, worker.findRenameLocations(fileName, offset, \r\n /*strings*/ false, \r\n /*comments*/ false, \r\n /*prefixAndSuffix*/ false)];\r\n case 3:\r\n renameLocations = _a.sent();\r\n if (!renameLocations || model.isDisposed()) {\r\n return [2 /*return*/];\r\n }\r\n edits = [];\r\n for (_i = 0, renameLocations_1 = renameLocations; _i < renameLocations_1.length; _i++) {\r\n renameLocation = renameLocations_1[_i];\r\n resource_1 = Uri.parse(renameLocation.fileName);\r\n model_1 = editor.getModel(resource_1);\r\n if (model_1) {\r\n edits.push({\r\n resource: resource_1,\r\n edit: {\r\n range: this._textSpanToRange(model_1, renameLocation.textSpan),\r\n text: newName\r\n }\r\n });\r\n }\r\n else {\r\n throw new Error(\"Unknown URI \" + resource_1 + \".\");\r\n }\r\n }\r\n return [2 /*return*/, { edits: edits }];\r\n }\r\n });\r\n });\r\n };\r\n return RenameAdapter;\r\n}(Adapter));\r\nexport { RenameAdapter };\r\n","/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n'use strict';\r\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\r\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\r\n return new (P || (P = Promise))(function (resolve, reject) {\r\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\r\n step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n });\r\n};\r\nvar __generator = (this && this.__generator) || function (thisArg, body) {\r\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\r\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\r\n function verb(n) { return function (v) { return step([n, v]); }; }\r\n function step(op) {\r\n if (f) throw new TypeError(\"Generator is already executing.\");\r\n while (_) try {\r\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\r\n if (y = 0, t) op = [op[0] & 2, t.value];\r\n switch (op[0]) {\r\n case 0: case 1: t = op; break;\r\n case 4: _.label++; return { value: op[1], done: false };\r\n case 5: _.label++; y = op[1]; op = [0]; continue;\r\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\r\n default:\r\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\r\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\r\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\r\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\r\n if (t[2]) _.ops.pop();\r\n _.trys.pop(); continue;\r\n }\r\n op = body.call(thisArg, _);\r\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\r\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\r\n }\r\n};\r\nimport { editor } from './fillers/monaco-editor-core.js';\r\nvar WorkerManager = /** @class */ (function () {\r\n function WorkerManager(modeId, defaults) {\r\n var _this = this;\r\n this._modeId = modeId;\r\n this._defaults = defaults;\r\n this._worker = null;\r\n this._client = null;\r\n this._configChangeListener = this._defaults.onDidChange(function () { return _this._stopWorker(); });\r\n this._updateExtraLibsToken = 0;\r\n this._extraLibsChangeListener = this._defaults.onDidExtraLibsChange(function () {\r\n return _this._updateExtraLibs();\r\n });\r\n }\r\n WorkerManager.prototype._stopWorker = function () {\r\n if (this._worker) {\r\n this._worker.dispose();\r\n this._worker = null;\r\n }\r\n this._client = null;\r\n };\r\n WorkerManager.prototype.dispose = function () {\r\n this._configChangeListener.dispose();\r\n this._extraLibsChangeListener.dispose();\r\n this._stopWorker();\r\n };\r\n WorkerManager.prototype._updateExtraLibs = function () {\r\n return __awaiter(this, void 0, void 0, function () {\r\n var myToken, proxy;\r\n return __generator(this, function (_a) {\r\n switch (_a.label) {\r\n case 0:\r\n if (!this._worker) {\r\n return [2 /*return*/];\r\n }\r\n myToken = ++this._updateExtraLibsToken;\r\n return [4 /*yield*/, this._worker.getProxy()];\r\n case 1:\r\n proxy = _a.sent();\r\n if (this._updateExtraLibsToken !== myToken) {\r\n // avoid multiple calls\r\n return [2 /*return*/];\r\n }\r\n proxy.updateExtraLibs(this._defaults.getExtraLibs());\r\n return [2 /*return*/];\r\n }\r\n });\r\n });\r\n };\r\n WorkerManager.prototype._getClient = function () {\r\n var _this = this;\r\n if (!this._client) {\r\n this._worker = editor.createWebWorker({\r\n // module that exports the create() method and returns a `TypeScriptWorker` instance\r\n moduleId: 'vs/language/typescript/tsWorker',\r\n label: this._modeId,\r\n keepIdleModels: true,\r\n // passed in to the create() method\r\n createData: {\r\n compilerOptions: this._defaults.getCompilerOptions(),\r\n extraLibs: this._defaults.getExtraLibs(),\r\n customWorkerPath: this._defaults.workerOptions.customWorkerPath\r\n }\r\n });\r\n var p = this._worker.getProxy();\r\n if (this._defaults.getEagerModelSync()) {\r\n p = p.then(function (worker) {\r\n if (_this._worker) {\r\n return _this._worker.withSyncedResources(editor\r\n .getModels()\r\n .filter(function (model) { return model.getModeId() === _this._modeId; })\r\n .map(function (model) { return model.uri; }));\r\n }\r\n return worker;\r\n });\r\n }\r\n this._client = p;\r\n }\r\n return this._client;\r\n };\r\n WorkerManager.prototype.getLanguageServiceWorker = function () {\r\n var _this = this;\r\n var resources = [];\r\n for (var _i = 0; _i < arguments.length; _i++) {\r\n resources[_i] = arguments[_i];\r\n }\r\n var _client;\r\n return this._getClient()\r\n .then(function (client) {\r\n _client = client;\r\n })\r\n .then(function (_) {\r\n if (_this._worker) {\r\n return _this._worker.withSyncedResources(resources);\r\n }\r\n })\r\n .then(function (_) { return _client; });\r\n };\r\n return WorkerManager;\r\n}());\r\nexport { WorkerManager };\r\n","/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n//\r\n// **NOTE**: Do not edit directly! This file is generated using `npm run import-typescript`\r\n//\r\n/** Contains all the lib files */\r\nexport var libFileSet = {};\r\nlibFileSet['lib.d.ts'] = true;\r\nlibFileSet['lib.dom.d.ts'] = true;\r\nlibFileSet['lib.dom.iterable.d.ts'] = true;\r\nlibFileSet['lib.es2015.collection.d.ts'] = true;\r\nlibFileSet['lib.es2015.core.d.ts'] = true;\r\nlibFileSet['lib.es2015.d.ts'] = true;\r\nlibFileSet['lib.es2015.generator.d.ts'] = true;\r\nlibFileSet['lib.es2015.iterable.d.ts'] = true;\r\nlibFileSet['lib.es2015.promise.d.ts'] = true;\r\nlibFileSet['lib.es2015.proxy.d.ts'] = true;\r\nlibFileSet['lib.es2015.reflect.d.ts'] = true;\r\nlibFileSet['lib.es2015.symbol.d.ts'] = true;\r\nlibFileSet['lib.es2015.symbol.wellknown.d.ts'] = true;\r\nlibFileSet['lib.es2016.array.include.d.ts'] = true;\r\nlibFileSet['lib.es2016.d.ts'] = true;\r\nlibFileSet['lib.es2016.full.d.ts'] = true;\r\nlibFileSet['lib.es2017.d.ts'] = true;\r\nlibFileSet['lib.es2017.full.d.ts'] = true;\r\nlibFileSet['lib.es2017.intl.d.ts'] = true;\r\nlibFileSet['lib.es2017.object.d.ts'] = true;\r\nlibFileSet['lib.es2017.sharedmemory.d.ts'] = true;\r\nlibFileSet['lib.es2017.string.d.ts'] = true;\r\nlibFileSet['lib.es2017.typedarrays.d.ts'] = true;\r\nlibFileSet['lib.es2018.asyncgenerator.d.ts'] = true;\r\nlibFileSet['lib.es2018.asynciterable.d.ts'] = true;\r\nlibFileSet['lib.es2018.d.ts'] = true;\r\nlibFileSet['lib.es2018.full.d.ts'] = true;\r\nlibFileSet['lib.es2018.intl.d.ts'] = true;\r\nlibFileSet['lib.es2018.promise.d.ts'] = true;\r\nlibFileSet['lib.es2018.regexp.d.ts'] = true;\r\nlibFileSet['lib.es2019.array.d.ts'] = true;\r\nlibFileSet['lib.es2019.d.ts'] = true;\r\nlibFileSet['lib.es2019.full.d.ts'] = true;\r\nlibFileSet['lib.es2019.object.d.ts'] = true;\r\nlibFileSet['lib.es2019.string.d.ts'] = true;\r\nlibFileSet['lib.es2019.symbol.d.ts'] = true;\r\nlibFileSet['lib.es2020.bigint.d.ts'] = true;\r\nlibFileSet['lib.es2020.d.ts'] = true;\r\nlibFileSet['lib.es2020.full.d.ts'] = true;\r\nlibFileSet['lib.es2020.intl.d.ts'] = true;\r\nlibFileSet['lib.es2020.promise.d.ts'] = true;\r\nlibFileSet['lib.es2020.sharedmemory.d.ts'] = true;\r\nlibFileSet['lib.es2020.string.d.ts'] = true;\r\nlibFileSet['lib.es2020.symbol.wellknown.d.ts'] = true;\r\nlibFileSet['lib.es2021.d.ts'] = true;\r\nlibFileSet['lib.es2021.full.d.ts'] = true;\r\nlibFileSet['lib.es2021.promise.d.ts'] = true;\r\nlibFileSet['lib.es2021.string.d.ts'] = true;\r\nlibFileSet['lib.es2021.weakref.d.ts'] = true;\r\nlibFileSet['lib.es5.d.ts'] = true;\r\nlibFileSet['lib.es6.d.ts'] = true;\r\nlibFileSet['lib.esnext.d.ts'] = true;\r\nlibFileSet['lib.esnext.full.d.ts'] = true;\r\nlibFileSet['lib.esnext.intl.d.ts'] = true;\r\nlibFileSet['lib.esnext.promise.d.ts'] = true;\r\nlibFileSet['lib.esnext.string.d.ts'] = true;\r\nlibFileSet['lib.esnext.weakref.d.ts'] = true;\r\nlibFileSet['lib.scripthost.d.ts'] = true;\r\nlibFileSet['lib.webworker.d.ts'] = true;\r\nlibFileSet['lib.webworker.importscripts.d.ts'] = true;\r\nlibFileSet['lib.webworker.iterable.d.ts'] = true;\r\n","/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n'use strict';\r\nimport { WorkerManager } from './workerManager.js';\r\nimport * as languageFeatures from './languageFeatures.js';\r\nimport { languages } from './fillers/monaco-editor-core.js';\r\nvar javaScriptWorker;\r\nvar typeScriptWorker;\r\nexport function setupTypeScript(defaults) {\r\n typeScriptWorker = setupMode(defaults, 'typescript');\r\n}\r\nexport function setupJavaScript(defaults) {\r\n javaScriptWorker = setupMode(defaults, 'javascript');\r\n}\r\nexport function getJavaScriptWorker() {\r\n return new Promise(function (resolve, reject) {\r\n if (!javaScriptWorker) {\r\n return reject('JavaScript not registered!');\r\n }\r\n resolve(javaScriptWorker);\r\n });\r\n}\r\nexport function getTypeScriptWorker() {\r\n return new Promise(function (resolve, reject) {\r\n if (!typeScriptWorker) {\r\n return reject('TypeScript not registered!');\r\n }\r\n resolve(typeScriptWorker);\r\n });\r\n}\r\nfunction setupMode(defaults, modeId) {\r\n var client = new WorkerManager(modeId, defaults);\r\n var worker = function () {\r\n var uris = [];\r\n for (var _i = 0; _i < arguments.length; _i++) {\r\n uris[_i] = arguments[_i];\r\n }\r\n return client.getLanguageServiceWorker.apply(client, uris);\r\n };\r\n var libFiles = new languageFeatures.LibFiles(worker);\r\n languages.registerCompletionItemProvider(modeId, new languageFeatures.SuggestAdapter(worker));\r\n languages.registerSignatureHelpProvider(modeId, new languageFeatures.SignatureHelpAdapter(worker));\r\n languages.registerHoverProvider(modeId, new languageFeatures.QuickInfoAdapter(worker));\r\n languages.registerDocumentHighlightProvider(modeId, new languageFeatures.OccurrencesAdapter(worker));\r\n languages.registerDefinitionProvider(modeId, new languageFeatures.DefinitionAdapter(libFiles, worker));\r\n languages.registerReferenceProvider(modeId, new languageFeatures.ReferenceAdapter(libFiles, worker));\r\n languages.registerDocumentSymbolProvider(modeId, new languageFeatures.OutlineAdapter(worker));\r\n languages.registerDocumentRangeFormattingEditProvider(modeId, new languageFeatures.FormatAdapter(worker));\r\n languages.registerOnTypeFormattingEditProvider(modeId, new languageFeatures.FormatOnTypeAdapter(worker));\r\n languages.registerCodeActionProvider(modeId, new languageFeatures.CodeActionAdaptor(worker));\r\n languages.registerRenameProvider(modeId, new languageFeatures.RenameAdapter(worker));\r\n new languageFeatures.DiagnosticsAdapter(libFiles, defaults, modeId, worker);\r\n return worker;\r\n}\r\n"],"names":["extendStatics","IndentStyle","WorkerManager","modeId","defaults","_this","this","_modeId","_defaults","_worker","_client","_configChangeListener","onDidChange","_stopWorker","_updateExtraLibsToken","_extraLibsChangeListener","onDidExtraLibsChange","_updateExtraLibs","prototype","dispose","thisArg","_arguments","generator","myToken","proxy","body","f","y","t","g","_","label","sent","trys","ops","next","verb","Symbol","iterator","n","v","op","TypeError","call","done","value","pop","length","push","e","step","__generator","_a","getProxy","updateExtraLibs","getExtraLibs","P","Promise","resolve","reject","fulfilled","rejected","result","then","apply","_getClient","moduleId","keepIdleModels","createData","compilerOptions","getCompilerOptions","extraLibs","customWorkerPath","workerOptions","p","getEagerModelSync","worker","withSyncedResources","filter","model","getModeId","map","uri","getLanguageServiceWorker","resources","_i","arguments","client","libFileSet","__extends","d","b","Object","setPrototypeOf","__proto__","Array","hasOwnProperty","String","__","constructor","create","flattenDiagnosticMessageText","diag","newLine","indent","undefined","i","messageText","displayPartsToString","displayParts","displayPart","text","join","DiagnosticCategory","Adapter","_textSpanToRange","span","p1","getPositionAt","start","p2","startLineNumber","lineNumber","startColumn","column","endLineNumber","endColumn","LibFiles","_libFiles","_hasFetchedLibFiles","_fetchLibFilesPromise","isLibFile","path","indexOf","slice","getOrCreateModel","_containsLibFile","uris","uris_1","fetchLibFilesIfNecessary","_fetchLibFiles","w","getLibFiles","libFiles","DiagnosticsAdapter","_super","_selector","_disposables","_listener","onModelAdd","handle","maybeValidate","getDiagnosticsOptions","onlyVisible","isAttachedToEditor","_doValidate","changeSubscription","onDidChangeContent","clearTimeout","setTimeout","visibleSubscription","onDidChangeAttached","toString","onModelRemoved","key","event","recomputeDiagostics","forEach","promises","noSyntaxValidation","noSemanticValidation","noSuggestionDiagnostics","allDiagnostics","diagnostics","relatedUris","_b","isDisposed","getSyntacticDiagnostics","getSemanticDiagnostics","getSuggestionDiagnostics","all","reduce","c","concat","diagnosticCodesToIgnore","code","relatedInformation","file","fileName","_convertDiagnostics","diagStart","diagLength","tags","reportsUnnecessary","reportsDeprecated","severity","_tsDiagnosticCategoryToMarkerSeverity","category","message","_convertRelatedInformation","info","relatedResource","relatedResourceUri","infoStart","infoLength","resource","Error","Message","Warning","Suggestion","SuggestAdapter","defineProperty","get","enumerable","configurable","provideCompletionItems","position","_context","token","wordInfo","wordRange","offset","suggestions","getWordUntilPosition","getOffsetAt","getCompletionsAtPosition","entries","entry","range","replacementSpan","kindModifiers","name","insertText","sortText","kind","convertKind","resolveCompletionItem","item","myItem","details","getCompletionEntryDetails","detail","documentation","createDocumentationString","Kind","primitiveType","keyword","variable","localVariable","memberVariable","memberGetAccessor","memberSetAccessor","function","memberFunction","constructSignature","callSignature","indexSignature","enum","module","class","interface","warning","documentationString","tagToString","tag","tagLabel","paramName","rest","r","isArray","SignatureHelpAdapter","signatureHelpTriggerCharacters","_toSignatureHelpTriggerReason","context","triggerKind","triggerCharacter","isRetrigger","provideSignatureHelp","ret","getSignatureHelpItems","triggerReason","activeSignature","selectedItemIndex","activeParameter","argumentIndex","signatures","items","signature","parameters","prefixDisplayParts","a","parameter","separatorDisplayParts","suffixDisplayParts","QuickInfoAdapter","provideHover","contents","getQuickInfoAtPosition","textSpan","OccurrencesAdapter","provideDocumentHighlights","getOccurrencesAtPosition","isWriteAccess","DefinitionAdapter","provideDefinition","entries_1","refModel","matchedLibFile","libModel","getDefinitionAtPosition","typescriptDefaults","content","ReferenceAdapter","provideReferences","entries_2","getReferencesAtPosition","OutlineAdapter","provideDocumentSymbols","convert","getNavigationBarItems","bucket","containerLabel","outlineTypeTable","spans","selectionRange","containerName","childItems","child","unknown","script","type","localFunction","constructorImplementation","typeParameter","alias","const","let","javaScriptWorker","typeScriptWorker","FormatHelper","_convertOptions","options","ConvertTabsToSpaces","insertSpaces","TabSize","tabSize","IndentSize","Smart","NewLineCharacter","InsertSpaceAfterCommaDelimiter","InsertSpaceAfterSemicolonInForStatements","InsertSpaceBeforeAndAfterBinaryOperators","InsertSpaceAfterKeywordsInControlFlowStatements","InsertSpaceAfterFunctionKeywordForAnonymousFunctions","InsertSpaceAfterOpeningAndBeforeClosingNonemptyParenthesis","InsertSpaceAfterOpeningAndBeforeClosingNonemptyBrackets","InsertSpaceAfterOpeningAndBeforeClosingTemplateStringBraces","PlaceOpenBraceOnNewLineForControlBlocks","PlaceOpenBraceOnNewLineForFunctions","_convertTextChanges","change","newText","FormatAdapter","provideDocumentRangeFormattingEdits","startOffset","endOffset","edits","getFormattingEditsForRange","edit","FormatOnTypeAdapter","provideOnTypeFormattingEdits","ch","getFormattingEditsAfterKeystroke","CodeActionAdaptor","provideCodeActions","end","formatOptions","errorCodes","codeFixes","getOptions","markers","m","Number","getCodeFixesAtPosition","actions","fix","changes","isNewFile","_tsCodeFixActionToMonacoCodeAction","codeFix","_c","textChanges","textChange","title","description","RenameAdapter","provideRenameEdits","newName","renameInfo","renameLocations","renameLocations_1","renameLocation","resource_1","model_1","getRenameInfo","allowRenameOfImportPath","canRename","rejectReason","localizedErrorMessage","fileToRename","findRenameLocations","setupTypeScript","setupMode","setupJavaScript","getJavaScriptWorker","getTypeScriptWorker"],"sourceRoot":""} \ No newline at end of file diff --git a/68664da4962ed33db33e.ttf b/68664da4962ed33db33e.ttf new file mode 100644 index 0000000..90ee064 Binary files /dev/null and b/68664da4962ed33db33e.ttf differ diff --git a/717.index.js b/717.index.js new file mode 100644 index 0000000..11ec573 --- /dev/null +++ b/717.index.js @@ -0,0 +1,2 @@ +"use strict";(self.webpackChunkreact_monaco_editor_browser_example=self.webpackChunkreact_monaco_editor_browser_example||[]).push([[717],{6717:(e,t,n)=>{n.r(t),n.d(t,{conf:()=>r,language:()=>i});var o=n(9587),r={wordPattern:/(-?\d*\.\d\w*)|([^\`\~\!\@\#\%\^\&\*\(\)\-\=\+\[\{\]\}\\\|\;\:\'\"\,\.\<\>\/\?\s]+)/g,comments:{lineComment:"//",blockComment:["/*","*/"]},brackets:[["{","}"],["[","]"],["(",")"]],onEnterRules:[{beforeText:/^\s*\/\*\*(?!\/)([^\*]|\*(?!\/))*$/,afterText:/^\s*\*\/$/,action:{indentAction:o.Mj.IndentAction.IndentOutdent,appendText:" * "}},{beforeText:/^\s*\/\*\*(?!\/)([^\*]|\*(?!\/))*$/,action:{indentAction:o.Mj.IndentAction.None,appendText:" * "}},{beforeText:/^(\t|(\ \ ))*\ \*(\ ([^\*]|\*(?!\/))*)?$/,action:{indentAction:o.Mj.IndentAction.None,appendText:"* "}},{beforeText:/^(\t|(\ \ ))*\ \*\/\s*$/,action:{indentAction:o.Mj.IndentAction.None,removeText:1}}],autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"',notIn:["string"]},{open:"'",close:"'",notIn:["string","comment"]},{open:"`",close:"`",notIn:["string","comment"]},{open:"/**",close:" */",notIn:["string"]}],folding:{markers:{start:new RegExp("^\\s*//\\s*#?region\\b"),end:new RegExp("^\\s*//\\s*#?endregion\\b")}}},i={defaultToken:"invalid",tokenPostfix:".ts",keywords:["abstract","any","as","asserts","bigint","boolean","break","case","catch","class","continue","const","constructor","debugger","declare","default","delete","do","else","enum","export","extends","false","finally","for","from","function","get","if","implements","import","in","infer","instanceof","interface","is","keyof","let","module","namespace","never","new","null","number","object","package","private","protected","public","override","readonly","require","global","return","set","static","string","super","switch","symbol","this","throw","true","try","type","typeof","undefined","unique","unknown","var","void","while","with","yield","async","await","of"],operators:["<=",">=","==","!=","===","!==","=>","+","-","**","*","/","%","++","--","<<",">",">>>","&","|","^","!","~","&&","||","??","?",":","=","+=","-=","*=","**=","/=","%=","<<=",">>=",">>>=","&=","|=","^=","@"],symbols:/[=>](?!@symbols)/,"@brackets"],[/!(?=([^=]|$))/,"delimiter"],[/@symbols/,{cases:{"@operators":"delimiter","@default":""}}],[/(@digits)[eE]([\-+]?(@digits))?/,"number.float"],[/(@digits)\.(@digits)([eE][\-+]?(@digits))?/,"number.float"],[/0[xX](@hexdigits)n?/,"number.hex"],[/0[oO]?(@octaldigits)n?/,"number.octal"],[/0[bB](@binarydigits)n?/,"number.binary"],[/(@digits)n?/,"number"],[/[;,.]/,"delimiter"],[/"([^"\\]|\\.)*$/,"string.invalid"],[/'([^'\\]|\\.)*$/,"string.invalid"],[/"/,"string","@string_double"],[/'/,"string","@string_single"],[/`/,"string","@string_backtick"]],whitespace:[[/[ \t\r\n]+/,""],[/\/\*\*(?!\/)/,"comment.doc","@jsdoc"],[/\/\*/,"comment","@comment"],[/\/\/.*$/,"comment"]],comment:[[/[^\/*]+/,"comment"],[/\*\//,"comment","@pop"],[/[\/*]/,"comment"]],jsdoc:[[/[^\/*]+/,"comment.doc"],[/\*\//,"comment.doc","@pop"],[/[\/*]/,"comment.doc"]],regexp:[[/(\{)(\d+(?:,\d*)?)(\})/,["regexp.escape.control","regexp.escape.control","regexp.escape.control"]],[/(\[)(\^?)(?=(?:[^\]\\\/]|\\.)+)/,["regexp.escape.control",{token:"regexp.escape.control",next:"@regexrange"}]],[/(\()(\?:|\?=|\?!)/,["regexp.escape.control","regexp.escape.control"]],[/[()]/,"regexp.escape.control"],[/@regexpctl/,"regexp.escape.control"],[/[^\\\/]/,"regexp"],[/@regexpesc/,"regexp.escape"],[/\\\./,"regexp.invalid"],[/(\/)([dgimsuy]*)/,[{token:"regexp",bracket:"@close",next:"@pop"},"keyword.other"]]],regexrange:[[/-/,"regexp.escape.control"],[/\^/,"regexp.invalid"],[/@regexpesc/,"regexp.escape"],[/[^\]]/,"regexp"],[/\]/,{token:"regexp.escape.control",next:"@pop",bracket:"@close"}]],string_double:[[/[^\\"]+/,"string"],[/@escapes/,"string.escape"],[/\\./,"string.escape.invalid"],[/"/,"string","@pop"]],string_single:[[/[^\\']+/,"string"],[/@escapes/,"string.escape"],[/\\./,"string.escape.invalid"],[/'/,"string","@pop"]],string_backtick:[[/\$\{/,{token:"delimiter.bracket",next:"@bracketCounting"}],[/[^\\`$]+/,"string"],[/@escapes/,"string.escape"],[/\\./,"string.escape.invalid"],[/`/,"string","@pop"]],bracketCounting:[[/\{/,"delimiter.bracket","@bracketCounting"],[/\}/,"delimiter.bracket","@pop"],{include:"common"}]}}}}]); +//# sourceMappingURL=717.index.js.map \ No newline at end of file diff --git a/717.index.js.map b/717.index.js.map new file mode 100644 index 0000000..cc87905 --- /dev/null +++ b/717.index.js.map @@ -0,0 +1 @@ +{"version":3,"file":"717.index.js","mappings":"iNAKWA,EAAO,CACdC,YAAa,uFACbC,SAAU,CACNC,YAAa,KACbC,aAAc,CAAC,KAAM,OAEzBC,SAAU,CACN,CAAC,IAAK,KACN,CAAC,IAAK,KACN,CAAC,IAAK,MAEVC,aAAc,CACV,CAEIC,WAAY,qCACZC,UAAW,YACXC,OAAQ,CACJC,aAAc,gCACdC,WAAY,QAGpB,CAEIJ,WAAY,qCACZE,OAAQ,CACJC,aAAc,uBACdC,WAAY,QAGpB,CAEIJ,WAAY,2CACZE,OAAQ,CACJC,aAAc,uBACdC,WAAY,OAGpB,CAEIJ,WAAY,0BACZE,OAAQ,CACJC,aAAc,uBACdE,WAAY,KAIxBC,iBAAkB,CACd,CAAEC,KAAM,IAAKC,MAAO,KACpB,CAAED,KAAM,IAAKC,MAAO,KACpB,CAAED,KAAM,IAAKC,MAAO,KACpB,CAAED,KAAM,IAAKC,MAAO,IAAKC,MAAO,CAAC,WACjC,CAAEF,KAAM,IAAKC,MAAO,IAAKC,MAAO,CAAC,SAAU,YAC3C,CAAEF,KAAM,IAAKC,MAAO,IAAKC,MAAO,CAAC,SAAU,YAC3C,CAAEF,KAAM,MAAOC,MAAO,MAAOC,MAAO,CAAC,YAEzCC,QAAS,CACLC,QAAS,CACLC,MAAO,IAAIC,OAAO,0BAClBC,IAAK,IAAID,OAAO,gCAIjBE,EAAW,CAElBC,aAAc,UACdC,aAAc,MACdC,SAAU,CAGN,WACA,MACA,KACA,UACA,SACA,UACA,QACA,OACA,QACA,QACA,WACA,QACA,cACA,WACA,UACA,UACA,SACA,KACA,OACA,OACA,SACA,UACA,QACA,UACA,MACA,OACA,WACA,MACA,KACA,aACA,SACA,KACA,QACA,aACA,YACA,KACA,QACA,MACA,SACA,YACA,QACA,MACA,OACA,SACA,SACA,UACA,UACA,YACA,SACA,WACA,WACA,UACA,SACA,SACA,MACA,SACA,SACA,QACA,SACA,SACA,OACA,QACA,OACA,MACA,OACA,SACA,YACA,SACA,UACA,MACA,OACA,QACA,OACA,QACA,QACA,QACA,MAEJC,UAAW,CACP,KACA,KACA,KACA,KACA,MACA,MACA,KACA,IACA,IACA,KACA,IACA,IACA,IACA,KACA,KACA,KACA,KACA,KACA,MACA,IACA,IACA,IACA,IACA,IACA,KACA,KACA,KACA,IACA,IACA,IACA,KACA,KACA,KACA,MACA,KACA,KACA,MACA,MACA,OACA,KACA,KACA,KACA,KAGJC,QAAS,wBACTC,QAAS,wEACTC,OAAQ,cACRC,YAAa,oBACbC,aAAc,oBACdC,UAAW,iCACXC,UAAW,yBACXC,UAAW,+EAEXC,UAAW,CACPC,KAAM,CAAC,CAAC,OAAQ,qBAAsB,CAAEC,QAAS,WACjDC,OAAQ,CAEJ,CACI,gBACA,CACIC,MAAO,CACH,YAAa,UACb,WAAY,gBAIxB,CAAC,eAAgB,mBAGjB,CAAEF,QAAS,eAEX,CACI,6DACA,CAAEG,MAAO,SAAUC,QAAS,QAASC,KAAM,YAG/C,CAAC,WAAY,aACb,CAAC,mBAAoB,aACrB,CAAC,gBAAiB,aAClB,CACI,WACA,CACIH,MAAO,CACH,aAAc,YACd,WAAY,MAKxB,CAAC,kCAAmC,gBACpC,CAAC,6CAA8C,gBAC/C,CAAC,sBAAuB,cACxB,CAAC,yBAA0B,gBAC3B,CAAC,yBAA0B,iBAC3B,CAAC,cAAe,UAEhB,CAAC,QAAS,aAEV,CAAC,kBAAmB,kBACpB,CAAC,kBAAmB,kBACpB,CAAC,IAAK,SAAU,kBAChB,CAAC,IAAK,SAAU,kBAChB,CAAC,IAAK,SAAU,qBAEpBI,WAAY,CACR,CAAC,aAAc,IACf,CAAC,eAAgB,cAAe,UAChC,CAAC,OAAQ,UAAW,YACpB,CAAC,UAAW,YAEhBC,QAAS,CACL,CAAC,UAAW,WACZ,CAAC,OAAQ,UAAW,QACpB,CAAC,QAAS,YAEdC,MAAO,CACH,CAAC,UAAW,eACZ,CAAC,OAAQ,cAAe,QACxB,CAAC,QAAS,gBAGdC,OAAQ,CACJ,CACI,yBACA,CAAC,wBAAyB,wBAAyB,0BAEvD,CACI,kCACA,CAAC,wBAAyB,CAAEN,MAAO,wBAAyBE,KAAM,iBAEtE,CAAC,oBAAqB,CAAC,wBAAyB,0BAChD,CAAC,OAAQ,yBACT,CAAC,aAAc,yBACf,CAAC,UAAW,UACZ,CAAC,aAAc,iBACf,CAAC,OAAQ,kBACT,CACI,mBACA,CAAC,CAAEF,MAAO,SAAUC,QAAS,SAAUC,KAAM,QAAU,mBAG/DK,WAAY,CACR,CAAC,IAAK,yBACN,CAAC,KAAM,kBACP,CAAC,aAAc,iBACf,CAAC,QAAS,UACV,CACI,KACA,CACIP,MAAO,wBACPE,KAAM,OACND,QAAS,YAIrBO,cAAe,CACX,CAAC,UAAW,UACZ,CAAC,WAAY,iBACb,CAAC,MAAO,yBACR,CAAC,IAAK,SAAU,SAEpBC,cAAe,CACX,CAAC,UAAW,UACZ,CAAC,WAAY,iBACb,CAAC,MAAO,yBACR,CAAC,IAAK,SAAU,SAEpBC,gBAAiB,CACb,CAAC,OAAQ,CAAEV,MAAO,oBAAqBE,KAAM,qBAC7C,CAAC,WAAY,UACb,CAAC,WAAY,iBACb,CAAC,MAAO,yBACR,CAAC,IAAK,SAAU,SAEpBS,gBAAiB,CACb,CAAC,KAAM,oBAAqB,oBAC5B,CAAC,KAAM,oBAAqB,QAC5B,CAAEd,QAAS","sources":["webpack://react-monaco-editor-browser-example/./node_modules/monaco-editor/esm/vs/basic-languages/typescript/typescript.js"],"sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nimport { languages } from '../fillers/monaco-editor-core.js';\r\nexport var conf = {\r\n wordPattern: /(-?\\d*\\.\\d\\w*)|([^\\`\\~\\!\\@\\#\\%\\^\\&\\*\\(\\)\\-\\=\\+\\[\\{\\]\\}\\\\\\|\\;\\:\\'\\\"\\,\\.\\<\\>\\/\\?\\s]+)/g,\r\n comments: {\r\n lineComment: '//',\r\n blockComment: ['/*', '*/']\r\n },\r\n brackets: [\r\n ['{', '}'],\r\n ['[', ']'],\r\n ['(', ')']\r\n ],\r\n onEnterRules: [\r\n {\r\n // e.g. /** | */\r\n beforeText: /^\\s*\\/\\*\\*(?!\\/)([^\\*]|\\*(?!\\/))*$/,\r\n afterText: /^\\s*\\*\\/$/,\r\n action: {\r\n indentAction: languages.IndentAction.IndentOutdent,\r\n appendText: ' * '\r\n }\r\n },\r\n {\r\n // e.g. /** ...|\r\n beforeText: /^\\s*\\/\\*\\*(?!\\/)([^\\*]|\\*(?!\\/))*$/,\r\n action: {\r\n indentAction: languages.IndentAction.None,\r\n appendText: ' * '\r\n }\r\n },\r\n {\r\n // e.g. * ...|\r\n beforeText: /^(\\t|(\\ \\ ))*\\ \\*(\\ ([^\\*]|\\*(?!\\/))*)?$/,\r\n action: {\r\n indentAction: languages.IndentAction.None,\r\n appendText: '* '\r\n }\r\n },\r\n {\r\n // e.g. */|\r\n beforeText: /^(\\t|(\\ \\ ))*\\ \\*\\/\\s*$/,\r\n action: {\r\n indentAction: languages.IndentAction.None,\r\n removeText: 1\r\n }\r\n }\r\n ],\r\n autoClosingPairs: [\r\n { open: '{', close: '}' },\r\n { open: '[', close: ']' },\r\n { open: '(', close: ')' },\r\n { open: '\"', close: '\"', notIn: ['string'] },\r\n { open: \"'\", close: \"'\", notIn: ['string', 'comment'] },\r\n { open: '`', close: '`', notIn: ['string', 'comment'] },\r\n { open: '/**', close: ' */', notIn: ['string'] }\r\n ],\r\n folding: {\r\n markers: {\r\n start: new RegExp('^\\\\s*//\\\\s*#?region\\\\b'),\r\n end: new RegExp('^\\\\s*//\\\\s*#?endregion\\\\b')\r\n }\r\n }\r\n};\r\nexport var language = {\r\n // Set defaultToken to invalid to see what you do not tokenize yet\r\n defaultToken: 'invalid',\r\n tokenPostfix: '.ts',\r\n keywords: [\r\n // Should match the keys of textToKeywordObj in\r\n // https://github.com/microsoft/TypeScript/blob/master/src/compiler/scanner.ts\r\n 'abstract',\r\n 'any',\r\n 'as',\r\n 'asserts',\r\n 'bigint',\r\n 'boolean',\r\n 'break',\r\n 'case',\r\n 'catch',\r\n 'class',\r\n 'continue',\r\n 'const',\r\n 'constructor',\r\n 'debugger',\r\n 'declare',\r\n 'default',\r\n 'delete',\r\n 'do',\r\n 'else',\r\n 'enum',\r\n 'export',\r\n 'extends',\r\n 'false',\r\n 'finally',\r\n 'for',\r\n 'from',\r\n 'function',\r\n 'get',\r\n 'if',\r\n 'implements',\r\n 'import',\r\n 'in',\r\n 'infer',\r\n 'instanceof',\r\n 'interface',\r\n 'is',\r\n 'keyof',\r\n 'let',\r\n 'module',\r\n 'namespace',\r\n 'never',\r\n 'new',\r\n 'null',\r\n 'number',\r\n 'object',\r\n 'package',\r\n 'private',\r\n 'protected',\r\n 'public',\r\n 'override',\r\n 'readonly',\r\n 'require',\r\n 'global',\r\n 'return',\r\n 'set',\r\n 'static',\r\n 'string',\r\n 'super',\r\n 'switch',\r\n 'symbol',\r\n 'this',\r\n 'throw',\r\n 'true',\r\n 'try',\r\n 'type',\r\n 'typeof',\r\n 'undefined',\r\n 'unique',\r\n 'unknown',\r\n 'var',\r\n 'void',\r\n 'while',\r\n 'with',\r\n 'yield',\r\n 'async',\r\n 'await',\r\n 'of'\r\n ],\r\n operators: [\r\n '<=',\r\n '>=',\r\n '==',\r\n '!=',\r\n '===',\r\n '!==',\r\n '=>',\r\n '+',\r\n '-',\r\n '**',\r\n '*',\r\n '/',\r\n '%',\r\n '++',\r\n '--',\r\n '<<',\r\n '>',\r\n '>>>',\r\n '&',\r\n '|',\r\n '^',\r\n '!',\r\n '~',\r\n '&&',\r\n '||',\r\n '??',\r\n '?',\r\n ':',\r\n '=',\r\n '+=',\r\n '-=',\r\n '*=',\r\n '**=',\r\n '/=',\r\n '%=',\r\n '<<=',\r\n '>>=',\r\n '>>>=',\r\n '&=',\r\n '|=',\r\n '^=',\r\n '@'\r\n ],\r\n // we include these common regular expressions\r\n symbols: /[=>](?!@symbols)/, '@brackets'],\r\n [/!(?=([^=]|$))/, 'delimiter'],\r\n [\r\n /@symbols/,\r\n {\r\n cases: {\r\n '@operators': 'delimiter',\r\n '@default': ''\r\n }\r\n }\r\n ],\r\n // numbers\r\n [/(@digits)[eE]([\\-+]?(@digits))?/, 'number.float'],\r\n [/(@digits)\\.(@digits)([eE][\\-+]?(@digits))?/, 'number.float'],\r\n [/0[xX](@hexdigits)n?/, 'number.hex'],\r\n [/0[oO]?(@octaldigits)n?/, 'number.octal'],\r\n [/0[bB](@binarydigits)n?/, 'number.binary'],\r\n [/(@digits)n?/, 'number'],\r\n // delimiter: after number because of .\\d floats\r\n [/[;,.]/, 'delimiter'],\r\n // strings\r\n [/\"([^\"\\\\]|\\\\.)*$/, 'string.invalid'],\r\n [/'([^'\\\\]|\\\\.)*$/, 'string.invalid'],\r\n [/\"/, 'string', '@string_double'],\r\n [/'/, 'string', '@string_single'],\r\n [/`/, 'string', '@string_backtick']\r\n ],\r\n whitespace: [\r\n [/[ \\t\\r\\n]+/, ''],\r\n [/\\/\\*\\*(?!\\/)/, 'comment.doc', '@jsdoc'],\r\n [/\\/\\*/, 'comment', '@comment'],\r\n [/\\/\\/.*$/, 'comment']\r\n ],\r\n comment: [\r\n [/[^\\/*]+/, 'comment'],\r\n [/\\*\\//, 'comment', '@pop'],\r\n [/[\\/*]/, 'comment']\r\n ],\r\n jsdoc: [\r\n [/[^\\/*]+/, 'comment.doc'],\r\n [/\\*\\//, 'comment.doc', '@pop'],\r\n [/[\\/*]/, 'comment.doc']\r\n ],\r\n // We match regular expression quite precisely\r\n regexp: [\r\n [\r\n /(\\{)(\\d+(?:,\\d*)?)(\\})/,\r\n ['regexp.escape.control', 'regexp.escape.control', 'regexp.escape.control']\r\n ],\r\n [\r\n /(\\[)(\\^?)(?=(?:[^\\]\\\\\\/]|\\\\.)+)/,\r\n ['regexp.escape.control', { token: 'regexp.escape.control', next: '@regexrange' }]\r\n ],\r\n [/(\\()(\\?:|\\?=|\\?!)/, ['regexp.escape.control', 'regexp.escape.control']],\r\n [/[()]/, 'regexp.escape.control'],\r\n [/@regexpctl/, 'regexp.escape.control'],\r\n [/[^\\\\\\/]/, 'regexp'],\r\n [/@regexpesc/, 'regexp.escape'],\r\n [/\\\\\\./, 'regexp.invalid'],\r\n [\r\n /(\\/)([dgimsuy]*)/,\r\n [{ token: 'regexp', bracket: '@close', next: '@pop' }, 'keyword.other']\r\n ]\r\n ],\r\n regexrange: [\r\n [/-/, 'regexp.escape.control'],\r\n [/\\^/, 'regexp.invalid'],\r\n [/@regexpesc/, 'regexp.escape'],\r\n [/[^\\]]/, 'regexp'],\r\n [\r\n /\\]/,\r\n {\r\n token: 'regexp.escape.control',\r\n next: '@pop',\r\n bracket: '@close'\r\n }\r\n ]\r\n ],\r\n string_double: [\r\n [/[^\\\\\"]+/, 'string'],\r\n [/@escapes/, 'string.escape'],\r\n [/\\\\./, 'string.escape.invalid'],\r\n [/\"/, 'string', '@pop']\r\n ],\r\n string_single: [\r\n [/[^\\\\']+/, 'string'],\r\n [/@escapes/, 'string.escape'],\r\n [/\\\\./, 'string.escape.invalid'],\r\n [/'/, 'string', '@pop']\r\n ],\r\n string_backtick: [\r\n [/\\$\\{/, { token: 'delimiter.bracket', next: '@bracketCounting' }],\r\n [/[^\\\\`$]+/, 'string'],\r\n [/@escapes/, 'string.escape'],\r\n [/\\\\./, 'string.escape.invalid'],\r\n [/`/, 'string', '@pop']\r\n ],\r\n bracketCounting: [\r\n [/\\{/, 'delimiter.bracket', '@bracketCounting'],\r\n [/\\}/, 'delimiter.bracket', '@pop'],\r\n { include: 'common' }\r\n ]\r\n }\r\n};\r\n"],"names":["conf","wordPattern","comments","lineComment","blockComment","brackets","onEnterRules","beforeText","afterText","action","indentAction","appendText","removeText","autoClosingPairs","open","close","notIn","folding","markers","start","RegExp","end","language","defaultToken","tokenPostfix","keywords","operators","symbols","escapes","digits","octaldigits","binarydigits","hexdigits","regexpctl","regexpesc","tokenizer","root","include","common","cases","token","bracket","next","whitespace","comment","jsdoc","regexp","regexrange","string_double","string_single","string_backtick","bracketCounting"],"sourceRoot":""} \ No newline at end of file diff --git a/99.index.js b/99.index.js new file mode 100644 index 0000000..c377b08 --- /dev/null +++ b/99.index.js @@ -0,0 +1,2 @@ +"use strict";(self.webpackChunkreact_monaco_editor_browser_example=self.webpackChunkreact_monaco_editor_browser_example||[]).push([[99],{1099:(e,t,n)=>{n.r(t),n.d(t,{setupMode:()=>yn});var r,i=n(1174),o=function(){function e(e){var t=this;this._defaults=e,this._worker=null,this._idleCheckInterval=setInterval((function(){return t._checkIfIdle()}),3e4),this._lastUsedTime=0,this._configChangeListener=this._defaults.onDidChange((function(){return t._stopWorker()}))}return e.prototype._stopWorker=function(){this._worker&&(this._worker.dispose(),this._worker=null),this._client=null},e.prototype.dispose=function(){clearInterval(this._idleCheckInterval),this._configChangeListener.dispose(),this._stopWorker()},e.prototype._checkIfIdle=function(){this._worker&&Date.now()-this._lastUsedTime>12e4&&this._stopWorker()},e.prototype._getClient=function(){return this._lastUsedTime=Date.now(),this._client||(this._worker=i.j6.createWebWorker({moduleId:"vs/language/json/jsonWorker",label:this._defaults.languageId,createData:{languageSettings:this._defaults.diagnosticsOptions,languageId:this._defaults.languageId,enableSchemaRequest:this._defaults.diagnosticsOptions.enableSchemaRequest}}),this._client=this._worker.getProxy()),this._client},e.prototype.getLanguageServiceWorker=function(){for(var e,t=this,n=[],r=0;r=48&&a<=57)o=16*o+a-48;else if(a>=65&&a<=70)o=16*o+a-65+10;else{if(!(a>=97&&a<=102))break;o=16*o+a-97+10}r++,i++}return i=n)return o=n,a=17;var t=e.charCodeAt(r);if(s(t)){do{r++,i+=String.fromCharCode(t),t=e.charCodeAt(r)}while(s(t));return a=15}if(u(t))return r++,i+=String.fromCharCode(t),13===t&&10===e.charCodeAt(r)&&(r++,i+="\n"),l++,h=r,a=14;switch(t){case 123:return r++,a=1;case 125:return r++,a=2;case 91:return r++,a=3;case 93:return r++,a=4;case 58:return r++,a=6;case 44:return r++,a=5;case 34:return r++,i=function(){for(var t="",i=r;;){if(r>=n){t+=e.substring(i,r),d=2;break}var o=e.charCodeAt(r);if(34===o){t+=e.substring(i,r),r++;break}if(92!==o){if(o>=0&&o<=31){if(u(o)){t+=e.substring(i,r),d=2;break}d=6}r++}else{if(t+=e.substring(i,r),++r>=n){d=2;break}switch(e.charCodeAt(r++)){case 34:t+='"';break;case 92:t+="\\";break;case 47:t+="/";break;case 98:t+="\b";break;case 102:t+="\f";break;case 110:t+="\n";break;case 114:t+="\r";break;case 116:t+="\t";break;case 117:var a=m(4,!0);a>=0?t+=String.fromCharCode(a):d=4;break;default:d=5}i=r}}return t}(),a=10;case 47:var g=r-1;if(47===e.charCodeAt(r+1)){for(r+=2;r=12&&e<=15);return e}:g,getToken:function(){return a},getTokenValue:function(){return i},getTokenOffset:function(){return o},getTokenLength:function(){return r-o},getTokenStartLine:function(){return f},getTokenStartCharacter:function(){return o-p},getTokenError:function(){return d}}}function s(e){return 32===e||9===e||11===e||12===e||160===e||5760===e||e>=8192&&e<=8203||8239===e||8287===e||12288===e||65279===e}function u(e){return 10===e||13===e||8232===e||8233===e}function c(e){return e>=48&&e<=57}!function(e){e.DEFAULT={allowTrailingComma:!1}}(r||(r={}));var l,f,h,p,d,m,g,v,y,b,x,A,C,S,k,w,I,j,T,E,_,O,M,P,V,N,F,R,L,$,D,U,W=a,q=function(e,t,n){void 0===t&&(t=[]),void 0===n&&(n=r.DEFAULT);var i=null,o=[],s=[];function u(e){Array.isArray(o)?o.push(e):null!==i&&(o[i]=e)}return function(e,t,n){void 0===n&&(n=r.DEFAULT);var i=a(e,!1);function o(e){return e?function(){return e(i.getTokenOffset(),i.getTokenLength(),i.getTokenStartLine(),i.getTokenStartCharacter())}:function(){return!0}}function s(e){return e?function(t){return e(t,i.getTokenOffset(),i.getTokenLength(),i.getTokenStartLine(),i.getTokenStartCharacter())}:function(){return!0}}var u=o(t.onObjectBegin),c=s(t.onObjectProperty),l=o(t.onObjectEnd),f=o(t.onArrayBegin),h=o(t.onArrayEnd),p=s(t.onLiteralValue),d=s(t.onSeparator),m=o(t.onComment),g=s(t.onError),v=n&&n.disallowComments,y=n&&n.allowTrailingComma;function b(){for(;;){var e=i.scan();switch(i.getTokenError()){case 4:x(14);break;case 5:x(15);break;case 3:x(13);break;case 1:v||x(11);break;case 2:x(12);break;case 6:x(16)}switch(e){case 12:case 13:v?x(10):m();break;case 16:x(1);break;case 15:case 14:break;default:return e}}}function x(e,t,n){if(void 0===t&&(t=[]),void 0===n&&(n=[]),g(e),t.length+n.length>0)for(var r=i.getToken();17!==r;){if(-1!==t.indexOf(r)){b();break}if(-1!==n.indexOf(r))break;r=b()}}function A(e){var t=i.getTokenValue();return e?p(t):c(t),b(),!0}b(),17===i.getToken()?!!n.allowEmptyContent||x(4,[],[]):function e(){switch(i.getToken()){case 3:return function(){f(),b();for(var t=!1;4!==i.getToken()&&17!==i.getToken();){if(5===i.getToken()){if(t||x(4,[],[]),d(","),b(),4===i.getToken()&&y)break}else t&&x(6,[],[]);e()||x(4,[],[4,5]),t=!0}return h(),4!==i.getToken()?x(8,[4],[]):b(),!0}();case 1:return function(){u(),b();for(var t=!1;2!==i.getToken()&&17!==i.getToken();){if(5===i.getToken()){if(t||x(4,[],[]),d(","),b(),2===i.getToken()&&y)break}else t&&x(6,[],[]);(10!==i.getToken()?(x(3,[],[2,5]),0):(A(!1),6===i.getToken()?(d(":"),b(),e()||x(4,[],[2,5])):x(5,[],[2,5]),1))||x(4,[],[2,5]),t=!0}return l(),2!==i.getToken()?x(7,[2],[]):b(),!0}();case 10:return A(!0);default:return function(){switch(i.getToken()){case 11:var e=i.getTokenValue(),t=Number(e);isNaN(t)&&(x(2),t=0),p(t);break;case 7:p(null);break;case 8:p(!0);break;case 9:p(!1);break;default:return!1}return b(),!0}()}}()?17!==i.getToken()&&x(9,[],[]):x(4,[],[])}(e,{onObjectBegin:function(){var e={};u(e),s.push(o),o=e,i=null},onObjectProperty:function(e){i=e},onObjectEnd:function(){o=s.pop()},onArrayBegin:function(){var e=[];u(e),s.push(o),o=e,i=null},onArrayEnd:function(){o=s.pop()},onLiteralValue:u,onError:function(e,n,r){t.push({error:e,offset:n,length:r})}},n),o[0]},B=function e(t,n,r){if(void 0===r&&(r=!1),function(e,t,n){return void 0===n&&(n=!1),t>=e.offset&&t0?e.lastIndexOf(t)===n:0===n&&e===t}function Y(e){return X(e,"(?i)")?new RegExp(e.substring(4),"i"):new RegExp(e)}!function(e){e.MIN_VALUE=-2147483648,e.MAX_VALUE=2147483647}(l||(l={})),function(e){e.MIN_VALUE=0,e.MAX_VALUE=2147483647}(f||(f={})),(U=h||(h={})).create=function(e,t){return e===Number.MAX_VALUE&&(e=f.MAX_VALUE),t===Number.MAX_VALUE&&(t=f.MAX_VALUE),{line:e,character:t}},U.is=function(e){var t=e;return Ve.objectLiteral(t)&&Ve.uinteger(t.line)&&Ve.uinteger(t.character)},(D=p||(p={})).create=function(e,t,n,r){if(Ve.uinteger(e)&&Ve.uinteger(t)&&Ve.uinteger(n)&&Ve.uinteger(r))return{start:h.create(e,t),end:h.create(n,r)};if(h.is(e)&&h.is(t))return{start:e,end:t};throw new Error("Range#create called with invalid arguments["+e+", "+t+", "+n+", "+r+"]")},D.is=function(e){var t=e;return Ve.objectLiteral(t)&&h.is(t.start)&&h.is(t.end)},function(e){e.create=function(e,t){return{uri:e,range:t}},e.is=function(e){var t=e;return Ve.defined(t)&&p.is(t.range)&&(Ve.string(t.uri)||Ve.undefined(t.uri))}}(d||(d={})),function(e){e.create=function(e,t,n,r){return{targetUri:e,targetRange:t,targetSelectionRange:n,originSelectionRange:r}},e.is=function(e){var t=e;return Ve.defined(t)&&p.is(t.targetRange)&&Ve.string(t.targetUri)&&(p.is(t.targetSelectionRange)||Ve.undefined(t.targetSelectionRange))&&(p.is(t.originSelectionRange)||Ve.undefined(t.originSelectionRange))}}(m||(m={})),function(e){e.create=function(e,t,n,r){return{red:e,green:t,blue:n,alpha:r}},e.is=function(e){var t=e;return Ve.numberRange(t.red,0,1)&&Ve.numberRange(t.green,0,1)&&Ve.numberRange(t.blue,0,1)&&Ve.numberRange(t.alpha,0,1)}}(g||(g={})),function(e){e.create=function(e,t){return{range:e,color:t}},e.is=function(e){var t=e;return p.is(t.range)&&g.is(t.color)}}(v||(v={})),function(e){e.create=function(e,t,n){return{label:e,textEdit:t,additionalTextEdits:n}},e.is=function(e){var t=e;return Ve.string(t.label)&&(Ve.undefined(t.textEdit)||j.is(t))&&(Ve.undefined(t.additionalTextEdits)||Ve.typedArray(t.additionalTextEdits,j.is))}}(y||(y={})),($=b||(b={})).Comment="comment",$.Imports="imports",$.Region="region",function(e){e.create=function(e,t,n,r,i){var o={startLine:e,endLine:t};return Ve.defined(n)&&(o.startCharacter=n),Ve.defined(r)&&(o.endCharacter=r),Ve.defined(i)&&(o.kind=i),o},e.is=function(e){var t=e;return Ve.uinteger(t.startLine)&&Ve.uinteger(t.startLine)&&(Ve.undefined(t.startCharacter)||Ve.uinteger(t.startCharacter))&&(Ve.undefined(t.endCharacter)||Ve.uinteger(t.endCharacter))&&(Ve.undefined(t.kind)||Ve.string(t.kind))}}(x||(x={})),function(e){e.create=function(e,t){return{location:e,message:t}},e.is=function(e){var t=e;return Ve.defined(t)&&d.is(t.location)&&Ve.string(t.message)}}(A||(A={})),(L=C||(C={})).Error=1,L.Warning=2,L.Information=3,L.Hint=4,function(e){e.Unnecessary=1,e.Deprecated=2}(S||(S={})),function(e){e.is=function(e){var t=e;return null!=t&&Ve.string(t.href)}}(k||(k={})),(R=w||(w={})).create=function(e,t,n,r,i,o){var a={range:e,message:t};return Ve.defined(n)&&(a.severity=n),Ve.defined(r)&&(a.code=r),Ve.defined(i)&&(a.source=i),Ve.defined(o)&&(a.relatedInformation=o),a},R.is=function(e){var t,n=e;return Ve.defined(n)&&p.is(n.range)&&Ve.string(n.message)&&(Ve.number(n.severity)||Ve.undefined(n.severity))&&(Ve.integer(n.code)||Ve.string(n.code)||Ve.undefined(n.code))&&(Ve.undefined(n.codeDescription)||Ve.string(null===(t=n.codeDescription)||void 0===t?void 0:t.href))&&(Ve.string(n.source)||Ve.undefined(n.source))&&(Ve.undefined(n.relatedInformation)||Ve.typedArray(n.relatedInformation,A.is))},function(e){e.create=function(e,t){for(var n=[],r=2;r0&&(i.arguments=n),i},e.is=function(e){var t=e;return Ve.defined(t)&&Ve.string(t.title)&&Ve.string(t.command)}}(I||(I={})),(F=j||(j={})).replace=function(e,t){return{range:e,newText:t}},F.insert=function(e,t){return{range:{start:e,end:e},newText:t}},F.del=function(e){return{range:e,newText:""}},F.is=function(e){var t=e;return Ve.objectLiteral(t)&&Ve.string(t.newText)&&p.is(t.range)},function(e){e.create=function(e,t,n){var r={label:e};return void 0!==t&&(r.needsConfirmation=t),void 0!==n&&(r.description=n),r},e.is=function(e){var t=e;return void 0!==t&&Ve.objectLiteral(t)&&Ve.string(t.label)&&(Ve.boolean(t.needsConfirmation)||void 0===t.needsConfirmation)&&(Ve.string(t.description)||void 0===t.description)}}(T||(T={})),function(e){e.is=function(e){return"string"==typeof e}}(E||(E={})),function(e){e.replace=function(e,t,n){return{range:e,newText:t,annotationId:n}},e.insert=function(e,t,n){return{range:{start:e,end:e},newText:t,annotationId:n}},e.del=function(e,t){return{range:e,newText:"",annotationId:t}},e.is=function(e){var t=e;return j.is(t)&&(T.is(t.annotationId)||E.is(t.annotationId))}}(_||(_={})),function(e){e.create=function(e,t){return{textDocument:e,edits:t}},e.is=function(e){var t=e;return Ve.defined(t)&&ne.is(t.textDocument)&&Array.isArray(t.edits)}}(O||(O={})),function(e){e.create=function(e,t,n){var r={kind:"create",uri:e};return void 0===t||void 0===t.overwrite&&void 0===t.ignoreIfExists||(r.options=t),void 0!==n&&(r.annotationId=n),r},e.is=function(e){var t=e;return t&&"create"===t.kind&&Ve.string(t.uri)&&(void 0===t.options||(void 0===t.options.overwrite||Ve.boolean(t.options.overwrite))&&(void 0===t.options.ignoreIfExists||Ve.boolean(t.options.ignoreIfExists)))&&(void 0===t.annotationId||E.is(t.annotationId))}}(M||(M={})),function(e){e.create=function(e,t,n,r){var i={kind:"rename",oldUri:e,newUri:t};return void 0===n||void 0===n.overwrite&&void 0===n.ignoreIfExists||(i.options=n),void 0!==r&&(i.annotationId=r),i},e.is=function(e){var t=e;return t&&"rename"===t.kind&&Ve.string(t.oldUri)&&Ve.string(t.newUri)&&(void 0===t.options||(void 0===t.options.overwrite||Ve.boolean(t.options.overwrite))&&(void 0===t.options.ignoreIfExists||Ve.boolean(t.options.ignoreIfExists)))&&(void 0===t.annotationId||E.is(t.annotationId))}}(P||(P={})),function(e){e.create=function(e,t,n){var r={kind:"delete",uri:e};return void 0===t||void 0===t.recursive&&void 0===t.ignoreIfNotExists||(r.options=t),void 0!==n&&(r.annotationId=n),r},e.is=function(e){var t=e;return t&&"delete"===t.kind&&Ve.string(t.uri)&&(void 0===t.options||(void 0===t.options.recursive||Ve.boolean(t.options.recursive))&&(void 0===t.options.ignoreIfNotExists||Ve.boolean(t.options.ignoreIfNotExists)))&&(void 0===t.annotationId||E.is(t.annotationId))}}(V||(V={})),function(e){e.is=function(e){var t=e;return t&&(void 0!==t.changes||void 0!==t.documentChanges)&&(void 0===t.documentChanges||t.documentChanges.every((function(e){return Ve.string(e.kind)?M.is(e)||P.is(e)||V.is(e):O.is(e)})))}}(N||(N={}));var ee,te,ne,re,ie,oe,ae,se,ue,ce,le,fe,he,pe,de,me,ge,ve,ye,be,xe,Ae,Ce,Se,ke,we,Ie,je,Te,Ee,_e,Oe,Me=function(){function e(e,t){this.edits=e,this.changeAnnotations=t}return e.prototype.insert=function(e,t,n){var r,i;if(void 0===n?r=j.insert(e,t):E.is(n)?(i=n,r=_.insert(e,t,n)):(this.assertChangeAnnotations(this.changeAnnotations),i=this.changeAnnotations.manage(n),r=_.insert(e,t,i)),this.edits.push(r),void 0!==i)return i},e.prototype.replace=function(e,t,n){var r,i;if(void 0===n?r=j.replace(e,t):E.is(n)?(i=n,r=_.replace(e,t,n)):(this.assertChangeAnnotations(this.changeAnnotations),i=this.changeAnnotations.manage(n),r=_.replace(e,t,i)),this.edits.push(r),void 0!==i)return i},e.prototype.delete=function(e,t){var n,r;if(void 0===t?n=j.del(e):E.is(t)?(r=t,n=_.del(e,t)):(this.assertChangeAnnotations(this.changeAnnotations),r=this.changeAnnotations.manage(t),n=_.del(e,r)),this.edits.push(n),void 0!==r)return r},e.prototype.add=function(e){this.edits.push(e)},e.prototype.all=function(){return this.edits},e.prototype.clear=function(){this.edits.splice(0,this.edits.length)},e.prototype.assertChangeAnnotations=function(e){if(void 0===e)throw new Error("Text edit change is not configured to manage change annotations.")},e}(),Pe=function(){function e(e){this._annotations=void 0===e?Object.create(null):e,this._counter=0,this._size=0}return e.prototype.all=function(){return this._annotations},Object.defineProperty(e.prototype,"size",{get:function(){return this._size},enumerable:!1,configurable:!0}),e.prototype.manage=function(e,t){var n;if(E.is(e)?n=e:(n=this.nextId(),t=e),void 0!==this._annotations[n])throw new Error("Id "+n+" is already in use.");if(void 0===t)throw new Error("No annotation provided for id "+n);return this._annotations[n]=t,this._size++,n},e.prototype.nextId=function(){return this._counter++,this._counter.toString()},e}();!function(){function e(e){var t=this;this._textEditChanges=Object.create(null),void 0!==e?(this._workspaceEdit=e,e.documentChanges?(this._changeAnnotations=new Pe(e.changeAnnotations),e.changeAnnotations=this._changeAnnotations.all(),e.documentChanges.forEach((function(e){if(O.is(e)){var n=new Me(e.edits,t._changeAnnotations);t._textEditChanges[e.textDocument.uri]=n}}))):e.changes&&Object.keys(e.changes).forEach((function(n){var r=new Me(e.changes[n]);t._textEditChanges[n]=r}))):this._workspaceEdit={}}Object.defineProperty(e.prototype,"edit",{get:function(){return this.initDocumentChanges(),void 0!==this._changeAnnotations&&(0===this._changeAnnotations.size?this._workspaceEdit.changeAnnotations=void 0:this._workspaceEdit.changeAnnotations=this._changeAnnotations.all()),this._workspaceEdit},enumerable:!1,configurable:!0}),e.prototype.getTextEditChange=function(e){if(ne.is(e)){if(this.initDocumentChanges(),void 0===this._workspaceEdit.documentChanges)throw new Error("Workspace edit is not configured for document changes.");var t={uri:e.uri,version:e.version};if(!(r=this._textEditChanges[t.uri])){var n={textDocument:t,edits:i=[]};this._workspaceEdit.documentChanges.push(n),r=new Me(i,this._changeAnnotations),this._textEditChanges[t.uri]=r}return r}if(this.initChanges(),void 0===this._workspaceEdit.changes)throw new Error("Workspace edit is not configured for normal text edit changes.");var r;if(!(r=this._textEditChanges[e])){var i=[];this._workspaceEdit.changes[e]=i,r=new Me(i),this._textEditChanges[e]=r}return r},e.prototype.initDocumentChanges=function(){void 0===this._workspaceEdit.documentChanges&&void 0===this._workspaceEdit.changes&&(this._changeAnnotations=new Pe,this._workspaceEdit.documentChanges=[],this._workspaceEdit.changeAnnotations=this._changeAnnotations.all())},e.prototype.initChanges=function(){void 0===this._workspaceEdit.documentChanges&&void 0===this._workspaceEdit.changes&&(this._workspaceEdit.changes=Object.create(null))},e.prototype.createFile=function(e,t,n){if(this.initDocumentChanges(),void 0===this._workspaceEdit.documentChanges)throw new Error("Workspace edit is not configured for document changes.");var r,i,o;if(T.is(t)||E.is(t)?r=t:n=t,void 0===r?i=M.create(e,n):(o=E.is(r)?r:this._changeAnnotations.manage(r),i=M.create(e,n,o)),this._workspaceEdit.documentChanges.push(i),void 0!==o)return o},e.prototype.renameFile=function(e,t,n,r){if(this.initDocumentChanges(),void 0===this._workspaceEdit.documentChanges)throw new Error("Workspace edit is not configured for document changes.");var i,o,a;if(T.is(n)||E.is(n)?i=n:r=n,void 0===i?o=P.create(e,t,r):(a=E.is(i)?i:this._changeAnnotations.manage(i),o=P.create(e,t,r,a)),this._workspaceEdit.documentChanges.push(o),void 0!==a)return a},e.prototype.deleteFile=function(e,t,n){if(this.initDocumentChanges(),void 0===this._workspaceEdit.documentChanges)throw new Error("Workspace edit is not configured for document changes.");var r,i,o;if(T.is(t)||E.is(t)?r=t:n=t,void 0===r?i=V.create(e,n):(o=E.is(r)?r:this._changeAnnotations.manage(r),i=V.create(e,n,o)),this._workspaceEdit.documentChanges.push(i),void 0!==o)return o}}(),function(e){e.create=function(e){return{uri:e}},e.is=function(e){var t=e;return Ve.defined(t)&&Ve.string(t.uri)}}(ee||(ee={})),function(e){e.create=function(e,t){return{uri:e,version:t}},e.is=function(e){var t=e;return Ve.defined(t)&&Ve.string(t.uri)&&Ve.integer(t.version)}}(te||(te={})),function(e){e.create=function(e,t){return{uri:e,version:t}},e.is=function(e){var t=e;return Ve.defined(t)&&Ve.string(t.uri)&&(null===t.version||Ve.integer(t.version))}}(ne||(ne={})),function(e){e.create=function(e,t,n,r){return{uri:e,languageId:t,version:n,text:r}},e.is=function(e){var t=e;return Ve.defined(t)&&Ve.string(t.uri)&&Ve.string(t.languageId)&&Ve.integer(t.version)&&Ve.string(t.text)}}(re||(re={})),function(e){e.PlainText="plaintext",e.Markdown="markdown"}(ie||(ie={})),function(e){e.is=function(t){var n=t;return n===e.PlainText||n===e.Markdown}}(ie||(ie={})),function(e){e.is=function(e){var t=e;return Ve.objectLiteral(e)&&ie.is(t.kind)&&Ve.string(t.value)}}(oe||(oe={})),function(e){e.Text=1,e.Method=2,e.Function=3,e.Constructor=4,e.Field=5,e.Variable=6,e.Class=7,e.Interface=8,e.Module=9,e.Property=10,e.Unit=11,e.Value=12,e.Enum=13,e.Keyword=14,e.Snippet=15,e.Color=16,e.File=17,e.Reference=18,e.Folder=19,e.EnumMember=20,e.Constant=21,e.Struct=22,e.Event=23,e.Operator=24,e.TypeParameter=25}(ae||(ae={})),function(e){e.PlainText=1,e.Snippet=2}(se||(se={})),function(e){e.Deprecated=1}(ue||(ue={})),function(e){e.create=function(e,t,n){return{newText:e,insert:t,replace:n}},e.is=function(e){var t=e;return t&&Ve.string(t.newText)&&p.is(t.insert)&&p.is(t.replace)}}(ce||(ce={})),function(e){e.asIs=1,e.adjustIndentation=2}(le||(le={})),function(e){e.create=function(e){return{label:e}}}(fe||(fe={})),function(e){e.create=function(e,t){return{items:e||[],isIncomplete:!!t}}}(he||(he={})),function(e){e.fromPlainText=function(e){return e.replace(/[\\`*_{}[\]()#+\-.!]/g,"\\$&")},e.is=function(e){var t=e;return Ve.string(t)||Ve.objectLiteral(t)&&Ve.string(t.language)&&Ve.string(t.value)}}(pe||(pe={})),function(e){e.is=function(e){var t=e;return!!t&&Ve.objectLiteral(t)&&(oe.is(t.contents)||pe.is(t.contents)||Ve.typedArray(t.contents,pe.is))&&(void 0===e.range||p.is(e.range))}}(de||(de={})),function(e){e.create=function(e,t){return t?{label:e,documentation:t}:{label:e}}}(me||(me={})),function(e){e.create=function(e,t){for(var n=[],r=2;r=0;a--){var s=i[a],u=e.offsetAt(s.range.start),c=e.offsetAt(s.range.end);if(!(c<=o))throw new Error("Overlapping edit");r=r.substring(0,u)+s.newText+r.substring(c,r.length),o=u}return r}}(Oe||(Oe={}));var Ve,Ne=function(){function e(e,t,n,r){this._uri=e,this._languageId=t,this._version=n,this._content=r,this._lineOffsets=void 0}return Object.defineProperty(e.prototype,"uri",{get:function(){return this._uri},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"languageId",{get:function(){return this._languageId},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"version",{get:function(){return this._version},enumerable:!1,configurable:!0}),e.prototype.getText=function(e){if(e){var t=this.offsetAt(e.start),n=this.offsetAt(e.end);return this._content.substring(t,n)}return this._content},e.prototype.update=function(e,t){this._content=e.text,this._version=t,this._lineOffsets=void 0},e.prototype.getLineOffsets=function(){if(void 0===this._lineOffsets){for(var e=[],t=this._content,n=!0,r=0;r0&&e.push(t.length),this._lineOffsets=e}return this._lineOffsets},e.prototype.positionAt=function(e){e=Math.max(Math.min(e,this._content.length),0);var t=this.getLineOffsets(),n=0,r=t.length;if(0===r)return h.create(0,e);for(;ne?r=i:n=i+1}var o=n-1;return h.create(o,e-t[o])},e.prototype.offsetAt=function(e){var t=this.getLineOffsets();if(e.line>=t.length)return this._content.length;if(e.line<0)return 0;var n=t[e.line],r=e.line+1e?r=i:n=i+1}var o=n-1;return{line:o,character:e-t[o]}},e.prototype.offsetAt=function(e){var t=this.getLineOffsets();if(e.line>=t.length)return this._content.length;if(e.line<0)return 0;var n=t[e.line],r=e.line+1n.line||t.line===n.line&&t.character>n.character?{start:n,end:t}:e}function Be(e){var t=qe(e.range);return t!==e.range?{newText:e.newText,range:t}:e}function Ke(e,t){return 0===t.length?e:e.replace(/\{(\d+)\}/g,(function(e,n){var r=n[0];return void 0!==t[r]?t[r]:e}))}function ze(e,t){for(var n=[],r=2;rr&&i.push(n.substring(r,u)),s.newText.length&&i.push(s.newText),r=e.offsetAt(s.range.end)}return i.push(n.substr(r)),i.join("")}}(Fe||(Fe={})),($e=Re||(Re={}))[$e.Undefined=0]="Undefined",$e[$e.EnumValueMismatch=1]="EnumValueMismatch",$e[$e.Deprecated=2]="Deprecated",$e[$e.UnexpectedEndOfComment=257]="UnexpectedEndOfComment",$e[$e.UnexpectedEndOfString=258]="UnexpectedEndOfString",$e[$e.UnexpectedEndOfNumber=259]="UnexpectedEndOfNumber",$e[$e.InvalidUnicode=260]="InvalidUnicode",$e[$e.InvalidEscapeCharacter=261]="InvalidEscapeCharacter",$e[$e.InvalidCharacter=262]="InvalidCharacter",$e[$e.PropertyExpected=513]="PropertyExpected",$e[$e.CommaExpected=514]="CommaExpected",$e[$e.ColonExpected=515]="ColonExpected",$e[$e.ValueExpected=516]="ValueExpected",$e[$e.CommaOrCloseBacketExpected=517]="CommaOrCloseBacketExpected",$e[$e.CommaOrCloseBraceExpected=518]="CommaOrCloseBraceExpected",$e[$e.TrailingComma=519]="TrailingComma",$e[$e.DuplicateKey=520]="DuplicateKey",$e[$e.CommentNotPermitted=521]="CommentNotPermitted",$e[$e.SchemaResolveError=768]="SchemaResolveError",function(e){e.LATEST={textDocument:{completion:{completionItem:{documentationFormat:[ie.Markdown,ie.PlainText],commitCharactersSupport:!0}}}}}(Le||(Le={}));var He,Ze,Ge,Xe=(He=function(e,t){return He=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},He(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}He(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),Qe=Je(),Ye={"color-hex":{errorMessage:Qe("colorHexFormatWarning","Invalid color format. Use #RGB, #RGBA, #RRGGBB or #RRGGBBAA."),pattern:/^#([0-9A-Fa-f]{3,4}|([0-9A-Fa-f]{2}){3,4})$/},"date-time":{errorMessage:Qe("dateTimeFormatWarning","String is not a RFC3339 date-time."),pattern:/^(\d{4})-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])T([01][0-9]|2[0-3]):([0-5][0-9]):([0-5][0-9]|60)(\.[0-9]+)?(Z|(\+|-)([01][0-9]|2[0-3]):([0-5][0-9]))$/i},date:{errorMessage:Qe("dateFormatWarning","String is not a RFC3339 date."),pattern:/^(\d{4})-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])$/i},time:{errorMessage:Qe("timeFormatWarning","String is not a RFC3339 time."),pattern:/^([01][0-9]|2[0-3]):([0-5][0-9]):([0-5][0-9]|60)(\.[0-9]+)?(Z|(\+|-)([01][0-9]|2[0-3]):([0-5][0-9]))$/i},email:{errorMessage:Qe("emailFormatWarning","String is not an e-mail address."),pattern:/^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/}},et=function(){function e(e,t,n){void 0===n&&(n=0),this.offset=t,this.length=n,this.parent=e}return Object.defineProperty(e.prototype,"children",{get:function(){return[]},enumerable:!1,configurable:!0}),e.prototype.toString=function(){return"type: "+this.type+" ("+this.offset+"/"+this.length+")"+(this.parent?" parent: {"+this.parent.toString()+"}":"")},e}();function tt(e){return G(e)?e?{}:{not:{}}:e}Xe((function(e,t){var n=Ge.call(this,e,t)||this;return n.type="null",n.value=null,n}),Ge=et),function(e){Xe((function(t,n,r){var i=e.call(this,t,r)||this;return i.type="boolean",i.value=n,i}),e)}(et),function(e){function t(t,n){var r=e.call(this,t,n)||this;return r.type="array",r.items=[],r}Xe(t,e),Object.defineProperty(t.prototype,"children",{get:function(){return this.items},enumerable:!1,configurable:!0})}(et),function(e){Xe((function(t,n){var r=e.call(this,t,n)||this;return r.type="number",r.isInteger=!0,r.value=Number.NaN,r}),e)}(et),function(e){Xe((function(t,n,r){var i=e.call(this,t,n,r)||this;return i.type="string",i.value="",i}),e)}(et),function(e){function t(t,n,r){var i=e.call(this,t,n)||this;return i.type="property",i.colonOffset=-1,i.keyNode=r,i}Xe(t,e),Object.defineProperty(t.prototype,"children",{get:function(){return this.valueNode?[this.keyNode,this.valueNode]:[this.keyNode]},enumerable:!1,configurable:!0})}(et),function(e){function t(t,n){var r=e.call(this,t,n)||this;return r.type="object",r.properties=[],r}Xe(t,e),Object.defineProperty(t.prototype,"children",{get:function(){return this.properties},enumerable:!1,configurable:!0})}(et),function(e){e[e.Key=0]="Key",e[e.Enum=1]="Enum"}(Ze||(Ze={}));var nt=function(){function e(e,t){void 0===e&&(e=-1),this.focusOffset=e,this.exclude=t,this.schemas=[]}return e.prototype.add=function(e){this.schemas.push(e)},e.prototype.merge=function(e){Array.prototype.push.apply(this.schemas,e.schemas)},e.prototype.include=function(e){return(-1===this.focusOffset||st(e,this.focusOffset))&&e!==this.exclude},e.prototype.newSub=function(){return new e(-1,this.exclude)},e}(),rt=function(){function e(){}return Object.defineProperty(e.prototype,"schemas",{get:function(){return[]},enumerable:!1,configurable:!0}),e.prototype.add=function(e){},e.prototype.merge=function(e){},e.prototype.include=function(e){return!0},e.prototype.newSub=function(){return this},e.instance=new e,e}(),it=function(){function e(){this.problems=[],this.propertiesMatches=0,this.propertiesValueMatches=0,this.primaryValueMatches=0,this.enumValueMatch=!1,this.enumValues=void 0}return e.prototype.hasProblems=function(){return!!this.problems.length},e.prototype.mergeAll=function(e){for(var t=0,n=e;t=e.offset&&t=0;)o.splice(t,1),t=o.indexOf(e)};if(t.properties)for(var p=0,d=Object.keys(t.properties);p0)for(var j=0,T=o;jt.maxProperties&&n.problems.push({location:{offset:e.offset,length:e.length},message:Qe("MaxPropWarning","Object has more properties than limit of {0}.",t.maxProperties)}),H(t.minProperties)&&e.properties.length=i.length&&n.propertiesValueMatches++}if(e.items.length>i.length)if("object"==typeof t.additionalItems)for(var u=i.length;ut.maxItems&&n.problems.push({location:{offset:e.offset,length:e.length},message:Qe("maxItemsWarning","Array has too many items. Expected {0} or fewer.",t.maxItems)}),!0===t.uniqueItems){var m=ot(e),g=m.some((function(e,t){return t!==m.lastIndexOf(e)}));g&&n.problems.push({location:{offset:e.offset,length:e.length},message:Qe("uniqueItemsWarning","Array has duplicate items.")})}}(i,t,n,r);break;case"string":!function(e,t,n,r){if(H(t.minLength)&&e.value.lengtht.maxLength&&n.problems.push({location:{offset:e.offset,length:e.length},message:Qe("maxLengthWarning","String is longer than the maximum length of {0}.",t.maxLength)}),"string"==typeof t.pattern&&(Y(t.pattern).test(e.value)||n.problems.push({location:{offset:e.offset,length:e.length},message:t.patternErrorMessage||t.errorMessage||Qe("patternWarning",'String does not match the pattern of "{0}".',t.pattern)})),t.format)switch(t.format){case"uri":case"uri-reference":var i=void 0;if(e.value){var o=/^(([^:/?#]+?):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?/.exec(e.value);o?o[2]||"uri"!==t.format||(i=Qe("uriSchemeMissing","URI with a scheme is expected.")):i=Qe("uriMissing","URI is expected.")}else i=Qe("uriEmpty","URI expected.");i&&n.problems.push({location:{offset:e.offset,length:e.length},message:t.patternErrorMessage||t.errorMessage||Qe("uriFormatWarning","String is not a URI: {0}",i)});break;case"color-hex":case"date-time":case"date":case"time":case"email":var a=Ye[t.format];e.value&&a.pattern.exec(e.value)||n.problems.push({location:{offset:e.offset,length:e.length},message:t.patternErrorMessage||t.errorMessage||a.errorMessage})}}(i,t,n);break;case"number":!function(e,t,n,r){var i=e.value;function o(e){var t,n=/^(-?\d+)(?:\.(\d+))?(?:e([-+]\d+))?$/.exec(e.toString());return n&&{value:Number(n[1]+(n[2]||"")),multiplier:((null===(t=n[2])||void 0===t?void 0:t.length)||0)-(parseInt(n[3])||0)}}if(H(t.multipleOf)){var a=-1;if(Number.isInteger(t.multipleOf))a=i%t.multipleOf;else{var s=o(t.multipleOf),u=o(i);if(s&&u){var c=Math.pow(10,Math.abs(u.multiplier-s.multiplier));u.multiplier=p&&n.problems.push({location:{offset:e.offset,length:e.length},message:Qe("exclusiveMaximumWarning","Value is above the exclusive maximum of {0}.",p)});var d=f(t.minimum,t.exclusiveMinimum);H(d)&&im&&n.problems.push({location:{offset:e.offset,length:e.length},message:Qe("maximumWarning","Value is above the maximum of {0}.",m)})}(i,t,n);break;case"property":return ut(i.valueNode,t,n,r)}!function(){function e(e){return i.type===e||"integer"===e&&"number"===i.type&&i.isInteger}if(Array.isArray(t.type)?t.type.some(e)||n.problems.push({location:{offset:i.offset,length:i.length},message:t.errorMessage||Qe("typeArrayMismatchWarning","Incorrect type. Expected one of {0}.",t.type.join(", "))}):t.type&&(e(t.type)||n.problems.push({location:{offset:i.offset,length:i.length},message:t.errorMessage||Qe("typeMismatchWarning",'Incorrect type. Expected "{0}".',t.type)})),Array.isArray(t.allOf))for(var o=0,a=t.allOf;o0?a={schema:c,validationResult:l,matchingSchemas:f}:0===h&&(a.matchingSchemas.merge(f),a.validationResult.mergeEnumValues(l))}else a.matchingSchemas.merge(f),a.validationResult.propertiesMatches+=l.propertiesMatches,a.validationResult.propertiesValueMatches+=l.propertiesValueMatches;else a={schema:c,validationResult:l,matchingSchemas:f}}return o.length>1&&t&&n.problems.push({location:{offset:i.offset,length:1},message:Qe("oneOfWarning","Matches multiple schemas when only one must validate.")}),a&&(n.merge(a.validationResult),n.propertiesMatches+=a.validationResult.propertiesMatches,n.propertiesValueMatches+=a.validationResult.propertiesValueMatches,r.merge(a.matchingSchemas)),o.length};Array.isArray(t.anyOf)&&d(t.anyOf,!1),Array.isArray(t.oneOf)&&d(t.oneOf,!0);var m=function(e){var t=new it,o=r.newSub();ut(i,tt(e),t,o),n.merge(t),n.propertiesMatches+=t.propertiesMatches,n.propertiesValueMatches+=t.propertiesValueMatches,r.merge(o)},g=tt(t.if);if(g&&function(e,t,n){var o=tt(e),a=new it,s=r.newSub();ut(i,o,a,s),r.merge(s),a.hasProblems()?n&&m(n):t&&m(t)}(g,tt(t.then),tt(t.else)),Array.isArray(t.enum)){for(var v=ot(i),y=!1,b=0,x=t.enum;b=0;t--){var n=this.contributions[t].resolveCompletion;if(n){var r=n(e);if(r)return r}}return this.promiseConstructor.resolve(e)},e.prototype.doComplete=function(e,t,n){var r=this,i={items:[],isIncomplete:!1},o=e.getText(),a=e.offsetAt(t),s=n.getNodeFromOffset(a,!0);if(this.isInComment(e,s?s.offset:0,a))return Promise.resolve(i);if(s&&a===s.offset+s.length&&a>0){var u=o[a-1];("object"===s.type&&"}"===u||"array"===s.type&&"]"===u)&&(s=s.parent)}var c,l=this.getCurrentWord(e,a);if(!s||"string"!==s.type&&"number"!==s.type&&"boolean"!==s.type&&"null"!==s.type){var f=a-l.length;f>0&&'"'===o[f-1]&&f--,c=p.create(e.positionAt(f),t)}else c=p.create(e.positionAt(s.offset),e.positionAt(s.offset+s.length));var h={},d={add:function(e){var t=e.label,n=h[t];if(n)n.documentation||(n.documentation=e.documentation),n.detail||(n.detail=e.detail);else{if((t=t.replace(/[\n]/g,"↵")).length>60){var r=t.substr(0,57).trim()+"...";h[r]||(t=r)}c&&void 0!==e.insertText&&(e.textEdit=j.replace(c,e.insertText)),e.label=t,h[t]=e,i.items.push(e)}},setAsIncomplete:function(){i.isIncomplete=!0},error:function(e){console.error(e)},log:function(e){console.log(e)},getNumberOfProposals:function(){return i.items.length}};return this.schemaService.getSchemaForResource(e.uri,n).then((function(t){var u=[],f=!0,p="",m=void 0;if(s&&"string"===s.type){var g=s.parent;g&&"property"===g.type&&g.keyNode===s&&(f=!g.valueNode,m=g,p=o.substr(s.offset+1,s.length-2),g&&(s=g.parent))}if(s&&"object"===s.type){if(s.offset===a)return i;s.properties.forEach((function(e){m&&m===e||(h[e.keyNode.value]=fe.create("__"))}));var v="";f&&(v=r.evaluateSeparatorAfter(e,e.offsetAt(c.end))),t?r.getPropertyCompletions(t,n,s,f,v,d):r.getSchemaLessPropertyCompletions(n,s,p,d);var y=at(s);r.contributions.forEach((function(t){var n=t.collectPropertyCompletions(e.uri,y,l,f,""===v,d);n&&u.push(n)})),!t&&l.length>0&&'"'!==o.charAt(a-l.length-1)&&(d.add({kind:ae.Property,label:r.getLabelForValue(l),insertText:r.getInsertTextForProperty(l,void 0,!1,v),insertTextFormat:se.Snippet,documentation:""}),d.setAsIncomplete())}var b={};return t?r.getValueCompletions(t,n,s,a,e,d,b):r.getSchemaLessValueCompletions(n,s,a,e,d),r.contributions.length>0&&r.getContributedValueCompletions(n,s,a,e,d,u),r.promiseConstructor.all(u).then((function(){if(0===d.getNumberOfProposals()){var t=a;!s||"string"!==s.type&&"number"!==s.type&&"boolean"!==s.type&&"null"!==s.type||(t=s.offset+s.length);var n=r.evaluateSeparatorAfter(e,t);r.addFillerValueCompletions(b,n,d)}return i}))}))},e.prototype.getPropertyCompletions=function(e,t,n,r,i,o){var a=this;t.getMatchingSchemas(e.schema,n.offset).forEach((function(e){if(e.node===n&&!e.inverted){var t=e.schema.properties;t&&Object.keys(t).forEach((function(e){var n=t[e];if("object"==typeof n&&!n.deprecationMessage&&!n.doNotSuggest){var s={kind:ae.Property,label:e,insertText:a.getInsertTextForProperty(e,n,r,i),insertTextFormat:se.Snippet,filterText:a.getFilterTextForValue(e),documentation:a.fromMarkup(n.markdownDescription)||n.description||""};void 0!==n.suggestSortText&&(s.sortText=n.suggestSortText),s.insertText&&Q(s.insertText,"$1"+i)&&(s.command={title:"Suggest",command:"editor.action.triggerSuggest"}),o.add(s)}}));var s=e.schema.propertyNames;if("object"==typeof s&&!s.deprecationMessage&&!s.doNotSuggest){var u=function(e,t){void 0===t&&(t=void 0);var n={kind:ae.Property,label:e,insertText:a.getInsertTextForProperty(e,void 0,r,i),insertTextFormat:se.Snippet,filterText:a.getFilterTextForValue(e),documentation:t||a.fromMarkup(s.markdownDescription)||s.description||""};void 0!==s.suggestSortText&&(n.sortText=s.suggestSortText),n.insertText&&Q(n.insertText,"$1"+i)&&(n.command={title:"Suggest",command:"editor.action.triggerSuggest"}),o.add(n)};if(s.enum)for(var c=0;c(t.colonOffset||0)){var c=t.valueNode;if(c&&(n>c.offset+c.length||"object"===c.type||"array"===c.type))return;var l=t.keyNode.value;e.visit((function(e){return"property"===e.type&&e.keyNode.value===l&&e.valueNode&&u(e.valueNode),!0})),"$schema"===l&&t.parent&&!t.parent.parent&&this.addDollarSchemaCompletions(s,i)}if("array"===t.type)if(t.parent&&"property"===t.parent.type){var f=t.parent.keyNode.value;e.visit((function(e){return"property"===e.type&&e.keyNode.value===f&&e.valueNode&&"array"===e.valueNode.type&&e.valueNode.items.forEach(u),!0}))}else t.items.forEach(u)},e.prototype.getValueCompletions=function(e,t,n,r,i,o,a){var s=r,u=void 0,c=void 0;if(!n||"string"!==n.type&&"number"!==n.type&&"boolean"!==n.type&&"null"!==n.type||(s=n.offset+n.length,c=n,n=n.parent),n){if("property"===n.type&&r>(n.colonOffset||0)){var l=n.valueNode;if(l&&r>l.offset+l.length)return;u=n.keyNode.value,n=n.parent}if(n&&(void 0!==u||"array"===n.type)){for(var f=this.evaluateSeparatorAfter(i,s),h=0,p=t.getMatchingSchemas(e.schema,n.offset,c);h(t.colonOffset||0)){var a=t.keyNode.value,s=t.valueNode;if((!s||n<=s.offset+s.length)&&t.parent){var u=at(t.parent);this.contributions.forEach((function(e){var t=e.collectValueCompletions(r.uri,u,a,i);t&&o.push(t)}))}}}else this.contributions.forEach((function(e){var t=e.collectDefaultCompletions(r.uri,i);t&&o.push(t)}))},e.prototype.addSchemaValueCompletions=function(e,t,n,r){var i=this;"object"==typeof e&&(this.addEnumValueCompletions(e,t,n),this.addDefaultValueCompletions(e,t,n),this.collectTypes(e,r),Array.isArray(e.allOf)&&e.allOf.forEach((function(e){return i.addSchemaValueCompletions(e,t,n,r)})),Array.isArray(e.anyOf)&&e.anyOf.forEach((function(e){return i.addSchemaValueCompletions(e,t,n,r)})),Array.isArray(e.oneOf)&&e.oneOf.forEach((function(e){return i.addSchemaValueCompletions(e,t,n,r)})))},e.prototype.addDefaultValueCompletions=function(e,t,n,r){var i=this;void 0===r&&(r=0);var o=!1;if(Z(e.default)){for(var a=e.type,s=e.default,u=r;u>0;u--)s=[s],a="array";n.add({kind:this.getSuggestionKind(a),label:this.getLabelForValue(s),insertText:this.getInsertTextForValue(s,t),insertTextFormat:se.Snippet,detail:ft("json.suggest.default","Default value")}),o=!0}Array.isArray(e.examples)&&e.examples.forEach((function(a){for(var s=e.type,u=a,c=r;c>0;c--)u=[u],s="array";n.add({kind:i.getSuggestionKind(s),label:i.getLabelForValue(u),insertText:i.getInsertTextForValue(u,t),insertTextFormat:se.Snippet}),o=!0})),Array.isArray(e.defaultSnippets)&&e.defaultSnippets.forEach((function(a){var s,u,c=e.type,l=a.body,f=a.label;if(Z(l)){e.type;for(var h=r;h>0;h--)l=[l];s=i.getInsertTextForSnippetValue(l,t),u=i.getFilterTextForSnippetValue(l),f=f||i.getLabelForSnippetValue(l)}else{if("string"!=typeof a.bodyText)return;var p="",d="",m="";for(h=r;h>0;h--)p=p+m+"[\n",d=d+"\n"+m+"]",m+="\t",c="array";s=p+m+a.bodyText.split("\n").join("\n"+m)+d+t,f=f||s,u=s.replace(/[\n]/g,"")}n.add({kind:i.getSuggestionKind(c),label:f,documentation:i.fromMarkup(a.markdownDescription)||a.description,insertText:s,insertTextFormat:se.Snippet,filterText:u}),o=!0})),!o&&"object"==typeof e.items&&!Array.isArray(e.items)&&r<5&&this.addDefaultValueCompletions(e.items,t,n,r+1)},e.prototype.addEnumValueCompletions=function(e,t,n){if(Z(e.const)&&n.add({kind:this.getSuggestionKind(e.type),label:this.getLabelForValue(e.const),insertText:this.getInsertTextForValue(e.const,t),insertTextFormat:se.Snippet,documentation:this.fromMarkup(e.markdownDescription)||e.description}),Array.isArray(e.enum))for(var r=0,i=e.enum.length;r0?t[0]:void 0}if(!e)return ae.Value;switch(e){case"string":return ae.Value;case"object":return ae.Module;case"property":return ae.Property;default:return ae.Value}},e.prototype.getLabelTextForMatchingNode=function(e,t){switch(e.type){case"array":return"[]";case"object":return"{}";default:return t.getText().substr(e.offset,e.length)}},e.prototype.getInsertTextForMatchingNode=function(e,t,n){switch(e.type){case"array":return this.getInsertTextForValue([],n);case"object":return this.getInsertTextForValue({},n);default:var r=t.getText().substr(e.offset,e.length)+n;return this.getInsertTextForPlainText(r)}},e.prototype.getInsertTextForProperty=function(e,t,n,r){var i=this.getInsertTextForValue(e,"");if(!n)return i;var o,a=i+": ",s=0;if(t){if(Array.isArray(t.defaultSnippets)){if(1===t.defaultSnippets.length){var u=t.defaultSnippets[0].body;Z(u)&&(o=this.getInsertTextForSnippetValue(u,""))}s+=t.defaultSnippets.length}if(t.enum&&(o||1!==t.enum.length||(o=this.getInsertTextForGuessedValue(t.enum[0],"")),s+=t.enum.length),Z(t.default)&&(o||(o=this.getInsertTextForGuessedValue(t.default,"")),s++),Array.isArray(t.examples)&&t.examples.length&&(o||(o=this.getInsertTextForGuessedValue(t.examples[0],"")),s+=t.examples.length),0===s){var c=Array.isArray(t.type)?t.type[0]:t.type;switch(c||(t.properties?c="object":t.items&&(c="array")),c){case"boolean":o="$1";break;case"string":o='"$1"';break;case"object":o="{$1}";break;case"array":o="[$1]";break;case"number":case"integer":o="${1:0}";break;case"null":o="${1:null}";break;default:return i}}}return(!o||s>1)&&(o="$1"),a+o+r},e.prototype.getCurrentWord=function(e,t){for(var n=t-1,r=e.getText();n>=0&&-1===' \t\n\r\v":{[,]}'.indexOf(r.charAt(n));)n--;return r.substring(n+1,t)},e.prototype.evaluateSeparatorAfter=function(e,t){var n=W(e.getText(),!0);switch(n.setPosition(t),n.scan()){case 5:case 2:case 4:case 17:return"";default:return","}},e.prototype.findItemAtOffset=function(e,t,n){for(var r=W(t.getText(),!0),i=e.items,o=i.length-1;o>=0;o--){var a=i[o];if(n>a.offset+a.length)return r.setPosition(a.offset+a.length),5===r.scan()&&n>=r.getTokenOffset()+r.getTokenLength()?o+1:o;if(n>=a.offset)return o}return 0},e.prototype.isInComment=function(e,t,n){var r=W(e.getText(),!1);r.setPosition(t);for(var i=r.scan();17!==i&&r.getTokenOffset()+r.getTokenLength(){var e={470:e=>{function t(e){if("string"!=typeof e)throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}function n(e,t){for(var n,r="",i=0,o=-1,a=0,s=0;s<=e.length;++s){if(s2){var u=r.lastIndexOf("/");if(u!==r.length-1){-1===u?(r="",i=0):i=(r=r.slice(0,u)).length-1-r.lastIndexOf("/"),o=s,a=0;continue}}else if(2===r.length||1===r.length){r="",i=0,o=s,a=0;continue}t&&(r.length>0?r+="/..":r="..",i=2)}else r.length>0?r+="/"+e.slice(o+1,s):r=e.slice(o+1,s),i=s-o-1;o=s,a=0}else 46===n&&-1!==a?++a:a=-1}return r}var r={resolve:function(){for(var e,r="",i=!1,o=arguments.length-1;o>=-1&&!i;o--){var a;o>=0?a=arguments[o]:(void 0===e&&(e=process.cwd()),a=e),t(a),0!==a.length&&(r=a+"/"+r,i=47===a.charCodeAt(0))}return r=n(r,!i),i?r.length>0?"/"+r:"/":r.length>0?r:"."},normalize:function(e){if(t(e),0===e.length)return".";var r=47===e.charCodeAt(0),i=47===e.charCodeAt(e.length-1);return 0!==(e=n(e,!r)).length||r||(e="."),e.length>0&&i&&(e+="/"),r?"/"+e:e},isAbsolute:function(e){return t(e),e.length>0&&47===e.charCodeAt(0)},join:function(){if(0===arguments.length)return".";for(var e,n=0;n0&&(void 0===e?e=i:e+="/"+i)}return void 0===e?".":r.normalize(e)},relative:function(e,n){if(t(e),t(n),e===n)return"";if((e=r.resolve(e))===(n=r.resolve(n)))return"";for(var i=1;ic){if(47===n.charCodeAt(s+f))return n.slice(s+f+1);if(0===f)return n.slice(s+f)}else a>c&&(47===e.charCodeAt(i+f)?l=f:0===f&&(l=0));break}var h=e.charCodeAt(i+f);if(h!==n.charCodeAt(s+f))break;47===h&&(l=f)}var p="";for(f=i+l+1;f<=o;++f)f!==o&&47!==e.charCodeAt(f)||(0===p.length?p+="..":p+="/..");return p.length>0?p+n.slice(s+l):(s+=l,47===n.charCodeAt(s)&&++s,n.slice(s))},_makeLong:function(e){return e},dirname:function(e){if(t(e),0===e.length)return".";for(var n=e.charCodeAt(0),r=47===n,i=-1,o=!0,a=e.length-1;a>=1;--a)if(47===(n=e.charCodeAt(a))){if(!o){i=a;break}}else o=!1;return-1===i?r?"/":".":r&&1===i?"//":e.slice(0,i)},basename:function(e,n){if(void 0!==n&&"string"!=typeof n)throw new TypeError('"ext" argument must be a string');t(e);var r,i=0,o=-1,a=!0;if(void 0!==n&&n.length>0&&n.length<=e.length){if(n.length===e.length&&n===e)return"";var s=n.length-1,u=-1;for(r=e.length-1;r>=0;--r){var c=e.charCodeAt(r);if(47===c){if(!a){i=r+1;break}}else-1===u&&(a=!1,u=r+1),s>=0&&(c===n.charCodeAt(s)?-1==--s&&(o=r):(s=-1,o=u))}return i===o?o=u:-1===o&&(o=e.length),e.slice(i,o)}for(r=e.length-1;r>=0;--r)if(47===e.charCodeAt(r)){if(!a){i=r+1;break}}else-1===o&&(a=!1,o=r+1);return-1===o?"":e.slice(i,o)},extname:function(e){t(e);for(var n=-1,r=0,i=-1,o=!0,a=0,s=e.length-1;s>=0;--s){var u=e.charCodeAt(s);if(47!==u)-1===i&&(o=!1,i=s+1),46===u?-1===n?n=s:1!==a&&(a=1):-1!==n&&(a=-1);else if(!o){r=s+1;break}}return-1===n||-1===i||0===a||1===a&&n===i-1&&n===r+1?"":e.slice(n,i)},format:function(e){if(null===e||"object"!=typeof e)throw new TypeError('The "pathObject" argument must be of type Object. Received type '+typeof e);return function(e,t){var n=t.dir||t.root,r=t.base||(t.name||"")+(t.ext||"");return n?n===t.root?n+r:n+"/"+r:r}(0,e)},parse:function(e){t(e);var n={root:"",dir:"",base:"",ext:"",name:""};if(0===e.length)return n;var r,i=e.charCodeAt(0),o=47===i;o?(n.root="/",r=1):r=0;for(var a=-1,s=0,u=-1,c=!0,l=e.length-1,f=0;l>=r;--l)if(47!==(i=e.charCodeAt(l)))-1===u&&(c=!1,u=l+1),46===i?-1===a?a=l:1!==f&&(f=1):-1!==a&&(f=-1);else if(!c){s=l+1;break}return-1===a||-1===u||0===f||1===f&&a===u-1&&a===s+1?-1!==u&&(n.base=n.name=0===s&&o?e.slice(1,u):e.slice(s,u)):(0===s&&o?(n.name=e.slice(1,a),n.base=e.slice(1,u)):(n.name=e.slice(s,a),n.base=e.slice(s,u)),n.ext=e.slice(a,u)),s>0?n.dir=e.slice(0,s-1):o&&(n.dir="/"),n},sep:"/",delimiter:":",win32:null,posix:null};r.posix=r,e.exports=r},447:(e,t,n)=>{var r;if(n.r(t),n.d(t,{URI:()=>d,Utils:()=>w}),"object"==typeof process)r="win32"===process.platform;else if("object"==typeof navigator){var i=navigator.userAgent;r=i.indexOf("Windows")>=0}var o,a,s=(o=function(e,t){return(o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}o(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),u=/^\w[\w\d+.-]*$/,c=/^\//,l=/^\/\//,f="",h="/",p=/^(([^:/?#]+?):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?/,d=function(){function e(e,t,n,r,i,o){void 0===o&&(o=!1),"object"==typeof e?(this.scheme=e.scheme||f,this.authority=e.authority||f,this.path=e.path||f,this.query=e.query||f,this.fragment=e.fragment||f):(this.scheme=function(e,t){return e||t?e:"file"}(e,o),this.authority=t||f,this.path=function(e,t){switch(e){case"https":case"http":case"file":t?t[0]!==h&&(t=h+t):t=h}return t}(this.scheme,n||f),this.query=r||f,this.fragment=i||f,function(e,t){if(!e.scheme&&t)throw new Error('[UriError]: Scheme is missing: {scheme: "", authority: "'+e.authority+'", path: "'+e.path+'", query: "'+e.query+'", fragment: "'+e.fragment+'"}');if(e.scheme&&!u.test(e.scheme))throw new Error("[UriError]: Scheme contains illegal characters.");if(e.path)if(e.authority){if(!c.test(e.path))throw new Error('[UriError]: If a URI contains an authority component, then the path component must either be empty or begin with a slash ("/") character')}else if(l.test(e.path))throw new Error('[UriError]: If a URI does not contain an authority component, then the path cannot begin with two slash characters ("//")')}(this,o))}return e.isUri=function(t){return t instanceof e||!!t&&"string"==typeof t.authority&&"string"==typeof t.fragment&&"string"==typeof t.path&&"string"==typeof t.query&&"string"==typeof t.scheme&&"function"==typeof t.fsPath&&"function"==typeof t.with&&"function"==typeof t.toString},Object.defineProperty(e.prototype,"fsPath",{get:function(){return x(this,!1)},enumerable:!1,configurable:!0}),e.prototype.with=function(e){if(!e)return this;var t=e.scheme,n=e.authority,r=e.path,i=e.query,o=e.fragment;return void 0===t?t=this.scheme:null===t&&(t=f),void 0===n?n=this.authority:null===n&&(n=f),void 0===r?r=this.path:null===r&&(r=f),void 0===i?i=this.query:null===i&&(i=f),void 0===o?o=this.fragment:null===o&&(o=f),t===this.scheme&&n===this.authority&&r===this.path&&i===this.query&&o===this.fragment?this:new g(t,n,r,i,o)},e.parse=function(e,t){void 0===t&&(t=!1);var n=p.exec(e);return n?new g(n[2]||f,k(n[4]||f),k(n[5]||f),k(n[7]||f),k(n[9]||f),t):new g(f,f,f,f,f)},e.file=function(e){var t=f;if(r&&(e=e.replace(/\\/g,h)),e[0]===h&&e[1]===h){var n=e.indexOf(h,2);-1===n?(t=e.substring(2),e=h):(t=e.substring(2,n),e=e.substring(n)||h)}return new g("file",t,e,f,f)},e.from=function(e){return new g(e.scheme,e.authority,e.path,e.query,e.fragment)},e.prototype.toString=function(e){return void 0===e&&(e=!1),A(this,e)},e.prototype.toJSON=function(){return this},e.revive=function(t){if(t){if(t instanceof e)return t;var n=new g(t);return n._formatted=t.external,n._fsPath=t._sep===m?t.fsPath:null,n}return t},e}(),m=r?1:void 0,g=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t._formatted=null,t._fsPath=null,t}return s(t,e),Object.defineProperty(t.prototype,"fsPath",{get:function(){return this._fsPath||(this._fsPath=x(this,!1)),this._fsPath},enumerable:!1,configurable:!0}),t.prototype.toString=function(e){return void 0===e&&(e=!1),e?A(this,!0):(this._formatted||(this._formatted=A(this,!1)),this._formatted)},t.prototype.toJSON=function(){var e={$mid:1};return this._fsPath&&(e.fsPath=this._fsPath,e._sep=m),this._formatted&&(e.external=this._formatted),this.path&&(e.path=this.path),this.scheme&&(e.scheme=this.scheme),this.authority&&(e.authority=this.authority),this.query&&(e.query=this.query),this.fragment&&(e.fragment=this.fragment),e},t}(d),v=((a={})[58]="%3A",a[47]="%2F",a[63]="%3F",a[35]="%23",a[91]="%5B",a[93]="%5D",a[64]="%40",a[33]="%21",a[36]="%24",a[38]="%26",a[39]="%27",a[40]="%28",a[41]="%29",a[42]="%2A",a[43]="%2B",a[44]="%2C",a[59]="%3B",a[61]="%3D",a[32]="%20",a);function y(e,t){for(var n=void 0,r=-1,i=0;i=97&&o<=122||o>=65&&o<=90||o>=48&&o<=57||45===o||46===o||95===o||126===o||t&&47===o)-1!==r&&(n+=encodeURIComponent(e.substring(r,i)),r=-1),void 0!==n&&(n+=e.charAt(i));else{void 0===n&&(n=e.substr(0,i));var a=v[o];void 0!==a?(-1!==r&&(n+=encodeURIComponent(e.substring(r,i)),r=-1),n+=a):-1===r&&(r=i)}}return-1!==r&&(n+=encodeURIComponent(e.substring(r))),void 0!==n?n:e}function b(e){for(var t=void 0,n=0;n1&&"file"===e.scheme?"//"+e.authority+e.path:47===e.path.charCodeAt(0)&&(e.path.charCodeAt(1)>=65&&e.path.charCodeAt(1)<=90||e.path.charCodeAt(1)>=97&&e.path.charCodeAt(1)<=122)&&58===e.path.charCodeAt(2)?t?e.path.substr(1):e.path[1].toLowerCase()+e.path.substr(2):e.path,r&&(n=n.replace(/\//g,"\\")),n}function A(e,t){var n=t?b:y,r="",i=e.scheme,o=e.authority,a=e.path,s=e.query,u=e.fragment;if(i&&(r+=i,r+=":"),(o||"file"===i)&&(r+=h,r+=h),o){var c=o.indexOf("@");if(-1!==c){var l=o.substr(0,c);o=o.substr(c+1),-1===(c=l.indexOf(":"))?r+=n(l,!1):(r+=n(l.substr(0,c),!1),r+=":",r+=n(l.substr(c+1),!1)),r+="@"}-1===(c=(o=o.toLowerCase()).indexOf(":"))?r+=n(o,!1):(r+=n(o.substr(0,c),!1),r+=o.substr(c))}if(a){if(a.length>=3&&47===a.charCodeAt(0)&&58===a.charCodeAt(2))(f=a.charCodeAt(1))>=65&&f<=90&&(a="/"+String.fromCharCode(f+32)+":"+a.substr(3));else if(a.length>=2&&58===a.charCodeAt(1)){var f;(f=a.charCodeAt(0))>=65&&f<=90&&(a=String.fromCharCode(f+32)+":"+a.substr(2))}r+=n(a,!0)}return s&&(r+="?",r+=n(s,!1)),u&&(r+="#",r+=t?u:y(u,!1)),r}function C(e){try{return decodeURIComponent(e)}catch(t){return e.length>3?e.substr(0,3)+C(e.substr(3)):e}}var S=/(%[0-9A-Za-z][0-9A-Za-z])+/g;function k(e){return e.match(S)?e.replace(S,(function(e){return C(e)})):e}var w,I=n(470),j=function(){for(var e=0,t=0,n=arguments.length;t{for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n(447)})();const{URI:ht,Utils:pt}=lt;function dt(e,t){if("string"!=typeof e)throw new TypeError("Expected a string");for(var n,r=String(e),i="",o=!!t&&!!t.extended,a=!!t&&!!t.globstar,s=!1,u=t&&"string"==typeof t.flags?t.flags:"",c=0,l=r.length;c1)||"/"!==f&&void 0!==f&&"{"!==f&&","!==f||"/"!==p&&void 0!==p&&","!==p&&"}"!==p?i+="([^/]*)":("/"===p?c++:"/"===f&&i.endsWith("\\/")&&(i=i.substr(0,i.length-2)),i+="((?:[^/]*(?:/|$))*)"):i+=".*";break;default:i+=n}return u&&~u.indexOf("g")||(i="^"+i+"$"),new RegExp(i,u)}var mt=Je(),gt=function(){function e(e,t){this.globWrappers=[];try{for(var n=0,r=e;n0&&("/"===i[0]&&(i=i.substring(1)),this.globWrappers.push({regexp:dt("**/"+i,{extended:!0,globstar:!0}),include:o}))}this.uris=t}catch(e){this.globWrappers.length=0,this.uris=[]}}return e.prototype.matchesPattern=function(e){for(var t=!1,n=0,r=this.globWrappers;n0;)this.callOnDispose.pop()()},e.prototype.onResourceChange=function(e){for(var t=this,n=!1,r=[e=At(e)],i=Object.keys(this.schemasById).map((function(e){return t.schemasById[e]}));r.length;)for(var o=r.pop(),a=0;a1&&(n=r[1]),Q(n,".")&&(n=n.substr(0,n.length-1)),new yt({},[mt("json.schema.nocontent","Unable to load schema from '{0}': {1}.",Ct(e),n)])}))},e.prototype.resolveSchemaContent=function(e,t,n){var r=this,i=e.errors.slice(0),o=e.schema;if(o.$schema){var a=At(o.$schema);if("http://json-schema.org/draft-03/schema"===a)return this.promise.resolve(new bt({},[mt("json.schema.draft03.notsupported","Draft-03 schemas are not supported.")]));"https://json-schema.org/draft/2019-09/schema"===a&&i.push(mt("json.schema.draft201909.notsupported","Draft 2019-09 schemas are not yet fully supported."))}var s=this.contextService,u=function(e,t,n,r){var o=r?decodeURIComponent(r):void 0,a=function(e,t){if(!t)return e;var n=e;return"/"===t[0]&&(t=t.substr(1)),t.split("/").some((function(e){return e=e.replace(/~1/g,"/").replace(/~0/g,"~"),!(n=n[e])})),n}(t,o);if(a)for(var s in a)a.hasOwnProperty(s)&&!e.hasOwnProperty(s)&&(e[s]=a[s]);else i.push(mt("json.schema.invalidref","$ref '{0}' in '{1}' can not be resolved.",o,n))},c=function(e,t,n,o,a){s&&!/^[A-Za-z][A-Za-z0-9+\-.+]*:\/\/.*/.test(t)&&(t=s.resolveRelativePath(t,o)),t=At(t);var c=r.getOrAddSchemaHandle(t);return c.getUnresolvedSchema().then((function(r){if(a[t]=!0,r.errors.length){var o=n?t+"#"+n:t;i.push(mt("json.schema.problemloadingref","Problems loading reference '{0}': {1}",o,r.errors[0]))}return u(e,r.schema,t,n),l(e,r.schema,t,c.dependencies)}))},l=function(e,t,n,i){if(!e||"object"!=typeof e)return Promise.resolve(null);for(var o=[e],a=[],s=[],l=function(e){for(var r=[];e.$ref;){var a=e.$ref,l=a.split("#",2);if(delete e.$ref,l[0].length>0)return void s.push(c(e,l[0],l[1],n,i));-1===r.indexOf(a)&&(u(e,t,n,l[1]),r.push(a))}!function(){for(var e=[],t=0;t=0||(a.push(f),l(f))}return r.promise.all(s)};return l(o,o,t,n).then((function(e){return new bt(o,i)}))},e.prototype.getSchemaForResource=function(e,t){if(t&&t.root&&"object"===t.root.type){var n=t.root.properties.filter((function(e){return"$schema"===e.keyNode.value&&e.valueNode&&"string"===e.valueNode.type}));if(n.length>0){var r=n[0].valueNode;if(r&&"string"===r.type){var i=ot(r);if(i&&X(i,".")&&this.contextService&&(i=this.contextService.resolveRelativePath(i,e)),i){var o=At(i);return this.getOrAddSchemaHandle(o).getResolvedSchema()}}}}if(this.cachedSchemaForResource&&this.cachedSchemaForResource.resource===e)return this.cachedSchemaForResource.resolvedSchema;for(var a=Object.create(null),s=[],u=function(e){try{return ht.parse(e).with({fragment:null,query:null}).toString()}catch(t){return e}}(e),c=0,l=this.filePatternAssociations;c0?this.createCombinedSchema(e,s).getResolvedSchema():this.promise.resolve(void 0);return this.cachedSchemaForResource={resource:e,resolvedSchema:m},m},e.prototype.createCombinedSchema=function(e,t){if(1===t.length)return this.getOrAddSchemaHandle(t[0]);var n="schemaservice://combinedSchema/"+encodeURIComponent(e),r={allOf:t.map((function(e){return{$ref:e}}))};return this.addSchemaHandle(n,r)},e.prototype.getMatchingSchemas=function(e,t,n){if(n){var r=n.id||"schemaservice://untitled/matchingSchemas/"+xt++;return this.resolveSchemaContent(new yt(n),r,{}).then((function(e){return t.getMatchingSchemas(e.schema).filter((function(e){return!e.inverted}))}))}return this.getSchemaForResource(e.uri,t).then((function(e){return e?t.getMatchingSchemas(e.schema).filter((function(e){return!e.inverted})):[]}))}}(),0);function At(e){try{return ht.parse(e).toString()}catch(t){return e}}function Ct(e){try{var t=ht.parse(e);if("file"===t.scheme)return t.fsPath}catch(e){}return e}var St=Je(),kt=(function(){function e(e,t){this.jsonSchemaService=e,this.promise=t,this.validationEnabled=!0}e.prototype.configure=function(e){e&&(this.validationEnabled=!1!==e.validate,this.commentSeverity=e.allowComments?void 0:C.Error)},e.prototype.doValidation=function(e,t,n,r){var i=this;if(!this.validationEnabled)return this.promise.resolve([]);var o=[],a={},s=function(e){var t=e.range.start.line+" "+e.range.start.character+" "+e.message;a[t]||(a[t]=!0,o.push(e))},u=function(r){var a=(null==n?void 0:n.trailingCommas)?jt(n.trailingCommas):C.Error,u=(null==n?void 0:n.comments)?jt(n.comments):i.commentSeverity,c=(null==n?void 0:n.schemaValidation)?jt(n.schemaValidation):C.Warning,l=(null==n?void 0:n.schemaRequest)?jt(n.schemaRequest):C.Warning;if(r){if(r.errors.length&&t.root&&l){var f=t.root,h="object"===f.type?f.properties[0]:void 0;if(h&&"$schema"===h.keyNode.value){var d=h.valueNode||h,m=p.create(e.positionAt(d.offset),e.positionAt(d.offset+d.length));s(w.create(m,r.errors[0],l,Re.SchemaResolveError))}else m=p.create(e.positionAt(f.offset),e.positionAt(f.offset+1)),s(w.create(m,r.errors[0],l,Re.SchemaResolveError))}else if(c){var g=t.validate(e,r.schema,c);g&&g.forEach(s)}wt(r.schema)&&(u=void 0),It(r.schema)&&(a=void 0)}for(var v=0,y=t.syntaxErrors;v=97&&e<=102?e-97+10:0)}function Et(e){if("#"===e[0])switch(e.length){case 4:return{red:17*Tt(e.charCodeAt(1))/255,green:17*Tt(e.charCodeAt(2))/255,blue:17*Tt(e.charCodeAt(3))/255,alpha:1};case 5:return{red:17*Tt(e.charCodeAt(1))/255,green:17*Tt(e.charCodeAt(2))/255,blue:17*Tt(e.charCodeAt(3))/255,alpha:17*Tt(e.charCodeAt(4))/255};case 7:return{red:(16*Tt(e.charCodeAt(1))+Tt(e.charCodeAt(2)))/255,green:(16*Tt(e.charCodeAt(3))+Tt(e.charCodeAt(4)))/255,blue:(16*Tt(e.charCodeAt(5))+Tt(e.charCodeAt(6)))/255,alpha:1};case 9:return{red:(16*Tt(e.charCodeAt(1))+Tt(e.charCodeAt(2)))/255,green:(16*Tt(e.charCodeAt(3))+Tt(e.charCodeAt(4)))/255,blue:(16*Tt(e.charCodeAt(5))+Tt(e.charCodeAt(6)))/255,alpha:(16*Tt(e.charCodeAt(7))+Tt(e.charCodeAt(8)))/255}}}function _t(e,t){return p.create(e.positionAt(t.offset),e.positionAt(t.offset+t.length))}!function(){function e(e){this.schemaService=e}e.prototype.findDocumentSymbols=function(e,t,n){var r=this;void 0===n&&(n={resultLimit:Number.MAX_VALUE});var i=t.root;if(!i)return[];var o=n.resultLimit||Number.MAX_VALUE,a=e.uri;if(("vscode://defaultsettings/keybindings.json"===a||Q(a.toLowerCase(),"/user/keybindings.json"))&&"array"===i.type){for(var s=[],u=0,c=i.items;u0){o--;var a=d.create(e.uri,_t(e,t)),s=n?n+"."+t.keyNode.value:t.keyNode.value;b.push({name:r.getKeyLabel(t),kind:r.getSymbolKind(i.type),location:a,containerName:n}),g.push({node:i,containerName:s})}else y=!0}))};v0){o--;var a=_t(e,t),s=a,u={name:String(i),kind:r.getSymbolKind(t.type),range:a,selectionRange:s,children:[]};n.push(u),v.push({result:u.children,node:t})}else b=!0})):"object"===t.type&&t.properties.forEach((function(t){var i=t.valueNode;if(i)if(o>0){o--;var a=_t(e,t),s=_t(e,t.keyNode),u=[],c={name:r.getKeyLabel(t),kind:r.getSymbolKind(i.type),range:a,selectionRange:s,children:u,detail:r.getDetail(i)};n.push(c),v.push({result:u,node:i})}else b=!0}))};y0,p){case 1:c=gn.push(c,0),h=on,u=!1;break;case 2:c=gn.pop(c),h=on,u=!1;break;case 3:c=gn.push(c,1),h=an,u=!1;break;case 4:c=gn.pop(c),h=an,u=!1;break;case 6:h=sn,u=!0;break;case 5:h=un,u=!1;break;case 8:case 9:h=cn,u=!1;break;case 7:h=ln,u=!1;break;case 10:var d=c?c.type:0;h=u||1===d?fn:pn,u=!1;break;case 11:h=hn,u=!1}if(e)switch(p){case 12:h=mn;break;case 13:h=dn}l.endState=new vn(n.getStateData(),s.getTokenError(),u,c),l.tokens.push({startIndex:f,scopes:h})}return l}(t,e,n,r)}}))),o.colors&&n.push(i.Mj.registerColorProvider(r,new tn(a))),o.foldingRanges&&n.push(i.Mj.registerFoldingRangeProvider(r,new nn(a))),o.diagnostics&&n.push(new $t(r,a,e)),o.selectionRanges&&n.push(i.Mj.registerSelectionRangeProvider(r,new rn(a)))}s(),t.push(i.Mj.setLanguageConfiguration(e.languageId,An));var u=e.modeConfiguration;return e.onDidChange((function(e){e.modeConfiguration!==u&&(u=e.modeConfiguration,s())})),t.push(bn(n)),bn(t)}function bn(e){return{dispose:function(){return xn(e)}}}function xn(e){for(;e.length;)e.pop().dispose()}var An={wordPattern:/(-?\d*\.\d\w*)|([^\[\{\]\}\:\"\,\s]+)/g,comments:{lineComment:"//",blockComment:["/*","*/"]},brackets:[["{","}"],["[","]"]],autoClosingPairs:[{open:"{",close:"}",notIn:["string"]},{open:"[",close:"]",notIn:["string"]},{open:'"',close:'"',notIn:["string"]}]}}}]); +//# sourceMappingURL=99.index.js.map \ No newline at end of file diff --git a/99.index.js.map b/99.index.js.map new file mode 100644 index 0000000..f9afc95 --- /dev/null +++ b/99.index.js.map @@ -0,0 +1 @@ +{"version":3,"file":"99.index.js","mappings":"6LAMIA,E,UCAAC,EAA+B,WAC/B,SAASA,EAAcC,GACnB,IAAIC,EAAQC,KACZA,KAAKC,UAAYH,EACjBE,KAAKE,QAAU,KACfF,KAAKG,mBAAqBC,aAAY,WAAc,OAAOL,EAAMM,iBAAmB,KACpFL,KAAKM,cAAgB,EACrBN,KAAKO,sBAAwBP,KAAKC,UAAUO,aAAY,WAAc,OAAOT,EAAMU,iBAyDvF,OAvDAZ,EAAca,UAAUD,YAAc,WAC9BT,KAAKE,UACLF,KAAKE,QAAQS,UACbX,KAAKE,QAAU,MAEnBF,KAAKY,QAAU,MAEnBf,EAAca,UAAUC,QAAU,WAC9BE,cAAcb,KAAKG,oBACnBH,KAAKO,sBAAsBI,UAC3BX,KAAKS,eAETZ,EAAca,UAAUL,aAAe,WAC9BL,KAAKE,SAGoBY,KAAKC,MAAQf,KAAKM,cA1B/B,MA4BbN,KAAKS,eAGbZ,EAAca,UAAUM,WAAa,WAgBjC,OAfAhB,KAAKM,cAAgBQ,KAAKC,MACrBf,KAAKY,UACNZ,KAAKE,QAAU,qBAAuB,CAElCe,SAAU,8BACVC,MAAOlB,KAAKC,UAAUkB,WAEtBC,WAAY,CACRC,iBAAkBrB,KAAKC,UAAUqB,mBACjCH,WAAYnB,KAAKC,UAAUkB,WAC3BI,oBAAqBvB,K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AyCjG,EAAY,IAAI,GAAuCwgC,KAGvHgF,IACAF,EAAYr/B,KAAK,8BAAmCtH,EAASqB,WAAY6mC,KACzE,IAAInB,EAAoB/mC,EAAS+mC,kBAQjC,OAPA/mC,EAASU,aAAY,SAAUynC,GACvBA,EAAYpB,oBAAsBA,IAClCA,EAAoBoB,EAAYpB,kBAChCF,QAGRF,EAAYr/B,KAAK8gC,GAAaxB,IACvBwB,GAAazB,GAExB,SAASyB,GAAazB,GAClB,MAAO,CAAE9lC,QAAS,WAAc,OAAOmmC,GAAWL,KAEtD,SAASK,GAAWL,GAChB,KAAOA,EAAY5kC,QACf4kC,EAAYj9B,MAAM7I,UAG1B,IAAIqnC,GAAwB,CACxBG,YAAa,yCACbzf,SAAU,CACN0f,YAAa,KACbC,aAAc,CAAC,KAAM,OAEzBC,SAAU,CACN,CAAC,IAAK,KACN,CAAC,IAAK,MAEVC,iBAAkB,CACd,CAAEC,KAAM,IAAKC,MAAO,IAAKC,MAAO,CAAC,WACjC,CAAEF,KAAM,IAAKC,MAAO,IAAKC,MAAO,CAAC,WACjC,CAAEF,KAAM,IAAKC,MAAO,IAAKC,MAAO,CAAC","sources":["webpack://react-monaco-editor-browser-example/./node_modules/monaco-editor/esm/vs/language/json/_deps/jsonc-parser/impl/parser.js","webpack://react-monaco-editor-browser-example/./node_modules/monaco-editor/esm/vs/language/json/workerManager.js","webpack://react-monaco-editor-browser-example/./node_modules/monaco-editor/esm/vs/language/json/_deps/jsonc-parser/impl/scanner.js","webpack://react-monaco-editor-browser-example/./node_modules/monaco-editor/esm/vs/language/json/_deps/jsonc-parser/main.js","webpack://react-monaco-editor-browser-example/./node_modules/monaco-editor/esm/vs/language/json/_deps/vscode-languageserver-types/main.js","webpack://react-monaco-editor-browser-example/./node_modules/monaco-editor/esm/vs/language/json/_deps/vscode-json-languageservice/utils/objects.js","webpack://react-monaco-editor-browser-example/./node_modules/monaco-editor/esm/vs/language/json/_deps/vscode-json-languageservice/utils/strings.js","webpack://react-monaco-editor-browser-example/./node_modules/monaco-editor/esm/vs/language/json/_deps/vscode-languageserver-textdocument/lib/esm/main.js","webpack://react-monaco-editor-browser-example/./node_modules/monaco-editor/esm/vs/language/json/_deps/vscode-json-languageservice/jsonLanguageTypes.js","webpack://react-monaco-editor-browser-example/./node_modules/monaco-editor/esm/vs/language/json/fillers/vscode-nls.js","webpack://react-monaco-editor-browser-example/./node_modules/monaco-editor/esm/vs/language/json/_deps/vscode-json-languageservice/parser/jsonParser.js","webpack://react-monaco-editor-browser-example/./node_modules/monaco-editor/esm/vs/language/json/_deps/vscode-json-languageservice/utils/json.js","webpack://react-monaco-editor-browser-example/./node_modules/monaco-editor/esm/vs/language/json/_deps/vscode-json-languageservice/services/jsonCompletion.js","webpack://react-monaco-editor-browser-example/./node_modules/monaco-editor/esm/vs/language/json/_deps/vscode-uri/index.js","webpack://react-monaco-editor-browser-example/./node_modules/monaco-editor/esm/vs/language/json/_deps/vscode-json-languageservice/utils/glob.js","webpack://react-monaco-editor-browser-example/./node_modules/monaco-editor/esm/vs/language/json/_deps/vscode-json-languageservice/services/jsonSchemaService.js","webpack://react-monaco-editor-browser-example/./node_modules/monaco-editor/esm/vs/language/json/_deps/vscode-json-languageservice/services/jsonValidation.js","webpack://react-monaco-editor-browser-example/./node_modules/monaco-editor/esm/vs/language/json/_deps/vscode-json-languageservice/utils/colors.js","webpack://react-monaco-editor-browser-example/./node_modules/monaco-editor/esm/vs/language/json/_deps/vscode-json-languageservice/services/jsonDocumentSymbols.js","webpack://react-monaco-editor-browser-example/./node_modules/monaco-editor/esm/vs/language/json/_deps/vscode-json-languageservice/services/configuration.js","webpack://react-monaco-editor-browser-example/./node_modules/monaco-editor/esm/vs/language/json/languageFeatures.js","webpack://react-monaco-editor-browser-example/./node_modules/monaco-editor/esm/vs/language/json/tokenization.js","webpack://react-monaco-editor-browser-example/./node_modules/monaco-editor/esm/vs/language/json/jsonMode.js"],"sourcesContent":["/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n'use strict';\nimport { createScanner } from './scanner.js';\nvar ParseOptions;\n(function (ParseOptions) {\n ParseOptions.DEFAULT = {\n allowTrailingComma: false\n };\n})(ParseOptions || (ParseOptions = {}));\n/**\n * For a given offset, evaluate the location in the JSON document. Each segment in the location path is either a property name or an array index.\n */\nexport function getLocation(text, position) {\n var segments = []; // strings or numbers\n var earlyReturnException = new Object();\n var previousNode = undefined;\n var previousNodeInst = {\n value: {},\n offset: 0,\n length: 0,\n type: 'object',\n parent: undefined\n };\n var isAtPropertyKey = false;\n function setPreviousNode(value, offset, length, type) {\n previousNodeInst.value = value;\n previousNodeInst.offset = offset;\n previousNodeInst.length = length;\n previousNodeInst.type = type;\n previousNodeInst.colonOffset = undefined;\n previousNode = previousNodeInst;\n }\n try {\n visit(text, {\n onObjectBegin: function (offset, length) {\n if (position <= offset) {\n throw earlyReturnException;\n }\n previousNode = undefined;\n isAtPropertyKey = position > offset;\n segments.push(''); // push a placeholder (will be replaced)\n },\n onObjectProperty: function (name, offset, length) {\n if (position < offset) {\n throw earlyReturnException;\n }\n setPreviousNode(name, offset, length, 'property');\n segments[segments.length - 1] = name;\n if (position <= offset + length) {\n throw earlyReturnException;\n }\n },\n onObjectEnd: function (offset, length) {\n if (position <= offset) {\n throw earlyReturnException;\n }\n previousNode = undefined;\n segments.pop();\n },\n onArrayBegin: function (offset, length) {\n if (position <= offset) {\n throw earlyReturnException;\n }\n previousNode = undefined;\n segments.push(0);\n },\n onArrayEnd: function (offset, length) {\n if (position <= offset) {\n throw earlyReturnException;\n }\n previousNode = undefined;\n segments.pop();\n },\n onLiteralValue: function (value, offset, length) {\n if (position < offset) {\n throw earlyReturnException;\n }\n setPreviousNode(value, offset, length, getNodeType(value));\n if (position <= offset + length) {\n throw earlyReturnException;\n }\n },\n onSeparator: function (sep, offset, length) {\n if (position <= offset) {\n throw earlyReturnException;\n }\n if (sep === ':' && previousNode && previousNode.type === 'property') {\n previousNode.colonOffset = offset;\n isAtPropertyKey = false;\n previousNode = undefined;\n }\n else if (sep === ',') {\n var last = segments[segments.length - 1];\n if (typeof last === 'number') {\n segments[segments.length - 1] = last + 1;\n }\n else {\n isAtPropertyKey = true;\n segments[segments.length - 1] = '';\n }\n previousNode = undefined;\n }\n }\n });\n }\n catch (e) {\n if (e !== earlyReturnException) {\n throw e;\n }\n }\n return {\n path: segments,\n previousNode: previousNode,\n isAtPropertyKey: isAtPropertyKey,\n matches: function (pattern) {\n var k = 0;\n for (var i = 0; k < pattern.length && i < segments.length; i++) {\n if (pattern[k] === segments[i] || pattern[k] === '*') {\n k++;\n }\n else if (pattern[k] !== '**') {\n return false;\n }\n }\n return k === pattern.length;\n }\n };\n}\n/**\n * Parses the given text and returns the object the JSON content represents. On invalid input, the parser tries to be as fault tolerant as possible, but still return a result.\n * Therefore always check the errors list to find out if the input was valid.\n */\nexport function parse(text, errors, options) {\n if (errors === void 0) { errors = []; }\n if (options === void 0) { options = ParseOptions.DEFAULT; }\n var currentProperty = null;\n var currentParent = [];\n var previousParents = [];\n function onValue(value) {\n if (Array.isArray(currentParent)) {\n currentParent.push(value);\n }\n else if (currentProperty !== null) {\n currentParent[currentProperty] = value;\n }\n }\n var visitor = {\n onObjectBegin: function () {\n var object = {};\n onValue(object);\n previousParents.push(currentParent);\n currentParent = object;\n currentProperty = null;\n },\n onObjectProperty: function (name) {\n currentProperty = name;\n },\n onObjectEnd: function () {\n currentParent = previousParents.pop();\n },\n onArrayBegin: function () {\n var array = [];\n onValue(array);\n previousParents.push(currentParent);\n currentParent = array;\n currentProperty = null;\n },\n onArrayEnd: function () {\n currentParent = previousParents.pop();\n },\n onLiteralValue: onValue,\n onError: function (error, offset, length) {\n errors.push({ error: error, offset: offset, length: length });\n }\n };\n visit(text, visitor, options);\n return currentParent[0];\n}\n/**\n * Parses the given text and returns a tree representation the JSON content. On invalid input, the parser tries to be as fault tolerant as possible, but still return a result.\n */\nexport function parseTree(text, errors, options) {\n if (errors === void 0) { errors = []; }\n if (options === void 0) { options = ParseOptions.DEFAULT; }\n var currentParent = { type: 'array', offset: -1, length: -1, children: [], parent: undefined }; // artificial root\n function ensurePropertyComplete(endOffset) {\n if (currentParent.type === 'property') {\n currentParent.length = endOffset - currentParent.offset;\n currentParent = currentParent.parent;\n }\n }\n function onValue(valueNode) {\n currentParent.children.push(valueNode);\n return valueNode;\n }\n var visitor = {\n onObjectBegin: function (offset) {\n currentParent = onValue({ type: 'object', offset: offset, length: -1, parent: currentParent, children: [] });\n },\n onObjectProperty: function (name, offset, length) {\n currentParent = onValue({ type: 'property', offset: offset, length: -1, parent: currentParent, children: [] });\n currentParent.children.push({ type: 'string', value: name, offset: offset, length: length, parent: currentParent });\n },\n onObjectEnd: function (offset, length) {\n ensurePropertyComplete(offset + length); // in case of a missing value for a property: make sure property is complete\n currentParent.length = offset + length - currentParent.offset;\n currentParent = currentParent.parent;\n ensurePropertyComplete(offset + length);\n },\n onArrayBegin: function (offset, length) {\n currentParent = onValue({ type: 'array', offset: offset, length: -1, parent: currentParent, children: [] });\n },\n onArrayEnd: function (offset, length) {\n currentParent.length = offset + length - currentParent.offset;\n currentParent = currentParent.parent;\n ensurePropertyComplete(offset + length);\n },\n onLiteralValue: function (value, offset, length) {\n onValue({ type: getNodeType(value), offset: offset, length: length, parent: currentParent, value: value });\n ensurePropertyComplete(offset + length);\n },\n onSeparator: function (sep, offset, length) {\n if (currentParent.type === 'property') {\n if (sep === ':') {\n currentParent.colonOffset = offset;\n }\n else if (sep === ',') {\n ensurePropertyComplete(offset);\n }\n }\n },\n onError: function (error, offset, length) {\n errors.push({ error: error, offset: offset, length: length });\n }\n };\n visit(text, visitor, options);\n var result = currentParent.children[0];\n if (result) {\n delete result.parent;\n }\n return result;\n}\n/**\n * Finds the node at the given path in a JSON DOM.\n */\nexport function findNodeAtLocation(root, path) {\n if (!root) {\n return undefined;\n }\n var node = root;\n for (var _i = 0, path_1 = path; _i < path_1.length; _i++) {\n var segment = path_1[_i];\n if (typeof segment === 'string') {\n if (node.type !== 'object' || !Array.isArray(node.children)) {\n return undefined;\n }\n var found = false;\n for (var _a = 0, _b = node.children; _a < _b.length; _a++) {\n var propertyNode = _b[_a];\n if (Array.isArray(propertyNode.children) && propertyNode.children[0].value === segment) {\n node = propertyNode.children[1];\n found = true;\n break;\n }\n }\n if (!found) {\n return undefined;\n }\n }\n else {\n var index = segment;\n if (node.type !== 'array' || index < 0 || !Array.isArray(node.children) || index >= node.children.length) {\n return undefined;\n }\n node = node.children[index];\n }\n }\n return node;\n}\n/**\n * Gets the JSON path of the given JSON DOM node\n */\nexport function getNodePath(node) {\n if (!node.parent || !node.parent.children) {\n return [];\n }\n var path = getNodePath(node.parent);\n if (node.parent.type === 'property') {\n var key = node.parent.children[0].value;\n path.push(key);\n }\n else if (node.parent.type === 'array') {\n var index = node.parent.children.indexOf(node);\n if (index !== -1) {\n path.push(index);\n }\n }\n return path;\n}\n/**\n * Evaluates the JavaScript object of the given JSON DOM node\n */\nexport function getNodeValue(node) {\n switch (node.type) {\n case 'array':\n return node.children.map(getNodeValue);\n case 'object':\n var obj = Object.create(null);\n for (var _i = 0, _a = node.children; _i < _a.length; _i++) {\n var prop = _a[_i];\n var valueNode = prop.children[1];\n if (valueNode) {\n obj[prop.children[0].value] = getNodeValue(valueNode);\n }\n }\n return obj;\n case 'null':\n case 'string':\n case 'number':\n case 'boolean':\n return node.value;\n default:\n return undefined;\n }\n}\nexport function contains(node, offset, includeRightBound) {\n if (includeRightBound === void 0) { includeRightBound = false; }\n return (offset >= node.offset && offset < (node.offset + node.length)) || includeRightBound && (offset === (node.offset + node.length));\n}\n/**\n * Finds the most inner node at the given offset. If includeRightBound is set, also finds nodes that end at the given offset.\n */\nexport function findNodeAtOffset(node, offset, includeRightBound) {\n if (includeRightBound === void 0) { includeRightBound = false; }\n if (contains(node, offset, includeRightBound)) {\n var children = node.children;\n if (Array.isArray(children)) {\n for (var i = 0; i < children.length && children[i].offset <= offset; i++) {\n var item = findNodeAtOffset(children[i], offset, includeRightBound);\n if (item) {\n return item;\n }\n }\n }\n return node;\n }\n return undefined;\n}\n/**\n * Parses the given text and invokes the visitor functions for each object, array and literal reached.\n */\nexport function visit(text, visitor, options) {\n if (options === void 0) { options = ParseOptions.DEFAULT; }\n var _scanner = createScanner(text, false);\n function toNoArgVisit(visitFunction) {\n return visitFunction ? function () { return visitFunction(_scanner.getTokenOffset(), _scanner.getTokenLength(), _scanner.getTokenStartLine(), _scanner.getTokenStartCharacter()); } : function () { return true; };\n }\n function toOneArgVisit(visitFunction) {\n return visitFunction ? function (arg) { return visitFunction(arg, _scanner.getTokenOffset(), _scanner.getTokenLength(), _scanner.getTokenStartLine(), _scanner.getTokenStartCharacter()); } : function () { return true; };\n }\n var onObjectBegin = toNoArgVisit(visitor.onObjectBegin), onObjectProperty = toOneArgVisit(visitor.onObjectProperty), onObjectEnd = toNoArgVisit(visitor.onObjectEnd), onArrayBegin = toNoArgVisit(visitor.onArrayBegin), onArrayEnd = toNoArgVisit(visitor.onArrayEnd), onLiteralValue = toOneArgVisit(visitor.onLiteralValue), onSeparator = toOneArgVisit(visitor.onSeparator), onComment = toNoArgVisit(visitor.onComment), onError = toOneArgVisit(visitor.onError);\n var disallowComments = options && options.disallowComments;\n var allowTrailingComma = options && options.allowTrailingComma;\n function scanNext() {\n while (true) {\n var token = _scanner.scan();\n switch (_scanner.getTokenError()) {\n case 4 /* InvalidUnicode */:\n handleError(14 /* InvalidUnicode */);\n break;\n case 5 /* InvalidEscapeCharacter */:\n handleError(15 /* InvalidEscapeCharacter */);\n break;\n case 3 /* UnexpectedEndOfNumber */:\n handleError(13 /* UnexpectedEndOfNumber */);\n break;\n case 1 /* UnexpectedEndOfComment */:\n if (!disallowComments) {\n handleError(11 /* UnexpectedEndOfComment */);\n }\n break;\n case 2 /* UnexpectedEndOfString */:\n handleError(12 /* UnexpectedEndOfString */);\n break;\n case 6 /* InvalidCharacter */:\n handleError(16 /* InvalidCharacter */);\n break;\n }\n switch (token) {\n case 12 /* LineCommentTrivia */:\n case 13 /* BlockCommentTrivia */:\n if (disallowComments) {\n handleError(10 /* InvalidCommentToken */);\n }\n else {\n onComment();\n }\n break;\n case 16 /* Unknown */:\n handleError(1 /* InvalidSymbol */);\n break;\n case 15 /* Trivia */:\n case 14 /* LineBreakTrivia */:\n break;\n default:\n return token;\n }\n }\n }\n function handleError(error, skipUntilAfter, skipUntil) {\n if (skipUntilAfter === void 0) { skipUntilAfter = []; }\n if (skipUntil === void 0) { skipUntil = []; }\n onError(error);\n if (skipUntilAfter.length + skipUntil.length > 0) {\n var token = _scanner.getToken();\n while (token !== 17 /* EOF */) {\n if (skipUntilAfter.indexOf(token) !== -1) {\n scanNext();\n break;\n }\n else if (skipUntil.indexOf(token) !== -1) {\n break;\n }\n token = scanNext();\n }\n }\n }\n function parseString(isValue) {\n var value = _scanner.getTokenValue();\n if (isValue) {\n onLiteralValue(value);\n }\n else {\n onObjectProperty(value);\n }\n scanNext();\n return true;\n }\n function parseLiteral() {\n switch (_scanner.getToken()) {\n case 11 /* NumericLiteral */:\n var tokenValue = _scanner.getTokenValue();\n var value = Number(tokenValue);\n if (isNaN(value)) {\n handleError(2 /* InvalidNumberFormat */);\n value = 0;\n }\n onLiteralValue(value);\n break;\n case 7 /* NullKeyword */:\n onLiteralValue(null);\n break;\n case 8 /* TrueKeyword */:\n onLiteralValue(true);\n break;\n case 9 /* FalseKeyword */:\n onLiteralValue(false);\n break;\n default:\n return false;\n }\n scanNext();\n return true;\n }\n function parseProperty() {\n if (_scanner.getToken() !== 10 /* StringLiteral */) {\n handleError(3 /* PropertyNameExpected */, [], [2 /* CloseBraceToken */, 5 /* CommaToken */]);\n return false;\n }\n parseString(false);\n if (_scanner.getToken() === 6 /* ColonToken */) {\n onSeparator(':');\n scanNext(); // consume colon\n if (!parseValue()) {\n handleError(4 /* ValueExpected */, [], [2 /* CloseBraceToken */, 5 /* CommaToken */]);\n }\n }\n else {\n handleError(5 /* ColonExpected */, [], [2 /* CloseBraceToken */, 5 /* CommaToken */]);\n }\n return true;\n }\n function parseObject() {\n onObjectBegin();\n scanNext(); // consume open brace\n var needsComma = false;\n while (_scanner.getToken() !== 2 /* CloseBraceToken */ && _scanner.getToken() !== 17 /* EOF */) {\n if (_scanner.getToken() === 5 /* CommaToken */) {\n if (!needsComma) {\n handleError(4 /* ValueExpected */, [], []);\n }\n onSeparator(',');\n scanNext(); // consume comma\n if (_scanner.getToken() === 2 /* CloseBraceToken */ && allowTrailingComma) {\n break;\n }\n }\n else if (needsComma) {\n handleError(6 /* CommaExpected */, [], []);\n }\n if (!parseProperty()) {\n handleError(4 /* ValueExpected */, [], [2 /* CloseBraceToken */, 5 /* CommaToken */]);\n }\n needsComma = true;\n }\n onObjectEnd();\n if (_scanner.getToken() !== 2 /* CloseBraceToken */) {\n handleError(7 /* CloseBraceExpected */, [2 /* CloseBraceToken */], []);\n }\n else {\n scanNext(); // consume close brace\n }\n return true;\n }\n function parseArray() {\n onArrayBegin();\n scanNext(); // consume open bracket\n var needsComma = false;\n while (_scanner.getToken() !== 4 /* CloseBracketToken */ && _scanner.getToken() !== 17 /* EOF */) {\n if (_scanner.getToken() === 5 /* CommaToken */) {\n if (!needsComma) {\n handleError(4 /* ValueExpected */, [], []);\n }\n onSeparator(',');\n scanNext(); // consume comma\n if (_scanner.getToken() === 4 /* CloseBracketToken */ && allowTrailingComma) {\n break;\n }\n }\n else if (needsComma) {\n handleError(6 /* CommaExpected */, [], []);\n }\n if (!parseValue()) {\n handleError(4 /* ValueExpected */, [], [4 /* CloseBracketToken */, 5 /* CommaToken */]);\n }\n needsComma = true;\n }\n onArrayEnd();\n if (_scanner.getToken() !== 4 /* CloseBracketToken */) {\n handleError(8 /* CloseBracketExpected */, [4 /* CloseBracketToken */], []);\n }\n else {\n scanNext(); // consume close bracket\n }\n return true;\n }\n function parseValue() {\n switch (_scanner.getToken()) {\n case 3 /* OpenBracketToken */:\n return parseArray();\n case 1 /* OpenBraceToken */:\n return parseObject();\n case 10 /* StringLiteral */:\n return parseString(true);\n default:\n return parseLiteral();\n }\n }\n scanNext();\n if (_scanner.getToken() === 17 /* EOF */) {\n if (options.allowEmptyContent) {\n return true;\n }\n handleError(4 /* ValueExpected */, [], []);\n return false;\n }\n if (!parseValue()) {\n handleError(4 /* ValueExpected */, [], []);\n return false;\n }\n if (_scanner.getToken() !== 17 /* EOF */) {\n handleError(9 /* EndOfFileExpected */, [], []);\n }\n return true;\n}\n/**\n * Takes JSON with JavaScript-style comments and remove\n * them. Optionally replaces every none-newline character\n * of comments with a replaceCharacter\n */\nexport function stripComments(text, replaceCh) {\n var _scanner = createScanner(text), parts = [], kind, offset = 0, pos;\n do {\n pos = _scanner.getPosition();\n kind = _scanner.scan();\n switch (kind) {\n case 12 /* LineCommentTrivia */:\n case 13 /* BlockCommentTrivia */:\n case 17 /* EOF */:\n if (offset !== pos) {\n parts.push(text.substring(offset, pos));\n }\n if (replaceCh !== undefined) {\n parts.push(_scanner.getTokenValue().replace(/[^\\r\\n]/g, replaceCh));\n }\n offset = _scanner.getPosition();\n break;\n }\n } while (kind !== 17 /* EOF */);\n return parts.join('');\n}\nexport function getNodeType(value) {\n switch (typeof value) {\n case 'boolean': return 'boolean';\n case 'number': return 'number';\n case 'string': return 'string';\n case 'object': {\n if (!value) {\n return 'null';\n }\n else if (Array.isArray(value)) {\n return 'array';\n }\n return 'object';\n }\n default: return 'null';\n }\n}\n","/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nimport { editor } from './fillers/monaco-editor-core.js';\r\nvar STOP_WHEN_IDLE_FOR = 2 * 60 * 1000; // 2min\r\nvar WorkerManager = /** @class */ (function () {\r\n function WorkerManager(defaults) {\r\n var _this = this;\r\n this._defaults = defaults;\r\n this._worker = null;\r\n this._idleCheckInterval = setInterval(function () { return _this._checkIfIdle(); }, 30 * 1000);\r\n this._lastUsedTime = 0;\r\n this._configChangeListener = this._defaults.onDidChange(function () { return _this._stopWorker(); });\r\n }\r\n WorkerManager.prototype._stopWorker = function () {\r\n if (this._worker) {\r\n this._worker.dispose();\r\n this._worker = null;\r\n }\r\n this._client = null;\r\n };\r\n WorkerManager.prototype.dispose = function () {\r\n clearInterval(this._idleCheckInterval);\r\n this._configChangeListener.dispose();\r\n this._stopWorker();\r\n };\r\n WorkerManager.prototype._checkIfIdle = function () {\r\n if (!this._worker) {\r\n return;\r\n }\r\n var timePassedSinceLastUsed = Date.now() - this._lastUsedTime;\r\n if (timePassedSinceLastUsed > STOP_WHEN_IDLE_FOR) {\r\n this._stopWorker();\r\n }\r\n };\r\n WorkerManager.prototype._getClient = function () {\r\n this._lastUsedTime = Date.now();\r\n if (!this._client) {\r\n this._worker = editor.createWebWorker({\r\n // module that exports the create() method and returns a `JSONWorker` instance\r\n moduleId: 'vs/language/json/jsonWorker',\r\n label: this._defaults.languageId,\r\n // passed in to the create() method\r\n createData: {\r\n languageSettings: this._defaults.diagnosticsOptions,\r\n languageId: this._defaults.languageId,\r\n enableSchemaRequest: this._defaults.diagnosticsOptions.enableSchemaRequest\r\n }\r\n });\r\n this._client = this._worker.getProxy();\r\n }\r\n return this._client;\r\n };\r\n WorkerManager.prototype.getLanguageServiceWorker = function () {\r\n var _this = this;\r\n var resources = [];\r\n for (var _i = 0; _i < arguments.length; _i++) {\r\n resources[_i] = arguments[_i];\r\n }\r\n var _client;\r\n return this._getClient()\r\n .then(function (client) {\r\n _client = client;\r\n })\r\n .then(function (_) {\r\n return _this._worker.withSyncedResources(resources);\r\n })\r\n .then(function (_) { return _client; });\r\n };\r\n return WorkerManager;\r\n}());\r\nexport { WorkerManager };\r\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n'use strict';\n/**\n * Creates a JSON scanner on the given text.\n * If ignoreTrivia is set, whitespaces or comments are ignored.\n */\nexport function createScanner(text, ignoreTrivia) {\n if (ignoreTrivia === void 0) { ignoreTrivia = false; }\n var len = text.length;\n var pos = 0, value = '', tokenOffset = 0, token = 16 /* Unknown */, lineNumber = 0, lineStartOffset = 0, tokenLineStartOffset = 0, prevTokenLineStartOffset = 0, scanError = 0 /* None */;\n function scanHexDigits(count, exact) {\n var digits = 0;\n var value = 0;\n while (digits < count || !exact) {\n var ch = text.charCodeAt(pos);\n if (ch >= 48 /* _0 */ && ch <= 57 /* _9 */) {\n value = value * 16 + ch - 48 /* _0 */;\n }\n else if (ch >= 65 /* A */ && ch <= 70 /* F */) {\n value = value * 16 + ch - 65 /* A */ + 10;\n }\n else if (ch >= 97 /* a */ && ch <= 102 /* f */) {\n value = value * 16 + ch - 97 /* a */ + 10;\n }\n else {\n break;\n }\n pos++;\n digits++;\n }\n if (digits < count) {\n value = -1;\n }\n return value;\n }\n function setPosition(newPosition) {\n pos = newPosition;\n value = '';\n tokenOffset = 0;\n token = 16 /* Unknown */;\n scanError = 0 /* None */;\n }\n function scanNumber() {\n var start = pos;\n if (text.charCodeAt(pos) === 48 /* _0 */) {\n pos++;\n }\n else {\n pos++;\n while (pos < text.length && isDigit(text.charCodeAt(pos))) {\n pos++;\n }\n }\n if (pos < text.length && text.charCodeAt(pos) === 46 /* dot */) {\n pos++;\n if (pos < text.length && isDigit(text.charCodeAt(pos))) {\n pos++;\n while (pos < text.length && isDigit(text.charCodeAt(pos))) {\n pos++;\n }\n }\n else {\n scanError = 3 /* UnexpectedEndOfNumber */;\n return text.substring(start, pos);\n }\n }\n var end = pos;\n if (pos < text.length && (text.charCodeAt(pos) === 69 /* E */ || text.charCodeAt(pos) === 101 /* e */)) {\n pos++;\n if (pos < text.length && text.charCodeAt(pos) === 43 /* plus */ || text.charCodeAt(pos) === 45 /* minus */) {\n pos++;\n }\n if (pos < text.length && isDigit(text.charCodeAt(pos))) {\n pos++;\n while (pos < text.length && isDigit(text.charCodeAt(pos))) {\n pos++;\n }\n end = pos;\n }\n else {\n scanError = 3 /* UnexpectedEndOfNumber */;\n }\n }\n return text.substring(start, end);\n }\n function scanString() {\n var result = '', start = pos;\n while (true) {\n if (pos >= len) {\n result += text.substring(start, pos);\n scanError = 2 /* UnexpectedEndOfString */;\n break;\n }\n var ch = text.charCodeAt(pos);\n if (ch === 34 /* doubleQuote */) {\n result += text.substring(start, pos);\n pos++;\n break;\n }\n if (ch === 92 /* backslash */) {\n result += text.substring(start, pos);\n pos++;\n if (pos >= len) {\n scanError = 2 /* UnexpectedEndOfString */;\n break;\n }\n var ch2 = text.charCodeAt(pos++);\n switch (ch2) {\n case 34 /* doubleQuote */:\n result += '\\\"';\n break;\n case 92 /* backslash */:\n result += '\\\\';\n break;\n case 47 /* slash */:\n result += '/';\n break;\n case 98 /* b */:\n result += '\\b';\n break;\n case 102 /* f */:\n result += '\\f';\n break;\n case 110 /* n */:\n result += '\\n';\n break;\n case 114 /* r */:\n result += '\\r';\n break;\n case 116 /* t */:\n result += '\\t';\n break;\n case 117 /* u */:\n var ch3 = scanHexDigits(4, true);\n if (ch3 >= 0) {\n result += String.fromCharCode(ch3);\n }\n else {\n scanError = 4 /* InvalidUnicode */;\n }\n break;\n default:\n scanError = 5 /* InvalidEscapeCharacter */;\n }\n start = pos;\n continue;\n }\n if (ch >= 0 && ch <= 0x1f) {\n if (isLineBreak(ch)) {\n result += text.substring(start, pos);\n scanError = 2 /* UnexpectedEndOfString */;\n break;\n }\n else {\n scanError = 6 /* InvalidCharacter */;\n // mark as error but continue with string\n }\n }\n pos++;\n }\n return result;\n }\n function scanNext() {\n value = '';\n scanError = 0 /* None */;\n tokenOffset = pos;\n lineStartOffset = lineNumber;\n prevTokenLineStartOffset = tokenLineStartOffset;\n if (pos >= len) {\n // at the end\n tokenOffset = len;\n return token = 17 /* EOF */;\n }\n var code = text.charCodeAt(pos);\n // trivia: whitespace\n if (isWhiteSpace(code)) {\n do {\n pos++;\n value += String.fromCharCode(code);\n code = text.charCodeAt(pos);\n } while (isWhiteSpace(code));\n return token = 15 /* Trivia */;\n }\n // trivia: newlines\n if (isLineBreak(code)) {\n pos++;\n value += String.fromCharCode(code);\n if (code === 13 /* carriageReturn */ && text.charCodeAt(pos) === 10 /* lineFeed */) {\n pos++;\n value += '\\n';\n }\n lineNumber++;\n tokenLineStartOffset = pos;\n return token = 14 /* LineBreakTrivia */;\n }\n switch (code) {\n // tokens: []{}:,\n case 123 /* openBrace */:\n pos++;\n return token = 1 /* OpenBraceToken */;\n case 125 /* closeBrace */:\n pos++;\n return token = 2 /* CloseBraceToken */;\n case 91 /* openBracket */:\n pos++;\n return token = 3 /* OpenBracketToken */;\n case 93 /* closeBracket */:\n pos++;\n return token = 4 /* CloseBracketToken */;\n case 58 /* colon */:\n pos++;\n return token = 6 /* ColonToken */;\n case 44 /* comma */:\n pos++;\n return token = 5 /* CommaToken */;\n // strings\n case 34 /* doubleQuote */:\n pos++;\n value = scanString();\n return token = 10 /* StringLiteral */;\n // comments\n case 47 /* slash */:\n var start = pos - 1;\n // Single-line comment\n if (text.charCodeAt(pos + 1) === 47 /* slash */) {\n pos += 2;\n while (pos < len) {\n if (isLineBreak(text.charCodeAt(pos))) {\n break;\n }\n pos++;\n }\n value = text.substring(start, pos);\n return token = 12 /* LineCommentTrivia */;\n }\n // Multi-line comment\n if (text.charCodeAt(pos + 1) === 42 /* asterisk */) {\n pos += 2;\n var safeLength = len - 1; // For lookahead.\n var commentClosed = false;\n while (pos < safeLength) {\n var ch = text.charCodeAt(pos);\n if (ch === 42 /* asterisk */ && text.charCodeAt(pos + 1) === 47 /* slash */) {\n pos += 2;\n commentClosed = true;\n break;\n }\n pos++;\n if (isLineBreak(ch)) {\n if (ch === 13 /* carriageReturn */ && text.charCodeAt(pos) === 10 /* lineFeed */) {\n pos++;\n }\n lineNumber++;\n tokenLineStartOffset = pos;\n }\n }\n if (!commentClosed) {\n pos++;\n scanError = 1 /* UnexpectedEndOfComment */;\n }\n value = text.substring(start, pos);\n return token = 13 /* BlockCommentTrivia */;\n }\n // just a single slash\n value += String.fromCharCode(code);\n pos++;\n return token = 16 /* Unknown */;\n // numbers\n case 45 /* minus */:\n value += String.fromCharCode(code);\n pos++;\n if (pos === len || !isDigit(text.charCodeAt(pos))) {\n return token = 16 /* Unknown */;\n }\n // found a minus, followed by a number so\n // we fall through to proceed with scanning\n // numbers\n case 48 /* _0 */:\n case 49 /* _1 */:\n case 50 /* _2 */:\n case 51 /* _3 */:\n case 52 /* _4 */:\n case 53 /* _5 */:\n case 54 /* _6 */:\n case 55 /* _7 */:\n case 56 /* _8 */:\n case 57 /* _9 */:\n value += scanNumber();\n return token = 11 /* NumericLiteral */;\n // literals and unknown symbols\n default:\n // is a literal? Read the full word.\n while (pos < len && isUnknownContentCharacter(code)) {\n pos++;\n code = text.charCodeAt(pos);\n }\n if (tokenOffset !== pos) {\n value = text.substring(tokenOffset, pos);\n // keywords: true, false, null\n switch (value) {\n case 'true': return token = 8 /* TrueKeyword */;\n case 'false': return token = 9 /* FalseKeyword */;\n case 'null': return token = 7 /* NullKeyword */;\n }\n return token = 16 /* Unknown */;\n }\n // some\n value += String.fromCharCode(code);\n pos++;\n return token = 16 /* Unknown */;\n }\n }\n function isUnknownContentCharacter(code) {\n if (isWhiteSpace(code) || isLineBreak(code)) {\n return false;\n }\n switch (code) {\n case 125 /* closeBrace */:\n case 93 /* closeBracket */:\n case 123 /* openBrace */:\n case 91 /* openBracket */:\n case 34 /* doubleQuote */:\n case 58 /* colon */:\n case 44 /* comma */:\n case 47 /* slash */:\n return false;\n }\n return true;\n }\n function scanNextNonTrivia() {\n var result;\n do {\n result = scanNext();\n } while (result >= 12 /* LineCommentTrivia */ && result <= 15 /* Trivia */);\n return result;\n }\n return {\n setPosition: setPosition,\n getPosition: function () { return pos; },\n scan: ignoreTrivia ? scanNextNonTrivia : scanNext,\n getToken: function () { return token; },\n getTokenValue: function () { return value; },\n getTokenOffset: function () { return tokenOffset; },\n getTokenLength: function () { return pos - tokenOffset; },\n getTokenStartLine: function () { return lineStartOffset; },\n getTokenStartCharacter: function () { return tokenOffset - prevTokenLineStartOffset; },\n getTokenError: function () { return scanError; },\n };\n}\nfunction isWhiteSpace(ch) {\n return ch === 32 /* space */ || ch === 9 /* tab */ || ch === 11 /* verticalTab */ || ch === 12 /* formFeed */ ||\n ch === 160 /* nonBreakingSpace */ || ch === 5760 /* ogham */ || ch >= 8192 /* enQuad */ && ch <= 8203 /* zeroWidthSpace */ ||\n ch === 8239 /* narrowNoBreakSpace */ || ch === 8287 /* mathematicalSpace */ || ch === 12288 /* ideographicSpace */ || ch === 65279 /* byteOrderMark */;\n}\nfunction isLineBreak(ch) {\n return ch === 10 /* lineFeed */ || ch === 13 /* carriageReturn */ || ch === 8232 /* lineSeparator */ || ch === 8233 /* paragraphSeparator */;\n}\nfunction isDigit(ch) {\n return ch >= 48 /* _0 */ && ch <= 57 /* _9 */;\n}\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n'use strict';\nimport * as formatter from './impl/format.js';\nimport * as edit from './impl/edit.js';\nimport * as scanner from './impl/scanner.js';\nimport * as parser from './impl/parser.js';\n/**\n * Creates a JSON scanner on the given text.\n * If ignoreTrivia is set, whitespaces or comments are ignored.\n */\nexport var createScanner = scanner.createScanner;\n/**\n * For a given offset, evaluate the location in the JSON document. Each segment in the location path is either a property name or an array index.\n */\nexport var getLocation = parser.getLocation;\n/**\n * Parses the given text and returns the object the JSON content represents. On invalid input, the parser tries to be as fault tolerant as possible, but still return a result.\n * Therefore, always check the errors list to find out if the input was valid.\n */\nexport var parse = parser.parse;\n/**\n * Parses the given text and returns a tree representation the JSON content. On invalid input, the parser tries to be as fault tolerant as possible, but still return a result.\n */\nexport var parseTree = parser.parseTree;\n/**\n * Finds the node at the given path in a JSON DOM.\n */\nexport var findNodeAtLocation = parser.findNodeAtLocation;\n/**\n * Finds the innermost node at the given offset. If includeRightBound is set, also finds nodes that end at the given offset.\n */\nexport var findNodeAtOffset = parser.findNodeAtOffset;\n/**\n * Gets the JSON path of the given JSON DOM node\n */\nexport var getNodePath = parser.getNodePath;\n/**\n * Evaluates the JavaScript object of the given JSON DOM node\n */\nexport var getNodeValue = parser.getNodeValue;\n/**\n * Parses the given text and invokes the visitor functions for each object, array and literal reached.\n */\nexport var visit = parser.visit;\n/**\n * Takes JSON with JavaScript-style comments and remove\n * them. Optionally replaces every none-newline character\n * of comments with a replaceCharacter\n */\nexport var stripComments = parser.stripComments;\nexport function printParseErrorCode(code) {\n switch (code) {\n case 1 /* InvalidSymbol */: return 'InvalidSymbol';\n case 2 /* InvalidNumberFormat */: return 'InvalidNumberFormat';\n case 3 /* PropertyNameExpected */: return 'PropertyNameExpected';\n case 4 /* ValueExpected */: return 'ValueExpected';\n case 5 /* ColonExpected */: return 'ColonExpected';\n case 6 /* CommaExpected */: return 'CommaExpected';\n case 7 /* CloseBraceExpected */: return 'CloseBraceExpected';\n case 8 /* CloseBracketExpected */: return 'CloseBracketExpected';\n case 9 /* EndOfFileExpected */: return 'EndOfFileExpected';\n case 10 /* InvalidCommentToken */: return 'InvalidCommentToken';\n case 11 /* UnexpectedEndOfComment */: return 'UnexpectedEndOfComment';\n case 12 /* UnexpectedEndOfString */: return 'UnexpectedEndOfString';\n case 13 /* UnexpectedEndOfNumber */: return 'UnexpectedEndOfNumber';\n case 14 /* InvalidUnicode */: return 'InvalidUnicode';\n case 15 /* InvalidEscapeCharacter */: return 'InvalidEscapeCharacter';\n case 16 /* InvalidCharacter */: return 'InvalidCharacter';\n }\n return '';\n}\n/**\n * Computes the edits needed to format a JSON document.\n *\n * @param documentText The input text\n * @param range The range to format or `undefined` to format the full content\n * @param options The formatting options\n * @returns A list of edit operations describing the formatting changes to the original document. Edits can be either inserts, replacements or\n * removals of text segments. All offsets refer to the original state of the document. No two edits must change or remove the same range of\n * text in the original document. However, multiple edits can have\n * the same offset, for example multiple inserts, or an insert followed by a remove or replace. The order in the array defines which edit is applied first.\n * To apply edits to an input, you can use `applyEdits`.\n */\nexport function format(documentText, range, options) {\n return formatter.format(documentText, range, options);\n}\n/**\n * Computes the edits needed to modify a value in the JSON document.\n *\n * @param documentText The input text\n * @param path The path of the value to change. The path represents either to the document root, a property or an array item.\n * If the path points to an non-existing property or item, it will be created.\n * @param value The new value for the specified property or item. If the value is undefined,\n * the property or item will be removed.\n * @param options Options\n * @returns A list of edit operations describing the formatting changes to the original document. Edits can be either inserts, replacements or\n * removals of text segments. All offsets refer to the original state of the document. No two edits must change or remove the same range of\n * text in the original document. However, multiple edits can have\n * the same offset, for example multiple inserts, or an insert followed by a remove or replace. The order in the array defines which edit is applied first.\n * To apply edits to an input, you can use `applyEdits`.\n */\nexport function modify(text, path, value, options) {\n return edit.setProperty(text, path, value, options);\n}\n/**\n * Applies edits to a input string.\n */\nexport function applyEdits(text, edits) {\n for (var i = edits.length - 1; i >= 0; i--) {\n text = edit.applyEdit(text, edits[i]);\n }\n return text;\n}\n","/* --------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n * ------------------------------------------------------------------------------------------ */\n'use strict';\nexport var integer;\n(function (integer) {\n integer.MIN_VALUE = -2147483648;\n integer.MAX_VALUE = 2147483647;\n})(integer || (integer = {}));\nexport var uinteger;\n(function (uinteger) {\n uinteger.MIN_VALUE = 0;\n uinteger.MAX_VALUE = 2147483647;\n})(uinteger || (uinteger = {}));\n/**\n * The Position namespace provides helper functions to work with\n * [Position](#Position) literals.\n */\nexport var Position;\n(function (Position) {\n /**\n * Creates a new Position literal from the given line and character.\n * @param line The position's line.\n * @param character The position's character.\n */\n function create(line, character) {\n if (line === Number.MAX_VALUE) {\n line = uinteger.MAX_VALUE;\n }\n if (character === Number.MAX_VALUE) {\n character = uinteger.MAX_VALUE;\n }\n return { line: line, character: character };\n }\n Position.create = create;\n /**\n * Checks whether the given literal conforms to the [Position](#Position) interface.\n */\n function is(value) {\n var candidate = value;\n return Is.objectLiteral(candidate) && Is.uinteger(candidate.line) && Is.uinteger(candidate.character);\n }\n Position.is = is;\n})(Position || (Position = {}));\n/**\n * The Range namespace provides helper functions to work with\n * [Range](#Range) literals.\n */\nexport var Range;\n(function (Range) {\n function create(one, two, three, four) {\n if (Is.uinteger(one) && Is.uinteger(two) && Is.uinteger(three) && Is.uinteger(four)) {\n return { start: Position.create(one, two), end: Position.create(three, four) };\n }\n else if (Position.is(one) && Position.is(two)) {\n return { start: one, end: two };\n }\n else {\n throw new Error(\"Range#create called with invalid arguments[\" + one + \", \" + two + \", \" + three + \", \" + four + \"]\");\n }\n }\n Range.create = create;\n /**\n * Checks whether the given literal conforms to the [Range](#Range) interface.\n */\n function is(value) {\n var candidate = value;\n return Is.objectLiteral(candidate) && Position.is(candidate.start) && Position.is(candidate.end);\n }\n Range.is = is;\n})(Range || (Range = {}));\n/**\n * The Location namespace provides helper functions to work with\n * [Location](#Location) literals.\n */\nexport var Location;\n(function (Location) {\n /**\n * Creates a Location literal.\n * @param uri The location's uri.\n * @param range The location's range.\n */\n function create(uri, range) {\n return { uri: uri, range: range };\n }\n Location.create = create;\n /**\n * Checks whether the given literal conforms to the [Location](#Location) interface.\n */\n function is(value) {\n var candidate = value;\n return Is.defined(candidate) && Range.is(candidate.range) && (Is.string(candidate.uri) || Is.undefined(candidate.uri));\n }\n Location.is = is;\n})(Location || (Location = {}));\n/**\n * The LocationLink namespace provides helper functions to work with\n * [LocationLink](#LocationLink) literals.\n */\nexport var LocationLink;\n(function (LocationLink) {\n /**\n * Creates a LocationLink literal.\n * @param targetUri The definition's uri.\n * @param targetRange The full range of the definition.\n * @param targetSelectionRange The span of the symbol definition at the target.\n * @param originSelectionRange The span of the symbol being defined in the originating source file.\n */\n function create(targetUri, targetRange, targetSelectionRange, originSelectionRange) {\n return { targetUri: targetUri, targetRange: targetRange, targetSelectionRange: targetSelectionRange, originSelectionRange: originSelectionRange };\n }\n LocationLink.create = create;\n /**\n * Checks whether the given literal conforms to the [LocationLink](#LocationLink) interface.\n */\n function is(value) {\n var candidate = value;\n return Is.defined(candidate) && Range.is(candidate.targetRange) && Is.string(candidate.targetUri)\n && (Range.is(candidate.targetSelectionRange) || Is.undefined(candidate.targetSelectionRange))\n && (Range.is(candidate.originSelectionRange) || Is.undefined(candidate.originSelectionRange));\n }\n LocationLink.is = is;\n})(LocationLink || (LocationLink = {}));\n/**\n * The Color namespace provides helper functions to work with\n * [Color](#Color) literals.\n */\nexport var Color;\n(function (Color) {\n /**\n * Creates a new Color literal.\n */\n function create(red, green, blue, alpha) {\n return {\n red: red,\n green: green,\n blue: blue,\n alpha: alpha,\n };\n }\n Color.create = create;\n /**\n * Checks whether the given literal conforms to the [Color](#Color) interface.\n */\n function is(value) {\n var candidate = value;\n return Is.numberRange(candidate.red, 0, 1)\n && Is.numberRange(candidate.green, 0, 1)\n && Is.numberRange(candidate.blue, 0, 1)\n && Is.numberRange(candidate.alpha, 0, 1);\n }\n Color.is = is;\n})(Color || (Color = {}));\n/**\n * The ColorInformation namespace provides helper functions to work with\n * [ColorInformation](#ColorInformation) literals.\n */\nexport var ColorInformation;\n(function (ColorInformation) {\n /**\n * Creates a new ColorInformation literal.\n */\n function create(range, color) {\n return {\n range: range,\n color: color,\n };\n }\n ColorInformation.create = create;\n /**\n * Checks whether the given literal conforms to the [ColorInformation](#ColorInformation) interface.\n */\n function is(value) {\n var candidate = value;\n return Range.is(candidate.range) && Color.is(candidate.color);\n }\n ColorInformation.is = is;\n})(ColorInformation || (ColorInformation = {}));\n/**\n * The Color namespace provides helper functions to work with\n * [ColorPresentation](#ColorPresentation) literals.\n */\nexport var ColorPresentation;\n(function (ColorPresentation) {\n /**\n * Creates a new ColorInformation literal.\n */\n function create(label, textEdit, additionalTextEdits) {\n return {\n label: label,\n textEdit: textEdit,\n additionalTextEdits: additionalTextEdits,\n };\n }\n ColorPresentation.create = create;\n /**\n * Checks whether the given literal conforms to the [ColorInformation](#ColorInformation) interface.\n */\n function is(value) {\n var candidate = value;\n return Is.string(candidate.label)\n && (Is.undefined(candidate.textEdit) || TextEdit.is(candidate))\n && (Is.undefined(candidate.additionalTextEdits) || Is.typedArray(candidate.additionalTextEdits, TextEdit.is));\n }\n ColorPresentation.is = is;\n})(ColorPresentation || (ColorPresentation = {}));\n/**\n * Enum of known range kinds\n */\nexport var FoldingRangeKind;\n(function (FoldingRangeKind) {\n /**\n * Folding range for a comment\n */\n FoldingRangeKind[\"Comment\"] = \"comment\";\n /**\n * Folding range for a imports or includes\n */\n FoldingRangeKind[\"Imports\"] = \"imports\";\n /**\n * Folding range for a region (e.g. `#region`)\n */\n FoldingRangeKind[\"Region\"] = \"region\";\n})(FoldingRangeKind || (FoldingRangeKind = {}));\n/**\n * The folding range namespace provides helper functions to work with\n * [FoldingRange](#FoldingRange) literals.\n */\nexport var FoldingRange;\n(function (FoldingRange) {\n /**\n * Creates a new FoldingRange literal.\n */\n function create(startLine, endLine, startCharacter, endCharacter, kind) {\n var result = {\n startLine: startLine,\n endLine: endLine\n };\n if (Is.defined(startCharacter)) {\n result.startCharacter = startCharacter;\n }\n if (Is.defined(endCharacter)) {\n result.endCharacter = endCharacter;\n }\n if (Is.defined(kind)) {\n result.kind = kind;\n }\n return result;\n }\n FoldingRange.create = create;\n /**\n * Checks whether the given literal conforms to the [FoldingRange](#FoldingRange) interface.\n */\n function is(value) {\n var candidate = value;\n return Is.uinteger(candidate.startLine) && Is.uinteger(candidate.startLine)\n && (Is.undefined(candidate.startCharacter) || Is.uinteger(candidate.startCharacter))\n && (Is.undefined(candidate.endCharacter) || Is.uinteger(candidate.endCharacter))\n && (Is.undefined(candidate.kind) || Is.string(candidate.kind));\n }\n FoldingRange.is = is;\n})(FoldingRange || (FoldingRange = {}));\n/**\n * The DiagnosticRelatedInformation namespace provides helper functions to work with\n * [DiagnosticRelatedInformation](#DiagnosticRelatedInformation) literals.\n */\nexport var DiagnosticRelatedInformation;\n(function (DiagnosticRelatedInformation) {\n /**\n * Creates a new DiagnosticRelatedInformation literal.\n */\n function create(location, message) {\n return {\n location: location,\n message: message\n };\n }\n DiagnosticRelatedInformation.create = create;\n /**\n * Checks whether the given literal conforms to the [DiagnosticRelatedInformation](#DiagnosticRelatedInformation) interface.\n */\n function is(value) {\n var candidate = value;\n return Is.defined(candidate) && Location.is(candidate.location) && Is.string(candidate.message);\n }\n DiagnosticRelatedInformation.is = is;\n})(DiagnosticRelatedInformation || (DiagnosticRelatedInformation = {}));\n/**\n * The diagnostic's severity.\n */\nexport var DiagnosticSeverity;\n(function (DiagnosticSeverity) {\n /**\n * Reports an error.\n */\n DiagnosticSeverity.Error = 1;\n /**\n * Reports a warning.\n */\n DiagnosticSeverity.Warning = 2;\n /**\n * Reports an information.\n */\n DiagnosticSeverity.Information = 3;\n /**\n * Reports a hint.\n */\n DiagnosticSeverity.Hint = 4;\n})(DiagnosticSeverity || (DiagnosticSeverity = {}));\n/**\n * The diagnostic tags.\n *\n * @since 3.15.0\n */\nexport var DiagnosticTag;\n(function (DiagnosticTag) {\n /**\n * Unused or unnecessary code.\n *\n * Clients are allowed to render diagnostics with this tag faded out instead of having\n * an error squiggle.\n */\n DiagnosticTag.Unnecessary = 1;\n /**\n * Deprecated or obsolete code.\n *\n * Clients are allowed to rendered diagnostics with this tag strike through.\n */\n DiagnosticTag.Deprecated = 2;\n})(DiagnosticTag || (DiagnosticTag = {}));\n/**\n * The CodeDescription namespace provides functions to deal with descriptions for diagnostic codes.\n *\n * @since 3.16.0\n */\nexport var CodeDescription;\n(function (CodeDescription) {\n function is(value) {\n var candidate = value;\n return candidate !== undefined && candidate !== null && Is.string(candidate.href);\n }\n CodeDescription.is = is;\n})(CodeDescription || (CodeDescription = {}));\n/**\n * The Diagnostic namespace provides helper functions to work with\n * [Diagnostic](#Diagnostic) literals.\n */\nexport var Diagnostic;\n(function (Diagnostic) {\n /**\n * Creates a new Diagnostic literal.\n */\n function create(range, message, severity, code, source, relatedInformation) {\n var result = { range: range, message: message };\n if (Is.defined(severity)) {\n result.severity = severity;\n }\n if (Is.defined(code)) {\n result.code = code;\n }\n if (Is.defined(source)) {\n result.source = source;\n }\n if (Is.defined(relatedInformation)) {\n result.relatedInformation = relatedInformation;\n }\n return result;\n }\n Diagnostic.create = create;\n /**\n * Checks whether the given literal conforms to the [Diagnostic](#Diagnostic) interface.\n */\n function is(value) {\n var _a;\n var candidate = value;\n return Is.defined(candidate)\n && Range.is(candidate.range)\n && Is.string(candidate.message)\n && (Is.number(candidate.severity) || Is.undefined(candidate.severity))\n && (Is.integer(candidate.code) || Is.string(candidate.code) || Is.undefined(candidate.code))\n && (Is.undefined(candidate.codeDescription) || (Is.string((_a = candidate.codeDescription) === null || _a === void 0 ? void 0 : _a.href)))\n && (Is.string(candidate.source) || Is.undefined(candidate.source))\n && (Is.undefined(candidate.relatedInformation) || Is.typedArray(candidate.relatedInformation, DiagnosticRelatedInformation.is));\n }\n Diagnostic.is = is;\n})(Diagnostic || (Diagnostic = {}));\n/**\n * The Command namespace provides helper functions to work with\n * [Command](#Command) literals.\n */\nexport var Command;\n(function (Command) {\n /**\n * Creates a new Command literal.\n */\n function create(title, command) {\n var args = [];\n for (var _i = 2; _i < arguments.length; _i++) {\n args[_i - 2] = arguments[_i];\n }\n var result = { title: title, command: command };\n if (Is.defined(args) && args.length > 0) {\n result.arguments = args;\n }\n return result;\n }\n Command.create = create;\n /**\n * Checks whether the given literal conforms to the [Command](#Command) interface.\n */\n function is(value) {\n var candidate = value;\n return Is.defined(candidate) && Is.string(candidate.title) && Is.string(candidate.command);\n }\n Command.is = is;\n})(Command || (Command = {}));\n/**\n * The TextEdit namespace provides helper function to create replace,\n * insert and delete edits more easily.\n */\nexport var TextEdit;\n(function (TextEdit) {\n /**\n * Creates a replace text edit.\n * @param range The range of text to be replaced.\n * @param newText The new text.\n */\n function replace(range, newText) {\n return { range: range, newText: newText };\n }\n TextEdit.replace = replace;\n /**\n * Creates a insert text edit.\n * @param position The position to insert the text at.\n * @param newText The text to be inserted.\n */\n function insert(position, newText) {\n return { range: { start: position, end: position }, newText: newText };\n }\n TextEdit.insert = insert;\n /**\n * Creates a delete text edit.\n * @param range The range of text to be deleted.\n */\n function del(range) {\n return { range: range, newText: '' };\n }\n TextEdit.del = del;\n function is(value) {\n var candidate = value;\n return Is.objectLiteral(candidate)\n && Is.string(candidate.newText)\n && Range.is(candidate.range);\n }\n TextEdit.is = is;\n})(TextEdit || (TextEdit = {}));\nexport var ChangeAnnotation;\n(function (ChangeAnnotation) {\n function create(label, needsConfirmation, description) {\n var result = { label: label };\n if (needsConfirmation !== undefined) {\n result.needsConfirmation = needsConfirmation;\n }\n if (description !== undefined) {\n result.description = description;\n }\n return result;\n }\n ChangeAnnotation.create = create;\n function is(value) {\n var candidate = value;\n return candidate !== undefined && Is.objectLiteral(candidate) && Is.string(candidate.label) &&\n (Is.boolean(candidate.needsConfirmation) || candidate.needsConfirmation === undefined) &&\n (Is.string(candidate.description) || candidate.description === undefined);\n }\n ChangeAnnotation.is = is;\n})(ChangeAnnotation || (ChangeAnnotation = {}));\nexport var ChangeAnnotationIdentifier;\n(function (ChangeAnnotationIdentifier) {\n function is(value) {\n var candidate = value;\n return typeof candidate === 'string';\n }\n ChangeAnnotationIdentifier.is = is;\n})(ChangeAnnotationIdentifier || (ChangeAnnotationIdentifier = {}));\nexport var AnnotatedTextEdit;\n(function (AnnotatedTextEdit) {\n /**\n * Creates an annotated replace text edit.\n *\n * @param range The range of text to be replaced.\n * @param newText The new text.\n * @param annotation The annotation.\n */\n function replace(range, newText, annotation) {\n return { range: range, newText: newText, annotationId: annotation };\n }\n AnnotatedTextEdit.replace = replace;\n /**\n * Creates an annotated insert text edit.\n *\n * @param position The position to insert the text at.\n * @param newText The text to be inserted.\n * @param annotation The annotation.\n */\n function insert(position, newText, annotation) {\n return { range: { start: position, end: position }, newText: newText, annotationId: annotation };\n }\n AnnotatedTextEdit.insert = insert;\n /**\n * Creates an annotated delete text edit.\n *\n * @param range The range of text to be deleted.\n * @param annotation The annotation.\n */\n function del(range, annotation) {\n return { range: range, newText: '', annotationId: annotation };\n }\n AnnotatedTextEdit.del = del;\n function is(value) {\n var candidate = value;\n return TextEdit.is(candidate) && (ChangeAnnotation.is(candidate.annotationId) || ChangeAnnotationIdentifier.is(candidate.annotationId));\n }\n AnnotatedTextEdit.is = is;\n})(AnnotatedTextEdit || (AnnotatedTextEdit = {}));\n/**\n * The TextDocumentEdit namespace provides helper function to create\n * an edit that manipulates a text document.\n */\nexport var TextDocumentEdit;\n(function (TextDocumentEdit) {\n /**\n * Creates a new `TextDocumentEdit`\n */\n function create(textDocument, edits) {\n return { textDocument: textDocument, edits: edits };\n }\n TextDocumentEdit.create = create;\n function is(value) {\n var candidate = value;\n return Is.defined(candidate)\n && OptionalVersionedTextDocumentIdentifier.is(candidate.textDocument)\n && Array.isArray(candidate.edits);\n }\n TextDocumentEdit.is = is;\n})(TextDocumentEdit || (TextDocumentEdit = {}));\nexport var CreateFile;\n(function (CreateFile) {\n function create(uri, options, annotation) {\n var result = {\n kind: 'create',\n uri: uri\n };\n if (options !== undefined && (options.overwrite !== undefined || options.ignoreIfExists !== undefined)) {\n result.options = options;\n }\n if (annotation !== undefined) {\n result.annotationId = annotation;\n }\n return result;\n }\n CreateFile.create = create;\n function is(value) {\n var candidate = value;\n return candidate && candidate.kind === 'create' && Is.string(candidate.uri) && (candidate.options === undefined ||\n ((candidate.options.overwrite === undefined || Is.boolean(candidate.options.overwrite)) && (candidate.options.ignoreIfExists === undefined || Is.boolean(candidate.options.ignoreIfExists)))) && (candidate.annotationId === undefined || ChangeAnnotationIdentifier.is(candidate.annotationId));\n }\n CreateFile.is = is;\n})(CreateFile || (CreateFile = {}));\nexport var RenameFile;\n(function (RenameFile) {\n function create(oldUri, newUri, options, annotation) {\n var result = {\n kind: 'rename',\n oldUri: oldUri,\n newUri: newUri\n };\n if (options !== undefined && (options.overwrite !== undefined || options.ignoreIfExists !== undefined)) {\n result.options = options;\n }\n if (annotation !== undefined) {\n result.annotationId = annotation;\n }\n return result;\n }\n RenameFile.create = create;\n function is(value) {\n var candidate = value;\n return candidate && candidate.kind === 'rename' && Is.string(candidate.oldUri) && Is.string(candidate.newUri) && (candidate.options === undefined ||\n ((candidate.options.overwrite === undefined || Is.boolean(candidate.options.overwrite)) && (candidate.options.ignoreIfExists === undefined || Is.boolean(candidate.options.ignoreIfExists)))) && (candidate.annotationId === undefined || ChangeAnnotationIdentifier.is(candidate.annotationId));\n }\n RenameFile.is = is;\n})(RenameFile || (RenameFile = {}));\nexport var DeleteFile;\n(function (DeleteFile) {\n function create(uri, options, annotation) {\n var result = {\n kind: 'delete',\n uri: uri\n };\n if (options !== undefined && (options.recursive !== undefined || options.ignoreIfNotExists !== undefined)) {\n result.options = options;\n }\n if (annotation !== undefined) {\n result.annotationId = annotation;\n }\n return result;\n }\n DeleteFile.create = create;\n function is(value) {\n var candidate = value;\n return candidate && candidate.kind === 'delete' && Is.string(candidate.uri) && (candidate.options === undefined ||\n ((candidate.options.recursive === undefined || Is.boolean(candidate.options.recursive)) && (candidate.options.ignoreIfNotExists === undefined || Is.boolean(candidate.options.ignoreIfNotExists)))) && (candidate.annotationId === undefined || ChangeAnnotationIdentifier.is(candidate.annotationId));\n }\n DeleteFile.is = is;\n})(DeleteFile || (DeleteFile = {}));\nexport var WorkspaceEdit;\n(function (WorkspaceEdit) {\n function is(value) {\n var candidate = value;\n return candidate &&\n (candidate.changes !== undefined || candidate.documentChanges !== undefined) &&\n (candidate.documentChanges === undefined || candidate.documentChanges.every(function (change) {\n if (Is.string(change.kind)) {\n return CreateFile.is(change) || RenameFile.is(change) || DeleteFile.is(change);\n }\n else {\n return TextDocumentEdit.is(change);\n }\n }));\n }\n WorkspaceEdit.is = is;\n})(WorkspaceEdit || (WorkspaceEdit = {}));\nvar TextEditChangeImpl = /** @class */ (function () {\n function TextEditChangeImpl(edits, changeAnnotations) {\n this.edits = edits;\n this.changeAnnotations = changeAnnotations;\n }\n TextEditChangeImpl.prototype.insert = function (position, newText, annotation) {\n var edit;\n var id;\n if (annotation === undefined) {\n edit = TextEdit.insert(position, newText);\n }\n else if (ChangeAnnotationIdentifier.is(annotation)) {\n id = annotation;\n edit = AnnotatedTextEdit.insert(position, newText, annotation);\n }\n else {\n this.assertChangeAnnotations(this.changeAnnotations);\n id = this.changeAnnotations.manage(annotation);\n edit = AnnotatedTextEdit.insert(position, newText, id);\n }\n this.edits.push(edit);\n if (id !== undefined) {\n return id;\n }\n };\n TextEditChangeImpl.prototype.replace = function (range, newText, annotation) {\n var edit;\n var id;\n if (annotation === undefined) {\n edit = TextEdit.replace(range, newText);\n }\n else if (ChangeAnnotationIdentifier.is(annotation)) {\n id = annotation;\n edit = AnnotatedTextEdit.replace(range, newText, annotation);\n }\n else {\n this.assertChangeAnnotations(this.changeAnnotations);\n id = this.changeAnnotations.manage(annotation);\n edit = AnnotatedTextEdit.replace(range, newText, id);\n }\n this.edits.push(edit);\n if (id !== undefined) {\n return id;\n }\n };\n TextEditChangeImpl.prototype.delete = function (range, annotation) {\n var edit;\n var id;\n if (annotation === undefined) {\n edit = TextEdit.del(range);\n }\n else if (ChangeAnnotationIdentifier.is(annotation)) {\n id = annotation;\n edit = AnnotatedTextEdit.del(range, annotation);\n }\n else {\n this.assertChangeAnnotations(this.changeAnnotations);\n id = this.changeAnnotations.manage(annotation);\n edit = AnnotatedTextEdit.del(range, id);\n }\n this.edits.push(edit);\n if (id !== undefined) {\n return id;\n }\n };\n TextEditChangeImpl.prototype.add = function (edit) {\n this.edits.push(edit);\n };\n TextEditChangeImpl.prototype.all = function () {\n return this.edits;\n };\n TextEditChangeImpl.prototype.clear = function () {\n this.edits.splice(0, this.edits.length);\n };\n TextEditChangeImpl.prototype.assertChangeAnnotations = function (value) {\n if (value === undefined) {\n throw new Error(\"Text edit change is not configured to manage change annotations.\");\n }\n };\n return TextEditChangeImpl;\n}());\n/**\n * A helper class\n */\nvar ChangeAnnotations = /** @class */ (function () {\n function ChangeAnnotations(annotations) {\n this._annotations = annotations === undefined ? Object.create(null) : annotations;\n this._counter = 0;\n this._size = 0;\n }\n ChangeAnnotations.prototype.all = function () {\n return this._annotations;\n };\n Object.defineProperty(ChangeAnnotations.prototype, \"size\", {\n get: function () {\n return this._size;\n },\n enumerable: false,\n configurable: true\n });\n ChangeAnnotations.prototype.manage = function (idOrAnnotation, annotation) {\n var id;\n if (ChangeAnnotationIdentifier.is(idOrAnnotation)) {\n id = idOrAnnotation;\n }\n else {\n id = this.nextId();\n annotation = idOrAnnotation;\n }\n if (this._annotations[id] !== undefined) {\n throw new Error(\"Id \" + id + \" is already in use.\");\n }\n if (annotation === undefined) {\n throw new Error(\"No annotation provided for id \" + id);\n }\n this._annotations[id] = annotation;\n this._size++;\n return id;\n };\n ChangeAnnotations.prototype.nextId = function () {\n this._counter++;\n return this._counter.toString();\n };\n return ChangeAnnotations;\n}());\n/**\n * A workspace change helps constructing changes to a workspace.\n */\nvar WorkspaceChange = /** @class */ (function () {\n function WorkspaceChange(workspaceEdit) {\n var _this = this;\n this._textEditChanges = Object.create(null);\n if (workspaceEdit !== undefined) {\n this._workspaceEdit = workspaceEdit;\n if (workspaceEdit.documentChanges) {\n this._changeAnnotations = new ChangeAnnotations(workspaceEdit.changeAnnotations);\n workspaceEdit.changeAnnotations = this._changeAnnotations.all();\n workspaceEdit.documentChanges.forEach(function (change) {\n if (TextDocumentEdit.is(change)) {\n var textEditChange = new TextEditChangeImpl(change.edits, _this._changeAnnotations);\n _this._textEditChanges[change.textDocument.uri] = textEditChange;\n }\n });\n }\n else if (workspaceEdit.changes) {\n Object.keys(workspaceEdit.changes).forEach(function (key) {\n var textEditChange = new TextEditChangeImpl(workspaceEdit.changes[key]);\n _this._textEditChanges[key] = textEditChange;\n });\n }\n }\n else {\n this._workspaceEdit = {};\n }\n }\n Object.defineProperty(WorkspaceChange.prototype, \"edit\", {\n /**\n * Returns the underlying [WorkspaceEdit](#WorkspaceEdit) literal\n * use to be returned from a workspace edit operation like rename.\n */\n get: function () {\n this.initDocumentChanges();\n if (this._changeAnnotations !== undefined) {\n if (this._changeAnnotations.size === 0) {\n this._workspaceEdit.changeAnnotations = undefined;\n }\n else {\n this._workspaceEdit.changeAnnotations = this._changeAnnotations.all();\n }\n }\n return this._workspaceEdit;\n },\n enumerable: false,\n configurable: true\n });\n WorkspaceChange.prototype.getTextEditChange = function (key) {\n if (OptionalVersionedTextDocumentIdentifier.is(key)) {\n this.initDocumentChanges();\n if (this._workspaceEdit.documentChanges === undefined) {\n throw new Error('Workspace edit is not configured for document changes.');\n }\n var textDocument = { uri: key.uri, version: key.version };\n var result = this._textEditChanges[textDocument.uri];\n if (!result) {\n var edits = [];\n var textDocumentEdit = {\n textDocument: textDocument,\n edits: edits\n };\n this._workspaceEdit.documentChanges.push(textDocumentEdit);\n result = new TextEditChangeImpl(edits, this._changeAnnotations);\n this._textEditChanges[textDocument.uri] = result;\n }\n return result;\n }\n else {\n this.initChanges();\n if (this._workspaceEdit.changes === undefined) {\n throw new Error('Workspace edit is not configured for normal text edit changes.');\n }\n var result = this._textEditChanges[key];\n if (!result) {\n var edits = [];\n this._workspaceEdit.changes[key] = edits;\n result = new TextEditChangeImpl(edits);\n this._textEditChanges[key] = result;\n }\n return result;\n }\n };\n WorkspaceChange.prototype.initDocumentChanges = function () {\n if (this._workspaceEdit.documentChanges === undefined && this._workspaceEdit.changes === undefined) {\n this._changeAnnotations = new ChangeAnnotations();\n this._workspaceEdit.documentChanges = [];\n this._workspaceEdit.changeAnnotations = this._changeAnnotations.all();\n }\n };\n WorkspaceChange.prototype.initChanges = function () {\n if (this._workspaceEdit.documentChanges === undefined && this._workspaceEdit.changes === undefined) {\n this._workspaceEdit.changes = Object.create(null);\n }\n };\n WorkspaceChange.prototype.createFile = function (uri, optionsOrAnnotation, options) {\n this.initDocumentChanges();\n if (this._workspaceEdit.documentChanges === undefined) {\n throw new Error('Workspace edit is not configured for document changes.');\n }\n var annotation;\n if (ChangeAnnotation.is(optionsOrAnnotation) || ChangeAnnotationIdentifier.is(optionsOrAnnotation)) {\n annotation = optionsOrAnnotation;\n }\n else {\n options = optionsOrAnnotation;\n }\n var operation;\n var id;\n if (annotation === undefined) {\n operation = CreateFile.create(uri, options);\n }\n else {\n id = ChangeAnnotationIdentifier.is(annotation) ? annotation : this._changeAnnotations.manage(annotation);\n operation = CreateFile.create(uri, options, id);\n }\n this._workspaceEdit.documentChanges.push(operation);\n if (id !== undefined) {\n return id;\n }\n };\n WorkspaceChange.prototype.renameFile = function (oldUri, newUri, optionsOrAnnotation, options) {\n this.initDocumentChanges();\n if (this._workspaceEdit.documentChanges === undefined) {\n throw new Error('Workspace edit is not configured for document changes.');\n }\n var annotation;\n if (ChangeAnnotation.is(optionsOrAnnotation) || ChangeAnnotationIdentifier.is(optionsOrAnnotation)) {\n annotation = optionsOrAnnotation;\n }\n else {\n options = optionsOrAnnotation;\n }\n var operation;\n var id;\n if (annotation === undefined) {\n operation = RenameFile.create(oldUri, newUri, options);\n }\n else {\n id = ChangeAnnotationIdentifier.is(annotation) ? annotation : this._changeAnnotations.manage(annotation);\n operation = RenameFile.create(oldUri, newUri, options, id);\n }\n this._workspaceEdit.documentChanges.push(operation);\n if (id !== undefined) {\n return id;\n }\n };\n WorkspaceChange.prototype.deleteFile = function (uri, optionsOrAnnotation, options) {\n this.initDocumentChanges();\n if (this._workspaceEdit.documentChanges === undefined) {\n throw new Error('Workspace edit is not configured for document changes.');\n }\n var annotation;\n if (ChangeAnnotation.is(optionsOrAnnotation) || ChangeAnnotationIdentifier.is(optionsOrAnnotation)) {\n annotation = optionsOrAnnotation;\n }\n else {\n options = optionsOrAnnotation;\n }\n var operation;\n var id;\n if (annotation === undefined) {\n operation = DeleteFile.create(uri, options);\n }\n else {\n id = ChangeAnnotationIdentifier.is(annotation) ? annotation : this._changeAnnotations.manage(annotation);\n operation = DeleteFile.create(uri, options, id);\n }\n this._workspaceEdit.documentChanges.push(operation);\n if (id !== undefined) {\n return id;\n }\n };\n return WorkspaceChange;\n}());\nexport { WorkspaceChange };\n/**\n * The TextDocumentIdentifier namespace provides helper functions to work with\n * [TextDocumentIdentifier](#TextDocumentIdentifier) literals.\n */\nexport var TextDocumentIdentifier;\n(function (TextDocumentIdentifier) {\n /**\n * Creates a new TextDocumentIdentifier literal.\n * @param uri The document's uri.\n */\n function create(uri) {\n return { uri: uri };\n }\n TextDocumentIdentifier.create = create;\n /**\n * Checks whether the given literal conforms to the [TextDocumentIdentifier](#TextDocumentIdentifier) interface.\n */\n function is(value) {\n var candidate = value;\n return Is.defined(candidate) && Is.string(candidate.uri);\n }\n TextDocumentIdentifier.is = is;\n})(TextDocumentIdentifier || (TextDocumentIdentifier = {}));\n/**\n * The VersionedTextDocumentIdentifier namespace provides helper functions to work with\n * [VersionedTextDocumentIdentifier](#VersionedTextDocumentIdentifier) literals.\n */\nexport var VersionedTextDocumentIdentifier;\n(function (VersionedTextDocumentIdentifier) {\n /**\n * Creates a new VersionedTextDocumentIdentifier literal.\n * @param uri The document's uri.\n * @param uri The document's text.\n */\n function create(uri, version) {\n return { uri: uri, version: version };\n }\n VersionedTextDocumentIdentifier.create = create;\n /**\n * Checks whether the given literal conforms to the [VersionedTextDocumentIdentifier](#VersionedTextDocumentIdentifier) interface.\n */\n function is(value) {\n var candidate = value;\n return Is.defined(candidate) && Is.string(candidate.uri) && Is.integer(candidate.version);\n }\n VersionedTextDocumentIdentifier.is = is;\n})(VersionedTextDocumentIdentifier || (VersionedTextDocumentIdentifier = {}));\n/**\n * The OptionalVersionedTextDocumentIdentifier namespace provides helper functions to work with\n * [OptionalVersionedTextDocumentIdentifier](#OptionalVersionedTextDocumentIdentifier) literals.\n */\nexport var OptionalVersionedTextDocumentIdentifier;\n(function (OptionalVersionedTextDocumentIdentifier) {\n /**\n * Creates a new OptionalVersionedTextDocumentIdentifier literal.\n * @param uri The document's uri.\n * @param uri The document's text.\n */\n function create(uri, version) {\n return { uri: uri, version: version };\n }\n OptionalVersionedTextDocumentIdentifier.create = create;\n /**\n * Checks whether the given literal conforms to the [OptionalVersionedTextDocumentIdentifier](#OptionalVersionedTextDocumentIdentifier) interface.\n */\n function is(value) {\n var candidate = value;\n return Is.defined(candidate) && Is.string(candidate.uri) && (candidate.version === null || Is.integer(candidate.version));\n }\n OptionalVersionedTextDocumentIdentifier.is = is;\n})(OptionalVersionedTextDocumentIdentifier || (OptionalVersionedTextDocumentIdentifier = {}));\n/**\n * The TextDocumentItem namespace provides helper functions to work with\n * [TextDocumentItem](#TextDocumentItem) literals.\n */\nexport var TextDocumentItem;\n(function (TextDocumentItem) {\n /**\n * Creates a new TextDocumentItem literal.\n * @param uri The document's uri.\n * @param languageId The document's language identifier.\n * @param version The document's version number.\n * @param text The document's text.\n */\n function create(uri, languageId, version, text) {\n return { uri: uri, languageId: languageId, version: version, text: text };\n }\n TextDocumentItem.create = create;\n /**\n * Checks whether the given literal conforms to the [TextDocumentItem](#TextDocumentItem) interface.\n */\n function is(value) {\n var candidate = value;\n return Is.defined(candidate) && Is.string(candidate.uri) && Is.string(candidate.languageId) && Is.integer(candidate.version) && Is.string(candidate.text);\n }\n TextDocumentItem.is = is;\n})(TextDocumentItem || (TextDocumentItem = {}));\n/**\n * Describes the content type that a client supports in various\n * result literals like `Hover`, `ParameterInfo` or `CompletionItem`.\n *\n * Please note that `MarkupKinds` must not start with a `$`. This kinds\n * are reserved for internal usage.\n */\nexport var MarkupKind;\n(function (MarkupKind) {\n /**\n * Plain text is supported as a content format\n */\n MarkupKind.PlainText = 'plaintext';\n /**\n * Markdown is supported as a content format\n */\n MarkupKind.Markdown = 'markdown';\n})(MarkupKind || (MarkupKind = {}));\n(function (MarkupKind) {\n /**\n * Checks whether the given value is a value of the [MarkupKind](#MarkupKind) type.\n */\n function is(value) {\n var candidate = value;\n return candidate === MarkupKind.PlainText || candidate === MarkupKind.Markdown;\n }\n MarkupKind.is = is;\n})(MarkupKind || (MarkupKind = {}));\nexport var MarkupContent;\n(function (MarkupContent) {\n /**\n * Checks whether the given value conforms to the [MarkupContent](#MarkupContent) interface.\n */\n function is(value) {\n var candidate = value;\n return Is.objectLiteral(value) && MarkupKind.is(candidate.kind) && Is.string(candidate.value);\n }\n MarkupContent.is = is;\n})(MarkupContent || (MarkupContent = {}));\n/**\n * The kind of a completion entry.\n */\nexport var CompletionItemKind;\n(function (CompletionItemKind) {\n CompletionItemKind.Text = 1;\n CompletionItemKind.Method = 2;\n CompletionItemKind.Function = 3;\n CompletionItemKind.Constructor = 4;\n CompletionItemKind.Field = 5;\n CompletionItemKind.Variable = 6;\n CompletionItemKind.Class = 7;\n CompletionItemKind.Interface = 8;\n CompletionItemKind.Module = 9;\n CompletionItemKind.Property = 10;\n CompletionItemKind.Unit = 11;\n CompletionItemKind.Value = 12;\n CompletionItemKind.Enum = 13;\n CompletionItemKind.Keyword = 14;\n CompletionItemKind.Snippet = 15;\n CompletionItemKind.Color = 16;\n CompletionItemKind.File = 17;\n CompletionItemKind.Reference = 18;\n CompletionItemKind.Folder = 19;\n CompletionItemKind.EnumMember = 20;\n CompletionItemKind.Constant = 21;\n CompletionItemKind.Struct = 22;\n CompletionItemKind.Event = 23;\n CompletionItemKind.Operator = 24;\n CompletionItemKind.TypeParameter = 25;\n})(CompletionItemKind || (CompletionItemKind = {}));\n/**\n * Defines whether the insert text in a completion item should be interpreted as\n * plain text or a snippet.\n */\nexport var InsertTextFormat;\n(function (InsertTextFormat) {\n /**\n * The primary text to be inserted is treated as a plain string.\n */\n InsertTextFormat.PlainText = 1;\n /**\n * The primary text to be inserted is treated as a snippet.\n *\n * A snippet can define tab stops and placeholders with `$1`, `$2`\n * and `${3:foo}`. `$0` defines the final tab stop, it defaults to\n * the end of the snippet. Placeholders with equal identifiers are linked,\n * that is typing in one will update others too.\n *\n * See also: https://microsoft.github.io/language-server-protocol/specifications/specification-current/#snippet_syntax\n */\n InsertTextFormat.Snippet = 2;\n})(InsertTextFormat || (InsertTextFormat = {}));\n/**\n * Completion item tags are extra annotations that tweak the rendering of a completion\n * item.\n *\n * @since 3.15.0\n */\nexport var CompletionItemTag;\n(function (CompletionItemTag) {\n /**\n * Render a completion as obsolete, usually using a strike-out.\n */\n CompletionItemTag.Deprecated = 1;\n})(CompletionItemTag || (CompletionItemTag = {}));\n/**\n * The InsertReplaceEdit namespace provides functions to deal with insert / replace edits.\n *\n * @since 3.16.0\n */\nexport var InsertReplaceEdit;\n(function (InsertReplaceEdit) {\n /**\n * Creates a new insert / replace edit\n */\n function create(newText, insert, replace) {\n return { newText: newText, insert: insert, replace: replace };\n }\n InsertReplaceEdit.create = create;\n /**\n * Checks whether the given literal conforms to the [InsertReplaceEdit](#InsertReplaceEdit) interface.\n */\n function is(value) {\n var candidate = value;\n return candidate && Is.string(candidate.newText) && Range.is(candidate.insert) && Range.is(candidate.replace);\n }\n InsertReplaceEdit.is = is;\n})(InsertReplaceEdit || (InsertReplaceEdit = {}));\n/**\n * How whitespace and indentation is handled during completion\n * item insertion.\n *\n * @since 3.16.0\n */\nexport var InsertTextMode;\n(function (InsertTextMode) {\n /**\n * The insertion or replace strings is taken as it is. If the\n * value is multi line the lines below the cursor will be\n * inserted using the indentation defined in the string value.\n * The client will not apply any kind of adjustments to the\n * string.\n */\n InsertTextMode.asIs = 1;\n /**\n * The editor adjusts leading whitespace of new lines so that\n * they match the indentation up to the cursor of the line for\n * which the item is accepted.\n *\n * Consider a line like this: <2tabs><3tabs>foo. Accepting a\n * multi line completion item is indented using 2 tabs and all\n * following lines inserted will be indented using 2 tabs as well.\n */\n InsertTextMode.adjustIndentation = 2;\n})(InsertTextMode || (InsertTextMode = {}));\n/**\n * The CompletionItem namespace provides functions to deal with\n * completion items.\n */\nexport var CompletionItem;\n(function (CompletionItem) {\n /**\n * Create a completion item and seed it with a label.\n * @param label The completion item's label\n */\n function create(label) {\n return { label: label };\n }\n CompletionItem.create = create;\n})(CompletionItem || (CompletionItem = {}));\n/**\n * The CompletionList namespace provides functions to deal with\n * completion lists.\n */\nexport var CompletionList;\n(function (CompletionList) {\n /**\n * Creates a new completion list.\n *\n * @param items The completion items.\n * @param isIncomplete The list is not complete.\n */\n function create(items, isIncomplete) {\n return { items: items ? items : [], isIncomplete: !!isIncomplete };\n }\n CompletionList.create = create;\n})(CompletionList || (CompletionList = {}));\nexport var MarkedString;\n(function (MarkedString) {\n /**\n * Creates a marked string from plain text.\n *\n * @param plainText The plain text.\n */\n function fromPlainText(plainText) {\n return plainText.replace(/[\\\\`*_{}[\\]()#+\\-.!]/g, '\\\\$&'); // escape markdown syntax tokens: http://daringfireball.net/projects/markdown/syntax#backslash\n }\n MarkedString.fromPlainText = fromPlainText;\n /**\n * Checks whether the given value conforms to the [MarkedString](#MarkedString) type.\n */\n function is(value) {\n var candidate = value;\n return Is.string(candidate) || (Is.objectLiteral(candidate) && Is.string(candidate.language) && Is.string(candidate.value));\n }\n MarkedString.is = is;\n})(MarkedString || (MarkedString = {}));\nexport var Hover;\n(function (Hover) {\n /**\n * Checks whether the given value conforms to the [Hover](#Hover) interface.\n */\n function is(value) {\n var candidate = value;\n return !!candidate && Is.objectLiteral(candidate) && (MarkupContent.is(candidate.contents) ||\n MarkedString.is(candidate.contents) ||\n Is.typedArray(candidate.contents, MarkedString.is)) && (value.range === undefined || Range.is(value.range));\n }\n Hover.is = is;\n})(Hover || (Hover = {}));\n/**\n * The ParameterInformation namespace provides helper functions to work with\n * [ParameterInformation](#ParameterInformation) literals.\n */\nexport var ParameterInformation;\n(function (ParameterInformation) {\n /**\n * Creates a new parameter information literal.\n *\n * @param label A label string.\n * @param documentation A doc string.\n */\n function create(label, documentation) {\n return documentation ? { label: label, documentation: documentation } : { label: label };\n }\n ParameterInformation.create = create;\n})(ParameterInformation || (ParameterInformation = {}));\n/**\n * The SignatureInformation namespace provides helper functions to work with\n * [SignatureInformation](#SignatureInformation) literals.\n */\nexport var SignatureInformation;\n(function (SignatureInformation) {\n function create(label, documentation) {\n var parameters = [];\n for (var _i = 2; _i < arguments.length; _i++) {\n parameters[_i - 2] = arguments[_i];\n }\n var result = { label: label };\n if (Is.defined(documentation)) {\n result.documentation = documentation;\n }\n if (Is.defined(parameters)) {\n result.parameters = parameters;\n }\n else {\n result.parameters = [];\n }\n return result;\n }\n SignatureInformation.create = create;\n})(SignatureInformation || (SignatureInformation = {}));\n/**\n * A document highlight kind.\n */\nexport var DocumentHighlightKind;\n(function (DocumentHighlightKind) {\n /**\n * A textual occurrence.\n */\n DocumentHighlightKind.Text = 1;\n /**\n * Read-access of a symbol, like reading a variable.\n */\n DocumentHighlightKind.Read = 2;\n /**\n * Write-access of a symbol, like writing to a variable.\n */\n DocumentHighlightKind.Write = 3;\n})(DocumentHighlightKind || (DocumentHighlightKind = {}));\n/**\n * DocumentHighlight namespace to provide helper functions to work with\n * [DocumentHighlight](#DocumentHighlight) literals.\n */\nexport var DocumentHighlight;\n(function (DocumentHighlight) {\n /**\n * Create a DocumentHighlight object.\n * @param range The range the highlight applies to.\n */\n function create(range, kind) {\n var result = { range: range };\n if (Is.number(kind)) {\n result.kind = kind;\n }\n return result;\n }\n DocumentHighlight.create = create;\n})(DocumentHighlight || (DocumentHighlight = {}));\n/**\n * A symbol kind.\n */\nexport var SymbolKind;\n(function (SymbolKind) {\n SymbolKind.File = 1;\n SymbolKind.Module = 2;\n SymbolKind.Namespace = 3;\n SymbolKind.Package = 4;\n SymbolKind.Class = 5;\n SymbolKind.Method = 6;\n SymbolKind.Property = 7;\n SymbolKind.Field = 8;\n SymbolKind.Constructor = 9;\n SymbolKind.Enum = 10;\n SymbolKind.Interface = 11;\n SymbolKind.Function = 12;\n SymbolKind.Variable = 13;\n SymbolKind.Constant = 14;\n SymbolKind.String = 15;\n SymbolKind.Number = 16;\n SymbolKind.Boolean = 17;\n SymbolKind.Array = 18;\n SymbolKind.Object = 19;\n SymbolKind.Key = 20;\n SymbolKind.Null = 21;\n SymbolKind.EnumMember = 22;\n SymbolKind.Struct = 23;\n SymbolKind.Event = 24;\n SymbolKind.Operator = 25;\n SymbolKind.TypeParameter = 26;\n})(SymbolKind || (SymbolKind = {}));\n/**\n * Symbol tags are extra annotations that tweak the rendering of a symbol.\n * @since 3.16\n */\nexport var SymbolTag;\n(function (SymbolTag) {\n /**\n * Render a symbol as obsolete, usually using a strike-out.\n */\n SymbolTag.Deprecated = 1;\n})(SymbolTag || (SymbolTag = {}));\nexport var SymbolInformation;\n(function (SymbolInformation) {\n /**\n * Creates a new symbol information literal.\n *\n * @param name The name of the symbol.\n * @param kind The kind of the symbol.\n * @param range The range of the location of the symbol.\n * @param uri The resource of the location of symbol, defaults to the current document.\n * @param containerName The name of the symbol containing the symbol.\n */\n function create(name, kind, range, uri, containerName) {\n var result = {\n name: name,\n kind: kind,\n location: { uri: uri, range: range }\n };\n if (containerName) {\n result.containerName = containerName;\n }\n return result;\n }\n SymbolInformation.create = create;\n})(SymbolInformation || (SymbolInformation = {}));\nexport var DocumentSymbol;\n(function (DocumentSymbol) {\n /**\n * Creates a new symbol information literal.\n *\n * @param name The name of the symbol.\n * @param detail The detail of the symbol.\n * @param kind The kind of the symbol.\n * @param range The range of the symbol.\n * @param selectionRange The selectionRange of the symbol.\n * @param children Children of the symbol.\n */\n function create(name, detail, kind, range, selectionRange, children) {\n var result = {\n name: name,\n detail: detail,\n kind: kind,\n range: range,\n selectionRange: selectionRange\n };\n if (children !== undefined) {\n result.children = children;\n }\n return result;\n }\n DocumentSymbol.create = create;\n /**\n * Checks whether the given literal conforms to the [DocumentSymbol](#DocumentSymbol) interface.\n */\n function is(value) {\n var candidate = value;\n return candidate &&\n Is.string(candidate.name) && Is.number(candidate.kind) &&\n Range.is(candidate.range) && Range.is(candidate.selectionRange) &&\n (candidate.detail === undefined || Is.string(candidate.detail)) &&\n (candidate.deprecated === undefined || Is.boolean(candidate.deprecated)) &&\n (candidate.children === undefined || Array.isArray(candidate.children)) &&\n (candidate.tags === undefined || Array.isArray(candidate.tags));\n }\n DocumentSymbol.is = is;\n})(DocumentSymbol || (DocumentSymbol = {}));\n/**\n * A set of predefined code action kinds\n */\nexport var CodeActionKind;\n(function (CodeActionKind) {\n /**\n * Empty kind.\n */\n CodeActionKind.Empty = '';\n /**\n * Base kind for quickfix actions: 'quickfix'\n */\n CodeActionKind.QuickFix = 'quickfix';\n /**\n * Base kind for refactoring actions: 'refactor'\n */\n CodeActionKind.Refactor = 'refactor';\n /**\n * Base kind for refactoring extraction actions: 'refactor.extract'\n *\n * Example extract actions:\n *\n * - Extract method\n * - Extract function\n * - Extract variable\n * - Extract interface from class\n * - ...\n */\n CodeActionKind.RefactorExtract = 'refactor.extract';\n /**\n * Base kind for refactoring inline actions: 'refactor.inline'\n *\n * Example inline actions:\n *\n * - Inline function\n * - Inline variable\n * - Inline constant\n * - ...\n */\n CodeActionKind.RefactorInline = 'refactor.inline';\n /**\n * Base kind for refactoring rewrite actions: 'refactor.rewrite'\n *\n * Example rewrite actions:\n *\n * - Convert JavaScript function to class\n * - Add or remove parameter\n * - Encapsulate field\n * - Make method static\n * - Move method to base class\n * - ...\n */\n CodeActionKind.RefactorRewrite = 'refactor.rewrite';\n /**\n * Base kind for source actions: `source`\n *\n * Source code actions apply to the entire file.\n */\n CodeActionKind.Source = 'source';\n /**\n * Base kind for an organize imports source action: `source.organizeImports`\n */\n CodeActionKind.SourceOrganizeImports = 'source.organizeImports';\n /**\n * Base kind for auto-fix source actions: `source.fixAll`.\n *\n * Fix all actions automatically fix errors that have a clear fix that do not require user input.\n * They should not suppress errors or perform unsafe fixes such as generating new types or classes.\n *\n * @since 3.15.0\n */\n CodeActionKind.SourceFixAll = 'source.fixAll';\n})(CodeActionKind || (CodeActionKind = {}));\n/**\n * The CodeActionContext namespace provides helper functions to work with\n * [CodeActionContext](#CodeActionContext) literals.\n */\nexport var CodeActionContext;\n(function (CodeActionContext) {\n /**\n * Creates a new CodeActionContext literal.\n */\n function create(diagnostics, only) {\n var result = { diagnostics: diagnostics };\n if (only !== undefined && only !== null) {\n result.only = only;\n }\n return result;\n }\n CodeActionContext.create = create;\n /**\n * Checks whether the given literal conforms to the [CodeActionContext](#CodeActionContext) interface.\n */\n function is(value) {\n var candidate = value;\n return Is.defined(candidate) && Is.typedArray(candidate.diagnostics, Diagnostic.is) && (candidate.only === undefined || Is.typedArray(candidate.only, Is.string));\n }\n CodeActionContext.is = is;\n})(CodeActionContext || (CodeActionContext = {}));\nexport var CodeAction;\n(function (CodeAction) {\n function create(title, kindOrCommandOrEdit, kind) {\n var result = { title: title };\n var checkKind = true;\n if (typeof kindOrCommandOrEdit === 'string') {\n checkKind = false;\n result.kind = kindOrCommandOrEdit;\n }\n else if (Command.is(kindOrCommandOrEdit)) {\n result.command = kindOrCommandOrEdit;\n }\n else {\n result.edit = kindOrCommandOrEdit;\n }\n if (checkKind && kind !== undefined) {\n result.kind = kind;\n }\n return result;\n }\n CodeAction.create = create;\n function is(value) {\n var candidate = value;\n return candidate && Is.string(candidate.title) &&\n (candidate.diagnostics === undefined || Is.typedArray(candidate.diagnostics, Diagnostic.is)) &&\n (candidate.kind === undefined || Is.string(candidate.kind)) &&\n (candidate.edit !== undefined || candidate.command !== undefined) &&\n (candidate.command === undefined || Command.is(candidate.command)) &&\n (candidate.isPreferred === undefined || Is.boolean(candidate.isPreferred)) &&\n (candidate.edit === undefined || WorkspaceEdit.is(candidate.edit));\n }\n CodeAction.is = is;\n})(CodeAction || (CodeAction = {}));\n/**\n * The CodeLens namespace provides helper functions to work with\n * [CodeLens](#CodeLens) literals.\n */\nexport var CodeLens;\n(function (CodeLens) {\n /**\n * Creates a new CodeLens literal.\n */\n function create(range, data) {\n var result = { range: range };\n if (Is.defined(data)) {\n result.data = data;\n }\n return result;\n }\n CodeLens.create = create;\n /**\n * Checks whether the given literal conforms to the [CodeLens](#CodeLens) interface.\n */\n function is(value) {\n var candidate = value;\n return Is.defined(candidate) && Range.is(candidate.range) && (Is.undefined(candidate.command) || Command.is(candidate.command));\n }\n CodeLens.is = is;\n})(CodeLens || (CodeLens = {}));\n/**\n * The FormattingOptions namespace provides helper functions to work with\n * [FormattingOptions](#FormattingOptions) literals.\n */\nexport var FormattingOptions;\n(function (FormattingOptions) {\n /**\n * Creates a new FormattingOptions literal.\n */\n function create(tabSize, insertSpaces) {\n return { tabSize: tabSize, insertSpaces: insertSpaces };\n }\n FormattingOptions.create = create;\n /**\n * Checks whether the given literal conforms to the [FormattingOptions](#FormattingOptions) interface.\n */\n function is(value) {\n var candidate = value;\n return Is.defined(candidate) && Is.uinteger(candidate.tabSize) && Is.boolean(candidate.insertSpaces);\n }\n FormattingOptions.is = is;\n})(FormattingOptions || (FormattingOptions = {}));\n/**\n * The DocumentLink namespace provides helper functions to work with\n * [DocumentLink](#DocumentLink) literals.\n */\nexport var DocumentLink;\n(function (DocumentLink) {\n /**\n * Creates a new DocumentLink literal.\n */\n function create(range, target, data) {\n return { range: range, target: target, data: data };\n }\n DocumentLink.create = create;\n /**\n * Checks whether the given literal conforms to the [DocumentLink](#DocumentLink) interface.\n */\n function is(value) {\n var candidate = value;\n return Is.defined(candidate) && Range.is(candidate.range) && (Is.undefined(candidate.target) || Is.string(candidate.target));\n }\n DocumentLink.is = is;\n})(DocumentLink || (DocumentLink = {}));\n/**\n * The SelectionRange namespace provides helper function to work with\n * SelectionRange literals.\n */\nexport var SelectionRange;\n(function (SelectionRange) {\n /**\n * Creates a new SelectionRange\n * @param range the range.\n * @param parent an optional parent.\n */\n function create(range, parent) {\n return { range: range, parent: parent };\n }\n SelectionRange.create = create;\n function is(value) {\n var candidate = value;\n return candidate !== undefined && Range.is(candidate.range) && (candidate.parent === undefined || SelectionRange.is(candidate.parent));\n }\n SelectionRange.is = is;\n})(SelectionRange || (SelectionRange = {}));\nexport var EOL = ['\\n', '\\r\\n', '\\r'];\n/**\n * @deprecated Use the text document from the new vscode-languageserver-textdocument package.\n */\nexport var TextDocument;\n(function (TextDocument) {\n /**\n * Creates a new ITextDocument literal from the given uri and content.\n * @param uri The document's uri.\n * @param languageId The document's language Id.\n * @param content The document's content.\n */\n function create(uri, languageId, version, content) {\n return new FullTextDocument(uri, languageId, version, content);\n }\n TextDocument.create = create;\n /**\n * Checks whether the given literal conforms to the [ITextDocument](#ITextDocument) interface.\n */\n function is(value) {\n var candidate = value;\n return Is.defined(candidate) && Is.string(candidate.uri) && (Is.undefined(candidate.languageId) || Is.string(candidate.languageId)) && Is.uinteger(candidate.lineCount)\n && Is.func(candidate.getText) && Is.func(candidate.positionAt) && Is.func(candidate.offsetAt) ? true : false;\n }\n TextDocument.is = is;\n function applyEdits(document, edits) {\n var text = document.getText();\n var sortedEdits = mergeSort(edits, function (a, b) {\n var diff = a.range.start.line - b.range.start.line;\n if (diff === 0) {\n return a.range.start.character - b.range.start.character;\n }\n return diff;\n });\n var lastModifiedOffset = text.length;\n for (var i = sortedEdits.length - 1; i >= 0; i--) {\n var e = sortedEdits[i];\n var startOffset = document.offsetAt(e.range.start);\n var endOffset = document.offsetAt(e.range.end);\n if (endOffset <= lastModifiedOffset) {\n text = text.substring(0, startOffset) + e.newText + text.substring(endOffset, text.length);\n }\n else {\n throw new Error('Overlapping edit');\n }\n lastModifiedOffset = startOffset;\n }\n return text;\n }\n TextDocument.applyEdits = applyEdits;\n function mergeSort(data, compare) {\n if (data.length <= 1) {\n // sorted\n return data;\n }\n var p = (data.length / 2) | 0;\n var left = data.slice(0, p);\n var right = data.slice(p);\n mergeSort(left, compare);\n mergeSort(right, compare);\n var leftIdx = 0;\n var rightIdx = 0;\n var i = 0;\n while (leftIdx < left.length && rightIdx < right.length) {\n var ret = compare(left[leftIdx], right[rightIdx]);\n if (ret <= 0) {\n // smaller_equal -> take left to preserve order\n data[i++] = left[leftIdx++];\n }\n else {\n // greater -> take right\n data[i++] = right[rightIdx++];\n }\n }\n while (leftIdx < left.length) {\n data[i++] = left[leftIdx++];\n }\n while (rightIdx < right.length) {\n data[i++] = right[rightIdx++];\n }\n return data;\n }\n})(TextDocument || (TextDocument = {}));\n/**\n * @deprecated Use the text document from the new vscode-languageserver-textdocument package.\n */\nvar FullTextDocument = /** @class */ (function () {\n function FullTextDocument(uri, languageId, version, content) {\n this._uri = uri;\n this._languageId = languageId;\n this._version = version;\n this._content = content;\n this._lineOffsets = undefined;\n }\n Object.defineProperty(FullTextDocument.prototype, \"uri\", {\n get: function () {\n return this._uri;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(FullTextDocument.prototype, \"languageId\", {\n get: function () {\n return this._languageId;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(FullTextDocument.prototype, \"version\", {\n get: function () {\n return this._version;\n },\n enumerable: false,\n configurable: true\n });\n FullTextDocument.prototype.getText = function (range) {\n if (range) {\n var start = this.offsetAt(range.start);\n var end = this.offsetAt(range.end);\n return this._content.substring(start, end);\n }\n return this._content;\n };\n FullTextDocument.prototype.update = function (event, version) {\n this._content = event.text;\n this._version = version;\n this._lineOffsets = undefined;\n };\n FullTextDocument.prototype.getLineOffsets = function () {\n if (this._lineOffsets === undefined) {\n var lineOffsets = [];\n var text = this._content;\n var isLineStart = true;\n for (var i = 0; i < text.length; i++) {\n if (isLineStart) {\n lineOffsets.push(i);\n isLineStart = false;\n }\n var ch = text.charAt(i);\n isLineStart = (ch === '\\r' || ch === '\\n');\n if (ch === '\\r' && i + 1 < text.length && text.charAt(i + 1) === '\\n') {\n i++;\n }\n }\n if (isLineStart && text.length > 0) {\n lineOffsets.push(text.length);\n }\n this._lineOffsets = lineOffsets;\n }\n return this._lineOffsets;\n };\n FullTextDocument.prototype.positionAt = function (offset) {\n offset = Math.max(Math.min(offset, this._content.length), 0);\n var lineOffsets = this.getLineOffsets();\n var low = 0, high = lineOffsets.length;\n if (high === 0) {\n return Position.create(0, offset);\n }\n while (low < high) {\n var mid = Math.floor((low + high) / 2);\n if (lineOffsets[mid] > offset) {\n high = mid;\n }\n else {\n low = mid + 1;\n }\n }\n // low is the least x for which the line offset is larger than the current offset\n // or array.length if no line offset is larger than the current offset\n var line = low - 1;\n return Position.create(line, offset - lineOffsets[line]);\n };\n FullTextDocument.prototype.offsetAt = function (position) {\n var lineOffsets = this.getLineOffsets();\n if (position.line >= lineOffsets.length) {\n return this._content.length;\n }\n else if (position.line < 0) {\n return 0;\n }\n var lineOffset = lineOffsets[position.line];\n var nextLineOffset = (position.line + 1 < lineOffsets.length) ? lineOffsets[position.line + 1] : this._content.length;\n return Math.max(Math.min(lineOffset + position.character, nextLineOffset), lineOffset);\n };\n Object.defineProperty(FullTextDocument.prototype, \"lineCount\", {\n get: function () {\n return this.getLineOffsets().length;\n },\n enumerable: false,\n configurable: true\n });\n return FullTextDocument;\n}());\nvar Is;\n(function (Is) {\n var toString = Object.prototype.toString;\n function defined(value) {\n return typeof value !== 'undefined';\n }\n Is.defined = defined;\n function undefined(value) {\n return typeof value === 'undefined';\n }\n Is.undefined = undefined;\n function boolean(value) {\n return value === true || value === false;\n }\n Is.boolean = boolean;\n function string(value) {\n return toString.call(value) === '[object String]';\n }\n Is.string = string;\n function number(value) {\n return toString.call(value) === '[object Number]';\n }\n Is.number = number;\n function numberRange(value, min, max) {\n return toString.call(value) === '[object Number]' && min <= value && value <= max;\n }\n Is.numberRange = numberRange;\n function integer(value) {\n return toString.call(value) === '[object Number]' && -2147483648 <= value && value <= 2147483647;\n }\n Is.integer = integer;\n function uinteger(value) {\n return toString.call(value) === '[object Number]' && 0 <= value && value <= 2147483647;\n }\n Is.uinteger = uinteger;\n function func(value) {\n return toString.call(value) === '[object Function]';\n }\n Is.func = func;\n function objectLiteral(value) {\n // Strictly speaking class instances pass this check as well. Since the LSP\n // doesn't use classes we ignore this for now. If we do we need to add something\n // like this: `Object.getPrototypeOf(Object.getPrototypeOf(x)) === null`\n return value !== null && typeof value === 'object';\n }\n Is.objectLiteral = objectLiteral;\n function typedArray(value, check) {\n return Array.isArray(value) && value.every(check);\n }\n Is.typedArray = typedArray;\n})(Is || (Is = {}));\n","/*---------------------------------------------------------------------------------------------\n* Copyright (c) Microsoft Corporation. All rights reserved.\n* Licensed under the MIT License. See License.txt in the project root for license information.\n*--------------------------------------------------------------------------------------------*/\nexport function equals(one, other) {\n if (one === other) {\n return true;\n }\n if (one === null || one === undefined || other === null || other === undefined) {\n return false;\n }\n if (typeof one !== typeof other) {\n return false;\n }\n if (typeof one !== 'object') {\n return false;\n }\n if ((Array.isArray(one)) !== (Array.isArray(other))) {\n return false;\n }\n var i, key;\n if (Array.isArray(one)) {\n if (one.length !== other.length) {\n return false;\n }\n for (i = 0; i < one.length; i++) {\n if (!equals(one[i], other[i])) {\n return false;\n }\n }\n }\n else {\n var oneKeys = [];\n for (key in one) {\n oneKeys.push(key);\n }\n oneKeys.sort();\n var otherKeys = [];\n for (key in other) {\n otherKeys.push(key);\n }\n otherKeys.sort();\n if (!equals(oneKeys, otherKeys)) {\n return false;\n }\n for (i = 0; i < oneKeys.length; i++) {\n if (!equals(one[oneKeys[i]], other[oneKeys[i]])) {\n return false;\n }\n }\n }\n return true;\n}\nexport function isNumber(val) {\n return typeof val === 'number';\n}\nexport function isDefined(val) {\n return typeof val !== 'undefined';\n}\nexport function isBoolean(val) {\n return typeof val === 'boolean';\n}\nexport function isString(val) {\n return typeof val === 'string';\n}\n","/*---------------------------------------------------------------------------------------------\n* Copyright (c) Microsoft Corporation. All rights reserved.\n* Licensed under the MIT License. See License.txt in the project root for license information.\n*--------------------------------------------------------------------------------------------*/\nexport function startsWith(haystack, needle) {\n if (haystack.length < needle.length) {\n return false;\n }\n for (var i = 0; i < needle.length; i++) {\n if (haystack[i] !== needle[i]) {\n return false;\n }\n }\n return true;\n}\n/**\n * Determines if haystack ends with needle.\n */\nexport function endsWith(haystack, needle) {\n var diff = haystack.length - needle.length;\n if (diff > 0) {\n return haystack.lastIndexOf(needle) === diff;\n }\n else if (diff === 0) {\n return haystack === needle;\n }\n else {\n return false;\n }\n}\nexport function convertSimple2RegExpPattern(pattern) {\n return pattern.replace(/[\\-\\\\\\{\\}\\+\\?\\|\\^\\$\\.\\,\\[\\]\\(\\)\\#\\s]/g, '\\\\$&').replace(/[\\*]/g, '.*');\n}\nexport function repeat(value, count) {\n var s = '';\n while (count > 0) {\n if ((count & 1) === 1) {\n s += value;\n }\n value += value;\n count = count >>> 1;\n }\n return s;\n}\nexport function extendedRegExp(pattern) {\n if (startsWith(pattern, '(?i)')) {\n return new RegExp(pattern.substring(4), 'i');\n }\n else {\n return new RegExp(pattern);\n }\n}\n","/* --------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n * ------------------------------------------------------------------------------------------ */\n'use strict';\nvar FullTextDocument = /** @class */ (function () {\n function FullTextDocument(uri, languageId, version, content) {\n this._uri = uri;\n this._languageId = languageId;\n this._version = version;\n this._content = content;\n this._lineOffsets = undefined;\n }\n Object.defineProperty(FullTextDocument.prototype, \"uri\", {\n get: function () {\n return this._uri;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(FullTextDocument.prototype, \"languageId\", {\n get: function () {\n return this._languageId;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(FullTextDocument.prototype, \"version\", {\n get: function () {\n return this._version;\n },\n enumerable: true,\n configurable: true\n });\n FullTextDocument.prototype.getText = function (range) {\n if (range) {\n var start = this.offsetAt(range.start);\n var end = this.offsetAt(range.end);\n return this._content.substring(start, end);\n }\n return this._content;\n };\n FullTextDocument.prototype.update = function (changes, version) {\n for (var _i = 0, changes_1 = changes; _i < changes_1.length; _i++) {\n var change = changes_1[_i];\n if (FullTextDocument.isIncremental(change)) {\n // makes sure start is before end\n var range = getWellformedRange(change.range);\n // update content\n var startOffset = this.offsetAt(range.start);\n var endOffset = this.offsetAt(range.end);\n this._content = this._content.substring(0, startOffset) + change.text + this._content.substring(endOffset, this._content.length);\n // update the offsets\n var startLine = Math.max(range.start.line, 0);\n var endLine = Math.max(range.end.line, 0);\n var lineOffsets = this._lineOffsets;\n var addedLineOffsets = computeLineOffsets(change.text, false, startOffset);\n if (endLine - startLine === addedLineOffsets.length) {\n for (var i = 0, len = addedLineOffsets.length; i < len; i++) {\n lineOffsets[i + startLine + 1] = addedLineOffsets[i];\n }\n }\n else {\n if (addedLineOffsets.length < 10000) {\n lineOffsets.splice.apply(lineOffsets, [startLine + 1, endLine - startLine].concat(addedLineOffsets));\n }\n else { // avoid too many arguments for splice\n this._lineOffsets = lineOffsets = lineOffsets.slice(0, startLine + 1).concat(addedLineOffsets, lineOffsets.slice(endLine + 1));\n }\n }\n var diff = change.text.length - (endOffset - startOffset);\n if (diff !== 0) {\n for (var i = startLine + 1 + addedLineOffsets.length, len = lineOffsets.length; i < len; i++) {\n lineOffsets[i] = lineOffsets[i] + diff;\n }\n }\n }\n else if (FullTextDocument.isFull(change)) {\n this._content = change.text;\n this._lineOffsets = undefined;\n }\n else {\n throw new Error('Unknown change event received');\n }\n }\n this._version = version;\n };\n FullTextDocument.prototype.getLineOffsets = function () {\n if (this._lineOffsets === undefined) {\n this._lineOffsets = computeLineOffsets(this._content, true);\n }\n return this._lineOffsets;\n };\n FullTextDocument.prototype.positionAt = function (offset) {\n offset = Math.max(Math.min(offset, this._content.length), 0);\n var lineOffsets = this.getLineOffsets();\n var low = 0, high = lineOffsets.length;\n if (high === 0) {\n return { line: 0, character: offset };\n }\n while (low < high) {\n var mid = Math.floor((low + high) / 2);\n if (lineOffsets[mid] > offset) {\n high = mid;\n }\n else {\n low = mid + 1;\n }\n }\n // low is the least x for which the line offset is larger than the current offset\n // or array.length if no line offset is larger than the current offset\n var line = low - 1;\n return { line: line, character: offset - lineOffsets[line] };\n };\n FullTextDocument.prototype.offsetAt = function (position) {\n var lineOffsets = this.getLineOffsets();\n if (position.line >= lineOffsets.length) {\n return this._content.length;\n }\n else if (position.line < 0) {\n return 0;\n }\n var lineOffset = lineOffsets[position.line];\n var nextLineOffset = (position.line + 1 < lineOffsets.length) ? lineOffsets[position.line + 1] : this._content.length;\n return Math.max(Math.min(lineOffset + position.character, nextLineOffset), lineOffset);\n };\n Object.defineProperty(FullTextDocument.prototype, \"lineCount\", {\n get: function () {\n return this.getLineOffsets().length;\n },\n enumerable: true,\n configurable: true\n });\n FullTextDocument.isIncremental = function (event) {\n var candidate = event;\n return candidate !== undefined && candidate !== null &&\n typeof candidate.text === 'string' && candidate.range !== undefined &&\n (candidate.rangeLength === undefined || typeof candidate.rangeLength === 'number');\n };\n FullTextDocument.isFull = function (event) {\n var candidate = event;\n return candidate !== undefined && candidate !== null &&\n typeof candidate.text === 'string' && candidate.range === undefined && candidate.rangeLength === undefined;\n };\n return FullTextDocument;\n}());\nexport var TextDocument;\n(function (TextDocument) {\n /**\n * Creates a new text document.\n *\n * @param uri The document's uri.\n * @param languageId The document's language Id.\n * @param version The document's initial version number.\n * @param content The document's content.\n */\n function create(uri, languageId, version, content) {\n return new FullTextDocument(uri, languageId, version, content);\n }\n TextDocument.create = create;\n /**\n * Updates a TextDocument by modifing its content.\n *\n * @param document the document to update. Only documents created by TextDocument.create are valid inputs.\n * @param changes the changes to apply to the document.\n * @returns The updated TextDocument. Note: That's the same document instance passed in as first parameter.\n *\n */\n function update(document, changes, version) {\n if (document instanceof FullTextDocument) {\n document.update(changes, version);\n return document;\n }\n else {\n throw new Error('TextDocument.update: document must be created by TextDocument.create');\n }\n }\n TextDocument.update = update;\n function applyEdits(document, edits) {\n var text = document.getText();\n var sortedEdits = mergeSort(edits.map(getWellformedEdit), function (a, b) {\n var diff = a.range.start.line - b.range.start.line;\n if (diff === 0) {\n return a.range.start.character - b.range.start.character;\n }\n return diff;\n });\n var lastModifiedOffset = 0;\n var spans = [];\n for (var _i = 0, sortedEdits_1 = sortedEdits; _i < sortedEdits_1.length; _i++) {\n var e = sortedEdits_1[_i];\n var startOffset = document.offsetAt(e.range.start);\n if (startOffset < lastModifiedOffset) {\n throw new Error('Overlapping edit');\n }\n else if (startOffset > lastModifiedOffset) {\n spans.push(text.substring(lastModifiedOffset, startOffset));\n }\n if (e.newText.length) {\n spans.push(e.newText);\n }\n lastModifiedOffset = document.offsetAt(e.range.end);\n }\n spans.push(text.substr(lastModifiedOffset));\n return spans.join('');\n }\n TextDocument.applyEdits = applyEdits;\n})(TextDocument || (TextDocument = {}));\nfunction mergeSort(data, compare) {\n if (data.length <= 1) {\n // sorted\n return data;\n }\n var p = (data.length / 2) | 0;\n var left = data.slice(0, p);\n var right = data.slice(p);\n mergeSort(left, compare);\n mergeSort(right, compare);\n var leftIdx = 0;\n var rightIdx = 0;\n var i = 0;\n while (leftIdx < left.length && rightIdx < right.length) {\n var ret = compare(left[leftIdx], right[rightIdx]);\n if (ret <= 0) {\n // smaller_equal -> take left to preserve order\n data[i++] = left[leftIdx++];\n }\n else {\n // greater -> take right\n data[i++] = right[rightIdx++];\n }\n }\n while (leftIdx < left.length) {\n data[i++] = left[leftIdx++];\n }\n while (rightIdx < right.length) {\n data[i++] = right[rightIdx++];\n }\n return data;\n}\nfunction computeLineOffsets(text, isAtLineStart, textOffset) {\n if (textOffset === void 0) { textOffset = 0; }\n var result = isAtLineStart ? [textOffset] : [];\n for (var i = 0; i < text.length; i++) {\n var ch = text.charCodeAt(i);\n if (ch === 13 /* CarriageReturn */ || ch === 10 /* LineFeed */) {\n if (ch === 13 /* CarriageReturn */ && i + 1 < text.length && text.charCodeAt(i + 1) === 10 /* LineFeed */) {\n i++;\n }\n result.push(textOffset + i + 1);\n }\n }\n return result;\n}\nfunction getWellformedRange(range) {\n var start = range.start;\n var end = range.end;\n if (start.line > end.line || (start.line === end.line && start.character > end.character)) {\n return { start: end, end: start };\n }\n return range;\n}\nfunction getWellformedEdit(textEdit) {\n var range = getWellformedRange(textEdit.range);\n if (range !== textEdit.range) {\n return { newText: textEdit.newText, range: range };\n }\n return textEdit;\n}\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\nimport { Range, TextEdit, Color, ColorInformation, ColorPresentation, FoldingRange, FoldingRangeKind, MarkupKind, SelectionRange, Diagnostic, DiagnosticSeverity, CompletionItem, CompletionItemKind, CompletionList, Position, InsertTextFormat, MarkupContent, SymbolInformation, SymbolKind, DocumentSymbol, Location, Hover, MarkedString } from './../vscode-languageserver-types/main.js';\nimport { TextDocument } from './../vscode-languageserver-textdocument/lib/esm/main.js';\nexport { TextDocument, Range, TextEdit, Color, ColorInformation, ColorPresentation, FoldingRange, FoldingRangeKind, SelectionRange, Diagnostic, DiagnosticSeverity, CompletionItem, CompletionItemKind, CompletionList, Position, InsertTextFormat, MarkupContent, MarkupKind, SymbolInformation, SymbolKind, DocumentSymbol, Location, Hover, MarkedString };\n/**\n * Error codes used by diagnostics\n */\nexport var ErrorCode;\n(function (ErrorCode) {\n ErrorCode[ErrorCode[\"Undefined\"] = 0] = \"Undefined\";\n ErrorCode[ErrorCode[\"EnumValueMismatch\"] = 1] = \"EnumValueMismatch\";\n ErrorCode[ErrorCode[\"Deprecated\"] = 2] = \"Deprecated\";\n ErrorCode[ErrorCode[\"UnexpectedEndOfComment\"] = 257] = \"UnexpectedEndOfComment\";\n ErrorCode[ErrorCode[\"UnexpectedEndOfString\"] = 258] = \"UnexpectedEndOfString\";\n ErrorCode[ErrorCode[\"UnexpectedEndOfNumber\"] = 259] = \"UnexpectedEndOfNumber\";\n ErrorCode[ErrorCode[\"InvalidUnicode\"] = 260] = \"InvalidUnicode\";\n ErrorCode[ErrorCode[\"InvalidEscapeCharacter\"] = 261] = \"InvalidEscapeCharacter\";\n ErrorCode[ErrorCode[\"InvalidCharacter\"] = 262] = \"InvalidCharacter\";\n ErrorCode[ErrorCode[\"PropertyExpected\"] = 513] = \"PropertyExpected\";\n ErrorCode[ErrorCode[\"CommaExpected\"] = 514] = \"CommaExpected\";\n ErrorCode[ErrorCode[\"ColonExpected\"] = 515] = \"ColonExpected\";\n ErrorCode[ErrorCode[\"ValueExpected\"] = 516] = \"ValueExpected\";\n ErrorCode[ErrorCode[\"CommaOrCloseBacketExpected\"] = 517] = \"CommaOrCloseBacketExpected\";\n ErrorCode[ErrorCode[\"CommaOrCloseBraceExpected\"] = 518] = \"CommaOrCloseBraceExpected\";\n ErrorCode[ErrorCode[\"TrailingComma\"] = 519] = \"TrailingComma\";\n ErrorCode[ErrorCode[\"DuplicateKey\"] = 520] = \"DuplicateKey\";\n ErrorCode[ErrorCode[\"CommentNotPermitted\"] = 521] = \"CommentNotPermitted\";\n ErrorCode[ErrorCode[\"SchemaResolveError\"] = 768] = \"SchemaResolveError\";\n})(ErrorCode || (ErrorCode = {}));\nexport var ClientCapabilities;\n(function (ClientCapabilities) {\n ClientCapabilities.LATEST = {\n textDocument: {\n completion: {\n completionItem: {\n documentationFormat: [MarkupKind.Markdown, MarkupKind.PlainText],\n commitCharactersSupport: true\n }\n }\n }\n };\n})(ClientCapabilities || (ClientCapabilities = {}));\n","/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nfunction format(message, args) {\r\n var result;\r\n if (args.length === 0) {\r\n result = message;\r\n }\r\n else {\r\n result = message.replace(/\\{(\\d+)\\}/g, function (match, rest) {\r\n var index = rest[0];\r\n return typeof args[index] !== 'undefined' ? args[index] : match;\r\n });\r\n }\r\n return result;\r\n}\r\nfunction localize(key, message) {\r\n var args = [];\r\n for (var _i = 2; _i < arguments.length; _i++) {\r\n args[_i - 2] = arguments[_i];\r\n }\r\n return format(message, args);\r\n}\r\nexport function loadMessageBundle(file) {\r\n return localize;\r\n}\r\nexport function config(opt) {\r\n return loadMessageBundle;\r\n}\r\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nimport * as Json from './../../jsonc-parser/main.js';\nimport { isNumber, equals, isBoolean, isString, isDefined } from '../utils/objects.js';\nimport { extendedRegExp } from '../utils/strings.js';\nimport { ErrorCode, Diagnostic, DiagnosticSeverity, Range } from '../jsonLanguageTypes.js';\nimport * as nls from './../../../fillers/vscode-nls.js';\nvar localize = nls.loadMessageBundle();\nvar formats = {\n 'color-hex': { errorMessage: localize('colorHexFormatWarning', 'Invalid color format. Use #RGB, #RGBA, #RRGGBB or #RRGGBBAA.'), pattern: /^#([0-9A-Fa-f]{3,4}|([0-9A-Fa-f]{2}){3,4})$/ },\n 'date-time': { errorMessage: localize('dateTimeFormatWarning', 'String is not a RFC3339 date-time.'), pattern: /^(\\d{4})-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])T([01][0-9]|2[0-3]):([0-5][0-9]):([0-5][0-9]|60)(\\.[0-9]+)?(Z|(\\+|-)([01][0-9]|2[0-3]):([0-5][0-9]))$/i },\n 'date': { errorMessage: localize('dateFormatWarning', 'String is not a RFC3339 date.'), pattern: /^(\\d{4})-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])$/i },\n 'time': { errorMessage: localize('timeFormatWarning', 'String is not a RFC3339 time.'), pattern: /^([01][0-9]|2[0-3]):([0-5][0-9]):([0-5][0-9]|60)(\\.[0-9]+)?(Z|(\\+|-)([01][0-9]|2[0-3]):([0-5][0-9]))$/i },\n 'email': { errorMessage: localize('emailFormatWarning', 'String is not an e-mail address.'), pattern: /^(([^<>()\\[\\]\\\\.,;:\\s@\"]+(\\.[^<>()\\[\\]\\\\.,;:\\s@\"]+)*)|(\".+\"))@((\\[[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}])|(([a-zA-Z\\-0-9]+\\.)+[a-zA-Z]{2,}))$/ }\n};\nvar ASTNodeImpl = /** @class */ (function () {\n function ASTNodeImpl(parent, offset, length) {\n if (length === void 0) { length = 0; }\n this.offset = offset;\n this.length = length;\n this.parent = parent;\n }\n Object.defineProperty(ASTNodeImpl.prototype, \"children\", {\n get: function () {\n return [];\n },\n enumerable: false,\n configurable: true\n });\n ASTNodeImpl.prototype.toString = function () {\n return 'type: ' + this.type + ' (' + this.offset + '/' + this.length + ')' + (this.parent ? ' parent: {' + this.parent.toString() + '}' : '');\n };\n return ASTNodeImpl;\n}());\nexport { ASTNodeImpl };\nvar NullASTNodeImpl = /** @class */ (function (_super) {\n __extends(NullASTNodeImpl, _super);\n function NullASTNodeImpl(parent, offset) {\n var _this = _super.call(this, parent, offset) || this;\n _this.type = 'null';\n _this.value = null;\n return _this;\n }\n return NullASTNodeImpl;\n}(ASTNodeImpl));\nexport { NullASTNodeImpl };\nvar BooleanASTNodeImpl = /** @class */ (function (_super) {\n __extends(BooleanASTNodeImpl, _super);\n function BooleanASTNodeImpl(parent, boolValue, offset) {\n var _this = _super.call(this, parent, offset) || this;\n _this.type = 'boolean';\n _this.value = boolValue;\n return _this;\n }\n return BooleanASTNodeImpl;\n}(ASTNodeImpl));\nexport { BooleanASTNodeImpl };\nvar ArrayASTNodeImpl = /** @class */ (function (_super) {\n __extends(ArrayASTNodeImpl, _super);\n function ArrayASTNodeImpl(parent, offset) {\n var _this = _super.call(this, parent, offset) || this;\n _this.type = 'array';\n _this.items = [];\n return _this;\n }\n Object.defineProperty(ArrayASTNodeImpl.prototype, \"children\", {\n get: function () {\n return this.items;\n },\n enumerable: false,\n configurable: true\n });\n return ArrayASTNodeImpl;\n}(ASTNodeImpl));\nexport { ArrayASTNodeImpl };\nvar NumberASTNodeImpl = /** @class */ (function (_super) {\n __extends(NumberASTNodeImpl, _super);\n function NumberASTNodeImpl(parent, offset) {\n var _this = _super.call(this, parent, offset) || this;\n _this.type = 'number';\n _this.isInteger = true;\n _this.value = Number.NaN;\n return _this;\n }\n return NumberASTNodeImpl;\n}(ASTNodeImpl));\nexport { NumberASTNodeImpl };\nvar StringASTNodeImpl = /** @class */ (function (_super) {\n __extends(StringASTNodeImpl, _super);\n function StringASTNodeImpl(parent, offset, length) {\n var _this = _super.call(this, parent, offset, length) || this;\n _this.type = 'string';\n _this.value = '';\n return _this;\n }\n return StringASTNodeImpl;\n}(ASTNodeImpl));\nexport { StringASTNodeImpl };\nvar PropertyASTNodeImpl = /** @class */ (function (_super) {\n __extends(PropertyASTNodeImpl, _super);\n function PropertyASTNodeImpl(parent, offset, keyNode) {\n var _this = _super.call(this, parent, offset) || this;\n _this.type = 'property';\n _this.colonOffset = -1;\n _this.keyNode = keyNode;\n return _this;\n }\n Object.defineProperty(PropertyASTNodeImpl.prototype, \"children\", {\n get: function () {\n return this.valueNode ? [this.keyNode, this.valueNode] : [this.keyNode];\n },\n enumerable: false,\n configurable: true\n });\n return PropertyASTNodeImpl;\n}(ASTNodeImpl));\nexport { PropertyASTNodeImpl };\nvar ObjectASTNodeImpl = /** @class */ (function (_super) {\n __extends(ObjectASTNodeImpl, _super);\n function ObjectASTNodeImpl(parent, offset) {\n var _this = _super.call(this, parent, offset) || this;\n _this.type = 'object';\n _this.properties = [];\n return _this;\n }\n Object.defineProperty(ObjectASTNodeImpl.prototype, \"children\", {\n get: function () {\n return this.properties;\n },\n enumerable: false,\n configurable: true\n });\n return ObjectASTNodeImpl;\n}(ASTNodeImpl));\nexport { ObjectASTNodeImpl };\nexport function asSchema(schema) {\n if (isBoolean(schema)) {\n return schema ? {} : { \"not\": {} };\n }\n return schema;\n}\nexport var EnumMatch;\n(function (EnumMatch) {\n EnumMatch[EnumMatch[\"Key\"] = 0] = \"Key\";\n EnumMatch[EnumMatch[\"Enum\"] = 1] = \"Enum\";\n})(EnumMatch || (EnumMatch = {}));\nvar SchemaCollector = /** @class */ (function () {\n function SchemaCollector(focusOffset, exclude) {\n if (focusOffset === void 0) { focusOffset = -1; }\n this.focusOffset = focusOffset;\n this.exclude = exclude;\n this.schemas = [];\n }\n SchemaCollector.prototype.add = function (schema) {\n this.schemas.push(schema);\n };\n SchemaCollector.prototype.merge = function (other) {\n Array.prototype.push.apply(this.schemas, other.schemas);\n };\n SchemaCollector.prototype.include = function (node) {\n return (this.focusOffset === -1 || contains(node, this.focusOffset)) && (node !== this.exclude);\n };\n SchemaCollector.prototype.newSub = function () {\n return new SchemaCollector(-1, this.exclude);\n };\n return SchemaCollector;\n}());\nvar NoOpSchemaCollector = /** @class */ (function () {\n function NoOpSchemaCollector() {\n }\n Object.defineProperty(NoOpSchemaCollector.prototype, \"schemas\", {\n get: function () { return []; },\n enumerable: false,\n configurable: true\n });\n NoOpSchemaCollector.prototype.add = function (schema) { };\n NoOpSchemaCollector.prototype.merge = function (other) { };\n NoOpSchemaCollector.prototype.include = function (node) { return true; };\n NoOpSchemaCollector.prototype.newSub = function () { return this; };\n NoOpSchemaCollector.instance = new NoOpSchemaCollector();\n return NoOpSchemaCollector;\n}());\nvar ValidationResult = /** @class */ (function () {\n function ValidationResult() {\n this.problems = [];\n this.propertiesMatches = 0;\n this.propertiesValueMatches = 0;\n this.primaryValueMatches = 0;\n this.enumValueMatch = false;\n this.enumValues = undefined;\n }\n ValidationResult.prototype.hasProblems = function () {\n return !!this.problems.length;\n };\n ValidationResult.prototype.mergeAll = function (validationResults) {\n for (var _i = 0, validationResults_1 = validationResults; _i < validationResults_1.length; _i++) {\n var validationResult = validationResults_1[_i];\n this.merge(validationResult);\n }\n };\n ValidationResult.prototype.merge = function (validationResult) {\n this.problems = this.problems.concat(validationResult.problems);\n };\n ValidationResult.prototype.mergeEnumValues = function (validationResult) {\n if (!this.enumValueMatch && !validationResult.enumValueMatch && this.enumValues && validationResult.enumValues) {\n this.enumValues = this.enumValues.concat(validationResult.enumValues);\n for (var _i = 0, _a = this.problems; _i < _a.length; _i++) {\n var error = _a[_i];\n if (error.code === ErrorCode.EnumValueMismatch) {\n error.message = localize('enumWarning', 'Value is not accepted. Valid values: {0}.', this.enumValues.map(function (v) { return JSON.stringify(v); }).join(', '));\n }\n }\n }\n };\n ValidationResult.prototype.mergePropertyMatch = function (propertyValidationResult) {\n this.merge(propertyValidationResult);\n this.propertiesMatches++;\n if (propertyValidationResult.enumValueMatch || !propertyValidationResult.hasProblems() && propertyValidationResult.propertiesMatches) {\n this.propertiesValueMatches++;\n }\n if (propertyValidationResult.enumValueMatch && propertyValidationResult.enumValues && propertyValidationResult.enumValues.length === 1) {\n this.primaryValueMatches++;\n }\n };\n ValidationResult.prototype.compare = function (other) {\n var hasProblems = this.hasProblems();\n if (hasProblems !== other.hasProblems()) {\n return hasProblems ? -1 : 1;\n }\n if (this.enumValueMatch !== other.enumValueMatch) {\n return other.enumValueMatch ? -1 : 1;\n }\n if (this.primaryValueMatches !== other.primaryValueMatches) {\n return this.primaryValueMatches - other.primaryValueMatches;\n }\n if (this.propertiesValueMatches !== other.propertiesValueMatches) {\n return this.propertiesValueMatches - other.propertiesValueMatches;\n }\n return this.propertiesMatches - other.propertiesMatches;\n };\n return ValidationResult;\n}());\nexport { ValidationResult };\nexport function newJSONDocument(root, diagnostics) {\n if (diagnostics === void 0) { diagnostics = []; }\n return new JSONDocument(root, diagnostics, []);\n}\nexport function getNodeValue(node) {\n return Json.getNodeValue(node);\n}\nexport function getNodePath(node) {\n return Json.getNodePath(node);\n}\nexport function contains(node, offset, includeRightBound) {\n if (includeRightBound === void 0) { includeRightBound = false; }\n return offset >= node.offset && offset < (node.offset + node.length) || includeRightBound && offset === (node.offset + node.length);\n}\nvar JSONDocument = /** @class */ (function () {\n function JSONDocument(root, syntaxErrors, comments) {\n if (syntaxErrors === void 0) { syntaxErrors = []; }\n if (comments === void 0) { comments = []; }\n this.root = root;\n this.syntaxErrors = syntaxErrors;\n this.comments = comments;\n }\n JSONDocument.prototype.getNodeFromOffset = function (offset, includeRightBound) {\n if (includeRightBound === void 0) { includeRightBound = false; }\n if (this.root) {\n return Json.findNodeAtOffset(this.root, offset, includeRightBound);\n }\n return undefined;\n };\n JSONDocument.prototype.visit = function (visitor) {\n if (this.root) {\n var doVisit_1 = function (node) {\n var ctn = visitor(node);\n var children = node.children;\n if (Array.isArray(children)) {\n for (var i = 0; i < children.length && ctn; i++) {\n ctn = doVisit_1(children[i]);\n }\n }\n return ctn;\n };\n doVisit_1(this.root);\n }\n };\n JSONDocument.prototype.validate = function (textDocument, schema, severity) {\n if (severity === void 0) { severity = DiagnosticSeverity.Warning; }\n if (this.root && schema) {\n var validationResult = new ValidationResult();\n validate(this.root, schema, validationResult, NoOpSchemaCollector.instance);\n return validationResult.problems.map(function (p) {\n var _a;\n var range = Range.create(textDocument.positionAt(p.location.offset), textDocument.positionAt(p.location.offset + p.location.length));\n return Diagnostic.create(range, p.message, (_a = p.severity) !== null && _a !== void 0 ? _a : severity, p.code);\n });\n }\n return undefined;\n };\n JSONDocument.prototype.getMatchingSchemas = function (schema, focusOffset, exclude) {\n if (focusOffset === void 0) { focusOffset = -1; }\n var matchingSchemas = new SchemaCollector(focusOffset, exclude);\n if (this.root && schema) {\n validate(this.root, schema, new ValidationResult(), matchingSchemas);\n }\n return matchingSchemas.schemas;\n };\n return JSONDocument;\n}());\nexport { JSONDocument };\nfunction validate(n, schema, validationResult, matchingSchemas) {\n if (!n || !matchingSchemas.include(n)) {\n return;\n }\n var node = n;\n switch (node.type) {\n case 'object':\n _validateObjectNode(node, schema, validationResult, matchingSchemas);\n break;\n case 'array':\n _validateArrayNode(node, schema, validationResult, matchingSchemas);\n break;\n case 'string':\n _validateStringNode(node, schema, validationResult, matchingSchemas);\n break;\n case 'number':\n _validateNumberNode(node, schema, validationResult, matchingSchemas);\n break;\n case 'property':\n return validate(node.valueNode, schema, validationResult, matchingSchemas);\n }\n _validateNode();\n matchingSchemas.add({ node: node, schema: schema });\n function _validateNode() {\n function matchesType(type) {\n return node.type === type || (type === 'integer' && node.type === 'number' && node.isInteger);\n }\n if (Array.isArray(schema.type)) {\n if (!schema.type.some(matchesType)) {\n validationResult.problems.push({\n location: { offset: node.offset, length: node.length },\n message: schema.errorMessage || localize('typeArrayMismatchWarning', 'Incorrect type. Expected one of {0}.', schema.type.join(', '))\n });\n }\n }\n else if (schema.type) {\n if (!matchesType(schema.type)) {\n validationResult.problems.push({\n location: { offset: node.offset, length: node.length },\n message: schema.errorMessage || localize('typeMismatchWarning', 'Incorrect type. Expected \"{0}\".', schema.type)\n });\n }\n }\n if (Array.isArray(schema.allOf)) {\n for (var _i = 0, _a = schema.allOf; _i < _a.length; _i++) {\n var subSchemaRef = _a[_i];\n validate(node, asSchema(subSchemaRef), validationResult, matchingSchemas);\n }\n }\n var notSchema = asSchema(schema.not);\n if (notSchema) {\n var subValidationResult = new ValidationResult();\n var subMatchingSchemas = matchingSchemas.newSub();\n validate(node, notSchema, subValidationResult, subMatchingSchemas);\n if (!subValidationResult.hasProblems()) {\n validationResult.problems.push({\n location: { offset: node.offset, length: node.length },\n message: localize('notSchemaWarning', \"Matches a schema that is not allowed.\")\n });\n }\n for (var _b = 0, _c = subMatchingSchemas.schemas; _b < _c.length; _b++) {\n var ms = _c[_b];\n ms.inverted = !ms.inverted;\n matchingSchemas.add(ms);\n }\n }\n var testAlternatives = function (alternatives, maxOneMatch) {\n var matches = [];\n // remember the best match that is used for error messages\n var bestMatch = undefined;\n for (var _i = 0, alternatives_1 = alternatives; _i < alternatives_1.length; _i++) {\n var subSchemaRef = alternatives_1[_i];\n var subSchema = asSchema(subSchemaRef);\n var subValidationResult = new ValidationResult();\n var subMatchingSchemas = matchingSchemas.newSub();\n validate(node, subSchema, subValidationResult, subMatchingSchemas);\n if (!subValidationResult.hasProblems()) {\n matches.push(subSchema);\n }\n if (!bestMatch) {\n bestMatch = { schema: subSchema, validationResult: subValidationResult, matchingSchemas: subMatchingSchemas };\n }\n else {\n if (!maxOneMatch && !subValidationResult.hasProblems() && !bestMatch.validationResult.hasProblems()) {\n // no errors, both are equally good matches\n bestMatch.matchingSchemas.merge(subMatchingSchemas);\n bestMatch.validationResult.propertiesMatches += subValidationResult.propertiesMatches;\n bestMatch.validationResult.propertiesValueMatches += subValidationResult.propertiesValueMatches;\n }\n else {\n var compareResult = subValidationResult.compare(bestMatch.validationResult);\n if (compareResult > 0) {\n // our node is the best matching so far\n bestMatch = { schema: subSchema, validationResult: subValidationResult, matchingSchemas: subMatchingSchemas };\n }\n else if (compareResult === 0) {\n // there's already a best matching but we are as good\n bestMatch.matchingSchemas.merge(subMatchingSchemas);\n bestMatch.validationResult.mergeEnumValues(subValidationResult);\n }\n }\n }\n }\n if (matches.length > 1 && maxOneMatch) {\n validationResult.problems.push({\n location: { offset: node.offset, length: 1 },\n message: localize('oneOfWarning', \"Matches multiple schemas when only one must validate.\")\n });\n }\n if (bestMatch) {\n validationResult.merge(bestMatch.validationResult);\n validationResult.propertiesMatches += bestMatch.validationResult.propertiesMatches;\n validationResult.propertiesValueMatches += bestMatch.validationResult.propertiesValueMatches;\n matchingSchemas.merge(bestMatch.matchingSchemas);\n }\n return matches.length;\n };\n if (Array.isArray(schema.anyOf)) {\n testAlternatives(schema.anyOf, false);\n }\n if (Array.isArray(schema.oneOf)) {\n testAlternatives(schema.oneOf, true);\n }\n var testBranch = function (schema) {\n var subValidationResult = new ValidationResult();\n var subMatchingSchemas = matchingSchemas.newSub();\n validate(node, asSchema(schema), subValidationResult, subMatchingSchemas);\n validationResult.merge(subValidationResult);\n validationResult.propertiesMatches += subValidationResult.propertiesMatches;\n validationResult.propertiesValueMatches += subValidationResult.propertiesValueMatches;\n matchingSchemas.merge(subMatchingSchemas);\n };\n var testCondition = function (ifSchema, thenSchema, elseSchema) {\n var subSchema = asSchema(ifSchema);\n var subValidationResult = new ValidationResult();\n var subMatchingSchemas = matchingSchemas.newSub();\n validate(node, subSchema, subValidationResult, subMatchingSchemas);\n matchingSchemas.merge(subMatchingSchemas);\n if (!subValidationResult.hasProblems()) {\n if (thenSchema) {\n testBranch(thenSchema);\n }\n }\n else if (elseSchema) {\n testBranch(elseSchema);\n }\n };\n var ifSchema = asSchema(schema.if);\n if (ifSchema) {\n testCondition(ifSchema, asSchema(schema.then), asSchema(schema.else));\n }\n if (Array.isArray(schema.enum)) {\n var val = getNodeValue(node);\n var enumValueMatch = false;\n for (var _d = 0, _e = schema.enum; _d < _e.length; _d++) {\n var e = _e[_d];\n if (equals(val, e)) {\n enumValueMatch = true;\n break;\n }\n }\n validationResult.enumValues = schema.enum;\n validationResult.enumValueMatch = enumValueMatch;\n if (!enumValueMatch) {\n validationResult.problems.push({\n location: { offset: node.offset, length: node.length },\n code: ErrorCode.EnumValueMismatch,\n message: schema.errorMessage || localize('enumWarning', 'Value is not accepted. Valid values: {0}.', schema.enum.map(function (v) { return JSON.stringify(v); }).join(', '))\n });\n }\n }\n if (isDefined(schema.const)) {\n var val = getNodeValue(node);\n if (!equals(val, schema.const)) {\n validationResult.problems.push({\n location: { offset: node.offset, length: node.length },\n code: ErrorCode.EnumValueMismatch,\n message: schema.errorMessage || localize('constWarning', 'Value must be {0}.', JSON.stringify(schema.const))\n });\n validationResult.enumValueMatch = false;\n }\n else {\n validationResult.enumValueMatch = true;\n }\n validationResult.enumValues = [schema.const];\n }\n if (schema.deprecationMessage && node.parent) {\n validationResult.problems.push({\n location: { offset: node.parent.offset, length: node.parent.length },\n severity: DiagnosticSeverity.Warning,\n message: schema.deprecationMessage,\n code: ErrorCode.Deprecated\n });\n }\n }\n function _validateNumberNode(node, schema, validationResult, matchingSchemas) {\n var val = node.value;\n function normalizeFloats(float) {\n var _a;\n var parts = /^(-?\\d+)(?:\\.(\\d+))?(?:e([-+]\\d+))?$/.exec(float.toString());\n return parts && {\n value: Number(parts[1] + (parts[2] || '')),\n multiplier: (((_a = parts[2]) === null || _a === void 0 ? void 0 : _a.length) || 0) - (parseInt(parts[3]) || 0)\n };\n }\n ;\n if (isNumber(schema.multipleOf)) {\n var remainder = -1;\n if (Number.isInteger(schema.multipleOf)) {\n remainder = val % schema.multipleOf;\n }\n else {\n var normMultipleOf = normalizeFloats(schema.multipleOf);\n var normValue = normalizeFloats(val);\n if (normMultipleOf && normValue) {\n var multiplier = Math.pow(10, Math.abs(normValue.multiplier - normMultipleOf.multiplier));\n if (normValue.multiplier < normMultipleOf.multiplier) {\n normValue.value *= multiplier;\n }\n else {\n normMultipleOf.value *= multiplier;\n }\n remainder = normValue.value % normMultipleOf.value;\n }\n }\n if (remainder !== 0) {\n validationResult.problems.push({\n location: { offset: node.offset, length: node.length },\n message: localize('multipleOfWarning', 'Value is not divisible by {0}.', schema.multipleOf)\n });\n }\n }\n function getExclusiveLimit(limit, exclusive) {\n if (isNumber(exclusive)) {\n return exclusive;\n }\n if (isBoolean(exclusive) && exclusive) {\n return limit;\n }\n return undefined;\n }\n function getLimit(limit, exclusive) {\n if (!isBoolean(exclusive) || !exclusive) {\n return limit;\n }\n return undefined;\n }\n var exclusiveMinimum = getExclusiveLimit(schema.minimum, schema.exclusiveMinimum);\n if (isNumber(exclusiveMinimum) && val <= exclusiveMinimum) {\n validationResult.problems.push({\n location: { offset: node.offset, length: node.length },\n message: localize('exclusiveMinimumWarning', 'Value is below the exclusive minimum of {0}.', exclusiveMinimum)\n });\n }\n var exclusiveMaximum = getExclusiveLimit(schema.maximum, schema.exclusiveMaximum);\n if (isNumber(exclusiveMaximum) && val >= exclusiveMaximum) {\n validationResult.problems.push({\n location: { offset: node.offset, length: node.length },\n message: localize('exclusiveMaximumWarning', 'Value is above the exclusive maximum of {0}.', exclusiveMaximum)\n });\n }\n var minimum = getLimit(schema.minimum, schema.exclusiveMinimum);\n if (isNumber(minimum) && val < minimum) {\n validationResult.problems.push({\n location: { offset: node.offset, length: node.length },\n message: localize('minimumWarning', 'Value is below the minimum of {0}.', minimum)\n });\n }\n var maximum = getLimit(schema.maximum, schema.exclusiveMaximum);\n if (isNumber(maximum) && val > maximum) {\n validationResult.problems.push({\n location: { offset: node.offset, length: node.length },\n message: localize('maximumWarning', 'Value is above the maximum of {0}.', maximum)\n });\n }\n }\n function _validateStringNode(node, schema, validationResult, matchingSchemas) {\n if (isNumber(schema.minLength) && node.value.length < schema.minLength) {\n validationResult.problems.push({\n location: { offset: node.offset, length: node.length },\n message: localize('minLengthWarning', 'String is shorter than the minimum length of {0}.', schema.minLength)\n });\n }\n if (isNumber(schema.maxLength) && node.value.length > schema.maxLength) {\n validationResult.problems.push({\n location: { offset: node.offset, length: node.length },\n message: localize('maxLengthWarning', 'String is longer than the maximum length of {0}.', schema.maxLength)\n });\n }\n if (isString(schema.pattern)) {\n var regex = extendedRegExp(schema.pattern);\n if (!regex.test(node.value)) {\n validationResult.problems.push({\n location: { offset: node.offset, length: node.length },\n message: schema.patternErrorMessage || schema.errorMessage || localize('patternWarning', 'String does not match the pattern of \"{0}\".', schema.pattern)\n });\n }\n }\n if (schema.format) {\n switch (schema.format) {\n case 'uri':\n case 'uri-reference':\n {\n var errorMessage = void 0;\n if (!node.value) {\n errorMessage = localize('uriEmpty', 'URI expected.');\n }\n else {\n var match = /^(([^:/?#]+?):)?(\\/\\/([^/?#]*))?([^?#]*)(\\?([^#]*))?(#(.*))?/.exec(node.value);\n if (!match) {\n errorMessage = localize('uriMissing', 'URI is expected.');\n }\n else if (!match[2] && schema.format === 'uri') {\n errorMessage = localize('uriSchemeMissing', 'URI with a scheme is expected.');\n }\n }\n if (errorMessage) {\n validationResult.problems.push({\n location: { offset: node.offset, length: node.length },\n message: schema.patternErrorMessage || schema.errorMessage || localize('uriFormatWarning', 'String is not a URI: {0}', errorMessage)\n });\n }\n }\n break;\n case 'color-hex':\n case 'date-time':\n case 'date':\n case 'time':\n case 'email':\n var format = formats[schema.format];\n if (!node.value || !format.pattern.exec(node.value)) {\n validationResult.problems.push({\n location: { offset: node.offset, length: node.length },\n message: schema.patternErrorMessage || schema.errorMessage || format.errorMessage\n });\n }\n default:\n }\n }\n }\n function _validateArrayNode(node, schema, validationResult, matchingSchemas) {\n if (Array.isArray(schema.items)) {\n var subSchemas = schema.items;\n for (var index = 0; index < subSchemas.length; index++) {\n var subSchemaRef = subSchemas[index];\n var subSchema = asSchema(subSchemaRef);\n var itemValidationResult = new ValidationResult();\n var item = node.items[index];\n if (item) {\n validate(item, subSchema, itemValidationResult, matchingSchemas);\n validationResult.mergePropertyMatch(itemValidationResult);\n }\n else if (node.items.length >= subSchemas.length) {\n validationResult.propertiesValueMatches++;\n }\n }\n if (node.items.length > subSchemas.length) {\n if (typeof schema.additionalItems === 'object') {\n for (var i = subSchemas.length; i < node.items.length; i++) {\n var itemValidationResult = new ValidationResult();\n validate(node.items[i], schema.additionalItems, itemValidationResult, matchingSchemas);\n validationResult.mergePropertyMatch(itemValidationResult);\n }\n }\n else if (schema.additionalItems === false) {\n validationResult.problems.push({\n location: { offset: node.offset, length: node.length },\n message: localize('additionalItemsWarning', 'Array has too many items according to schema. Expected {0} or fewer.', subSchemas.length)\n });\n }\n }\n }\n else {\n var itemSchema = asSchema(schema.items);\n if (itemSchema) {\n for (var _i = 0, _a = node.items; _i < _a.length; _i++) {\n var item = _a[_i];\n var itemValidationResult = new ValidationResult();\n validate(item, itemSchema, itemValidationResult, matchingSchemas);\n validationResult.mergePropertyMatch(itemValidationResult);\n }\n }\n }\n var containsSchema = asSchema(schema.contains);\n if (containsSchema) {\n var doesContain = node.items.some(function (item) {\n var itemValidationResult = new ValidationResult();\n validate(item, containsSchema, itemValidationResult, NoOpSchemaCollector.instance);\n return !itemValidationResult.hasProblems();\n });\n if (!doesContain) {\n validationResult.problems.push({\n location: { offset: node.offset, length: node.length },\n message: schema.errorMessage || localize('requiredItemMissingWarning', 'Array does not contain required item.')\n });\n }\n }\n if (isNumber(schema.minItems) && node.items.length < schema.minItems) {\n validationResult.problems.push({\n location: { offset: node.offset, length: node.length },\n message: localize('minItemsWarning', 'Array has too few items. Expected {0} or more.', schema.minItems)\n });\n }\n if (isNumber(schema.maxItems) && node.items.length > schema.maxItems) {\n validationResult.problems.push({\n location: { offset: node.offset, length: node.length },\n message: localize('maxItemsWarning', 'Array has too many items. Expected {0} or fewer.', schema.maxItems)\n });\n }\n if (schema.uniqueItems === true) {\n var values_1 = getNodeValue(node);\n var duplicates = values_1.some(function (value, index) {\n return index !== values_1.lastIndexOf(value);\n });\n if (duplicates) {\n validationResult.problems.push({\n location: { offset: node.offset, length: node.length },\n message: localize('uniqueItemsWarning', 'Array has duplicate items.')\n });\n }\n }\n }\n function _validateObjectNode(node, schema, validationResult, matchingSchemas) {\n var seenKeys = Object.create(null);\n var unprocessedProperties = [];\n for (var _i = 0, _a = node.properties; _i < _a.length; _i++) {\n var propertyNode = _a[_i];\n var key = propertyNode.keyNode.value;\n seenKeys[key] = propertyNode.valueNode;\n unprocessedProperties.push(key);\n }\n if (Array.isArray(schema.required)) {\n for (var _b = 0, _c = schema.required; _b < _c.length; _b++) {\n var propertyName = _c[_b];\n if (!seenKeys[propertyName]) {\n var keyNode = node.parent && node.parent.type === 'property' && node.parent.keyNode;\n var location = keyNode ? { offset: keyNode.offset, length: keyNode.length } : { offset: node.offset, length: 1 };\n validationResult.problems.push({\n location: location,\n message: localize('MissingRequiredPropWarning', 'Missing property \"{0}\".', propertyName)\n });\n }\n }\n }\n var propertyProcessed = function (prop) {\n var index = unprocessedProperties.indexOf(prop);\n while (index >= 0) {\n unprocessedProperties.splice(index, 1);\n index = unprocessedProperties.indexOf(prop);\n }\n };\n if (schema.properties) {\n for (var _d = 0, _e = Object.keys(schema.properties); _d < _e.length; _d++) {\n var propertyName = _e[_d];\n propertyProcessed(propertyName);\n var propertySchema = schema.properties[propertyName];\n var child = seenKeys[propertyName];\n if (child) {\n if (isBoolean(propertySchema)) {\n if (!propertySchema) {\n var propertyNode = child.parent;\n validationResult.problems.push({\n location: { offset: propertyNode.keyNode.offset, length: propertyNode.keyNode.length },\n message: schema.errorMessage || localize('DisallowedExtraPropWarning', 'Property {0} is not allowed.', propertyName)\n });\n }\n else {\n validationResult.propertiesMatches++;\n validationResult.propertiesValueMatches++;\n }\n }\n else {\n var propertyValidationResult = new ValidationResult();\n validate(child, propertySchema, propertyValidationResult, matchingSchemas);\n validationResult.mergePropertyMatch(propertyValidationResult);\n }\n }\n }\n }\n if (schema.patternProperties) {\n for (var _f = 0, _g = Object.keys(schema.patternProperties); _f < _g.length; _f++) {\n var propertyPattern = _g[_f];\n var regex = extendedRegExp(propertyPattern);\n for (var _h = 0, _j = unprocessedProperties.slice(0); _h < _j.length; _h++) {\n var propertyName = _j[_h];\n if (regex.test(propertyName)) {\n propertyProcessed(propertyName);\n var child = seenKeys[propertyName];\n if (child) {\n var propertySchema = schema.patternProperties[propertyPattern];\n if (isBoolean(propertySchema)) {\n if (!propertySchema) {\n var propertyNode = child.parent;\n validationResult.problems.push({\n location: { offset: propertyNode.keyNode.offset, length: propertyNode.keyNode.length },\n message: schema.errorMessage || localize('DisallowedExtraPropWarning', 'Property {0} is not allowed.', propertyName)\n });\n }\n else {\n validationResult.propertiesMatches++;\n validationResult.propertiesValueMatches++;\n }\n }\n else {\n var propertyValidationResult = new ValidationResult();\n validate(child, propertySchema, propertyValidationResult, matchingSchemas);\n validationResult.mergePropertyMatch(propertyValidationResult);\n }\n }\n }\n }\n }\n }\n if (typeof schema.additionalProperties === 'object') {\n for (var _k = 0, unprocessedProperties_1 = unprocessedProperties; _k < unprocessedProperties_1.length; _k++) {\n var propertyName = unprocessedProperties_1[_k];\n var child = seenKeys[propertyName];\n if (child) {\n var propertyValidationResult = new ValidationResult();\n validate(child, schema.additionalProperties, propertyValidationResult, matchingSchemas);\n validationResult.mergePropertyMatch(propertyValidationResult);\n }\n }\n }\n else if (schema.additionalProperties === false) {\n if (unprocessedProperties.length > 0) {\n for (var _l = 0, unprocessedProperties_2 = unprocessedProperties; _l < unprocessedProperties_2.length; _l++) {\n var propertyName = unprocessedProperties_2[_l];\n var child = seenKeys[propertyName];\n if (child) {\n var propertyNode = child.parent;\n validationResult.problems.push({\n location: { offset: propertyNode.keyNode.offset, length: propertyNode.keyNode.length },\n message: schema.errorMessage || localize('DisallowedExtraPropWarning', 'Property {0} is not allowed.', propertyName)\n });\n }\n }\n }\n }\n if (isNumber(schema.maxProperties)) {\n if (node.properties.length > schema.maxProperties) {\n validationResult.problems.push({\n location: { offset: node.offset, length: node.length },\n message: localize('MaxPropWarning', 'Object has more properties than limit of {0}.', schema.maxProperties)\n });\n }\n }\n if (isNumber(schema.minProperties)) {\n if (node.properties.length < schema.minProperties) {\n validationResult.problems.push({\n location: { offset: node.offset, length: node.length },\n message: localize('MinPropWarning', 'Object has fewer properties than the required number of {0}', schema.minProperties)\n });\n }\n }\n if (schema.dependencies) {\n for (var _m = 0, _o = Object.keys(schema.dependencies); _m < _o.length; _m++) {\n var key = _o[_m];\n var prop = seenKeys[key];\n if (prop) {\n var propertyDep = schema.dependencies[key];\n if (Array.isArray(propertyDep)) {\n for (var _p = 0, propertyDep_1 = propertyDep; _p < propertyDep_1.length; _p++) {\n var requiredProp = propertyDep_1[_p];\n if (!seenKeys[requiredProp]) {\n validationResult.problems.push({\n location: { offset: node.offset, length: node.length },\n message: localize('RequiredDependentPropWarning', 'Object is missing property {0} required by property {1}.', requiredProp, key)\n });\n }\n else {\n validationResult.propertiesValueMatches++;\n }\n }\n }\n else {\n var propertySchema = asSchema(propertyDep);\n if (propertySchema) {\n var propertyValidationResult = new ValidationResult();\n validate(node, propertySchema, propertyValidationResult, matchingSchemas);\n validationResult.mergePropertyMatch(propertyValidationResult);\n }\n }\n }\n }\n }\n var propertyNames = asSchema(schema.propertyNames);\n if (propertyNames) {\n for (var _q = 0, _r = node.properties; _q < _r.length; _q++) {\n var f = _r[_q];\n var key = f.keyNode;\n if (key) {\n validate(key, propertyNames, validationResult, NoOpSchemaCollector.instance);\n }\n }\n }\n }\n}\nexport function parse(textDocument, config) {\n var problems = [];\n var lastProblemOffset = -1;\n var text = textDocument.getText();\n var scanner = Json.createScanner(text, false);\n var commentRanges = config && config.collectComments ? [] : undefined;\n function _scanNext() {\n while (true) {\n var token_1 = scanner.scan();\n _checkScanError();\n switch (token_1) {\n case 12 /* LineCommentTrivia */:\n case 13 /* BlockCommentTrivia */:\n if (Array.isArray(commentRanges)) {\n commentRanges.push(Range.create(textDocument.positionAt(scanner.getTokenOffset()), textDocument.positionAt(scanner.getTokenOffset() + scanner.getTokenLength())));\n }\n break;\n case 15 /* Trivia */:\n case 14 /* LineBreakTrivia */:\n break;\n default:\n return token_1;\n }\n }\n }\n function _accept(token) {\n if (scanner.getToken() === token) {\n _scanNext();\n return true;\n }\n return false;\n }\n function _errorAtRange(message, code, startOffset, endOffset, severity) {\n if (severity === void 0) { severity = DiagnosticSeverity.Error; }\n if (problems.length === 0 || startOffset !== lastProblemOffset) {\n var range = Range.create(textDocument.positionAt(startOffset), textDocument.positionAt(endOffset));\n problems.push(Diagnostic.create(range, message, severity, code, textDocument.languageId));\n lastProblemOffset = startOffset;\n }\n }\n function _error(message, code, node, skipUntilAfter, skipUntil) {\n if (node === void 0) { node = undefined; }\n if (skipUntilAfter === void 0) { skipUntilAfter = []; }\n if (skipUntil === void 0) { skipUntil = []; }\n var start = scanner.getTokenOffset();\n var end = scanner.getTokenOffset() + scanner.getTokenLength();\n if (start === end && start > 0) {\n start--;\n while (start > 0 && /\\s/.test(text.charAt(start))) {\n start--;\n }\n end = start + 1;\n }\n _errorAtRange(message, code, start, end);\n if (node) {\n _finalize(node, false);\n }\n if (skipUntilAfter.length + skipUntil.length > 0) {\n var token_2 = scanner.getToken();\n while (token_2 !== 17 /* EOF */) {\n if (skipUntilAfter.indexOf(token_2) !== -1) {\n _scanNext();\n break;\n }\n else if (skipUntil.indexOf(token_2) !== -1) {\n break;\n }\n token_2 = _scanNext();\n }\n }\n return node;\n }\n function _checkScanError() {\n switch (scanner.getTokenError()) {\n case 4 /* InvalidUnicode */:\n _error(localize('InvalidUnicode', 'Invalid unicode sequence in string.'), ErrorCode.InvalidUnicode);\n return true;\n case 5 /* InvalidEscapeCharacter */:\n _error(localize('InvalidEscapeCharacter', 'Invalid escape character in string.'), ErrorCode.InvalidEscapeCharacter);\n return true;\n case 3 /* UnexpectedEndOfNumber */:\n _error(localize('UnexpectedEndOfNumber', 'Unexpected end of number.'), ErrorCode.UnexpectedEndOfNumber);\n return true;\n case 1 /* UnexpectedEndOfComment */:\n _error(localize('UnexpectedEndOfComment', 'Unexpected end of comment.'), ErrorCode.UnexpectedEndOfComment);\n return true;\n case 2 /* UnexpectedEndOfString */:\n _error(localize('UnexpectedEndOfString', 'Unexpected end of string.'), ErrorCode.UnexpectedEndOfString);\n return true;\n case 6 /* InvalidCharacter */:\n _error(localize('InvalidCharacter', 'Invalid characters in string. Control characters must be escaped.'), ErrorCode.InvalidCharacter);\n return true;\n }\n return false;\n }\n function _finalize(node, scanNext) {\n node.length = scanner.getTokenOffset() + scanner.getTokenLength() - node.offset;\n if (scanNext) {\n _scanNext();\n }\n return node;\n }\n function _parseArray(parent) {\n if (scanner.getToken() !== 3 /* OpenBracketToken */) {\n return undefined;\n }\n var node = new ArrayASTNodeImpl(parent, scanner.getTokenOffset());\n _scanNext(); // consume OpenBracketToken\n var count = 0;\n var needsComma = false;\n while (scanner.getToken() !== 4 /* CloseBracketToken */ && scanner.getToken() !== 17 /* EOF */) {\n if (scanner.getToken() === 5 /* CommaToken */) {\n if (!needsComma) {\n _error(localize('ValueExpected', 'Value expected'), ErrorCode.ValueExpected);\n }\n var commaOffset = scanner.getTokenOffset();\n _scanNext(); // consume comma\n if (scanner.getToken() === 4 /* CloseBracketToken */) {\n if (needsComma) {\n _errorAtRange(localize('TrailingComma', 'Trailing comma'), ErrorCode.TrailingComma, commaOffset, commaOffset + 1);\n }\n continue;\n }\n }\n else if (needsComma) {\n _error(localize('ExpectedComma', 'Expected comma'), ErrorCode.CommaExpected);\n }\n var item = _parseValue(node);\n if (!item) {\n _error(localize('PropertyExpected', 'Value expected'), ErrorCode.ValueExpected, undefined, [], [4 /* CloseBracketToken */, 5 /* CommaToken */]);\n }\n else {\n node.items.push(item);\n }\n needsComma = true;\n }\n if (scanner.getToken() !== 4 /* CloseBracketToken */) {\n return _error(localize('ExpectedCloseBracket', 'Expected comma or closing bracket'), ErrorCode.CommaOrCloseBacketExpected, node);\n }\n return _finalize(node, true);\n }\n var keyPlaceholder = new StringASTNodeImpl(undefined, 0, 0);\n function _parseProperty(parent, keysSeen) {\n var node = new PropertyASTNodeImpl(parent, scanner.getTokenOffset(), keyPlaceholder);\n var key = _parseString(node);\n if (!key) {\n if (scanner.getToken() === 16 /* Unknown */) {\n // give a more helpful error message\n _error(localize('DoubleQuotesExpected', 'Property keys must be doublequoted'), ErrorCode.Undefined);\n var keyNode = new StringASTNodeImpl(node, scanner.getTokenOffset(), scanner.getTokenLength());\n keyNode.value = scanner.getTokenValue();\n key = keyNode;\n _scanNext(); // consume Unknown\n }\n else {\n return undefined;\n }\n }\n node.keyNode = key;\n var seen = keysSeen[key.value];\n if (seen) {\n _errorAtRange(localize('DuplicateKeyWarning', \"Duplicate object key\"), ErrorCode.DuplicateKey, node.keyNode.offset, node.keyNode.offset + node.keyNode.length, DiagnosticSeverity.Warning);\n if (typeof seen === 'object') {\n _errorAtRange(localize('DuplicateKeyWarning', \"Duplicate object key\"), ErrorCode.DuplicateKey, seen.keyNode.offset, seen.keyNode.offset + seen.keyNode.length, DiagnosticSeverity.Warning);\n }\n keysSeen[key.value] = true; // if the same key is duplicate again, avoid duplicate error reporting\n }\n else {\n keysSeen[key.value] = node;\n }\n if (scanner.getToken() === 6 /* ColonToken */) {\n node.colonOffset = scanner.getTokenOffset();\n _scanNext(); // consume ColonToken\n }\n else {\n _error(localize('ColonExpected', 'Colon expected'), ErrorCode.ColonExpected);\n if (scanner.getToken() === 10 /* StringLiteral */ && textDocument.positionAt(key.offset + key.length).line < textDocument.positionAt(scanner.getTokenOffset()).line) {\n node.length = key.length;\n return node;\n }\n }\n var value = _parseValue(node);\n if (!value) {\n return _error(localize('ValueExpected', 'Value expected'), ErrorCode.ValueExpected, node, [], [2 /* CloseBraceToken */, 5 /* CommaToken */]);\n }\n node.valueNode = value;\n node.length = value.offset + value.length - node.offset;\n return node;\n }\n function _parseObject(parent) {\n if (scanner.getToken() !== 1 /* OpenBraceToken */) {\n return undefined;\n }\n var node = new ObjectASTNodeImpl(parent, scanner.getTokenOffset());\n var keysSeen = Object.create(null);\n _scanNext(); // consume OpenBraceToken\n var needsComma = false;\n while (scanner.getToken() !== 2 /* CloseBraceToken */ && scanner.getToken() !== 17 /* EOF */) {\n if (scanner.getToken() === 5 /* CommaToken */) {\n if (!needsComma) {\n _error(localize('PropertyExpected', 'Property expected'), ErrorCode.PropertyExpected);\n }\n var commaOffset = scanner.getTokenOffset();\n _scanNext(); // consume comma\n if (scanner.getToken() === 2 /* CloseBraceToken */) {\n if (needsComma) {\n _errorAtRange(localize('TrailingComma', 'Trailing comma'), ErrorCode.TrailingComma, commaOffset, commaOffset + 1);\n }\n continue;\n }\n }\n else if (needsComma) {\n _error(localize('ExpectedComma', 'Expected comma'), ErrorCode.CommaExpected);\n }\n var property = _parseProperty(node, keysSeen);\n if (!property) {\n _error(localize('PropertyExpected', 'Property expected'), ErrorCode.PropertyExpected, undefined, [], [2 /* CloseBraceToken */, 5 /* CommaToken */]);\n }\n else {\n node.properties.push(property);\n }\n needsComma = true;\n }\n if (scanner.getToken() !== 2 /* CloseBraceToken */) {\n return _error(localize('ExpectedCloseBrace', 'Expected comma or closing brace'), ErrorCode.CommaOrCloseBraceExpected, node);\n }\n return _finalize(node, true);\n }\n function _parseString(parent) {\n if (scanner.getToken() !== 10 /* StringLiteral */) {\n return undefined;\n }\n var node = new StringASTNodeImpl(parent, scanner.getTokenOffset());\n node.value = scanner.getTokenValue();\n return _finalize(node, true);\n }\n function _parseNumber(parent) {\n if (scanner.getToken() !== 11 /* NumericLiteral */) {\n return undefined;\n }\n var node = new NumberASTNodeImpl(parent, scanner.getTokenOffset());\n if (scanner.getTokenError() === 0 /* None */) {\n var tokenValue = scanner.getTokenValue();\n try {\n var numberValue = JSON.parse(tokenValue);\n if (!isNumber(numberValue)) {\n return _error(localize('InvalidNumberFormat', 'Invalid number format.'), ErrorCode.Undefined, node);\n }\n node.value = numberValue;\n }\n catch (e) {\n return _error(localize('InvalidNumberFormat', 'Invalid number format.'), ErrorCode.Undefined, node);\n }\n node.isInteger = tokenValue.indexOf('.') === -1;\n }\n return _finalize(node, true);\n }\n function _parseLiteral(parent) {\n var node;\n switch (scanner.getToken()) {\n case 7 /* NullKeyword */:\n return _finalize(new NullASTNodeImpl(parent, scanner.getTokenOffset()), true);\n case 8 /* TrueKeyword */:\n return _finalize(new BooleanASTNodeImpl(parent, true, scanner.getTokenOffset()), true);\n case 9 /* FalseKeyword */:\n return _finalize(new BooleanASTNodeImpl(parent, false, scanner.getTokenOffset()), true);\n default:\n return undefined;\n }\n }\n function _parseValue(parent) {\n return _parseArray(parent) || _parseObject(parent) || _parseString(parent) || _parseNumber(parent) || _parseLiteral(parent);\n }\n var _root = undefined;\n var token = _scanNext();\n if (token !== 17 /* EOF */) {\n _root = _parseValue(_root);\n if (!_root) {\n _error(localize('Invalid symbol', 'Expected a JSON object, array or literal.'), ErrorCode.Undefined);\n }\n else if (scanner.getToken() !== 17 /* EOF */) {\n _error(localize('End of file expected', 'End of file expected.'), ErrorCode.Undefined);\n }\n }\n return new JSONDocument(_root, problems, commentRanges);\n}\n","/*---------------------------------------------------------------------------------------------\n* Copyright (c) Microsoft Corporation. All rights reserved.\n* Licensed under the MIT License. See License.txt in the project root for license information.\n*--------------------------------------------------------------------------------------------*/\nexport function stringifyObject(obj, indent, stringifyLiteral) {\n if (obj !== null && typeof obj === 'object') {\n var newIndent = indent + '\\t';\n if (Array.isArray(obj)) {\n if (obj.length === 0) {\n return '[]';\n }\n var result = '[\\n';\n for (var i = 0; i < obj.length; i++) {\n result += newIndent + stringifyObject(obj[i], newIndent, stringifyLiteral);\n if (i < obj.length - 1) {\n result += ',';\n }\n result += '\\n';\n }\n result += indent + ']';\n return result;\n }\n else {\n var keys = Object.keys(obj);\n if (keys.length === 0) {\n return '{}';\n }\n var result = '{\\n';\n for (var i = 0; i < keys.length; i++) {\n var key = keys[i];\n result += newIndent + JSON.stringify(key) + ': ' + stringifyObject(obj[key], newIndent, stringifyLiteral);\n if (i < keys.length - 1) {\n result += ',';\n }\n result += '\\n';\n }\n result += indent + '}';\n return result;\n }\n }\n return stringifyLiteral(obj);\n}\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\nimport * as Parser from '../parser/jsonParser.js';\nimport * as Json from './../../jsonc-parser/main.js';\nimport { stringifyObject } from '../utils/json.js';\nimport { endsWith, extendedRegExp } from '../utils/strings.js';\nimport { isDefined } from '../utils/objects.js';\nimport { CompletionItem, CompletionItemKind, Range, TextEdit, InsertTextFormat, MarkupKind } from '../jsonLanguageTypes.js';\nimport * as nls from './../../../fillers/vscode-nls.js';\nvar localize = nls.loadMessageBundle();\nvar valueCommitCharacters = [',', '}', ']'];\nvar propertyCommitCharacters = [':'];\nvar JSONCompletion = /** @class */ (function () {\n function JSONCompletion(schemaService, contributions, promiseConstructor, clientCapabilities) {\n if (contributions === void 0) { contributions = []; }\n if (promiseConstructor === void 0) { promiseConstructor = Promise; }\n if (clientCapabilities === void 0) { clientCapabilities = {}; }\n this.schemaService = schemaService;\n this.contributions = contributions;\n this.promiseConstructor = promiseConstructor;\n this.clientCapabilities = clientCapabilities;\n }\n JSONCompletion.prototype.doResolve = function (item) {\n for (var i = this.contributions.length - 1; i >= 0; i--) {\n var resolveCompletion = this.contributions[i].resolveCompletion;\n if (resolveCompletion) {\n var resolver = resolveCompletion(item);\n if (resolver) {\n return resolver;\n }\n }\n }\n return this.promiseConstructor.resolve(item);\n };\n JSONCompletion.prototype.doComplete = function (document, position, doc) {\n var _this = this;\n var result = {\n items: [],\n isIncomplete: false\n };\n var text = document.getText();\n var offset = document.offsetAt(position);\n var node = doc.getNodeFromOffset(offset, true);\n if (this.isInComment(document, node ? node.offset : 0, offset)) {\n return Promise.resolve(result);\n }\n if (node && (offset === node.offset + node.length) && offset > 0) {\n var ch = text[offset - 1];\n if (node.type === 'object' && ch === '}' || node.type === 'array' && ch === ']') {\n // after ] or }\n node = node.parent;\n }\n }\n var currentWord = this.getCurrentWord(document, offset);\n var overwriteRange;\n if (node && (node.type === 'string' || node.type === 'number' || node.type === 'boolean' || node.type === 'null')) {\n overwriteRange = Range.create(document.positionAt(node.offset), document.positionAt(node.offset + node.length));\n }\n else {\n var overwriteStart = offset - currentWord.length;\n if (overwriteStart > 0 && text[overwriteStart - 1] === '\"') {\n overwriteStart--;\n }\n overwriteRange = Range.create(document.positionAt(overwriteStart), position);\n }\n var supportsCommitCharacters = false; //this.doesSupportsCommitCharacters(); disabled for now, waiting for new API: https://github.com/microsoft/vscode/issues/42544\n var proposed = {};\n var collector = {\n add: function (suggestion) {\n var label = suggestion.label;\n var existing = proposed[label];\n if (!existing) {\n label = label.replace(/[\\n]/g, '↵');\n if (label.length > 60) {\n var shortendedLabel = label.substr(0, 57).trim() + '...';\n if (!proposed[shortendedLabel]) {\n label = shortendedLabel;\n }\n }\n if (overwriteRange && suggestion.insertText !== undefined) {\n suggestion.textEdit = TextEdit.replace(overwriteRange, suggestion.insertText);\n }\n if (supportsCommitCharacters) {\n suggestion.commitCharacters = suggestion.kind === CompletionItemKind.Property ? propertyCommitCharacters : valueCommitCharacters;\n }\n suggestion.label = label;\n proposed[label] = suggestion;\n result.items.push(suggestion);\n }\n else {\n if (!existing.documentation) {\n existing.documentation = suggestion.documentation;\n }\n if (!existing.detail) {\n existing.detail = suggestion.detail;\n }\n }\n },\n setAsIncomplete: function () {\n result.isIncomplete = true;\n },\n error: function (message) {\n console.error(message);\n },\n log: function (message) {\n console.log(message);\n },\n getNumberOfProposals: function () {\n return result.items.length;\n }\n };\n return this.schemaService.getSchemaForResource(document.uri, doc).then(function (schema) {\n var collectionPromises = [];\n var addValue = true;\n var currentKey = '';\n var currentProperty = undefined;\n if (node) {\n if (node.type === 'string') {\n var parent = node.parent;\n if (parent && parent.type === 'property' && parent.keyNode === node) {\n addValue = !parent.valueNode;\n currentProperty = parent;\n currentKey = text.substr(node.offset + 1, node.length - 2);\n if (parent) {\n node = parent.parent;\n }\n }\n }\n }\n // proposals for properties\n if (node && node.type === 'object') {\n // don't suggest keys when the cursor is just before the opening curly brace\n if (node.offset === offset) {\n return result;\n }\n // don't suggest properties that are already present\n var properties = node.properties;\n properties.forEach(function (p) {\n if (!currentProperty || currentProperty !== p) {\n proposed[p.keyNode.value] = CompletionItem.create('__');\n }\n });\n var separatorAfter_1 = '';\n if (addValue) {\n separatorAfter_1 = _this.evaluateSeparatorAfter(document, document.offsetAt(overwriteRange.end));\n }\n if (schema) {\n // property proposals with schema\n _this.getPropertyCompletions(schema, doc, node, addValue, separatorAfter_1, collector);\n }\n else {\n // property proposals without schema\n _this.getSchemaLessPropertyCompletions(doc, node, currentKey, collector);\n }\n var location_1 = Parser.getNodePath(node);\n _this.contributions.forEach(function (contribution) {\n var collectPromise = contribution.collectPropertyCompletions(document.uri, location_1, currentWord, addValue, separatorAfter_1 === '', collector);\n if (collectPromise) {\n collectionPromises.push(collectPromise);\n }\n });\n if ((!schema && currentWord.length > 0 && text.charAt(offset - currentWord.length - 1) !== '\"')) {\n collector.add({\n kind: CompletionItemKind.Property,\n label: _this.getLabelForValue(currentWord),\n insertText: _this.getInsertTextForProperty(currentWord, undefined, false, separatorAfter_1),\n insertTextFormat: InsertTextFormat.Snippet, documentation: '',\n });\n collector.setAsIncomplete();\n }\n }\n // proposals for values\n var types = {};\n if (schema) {\n // value proposals with schema\n _this.getValueCompletions(schema, doc, node, offset, document, collector, types);\n }\n else {\n // value proposals without schema\n _this.getSchemaLessValueCompletions(doc, node, offset, document, collector);\n }\n if (_this.contributions.length > 0) {\n _this.getContributedValueCompletions(doc, node, offset, document, collector, collectionPromises);\n }\n return _this.promiseConstructor.all(collectionPromises).then(function () {\n if (collector.getNumberOfProposals() === 0) {\n var offsetForSeparator = offset;\n if (node && (node.type === 'string' || node.type === 'number' || node.type === 'boolean' || node.type === 'null')) {\n offsetForSeparator = node.offset + node.length;\n }\n var separatorAfter = _this.evaluateSeparatorAfter(document, offsetForSeparator);\n _this.addFillerValueCompletions(types, separatorAfter, collector);\n }\n return result;\n });\n });\n };\n JSONCompletion.prototype.getPropertyCompletions = function (schema, doc, node, addValue, separatorAfter, collector) {\n var _this = this;\n var matchingSchemas = doc.getMatchingSchemas(schema.schema, node.offset);\n matchingSchemas.forEach(function (s) {\n if (s.node === node && !s.inverted) {\n var schemaProperties_1 = s.schema.properties;\n if (schemaProperties_1) {\n Object.keys(schemaProperties_1).forEach(function (key) {\n var propertySchema = schemaProperties_1[key];\n if (typeof propertySchema === 'object' && !propertySchema.deprecationMessage && !propertySchema.doNotSuggest) {\n var proposal = {\n kind: CompletionItemKind.Property,\n label: key,\n insertText: _this.getInsertTextForProperty(key, propertySchema, addValue, separatorAfter),\n insertTextFormat: InsertTextFormat.Snippet,\n filterText: _this.getFilterTextForValue(key),\n documentation: _this.fromMarkup(propertySchema.markdownDescription) || propertySchema.description || '',\n };\n if (propertySchema.suggestSortText !== undefined) {\n proposal.sortText = propertySchema.suggestSortText;\n }\n if (proposal.insertText && endsWith(proposal.insertText, \"$1\" + separatorAfter)) {\n proposal.command = {\n title: 'Suggest',\n command: 'editor.action.triggerSuggest'\n };\n }\n collector.add(proposal);\n }\n });\n }\n var schemaPropertyNames_1 = s.schema.propertyNames;\n if (typeof schemaPropertyNames_1 === 'object' && !schemaPropertyNames_1.deprecationMessage && !schemaPropertyNames_1.doNotSuggest) {\n var propertyNameCompletionItem = function (name, enumDescription) {\n if (enumDescription === void 0) { enumDescription = undefined; }\n var proposal = {\n kind: CompletionItemKind.Property,\n label: name,\n insertText: _this.getInsertTextForProperty(name, undefined, addValue, separatorAfter),\n insertTextFormat: InsertTextFormat.Snippet,\n filterText: _this.getFilterTextForValue(name),\n documentation: enumDescription || _this.fromMarkup(schemaPropertyNames_1.markdownDescription) || schemaPropertyNames_1.description || '',\n };\n if (schemaPropertyNames_1.suggestSortText !== undefined) {\n proposal.sortText = schemaPropertyNames_1.suggestSortText;\n }\n if (proposal.insertText && endsWith(proposal.insertText, \"$1\" + separatorAfter)) {\n proposal.command = {\n title: 'Suggest',\n command: 'editor.action.triggerSuggest'\n };\n }\n collector.add(proposal);\n };\n if (schemaPropertyNames_1.enum) {\n for (var i = 0; i < schemaPropertyNames_1.enum.length; i++) {\n var enumDescription = undefined;\n if (schemaPropertyNames_1.markdownEnumDescriptions && i < schemaPropertyNames_1.markdownEnumDescriptions.length) {\n enumDescription = _this.fromMarkup(schemaPropertyNames_1.markdownEnumDescriptions[i]);\n }\n else if (schemaPropertyNames_1.enumDescriptions && i < schemaPropertyNames_1.enumDescriptions.length) {\n enumDescription = schemaPropertyNames_1.enumDescriptions[i];\n }\n propertyNameCompletionItem(schemaPropertyNames_1.enum[i], enumDescription);\n }\n }\n if (schemaPropertyNames_1.const) {\n propertyNameCompletionItem(schemaPropertyNames_1.const);\n }\n }\n }\n });\n };\n JSONCompletion.prototype.getSchemaLessPropertyCompletions = function (doc, node, currentKey, collector) {\n var _this = this;\n var collectCompletionsForSimilarObject = function (obj) {\n obj.properties.forEach(function (p) {\n var key = p.keyNode.value;\n collector.add({\n kind: CompletionItemKind.Property,\n label: key,\n insertText: _this.getInsertTextForValue(key, ''),\n insertTextFormat: InsertTextFormat.Snippet,\n filterText: _this.getFilterTextForValue(key),\n documentation: ''\n });\n });\n };\n if (node.parent) {\n if (node.parent.type === 'property') {\n // if the object is a property value, check the tree for other objects that hang under a property of the same name\n var parentKey_1 = node.parent.keyNode.value;\n doc.visit(function (n) {\n if (n.type === 'property' && n !== node.parent && n.keyNode.value === parentKey_1 && n.valueNode && n.valueNode.type === 'object') {\n collectCompletionsForSimilarObject(n.valueNode);\n }\n return true;\n });\n }\n else if (node.parent.type === 'array') {\n // if the object is in an array, use all other array elements as similar objects\n node.parent.items.forEach(function (n) {\n if (n.type === 'object' && n !== node) {\n collectCompletionsForSimilarObject(n);\n }\n });\n }\n }\n else if (node.type === 'object') {\n collector.add({\n kind: CompletionItemKind.Property,\n label: '$schema',\n insertText: this.getInsertTextForProperty('$schema', undefined, true, ''),\n insertTextFormat: InsertTextFormat.Snippet, documentation: '',\n filterText: this.getFilterTextForValue(\"$schema\")\n });\n }\n };\n JSONCompletion.prototype.getSchemaLessValueCompletions = function (doc, node, offset, document, collector) {\n var _this = this;\n var offsetForSeparator = offset;\n if (node && (node.type === 'string' || node.type === 'number' || node.type === 'boolean' || node.type === 'null')) {\n offsetForSeparator = node.offset + node.length;\n node = node.parent;\n }\n if (!node) {\n collector.add({\n kind: this.getSuggestionKind('object'),\n label: 'Empty object',\n insertText: this.getInsertTextForValue({}, ''),\n insertTextFormat: InsertTextFormat.Snippet,\n documentation: ''\n });\n collector.add({\n kind: this.getSuggestionKind('array'),\n label: 'Empty array',\n insertText: this.getInsertTextForValue([], ''),\n insertTextFormat: InsertTextFormat.Snippet,\n documentation: ''\n });\n return;\n }\n var separatorAfter = this.evaluateSeparatorAfter(document, offsetForSeparator);\n var collectSuggestionsForValues = function (value) {\n if (value.parent && !Parser.contains(value.parent, offset, true)) {\n collector.add({\n kind: _this.getSuggestionKind(value.type),\n label: _this.getLabelTextForMatchingNode(value, document),\n insertText: _this.getInsertTextForMatchingNode(value, document, separatorAfter),\n insertTextFormat: InsertTextFormat.Snippet, documentation: ''\n });\n }\n if (value.type === 'boolean') {\n _this.addBooleanValueCompletion(!value.value, separatorAfter, collector);\n }\n };\n if (node.type === 'property') {\n if (offset > (node.colonOffset || 0)) {\n var valueNode = node.valueNode;\n if (valueNode && (offset > (valueNode.offset + valueNode.length) || valueNode.type === 'object' || valueNode.type === 'array')) {\n return;\n }\n // suggest values at the same key\n var parentKey_2 = node.keyNode.value;\n doc.visit(function (n) {\n if (n.type === 'property' && n.keyNode.value === parentKey_2 && n.valueNode) {\n collectSuggestionsForValues(n.valueNode);\n }\n return true;\n });\n if (parentKey_2 === '$schema' && node.parent && !node.parent.parent) {\n this.addDollarSchemaCompletions(separatorAfter, collector);\n }\n }\n }\n if (node.type === 'array') {\n if (node.parent && node.parent.type === 'property') {\n // suggest items of an array at the same key\n var parentKey_3 = node.parent.keyNode.value;\n doc.visit(function (n) {\n if (n.type === 'property' && n.keyNode.value === parentKey_3 && n.valueNode && n.valueNode.type === 'array') {\n n.valueNode.items.forEach(collectSuggestionsForValues);\n }\n return true;\n });\n }\n else {\n // suggest items in the same array\n node.items.forEach(collectSuggestionsForValues);\n }\n }\n };\n JSONCompletion.prototype.getValueCompletions = function (schema, doc, node, offset, document, collector, types) {\n var offsetForSeparator = offset;\n var parentKey = undefined;\n var valueNode = undefined;\n if (node && (node.type === 'string' || node.type === 'number' || node.type === 'boolean' || node.type === 'null')) {\n offsetForSeparator = node.offset + node.length;\n valueNode = node;\n node = node.parent;\n }\n if (!node) {\n this.addSchemaValueCompletions(schema.schema, '', collector, types);\n return;\n }\n if ((node.type === 'property') && offset > (node.colonOffset || 0)) {\n var valueNode_1 = node.valueNode;\n if (valueNode_1 && offset > (valueNode_1.offset + valueNode_1.length)) {\n return; // we are past the value node\n }\n parentKey = node.keyNode.value;\n node = node.parent;\n }\n if (node && (parentKey !== undefined || node.type === 'array')) {\n var separatorAfter = this.evaluateSeparatorAfter(document, offsetForSeparator);\n var matchingSchemas = doc.getMatchingSchemas(schema.schema, node.offset, valueNode);\n for (var _i = 0, matchingSchemas_1 = matchingSchemas; _i < matchingSchemas_1.length; _i++) {\n var s = matchingSchemas_1[_i];\n if (s.node === node && !s.inverted && s.schema) {\n if (node.type === 'array' && s.schema.items) {\n if (Array.isArray(s.schema.items)) {\n var index = this.findItemAtOffset(node, document, offset);\n if (index < s.schema.items.length) {\n this.addSchemaValueCompletions(s.schema.items[index], separatorAfter, collector, types);\n }\n }\n else {\n this.addSchemaValueCompletions(s.schema.items, separatorAfter, collector, types);\n }\n }\n if (parentKey !== undefined) {\n var propertyMatched = false;\n if (s.schema.properties) {\n var propertySchema = s.schema.properties[parentKey];\n if (propertySchema) {\n propertyMatched = true;\n this.addSchemaValueCompletions(propertySchema, separatorAfter, collector, types);\n }\n }\n if (s.schema.patternProperties && !propertyMatched) {\n for (var _a = 0, _b = Object.keys(s.schema.patternProperties); _a < _b.length; _a++) {\n var pattern = _b[_a];\n var regex = extendedRegExp(pattern);\n if (regex.test(parentKey)) {\n propertyMatched = true;\n var propertySchema = s.schema.patternProperties[pattern];\n this.addSchemaValueCompletions(propertySchema, separatorAfter, collector, types);\n }\n }\n }\n if (s.schema.additionalProperties && !propertyMatched) {\n var propertySchema = s.schema.additionalProperties;\n this.addSchemaValueCompletions(propertySchema, separatorAfter, collector, types);\n }\n }\n }\n }\n if (parentKey === '$schema' && !node.parent) {\n this.addDollarSchemaCompletions(separatorAfter, collector);\n }\n if (types['boolean']) {\n this.addBooleanValueCompletion(true, separatorAfter, collector);\n this.addBooleanValueCompletion(false, separatorAfter, collector);\n }\n if (types['null']) {\n this.addNullValueCompletion(separatorAfter, collector);\n }\n }\n };\n JSONCompletion.prototype.getContributedValueCompletions = function (doc, node, offset, document, collector, collectionPromises) {\n if (!node) {\n this.contributions.forEach(function (contribution) {\n var collectPromise = contribution.collectDefaultCompletions(document.uri, collector);\n if (collectPromise) {\n collectionPromises.push(collectPromise);\n }\n });\n }\n else {\n if (node.type === 'string' || node.type === 'number' || node.type === 'boolean' || node.type === 'null') {\n node = node.parent;\n }\n if (node && (node.type === 'property') && offset > (node.colonOffset || 0)) {\n var parentKey_4 = node.keyNode.value;\n var valueNode = node.valueNode;\n if ((!valueNode || offset <= (valueNode.offset + valueNode.length)) && node.parent) {\n var location_2 = Parser.getNodePath(node.parent);\n this.contributions.forEach(function (contribution) {\n var collectPromise = contribution.collectValueCompletions(document.uri, location_2, parentKey_4, collector);\n if (collectPromise) {\n collectionPromises.push(collectPromise);\n }\n });\n }\n }\n }\n };\n JSONCompletion.prototype.addSchemaValueCompletions = function (schema, separatorAfter, collector, types) {\n var _this = this;\n if (typeof schema === 'object') {\n this.addEnumValueCompletions(schema, separatorAfter, collector);\n this.addDefaultValueCompletions(schema, separatorAfter, collector);\n this.collectTypes(schema, types);\n if (Array.isArray(schema.allOf)) {\n schema.allOf.forEach(function (s) { return _this.addSchemaValueCompletions(s, separatorAfter, collector, types); });\n }\n if (Array.isArray(schema.anyOf)) {\n schema.anyOf.forEach(function (s) { return _this.addSchemaValueCompletions(s, separatorAfter, collector, types); });\n }\n if (Array.isArray(schema.oneOf)) {\n schema.oneOf.forEach(function (s) { return _this.addSchemaValueCompletions(s, separatorAfter, collector, types); });\n }\n }\n };\n JSONCompletion.prototype.addDefaultValueCompletions = function (schema, separatorAfter, collector, arrayDepth) {\n var _this = this;\n if (arrayDepth === void 0) { arrayDepth = 0; }\n var hasProposals = false;\n if (isDefined(schema.default)) {\n var type = schema.type;\n var value = schema.default;\n for (var i = arrayDepth; i > 0; i--) {\n value = [value];\n type = 'array';\n }\n collector.add({\n kind: this.getSuggestionKind(type),\n label: this.getLabelForValue(value),\n insertText: this.getInsertTextForValue(value, separatorAfter),\n insertTextFormat: InsertTextFormat.Snippet,\n detail: localize('json.suggest.default', 'Default value')\n });\n hasProposals = true;\n }\n if (Array.isArray(schema.examples)) {\n schema.examples.forEach(function (example) {\n var type = schema.type;\n var value = example;\n for (var i = arrayDepth; i > 0; i--) {\n value = [value];\n type = 'array';\n }\n collector.add({\n kind: _this.getSuggestionKind(type),\n label: _this.getLabelForValue(value),\n insertText: _this.getInsertTextForValue(value, separatorAfter),\n insertTextFormat: InsertTextFormat.Snippet\n });\n hasProposals = true;\n });\n }\n if (Array.isArray(schema.defaultSnippets)) {\n schema.defaultSnippets.forEach(function (s) {\n var type = schema.type;\n var value = s.body;\n var label = s.label;\n var insertText;\n var filterText;\n if (isDefined(value)) {\n var type_1 = schema.type;\n for (var i = arrayDepth; i > 0; i--) {\n value = [value];\n type_1 = 'array';\n }\n insertText = _this.getInsertTextForSnippetValue(value, separatorAfter);\n filterText = _this.getFilterTextForSnippetValue(value);\n label = label || _this.getLabelForSnippetValue(value);\n }\n else if (typeof s.bodyText === 'string') {\n var prefix = '', suffix = '', indent = '';\n for (var i = arrayDepth; i > 0; i--) {\n prefix = prefix + indent + '[\\n';\n suffix = suffix + '\\n' + indent + ']';\n indent += '\\t';\n type = 'array';\n }\n insertText = prefix + indent + s.bodyText.split('\\n').join('\\n' + indent) + suffix + separatorAfter;\n label = label || insertText,\n filterText = insertText.replace(/[\\n]/g, ''); // remove new lines\n }\n else {\n return;\n }\n collector.add({\n kind: _this.getSuggestionKind(type),\n label: label,\n documentation: _this.fromMarkup(s.markdownDescription) || s.description,\n insertText: insertText,\n insertTextFormat: InsertTextFormat.Snippet,\n filterText: filterText\n });\n hasProposals = true;\n });\n }\n if (!hasProposals && typeof schema.items === 'object' && !Array.isArray(schema.items) && arrayDepth < 5 /* beware of recursion */) {\n this.addDefaultValueCompletions(schema.items, separatorAfter, collector, arrayDepth + 1);\n }\n };\n JSONCompletion.prototype.addEnumValueCompletions = function (schema, separatorAfter, collector) {\n if (isDefined(schema.const)) {\n collector.add({\n kind: this.getSuggestionKind(schema.type),\n label: this.getLabelForValue(schema.const),\n insertText: this.getInsertTextForValue(schema.const, separatorAfter),\n insertTextFormat: InsertTextFormat.Snippet,\n documentation: this.fromMarkup(schema.markdownDescription) || schema.description\n });\n }\n if (Array.isArray(schema.enum)) {\n for (var i = 0, length = schema.enum.length; i < length; i++) {\n var enm = schema.enum[i];\n var documentation = this.fromMarkup(schema.markdownDescription) || schema.description;\n if (schema.markdownEnumDescriptions && i < schema.markdownEnumDescriptions.length && this.doesSupportMarkdown()) {\n documentation = this.fromMarkup(schema.markdownEnumDescriptions[i]);\n }\n else if (schema.enumDescriptions && i < schema.enumDescriptions.length) {\n documentation = schema.enumDescriptions[i];\n }\n collector.add({\n kind: this.getSuggestionKind(schema.type),\n label: this.getLabelForValue(enm),\n insertText: this.getInsertTextForValue(enm, separatorAfter),\n insertTextFormat: InsertTextFormat.Snippet,\n documentation: documentation\n });\n }\n }\n };\n JSONCompletion.prototype.collectTypes = function (schema, types) {\n if (Array.isArray(schema.enum) || isDefined(schema.const)) {\n return;\n }\n var type = schema.type;\n if (Array.isArray(type)) {\n type.forEach(function (t) { return types[t] = true; });\n }\n else if (type) {\n types[type] = true;\n }\n };\n JSONCompletion.prototype.addFillerValueCompletions = function (types, separatorAfter, collector) {\n if (types['object']) {\n collector.add({\n kind: this.getSuggestionKind('object'),\n label: '{}',\n insertText: this.getInsertTextForGuessedValue({}, separatorAfter),\n insertTextFormat: InsertTextFormat.Snippet,\n detail: localize('defaults.object', 'New object'),\n documentation: ''\n });\n }\n if (types['array']) {\n collector.add({\n kind: this.getSuggestionKind('array'),\n label: '[]',\n insertText: this.getInsertTextForGuessedValue([], separatorAfter),\n insertTextFormat: InsertTextFormat.Snippet,\n detail: localize('defaults.array', 'New array'),\n documentation: ''\n });\n }\n };\n JSONCompletion.prototype.addBooleanValueCompletion = function (value, separatorAfter, collector) {\n collector.add({\n kind: this.getSuggestionKind('boolean'),\n label: value ? 'true' : 'false',\n insertText: this.getInsertTextForValue(value, separatorAfter),\n insertTextFormat: InsertTextFormat.Snippet,\n documentation: ''\n });\n };\n JSONCompletion.prototype.addNullValueCompletion = function (separatorAfter, collector) {\n collector.add({\n kind: this.getSuggestionKind('null'),\n label: 'null',\n insertText: 'null' + separatorAfter,\n insertTextFormat: InsertTextFormat.Snippet,\n documentation: ''\n });\n };\n JSONCompletion.prototype.addDollarSchemaCompletions = function (separatorAfter, collector) {\n var _this = this;\n var schemaIds = this.schemaService.getRegisteredSchemaIds(function (schema) { return schema === 'http' || schema === 'https'; });\n schemaIds.forEach(function (schemaId) { return collector.add({\n kind: CompletionItemKind.Module,\n label: _this.getLabelForValue(schemaId),\n filterText: _this.getFilterTextForValue(schemaId),\n insertText: _this.getInsertTextForValue(schemaId, separatorAfter),\n insertTextFormat: InsertTextFormat.Snippet, documentation: ''\n }); });\n };\n JSONCompletion.prototype.getLabelForValue = function (value) {\n return JSON.stringify(value);\n };\n JSONCompletion.prototype.getFilterTextForValue = function (value) {\n return JSON.stringify(value);\n };\n JSONCompletion.prototype.getFilterTextForSnippetValue = function (value) {\n return JSON.stringify(value).replace(/\\$\\{\\d+:([^}]+)\\}|\\$\\d+/g, '$1');\n };\n JSONCompletion.prototype.getLabelForSnippetValue = function (value) {\n var label = JSON.stringify(value);\n return label.replace(/\\$\\{\\d+:([^}]+)\\}|\\$\\d+/g, '$1');\n };\n JSONCompletion.prototype.getInsertTextForPlainText = function (text) {\n return text.replace(/[\\\\\\$\\}]/g, '\\\\$&'); // escape $, \\ and } \n };\n JSONCompletion.prototype.getInsertTextForValue = function (value, separatorAfter) {\n var text = JSON.stringify(value, null, '\\t');\n if (text === '{}') {\n return '{$1}' + separatorAfter;\n }\n else if (text === '[]') {\n return '[$1]' + separatorAfter;\n }\n return this.getInsertTextForPlainText(text + separatorAfter);\n };\n JSONCompletion.prototype.getInsertTextForSnippetValue = function (value, separatorAfter) {\n var replacer = function (value) {\n if (typeof value === 'string') {\n if (value[0] === '^') {\n return value.substr(1);\n }\n }\n return JSON.stringify(value);\n };\n return stringifyObject(value, '', replacer) + separatorAfter;\n };\n JSONCompletion.prototype.getInsertTextForGuessedValue = function (value, separatorAfter) {\n switch (typeof value) {\n case 'object':\n if (value === null) {\n return '${1:null}' + separatorAfter;\n }\n return this.getInsertTextForValue(value, separatorAfter);\n case 'string':\n var snippetValue = JSON.stringify(value);\n snippetValue = snippetValue.substr(1, snippetValue.length - 2); // remove quotes\n snippetValue = this.getInsertTextForPlainText(snippetValue); // escape \\ and }\n return '\"${1:' + snippetValue + '}\"' + separatorAfter;\n case 'number':\n case 'boolean':\n return '${1:' + JSON.stringify(value) + '}' + separatorAfter;\n }\n return this.getInsertTextForValue(value, separatorAfter);\n };\n JSONCompletion.prototype.getSuggestionKind = function (type) {\n if (Array.isArray(type)) {\n var array = type;\n type = array.length > 0 ? array[0] : undefined;\n }\n if (!type) {\n return CompletionItemKind.Value;\n }\n switch (type) {\n case 'string': return CompletionItemKind.Value;\n case 'object': return CompletionItemKind.Module;\n case 'property': return CompletionItemKind.Property;\n default: return CompletionItemKind.Value;\n }\n };\n JSONCompletion.prototype.getLabelTextForMatchingNode = function (node, document) {\n switch (node.type) {\n case 'array':\n return '[]';\n case 'object':\n return '{}';\n default:\n var content = document.getText().substr(node.offset, node.length);\n return content;\n }\n };\n JSONCompletion.prototype.getInsertTextForMatchingNode = function (node, document, separatorAfter) {\n switch (node.type) {\n case 'array':\n return this.getInsertTextForValue([], separatorAfter);\n case 'object':\n return this.getInsertTextForValue({}, separatorAfter);\n default:\n var content = document.getText().substr(node.offset, node.length) + separatorAfter;\n return this.getInsertTextForPlainText(content);\n }\n };\n JSONCompletion.prototype.getInsertTextForProperty = function (key, propertySchema, addValue, separatorAfter) {\n var propertyText = this.getInsertTextForValue(key, '');\n if (!addValue) {\n return propertyText;\n }\n var resultText = propertyText + ': ';\n var value;\n var nValueProposals = 0;\n if (propertySchema) {\n if (Array.isArray(propertySchema.defaultSnippets)) {\n if (propertySchema.defaultSnippets.length === 1) {\n var body = propertySchema.defaultSnippets[0].body;\n if (isDefined(body)) {\n value = this.getInsertTextForSnippetValue(body, '');\n }\n }\n nValueProposals += propertySchema.defaultSnippets.length;\n }\n if (propertySchema.enum) {\n if (!value && propertySchema.enum.length === 1) {\n value = this.getInsertTextForGuessedValue(propertySchema.enum[0], '');\n }\n nValueProposals += propertySchema.enum.length;\n }\n if (isDefined(propertySchema.default)) {\n if (!value) {\n value = this.getInsertTextForGuessedValue(propertySchema.default, '');\n }\n nValueProposals++;\n }\n if (Array.isArray(propertySchema.examples) && propertySchema.examples.length) {\n if (!value) {\n value = this.getInsertTextForGuessedValue(propertySchema.examples[0], '');\n }\n nValueProposals += propertySchema.examples.length;\n }\n if (nValueProposals === 0) {\n var type = Array.isArray(propertySchema.type) ? propertySchema.type[0] : propertySchema.type;\n if (!type) {\n if (propertySchema.properties) {\n type = 'object';\n }\n else if (propertySchema.items) {\n type = 'array';\n }\n }\n switch (type) {\n case 'boolean':\n value = '$1';\n break;\n case 'string':\n value = '\"$1\"';\n break;\n case 'object':\n value = '{$1}';\n break;\n case 'array':\n value = '[$1]';\n break;\n case 'number':\n case 'integer':\n value = '${1:0}';\n break;\n case 'null':\n value = '${1:null}';\n break;\n default:\n return propertyText;\n }\n }\n }\n if (!value || nValueProposals > 1) {\n value = '$1';\n }\n return resultText + value + separatorAfter;\n };\n JSONCompletion.prototype.getCurrentWord = function (document, offset) {\n var i = offset - 1;\n var text = document.getText();\n while (i >= 0 && ' \\t\\n\\r\\v\":{[,]}'.indexOf(text.charAt(i)) === -1) {\n i--;\n }\n return text.substring(i + 1, offset);\n };\n JSONCompletion.prototype.evaluateSeparatorAfter = function (document, offset) {\n var scanner = Json.createScanner(document.getText(), true);\n scanner.setPosition(offset);\n var token = scanner.scan();\n switch (token) {\n case 5 /* CommaToken */:\n case 2 /* CloseBraceToken */:\n case 4 /* CloseBracketToken */:\n case 17 /* EOF */:\n return '';\n default:\n return ',';\n }\n };\n JSONCompletion.prototype.findItemAtOffset = function (node, document, offset) {\n var scanner = Json.createScanner(document.getText(), true);\n var children = node.items;\n for (var i = children.length - 1; i >= 0; i--) {\n var child = children[i];\n if (offset > child.offset + child.length) {\n scanner.setPosition(child.offset + child.length);\n var token = scanner.scan();\n if (token === 5 /* CommaToken */ && offset >= scanner.getTokenOffset() + scanner.getTokenLength()) {\n return i + 1;\n }\n return i;\n }\n else if (offset >= child.offset) {\n return i;\n }\n }\n return 0;\n };\n JSONCompletion.prototype.isInComment = function (document, start, offset) {\n var scanner = Json.createScanner(document.getText(), false);\n scanner.setPosition(start);\n var token = scanner.scan();\n while (token !== 17 /* EOF */ && (scanner.getTokenOffset() + scanner.getTokenLength() < offset)) {\n token = scanner.scan();\n }\n return (token === 12 /* LineCommentTrivia */ || token === 13 /* BlockCommentTrivia */) && scanner.getTokenOffset() <= offset;\n };\n JSONCompletion.prototype.fromMarkup = function (markupString) {\n if (markupString && this.doesSupportMarkdown()) {\n return {\n kind: MarkupKind.Markdown,\n value: markupString\n };\n }\n return undefined;\n };\n JSONCompletion.prototype.doesSupportMarkdown = function () {\n if (!isDefined(this.supportsMarkdown)) {\n var completion = this.clientCapabilities.textDocument && this.clientCapabilities.textDocument.completion;\n this.supportsMarkdown = completion && completion.completionItem && Array.isArray(completion.completionItem.documentationFormat) && completion.completionItem.documentationFormat.indexOf(MarkupKind.Markdown) !== -1;\n }\n return this.supportsMarkdown;\n };\n JSONCompletion.prototype.doesSupportsCommitCharacters = function () {\n if (!isDefined(this.supportsCommitCharacters)) {\n var completion = this.clientCapabilities.textDocument && this.clientCapabilities.textDocument.completion;\n this.supportsCommitCharacters = completion && completion.completionItem && !!completion.completionItem.commitCharactersSupport;\n }\n return this.supportsCommitCharacters;\n };\n return JSONCompletion;\n}());\nexport { JSONCompletion };\n","var LIB;LIB=(()=>{\"use strict\";var t={470:t=>{function e(t){if(\"string\"!=typeof t)throw new TypeError(\"Path must be a string. Received \"+JSON.stringify(t))}function r(t,e){for(var r,n=\"\",o=0,i=-1,a=0,h=0;h<=t.length;++h){if(h2){var s=n.lastIndexOf(\"/\");if(s!==n.length-1){-1===s?(n=\"\",o=0):o=(n=n.slice(0,s)).length-1-n.lastIndexOf(\"/\"),i=h,a=0;continue}}else if(2===n.length||1===n.length){n=\"\",o=0,i=h,a=0;continue}e&&(n.length>0?n+=\"/..\":n=\"..\",o=2)}else n.length>0?n+=\"/\"+t.slice(i+1,h):n=t.slice(i+1,h),o=h-i-1;i=h,a=0}else 46===r&&-1!==a?++a:a=-1}return n}var n={resolve:function(){for(var t,n=\"\",o=!1,i=arguments.length-1;i>=-1&&!o;i--){var a;i>=0?a=arguments[i]:(void 0===t&&(t=process.cwd()),a=t),e(a),0!==a.length&&(n=a+\"/\"+n,o=47===a.charCodeAt(0))}return n=r(n,!o),o?n.length>0?\"/\"+n:\"/\":n.length>0?n:\".\"},normalize:function(t){if(e(t),0===t.length)return\".\";var n=47===t.charCodeAt(0),o=47===t.charCodeAt(t.length-1);return 0!==(t=r(t,!n)).length||n||(t=\".\"),t.length>0&&o&&(t+=\"/\"),n?\"/\"+t:t},isAbsolute:function(t){return e(t),t.length>0&&47===t.charCodeAt(0)},join:function(){if(0===arguments.length)return\".\";for(var t,r=0;r0&&(void 0===t?t=o:t+=\"/\"+o)}return void 0===t?\".\":n.normalize(t)},relative:function(t,r){if(e(t),e(r),t===r)return\"\";if((t=n.resolve(t))===(r=n.resolve(r)))return\"\";for(var o=1;of){if(47===r.charCodeAt(h+c))return r.slice(h+c+1);if(0===c)return r.slice(h+c)}else a>f&&(47===t.charCodeAt(o+c)?u=c:0===c&&(u=0));break}var l=t.charCodeAt(o+c);if(l!==r.charCodeAt(h+c))break;47===l&&(u=c)}var p=\"\";for(c=o+u+1;c<=i;++c)c!==i&&47!==t.charCodeAt(c)||(0===p.length?p+=\"..\":p+=\"/..\");return p.length>0?p+r.slice(h+u):(h+=u,47===r.charCodeAt(h)&&++h,r.slice(h))},_makeLong:function(t){return t},dirname:function(t){if(e(t),0===t.length)return\".\";for(var r=t.charCodeAt(0),n=47===r,o=-1,i=!0,a=t.length-1;a>=1;--a)if(47===(r=t.charCodeAt(a))){if(!i){o=a;break}}else i=!1;return-1===o?n?\"/\":\".\":n&&1===o?\"//\":t.slice(0,o)},basename:function(t,r){if(void 0!==r&&\"string\"!=typeof r)throw new TypeError('\"ext\" argument must be a string');e(t);var n,o=0,i=-1,a=!0;if(void 0!==r&&r.length>0&&r.length<=t.length){if(r.length===t.length&&r===t)return\"\";var h=r.length-1,s=-1;for(n=t.length-1;n>=0;--n){var f=t.charCodeAt(n);if(47===f){if(!a){o=n+1;break}}else-1===s&&(a=!1,s=n+1),h>=0&&(f===r.charCodeAt(h)?-1==--h&&(i=n):(h=-1,i=s))}return o===i?i=s:-1===i&&(i=t.length),t.slice(o,i)}for(n=t.length-1;n>=0;--n)if(47===t.charCodeAt(n)){if(!a){o=n+1;break}}else-1===i&&(a=!1,i=n+1);return-1===i?\"\":t.slice(o,i)},extname:function(t){e(t);for(var r=-1,n=0,o=-1,i=!0,a=0,h=t.length-1;h>=0;--h){var s=t.charCodeAt(h);if(47!==s)-1===o&&(i=!1,o=h+1),46===s?-1===r?r=h:1!==a&&(a=1):-1!==r&&(a=-1);else if(!i){n=h+1;break}}return-1===r||-1===o||0===a||1===a&&r===o-1&&r===n+1?\"\":t.slice(r,o)},format:function(t){if(null===t||\"object\"!=typeof t)throw new TypeError('The \"pathObject\" argument must be of type Object. Received type '+typeof t);return function(t,e){var r=e.dir||e.root,n=e.base||(e.name||\"\")+(e.ext||\"\");return r?r===e.root?r+n:r+\"/\"+n:n}(0,t)},parse:function(t){e(t);var r={root:\"\",dir:\"\",base:\"\",ext:\"\",name:\"\"};if(0===t.length)return r;var n,o=t.charCodeAt(0),i=47===o;i?(r.root=\"/\",n=1):n=0;for(var a=-1,h=0,s=-1,f=!0,u=t.length-1,c=0;u>=n;--u)if(47!==(o=t.charCodeAt(u)))-1===s&&(f=!1,s=u+1),46===o?-1===a?a=u:1!==c&&(c=1):-1!==a&&(c=-1);else if(!f){h=u+1;break}return-1===a||-1===s||0===c||1===c&&a===s-1&&a===h+1?-1!==s&&(r.base=r.name=0===h&&i?t.slice(1,s):t.slice(h,s)):(0===h&&i?(r.name=t.slice(1,a),r.base=t.slice(1,s)):(r.name=t.slice(h,a),r.base=t.slice(h,s)),r.ext=t.slice(a,s)),h>0?r.dir=t.slice(0,h-1):i&&(r.dir=\"/\"),r},sep:\"/\",delimiter:\":\",win32:null,posix:null};n.posix=n,t.exports=n},447:(t,e,r)=>{var n;if(r.r(e),r.d(e,{URI:()=>g,Utils:()=>O}),\"object\"==typeof process)n=\"win32\"===process.platform;else if(\"object\"==typeof navigator){var o=navigator.userAgent;n=o.indexOf(\"Windows\")>=0}var i,a,h=(i=function(t,e){return(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])})(t,e)},function(t,e){function r(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}),s=/^\\w[\\w\\d+.-]*$/,f=/^\\//,u=/^\\/\\//,c=\"\",l=\"/\",p=/^(([^:/?#]+?):)?(\\/\\/([^/?#]*))?([^?#]*)(\\?([^#]*))?(#(.*))?/,g=function(){function t(t,e,r,n,o,i){void 0===i&&(i=!1),\"object\"==typeof t?(this.scheme=t.scheme||c,this.authority=t.authority||c,this.path=t.path||c,this.query=t.query||c,this.fragment=t.fragment||c):(this.scheme=function(t,e){return t||e?t:\"file\"}(t,i),this.authority=e||c,this.path=function(t,e){switch(t){case\"https\":case\"http\":case\"file\":e?e[0]!==l&&(e=l+e):e=l}return e}(this.scheme,r||c),this.query=n||c,this.fragment=o||c,function(t,e){if(!t.scheme&&e)throw new Error('[UriError]: Scheme is missing: {scheme: \"\", authority: \"'+t.authority+'\", path: \"'+t.path+'\", query: \"'+t.query+'\", fragment: \"'+t.fragment+'\"}');if(t.scheme&&!s.test(t.scheme))throw new Error(\"[UriError]: Scheme contains illegal characters.\");if(t.path)if(t.authority){if(!f.test(t.path))throw new Error('[UriError]: If a URI contains an authority component, then the path component must either be empty or begin with a slash (\"/\") character')}else if(u.test(t.path))throw new Error('[UriError]: If a URI does not contain an authority component, then the path cannot begin with two slash characters (\"//\")')}(this,i))}return t.isUri=function(e){return e instanceof t||!!e&&\"string\"==typeof e.authority&&\"string\"==typeof e.fragment&&\"string\"==typeof e.path&&\"string\"==typeof e.query&&\"string\"==typeof e.scheme&&\"function\"==typeof e.fsPath&&\"function\"==typeof e.with&&\"function\"==typeof e.toString},Object.defineProperty(t.prototype,\"fsPath\",{get:function(){return C(this,!1)},enumerable:!1,configurable:!0}),t.prototype.with=function(t){if(!t)return this;var e=t.scheme,r=t.authority,n=t.path,o=t.query,i=t.fragment;return void 0===e?e=this.scheme:null===e&&(e=c),void 0===r?r=this.authority:null===r&&(r=c),void 0===n?n=this.path:null===n&&(n=c),void 0===o?o=this.query:null===o&&(o=c),void 0===i?i=this.fragment:null===i&&(i=c),e===this.scheme&&r===this.authority&&n===this.path&&o===this.query&&i===this.fragment?this:new v(e,r,n,o,i)},t.parse=function(t,e){void 0===e&&(e=!1);var r=p.exec(t);return r?new v(r[2]||c,x(r[4]||c),x(r[5]||c),x(r[7]||c),x(r[9]||c),e):new v(c,c,c,c,c)},t.file=function(t){var e=c;if(n&&(t=t.replace(/\\\\/g,l)),t[0]===l&&t[1]===l){var r=t.indexOf(l,2);-1===r?(e=t.substring(2),t=l):(e=t.substring(2,r),t=t.substring(r)||l)}return new v(\"file\",e,t,c,c)},t.from=function(t){return new v(t.scheme,t.authority,t.path,t.query,t.fragment)},t.prototype.toString=function(t){return void 0===t&&(t=!1),A(this,t)},t.prototype.toJSON=function(){return this},t.revive=function(e){if(e){if(e instanceof t)return e;var r=new v(e);return r._formatted=e.external,r._fsPath=e._sep===d?e.fsPath:null,r}return e},t}(),d=n?1:void 0,v=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e._formatted=null,e._fsPath=null,e}return h(e,t),Object.defineProperty(e.prototype,\"fsPath\",{get:function(){return this._fsPath||(this._fsPath=C(this,!1)),this._fsPath},enumerable:!1,configurable:!0}),e.prototype.toString=function(t){return void 0===t&&(t=!1),t?A(this,!0):(this._formatted||(this._formatted=A(this,!1)),this._formatted)},e.prototype.toJSON=function(){var t={$mid:1};return this._fsPath&&(t.fsPath=this._fsPath,t._sep=d),this._formatted&&(t.external=this._formatted),this.path&&(t.path=this.path),this.scheme&&(t.scheme=this.scheme),this.authority&&(t.authority=this.authority),this.query&&(t.query=this.query),this.fragment&&(t.fragment=this.fragment),t},e}(g),m=((a={})[58]=\"%3A\",a[47]=\"%2F\",a[63]=\"%3F\",a[35]=\"%23\",a[91]=\"%5B\",a[93]=\"%5D\",a[64]=\"%40\",a[33]=\"%21\",a[36]=\"%24\",a[38]=\"%26\",a[39]=\"%27\",a[40]=\"%28\",a[41]=\"%29\",a[42]=\"%2A\",a[43]=\"%2B\",a[44]=\"%2C\",a[59]=\"%3B\",a[61]=\"%3D\",a[32]=\"%20\",a);function y(t,e){for(var r=void 0,n=-1,o=0;o=97&&i<=122||i>=65&&i<=90||i>=48&&i<=57||45===i||46===i||95===i||126===i||e&&47===i)-1!==n&&(r+=encodeURIComponent(t.substring(n,o)),n=-1),void 0!==r&&(r+=t.charAt(o));else{void 0===r&&(r=t.substr(0,o));var a=m[i];void 0!==a?(-1!==n&&(r+=encodeURIComponent(t.substring(n,o)),n=-1),r+=a):-1===n&&(n=o)}}return-1!==n&&(r+=encodeURIComponent(t.substring(n))),void 0!==r?r:t}function b(t){for(var e=void 0,r=0;r1&&\"file\"===t.scheme?\"//\"+t.authority+t.path:47===t.path.charCodeAt(0)&&(t.path.charCodeAt(1)>=65&&t.path.charCodeAt(1)<=90||t.path.charCodeAt(1)>=97&&t.path.charCodeAt(1)<=122)&&58===t.path.charCodeAt(2)?e?t.path.substr(1):t.path[1].toLowerCase()+t.path.substr(2):t.path,n&&(r=r.replace(/\\//g,\"\\\\\")),r}function A(t,e){var r=e?b:y,n=\"\",o=t.scheme,i=t.authority,a=t.path,h=t.query,s=t.fragment;if(o&&(n+=o,n+=\":\"),(i||\"file\"===o)&&(n+=l,n+=l),i){var f=i.indexOf(\"@\");if(-1!==f){var u=i.substr(0,f);i=i.substr(f+1),-1===(f=u.indexOf(\":\"))?n+=r(u,!1):(n+=r(u.substr(0,f),!1),n+=\":\",n+=r(u.substr(f+1),!1)),n+=\"@\"}-1===(f=(i=i.toLowerCase()).indexOf(\":\"))?n+=r(i,!1):(n+=r(i.substr(0,f),!1),n+=i.substr(f))}if(a){if(a.length>=3&&47===a.charCodeAt(0)&&58===a.charCodeAt(2))(c=a.charCodeAt(1))>=65&&c<=90&&(a=\"/\"+String.fromCharCode(c+32)+\":\"+a.substr(3));else if(a.length>=2&&58===a.charCodeAt(1)){var c;(c=a.charCodeAt(0))>=65&&c<=90&&(a=String.fromCharCode(c+32)+\":\"+a.substr(2))}n+=r(a,!0)}return h&&(n+=\"?\",n+=r(h,!1)),s&&(n+=\"#\",n+=e?s:y(s,!1)),n}function w(t){try{return decodeURIComponent(t)}catch(e){return t.length>3?t.substr(0,3)+w(t.substr(3)):t}}var _=/(%[0-9A-Za-z][0-9A-Za-z])+/g;function x(t){return t.match(_)?t.replace(_,(function(t){return w(t)})):t}var O,P=r(470),j=function(){for(var t=0,e=0,r=arguments.length;e{for(var n in e)r.o(e,n)&&!r.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},r.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r.r=t=>{\"undefined\"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:\"Module\"}),Object.defineProperty(t,\"__esModule\",{value:!0})},r(447)})();export const{URI,Utils}=LIB;\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Copyright (c) 2013, Nick Fitzgerald\n * Licensed under the MIT License. See LICENCE.md in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\nexport function createRegex(glob, opts) {\n if (typeof glob !== 'string') {\n throw new TypeError('Expected a string');\n }\n var str = String(glob);\n // The regexp we are building, as a string.\n var reStr = \"\";\n // Whether we are matching so called \"extended\" globs (like bash) and should\n // support single character matching, matching ranges of characters, group\n // matching, etc.\n var extended = opts ? !!opts.extended : false;\n // When globstar is _false_ (default), '/foo/*' is translated a regexp like\n // '^\\/foo\\/.*$' which will match any string beginning with '/foo/'\n // When globstar is _true_, '/foo/*' is translated to regexp like\n // '^\\/foo\\/[^/]*$' which will match any string beginning with '/foo/' BUT\n // which does not have a '/' to the right of it.\n // E.g. with '/foo/*' these will match: '/foo/bar', '/foo/bar.txt' but\n // these will not '/foo/bar/baz', '/foo/bar/baz.txt'\n // Lastely, when globstar is _true_, '/foo/**' is equivelant to '/foo/*' when\n // globstar is _false_\n var globstar = opts ? !!opts.globstar : false;\n // If we are doing extended matching, this boolean is true when we are inside\n // a group (eg {*.html,*.js}), and false otherwise.\n var inGroup = false;\n // RegExp flags (eg \"i\" ) to pass in to RegExp constructor.\n var flags = opts && typeof (opts.flags) === \"string\" ? opts.flags : \"\";\n var c;\n for (var i = 0, len = str.length; i < len; i++) {\n c = str[i];\n switch (c) {\n case \"/\":\n case \"$\":\n case \"^\":\n case \"+\":\n case \".\":\n case \"(\":\n case \")\":\n case \"=\":\n case \"!\":\n case \"|\":\n reStr += \"\\\\\" + c;\n break;\n case \"?\":\n if (extended) {\n reStr += \".\";\n break;\n }\n case \"[\":\n case \"]\":\n if (extended) {\n reStr += c;\n break;\n }\n case \"{\":\n if (extended) {\n inGroup = true;\n reStr += \"(\";\n break;\n }\n case \"}\":\n if (extended) {\n inGroup = false;\n reStr += \")\";\n break;\n }\n case \",\":\n if (inGroup) {\n reStr += \"|\";\n break;\n }\n reStr += \"\\\\\" + c;\n break;\n case \"*\":\n // Move over all consecutive \"*\"'s.\n // Also store the previous and next characters\n var prevChar = str[i - 1];\n var starCount = 1;\n while (str[i + 1] === \"*\") {\n starCount++;\n i++;\n }\n var nextChar = str[i + 1];\n if (!globstar) {\n // globstar is disabled, so treat any number of \"*\" as one\n reStr += \".*\";\n }\n else {\n // globstar is enabled, so determine if this is a globstar segment\n var isGlobstar = starCount > 1 // multiple \"*\"'s\n && (prevChar === \"/\" || prevChar === undefined || prevChar === '{' || prevChar === ',') // from the start of the segment\n && (nextChar === \"/\" || nextChar === undefined || nextChar === ',' || nextChar === '}'); // to the end of the segment\n if (isGlobstar) {\n if (nextChar === \"/\") {\n i++; // move over the \"/\"\n }\n else if (prevChar === '/' && reStr.endsWith('\\\\/')) {\n reStr = reStr.substr(0, reStr.length - 2);\n }\n // it's a globstar, so match zero or more path segments\n reStr += \"((?:[^/]*(?:\\/|$))*)\";\n }\n else {\n // it's not a globstar, so only match one path segment\n reStr += \"([^/]*)\";\n }\n }\n break;\n default:\n reStr += c;\n }\n }\n // When regexp 'g' flag is specified don't\n // constrain the regular expression with ^ & $\n if (!flags || !~flags.indexOf('g')) {\n reStr = \"^\" + reStr + \"$\";\n }\n return new RegExp(reStr, flags);\n}\n;\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\nimport * as Json from './../../jsonc-parser/main.js';\nimport { URI } from './../../vscode-uri/index.js';\nimport * as Strings from '../utils/strings.js';\nimport * as Parser from '../parser/jsonParser.js';\nimport * as nls from './../../../fillers/vscode-nls.js';\nimport { createRegex } from '../utils/glob.js';\nvar localize = nls.loadMessageBundle();\nvar BANG = '!';\nvar PATH_SEP = '/';\nvar FilePatternAssociation = /** @class */ (function () {\n function FilePatternAssociation(pattern, uris) {\n this.globWrappers = [];\n try {\n for (var _i = 0, pattern_1 = pattern; _i < pattern_1.length; _i++) {\n var patternString = pattern_1[_i];\n var include = patternString[0] !== BANG;\n if (!include) {\n patternString = patternString.substring(1);\n }\n if (patternString.length > 0) {\n if (patternString[0] === PATH_SEP) {\n patternString = patternString.substring(1);\n }\n this.globWrappers.push({\n regexp: createRegex('**/' + patternString, { extended: true, globstar: true }),\n include: include,\n });\n }\n }\n ;\n this.uris = uris;\n }\n catch (e) {\n this.globWrappers.length = 0;\n this.uris = [];\n }\n }\n FilePatternAssociation.prototype.matchesPattern = function (fileName) {\n var match = false;\n for (var _i = 0, _a = this.globWrappers; _i < _a.length; _i++) {\n var _b = _a[_i], regexp = _b.regexp, include = _b.include;\n if (regexp.test(fileName)) {\n match = include;\n }\n }\n return match;\n };\n FilePatternAssociation.prototype.getURIs = function () {\n return this.uris;\n };\n return FilePatternAssociation;\n}());\nvar SchemaHandle = /** @class */ (function () {\n function SchemaHandle(service, url, unresolvedSchemaContent) {\n this.service = service;\n this.url = url;\n this.dependencies = {};\n if (unresolvedSchemaContent) {\n this.unresolvedSchema = this.service.promise.resolve(new UnresolvedSchema(unresolvedSchemaContent));\n }\n }\n SchemaHandle.prototype.getUnresolvedSchema = function () {\n if (!this.unresolvedSchema) {\n this.unresolvedSchema = this.service.loadSchema(this.url);\n }\n return this.unresolvedSchema;\n };\n SchemaHandle.prototype.getResolvedSchema = function () {\n var _this = this;\n if (!this.resolvedSchema) {\n this.resolvedSchema = this.getUnresolvedSchema().then(function (unresolved) {\n return _this.service.resolveSchemaContent(unresolved, _this.url, _this.dependencies);\n });\n }\n return this.resolvedSchema;\n };\n SchemaHandle.prototype.clearSchema = function () {\n this.resolvedSchema = undefined;\n this.unresolvedSchema = undefined;\n this.dependencies = {};\n };\n return SchemaHandle;\n}());\nvar UnresolvedSchema = /** @class */ (function () {\n function UnresolvedSchema(schema, errors) {\n if (errors === void 0) { errors = []; }\n this.schema = schema;\n this.errors = errors;\n }\n return UnresolvedSchema;\n}());\nexport { UnresolvedSchema };\nvar ResolvedSchema = /** @class */ (function () {\n function ResolvedSchema(schema, errors) {\n if (errors === void 0) { errors = []; }\n this.schema = schema;\n this.errors = errors;\n }\n ResolvedSchema.prototype.getSection = function (path) {\n var schemaRef = this.getSectionRecursive(path, this.schema);\n if (schemaRef) {\n return Parser.asSchema(schemaRef);\n }\n return undefined;\n };\n ResolvedSchema.prototype.getSectionRecursive = function (path, schema) {\n if (!schema || typeof schema === 'boolean' || path.length === 0) {\n return schema;\n }\n var next = path.shift();\n if (schema.properties && typeof schema.properties[next]) {\n return this.getSectionRecursive(path, schema.properties[next]);\n }\n else if (schema.patternProperties) {\n for (var _i = 0, _a = Object.keys(schema.patternProperties); _i < _a.length; _i++) {\n var pattern = _a[_i];\n var regex = Strings.extendedRegExp(pattern);\n if (regex.test(next)) {\n return this.getSectionRecursive(path, schema.patternProperties[pattern]);\n }\n }\n }\n else if (typeof schema.additionalProperties === 'object') {\n return this.getSectionRecursive(path, schema.additionalProperties);\n }\n else if (next.match('[0-9]+')) {\n if (Array.isArray(schema.items)) {\n var index = parseInt(next, 10);\n if (!isNaN(index) && schema.items[index]) {\n return this.getSectionRecursive(path, schema.items[index]);\n }\n }\n else if (schema.items) {\n return this.getSectionRecursive(path, schema.items);\n }\n }\n return undefined;\n };\n return ResolvedSchema;\n}());\nexport { ResolvedSchema };\nvar JSONSchemaService = /** @class */ (function () {\n function JSONSchemaService(requestService, contextService, promiseConstructor) {\n this.contextService = contextService;\n this.requestService = requestService;\n this.promiseConstructor = promiseConstructor || Promise;\n this.callOnDispose = [];\n this.contributionSchemas = {};\n this.contributionAssociations = [];\n this.schemasById = {};\n this.filePatternAssociations = [];\n this.registeredSchemasIds = {};\n }\n JSONSchemaService.prototype.getRegisteredSchemaIds = function (filter) {\n return Object.keys(this.registeredSchemasIds).filter(function (id) {\n var scheme = URI.parse(id).scheme;\n return scheme !== 'schemaservice' && (!filter || filter(scheme));\n });\n };\n Object.defineProperty(JSONSchemaService.prototype, \"promise\", {\n get: function () {\n return this.promiseConstructor;\n },\n enumerable: false,\n configurable: true\n });\n JSONSchemaService.prototype.dispose = function () {\n while (this.callOnDispose.length > 0) {\n this.callOnDispose.pop()();\n }\n };\n JSONSchemaService.prototype.onResourceChange = function (uri) {\n var _this = this;\n var hasChanges = false;\n uri = normalizeId(uri);\n var toWalk = [uri];\n var all = Object.keys(this.schemasById).map(function (key) { return _this.schemasById[key]; });\n while (toWalk.length) {\n var curr = toWalk.pop();\n for (var i = 0; i < all.length; i++) {\n var handle = all[i];\n if (handle && (handle.url === curr || handle.dependencies[curr])) {\n if (handle.url !== curr) {\n toWalk.push(handle.url);\n }\n handle.clearSchema();\n all[i] = undefined;\n hasChanges = true;\n }\n }\n }\n return hasChanges;\n };\n JSONSchemaService.prototype.setSchemaContributions = function (schemaContributions) {\n if (schemaContributions.schemas) {\n var schemas = schemaContributions.schemas;\n for (var id in schemas) {\n var normalizedId = normalizeId(id);\n this.contributionSchemas[normalizedId] = this.addSchemaHandle(normalizedId, schemas[id]);\n }\n }\n if (Array.isArray(schemaContributions.schemaAssociations)) {\n var schemaAssociations = schemaContributions.schemaAssociations;\n for (var _i = 0, schemaAssociations_1 = schemaAssociations; _i < schemaAssociations_1.length; _i++) {\n var schemaAssociation = schemaAssociations_1[_i];\n var uris = schemaAssociation.uris.map(normalizeId);\n var association = this.addFilePatternAssociation(schemaAssociation.pattern, uris);\n this.contributionAssociations.push(association);\n }\n }\n };\n JSONSchemaService.prototype.addSchemaHandle = function (id, unresolvedSchemaContent) {\n var schemaHandle = new SchemaHandle(this, id, unresolvedSchemaContent);\n this.schemasById[id] = schemaHandle;\n return schemaHandle;\n };\n JSONSchemaService.prototype.getOrAddSchemaHandle = function (id, unresolvedSchemaContent) {\n return this.schemasById[id] || this.addSchemaHandle(id, unresolvedSchemaContent);\n };\n JSONSchemaService.prototype.addFilePatternAssociation = function (pattern, uris) {\n var fpa = new FilePatternAssociation(pattern, uris);\n this.filePatternAssociations.push(fpa);\n return fpa;\n };\n JSONSchemaService.prototype.registerExternalSchema = function (uri, filePatterns, unresolvedSchemaContent) {\n var id = normalizeId(uri);\n this.registeredSchemasIds[id] = true;\n this.cachedSchemaForResource = undefined;\n if (filePatterns) {\n this.addFilePatternAssociation(filePatterns, [uri]);\n }\n return unresolvedSchemaContent ? this.addSchemaHandle(id, unresolvedSchemaContent) : this.getOrAddSchemaHandle(id);\n };\n JSONSchemaService.prototype.clearExternalSchemas = function () {\n this.schemasById = {};\n this.filePatternAssociations = [];\n this.registeredSchemasIds = {};\n this.cachedSchemaForResource = undefined;\n for (var id in this.contributionSchemas) {\n this.schemasById[id] = this.contributionSchemas[id];\n this.registeredSchemasIds[id] = true;\n }\n for (var _i = 0, _a = this.contributionAssociations; _i < _a.length; _i++) {\n var contributionAssociation = _a[_i];\n this.filePatternAssociations.push(contributionAssociation);\n }\n };\n JSONSchemaService.prototype.getResolvedSchema = function (schemaId) {\n var id = normalizeId(schemaId);\n var schemaHandle = this.schemasById[id];\n if (schemaHandle) {\n return schemaHandle.getResolvedSchema();\n }\n return this.promise.resolve(undefined);\n };\n JSONSchemaService.prototype.loadSchema = function (url) {\n if (!this.requestService) {\n var errorMessage = localize('json.schema.norequestservice', 'Unable to load schema from \\'{0}\\'. No schema request service available', toDisplayString(url));\n return this.promise.resolve(new UnresolvedSchema({}, [errorMessage]));\n }\n return this.requestService(url).then(function (content) {\n if (!content) {\n var errorMessage = localize('json.schema.nocontent', 'Unable to load schema from \\'{0}\\': No content.', toDisplayString(url));\n return new UnresolvedSchema({}, [errorMessage]);\n }\n var schemaContent = {};\n var jsonErrors = [];\n schemaContent = Json.parse(content, jsonErrors);\n var errors = jsonErrors.length ? [localize('json.schema.invalidFormat', 'Unable to parse content from \\'{0}\\': Parse error at offset {1}.', toDisplayString(url), jsonErrors[0].offset)] : [];\n return new UnresolvedSchema(schemaContent, errors);\n }, function (error) {\n var errorMessage = error.toString();\n var errorSplit = error.toString().split('Error: ');\n if (errorSplit.length > 1) {\n // more concise error message, URL and context are attached by caller anyways\n errorMessage = errorSplit[1];\n }\n if (Strings.endsWith(errorMessage, '.')) {\n errorMessage = errorMessage.substr(0, errorMessage.length - 1);\n }\n return new UnresolvedSchema({}, [localize('json.schema.nocontent', 'Unable to load schema from \\'{0}\\': {1}.', toDisplayString(url), errorMessage)]);\n });\n };\n JSONSchemaService.prototype.resolveSchemaContent = function (schemaToResolve, schemaURL, dependencies) {\n var _this = this;\n var resolveErrors = schemaToResolve.errors.slice(0);\n var schema = schemaToResolve.schema;\n if (schema.$schema) {\n var id = normalizeId(schema.$schema);\n if (id === 'http://json-schema.org/draft-03/schema') {\n return this.promise.resolve(new ResolvedSchema({}, [localize('json.schema.draft03.notsupported', \"Draft-03 schemas are not supported.\")]));\n }\n else if (id === 'https://json-schema.org/draft/2019-09/schema') {\n resolveErrors.push(localize('json.schema.draft201909.notsupported', \"Draft 2019-09 schemas are not yet fully supported.\"));\n }\n }\n var contextService = this.contextService;\n var findSection = function (schema, path) {\n if (!path) {\n return schema;\n }\n var current = schema;\n if (path[0] === '/') {\n path = path.substr(1);\n }\n path.split('/').some(function (part) {\n part = part.replace(/~1/g, '/').replace(/~0/g, '~');\n current = current[part];\n return !current;\n });\n return current;\n };\n var merge = function (target, sourceRoot, sourceURI, refSegment) {\n var path = refSegment ? decodeURIComponent(refSegment) : undefined;\n var section = findSection(sourceRoot, path);\n if (section) {\n for (var key in section) {\n if (section.hasOwnProperty(key) && !target.hasOwnProperty(key)) {\n target[key] = section[key];\n }\n }\n }\n else {\n resolveErrors.push(localize('json.schema.invalidref', '$ref \\'{0}\\' in \\'{1}\\' can not be resolved.', path, sourceURI));\n }\n };\n var resolveExternalLink = function (node, uri, refSegment, parentSchemaURL, parentSchemaDependencies) {\n if (contextService && !/^[A-Za-z][A-Za-z0-9+\\-.+]*:\\/\\/.*/.test(uri)) {\n uri = contextService.resolveRelativePath(uri, parentSchemaURL);\n }\n uri = normalizeId(uri);\n var referencedHandle = _this.getOrAddSchemaHandle(uri);\n return referencedHandle.getUnresolvedSchema().then(function (unresolvedSchema) {\n parentSchemaDependencies[uri] = true;\n if (unresolvedSchema.errors.length) {\n var loc = refSegment ? uri + '#' + refSegment : uri;\n resolveErrors.push(localize('json.schema.problemloadingref', 'Problems loading reference \\'{0}\\': {1}', loc, unresolvedSchema.errors[0]));\n }\n merge(node, unresolvedSchema.schema, uri, refSegment);\n return resolveRefs(node, unresolvedSchema.schema, uri, referencedHandle.dependencies);\n });\n };\n var resolveRefs = function (node, parentSchema, parentSchemaURL, parentSchemaDependencies) {\n if (!node || typeof node !== 'object') {\n return Promise.resolve(null);\n }\n var toWalk = [node];\n var seen = [];\n var openPromises = [];\n var collectEntries = function () {\n var entries = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n entries[_i] = arguments[_i];\n }\n for (var _a = 0, entries_1 = entries; _a < entries_1.length; _a++) {\n var entry = entries_1[_a];\n if (typeof entry === 'object') {\n toWalk.push(entry);\n }\n }\n };\n var collectMapEntries = function () {\n var maps = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n maps[_i] = arguments[_i];\n }\n for (var _a = 0, maps_1 = maps; _a < maps_1.length; _a++) {\n var map = maps_1[_a];\n if (typeof map === 'object') {\n for (var k in map) {\n var key = k;\n var entry = map[key];\n if (typeof entry === 'object') {\n toWalk.push(entry);\n }\n }\n }\n }\n };\n var collectArrayEntries = function () {\n var arrays = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n arrays[_i] = arguments[_i];\n }\n for (var _a = 0, arrays_1 = arrays; _a < arrays_1.length; _a++) {\n var array = arrays_1[_a];\n if (Array.isArray(array)) {\n for (var _b = 0, array_1 = array; _b < array_1.length; _b++) {\n var entry = array_1[_b];\n if (typeof entry === 'object') {\n toWalk.push(entry);\n }\n }\n }\n }\n };\n var handleRef = function (next) {\n var seenRefs = [];\n while (next.$ref) {\n var ref = next.$ref;\n var segments = ref.split('#', 2);\n delete next.$ref;\n if (segments[0].length > 0) {\n openPromises.push(resolveExternalLink(next, segments[0], segments[1], parentSchemaURL, parentSchemaDependencies));\n return;\n }\n else {\n if (seenRefs.indexOf(ref) === -1) {\n merge(next, parentSchema, parentSchemaURL, segments[1]); // can set next.$ref again, use seenRefs to avoid circle\n seenRefs.push(ref);\n }\n }\n }\n collectEntries(next.items, next.additionalItems, next.additionalProperties, next.not, next.contains, next.propertyNames, next.if, next.then, next.else);\n collectMapEntries(next.definitions, next.properties, next.patternProperties, next.dependencies);\n collectArrayEntries(next.anyOf, next.allOf, next.oneOf, next.items);\n };\n while (toWalk.length) {\n var next = toWalk.pop();\n if (seen.indexOf(next) >= 0) {\n continue;\n }\n seen.push(next);\n handleRef(next);\n }\n return _this.promise.all(openPromises);\n };\n return resolveRefs(schema, schema, schemaURL, dependencies).then(function (_) { return new ResolvedSchema(schema, resolveErrors); });\n };\n JSONSchemaService.prototype.getSchemaForResource = function (resource, document) {\n // first use $schema if present\n if (document && document.root && document.root.type === 'object') {\n var schemaProperties = document.root.properties.filter(function (p) { return (p.keyNode.value === '$schema') && p.valueNode && p.valueNode.type === 'string'; });\n if (schemaProperties.length > 0) {\n var valueNode = schemaProperties[0].valueNode;\n if (valueNode && valueNode.type === 'string') {\n var schemeId = Parser.getNodeValue(valueNode);\n if (schemeId && Strings.startsWith(schemeId, '.') && this.contextService) {\n schemeId = this.contextService.resolveRelativePath(schemeId, resource);\n }\n if (schemeId) {\n var id = normalizeId(schemeId);\n return this.getOrAddSchemaHandle(id).getResolvedSchema();\n }\n }\n }\n }\n if (this.cachedSchemaForResource && this.cachedSchemaForResource.resource === resource) {\n return this.cachedSchemaForResource.resolvedSchema;\n }\n var seen = Object.create(null);\n var schemas = [];\n var normalizedResource = normalizeResourceForMatching(resource);\n for (var _i = 0, _a = this.filePatternAssociations; _i < _a.length; _i++) {\n var entry = _a[_i];\n if (entry.matchesPattern(normalizedResource)) {\n for (var _b = 0, _c = entry.getURIs(); _b < _c.length; _b++) {\n var schemaId = _c[_b];\n if (!seen[schemaId]) {\n schemas.push(schemaId);\n seen[schemaId] = true;\n }\n }\n }\n }\n var resolvedSchema = schemas.length > 0 ? this.createCombinedSchema(resource, schemas).getResolvedSchema() : this.promise.resolve(undefined);\n this.cachedSchemaForResource = { resource: resource, resolvedSchema: resolvedSchema };\n return resolvedSchema;\n };\n JSONSchemaService.prototype.createCombinedSchema = function (resource, schemaIds) {\n if (schemaIds.length === 1) {\n return this.getOrAddSchemaHandle(schemaIds[0]);\n }\n else {\n var combinedSchemaId = 'schemaservice://combinedSchema/' + encodeURIComponent(resource);\n var combinedSchema = {\n allOf: schemaIds.map(function (schemaId) { return ({ $ref: schemaId }); })\n };\n return this.addSchemaHandle(combinedSchemaId, combinedSchema);\n }\n };\n JSONSchemaService.prototype.getMatchingSchemas = function (document, jsonDocument, schema) {\n if (schema) {\n var id = schema.id || ('schemaservice://untitled/matchingSchemas/' + idCounter++);\n return this.resolveSchemaContent(new UnresolvedSchema(schema), id, {}).then(function (resolvedSchema) {\n return jsonDocument.getMatchingSchemas(resolvedSchema.schema).filter(function (s) { return !s.inverted; });\n });\n }\n return this.getSchemaForResource(document.uri, jsonDocument).then(function (schema) {\n if (schema) {\n return jsonDocument.getMatchingSchemas(schema.schema).filter(function (s) { return !s.inverted; });\n }\n return [];\n });\n };\n return JSONSchemaService;\n}());\nexport { JSONSchemaService };\nvar idCounter = 0;\nfunction normalizeId(id) {\n // remove trailing '#', normalize drive capitalization\n try {\n return URI.parse(id).toString();\n }\n catch (e) {\n return id;\n }\n}\nfunction normalizeResourceForMatching(resource) {\n // remove queries and fragments, normalize drive capitalization\n try {\n return URI.parse(resource).with({ fragment: null, query: null }).toString();\n }\n catch (e) {\n return resource;\n }\n}\nfunction toDisplayString(url) {\n try {\n var uri = URI.parse(url);\n if (uri.scheme === 'file') {\n return uri.fsPath;\n }\n }\n catch (e) {\n // ignore\n }\n return url;\n}\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\nimport { UnresolvedSchema } from './jsonSchemaService.js';\nimport { ErrorCode, Diagnostic, DiagnosticSeverity, Range } from '../jsonLanguageTypes.js';\nimport * as nls from './../../../fillers/vscode-nls.js';\nimport { isBoolean } from '../utils/objects.js';\nvar localize = nls.loadMessageBundle();\nvar JSONValidation = /** @class */ (function () {\n function JSONValidation(jsonSchemaService, promiseConstructor) {\n this.jsonSchemaService = jsonSchemaService;\n this.promise = promiseConstructor;\n this.validationEnabled = true;\n }\n JSONValidation.prototype.configure = function (raw) {\n if (raw) {\n this.validationEnabled = raw.validate !== false;\n this.commentSeverity = raw.allowComments ? undefined : DiagnosticSeverity.Error;\n }\n };\n JSONValidation.prototype.doValidation = function (textDocument, jsonDocument, documentSettings, schema) {\n var _this = this;\n if (!this.validationEnabled) {\n return this.promise.resolve([]);\n }\n var diagnostics = [];\n var added = {};\n var addProblem = function (problem) {\n // remove duplicated messages\n var signature = problem.range.start.line + ' ' + problem.range.start.character + ' ' + problem.message;\n if (!added[signature]) {\n added[signature] = true;\n diagnostics.push(problem);\n }\n };\n var getDiagnostics = function (schema) {\n var trailingCommaSeverity = (documentSettings === null || documentSettings === void 0 ? void 0 : documentSettings.trailingCommas) ? toDiagnosticSeverity(documentSettings.trailingCommas) : DiagnosticSeverity.Error;\n var commentSeverity = (documentSettings === null || documentSettings === void 0 ? void 0 : documentSettings.comments) ? toDiagnosticSeverity(documentSettings.comments) : _this.commentSeverity;\n var schemaValidation = (documentSettings === null || documentSettings === void 0 ? void 0 : documentSettings.schemaValidation) ? toDiagnosticSeverity(documentSettings.schemaValidation) : DiagnosticSeverity.Warning;\n var schemaRequest = (documentSettings === null || documentSettings === void 0 ? void 0 : documentSettings.schemaRequest) ? toDiagnosticSeverity(documentSettings.schemaRequest) : DiagnosticSeverity.Warning;\n if (schema) {\n if (schema.errors.length && jsonDocument.root && schemaRequest) {\n var astRoot = jsonDocument.root;\n var property = astRoot.type === 'object' ? astRoot.properties[0] : undefined;\n if (property && property.keyNode.value === '$schema') {\n var node = property.valueNode || property;\n var range = Range.create(textDocument.positionAt(node.offset), textDocument.positionAt(node.offset + node.length));\n addProblem(Diagnostic.create(range, schema.errors[0], schemaRequest, ErrorCode.SchemaResolveError));\n }\n else {\n var range = Range.create(textDocument.positionAt(astRoot.offset), textDocument.positionAt(astRoot.offset + 1));\n addProblem(Diagnostic.create(range, schema.errors[0], schemaRequest, ErrorCode.SchemaResolveError));\n }\n }\n else if (schemaValidation) {\n var semanticErrors = jsonDocument.validate(textDocument, schema.schema, schemaValidation);\n if (semanticErrors) {\n semanticErrors.forEach(addProblem);\n }\n }\n if (schemaAllowsComments(schema.schema)) {\n commentSeverity = undefined;\n }\n if (schemaAllowsTrailingCommas(schema.schema)) {\n trailingCommaSeverity = undefined;\n }\n }\n for (var _i = 0, _a = jsonDocument.syntaxErrors; _i < _a.length; _i++) {\n var p = _a[_i];\n if (p.code === ErrorCode.TrailingComma) {\n if (typeof trailingCommaSeverity !== 'number') {\n continue;\n }\n p.severity = trailingCommaSeverity;\n }\n addProblem(p);\n }\n if (typeof commentSeverity === 'number') {\n var message_1 = localize('InvalidCommentToken', 'Comments are not permitted in JSON.');\n jsonDocument.comments.forEach(function (c) {\n addProblem(Diagnostic.create(c, message_1, commentSeverity, ErrorCode.CommentNotPermitted));\n });\n }\n return diagnostics;\n };\n if (schema) {\n var id = schema.id || ('schemaservice://untitled/' + idCounter++);\n return this.jsonSchemaService.resolveSchemaContent(new UnresolvedSchema(schema), id, {}).then(function (resolvedSchema) {\n return getDiagnostics(resolvedSchema);\n });\n }\n return this.jsonSchemaService.getSchemaForResource(textDocument.uri, jsonDocument).then(function (schema) {\n return getDiagnostics(schema);\n });\n };\n return JSONValidation;\n}());\nexport { JSONValidation };\nvar idCounter = 0;\nfunction schemaAllowsComments(schemaRef) {\n if (schemaRef && typeof schemaRef === 'object') {\n if (isBoolean(schemaRef.allowComments)) {\n return schemaRef.allowComments;\n }\n if (schemaRef.allOf) {\n for (var _i = 0, _a = schemaRef.allOf; _i < _a.length; _i++) {\n var schema = _a[_i];\n var allow = schemaAllowsComments(schema);\n if (isBoolean(allow)) {\n return allow;\n }\n }\n }\n }\n return undefined;\n}\nfunction schemaAllowsTrailingCommas(schemaRef) {\n if (schemaRef && typeof schemaRef === 'object') {\n if (isBoolean(schemaRef.allowTrailingCommas)) {\n return schemaRef.allowTrailingCommas;\n }\n var deprSchemaRef = schemaRef;\n if (isBoolean(deprSchemaRef['allowsTrailingCommas'])) { // deprecated\n return deprSchemaRef['allowsTrailingCommas'];\n }\n if (schemaRef.allOf) {\n for (var _i = 0, _a = schemaRef.allOf; _i < _a.length; _i++) {\n var schema = _a[_i];\n var allow = schemaAllowsTrailingCommas(schema);\n if (isBoolean(allow)) {\n return allow;\n }\n }\n }\n }\n return undefined;\n}\nfunction toDiagnosticSeverity(severityLevel) {\n switch (severityLevel) {\n case 'error': return DiagnosticSeverity.Error;\n case 'warning': return DiagnosticSeverity.Warning;\n case 'ignore': return undefined;\n }\n return undefined;\n}\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\nvar Digit0 = 48;\nvar Digit9 = 57;\nvar A = 65;\nvar a = 97;\nvar f = 102;\nexport function hexDigit(charCode) {\n if (charCode < Digit0) {\n return 0;\n }\n if (charCode <= Digit9) {\n return charCode - Digit0;\n }\n if (charCode < a) {\n charCode += (a - A);\n }\n if (charCode >= a && charCode <= f) {\n return charCode - a + 10;\n }\n return 0;\n}\nexport function colorFromHex(text) {\n if (text[0] !== '#') {\n return undefined;\n }\n switch (text.length) {\n case 4:\n return {\n red: (hexDigit(text.charCodeAt(1)) * 0x11) / 255.0,\n green: (hexDigit(text.charCodeAt(2)) * 0x11) / 255.0,\n blue: (hexDigit(text.charCodeAt(3)) * 0x11) / 255.0,\n alpha: 1\n };\n case 5:\n return {\n red: (hexDigit(text.charCodeAt(1)) * 0x11) / 255.0,\n green: (hexDigit(text.charCodeAt(2)) * 0x11) / 255.0,\n blue: (hexDigit(text.charCodeAt(3)) * 0x11) / 255.0,\n alpha: (hexDigit(text.charCodeAt(4)) * 0x11) / 255.0,\n };\n case 7:\n return {\n red: (hexDigit(text.charCodeAt(1)) * 0x10 + hexDigit(text.charCodeAt(2))) / 255.0,\n green: (hexDigit(text.charCodeAt(3)) * 0x10 + hexDigit(text.charCodeAt(4))) / 255.0,\n blue: (hexDigit(text.charCodeAt(5)) * 0x10 + hexDigit(text.charCodeAt(6))) / 255.0,\n alpha: 1\n };\n case 9:\n return {\n red: (hexDigit(text.charCodeAt(1)) * 0x10 + hexDigit(text.charCodeAt(2))) / 255.0,\n green: (hexDigit(text.charCodeAt(3)) * 0x10 + hexDigit(text.charCodeAt(4))) / 255.0,\n blue: (hexDigit(text.charCodeAt(5)) * 0x10 + hexDigit(text.charCodeAt(6))) / 255.0,\n alpha: (hexDigit(text.charCodeAt(7)) * 0x10 + hexDigit(text.charCodeAt(8))) / 255.0\n };\n }\n return undefined;\n}\nexport function colorFrom256RGB(red, green, blue, alpha) {\n if (alpha === void 0) { alpha = 1.0; }\n return {\n red: red / 255.0,\n green: green / 255.0,\n blue: blue / 255.0,\n alpha: alpha\n };\n}\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\nimport * as Parser from '../parser/jsonParser.js';\nimport * as Strings from '../utils/strings.js';\nimport { colorFromHex } from '../utils/colors.js';\nimport { Range, TextEdit, SymbolKind, Location } from \"../jsonLanguageTypes.js\";\nvar JSONDocumentSymbols = /** @class */ (function () {\n function JSONDocumentSymbols(schemaService) {\n this.schemaService = schemaService;\n }\n JSONDocumentSymbols.prototype.findDocumentSymbols = function (document, doc, context) {\n var _this = this;\n if (context === void 0) { context = { resultLimit: Number.MAX_VALUE }; }\n var root = doc.root;\n if (!root) {\n return [];\n }\n var limit = context.resultLimit || Number.MAX_VALUE;\n // special handling for key bindings\n var resourceString = document.uri;\n if ((resourceString === 'vscode://defaultsettings/keybindings.json') || Strings.endsWith(resourceString.toLowerCase(), '/user/keybindings.json')) {\n if (root.type === 'array') {\n var result_1 = [];\n for (var _i = 0, _a = root.items; _i < _a.length; _i++) {\n var item = _a[_i];\n if (item.type === 'object') {\n for (var _b = 0, _c = item.properties; _b < _c.length; _b++) {\n var property = _c[_b];\n if (property.keyNode.value === 'key' && property.valueNode) {\n var location = Location.create(document.uri, getRange(document, item));\n result_1.push({ name: Parser.getNodeValue(property.valueNode), kind: SymbolKind.Function, location: location });\n limit--;\n if (limit <= 0) {\n if (context && context.onResultLimitExceeded) {\n context.onResultLimitExceeded(resourceString);\n }\n return result_1;\n }\n }\n }\n }\n }\n return result_1;\n }\n }\n var toVisit = [\n { node: root, containerName: '' }\n ];\n var nextToVisit = 0;\n var limitExceeded = false;\n var result = [];\n var collectOutlineEntries = function (node, containerName) {\n if (node.type === 'array') {\n node.items.forEach(function (node) {\n if (node) {\n toVisit.push({ node: node, containerName: containerName });\n }\n });\n }\n else if (node.type === 'object') {\n node.properties.forEach(function (property) {\n var valueNode = property.valueNode;\n if (valueNode) {\n if (limit > 0) {\n limit--;\n var location = Location.create(document.uri, getRange(document, property));\n var childContainerName = containerName ? containerName + '.' + property.keyNode.value : property.keyNode.value;\n result.push({ name: _this.getKeyLabel(property), kind: _this.getSymbolKind(valueNode.type), location: location, containerName: containerName });\n toVisit.push({ node: valueNode, containerName: childContainerName });\n }\n else {\n limitExceeded = true;\n }\n }\n });\n }\n };\n // breath first traversal\n while (nextToVisit < toVisit.length) {\n var next = toVisit[nextToVisit++];\n collectOutlineEntries(next.node, next.containerName);\n }\n if (limitExceeded && context && context.onResultLimitExceeded) {\n context.onResultLimitExceeded(resourceString);\n }\n return result;\n };\n JSONDocumentSymbols.prototype.findDocumentSymbols2 = function (document, doc, context) {\n var _this = this;\n if (context === void 0) { context = { resultLimit: Number.MAX_VALUE }; }\n var root = doc.root;\n if (!root) {\n return [];\n }\n var limit = context.resultLimit || Number.MAX_VALUE;\n // special handling for key bindings\n var resourceString = document.uri;\n if ((resourceString === 'vscode://defaultsettings/keybindings.json') || Strings.endsWith(resourceString.toLowerCase(), '/user/keybindings.json')) {\n if (root.type === 'array') {\n var result_2 = [];\n for (var _i = 0, _a = root.items; _i < _a.length; _i++) {\n var item = _a[_i];\n if (item.type === 'object') {\n for (var _b = 0, _c = item.properties; _b < _c.length; _b++) {\n var property = _c[_b];\n if (property.keyNode.value === 'key' && property.valueNode) {\n var range = getRange(document, item);\n var selectionRange = getRange(document, property.keyNode);\n result_2.push({ name: Parser.getNodeValue(property.valueNode), kind: SymbolKind.Function, range: range, selectionRange: selectionRange });\n limit--;\n if (limit <= 0) {\n if (context && context.onResultLimitExceeded) {\n context.onResultLimitExceeded(resourceString);\n }\n return result_2;\n }\n }\n }\n }\n }\n return result_2;\n }\n }\n var result = [];\n var toVisit = [\n { node: root, result: result }\n ];\n var nextToVisit = 0;\n var limitExceeded = false;\n var collectOutlineEntries = function (node, result) {\n if (node.type === 'array') {\n node.items.forEach(function (node, index) {\n if (node) {\n if (limit > 0) {\n limit--;\n var range = getRange(document, node);\n var selectionRange = range;\n var name = String(index);\n var symbol = { name: name, kind: _this.getSymbolKind(node.type), range: range, selectionRange: selectionRange, children: [] };\n result.push(symbol);\n toVisit.push({ result: symbol.children, node: node });\n }\n else {\n limitExceeded = true;\n }\n }\n });\n }\n else if (node.type === 'object') {\n node.properties.forEach(function (property) {\n var valueNode = property.valueNode;\n if (valueNode) {\n if (limit > 0) {\n limit--;\n var range = getRange(document, property);\n var selectionRange = getRange(document, property.keyNode);\n var children = [];\n var symbol = { name: _this.getKeyLabel(property), kind: _this.getSymbolKind(valueNode.type), range: range, selectionRange: selectionRange, children: children, detail: _this.getDetail(valueNode) };\n result.push(symbol);\n toVisit.push({ result: children, node: valueNode });\n }\n else {\n limitExceeded = true;\n }\n }\n });\n }\n };\n // breath first traversal\n while (nextToVisit < toVisit.length) {\n var next = toVisit[nextToVisit++];\n collectOutlineEntries(next.node, next.result);\n }\n if (limitExceeded && context && context.onResultLimitExceeded) {\n context.onResultLimitExceeded(resourceString);\n }\n return result;\n };\n JSONDocumentSymbols.prototype.getSymbolKind = function (nodeType) {\n switch (nodeType) {\n case 'object':\n return SymbolKind.Module;\n case 'string':\n return SymbolKind.String;\n case 'number':\n return SymbolKind.Number;\n case 'array':\n return SymbolKind.Array;\n case 'boolean':\n return SymbolKind.Boolean;\n default: // 'null'\n return SymbolKind.Variable;\n }\n };\n JSONDocumentSymbols.prototype.getKeyLabel = function (property) {\n var name = property.keyNode.value;\n if (name) {\n name = name.replace(/[\\n]/g, '↵');\n }\n if (name && name.trim()) {\n return name;\n }\n return \"\\\"\" + name + \"\\\"\";\n };\n JSONDocumentSymbols.prototype.getDetail = function (node) {\n if (!node) {\n return undefined;\n }\n if (node.type === 'boolean' || node.type === 'number' || node.type === 'null' || node.type === 'string') {\n return String(node.value);\n }\n else {\n if (node.type === 'array') {\n return node.children.length ? undefined : '[]';\n }\n else if (node.type === 'object') {\n return node.children.length ? undefined : '{}';\n }\n }\n return undefined;\n };\n JSONDocumentSymbols.prototype.findDocumentColors = function (document, doc, context) {\n return this.schemaService.getSchemaForResource(document.uri, doc).then(function (schema) {\n var result = [];\n if (schema) {\n var limit = context && typeof context.resultLimit === 'number' ? context.resultLimit : Number.MAX_VALUE;\n var matchingSchemas = doc.getMatchingSchemas(schema.schema);\n var visitedNode = {};\n for (var _i = 0, matchingSchemas_1 = matchingSchemas; _i < matchingSchemas_1.length; _i++) {\n var s = matchingSchemas_1[_i];\n if (!s.inverted && s.schema && (s.schema.format === 'color' || s.schema.format === 'color-hex') && s.node && s.node.type === 'string') {\n var nodeId = String(s.node.offset);\n if (!visitedNode[nodeId]) {\n var color = colorFromHex(Parser.getNodeValue(s.node));\n if (color) {\n var range = getRange(document, s.node);\n result.push({ color: color, range: range });\n }\n visitedNode[nodeId] = true;\n limit--;\n if (limit <= 0) {\n if (context && context.onResultLimitExceeded) {\n context.onResultLimitExceeded(document.uri);\n }\n return result;\n }\n }\n }\n }\n }\n return result;\n });\n };\n JSONDocumentSymbols.prototype.getColorPresentations = function (document, doc, color, range) {\n var result = [];\n var red256 = Math.round(color.red * 255), green256 = Math.round(color.green * 255), blue256 = Math.round(color.blue * 255);\n function toTwoDigitHex(n) {\n var r = n.toString(16);\n return r.length !== 2 ? '0' + r : r;\n }\n var label;\n if (color.alpha === 1) {\n label = \"#\" + toTwoDigitHex(red256) + toTwoDigitHex(green256) + toTwoDigitHex(blue256);\n }\n else {\n label = \"#\" + toTwoDigitHex(red256) + toTwoDigitHex(green256) + toTwoDigitHex(blue256) + toTwoDigitHex(Math.round(color.alpha * 255));\n }\n result.push({ label: label, textEdit: TextEdit.replace(range, JSON.stringify(label)) });\n return result;\n };\n return JSONDocumentSymbols;\n}());\nexport { JSONDocumentSymbols };\nfunction getRange(document, node) {\n return Range.create(document.positionAt(node.offset), document.positionAt(node.offset + node.length));\n}\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\nimport * as nls from './../../../fillers/vscode-nls.js';\nvar localize = nls.loadMessageBundle();\nexport var schemaContributions = {\n schemaAssociations: [],\n schemas: {\n // refer to the latest schema\n 'http://json-schema.org/schema#': {\n $ref: 'http://json-schema.org/draft-07/schema#'\n },\n // bundle the schema-schema to include (localized) descriptions\n 'http://json-schema.org/draft-04/schema#': {\n 'title': localize('schema.json', 'Describes a JSON file using a schema. See json-schema.org for more info.'),\n '$schema': 'http://json-schema.org/draft-04/schema#',\n 'definitions': {\n 'schemaArray': {\n 'type': 'array',\n 'minItems': 1,\n 'items': {\n '$ref': '#'\n }\n },\n 'positiveInteger': {\n 'type': 'integer',\n 'minimum': 0\n },\n 'positiveIntegerDefault0': {\n 'allOf': [\n {\n '$ref': '#/definitions/positiveInteger'\n },\n {\n 'default': 0\n }\n ]\n },\n 'simpleTypes': {\n 'type': 'string',\n 'enum': [\n 'array',\n 'boolean',\n 'integer',\n 'null',\n 'number',\n 'object',\n 'string'\n ]\n },\n 'stringArray': {\n 'type': 'array',\n 'items': {\n 'type': 'string'\n },\n 'minItems': 1,\n 'uniqueItems': true\n }\n },\n 'type': 'object',\n 'properties': {\n 'id': {\n 'type': 'string',\n 'format': 'uri'\n },\n '$schema': {\n 'type': 'string',\n 'format': 'uri'\n },\n 'title': {\n 'type': 'string'\n },\n 'description': {\n 'type': 'string'\n },\n 'default': {},\n 'multipleOf': {\n 'type': 'number',\n 'minimum': 0,\n 'exclusiveMinimum': true\n },\n 'maximum': {\n 'type': 'number'\n },\n 'exclusiveMaximum': {\n 'type': 'boolean',\n 'default': false\n },\n 'minimum': {\n 'type': 'number'\n },\n 'exclusiveMinimum': {\n 'type': 'boolean',\n 'default': false\n },\n 'maxLength': {\n 'allOf': [\n {\n '$ref': '#/definitions/positiveInteger'\n }\n ]\n },\n 'minLength': {\n 'allOf': [\n {\n '$ref': '#/definitions/positiveIntegerDefault0'\n }\n ]\n },\n 'pattern': {\n 'type': 'string',\n 'format': 'regex'\n },\n 'additionalItems': {\n 'anyOf': [\n {\n 'type': 'boolean'\n },\n {\n '$ref': '#'\n }\n ],\n 'default': {}\n },\n 'items': {\n 'anyOf': [\n {\n '$ref': '#'\n },\n {\n '$ref': '#/definitions/schemaArray'\n }\n ],\n 'default': {}\n },\n 'maxItems': {\n 'allOf': [\n {\n '$ref': '#/definitions/positiveInteger'\n }\n ]\n },\n 'minItems': {\n 'allOf': [\n {\n '$ref': '#/definitions/positiveIntegerDefault0'\n }\n ]\n },\n 'uniqueItems': {\n 'type': 'boolean',\n 'default': false\n },\n 'maxProperties': {\n 'allOf': [\n {\n '$ref': '#/definitions/positiveInteger'\n }\n ]\n },\n 'minProperties': {\n 'allOf': [\n {\n '$ref': '#/definitions/positiveIntegerDefault0'\n }\n ]\n },\n 'required': {\n 'allOf': [\n {\n '$ref': '#/definitions/stringArray'\n }\n ]\n },\n 'additionalProperties': {\n 'anyOf': [\n {\n 'type': 'boolean'\n },\n {\n '$ref': '#'\n }\n ],\n 'default': {}\n },\n 'definitions': {\n 'type': 'object',\n 'additionalProperties': {\n '$ref': '#'\n },\n 'default': {}\n },\n 'properties': {\n 'type': 'object',\n 'additionalProperties': {\n '$ref': '#'\n },\n 'default': {}\n },\n 'patternProperties': {\n 'type': 'object',\n 'additionalProperties': {\n '$ref': '#'\n },\n 'default': {}\n },\n 'dependencies': {\n 'type': 'object',\n 'additionalProperties': {\n 'anyOf': [\n {\n '$ref': '#'\n },\n {\n '$ref': '#/definitions/stringArray'\n }\n ]\n }\n },\n 'enum': {\n 'type': 'array',\n 'minItems': 1,\n 'uniqueItems': true\n },\n 'type': {\n 'anyOf': [\n {\n '$ref': '#/definitions/simpleTypes'\n },\n {\n 'type': 'array',\n 'items': {\n '$ref': '#/definitions/simpleTypes'\n },\n 'minItems': 1,\n 'uniqueItems': true\n }\n ]\n },\n 'format': {\n 'anyOf': [\n {\n 'type': 'string',\n 'enum': [\n 'date-time',\n 'uri',\n 'email',\n 'hostname',\n 'ipv4',\n 'ipv6',\n 'regex'\n ]\n },\n {\n 'type': 'string'\n }\n ]\n },\n 'allOf': {\n 'allOf': [\n {\n '$ref': '#/definitions/schemaArray'\n }\n ]\n },\n 'anyOf': {\n 'allOf': [\n {\n '$ref': '#/definitions/schemaArray'\n }\n ]\n },\n 'oneOf': {\n 'allOf': [\n {\n '$ref': '#/definitions/schemaArray'\n }\n ]\n },\n 'not': {\n 'allOf': [\n {\n '$ref': '#'\n }\n ]\n }\n },\n 'dependencies': {\n 'exclusiveMaximum': [\n 'maximum'\n ],\n 'exclusiveMinimum': [\n 'minimum'\n ]\n },\n 'default': {}\n },\n 'http://json-schema.org/draft-07/schema#': {\n 'title': localize('schema.json', 'Describes a JSON file using a schema. See json-schema.org for more info.'),\n 'definitions': {\n 'schemaArray': {\n 'type': 'array',\n 'minItems': 1,\n 'items': { '$ref': '#' }\n },\n 'nonNegativeInteger': {\n 'type': 'integer',\n 'minimum': 0\n },\n 'nonNegativeIntegerDefault0': {\n 'allOf': [\n { '$ref': '#/definitions/nonNegativeInteger' },\n { 'default': 0 }\n ]\n },\n 'simpleTypes': {\n 'enum': [\n 'array',\n 'boolean',\n 'integer',\n 'null',\n 'number',\n 'object',\n 'string'\n ]\n },\n 'stringArray': {\n 'type': 'array',\n 'items': { 'type': 'string' },\n 'uniqueItems': true,\n 'default': []\n }\n },\n 'type': ['object', 'boolean'],\n 'properties': {\n '$id': {\n 'type': 'string',\n 'format': 'uri-reference'\n },\n '$schema': {\n 'type': 'string',\n 'format': 'uri'\n },\n '$ref': {\n 'type': 'string',\n 'format': 'uri-reference'\n },\n '$comment': {\n 'type': 'string'\n },\n 'title': {\n 'type': 'string'\n },\n 'description': {\n 'type': 'string'\n },\n 'default': true,\n 'readOnly': {\n 'type': 'boolean',\n 'default': false\n },\n 'examples': {\n 'type': 'array',\n 'items': true\n },\n 'multipleOf': {\n 'type': 'number',\n 'exclusiveMinimum': 0\n },\n 'maximum': {\n 'type': 'number'\n },\n 'exclusiveMaximum': {\n 'type': 'number'\n },\n 'minimum': {\n 'type': 'number'\n },\n 'exclusiveMinimum': {\n 'type': 'number'\n },\n 'maxLength': { '$ref': '#/definitions/nonNegativeInteger' },\n 'minLength': { '$ref': '#/definitions/nonNegativeIntegerDefault0' },\n 'pattern': {\n 'type': 'string',\n 'format': 'regex'\n },\n 'additionalItems': { '$ref': '#' },\n 'items': {\n 'anyOf': [\n { '$ref': '#' },\n { '$ref': '#/definitions/schemaArray' }\n ],\n 'default': true\n },\n 'maxItems': { '$ref': '#/definitions/nonNegativeInteger' },\n 'minItems': { '$ref': '#/definitions/nonNegativeIntegerDefault0' },\n 'uniqueItems': {\n 'type': 'boolean',\n 'default': false\n },\n 'contains': { '$ref': '#' },\n 'maxProperties': { '$ref': '#/definitions/nonNegativeInteger' },\n 'minProperties': { '$ref': '#/definitions/nonNegativeIntegerDefault0' },\n 'required': { '$ref': '#/definitions/stringArray' },\n 'additionalProperties': { '$ref': '#' },\n 'definitions': {\n 'type': 'object',\n 'additionalProperties': { '$ref': '#' },\n 'default': {}\n },\n 'properties': {\n 'type': 'object',\n 'additionalProperties': { '$ref': '#' },\n 'default': {}\n },\n 'patternProperties': {\n 'type': 'object',\n 'additionalProperties': { '$ref': '#' },\n 'propertyNames': { 'format': 'regex' },\n 'default': {}\n },\n 'dependencies': {\n 'type': 'object',\n 'additionalProperties': {\n 'anyOf': [\n { '$ref': '#' },\n { '$ref': '#/definitions/stringArray' }\n ]\n }\n },\n 'propertyNames': { '$ref': '#' },\n 'const': true,\n 'enum': {\n 'type': 'array',\n 'items': true,\n 'minItems': 1,\n 'uniqueItems': true\n },\n 'type': {\n 'anyOf': [\n { '$ref': '#/definitions/simpleTypes' },\n {\n 'type': 'array',\n 'items': { '$ref': '#/definitions/simpleTypes' },\n 'minItems': 1,\n 'uniqueItems': true\n }\n ]\n },\n 'format': { 'type': 'string' },\n 'contentMediaType': { 'type': 'string' },\n 'contentEncoding': { 'type': 'string' },\n 'if': { '$ref': '#' },\n 'then': { '$ref': '#' },\n 'else': { '$ref': '#' },\n 'allOf': { '$ref': '#/definitions/schemaArray' },\n 'anyOf': { '$ref': '#/definitions/schemaArray' },\n 'oneOf': { '$ref': '#/definitions/schemaArray' },\n 'not': { '$ref': '#' }\n },\n 'default': true\n }\n }\n};\nvar descriptions = {\n id: localize('schema.json.id', \"A unique identifier for the schema.\"),\n $schema: localize('schema.json.$schema', \"The schema to verify this document against.\"),\n title: localize('schema.json.title', \"A descriptive title of the element.\"),\n description: localize('schema.json.description', \"A long description of the element. Used in hover menus and suggestions.\"),\n default: localize('schema.json.default', \"A default value. Used by suggestions.\"),\n multipleOf: localize('schema.json.multipleOf', \"A number that should cleanly divide the current value (i.e. have no remainder).\"),\n maximum: localize('schema.json.maximum', \"The maximum numerical value, inclusive by default.\"),\n exclusiveMaximum: localize('schema.json.exclusiveMaximum', \"Makes the maximum property exclusive.\"),\n minimum: localize('schema.json.minimum', \"The minimum numerical value, inclusive by default.\"),\n exclusiveMinimum: localize('schema.json.exclusiveMininum', \"Makes the minimum property exclusive.\"),\n maxLength: localize('schema.json.maxLength', \"The maximum length of a string.\"),\n minLength: localize('schema.json.minLength', \"The minimum length of a string.\"),\n pattern: localize('schema.json.pattern', \"A regular expression to match the string against. It is not implicitly anchored.\"),\n additionalItems: localize('schema.json.additionalItems', \"For arrays, only when items is set as an array. If it is a schema, then this schema validates items after the ones specified by the items array. If it is false, then additional items will cause validation to fail.\"),\n items: localize('schema.json.items', \"For arrays. Can either be a schema to validate every element against or an array of schemas to validate each item against in order (the first schema will validate the first element, the second schema will validate the second element, and so on.\"),\n maxItems: localize('schema.json.maxItems', \"The maximum number of items that can be inside an array. Inclusive.\"),\n minItems: localize('schema.json.minItems', \"The minimum number of items that can be inside an array. Inclusive.\"),\n uniqueItems: localize('schema.json.uniqueItems', \"If all of the items in the array must be unique. Defaults to false.\"),\n maxProperties: localize('schema.json.maxProperties', \"The maximum number of properties an object can have. Inclusive.\"),\n minProperties: localize('schema.json.minProperties', \"The minimum number of properties an object can have. Inclusive.\"),\n required: localize('schema.json.required', \"An array of strings that lists the names of all properties required on this object.\"),\n additionalProperties: localize('schema.json.additionalProperties', \"Either a schema or a boolean. If a schema, then used to validate all properties not matched by 'properties' or 'patternProperties'. If false, then any properties not matched by either will cause this schema to fail.\"),\n definitions: localize('schema.json.definitions', \"Not used for validation. Place subschemas here that you wish to reference inline with $ref.\"),\n properties: localize('schema.json.properties', \"A map of property names to schemas for each property.\"),\n patternProperties: localize('schema.json.patternProperties', \"A map of regular expressions on property names to schemas for matching properties.\"),\n dependencies: localize('schema.json.dependencies', \"A map of property names to either an array of property names or a schema. An array of property names means the property named in the key depends on the properties in the array being present in the object in order to be valid. If the value is a schema, then the schema is only applied to the object if the property in the key exists on the object.\"),\n enum: localize('schema.json.enum', \"The set of literal values that are valid.\"),\n type: localize('schema.json.type', \"Either a string of one of the basic schema types (number, integer, null, array, object, boolean, string) or an array of strings specifying a subset of those types.\"),\n format: localize('schema.json.format', \"Describes the format expected for the value.\"),\n allOf: localize('schema.json.allOf', \"An array of schemas, all of which must match.\"),\n anyOf: localize('schema.json.anyOf', \"An array of schemas, where at least one must match.\"),\n oneOf: localize('schema.json.oneOf', \"An array of schemas, exactly one of which must match.\"),\n not: localize('schema.json.not', \"A schema which must not match.\"),\n $id: localize('schema.json.$id', \"A unique identifier for the schema.\"),\n $ref: localize('schema.json.$ref', \"Reference a definition hosted on any location.\"),\n $comment: localize('schema.json.$comment', \"Comments from schema authors to readers or maintainers of the schema.\"),\n readOnly: localize('schema.json.readOnly', \"Indicates that the value of the instance is managed exclusively by the owning authority.\"),\n examples: localize('schema.json.examples', \"Sample JSON values associated with a particular schema, for the purpose of illustrating usage.\"),\n contains: localize('schema.json.contains', \"An array instance is valid against \\\"contains\\\" if at least one of its elements is valid against the given schema.\"),\n propertyNames: localize('schema.json.propertyNames', \"If the instance is an object, this keyword validates if every property name in the instance validates against the provided schema.\"),\n const: localize('schema.json.const', \"An instance validates successfully against this keyword if its value is equal to the value of the keyword.\"),\n contentMediaType: localize('schema.json.contentMediaType', \"Describes the media type of a string property.\"),\n contentEncoding: localize('schema.json.contentEncoding', \"Describes the content encoding of a string property.\"),\n if: localize('schema.json.if', \"The validation outcome of the \\\"if\\\" subschema controls which of the \\\"then\\\" or \\\"else\\\" keywords are evaluated.\"),\n then: localize('schema.json.then', \"The \\\"if\\\" subschema is used for validation when the \\\"if\\\" subschema succeeds.\"),\n else: localize('schema.json.else', \"The \\\"else\\\" subschema is used for validation when the \\\"if\\\" subschema fails.\")\n};\nfor (var schemaName in schemaContributions.schemas) {\n var schema = schemaContributions.schemas[schemaName];\n for (var property in schema.properties) {\n var propertyObject = schema.properties[property];\n if (typeof propertyObject === 'boolean') {\n propertyObject = schema.properties[property] = {};\n }\n var description = descriptions[property];\n if (description) {\n propertyObject['description'] = description;\n }\n else {\n console.log(property + \": localize('schema.json.\" + property + \"', \\\"\\\")\");\n }\n }\n}\n","/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nimport { Uri, Range, editor, languages, MarkerSeverity } from './fillers/monaco-editor-core.js';\r\nimport * as jsonService from './_deps/vscode-json-languageservice/jsonLanguageService.js';\r\n// --- diagnostics --- ---\r\nvar DiagnosticsAdapter = /** @class */ (function () {\r\n function DiagnosticsAdapter(_languageId, _worker, defaults) {\r\n var _this = this;\r\n this._languageId = _languageId;\r\n this._worker = _worker;\r\n this._disposables = [];\r\n this._listener = Object.create(null);\r\n var onModelAdd = function (model) {\r\n var modeId = model.getModeId();\r\n if (modeId !== _this._languageId) {\r\n return;\r\n }\r\n var handle;\r\n _this._listener[model.uri.toString()] = model.onDidChangeContent(function () {\r\n clearTimeout(handle);\r\n handle = setTimeout(function () { return _this._doValidate(model.uri, modeId); }, 500);\r\n });\r\n _this._doValidate(model.uri, modeId);\r\n };\r\n var onModelRemoved = function (model) {\r\n editor.setModelMarkers(model, _this._languageId, []);\r\n var uriStr = model.uri.toString();\r\n var listener = _this._listener[uriStr];\r\n if (listener) {\r\n listener.dispose();\r\n delete _this._listener[uriStr];\r\n }\r\n };\r\n this._disposables.push(editor.onDidCreateModel(onModelAdd));\r\n this._disposables.push(editor.onWillDisposeModel(function (model) {\r\n onModelRemoved(model);\r\n _this._resetSchema(model.uri);\r\n }));\r\n this._disposables.push(editor.onDidChangeModelLanguage(function (event) {\r\n onModelRemoved(event.model);\r\n onModelAdd(event.model);\r\n _this._resetSchema(event.model.uri);\r\n }));\r\n this._disposables.push(defaults.onDidChange(function (_) {\r\n editor.getModels().forEach(function (model) {\r\n if (model.getModeId() === _this._languageId) {\r\n onModelRemoved(model);\r\n onModelAdd(model);\r\n }\r\n });\r\n }));\r\n this._disposables.push({\r\n dispose: function () {\r\n editor.getModels().forEach(onModelRemoved);\r\n for (var key in _this._listener) {\r\n _this._listener[key].dispose();\r\n }\r\n }\r\n });\r\n editor.getModels().forEach(onModelAdd);\r\n }\r\n DiagnosticsAdapter.prototype.dispose = function () {\r\n this._disposables.forEach(function (d) { return d && d.dispose(); });\r\n this._disposables = [];\r\n };\r\n DiagnosticsAdapter.prototype._resetSchema = function (resource) {\r\n this._worker().then(function (worker) {\r\n worker.resetSchema(resource.toString());\r\n });\r\n };\r\n DiagnosticsAdapter.prototype._doValidate = function (resource, languageId) {\r\n this._worker(resource)\r\n .then(function (worker) {\r\n return worker.doValidation(resource.toString()).then(function (diagnostics) {\r\n var markers = diagnostics.map(function (d) { return toDiagnostics(resource, d); });\r\n var model = editor.getModel(resource);\r\n if (model && model.getModeId() === languageId) {\r\n editor.setModelMarkers(model, languageId, markers);\r\n }\r\n });\r\n })\r\n .then(undefined, function (err) {\r\n console.error(err);\r\n });\r\n };\r\n return DiagnosticsAdapter;\r\n}());\r\nexport { DiagnosticsAdapter };\r\nfunction toSeverity(lsSeverity) {\r\n switch (lsSeverity) {\r\n case jsonService.DiagnosticSeverity.Error:\r\n return MarkerSeverity.Error;\r\n case jsonService.DiagnosticSeverity.Warning:\r\n return MarkerSeverity.Warning;\r\n case jsonService.DiagnosticSeverity.Information:\r\n return MarkerSeverity.Info;\r\n case jsonService.DiagnosticSeverity.Hint:\r\n return MarkerSeverity.Hint;\r\n default:\r\n return MarkerSeverity.Info;\r\n }\r\n}\r\nfunction toDiagnostics(resource, diag) {\r\n var code = typeof diag.code === 'number' ? String(diag.code) : diag.code;\r\n return {\r\n severity: toSeverity(diag.severity),\r\n startLineNumber: diag.range.start.line + 1,\r\n startColumn: diag.range.start.character + 1,\r\n endLineNumber: diag.range.end.line + 1,\r\n endColumn: diag.range.end.character + 1,\r\n message: diag.message,\r\n code: code,\r\n source: diag.source\r\n };\r\n}\r\n// --- completion ------\r\nfunction fromPosition(position) {\r\n if (!position) {\r\n return void 0;\r\n }\r\n return { character: position.column - 1, line: position.lineNumber - 1 };\r\n}\r\nfunction fromRange(range) {\r\n if (!range) {\r\n return void 0;\r\n }\r\n return {\r\n start: {\r\n line: range.startLineNumber - 1,\r\n character: range.startColumn - 1\r\n },\r\n end: { line: range.endLineNumber - 1, character: range.endColumn - 1 }\r\n };\r\n}\r\nfunction toRange(range) {\r\n if (!range) {\r\n return void 0;\r\n }\r\n return new Range(range.start.line + 1, range.start.character + 1, range.end.line + 1, range.end.character + 1);\r\n}\r\nfunction isInsertReplaceEdit(edit) {\r\n return (typeof edit.insert !== 'undefined' &&\r\n typeof edit.replace !== 'undefined');\r\n}\r\nfunction toCompletionItemKind(kind) {\r\n var mItemKind = languages.CompletionItemKind;\r\n switch (kind) {\r\n case jsonService.CompletionItemKind.Text:\r\n return mItemKind.Text;\r\n case jsonService.CompletionItemKind.Method:\r\n return mItemKind.Method;\r\n case jsonService.CompletionItemKind.Function:\r\n return mItemKind.Function;\r\n case jsonService.CompletionItemKind.Constructor:\r\n return mItemKind.Constructor;\r\n case jsonService.CompletionItemKind.Field:\r\n return mItemKind.Field;\r\n case jsonService.CompletionItemKind.Variable:\r\n return mItemKind.Variable;\r\n case jsonService.CompletionItemKind.Class:\r\n return mItemKind.Class;\r\n case jsonService.CompletionItemKind.Interface:\r\n return mItemKind.Interface;\r\n case jsonService.CompletionItemKind.Module:\r\n return mItemKind.Module;\r\n case jsonService.CompletionItemKind.Property:\r\n return mItemKind.Property;\r\n case jsonService.CompletionItemKind.Unit:\r\n return mItemKind.Unit;\r\n case jsonService.CompletionItemKind.Value:\r\n return mItemKind.Value;\r\n case jsonService.CompletionItemKind.Enum:\r\n return mItemKind.Enum;\r\n case jsonService.CompletionItemKind.Keyword:\r\n return mItemKind.Keyword;\r\n case jsonService.CompletionItemKind.Snippet:\r\n return mItemKind.Snippet;\r\n case jsonService.CompletionItemKind.Color:\r\n return mItemKind.Color;\r\n case jsonService.CompletionItemKind.File:\r\n return mItemKind.File;\r\n case jsonService.CompletionItemKind.Reference:\r\n return mItemKind.Reference;\r\n }\r\n return mItemKind.Property;\r\n}\r\nfunction fromCompletionItemKind(kind) {\r\n var mItemKind = languages.CompletionItemKind;\r\n switch (kind) {\r\n case mItemKind.Text:\r\n return jsonService.CompletionItemKind.Text;\r\n case mItemKind.Method:\r\n return jsonService.CompletionItemKind.Method;\r\n case mItemKind.Function:\r\n return jsonService.CompletionItemKind.Function;\r\n case mItemKind.Constructor:\r\n return jsonService.CompletionItemKind.Constructor;\r\n case mItemKind.Field:\r\n return jsonService.CompletionItemKind.Field;\r\n case mItemKind.Variable:\r\n return jsonService.CompletionItemKind.Variable;\r\n case mItemKind.Class:\r\n return jsonService.CompletionItemKind.Class;\r\n case mItemKind.Interface:\r\n return jsonService.CompletionItemKind.Interface;\r\n case mItemKind.Module:\r\n return jsonService.CompletionItemKind.Module;\r\n case mItemKind.Property:\r\n return jsonService.CompletionItemKind.Property;\r\n case mItemKind.Unit:\r\n return jsonService.CompletionItemKind.Unit;\r\n case mItemKind.Value:\r\n return jsonService.CompletionItemKind.Value;\r\n case mItemKind.Enum:\r\n return jsonService.CompletionItemKind.Enum;\r\n case mItemKind.Keyword:\r\n return jsonService.CompletionItemKind.Keyword;\r\n case mItemKind.Snippet:\r\n return jsonService.CompletionItemKind.Snippet;\r\n case mItemKind.Color:\r\n return jsonService.CompletionItemKind.Color;\r\n case mItemKind.File:\r\n return jsonService.CompletionItemKind.File;\r\n case mItemKind.Reference:\r\n return jsonService.CompletionItemKind.Reference;\r\n }\r\n return jsonService.CompletionItemKind.Property;\r\n}\r\nfunction toTextEdit(textEdit) {\r\n if (!textEdit) {\r\n return void 0;\r\n }\r\n return {\r\n range: toRange(textEdit.range),\r\n text: textEdit.newText\r\n };\r\n}\r\nvar CompletionAdapter = /** @class */ (function () {\r\n function CompletionAdapter(_worker) {\r\n this._worker = _worker;\r\n }\r\n Object.defineProperty(CompletionAdapter.prototype, \"triggerCharacters\", {\r\n get: function () {\r\n return [' ', ':'];\r\n },\r\n enumerable: false,\r\n configurable: true\r\n });\r\n CompletionAdapter.prototype.provideCompletionItems = function (model, position, context, token) {\r\n var resource = model.uri;\r\n return this._worker(resource)\r\n .then(function (worker) {\r\n return worker.doComplete(resource.toString(), fromPosition(position));\r\n })\r\n .then(function (info) {\r\n if (!info) {\r\n return;\r\n }\r\n var wordInfo = model.getWordUntilPosition(position);\r\n var wordRange = new Range(position.lineNumber, wordInfo.startColumn, position.lineNumber, wordInfo.endColumn);\r\n var items = info.items.map(function (entry) {\r\n var item = {\r\n label: entry.label,\r\n insertText: entry.insertText || entry.label,\r\n sortText: entry.sortText,\r\n filterText: entry.filterText,\r\n documentation: entry.documentation,\r\n detail: entry.detail,\r\n range: wordRange,\r\n kind: toCompletionItemKind(entry.kind)\r\n };\r\n if (entry.textEdit) {\r\n if (isInsertReplaceEdit(entry.textEdit)) {\r\n item.range = {\r\n insert: toRange(entry.textEdit.insert),\r\n replace: toRange(entry.textEdit.replace)\r\n };\r\n }\r\n else {\r\n item.range = toRange(entry.textEdit.range);\r\n }\r\n item.insertText = entry.textEdit.newText;\r\n }\r\n if (entry.additionalTextEdits) {\r\n item.additionalTextEdits = entry.additionalTextEdits.map(toTextEdit);\r\n }\r\n if (entry.insertTextFormat === jsonService.InsertTextFormat.Snippet) {\r\n item.insertTextRules = languages.CompletionItemInsertTextRule.InsertAsSnippet;\r\n }\r\n return item;\r\n });\r\n return {\r\n isIncomplete: info.isIncomplete,\r\n suggestions: items\r\n };\r\n });\r\n };\r\n return CompletionAdapter;\r\n}());\r\nexport { CompletionAdapter };\r\nfunction isMarkupContent(thing) {\r\n return (thing &&\r\n typeof thing === 'object' &&\r\n typeof thing.kind === 'string');\r\n}\r\nfunction toMarkdownString(entry) {\r\n if (typeof entry === 'string') {\r\n return {\r\n value: entry\r\n };\r\n }\r\n if (isMarkupContent(entry)) {\r\n if (entry.kind === 'plaintext') {\r\n return {\r\n value: entry.value.replace(/[\\\\`*_{}[\\]()#+\\-.!]/g, '\\\\$&')\r\n };\r\n }\r\n return {\r\n value: entry.value\r\n };\r\n }\r\n return { value: '```' + entry.language + '\\n' + entry.value + '\\n```\\n' };\r\n}\r\nfunction toMarkedStringArray(contents) {\r\n if (!contents) {\r\n return void 0;\r\n }\r\n if (Array.isArray(contents)) {\r\n return contents.map(toMarkdownString);\r\n }\r\n return [toMarkdownString(contents)];\r\n}\r\n// --- hover ------\r\nvar HoverAdapter = /** @class */ (function () {\r\n function HoverAdapter(_worker) {\r\n this._worker = _worker;\r\n }\r\n HoverAdapter.prototype.provideHover = function (model, position, token) {\r\n var resource = model.uri;\r\n return this._worker(resource)\r\n .then(function (worker) {\r\n return worker.doHover(resource.toString(), fromPosition(position));\r\n })\r\n .then(function (info) {\r\n if (!info) {\r\n return;\r\n }\r\n return {\r\n range: toRange(info.range),\r\n contents: toMarkedStringArray(info.contents)\r\n };\r\n });\r\n };\r\n return HoverAdapter;\r\n}());\r\nexport { HoverAdapter };\r\n// --- definition ------\r\nfunction toLocation(location) {\r\n return {\r\n uri: Uri.parse(location.uri),\r\n range: toRange(location.range)\r\n };\r\n}\r\n// --- document symbols ------\r\nfunction toSymbolKind(kind) {\r\n var mKind = languages.SymbolKind;\r\n switch (kind) {\r\n case jsonService.SymbolKind.File:\r\n return mKind.Array;\r\n case jsonService.SymbolKind.Module:\r\n return mKind.Module;\r\n case jsonService.SymbolKind.Namespace:\r\n return mKind.Namespace;\r\n case jsonService.SymbolKind.Package:\r\n return mKind.Package;\r\n case jsonService.SymbolKind.Class:\r\n return mKind.Class;\r\n case jsonService.SymbolKind.Method:\r\n return mKind.Method;\r\n case jsonService.SymbolKind.Property:\r\n return mKind.Property;\r\n case jsonService.SymbolKind.Field:\r\n return mKind.Field;\r\n case jsonService.SymbolKind.Constructor:\r\n return mKind.Constructor;\r\n case jsonService.SymbolKind.Enum:\r\n return mKind.Enum;\r\n case jsonService.SymbolKind.Interface:\r\n return mKind.Interface;\r\n case jsonService.SymbolKind.Function:\r\n return mKind.Function;\r\n case jsonService.SymbolKind.Variable:\r\n return mKind.Variable;\r\n case jsonService.SymbolKind.Constant:\r\n return mKind.Constant;\r\n case jsonService.SymbolKind.String:\r\n return mKind.String;\r\n case jsonService.SymbolKind.Number:\r\n return mKind.Number;\r\n case jsonService.SymbolKind.Boolean:\r\n return mKind.Boolean;\r\n case jsonService.SymbolKind.Array:\r\n return mKind.Array;\r\n }\r\n return mKind.Function;\r\n}\r\nvar DocumentSymbolAdapter = /** @class */ (function () {\r\n function DocumentSymbolAdapter(_worker) {\r\n this._worker = _worker;\r\n }\r\n DocumentSymbolAdapter.prototype.provideDocumentSymbols = function (model, token) {\r\n var resource = model.uri;\r\n return this._worker(resource)\r\n .then(function (worker) { return worker.findDocumentSymbols(resource.toString()); })\r\n .then(function (items) {\r\n if (!items) {\r\n return;\r\n }\r\n return items.map(function (item) { return ({\r\n name: item.name,\r\n detail: '',\r\n containerName: item.containerName,\r\n kind: toSymbolKind(item.kind),\r\n range: toRange(item.location.range),\r\n selectionRange: toRange(item.location.range),\r\n tags: []\r\n }); });\r\n });\r\n };\r\n return DocumentSymbolAdapter;\r\n}());\r\nexport { DocumentSymbolAdapter };\r\nfunction fromFormattingOptions(options) {\r\n return {\r\n tabSize: options.tabSize,\r\n insertSpaces: options.insertSpaces\r\n };\r\n}\r\nvar DocumentFormattingEditProvider = /** @class */ (function () {\r\n function DocumentFormattingEditProvider(_worker) {\r\n this._worker = _worker;\r\n }\r\n DocumentFormattingEditProvider.prototype.provideDocumentFormattingEdits = function (model, options, token) {\r\n var resource = model.uri;\r\n return this._worker(resource).then(function (worker) {\r\n return worker\r\n .format(resource.toString(), null, fromFormattingOptions(options))\r\n .then(function (edits) {\r\n if (!edits || edits.length === 0) {\r\n return;\r\n }\r\n return edits.map(toTextEdit);\r\n });\r\n });\r\n };\r\n return DocumentFormattingEditProvider;\r\n}());\r\nexport { DocumentFormattingEditProvider };\r\nvar DocumentRangeFormattingEditProvider = /** @class */ (function () {\r\n function DocumentRangeFormattingEditProvider(_worker) {\r\n this._worker = _worker;\r\n }\r\n DocumentRangeFormattingEditProvider.prototype.provideDocumentRangeFormattingEdits = function (model, range, options, token) {\r\n var resource = model.uri;\r\n return this._worker(resource).then(function (worker) {\r\n return worker\r\n .format(resource.toString(), fromRange(range), fromFormattingOptions(options))\r\n .then(function (edits) {\r\n if (!edits || edits.length === 0) {\r\n return;\r\n }\r\n return edits.map(toTextEdit);\r\n });\r\n });\r\n };\r\n return DocumentRangeFormattingEditProvider;\r\n}());\r\nexport { DocumentRangeFormattingEditProvider };\r\nvar DocumentColorAdapter = /** @class */ (function () {\r\n function DocumentColorAdapter(_worker) {\r\n this._worker = _worker;\r\n }\r\n DocumentColorAdapter.prototype.provideDocumentColors = function (model, token) {\r\n var resource = model.uri;\r\n return this._worker(resource)\r\n .then(function (worker) { return worker.findDocumentColors(resource.toString()); })\r\n .then(function (infos) {\r\n if (!infos) {\r\n return;\r\n }\r\n return infos.map(function (item) { return ({\r\n color: item.color,\r\n range: toRange(item.range)\r\n }); });\r\n });\r\n };\r\n DocumentColorAdapter.prototype.provideColorPresentations = function (model, info, token) {\r\n var resource = model.uri;\r\n return this._worker(resource)\r\n .then(function (worker) {\r\n return worker.getColorPresentations(resource.toString(), info.color, fromRange(info.range));\r\n })\r\n .then(function (presentations) {\r\n if (!presentations) {\r\n return;\r\n }\r\n return presentations.map(function (presentation) {\r\n var item = {\r\n label: presentation.label\r\n };\r\n if (presentation.textEdit) {\r\n item.textEdit = toTextEdit(presentation.textEdit);\r\n }\r\n if (presentation.additionalTextEdits) {\r\n item.additionalTextEdits = presentation.additionalTextEdits.map(toTextEdit);\r\n }\r\n return item;\r\n });\r\n });\r\n };\r\n return DocumentColorAdapter;\r\n}());\r\nexport { DocumentColorAdapter };\r\nvar FoldingRangeAdapter = /** @class */ (function () {\r\n function FoldingRangeAdapter(_worker) {\r\n this._worker = _worker;\r\n }\r\n FoldingRangeAdapter.prototype.provideFoldingRanges = function (model, context, token) {\r\n var resource = model.uri;\r\n return this._worker(resource)\r\n .then(function (worker) { return worker.getFoldingRanges(resource.toString(), context); })\r\n .then(function (ranges) {\r\n if (!ranges) {\r\n return;\r\n }\r\n return ranges.map(function (range) {\r\n var result = {\r\n start: range.startLine + 1,\r\n end: range.endLine + 1\r\n };\r\n if (typeof range.kind !== 'undefined') {\r\n result.kind = toFoldingRangeKind(range.kind);\r\n }\r\n return result;\r\n });\r\n });\r\n };\r\n return FoldingRangeAdapter;\r\n}());\r\nexport { FoldingRangeAdapter };\r\nfunction toFoldingRangeKind(kind) {\r\n switch (kind) {\r\n case jsonService.FoldingRangeKind.Comment:\r\n return languages.FoldingRangeKind.Comment;\r\n case jsonService.FoldingRangeKind.Imports:\r\n return languages.FoldingRangeKind.Imports;\r\n case jsonService.FoldingRangeKind.Region:\r\n return languages.FoldingRangeKind.Region;\r\n }\r\n return void 0;\r\n}\r\nvar SelectionRangeAdapter = /** @class */ (function () {\r\n function SelectionRangeAdapter(_worker) {\r\n this._worker = _worker;\r\n }\r\n SelectionRangeAdapter.prototype.provideSelectionRanges = function (model, positions, token) {\r\n var resource = model.uri;\r\n return this._worker(resource)\r\n .then(function (worker) { return worker.getSelectionRanges(resource.toString(), positions.map(fromPosition)); })\r\n .then(function (selectionRanges) {\r\n if (!selectionRanges) {\r\n return;\r\n }\r\n return selectionRanges.map(function (selectionRange) {\r\n var result = [];\r\n while (selectionRange) {\r\n result.push({ range: toRange(selectionRange.range) });\r\n selectionRange = selectionRange.parent;\r\n }\r\n return result;\r\n });\r\n });\r\n };\r\n return SelectionRangeAdapter;\r\n}());\r\nexport { SelectionRangeAdapter };\r\n","/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nimport * as json from './_deps/jsonc-parser/main.js';\r\nexport function createTokenizationSupport(supportComments) {\r\n return {\r\n getInitialState: function () { return new JSONState(null, null, false, null); },\r\n tokenize: function (line, state, offsetDelta, stopAtOffset) {\r\n return tokenize(supportComments, line, state, offsetDelta, stopAtOffset);\r\n }\r\n };\r\n}\r\nexport var TOKEN_DELIM_OBJECT = 'delimiter.bracket.json';\r\nexport var TOKEN_DELIM_ARRAY = 'delimiter.array.json';\r\nexport var TOKEN_DELIM_COLON = 'delimiter.colon.json';\r\nexport var TOKEN_DELIM_COMMA = 'delimiter.comma.json';\r\nexport var TOKEN_VALUE_BOOLEAN = 'keyword.json';\r\nexport var TOKEN_VALUE_NULL = 'keyword.json';\r\nexport var TOKEN_VALUE_STRING = 'string.value.json';\r\nexport var TOKEN_VALUE_NUMBER = 'number.json';\r\nexport var TOKEN_PROPERTY_NAME = 'string.key.json';\r\nexport var TOKEN_COMMENT_BLOCK = 'comment.block.json';\r\nexport var TOKEN_COMMENT_LINE = 'comment.line.json';\r\nvar ParentsStack = /** @class */ (function () {\r\n function ParentsStack(parent, type) {\r\n this.parent = parent;\r\n this.type = type;\r\n }\r\n ParentsStack.pop = function (parents) {\r\n if (parents) {\r\n return parents.parent;\r\n }\r\n return null;\r\n };\r\n ParentsStack.push = function (parents, type) {\r\n return new ParentsStack(parents, type);\r\n };\r\n ParentsStack.equals = function (a, b) {\r\n if (!a && !b) {\r\n return true;\r\n }\r\n if (!a || !b) {\r\n return false;\r\n }\r\n while (a && b) {\r\n if (a === b) {\r\n return true;\r\n }\r\n if (a.type !== b.type) {\r\n return false;\r\n }\r\n a = a.parent;\r\n b = b.parent;\r\n }\r\n return true;\r\n };\r\n return ParentsStack;\r\n}());\r\nvar JSONState = /** @class */ (function () {\r\n function JSONState(state, scanError, lastWasColon, parents) {\r\n this._state = state;\r\n this.scanError = scanError;\r\n this.lastWasColon = lastWasColon;\r\n this.parents = parents;\r\n }\r\n JSONState.prototype.clone = function () {\r\n return new JSONState(this._state, this.scanError, this.lastWasColon, this.parents);\r\n };\r\n JSONState.prototype.equals = function (other) {\r\n if (other === this) {\r\n return true;\r\n }\r\n if (!other || !(other instanceof JSONState)) {\r\n return false;\r\n }\r\n return (this.scanError === other.scanError &&\r\n this.lastWasColon === other.lastWasColon &&\r\n ParentsStack.equals(this.parents, other.parents));\r\n };\r\n JSONState.prototype.getStateData = function () {\r\n return this._state;\r\n };\r\n JSONState.prototype.setStateData = function (state) {\r\n this._state = state;\r\n };\r\n return JSONState;\r\n}());\r\nfunction tokenize(comments, line, state, offsetDelta, stopAtOffset) {\r\n if (offsetDelta === void 0) { offsetDelta = 0; }\r\n // handle multiline strings and block comments\r\n var numberOfInsertedCharacters = 0;\r\n var adjustOffset = false;\r\n switch (state.scanError) {\r\n case 2 /* UnexpectedEndOfString */:\r\n line = '\"' + line;\r\n numberOfInsertedCharacters = 1;\r\n break;\r\n case 1 /* UnexpectedEndOfComment */:\r\n line = '/*' + line;\r\n numberOfInsertedCharacters = 2;\r\n break;\r\n }\r\n var scanner = json.createScanner(line);\r\n var lastWasColon = state.lastWasColon;\r\n var parents = state.parents;\r\n var ret = {\r\n tokens: [],\r\n endState: state.clone()\r\n };\r\n while (true) {\r\n var offset = offsetDelta + scanner.getPosition();\r\n var type = '';\r\n var kind = scanner.scan();\r\n if (kind === 17 /* EOF */) {\r\n break;\r\n }\r\n // Check that the scanner has advanced\r\n if (offset === offsetDelta + scanner.getPosition()) {\r\n throw new Error('Scanner did not advance, next 3 characters are: ' + line.substr(scanner.getPosition(), 3));\r\n }\r\n // In case we inserted /* or \" character, we need to\r\n // adjust the offset of all tokens (except the first)\r\n if (adjustOffset) {\r\n offset -= numberOfInsertedCharacters;\r\n }\r\n adjustOffset = numberOfInsertedCharacters > 0;\r\n // brackets and type\r\n switch (kind) {\r\n case 1 /* OpenBraceToken */:\r\n parents = ParentsStack.push(parents, 0 /* Object */);\r\n type = TOKEN_DELIM_OBJECT;\r\n lastWasColon = false;\r\n break;\r\n case 2 /* CloseBraceToken */:\r\n parents = ParentsStack.pop(parents);\r\n type = TOKEN_DELIM_OBJECT;\r\n lastWasColon = false;\r\n break;\r\n case 3 /* OpenBracketToken */:\r\n parents = ParentsStack.push(parents, 1 /* Array */);\r\n type = TOKEN_DELIM_ARRAY;\r\n lastWasColon = false;\r\n break;\r\n case 4 /* CloseBracketToken */:\r\n parents = ParentsStack.pop(parents);\r\n type = TOKEN_DELIM_ARRAY;\r\n lastWasColon = false;\r\n break;\r\n case 6 /* ColonToken */:\r\n type = TOKEN_DELIM_COLON;\r\n lastWasColon = true;\r\n break;\r\n case 5 /* CommaToken */:\r\n type = TOKEN_DELIM_COMMA;\r\n lastWasColon = false;\r\n break;\r\n case 8 /* TrueKeyword */:\r\n case 9 /* FalseKeyword */:\r\n type = TOKEN_VALUE_BOOLEAN;\r\n lastWasColon = false;\r\n break;\r\n case 7 /* NullKeyword */:\r\n type = TOKEN_VALUE_NULL;\r\n lastWasColon = false;\r\n break;\r\n case 10 /* StringLiteral */:\r\n var currentParent = parents ? parents.type : 0 /* Object */;\r\n var inArray = currentParent === 1 /* Array */;\r\n type =\r\n lastWasColon || inArray ? TOKEN_VALUE_STRING : TOKEN_PROPERTY_NAME;\r\n lastWasColon = false;\r\n break;\r\n case 11 /* NumericLiteral */:\r\n type = TOKEN_VALUE_NUMBER;\r\n lastWasColon = false;\r\n break;\r\n }\r\n // comments, iff enabled\r\n if (comments) {\r\n switch (kind) {\r\n case 12 /* LineCommentTrivia */:\r\n type = TOKEN_COMMENT_LINE;\r\n break;\r\n case 13 /* BlockCommentTrivia */:\r\n type = TOKEN_COMMENT_BLOCK;\r\n break;\r\n }\r\n }\r\n ret.endState = new JSONState(state.getStateData(), scanner.getTokenError(), lastWasColon, parents);\r\n ret.tokens.push({\r\n startIndex: offset,\r\n scopes: type\r\n });\r\n }\r\n return ret;\r\n}\r\n","/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nimport { WorkerManager } from './workerManager.js';\r\nimport * as languageFeatures from './languageFeatures.js';\r\nimport { createTokenizationSupport } from './tokenization.js';\r\nimport { languages } from './fillers/monaco-editor-core.js';\r\nexport function setupMode(defaults) {\r\n var disposables = [];\r\n var providers = [];\r\n var client = new WorkerManager(defaults);\r\n disposables.push(client);\r\n var worker = function () {\r\n var uris = [];\r\n for (var _i = 0; _i < arguments.length; _i++) {\r\n uris[_i] = arguments[_i];\r\n }\r\n return client.getLanguageServiceWorker.apply(client, uris);\r\n };\r\n function registerProviders() {\r\n var languageId = defaults.languageId, modeConfiguration = defaults.modeConfiguration;\r\n disposeAll(providers);\r\n if (modeConfiguration.documentFormattingEdits) {\r\n providers.push(languages.registerDocumentFormattingEditProvider(languageId, new languageFeatures.DocumentFormattingEditProvider(worker)));\r\n }\r\n if (modeConfiguration.documentRangeFormattingEdits) {\r\n providers.push(languages.registerDocumentRangeFormattingEditProvider(languageId, new languageFeatures.DocumentRangeFormattingEditProvider(worker)));\r\n }\r\n if (modeConfiguration.completionItems) {\r\n providers.push(languages.registerCompletionItemProvider(languageId, new languageFeatures.CompletionAdapter(worker)));\r\n }\r\n if (modeConfiguration.hovers) {\r\n providers.push(languages.registerHoverProvider(languageId, new languageFeatures.HoverAdapter(worker)));\r\n }\r\n if (modeConfiguration.documentSymbols) {\r\n providers.push(languages.registerDocumentSymbolProvider(languageId, new languageFeatures.DocumentSymbolAdapter(worker)));\r\n }\r\n if (modeConfiguration.tokens) {\r\n providers.push(languages.setTokensProvider(languageId, createTokenizationSupport(true)));\r\n }\r\n if (modeConfiguration.colors) {\r\n providers.push(languages.registerColorProvider(languageId, new languageFeatures.DocumentColorAdapter(worker)));\r\n }\r\n if (modeConfiguration.foldingRanges) {\r\n providers.push(languages.registerFoldingRangeProvider(languageId, new languageFeatures.FoldingRangeAdapter(worker)));\r\n }\r\n if (modeConfiguration.diagnostics) {\r\n providers.push(new languageFeatures.DiagnosticsAdapter(languageId, worker, defaults));\r\n }\r\n if (modeConfiguration.selectionRanges) {\r\n providers.push(languages.registerSelectionRangeProvider(languageId, new languageFeatures.SelectionRangeAdapter(worker)));\r\n }\r\n }\r\n registerProviders();\r\n disposables.push(languages.setLanguageConfiguration(defaults.languageId, richEditConfiguration));\r\n var modeConfiguration = defaults.modeConfiguration;\r\n defaults.onDidChange(function (newDefaults) {\r\n if (newDefaults.modeConfiguration !== modeConfiguration) {\r\n modeConfiguration = newDefaults.modeConfiguration;\r\n registerProviders();\r\n }\r\n });\r\n disposables.push(asDisposable(providers));\r\n return asDisposable(disposables);\r\n}\r\nfunction asDisposable(disposables) {\r\n return { dispose: function () { return disposeAll(disposables); } };\r\n}\r\nfunction disposeAll(disposables) {\r\n while (disposables.length) {\r\n disposables.pop().dispose();\r\n }\r\n}\r\nvar richEditConfiguration = {\r\n wordPattern: /(-?\\d*\\.\\d\\w*)|([^\\[\\{\\]\\}\\:\\\"\\,\\s]+)/g,\r\n comments: {\r\n lineComment: '//',\r\n blockComment: ['/*', '*/']\r\n },\r\n brackets: [\r\n ['{', '}'],\r\n ['[', ']']\r\n ],\r\n autoClosingPairs: [\r\n { open: '{', close: '}', notIn: ['string'] },\r\n { open: '[', close: ']', notIn: ['string'] },\r\n { open: '\"', close: '\"', notIn: ['string'] }\r\n ]\r\n};\r\n"],"names":["ParseOptions","WorkerManager","defaults","_this","this","_defaults","_worker","_idleCheckInterval","setInterval","_checkIfIdle","_lastUsedTime","_configChangeListener","onDidChange","_stopWorker","prototype","dispose","_client","clearInterval","Date","now","_getClient","moduleId","label","languageId","createData","languageSettings","diagnosticsOptions","enableSchemaRequest","getProxy","getLanguageServiceWorker","resources","_i","arguments","length","then","client","_","withSyncedResources","text","ignoreTrivia","len","pos","value","tokenOffset","token","lineNumber","lineStartOffset","tokenLineStartOffset","prevTokenLineStartOffset","scanError","scanHexDigits","count","exact","digits","ch","charCodeAt","scanNext","code","isWhiteSpace","String","fromCharCode","isLineBreak","result","start","substring","ch3","scanString","safeLength","commentClosed","isDigit","end","scanNumber","isUnknownContentCharacter","setPosition","newPosition","getPosition","scan","getToken","getTokenValue","getTokenOffset","getTokenLength","getTokenStartLine","getTokenStartCharacter","getTokenError","DEFAULT","allowTrailingComma","integer","uinteger","Location","LocationLink","Color","ColorInformation","ColorPresentation","FoldingRange","DiagnosticRelatedInformation","DiagnosticTag","CodeDescription","Command","ChangeAnnotation","ChangeAnnotationIdentifier","AnnotatedTextEdit","TextDocumentEdit","CreateFile","RenameFile","DeleteFile","WorkspaceEdit","TextEdit","Diagnostic","DiagnosticSeverity","FoldingRangeKind","Range","Position","errors","options","currentProperty","currentParent","previousParents","onValue","Array","isArray","push","visitor","_scanner","toNoArgVisit","visitFunction","toOneArgVisit","arg","onObjectBegin","onObjectProperty","onObjectEnd","onArrayBegin","onArrayEnd","onLiteralValue","onSeparator","onComment","onError","disallowComments","handleError","error","skipUntilAfter","skipUntil","indexOf","parseString","isValue","allowEmptyContent","parseValue","needsComma","parseArray","parseObject","tokenValue","Number","isNaN","parseLiteral","visit","object","name","pop","array","offset","findNodeAtOffset","node","includeRightBound","contains","children","i","item","getNodePath","parent","path","type","key","index","getNodeValue","map","obj","Object","create","_a","prop","valueNode","equals","one","other","oneKeys","sort","otherKeys","val","isDefined","isBoolean","startsWith","haystack","needle","endsWith","diff","lastIndexOf","extendedRegExp","pattern","RegExp","MIN_VALUE","MAX_VALUE","line","character","is","candidate","Is","objectLiteral","two","three","four","Error","uri","range","defined","string","undefined","targetUri","targetRange","targetSelectionRange","originSelectionRange","red","green","blue","alpha","numberRange","color","textEdit","additionalTextEdits","typedArray","startLine","endLine","startCharacter","endCharacter","kind","location","message","Warning","Information","Hint","Unnecessary","Deprecated","href","severity","source","relatedInformation","number","codeDescription","title","command","args","replace","newText","insert","position","del","needsConfirmation","description","boolean","annotation","annotationId","textDocument","edits","OptionalVersionedTextDocumentIdentifier","overwrite","ignoreIfExists","oldUri","newUri","recursive","ignoreIfNotExists","changes","documentChanges","every","change","TextDocumentIdentifier","VersionedTextDocumentIdentifier","TextDocumentItem","MarkupKind","MarkupContent","CompletionItemKind","InsertTextFormat","CompletionItemTag","InsertReplaceEdit","InsertTextMode","CompletionItem","CompletionList","MarkedString","Hover","ParameterInformation","SignatureInformation","DocumentHighlightKind","DocumentHighlight","SymbolKind","SymbolTag","SymbolInformation","DocumentSymbol","CodeActionKind","CodeActionContext","CodeAction","CodeLens","FormattingOptions","DocumentLink","SelectionRange","TextDocument","TextEditChangeImpl","changeAnnotations","edit","id","assertChangeAnnotations","manage","delete","add","all","clear","splice","ChangeAnnotations","annotations","_annotations","_counter","_size","defineProperty","get","enumerable","configurable","idOrAnnotation","nextId","toString","WorkspaceChange","workspaceEdit","_textEditChanges","_workspaceEdit","_changeAnnotations","forEach","textEditChange","keys","initDocumentChanges","size","getTextEditChange","version","textDocumentEdit","initChanges","createFile","optionsOrAnnotation","operation","renameFile","deleteFile","PlainText","Markdown","Text","Method","Function","Constructor","Field","Variable","Class","Interface","Module","Property","Unit","Value","Enum","Keyword","Snippet","File","Reference","Folder","EnumMember","Constant","Struct","Event","Operator","TypeParameter","asIs","adjustIndentation","items","isIncomplete","fromPlainText","plainText","language","contents","documentation","parameters","Read","Write","Namespace","Package","Boolean","Key","Null","containerName","detail","selectionRange","deprecated","tags","Empty","QuickFix","Refactor","RefactorExtract","RefactorInline","RefactorRewrite","Source","SourceOrganizeImports","SourceFixAll","diagnostics","only","kindOrCommandOrEdit","checkKind","isPreferred","data","tabSize","insertSpaces","target","mergeSort","compare","p","left","slice","right","leftIdx","rightIdx","ret","content","FullTextDocument","lineCount","func","getText","positionAt","offsetAt","applyEdits","document","sortedEdits","a","b","lastModifiedOffset","e","startOffset","endOffset","_uri","_languageId","_version","_content","_lineOffsets","update","event","getLineOffsets","lineOffsets","isLineStart","charAt","Math","max","min","low","high","mid","floor","lineOffset","nextLineOffset","call","check","ClientCapabilities","ErrorCode","changes_1","isIncremental","getWellformedRange","addedLineOffsets","computeLineOffsets","apply","concat","isFull","rangeLength","isAtLineStart","textOffset","getWellformedEdit","match","rest","localize","loadMessageBundle","file","spans","sortedEdits_1","substr","join","LATEST","completion","completionItem","documentationFormat","commitCharactersSupport","extendStatics","EnumMatch","_super","__extends","d","setPrototypeOf","__proto__","hasOwnProperty","TypeError","__","constructor","formats","errorMessage","ASTNodeImpl","asSchema","schema","boolValue","ArrayASTNodeImpl","isInteger","NaN","PropertyASTNodeImpl","keyNode","colonOffset","ObjectASTNodeImpl","properties","SchemaCollector","focusOffset","exclude","schemas","merge","include","newSub","NoOpSchemaCollector","instance","ValidationResult","problems","propertiesMatches","propertiesValueMatches","primaryValueMatches","enumValueMatch","enumValues","hasProblems","mergeAll","validationResults","validationResults_1","validationResult","mergeEnumValues","v","JSON","stringify","mergePropertyMatch","propertyValidationResult","validate","n","matchingSchemas","seenKeys","unprocessedProperties","propertyNode","required","_b","_c","propertyName","propertyProcessed","_d","_e","propertySchema","child","patternProperties","_f","_g","propertyPattern","regex","_h","_j","test","additionalProperties","_k","unprocessedProperties_1","_l","unprocessedProperties_2","maxProperties","minProperties","dependencies","_m","_o","propertyDep","_p","propertyDep_1","requiredProp","propertyNames","_q","_r","_validateObjectNode","subSchemas","subSchema","itemValidationResult","additionalItems","itemSchema","containsSchema","doesContain","some","minItems","maxItems","uniqueItems","values_1","duplicates","_validateArrayNode","minLength","maxLength","patternErrorMessage","format","exec","_validateStringNode","normalizeFloats","float","parts","multiplier","parseInt","multipleOf","remainder","normMultipleOf","normValue","pow","abs","getExclusiveLimit","limit","exclusive","getLimit","exclusiveMinimum","minimum","exclusiveMaximum","maximum","_validateNumberNode","matchesType","allOf","subSchemaRef","notSchema","not","subValidationResult","subMatchingSchemas","ms","inverted","testAlternatives","alternatives","maxOneMatch","matches","bestMatch","alternatives_1","compareResult","anyOf","oneOf","testBranch","ifSchema","if","thenSchema","elseSchema","testCondition","else","enum","const","deprecationMessage","_validateNode","stringifyObject","indent","stringifyLiteral","newIndent","JSONDocument","root","syntaxErrors","comments","getNodeFromOffset","doVisit_1","ctn","getMatchingSchemas","LIB","JSONCompletion","schemaService","contributions","promiseConstructor","clientCapabilities","Promise","doResolve","resolveCompletion","resolver","resolve","doComplete","doc","isInComment","overwriteRange","currentWord","getCurrentWord","overwriteStart","proposed","collector","suggestion","existing","shortendedLabel","trim","insertText","setAsIncomplete","console","log","getNumberOfProposals","getSchemaForResource","collectionPromises","addValue","currentKey","separatorAfter_1","evaluateSeparatorAfter","getPropertyCompletions","getSchemaLessPropertyCompletions","location_1","contribution","collectPromise","collectPropertyCompletions","getLabelForValue","getInsertTextForProperty","insertTextFormat","types","getValueCompletions","getSchemaLessValueCompletions","getContributedValueCompletions","offsetForSeparator","separatorAfter","addFillerValueCompletions","s","schemaProperties_1","doNotSuggest","proposal","filterText","getFilterTextForValue","fromMarkup","markdownDescription","suggestSortText","sortText","schemaPropertyNames_1","propertyNameCompletionItem","enumDescription","markdownEnumDescriptions","enumDescriptions","collectCompletionsForSimilarObject","getInsertTextForValue","parentKey_1","getSuggestionKind","collectSuggestionsForValues","getLabelTextForMatchingNode","getInsertTextForMatchingNode","addBooleanValueCompletion","parentKey_2","addDollarSchemaCompletions","parentKey_3","parentKey","valueNode_1","matchingSchemas_1","findItemAtOffset","addSchemaValueCompletions","propertyMatched","addNullValueCompletion","parentKey_4","location_2","collectValueCompletions","collectDefaultCompletions","addEnumValueCompletions","addDefaultValueCompletions","collectTypes","arrayDepth","hasProposals","default","examples","example","defaultSnippets","body","getInsertTextForSnippetValue","getFilterTextForSnippetValue","getLabelForSnippetValue","bodyText","prefix","suffix","split","enm","doesSupportMarkdown","t","getInsertTextForGuessedValue","schemaIds","getRegisteredSchemaIds","schemaId","getInsertTextForPlainText","snippetValue","propertyText","resultText","nValueProposals","scanner","markupString","supportsMarkdown","doesSupportsCommitCharacters","supportsCommitCharacters","r","o","h","process","cwd","normalize","isAbsolute","relative","f","u","c","l","_makeLong","dirname","basename","extname","dir","base","ext","parse","sep","delimiter","win32","posix","exports","URI","g","Utils","O","platform","navigator","userAgent","scheme","authority","query","fragment","isUri","fsPath","with","C","x","from","A","toJSON","revive","_formatted","external","_fsPath","_sep","$mid","m","y","encodeURIComponent","toLowerCase","w","decodeURIComponent","P","j","U","joinPath","resolvePath","Symbol","toStringTag","createRegex","glob","opts","str","reStr","extended","globstar","inGroup","flags","prevChar","starCount","nextChar","FilePatternAssociation","uris","globWrappers","pattern_1","patternString","regexp","matchesPattern","fileName","getURIs","SchemaHandle","service","url","unresolvedSchemaContent","unresolvedSchema","promise","UnresolvedSchema","getUnresolvedSchema","loadSchema","getResolvedSchema","resolvedSchema","unresolved","resolveSchemaContent","clearSchema","ResolvedSchema","getSection","schemaRef","getSectionRecursive","next","shift","idCounter","JSONSchemaService","requestService","contextService","callOnDispose","contributionSchemas","contributionAssociations","schemasById","filePatternAssociations","registeredSchemasIds","filter","onResourceChange","hasChanges","toWalk","normalizeId","curr","handle","setSchemaContributions","schemaContributions","normalizedId","addSchemaHandle","schemaAssociations","schemaAssociations_1","schemaAssociation","association","addFilePatternAssociation","schemaHandle","getOrAddSchemaHandle","fpa","registerExternalSchema","filePatterns","cachedSchemaForResource","clearExternalSchemas","contributionAssociation","toDisplayString","schemaContent","jsonErrors","errorSplit","schemaToResolve","schemaURL","resolveErrors","$schema","sourceRoot","sourceURI","refSegment","section","current","part","findSection","resolveExternalLink","parentSchemaURL","parentSchemaDependencies","resolveRelativePath","referencedHandle","loc","resolveRefs","parentSchema","seen","openPromises","handleRef","seenRefs","$ref","ref","segments","entries","entries_1","entry","collectEntries","maps","maps_1","k","collectMapEntries","definitions","arrays","arrays_1","array_1","collectArrayEntries","resource","schemaProperties","schemeId","normalizedResource","normalizeResourceForMatching","createCombinedSchema","combinedSchemaId","combinedSchema","jsonDocument","JSONValidation","jsonSchemaService","validationEnabled","configure","raw","commentSeverity","allowComments","doValidation","documentSettings","added","addProblem","problem","signature","getDiagnostics","trailingCommaSeverity","trailingCommas","toDiagnosticSeverity","schemaValidation","schemaRequest","astRoot","property","semanticErrors","schemaAllowsComments","schemaAllowsTrailingCommas","message_1","allow","allowTrailingCommas","deprSchemaRef","severityLevel","hexDigit","charCode","colorFromHex","getRange","JSONDocumentSymbols","findDocumentSymbols","context","resultLimit","resourceString","result_1","onResultLimitExceeded","toVisit","nextToVisit","limitExceeded","collectOutlineEntries","childContainerName","getKeyLabel","getSymbolKind","findDocumentSymbols2","result_2","symbol","getDetail","nodeType","findDocumentColors","visitedNode","nodeId","getColorPresentations","red256","round","green256","blue256","toTwoDigitHex","descriptions","$id","$comment","readOnly","contentMediaType","contentEncoding","schemaName","propertyObject","DiagnosticsAdapter","_disposables","_listener","onModelAdd","model","modeId","getModeId","onDidChangeContent","clearTimeout","setTimeout","_doValidate","onModelRemoved","uriStr","listener","_resetSchema","worker","resetSchema","markers","diag","toSeverity","startLineNumber","startColumn","endLineNumber","endColumn","err","lsSeverity","fromPosition","column","fromRange","toRange","toCompletionItemKind","mItemKind","toTextEdit","CompletionAdapter","provideCompletionItems","info","wordInfo","getWordUntilPosition","wordRange","insertTextRules","suggestions","toMarkdownString","thing","toMarkedStringArray","HoverAdapter","provideHover","doHover","toSymbolKind","mKind","DocumentSymbolAdapter","provideDocumentSymbols","fromFormattingOptions","DocumentFormattingEditProvider","provideDocumentFormattingEdits","DocumentRangeFormattingEditProvider","provideDocumentRangeFormattingEdits","DocumentColorAdapter","provideDocumentColors","infos","provideColorPresentations","presentations","presentation","FoldingRangeAdapter","provideFoldingRanges","getFoldingRanges","ranges","toFoldingRangeKind","SelectionRangeAdapter","provideSelectionRanges","positions","getSelectionRanges","selectionRanges","TOKEN_DELIM_OBJECT","TOKEN_DELIM_ARRAY","TOKEN_DELIM_COLON","TOKEN_DELIM_COMMA","TOKEN_VALUE_BOOLEAN","TOKEN_VALUE_NULL","TOKEN_VALUE_STRING","TOKEN_VALUE_NUMBER","TOKEN_PROPERTY_NAME","TOKEN_COMMENT_BLOCK","TOKEN_COMMENT_LINE","ParentsStack","parents","JSONState","state","lastWasColon","_state","clone","getStateData","setStateData","setupMode","disposables","providers","registerProviders","supportComments","modeConfiguration","disposeAll","documentFormattingEdits","documentRangeFormattingEdits","completionItems","hovers","documentSymbols","tokens","getInitialState","tokenize","offsetDelta","stopAtOffset","numberOfInsertedCharacters","adjustOffset","endState","startIndex","scopes","colors","foldingRanges","richEditConfiguration","newDefaults","asDisposable","wordPattern","lineComment","blockComment","brackets","autoClosingPairs","open","close","notIn"],"sourceRoot":""} \ No newline at end of file diff --git a/Components/helper.js b/Components/helper.js deleted file mode 100644 index ab4870d..0000000 --- a/Components/helper.js +++ /dev/null @@ -1,48 +0,0 @@ -module.exports = { - - string_to_regexp :(input)=>{ - // Converting user input string to regular expression - // source https://stackoverflow.com/a/874742/16309718 - var flags = input.replace(/.*\/([gimy]*)$/, '$1'); - var pattern = input.replace(new RegExp('^/(.*?)/'+flags+'$'), '$1'); - var regex = new RegExp(pattern, flags); - return regex - }, - pasteRegexPattern:(editor,text)=>{ - var selection = editor.getSelection(); - var id = { major: 1, minor: 1 }; - var op = {identifier: id, range: selection, text: text, forceMoveMarkers: true}; - editor.executeEdits("my-source", [op]); - }, - - selectionReplace:(editor,text)=>{ - var selection = editor.getSelection() - var id = { major: 1, minor: 1 }; - var op = {identifier: id, range: selection, text: text, forceMoveMarkers: true}; - editor.executeEdits("my-source", [op]); - }, - multiSelectionReplace:(editor,text)=>{ - var selections = editor.getSelections() - var id = { major: 1, minor: 1 }; - var ops = selections.map(x=>{ return {identifier: id, range: x, text: text, forceMoveMarkers: true} }) - editor.executeEdits("my-source", ops); - }, - multiSelectionReplaceFn:(editor,fn)=>{ - // example - // h.multiSelectionReplaceFn(editor, ()=>new RandExp(/([a-b]){5}/g ).gen()) - - var selections = editor.getSelections() - var id = { major: 1, minor: 1 }; - var ops = selections.map(x=>{ return {identifier: id, range: x, text: fn(), forceMoveMarkers: true} }) - editor.executeEdits("my-source", ops); - }, - // wrapper around function that allows for control z for the editor - updateEditor:(editor,text)=>{ - const fullRange = editor.getModel().getFullModelRange(); - - editor.executeEdits(null, [{ - text: text, - range: fullRange - }]); - } - } \ No newline at end of file diff --git a/LICENSE.md b/LICENSE.md deleted file mode 100644 index 1650f23..0000000 --- a/LICENSE.md +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2016-present Leon Shi - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/README.md b/README.md deleted file mode 100644 index cce6b9f..0000000 --- a/README.md +++ /dev/null @@ -1,90 +0,0 @@ -

- -

text-processor-react

- -[![Publish to github pages](https://github.com/wisehackermonkey/text-processor-react/actions/workflows/webpack.yml/badge.svg)](https://github.com/wisehackermonkey/text-processor-react/actions/workflows/webpack.yml) - -
-
- -
- -
- -# Live Website -### [Click here ](https://wisehackermonkey.github.io/text-processor-react/) -
- -## How to Install & Develope Locally - -To build the examples locally, run: - -```bash -yarn - -yarn start -``` -### NOTE: as of 2024 node doenst support some things im using tofix that run -### if you get code: 'ERR_OSSL_EVP_UNSUPPORTED' error -`export NODE_OPTIONS=--openssl-legacy-provider` - -### Then open `http://localhost:3000` in a browser - - ----------- - -# how to debug regex generator grammer parser -``` -yarn global add nearley -nearleyc grammer.ne -o src/lib/grammer.js -nearley-railroad grammer.ne -o grammar.html -python -m http.server 80 -``` - -# NOTE ALL CYPRESS TESTS ARE CURRENTLY BORKED! broken :/ as of 20240718 -## Locally run integration tests with crypress -```bash -yarn start -``` -### in a new tab run -```bash -yarn -yarn run cypress:open -``` - -### Run integration tests with crypress -```bash -yarn -yarn run cy:ci -``` - - -### open grammar.html in your browser to view railroad diagram of grammer -### http://localhost:80/grammar.html - -### Github actions how to setup DASHBOARDRECORDKEY -### [cypress setup api key](https://docs.cypress.io/guides/dashboard/projects#Set-up-a-project-to-record) - - - # [Actions secrets](https://github.com/wisehackermonkey/text-processor-react/settings/secrets/actions) -# [Actions secrets](https://github.com//settings/secrets/actions) - - -# https://dashboard.cypress.io/projects/ - - - -# TODO add -- ~~better css~~ DONE -- ~~add localstorage~~ DONE -- add save file button - - add open file -- add pastebin save with api key -- add cool colored text visualizer for the regex -- chatgpt plugin with buttons for helper -# links -[GitHub - react-monaco-editor/react-monaco-editor: Monaco Editor for React.](https://github.com/react-monaco-editor/react-monaco-editor) -[Monaco Editor Playground](https://microsoft.github.io/monaco-editor/playground.html#creating-the-editor-editor-basic-options) -# License - -MIT, see the [LICENSE](/LICENSE.md) file for detail. diff --git a/Untitled-1.js b/Untitled-1.js deleted file mode 100644 index bb56bcb..0000000 --- a/Untitled-1.js +++ /dev/null @@ -1,85 +0,0 @@ -/* We've started Quokka for you automatically on this file. - * - * To open a new Quokka file: - * - Press `Ctrl K, J` to create a new JavaScript File - * - Press `Ctrl K, T` to create a new TypeScript File - * - Press `Ctrl K, L` to open an interactive sample from: - * https://github.com/wallabyjs/interactive-examples - * - * To start/restart Quokka on an existing file: - * - Press `Ctrl K, Q` -*/ - -// See the output of console.log right next to your code -const quokka = { isAwesome: false }; - -console.log(quokka); - -// See the value of a variable simply by typing its name -quokka; - -// Use sequence expression to compare objects -const wallaby = { "is Quokka's BigBrother": true }; - -(quokka, wallaby) - -// Gutter indicators show what code was executed (code coverage) - -// Orange indicators means only part of the line was executed -// because JavaScript stops processing after first false value -console.log('partialCoverage', false && true); - -// Green indicators means that Quokka executed all statements -// on a line of code -if (false) { - // White indicators means that a line of code was never - // executed by Quokka - console.log('noCoverage', true); -} - -// Red indicators show where an error occurred. The error message -// is also shown beside the error -// throw new Error('Something went wrong'); - -// There's a lot more Quokka can do! Visit our docs to learn more: -// - https://quokkajs.com/docs/ - - -const moo = require('moo') - -let lexer = moo.compile({ - WS: /[ \t]+/, - comment: /\/\/.*?$/, - number: /0|[1-9][0-9]*/, - string: /"(?:\\["\\]|[^\n"\\])*"/, - letter: /[a-zA-Z]*"/, - // lparen: '(', - // rparen: ')', - keyword: ['while', 'if', 'else', 'moo', 'cows'], - NL: { match: /\n/, lineBreaks: true }, -}) - -// k -lexer.reset('aaa333\n') - -console.log(lexer.next()) - -console.log(lexer.next()) - -console.log(lexer.next()) - -console.log(lexer.next()) - -console.log(lexer.next()) - -console.log(lexer.next()) - -console.log(lexer.next()) - -console.log(lexer.next()) - -console.log(lexer.next()) - -console.log(lexer.next()) - -screen; \ No newline at end of file diff --git a/assets/2021-10-28-11-45-30.png b/assets/2021-10-28-11-45-30.png deleted file mode 100644 index 89bc83d..0000000 Binary files a/assets/2021-10-28-11-45-30.png and /dev/null differ diff --git a/assets/2021-10-29-17-59-05.png b/assets/2021-10-29-17-59-05.png deleted file mode 100644 index d3f2651..0000000 Binary files a/assets/2021-10-29-17-59-05.png and /dev/null differ diff --git a/assets/2021-10-29-17-59-40.png b/assets/2021-10-29-17-59-40.png deleted file mode 100644 index 6335c40..0000000 Binary files a/assets/2021-10-29-17-59-40.png and /dev/null differ diff --git a/assets/2021-10-29-18-00-50.png b/assets/2021-10-29-18-00-50.png deleted file mode 100644 index 841c91f..0000000 Binary files a/assets/2021-10-29-18-00-50.png and /dev/null differ diff --git a/cypress.json b/cypress.json deleted file mode 100644 index 0bd7287..0000000 --- a/cypress.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "projectId": "wu2ucs" - } \ No newline at end of file diff --git a/cypress/fixtures/example.json b/cypress/fixtures/example.json deleted file mode 100644 index 02e4254..0000000 --- a/cypress/fixtures/example.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "name": "Using fixtures to represent data", - "email": "hello@cypress.io", - "body": "Fixtures are a great way to mock data for responses to routes" -} diff --git a/cypress/integration/sample_spec.js b/cypress/integration/sample_spec.js deleted file mode 100644 index fdaa895..0000000 --- a/cypress/integration/sample_spec.js +++ /dev/null @@ -1,56 +0,0 @@ -/// - -describe('My First Test', () => { - it('search replace "type"', () => { - cy.visit('https://wisehackermonkey.github.io/text-processor-react/') - - cy.get('.view-lines').click({ force: true }).type(`test\ntest`) - cy.get('[value="multi_newline"]').click({ force: true }) - - cy.get(':nth-child(2) > :nth-child(3) > :nth-child(2) > .MuiInput-root > #outlined-multiline-static').click({ force: true }).type("###") - cy.get(':nth-child(2) > :nth-child(1) > .MuiButton-root').click({ force: true }) - cy.get('.view-line').should(($div) => { - expect($div.get(0).innerText).to.contain(`test###test`) - }) - }) - - it('generates text', () => { - cy.visit("http://localhost:3000") - cy.get(':nth-child(7) > .css-1p5q5e5-MuiStack-root > :nth-child(3) > :nth-child(1) > .MuiInput-root > #outlined-multiline-static').should($div => { - expect($div.get(0).innerHTML).to.contain("") - }) - cy.get('[value="int"]').click() - cy.get(':nth-child(7) > .css-1p5q5e5-MuiStack-root > :nth-child(3) > :nth-child(1) > .MuiInput-root > #outlined-multiline-static').should($div => { - expect($div.get(0).innerHTML).to.contain("/([0-9]{1,7})/g") - }) - - cy.get(':nth-child(7) > .css-1p5q5e5-MuiStack-root > :nth-child(3) > :nth-child(2) > .MuiInput-root > #outlined-multiline-static').should($div => { - expect($div.get(0).innerHTML).to.contain("") - }) - cy.get(':nth-child(7) > .css-1p5q5e5-MuiStack-root > :nth-child(1) > :nth-child(1)').click() - cy.get(':nth-child(7) > .css-1p5q5e5-MuiStack-root > :nth-child(3) > :nth-child(2) > .MuiInput-root > #outlined-multiline-static').should($div => { - expect($div.get(0).innerHTML.match(/([0-9]{1,7})/g).length >= 1).to.eq(true) - }) - - cy.get('.css-1p5q5e5-MuiStack-root > :nth-child(1) > :nth-child(2)').click() - cy.get('.view-line').should(($div) => { - expect($div.get(0).innerText.match(/([0-9]{1,7})/g).length >= 1).to.eq(true) - }) - cy.get('.css-1p5q5e5-MuiStack-root > .MuiToggleButtonGroup-root > [value="clear"]').click() - - }); - - it('build regex', () => { - cy.visit("http://localhost:3000") - cy.get('.css-1lwbda4-MuiStack-root > .MuiFormControl-root > .MuiInput-root > #outlined-multiline-static').should(($div) => { - expect($div.get(0).innerHTML).to.eq("//g") - }) - - cy.get('.css-1bi0bj-MuiStack-root > :nth-child(1)').click() - cy.get('.css-1lwbda4-MuiStack-root > .MuiFormControl-root > .MuiInput-root > #outlined-multiline-static').should(($div) => { - expect($div.get(0).innerHTML).to.eq("/([\\t\\n\\r]+)/g") - }) - cy.get('[value="ipaddress"]').click() - }); - -}) diff --git a/cypress/plugins/index.js b/cypress/plugins/index.js deleted file mode 100644 index 6dd4507..0000000 --- a/cypress/plugins/index.js +++ /dev/null @@ -1,23 +0,0 @@ -/// -// *********************************************************** -// This example plugins/index.js can be used to load plugins -// -// You can change the location of this file or turn off loading -// the plugins file with the 'pluginsFile' configuration option. -// -// You can read more here: -// https://on.cypress.io/plugins-guide -// *********************************************************** - -// This function is called when a project is opened or re-opened (e.g. due to -// the project's config changing) - -/** - * @type {Cypress.PluginConfig} - */ -// eslint-disable-next-line no-unused-vars -module.exports = (on, config) => { - // `on` is used to hook into various events Cypress emits - // `config` is the resolved Cypress config - -} diff --git a/cypress/support/commands.js b/cypress/support/commands.js deleted file mode 100644 index 119ab03..0000000 --- a/cypress/support/commands.js +++ /dev/null @@ -1,25 +0,0 @@ -// *********************************************** -// This example commands.js shows you how to -// create various custom commands and overwrite -// existing commands. -// -// For more comprehensive examples of custom -// commands please read more here: -// https://on.cypress.io/custom-commands -// *********************************************** -// -// -// -- This is a parent command -- -// Cypress.Commands.add('login', (email, password) => { ... }) -// -// -// -- This is a child command -- -// Cypress.Commands.add('drag', { prevSubject: 'element'}, (subject, options) => { ... }) -// -// -// -- This is a dual command -- -// Cypress.Commands.add('dismiss', { prevSubject: 'optional'}, (subject, options) => { ... }) -// -// -// -- This will overwrite an existing command -- -// Cypress.Commands.overwrite('visit', (originalFn, url, options) => { ... }) diff --git a/cypress/support/index.js b/cypress/support/index.js deleted file mode 100644 index d68db96..0000000 --- a/cypress/support/index.js +++ /dev/null @@ -1,20 +0,0 @@ -// *********************************************************** -// This example support/index.js is processed and -// loaded automatically before your test files. -// -// This is a great place to put global configuration and -// behavior that modifies Cypress. -// -// You can change the location of this file or turn off -// automatically serving support files with the -// 'supportFile' configuration option. -// -// You can read more here: -// https://on.cypress.io/configuration -// *********************************************************** - -// Import commands.js using ES2015 syntax: -import './commands' - -// Alternatively you can use CommonJS syntax: -// require('./commands') diff --git a/editor.worker.js b/editor.worker.js new file mode 100644 index 0000000..e7b1e50 --- /dev/null +++ b/editor.worker.js @@ -0,0 +1,2 @@ +(()=>{"use strict";var e={};e.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}();const t=new class{constructor(){this.listeners=[],this.unexpectedErrorHandler=function(e){setTimeout((()=>{if(e.stack)throw new Error(e.message+"\n\n"+e.stack);throw e}),0)}}emit(e){this.listeners.forEach((t=>{t(e)}))}onUnexpectedError(e){this.unexpectedErrorHandler(e),this.emit(e)}onUnexpectedExternalError(e){this.unexpectedErrorHandler(e)}};function n(e){var n;(n=e)instanceof Error&&n.name===r&&n.message===r||t.onUnexpectedError(e)}function i(e){if(e instanceof Error){let{name:t,message:n}=e;return{$isError:!0,name:t,message:n,stack:e.stacktrace||e.stack}}return e}const r="Canceled";function s(e){const t=this;let n,i=!1;return function(){return i||(i=!0,n=e.apply(t,arguments)),n}}var o;!function(e){e.is=function(e){return e&&"object"==typeof e&&"function"==typeof e[Symbol.iterator]};const t=Object.freeze([]);e.empty=function(){return t},e.single=function*(e){yield e},e.from=function(e){return e||t},e.isEmpty=function(e){return!e||!0===e[Symbol.iterator]().next().done},e.first=function(e){return e[Symbol.iterator]().next().value},e.some=function(e,t){for(const n of e)if(t(n))return!0;return!1},e.find=function(e,t){for(const n of e)if(t(n))return n},e.filter=function*(e,t){for(const n of e)t(n)&&(yield n)},e.map=function*(e,t){let n=0;for(const i of e)yield t(i,n++)},e.concat=function*(...e){for(const t of e)for(const e of t)yield e},e.concatNested=function*(e){for(const t of e)for(const e of t)yield e},e.reduce=function(e,t,n){let i=n;for(const n of e)i=t(i,n);return i},e.slice=function*(e,t,n=e.length){for(t<0&&(t+=e.length),n<0?n+=e.length:n>e.length&&(n=e.length);tr}]},e.equals=function(e,t,n=((e,t)=>e===t)){const i=e[Symbol.iterator](),r=t[Symbol.iterator]();for(;;){const e=i.next(),t=r.next();if(e.done!==t.done)return!1;if(e.done)return!0;if(!n(e.value,t.value))return!1}}}(o||(o={}));var a;class l extends Error{constructor(e){super(`Encountered errors while disposing of store. Errors: [${e.join(", ")}]`),this.errors=e}}function u(e){if(o.is(e)){let t=[];for(const n of e)if(n)try{n.dispose()}catch(e){t.push(e)}if(1===t.length)throw t[0];if(t.length>1)throw new l(t);return Array.isArray(e)?[]:e}if(e)return e.dispose(),e}function h(e){const t={dispose:s((()=>{e()}))};return t}class d{constructor(){this._toDispose=new Set,this._isDisposed=!1}dispose(){this._isDisposed||(this._isDisposed=!0,this.clear())}clear(){try{u(this._toDispose.values())}finally{this._toDispose.clear()}}add(e){if(!e)return e;if(e===this)throw new Error("Cannot register a disposable on itself!");return this._isDisposed?d.DISABLE_DISPOSED_WARNING||console.warn(new Error("Trying to add a disposable to a DisposableStore that has already been disposed of. The added object will be leaked!").stack):this._toDispose.add(e),e}}d.DISABLE_DISPOSED_WARNING=!1;class c{constructor(){this._store=new d,this._store}dispose(){this._store.dispose()}_register(e){if(e===this)throw new Error("Cannot register a disposable on itself!");return this._store.add(e)}}c.None=Object.freeze({dispose(){}});const f="en";let m,g,_,p=!1,C=!1,b=!1,S=!1,L=!1,E=!1,N=!1,y=null;const A="object"==typeof self?self:"object"==typeof e.g?e.g:{};let v;void 0!==A.vscode&&void 0!==A.vscode.process?v=A.vscode.process:"undefined"!=typeof process&&(v=process);const w="string"==typeof(null===(a=null==v?void 0:v.versions)||void 0===a?void 0:a.electron)&&"renderer"===v.type,O=w&&(null==v?void 0:v.sandboxed);if((()=>{if(O)return"bypassHeatCheck";null==v||v.env.VSCODE_BROWSER_CODE_LOADING})(),"object"!=typeof navigator||w)if("object"==typeof v){p="win32"===v.platform,C="darwin"===v.platform,b="linux"===v.platform,S=b&&!!v.env.SNAP&&!!v.env.SNAP_REVISION,m=f,y=f;const e=v.env.VSCODE_NLS_CONFIG;if(e)try{const t=JSON.parse(e),n=t.availableLanguages["*"];m=t.locale,y=n||f,g=t._translationsConfigFile}catch(e){}L=!0}else console.error("Unable to resolve platform.");else _=navigator.userAgent,p=_.indexOf("Windows")>=0,C=_.indexOf("Macintosh")>=0,(_.indexOf("Macintosh")>=0||_.indexOf("iPad")>=0||_.indexOf("iPhone")>=0)&&!!navigator.maxTouchPoints&&navigator.maxTouchPoints>0,b=_.indexOf("Linux")>=0,!0,m=navigator.language,y=m;let T=0;C?T=1:p?T=3:b&&(T=2);const x=p,I=C,M=function(){if(A.setImmediate)return A.setImmediate.bind(A);if("function"==typeof A.postMessage&&!A.importScripts){let e=[];A.addEventListener("message",(t=>{if(t.data&&t.data.vscodeSetImmediateId)for(let n=0,i=e.length;n{const i=++t;e.push({id:i,callback:n}),A.postMessage({vscodeSetImmediateId:i},"*")}}if("function"==typeof(null==v?void 0:v.nextTick))return v.nextTick.bind(v);const e=Promise.resolve();return t=>e.then(t)}();function P(e){const t=[];for(const n of function(e){let t=[],n=Object.getPrototypeOf(e);for(;Object.prototype!==n;)t=t.concat(Object.getOwnPropertyNames(n)),n=Object.getPrototypeOf(n);return t}(e))"function"==typeof e[n]&&t.push(n);return t}function R(e,t){const n=e=>function(){const n=Array.prototype.slice.call(arguments,0);return t(e,n)};let i={};for(const t of e)i[t]=n(t);return i}class U{constructor(e){this._workerId=-1,this._handler=e,this._lastSentReq=0,this._pendingReplies=Object.create(null)}setWorkerId(e){this._workerId=e}sendMessage(e,t){let n=String(++this._lastSentReq);return new Promise(((i,r)=>{this._pendingReplies[n]={resolve:i,reject:r},this._send({vsWorker:this._workerId,req:n,method:e,args:t})}))}handleMessage(e){e&&e.vsWorker&&(-1!==this._workerId&&e.vsWorker!==this._workerId||this._handleMessage(e))}_handleMessage(e){if(e.seq){let t=e;if(!this._pendingReplies[t.seq])return void console.warn("Got reply to unknown seq");let n=this._pendingReplies[t.seq];if(delete this._pendingReplies[t.seq],t.err){let e=t.err;return t.err.$isError&&(e=new Error,e.name=t.err.name,e.message=t.err.message,e.stack=t.err.stack),void n.reject(e)}return void n.resolve(t.res)}let t=e,n=t.req;this._handler.handleMessage(t.method,t.args).then((e=>{this._send({vsWorker:this._workerId,seq:n,res:e,err:void 0})}),(e=>{e.detail instanceof Error&&(e.detail=i(e.detail)),this._send({vsWorker:this._workerId,seq:n,res:void 0,err:i(e)})}))}_send(e){let t=[];if(e.req){const n=e;for(let e=0;e{e(t,n)},handleMessage:(e,t)=>this._handleMessage(e,t)})}onmessage(e){this._protocol.handleMessage(e)}_handleMessage(e,t){if("$initialize"===e)return this.initialize(t[0],t[1],t[2],t[3]);if(!this._requestHandler||"function"!=typeof this._requestHandler[e])return Promise.reject(new Error("Missing requestHandler or method: "+e));try{return Promise.resolve(this._requestHandler[e].apply(this._requestHandler,t))}catch(e){return Promise.reject(e)}}initialize(e,t,n,i){this._protocol.setWorkerId(e);const r=R(i,((e,t)=>this._protocol.sendMessage(e,t)));return this._requestHandlerFactory?(this._requestHandler=this._requestHandlerFactory(r),Promise.resolve(P(this._requestHandler))):(t&&(void 0!==t.baseUrl&&delete t.baseUrl,void 0!==t.paths&&void 0!==t.paths.vs&&delete t.paths.vs,void 0!==typeof t.trustedTypesPolicy&&delete t.trustedTypesPolicy,t.catchError=!0,self.require.config(t)),new Promise(((e,t)=>{self.require([n],(n=>{this._requestHandler=n.create(r),this._requestHandler?e(P(this._requestHandler)):t(new Error("No RequestHandler!"))}),t)})))}}class D{constructor(e,t,n,i){this.originalStart=e,this.originalLength=t,this.modifiedStart=n,this.modifiedLength=i}getOriginalEnd(){return this.originalStart+this.originalLength}getModifiedEnd(){return this.modifiedStart+this.modifiedLength}}function F(e){return 55296<=e&&e<=56319}function B(e){return 56320<=e&&e<=57343}String.fromCharCode(65279);class K{constructor(){this._data=JSON.parse("[0,0,0,51592,51592,11,44424,44424,11,72251,72254,5,7150,7150,7,48008,48008,11,55176,55176,11,128420,128420,14,3276,3277,5,9979,9980,14,46216,46216,11,49800,49800,11,53384,53384,11,70726,70726,5,122915,122916,5,129320,129327,14,2558,2558,5,5906,5908,5,9762,9763,14,43360,43388,8,45320,45320,11,47112,47112,11,48904,48904,11,50696,50696,11,52488,52488,11,54280,54280,11,70082,70083,1,71350,71350,7,73111,73111,5,127892,127893,14,128726,128727,14,129473,129474,14,2027,2035,5,2901,2902,5,3784,3789,5,6754,6754,5,8418,8420,5,9877,9877,14,11088,11088,14,44008,44008,5,44872,44872,11,45768,45768,11,46664,46664,11,47560,47560,11,48456,48456,11,49352,49352,11,50248,50248,11,51144,51144,11,52040,52040,11,52936,52936,11,53832,53832,11,54728,54728,11,69811,69814,5,70459,70460,5,71096,71099,7,71998,71998,5,72874,72880,5,119149,119149,7,127374,127374,14,128335,128335,14,128482,128482,14,128765,128767,14,129399,129400,14,129680,129685,14,1476,1477,5,2377,2380,7,2759,2760,5,3137,3140,7,3458,3459,7,4153,4154,5,6432,6434,5,6978,6978,5,7675,7679,5,9723,9726,14,9823,9823,14,9919,9923,14,10035,10036,14,42736,42737,5,43596,43596,5,44200,44200,11,44648,44648,11,45096,45096,11,45544,45544,11,45992,45992,11,46440,46440,11,46888,46888,11,47336,47336,11,47784,47784,11,48232,48232,11,48680,48680,11,49128,49128,11,49576,49576,11,50024,50024,11,50472,50472,11,50920,50920,11,51368,51368,11,51816,51816,11,52264,52264,11,52712,52712,11,53160,53160,11,53608,53608,11,54056,54056,11,54504,54504,11,54952,54952,11,68108,68111,5,69933,69940,5,70197,70197,7,70498,70499,7,70845,70845,5,71229,71229,5,71727,71735,5,72154,72155,5,72344,72345,5,73023,73029,5,94095,94098,5,121403,121452,5,126981,127182,14,127538,127546,14,127990,127990,14,128391,128391,14,128445,128449,14,128500,128505,14,128752,128752,14,129160,129167,14,129356,129356,14,129432,129442,14,129648,129651,14,129751,131069,14,173,173,4,1757,1757,1,2274,2274,1,2494,2494,5,2641,2641,5,2876,2876,5,3014,3016,7,3262,3262,7,3393,3396,5,3570,3571,7,3968,3972,5,4228,4228,7,6086,6086,5,6679,6680,5,6912,6915,5,7080,7081,5,7380,7392,5,8252,8252,14,9096,9096,14,9748,9749,14,9784,9786,14,9833,9850,14,9890,9894,14,9938,9938,14,9999,9999,14,10085,10087,14,12349,12349,14,43136,43137,7,43454,43456,7,43755,43755,7,44088,44088,11,44312,44312,11,44536,44536,11,44760,44760,11,44984,44984,11,45208,45208,11,45432,45432,11,45656,45656,11,45880,45880,11,46104,46104,11,46328,46328,11,46552,46552,11,46776,46776,11,47000,47000,11,47224,47224,11,47448,47448,11,47672,47672,11,47896,47896,11,48120,48120,11,48344,48344,11,48568,48568,11,48792,48792,11,49016,49016,11,49240,49240,11,49464,49464,11,49688,49688,11,49912,49912,11,50136,50136,11,50360,50360,11,50584,50584,11,50808,50808,11,51032,51032,11,51256,51256,11,51480,51480,11,51704,51704,11,51928,51928,11,52152,52152,11,52376,52376,11,52600,52600,11,52824,52824,11,53048,53048,11,53272,53272,11,53496,53496,11,53720,53720,11,53944,53944,11,54168,54168,11,54392,54392,11,54616,54616,11,54840,54840,11,55064,55064,11,65438,65439,5,69633,69633,5,69837,69837,1,70018,70018,7,70188,70190,7,70368,70370,7,70465,70468,7,70712,70719,5,70835,70840,5,70850,70851,5,71132,71133,5,71340,71340,7,71458,71461,5,71985,71989,7,72002,72002,7,72193,72202,5,72281,72283,5,72766,72766,7,72885,72886,5,73104,73105,5,92912,92916,5,113824,113827,4,119173,119179,5,121505,121519,5,125136,125142,5,127279,127279,14,127489,127490,14,127570,127743,14,127900,127901,14,128254,128254,14,128369,128370,14,128400,128400,14,128425,128432,14,128468,128475,14,128489,128494,14,128715,128720,14,128745,128745,14,128759,128760,14,129004,129023,14,129296,129304,14,129340,129342,14,129388,129392,14,129404,129407,14,129454,129455,14,129485,129487,14,129659,129663,14,129719,129727,14,917536,917631,5,13,13,2,1160,1161,5,1564,1564,4,1807,1807,1,2085,2087,5,2363,2363,7,2402,2403,5,2507,2508,7,2622,2624,7,2691,2691,7,2786,2787,5,2881,2884,5,3006,3006,5,3072,3072,5,3170,3171,5,3267,3268,7,3330,3331,7,3406,3406,1,3538,3540,5,3655,3662,5,3897,3897,5,4038,4038,5,4184,4185,5,4352,4447,8,6068,6069,5,6155,6157,5,6448,6449,7,6742,6742,5,6783,6783,5,6966,6970,5,7042,7042,7,7143,7143,7,7212,7219,5,7412,7412,5,8206,8207,4,8294,8303,4,8596,8601,14,9410,9410,14,9742,9742,14,9757,9757,14,9770,9770,14,9794,9794,14,9828,9828,14,9855,9855,14,9882,9882,14,9900,9903,14,9929,9933,14,9963,9967,14,9987,9988,14,10006,10006,14,10062,10062,14,10175,10175,14,11744,11775,5,42607,42607,5,43043,43044,7,43263,43263,5,43444,43445,7,43569,43570,5,43698,43700,5,43766,43766,5,44032,44032,11,44144,44144,11,44256,44256,11,44368,44368,11,44480,44480,11,44592,44592,11,44704,44704,11,44816,44816,11,44928,44928,11,45040,45040,11,45152,45152,11,45264,45264,11,45376,45376,11,45488,45488,11,45600,45600,11,45712,45712,11,45824,45824,11,45936,45936,11,46048,46048,11,46160,46160,11,46272,46272,11,46384,46384,11,46496,46496,11,46608,46608,11,46720,46720,11,46832,46832,11,46944,46944,11,47056,47056,11,47168,47168,11,47280,47280,11,47392,47392,11,47504,47504,11,47616,47616,11,47728,47728,11,47840,47840,11,47952,47952,11,48064,48064,11,48176,48176,11,48288,48288,11,48400,48400,11,48512,48512,11,48624,48624,11,48736,48736,11,48848,48848,11,48960,48960,11,49072,49072,11,49184,49184,11,49296,49296,11,49408,49408,11,49520,49520,11,49632,49632,11,49744,49744,11,49856,49856,11,49968,49968,11,50080,50080,11,50192,50192,11,50304,50304,11,50416,50416,11,50528,50528,11,50640,50640,11,50752,50752,11,50864,50864,11,50976,50976,11,51088,51088,11,51200,51200,11,51312,51312,11,51424,51424,11,51536,51536,11,51648,51648,11,51760,51760,11,51872,51872,11,51984,51984,11,52096,52096,11,52208,52208,11,52320,52320,11,52432,52432,11,52544,52544,11,52656,52656,11,52768,52768,11,52880,52880,11,52992,52992,11,53104,53104,11,53216,53216,11,53328,53328,11,53440,53440,11,53552,53552,11,53664,53664,11,53776,53776,11,53888,53888,11,54000,54000,11,54112,54112,11,54224,54224,11,54336,54336,11,54448,54448,11,54560,54560,11,54672,54672,11,54784,54784,11,54896,54896,11,55008,55008,11,55120,55120,11,64286,64286,5,66272,66272,5,68900,68903,5,69762,69762,7,69817,69818,5,69927,69931,5,70003,70003,5,70070,70078,5,70094,70094,7,70194,70195,7,70206,70206,5,70400,70401,5,70463,70463,7,70475,70477,7,70512,70516,5,70722,70724,5,70832,70832,5,70842,70842,5,70847,70848,5,71088,71089,7,71102,71102,7,71219,71226,5,71231,71232,5,71342,71343,7,71453,71455,5,71463,71467,5,71737,71738,5,71995,71996,5,72000,72000,7,72145,72147,7,72160,72160,5,72249,72249,7,72273,72278,5,72330,72342,5,72752,72758,5,72850,72871,5,72882,72883,5,73018,73018,5,73031,73031,5,73109,73109,5,73461,73462,7,94031,94031,5,94192,94193,7,119142,119142,7,119155,119162,4,119362,119364,5,121476,121476,5,122888,122904,5,123184,123190,5,126976,126979,14,127184,127231,14,127344,127345,14,127405,127461,14,127514,127514,14,127561,127567,14,127778,127779,14,127896,127896,14,127985,127986,14,127995,127999,5,128326,128328,14,128360,128366,14,128378,128378,14,128394,128397,14,128405,128406,14,128422,128423,14,128435,128443,14,128453,128464,14,128479,128480,14,128484,128487,14,128496,128498,14,128640,128709,14,128723,128724,14,128736,128741,14,128747,128748,14,128755,128755,14,128762,128762,14,128981,128991,14,129096,129103,14,129292,129292,14,129311,129311,14,129329,129330,14,129344,129349,14,129360,129374,14,129394,129394,14,129402,129402,14,129413,129425,14,129445,129450,14,129466,129471,14,129483,129483,14,129511,129535,14,129653,129655,14,129667,129670,14,129705,129711,14,129731,129743,14,917505,917505,4,917760,917999,5,10,10,3,127,159,4,768,879,5,1471,1471,5,1536,1541,1,1648,1648,5,1767,1768,5,1840,1866,5,2070,2073,5,2137,2139,5,2307,2307,7,2366,2368,7,2382,2383,7,2434,2435,7,2497,2500,5,2519,2519,5,2563,2563,7,2631,2632,5,2677,2677,5,2750,2752,7,2763,2764,7,2817,2817,5,2879,2879,5,2891,2892,7,2914,2915,5,3008,3008,5,3021,3021,5,3076,3076,5,3146,3149,5,3202,3203,7,3264,3265,7,3271,3272,7,3298,3299,5,3390,3390,5,3402,3404,7,3426,3427,5,3535,3535,5,3544,3550,7,3635,3635,7,3763,3763,7,3893,3893,5,3953,3966,5,3981,3991,5,4145,4145,7,4157,4158,5,4209,4212,5,4237,4237,5,4520,4607,10,5970,5971,5,6071,6077,5,6089,6099,5,6277,6278,5,6439,6440,5,6451,6456,7,6683,6683,5,6744,6750,5,6765,6770,7,6846,6846,5,6964,6964,5,6972,6972,5,7019,7027,5,7074,7077,5,7083,7085,5,7146,7148,7,7154,7155,7,7222,7223,5,7394,7400,5,7416,7417,5,8204,8204,5,8233,8233,4,8288,8292,4,8413,8416,5,8482,8482,14,8986,8987,14,9193,9203,14,9654,9654,14,9733,9733,14,9745,9745,14,9752,9752,14,9760,9760,14,9766,9766,14,9774,9775,14,9792,9792,14,9800,9811,14,9825,9826,14,9831,9831,14,9852,9853,14,9872,9873,14,9880,9880,14,9885,9887,14,9896,9897,14,9906,9916,14,9926,9927,14,9936,9936,14,9941,9960,14,9974,9974,14,9982,9985,14,9992,9997,14,10002,10002,14,10017,10017,14,10055,10055,14,10071,10071,14,10145,10145,14,11013,11015,14,11503,11505,5,12334,12335,5,12951,12951,14,42612,42621,5,43014,43014,5,43047,43047,7,43204,43205,5,43335,43345,5,43395,43395,7,43450,43451,7,43561,43566,5,43573,43574,5,43644,43644,5,43710,43711,5,43758,43759,7,44005,44005,5,44012,44012,7,44060,44060,11,44116,44116,11,44172,44172,11,44228,44228,11,44284,44284,11,44340,44340,11,44396,44396,11,44452,44452,11,44508,44508,11,44564,44564,11,44620,44620,11,44676,44676,11,44732,44732,11,44788,44788,11,44844,44844,11,44900,44900,11,44956,44956,11,45012,45012,11,45068,45068,11,45124,45124,11,45180,45180,11,45236,45236,11,45292,45292,11,45348,45348,11,45404,45404,11,45460,45460,11,45516,45516,11,45572,45572,11,45628,45628,11,45684,45684,11,45740,45740,11,45796,45796,11,45852,45852,11,45908,45908,11,45964,45964,11,46020,46020,11,46076,46076,11,46132,46132,11,46188,46188,11,46244,46244,11,46300,46300,11,46356,46356,11,46412,46412,11,46468,46468,11,46524,46524,11,46580,46580,11,46636,46636,11,46692,46692,11,46748,46748,11,46804,46804,11,46860,46860,11,46916,46916,11,46972,46972,11,47028,47028,11,47084,47084,11,47140,47140,11,47196,47196,11,47252,47252,11,47308,47308,11,47364,47364,11,47420,47420,11,47476,47476,11,47532,47532,11,47588,47588,11,47644,47644,11,47700,47700,11,47756,47756,11,47812,47812,11,47868,47868,11,47924,47924,11,47980,47980,11,48036,48036,11,48092,48092,11,48148,48148,11,48204,48204,11,48260,48260,11,48316,48316,11,48372,48372,11,48428,48428,11,48484,48484,11,48540,48540,11,48596,48596,11,48652,48652,11,48708,48708,11,48764,48764,11,48820,48820,11,48876,48876,11,48932,48932,11,48988,48988,11,49044,49044,11,49100,49100,11,49156,49156,11,49212,49212,11,49268,49268,11,49324,49324,11,49380,49380,11,49436,49436,11,49492,49492,11,49548,49548,11,49604,49604,11,49660,49660,11,49716,49716,11,49772,49772,11,49828,49828,11,49884,49884,11,49940,49940,11,49996,49996,11,50052,50052,11,50108,50108,11,50164,50164,11,50220,50220,11,50276,50276,11,50332,50332,11,50388,50388,11,50444,50444,11,50500,50500,11,50556,50556,11,50612,50612,11,50668,50668,11,50724,50724,11,50780,50780,11,50836,50836,11,50892,50892,11,50948,50948,11,51004,51004,11,51060,51060,11,51116,51116,11,51172,51172,11,51228,51228,11,51284,51284,11,51340,51340,11,51396,51396,11,51452,51452,11,51508,51508,11,51564,51564,11,51620,51620,11,51676,51676,11,51732,51732,11,51788,51788,11,51844,51844,11,51900,51900,11,51956,51956,11,52012,52012,11,52068,52068,11,52124,52124,11,52180,52180,11,52236,52236,11,52292,52292,11,52348,52348,11,52404,52404,11,52460,52460,11,52516,52516,11,52572,52572,11,52628,52628,11,52684,52684,11,52740,52740,11,52796,52796,11,52852,52852,11,52908,52908,11,52964,52964,11,53020,53020,11,53076,53076,11,53132,53132,11,53188,53188,11,53244,53244,11,53300,53300,11,53356,53356,11,53412,53412,11,53468,53468,11,53524,53524,11,53580,53580,11,53636,53636,11,53692,53692,11,53748,53748,11,53804,53804,11,53860,53860,11,53916,53916,11,53972,53972,11,54028,54028,11,54084,54084,11,54140,54140,11,54196,54196,11,54252,54252,11,54308,54308,11,54364,54364,11,54420,54420,11,54476,54476,11,54532,54532,11,54588,54588,11,54644,54644,11,54700,54700,11,54756,54756,11,54812,54812,11,54868,54868,11,54924,54924,11,54980,54980,11,55036,55036,11,55092,55092,11,55148,55148,11,55216,55238,9,65056,65071,5,65529,65531,4,68097,68099,5,68159,68159,5,69446,69456,5,69688,69702,5,69808,69810,7,69815,69816,7,69821,69821,1,69888,69890,5,69932,69932,7,69957,69958,7,70016,70017,5,70067,70069,7,70079,70080,7,70089,70092,5,70095,70095,5,70191,70193,5,70196,70196,5,70198,70199,5,70367,70367,5,70371,70378,5,70402,70403,7,70462,70462,5,70464,70464,5,70471,70472,7,70487,70487,5,70502,70508,5,70709,70711,7,70720,70721,7,70725,70725,7,70750,70750,5,70833,70834,7,70841,70841,7,70843,70844,7,70846,70846,7,70849,70849,7,71087,71087,5,71090,71093,5,71100,71101,5,71103,71104,5,71216,71218,7,71227,71228,7,71230,71230,7,71339,71339,5,71341,71341,5,71344,71349,5,71351,71351,5,71456,71457,7,71462,71462,7,71724,71726,7,71736,71736,7,71984,71984,5,71991,71992,7,71997,71997,7,71999,71999,1,72001,72001,1,72003,72003,5,72148,72151,5,72156,72159,7,72164,72164,7,72243,72248,5,72250,72250,1,72263,72263,5,72279,72280,7,72324,72329,1,72343,72343,7,72751,72751,7,72760,72765,5,72767,72767,5,72873,72873,7,72881,72881,7,72884,72884,7,73009,73014,5,73020,73021,5,73030,73030,1,73098,73102,7,73107,73108,7,73110,73110,7,73459,73460,5,78896,78904,4,92976,92982,5,94033,94087,7,94180,94180,5,113821,113822,5,119141,119141,5,119143,119145,5,119150,119154,5,119163,119170,5,119210,119213,5,121344,121398,5,121461,121461,5,121499,121503,5,122880,122886,5,122907,122913,5,122918,122922,5,123628,123631,5,125252,125258,5,126980,126980,14,127183,127183,14,127245,127247,14,127340,127343,14,127358,127359,14,127377,127386,14,127462,127487,6,127491,127503,14,127535,127535,14,127548,127551,14,127568,127569,14,127744,127777,14,127780,127891,14,127894,127895,14,127897,127899,14,127902,127984,14,127987,127989,14,127991,127994,14,128000,128253,14,128255,128317,14,128329,128334,14,128336,128359,14,128367,128368,14,128371,128377,14,128379,128390,14,128392,128393,14,128398,128399,14,128401,128404,14,128407,128419,14,128421,128421,14,128424,128424,14,128433,128434,14,128444,128444,14,128450,128452,14,128465,128467,14,128476,128478,14,128481,128481,14,128483,128483,14,128488,128488,14,128495,128495,14,128499,128499,14,128506,128591,14,128710,128714,14,128721,128722,14,128725,128725,14,128728,128735,14,128742,128744,14,128746,128746,14,128749,128751,14,128753,128754,14,128756,128758,14,128761,128761,14,128763,128764,14,128884,128895,14,128992,129003,14,129036,129039,14,129114,129119,14,129198,129279,14,129293,129295,14,129305,129310,14,129312,129319,14,129328,129328,14,129331,129338,14,129343,129343,14,129351,129355,14,129357,129359,14,129375,129387,14,129393,129393,14,129395,129398,14,129401,129401,14,129403,129403,14,129408,129412,14,129426,129431,14,129443,129444,14,129451,129453,14,129456,129465,14,129472,129472,14,129475,129482,14,129484,129484,14,129488,129510,14,129536,129647,14,129652,129652,14,129656,129658,14,129664,129666,14,129671,129679,14,129686,129704,14,129712,129718,14,129728,129730,14,129744,129750,14,917504,917504,4,917506,917535,4,917632,917759,4,918000,921599,4,0,9,4,11,12,4,14,31,4,169,169,14,174,174,14,1155,1159,5,1425,1469,5,1473,1474,5,1479,1479,5,1552,1562,5,1611,1631,5,1750,1756,5,1759,1764,5,1770,1773,5,1809,1809,5,1958,1968,5,2045,2045,5,2075,2083,5,2089,2093,5,2259,2273,5,2275,2306,5,2362,2362,5,2364,2364,5,2369,2376,5,2381,2381,5,2385,2391,5,2433,2433,5,2492,2492,5,2495,2496,7,2503,2504,7,2509,2509,5,2530,2531,5,2561,2562,5,2620,2620,5,2625,2626,5,2635,2637,5,2672,2673,5,2689,2690,5,2748,2748,5,2753,2757,5,2761,2761,7,2765,2765,5,2810,2815,5,2818,2819,7,2878,2878,5,2880,2880,7,2887,2888,7,2893,2893,5,2903,2903,5,2946,2946,5,3007,3007,7,3009,3010,7,3018,3020,7,3031,3031,5,3073,3075,7,3134,3136,5,3142,3144,5,3157,3158,5,3201,3201,5,3260,3260,5,3263,3263,5,3266,3266,5,3270,3270,5,3274,3275,7,3285,3286,5,3328,3329,5,3387,3388,5,3391,3392,7,3398,3400,7,3405,3405,5,3415,3415,5,3457,3457,5,3530,3530,5,3536,3537,7,3542,3542,5,3551,3551,5,3633,3633,5,3636,3642,5,3761,3761,5,3764,3772,5,3864,3865,5,3895,3895,5,3902,3903,7,3967,3967,7,3974,3975,5,3993,4028,5,4141,4144,5,4146,4151,5,4155,4156,7,4182,4183,7,4190,4192,5,4226,4226,5,4229,4230,5,4253,4253,5,4448,4519,9,4957,4959,5,5938,5940,5,6002,6003,5,6070,6070,7,6078,6085,7,6087,6088,7,6109,6109,5,6158,6158,4,6313,6313,5,6435,6438,7,6441,6443,7,6450,6450,5,6457,6459,5,6681,6682,7,6741,6741,7,6743,6743,7,6752,6752,5,6757,6764,5,6771,6780,5,6832,6845,5,6847,6848,5,6916,6916,7,6965,6965,5,6971,6971,7,6973,6977,7,6979,6980,7,7040,7041,5,7073,7073,7,7078,7079,7,7082,7082,7,7142,7142,5,7144,7145,5,7149,7149,5,7151,7153,5,7204,7211,7,7220,7221,7,7376,7378,5,7393,7393,7,7405,7405,5,7415,7415,7,7616,7673,5,8203,8203,4,8205,8205,13,8232,8232,4,8234,8238,4,8265,8265,14,8293,8293,4,8400,8412,5,8417,8417,5,8421,8432,5,8505,8505,14,8617,8618,14,9000,9000,14,9167,9167,14,9208,9210,14,9642,9643,14,9664,9664,14,9728,9732,14,9735,9741,14,9743,9744,14,9746,9746,14,9750,9751,14,9753,9756,14,9758,9759,14,9761,9761,14,9764,9765,14,9767,9769,14,9771,9773,14,9776,9783,14,9787,9791,14,9793,9793,14,9795,9799,14,9812,9822,14,9824,9824,14,9827,9827,14,9829,9830,14,9832,9832,14,9851,9851,14,9854,9854,14,9856,9861,14,9874,9876,14,9878,9879,14,9881,9881,14,9883,9884,14,9888,9889,14,9895,9895,14,9898,9899,14,9904,9905,14,9917,9918,14,9924,9925,14,9928,9928,14,9934,9935,14,9937,9937,14,9939,9940,14,9961,9962,14,9968,9973,14,9975,9978,14,9981,9981,14,9986,9986,14,9989,9989,14,9998,9998,14,10000,10001,14,10004,10004,14,10013,10013,14,10024,10024,14,10052,10052,14,10060,10060,14,10067,10069,14,10083,10084,14,10133,10135,14,10160,10160,14,10548,10549,14,11035,11036,14,11093,11093,14,11647,11647,5,12330,12333,5,12336,12336,14,12441,12442,5,12953,12953,14,42608,42610,5,42654,42655,5,43010,43010,5,43019,43019,5,43045,43046,5,43052,43052,5,43188,43203,7,43232,43249,5,43302,43309,5,43346,43347,7,43392,43394,5,43443,43443,5,43446,43449,5,43452,43453,5,43493,43493,5,43567,43568,7,43571,43572,7,43587,43587,5,43597,43597,7,43696,43696,5,43703,43704,5,43713,43713,5,43756,43757,5,43765,43765,7,44003,44004,7,44006,44007,7,44009,44010,7,44013,44013,5,44033,44059,12,44061,44087,12,44089,44115,12,44117,44143,12,44145,44171,12,44173,44199,12,44201,44227,12,44229,44255,12,44257,44283,12,44285,44311,12,44313,44339,12,44341,44367,12,44369,44395,12,44397,44423,12,44425,44451,12,44453,44479,12,44481,44507,12,44509,44535,12,44537,44563,12,44565,44591,12,44593,44619,12,44621,44647,12,44649,44675,12,44677,44703,12,44705,44731,12,44733,44759,12,44761,44787,12,44789,44815,12,44817,44843,12,44845,44871,12,44873,44899,12,44901,44927,12,44929,44955,12,44957,44983,12,44985,45011,12,45013,45039,12,45041,45067,12,45069,45095,12,45097,45123,12,45125,45151,12,45153,45179,12,45181,45207,12,45209,45235,12,45237,45263,12,45265,45291,12,45293,45319,12,45321,45347,12,45349,45375,12,45377,45403,12,45405,45431,12,45433,45459,12,45461,45487,12,45489,45515,12,45517,45543,12,45545,45571,12,45573,45599,12,45601,45627,12,45629,45655,12,45657,45683,12,45685,45711,12,45713,45739,12,45741,45767,12,45769,45795,12,45797,45823,12,45825,45851,12,45853,45879,12,45881,45907,12,45909,45935,12,45937,45963,12,45965,45991,12,45993,46019,12,46021,46047,12,46049,46075,12,46077,46103,12,46105,46131,12,46133,46159,12,46161,46187,12,46189,46215,12,46217,46243,12,46245,46271,12,46273,46299,12,46301,46327,12,46329,46355,12,46357,46383,12,46385,46411,12,46413,46439,12,46441,46467,12,46469,46495,12,46497,46523,12,46525,46551,12,46553,46579,12,46581,46607,12,46609,46635,12,46637,46663,12,46665,46691,12,46693,46719,12,46721,46747,12,46749,46775,12,46777,46803,12,46805,46831,12,46833,46859,12,46861,46887,12,46889,46915,12,46917,46943,12,46945,46971,12,46973,46999,12,47001,47027,12,47029,47055,12,47057,47083,12,47085,47111,12,47113,47139,12,47141,47167,12,47169,47195,12,47197,47223,12,47225,47251,12,47253,47279,12,47281,47307,12,47309,47335,12,47337,47363,12,47365,47391,12,47393,47419,12,47421,47447,12,47449,47475,12,47477,47503,12,47505,47531,12,47533,47559,12,47561,47587,12,47589,47615,12,47617,47643,12,47645,47671,12,47673,47699,12,47701,47727,12,47729,47755,12,47757,47783,12,47785,47811,12,47813,47839,12,47841,47867,12,47869,47895,12,47897,47923,12,47925,47951,12,47953,47979,12,47981,48007,12,48009,48035,12,48037,48063,12,48065,48091,12,48093,48119,12,48121,48147,12,48149,48175,12,48177,48203,12,48205,48231,12,48233,48259,12,48261,48287,12,48289,48315,12,48317,48343,12,48345,48371,12,48373,48399,12,48401,48427,12,48429,48455,12,48457,48483,12,48485,48511,12,48513,48539,12,48541,48567,12,48569,48595,12,48597,48623,12,48625,48651,12,48653,48679,12,48681,48707,12,48709,48735,12,48737,48763,12,48765,48791,12,48793,48819,12,48821,48847,12,48849,48875,12,48877,48903,12,48905,48931,12,48933,48959,12,48961,48987,12,48989,49015,12,49017,49043,12,49045,49071,12,49073,49099,12,49101,49127,12,49129,49155,12,49157,49183,12,49185,49211,12,49213,49239,12,49241,49267,12,49269,49295,12,49297,49323,12,49325,49351,12,49353,49379,12,49381,49407,12,49409,49435,12,49437,49463,12,49465,49491,12,49493,49519,12,49521,49547,12,49549,49575,12,49577,49603,12,49605,49631,12,49633,49659,12,49661,49687,12,49689,49715,12,49717,49743,12,49745,49771,12,49773,49799,12,49801,49827,12,49829,49855,12,49857,49883,12,49885,49911,12,49913,49939,12,49941,49967,12,49969,49995,12,49997,50023,12,50025,50051,12,50053,50079,12,50081,50107,12,50109,50135,12,50137,50163,12,50165,50191,12,50193,50219,12,50221,50247,12,50249,50275,12,50277,50303,12,50305,50331,12,50333,50359,12,50361,50387,12,50389,50415,12,50417,50443,12,50445,50471,12,50473,50499,12,50501,50527,12,50529,50555,12,50557,50583,12,50585,50611,12,50613,50639,12,50641,50667,12,50669,50695,12,50697,50723,12,50725,50751,12,50753,50779,12,50781,50807,12,50809,50835,12,50837,50863,12,50865,50891,12,50893,50919,12,50921,50947,12,50949,50975,12,50977,51003,12,51005,51031,12,51033,51059,12,51061,51087,12,51089,51115,12,51117,51143,12,51145,51171,12,51173,51199,12,51201,51227,12,51229,51255,12,51257,51283,12,51285,51311,12,51313,51339,12,51341,51367,12,51369,51395,12,51397,51423,12,51425,51451,12,51453,51479,12,51481,51507,12,51509,51535,12,51537,51563,12,51565,51591,12,51593,51619,12,51621,51647,12,51649,51675,12,51677,51703,12,51705,51731,12,51733,51759,12,51761,51787,12,51789,51815,12,51817,51843,12,51845,51871,12,51873,51899,12,51901,51927,12,51929,51955,12,51957,51983,12,51985,52011,12,52013,52039,12,52041,52067,12,52069,52095,12,52097,52123,12,52125,52151,12,52153,52179,12,52181,52207,12,52209,52235,12,52237,52263,12,52265,52291,12,52293,52319,12,52321,52347,12,52349,52375,12,52377,52403,12,52405,52431,12,52433,52459,12,52461,52487,12,52489,52515,12,52517,52543,12,52545,52571,12,52573,52599,12,52601,52627,12,52629,52655,12,52657,52683,12,52685,52711,12,52713,52739,12,52741,52767,12,52769,52795,12,52797,52823,12,52825,52851,12,52853,52879,12,52881,52907,12,52909,52935,12,52937,52963,12,52965,52991,12,52993,53019,12,53021,53047,12,53049,53075,12,53077,53103,12,53105,53131,12,53133,53159,12,53161,53187,12,53189,53215,12,53217,53243,12,53245,53271,12,53273,53299,12,53301,53327,12,53329,53355,12,53357,53383,12,53385,53411,12,53413,53439,12,53441,53467,12,53469,53495,12,53497,53523,12,53525,53551,12,53553,53579,12,53581,53607,12,53609,53635,12,53637,53663,12,53665,53691,12,53693,53719,12,53721,53747,12,53749,53775,12,53777,53803,12,53805,53831,12,53833,53859,12,53861,53887,12,53889,53915,12,53917,53943,12,53945,53971,12,53973,53999,12,54001,54027,12,54029,54055,12,54057,54083,12,54085,54111,12,54113,54139,12,54141,54167,12,54169,54195,12,54197,54223,12,54225,54251,12,54253,54279,12,54281,54307,12,54309,54335,12,54337,54363,12,54365,54391,12,54393,54419,12,54421,54447,12,54449,54475,12,54477,54503,12,54505,54531,12,54533,54559,12,54561,54587,12,54589,54615,12,54617,54643,12,54645,54671,12,54673,54699,12,54701,54727,12,54729,54755,12,54757,54783,12,54785,54811,12,54813,54839,12,54841,54867,12,54869,54895,12,54897,54923,12,54925,54951,12,54953,54979,12,54981,55007,12,55009,55035,12,55037,55063,12,55065,55091,12,55093,55119,12,55121,55147,12,55149,55175,12,55177,55203,12,55243,55291,10,65024,65039,5,65279,65279,4,65520,65528,4,66045,66045,5,66422,66426,5,68101,68102,5,68152,68154,5,68325,68326,5,69291,69292,5,69632,69632,7,69634,69634,7,69759,69761,5]")}static getInstance(){return K._INSTANCE||(K._INSTANCE=new K),K._INSTANCE}getGraphemeBreakType(e){if(e<32)return 10===e?3:13===e?2:4;if(e<127)return 0;const t=this._data,n=t.length/3;let i=1;for(;i<=n;)if(et[3*i+1]))return t[3*i+2];i=2*i+1}return 0}}function q(e,t){return(t<<5)-t+e|0}function W(e,t){t=q(149417,t);for(let n=0,i=e.length;n>>i)>>>0}function Y(e,t=0,n=e.byteLength,i=0){for(let r=0;re.toString(16).padStart(2,"0"))).join(""):function(e,t,n="0"){for(;e.length>>0).toString(16),t/4)}K._INSTANCE=null;class ${constructor(){this._h0=1732584193,this._h1=4023233417,this._h2=2562383102,this._h3=271733878,this._h4=3285377520,this._buff=new Uint8Array(67),this._buffDV=new DataView(this._buff.buffer),this._buffLen=0,this._totalLen=0,this._leftoverHighSurrogate=0,this._finished=!1}update(e){const t=e.length;if(0===t)return;const n=this._buff;let i,r,s=this._buffLen,o=this._leftoverHighSurrogate;for(0!==o?(i=o,r=-1,o=0):(i=e.charCodeAt(0),r=0);;){let a=i;if(F(i)){if(!(r+1>>6,e[t++]=128|(63&n)>>>0):n<65536?(e[t++]=224|(61440&n)>>>12,e[t++]=128|(4032&n)>>>6,e[t++]=128|(63&n)>>>0):(e[t++]=240|(1835008&n)>>>18,e[t++]=128|(258048&n)>>>12,e[t++]=128|(4032&n)>>>6,e[t++]=128|(63&n)>>>0),t>=64&&(this._step(),t-=64,this._totalLen+=64,e[0]=e[64],e[1]=e[65],e[2]=e[66]),t}digest(){return this._finished||(this._finished=!0,this._leftoverHighSurrogate&&(this._leftoverHighSurrogate=0,this._buffLen=this._push(this._buff,this._buffLen,65533)),this._totalLen+=this._buffLen,this._wrapUp()),V(this._h0)+V(this._h1)+V(this._h2)+V(this._h3)+V(this._h4)}_wrapUp(){this._buff[this._buffLen++]=128,Y(this._buff,this._buffLen),this._buffLen>56&&(this._step(),Y(this._buff));const e=8*this._totalLen;this._buffDV.setUint32(56,Math.floor(e/4294967296),!1),this._buffDV.setUint32(60,e%4294967296,!1),this._step()}_step(){const e=$._bigBlock32,t=this._buffDV;for(let n=0;n<64;n+=4)e.setUint32(n,t.getUint32(n,!1),!1);for(let t=64;t<320;t+=4)e.setUint32(t,H(e.getUint32(t-12,!1)^e.getUint32(t-32,!1)^e.getUint32(t-56,!1)^e.getUint32(t-64,!1),1),!1);let n,i,r,s=this._h0,o=this._h1,a=this._h2,l=this._h3,u=this._h4;for(let t=0;t<80;t++)t<20?(n=o&a|~o&l,i=1518500249):t<40?(n=o^a^l,i=1859775393):t<60?(n=o&a|o&l|a&l,i=2400959708):(n=o^a^l,i=3395469782),r=H(s,5)+n+u+i+e.getUint32(4*t,!1)&4294967295,u=l,l=a,a=H(o,30),o=s,s=r;this._h0=this._h0+s&4294967295,this._h1=this._h1+o&4294967295,this._h2=this._h2+a&4294967295,this._h3=this._h3+l&4294967295,this._h4=this._h4+u&4294967295}}$._bigBlock32=new DataView(new ArrayBuffer(320));class j{constructor(e){this.source=e}getElements(){const e=this.source,t=new Int32Array(e.length);for(let n=0,i=e.length;n0||this.m_modifiedCount>0)&&this.m_changes.push(new D(this.m_originalStart,this.m_originalCount,this.m_modifiedStart,this.m_modifiedCount)),this.m_originalCount=0,this.m_modifiedCount=0,this.m_originalStart=1073741824,this.m_modifiedStart=1073741824}AddOriginalElement(e,t){this.m_originalStart=Math.min(this.m_originalStart,e),this.m_modifiedStart=Math.min(this.m_modifiedStart,t),this.m_originalCount++}AddModifiedElement(e,t){this.m_originalStart=Math.min(this.m_originalStart,e),this.m_modifiedStart=Math.min(this.m_modifiedStart,t),this.m_modifiedCount++}getChanges(){return(this.m_originalCount>0||this.m_modifiedCount>0)&&this.MarkNextChange(),this.m_changes}getReverseChanges(){return(this.m_originalCount>0||this.m_modifiedCount>0)&&this.MarkNextChange(),this.m_changes.reverse(),this.m_changes}}class Z{constructor(e,t,n=null){this.ContinueProcessingPredicate=n,this._originalSequence=e,this._modifiedSequence=t;const[i,r,s]=Z._getElements(e),[o,a,l]=Z._getElements(t);this._hasStrings=s&&l,this._originalStringElements=i,this._originalElementsOrHash=r,this._modifiedStringElements=o,this._modifiedElementsOrHash=a,this.m_forwardHistory=[],this.m_reverseHistory=[]}static _isStringArray(e){return e.length>0&&"string"==typeof e[0]}static _getElements(e){const t=e.getElements();if(Z._isStringArray(t)){const e=new Int32Array(t.length);for(let n=0,i=t.length;n=e&&i>=n&&this.ElementsAreEqual(t,i);)t--,i--;if(e>t||n>i){let r;return n<=i?(z.Assert(e===t+1,"originalStart should only be one more than originalEnd"),r=[new D(e,0,n,i-n+1)]):e<=t?(z.Assert(n===i+1,"modifiedStart should only be one more than modifiedEnd"),r=[new D(e,t-e+1,n,0)]):(z.Assert(e===t+1,"originalStart should only be one more than originalEnd"),z.Assert(n===i+1,"modifiedStart should only be one more than modifiedEnd"),r=[]),r}const s=[0],o=[0],a=this.ComputeRecursionPoint(e,t,n,i,s,o,r),l=s[0],u=o[0];if(null!==a)return a;if(!r[0]){const s=this.ComputeDiffRecursive(e,l,n,u,r);let o=[];return o=r[0]?[new D(l+1,t-(l+1)+1,u+1,i-(u+1)+1)]:this.ComputeDiffRecursive(l+1,t,u+1,i,r),this.ConcatenateChanges(s,o)}return[new D(e,t-e+1,n,i-n+1)]}WALKTRACE(e,t,n,i,r,s,o,a,l,u,h,d,c,f,m,g,_,p){let C=null,b=null,S=new X,L=t,E=n,N=c[0]-g[0]-i,y=-1073741824,A=this.m_forwardHistory.length-1;do{const t=N+e;t===L||t=0&&(e=(l=this.m_forwardHistory[A])[0],L=1,E=l.length-1)}while(--A>=-1);if(C=S.getReverseChanges(),p[0]){let e=c[0]+1,t=g[0]+1;if(null!==C&&C.length>0){const n=C[C.length-1];e=Math.max(e,n.getOriginalEnd()),t=Math.max(t,n.getModifiedEnd())}b=[new D(e,d-e+1,t,m-t+1)]}else{S=new X,L=s,E=o,N=c[0]-g[0]-a,y=1073741824,A=_?this.m_reverseHistory.length-1:this.m_reverseHistory.length-2;do{const e=N+r;e===L||e=u[e+1]?(f=(h=u[e+1]-1)-N-a,h>y&&S.MarkNextChange(),y=h+1,S.AddOriginalElement(h+1,f+1),N=e+1-r):(f=(h=u[e-1])-N-a,h>y&&S.MarkNextChange(),y=h,S.AddModifiedElement(h+1,f+1),N=e-1-r),A>=0&&(r=(u=this.m_reverseHistory[A])[0],L=1,E=u.length-1)}while(--A>=-1);b=S.getChanges()}return this.ConcatenateChanges(C,b)}ComputeRecursionPoint(e,t,n,i,r,s,o){let a=0,l=0,u=0,h=0,d=0,c=0;e--,n--,r[0]=0,s[0]=0,this.m_forwardHistory=[],this.m_reverseHistory=[];const f=t-e+(i-n),m=f+1,g=new Int32Array(m),_=new Int32Array(m),p=i-n,C=t-e,b=e-n,S=t-i,L=(C-p)%2==0;g[p]=e,_[C]=t,o[0]=!1;for(let E=1;E<=f/2+1;E++){let f=0,N=0;u=this.ClipDiagonalBound(p-E,E,p,m),h=this.ClipDiagonalBound(p+E,E,p,m);for(let e=u;e<=h;e+=2){a=e===u||ef+N&&(f=a,N=l),!L&&Math.abs(e-C)<=E-1&&a>=_[e])return r[0]=a,s[0]=l,n<=_[e]&&E<=1448?this.WALKTRACE(p,u,h,b,C,d,c,S,g,_,a,t,r,l,i,s,L,o):null}const y=(f-e+(N-n)-E)/2;if(null!==this.ContinueProcessingPredicate&&!this.ContinueProcessingPredicate(f,y))return o[0]=!0,r[0]=f,s[0]=N,y>0&&E<=1448?this.WALKTRACE(p,u,h,b,C,d,c,S,g,_,a,t,r,l,i,s,L,o):(e++,n++,[new D(e,t-e+1,n,i-n+1)]);d=this.ClipDiagonalBound(C-E,E,C,m),c=this.ClipDiagonalBound(C+E,E,C,m);for(let f=d;f<=c;f+=2){a=f===d||f=_[f+1]?_[f+1]-1:_[f-1],l=a-(f-C)-S;const m=a;for(;a>e&&l>n&&this.ElementsAreEqual(a,l);)a--,l--;if(_[f]=a,L&&Math.abs(f-p)<=E&&a<=g[f])return r[0]=a,s[0]=l,m>=g[f]&&E<=1448?this.WALKTRACE(p,u,h,b,C,d,c,S,g,_,a,t,r,l,i,s,L,o):null}if(E<=1447){let e=new Int32Array(h-u+2);e[0]=p-u+1,Q.Copy2(g,u,e,1,h-u+1),this.m_forwardHistory.push(e),e=new Int32Array(c-d+2),e[0]=C-d+1,Q.Copy2(_,d,e,1,c-d+1),this.m_reverseHistory.push(e)}}return this.WALKTRACE(p,u,h,b,C,d,c,S,g,_,a,t,r,l,i,s,L,o)}PrettifyChanges(e){for(let t=0;t0,o=n.modifiedLength>0;for(;n.originalStart+n.originalLength=0;t--){const n=e[t];let i=0,r=0;if(t>0){const n=e[t-1];i=n.originalStart+n.originalLength,r=n.modifiedStart+n.modifiedLength}const s=n.originalLength>0,o=n.modifiedLength>0;let a=0,l=this._boundaryScore(n.originalStart,n.originalLength,n.modifiedStart,n.modifiedLength);for(let e=1;;e++){const t=n.originalStart-e,u=n.modifiedStart-e;if(tl&&(l=h,a=e)}n.originalStart-=a,n.modifiedStart-=a;const u=[null];t>0&&this.ChangesOverlap(e[t-1],e[t],u)&&(e[t-1]=u[0],e.splice(t,1),t++)}if(this._hasStrings)for(let t=1,n=e.length;t0&&n>a&&(a=n,l=t,u=e)}return a>0?[l,u]:null}_contiguousSequenceScore(e,t,n){let i=0;for(let r=0;r=this._originalElementsOrHash.length-1||this._hasStrings&&/^\s*$/.test(this._originalStringElements[e])}_OriginalRegionIsBoundary(e,t){if(this._OriginalIsBoundary(e)||this._OriginalIsBoundary(e-1))return!0;if(t>0){const n=e+t;if(this._OriginalIsBoundary(n-1)||this._OriginalIsBoundary(n))return!0}return!1}_ModifiedIsBoundary(e){return e<=0||e>=this._modifiedElementsOrHash.length-1||this._hasStrings&&/^\s*$/.test(this._modifiedStringElements[e])}_ModifiedRegionIsBoundary(e,t){if(this._ModifiedIsBoundary(e)||this._ModifiedIsBoundary(e-1))return!0;if(t>0){const n=e+t;if(this._ModifiedIsBoundary(n-1)||this._ModifiedIsBoundary(n))return!0}return!1}_boundaryScore(e,t,n,i){return(this._OriginalRegionIsBoundary(e,t)?1:0)+(this._ModifiedRegionIsBoundary(n,i)?1:0)}ConcatenateChanges(e,t){let n=[];if(0===e.length||0===t.length)return t.length>0?t:e;if(this.ChangesOverlap(e[e.length-1],t[0],n)){const i=new Array(e.length+t.length-1);return Q.Copy(e,0,i,0,e.length-1),i[e.length-1]=n[0],Q.Copy(t,1,i,e.length,t.length-1),i}{const n=new Array(e.length+t.length);return Q.Copy(e,0,n,0,e.length),Q.Copy(t,0,n,e.length,t.length),n}}ChangesOverlap(e,t,n){if(z.Assert(e.originalStart<=t.originalStart,"Left change is not less than or equal to right change"),z.Assert(e.modifiedStart<=t.modifiedStart,"Left change is not less than or equal to right change"),e.originalStart+e.originalLength>=t.originalStart||e.modifiedStart+e.modifiedLength>=t.modifiedStart){const i=e.originalStart;let r=e.originalLength;const s=e.modifiedStart;let o=e.modifiedLength;return e.originalStart+e.originalLength>=t.originalStart&&(r=t.originalStart+t.originalLength-e.originalStart),e.modifiedStart+e.modifiedLength>=t.modifiedStart&&(o=t.modifiedStart+t.modifiedLength-e.modifiedStart),n[0]=new D(i,r,s,o),!0}return n[0]=null,!1}ClipDiagonalBound(e,t,n,i){if(e>=0&&ee.cwd(),nextTick:e=>M(e)}}else J="undefined"!=typeof process?{get platform(){return process.platform},get env(){return process.env},cwd:()=>process.env.VSCODE_CWD||process.cwd(),nextTick:e=>process.nextTick(e)}:{get platform(){return x?"win32":I?"darwin":"linux"},nextTick:e=>M(e),get env(){return{}},cwd:()=>"/"};const ee=J.cwd,te=J.env,ne=J.platform,ie=46,re=47,se=92,oe=58;class ae extends Error{constructor(e,t,n){let i;"string"==typeof t&&0===t.indexOf("not ")?(i="must not be",t=t.replace(/^not /,"")):i="must be";const r=-1!==e.indexOf(".")?"property":"argument";let s=`The "${e}" ${r} ${i} of type ${t}`;s+=". Received type "+typeof n,super(s),this.code="ERR_INVALID_ARG_TYPE"}}function le(e,t){if("string"!=typeof e)throw new ae(t,"string",e)}function ue(e){return e===re||e===se}function he(e){return e===re}function de(e){return e>=65&&e<=90||e>=97&&e<=122}function ce(e,t,n,i){let r="",s=0,o=-1,a=0,l=0;for(let u=0;u<=e.length;++u){if(u2){const e=r.lastIndexOf(n);-1===e?(r="",s=0):(r=r.slice(0,e),s=r.length-1-r.lastIndexOf(n)),o=u,a=0;continue}if(0!==r.length){r="",s=0,o=u,a=0;continue}}t&&(r+=r.length>0?`${n}..`:"..",s=2)}else r.length>0?r+=`${n}${e.slice(o+1,u)}`:r=e.slice(o+1,u),s=u-o-1;o=u,a=0}else l===ie&&-1!==a?++a:a=-1}return r}function fe(e,t){if(null===t||"object"!=typeof t)throw new ae("pathObject","Object",t);const n=t.dir||t.root,i=t.base||`${t.name||""}${t.ext||""}`;return n?n===t.root?`${n}${i}`:`${n}${e}${i}`:i}const me={resolve(...e){let t="",n="",i=!1;for(let r=e.length-1;r>=-1;r--){let s;if(r>=0){if(s=e[r],le(s,"path"),0===s.length)continue}else 0===t.length?s=ee():(s=te[`=${t}`]||ee(),(void 0===s||s.slice(0,2).toLowerCase()!==t.toLowerCase()&&s.charCodeAt(2)===se)&&(s=`${t}\\`));const o=s.length;let a=0,l="",u=!1;const h=s.charCodeAt(0);if(1===o)ue(h)&&(a=1,u=!0);else if(ue(h))if(u=!0,ue(s.charCodeAt(1))){let e=2,t=e;for(;e2&&ue(s.charCodeAt(2))&&(u=!0,a=3));if(l.length>0)if(t.length>0){if(l.toLowerCase()!==t.toLowerCase())continue}else t=l;if(i){if(t.length>0)break}else if(n=`${s.slice(a)}\\${n}`,i=u,u&&t.length>0)break}return n=ce(n,!i,"\\",ue),i?`${t}\\${n}`:`${t}${n}`||"."},normalize(e){le(e,"path");const t=e.length;if(0===t)return".";let n,i=0,r=!1;const s=e.charCodeAt(0);if(1===t)return he(s)?"\\":e;if(ue(s))if(r=!0,ue(e.charCodeAt(1))){let r=2,s=r;for(;r2&&ue(e.charCodeAt(2))&&(r=!0,i=3));let o=i0&&ue(e.charCodeAt(t-1))&&(o+="\\"),void 0===n?r?`\\${o}`:o:r?`${n}\\${o}`:`${n}${o}`},isAbsolute(e){le(e,"path");const t=e.length;if(0===t)return!1;const n=e.charCodeAt(0);return ue(n)||t>2&&de(n)&&e.charCodeAt(1)===oe&&ue(e.charCodeAt(2))},join(...e){if(0===e.length)return".";let t,n;for(let i=0;i0&&(void 0===t?t=n=r:t+=`\\${r}`)}if(void 0===t)return".";let i=!0,r=0;if("string"==typeof n&&ue(n.charCodeAt(0))){++r;const e=n.length;e>1&&ue(n.charCodeAt(1))&&(++r,e>2&&(ue(n.charCodeAt(2))?++r:i=!1))}if(i){for(;r=2&&(t=`\\${t.slice(r)}`)}return me.normalize(t)},relative(e,t){if(le(e,"from"),le(t,"to"),e===t)return"";const n=me.resolve(e),i=me.resolve(t);if(n===i)return"";if((e=n.toLowerCase())===(t=i.toLowerCase()))return"";let r=0;for(;rr&&e.charCodeAt(s-1)===se;)s--;const o=s-r;let a=0;for(;aa&&t.charCodeAt(l-1)===se;)l--;const u=l-a,h=oh){if(t.charCodeAt(a+c)===se)return i.slice(a+c+1);if(2===c)return i.slice(a+c)}o>h&&(e.charCodeAt(r+c)===se?d=c:2===c&&(d=3)),-1===d&&(d=0)}let f="";for(c=r+d+1;c<=s;++c)c!==s&&e.charCodeAt(c)!==se||(f+=0===f.length?"..":"\\..");return a+=d,f.length>0?`${f}${i.slice(a,l)}`:(i.charCodeAt(a)===se&&++a,i.slice(a,l))},toNamespacedPath(e){if("string"!=typeof e)return e;if(0===e.length)return"";const t=me.resolve(e);if(t.length<=2)return e;if(t.charCodeAt(0)===se){if(t.charCodeAt(1)===se){const e=t.charCodeAt(2);if(63!==e&&e!==ie)return`\\\\?\\UNC\\${t.slice(2)}`}}else if(de(t.charCodeAt(0))&&t.charCodeAt(1)===oe&&t.charCodeAt(2)===se)return`\\\\?\\${t}`;return e},dirname(e){le(e,"path");const t=e.length;if(0===t)return".";let n=-1,i=0;const r=e.charCodeAt(0);if(1===t)return ue(r)?e:".";if(ue(r)){if(n=i=1,ue(e.charCodeAt(1))){let r=2,s=r;for(;r2&&ue(e.charCodeAt(2))?3:2,i=n);let s=-1,o=!0;for(let n=t-1;n>=i;--n)if(ue(e.charCodeAt(n))){if(!o){s=n;break}}else o=!1;if(-1===s){if(-1===n)return".";s=n}return e.slice(0,s)},basename(e,t){void 0!==t&&le(t,"ext"),le(e,"path");let n,i=0,r=-1,s=!0;if(e.length>=2&&de(e.charCodeAt(0))&&e.charCodeAt(1)===oe&&(i=2),void 0!==t&&t.length>0&&t.length<=e.length){if(t===e)return"";let o=t.length-1,a=-1;for(n=e.length-1;n>=i;--n){const l=e.charCodeAt(n);if(ue(l)){if(!s){i=n+1;break}}else-1===a&&(s=!1,a=n+1),o>=0&&(l===t.charCodeAt(o)?-1==--o&&(r=n):(o=-1,r=a))}return i===r?r=a:-1===r&&(r=e.length),e.slice(i,r)}for(n=e.length-1;n>=i;--n)if(ue(e.charCodeAt(n))){if(!s){i=n+1;break}}else-1===r&&(s=!1,r=n+1);return-1===r?"":e.slice(i,r)},extname(e){le(e,"path");let t=0,n=-1,i=0,r=-1,s=!0,o=0;e.length>=2&&e.charCodeAt(1)===oe&&de(e.charCodeAt(0))&&(t=i=2);for(let a=e.length-1;a>=t;--a){const t=e.charCodeAt(a);if(ue(t)){if(!s){i=a+1;break}}else-1===r&&(s=!1,r=a+1),t===ie?-1===n?n=a:1!==o&&(o=1):-1!==n&&(o=-1)}return-1===n||-1===r||0===o||1===o&&n===r-1&&n===i+1?"":e.slice(n,r)},format:fe.bind(null,"\\"),parse(e){le(e,"path");const t={root:"",dir:"",base:"",ext:"",name:""};if(0===e.length)return t;const n=e.length;let i=0,r=e.charCodeAt(0);if(1===n)return ue(r)?(t.root=t.dir=e,t):(t.base=t.name=e,t);if(ue(r)){if(i=1,ue(e.charCodeAt(1))){let t=2,r=t;for(;t0&&(t.root=e.slice(0,i));let s=-1,o=i,a=-1,l=!0,u=e.length-1,h=0;for(;u>=i;--u)if(r=e.charCodeAt(u),ue(r)){if(!l){o=u+1;break}}else-1===a&&(l=!1,a=u+1),r===ie?-1===s?s=u:1!==h&&(h=1):-1!==s&&(h=-1);return-1!==a&&(-1===s||0===h||1===h&&s===a-1&&s===o+1?t.base=t.name=e.slice(o,a):(t.name=e.slice(o,s),t.base=e.slice(o,a),t.ext=e.slice(s,a))),t.dir=o>0&&o!==i?e.slice(0,o-1):t.root,t},sep:"\\",delimiter:";",win32:null,posix:null},ge={resolve(...e){let t="",n=!1;for(let i=e.length-1;i>=-1&&!n;i--){const r=i>=0?e[i]:ee();le(r,"path"),0!==r.length&&(t=`${r}/${t}`,n=r.charCodeAt(0)===re)}return t=ce(t,!n,"/",he),n?`/${t}`:t.length>0?t:"."},normalize(e){if(le(e,"path"),0===e.length)return".";const t=e.charCodeAt(0)===re,n=e.charCodeAt(e.length-1)===re;return 0===(e=ce(e,!t,"/",he)).length?t?"/":n?"./":".":(n&&(e+="/"),t?`/${e}`:e)},isAbsolute:e=>(le(e,"path"),e.length>0&&e.charCodeAt(0)===re),join(...e){if(0===e.length)return".";let t;for(let n=0;n0&&(void 0===t?t=i:t+=`/${i}`)}return void 0===t?".":ge.normalize(t)},relative(e,t){if(le(e,"from"),le(t,"to"),e===t)return"";if((e=ge.resolve(e))===(t=ge.resolve(t)))return"";const n=e.length,i=n-1,r=t.length-1,s=is){if(t.charCodeAt(1+a)===re)return t.slice(1+a+1);if(0===a)return t.slice(1+a)}else i>s&&(e.charCodeAt(1+a)===re?o=a:0===a&&(o=0));let l="";for(a=1+o+1;a<=n;++a)a!==n&&e.charCodeAt(a)!==re||(l+=0===l.length?"..":"/..");return`${l}${t.slice(1+o)}`},toNamespacedPath:e=>e,dirname(e){if(le(e,"path"),0===e.length)return".";const t=e.charCodeAt(0)===re;let n=-1,i=!0;for(let t=e.length-1;t>=1;--t)if(e.charCodeAt(t)===re){if(!i){n=t;break}}else i=!1;return-1===n?t?"/":".":t&&1===n?"//":e.slice(0,n)},basename(e,t){void 0!==t&&le(t,"ext"),le(e,"path");let n,i=0,r=-1,s=!0;if(void 0!==t&&t.length>0&&t.length<=e.length){if(t===e)return"";let o=t.length-1,a=-1;for(n=e.length-1;n>=0;--n){const l=e.charCodeAt(n);if(l===re){if(!s){i=n+1;break}}else-1===a&&(s=!1,a=n+1),o>=0&&(l===t.charCodeAt(o)?-1==--o&&(r=n):(o=-1,r=a))}return i===r?r=a:-1===r&&(r=e.length),e.slice(i,r)}for(n=e.length-1;n>=0;--n)if(e.charCodeAt(n)===re){if(!s){i=n+1;break}}else-1===r&&(s=!1,r=n+1);return-1===r?"":e.slice(i,r)},extname(e){le(e,"path");let t=-1,n=0,i=-1,r=!0,s=0;for(let o=e.length-1;o>=0;--o){const a=e.charCodeAt(o);if(a!==re)-1===i&&(r=!1,i=o+1),a===ie?-1===t?t=o:1!==s&&(s=1):-1!==t&&(s=-1);else if(!r){n=o+1;break}}return-1===t||-1===i||0===s||1===s&&t===i-1&&t===n+1?"":e.slice(t,i)},format:fe.bind(null,"/"),parse(e){le(e,"path");const t={root:"",dir:"",base:"",ext:"",name:""};if(0===e.length)return t;const n=e.charCodeAt(0)===re;let i;n?(t.root="/",i=1):i=0;let r=-1,s=0,o=-1,a=!0,l=e.length-1,u=0;for(;l>=i;--l){const t=e.charCodeAt(l);if(t!==re)-1===o&&(a=!1,o=l+1),t===ie?-1===r?r=l:1!==u&&(u=1):-1!==r&&(u=-1);else if(!a){s=l+1;break}}if(-1!==o){const i=0===s&&n?1:s;-1===r||0===u||1===u&&r===o-1&&r===s+1?t.base=t.name=e.slice(i,o):(t.name=e.slice(i,r),t.base=e.slice(i,o),t.ext=e.slice(r,o))}return s>0?t.dir=e.slice(0,s-1):n&&(t.dir="/"),t},sep:"/",delimiter:":",win32:null,posix:null};ge.win32=me.win32=me,ge.posix=me.posix=ge,"win32"===ne?me.normalize:ge.normalize,"win32"===ne?me.resolve:ge.resolve,"win32"===ne?me.relative:ge.relative,"win32"===ne?me.dirname:ge.dirname,"win32"===ne?me.basename:ge.basename,"win32"===ne?me.extname:ge.extname,"win32"===ne?me.sep:ge.sep;const _e=/^\w[\w\d+.-]*$/,pe=/^\//,Ce=/^\/\//;function be(e,t){if(!e.scheme&&t)throw new Error(`[UriError]: Scheme is missing: {scheme: "", authority: "${e.authority}", path: "${e.path}", query: "${e.query}", fragment: "${e.fragment}"}`);if(e.scheme&&!_e.test(e.scheme))throw new Error("[UriError]: Scheme contains illegal characters.");if(e.path)if(e.authority){if(!pe.test(e.path))throw new Error('[UriError]: If a URI contains an authority component, then the path component must either be empty or begin with a slash ("/") character')}else if(Ce.test(e.path))throw new Error('[UriError]: If a URI does not contain an authority component, then the path cannot begin with two slash characters ("//")')}const Se="",Le="/",Ee=/^(([^:/?#]+?):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?/;class Ne{constructor(e,t,n,i,r,s=!1){"object"==typeof e?(this.scheme=e.scheme||Se,this.authority=e.authority||Se,this.path=e.path||Se,this.query=e.query||Se,this.fragment=e.fragment||Se):(this.scheme=function(e,t){return e||t?e:"file"}(e,s),this.authority=t||Se,this.path=function(e,t){switch(e){case"https":case"http":case"file":t?t[0]!==Le&&(t=Le+t):t=Le}return t}(this.scheme,n||Se),this.query=i||Se,this.fragment=r||Se,be(this,s))}static isUri(e){return e instanceof Ne||!!e&&"string"==typeof e.authority&&"string"==typeof e.fragment&&"string"==typeof e.path&&"string"==typeof e.query&&"string"==typeof e.scheme&&"string"==typeof e.fsPath&&"function"==typeof e.with&&"function"==typeof e.toString}get fsPath(){return Te(this,!1)}with(e){if(!e)return this;let{scheme:t,authority:n,path:i,query:r,fragment:s}=e;return void 0===t?t=this.scheme:null===t&&(t=Se),void 0===n?n=this.authority:null===n&&(n=Se),void 0===i?i=this.path:null===i&&(i=Se),void 0===r?r=this.query:null===r&&(r=Se),void 0===s?s=this.fragment:null===s&&(s=Se),t===this.scheme&&n===this.authority&&i===this.path&&r===this.query&&s===this.fragment?this:new Ae(t,n,i,r,s)}static parse(e,t=!1){const n=Ee.exec(e);return n?new Ae(n[2]||Se,Pe(n[4]||Se),Pe(n[5]||Se),Pe(n[7]||Se),Pe(n[9]||Se),t):new Ae(Se,Se,Se,Se,Se)}static file(e){let t=Se;if(x&&(e=e.replace(/\\/g,Le)),e[0]===Le&&e[1]===Le){const n=e.indexOf(Le,2);-1===n?(t=e.substring(2),e=Le):(t=e.substring(2,n),e=e.substring(n)||Le)}return new Ae("file",t,e,Se,Se)}static from(e){const t=new Ae(e.scheme,e.authority,e.path,e.query,e.fragment);return be(t,!0),t}static joinPath(e,...t){if(!e.path)throw new Error("[UriError]: cannot call joinPath on URI without path");let n;return n=x&&"file"===e.scheme?Ne.file(me.join(Te(e,!0),...t)).path:ge.join(e.path,...t),e.with({path:n})}toString(e=!1){return xe(this,e)}toJSON(){return this}static revive(e){if(e){if(e instanceof Ne)return e;{const t=new Ae(e);return t._formatted=e.external,t._fsPath=e._sep===ye?e.fsPath:null,t}}return e}}const ye=x?1:void 0;class Ae extends Ne{constructor(){super(...arguments),this._formatted=null,this._fsPath=null}get fsPath(){return this._fsPath||(this._fsPath=Te(this,!1)),this._fsPath}toString(e=!1){return e?xe(this,!0):(this._formatted||(this._formatted=xe(this,!1)),this._formatted)}toJSON(){const e={$mid:1};return this._fsPath&&(e.fsPath=this._fsPath,e._sep=ye),this._formatted&&(e.external=this._formatted),this.path&&(e.path=this.path),this.scheme&&(e.scheme=this.scheme),this.authority&&(e.authority=this.authority),this.query&&(e.query=this.query),this.fragment&&(e.fragment=this.fragment),e}}const ve={58:"%3A",47:"%2F",63:"%3F",35:"%23",91:"%5B",93:"%5D",64:"%40",33:"%21",36:"%24",38:"%26",39:"%27",40:"%28",41:"%29",42:"%2A",43:"%2B",44:"%2C",59:"%3B",61:"%3D",32:"%20"};function we(e,t){let n,i=-1;for(let r=0;r=97&&s<=122||s>=65&&s<=90||s>=48&&s<=57||45===s||46===s||95===s||126===s||t&&47===s)-1!==i&&(n+=encodeURIComponent(e.substring(i,r)),i=-1),void 0!==n&&(n+=e.charAt(r));else{void 0===n&&(n=e.substr(0,r));const t=ve[s];void 0!==t?(-1!==i&&(n+=encodeURIComponent(e.substring(i,r)),i=-1),n+=t):-1===i&&(i=r)}}return-1!==i&&(n+=encodeURIComponent(e.substring(i))),void 0!==n?n:e}function Oe(e){let t;for(let n=0;n1&&"file"===e.scheme?`//${e.authority}${e.path}`:47===e.path.charCodeAt(0)&&(e.path.charCodeAt(1)>=65&&e.path.charCodeAt(1)<=90||e.path.charCodeAt(1)>=97&&e.path.charCodeAt(1)<=122)&&58===e.path.charCodeAt(2)?t?e.path.substr(1):e.path[1].toLowerCase()+e.path.substr(2):e.path,x&&(n=n.replace(/\//g,"\\")),n}function xe(e,t){const n=t?Oe:we;let i="",{scheme:r,authority:s,path:o,query:a,fragment:l}=e;if(r&&(i+=r,i+=":"),(s||"file"===r)&&(i+=Le,i+=Le),s){let e=s.indexOf("@");if(-1!==e){const t=s.substr(0,e);s=s.substr(e+1),e=t.indexOf(":"),-1===e?i+=n(t,!1):(i+=n(t.substr(0,e),!1),i+=":",i+=n(t.substr(e+1),!1)),i+="@"}s=s.toLowerCase(),e=s.indexOf(":"),-1===e?i+=n(s,!1):(i+=n(s.substr(0,e),!1),i+=s.substr(e))}if(o){if(o.length>=3&&47===o.charCodeAt(0)&&58===o.charCodeAt(2)){const e=o.charCodeAt(1);e>=65&&e<=90&&(o=`/${String.fromCharCode(e+32)}:${o.substr(3)}`)}else if(o.length>=2&&58===o.charCodeAt(1)){const e=o.charCodeAt(0);e>=65&&e<=90&&(o=`${String.fromCharCode(e+32)}:${o.substr(2)}`)}i+=n(o,!0)}return a&&(i+="?",i+=n(a,!1)),l&&(i+="#",i+=t?l:we(l,!1)),i}function Ie(e){try{return decodeURIComponent(e)}catch(t){return e.length>3?e.substr(0,3)+Ie(e.substr(3)):e}}const Me=/(%[0-9A-Za-z][0-9A-Za-z])+/g;function Pe(e){return e.match(Me)?e.replace(Me,(e=>Ie(e))):e}class Re{constructor(e,t){this.lineNumber=e,this.column=t}with(e=this.lineNumber,t=this.column){return e===this.lineNumber&&t===this.column?this:new Re(e,t)}delta(e=0,t=0){return this.with(this.lineNumber+e,this.column+t)}equals(e){return Re.equals(this,e)}static equals(e,t){return!e&&!t||!!e&&!!t&&e.lineNumber===t.lineNumber&&e.column===t.column}isBefore(e){return Re.isBefore(this,e)}static isBefore(e,t){return e.lineNumbern||e===n&&t>i?(this.startLineNumber=n,this.startColumn=i,this.endLineNumber=e,this.endColumn=t):(this.startLineNumber=e,this.startColumn=t,this.endLineNumber=n,this.endColumn=i)}isEmpty(){return Ue.isEmpty(this)}static isEmpty(e){return e.startLineNumber===e.endLineNumber&&e.startColumn===e.endColumn}containsPosition(e){return Ue.containsPosition(this,e)}static containsPosition(e,t){return!(t.lineNumbere.endLineNumber||t.lineNumber===e.startLineNumber&&t.columne.endColumn)}containsRange(e){return Ue.containsRange(this,e)}static containsRange(e,t){return!(t.startLineNumbere.endLineNumber||t.endLineNumber>e.endLineNumber||t.startLineNumber===e.startLineNumber&&t.startColumne.endColumn)}strictContainsRange(e){return Ue.strictContainsRange(this,e)}static strictContainsRange(e,t){return!(t.startLineNumbere.endLineNumber||t.endLineNumber>e.endLineNumber||t.startLineNumber===e.startLineNumber&&t.startColumn<=e.startColumn||t.endLineNumber===e.endLineNumber&&t.endColumn>=e.endColumn)}plusRange(e){return Ue.plusRange(this,e)}static plusRange(e,t){let n,i,r,s;return t.startLineNumbere.endLineNumber?(r=t.endLineNumber,s=t.endColumn):t.endLineNumber===e.endLineNumber?(r=t.endLineNumber,s=Math.max(t.endColumn,e.endColumn)):(r=e.endLineNumber,s=e.endColumn),new Ue(n,i,r,s)}intersectRanges(e){return Ue.intersectRanges(this,e)}static intersectRanges(e,t){let n=e.startLineNumber,i=e.startColumn,r=e.endLineNumber,s=e.endColumn,o=t.startLineNumber,a=t.startColumn,l=t.endLineNumber,u=t.endColumn;return nl?(r=l,s=u):r===l&&(s=Math.min(s,u)),n>r||n===r&&i>s?null:new Ue(n,i,r,s)}equalsRange(e){return Ue.equalsRange(this,e)}static equalsRange(e,t){return!!e&&!!t&&e.startLineNumber===t.startLineNumber&&e.startColumn===t.startColumn&&e.endLineNumber===t.endLineNumber&&e.endColumn===t.endColumn}getEndPosition(){return Ue.getEndPosition(this)}static getEndPosition(e){return new Re(e.endLineNumber,e.endColumn)}getStartPosition(){return Ue.getStartPosition(this)}static getStartPosition(e){return new Re(e.startLineNumber,e.startColumn)}toString(){return"["+this.startLineNumber+","+this.startColumn+" -> "+this.endLineNumber+","+this.endColumn+"]"}setEndPosition(e,t){return new Ue(this.startLineNumber,this.startColumn,e,t)}setStartPosition(e,t){return new Ue(e,t,this.endLineNumber,this.endColumn)}collapseToStart(){return Ue.collapseToStart(this)}static collapseToStart(e){return new Ue(e.startLineNumber,e.startColumn,e.startLineNumber,e.startColumn)}static fromPositions(e,t=e){return new Ue(e.lineNumber,e.column,t.lineNumber,t.column)}static lift(e){return e?new Ue(e.startLineNumber,e.startColumn,e.endLineNumber,e.endColumn):null}static isIRange(e){return e&&"number"==typeof e.startLineNumber&&"number"==typeof e.startColumn&&"number"==typeof e.endLineNumber&&"number"==typeof e.endColumn}static areIntersectingOrTouching(e,t){return!(e.endLineNumbere.startLineNumber}}function ke(e,t,n,i){return new Z(e,t,n).ComputeDiff(i)}class De{constructor(e){const t=[],n=[];for(let i=0,r=e.length;i0&&t.originalLength<20&&t.modifiedLength>0&&t.modifiedLength<20&&r()){const s=n.createCharSequence(e,t.originalStart,t.originalStart+t.originalLength-1),a=i.createCharSequence(e,t.modifiedStart,t.modifiedStart+t.modifiedLength-1);let l=ke(s,a,r,!0).changes;o&&(l=function(e){if(e.length<=1)return e;const t=[e[0]];let n=t[0];for(let i=1,r=e.length;i1&&o>1&&e.charCodeAt(n-2)===t.charCodeAt(o-2);)n--,o--;(n>1||o>1)&&this._pushTrimWhitespaceCharChange(i,r+1,1,n,s+1,1,o)}{let n=He(e,1),o=He(t,1);const a=e.length+1,l=t.length+1;for(;n=0;n--){const t=e.charCodeAt(n);if(32!==t&&9!==t)return n}return-1}(e);return-1===n?t:n+2}function Ye(e){if(0===e)return()=>!0;const t=Date.now();return()=>Date.now()-t255?255:0|e}function $e(e){return e<0?0:e>4294967295?4294967295:0|e}class je{constructor(e,t){this._prefixSumIndexOfResultBrand=void 0,this.index=e,this.remainder=t}}class Ge{constructor(e){this.values=e,this.prefixSum=new Uint32Array(e.length),this.prefixSumValidIndex=new Int32Array(1),this.prefixSumValidIndex[0]=-1}insertValues(e,t){e=$e(e);const n=this.values,i=this.prefixSum,r=t.length;return 0!==r&&(this.values=new Uint32Array(n.length+r),this.values.set(n.subarray(0,e),0),this.values.set(n.subarray(e),e+r),this.values.set(t,e),e-1=0&&this.prefixSum.set(i.subarray(0,this.prefixSumValidIndex[0]+1)),!0)}changeValue(e,t){return e=$e(e),t=$e(t),this.values[e]!==t&&(this.values[e]=t,e-1=n.length)return!1;let r=n.length-e;return t>=r&&(t=r),0!==t&&(this.values=new Uint32Array(n.length-t),this.values.set(n.subarray(0,e),0),this.values.set(n.subarray(e+t),e),this.prefixSum=new Uint32Array(this.values.length),e-1=0&&this.prefixSum.set(i.subarray(0,this.prefixSumValidIndex[0]+1)),!0)}getTotalSum(){return 0===this.values.length?0:this._getPrefixSum(this.values.length-1)}getPrefixSum(e){return e<0?0:(e=$e(e),this._getPrefixSum(e))}_getPrefixSum(e){if(e<=this.prefixSumValidIndex[0])return this.prefixSum[e];let t=this.prefixSumValidIndex[0]+1;0===t&&(this.prefixSum[0]=this.values[0],t++),e>=this.values.length&&(e=this.values.length-1);for(let n=t;n<=e;n++)this.prefixSum[n]=this.prefixSum[n-1]+this.values[n];return this.prefixSumValidIndex[0]=Math.max(this.prefixSumValidIndex[0],e),this.prefixSum[e]}getIndexOf(e){e=Math.floor(e),this.getTotalSum();let t=0,n=this.values.length-1,i=0,r=0,s=0;for(;t<=n;)if(i=t+(n-t)/2|0,r=this.prefixSum[i],s=r-this.values[i],e=r))break;t=i+1}return new je(i,e-s)}}const ze=function(e=""){let t="(-?\\d*\\.\\d\\w*)|([^";for(const n of"`~!@#$%^&*()-=+[{]}\\|;:'\",.<>/?")e.indexOf(n)>=0||(t+="\\"+n);return t+="\\s]+)",new RegExp(t,"g")}(),Qe={maxLen:1e3,windowSize:15,timeBudget:150};function Xe(e,t,n,i,r=Qe){if(n.length>r.maxLen){let s=e-r.maxLen/2;return s<0?s=0:i+=s,Xe(e,t,n=n.substring(s,e+r.maxLen/2),i,r)}const s=Date.now(),o=e-1-i;let a=-1,l=null;for(let e=1;!(Date.now()-s>=r.timeBudget);e++){const i=o-r.windowSize*e;t.lastIndex=Math.max(0,i);const s=Ze(t,n,o,a);if(!s&&l)break;if(l=s,i<=0)break;a=i}if(l){let e={word:l[0],startColumn:i+1+l.index,endColumn:i+1+l.index+l[0].length};return t.lastIndex=0,e}return null}function Ze(e,t,n,i){let r;for(;r=e.exec(t);){const t=r.index||0;if(t<=n&&e.lastIndex>=n)return r;if(i>0&&t>i)return null}return null}class Je{constructor(e){let t=Ve(e);this._defaultValue=t,this._asciiMap=Je._createAsciiMap(t),this._map=new Map}static _createAsciiMap(e){let t=new Uint8Array(256);for(let n=0;n<256;n++)t[n]=e;return t}set(e,t){let n=Ve(t);e>=0&&e<256?this._asciiMap[e]=n:this._map.set(e,n)}get(e){return e>=0&&e<256?this._asciiMap[e]:this._map.get(e)||this._defaultValue}}class et{constructor(e,t,n){const i=new Uint8Array(e*t);for(let r=0,s=e*t;rt&&(t=s),r>n&&(n=r),o>n&&(n=o)}t++,n++;let i=new et(n,t,0);for(let t=0,n=e.length;t=this._maxCharCode?0:this._states.get(e,t)}}let nt=null,it=null;class rt{static _createLink(e,t,n,i,r){let s=r-1;do{const n=t.charCodeAt(s);if(2!==e.get(n))break;s--}while(s>i);if(i>0){const e=t.charCodeAt(i-1),n=t.charCodeAt(s);(40===e&&41===n||91===e&&93===n||123===e&&125===n)&&s--}return{range:{startLineNumber:n,startColumn:i+1,endLineNumber:n,endColumn:s+2},url:t.substring(i,s+1)}}static computeLinks(e,t=function(){return null===nt&&(nt=new tt([[1,104,2],[1,72,2],[1,102,6],[1,70,6],[2,116,3],[2,84,3],[3,116,4],[3,84,4],[4,112,5],[4,80,5],[5,115,9],[5,83,9],[5,58,10],[6,105,7],[6,73,7],[7,108,8],[7,76,8],[8,101,9],[8,69,9],[9,58,10],[10,47,11],[11,47,12]])),nt}()){const n=function(){if(null===it){it=new Je(0);const e=" \t<>'\"、。。、,.:;‘〈「『〔([{「」}])〕』」〉’`~…";for(let t=0;t=0?(i+=n?1:-1,i<0?i=e.length-1:i%=e.length,e[i]):null}}st.INSTANCE=new st;class ot{constructor(e){this.element=e,this.next=ot.Undefined,this.prev=ot.Undefined}}ot.Undefined=new ot(void 0);class at{constructor(){this._first=ot.Undefined,this._last=ot.Undefined,this._size=0}get size(){return this._size}isEmpty(){return this._first===ot.Undefined}clear(){let e=this._first;for(;e!==ot.Undefined;){const t=e.next;e.prev=ot.Undefined,e.next=ot.Undefined,e=t}this._first=ot.Undefined,this._last=ot.Undefined,this._size=0}unshift(e){return this._insert(e,!1)}push(e){return this._insert(e,!0)}_insert(e,t){const n=new ot(e);if(this._first===ot.Undefined)this._first=n,this._last=n;else if(t){const e=this._last;this._last=n,n.prev=e,e.next=n}else{const e=this._first;this._first=n,n.next=e,e.prev=n}this._size+=1;let i=!1;return()=>{i||(i=!0,this._remove(n))}}shift(){if(this._first!==ot.Undefined){const e=this._first.element;return this._remove(this._first),e}}pop(){if(this._last!==ot.Undefined){const e=this._last.element;return this._remove(this._last),e}}_remove(e){if(e.prev!==ot.Undefined&&e.next!==ot.Undefined){const t=e.prev;t.next=e.next,e.next.prev=t}else e.prev===ot.Undefined&&e.next===ot.Undefined?(this._first=ot.Undefined,this._last=ot.Undefined):e.next===ot.Undefined?(this._last=this._last.prev,this._last.next=ot.Undefined):e.prev===ot.Undefined&&(this._first=this._first.next,this._first.prev=ot.Undefined);this._size-=1}*[Symbol.iterator](){let e=this._first;for(;e!==ot.Undefined;)yield e.element,e=e.next}}const lt=A.performance&&"function"==typeof A.performance.now;class ut{constructor(e){this._highResolution=lt&&e,this._startTime=this._now(),this._stopTime=-1}static create(e=!0){return new ut(e)}stop(){this._stopTime=this._now()}elapsed(){return-1!==this._stopTime?this._stopTime-this._startTime:this._now()-this._startTime}_now(){return this._highResolution?A.performance.now():Date.now()}}var ht;!function(e){function t(e){return(t,n=null,i)=>{let r,s=!1;return r=e((e=>{if(!s)return r?r.dispose():s=!0,t.call(n,e)}),null,i),s&&r.dispose(),r}}function n(e,t){return o(((n,i=null,r)=>e((e=>n.call(i,t(e))),null,r)))}function i(e,t){return o(((n,i=null,r)=>e((e=>{t(e),n.call(i,e)}),null,r)))}function r(e,t){return o(((n,i=null,r)=>e((e=>t(e)&&n.call(i,e)),null,r)))}function s(e,t,i){let r=i;return n(e,(e=>(r=t(r,e),r)))}function o(e){let t;const n=new ct({onFirstListenerAdd(){t=e(n.fire,n)},onLastListenerRemove(){t.dispose()}});return n.event}function a(e,t,n=100,i=!1,r){let s,o,a,l=0;const u=new ct({leakWarningThreshold:r,onFirstListenerAdd(){s=e((e=>{l++,o=t(o,e),i&&!a&&(u.fire(o),o=void 0),clearTimeout(a),a=setTimeout((()=>{const e=o;o=void 0,a=void 0,(!i||l>1)&&u.fire(e),l=0}),n)}))},onLastListenerRemove(){s.dispose()}});return u.event}function l(e,t=((e,t)=>e===t)){let n,i=!0;return r(e,(e=>{const r=i||!t(e,n);return i=!1,n=e,r}))}e.None=()=>c.None,e.once=t,e.map=n,e.forEach=i,e.filter=r,e.signal=function(e){return e},e.any=function(...e){return(t,n=null,i)=>function(...e){return h((()=>u(e)))}(...e.map((e=>e((e=>t.call(n,e)),null,i))))},e.reduce=s,e.debounce=a,e.latch=l,e.split=function(t,n){return[e.filter(t,n),e.filter(t,(e=>!n(e)))]},e.buffer=function(e,t=!1,n=[]){let i=n.slice(),r=e((e=>{i?i.push(e):o.fire(e)}));const s=()=>{i&&i.forEach((e=>o.fire(e))),i=null},o=new ct({onFirstListenerAdd(){r||(r=e((e=>o.fire(e))))},onFirstListenerDidAdd(){i&&(t?setTimeout(s):s())},onLastListenerRemove(){r&&r.dispose(),r=null}});return o.event};class d{constructor(e){this.event=e}map(e){return new d(n(this.event,e))}forEach(e){return new d(i(this.event,e))}filter(e){return new d(r(this.event,e))}reduce(e,t){return new d(s(this.event,e,t))}latch(){return new d(l(this.event))}debounce(e,t=100,n=!1,i){return new d(a(this.event,e,t,n,i))}on(e,t,n){return this.event(e,t,n)}once(e,n,i){return t(this.event)(e,n,i)}}e.chain=function(e){return new d(e)},e.fromNodeEventEmitter=function(e,t,n=(e=>e)){const i=(...e)=>r.fire(n(...e)),r=new ct({onFirstListenerAdd:()=>e.on(t,i),onLastListenerRemove:()=>e.removeListener(t,i)});return r.event},e.fromDOMEventEmitter=function(e,t,n=(e=>e)){const i=(...e)=>r.fire(n(...e)),r=new ct({onFirstListenerAdd:()=>e.addEventListener(t,i),onLastListenerRemove:()=>e.removeEventListener(t,i)});return r.event},e.toPromise=function(e){return new Promise((n=>t(e)(n)))}}(ht||(ht={}));class dt{constructor(e){this._listenerCount=0,this._invocationCount=0,this._elapsedOverall=0,this._name=`${e}_${dt._idPool++}`}start(e){this._stopWatch=new ut(!0),this._listenerCount=e}stop(){if(this._stopWatch){const e=this._stopWatch.elapsed();this._elapsedOverall+=e,this._invocationCount+=1,console.info(`did FIRE ${this._name}: elapsed_ms: ${e.toFixed(5)}, listener: ${this._listenerCount} (elapsed_overall: ${this._elapsedOverall.toFixed(2)}, invocations: ${this._invocationCount})`),this._stopWatch=void 0}}}dt._idPool=0;class ct{constructor(e){var t;this._disposed=!1,this._options=e,this._leakageMon=void 0,this._perfMon=(null===(t=this._options)||void 0===t?void 0:t._profName)?new dt(this._options._profName):void 0}get event(){return this._event||(this._event=(e,t,n)=>{var i;this._listeners||(this._listeners=new at);const r=this._listeners.isEmpty();r&&this._options&&this._options.onFirstListenerAdd&&this._options.onFirstListenerAdd(this);const s=this._listeners.push(t?[e,t]:e);r&&this._options&&this._options.onFirstListenerDidAdd&&this._options.onFirstListenerDidAdd(this),this._options&&this._options.onListenerDidAdd&&this._options.onListenerDidAdd(this,e,t);const o=null===(i=this._leakageMon)||void 0===i?void 0:i.check(this._listeners.size),a=h((()=>{o&&o(),!this._disposed&&(s(),this._options&&this._options.onLastListenerRemove)&&(this._listeners&&!this._listeners.isEmpty()||this._options.onLastListenerRemove(this))}));return n instanceof d?n.add(a):Array.isArray(n)&&n.push(a),a}),this._event}fire(e){var t,i;if(this._listeners){this._deliveryQueue||(this._deliveryQueue=new at);for(let t of this._listeners)this._deliveryQueue.push([t,e]);for(null===(t=this._perfMon)||void 0===t||t.start(this._deliveryQueue.size);this._deliveryQueue.size>0;){const[e,t]=this._deliveryQueue.shift();try{"function"==typeof e?e.call(void 0,t):e[0].call(e[1],t)}catch(e){n(e)}}null===(i=this._perfMon)||void 0===i||i.stop()}}dispose(){var e,t,n,i,r;this._disposed||(this._disposed=!0,null===(e=this._listeners)||void 0===e||e.clear(),null===(t=this._deliveryQueue)||void 0===t||t.clear(),null===(i=null===(n=this._options)||void 0===n?void 0:n.onLastListenerRemove)||void 0===i||i.call(n),null===(r=this._leakageMon)||void 0===r||r.dispose())}}const ft=Object.freeze((function(e,t){const n=setTimeout(e.bind(t),0);return{dispose(){clearTimeout(n)}}}));var mt;!function(e){e.isCancellationToken=function(t){return t===e.None||t===e.Cancelled||t instanceof gt||!(!t||"object"!=typeof t)&&"boolean"==typeof t.isCancellationRequested&&"function"==typeof t.onCancellationRequested},e.None=Object.freeze({isCancellationRequested:!1,onCancellationRequested:ht.None}),e.Cancelled=Object.freeze({isCancellationRequested:!0,onCancellationRequested:ft})}(mt||(mt={}));class gt{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?ft:(this._emitter||(this._emitter=new ct),this._emitter.event)}dispose(){this._emitter&&(this._emitter.dispose(),this._emitter=null)}}class _t{constructor(){this._keyCodeToStr=[],this._strToKeyCode=Object.create(null)}define(e,t){this._keyCodeToStr[e]=t,this._strToKeyCode[t.toLowerCase()]=e}keyCodeToStr(e){return this._keyCodeToStr[e]}strToKeyCode(e){return this._strToKeyCode[e.toLowerCase()]||0}}const pt=new _t,Ct=new _t,bt=new _t;var St,Lt,Et,Nt,yt,At,vt,wt,Ot,Tt,xt,It,Mt,Pt,Rt,Ut,kt,Dt,Ft,Bt,Kt,qt,Wt,Ht,Yt,Vt,$t,jt,Gt,zt,Qt,Xt,Zt,Jt,en,tn;!function(){function e(e,t,n=t,i=n){pt.define(e,t),Ct.define(e,n),bt.define(e,i)}e(0,"unknown"),e(1,"Backspace"),e(2,"Tab"),e(3,"Enter"),e(4,"Shift"),e(5,"Ctrl"),e(6,"Alt"),e(7,"PauseBreak"),e(8,"CapsLock"),e(9,"Escape"),e(10,"Space"),e(11,"PageUp"),e(12,"PageDown"),e(13,"End"),e(14,"Home"),e(15,"LeftArrow","Left"),e(16,"UpArrow","Up"),e(17,"RightArrow","Right"),e(18,"DownArrow","Down"),e(19,"Insert"),e(20,"Delete"),e(21,"0"),e(22,"1"),e(23,"2"),e(24,"3"),e(25,"4"),e(26,"5"),e(27,"6"),e(28,"7"),e(29,"8"),e(30,"9"),e(31,"A"),e(32,"B"),e(33,"C"),e(34,"D"),e(35,"E"),e(36,"F"),e(37,"G"),e(38,"H"),e(39,"I"),e(40,"J"),e(41,"K"),e(42,"L"),e(43,"M"),e(44,"N"),e(45,"O"),e(46,"P"),e(47,"Q"),e(48,"R"),e(49,"S"),e(50,"T"),e(51,"U"),e(52,"V"),e(53,"W"),e(54,"X"),e(55,"Y"),e(56,"Z"),e(57,"Meta"),e(58,"ContextMenu"),e(59,"F1"),e(60,"F2"),e(61,"F3"),e(62,"F4"),e(63,"F5"),e(64,"F6"),e(65,"F7"),e(66,"F8"),e(67,"F9"),e(68,"F10"),e(69,"F11"),e(70,"F12"),e(71,"F13"),e(72,"F14"),e(73,"F15"),e(74,"F16"),e(75,"F17"),e(76,"F18"),e(77,"F19"),e(78,"NumLock"),e(79,"ScrollLock"),e(80,";",";","OEM_1"),e(81,"=","=","OEM_PLUS"),e(82,",",",","OEM_COMMA"),e(83,"-","-","OEM_MINUS"),e(84,".",".","OEM_PERIOD"),e(85,"/","/","OEM_2"),e(86,"`","`","OEM_3"),e(110,"ABNT_C1"),e(111,"ABNT_C2"),e(87,"[","[","OEM_4"),e(88,"\\","\\","OEM_5"),e(89,"]","]","OEM_6"),e(90,"'","'","OEM_7"),e(91,"OEM_8"),e(92,"OEM_102"),e(93,"NumPad0"),e(94,"NumPad1"),e(95,"NumPad2"),e(96,"NumPad3"),e(97,"NumPad4"),e(98,"NumPad5"),e(99,"NumPad6"),e(100,"NumPad7"),e(101,"NumPad8"),e(102,"NumPad9"),e(103,"NumPad_Multiply"),e(104,"NumPad_Add"),e(105,"NumPad_Separator"),e(106,"NumPad_Subtract"),e(107,"NumPad_Decimal"),e(108,"NumPad_Divide")}(),function(e){e.toString=function(e){return pt.keyCodeToStr(e)},e.fromString=function(e){return pt.strToKeyCode(e)},e.toUserSettingsUS=function(e){return Ct.keyCodeToStr(e)},e.toUserSettingsGeneral=function(e){return bt.keyCodeToStr(e)},e.fromUserSettings=function(e){return Ct.strToKeyCode(e)||bt.strToKeyCode(e)}}(St||(St={}));class nn extends Ue{constructor(e,t,n,i){super(e,t,n,i),this.selectionStartLineNumber=e,this.selectionStartColumn=t,this.positionLineNumber=n,this.positionColumn=i}toString(){return"["+this.selectionStartLineNumber+","+this.selectionStartColumn+" -> "+this.positionLineNumber+","+this.positionColumn+"]"}equalsSelection(e){return nn.selectionsEqual(this,e)}static selectionsEqual(e,t){return e.selectionStartLineNumber===t.selectionStartLineNumber&&e.selectionStartColumn===t.selectionStartColumn&&e.positionLineNumber===t.positionLineNumber&&e.positionColumn===t.positionColumn}getDirection(){return this.selectionStartLineNumber===this.startLineNumber&&this.selectionStartColumn===this.startColumn?0:1}setEndPosition(e,t){return 0===this.getDirection()?new nn(this.startLineNumber,this.startColumn,e,t):new nn(e,t,this.startLineNumber,this.startColumn)}getPosition(){return new Re(this.positionLineNumber,this.positionColumn)}setStartPosition(e,t){return 0===this.getDirection()?new nn(e,t,this.endLineNumber,this.endColumn):new nn(this.endLineNumber,this.endColumn,e,t)}static fromPositions(e,t=e){return new nn(e.lineNumber,e.column,t.lineNumber,t.column)}static liftSelection(e){return new nn(e.selectionStartLineNumber,e.selectionStartColumn,e.positionLineNumber,e.positionColumn)}static selectionsArrEqual(e,t){if(e&&!t||!e&&t)return!1;if(!e&&!t)return!0;if(e.length!==t.length)return!1;for(let n=0,i=e.length;n>>0)>>>0}(e,t)}}rn.CtrlCmd=2048,rn.Shift=1024,rn.Alt=512,rn.WinCtrl=256;var sn=function(e,t,n,i){return new(n||(n=Promise))((function(r,s){function o(e){try{l(i.next(e))}catch(e){s(e)}}function a(e){try{l(i.throw(e))}catch(e){s(e)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(o,a)}l((i=i.apply(e,t||[])).next())}))};class on extends class{constructor(e,t,n,i){this._uri=e,this._lines=t,this._eol=n,this._versionId=i,this._lineStarts=null,this._cachedTextValue=null}dispose(){this._lines.length=0}get version(){return this._versionId}getText(){return null===this._cachedTextValue&&(this._cachedTextValue=this._lines.join(this._eol)),this._cachedTextValue}onEvents(e){e.eol&&e.eol!==this._eol&&(this._eol=e.eol,this._lineStarts=null);const t=e.changes;for(const e of t)this._acceptDeleteRange(e.range),this._acceptInsertText(new Re(e.range.startLineNumber,e.range.startColumn),e.text);this._versionId=e.versionId,this._cachedTextValue=null}_ensureLineStarts(){if(!this._lineStarts){const e=this._eol.length,t=this._lines.length,n=new Uint32Array(t);for(let i=0;ithis._lines.length)t=this._lines.length,n=this._lines[t-1].length+1,i=!0;else{let e=this._lines[t-1].length+1;n<1?(n=1,i=!0):n>e&&(n=e,i=!0)}return i?{lineNumber:t,column:n}:e}}class an{constructor(e,t){this._host=e,this._models=Object.create(null),this._foreignModuleFactory=t,this._foreignModule=null}dispose(){this._models=Object.create(null)}_getModel(e){return this._models[e]}_getModels(){let e=[];return Object.keys(this._models).forEach((t=>e.push(this._models[t]))),e}acceptNewModel(e){this._models[e.url]=new on(Ne.parse(e.url),e.lines,e.EOL,e.versionId)}acceptModelChanged(e,t){this._models[e]&&this._models[e].onEvents(t)}acceptRemovedModel(e){this._models[e]&&delete this._models[e]}computeDiff(e,t,n,i){return sn(this,void 0,void 0,(function*(){const r=this._getModel(e),s=this._getModel(t);if(!r||!s)return null;const o=r.getLinesContent(),a=s.getLinesContent(),l=new qe(o,a,{shouldComputeCharChanges:!0,shouldPostProcessCharChanges:!0,shouldIgnoreTrimWhitespace:n,shouldMakePrettyDiff:!0,maxComputationTime:i}).computeDiff(),u=!(l.changes.length>0)&&this._modelsAreIdentical(r,s);return{quitEarly:l.quitEarly,identical:u,changes:l.changes}}))}_modelsAreIdentical(e,t){const n=e.getLineCount();if(n!==t.getLineCount())return!1;for(let i=1;i<=n;i++)if(e.getLineContent(i)!==t.getLineContent(i))return!1;return!0}computeMoreMinimalEdits(e,t){return sn(this,void 0,void 0,(function*(){const n=this._getModel(e);if(!n)return t;const i=[];let r;t=t.slice(0).sort(((e,t)=>e.range&&t.range?Ue.compareRangesUsingStarts(e.range,t.range):(e.range?0:1)-(t.range?0:1)));for(let{range:e,text:s,eol:o}of t){if("number"==typeof o&&(r=o),Ue.isEmpty(e)&&!s)continue;const t=n.getValueInRange(e);if(s=s.replace(/\r\n|\n|\r/g,n.eol),t===s)continue;if(Math.max(s.length,t.length)>an._diffLimit){i.push({range:e,text:s});continue}const a=G(t,s,!1),l=n.offsetAt(Ue.lift(e).getStartPosition());for(const e of a){const t=n.positionAt(l+e.originalStart),r=n.positionAt(l+e.originalStart+e.originalLength),o={text:s.substr(e.modifiedStart,e.modifiedLength),range:{startLineNumber:t.lineNumber,startColumn:t.column,endLineNumber:r.lineNumber,endColumn:r.column}};n.getValueInRange(o.range)!==o.text&&i.push(o)}}return"number"==typeof r&&i.push({eol:r,text:"",range:{startLineNumber:0,startColumn:0,endLineNumber:0,endColumn:0}}),i}))}computeLinks(e){return sn(this,void 0,void 0,(function*(){let t=this._getModel(e);return t?function(e){return e&&"function"==typeof e.getLineCount&&"function"==typeof e.getLineContent?rt.computeLinks(e):[]}(t):null}))}textualSuggest(e,t,n,i){return sn(this,void 0,void 0,(function*(){const r=new ut(!0),s=new RegExp(n,i),o=new Set;e:for(let n of e){const e=this._getModel(n);if(e)for(let n of e.words(s))if(n!==t&&isNaN(Number(n))&&(o.add(n),o.size>an._suggestionsLimit))break e}return{words:Array.from(o),duration:r.elapsed()}}))}computeWordRanges(e,t,n,i){return sn(this,void 0,void 0,(function*(){let r=this._getModel(e);if(!r)return Object.create(null);const s=new RegExp(n,i),o=Object.create(null);for(let e=t.startLineNumber;ethis._host.fhr(e,t))),getMirrorModels:()=>this._getModels()};return this._foreignModuleFactory?(this._foreignModule=this._foreignModuleFactory(i,t),Promise.resolve(P(this._foreignModule))):Promise.reject(new Error("Unexpected usage"))}fmr(e,t){if(!this._foreignModule||"function"!=typeof this._foreignModule[e])return Promise.reject(new Error("Missing requestHandler or method: "+e));try{return Promise.resolve(this._foreignModule[e].apply(this._foreignModule,t))}catch(e){return Promise.reject(e)}}}an._diffLimit=1e5,an._suggestionsLimit=1e4,"function"==typeof importScripts&&(A.monaco={editor:void 0,languages:void 0,CancellationTokenSource:class{constructor(e){this._token=void 0,this._parentListener=void 0,this._parentListener=e&&e.onCancellationRequested(this.cancel,this)}get token(){return this._token||(this._token=new gt),this._token}cancel(){this._token?this._token instanceof gt&&this._token.cancel():this._token=mt.Cancelled}dispose(e=!1){e&&this.cancel(),this._parentListener&&this._parentListener.dispose(),this._token?this._token instanceof gt&&this._token.dispose():this._token=mt.None}},Emitter:ct,KeyCode:Dt,KeyMod:rn,Position:Re,Range:Ue,Selection:nn,SelectionDirection:Gt,MarkerSeverity:Ft,MarkerTag:Bt,Uri:Ne,Token:class{constructor(e,t,n){this._tokenBrand=void 0,this.offset=0|e,this.type=t,this.language=n}toString(){return"("+this.offset+", "+this.type+")"}}});let ln=!1;self.onmessage=e=>{ln||function(e){if(ln)return;ln=!0;const t=new k((e=>{self.postMessage(e)}),(e=>new an(e,null)));self.onmessage=e=>{t.onmessage(e.data)}}()}})(); +//# sourceMappingURL=editor.worker.js.map \ No newline at end of file diff --git a/editor.worker.js.map b/editor.worker.js.map new file mode 100644 index 0000000..3940663 --- /dev/null +++ b/editor.worker.js.map @@ -0,0 +1 @@ +{"version":3,"file":"editor.worker.js","mappings":"mBACA,IAAIA,EAAsB,GCD1BA,EAAoBC,EAAI,WACvB,GAA0B,iBAAfC,WAAyB,OAAOA,WAC3C,IACC,OAAOC,MAAQ,IAAIC,SAAS,cAAb,GACd,MAAOC,GACR,GAAsB,iBAAXC,OAAqB,OAAOA,QALjB,GC2BjB,MAAMC,EAAe,IA1BrB,MACHC,cACIL,KAAKM,UAAY,GACjBN,KAAKO,uBAAyB,SAAUL,GACpCM,YAAW,KACP,GAAIN,EAAEO,MACF,MAAM,IAAIC,MAAMR,EAAES,QAAU,OAAST,EAAEO,OAE3C,MAAMP,IACP,IAGXU,KAAKV,GACDF,KAAKM,UAAUO,SAASC,IACpBA,EAASZ,MAGjBa,kBAAkBb,GACdF,KAAKO,uBAAuBL,GAC5BF,KAAKY,KAAKV,GAGdc,0BAA0Bd,GACtBF,KAAKO,uBAAuBL,KAI7B,SAASa,EAAkBb,GAgC3B,IAAgCe,GAAAA,EA9BPf,aA+BJQ,OAASO,EAAMC,OAASC,GAAgBF,EAAMN,UAAYQ,GA9B9Ef,EAAaW,kBAAkBb,GAWhC,SAASkB,EAA+BH,GAC3C,GAAIA,aAAiBP,MAAO,CACxB,IAAI,KAAEQ,EAAI,QAAEP,GAAYM,EAExB,MAAO,CACHI,UAAU,EACVH,KAAAA,EACAP,QAAAA,EACAF,MALUQ,EAAMK,YAAcL,EAAMR,OAS5C,OAAOQ,EAEX,MAAME,EAAe,WCpDd,SAASI,EA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A,OAEJA,IAAc,EACd,MAAME,EAAe,IAAIr8B,GAAoBZ,IACzC7G,KAAKwD,YAAYqD,MACjB+4B,GAAS,IAAID,GAAmBC,EAQrB,QAPf5/B,KAAK8H,UAAaxN,IACdwpC,EAAah8B,UAAUxN,EAAEsJ,OAMzBmE,K","sources":["webpack://react-monaco-editor-browser-example/webpack/bootstrap","webpack://react-monaco-editor-browser-example/webpack/runtime/global","webpack://react-monaco-editor-browser-example/./node_modules/monaco-editor/esm/vs/base/common/errors.js","webpack://react-monaco-editor-browser-example/./node_modules/monaco-editor/esm/vs/base/common/functional.js","webpack://react-monaco-editor-browser-example/./node_modules/monaco-editor/esm/vs/base/common/iterator.js","webpack://react-monaco-editor-browser-example/./node_modules/monaco-editor/esm/vs/base/common/lifecycle.js","webpack://react-monaco-editor-browser-example/./node_modules/monaco-editor/esm/vs/base/common/platform.js","webpack://react-monaco-editor-browser-example/./node_modules/monaco-editor/esm/vs/base/common/types.js","webpack://react-monaco-editor-browser-example/./node_modules/monaco-editor/esm/vs/base/common/worker/simpleWorker.js","webpack://react-monaco-editor-browser-example/./node_modules/monaco-editor/esm/vs/base/common/diff/diffChange.js","webpack://react-monaco-editor-browser-example/./node_modules/monaco-editor/esm/vs/base/common/strings.js","webpack://react-monaco-editor-browser-example/./node_modules/monaco-editor/esm/vs/base/common/hash.js","webpack://react-monaco-editor-browser-example/./node_modules/monaco-editor/esm/vs/base/common/diff/diff.js","webpack://react-monaco-editor-browser-example/./node_modules/monaco-editor/esm/vs/base/common/process.js","webpack://react-monaco-editor-browser-example/./node_modules/monaco-editor/esm/vs/base/common/path.js","webpack://react-monaco-editor-browser-example/./node_modules/monaco-editor/esm/vs/base/common/uri.js","webpack://react-monaco-editor-browser-example/./node_modules/monaco-editor/esm/vs/editor/common/core/position.js","webpack://react-monaco-editor-browser-example/./node_modules/monaco-editor/esm/vs/editor/common/core/range.js","webpack://react-monaco-editor-browser-example/./node_modules/monaco-editor/esm/vs/editor/common/diff/diffComputer.js","webpack://react-monaco-editor-browser-example/./node_modules/monaco-editor/esm/vs/base/common/uint.js","webpack://react-monaco-editor-browser-example/./node_modules/monaco-editor/esm/vs/editor/common/viewModel/prefixSumComputer.js","webpack://react-monaco-editor-browser-example/./node_modules/monaco-editor/esm/vs/editor/common/model/wordHelper.js","webpack://react-monaco-editor-browser-example/./node_modules/monaco-editor/esm/vs/editor/common/core/characterClassifier.js","webpack://react-monaco-editor-browser-example/./node_modules/monaco-editor/esm/vs/editor/common/modes/linkComputer.js","webpack://react-monaco-editor-browser-example/./node_modules/monaco-editor/esm/vs/editor/common/modes/supports/inplaceReplaceSupport.js","webpack://react-monaco-editor-browser-example/./node_modules/monaco-editor/esm/vs/base/common/linkedList.js","webpack://react-monaco-editor-browser-example/./node_modules/monaco-editor/esm/vs/base/common/stopwatch.js","webpack://react-monaco-editor-browser-example/./node_modules/monaco-editor/esm/vs/base/common/event.js","webpack://react-monaco-editor-browser-example/./node_modules/monaco-editor/esm/vs/base/common/cancellation.js","webpack://react-monaco-editor-browser-example/./node_modules/monaco-editor/esm/vs/base/common/keyCodes.js","webpack://react-monaco-editor-browser-example/./node_modules/monaco-editor/esm/vs/editor/common/standalone/standaloneEnums.js","webpack://react-monaco-editor-browser-example/./node_modules/monaco-editor/esm/vs/editor/common/core/selection.js","webpack://react-monaco-editor-browser-example/./node_modules/monaco-editor/esm/vs/editor/common/standalone/standaloneBase.js","webpack://react-monaco-editor-browser-example/./node_modules/monaco-editor/esm/vs/editor/common/services/editorSimpleWorker.js","webpack://react-monaco-editor-browser-example/./node_modules/monaco-editor/esm/vs/editor/common/model/mirrorTextModel.js","webpack://react-monaco-editor-browser-example/./node_modules/monaco-editor/esm/vs/editor/common/core/token.js","webpack://react-monaco-editor-browser-example/./node_modules/monaco-editor/esm/vs/editor/editor.worker.js"],"sourcesContent":["// The require scope\nvar __webpack_require__ = {};\n\n","__webpack_require__.g = (function() {\n\tif (typeof globalThis === 'object') return globalThis;\n\ttry {\n\t\treturn this || new Function('return this')();\n\t} catch (e) {\n\t\tif (typeof window === 'object') return window;\n\t}\n})();","// Avoid circular dependency on EventEmitter by implementing a subset of the interface.\r\nexport class ErrorHandler {\r\n constructor() {\r\n this.listeners = [];\r\n this.unexpectedErrorHandler = function (e) {\r\n setTimeout(() => {\r\n if (e.stack) {\r\n throw new Error(e.message + '\\n\\n' + e.stack);\r\n }\r\n throw e;\r\n }, 0);\r\n };\r\n }\r\n emit(e) {\r\n this.listeners.forEach((listener) => {\r\n listener(e);\r\n });\r\n }\r\n onUnexpectedError(e) {\r\n this.unexpectedErrorHandler(e);\r\n this.emit(e);\r\n }\r\n // For external errors, we don't want the listeners to be called\r\n onUnexpectedExternalError(e) {\r\n this.unexpectedErrorHandler(e);\r\n }\r\n}\r\nexport const errorHandler = new ErrorHandler();\r\nexport function onUnexpectedError(e) {\r\n // ignore errors from cancelled promises\r\n if (!isPromiseCanceledError(e)) {\r\n errorHandler.onUnexpectedError(e);\r\n }\r\n return undefined;\r\n}\r\nexport function onUnexpectedExternalError(e) {\r\n // ignore errors from cancelled promises\r\n if (!isPromiseCanceledError(e)) {\r\n errorHandler.onUnexpectedExternalError(e);\r\n }\r\n return undefined;\r\n}\r\nexport function transformErrorForSerialization(error) {\r\n if (error instanceof Error) {\r\n let { name, message } = error;\r\n const stack = error.stacktrace || error.stack;\r\n return {\r\n $isError: true,\r\n name,\r\n message,\r\n stack\r\n };\r\n }\r\n // return as is\r\n return error;\r\n}\r\nconst canceledName = 'Canceled';\r\n/**\r\n * Checks if the given error is a promise in canceled state\r\n */\r\nexport function isPromiseCanceledError(error) {\r\n return error instanceof Error && error.name === canceledName && error.message === canceledName;\r\n}\r\n/**\r\n * Returns an error that signals cancellation.\r\n */\r\nexport function canceled() {\r\n const error = new Error(canceledName);\r\n error.name = error.message;\r\n return error;\r\n}\r\nexport function illegalArgument(name) {\r\n if (name) {\r\n return new Error(`Illegal argument: ${name}`);\r\n }\r\n else {\r\n return new Error('Illegal argument');\r\n }\r\n}\r\nexport function illegalState(name) {\r\n if (name) {\r\n return new Error(`Illegal state: ${name}`);\r\n }\r\n else {\r\n return new Error('Illegal state');\r\n }\r\n}\r\n","/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nexport function once(fn) {\r\n const _this = this;\r\n let didCall = false;\r\n let result;\r\n return function () {\r\n if (didCall) {\r\n return result;\r\n }\r\n didCall = true;\r\n result = fn.apply(_this, arguments);\r\n return result;\r\n };\r\n}\r\n","/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nexport var Iterable;\r\n(function (Iterable) {\r\n function is(thing) {\r\n return thing && typeof thing === 'object' && typeof thing[Symbol.iterator] === 'function';\r\n }\r\n Iterable.is = is;\r\n const _empty = Object.freeze([]);\r\n function empty() {\r\n return _empty;\r\n }\r\n Iterable.empty = empty;\r\n function* single(element) {\r\n yield element;\r\n }\r\n Iterable.single = single;\r\n function from(iterable) {\r\n return iterable || _empty;\r\n }\r\n Iterable.from = from;\r\n function isEmpty(iterable) {\r\n return !iterable || iterable[Symbol.iterator]().next().done === true;\r\n }\r\n Iterable.isEmpty = isEmpty;\r\n function first(iterable) {\r\n return iterable[Symbol.iterator]().next().value;\r\n }\r\n Iterable.first = first;\r\n function some(iterable, predicate) {\r\n for (const element of iterable) {\r\n if (predicate(element)) {\r\n return true;\r\n }\r\n }\r\n return false;\r\n }\r\n Iterable.some = some;\r\n function find(iterable, predicate) {\r\n for (const element of iterable) {\r\n if (predicate(element)) {\r\n return element;\r\n }\r\n }\r\n return undefined;\r\n }\r\n Iterable.find = find;\r\n function* filter(iterable, predicate) {\r\n for (const element of iterable) {\r\n if (predicate(element)) {\r\n yield element;\r\n }\r\n }\r\n }\r\n Iterable.filter = filter;\r\n function* map(iterable, fn) {\r\n let index = 0;\r\n for (const element of iterable) {\r\n yield fn(element, index++);\r\n }\r\n }\r\n Iterable.map = map;\r\n function* concat(...iterables) {\r\n for (const iterable of iterables) {\r\n for (const element of iterable) {\r\n yield element;\r\n }\r\n }\r\n }\r\n Iterable.concat = concat;\r\n function* concatNested(iterables) {\r\n for (const iterable of iterables) {\r\n for (const element of iterable) {\r\n yield element;\r\n }\r\n }\r\n }\r\n Iterable.concatNested = concatNested;\r\n function reduce(iterable, reducer, initialValue) {\r\n let value = initialValue;\r\n for (const element of iterable) {\r\n value = reducer(value, element);\r\n }\r\n return value;\r\n }\r\n Iterable.reduce = reduce;\r\n /**\r\n * Returns an iterable slice of the array, with the same semantics as `array.slice()`.\r\n */\r\n function* slice(arr, from, to = arr.length) {\r\n if (from < 0) {\r\n from += arr.length;\r\n }\r\n if (to < 0) {\r\n to += arr.length;\r\n }\r\n else if (to > arr.length) {\r\n to = arr.length;\r\n }\r\n for (; from < to; from++) {\r\n yield arr[from];\r\n }\r\n }\r\n Iterable.slice = slice;\r\n /**\r\n * Consumes `atMost` elements from iterable and returns the consumed elements,\r\n * and an iterable for the rest of the elements.\r\n */\r\n function consume(iterable, atMost = Number.POSITIVE_INFINITY) {\r\n const consumed = [];\r\n if (atMost === 0) {\r\n return [consumed, iterable];\r\n }\r\n const iterator = iterable[Symbol.iterator]();\r\n for (let i = 0; i < atMost; i++) {\r\n const next = iterator.next();\r\n if (next.done) {\r\n return [consumed, Iterable.empty()];\r\n }\r\n consumed.push(next.value);\r\n }\r\n return [consumed, { [Symbol.iterator]() { return iterator; } }];\r\n }\r\n Iterable.consume = consume;\r\n /**\r\n * Returns whether the iterables are the same length and all items are\r\n * equal using the comparator function.\r\n */\r\n function equals(a, b, comparator = (at, bt) => at === bt) {\r\n const ai = a[Symbol.iterator]();\r\n const bi = b[Symbol.iterator]();\r\n while (true) {\r\n const an = ai.next();\r\n const bn = bi.next();\r\n if (an.done !== bn.done) {\r\n return false;\r\n }\r\n else if (an.done) {\r\n return true;\r\n }\r\n else if (!comparator(an.value, bn.value)) {\r\n return false;\r\n }\r\n }\r\n }\r\n Iterable.equals = equals;\r\n})(Iterable || (Iterable = {}));\r\n","/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nimport { once } from './functional.js';\r\nimport { Iterable } from './iterator.js';\r\n/**\r\n * Enables logging of potentially leaked disposables.\r\n *\r\n * A disposable is considered leaked if it is not disposed or not registered as the child of\r\n * another disposable. This tracking is very simple an only works for classes that either\r\n * extend Disposable or use a DisposableStore. This means there are a lot of false positives.\r\n */\r\nconst TRACK_DISPOSABLES = false;\r\nlet disposableTracker = null;\r\nexport function setDisposableTracker(tracker) {\r\n disposableTracker = tracker;\r\n}\r\nif (TRACK_DISPOSABLES) {\r\n const __is_disposable_tracked__ = '__is_disposable_tracked__';\r\n setDisposableTracker(new class {\r\n trackDisposable(x) {\r\n const stack = new Error('Potentially leaked disposable').stack;\r\n setTimeout(() => {\r\n if (!x[__is_disposable_tracked__]) {\r\n console.log(stack);\r\n }\r\n }, 3000);\r\n }\r\n setParent(child, parent) {\r\n if (child && child !== Disposable.None) {\r\n try {\r\n child[__is_disposable_tracked__] = true;\r\n }\r\n catch (_a) {\r\n // noop\r\n }\r\n }\r\n }\r\n markAsDisposed(disposable) {\r\n if (disposable && disposable !== Disposable.None) {\r\n try {\r\n disposable[__is_disposable_tracked__] = true;\r\n }\r\n catch (_a) {\r\n // noop\r\n }\r\n }\r\n }\r\n markAsSingleton(disposable) { }\r\n });\r\n}\r\nfunction trackDisposable(x) {\r\n disposableTracker === null || disposableTracker === void 0 ? void 0 : disposableTracker.trackDisposable(x);\r\n return x;\r\n}\r\nfunction markAsDisposed(disposable) {\r\n disposableTracker === null || disposableTracker === void 0 ? void 0 : disposableTracker.markAsDisposed(disposable);\r\n}\r\nfunction setParentOfDisposable(child, parent) {\r\n disposableTracker === null || disposableTracker === void 0 ? void 0 : disposableTracker.setParent(child, parent);\r\n}\r\nfunction setParentOfDisposables(children, parent) {\r\n if (!disposableTracker) {\r\n return;\r\n }\r\n for (const child of children) {\r\n disposableTracker.setParent(child, parent);\r\n }\r\n}\r\n/**\r\n * Indicates that the given object is a singleton which does not need to be disposed.\r\n*/\r\nexport function markAsSingleton(singleton) {\r\n disposableTracker === null || disposableTracker === void 0 ? void 0 : disposableTracker.markAsSingleton(singleton);\r\n return singleton;\r\n}\r\nexport class MultiDisposeError extends Error {\r\n constructor(errors) {\r\n super(`Encountered errors while disposing of store. Errors: [${errors.join(', ')}]`);\r\n this.errors = errors;\r\n }\r\n}\r\nexport function isDisposable(thing) {\r\n return typeof thing.dispose === 'function' && thing.dispose.length === 0;\r\n}\r\nexport function dispose(arg) {\r\n if (Iterable.is(arg)) {\r\n let errors = [];\r\n for (const d of arg) {\r\n if (d) {\r\n try {\r\n d.dispose();\r\n }\r\n catch (e) {\r\n errors.push(e);\r\n }\r\n }\r\n }\r\n if (errors.length === 1) {\r\n throw errors[0];\r\n }\r\n else if (errors.length > 1) {\r\n throw new MultiDisposeError(errors);\r\n }\r\n return Array.isArray(arg) ? [] : arg;\r\n }\r\n else if (arg) {\r\n arg.dispose();\r\n return arg;\r\n }\r\n}\r\nexport function combinedDisposable(...disposables) {\r\n const parent = toDisposable(() => dispose(disposables));\r\n setParentOfDisposables(disposables, parent);\r\n return parent;\r\n}\r\nexport function toDisposable(fn) {\r\n const self = trackDisposable({\r\n dispose: once(() => {\r\n markAsDisposed(self);\r\n fn();\r\n })\r\n });\r\n return self;\r\n}\r\nexport class DisposableStore {\r\n constructor() {\r\n this._toDispose = new Set();\r\n this._isDisposed = false;\r\n trackDisposable(this);\r\n }\r\n /**\r\n * Dispose of all registered disposables and mark this object as disposed.\r\n *\r\n * Any future disposables added to this object will be disposed of on `add`.\r\n */\r\n dispose() {\r\n if (this._isDisposed) {\r\n return;\r\n }\r\n markAsDisposed(this);\r\n this._isDisposed = true;\r\n this.clear();\r\n }\r\n /**\r\n * Dispose of all registered disposables but do not mark this object as disposed.\r\n */\r\n clear() {\r\n try {\r\n dispose(this._toDispose.values());\r\n }\r\n finally {\r\n this._toDispose.clear();\r\n }\r\n }\r\n add(o) {\r\n if (!o) {\r\n return o;\r\n }\r\n if (o === this) {\r\n throw new Error('Cannot register a disposable on itself!');\r\n }\r\n setParentOfDisposable(o, this);\r\n if (this._isDisposed) {\r\n if (!DisposableStore.DISABLE_DISPOSED_WARNING) {\r\n console.warn(new Error('Trying to add a disposable to a DisposableStore that has already been disposed of. The added object will be leaked!').stack);\r\n }\r\n }\r\n else {\r\n this._toDispose.add(o);\r\n }\r\n return o;\r\n }\r\n}\r\nDisposableStore.DISABLE_DISPOSED_WARNING = false;\r\nexport class Disposable {\r\n constructor() {\r\n this._store = new DisposableStore();\r\n trackDisposable(this);\r\n setParentOfDisposable(this._store, this);\r\n }\r\n dispose() {\r\n markAsDisposed(this);\r\n this._store.dispose();\r\n }\r\n _register(o) {\r\n if (o === this) {\r\n throw new Error('Cannot register a disposable on itself!');\r\n }\r\n return this._store.add(o);\r\n }\r\n}\r\nDisposable.None = Object.freeze({ dispose() { } });\r\n/**\r\n * Manages the lifecycle of a disposable value that may be changed.\r\n *\r\n * This ensures that when the disposable value is changed, the previously held disposable is disposed of. You can\r\n * also register a `MutableDisposable` on a `Disposable` to ensure it is automatically cleaned up.\r\n */\r\nexport class MutableDisposable {\r\n constructor() {\r\n this._isDisposed = false;\r\n trackDisposable(this);\r\n }\r\n get value() {\r\n return this._isDisposed ? undefined : this._value;\r\n }\r\n set value(value) {\r\n var _a;\r\n if (this._isDisposed || value === this._value) {\r\n return;\r\n }\r\n (_a = this._value) === null || _a === void 0 ? void 0 : _a.dispose();\r\n if (value) {\r\n setParentOfDisposable(value, this);\r\n }\r\n this._value = value;\r\n }\r\n clear() {\r\n this.value = undefined;\r\n }\r\n dispose() {\r\n var _a;\r\n this._isDisposed = true;\r\n markAsDisposed(this);\r\n (_a = this._value) === null || _a === void 0 ? void 0 : _a.dispose();\r\n this._value = undefined;\r\n }\r\n /**\r\n * Clears the value, but does not dispose it.\r\n * The old value is returned.\r\n */\r\n clearAndLeak() {\r\n const oldValue = this._value;\r\n this._value = undefined;\r\n if (oldValue) {\r\n setParentOfDisposable(oldValue, null);\r\n }\r\n return oldValue;\r\n }\r\n}\r\nexport class ImmortalReference {\r\n constructor(object) {\r\n this.object = object;\r\n }\r\n dispose() { }\r\n}\r\n","/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nvar _a;\r\nconst LANGUAGE_DEFAULT = 'en';\r\nlet _isWindows = false;\r\nlet _isMacintosh = false;\r\nlet _isLinux = false;\r\nlet _isLinuxSnap = false;\r\nlet _isNative = false;\r\nlet _isWeb = false;\r\nlet _isIOS = false;\r\nlet _locale = undefined;\r\nlet _language = LANGUAGE_DEFAULT;\r\nlet _translationsConfigFile = undefined;\r\nlet _userAgent = undefined;\r\nexport const globals = (typeof self === 'object' ? self : typeof global === 'object' ? global : {});\r\nlet nodeProcess = undefined;\r\nif (typeof globals.vscode !== 'undefined' && typeof globals.vscode.process !== 'undefined') {\r\n // Native environment (sandboxed)\r\n nodeProcess = globals.vscode.process;\r\n}\r\nelse if (typeof process !== 'undefined') {\r\n // Native environment (non-sandboxed)\r\n nodeProcess = process;\r\n}\r\nconst isElectronRenderer = typeof ((_a = nodeProcess === null || nodeProcess === void 0 ? void 0 : nodeProcess.versions) === null || _a === void 0 ? void 0 : _a.electron) === 'string' && nodeProcess.type === 'renderer';\r\nexport const isElectronSandboxed = isElectronRenderer && (nodeProcess === null || nodeProcess === void 0 ? void 0 : nodeProcess.sandboxed);\r\nexport const browserCodeLoadingCacheStrategy = (() => {\r\n // Always enabled when sandbox is enabled\r\n if (isElectronSandboxed) {\r\n return 'bypassHeatCheck';\r\n }\r\n // Otherwise, only enabled conditionally\r\n const env = nodeProcess === null || nodeProcess === void 0 ? void 0 : nodeProcess.env['VSCODE_BROWSER_CODE_LOADING'];\r\n if (typeof env === 'string') {\r\n if (env === 'none' || env === 'code' || env === 'bypassHeatCheck' || env === 'bypassHeatCheckAndEagerCompile') {\r\n return env;\r\n }\r\n return 'bypassHeatCheck';\r\n }\r\n return undefined;\r\n})();\r\nexport const isPreferringBrowserCodeLoad = typeof browserCodeLoadingCacheStrategy === 'string';\r\n// Web environment\r\nif (typeof navigator === 'object' && !isElectronRenderer) {\r\n _userAgent = navigator.userAgent;\r\n _isWindows = _userAgent.indexOf('Windows') >= 0;\r\n _isMacintosh = _userAgent.indexOf('Macintosh') >= 0;\r\n _isIOS = (_userAgent.indexOf('Macintosh') >= 0 || _userAgent.indexOf('iPad') >= 0 || _userAgent.indexOf('iPhone') >= 0) && !!navigator.maxTouchPoints && navigator.maxTouchPoints > 0;\r\n _isLinux = _userAgent.indexOf('Linux') >= 0;\r\n _isWeb = true;\r\n _locale = navigator.language;\r\n _language = _locale;\r\n}\r\n// Native environment\r\nelse if (typeof nodeProcess === 'object') {\r\n _isWindows = (nodeProcess.platform === 'win32');\r\n _isMacintosh = (nodeProcess.platform === 'darwin');\r\n _isLinux = (nodeProcess.platform === 'linux');\r\n _isLinuxSnap = _isLinux && !!nodeProcess.env['SNAP'] && !!nodeProcess.env['SNAP_REVISION'];\r\n _locale = LANGUAGE_DEFAULT;\r\n _language = LANGUAGE_DEFAULT;\r\n const rawNlsConfig = nodeProcess.env['VSCODE_NLS_CONFIG'];\r\n if (rawNlsConfig) {\r\n try {\r\n const nlsConfig = JSON.parse(rawNlsConfig);\r\n const resolved = nlsConfig.availableLanguages['*'];\r\n _locale = nlsConfig.locale;\r\n // VSCode's default language is 'en'\r\n _language = resolved ? resolved : LANGUAGE_DEFAULT;\r\n _translationsConfigFile = nlsConfig._translationsConfigFile;\r\n }\r\n catch (e) {\r\n }\r\n }\r\n _isNative = true;\r\n}\r\n// Unknown environment\r\nelse {\r\n console.error('Unable to resolve platform.');\r\n}\r\nlet _platform = 0 /* Web */;\r\nif (_isMacintosh) {\r\n _platform = 1 /* Mac */;\r\n}\r\nelse if (_isWindows) {\r\n _platform = 3 /* Windows */;\r\n}\r\nelse if (_isLinux) {\r\n _platform = 2 /* Linux */;\r\n}\r\nexport const isWindows = _isWindows;\r\nexport const isMacintosh = _isMacintosh;\r\nexport const isLinux = _isLinux;\r\nexport const isNative = _isNative;\r\nexport const isWeb = _isWeb;\r\nexport const isIOS = _isIOS;\r\nexport const userAgent = _userAgent;\r\nexport const setImmediate = (function defineSetImmediate() {\r\n if (globals.setImmediate) {\r\n return globals.setImmediate.bind(globals);\r\n }\r\n if (typeof globals.postMessage === 'function' && !globals.importScripts) {\r\n let pending = [];\r\n globals.addEventListener('message', (e) => {\r\n if (e.data && e.data.vscodeSetImmediateId) {\r\n for (let i = 0, len = pending.length; i < len; i++) {\r\n const candidate = pending[i];\r\n if (candidate.id === e.data.vscodeSetImmediateId) {\r\n pending.splice(i, 1);\r\n candidate.callback();\r\n return;\r\n }\r\n }\r\n }\r\n });\r\n let lastId = 0;\r\n return (callback) => {\r\n const myId = ++lastId;\r\n pending.push({\r\n id: myId,\r\n callback: callback\r\n });\r\n globals.postMessage({ vscodeSetImmediateId: myId }, '*');\r\n };\r\n }\r\n if (typeof (nodeProcess === null || nodeProcess === void 0 ? void 0 : nodeProcess.nextTick) === 'function') {\r\n return nodeProcess.nextTick.bind(nodeProcess);\r\n }\r\n const _promise = Promise.resolve();\r\n return (callback) => _promise.then(callback);\r\n})();\r\nexport const OS = (_isMacintosh || _isIOS ? 2 /* Macintosh */ : (_isWindows ? 1 /* Windows */ : 3 /* Linux */));\r\nlet _isLittleEndian = true;\r\nlet _isLittleEndianComputed = false;\r\nexport function isLittleEndian() {\r\n if (!_isLittleEndianComputed) {\r\n _isLittleEndianComputed = true;\r\n const test = new Uint8Array(2);\r\n test[0] = 1;\r\n test[1] = 2;\r\n const view = new Uint16Array(test.buffer);\r\n _isLittleEndian = (view[0] === (2 << 8) + 1);\r\n }\r\n return _isLittleEndian;\r\n}\r\n","/**\r\n * @returns whether the provided parameter is a JavaScript Array or not.\r\n */\r\nexport function isArray(array) {\r\n return Array.isArray(array);\r\n}\r\n/**\r\n * @returns whether the provided parameter is a JavaScript String or not.\r\n */\r\nexport function isString(str) {\r\n return (typeof str === 'string');\r\n}\r\n/**\r\n *\r\n * @returns whether the provided parameter is of type `object` but **not**\r\n *\t`null`, an `array`, a `regexp`, nor a `date`.\r\n */\r\nexport function isObject(obj) {\r\n // The method can't do a type cast since there are type (like strings) which\r\n // are subclasses of any put not positvely matched by the function. Hence type\r\n // narrowing results in wrong results.\r\n return typeof obj === 'object'\r\n && obj !== null\r\n && !Array.isArray(obj)\r\n && !(obj instanceof RegExp)\r\n && !(obj instanceof Date);\r\n}\r\n/**\r\n * In **contrast** to just checking `typeof` this will return `false` for `NaN`.\r\n * @returns whether the provided parameter is a JavaScript Number or not.\r\n */\r\nexport function isNumber(obj) {\r\n return (typeof obj === 'number' && !isNaN(obj));\r\n}\r\n/**\r\n * @returns whether the provided parameter is a JavaScript Boolean or not.\r\n */\r\nexport function isBoolean(obj) {\r\n return (obj === true || obj === false);\r\n}\r\n/**\r\n * @returns whether the provided parameter is undefined.\r\n */\r\nexport function isUndefined(obj) {\r\n return (typeof obj === 'undefined');\r\n}\r\n/**\r\n * @returns whether the provided parameter is undefined or null.\r\n */\r\nexport function isUndefinedOrNull(obj) {\r\n return (isUndefined(obj) || obj === null);\r\n}\r\nexport function assertType(condition, type) {\r\n if (!condition) {\r\n throw new Error(type ? `Unexpected type, expected '${type}'` : 'Unexpected type');\r\n }\r\n}\r\n/**\r\n * Asserts that the argument passed in is neither undefined nor null.\r\n */\r\nexport function assertIsDefined(arg) {\r\n if (isUndefinedOrNull(arg)) {\r\n throw new Error('Assertion Failed: argument is undefined or null');\r\n }\r\n return arg;\r\n}\r\n/**\r\n * @returns whether the provided parameter is a JavaScript Function or not.\r\n */\r\nexport function isFunction(obj) {\r\n return (typeof obj === 'function');\r\n}\r\nexport function validateConstraints(args, constraints) {\r\n const len = Math.min(args.length, constraints.length);\r\n for (let i = 0; i < len; i++) {\r\n validateConstraint(args[i], constraints[i]);\r\n }\r\n}\r\nexport function validateConstraint(arg, constraint) {\r\n if (isString(constraint)) {\r\n if (typeof arg !== constraint) {\r\n throw new Error(`argument does not match constraint: typeof ${constraint}`);\r\n }\r\n }\r\n else if (isFunction(constraint)) {\r\n try {\r\n if (arg instanceof constraint) {\r\n return;\r\n }\r\n }\r\n catch (_a) {\r\n // ignore\r\n }\r\n if (!isUndefinedOrNull(arg) && arg.constructor === constraint) {\r\n return;\r\n }\r\n if (constraint.length === 1 && constraint.call(undefined, arg) === true) {\r\n return;\r\n }\r\n throw new Error(`argument does not match one of these constraints: arg instanceof constraint, arg.constructor === constraint, nor constraint(arg) === true`);\r\n }\r\n}\r\nexport function getAllPropertyNames(obj) {\r\n let res = [];\r\n let proto = Object.getPrototypeOf(obj);\r\n while (Object.prototype !== proto) {\r\n res = res.concat(Object.getOwnPropertyNames(proto));\r\n proto = Object.getPrototypeOf(proto);\r\n }\r\n return res;\r\n}\r\nexport function getAllMethodNames(obj) {\r\n const methods = [];\r\n for (const prop of getAllPropertyNames(obj)) {\r\n if (typeof obj[prop] === 'function') {\r\n methods.push(prop);\r\n }\r\n }\r\n return methods;\r\n}\r\nexport function createProxyObject(methodNames, invoke) {\r\n const createProxyMethod = (method) => {\r\n return function () {\r\n const args = Array.prototype.slice.call(arguments, 0);\r\n return invoke(method, args);\r\n };\r\n };\r\n let result = {};\r\n for (const methodName of methodNames) {\r\n result[methodName] = createProxyMethod(methodName);\r\n }\r\n return result;\r\n}\r\n/**\r\n * Converts null to undefined, passes all other values through.\r\n */\r\nexport function withNullAsUndefined(x) {\r\n return x === null ? undefined : x;\r\n}\r\nexport function assertNever(value, message = 'Unreachable') {\r\n throw new Error(message);\r\n}\r\n","/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nimport { transformErrorForSerialization } from '../errors.js';\r\nimport { Disposable } from '../lifecycle.js';\r\nimport { isWeb } from '../platform.js';\r\nimport * as types from '../types.js';\r\nconst INITIALIZE = '$initialize';\r\nlet webWorkerWarningLogged = false;\r\nexport function logOnceWebWorkerWarning(err) {\r\n if (!isWeb) {\r\n // running tests\r\n return;\r\n }\r\n if (!webWorkerWarningLogged) {\r\n webWorkerWarningLogged = true;\r\n console.warn('Could not create web worker(s). Falling back to loading web worker code in main thread, which might cause UI freezes. Please see https://github.com/microsoft/monaco-editor#faq');\r\n }\r\n console.warn(err.message);\r\n}\r\nclass SimpleWorkerProtocol {\r\n constructor(handler) {\r\n this._workerId = -1;\r\n this._handler = handler;\r\n this._lastSentReq = 0;\r\n this._pendingReplies = Object.create(null);\r\n }\r\n setWorkerId(workerId) {\r\n this._workerId = workerId;\r\n }\r\n sendMessage(method, args) {\r\n let req = String(++this._lastSentReq);\r\n return new Promise((resolve, reject) => {\r\n this._pendingReplies[req] = {\r\n resolve: resolve,\r\n reject: reject\r\n };\r\n this._send({\r\n vsWorker: this._workerId,\r\n req: req,\r\n method: method,\r\n args: args\r\n });\r\n });\r\n }\r\n handleMessage(message) {\r\n if (!message || !message.vsWorker) {\r\n return;\r\n }\r\n if (this._workerId !== -1 && message.vsWorker !== this._workerId) {\r\n return;\r\n }\r\n this._handleMessage(message);\r\n }\r\n _handleMessage(msg) {\r\n if (msg.seq) {\r\n let replyMessage = msg;\r\n if (!this._pendingReplies[replyMessage.seq]) {\r\n console.warn('Got reply to unknown seq');\r\n return;\r\n }\r\n let reply = this._pendingReplies[replyMessage.seq];\r\n delete this._pendingReplies[replyMessage.seq];\r\n if (replyMessage.err) {\r\n let err = replyMessage.err;\r\n if (replyMessage.err.$isError) {\r\n err = new Error();\r\n err.name = replyMessage.err.name;\r\n err.message = replyMessage.err.message;\r\n err.stack = replyMessage.err.stack;\r\n }\r\n reply.reject(err);\r\n return;\r\n }\r\n reply.resolve(replyMessage.res);\r\n return;\r\n }\r\n let requestMessage = msg;\r\n let req = requestMessage.req;\r\n let result = this._handler.handleMessage(requestMessage.method, requestMessage.args);\r\n result.then((r) => {\r\n this._send({\r\n vsWorker: this._workerId,\r\n seq: req,\r\n res: r,\r\n err: undefined\r\n });\r\n }, (e) => {\r\n if (e.detail instanceof Error) {\r\n // Loading errors have a detail property that points to the actual error\r\n e.detail = transformErrorForSerialization(e.detail);\r\n }\r\n this._send({\r\n vsWorker: this._workerId,\r\n seq: req,\r\n res: undefined,\r\n err: transformErrorForSerialization(e)\r\n });\r\n });\r\n }\r\n _send(msg) {\r\n let transfer = [];\r\n if (msg.req) {\r\n const m = msg;\r\n for (let i = 0; i < m.args.length; i++) {\r\n if (m.args[i] instanceof ArrayBuffer) {\r\n transfer.push(m.args[i]);\r\n }\r\n }\r\n }\r\n else {\r\n const m = msg;\r\n if (m.res instanceof ArrayBuffer) {\r\n transfer.push(m.res);\r\n }\r\n }\r\n this._handler.sendMessage(msg, transfer);\r\n }\r\n}\r\n/**\r\n * Main thread side\r\n */\r\nexport class SimpleWorkerClient extends Disposable {\r\n constructor(workerFactory, moduleId, host) {\r\n super();\r\n let lazyProxyReject = null;\r\n this._worker = this._register(workerFactory.create('vs/base/common/worker/simpleWorker', (msg) => {\r\n this._protocol.handleMessage(msg);\r\n }, (err) => {\r\n // in Firefox, web workers fail lazily :(\r\n // we will reject the proxy\r\n if (lazyProxyReject) {\r\n lazyProxyReject(err);\r\n }\r\n }));\r\n this._protocol = new SimpleWorkerProtocol({\r\n sendMessage: (msg, transfer) => {\r\n this._worker.postMessage(msg, transfer);\r\n },\r\n handleMessage: (method, args) => {\r\n if (typeof host[method] !== 'function') {\r\n return Promise.reject(new Error('Missing method ' + method + ' on main thread host.'));\r\n }\r\n try {\r\n return Promise.resolve(host[method].apply(host, args));\r\n }\r\n catch (e) {\r\n return Promise.reject(e);\r\n }\r\n }\r\n });\r\n this._protocol.setWorkerId(this._worker.getId());\r\n // Gather loader configuration\r\n let loaderConfiguration = null;\r\n if (typeof self.require !== 'undefined' && typeof self.require.getConfig === 'function') {\r\n // Get the configuration from the Monaco AMD Loader\r\n loaderConfiguration = self.require.getConfig();\r\n }\r\n else if (typeof self.requirejs !== 'undefined') {\r\n // Get the configuration from requirejs\r\n loaderConfiguration = self.requirejs.s.contexts._.config;\r\n }\r\n const hostMethods = types.getAllMethodNames(host);\r\n // Send initialize message\r\n this._onModuleLoaded = this._protocol.sendMessage(INITIALIZE, [\r\n this._worker.getId(),\r\n JSON.parse(JSON.stringify(loaderConfiguration)),\r\n moduleId,\r\n hostMethods,\r\n ]);\r\n // Create proxy to loaded code\r\n const proxyMethodRequest = (method, args) => {\r\n return this._request(method, args);\r\n };\r\n this._lazyProxy = new Promise((resolve, reject) => {\r\n lazyProxyReject = reject;\r\n this._onModuleLoaded.then((availableMethods) => {\r\n resolve(types.createProxyObject(availableMethods, proxyMethodRequest));\r\n }, (e) => {\r\n reject(e);\r\n this._onError('Worker failed to load ' + moduleId, e);\r\n });\r\n });\r\n }\r\n getProxyObject() {\r\n return this._lazyProxy;\r\n }\r\n _request(method, args) {\r\n return new Promise((resolve, reject) => {\r\n this._onModuleLoaded.then(() => {\r\n this._protocol.sendMessage(method, args).then(resolve, reject);\r\n }, reject);\r\n });\r\n }\r\n _onError(message, error) {\r\n console.error(message);\r\n console.info(error);\r\n }\r\n}\r\n/**\r\n * Worker side\r\n */\r\nexport class SimpleWorkerServer {\r\n constructor(postMessage, requestHandlerFactory) {\r\n this._requestHandlerFactory = requestHandlerFactory;\r\n this._requestHandler = null;\r\n this._protocol = new SimpleWorkerProtocol({\r\n sendMessage: (msg, transfer) => {\r\n postMessage(msg, transfer);\r\n },\r\n handleMessage: (method, args) => this._handleMessage(method, args)\r\n });\r\n }\r\n onmessage(msg) {\r\n this._protocol.handleMessage(msg);\r\n }\r\n _handleMessage(method, args) {\r\n if (method === INITIALIZE) {\r\n return this.initialize(args[0], args[1], args[2], args[3]);\r\n }\r\n if (!this._requestHandler || typeof this._requestHandler[method] !== 'function') {\r\n return Promise.reject(new Error('Missing requestHandler or method: ' + method));\r\n }\r\n try {\r\n return Promise.resolve(this._requestHandler[method].apply(this._requestHandler, args));\r\n }\r\n catch (e) {\r\n return Promise.reject(e);\r\n }\r\n }\r\n initialize(workerId, loaderConfig, moduleId, hostMethods) {\r\n this._protocol.setWorkerId(workerId);\r\n const proxyMethodRequest = (method, args) => {\r\n return this._protocol.sendMessage(method, args);\r\n };\r\n const hostProxy = types.createProxyObject(hostMethods, proxyMethodRequest);\r\n if (this._requestHandlerFactory) {\r\n // static request handler\r\n this._requestHandler = this._requestHandlerFactory(hostProxy);\r\n return Promise.resolve(types.getAllMethodNames(this._requestHandler));\r\n }\r\n if (loaderConfig) {\r\n // Remove 'baseUrl', handling it is beyond scope for now\r\n if (typeof loaderConfig.baseUrl !== 'undefined') {\r\n delete loaderConfig['baseUrl'];\r\n }\r\n if (typeof loaderConfig.paths !== 'undefined') {\r\n if (typeof loaderConfig.paths.vs !== 'undefined') {\r\n delete loaderConfig.paths['vs'];\r\n }\r\n }\r\n if (typeof loaderConfig.trustedTypesPolicy !== undefined) {\r\n // don't use, it has been destroyed during serialize\r\n delete loaderConfig['trustedTypesPolicy'];\r\n }\r\n // Since this is in a web worker, enable catching errors\r\n loaderConfig.catchError = true;\r\n self.require.config(loaderConfig);\r\n }\r\n return new Promise((resolve, reject) => {\r\n // Use the global require to be sure to get the global config\r\n self.require([moduleId], (module) => {\r\n this._requestHandler = module.create(hostProxy);\r\n if (!this._requestHandler) {\r\n reject(new Error(`No RequestHandler!`));\r\n return;\r\n }\r\n resolve(types.getAllMethodNames(this._requestHandler));\r\n }, reject);\r\n });\r\n }\r\n}\r\n/**\r\n * Called on the worker side\r\n */\r\nexport function create(postMessage) {\r\n return new SimpleWorkerServer(postMessage, null);\r\n}\r\n","/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n/**\r\n * Represents information about a specific difference between two sequences.\r\n */\r\nexport class DiffChange {\r\n /**\r\n * Constructs a new DiffChange with the given sequence information\r\n * and content.\r\n */\r\n constructor(originalStart, originalLength, modifiedStart, modifiedLength) {\r\n //Debug.Assert(originalLength > 0 || modifiedLength > 0, \"originalLength and modifiedLength cannot both be <= 0\");\r\n this.originalStart = originalStart;\r\n this.originalLength = originalLength;\r\n this.modifiedStart = modifiedStart;\r\n this.modifiedLength = modifiedLength;\r\n }\r\n /**\r\n * The end point (exclusive) of the change in the original sequence.\r\n */\r\n getOriginalEnd() {\r\n return this.originalStart + this.originalLength;\r\n }\r\n /**\r\n * The end point (exclusive) of the change in the modified sequence.\r\n */\r\n getModifiedEnd() {\r\n return this.modifiedStart + this.modifiedLength;\r\n }\r\n}\r\n","/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nexport function isFalsyOrWhitespace(str) {\r\n if (!str || typeof str !== 'string') {\r\n return true;\r\n }\r\n return str.trim().length === 0;\r\n}\r\nconst _formatRegexp = /{(\\d+)}/g;\r\n/**\r\n * Helper to produce a string with a variable number of arguments. Insert variable segments\r\n * into the string using the {n} notation where N is the index of the argument following the string.\r\n * @param value string to which formatting is applied\r\n * @param args replacements for {n}-entries\r\n */\r\nexport function format(value, ...args) {\r\n if (args.length === 0) {\r\n return value;\r\n }\r\n return value.replace(_formatRegexp, function (match, group) {\r\n const idx = parseInt(group, 10);\r\n return isNaN(idx) || idx < 0 || idx >= args.length ?\r\n match :\r\n args[idx];\r\n });\r\n}\r\n/**\r\n * Converts HTML characters inside the string to use entities instead. Makes the string safe from\r\n * being used e.g. in HTMLElement.innerHTML.\r\n */\r\nexport function escape(html) {\r\n return html.replace(/[<>&]/g, function (match) {\r\n switch (match) {\r\n case '<': return '<';\r\n case '>': return '>';\r\n case '&': return '&';\r\n default: return match;\r\n }\r\n });\r\n}\r\n/**\r\n * Escapes regular expression characters in a given string\r\n */\r\nexport function escapeRegExpCharacters(value) {\r\n return value.replace(/[\\\\\\{\\}\\*\\+\\?\\|\\^\\$\\.\\[\\]\\(\\)]/g, '\\\\$&');\r\n}\r\n/**\r\n * Removes all occurrences of needle from the beginning and end of haystack.\r\n * @param haystack string to trim\r\n * @param needle the thing to trim (default is a blank)\r\n */\r\nexport function trim(haystack, needle = ' ') {\r\n const trimmed = ltrim(haystack, needle);\r\n return rtrim(trimmed, needle);\r\n}\r\n/**\r\n * Removes all occurrences of needle from the beginning of haystack.\r\n * @param haystack string to trim\r\n * @param needle the thing to trim\r\n */\r\nexport function ltrim(haystack, needle) {\r\n if (!haystack || !needle) {\r\n return haystack;\r\n }\r\n const needleLen = needle.length;\r\n if (needleLen === 0 || haystack.length === 0) {\r\n return haystack;\r\n }\r\n let offset = 0;\r\n while (haystack.indexOf(needle, offset) === offset) {\r\n offset = offset + needleLen;\r\n }\r\n return haystack.substring(offset);\r\n}\r\n/**\r\n * Removes all occurrences of needle from the end of haystack.\r\n * @param haystack string to trim\r\n * @param needle the thing to trim\r\n */\r\nexport function rtrim(haystack, needle) {\r\n if (!haystack || !needle) {\r\n return haystack;\r\n }\r\n const needleLen = needle.length, haystackLen = haystack.length;\r\n if (needleLen === 0 || haystackLen === 0) {\r\n return haystack;\r\n }\r\n let offset = haystackLen, idx = -1;\r\n while (true) {\r\n idx = haystack.lastIndexOf(needle, offset - 1);\r\n if (idx === -1 || idx + needleLen !== offset) {\r\n break;\r\n }\r\n if (idx === 0) {\r\n return '';\r\n }\r\n offset = idx;\r\n }\r\n return haystack.substring(0, offset);\r\n}\r\nexport function convertSimple2RegExpPattern(pattern) {\r\n return pattern.replace(/[\\-\\\\\\{\\}\\+\\?\\|\\^\\$\\.\\,\\[\\]\\(\\)\\#\\s]/g, '\\\\$&').replace(/[\\*]/g, '.*');\r\n}\r\nexport function stripWildcards(pattern) {\r\n return pattern.replace(/\\*/g, '');\r\n}\r\nexport function createRegExp(searchString, isRegex, options = {}) {\r\n if (!searchString) {\r\n throw new Error('Cannot create regex from empty string');\r\n }\r\n if (!isRegex) {\r\n searchString = escapeRegExpCharacters(searchString);\r\n }\r\n if (options.wholeWord) {\r\n if (!/\\B/.test(searchString.charAt(0))) {\r\n searchString = '\\\\b' + searchString;\r\n }\r\n if (!/\\B/.test(searchString.charAt(searchString.length - 1))) {\r\n searchString = searchString + '\\\\b';\r\n }\r\n }\r\n let modifiers = '';\r\n if (options.global) {\r\n modifiers += 'g';\r\n }\r\n if (!options.matchCase) {\r\n modifiers += 'i';\r\n }\r\n if (options.multiline) {\r\n modifiers += 'm';\r\n }\r\n if (options.unicode) {\r\n modifiers += 'u';\r\n }\r\n return new RegExp(searchString, modifiers);\r\n}\r\nexport function regExpLeadsToEndlessLoop(regexp) {\r\n // Exit early if it's one of these special cases which are meant to match\r\n // against an empty string\r\n if (regexp.source === '^' || regexp.source === '^$' || regexp.source === '$' || regexp.source === '^\\\\s*$') {\r\n return false;\r\n }\r\n // We check against an empty string. If the regular expression doesn't advance\r\n // (e.g. ends in an endless loop) it will match an empty string.\r\n const match = regexp.exec('');\r\n return !!(match && regexp.lastIndex === 0);\r\n}\r\nexport function regExpFlags(regexp) {\r\n return (regexp.global ? 'g' : '')\r\n + (regexp.ignoreCase ? 'i' : '')\r\n + (regexp.multiline ? 'm' : '')\r\n + (regexp /* standalone editor compilation */.unicode ? 'u' : '');\r\n}\r\nexport function splitLines(str) {\r\n return str.split(/\\r\\n|\\r|\\n/);\r\n}\r\n/**\r\n * Returns first index of the string that is not whitespace.\r\n * If string is empty or contains only whitespaces, returns -1\r\n */\r\nexport function firstNonWhitespaceIndex(str) {\r\n for (let i = 0, len = str.length; i < len; i++) {\r\n const chCode = str.charCodeAt(i);\r\n if (chCode !== 32 /* Space */ && chCode !== 9 /* Tab */) {\r\n return i;\r\n }\r\n }\r\n return -1;\r\n}\r\n/**\r\n * Returns the leading whitespace of the string.\r\n * If the string contains only whitespaces, returns entire string\r\n */\r\nexport function getLeadingWhitespace(str, start = 0, end = str.length) {\r\n for (let i = start; i < end; i++) {\r\n const chCode = str.charCodeAt(i);\r\n if (chCode !== 32 /* Space */ && chCode !== 9 /* Tab */) {\r\n return str.substring(start, i);\r\n }\r\n }\r\n return str.substring(start, end);\r\n}\r\n/**\r\n * Returns last index of the string that is not whitespace.\r\n * If string is empty or contains only whitespaces, returns -1\r\n */\r\nexport function lastNonWhitespaceIndex(str, startIndex = str.length - 1) {\r\n for (let i = startIndex; i >= 0; i--) {\r\n const chCode = str.charCodeAt(i);\r\n if (chCode !== 32 /* Space */ && chCode !== 9 /* Tab */) {\r\n return i;\r\n }\r\n }\r\n return -1;\r\n}\r\nexport function compare(a, b) {\r\n if (a < b) {\r\n return -1;\r\n }\r\n else if (a > b) {\r\n return 1;\r\n }\r\n else {\r\n return 0;\r\n }\r\n}\r\nexport function compareSubstring(a, b, aStart = 0, aEnd = a.length, bStart = 0, bEnd = b.length) {\r\n for (; aStart < aEnd && bStart < bEnd; aStart++, bStart++) {\r\n let codeA = a.charCodeAt(aStart);\r\n let codeB = b.charCodeAt(bStart);\r\n if (codeA < codeB) {\r\n return -1;\r\n }\r\n else if (codeA > codeB) {\r\n return 1;\r\n }\r\n }\r\n const aLen = aEnd - aStart;\r\n const bLen = bEnd - bStart;\r\n if (aLen < bLen) {\r\n return -1;\r\n }\r\n else if (aLen > bLen) {\r\n return 1;\r\n }\r\n return 0;\r\n}\r\nexport function compareIgnoreCase(a, b) {\r\n return compareSubstringIgnoreCase(a, b, 0, a.length, 0, b.length);\r\n}\r\nexport function compareSubstringIgnoreCase(a, b, aStart = 0, aEnd = a.length, bStart = 0, bEnd = b.length) {\r\n for (; aStart < aEnd && bStart < bEnd; aStart++, bStart++) {\r\n let codeA = a.charCodeAt(aStart);\r\n let codeB = b.charCodeAt(bStart);\r\n if (codeA === codeB) {\r\n // equal\r\n continue;\r\n }\r\n const diff = codeA - codeB;\r\n if (diff === 32 && isUpperAsciiLetter(codeB)) { //codeB =[65-90] && codeA =[97-122]\r\n continue;\r\n }\r\n else if (diff === -32 && isUpperAsciiLetter(codeA)) { //codeB =[97-122] && codeA =[65-90]\r\n continue;\r\n }\r\n if (isLowerAsciiLetter(codeA) && isLowerAsciiLetter(codeB)) {\r\n //\r\n return diff;\r\n }\r\n else {\r\n return compareSubstring(a.toLowerCase(), b.toLowerCase(), aStart, aEnd, bStart, bEnd);\r\n }\r\n }\r\n const aLen = aEnd - aStart;\r\n const bLen = bEnd - bStart;\r\n if (aLen < bLen) {\r\n return -1;\r\n }\r\n else if (aLen > bLen) {\r\n return 1;\r\n }\r\n return 0;\r\n}\r\nexport function isLowerAsciiLetter(code) {\r\n return code >= 97 /* a */ && code <= 122 /* z */;\r\n}\r\nexport function isUpperAsciiLetter(code) {\r\n return code >= 65 /* A */ && code <= 90 /* Z */;\r\n}\r\nfunction isAsciiLetter(code) {\r\n return isLowerAsciiLetter(code) || isUpperAsciiLetter(code);\r\n}\r\nexport function equalsIgnoreCase(a, b) {\r\n return a.length === b.length && doEqualsIgnoreCase(a, b);\r\n}\r\nfunction doEqualsIgnoreCase(a, b, stopAt = a.length) {\r\n for (let i = 0; i < stopAt; i++) {\r\n const codeA = a.charCodeAt(i);\r\n const codeB = b.charCodeAt(i);\r\n if (codeA === codeB) {\r\n continue;\r\n }\r\n // a-z A-Z\r\n if (isAsciiLetter(codeA) && isAsciiLetter(codeB)) {\r\n const diff = Math.abs(codeA - codeB);\r\n if (diff !== 0 && diff !== 32) {\r\n return false;\r\n }\r\n }\r\n // Any other charcode\r\n else {\r\n if (String.fromCharCode(codeA).toLowerCase() !== String.fromCharCode(codeB).toLowerCase()) {\r\n return false;\r\n }\r\n }\r\n }\r\n return true;\r\n}\r\nexport function startsWithIgnoreCase(str, candidate) {\r\n const candidateLength = candidate.length;\r\n if (candidate.length > str.length) {\r\n return false;\r\n }\r\n return doEqualsIgnoreCase(str, candidate, candidateLength);\r\n}\r\n/**\r\n * @returns the length of the common prefix of the two strings.\r\n */\r\nexport function commonPrefixLength(a, b) {\r\n let i, len = Math.min(a.length, b.length);\r\n for (i = 0; i < len; i++) {\r\n if (a.charCodeAt(i) !== b.charCodeAt(i)) {\r\n return i;\r\n }\r\n }\r\n return len;\r\n}\r\n/**\r\n * @returns the length of the common suffix of the two strings.\r\n */\r\nexport function commonSuffixLength(a, b) {\r\n let i, len = Math.min(a.length, b.length);\r\n const aLastIndex = a.length - 1;\r\n const bLastIndex = b.length - 1;\r\n for (i = 0; i < len; i++) {\r\n if (a.charCodeAt(aLastIndex - i) !== b.charCodeAt(bLastIndex - i)) {\r\n return i;\r\n }\r\n }\r\n return len;\r\n}\r\n/**\r\n * See http://en.wikipedia.org/wiki/Surrogate_pair\r\n */\r\nexport function isHighSurrogate(charCode) {\r\n return (0xD800 <= charCode && charCode <= 0xDBFF);\r\n}\r\n/**\r\n * See http://en.wikipedia.org/wiki/Surrogate_pair\r\n */\r\nexport function isLowSurrogate(charCode) {\r\n return (0xDC00 <= charCode && charCode <= 0xDFFF);\r\n}\r\n/**\r\n * See http://en.wikipedia.org/wiki/Surrogate_pair\r\n */\r\nexport function computeCodePoint(highSurrogate, lowSurrogate) {\r\n return ((highSurrogate - 0xD800) << 10) + (lowSurrogate - 0xDC00) + 0x10000;\r\n}\r\n/**\r\n * get the code point that begins at offset `offset`\r\n */\r\nexport function getNextCodePoint(str, len, offset) {\r\n const charCode = str.charCodeAt(offset);\r\n if (isHighSurrogate(charCode) && offset + 1 < len) {\r\n const nextCharCode = str.charCodeAt(offset + 1);\r\n if (isLowSurrogate(nextCharCode)) {\r\n return computeCodePoint(charCode, nextCharCode);\r\n }\r\n }\r\n return charCode;\r\n}\r\n/**\r\n * get the code point that ends right before offset `offset`\r\n */\r\nfunction getPrevCodePoint(str, offset) {\r\n const charCode = str.charCodeAt(offset - 1);\r\n if (isLowSurrogate(charCode) && offset > 1) {\r\n const prevCharCode = str.charCodeAt(offset - 2);\r\n if (isHighSurrogate(prevCharCode)) {\r\n return computeCodePoint(prevCharCode, charCode);\r\n }\r\n }\r\n return charCode;\r\n}\r\nexport function nextCharLength(str, offset) {\r\n const graphemeBreakTree = GraphemeBreakTree.getInstance();\r\n const initialOffset = offset;\r\n const len = str.length;\r\n const initialCodePoint = getNextCodePoint(str, len, offset);\r\n offset += (initialCodePoint >= 65536 /* UNICODE_SUPPLEMENTARY_PLANE_BEGIN */ ? 2 : 1);\r\n let graphemeBreakType = graphemeBreakTree.getGraphemeBreakType(initialCodePoint);\r\n while (offset < len) {\r\n const nextCodePoint = getNextCodePoint(str, len, offset);\r\n const nextGraphemeBreakType = graphemeBreakTree.getGraphemeBreakType(nextCodePoint);\r\n if (breakBetweenGraphemeBreakType(graphemeBreakType, nextGraphemeBreakType)) {\r\n break;\r\n }\r\n offset += (nextCodePoint >= 65536 /* UNICODE_SUPPLEMENTARY_PLANE_BEGIN */ ? 2 : 1);\r\n graphemeBreakType = nextGraphemeBreakType;\r\n }\r\n return (offset - initialOffset);\r\n}\r\nexport function prevCharLength(str, offset) {\r\n const graphemeBreakTree = GraphemeBreakTree.getInstance();\r\n const initialOffset = offset;\r\n const initialCodePoint = getPrevCodePoint(str, offset);\r\n offset -= (initialCodePoint >= 65536 /* UNICODE_SUPPLEMENTARY_PLANE_BEGIN */ ? 2 : 1);\r\n let graphemeBreakType = graphemeBreakTree.getGraphemeBreakType(initialCodePoint);\r\n while (offset > 0) {\r\n const prevCodePoint = getPrevCodePoint(str, offset);\r\n const prevGraphemeBreakType = graphemeBreakTree.getGraphemeBreakType(prevCodePoint);\r\n if (breakBetweenGraphemeBreakType(prevGraphemeBreakType, graphemeBreakType)) {\r\n break;\r\n }\r\n offset -= (prevCodePoint >= 65536 /* UNICODE_SUPPLEMENTARY_PLANE_BEGIN */ ? 2 : 1);\r\n graphemeBreakType = prevGraphemeBreakType;\r\n }\r\n return (initialOffset - offset);\r\n}\r\n/**\r\n * A manual decoding of a UTF8 string.\r\n * Use only in environments which do not offer native conversion methods!\r\n */\r\nexport function decodeUTF8(buffer) {\r\n // https://en.wikipedia.org/wiki/UTF-8\r\n const len = buffer.byteLength;\r\n const result = [];\r\n let offset = 0;\r\n while (offset < len) {\r\n const v0 = buffer[offset];\r\n let codePoint;\r\n if (v0 >= 0b11110000 && offset + 3 < len) {\r\n // 4 bytes\r\n codePoint = ((((buffer[offset++] & 0b00000111) << 18) >>> 0)\r\n | (((buffer[offset++] & 0b00111111) << 12) >>> 0)\r\n | (((buffer[offset++] & 0b00111111) << 6) >>> 0)\r\n | (((buffer[offset++] & 0b00111111) << 0) >>> 0));\r\n }\r\n else if (v0 >= 0b11100000 && offset + 2 < len) {\r\n // 3 bytes\r\n codePoint = ((((buffer[offset++] & 0b00001111) << 12) >>> 0)\r\n | (((buffer[offset++] & 0b00111111) << 6) >>> 0)\r\n | (((buffer[offset++] & 0b00111111) << 0) >>> 0));\r\n }\r\n else if (v0 >= 0b11000000 && offset + 1 < len) {\r\n // 2 bytes\r\n codePoint = ((((buffer[offset++] & 0b00011111) << 6) >>> 0)\r\n | (((buffer[offset++] & 0b00111111) << 0) >>> 0));\r\n }\r\n else {\r\n // 1 byte\r\n codePoint = buffer[offset++];\r\n }\r\n if ((codePoint >= 0 && codePoint <= 0xD7FF) || (codePoint >= 0xE000 && codePoint <= 0xFFFF)) {\r\n // Basic Multilingual Plane\r\n result.push(String.fromCharCode(codePoint));\r\n }\r\n else if (codePoint >= 0x010000 && codePoint <= 0x10FFFF) {\r\n // Supplementary Planes\r\n const uPrime = codePoint - 0x10000;\r\n const w1 = 0xD800 + ((uPrime & 0b11111111110000000000) >>> 10);\r\n const w2 = 0xDC00 + ((uPrime & 0b00000000001111111111) >>> 0);\r\n result.push(String.fromCharCode(w1));\r\n result.push(String.fromCharCode(w2));\r\n }\r\n else {\r\n // illegal code point\r\n result.push(String.fromCharCode(0xFFFD));\r\n }\r\n }\r\n return result.join('');\r\n}\r\n/**\r\n * Generated using https://github.com/alexdima/unicode-utils/blob/master/generate-rtl-test.js\r\n */\r\nconst CONTAINS_RTL = /(?:[\\u05BE\\u05C0\\u05C3\\u05C6\\u05D0-\\u05F4\\u0608\\u060B\\u060D\\u061B-\\u064A\\u066D-\\u066F\\u0671-\\u06D5\\u06E5\\u06E6\\u06EE\\u06EF\\u06FA-\\u0710\\u0712-\\u072F\\u074D-\\u07A5\\u07B1-\\u07EA\\u07F4\\u07F5\\u07FA-\\u0815\\u081A\\u0824\\u0828\\u0830-\\u0858\\u085E-\\u08BD\\u200F\\uFB1D\\uFB1F-\\uFB28\\uFB2A-\\uFD3D\\uFD50-\\uFDFC\\uFE70-\\uFEFC]|\\uD802[\\uDC00-\\uDD1B\\uDD20-\\uDE00\\uDE10-\\uDE33\\uDE40-\\uDEE4\\uDEEB-\\uDF35\\uDF40-\\uDFFF]|\\uD803[\\uDC00-\\uDCFF]|\\uD83A[\\uDC00-\\uDCCF\\uDD00-\\uDD43\\uDD50-\\uDFFF]|\\uD83B[\\uDC00-\\uDEBB])/;\r\n/**\r\n * Returns true if `str` contains any Unicode character that is classified as \"R\" or \"AL\".\r\n */\r\nexport function containsRTL(str) {\r\n return CONTAINS_RTL.test(str);\r\n}\r\n/**\r\n * Generated using https://github.com/alexdima/unicode-utils/blob/master/generate-emoji-test.js\r\n */\r\nconst CONTAINS_EMOJI = /(?:[\\u231A\\u231B\\u23F0\\u23F3\\u2600-\\u27BF\\u2B50\\u2B55]|\\uD83C[\\uDDE6-\\uDDFF\\uDF00-\\uDFFF]|\\uD83D[\\uDC00-\\uDE4F\\uDE80-\\uDEFC\\uDFE0-\\uDFEB]|\\uD83E[\\uDD00-\\uDDFF\\uDE70-\\uDED6])/;\r\nexport function containsEmoji(str) {\r\n return CONTAINS_EMOJI.test(str);\r\n}\r\nconst IS_BASIC_ASCII = /^[\\t\\n\\r\\x20-\\x7E]*$/;\r\n/**\r\n * Returns true if `str` contains only basic ASCII characters in the range 32 - 126 (including 32 and 126) or \\n, \\r, \\t\r\n */\r\nexport function isBasicASCII(str) {\r\n return IS_BASIC_ASCII.test(str);\r\n}\r\nexport const UNUSUAL_LINE_TERMINATORS = /[\\u2028\\u2029]/; // LINE SEPARATOR (LS) or PARAGRAPH SEPARATOR (PS)\r\n/**\r\n * Returns true if `str` contains unusual line terminators, like LS or PS\r\n */\r\nexport function containsUnusualLineTerminators(str) {\r\n return UNUSUAL_LINE_TERMINATORS.test(str);\r\n}\r\nexport function containsFullWidthCharacter(str) {\r\n for (let i = 0, len = str.length; i < len; i++) {\r\n if (isFullWidthCharacter(str.charCodeAt(i))) {\r\n return true;\r\n }\r\n }\r\n return false;\r\n}\r\nexport function isFullWidthCharacter(charCode) {\r\n // Do a cheap trick to better support wrapping of wide characters, treat them as 2 columns\r\n // http://jrgraphix.net/research/unicode_blocks.php\r\n // 2E80 — 2EFF CJK Radicals Supplement\r\n // 2F00 — 2FDF Kangxi Radicals\r\n // 2FF0 — 2FFF Ideographic Description Characters\r\n // 3000 — 303F CJK Symbols and Punctuation\r\n // 3040 — 309F Hiragana\r\n // 30A0 — 30FF Katakana\r\n // 3100 — 312F Bopomofo\r\n // 3130 — 318F Hangul Compatibility Jamo\r\n // 3190 — 319F Kanbun\r\n // 31A0 — 31BF Bopomofo Extended\r\n // 31F0 — 31FF Katakana Phonetic Extensions\r\n // 3200 — 32FF Enclosed CJK Letters and Months\r\n // 3300 — 33FF CJK Compatibility\r\n // 3400 — 4DBF CJK Unified Ideographs Extension A\r\n // 4DC0 — 4DFF Yijing Hexagram Symbols\r\n // 4E00 — 9FFF CJK Unified Ideographs\r\n // A000 — A48F Yi Syllables\r\n // A490 — A4CF Yi Radicals\r\n // AC00 — D7AF Hangul Syllables\r\n // [IGNORE] D800 — DB7F High Surrogates\r\n // [IGNORE] DB80 — DBFF High Private Use Surrogates\r\n // [IGNORE] DC00 — DFFF Low Surrogates\r\n // [IGNORE] E000 — F8FF Private Use Area\r\n // F900 — FAFF CJK Compatibility Ideographs\r\n // [IGNORE] FB00 — FB4F Alphabetic Presentation Forms\r\n // [IGNORE] FB50 — FDFF Arabic Presentation Forms-A\r\n // [IGNORE] FE00 — FE0F Variation Selectors\r\n // [IGNORE] FE20 — FE2F Combining Half Marks\r\n // [IGNORE] FE30 — FE4F CJK Compatibility Forms\r\n // [IGNORE] FE50 — FE6F Small Form Variants\r\n // [IGNORE] FE70 — FEFF Arabic Presentation Forms-B\r\n // FF00 — FFEF Halfwidth and Fullwidth Forms\r\n // [https://en.wikipedia.org/wiki/Halfwidth_and_fullwidth_forms]\r\n // of which FF01 - FF5E fullwidth ASCII of 21 to 7E\r\n // [IGNORE] and FF65 - FFDC halfwidth of Katakana and Hangul\r\n // [IGNORE] FFF0 — FFFF Specials\r\n charCode = +charCode; // @perf\r\n return ((charCode >= 0x2E80 && charCode <= 0xD7AF)\r\n || (charCode >= 0xF900 && charCode <= 0xFAFF)\r\n || (charCode >= 0xFF01 && charCode <= 0xFF5E));\r\n}\r\n/**\r\n * A fast function (therefore imprecise) to check if code points are emojis.\r\n * Generated using https://github.com/alexdima/unicode-utils/blob/master/generate-emoji-test.js\r\n */\r\nexport function isEmojiImprecise(x) {\r\n return ((x >= 0x1F1E6 && x <= 0x1F1FF) || (x === 8986) || (x === 8987) || (x === 9200)\r\n || (x === 9203) || (x >= 9728 && x <= 10175) || (x === 11088) || (x === 11093)\r\n || (x >= 127744 && x <= 128591) || (x >= 128640 && x <= 128764)\r\n || (x >= 128992 && x <= 129003) || (x >= 129280 && x <= 129535)\r\n || (x >= 129648 && x <= 129750));\r\n}\r\n// -- UTF-8 BOM\r\nexport const UTF8_BOM_CHARACTER = String.fromCharCode(65279 /* UTF8_BOM */);\r\nexport function startsWithUTF8BOM(str) {\r\n return !!(str && str.length > 0 && str.charCodeAt(0) === 65279 /* UTF8_BOM */);\r\n}\r\nexport function containsUppercaseCharacter(target, ignoreEscapedChars = false) {\r\n if (!target) {\r\n return false;\r\n }\r\n if (ignoreEscapedChars) {\r\n target = target.replace(/\\\\./g, '');\r\n }\r\n return target.toLowerCase() !== target;\r\n}\r\n/**\r\n * Produces 'a'-'z', followed by 'A'-'Z'... followed by 'a'-'z', etc.\r\n */\r\nexport function singleLetterHash(n) {\r\n const LETTERS_CNT = (90 /* Z */ - 65 /* A */ + 1);\r\n n = n % (2 * LETTERS_CNT);\r\n if (n < LETTERS_CNT) {\r\n return String.fromCharCode(97 /* a */ + n);\r\n }\r\n return String.fromCharCode(65 /* A */ + n - LETTERS_CNT);\r\n}\r\n//#region Unicode Grapheme Break\r\nexport function getGraphemeBreakType(codePoint) {\r\n const graphemeBreakTree = GraphemeBreakTree.getInstance();\r\n return graphemeBreakTree.getGraphemeBreakType(codePoint);\r\n}\r\nexport function breakBetweenGraphemeBreakType(breakTypeA, breakTypeB) {\r\n // http://www.unicode.org/reports/tr29/#Grapheme_Cluster_Boundary_Rules\r\n // !!! Let's make the common case a bit faster\r\n if (breakTypeA === 0 /* Other */) {\r\n // see https://www.unicode.org/Public/13.0.0/ucd/auxiliary/GraphemeBreakTest-13.0.0d10.html#table\r\n return (breakTypeB !== 5 /* Extend */ && breakTypeB !== 7 /* SpacingMark */);\r\n }\r\n // Do not break between a CR and LF. Otherwise, break before and after controls.\r\n // GB3 CR × LF\r\n // GB4 (Control | CR | LF) ÷\r\n // GB5 ÷ (Control | CR | LF)\r\n if (breakTypeA === 2 /* CR */) {\r\n if (breakTypeB === 3 /* LF */) {\r\n return false; // GB3\r\n }\r\n }\r\n if (breakTypeA === 4 /* Control */ || breakTypeA === 2 /* CR */ || breakTypeA === 3 /* LF */) {\r\n return true; // GB4\r\n }\r\n if (breakTypeB === 4 /* Control */ || breakTypeB === 2 /* CR */ || breakTypeB === 3 /* LF */) {\r\n return true; // GB5\r\n }\r\n // Do not break Hangul syllable sequences.\r\n // GB6 L × (L | V | LV | LVT)\r\n // GB7 (LV | V) × (V | T)\r\n // GB8 (LVT | T) × T\r\n if (breakTypeA === 8 /* L */) {\r\n if (breakTypeB === 8 /* L */ || breakTypeB === 9 /* V */ || breakTypeB === 11 /* LV */ || breakTypeB === 12 /* LVT */) {\r\n return false; // GB6\r\n }\r\n }\r\n if (breakTypeA === 11 /* LV */ || breakTypeA === 9 /* V */) {\r\n if (breakTypeB === 9 /* V */ || breakTypeB === 10 /* T */) {\r\n return false; // GB7\r\n }\r\n }\r\n if (breakTypeA === 12 /* LVT */ || breakTypeA === 10 /* T */) {\r\n if (breakTypeB === 10 /* T */) {\r\n return false; // GB8\r\n }\r\n }\r\n // Do not break before extending characters or ZWJ.\r\n // GB9 × (Extend | ZWJ)\r\n if (breakTypeB === 5 /* Extend */ || breakTypeB === 13 /* ZWJ */) {\r\n return false; // GB9\r\n }\r\n // The GB9a and GB9b rules only apply to extended grapheme clusters:\r\n // Do not break before SpacingMarks, or after Prepend characters.\r\n // GB9a × SpacingMark\r\n // GB9b Prepend ×\r\n if (breakTypeB === 7 /* SpacingMark */) {\r\n return false; // GB9a\r\n }\r\n if (breakTypeA === 1 /* Prepend */) {\r\n return false; // GB9b\r\n }\r\n // Do not break within emoji modifier sequences or emoji zwj sequences.\r\n // GB11 \\p{Extended_Pictographic} Extend* ZWJ × \\p{Extended_Pictographic}\r\n if (breakTypeA === 13 /* ZWJ */ && breakTypeB === 14 /* Extended_Pictographic */) {\r\n // Note: we are not implementing the rule entirely here to avoid introducing states\r\n return false; // GB11\r\n }\r\n // GB12 sot (RI RI)* RI × RI\r\n // GB13 [^RI] (RI RI)* RI × RI\r\n if (breakTypeA === 6 /* Regional_Indicator */ && breakTypeB === 6 /* Regional_Indicator */) {\r\n // Note: we are not implementing the rule entirely here to avoid introducing states\r\n return false; // GB12 & GB13\r\n }\r\n // GB999 Any ÷ Any\r\n return true;\r\n}\r\nclass GraphemeBreakTree {\r\n constructor() {\r\n this._data = getGraphemeBreakRawData();\r\n }\r\n static getInstance() {\r\n if (!GraphemeBreakTree._INSTANCE) {\r\n GraphemeBreakTree._INSTANCE = new GraphemeBreakTree();\r\n }\r\n return GraphemeBreakTree._INSTANCE;\r\n }\r\n getGraphemeBreakType(codePoint) {\r\n // !!! Let's make 7bit ASCII a bit faster: 0..31\r\n if (codePoint < 32) {\r\n if (codePoint === 10 /* LineFeed */) {\r\n return 3 /* LF */;\r\n }\r\n if (codePoint === 13 /* CarriageReturn */) {\r\n return 2 /* CR */;\r\n }\r\n return 4 /* Control */;\r\n }\r\n // !!! Let's make 7bit ASCII a bit faster: 32..126\r\n if (codePoint < 127) {\r\n return 0 /* Other */;\r\n }\r\n const data = this._data;\r\n const nodeCount = data.length / 3;\r\n let nodeIndex = 1;\r\n while (nodeIndex <= nodeCount) {\r\n if (codePoint < data[3 * nodeIndex]) {\r\n // go left\r\n nodeIndex = 2 * nodeIndex;\r\n }\r\n else if (codePoint > data[3 * nodeIndex + 1]) {\r\n // go right\r\n nodeIndex = 2 * nodeIndex + 1;\r\n }\r\n else {\r\n // hit\r\n return data[3 * nodeIndex + 2];\r\n }\r\n }\r\n return 0 /* Other */;\r\n }\r\n}\r\nGraphemeBreakTree._INSTANCE = null;\r\nfunction getGraphemeBreakRawData() {\r\n // generated using https://github.com/alexdima/unicode-utils/blob/master/generate-grapheme-break.js\r\n return JSON.parse('[0,0,0,51592,51592,11,44424,44424,11,72251,72254,5,7150,7150,7,48008,48008,11,55176,55176,11,128420,128420,14,3276,3277,5,9979,9980,14,46216,46216,11,49800,49800,11,53384,53384,11,70726,70726,5,122915,122916,5,129320,129327,14,2558,2558,5,5906,5908,5,9762,9763,14,43360,43388,8,45320,45320,11,47112,47112,11,48904,48904,11,50696,50696,11,52488,52488,11,54280,54280,11,70082,70083,1,71350,71350,7,73111,73111,5,127892,127893,14,128726,128727,14,129473,129474,14,2027,2035,5,2901,2902,5,3784,3789,5,6754,6754,5,8418,8420,5,9877,9877,14,11088,11088,14,44008,44008,5,44872,44872,11,45768,45768,11,46664,46664,11,47560,47560,11,48456,48456,11,49352,49352,11,50248,50248,11,51144,51144,11,52040,52040,11,52936,52936,11,53832,53832,11,54728,54728,11,69811,69814,5,70459,70460,5,71096,71099,7,71998,71998,5,72874,72880,5,119149,119149,7,127374,127374,14,128335,128335,14,128482,128482,14,128765,128767,14,129399,129400,14,129680,129685,14,1476,1477,5,2377,2380,7,2759,2760,5,3137,3140,7,3458,3459,7,4153,4154,5,6432,6434,5,6978,6978,5,7675,7679,5,9723,9726,14,9823,9823,14,9919,9923,14,10035,10036,14,42736,42737,5,43596,43596,5,44200,44200,11,44648,44648,11,45096,45096,11,45544,45544,11,45992,45992,11,46440,46440,11,46888,46888,11,47336,47336,11,47784,47784,11,48232,48232,11,48680,48680,11,49128,49128,11,49576,49576,11,50024,50024,11,50472,50472,11,50920,50920,11,51368,51368,11,51816,51816,11,52264,52264,11,52712,52712,11,53160,53160,11,53608,53608,11,54056,54056,11,54504,54504,11,54952,54952,11,68108,68111,5,69933,69940,5,70197,70197,7,70498,70499,7,70845,70845,5,71229,71229,5,71727,71735,5,72154,72155,5,72344,72345,5,73023,73029,5,94095,94098,5,121403,121452,5,126981,127182,14,127538,127546,14,127990,127990,14,128391,128391,14,128445,128449,14,128500,128505,14,128752,128752,14,129160,129167,14,129356,129356,14,129432,129442,14,129648,129651,14,129751,131069,14,173,173,4,1757,1757,1,2274,2274,1,2494,2494,5,2641,2641,5,2876,2876,5,3014,3016,7,3262,3262,7,3393,3396,5,3570,3571,7,3968,3972,5,4228,4228,7,6086,6086,5,6679,6680,5,6912,6915,5,7080,7081,5,7380,7392,5,8252,8252,14,9096,9096,14,9748,9749,14,9784,9786,14,9833,9850,14,9890,9894,14,9938,9938,14,9999,9999,14,10085,10087,14,12349,12349,14,43136,43137,7,43454,43456,7,43755,43755,7,44088,44088,11,44312,44312,11,44536,44536,11,44760,44760,11,44984,44984,11,45208,45208,11,45432,45432,11,45656,45656,11,45880,45880,11,46104,46104,11,46328,46328,11,46552,46552,11,46776,46776,11,47000,47000,11,47224,47224,11,47448,47448,11,47672,47672,11,47896,47896,11,48120,48120,11,48344,48344,11,48568,48568,11,48792,48792,11,49016,49016,11,49240,49240,11,49464,49464,11,49688,49688,11,49912,49912,11,50136,50136,11,50360,50360,11,50584,50584,11,50808,50808,11,51032,51032,11,51256,51256,11,51480,51480,11,51704,51704,11,51928,51928,11,52152,52152,11,52376,52376,11,52600,52600,11,52824,52824,11,53048,53048,11,53272,53272,11,53496,53496,11,53720,53720,11,53944,53944,11,54168,54168,11,54392,54392,11,54616,54616,11,54840,54840,11,55064,55064,11,65438,65439,5,69633,69633,5,69837,69837,1,70018,70018,7,70188,70190,7,70368,70370,7,70465,70468,7,70712,70719,5,70835,70840,5,70850,70851,5,71132,71133,5,71340,71340,7,71458,71461,5,71985,71989,7,72002,72002,7,72193,72202,5,72281,72283,5,72766,72766,7,72885,72886,5,73104,73105,5,92912,92916,5,113824,113827,4,119173,119179,5,121505,121519,5,125136,125142,5,127279,127279,14,127489,127490,14,127570,127743,14,127900,127901,14,128254,128254,14,128369,128370,14,128400,128400,14,128425,128432,14,128468,128475,14,128489,128494,14,128715,128720,14,128745,128745,14,128759,128760,14,129004,129023,14,129296,129304,14,129340,129342,14,129388,129392,14,129404,129407,14,129454,129455,14,129485,129487,14,129659,129663,14,129719,129727,14,917536,917631,5,13,13,2,1160,1161,5,1564,1564,4,1807,1807,1,2085,2087,5,2363,2363,7,2402,2403,5,2507,2508,7,2622,2624,7,2691,2691,7,2786,2787,5,2881,2884,5,3006,3006,5,3072,3072,5,3170,3171,5,3267,3268,7,3330,3331,7,3406,3406,1,3538,3540,5,3655,3662,5,3897,3897,5,4038,4038,5,4184,4185,5,4352,4447,8,6068,6069,5,6155,6157,5,6448,6449,7,6742,6742,5,6783,6783,5,6966,6970,5,7042,7042,7,7143,7143,7,7212,7219,5,7412,7412,5,8206,8207,4,8294,8303,4,8596,8601,14,9410,9410,14,9742,9742,14,9757,9757,14,9770,9770,14,9794,9794,14,9828,9828,14,9855,9855,14,9882,9882,14,9900,9903,14,9929,9933,14,9963,9967,14,9987,9988,14,10006,10006,14,10062,10062,14,10175,10175,14,11744,11775,5,42607,42607,5,43043,43044,7,43263,43263,5,43444,43445,7,43569,43570,5,43698,43700,5,43766,43766,5,44032,44032,11,44144,44144,11,44256,44256,11,44368,44368,11,44480,44480,11,44592,44592,11,44704,44704,11,44816,44816,11,44928,44928,11,45040,45040,11,45152,45152,11,45264,45264,11,45376,45376,11,45488,45488,11,45600,45600,11,45712,45712,11,45824,45824,11,45936,45936,11,46048,46048,11,46160,46160,11,46272,46272,11,46384,46384,11,46496,46496,11,46608,46608,11,46720,46720,11,46832,46832,11,46944,46944,11,47056,47056,11,47168,47168,11,47280,47280,11,47392,47392,11,47504,47504,11,47616,47616,11,47728,47728,11,47840,47840,11,47952,47952,11,48064,48064,11,48176,48176,11,48288,48288,11,48400,48400,11,48512,48512,11,48624,48624,11,48736,48736,11,48848,48848,11,48960,48960,11,49072,49072,11,49184,49184,11,49296,49296,11,49408,49408,11,49520,49520,11,49632,49632,11,49744,49744,11,49856,49856,11,49968,49968,11,50080,50080,11,50192,50192,11,50304,50304,11,50416,50416,11,50528,50528,11,50640,50640,11,50752,50752,11,50864,50864,11,50976,50976,11,51088,51088,11,51200,51200,11,51312,51312,11,51424,51424,11,51536,51536,11,51648,51648,11,51760,51760,11,51872,51872,11,51984,51984,11,52096,52096,11,52208,52208,11,52320,52320,11,52432,52432,11,52544,52544,11,52656,52656,11,52768,52768,11,52880,52880,11,52992,52992,11,53104,53104,11,53216,53216,11,53328,53328,11,53440,53440,11,53552,53552,11,53664,53664,11,53776,53776,11,53888,53888,11,54000,54000,11,54112,54112,11,54224,54224,11,54336,54336,11,54448,54448,11,54560,54560,11,54672,54672,11,54784,54784,11,54896,54896,11,55008,55008,11,55120,55120,11,64286,64286,5,66272,66272,5,68900,68903,5,69762,69762,7,69817,69818,5,69927,69931,5,70003,70003,5,70070,70078,5,70094,70094,7,70194,70195,7,70206,70206,5,70400,70401,5,70463,70463,7,70475,70477,7,70512,70516,5,70722,70724,5,70832,70832,5,70842,70842,5,70847,70848,5,71088,71089,7,71102,71102,7,71219,71226,5,71231,71232,5,71342,71343,7,71453,71455,5,71463,71467,5,71737,71738,5,71995,71996,5,72000,72000,7,72145,72147,7,72160,72160,5,72249,72249,7,72273,72278,5,72330,72342,5,72752,72758,5,72850,72871,5,72882,72883,5,73018,73018,5,73031,73031,5,73109,73109,5,73461,73462,7,94031,94031,5,94192,94193,7,119142,119142,7,119155,119162,4,119362,119364,5,121476,121476,5,122888,122904,5,123184,123190,5,126976,126979,14,127184,127231,14,127344,127345,14,127405,127461,14,127514,127514,14,127561,127567,14,127778,127779,14,127896,127896,14,127985,127986,14,127995,127999,5,128326,128328,14,128360,128366,14,128378,128378,14,128394,128397,14,128405,128406,14,128422,128423,14,128435,128443,14,128453,128464,14,128479,128480,14,128484,128487,14,128496,128498,14,128640,128709,14,128723,128724,14,128736,128741,14,128747,128748,14,128755,128755,14,128762,128762,14,128981,128991,14,129096,129103,14,129292,129292,14,129311,129311,14,129329,129330,14,129344,129349,14,129360,129374,14,129394,129394,14,129402,129402,14,129413,129425,14,129445,129450,14,129466,129471,14,129483,129483,14,129511,129535,14,129653,129655,14,129667,129670,14,129705,129711,14,129731,129743,14,917505,917505,4,917760,917999,5,10,10,3,127,159,4,768,879,5,1471,1471,5,1536,1541,1,1648,1648,5,1767,1768,5,1840,1866,5,2070,2073,5,2137,2139,5,2307,2307,7,2366,2368,7,2382,2383,7,2434,2435,7,2497,2500,5,2519,2519,5,2563,2563,7,2631,2632,5,2677,2677,5,2750,2752,7,2763,2764,7,2817,2817,5,2879,2879,5,2891,2892,7,2914,2915,5,3008,3008,5,3021,3021,5,3076,3076,5,3146,3149,5,3202,3203,7,3264,3265,7,3271,3272,7,3298,3299,5,3390,3390,5,3402,3404,7,3426,3427,5,3535,3535,5,3544,3550,7,3635,3635,7,3763,3763,7,3893,3893,5,3953,3966,5,3981,3991,5,4145,4145,7,4157,4158,5,4209,4212,5,4237,4237,5,4520,4607,10,5970,5971,5,6071,6077,5,6089,6099,5,6277,6278,5,6439,6440,5,6451,6456,7,6683,6683,5,6744,6750,5,6765,6770,7,6846,6846,5,6964,6964,5,6972,6972,5,7019,7027,5,7074,7077,5,7083,7085,5,7146,7148,7,7154,7155,7,7222,7223,5,7394,7400,5,7416,7417,5,8204,8204,5,8233,8233,4,8288,8292,4,8413,8416,5,8482,8482,14,8986,8987,14,9193,9203,14,9654,9654,14,9733,9733,14,9745,9745,14,9752,9752,14,9760,9760,14,9766,9766,14,9774,9775,14,9792,9792,14,9800,9811,14,9825,9826,14,9831,9831,14,9852,9853,14,9872,9873,14,9880,9880,14,9885,9887,14,9896,9897,14,9906,9916,14,9926,9927,14,9936,9936,14,9941,9960,14,9974,9974,14,9982,9985,14,9992,9997,14,10002,10002,14,10017,10017,14,10055,10055,14,10071,10071,14,10145,10145,14,11013,11015,14,11503,11505,5,12334,12335,5,12951,12951,14,42612,42621,5,43014,43014,5,43047,43047,7,43204,43205,5,43335,43345,5,43395,43395,7,43450,43451,7,43561,43566,5,43573,43574,5,43644,43644,5,43710,43711,5,43758,43759,7,44005,44005,5,44012,44012,7,44060,44060,11,44116,44116,11,44172,44172,11,44228,44228,11,44284,44284,11,44340,44340,11,44396,44396,11,44452,44452,11,44508,44508,11,44564,44564,11,44620,44620,11,44676,44676,11,44732,44732,11,44788,44788,11,44844,44844,11,44900,44900,11,44956,44956,11,45012,45012,11,45068,45068,11,45124,45124,11,45180,45180,11,45236,45236,11,45292,45292,11,45348,45348,11,45404,45404,11,45460,45460,11,45516,45516,11,45572,45572,11,45628,45628,11,45684,45684,11,45740,45740,11,45796,45796,11,45852,45852,11,45908,45908,11,45964,45964,11,46020,46020,11,46076,46076,11,46132,46132,11,46188,46188,11,46244,46244,11,46300,46300,11,46356,46356,11,46412,46412,11,46468,46468,11,46524,46524,11,46580,46580,11,46636,46636,11,46692,46692,11,46748,46748,11,46804,46804,11,46860,46860,11,46916,46916,11,46972,46972,11,47028,47028,11,47084,47084,11,47140,47140,11,47196,47196,11,47252,47252,11,47308,47308,11,47364,47364,11,47420,47420,11,47476,47476,11,47532,47532,11,47588,47588,11,47644,47644,11,47700,47700,11,47756,47756,11,47812,47812,11,47868,47868,11,47924,47924,11,47980,47980,11,48036,48036,11,48092,48092,11,48148,48148,11,48204,48204,11,48260,48260,11,48316,48316,11,48372,48372,11,48428,48428,11,48484,48484,11,48540,48540,11,48596,48596,11,48652,48652,11,48708,48708,11,48764,48764,11,48820,48820,11,48876,48876,11,48932,48932,11,48988,48988,11,49044,49044,11,49100,49100,11,49156,49156,11,49212,49212,11,49268,49268,11,49324,49324,11,49380,49380,11,49436,49436,11,49492,49492,11,49548,49548,11,49604,49604,11,49660,49660,11,49716,49716,11,49772,49772,11,49828,49828,11,49884,49884,11,49940,49940,11,49996,49996,11,50052,50052,11,50108,50108,11,50164,50164,11,50220,50220,11,50276,50276,11,50332,50332,11,50388,50388,11,50444,50444,11,50500,50500,11,50556,50556,11,50612,50612,11,50668,50668,11,50724,50724,11,50780,50780,11,50836,50836,11,50892,50892,11,50948,50948,11,51004,51004,11,51060,51060,11,51116,51116,11,51172,51172,11,51228,51228,11,51284,51284,11,51340,51340,11,51396,51396,11,51452,51452,11,51508,51508,11,51564,51564,11,51620,51620,11,51676,51676,11,51732,51732,11,51788,51788,11,51844,51844,11,51900,51900,11,51956,51956,11,52012,52012,11,52068,52068,11,52124,52124,11,52180,52180,11,52236,52236,11,52292,52292,11,52348,52348,11,52404,52404,11,52460,52460,11,52516,52516,11,52572,52572,11,52628,52628,11,52684,52684,11,52740,52740,11,52796,52796,11,52852,52852,11,52908,52908,11,52964,52964,11,53020,53020,11,53076,53076,11,53132,53132,11,53188,53188,11,53244,53244,11,53300,53300,11,53356,53356,11,53412,53412,11,53468,53468,11,53524,53524,11,53580,53580,11,53636,53636,11,53692,53692,11,53748,53748,11,53804,53804,11,53860,53860,11,53916,53916,11,53972,53972,11,54028,54028,11,54084,54084,11,54140,54140,11,54196,54196,11,54252,54252,11,54308,54308,11,54364,54364,11,54420,54420,11,54476,54476,11,54532,54532,11,54588,54588,11,54644,54644,11,54700,54700,11,54756,54756,11,54812,54812,11,54868,54868,11,54924,54924,11,54980,54980,11,55036,55036,11,55092,55092,11,55148,55148,11,55216,55238,9,65056,65071,5,65529,65531,4,68097,68099,5,68159,68159,5,69446,69456,5,69688,69702,5,69808,69810,7,69815,69816,7,69821,69821,1,69888,69890,5,69932,69932,7,69957,69958,7,70016,70017,5,70067,70069,7,70079,70080,7,70089,70092,5,70095,70095,5,70191,70193,5,70196,70196,5,70198,70199,5,70367,70367,5,70371,70378,5,70402,70403,7,70462,70462,5,70464,70464,5,70471,70472,7,70487,70487,5,70502,70508,5,70709,70711,7,70720,70721,7,70725,70725,7,70750,70750,5,70833,70834,7,70841,70841,7,70843,70844,7,70846,70846,7,70849,70849,7,71087,71087,5,71090,71093,5,71100,71101,5,71103,71104,5,71216,71218,7,71227,71228,7,71230,71230,7,71339,71339,5,71341,71341,5,71344,71349,5,71351,71351,5,71456,71457,7,71462,71462,7,71724,71726,7,71736,71736,7,71984,71984,5,71991,71992,7,71997,71997,7,71999,71999,1,72001,72001,1,72003,72003,5,72148,72151,5,72156,72159,7,72164,72164,7,72243,72248,5,72250,72250,1,72263,72263,5,72279,72280,7,72324,72329,1,72343,72343,7,72751,72751,7,72760,72765,5,72767,72767,5,72873,72873,7,72881,72881,7,72884,72884,7,73009,73014,5,73020,73021,5,73030,73030,1,73098,73102,7,73107,73108,7,73110,73110,7,73459,73460,5,78896,78904,4,92976,92982,5,94033,94087,7,94180,94180,5,113821,113822,5,119141,119141,5,119143,119145,5,119150,119154,5,119163,119170,5,119210,119213,5,121344,121398,5,121461,121461,5,121499,121503,5,122880,122886,5,122907,122913,5,122918,122922,5,123628,123631,5,125252,125258,5,126980,126980,14,127183,127183,14,127245,127247,14,127340,127343,14,127358,127359,14,127377,127386,14,127462,127487,6,127491,127503,14,127535,127535,14,127548,127551,14,127568,127569,14,127744,127777,14,127780,127891,14,127894,127895,14,127897,127899,14,127902,127984,14,127987,127989,14,127991,127994,14,128000,128253,14,128255,128317,14,128329,128334,14,128336,128359,14,128367,128368,14,128371,128377,14,128379,128390,14,128392,128393,14,128398,128399,14,128401,128404,14,128407,128419,14,128421,128421,14,128424,128424,14,128433,128434,14,128444,128444,14,128450,128452,14,128465,128467,14,128476,128478,14,128481,128481,14,128483,128483,14,128488,128488,14,128495,128495,14,128499,128499,14,128506,128591,14,128710,128714,14,128721,128722,14,128725,128725,14,128728,128735,14,128742,128744,14,128746,128746,14,128749,128751,14,128753,128754,14,128756,128758,14,128761,128761,14,128763,128764,14,128884,128895,14,128992,129003,14,129036,129039,14,129114,129119,14,129198,129279,14,129293,129295,14,129305,129310,14,129312,129319,14,129328,129328,14,129331,129338,14,129343,129343,14,129351,129355,14,129357,129359,14,129375,129387,14,129393,129393,14,129395,129398,14,129401,129401,14,129403,129403,14,129408,129412,14,129426,129431,14,129443,129444,14,129451,129453,14,129456,129465,14,129472,129472,14,129475,129482,14,129484,129484,14,129488,129510,14,129536,129647,14,129652,129652,14,129656,129658,14,129664,129666,14,129671,129679,14,129686,129704,14,129712,129718,14,129728,129730,14,129744,129750,14,917504,917504,4,917506,917535,4,917632,917759,4,918000,921599,4,0,9,4,11,12,4,14,31,4,169,169,14,174,174,14,1155,1159,5,1425,1469,5,1473,1474,5,1479,1479,5,1552,1562,5,1611,1631,5,1750,1756,5,1759,1764,5,1770,1773,5,1809,1809,5,1958,1968,5,2045,2045,5,2075,2083,5,2089,2093,5,2259,2273,5,2275,2306,5,2362,2362,5,2364,2364,5,2369,2376,5,2381,2381,5,2385,2391,5,2433,2433,5,2492,2492,5,2495,2496,7,2503,2504,7,2509,2509,5,2530,2531,5,2561,2562,5,2620,2620,5,2625,2626,5,2635,2637,5,2672,2673,5,2689,2690,5,2748,2748,5,2753,2757,5,2761,2761,7,2765,2765,5,2810,2815,5,2818,2819,7,2878,2878,5,2880,2880,7,2887,2888,7,2893,2893,5,2903,2903,5,2946,2946,5,3007,3007,7,3009,3010,7,3018,3020,7,3031,3031,5,3073,3075,7,3134,3136,5,3142,3144,5,3157,3158,5,3201,3201,5,3260,3260,5,3263,3263,5,3266,3266,5,3270,3270,5,3274,3275,7,3285,3286,5,3328,3329,5,3387,3388,5,3391,3392,7,3398,3400,7,3405,3405,5,3415,3415,5,3457,3457,5,3530,3530,5,3536,3537,7,3542,3542,5,3551,3551,5,3633,3633,5,3636,3642,5,3761,3761,5,3764,3772,5,3864,3865,5,3895,3895,5,3902,3903,7,3967,3967,7,3974,3975,5,3993,4028,5,4141,4144,5,4146,4151,5,4155,4156,7,4182,4183,7,4190,4192,5,4226,4226,5,4229,4230,5,4253,4253,5,4448,4519,9,4957,4959,5,5938,5940,5,6002,6003,5,6070,6070,7,6078,6085,7,6087,6088,7,6109,6109,5,6158,6158,4,6313,6313,5,6435,6438,7,6441,6443,7,6450,6450,5,6457,6459,5,6681,6682,7,6741,6741,7,6743,6743,7,6752,6752,5,6757,6764,5,6771,6780,5,6832,6845,5,6847,6848,5,6916,6916,7,6965,6965,5,6971,6971,7,6973,6977,7,6979,6980,7,7040,7041,5,7073,7073,7,7078,7079,7,7082,7082,7,7142,7142,5,7144,7145,5,7149,7149,5,7151,7153,5,7204,7211,7,7220,7221,7,7376,7378,5,7393,7393,7,7405,7405,5,7415,7415,7,7616,7673,5,8203,8203,4,8205,8205,13,8232,8232,4,8234,8238,4,8265,8265,14,8293,8293,4,8400,8412,5,8417,8417,5,8421,8432,5,8505,8505,14,8617,8618,14,9000,9000,14,9167,9167,14,9208,9210,14,9642,9643,14,9664,9664,14,9728,9732,14,9735,9741,14,9743,9744,14,9746,9746,14,9750,9751,14,9753,9756,14,9758,9759,14,9761,9761,14,9764,9765,14,9767,9769,14,9771,9773,14,9776,9783,14,9787,9791,14,9793,9793,14,9795,9799,14,9812,9822,14,9824,9824,14,9827,9827,14,9829,9830,14,9832,9832,14,9851,9851,14,9854,9854,14,9856,9861,14,9874,9876,14,9878,9879,14,9881,9881,14,9883,9884,14,9888,9889,14,9895,9895,14,9898,9899,14,9904,9905,14,9917,9918,14,9924,9925,14,9928,9928,14,9934,9935,14,9937,9937,14,9939,9940,14,9961,9962,14,9968,9973,14,9975,9978,14,9981,9981,14,9986,9986,14,9989,9989,14,9998,9998,14,10000,10001,14,10004,10004,14,10013,10013,14,10024,10024,14,10052,10052,14,10060,10060,14,10067,10069,14,10083,10084,14,10133,10135,14,10160,10160,14,10548,10549,14,11035,11036,14,11093,11093,14,11647,11647,5,12330,12333,5,12336,12336,14,12441,12442,5,12953,12953,14,42608,42610,5,42654,42655,5,43010,43010,5,43019,43019,5,43045,43046,5,43052,43052,5,43188,43203,7,43232,43249,5,43302,43309,5,43346,43347,7,43392,43394,5,43443,43443,5,43446,43449,5,43452,43453,5,43493,43493,5,43567,43568,7,43571,43572,7,43587,43587,5,43597,43597,7,43696,43696,5,43703,43704,5,43713,43713,5,43756,43757,5,43765,43765,7,44003,44004,7,44006,44007,7,44009,44010,7,44013,44013,5,44033,44059,12,44061,44087,12,44089,44115,12,44117,44143,12,44145,44171,12,44173,44199,12,44201,44227,12,44229,44255,12,44257,44283,12,44285,44311,12,44313,44339,12,44341,44367,12,44369,44395,12,44397,44423,12,44425,44451,12,44453,44479,12,44481,44507,12,44509,44535,12,44537,44563,12,44565,44591,12,44593,44619,12,44621,44647,12,44649,44675,12,44677,44703,12,44705,44731,12,44733,44759,12,44761,44787,12,44789,44815,12,44817,44843,12,44845,44871,12,44873,44899,12,44901,44927,12,44929,44955,12,44957,44983,12,44985,45011,12,45013,45039,12,45041,45067,12,45069,45095,12,45097,45123,12,45125,45151,12,45153,45179,12,45181,45207,12,45209,45235,12,45237,45263,12,45265,45291,12,45293,45319,12,45321,45347,12,45349,45375,12,45377,45403,12,45405,45431,12,45433,45459,12,45461,45487,12,45489,45515,12,45517,45543,12,45545,45571,12,45573,45599,12,45601,45627,12,45629,45655,12,45657,45683,12,45685,45711,12,45713,45739,12,45741,45767,12,45769,45795,12,45797,45823,12,45825,45851,12,45853,45879,12,45881,45907,12,45909,45935,12,45937,45963,12,45965,45991,12,45993,46019,12,46021,46047,12,46049,46075,12,46077,46103,12,46105,46131,12,46133,46159,12,46161,46187,12,46189,46215,12,46217,46243,12,46245,46271,12,46273,46299,12,46301,46327,12,46329,46355,12,46357,46383,12,46385,46411,12,46413,46439,12,46441,46467,12,46469,46495,12,46497,46523,12,46525,46551,12,46553,46579,12,46581,46607,12,46609,46635,12,46637,46663,12,46665,46691,12,46693,46719,12,46721,46747,12,46749,46775,12,46777,46803,12,46805,46831,12,46833,46859,12,46861,46887,12,46889,46915,12,46917,46943,12,46945,46971,12,46973,46999,12,47001,47027,12,47029,47055,12,47057,47083,12,47085,47111,12,47113,47139,12,47141,47167,12,47169,47195,12,47197,47223,12,47225,47251,12,47253,47279,12,47281,47307,12,47309,47335,12,47337,47363,12,47365,47391,12,47393,47419,12,47421,47447,12,47449,47475,12,47477,47503,12,47505,47531,12,47533,47559,12,47561,47587,12,47589,47615,12,47617,47643,12,47645,47671,12,47673,47699,12,47701,47727,12,47729,47755,12,47757,47783,12,47785,47811,12,47813,47839,12,47841,47867,12,47869,47895,12,47897,47923,12,47925,47951,12,47953,47979,12,47981,48007,12,48009,48035,12,48037,48063,12,48065,48091,12,48093,48119,12,48121,48147,12,48149,48175,12,48177,48203,12,48205,48231,12,48233,48259,12,48261,48287,12,48289,48315,12,48317,48343,12,48345,48371,12,48373,48399,12,48401,48427,12,48429,48455,12,48457,48483,12,48485,48511,12,48513,48539,12,48541,48567,12,48569,48595,12,48597,48623,12,48625,48651,12,48653,48679,12,48681,48707,12,48709,48735,12,48737,48763,12,48765,48791,12,48793,48819,12,48821,48847,12,48849,48875,12,48877,48903,12,48905,48931,12,48933,48959,12,48961,48987,12,48989,49015,12,49017,49043,12,49045,49071,12,49073,49099,12,49101,49127,12,49129,49155,12,49157,49183,12,49185,49211,12,49213,49239,12,49241,49267,12,49269,49295,12,49297,49323,12,49325,49351,12,49353,49379,12,49381,49407,12,49409,49435,12,49437,49463,12,49465,49491,12,49493,49519,12,49521,49547,12,49549,49575,12,49577,49603,12,49605,49631,12,49633,49659,12,49661,49687,12,49689,49715,12,49717,49743,12,49745,49771,12,49773,49799,12,49801,49827,12,49829,49855,12,49857,49883,12,49885,49911,12,49913,49939,12,49941,49967,12,49969,49995,12,49997,50023,12,50025,50051,12,50053,50079,12,50081,50107,12,50109,50135,12,50137,50163,12,50165,50191,12,50193,50219,12,50221,50247,12,50249,50275,12,50277,50303,12,50305,50331,12,50333,50359,12,50361,50387,12,50389,50415,12,50417,50443,12,50445,50471,12,50473,50499,12,50501,50527,12,50529,50555,12,50557,50583,12,50585,50611,12,50613,50639,12,50641,50667,12,50669,50695,12,50697,50723,12,50725,50751,12,50753,50779,12,50781,50807,12,50809,50835,12,50837,50863,12,50865,50891,12,50893,50919,12,50921,50947,12,50949,50975,12,50977,51003,12,51005,51031,12,51033,51059,12,51061,51087,12,51089,51115,12,51117,51143,12,51145,51171,12,51173,51199,12,51201,51227,12,51229,51255,12,51257,51283,12,51285,51311,12,51313,51339,12,51341,51367,12,51369,51395,12,51397,51423,12,51425,51451,12,51453,51479,12,51481,51507,12,51509,51535,12,51537,51563,12,51565,51591,12,51593,51619,12,51621,51647,12,51649,51675,12,51677,51703,12,51705,51731,12,51733,51759,12,51761,51787,12,51789,51815,12,51817,51843,12,51845,51871,12,51873,51899,12,51901,51927,12,51929,51955,12,51957,51983,12,51985,52011,12,52013,52039,12,52041,52067,12,52069,52095,12,52097,52123,12,52125,52151,12,52153,52179,12,52181,52207,12,52209,52235,12,52237,52263,12,52265,52291,12,52293,52319,12,52321,52347,12,52349,52375,12,52377,52403,12,52405,52431,12,52433,52459,12,52461,52487,12,52489,52515,12,52517,52543,12,52545,52571,12,52573,52599,12,52601,52627,12,52629,52655,12,52657,52683,12,52685,52711,12,52713,52739,12,52741,52767,12,52769,52795,12,52797,52823,12,52825,52851,12,52853,52879,12,52881,52907,12,52909,52935,12,52937,52963,12,52965,52991,12,52993,53019,12,53021,53047,12,53049,53075,12,53077,53103,12,53105,53131,12,53133,53159,12,53161,53187,12,53189,53215,12,53217,53243,12,53245,53271,12,53273,53299,12,53301,53327,12,53329,53355,12,53357,53383,12,53385,53411,12,53413,53439,12,53441,53467,12,53469,53495,12,53497,53523,12,53525,53551,12,53553,53579,12,53581,53607,12,53609,53635,12,53637,53663,12,53665,53691,12,53693,53719,12,53721,53747,12,53749,53775,12,53777,53803,12,53805,53831,12,53833,53859,12,53861,53887,12,53889,53915,12,53917,53943,12,53945,53971,12,53973,53999,12,54001,54027,12,54029,54055,12,54057,54083,12,54085,54111,12,54113,54139,12,54141,54167,12,54169,54195,12,54197,54223,12,54225,54251,12,54253,54279,12,54281,54307,12,54309,54335,12,54337,54363,12,54365,54391,12,54393,54419,12,54421,54447,12,54449,54475,12,54477,54503,12,54505,54531,12,54533,54559,12,54561,54587,12,54589,54615,12,54617,54643,12,54645,54671,12,54673,54699,12,54701,54727,12,54729,54755,12,54757,54783,12,54785,54811,12,54813,54839,12,54841,54867,12,54869,54895,12,54897,54923,12,54925,54951,12,54953,54979,12,54981,55007,12,55009,55035,12,55037,55063,12,55065,55091,12,55093,55119,12,55121,55147,12,55149,55175,12,55177,55203,12,55243,55291,10,65024,65039,5,65279,65279,4,65520,65528,4,66045,66045,5,66422,66426,5,68101,68102,5,68152,68154,5,68325,68326,5,69291,69292,5,69632,69632,7,69634,69634,7,69759,69761,5]');\r\n}\r\n//#endregion\r\n/**\r\n * Computes the offset after performing a left delete on the given string,\r\n * while considering unicode grapheme/emoji rules.\r\n*/\r\nexport function getLeftDeleteOffset(offset, str) {\r\n if (offset === 0) {\r\n return 0;\r\n }\r\n // Try to delete emoji part.\r\n const emojiOffset = getOffsetBeforeLastEmojiComponent(offset, str);\r\n if (emojiOffset !== undefined) {\r\n return emojiOffset;\r\n }\r\n // Otherwise, just skip a single code point.\r\n const codePoint = getPrevCodePoint(str, offset);\r\n offset -= getUTF16Length(codePoint);\r\n return offset;\r\n}\r\nfunction getOffsetBeforeLastEmojiComponent(offset, str) {\r\n // See https://www.unicode.org/reports/tr51/tr51-14.html#EBNF_and_Regex for the\r\n // structure of emojis.\r\n let codePoint = getPrevCodePoint(str, offset);\r\n offset -= getUTF16Length(codePoint);\r\n // Skip modifiers\r\n while ((isEmojiModifier(codePoint) || codePoint === 65039 /* emojiVariantSelector */ || codePoint === 8419 /* enclosingKeyCap */)) {\r\n if (offset === 0) {\r\n // Cannot skip modifier, no preceding emoji base.\r\n return undefined;\r\n }\r\n codePoint = getPrevCodePoint(str, offset);\r\n offset -= getUTF16Length(codePoint);\r\n }\r\n // Expect base emoji\r\n if (!isEmojiImprecise(codePoint)) {\r\n // Unexpected code point, not a valid emoji.\r\n return undefined;\r\n }\r\n if (offset >= 0) {\r\n // Skip optional ZWJ code points that combine multiple emojis.\r\n // In theory, we should check if that ZWJ actually combines multiple emojis\r\n // to prevent deleting ZWJs in situations we didn't account for.\r\n const optionalZwjCodePoint = getPrevCodePoint(str, offset);\r\n if (optionalZwjCodePoint === 8205 /* zwj */) {\r\n offset -= getUTF16Length(optionalZwjCodePoint);\r\n }\r\n }\r\n return offset;\r\n}\r\nfunction getUTF16Length(codePoint) {\r\n return codePoint >= 65536 /* UNICODE_SUPPLEMENTARY_PLANE_BEGIN */ ? 2 : 1;\r\n}\r\nfunction isEmojiModifier(codePoint) {\r\n return 0x1F3FB <= codePoint && codePoint <= 0x1F3FF;\r\n}\r\n","/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nimport * as strings from './strings.js';\r\n/**\r\n * Return a hash value for an object.\r\n */\r\nexport function hash(obj) {\r\n return doHash(obj, 0);\r\n}\r\nexport function doHash(obj, hashVal) {\r\n switch (typeof obj) {\r\n case 'object':\r\n if (obj === null) {\r\n return numberHash(349, hashVal);\r\n }\r\n else if (Array.isArray(obj)) {\r\n return arrayHash(obj, hashVal);\r\n }\r\n return objectHash(obj, hashVal);\r\n case 'string':\r\n return stringHash(obj, hashVal);\r\n case 'boolean':\r\n return booleanHash(obj, hashVal);\r\n case 'number':\r\n return numberHash(obj, hashVal);\r\n case 'undefined':\r\n return numberHash(937, hashVal);\r\n default:\r\n return numberHash(617, hashVal);\r\n }\r\n}\r\nfunction numberHash(val, initialHashVal) {\r\n return (((initialHashVal << 5) - initialHashVal) + val) | 0; // hashVal * 31 + ch, keep as int32\r\n}\r\nfunction booleanHash(b, initialHashVal) {\r\n return numberHash(b ? 433 : 863, initialHashVal);\r\n}\r\nexport function stringHash(s, hashVal) {\r\n hashVal = numberHash(149417, hashVal);\r\n for (let i = 0, length = s.length; i < length; i++) {\r\n hashVal = numberHash(s.charCodeAt(i), hashVal);\r\n }\r\n return hashVal;\r\n}\r\nfunction arrayHash(arr, initialHashVal) {\r\n initialHashVal = numberHash(104579, initialHashVal);\r\n return arr.reduce((hashVal, item) => doHash(item, hashVal), initialHashVal);\r\n}\r\nfunction objectHash(obj, initialHashVal) {\r\n initialHashVal = numberHash(181387, initialHashVal);\r\n return Object.keys(obj).sort().reduce((hashVal, key) => {\r\n hashVal = stringHash(key, hashVal);\r\n return doHash(obj[key], hashVal);\r\n }, initialHashVal);\r\n}\r\nfunction leftRotate(value, bits, totalBits = 32) {\r\n // delta + bits = totalBits\r\n const delta = totalBits - bits;\r\n // All ones, expect `delta` zeros aligned to the right\r\n const mask = ~((1 << delta) - 1);\r\n // Join (value left-shifted `bits` bits) with (masked value right-shifted `delta` bits)\r\n return ((value << bits) | ((mask & value) >>> delta)) >>> 0;\r\n}\r\nfunction fill(dest, index = 0, count = dest.byteLength, value = 0) {\r\n for (let i = 0; i < count; i++) {\r\n dest[index + i] = value;\r\n }\r\n}\r\nfunction leftPad(value, length, char = '0') {\r\n while (value.length < length) {\r\n value = char + value;\r\n }\r\n return value;\r\n}\r\nexport function toHexString(bufferOrValue, bitsize = 32) {\r\n if (bufferOrValue instanceof ArrayBuffer) {\r\n return Array.from(new Uint8Array(bufferOrValue)).map(b => b.toString(16).padStart(2, '0')).join('');\r\n }\r\n return leftPad((bufferOrValue >>> 0).toString(16), bitsize / 4);\r\n}\r\n/**\r\n * A SHA1 implementation that works with strings and does not allocate.\r\n */\r\nexport class StringSHA1 {\r\n constructor() {\r\n this._h0 = 0x67452301;\r\n this._h1 = 0xEFCDAB89;\r\n this._h2 = 0x98BADCFE;\r\n this._h3 = 0x10325476;\r\n this._h4 = 0xC3D2E1F0;\r\n this._buff = new Uint8Array(64 /* BLOCK_SIZE */ + 3 /* to fit any utf-8 */);\r\n this._buffDV = new DataView(this._buff.buffer);\r\n this._buffLen = 0;\r\n this._totalLen = 0;\r\n this._leftoverHighSurrogate = 0;\r\n this._finished = false;\r\n }\r\n update(str) {\r\n const strLen = str.length;\r\n if (strLen === 0) {\r\n return;\r\n }\r\n const buff = this._buff;\r\n let buffLen = this._buffLen;\r\n let leftoverHighSurrogate = this._leftoverHighSurrogate;\r\n let charCode;\r\n let offset;\r\n if (leftoverHighSurrogate !== 0) {\r\n charCode = leftoverHighSurrogate;\r\n offset = -1;\r\n leftoverHighSurrogate = 0;\r\n }\r\n else {\r\n charCode = str.charCodeAt(0);\r\n offset = 0;\r\n }\r\n while (true) {\r\n let codePoint = charCode;\r\n if (strings.isHighSurrogate(charCode)) {\r\n if (offset + 1 < strLen) {\r\n const nextCharCode = str.charCodeAt(offset + 1);\r\n if (strings.isLowSurrogate(nextCharCode)) {\r\n offset++;\r\n codePoint = strings.computeCodePoint(charCode, nextCharCode);\r\n }\r\n else {\r\n // illegal => unicode replacement character\r\n codePoint = 65533 /* UNICODE_REPLACEMENT */;\r\n }\r\n }\r\n else {\r\n // last character is a surrogate pair\r\n leftoverHighSurrogate = charCode;\r\n break;\r\n }\r\n }\r\n else if (strings.isLowSurrogate(charCode)) {\r\n // illegal => unicode replacement character\r\n codePoint = 65533 /* UNICODE_REPLACEMENT */;\r\n }\r\n buffLen = this._push(buff, buffLen, codePoint);\r\n offset++;\r\n if (offset < strLen) {\r\n charCode = str.charCodeAt(offset);\r\n }\r\n else {\r\n break;\r\n }\r\n }\r\n this._buffLen = buffLen;\r\n this._leftoverHighSurrogate = leftoverHighSurrogate;\r\n }\r\n _push(buff, buffLen, codePoint) {\r\n if (codePoint < 0x0080) {\r\n buff[buffLen++] = codePoint;\r\n }\r\n else if (codePoint < 0x0800) {\r\n buff[buffLen++] = 0b11000000 | ((codePoint & 0b00000000000000000000011111000000) >>> 6);\r\n buff[buffLen++] = 0b10000000 | ((codePoint & 0b00000000000000000000000000111111) >>> 0);\r\n }\r\n else if (codePoint < 0x10000) {\r\n buff[buffLen++] = 0b11100000 | ((codePoint & 0b00000000000000001111000000000000) >>> 12);\r\n buff[buffLen++] = 0b10000000 | ((codePoint & 0b00000000000000000000111111000000) >>> 6);\r\n buff[buffLen++] = 0b10000000 | ((codePoint & 0b00000000000000000000000000111111) >>> 0);\r\n }\r\n else {\r\n buff[buffLen++] = 0b11110000 | ((codePoint & 0b00000000000111000000000000000000) >>> 18);\r\n buff[buffLen++] = 0b10000000 | ((codePoint & 0b00000000000000111111000000000000) >>> 12);\r\n buff[buffLen++] = 0b10000000 | ((codePoint & 0b00000000000000000000111111000000) >>> 6);\r\n buff[buffLen++] = 0b10000000 | ((codePoint & 0b00000000000000000000000000111111) >>> 0);\r\n }\r\n if (buffLen >= 64 /* BLOCK_SIZE */) {\r\n this._step();\r\n buffLen -= 64 /* BLOCK_SIZE */;\r\n this._totalLen += 64 /* BLOCK_SIZE */;\r\n // take last 3 in case of UTF8 overflow\r\n buff[0] = buff[64 /* BLOCK_SIZE */ + 0];\r\n buff[1] = buff[64 /* BLOCK_SIZE */ + 1];\r\n buff[2] = buff[64 /* BLOCK_SIZE */ + 2];\r\n }\r\n return buffLen;\r\n }\r\n digest() {\r\n if (!this._finished) {\r\n this._finished = true;\r\n if (this._leftoverHighSurrogate) {\r\n // illegal => unicode replacement character\r\n this._leftoverHighSurrogate = 0;\r\n this._buffLen = this._push(this._buff, this._buffLen, 65533 /* UNICODE_REPLACEMENT */);\r\n }\r\n this._totalLen += this._buffLen;\r\n this._wrapUp();\r\n }\r\n return toHexString(this._h0) + toHexString(this._h1) + toHexString(this._h2) + toHexString(this._h3) + toHexString(this._h4);\r\n }\r\n _wrapUp() {\r\n this._buff[this._buffLen++] = 0x80;\r\n fill(this._buff, this._buffLen);\r\n if (this._buffLen > 56) {\r\n this._step();\r\n fill(this._buff);\r\n }\r\n // this will fit because the mantissa can cover up to 52 bits\r\n const ml = 8 * this._totalLen;\r\n this._buffDV.setUint32(56, Math.floor(ml / 4294967296), false);\r\n this._buffDV.setUint32(60, ml % 4294967296, false);\r\n this._step();\r\n }\r\n _step() {\r\n const bigBlock32 = StringSHA1._bigBlock32;\r\n const data = this._buffDV;\r\n for (let j = 0; j < 64 /* 16*4 */; j += 4) {\r\n bigBlock32.setUint32(j, data.getUint32(j, false), false);\r\n }\r\n for (let j = 64; j < 320 /* 80*4 */; j += 4) {\r\n bigBlock32.setUint32(j, leftRotate((bigBlock32.getUint32(j - 12, false) ^ bigBlock32.getUint32(j - 32, false) ^ bigBlock32.getUint32(j - 56, false) ^ bigBlock32.getUint32(j - 64, false)), 1), false);\r\n }\r\n let a = this._h0;\r\n let b = this._h1;\r\n let c = this._h2;\r\n let d = this._h3;\r\n let e = this._h4;\r\n let f, k;\r\n let temp;\r\n for (let j = 0; j < 80; j++) {\r\n if (j < 20) {\r\n f = (b & c) | ((~b) & d);\r\n k = 0x5A827999;\r\n }\r\n else if (j < 40) {\r\n f = b ^ c ^ d;\r\n k = 0x6ED9EBA1;\r\n }\r\n else if (j < 60) {\r\n f = (b & c) | (b & d) | (c & d);\r\n k = 0x8F1BBCDC;\r\n }\r\n else {\r\n f = b ^ c ^ d;\r\n k = 0xCA62C1D6;\r\n }\r\n temp = (leftRotate(a, 5) + f + e + k + bigBlock32.getUint32(j * 4, false)) & 0xffffffff;\r\n e = d;\r\n d = c;\r\n c = leftRotate(b, 30);\r\n b = a;\r\n a = temp;\r\n }\r\n this._h0 = (this._h0 + a) & 0xffffffff;\r\n this._h1 = (this._h1 + b) & 0xffffffff;\r\n this._h2 = (this._h2 + c) & 0xffffffff;\r\n this._h3 = (this._h3 + d) & 0xffffffff;\r\n this._h4 = (this._h4 + e) & 0xffffffff;\r\n }\r\n}\r\nStringSHA1._bigBlock32 = new DataView(new ArrayBuffer(320)); // 80 * 4 = 320\r\n","/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nimport { DiffChange } from './diffChange.js';\r\nimport { stringHash } from '../hash.js';\r\nexport class StringDiffSequence {\r\n constructor(source) {\r\n this.source = source;\r\n }\r\n getElements() {\r\n const source = this.source;\r\n const characters = new Int32Array(source.length);\r\n for (let i = 0, len = source.length; i < len; i++) {\r\n characters[i] = source.charCodeAt(i);\r\n }\r\n return characters;\r\n }\r\n}\r\nexport function stringDiff(original, modified, pretty) {\r\n return new LcsDiff(new StringDiffSequence(original), new StringDiffSequence(modified)).ComputeDiff(pretty).changes;\r\n}\r\n//\r\n// The code below has been ported from a C# implementation in VS\r\n//\r\nexport class Debug {\r\n static Assert(condition, message) {\r\n if (!condition) {\r\n throw new Error(message);\r\n }\r\n }\r\n}\r\nexport class MyArray {\r\n /**\r\n * Copies a range of elements from an Array starting at the specified source index and pastes\r\n * them to another Array starting at the specified destination index. The length and the indexes\r\n * are specified as 64-bit integers.\r\n * sourceArray:\r\n *\t\tThe Array that contains the data to copy.\r\n * sourceIndex:\r\n *\t\tA 64-bit integer that represents the index in the sourceArray at which copying begins.\r\n * destinationArray:\r\n *\t\tThe Array that receives the data.\r\n * destinationIndex:\r\n *\t\tA 64-bit integer that represents the index in the destinationArray at which storing begins.\r\n * length:\r\n *\t\tA 64-bit integer that represents the number of elements to copy.\r\n */\r\n static Copy(sourceArray, sourceIndex, destinationArray, destinationIndex, length) {\r\n for (let i = 0; i < length; i++) {\r\n destinationArray[destinationIndex + i] = sourceArray[sourceIndex + i];\r\n }\r\n }\r\n static Copy2(sourceArray, sourceIndex, destinationArray, destinationIndex, length) {\r\n for (let i = 0; i < length; i++) {\r\n destinationArray[destinationIndex + i] = sourceArray[sourceIndex + i];\r\n }\r\n }\r\n}\r\n/**\r\n * A utility class which helps to create the set of DiffChanges from\r\n * a difference operation. This class accepts original DiffElements and\r\n * modified DiffElements that are involved in a particular change. The\r\n * MarktNextChange() method can be called to mark the separation between\r\n * distinct changes. At the end, the Changes property can be called to retrieve\r\n * the constructed changes.\r\n */\r\nclass DiffChangeHelper {\r\n /**\r\n * Constructs a new DiffChangeHelper for the given DiffSequences.\r\n */\r\n constructor() {\r\n this.m_changes = [];\r\n this.m_originalStart = 1073741824 /* MAX_SAFE_SMALL_INTEGER */;\r\n this.m_modifiedStart = 1073741824 /* MAX_SAFE_SMALL_INTEGER */;\r\n this.m_originalCount = 0;\r\n this.m_modifiedCount = 0;\r\n }\r\n /**\r\n * Marks the beginning of the next change in the set of differences.\r\n */\r\n MarkNextChange() {\r\n // Only add to the list if there is something to add\r\n if (this.m_originalCount > 0 || this.m_modifiedCount > 0) {\r\n // Add the new change to our list\r\n this.m_changes.push(new DiffChange(this.m_originalStart, this.m_originalCount, this.m_modifiedStart, this.m_modifiedCount));\r\n }\r\n // Reset for the next change\r\n this.m_originalCount = 0;\r\n this.m_modifiedCount = 0;\r\n this.m_originalStart = 1073741824 /* MAX_SAFE_SMALL_INTEGER */;\r\n this.m_modifiedStart = 1073741824 /* MAX_SAFE_SMALL_INTEGER */;\r\n }\r\n /**\r\n * Adds the original element at the given position to the elements\r\n * affected by the current change. The modified index gives context\r\n * to the change position with respect to the original sequence.\r\n * @param originalIndex The index of the original element to add.\r\n * @param modifiedIndex The index of the modified element that provides corresponding position in the modified sequence.\r\n */\r\n AddOriginalElement(originalIndex, modifiedIndex) {\r\n // The 'true' start index is the smallest of the ones we've seen\r\n this.m_originalStart = Math.min(this.m_originalStart, originalIndex);\r\n this.m_modifiedStart = Math.min(this.m_modifiedStart, modifiedIndex);\r\n this.m_originalCount++;\r\n }\r\n /**\r\n * Adds the modified element at the given position to the elements\r\n * affected by the current change. The original index gives context\r\n * to the change position with respect to the modified sequence.\r\n * @param originalIndex The index of the original element that provides corresponding position in the original sequence.\r\n * @param modifiedIndex The index of the modified element to add.\r\n */\r\n AddModifiedElement(originalIndex, modifiedIndex) {\r\n // The 'true' start index is the smallest of the ones we've seen\r\n this.m_originalStart = Math.min(this.m_originalStart, originalIndex);\r\n this.m_modifiedStart = Math.min(this.m_modifiedStart, modifiedIndex);\r\n this.m_modifiedCount++;\r\n }\r\n /**\r\n * Retrieves all of the changes marked by the class.\r\n */\r\n getChanges() {\r\n if (this.m_originalCount > 0 || this.m_modifiedCount > 0) {\r\n // Finish up on whatever is left\r\n this.MarkNextChange();\r\n }\r\n return this.m_changes;\r\n }\r\n /**\r\n * Retrieves all of the changes marked by the class in the reverse order\r\n */\r\n getReverseChanges() {\r\n if (this.m_originalCount > 0 || this.m_modifiedCount > 0) {\r\n // Finish up on whatever is left\r\n this.MarkNextChange();\r\n }\r\n this.m_changes.reverse();\r\n return this.m_changes;\r\n }\r\n}\r\n/**\r\n * An implementation of the difference algorithm described in\r\n * \"An O(ND) Difference Algorithm and its variations\" by Eugene W. Myers\r\n */\r\nexport class LcsDiff {\r\n /**\r\n * Constructs the DiffFinder\r\n */\r\n constructor(originalSequence, modifiedSequence, continueProcessingPredicate = null) {\r\n this.ContinueProcessingPredicate = continueProcessingPredicate;\r\n this._originalSequence = originalSequence;\r\n this._modifiedSequence = modifiedSequence;\r\n const [originalStringElements, originalElementsOrHash, originalHasStrings] = LcsDiff._getElements(originalSequence);\r\n const [modifiedStringElements, modifiedElementsOrHash, modifiedHasStrings] = LcsDiff._getElements(modifiedSequence);\r\n this._hasStrings = (originalHasStrings && modifiedHasStrings);\r\n this._originalStringElements = originalStringElements;\r\n this._originalElementsOrHash = originalElementsOrHash;\r\n this._modifiedStringElements = modifiedStringElements;\r\n this._modifiedElementsOrHash = modifiedElementsOrHash;\r\n this.m_forwardHistory = [];\r\n this.m_reverseHistory = [];\r\n }\r\n static _isStringArray(arr) {\r\n return (arr.length > 0 && typeof arr[0] === 'string');\r\n }\r\n static _getElements(sequence) {\r\n const elements = sequence.getElements();\r\n if (LcsDiff._isStringArray(elements)) {\r\n const hashes = new Int32Array(elements.length);\r\n for (let i = 0, len = elements.length; i < len; i++) {\r\n hashes[i] = stringHash(elements[i], 0);\r\n }\r\n return [elements, hashes, true];\r\n }\r\n if (elements instanceof Int32Array) {\r\n return [[], elements, false];\r\n }\r\n return [[], new Int32Array(elements), false];\r\n }\r\n ElementsAreEqual(originalIndex, newIndex) {\r\n if (this._originalElementsOrHash[originalIndex] !== this._modifiedElementsOrHash[newIndex]) {\r\n return false;\r\n }\r\n return (this._hasStrings ? this._originalStringElements[originalIndex] === this._modifiedStringElements[newIndex] : true);\r\n }\r\n ElementsAreStrictEqual(originalIndex, newIndex) {\r\n if (!this.ElementsAreEqual(originalIndex, newIndex)) {\r\n return false;\r\n }\r\n const originalElement = LcsDiff._getStrictElement(this._originalSequence, originalIndex);\r\n const modifiedElement = LcsDiff._getStrictElement(this._modifiedSequence, newIndex);\r\n return (originalElement === modifiedElement);\r\n }\r\n static _getStrictElement(sequence, index) {\r\n if (typeof sequence.getStrictElement === 'function') {\r\n return sequence.getStrictElement(index);\r\n }\r\n return null;\r\n }\r\n OriginalElementsAreEqual(index1, index2) {\r\n if (this._originalElementsOrHash[index1] !== this._originalElementsOrHash[index2]) {\r\n return false;\r\n }\r\n return (this._hasStrings ? this._originalStringElements[index1] === this._originalStringElements[index2] : true);\r\n }\r\n ModifiedElementsAreEqual(index1, index2) {\r\n if (this._modifiedElementsOrHash[index1] !== this._modifiedElementsOrHash[index2]) {\r\n return false;\r\n }\r\n return (this._hasStrings ? this._modifiedStringElements[index1] === this._modifiedStringElements[index2] : true);\r\n }\r\n ComputeDiff(pretty) {\r\n return this._ComputeDiff(0, this._originalElementsOrHash.length - 1, 0, this._modifiedElementsOrHash.length - 1, pretty);\r\n }\r\n /**\r\n * Computes the differences between the original and modified input\r\n * sequences on the bounded range.\r\n * @returns An array of the differences between the two input sequences.\r\n */\r\n _ComputeDiff(originalStart, originalEnd, modifiedStart, modifiedEnd, pretty) {\r\n const quitEarlyArr = [false];\r\n let changes = this.ComputeDiffRecursive(originalStart, originalEnd, modifiedStart, modifiedEnd, quitEarlyArr);\r\n if (pretty) {\r\n // We have to clean up the computed diff to be more intuitive\r\n // but it turns out this cannot be done correctly until the entire set\r\n // of diffs have been computed\r\n changes = this.PrettifyChanges(changes);\r\n }\r\n return {\r\n quitEarly: quitEarlyArr[0],\r\n changes: changes\r\n };\r\n }\r\n /**\r\n * Private helper method which computes the differences on the bounded range\r\n * recursively.\r\n * @returns An array of the differences between the two input sequences.\r\n */\r\n ComputeDiffRecursive(originalStart, originalEnd, modifiedStart, modifiedEnd, quitEarlyArr) {\r\n quitEarlyArr[0] = false;\r\n // Find the start of the differences\r\n while (originalStart <= originalEnd && modifiedStart <= modifiedEnd && this.ElementsAreEqual(originalStart, modifiedStart)) {\r\n originalStart++;\r\n modifiedStart++;\r\n }\r\n // Find the end of the differences\r\n while (originalEnd >= originalStart && modifiedEnd >= modifiedStart && this.ElementsAreEqual(originalEnd, modifiedEnd)) {\r\n originalEnd--;\r\n modifiedEnd--;\r\n }\r\n // In the special case where we either have all insertions or all deletions or the sequences are identical\r\n if (originalStart > originalEnd || modifiedStart > modifiedEnd) {\r\n let changes;\r\n if (modifiedStart <= modifiedEnd) {\r\n Debug.Assert(originalStart === originalEnd + 1, 'originalStart should only be one more than originalEnd');\r\n // All insertions\r\n changes = [\r\n new DiffChange(originalStart, 0, modifiedStart, modifiedEnd - modifiedStart + 1)\r\n ];\r\n }\r\n else if (originalStart <= originalEnd) {\r\n Debug.Assert(modifiedStart === modifiedEnd + 1, 'modifiedStart should only be one more than modifiedEnd');\r\n // All deletions\r\n changes = [\r\n new DiffChange(originalStart, originalEnd - originalStart + 1, modifiedStart, 0)\r\n ];\r\n }\r\n else {\r\n Debug.Assert(originalStart === originalEnd + 1, 'originalStart should only be one more than originalEnd');\r\n Debug.Assert(modifiedStart === modifiedEnd + 1, 'modifiedStart should only be one more than modifiedEnd');\r\n // Identical sequences - No differences\r\n changes = [];\r\n }\r\n return changes;\r\n }\r\n // This problem can be solved using the Divide-And-Conquer technique.\r\n const midOriginalArr = [0];\r\n const midModifiedArr = [0];\r\n const result = this.ComputeRecursionPoint(originalStart, originalEnd, modifiedStart, modifiedEnd, midOriginalArr, midModifiedArr, quitEarlyArr);\r\n const midOriginal = midOriginalArr[0];\r\n const midModified = midModifiedArr[0];\r\n if (result !== null) {\r\n // Result is not-null when there was enough memory to compute the changes while\r\n // searching for the recursion point\r\n return result;\r\n }\r\n else if (!quitEarlyArr[0]) {\r\n // We can break the problem down recursively by finding the changes in the\r\n // First Half: (originalStart, modifiedStart) to (midOriginal, midModified)\r\n // Second Half: (midOriginal + 1, minModified + 1) to (originalEnd, modifiedEnd)\r\n // NOTE: ComputeDiff() is inclusive, therefore the second range starts on the next point\r\n const leftChanges = this.ComputeDiffRecursive(originalStart, midOriginal, modifiedStart, midModified, quitEarlyArr);\r\n let rightChanges = [];\r\n if (!quitEarlyArr[0]) {\r\n rightChanges = this.ComputeDiffRecursive(midOriginal + 1, originalEnd, midModified + 1, modifiedEnd, quitEarlyArr);\r\n }\r\n else {\r\n // We did't have time to finish the first half, so we don't have time to compute this half.\r\n // Consider the entire rest of the sequence different.\r\n rightChanges = [\r\n new DiffChange(midOriginal + 1, originalEnd - (midOriginal + 1) + 1, midModified + 1, modifiedEnd - (midModified + 1) + 1)\r\n ];\r\n }\r\n return this.ConcatenateChanges(leftChanges, rightChanges);\r\n }\r\n // If we hit here, we quit early, and so can't return anything meaningful\r\n return [\r\n new DiffChange(originalStart, originalEnd - originalStart + 1, modifiedStart, modifiedEnd - modifiedStart + 1)\r\n ];\r\n }\r\n WALKTRACE(diagonalForwardBase, diagonalForwardStart, diagonalForwardEnd, diagonalForwardOffset, diagonalReverseBase, diagonalReverseStart, diagonalReverseEnd, diagonalReverseOffset, forwardPoints, reversePoints, originalIndex, originalEnd, midOriginalArr, modifiedIndex, modifiedEnd, midModifiedArr, deltaIsEven, quitEarlyArr) {\r\n let forwardChanges = null;\r\n let reverseChanges = null;\r\n // First, walk backward through the forward diagonals history\r\n let changeHelper = new DiffChangeHelper();\r\n let diagonalMin = diagonalForwardStart;\r\n let diagonalMax = diagonalForwardEnd;\r\n let diagonalRelative = (midOriginalArr[0] - midModifiedArr[0]) - diagonalForwardOffset;\r\n let lastOriginalIndex = -1073741824 /* MIN_SAFE_SMALL_INTEGER */;\r\n let historyIndex = this.m_forwardHistory.length - 1;\r\n do {\r\n // Get the diagonal index from the relative diagonal number\r\n const diagonal = diagonalRelative + diagonalForwardBase;\r\n // Figure out where we came from\r\n if (diagonal === diagonalMin || (diagonal < diagonalMax && forwardPoints[diagonal - 1] < forwardPoints[diagonal + 1])) {\r\n // Vertical line (the element is an insert)\r\n originalIndex = forwardPoints[diagonal + 1];\r\n modifiedIndex = originalIndex - diagonalRelative - diagonalForwardOffset;\r\n if (originalIndex < lastOriginalIndex) {\r\n changeHelper.MarkNextChange();\r\n }\r\n lastOriginalIndex = originalIndex;\r\n changeHelper.AddModifiedElement(originalIndex + 1, modifiedIndex);\r\n diagonalRelative = (diagonal + 1) - diagonalForwardBase; //Setup for the next iteration\r\n }\r\n else {\r\n // Horizontal line (the element is a deletion)\r\n originalIndex = forwardPoints[diagonal - 1] + 1;\r\n modifiedIndex = originalIndex - diagonalRelative - diagonalForwardOffset;\r\n if (originalIndex < lastOriginalIndex) {\r\n changeHelper.MarkNextChange();\r\n }\r\n lastOriginalIndex = originalIndex - 1;\r\n changeHelper.AddOriginalElement(originalIndex, modifiedIndex + 1);\r\n diagonalRelative = (diagonal - 1) - diagonalForwardBase; //Setup for the next iteration\r\n }\r\n if (historyIndex >= 0) {\r\n forwardPoints = this.m_forwardHistory[historyIndex];\r\n diagonalForwardBase = forwardPoints[0]; //We stored this in the first spot\r\n diagonalMin = 1;\r\n diagonalMax = forwardPoints.length - 1;\r\n }\r\n } while (--historyIndex >= -1);\r\n // Ironically, we get the forward changes as the reverse of the\r\n // order we added them since we technically added them backwards\r\n forwardChanges = changeHelper.getReverseChanges();\r\n if (quitEarlyArr[0]) {\r\n // TODO: Calculate a partial from the reverse diagonals.\r\n // For now, just assume everything after the midOriginal/midModified point is a diff\r\n let originalStartPoint = midOriginalArr[0] + 1;\r\n let modifiedStartPoint = midModifiedArr[0] + 1;\r\n if (forwardChanges !== null && forwardChanges.length > 0) {\r\n const lastForwardChange = forwardChanges[forwardChanges.length - 1];\r\n originalStartPoint = Math.max(originalStartPoint, lastForwardChange.getOriginalEnd());\r\n modifiedStartPoint = Math.max(modifiedStartPoint, lastForwardChange.getModifiedEnd());\r\n }\r\n reverseChanges = [\r\n new DiffChange(originalStartPoint, originalEnd - originalStartPoint + 1, modifiedStartPoint, modifiedEnd - modifiedStartPoint + 1)\r\n ];\r\n }\r\n else {\r\n // Now walk backward through the reverse diagonals history\r\n changeHelper = new DiffChangeHelper();\r\n diagonalMin = diagonalReverseStart;\r\n diagonalMax = diagonalReverseEnd;\r\n diagonalRelative = (midOriginalArr[0] - midModifiedArr[0]) - diagonalReverseOffset;\r\n lastOriginalIndex = 1073741824 /* MAX_SAFE_SMALL_INTEGER */;\r\n historyIndex = (deltaIsEven) ? this.m_reverseHistory.length - 1 : this.m_reverseHistory.length - 2;\r\n do {\r\n // Get the diagonal index from the relative diagonal number\r\n const diagonal = diagonalRelative + diagonalReverseBase;\r\n // Figure out where we came from\r\n if (diagonal === diagonalMin || (diagonal < diagonalMax && reversePoints[diagonal - 1] >= reversePoints[diagonal + 1])) {\r\n // Horizontal line (the element is a deletion))\r\n originalIndex = reversePoints[diagonal + 1] - 1;\r\n modifiedIndex = originalIndex - diagonalRelative - diagonalReverseOffset;\r\n if (originalIndex > lastOriginalIndex) {\r\n changeHelper.MarkNextChange();\r\n }\r\n lastOriginalIndex = originalIndex + 1;\r\n changeHelper.AddOriginalElement(originalIndex + 1, modifiedIndex + 1);\r\n diagonalRelative = (diagonal + 1) - diagonalReverseBase; //Setup for the next iteration\r\n }\r\n else {\r\n // Vertical line (the element is an insertion)\r\n originalIndex = reversePoints[diagonal - 1];\r\n modifiedIndex = originalIndex - diagonalRelative - diagonalReverseOffset;\r\n if (originalIndex > lastOriginalIndex) {\r\n changeHelper.MarkNextChange();\r\n }\r\n lastOriginalIndex = originalIndex;\r\n changeHelper.AddModifiedElement(originalIndex + 1, modifiedIndex + 1);\r\n diagonalRelative = (diagonal - 1) - diagonalReverseBase; //Setup for the next iteration\r\n }\r\n if (historyIndex >= 0) {\r\n reversePoints = this.m_reverseHistory[historyIndex];\r\n diagonalReverseBase = reversePoints[0]; //We stored this in the first spot\r\n diagonalMin = 1;\r\n diagonalMax = reversePoints.length - 1;\r\n }\r\n } while (--historyIndex >= -1);\r\n // There are cases where the reverse history will find diffs that\r\n // are correct, but not intuitive, so we need shift them.\r\n reverseChanges = changeHelper.getChanges();\r\n }\r\n return this.ConcatenateChanges(forwardChanges, reverseChanges);\r\n }\r\n /**\r\n * Given the range to compute the diff on, this method finds the point:\r\n * (midOriginal, midModified)\r\n * that exists in the middle of the LCS of the two sequences and\r\n * is the point at which the LCS problem may be broken down recursively.\r\n * This method will try to keep the LCS trace in memory. If the LCS recursion\r\n * point is calculated and the full trace is available in memory, then this method\r\n * will return the change list.\r\n * @param originalStart The start bound of the original sequence range\r\n * @param originalEnd The end bound of the original sequence range\r\n * @param modifiedStart The start bound of the modified sequence range\r\n * @param modifiedEnd The end bound of the modified sequence range\r\n * @param midOriginal The middle point of the original sequence range\r\n * @param midModified The middle point of the modified sequence range\r\n * @returns The diff changes, if available, otherwise null\r\n */\r\n ComputeRecursionPoint(originalStart, originalEnd, modifiedStart, modifiedEnd, midOriginalArr, midModifiedArr, quitEarlyArr) {\r\n let originalIndex = 0, modifiedIndex = 0;\r\n let diagonalForwardStart = 0, diagonalForwardEnd = 0;\r\n let diagonalReverseStart = 0, diagonalReverseEnd = 0;\r\n // To traverse the edit graph and produce the proper LCS, our actual\r\n // start position is just outside the given boundary\r\n originalStart--;\r\n modifiedStart--;\r\n // We set these up to make the compiler happy, but they will\r\n // be replaced before we return with the actual recursion point\r\n midOriginalArr[0] = 0;\r\n midModifiedArr[0] = 0;\r\n // Clear out the history\r\n this.m_forwardHistory = [];\r\n this.m_reverseHistory = [];\r\n // Each cell in the two arrays corresponds to a diagonal in the edit graph.\r\n // The integer value in the cell represents the originalIndex of the furthest\r\n // reaching point found so far that ends in that diagonal.\r\n // The modifiedIndex can be computed mathematically from the originalIndex and the diagonal number.\r\n const maxDifferences = (originalEnd - originalStart) + (modifiedEnd - modifiedStart);\r\n const numDiagonals = maxDifferences + 1;\r\n const forwardPoints = new Int32Array(numDiagonals);\r\n const reversePoints = new Int32Array(numDiagonals);\r\n // diagonalForwardBase: Index into forwardPoints of the diagonal which passes through (originalStart, modifiedStart)\r\n // diagonalReverseBase: Index into reversePoints of the diagonal which passes through (originalEnd, modifiedEnd)\r\n const diagonalForwardBase = (modifiedEnd - modifiedStart);\r\n const diagonalReverseBase = (originalEnd - originalStart);\r\n // diagonalForwardOffset: Geometric offset which allows modifiedIndex to be computed from originalIndex and the\r\n // diagonal number (relative to diagonalForwardBase)\r\n // diagonalReverseOffset: Geometric offset which allows modifiedIndex to be computed from originalIndex and the\r\n // diagonal number (relative to diagonalReverseBase)\r\n const diagonalForwardOffset = (originalStart - modifiedStart);\r\n const diagonalReverseOffset = (originalEnd - modifiedEnd);\r\n // delta: The difference between the end diagonal and the start diagonal. This is used to relate diagonal numbers\r\n // relative to the start diagonal with diagonal numbers relative to the end diagonal.\r\n // The Even/Oddn-ness of this delta is important for determining when we should check for overlap\r\n const delta = diagonalReverseBase - diagonalForwardBase;\r\n const deltaIsEven = (delta % 2 === 0);\r\n // Here we set up the start and end points as the furthest points found so far\r\n // in both the forward and reverse directions, respectively\r\n forwardPoints[diagonalForwardBase] = originalStart;\r\n reversePoints[diagonalReverseBase] = originalEnd;\r\n // Remember if we quit early, and thus need to do a best-effort result instead of a real result.\r\n quitEarlyArr[0] = false;\r\n // A couple of points:\r\n // --With this method, we iterate on the number of differences between the two sequences.\r\n // The more differences there actually are, the longer this will take.\r\n // --Also, as the number of differences increases, we have to search on diagonals further\r\n // away from the reference diagonal (which is diagonalForwardBase for forward, diagonalReverseBase for reverse).\r\n // --We extend on even diagonals (relative to the reference diagonal) only when numDifferences\r\n // is even and odd diagonals only when numDifferences is odd.\r\n for (let numDifferences = 1; numDifferences <= (maxDifferences / 2) + 1; numDifferences++) {\r\n let furthestOriginalIndex = 0;\r\n let furthestModifiedIndex = 0;\r\n // Run the algorithm in the forward direction\r\n diagonalForwardStart = this.ClipDiagonalBound(diagonalForwardBase - numDifferences, numDifferences, diagonalForwardBase, numDiagonals);\r\n diagonalForwardEnd = this.ClipDiagonalBound(diagonalForwardBase + numDifferences, numDifferences, diagonalForwardBase, numDiagonals);\r\n for (let diagonal = diagonalForwardStart; diagonal <= diagonalForwardEnd; diagonal += 2) {\r\n // STEP 1: We extend the furthest reaching point in the present diagonal\r\n // by looking at the diagonals above and below and picking the one whose point\r\n // is further away from the start point (originalStart, modifiedStart)\r\n if (diagonal === diagonalForwardStart || (diagonal < diagonalForwardEnd && forwardPoints[diagonal - 1] < forwardPoints[diagonal + 1])) {\r\n originalIndex = forwardPoints[diagonal + 1];\r\n }\r\n else {\r\n originalIndex = forwardPoints[diagonal - 1] + 1;\r\n }\r\n modifiedIndex = originalIndex - (diagonal - diagonalForwardBase) - diagonalForwardOffset;\r\n // Save the current originalIndex so we can test for false overlap in step 3\r\n const tempOriginalIndex = originalIndex;\r\n // STEP 2: We can continue to extend the furthest reaching point in the present diagonal\r\n // so long as the elements are equal.\r\n while (originalIndex < originalEnd && modifiedIndex < modifiedEnd && this.ElementsAreEqual(originalIndex + 1, modifiedIndex + 1)) {\r\n originalIndex++;\r\n modifiedIndex++;\r\n }\r\n forwardPoints[diagonal] = originalIndex;\r\n if (originalIndex + modifiedIndex > furthestOriginalIndex + furthestModifiedIndex) {\r\n furthestOriginalIndex = originalIndex;\r\n furthestModifiedIndex = modifiedIndex;\r\n }\r\n // STEP 3: If delta is odd (overlap first happens on forward when delta is odd)\r\n // and diagonal is in the range of reverse diagonals computed for numDifferences-1\r\n // (the previous iteration; we haven't computed reverse diagonals for numDifferences yet)\r\n // then check for overlap.\r\n if (!deltaIsEven && Math.abs(diagonal - diagonalReverseBase) <= (numDifferences - 1)) {\r\n if (originalIndex >= reversePoints[diagonal]) {\r\n midOriginalArr[0] = originalIndex;\r\n midModifiedArr[0] = modifiedIndex;\r\n if (tempOriginalIndex <= reversePoints[diagonal] && 1447 /* MaxDifferencesHistory */ > 0 && numDifferences <= (1447 /* MaxDifferencesHistory */ + 1)) {\r\n // BINGO! We overlapped, and we have the full trace in memory!\r\n return this.WALKTRACE(diagonalForwardBase, diagonalForwardStart, diagonalForwardEnd, diagonalForwardOffset, diagonalReverseBase, diagonalReverseStart, diagonalReverseEnd, diagonalReverseOffset, forwardPoints, reversePoints, originalIndex, originalEnd, midOriginalArr, modifiedIndex, modifiedEnd, midModifiedArr, deltaIsEven, quitEarlyArr);\r\n }\r\n else {\r\n // Either false overlap, or we didn't have enough memory for the full trace\r\n // Just return the recursion point\r\n return null;\r\n }\r\n }\r\n }\r\n }\r\n // Check to see if we should be quitting early, before moving on to the next iteration.\r\n const matchLengthOfLongest = ((furthestOriginalIndex - originalStart) + (furthestModifiedIndex - modifiedStart) - numDifferences) / 2;\r\n if (this.ContinueProcessingPredicate !== null && !this.ContinueProcessingPredicate(furthestOriginalIndex, matchLengthOfLongest)) {\r\n // We can't finish, so skip ahead to generating a result from what we have.\r\n quitEarlyArr[0] = true;\r\n // Use the furthest distance we got in the forward direction.\r\n midOriginalArr[0] = furthestOriginalIndex;\r\n midModifiedArr[0] = furthestModifiedIndex;\r\n if (matchLengthOfLongest > 0 && 1447 /* MaxDifferencesHistory */ > 0 && numDifferences <= (1447 /* MaxDifferencesHistory */ + 1)) {\r\n // Enough of the history is in memory to walk it backwards\r\n return this.WALKTRACE(diagonalForwardBase, diagonalForwardStart, diagonalForwardEnd, diagonalForwardOffset, diagonalReverseBase, diagonalReverseStart, diagonalReverseEnd, diagonalReverseOffset, forwardPoints, reversePoints, originalIndex, originalEnd, midOriginalArr, modifiedIndex, modifiedEnd, midModifiedArr, deltaIsEven, quitEarlyArr);\r\n }\r\n else {\r\n // We didn't actually remember enough of the history.\r\n //Since we are quiting the diff early, we need to shift back the originalStart and modified start\r\n //back into the boundary limits since we decremented their value above beyond the boundary limit.\r\n originalStart++;\r\n modifiedStart++;\r\n return [\r\n new DiffChange(originalStart, originalEnd - originalStart + 1, modifiedStart, modifiedEnd - modifiedStart + 1)\r\n ];\r\n }\r\n }\r\n // Run the algorithm in the reverse direction\r\n diagonalReverseStart = this.ClipDiagonalBound(diagonalReverseBase - numDifferences, numDifferences, diagonalReverseBase, numDiagonals);\r\n diagonalReverseEnd = this.ClipDiagonalBound(diagonalReverseBase + numDifferences, numDifferences, diagonalReverseBase, numDiagonals);\r\n for (let diagonal = diagonalReverseStart; diagonal <= diagonalReverseEnd; diagonal += 2) {\r\n // STEP 1: We extend the furthest reaching point in the present diagonal\r\n // by looking at the diagonals above and below and picking the one whose point\r\n // is further away from the start point (originalEnd, modifiedEnd)\r\n if (diagonal === diagonalReverseStart || (diagonal < diagonalReverseEnd && reversePoints[diagonal - 1] >= reversePoints[diagonal + 1])) {\r\n originalIndex = reversePoints[diagonal + 1] - 1;\r\n }\r\n else {\r\n originalIndex = reversePoints[diagonal - 1];\r\n }\r\n modifiedIndex = originalIndex - (diagonal - diagonalReverseBase) - diagonalReverseOffset;\r\n // Save the current originalIndex so we can test for false overlap\r\n const tempOriginalIndex = originalIndex;\r\n // STEP 2: We can continue to extend the furthest reaching point in the present diagonal\r\n // as long as the elements are equal.\r\n while (originalIndex > originalStart && modifiedIndex > modifiedStart && this.ElementsAreEqual(originalIndex, modifiedIndex)) {\r\n originalIndex--;\r\n modifiedIndex--;\r\n }\r\n reversePoints[diagonal] = originalIndex;\r\n // STEP 4: If delta is even (overlap first happens on reverse when delta is even)\r\n // and diagonal is in the range of forward diagonals computed for numDifferences\r\n // then check for overlap.\r\n if (deltaIsEven && Math.abs(diagonal - diagonalForwardBase) <= numDifferences) {\r\n if (originalIndex <= forwardPoints[diagonal]) {\r\n midOriginalArr[0] = originalIndex;\r\n midModifiedArr[0] = modifiedIndex;\r\n if (tempOriginalIndex >= forwardPoints[diagonal] && 1447 /* MaxDifferencesHistory */ > 0 && numDifferences <= (1447 /* MaxDifferencesHistory */ + 1)) {\r\n // BINGO! We overlapped, and we have the full trace in memory!\r\n return this.WALKTRACE(diagonalForwardBase, diagonalForwardStart, diagonalForwardEnd, diagonalForwardOffset, diagonalReverseBase, diagonalReverseStart, diagonalReverseEnd, diagonalReverseOffset, forwardPoints, reversePoints, originalIndex, originalEnd, midOriginalArr, modifiedIndex, modifiedEnd, midModifiedArr, deltaIsEven, quitEarlyArr);\r\n }\r\n else {\r\n // Either false overlap, or we didn't have enough memory for the full trace\r\n // Just return the recursion point\r\n return null;\r\n }\r\n }\r\n }\r\n }\r\n // Save current vectors to history before the next iteration\r\n if (numDifferences <= 1447 /* MaxDifferencesHistory */) {\r\n // We are allocating space for one extra int, which we fill with\r\n // the index of the diagonal base index\r\n let temp = new Int32Array(diagonalForwardEnd - diagonalForwardStart + 2);\r\n temp[0] = diagonalForwardBase - diagonalForwardStart + 1;\r\n MyArray.Copy2(forwardPoints, diagonalForwardStart, temp, 1, diagonalForwardEnd - diagonalForwardStart + 1);\r\n this.m_forwardHistory.push(temp);\r\n temp = new Int32Array(diagonalReverseEnd - diagonalReverseStart + 2);\r\n temp[0] = diagonalReverseBase - diagonalReverseStart + 1;\r\n MyArray.Copy2(reversePoints, diagonalReverseStart, temp, 1, diagonalReverseEnd - diagonalReverseStart + 1);\r\n this.m_reverseHistory.push(temp);\r\n }\r\n }\r\n // If we got here, then we have the full trace in history. We just have to convert it to a change list\r\n // NOTE: This part is a bit messy\r\n return this.WALKTRACE(diagonalForwardBase, diagonalForwardStart, diagonalForwardEnd, diagonalForwardOffset, diagonalReverseBase, diagonalReverseStart, diagonalReverseEnd, diagonalReverseOffset, forwardPoints, reversePoints, originalIndex, originalEnd, midOriginalArr, modifiedIndex, modifiedEnd, midModifiedArr, deltaIsEven, quitEarlyArr);\r\n }\r\n /**\r\n * Shifts the given changes to provide a more intuitive diff.\r\n * While the first element in a diff matches the first element after the diff,\r\n * we shift the diff down.\r\n *\r\n * @param changes The list of changes to shift\r\n * @returns The shifted changes\r\n */\r\n PrettifyChanges(changes) {\r\n // Shift all the changes down first\r\n for (let i = 0; i < changes.length; i++) {\r\n const change = changes[i];\r\n const originalStop = (i < changes.length - 1) ? changes[i + 1].originalStart : this._originalElementsOrHash.length;\r\n const modifiedStop = (i < changes.length - 1) ? changes[i + 1].modifiedStart : this._modifiedElementsOrHash.length;\r\n const checkOriginal = change.originalLength > 0;\r\n const checkModified = change.modifiedLength > 0;\r\n while (change.originalStart + change.originalLength < originalStop\r\n && change.modifiedStart + change.modifiedLength < modifiedStop\r\n && (!checkOriginal || this.OriginalElementsAreEqual(change.originalStart, change.originalStart + change.originalLength))\r\n && (!checkModified || this.ModifiedElementsAreEqual(change.modifiedStart, change.modifiedStart + change.modifiedLength))) {\r\n const startStrictEqual = this.ElementsAreStrictEqual(change.originalStart, change.modifiedStart);\r\n const endStrictEqual = this.ElementsAreStrictEqual(change.originalStart + change.originalLength, change.modifiedStart + change.modifiedLength);\r\n if (endStrictEqual && !startStrictEqual) {\r\n // moving the change down would create an equal change, but the elements are not strict equal\r\n break;\r\n }\r\n change.originalStart++;\r\n change.modifiedStart++;\r\n }\r\n let mergedChangeArr = [null];\r\n if (i < changes.length - 1 && this.ChangesOverlap(changes[i], changes[i + 1], mergedChangeArr)) {\r\n changes[i] = mergedChangeArr[0];\r\n changes.splice(i + 1, 1);\r\n i--;\r\n continue;\r\n }\r\n }\r\n // Shift changes back up until we hit empty or whitespace-only lines\r\n for (let i = changes.length - 1; i >= 0; i--) {\r\n const change = changes[i];\r\n let originalStop = 0;\r\n let modifiedStop = 0;\r\n if (i > 0) {\r\n const prevChange = changes[i - 1];\r\n originalStop = prevChange.originalStart + prevChange.originalLength;\r\n modifiedStop = prevChange.modifiedStart + prevChange.modifiedLength;\r\n }\r\n const checkOriginal = change.originalLength > 0;\r\n const checkModified = change.modifiedLength > 0;\r\n let bestDelta = 0;\r\n let bestScore = this._boundaryScore(change.originalStart, change.originalLength, change.modifiedStart, change.modifiedLength);\r\n for (let delta = 1;; delta++) {\r\n const originalStart = change.originalStart - delta;\r\n const modifiedStart = change.modifiedStart - delta;\r\n if (originalStart < originalStop || modifiedStart < modifiedStop) {\r\n break;\r\n }\r\n if (checkOriginal && !this.OriginalElementsAreEqual(originalStart, originalStart + change.originalLength)) {\r\n break;\r\n }\r\n if (checkModified && !this.ModifiedElementsAreEqual(modifiedStart, modifiedStart + change.modifiedLength)) {\r\n break;\r\n }\r\n const touchingPreviousChange = (originalStart === originalStop && modifiedStart === modifiedStop);\r\n const score = ((touchingPreviousChange ? 5 : 0)\r\n + this._boundaryScore(originalStart, change.originalLength, modifiedStart, change.modifiedLength));\r\n if (score > bestScore) {\r\n bestScore = score;\r\n bestDelta = delta;\r\n }\r\n }\r\n change.originalStart -= bestDelta;\r\n change.modifiedStart -= bestDelta;\r\n const mergedChangeArr = [null];\r\n if (i > 0 && this.ChangesOverlap(changes[i - 1], changes[i], mergedChangeArr)) {\r\n changes[i - 1] = mergedChangeArr[0];\r\n changes.splice(i, 1);\r\n i++;\r\n continue;\r\n }\r\n }\r\n // There could be multiple longest common substrings.\r\n // Give preference to the ones containing longer lines\r\n if (this._hasStrings) {\r\n for (let i = 1, len = changes.length; i < len; i++) {\r\n const aChange = changes[i - 1];\r\n const bChange = changes[i];\r\n const matchedLength = bChange.originalStart - aChange.originalStart - aChange.originalLength;\r\n const aOriginalStart = aChange.originalStart;\r\n const bOriginalEnd = bChange.originalStart + bChange.originalLength;\r\n const abOriginalLength = bOriginalEnd - aOriginalStart;\r\n const aModifiedStart = aChange.modifiedStart;\r\n const bModifiedEnd = bChange.modifiedStart + bChange.modifiedLength;\r\n const abModifiedLength = bModifiedEnd - aModifiedStart;\r\n // Avoid wasting a lot of time with these searches\r\n if (matchedLength < 5 && abOriginalLength < 20 && abModifiedLength < 20) {\r\n const t = this._findBetterContiguousSequence(aOriginalStart, abOriginalLength, aModifiedStart, abModifiedLength, matchedLength);\r\n if (t) {\r\n const [originalMatchStart, modifiedMatchStart] = t;\r\n if (originalMatchStart !== aChange.originalStart + aChange.originalLength || modifiedMatchStart !== aChange.modifiedStart + aChange.modifiedLength) {\r\n // switch to another sequence that has a better score\r\n aChange.originalLength = originalMatchStart - aChange.originalStart;\r\n aChange.modifiedLength = modifiedMatchStart - aChange.modifiedStart;\r\n bChange.originalStart = originalMatchStart + matchedLength;\r\n bChange.modifiedStart = modifiedMatchStart + matchedLength;\r\n bChange.originalLength = bOriginalEnd - bChange.originalStart;\r\n bChange.modifiedLength = bModifiedEnd - bChange.modifiedStart;\r\n }\r\n }\r\n }\r\n }\r\n }\r\n return changes;\r\n }\r\n _findBetterContiguousSequence(originalStart, originalLength, modifiedStart, modifiedLength, desiredLength) {\r\n if (originalLength < desiredLength || modifiedLength < desiredLength) {\r\n return null;\r\n }\r\n const originalMax = originalStart + originalLength - desiredLength + 1;\r\n const modifiedMax = modifiedStart + modifiedLength - desiredLength + 1;\r\n let bestScore = 0;\r\n let bestOriginalStart = 0;\r\n let bestModifiedStart = 0;\r\n for (let i = originalStart; i < originalMax; i++) {\r\n for (let j = modifiedStart; j < modifiedMax; j++) {\r\n const score = this._contiguousSequenceScore(i, j, desiredLength);\r\n if (score > 0 && score > bestScore) {\r\n bestScore = score;\r\n bestOriginalStart = i;\r\n bestModifiedStart = j;\r\n }\r\n }\r\n }\r\n if (bestScore > 0) {\r\n return [bestOriginalStart, bestModifiedStart];\r\n }\r\n return null;\r\n }\r\n _contiguousSequenceScore(originalStart, modifiedStart, length) {\r\n let score = 0;\r\n for (let l = 0; l < length; l++) {\r\n if (!this.ElementsAreEqual(originalStart + l, modifiedStart + l)) {\r\n return 0;\r\n }\r\n score += this._originalStringElements[originalStart + l].length;\r\n }\r\n return score;\r\n }\r\n _OriginalIsBoundary(index) {\r\n if (index <= 0 || index >= this._originalElementsOrHash.length - 1) {\r\n return true;\r\n }\r\n return (this._hasStrings && /^\\s*$/.test(this._originalStringElements[index]));\r\n }\r\n _OriginalRegionIsBoundary(originalStart, originalLength) {\r\n if (this._OriginalIsBoundary(originalStart) || this._OriginalIsBoundary(originalStart - 1)) {\r\n return true;\r\n }\r\n if (originalLength > 0) {\r\n const originalEnd = originalStart + originalLength;\r\n if (this._OriginalIsBoundary(originalEnd - 1) || this._OriginalIsBoundary(originalEnd)) {\r\n return true;\r\n }\r\n }\r\n return false;\r\n }\r\n _ModifiedIsBoundary(index) {\r\n if (index <= 0 || index >= this._modifiedElementsOrHash.length - 1) {\r\n return true;\r\n }\r\n return (this._hasStrings && /^\\s*$/.test(this._modifiedStringElements[index]));\r\n }\r\n _ModifiedRegionIsBoundary(modifiedStart, modifiedLength) {\r\n if (this._ModifiedIsBoundary(modifiedStart) || this._ModifiedIsBoundary(modifiedStart - 1)) {\r\n return true;\r\n }\r\n if (modifiedLength > 0) {\r\n const modifiedEnd = modifiedStart + modifiedLength;\r\n if (this._ModifiedIsBoundary(modifiedEnd - 1) || this._ModifiedIsBoundary(modifiedEnd)) {\r\n return true;\r\n }\r\n }\r\n return false;\r\n }\r\n _boundaryScore(originalStart, originalLength, modifiedStart, modifiedLength) {\r\n const originalScore = (this._OriginalRegionIsBoundary(originalStart, originalLength) ? 1 : 0);\r\n const modifiedScore = (this._ModifiedRegionIsBoundary(modifiedStart, modifiedLength) ? 1 : 0);\r\n return (originalScore + modifiedScore);\r\n }\r\n /**\r\n * Concatenates the two input DiffChange lists and returns the resulting\r\n * list.\r\n * @param The left changes\r\n * @param The right changes\r\n * @returns The concatenated list\r\n */\r\n ConcatenateChanges(left, right) {\r\n let mergedChangeArr = [];\r\n if (left.length === 0 || right.length === 0) {\r\n return (right.length > 0) ? right : left;\r\n }\r\n else if (this.ChangesOverlap(left[left.length - 1], right[0], mergedChangeArr)) {\r\n // Since we break the problem down recursively, it is possible that we\r\n // might recurse in the middle of a change thereby splitting it into\r\n // two changes. Here in the combining stage, we detect and fuse those\r\n // changes back together\r\n const result = new Array(left.length + right.length - 1);\r\n MyArray.Copy(left, 0, result, 0, left.length - 1);\r\n result[left.length - 1] = mergedChangeArr[0];\r\n MyArray.Copy(right, 1, result, left.length, right.length - 1);\r\n return result;\r\n }\r\n else {\r\n const result = new Array(left.length + right.length);\r\n MyArray.Copy(left, 0, result, 0, left.length);\r\n MyArray.Copy(right, 0, result, left.length, right.length);\r\n return result;\r\n }\r\n }\r\n /**\r\n * Returns true if the two changes overlap and can be merged into a single\r\n * change\r\n * @param left The left change\r\n * @param right The right change\r\n * @param mergedChange The merged change if the two overlap, null otherwise\r\n * @returns True if the two changes overlap\r\n */\r\n ChangesOverlap(left, right, mergedChangeArr) {\r\n Debug.Assert(left.originalStart <= right.originalStart, 'Left change is not less than or equal to right change');\r\n Debug.Assert(left.modifiedStart <= right.modifiedStart, 'Left change is not less than or equal to right change');\r\n if (left.originalStart + left.originalLength >= right.originalStart || left.modifiedStart + left.modifiedLength >= right.modifiedStart) {\r\n const originalStart = left.originalStart;\r\n let originalLength = left.originalLength;\r\n const modifiedStart = left.modifiedStart;\r\n let modifiedLength = left.modifiedLength;\r\n if (left.originalStart + left.originalLength >= right.originalStart) {\r\n originalLength = right.originalStart + right.originalLength - left.originalStart;\r\n }\r\n if (left.modifiedStart + left.modifiedLength >= right.modifiedStart) {\r\n modifiedLength = right.modifiedStart + right.modifiedLength - left.modifiedStart;\r\n }\r\n mergedChangeArr[0] = new DiffChange(originalStart, originalLength, modifiedStart, modifiedLength);\r\n return true;\r\n }\r\n else {\r\n mergedChangeArr[0] = null;\r\n return false;\r\n }\r\n }\r\n /**\r\n * Helper method used to clip a diagonal index to the range of valid\r\n * diagonals. This also decides whether or not the diagonal index,\r\n * if it exceeds the boundary, should be clipped to the boundary or clipped\r\n * one inside the boundary depending on the Even/Odd status of the boundary\r\n * and numDifferences.\r\n * @param diagonal The index of the diagonal to clip.\r\n * @param numDifferences The current number of differences being iterated upon.\r\n * @param diagonalBaseIndex The base reference diagonal.\r\n * @param numDiagonals The total number of diagonals.\r\n * @returns The clipped diagonal index.\r\n */\r\n ClipDiagonalBound(diagonal, numDifferences, diagonalBaseIndex, numDiagonals) {\r\n if (diagonal >= 0 && diagonal < numDiagonals) {\r\n // Nothing to clip, its in range\r\n return diagonal;\r\n }\r\n // diagonalsBelow: The number of diagonals below the reference diagonal\r\n // diagonalsAbove: The number of diagonals above the reference diagonal\r\n const diagonalsBelow = diagonalBaseIndex;\r\n const diagonalsAbove = numDiagonals - diagonalBaseIndex - 1;\r\n const diffEven = (numDifferences % 2 === 0);\r\n if (diagonal < 0) {\r\n const lowerBoundEven = (diagonalsBelow % 2 === 0);\r\n return (diffEven === lowerBoundEven) ? 0 : 1;\r\n }\r\n else {\r\n const upperBoundEven = (diagonalsAbove % 2 === 0);\r\n return (diffEven === upperBoundEven) ? numDiagonals - 1 : numDiagonals - 2;\r\n }\r\n }\r\n}\r\n","/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nimport { isWindows, isMacintosh, setImmediate, globals } from './platform.js';\r\nlet safeProcess;\r\n// Native sandbox environment\r\nif (typeof globals.vscode !== 'undefined' && typeof globals.vscode.process !== 'undefined') {\r\n const sandboxProcess = globals.vscode.process;\r\n safeProcess = {\r\n get platform() { return sandboxProcess.platform; },\r\n get env() { return sandboxProcess.env; },\r\n cwd() { return sandboxProcess.cwd(); },\r\n nextTick(callback) { return setImmediate(callback); }\r\n };\r\n}\r\n// Native node.js environment\r\nelse if (typeof process !== 'undefined') {\r\n safeProcess = {\r\n get platform() { return process.platform; },\r\n get env() { return process.env; },\r\n cwd() { return process.env['VSCODE_CWD'] || process.cwd(); },\r\n nextTick(callback) { return process.nextTick(callback); }\r\n };\r\n}\r\n// Web environment\r\nelse {\r\n safeProcess = {\r\n // Supported\r\n get platform() { return isWindows ? 'win32' : isMacintosh ? 'darwin' : 'linux'; },\r\n nextTick(callback) { return setImmediate(callback); },\r\n // Unsupported\r\n get env() { return {}; },\r\n cwd() { return '/'; }\r\n };\r\n}\r\n/**\r\n * Provides safe access to the `cwd` property in node.js, sandboxed or web\r\n * environments.\r\n *\r\n * Note: in web, this property is hardcoded to be `/`.\r\n */\r\nexport const cwd = safeProcess.cwd;\r\n/**\r\n * Provides safe access to the `env` property in node.js, sandboxed or web\r\n * environments.\r\n *\r\n * Note: in web, this property is hardcoded to be `{}`.\r\n */\r\nexport const env = safeProcess.env;\r\n/**\r\n * Provides safe access to the `platform` property in node.js, sandboxed or web\r\n * environments.\r\n */\r\nexport const platform = safeProcess.platform;\r\n","/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n// NOTE: VSCode's copy of nodejs path library to be usable in common (non-node) namespace\r\n// Copied from: https://github.com/nodejs/node/blob/v12.8.1/lib/path.js\r\n/**\r\n * Copyright Joyent, Inc. and other Node contributors.\r\n *\r\n * Permission is hereby granted, free of charge, to any person obtaining a\r\n * copy of this software and associated documentation files (the\r\n * \"Software\"), to deal in the Software without restriction, including\r\n * without limitation the rights to use, copy, modify, merge, publish,\r\n * distribute, sublicense, and/or sell copies of the Software, and to permit\r\n * persons to whom the Software is furnished to do so, subject to the\r\n * following conditions:\r\n *\r\n * The above copyright notice and this permission notice shall be included\r\n * in all copies or substantial portions of the Software.\r\n *\r\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\r\n * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\r\n * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN\r\n * NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\r\n * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\r\n * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE\r\n * USE OR OTHER DEALINGS IN THE SOFTWARE.\r\n */\r\nimport * as process from './process.js';\r\nconst CHAR_UPPERCASE_A = 65; /* A */\r\nconst CHAR_LOWERCASE_A = 97; /* a */\r\nconst CHAR_UPPERCASE_Z = 90; /* Z */\r\nconst CHAR_LOWERCASE_Z = 122; /* z */\r\nconst CHAR_DOT = 46; /* . */\r\nconst CHAR_FORWARD_SLASH = 47; /* / */\r\nconst CHAR_BACKWARD_SLASH = 92; /* \\ */\r\nconst CHAR_COLON = 58; /* : */\r\nconst CHAR_QUESTION_MARK = 63; /* ? */\r\nclass ErrorInvalidArgType extends Error {\r\n constructor(name, expected, actual) {\r\n // determiner: 'must be' or 'must not be'\r\n let determiner;\r\n if (typeof expected === 'string' && expected.indexOf('not ') === 0) {\r\n determiner = 'must not be';\r\n expected = expected.replace(/^not /, '');\r\n }\r\n else {\r\n determiner = 'must be';\r\n }\r\n const type = name.indexOf('.') !== -1 ? 'property' : 'argument';\r\n let msg = `The \"${name}\" ${type} ${determiner} of type ${expected}`;\r\n msg += `. Received type ${typeof actual}`;\r\n super(msg);\r\n this.code = 'ERR_INVALID_ARG_TYPE';\r\n }\r\n}\r\nfunction validateString(value, name) {\r\n if (typeof value !== 'string') {\r\n throw new ErrorInvalidArgType(name, 'string', value);\r\n }\r\n}\r\nfunction isPathSeparator(code) {\r\n return code === CHAR_FORWARD_SLASH || code === CHAR_BACKWARD_SLASH;\r\n}\r\nfunction isPosixPathSeparator(code) {\r\n return code === CHAR_FORWARD_SLASH;\r\n}\r\nfunction isWindowsDeviceRoot(code) {\r\n return code >= CHAR_UPPERCASE_A && code <= CHAR_UPPERCASE_Z ||\r\n code >= CHAR_LOWERCASE_A && code <= CHAR_LOWERCASE_Z;\r\n}\r\n// Resolves . and .. elements in a path with directory names\r\nfunction normalizeString(path, allowAboveRoot, separator, isPathSeparator) {\r\n let res = '';\r\n let lastSegmentLength = 0;\r\n let lastSlash = -1;\r\n let dots = 0;\r\n let code = 0;\r\n for (let i = 0; i <= path.length; ++i) {\r\n if (i < path.length) {\r\n code = path.charCodeAt(i);\r\n }\r\n else if (isPathSeparator(code)) {\r\n break;\r\n }\r\n else {\r\n code = CHAR_FORWARD_SLASH;\r\n }\r\n if (isPathSeparator(code)) {\r\n if (lastSlash === i - 1 || dots === 1) {\r\n // NOOP\r\n }\r\n else if (dots === 2) {\r\n if (res.length < 2 || lastSegmentLength !== 2 ||\r\n res.charCodeAt(res.length - 1) !== CHAR_DOT ||\r\n res.charCodeAt(res.length - 2) !== CHAR_DOT) {\r\n if (res.length > 2) {\r\n const lastSlashIndex = res.lastIndexOf(separator);\r\n if (lastSlashIndex === -1) {\r\n res = '';\r\n lastSegmentLength = 0;\r\n }\r\n else {\r\n res = res.slice(0, lastSlashIndex);\r\n lastSegmentLength = res.length - 1 - res.lastIndexOf(separator);\r\n }\r\n lastSlash = i;\r\n dots = 0;\r\n continue;\r\n }\r\n else if (res.length !== 0) {\r\n res = '';\r\n lastSegmentLength = 0;\r\n lastSlash = i;\r\n dots = 0;\r\n continue;\r\n }\r\n }\r\n if (allowAboveRoot) {\r\n res += res.length > 0 ? `${separator}..` : '..';\r\n lastSegmentLength = 2;\r\n }\r\n }\r\n else {\r\n if (res.length > 0) {\r\n res += `${separator}${path.slice(lastSlash + 1, i)}`;\r\n }\r\n else {\r\n res = path.slice(lastSlash + 1, i);\r\n }\r\n lastSegmentLength = i - lastSlash - 1;\r\n }\r\n lastSlash = i;\r\n dots = 0;\r\n }\r\n else if (code === CHAR_DOT && dots !== -1) {\r\n ++dots;\r\n }\r\n else {\r\n dots = -1;\r\n }\r\n }\r\n return res;\r\n}\r\nfunction _format(sep, pathObject) {\r\n if (pathObject === null || typeof pathObject !== 'object') {\r\n throw new ErrorInvalidArgType('pathObject', 'Object', pathObject);\r\n }\r\n const dir = pathObject.dir || pathObject.root;\r\n const base = pathObject.base ||\r\n `${pathObject.name || ''}${pathObject.ext || ''}`;\r\n if (!dir) {\r\n return base;\r\n }\r\n return dir === pathObject.root ? `${dir}${base}` : `${dir}${sep}${base}`;\r\n}\r\nexport const win32 = {\r\n // path.resolve([from ...], to)\r\n resolve(...pathSegments) {\r\n let resolvedDevice = '';\r\n let resolvedTail = '';\r\n let resolvedAbsolute = false;\r\n for (let i = pathSegments.length - 1; i >= -1; i--) {\r\n let path;\r\n if (i >= 0) {\r\n path = pathSegments[i];\r\n validateString(path, 'path');\r\n // Skip empty entries\r\n if (path.length === 0) {\r\n continue;\r\n }\r\n }\r\n else if (resolvedDevice.length === 0) {\r\n path = process.cwd();\r\n }\r\n else {\r\n // Windows has the concept of drive-specific current working\r\n // directories. If we've resolved a drive letter but not yet an\r\n // absolute path, get cwd for that drive, or the process cwd if\r\n // the drive cwd is not available. We're sure the device is not\r\n // a UNC path at this points, because UNC paths are always absolute.\r\n path = process.env[`=${resolvedDevice}`] || process.cwd();\r\n // Verify that a cwd was found and that it actually points\r\n // to our drive. If not, default to the drive's root.\r\n if (path === undefined ||\r\n path.slice(0, 2).toLowerCase() !== resolvedDevice.toLowerCase() &&\r\n path.charCodeAt(2) === CHAR_BACKWARD_SLASH) {\r\n path = `${resolvedDevice}\\\\`;\r\n }\r\n }\r\n const len = path.length;\r\n let rootEnd = 0;\r\n let device = '';\r\n let isAbsolute = false;\r\n const code = path.charCodeAt(0);\r\n // Try to match a root\r\n if (len === 1) {\r\n if (isPathSeparator(code)) {\r\n // `path` contains just a path separator\r\n rootEnd = 1;\r\n isAbsolute = true;\r\n }\r\n }\r\n else if (isPathSeparator(code)) {\r\n // Possible UNC root\r\n // If we started with a separator, we know we at least have an\r\n // absolute path of some kind (UNC or otherwise)\r\n isAbsolute = true;\r\n if (isPathSeparator(path.charCodeAt(1))) {\r\n // Matched double path separator at beginning\r\n let j = 2;\r\n let last = j;\r\n // Match 1 or more non-path separators\r\n while (j < len && !isPathSeparator(path.charCodeAt(j))) {\r\n j++;\r\n }\r\n if (j < len && j !== last) {\r\n const firstPart = path.slice(last, j);\r\n // Matched!\r\n last = j;\r\n // Match 1 or more path separators\r\n while (j < len && isPathSeparator(path.charCodeAt(j))) {\r\n j++;\r\n }\r\n if (j < len && j !== last) {\r\n // Matched!\r\n last = j;\r\n // Match 1 or more non-path separators\r\n while (j < len && !isPathSeparator(path.charCodeAt(j))) {\r\n j++;\r\n }\r\n if (j === len || j !== last) {\r\n // We matched a UNC root\r\n device = `\\\\\\\\${firstPart}\\\\${path.slice(last, j)}`;\r\n rootEnd = j;\r\n }\r\n }\r\n }\r\n }\r\n else {\r\n rootEnd = 1;\r\n }\r\n }\r\n else if (isWindowsDeviceRoot(code) &&\r\n path.charCodeAt(1) === CHAR_COLON) {\r\n // Possible device root\r\n device = path.slice(0, 2);\r\n rootEnd = 2;\r\n if (len > 2 && isPathSeparator(path.charCodeAt(2))) {\r\n // Treat separator following drive name as an absolute path\r\n // indicator\r\n isAbsolute = true;\r\n rootEnd = 3;\r\n }\r\n }\r\n if (device.length > 0) {\r\n if (resolvedDevice.length > 0) {\r\n if (device.toLowerCase() !== resolvedDevice.toLowerCase()) {\r\n // This path points to another device so it is not applicable\r\n continue;\r\n }\r\n }\r\n else {\r\n resolvedDevice = device;\r\n }\r\n }\r\n if (resolvedAbsolute) {\r\n if (resolvedDevice.length > 0) {\r\n break;\r\n }\r\n }\r\n else {\r\n resolvedTail = `${path.slice(rootEnd)}\\\\${resolvedTail}`;\r\n resolvedAbsolute = isAbsolute;\r\n if (isAbsolute && resolvedDevice.length > 0) {\r\n break;\r\n }\r\n }\r\n }\r\n // At this point the path should be resolved to a full absolute path,\r\n // but handle relative paths to be safe (might happen when process.cwd()\r\n // fails)\r\n // Normalize the tail path\r\n resolvedTail = normalizeString(resolvedTail, !resolvedAbsolute, '\\\\', isPathSeparator);\r\n return resolvedAbsolute ?\r\n `${resolvedDevice}\\\\${resolvedTail}` :\r\n `${resolvedDevice}${resolvedTail}` || '.';\r\n },\r\n normalize(path) {\r\n validateString(path, 'path');\r\n const len = path.length;\r\n if (len === 0) {\r\n return '.';\r\n }\r\n let rootEnd = 0;\r\n let device;\r\n let isAbsolute = false;\r\n const code = path.charCodeAt(0);\r\n // Try to match a root\r\n if (len === 1) {\r\n // `path` contains just a single char, exit early to avoid\r\n // unnecessary work\r\n return isPosixPathSeparator(code) ? '\\\\' : path;\r\n }\r\n if (isPathSeparator(code)) {\r\n // Possible UNC root\r\n // If we started with a separator, we know we at least have an absolute\r\n // path of some kind (UNC or otherwise)\r\n isAbsolute = true;\r\n if (isPathSeparator(path.charCodeAt(1))) {\r\n // Matched double path separator at beginning\r\n let j = 2;\r\n let last = j;\r\n // Match 1 or more non-path separators\r\n while (j < len && !isPathSeparator(path.charCodeAt(j))) {\r\n j++;\r\n }\r\n if (j < len && j !== last) {\r\n const firstPart = path.slice(last, j);\r\n // Matched!\r\n last = j;\r\n // Match 1 or more path separators\r\n while (j < len && isPathSeparator(path.charCodeAt(j))) {\r\n j++;\r\n }\r\n if (j < len && j !== last) {\r\n // Matched!\r\n last = j;\r\n // Match 1 or more non-path separators\r\n while (j < len && !isPathSeparator(path.charCodeAt(j))) {\r\n j++;\r\n }\r\n if (j === len) {\r\n // We matched a UNC root only\r\n // Return the normalized version of the UNC root since there\r\n // is nothing left to process\r\n return `\\\\\\\\${firstPart}\\\\${path.slice(last)}\\\\`;\r\n }\r\n if (j !== last) {\r\n // We matched a UNC root with leftovers\r\n device = `\\\\\\\\${firstPart}\\\\${path.slice(last, j)}`;\r\n rootEnd = j;\r\n }\r\n }\r\n }\r\n }\r\n else {\r\n rootEnd = 1;\r\n }\r\n }\r\n else if (isWindowsDeviceRoot(code) && path.charCodeAt(1) === CHAR_COLON) {\r\n // Possible device root\r\n device = path.slice(0, 2);\r\n rootEnd = 2;\r\n if (len > 2 && isPathSeparator(path.charCodeAt(2))) {\r\n // Treat separator following drive name as an absolute path\r\n // indicator\r\n isAbsolute = true;\r\n rootEnd = 3;\r\n }\r\n }\r\n let tail = rootEnd < len ?\r\n normalizeString(path.slice(rootEnd), !isAbsolute, '\\\\', isPathSeparator) :\r\n '';\r\n if (tail.length === 0 && !isAbsolute) {\r\n tail = '.';\r\n }\r\n if (tail.length > 0 && isPathSeparator(path.charCodeAt(len - 1))) {\r\n tail += '\\\\';\r\n }\r\n if (device === undefined) {\r\n return isAbsolute ? `\\\\${tail}` : tail;\r\n }\r\n return isAbsolute ? `${device}\\\\${tail}` : `${device}${tail}`;\r\n },\r\n isAbsolute(path) {\r\n validateString(path, 'path');\r\n const len = path.length;\r\n if (len === 0) {\r\n return false;\r\n }\r\n const code = path.charCodeAt(0);\r\n return isPathSeparator(code) ||\r\n // Possible device root\r\n len > 2 &&\r\n isWindowsDeviceRoot(code) &&\r\n path.charCodeAt(1) === CHAR_COLON &&\r\n isPathSeparator(path.charCodeAt(2));\r\n },\r\n join(...paths) {\r\n if (paths.length === 0) {\r\n return '.';\r\n }\r\n let joined;\r\n let firstPart;\r\n for (let i = 0; i < paths.length; ++i) {\r\n const arg = paths[i];\r\n validateString(arg, 'path');\r\n if (arg.length > 0) {\r\n if (joined === undefined) {\r\n joined = firstPart = arg;\r\n }\r\n else {\r\n joined += `\\\\${arg}`;\r\n }\r\n }\r\n }\r\n if (joined === undefined) {\r\n return '.';\r\n }\r\n // Make sure that the joined path doesn't start with two slashes, because\r\n // normalize() will mistake it for an UNC path then.\r\n //\r\n // This step is skipped when it is very clear that the user actually\r\n // intended to point at an UNC path. This is assumed when the first\r\n // non-empty string arguments starts with exactly two slashes followed by\r\n // at least one more non-slash character.\r\n //\r\n // Note that for normalize() to treat a path as an UNC path it needs to\r\n // have at least 2 components, so we don't filter for that here.\r\n // This means that the user can use join to construct UNC paths from\r\n // a server name and a share name; for example:\r\n // path.join('//server', 'share') -> '\\\\\\\\server\\\\share\\\\')\r\n let needsReplace = true;\r\n let slashCount = 0;\r\n if (typeof firstPart === 'string' && isPathSeparator(firstPart.charCodeAt(0))) {\r\n ++slashCount;\r\n const firstLen = firstPart.length;\r\n if (firstLen > 1 && isPathSeparator(firstPart.charCodeAt(1))) {\r\n ++slashCount;\r\n if (firstLen > 2) {\r\n if (isPathSeparator(firstPart.charCodeAt(2))) {\r\n ++slashCount;\r\n }\r\n else {\r\n // We matched a UNC path in the first part\r\n needsReplace = false;\r\n }\r\n }\r\n }\r\n }\r\n if (needsReplace) {\r\n // Find any more consecutive slashes we need to replace\r\n while (slashCount < joined.length &&\r\n isPathSeparator(joined.charCodeAt(slashCount))) {\r\n slashCount++;\r\n }\r\n // Replace the slashes if needed\r\n if (slashCount >= 2) {\r\n joined = `\\\\${joined.slice(slashCount)}`;\r\n }\r\n }\r\n return win32.normalize(joined);\r\n },\r\n // It will solve the relative path from `from` to `to`, for instance:\r\n // from = 'C:\\\\orandea\\\\test\\\\aaa'\r\n // to = 'C:\\\\orandea\\\\impl\\\\bbb'\r\n // The output of the function should be: '..\\\\..\\\\impl\\\\bbb'\r\n relative(from, to) {\r\n validateString(from, 'from');\r\n validateString(to, 'to');\r\n if (from === to) {\r\n return '';\r\n }\r\n const fromOrig = win32.resolve(from);\r\n const toOrig = win32.resolve(to);\r\n if (fromOrig === toOrig) {\r\n return '';\r\n }\r\n from = fromOrig.toLowerCase();\r\n to = toOrig.toLowerCase();\r\n if (from === to) {\r\n return '';\r\n }\r\n // Trim any leading backslashes\r\n let fromStart = 0;\r\n while (fromStart < from.length &&\r\n from.charCodeAt(fromStart) === CHAR_BACKWARD_SLASH) {\r\n fromStart++;\r\n }\r\n // Trim trailing backslashes (applicable to UNC paths only)\r\n let fromEnd = from.length;\r\n while (fromEnd - 1 > fromStart &&\r\n from.charCodeAt(fromEnd - 1) === CHAR_BACKWARD_SLASH) {\r\n fromEnd--;\r\n }\r\n const fromLen = fromEnd - fromStart;\r\n // Trim any leading backslashes\r\n let toStart = 0;\r\n while (toStart < to.length &&\r\n to.charCodeAt(toStart) === CHAR_BACKWARD_SLASH) {\r\n toStart++;\r\n }\r\n // Trim trailing backslashes (applicable to UNC paths only)\r\n let toEnd = to.length;\r\n while (toEnd - 1 > toStart &&\r\n to.charCodeAt(toEnd - 1) === CHAR_BACKWARD_SLASH) {\r\n toEnd--;\r\n }\r\n const toLen = toEnd - toStart;\r\n // Compare paths to find the longest common path from root\r\n const length = fromLen < toLen ? fromLen : toLen;\r\n let lastCommonSep = -1;\r\n let i = 0;\r\n for (; i < length; i++) {\r\n const fromCode = from.charCodeAt(fromStart + i);\r\n if (fromCode !== to.charCodeAt(toStart + i)) {\r\n break;\r\n }\r\n else if (fromCode === CHAR_BACKWARD_SLASH) {\r\n lastCommonSep = i;\r\n }\r\n }\r\n // We found a mismatch before the first common path separator was seen, so\r\n // return the original `to`.\r\n if (i !== length) {\r\n if (lastCommonSep === -1) {\r\n return toOrig;\r\n }\r\n }\r\n else {\r\n if (toLen > length) {\r\n if (to.charCodeAt(toStart + i) === CHAR_BACKWARD_SLASH) {\r\n // We get here if `from` is the exact base path for `to`.\r\n // For example: from='C:\\\\foo\\\\bar'; to='C:\\\\foo\\\\bar\\\\baz'\r\n return toOrig.slice(toStart + i + 1);\r\n }\r\n if (i === 2) {\r\n // We get here if `from` is the device root.\r\n // For example: from='C:\\\\'; to='C:\\\\foo'\r\n return toOrig.slice(toStart + i);\r\n }\r\n }\r\n if (fromLen > length) {\r\n if (from.charCodeAt(fromStart + i) === CHAR_BACKWARD_SLASH) {\r\n // We get here if `to` is the exact base path for `from`.\r\n // For example: from='C:\\\\foo\\\\bar'; to='C:\\\\foo'\r\n lastCommonSep = i;\r\n }\r\n else if (i === 2) {\r\n // We get here if `to` is the device root.\r\n // For example: from='C:\\\\foo\\\\bar'; to='C:\\\\'\r\n lastCommonSep = 3;\r\n }\r\n }\r\n if (lastCommonSep === -1) {\r\n lastCommonSep = 0;\r\n }\r\n }\r\n let out = '';\r\n // Generate the relative path based on the path difference between `to` and\r\n // `from`\r\n for (i = fromStart + lastCommonSep + 1; i <= fromEnd; ++i) {\r\n if (i === fromEnd || from.charCodeAt(i) === CHAR_BACKWARD_SLASH) {\r\n out += out.length === 0 ? '..' : '\\\\..';\r\n }\r\n }\r\n toStart += lastCommonSep;\r\n // Lastly, append the rest of the destination (`to`) path that comes after\r\n // the common path parts\r\n if (out.length > 0) {\r\n return `${out}${toOrig.slice(toStart, toEnd)}`;\r\n }\r\n if (toOrig.charCodeAt(toStart) === CHAR_BACKWARD_SLASH) {\r\n ++toStart;\r\n }\r\n return toOrig.slice(toStart, toEnd);\r\n },\r\n toNamespacedPath(path) {\r\n // Note: this will *probably* throw somewhere.\r\n if (typeof path !== 'string') {\r\n return path;\r\n }\r\n if (path.length === 0) {\r\n return '';\r\n }\r\n const resolvedPath = win32.resolve(path);\r\n if (resolvedPath.length <= 2) {\r\n return path;\r\n }\r\n if (resolvedPath.charCodeAt(0) === CHAR_BACKWARD_SLASH) {\r\n // Possible UNC root\r\n if (resolvedPath.charCodeAt(1) === CHAR_BACKWARD_SLASH) {\r\n const code = resolvedPath.charCodeAt(2);\r\n if (code !== CHAR_QUESTION_MARK && code !== CHAR_DOT) {\r\n // Matched non-long UNC root, convert the path to a long UNC path\r\n return `\\\\\\\\?\\\\UNC\\\\${resolvedPath.slice(2)}`;\r\n }\r\n }\r\n }\r\n else if (isWindowsDeviceRoot(resolvedPath.charCodeAt(0)) &&\r\n resolvedPath.charCodeAt(1) === CHAR_COLON &&\r\n resolvedPath.charCodeAt(2) === CHAR_BACKWARD_SLASH) {\r\n // Matched device root, convert the path to a long UNC path\r\n return `\\\\\\\\?\\\\${resolvedPath}`;\r\n }\r\n return path;\r\n },\r\n dirname(path) {\r\n validateString(path, 'path');\r\n const len = path.length;\r\n if (len === 0) {\r\n return '.';\r\n }\r\n let rootEnd = -1;\r\n let offset = 0;\r\n const code = path.charCodeAt(0);\r\n if (len === 1) {\r\n // `path` contains just a path separator, exit early to avoid\r\n // unnecessary work or a dot.\r\n return isPathSeparator(code) ? path : '.';\r\n }\r\n // Try to match a root\r\n if (isPathSeparator(code)) {\r\n // Possible UNC root\r\n rootEnd = offset = 1;\r\n if (isPathSeparator(path.charCodeAt(1))) {\r\n // Matched double path separator at beginning\r\n let j = 2;\r\n let last = j;\r\n // Match 1 or more non-path separators\r\n while (j < len && !isPathSeparator(path.charCodeAt(j))) {\r\n j++;\r\n }\r\n if (j < len && j !== last) {\r\n // Matched!\r\n last = j;\r\n // Match 1 or more path separators\r\n while (j < len && isPathSeparator(path.charCodeAt(j))) {\r\n j++;\r\n }\r\n if (j < len && j !== last) {\r\n // Matched!\r\n last = j;\r\n // Match 1 or more non-path separators\r\n while (j < len && !isPathSeparator(path.charCodeAt(j))) {\r\n j++;\r\n }\r\n if (j === len) {\r\n // We matched a UNC root only\r\n return path;\r\n }\r\n if (j !== last) {\r\n // We matched a UNC root with leftovers\r\n // Offset by 1 to include the separator after the UNC root to\r\n // treat it as a \"normal root\" on top of a (UNC) root\r\n rootEnd = offset = j + 1;\r\n }\r\n }\r\n }\r\n }\r\n // Possible device root\r\n }\r\n else if (isWindowsDeviceRoot(code) && path.charCodeAt(1) === CHAR_COLON) {\r\n rootEnd = len > 2 && isPathSeparator(path.charCodeAt(2)) ? 3 : 2;\r\n offset = rootEnd;\r\n }\r\n let end = -1;\r\n let matchedSlash = true;\r\n for (let i = len - 1; i >= offset; --i) {\r\n if (isPathSeparator(path.charCodeAt(i))) {\r\n if (!matchedSlash) {\r\n end = i;\r\n break;\r\n }\r\n }\r\n else {\r\n // We saw the first non-path separator\r\n matchedSlash = false;\r\n }\r\n }\r\n if (end === -1) {\r\n if (rootEnd === -1) {\r\n return '.';\r\n }\r\n end = rootEnd;\r\n }\r\n return path.slice(0, end);\r\n },\r\n basename(path, ext) {\r\n if (ext !== undefined) {\r\n validateString(ext, 'ext');\r\n }\r\n validateString(path, 'path');\r\n let start = 0;\r\n let end = -1;\r\n let matchedSlash = true;\r\n let i;\r\n // Check for a drive letter prefix so as not to mistake the following\r\n // path separator as an extra separator at the end of the path that can be\r\n // disregarded\r\n if (path.length >= 2 &&\r\n isWindowsDeviceRoot(path.charCodeAt(0)) &&\r\n path.charCodeAt(1) === CHAR_COLON) {\r\n start = 2;\r\n }\r\n if (ext !== undefined && ext.length > 0 && ext.length <= path.length) {\r\n if (ext === path) {\r\n return '';\r\n }\r\n let extIdx = ext.length - 1;\r\n let firstNonSlashEnd = -1;\r\n for (i = path.length - 1; i >= start; --i) {\r\n const code = path.charCodeAt(i);\r\n if (isPathSeparator(code)) {\r\n // If we reached a path separator that was not part of a set of path\r\n // separators at the end of the string, stop now\r\n if (!matchedSlash) {\r\n start = i + 1;\r\n break;\r\n }\r\n }\r\n else {\r\n if (firstNonSlashEnd === -1) {\r\n // We saw the first non-path separator, remember this index in case\r\n // we need it if the extension ends up not matching\r\n matchedSlash = false;\r\n firstNonSlashEnd = i + 1;\r\n }\r\n if (extIdx >= 0) {\r\n // Try to match the explicit extension\r\n if (code === ext.charCodeAt(extIdx)) {\r\n if (--extIdx === -1) {\r\n // We matched the extension, so mark this as the end of our path\r\n // component\r\n end = i;\r\n }\r\n }\r\n else {\r\n // Extension does not match, so our result is the entire path\r\n // component\r\n extIdx = -1;\r\n end = firstNonSlashEnd;\r\n }\r\n }\r\n }\r\n }\r\n if (start === end) {\r\n end = firstNonSlashEnd;\r\n }\r\n else if (end === -1) {\r\n end = path.length;\r\n }\r\n return path.slice(start, end);\r\n }\r\n for (i = path.length - 1; i >= start; --i) {\r\n if (isPathSeparator(path.charCodeAt(i))) {\r\n // If we reached a path separator that was not part of a set of path\r\n // separators at the end of the string, stop now\r\n if (!matchedSlash) {\r\n start = i + 1;\r\n break;\r\n }\r\n }\r\n else if (end === -1) {\r\n // We saw the first non-path separator, mark this as the end of our\r\n // path component\r\n matchedSlash = false;\r\n end = i + 1;\r\n }\r\n }\r\n if (end === -1) {\r\n return '';\r\n }\r\n return path.slice(start, end);\r\n },\r\n extname(path) {\r\n validateString(path, 'path');\r\n let start = 0;\r\n let startDot = -1;\r\n let startPart = 0;\r\n let end = -1;\r\n let matchedSlash = true;\r\n // Track the state of characters (if any) we see before our first dot and\r\n // after any path separator we find\r\n let preDotState = 0;\r\n // Check for a drive letter prefix so as not to mistake the following\r\n // path separator as an extra separator at the end of the path that can be\r\n // disregarded\r\n if (path.length >= 2 &&\r\n path.charCodeAt(1) === CHAR_COLON &&\r\n isWindowsDeviceRoot(path.charCodeAt(0))) {\r\n start = startPart = 2;\r\n }\r\n for (let i = path.length - 1; i >= start; --i) {\r\n const code = path.charCodeAt(i);\r\n if (isPathSeparator(code)) {\r\n // If we reached a path separator that was not part of a set of path\r\n // separators at the end of the string, stop now\r\n if (!matchedSlash) {\r\n startPart = i + 1;\r\n break;\r\n }\r\n continue;\r\n }\r\n if (end === -1) {\r\n // We saw the first non-path separator, mark this as the end of our\r\n // extension\r\n matchedSlash = false;\r\n end = i + 1;\r\n }\r\n if (code === CHAR_DOT) {\r\n // If this is our first dot, mark it as the start of our extension\r\n if (startDot === -1) {\r\n startDot = i;\r\n }\r\n else if (preDotState !== 1) {\r\n preDotState = 1;\r\n }\r\n }\r\n else if (startDot !== -1) {\r\n // We saw a non-dot and non-path separator before our dot, so we should\r\n // have a good chance at having a non-empty extension\r\n preDotState = -1;\r\n }\r\n }\r\n if (startDot === -1 ||\r\n end === -1 ||\r\n // We saw a non-dot character immediately before the dot\r\n preDotState === 0 ||\r\n // The (right-most) trimmed path component is exactly '..'\r\n (preDotState === 1 &&\r\n startDot === end - 1 &&\r\n startDot === startPart + 1)) {\r\n return '';\r\n }\r\n return path.slice(startDot, end);\r\n },\r\n format: _format.bind(null, '\\\\'),\r\n parse(path) {\r\n validateString(path, 'path');\r\n const ret = { root: '', dir: '', base: '', ext: '', name: '' };\r\n if (path.length === 0) {\r\n return ret;\r\n }\r\n const len = path.length;\r\n let rootEnd = 0;\r\n let code = path.charCodeAt(0);\r\n if (len === 1) {\r\n if (isPathSeparator(code)) {\r\n // `path` contains just a path separator, exit early to avoid\r\n // unnecessary work\r\n ret.root = ret.dir = path;\r\n return ret;\r\n }\r\n ret.base = ret.name = path;\r\n return ret;\r\n }\r\n // Try to match a root\r\n if (isPathSeparator(code)) {\r\n // Possible UNC root\r\n rootEnd = 1;\r\n if (isPathSeparator(path.charCodeAt(1))) {\r\n // Matched double path separator at beginning\r\n let j = 2;\r\n let last = j;\r\n // Match 1 or more non-path separators\r\n while (j < len && !isPathSeparator(path.charCodeAt(j))) {\r\n j++;\r\n }\r\n if (j < len && j !== last) {\r\n // Matched!\r\n last = j;\r\n // Match 1 or more path separators\r\n while (j < len && isPathSeparator(path.charCodeAt(j))) {\r\n j++;\r\n }\r\n if (j < len && j !== last) {\r\n // Matched!\r\n last = j;\r\n // Match 1 or more non-path separators\r\n while (j < len && !isPathSeparator(path.charCodeAt(j))) {\r\n j++;\r\n }\r\n if (j === len) {\r\n // We matched a UNC root only\r\n rootEnd = j;\r\n }\r\n else if (j !== last) {\r\n // We matched a UNC root with leftovers\r\n rootEnd = j + 1;\r\n }\r\n }\r\n }\r\n }\r\n }\r\n else if (isWindowsDeviceRoot(code) && path.charCodeAt(1) === CHAR_COLON) {\r\n // Possible device root\r\n if (len <= 2) {\r\n // `path` contains just a drive root, exit early to avoid\r\n // unnecessary work\r\n ret.root = ret.dir = path;\r\n return ret;\r\n }\r\n rootEnd = 2;\r\n if (isPathSeparator(path.charCodeAt(2))) {\r\n if (len === 3) {\r\n // `path` contains just a drive root, exit early to avoid\r\n // unnecessary work\r\n ret.root = ret.dir = path;\r\n return ret;\r\n }\r\n rootEnd = 3;\r\n }\r\n }\r\n if (rootEnd > 0) {\r\n ret.root = path.slice(0, rootEnd);\r\n }\r\n let startDot = -1;\r\n let startPart = rootEnd;\r\n let end = -1;\r\n let matchedSlash = true;\r\n let i = path.length - 1;\r\n // Track the state of characters (if any) we see before our first dot and\r\n // after any path separator we find\r\n let preDotState = 0;\r\n // Get non-dir info\r\n for (; i >= rootEnd; --i) {\r\n code = path.charCodeAt(i);\r\n if (isPathSeparator(code)) {\r\n // If we reached a path separator that was not part of a set of path\r\n // separators at the end of the string, stop now\r\n if (!matchedSlash) {\r\n startPart = i + 1;\r\n break;\r\n }\r\n continue;\r\n }\r\n if (end === -1) {\r\n // We saw the first non-path separator, mark this as the end of our\r\n // extension\r\n matchedSlash = false;\r\n end = i + 1;\r\n }\r\n if (code === CHAR_DOT) {\r\n // If this is our first dot, mark it as the start of our extension\r\n if (startDot === -1) {\r\n startDot = i;\r\n }\r\n else if (preDotState !== 1) {\r\n preDotState = 1;\r\n }\r\n }\r\n else if (startDot !== -1) {\r\n // We saw a non-dot and non-path separator before our dot, so we should\r\n // have a good chance at having a non-empty extension\r\n preDotState = -1;\r\n }\r\n }\r\n if (end !== -1) {\r\n if (startDot === -1 ||\r\n // We saw a non-dot character immediately before the dot\r\n preDotState === 0 ||\r\n // The (right-most) trimmed path component is exactly '..'\r\n (preDotState === 1 &&\r\n startDot === end - 1 &&\r\n startDot === startPart + 1)) {\r\n ret.base = ret.name = path.slice(startPart, end);\r\n }\r\n else {\r\n ret.name = path.slice(startPart, startDot);\r\n ret.base = path.slice(startPart, end);\r\n ret.ext = path.slice(startDot, end);\r\n }\r\n }\r\n // If the directory is the root, use the entire root as the `dir` including\r\n // the trailing slash if any (`C:\\abc` -> `C:\\`). Otherwise, strip out the\r\n // trailing slash (`C:\\abc\\def` -> `C:\\abc`).\r\n if (startPart > 0 && startPart !== rootEnd) {\r\n ret.dir = path.slice(0, startPart - 1);\r\n }\r\n else {\r\n ret.dir = ret.root;\r\n }\r\n return ret;\r\n },\r\n sep: '\\\\',\r\n delimiter: ';',\r\n win32: null,\r\n posix: null\r\n};\r\nexport const posix = {\r\n // path.resolve([from ...], to)\r\n resolve(...pathSegments) {\r\n let resolvedPath = '';\r\n let resolvedAbsolute = false;\r\n for (let i = pathSegments.length - 1; i >= -1 && !resolvedAbsolute; i--) {\r\n const path = i >= 0 ? pathSegments[i] : process.cwd();\r\n validateString(path, 'path');\r\n // Skip empty entries\r\n if (path.length === 0) {\r\n continue;\r\n }\r\n resolvedPath = `${path}/${resolvedPath}`;\r\n resolvedAbsolute = path.charCodeAt(0) === CHAR_FORWARD_SLASH;\r\n }\r\n // At this point the path should be resolved to a full absolute path, but\r\n // handle relative paths to be safe (might happen when process.cwd() fails)\r\n // Normalize the path\r\n resolvedPath = normalizeString(resolvedPath, !resolvedAbsolute, '/', isPosixPathSeparator);\r\n if (resolvedAbsolute) {\r\n return `/${resolvedPath}`;\r\n }\r\n return resolvedPath.length > 0 ? resolvedPath : '.';\r\n },\r\n normalize(path) {\r\n validateString(path, 'path');\r\n if (path.length === 0) {\r\n return '.';\r\n }\r\n const isAbsolute = path.charCodeAt(0) === CHAR_FORWARD_SLASH;\r\n const trailingSeparator = path.charCodeAt(path.length - 1) === CHAR_FORWARD_SLASH;\r\n // Normalize the path\r\n path = normalizeString(path, !isAbsolute, '/', isPosixPathSeparator);\r\n if (path.length === 0) {\r\n if (isAbsolute) {\r\n return '/';\r\n }\r\n return trailingSeparator ? './' : '.';\r\n }\r\n if (trailingSeparator) {\r\n path += '/';\r\n }\r\n return isAbsolute ? `/${path}` : path;\r\n },\r\n isAbsolute(path) {\r\n validateString(path, 'path');\r\n return path.length > 0 && path.charCodeAt(0) === CHAR_FORWARD_SLASH;\r\n },\r\n join(...paths) {\r\n if (paths.length === 0) {\r\n return '.';\r\n }\r\n let joined;\r\n for (let i = 0; i < paths.length; ++i) {\r\n const arg = paths[i];\r\n validateString(arg, 'path');\r\n if (arg.length > 0) {\r\n if (joined === undefined) {\r\n joined = arg;\r\n }\r\n else {\r\n joined += `/${arg}`;\r\n }\r\n }\r\n }\r\n if (joined === undefined) {\r\n return '.';\r\n }\r\n return posix.normalize(joined);\r\n },\r\n relative(from, to) {\r\n validateString(from, 'from');\r\n validateString(to, 'to');\r\n if (from === to) {\r\n return '';\r\n }\r\n // Trim leading forward slashes.\r\n from = posix.resolve(from);\r\n to = posix.resolve(to);\r\n if (from === to) {\r\n return '';\r\n }\r\n const fromStart = 1;\r\n const fromEnd = from.length;\r\n const fromLen = fromEnd - fromStart;\r\n const toStart = 1;\r\n const toLen = to.length - toStart;\r\n // Compare paths to find the longest common path from root\r\n const length = (fromLen < toLen ? fromLen : toLen);\r\n let lastCommonSep = -1;\r\n let i = 0;\r\n for (; i < length; i++) {\r\n const fromCode = from.charCodeAt(fromStart + i);\r\n if (fromCode !== to.charCodeAt(toStart + i)) {\r\n break;\r\n }\r\n else if (fromCode === CHAR_FORWARD_SLASH) {\r\n lastCommonSep = i;\r\n }\r\n }\r\n if (i === length) {\r\n if (toLen > length) {\r\n if (to.charCodeAt(toStart + i) === CHAR_FORWARD_SLASH) {\r\n // We get here if `from` is the exact base path for `to`.\r\n // For example: from='/foo/bar'; to='/foo/bar/baz'\r\n return to.slice(toStart + i + 1);\r\n }\r\n if (i === 0) {\r\n // We get here if `from` is the root\r\n // For example: from='/'; to='/foo'\r\n return to.slice(toStart + i);\r\n }\r\n }\r\n else if (fromLen > length) {\r\n if (from.charCodeAt(fromStart + i) === CHAR_FORWARD_SLASH) {\r\n // We get here if `to` is the exact base path for `from`.\r\n // For example: from='/foo/bar/baz'; to='/foo/bar'\r\n lastCommonSep = i;\r\n }\r\n else if (i === 0) {\r\n // We get here if `to` is the root.\r\n // For example: from='/foo/bar'; to='/'\r\n lastCommonSep = 0;\r\n }\r\n }\r\n }\r\n let out = '';\r\n // Generate the relative path based on the path difference between `to`\r\n // and `from`.\r\n for (i = fromStart + lastCommonSep + 1; i <= fromEnd; ++i) {\r\n if (i === fromEnd || from.charCodeAt(i) === CHAR_FORWARD_SLASH) {\r\n out += out.length === 0 ? '..' : '/..';\r\n }\r\n }\r\n // Lastly, append the rest of the destination (`to`) path that comes after\r\n // the common path parts.\r\n return `${out}${to.slice(toStart + lastCommonSep)}`;\r\n },\r\n toNamespacedPath(path) {\r\n // Non-op on posix systems\r\n return path;\r\n },\r\n dirname(path) {\r\n validateString(path, 'path');\r\n if (path.length === 0) {\r\n return '.';\r\n }\r\n const hasRoot = path.charCodeAt(0) === CHAR_FORWARD_SLASH;\r\n let end = -1;\r\n let matchedSlash = true;\r\n for (let i = path.length - 1; i >= 1; --i) {\r\n if (path.charCodeAt(i) === CHAR_FORWARD_SLASH) {\r\n if (!matchedSlash) {\r\n end = i;\r\n break;\r\n }\r\n }\r\n else {\r\n // We saw the first non-path separator\r\n matchedSlash = false;\r\n }\r\n }\r\n if (end === -1) {\r\n return hasRoot ? '/' : '.';\r\n }\r\n if (hasRoot && end === 1) {\r\n return '//';\r\n }\r\n return path.slice(0, end);\r\n },\r\n basename(path, ext) {\r\n if (ext !== undefined) {\r\n validateString(ext, 'ext');\r\n }\r\n validateString(path, 'path');\r\n let start = 0;\r\n let end = -1;\r\n let matchedSlash = true;\r\n let i;\r\n if (ext !== undefined && ext.length > 0 && ext.length <= path.length) {\r\n if (ext === path) {\r\n return '';\r\n }\r\n let extIdx = ext.length - 1;\r\n let firstNonSlashEnd = -1;\r\n for (i = path.length - 1; i >= 0; --i) {\r\n const code = path.charCodeAt(i);\r\n if (code === CHAR_FORWARD_SLASH) {\r\n // If we reached a path separator that was not part of a set of path\r\n // separators at the end of the string, stop now\r\n if (!matchedSlash) {\r\n start = i + 1;\r\n break;\r\n }\r\n }\r\n else {\r\n if (firstNonSlashEnd === -1) {\r\n // We saw the first non-path separator, remember this index in case\r\n // we need it if the extension ends up not matching\r\n matchedSlash = false;\r\n firstNonSlashEnd = i + 1;\r\n }\r\n if (extIdx >= 0) {\r\n // Try to match the explicit extension\r\n if (code === ext.charCodeAt(extIdx)) {\r\n if (--extIdx === -1) {\r\n // We matched the extension, so mark this as the end of our path\r\n // component\r\n end = i;\r\n }\r\n }\r\n else {\r\n // Extension does not match, so our result is the entire path\r\n // component\r\n extIdx = -1;\r\n end = firstNonSlashEnd;\r\n }\r\n }\r\n }\r\n }\r\n if (start === end) {\r\n end = firstNonSlashEnd;\r\n }\r\n else if (end === -1) {\r\n end = path.length;\r\n }\r\n return path.slice(start, end);\r\n }\r\n for (i = path.length - 1; i >= 0; --i) {\r\n if (path.charCodeAt(i) === CHAR_FORWARD_SLASH) {\r\n // If we reached a path separator that was not part of a set of path\r\n // separators at the end of the string, stop now\r\n if (!matchedSlash) {\r\n start = i + 1;\r\n break;\r\n }\r\n }\r\n else if (end === -1) {\r\n // We saw the first non-path separator, mark this as the end of our\r\n // path component\r\n matchedSlash = false;\r\n end = i + 1;\r\n }\r\n }\r\n if (end === -1) {\r\n return '';\r\n }\r\n return path.slice(start, end);\r\n },\r\n extname(path) {\r\n validateString(path, 'path');\r\n let startDot = -1;\r\n let startPart = 0;\r\n let end = -1;\r\n let matchedSlash = true;\r\n // Track the state of characters (if any) we see before our first dot and\r\n // after any path separator we find\r\n let preDotState = 0;\r\n for (let i = path.length - 1; i >= 0; --i) {\r\n const code = path.charCodeAt(i);\r\n if (code === CHAR_FORWARD_SLASH) {\r\n // If we reached a path separator that was not part of a set of path\r\n // separators at the end of the string, stop now\r\n if (!matchedSlash) {\r\n startPart = i + 1;\r\n break;\r\n }\r\n continue;\r\n }\r\n if (end === -1) {\r\n // We saw the first non-path separator, mark this as the end of our\r\n // extension\r\n matchedSlash = false;\r\n end = i + 1;\r\n }\r\n if (code === CHAR_DOT) {\r\n // If this is our first dot, mark it as the start of our extension\r\n if (startDot === -1) {\r\n startDot = i;\r\n }\r\n else if (preDotState !== 1) {\r\n preDotState = 1;\r\n }\r\n }\r\n else if (startDot !== -1) {\r\n // We saw a non-dot and non-path separator before our dot, so we should\r\n // have a good chance at having a non-empty extension\r\n preDotState = -1;\r\n }\r\n }\r\n if (startDot === -1 ||\r\n end === -1 ||\r\n // We saw a non-dot character immediately before the dot\r\n preDotState === 0 ||\r\n // The (right-most) trimmed path component is exactly '..'\r\n (preDotState === 1 &&\r\n startDot === end - 1 &&\r\n startDot === startPart + 1)) {\r\n return '';\r\n }\r\n return path.slice(startDot, end);\r\n },\r\n format: _format.bind(null, '/'),\r\n parse(path) {\r\n validateString(path, 'path');\r\n const ret = { root: '', dir: '', base: '', ext: '', name: '' };\r\n if (path.length === 0) {\r\n return ret;\r\n }\r\n const isAbsolute = path.charCodeAt(0) === CHAR_FORWARD_SLASH;\r\n let start;\r\n if (isAbsolute) {\r\n ret.root = '/';\r\n start = 1;\r\n }\r\n else {\r\n start = 0;\r\n }\r\n let startDot = -1;\r\n let startPart = 0;\r\n let end = -1;\r\n let matchedSlash = true;\r\n let i = path.length - 1;\r\n // Track the state of characters (if any) we see before our first dot and\r\n // after any path separator we find\r\n let preDotState = 0;\r\n // Get non-dir info\r\n for (; i >= start; --i) {\r\n const code = path.charCodeAt(i);\r\n if (code === CHAR_FORWARD_SLASH) {\r\n // If we reached a path separator that was not part of a set of path\r\n // separators at the end of the string, stop now\r\n if (!matchedSlash) {\r\n startPart = i + 1;\r\n break;\r\n }\r\n continue;\r\n }\r\n if (end === -1) {\r\n // We saw the first non-path separator, mark this as the end of our\r\n // extension\r\n matchedSlash = false;\r\n end = i + 1;\r\n }\r\n if (code === CHAR_DOT) {\r\n // If this is our first dot, mark it as the start of our extension\r\n if (startDot === -1) {\r\n startDot = i;\r\n }\r\n else if (preDotState !== 1) {\r\n preDotState = 1;\r\n }\r\n }\r\n else if (startDot !== -1) {\r\n // We saw a non-dot and non-path separator before our dot, so we should\r\n // have a good chance at having a non-empty extension\r\n preDotState = -1;\r\n }\r\n }\r\n if (end !== -1) {\r\n const start = startPart === 0 && isAbsolute ? 1 : startPart;\r\n if (startDot === -1 ||\r\n // We saw a non-dot character immediately before the dot\r\n preDotState === 0 ||\r\n // The (right-most) trimmed path component is exactly '..'\r\n (preDotState === 1 &&\r\n startDot === end - 1 &&\r\n startDot === startPart + 1)) {\r\n ret.base = ret.name = path.slice(start, end);\r\n }\r\n else {\r\n ret.name = path.slice(start, startDot);\r\n ret.base = path.slice(start, end);\r\n ret.ext = path.slice(startDot, end);\r\n }\r\n }\r\n if (startPart > 0) {\r\n ret.dir = path.slice(0, startPart - 1);\r\n }\r\n else if (isAbsolute) {\r\n ret.dir = '/';\r\n }\r\n return ret;\r\n },\r\n sep: '/',\r\n delimiter: ':',\r\n win32: null,\r\n posix: null\r\n};\r\nposix.win32 = win32.win32 = win32;\r\nposix.posix = win32.posix = posix;\r\nexport const normalize = (process.platform === 'win32' ? win32.normalize : posix.normalize);\r\nexport const resolve = (process.platform === 'win32' ? win32.resolve : posix.resolve);\r\nexport const relative = (process.platform === 'win32' ? win32.relative : posix.relative);\r\nexport const dirname = (process.platform === 'win32' ? win32.dirname : posix.dirname);\r\nexport const basename = (process.platform === 'win32' ? win32.basename : posix.basename);\r\nexport const extname = (process.platform === 'win32' ? win32.extname : posix.extname);\r\nexport const sep = (process.platform === 'win32' ? win32.sep : posix.sep);\r\n","/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nimport { isWindows } from './platform.js';\r\nimport * as paths from './path.js';\r\nconst _schemePattern = /^\\w[\\w\\d+.-]*$/;\r\nconst _singleSlashStart = /^\\//;\r\nconst _doubleSlashStart = /^\\/\\//;\r\nfunction _validateUri(ret, _strict) {\r\n // scheme, must be set\r\n if (!ret.scheme && _strict) {\r\n throw new Error(`[UriError]: Scheme is missing: {scheme: \"\", authority: \"${ret.authority}\", path: \"${ret.path}\", query: \"${ret.query}\", fragment: \"${ret.fragment}\"}`);\r\n }\r\n // scheme, https://tools.ietf.org/html/rfc3986#section-3.1\r\n // ALPHA *( ALPHA / DIGIT / \"+\" / \"-\" / \".\" )\r\n if (ret.scheme && !_schemePattern.test(ret.scheme)) {\r\n throw new Error('[UriError]: Scheme contains illegal characters.');\r\n }\r\n // path, http://tools.ietf.org/html/rfc3986#section-3.3\r\n // If a URI contains an authority component, then the path component\r\n // must either be empty or begin with a slash (\"/\") character. If a URI\r\n // does not contain an authority component, then the path cannot begin\r\n // with two slash characters (\"//\").\r\n if (ret.path) {\r\n if (ret.authority) {\r\n if (!_singleSlashStart.test(ret.path)) {\r\n throw new Error('[UriError]: If a URI contains an authority component, then the path component must either be empty or begin with a slash (\"/\") character');\r\n }\r\n }\r\n else {\r\n if (_doubleSlashStart.test(ret.path)) {\r\n throw new Error('[UriError]: If a URI does not contain an authority component, then the path cannot begin with two slash characters (\"//\")');\r\n }\r\n }\r\n }\r\n}\r\n// for a while we allowed uris *without* schemes and this is the migration\r\n// for them, e.g. an uri without scheme and without strict-mode warns and falls\r\n// back to the file-scheme. that should cause the least carnage and still be a\r\n// clear warning\r\nfunction _schemeFix(scheme, _strict) {\r\n if (!scheme && !_strict) {\r\n return 'file';\r\n }\r\n return scheme;\r\n}\r\n// implements a bit of https://tools.ietf.org/html/rfc3986#section-5\r\nfunction _referenceResolution(scheme, path) {\r\n // the slash-character is our 'default base' as we don't\r\n // support constructing URIs relative to other URIs. This\r\n // also means that we alter and potentially break paths.\r\n // see https://tools.ietf.org/html/rfc3986#section-5.1.4\r\n switch (scheme) {\r\n case 'https':\r\n case 'http':\r\n case 'file':\r\n if (!path) {\r\n path = _slash;\r\n }\r\n else if (path[0] !== _slash) {\r\n path = _slash + path;\r\n }\r\n break;\r\n }\r\n return path;\r\n}\r\nconst _empty = '';\r\nconst _slash = '/';\r\nconst _regexp = /^(([^:/?#]+?):)?(\\/\\/([^/?#]*))?([^?#]*)(\\?([^#]*))?(#(.*))?/;\r\n/**\r\n * Uniform Resource Identifier (URI) http://tools.ietf.org/html/rfc3986.\r\n * This class is a simple parser which creates the basic component parts\r\n * (http://tools.ietf.org/html/rfc3986#section-3) with minimal validation\r\n * and encoding.\r\n *\r\n * ```txt\r\n * foo://example.com:8042/over/there?name=ferret#nose\r\n * \\_/ \\______________/\\_________/ \\_________/ \\__/\r\n * | | | | |\r\n * scheme authority path query fragment\r\n * | _____________________|__\r\n * / \\ / \\\r\n * urn:example:animal:ferret:nose\r\n * ```\r\n */\r\nexport class URI {\r\n /**\r\n * @internal\r\n */\r\n constructor(schemeOrData, authority, path, query, fragment, _strict = false) {\r\n if (typeof schemeOrData === 'object') {\r\n this.scheme = schemeOrData.scheme || _empty;\r\n this.authority = schemeOrData.authority || _empty;\r\n this.path = schemeOrData.path || _empty;\r\n this.query = schemeOrData.query || _empty;\r\n this.fragment = schemeOrData.fragment || _empty;\r\n // no validation because it's this URI\r\n // that creates uri components.\r\n // _validateUri(this);\r\n }\r\n else {\r\n this.scheme = _schemeFix(schemeOrData, _strict);\r\n this.authority = authority || _empty;\r\n this.path = _referenceResolution(this.scheme, path || _empty);\r\n this.query = query || _empty;\r\n this.fragment = fragment || _empty;\r\n _validateUri(this, _strict);\r\n }\r\n }\r\n static isUri(thing) {\r\n if (thing instanceof URI) {\r\n return true;\r\n }\r\n if (!thing) {\r\n return false;\r\n }\r\n return typeof thing.authority === 'string'\r\n && typeof thing.fragment === 'string'\r\n && typeof thing.path === 'string'\r\n && typeof thing.query === 'string'\r\n && typeof thing.scheme === 'string'\r\n && typeof thing.fsPath === 'string'\r\n && typeof thing.with === 'function'\r\n && typeof thing.toString === 'function';\r\n }\r\n // ---- filesystem path -----------------------\r\n /**\r\n * Returns a string representing the corresponding file system path of this URI.\r\n * Will handle UNC paths, normalizes windows drive letters to lower-case, and uses the\r\n * platform specific path separator.\r\n *\r\n * * Will *not* validate the path for invalid characters and semantics.\r\n * * Will *not* look at the scheme of this URI.\r\n * * The result shall *not* be used for display purposes but for accessing a file on disk.\r\n *\r\n *\r\n * The *difference* to `URI#path` is the use of the platform specific separator and the handling\r\n * of UNC paths. See the below sample of a file-uri with an authority (UNC path).\r\n *\r\n * ```ts\r\n const u = URI.parse('file://server/c$/folder/file.txt')\r\n u.authority === 'server'\r\n u.path === '/shares/c$/file.txt'\r\n u.fsPath === '\\\\server\\c$\\folder\\file.txt'\r\n ```\r\n *\r\n * Using `URI#path` to read a file (using fs-apis) would not be enough because parts of the path,\r\n * namely the server name, would be missing. Therefore `URI#fsPath` exists - it's sugar to ease working\r\n * with URIs that represent files on disk (`file` scheme).\r\n */\r\n get fsPath() {\r\n // if (this.scheme !== 'file') {\r\n // \tconsole.warn(`[UriError] calling fsPath with scheme ${this.scheme}`);\r\n // }\r\n return uriToFsPath(this, false);\r\n }\r\n // ---- modify to new -------------------------\r\n with(change) {\r\n if (!change) {\r\n return this;\r\n }\r\n let { scheme, authority, path, query, fragment } = change;\r\n if (scheme === undefined) {\r\n scheme = this.scheme;\r\n }\r\n else if (scheme === null) {\r\n scheme = _empty;\r\n }\r\n if (authority === undefined) {\r\n authority = this.authority;\r\n }\r\n else if (authority === null) {\r\n authority = _empty;\r\n }\r\n if (path === undefined) {\r\n path = this.path;\r\n }\r\n else if (path === null) {\r\n path = _empty;\r\n }\r\n if (query === undefined) {\r\n query = this.query;\r\n }\r\n else if (query === null) {\r\n query = _empty;\r\n }\r\n if (fragment === undefined) {\r\n fragment = this.fragment;\r\n }\r\n else if (fragment === null) {\r\n fragment = _empty;\r\n }\r\n if (scheme === this.scheme\r\n && authority === this.authority\r\n && path === this.path\r\n && query === this.query\r\n && fragment === this.fragment) {\r\n return this;\r\n }\r\n return new Uri(scheme, authority, path, query, fragment);\r\n }\r\n // ---- parse & validate ------------------------\r\n /**\r\n * Creates a new URI from a string, e.g. `http://www.msft.com/some/path`,\r\n * `file:///usr/home`, or `scheme:with/path`.\r\n *\r\n * @param value A string which represents an URI (see `URI#toString`).\r\n */\r\n static parse(value, _strict = false) {\r\n const match = _regexp.exec(value);\r\n if (!match) {\r\n return new Uri(_empty, _empty, _empty, _empty, _empty);\r\n }\r\n return new Uri(match[2] || _empty, percentDecode(match[4] || _empty), percentDecode(match[5] || _empty), percentDecode(match[7] || _empty), percentDecode(match[9] || _empty), _strict);\r\n }\r\n /**\r\n * Creates a new URI from a file system path, e.g. `c:\\my\\files`,\r\n * `/usr/home`, or `\\\\server\\share\\some\\path`.\r\n *\r\n * The *difference* between `URI#parse` and `URI#file` is that the latter treats the argument\r\n * as path, not as stringified-uri. E.g. `URI.file(path)` is **not the same as**\r\n * `URI.parse('file://' + path)` because the path might contain characters that are\r\n * interpreted (# and ?). See the following sample:\r\n * ```ts\r\n const good = URI.file('/coding/c#/project1');\r\n good.scheme === 'file';\r\n good.path === '/coding/c#/project1';\r\n good.fragment === '';\r\n const bad = URI.parse('file://' + '/coding/c#/project1');\r\n bad.scheme === 'file';\r\n bad.path === '/coding/c'; // path is now broken\r\n bad.fragment === '/project1';\r\n ```\r\n *\r\n * @param path A file system path (see `URI#fsPath`)\r\n */\r\n static file(path) {\r\n let authority = _empty;\r\n // normalize to fwd-slashes on windows,\r\n // on other systems bwd-slashes are valid\r\n // filename character, eg /f\\oo/ba\\r.txt\r\n if (isWindows) {\r\n path = path.replace(/\\\\/g, _slash);\r\n }\r\n // check for authority as used in UNC shares\r\n // or use the path as given\r\n if (path[0] === _slash && path[1] === _slash) {\r\n const idx = path.indexOf(_slash, 2);\r\n if (idx === -1) {\r\n authority = path.substring(2);\r\n path = _slash;\r\n }\r\n else {\r\n authority = path.substring(2, idx);\r\n path = path.substring(idx) || _slash;\r\n }\r\n }\r\n return new Uri('file', authority, path, _empty, _empty);\r\n }\r\n static from(components) {\r\n const result = new Uri(components.scheme, components.authority, components.path, components.query, components.fragment);\r\n _validateUri(result, true);\r\n return result;\r\n }\r\n /**\r\n * Join a URI path with path fragments and normalizes the resulting path.\r\n *\r\n * @param uri The input URI.\r\n * @param pathFragment The path fragment to add to the URI path.\r\n * @returns The resulting URI.\r\n */\r\n static joinPath(uri, ...pathFragment) {\r\n if (!uri.path) {\r\n throw new Error(`[UriError]: cannot call joinPath on URI without path`);\r\n }\r\n let newPath;\r\n if (isWindows && uri.scheme === 'file') {\r\n newPath = URI.file(paths.win32.join(uriToFsPath(uri, true), ...pathFragment)).path;\r\n }\r\n else {\r\n newPath = paths.posix.join(uri.path, ...pathFragment);\r\n }\r\n return uri.with({ path: newPath });\r\n }\r\n // ---- printing/externalize ---------------------------\r\n /**\r\n * Creates a string representation for this URI. It's guaranteed that calling\r\n * `URI.parse` with the result of this function creates an URI which is equal\r\n * to this URI.\r\n *\r\n * * The result shall *not* be used for display purposes but for externalization or transport.\r\n * * The result will be encoded using the percentage encoding and encoding happens mostly\r\n * ignore the scheme-specific encoding rules.\r\n *\r\n * @param skipEncoding Do not encode the result, default is `false`\r\n */\r\n toString(skipEncoding = false) {\r\n return _asFormatted(this, skipEncoding);\r\n }\r\n toJSON() {\r\n return this;\r\n }\r\n static revive(data) {\r\n if (!data) {\r\n return data;\r\n }\r\n else if (data instanceof URI) {\r\n return data;\r\n }\r\n else {\r\n const result = new Uri(data);\r\n result._formatted = data.external;\r\n result._fsPath = data._sep === _pathSepMarker ? data.fsPath : null;\r\n return result;\r\n }\r\n }\r\n}\r\nconst _pathSepMarker = isWindows ? 1 : undefined;\r\n// This class exists so that URI is compatibile with vscode.Uri (API).\r\nclass Uri extends URI {\r\n constructor() {\r\n super(...arguments);\r\n this._formatted = null;\r\n this._fsPath = null;\r\n }\r\n get fsPath() {\r\n if (!this._fsPath) {\r\n this._fsPath = uriToFsPath(this, false);\r\n }\r\n return this._fsPath;\r\n }\r\n toString(skipEncoding = false) {\r\n if (!skipEncoding) {\r\n if (!this._formatted) {\r\n this._formatted = _asFormatted(this, false);\r\n }\r\n return this._formatted;\r\n }\r\n else {\r\n // we don't cache that\r\n return _asFormatted(this, true);\r\n }\r\n }\r\n toJSON() {\r\n const res = {\r\n $mid: 1 /* Uri */\r\n };\r\n // cached state\r\n if (this._fsPath) {\r\n res.fsPath = this._fsPath;\r\n res._sep = _pathSepMarker;\r\n }\r\n if (this._formatted) {\r\n res.external = this._formatted;\r\n }\r\n // uri components\r\n if (this.path) {\r\n res.path = this.path;\r\n }\r\n if (this.scheme) {\r\n res.scheme = this.scheme;\r\n }\r\n if (this.authority) {\r\n res.authority = this.authority;\r\n }\r\n if (this.query) {\r\n res.query = this.query;\r\n }\r\n if (this.fragment) {\r\n res.fragment = this.fragment;\r\n }\r\n return res;\r\n }\r\n}\r\n// reserved characters: https://tools.ietf.org/html/rfc3986#section-2.2\r\nconst encodeTable = {\r\n [58 /* Colon */]: '%3A',\r\n [47 /* Slash */]: '%2F',\r\n [63 /* QuestionMark */]: '%3F',\r\n [35 /* Hash */]: '%23',\r\n [91 /* OpenSquareBracket */]: '%5B',\r\n [93 /* CloseSquareBracket */]: '%5D',\r\n [64 /* AtSign */]: '%40',\r\n [33 /* ExclamationMark */]: '%21',\r\n [36 /* DollarSign */]: '%24',\r\n [38 /* Ampersand */]: '%26',\r\n [39 /* SingleQuote */]: '%27',\r\n [40 /* OpenParen */]: '%28',\r\n [41 /* CloseParen */]: '%29',\r\n [42 /* Asterisk */]: '%2A',\r\n [43 /* Plus */]: '%2B',\r\n [44 /* Comma */]: '%2C',\r\n [59 /* Semicolon */]: '%3B',\r\n [61 /* Equals */]: '%3D',\r\n [32 /* Space */]: '%20',\r\n};\r\nfunction encodeURIComponentFast(uriComponent, allowSlash) {\r\n let res = undefined;\r\n let nativeEncodePos = -1;\r\n for (let pos = 0; pos < uriComponent.length; pos++) {\r\n const code = uriComponent.charCodeAt(pos);\r\n // unreserved characters: https://tools.ietf.org/html/rfc3986#section-2.3\r\n if ((code >= 97 /* a */ && code <= 122 /* z */)\r\n || (code >= 65 /* A */ && code <= 90 /* Z */)\r\n || (code >= 48 /* Digit0 */ && code <= 57 /* Digit9 */)\r\n || code === 45 /* Dash */\r\n || code === 46 /* Period */\r\n || code === 95 /* Underline */\r\n || code === 126 /* Tilde */\r\n || (allowSlash && code === 47 /* Slash */)) {\r\n // check if we are delaying native encode\r\n if (nativeEncodePos !== -1) {\r\n res += encodeURIComponent(uriComponent.substring(nativeEncodePos, pos));\r\n nativeEncodePos = -1;\r\n }\r\n // check if we write into a new string (by default we try to return the param)\r\n if (res !== undefined) {\r\n res += uriComponent.charAt(pos);\r\n }\r\n }\r\n else {\r\n // encoding needed, we need to allocate a new string\r\n if (res === undefined) {\r\n res = uriComponent.substr(0, pos);\r\n }\r\n // check with default table first\r\n const escaped = encodeTable[code];\r\n if (escaped !== undefined) {\r\n // check if we are delaying native encode\r\n if (nativeEncodePos !== -1) {\r\n res += encodeURIComponent(uriComponent.substring(nativeEncodePos, pos));\r\n nativeEncodePos = -1;\r\n }\r\n // append escaped variant to result\r\n res += escaped;\r\n }\r\n else if (nativeEncodePos === -1) {\r\n // use native encode only when needed\r\n nativeEncodePos = pos;\r\n }\r\n }\r\n }\r\n if (nativeEncodePos !== -1) {\r\n res += encodeURIComponent(uriComponent.substring(nativeEncodePos));\r\n }\r\n return res !== undefined ? res : uriComponent;\r\n}\r\nfunction encodeURIComponentMinimal(path) {\r\n let res = undefined;\r\n for (let pos = 0; pos < path.length; pos++) {\r\n const code = path.charCodeAt(pos);\r\n if (code === 35 /* Hash */ || code === 63 /* QuestionMark */) {\r\n if (res === undefined) {\r\n res = path.substr(0, pos);\r\n }\r\n res += encodeTable[code];\r\n }\r\n else {\r\n if (res !== undefined) {\r\n res += path[pos];\r\n }\r\n }\r\n }\r\n return res !== undefined ? res : path;\r\n}\r\n/**\r\n * Compute `fsPath` for the given uri\r\n */\r\nexport function uriToFsPath(uri, keepDriveLetterCasing) {\r\n let value;\r\n if (uri.authority && uri.path.length > 1 && uri.scheme === 'file') {\r\n // unc path: file://shares/c$/far/boo\r\n value = `//${uri.authority}${uri.path}`;\r\n }\r\n else if (uri.path.charCodeAt(0) === 47 /* Slash */\r\n && (uri.path.charCodeAt(1) >= 65 /* A */ && uri.path.charCodeAt(1) <= 90 /* Z */ || uri.path.charCodeAt(1) >= 97 /* a */ && uri.path.charCodeAt(1) <= 122 /* z */)\r\n && uri.path.charCodeAt(2) === 58 /* Colon */) {\r\n if (!keepDriveLetterCasing) {\r\n // windows drive letter: file:///c:/far/boo\r\n value = uri.path[1].toLowerCase() + uri.path.substr(2);\r\n }\r\n else {\r\n value = uri.path.substr(1);\r\n }\r\n }\r\n else {\r\n // other path\r\n value = uri.path;\r\n }\r\n if (isWindows) {\r\n value = value.replace(/\\//g, '\\\\');\r\n }\r\n return value;\r\n}\r\n/**\r\n * Create the external version of a uri\r\n */\r\nfunction _asFormatted(uri, skipEncoding) {\r\n const encoder = !skipEncoding\r\n ? encodeURIComponentFast\r\n : encodeURIComponentMinimal;\r\n let res = '';\r\n let { scheme, authority, path, query, fragment } = uri;\r\n if (scheme) {\r\n res += scheme;\r\n res += ':';\r\n }\r\n if (authority || scheme === 'file') {\r\n res += _slash;\r\n res += _slash;\r\n }\r\n if (authority) {\r\n let idx = authority.indexOf('@');\r\n if (idx !== -1) {\r\n // @\r\n const userinfo = authority.substr(0, idx);\r\n authority = authority.substr(idx + 1);\r\n idx = userinfo.indexOf(':');\r\n if (idx === -1) {\r\n res += encoder(userinfo, false);\r\n }\r\n else {\r\n // :@\r\n res += encoder(userinfo.substr(0, idx), false);\r\n res += ':';\r\n res += encoder(userinfo.substr(idx + 1), false);\r\n }\r\n res += '@';\r\n }\r\n authority = authority.toLowerCase();\r\n idx = authority.indexOf(':');\r\n if (idx === -1) {\r\n res += encoder(authority, false);\r\n }\r\n else {\r\n // :\r\n res += encoder(authority.substr(0, idx), false);\r\n res += authority.substr(idx);\r\n }\r\n }\r\n if (path) {\r\n // lower-case windows drive letters in /C:/fff or C:/fff\r\n if (path.length >= 3 && path.charCodeAt(0) === 47 /* Slash */ && path.charCodeAt(2) === 58 /* Colon */) {\r\n const code = path.charCodeAt(1);\r\n if (code >= 65 /* A */ && code <= 90 /* Z */) {\r\n path = `/${String.fromCharCode(code + 32)}:${path.substr(3)}`; // \"/c:\".length === 3\r\n }\r\n }\r\n else if (path.length >= 2 && path.charCodeAt(1) === 58 /* Colon */) {\r\n const code = path.charCodeAt(0);\r\n if (code >= 65 /* A */ && code <= 90 /* Z */) {\r\n path = `${String.fromCharCode(code + 32)}:${path.substr(2)}`; // \"/c:\".length === 3\r\n }\r\n }\r\n // encode the rest of the path\r\n res += encoder(path, true);\r\n }\r\n if (query) {\r\n res += '?';\r\n res += encoder(query, false);\r\n }\r\n if (fragment) {\r\n res += '#';\r\n res += !skipEncoding ? encodeURIComponentFast(fragment, false) : fragment;\r\n }\r\n return res;\r\n}\r\n// --- decode\r\nfunction decodeURIComponentGraceful(str) {\r\n try {\r\n return decodeURIComponent(str);\r\n }\r\n catch (_a) {\r\n if (str.length > 3) {\r\n return str.substr(0, 3) + decodeURIComponentGraceful(str.substr(3));\r\n }\r\n else {\r\n return str;\r\n }\r\n }\r\n}\r\nconst _rEncodedAsHex = /(%[0-9A-Za-z][0-9A-Za-z])+/g;\r\nfunction percentDecode(str) {\r\n if (!str.match(_rEncodedAsHex)) {\r\n return str;\r\n }\r\n return str.replace(_rEncodedAsHex, (match) => decodeURIComponentGraceful(match));\r\n}\r\n","/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n/**\r\n * A position in the editor.\r\n */\r\nexport class Position {\r\n constructor(lineNumber, column) {\r\n this.lineNumber = lineNumber;\r\n this.column = column;\r\n }\r\n /**\r\n * Create a new position from this position.\r\n *\r\n * @param newLineNumber new line number\r\n * @param newColumn new column\r\n */\r\n with(newLineNumber = this.lineNumber, newColumn = this.column) {\r\n if (newLineNumber === this.lineNumber && newColumn === this.column) {\r\n return this;\r\n }\r\n else {\r\n return new Position(newLineNumber, newColumn);\r\n }\r\n }\r\n /**\r\n * Derive a new position from this position.\r\n *\r\n * @param deltaLineNumber line number delta\r\n * @param deltaColumn column delta\r\n */\r\n delta(deltaLineNumber = 0, deltaColumn = 0) {\r\n return this.with(this.lineNumber + deltaLineNumber, this.column + deltaColumn);\r\n }\r\n /**\r\n * Test if this position equals other position\r\n */\r\n equals(other) {\r\n return Position.equals(this, other);\r\n }\r\n /**\r\n * Test if position `a` equals position `b`\r\n */\r\n static equals(a, b) {\r\n if (!a && !b) {\r\n return true;\r\n }\r\n return (!!a &&\r\n !!b &&\r\n a.lineNumber === b.lineNumber &&\r\n a.column === b.column);\r\n }\r\n /**\r\n * Test if this position is before other position.\r\n * If the two positions are equal, the result will be false.\r\n */\r\n isBefore(other) {\r\n return Position.isBefore(this, other);\r\n }\r\n /**\r\n * Test if position `a` is before position `b`.\r\n * If the two positions are equal, the result will be false.\r\n */\r\n static isBefore(a, b) {\r\n if (a.lineNumber < b.lineNumber) {\r\n return true;\r\n }\r\n if (b.lineNumber < a.lineNumber) {\r\n return false;\r\n }\r\n return a.column < b.column;\r\n }\r\n /**\r\n * Test if this position is before other position.\r\n * If the two positions are equal, the result will be true.\r\n */\r\n isBeforeOrEqual(other) {\r\n return Position.isBeforeOrEqual(this, other);\r\n }\r\n /**\r\n * Test if position `a` is before position `b`.\r\n * If the two positions are equal, the result will be true.\r\n */\r\n static isBeforeOrEqual(a, b) {\r\n if (a.lineNumber < b.lineNumber) {\r\n return true;\r\n }\r\n if (b.lineNumber < a.lineNumber) {\r\n return false;\r\n }\r\n return a.column <= b.column;\r\n }\r\n /**\r\n * A function that compares positions, useful for sorting\r\n */\r\n static compare(a, b) {\r\n let aLineNumber = a.lineNumber | 0;\r\n let bLineNumber = b.lineNumber | 0;\r\n if (aLineNumber === bLineNumber) {\r\n let aColumn = a.column | 0;\r\n let bColumn = b.column | 0;\r\n return aColumn - bColumn;\r\n }\r\n return aLineNumber - bLineNumber;\r\n }\r\n /**\r\n * Clone this position.\r\n */\r\n clone() {\r\n return new Position(this.lineNumber, this.column);\r\n }\r\n /**\r\n * Convert to a human-readable representation.\r\n */\r\n toString() {\r\n return '(' + this.lineNumber + ',' + this.column + ')';\r\n }\r\n // ---\r\n /**\r\n * Create a `Position` from an `IPosition`.\r\n */\r\n static lift(pos) {\r\n return new Position(pos.lineNumber, pos.column);\r\n }\r\n /**\r\n * Test if `obj` is an `IPosition`.\r\n */\r\n static isIPosition(obj) {\r\n return (obj\r\n && (typeof obj.lineNumber === 'number')\r\n && (typeof obj.column === 'number'));\r\n }\r\n}\r\n","/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nimport { Position } from './position.js';\r\n/**\r\n * A range in the editor. (startLineNumber,startColumn) is <= (endLineNumber,endColumn)\r\n */\r\nexport class Range {\r\n constructor(startLineNumber, startColumn, endLineNumber, endColumn) {\r\n if ((startLineNumber > endLineNumber) || (startLineNumber === endLineNumber && startColumn > endColumn)) {\r\n this.startLineNumber = endLineNumber;\r\n this.startColumn = endColumn;\r\n this.endLineNumber = startLineNumber;\r\n this.endColumn = startColumn;\r\n }\r\n else {\r\n this.startLineNumber = startLineNumber;\r\n this.startColumn = startColumn;\r\n this.endLineNumber = endLineNumber;\r\n this.endColumn = endColumn;\r\n }\r\n }\r\n /**\r\n * Test if this range is empty.\r\n */\r\n isEmpty() {\r\n return Range.isEmpty(this);\r\n }\r\n /**\r\n * Test if `range` is empty.\r\n */\r\n static isEmpty(range) {\r\n return (range.startLineNumber === range.endLineNumber && range.startColumn === range.endColumn);\r\n }\r\n /**\r\n * Test if position is in this range. If the position is at the edges, will return true.\r\n */\r\n containsPosition(position) {\r\n return Range.containsPosition(this, position);\r\n }\r\n /**\r\n * Test if `position` is in `range`. If the position is at the edges, will return true.\r\n */\r\n static containsPosition(range, position) {\r\n if (position.lineNumber < range.startLineNumber || position.lineNumber > range.endLineNumber) {\r\n return false;\r\n }\r\n if (position.lineNumber === range.startLineNumber && position.column < range.startColumn) {\r\n return false;\r\n }\r\n if (position.lineNumber === range.endLineNumber && position.column > range.endColumn) {\r\n return false;\r\n }\r\n return true;\r\n }\r\n /**\r\n * Test if range is in this range. If the range is equal to this range, will return true.\r\n */\r\n containsRange(range) {\r\n return Range.containsRange(this, range);\r\n }\r\n /**\r\n * Test if `otherRange` is in `range`. If the ranges are equal, will return true.\r\n */\r\n static containsRange(range, otherRange) {\r\n if (otherRange.startLineNumber < range.startLineNumber || otherRange.endLineNumber < range.startLineNumber) {\r\n return false;\r\n }\r\n if (otherRange.startLineNumber > range.endLineNumber || otherRange.endLineNumber > range.endLineNumber) {\r\n return false;\r\n }\r\n if (otherRange.startLineNumber === range.startLineNumber && otherRange.startColumn < range.startColumn) {\r\n return false;\r\n }\r\n if (otherRange.endLineNumber === range.endLineNumber && otherRange.endColumn > range.endColumn) {\r\n return false;\r\n }\r\n return true;\r\n }\r\n /**\r\n * Test if `range` is strictly in this range. `range` must start after and end before this range for the result to be true.\r\n */\r\n strictContainsRange(range) {\r\n return Range.strictContainsRange(this, range);\r\n }\r\n /**\r\n * Test if `otherRange` is strinctly in `range` (must start after, and end before). If the ranges are equal, will return false.\r\n */\r\n static strictContainsRange(range, otherRange) {\r\n if (otherRange.startLineNumber < range.startLineNumber || otherRange.endLineNumber < range.startLineNumber) {\r\n return false;\r\n }\r\n if (otherRange.startLineNumber > range.endLineNumber || otherRange.endLineNumber > range.endLineNumber) {\r\n return false;\r\n }\r\n if (otherRange.startLineNumber === range.startLineNumber && otherRange.startColumn <= range.startColumn) {\r\n return false;\r\n }\r\n if (otherRange.endLineNumber === range.endLineNumber && otherRange.endColumn >= range.endColumn) {\r\n return false;\r\n }\r\n return true;\r\n }\r\n /**\r\n * A reunion of the two ranges.\r\n * The smallest position will be used as the start point, and the largest one as the end point.\r\n */\r\n plusRange(range) {\r\n return Range.plusRange(this, range);\r\n }\r\n /**\r\n * A reunion of the two ranges.\r\n * The smallest position will be used as the start point, and the largest one as the end point.\r\n */\r\n static plusRange(a, b) {\r\n let startLineNumber;\r\n let startColumn;\r\n let endLineNumber;\r\n let endColumn;\r\n if (b.startLineNumber < a.startLineNumber) {\r\n startLineNumber = b.startLineNumber;\r\n startColumn = b.startColumn;\r\n }\r\n else if (b.startLineNumber === a.startLineNumber) {\r\n startLineNumber = b.startLineNumber;\r\n startColumn = Math.min(b.startColumn, a.startColumn);\r\n }\r\n else {\r\n startLineNumber = a.startLineNumber;\r\n startColumn = a.startColumn;\r\n }\r\n if (b.endLineNumber > a.endLineNumber) {\r\n endLineNumber = b.endLineNumber;\r\n endColumn = b.endColumn;\r\n }\r\n else if (b.endLineNumber === a.endLineNumber) {\r\n endLineNumber = b.endLineNumber;\r\n endColumn = Math.max(b.endColumn, a.endColumn);\r\n }\r\n else {\r\n endLineNumber = a.endLineNumber;\r\n endColumn = a.endColumn;\r\n }\r\n return new Range(startLineNumber, startColumn, endLineNumber, endColumn);\r\n }\r\n /**\r\n * A intersection of the two ranges.\r\n */\r\n intersectRanges(range) {\r\n return Range.intersectRanges(this, range);\r\n }\r\n /**\r\n * A intersection of the two ranges.\r\n */\r\n static intersectRanges(a, b) {\r\n let resultStartLineNumber = a.startLineNumber;\r\n let resultStartColumn = a.startColumn;\r\n let resultEndLineNumber = a.endLineNumber;\r\n let resultEndColumn = a.endColumn;\r\n let otherStartLineNumber = b.startLineNumber;\r\n let otherStartColumn = b.startColumn;\r\n let otherEndLineNumber = b.endLineNumber;\r\n let otherEndColumn = b.endColumn;\r\n if (resultStartLineNumber < otherStartLineNumber) {\r\n resultStartLineNumber = otherStartLineNumber;\r\n resultStartColumn = otherStartColumn;\r\n }\r\n else if (resultStartLineNumber === otherStartLineNumber) {\r\n resultStartColumn = Math.max(resultStartColumn, otherStartColumn);\r\n }\r\n if (resultEndLineNumber > otherEndLineNumber) {\r\n resultEndLineNumber = otherEndLineNumber;\r\n resultEndColumn = otherEndColumn;\r\n }\r\n else if (resultEndLineNumber === otherEndLineNumber) {\r\n resultEndColumn = Math.min(resultEndColumn, otherEndColumn);\r\n }\r\n // Check if selection is now empty\r\n if (resultStartLineNumber > resultEndLineNumber) {\r\n return null;\r\n }\r\n if (resultStartLineNumber === resultEndLineNumber && resultStartColumn > resultEndColumn) {\r\n return null;\r\n }\r\n return new Range(resultStartLineNumber, resultStartColumn, resultEndLineNumber, resultEndColumn);\r\n }\r\n /**\r\n * Test if this range equals other.\r\n */\r\n equalsRange(other) {\r\n return Range.equalsRange(this, other);\r\n }\r\n /**\r\n * Test if range `a` equals `b`.\r\n */\r\n static equalsRange(a, b) {\r\n return (!!a &&\r\n !!b &&\r\n a.startLineNumber === b.startLineNumber &&\r\n a.startColumn === b.startColumn &&\r\n a.endLineNumber === b.endLineNumber &&\r\n a.endColumn === b.endColumn);\r\n }\r\n /**\r\n * Return the end position (which will be after or equal to the start position)\r\n */\r\n getEndPosition() {\r\n return Range.getEndPosition(this);\r\n }\r\n /**\r\n * Return the end position (which will be after or equal to the start position)\r\n */\r\n static getEndPosition(range) {\r\n return new Position(range.endLineNumber, range.endColumn);\r\n }\r\n /**\r\n * Return the start position (which will be before or equal to the end position)\r\n */\r\n getStartPosition() {\r\n return Range.getStartPosition(this);\r\n }\r\n /**\r\n * Return the start position (which will be before or equal to the end position)\r\n */\r\n static getStartPosition(range) {\r\n return new Position(range.startLineNumber, range.startColumn);\r\n }\r\n /**\r\n * Transform to a user presentable string representation.\r\n */\r\n toString() {\r\n return '[' + this.startLineNumber + ',' + this.startColumn + ' -> ' + this.endLineNumber + ',' + this.endColumn + ']';\r\n }\r\n /**\r\n * Create a new range using this range's start position, and using endLineNumber and endColumn as the end position.\r\n */\r\n setEndPosition(endLineNumber, endColumn) {\r\n return new Range(this.startLineNumber, this.startColumn, endLineNumber, endColumn);\r\n }\r\n /**\r\n * Create a new range using this range's end position, and using startLineNumber and startColumn as the start position.\r\n */\r\n setStartPosition(startLineNumber, startColumn) {\r\n return new Range(startLineNumber, startColumn, this.endLineNumber, this.endColumn);\r\n }\r\n /**\r\n * Create a new empty range using this range's start position.\r\n */\r\n collapseToStart() {\r\n return Range.collapseToStart(this);\r\n }\r\n /**\r\n * Create a new empty range using this range's start position.\r\n */\r\n static collapseToStart(range) {\r\n return new Range(range.startLineNumber, range.startColumn, range.startLineNumber, range.startColumn);\r\n }\r\n // ---\r\n static fromPositions(start, end = start) {\r\n return new Range(start.lineNumber, start.column, end.lineNumber, end.column);\r\n }\r\n static lift(range) {\r\n if (!range) {\r\n return null;\r\n }\r\n return new Range(range.startLineNumber, range.startColumn, range.endLineNumber, range.endColumn);\r\n }\r\n /**\r\n * Test if `obj` is an `IRange`.\r\n */\r\n static isIRange(obj) {\r\n return (obj\r\n && (typeof obj.startLineNumber === 'number')\r\n && (typeof obj.startColumn === 'number')\r\n && (typeof obj.endLineNumber === 'number')\r\n && (typeof obj.endColumn === 'number'));\r\n }\r\n /**\r\n * Test if the two ranges are touching in any way.\r\n */\r\n static areIntersectingOrTouching(a, b) {\r\n // Check if `a` is before `b`\r\n if (a.endLineNumber < b.startLineNumber || (a.endLineNumber === b.startLineNumber && a.endColumn < b.startColumn)) {\r\n return false;\r\n }\r\n // Check if `b` is before `a`\r\n if (b.endLineNumber < a.startLineNumber || (b.endLineNumber === a.startLineNumber && b.endColumn < a.startColumn)) {\r\n return false;\r\n }\r\n // These ranges must intersect\r\n return true;\r\n }\r\n /**\r\n * Test if the two ranges are intersecting. If the ranges are touching it returns true.\r\n */\r\n static areIntersecting(a, b) {\r\n // Check if `a` is before `b`\r\n if (a.endLineNumber < b.startLineNumber || (a.endLineNumber === b.startLineNumber && a.endColumn <= b.startColumn)) {\r\n return false;\r\n }\r\n // Check if `b` is before `a`\r\n if (b.endLineNumber < a.startLineNumber || (b.endLineNumber === a.startLineNumber && b.endColumn <= a.startColumn)) {\r\n return false;\r\n }\r\n // These ranges must intersect\r\n return true;\r\n }\r\n /**\r\n * A function that compares ranges, useful for sorting ranges\r\n * It will first compare ranges on the startPosition and then on the endPosition\r\n */\r\n static compareRangesUsingStarts(a, b) {\r\n if (a && b) {\r\n const aStartLineNumber = a.startLineNumber | 0;\r\n const bStartLineNumber = b.startLineNumber | 0;\r\n if (aStartLineNumber === bStartLineNumber) {\r\n const aStartColumn = a.startColumn | 0;\r\n const bStartColumn = b.startColumn | 0;\r\n if (aStartColumn === bStartColumn) {\r\n const aEndLineNumber = a.endLineNumber | 0;\r\n const bEndLineNumber = b.endLineNumber | 0;\r\n if (aEndLineNumber === bEndLineNumber) {\r\n const aEndColumn = a.endColumn | 0;\r\n const bEndColumn = b.endColumn | 0;\r\n return aEndColumn - bEndColumn;\r\n }\r\n return aEndLineNumber - bEndLineNumber;\r\n }\r\n return aStartColumn - bStartColumn;\r\n }\r\n return aStartLineNumber - bStartLineNumber;\r\n }\r\n const aExists = (a ? 1 : 0);\r\n const bExists = (b ? 1 : 0);\r\n return aExists - bExists;\r\n }\r\n /**\r\n * A function that compares ranges, useful for sorting ranges\r\n * It will first compare ranges on the endPosition and then on the startPosition\r\n */\r\n static compareRangesUsingEnds(a, b) {\r\n if (a.endLineNumber === b.endLineNumber) {\r\n if (a.endColumn === b.endColumn) {\r\n if (a.startLineNumber === b.startLineNumber) {\r\n return a.startColumn - b.startColumn;\r\n }\r\n return a.startLineNumber - b.startLineNumber;\r\n }\r\n return a.endColumn - b.endColumn;\r\n }\r\n return a.endLineNumber - b.endLineNumber;\r\n }\r\n /**\r\n * Test if the range spans multiple lines.\r\n */\r\n static spansMultipleLines(range) {\r\n return range.endLineNumber > range.startLineNumber;\r\n }\r\n}\r\n","/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nimport { LcsDiff } from '../../../base/common/diff/diff.js';\r\nimport * as strings from '../../../base/common/strings.js';\r\nconst MINIMUM_MATCHING_CHARACTER_LENGTH = 3;\r\nfunction computeDiff(originalSequence, modifiedSequence, continueProcessingPredicate, pretty) {\r\n const diffAlgo = new LcsDiff(originalSequence, modifiedSequence, continueProcessingPredicate);\r\n return diffAlgo.ComputeDiff(pretty);\r\n}\r\nclass LineSequence {\r\n constructor(lines) {\r\n const startColumns = [];\r\n const endColumns = [];\r\n for (let i = 0, length = lines.length; i < length; i++) {\r\n startColumns[i] = getFirstNonBlankColumn(lines[i], 1);\r\n endColumns[i] = getLastNonBlankColumn(lines[i], 1);\r\n }\r\n this.lines = lines;\r\n this._startColumns = startColumns;\r\n this._endColumns = endColumns;\r\n }\r\n getElements() {\r\n const elements = [];\r\n for (let i = 0, len = this.lines.length; i < len; i++) {\r\n elements[i] = this.lines[i].substring(this._startColumns[i] - 1, this._endColumns[i] - 1);\r\n }\r\n return elements;\r\n }\r\n getStrictElement(index) {\r\n return this.lines[index];\r\n }\r\n getStartLineNumber(i) {\r\n return i + 1;\r\n }\r\n getEndLineNumber(i) {\r\n return i + 1;\r\n }\r\n createCharSequence(shouldIgnoreTrimWhitespace, startIndex, endIndex) {\r\n const charCodes = [];\r\n const lineNumbers = [];\r\n const columns = [];\r\n let len = 0;\r\n for (let index = startIndex; index <= endIndex; index++) {\r\n const lineContent = this.lines[index];\r\n const startColumn = (shouldIgnoreTrimWhitespace ? this._startColumns[index] : 1);\r\n const endColumn = (shouldIgnoreTrimWhitespace ? this._endColumns[index] : lineContent.length + 1);\r\n for (let col = startColumn; col < endColumn; col++) {\r\n charCodes[len] = lineContent.charCodeAt(col - 1);\r\n lineNumbers[len] = index + 1;\r\n columns[len] = col;\r\n len++;\r\n }\r\n }\r\n return new CharSequence(charCodes, lineNumbers, columns);\r\n }\r\n}\r\nclass CharSequence {\r\n constructor(charCodes, lineNumbers, columns) {\r\n this._charCodes = charCodes;\r\n this._lineNumbers = lineNumbers;\r\n this._columns = columns;\r\n }\r\n getElements() {\r\n return this._charCodes;\r\n }\r\n getStartLineNumber(i) {\r\n return this._lineNumbers[i];\r\n }\r\n getStartColumn(i) {\r\n return this._columns[i];\r\n }\r\n getEndLineNumber(i) {\r\n return this._lineNumbers[i];\r\n }\r\n getEndColumn(i) {\r\n return this._columns[i] + 1;\r\n }\r\n}\r\nclass CharChange {\r\n constructor(originalStartLineNumber, originalStartColumn, originalEndLineNumber, originalEndColumn, modifiedStartLineNumber, modifiedStartColumn, modifiedEndLineNumber, modifiedEndColumn) {\r\n this.originalStartLineNumber = originalStartLineNumber;\r\n this.originalStartColumn = originalStartColumn;\r\n this.originalEndLineNumber = originalEndLineNumber;\r\n this.originalEndColumn = originalEndColumn;\r\n this.modifiedStartLineNumber = modifiedStartLineNumber;\r\n this.modifiedStartColumn = modifiedStartColumn;\r\n this.modifiedEndLineNumber = modifiedEndLineNumber;\r\n this.modifiedEndColumn = modifiedEndColumn;\r\n }\r\n static createFromDiffChange(diffChange, originalCharSequence, modifiedCharSequence) {\r\n let originalStartLineNumber;\r\n let originalStartColumn;\r\n let originalEndLineNumber;\r\n let originalEndColumn;\r\n let modifiedStartLineNumber;\r\n let modifiedStartColumn;\r\n let modifiedEndLineNumber;\r\n let modifiedEndColumn;\r\n if (diffChange.originalLength === 0) {\r\n originalStartLineNumber = 0;\r\n originalStartColumn = 0;\r\n originalEndLineNumber = 0;\r\n originalEndColumn = 0;\r\n }\r\n else {\r\n originalStartLineNumber = originalCharSequence.getStartLineNumber(diffChange.originalStart);\r\n originalStartColumn = originalCharSequence.getStartColumn(diffChange.originalStart);\r\n originalEndLineNumber = originalCharSequence.getEndLineNumber(diffChange.originalStart + diffChange.originalLength - 1);\r\n originalEndColumn = originalCharSequence.getEndColumn(diffChange.originalStart + diffChange.originalLength - 1);\r\n }\r\n if (diffChange.modifiedLength === 0) {\r\n modifiedStartLineNumber = 0;\r\n modifiedStartColumn = 0;\r\n modifiedEndLineNumber = 0;\r\n modifiedEndColumn = 0;\r\n }\r\n else {\r\n modifiedStartLineNumber = modifiedCharSequence.getStartLineNumber(diffChange.modifiedStart);\r\n modifiedStartColumn = modifiedCharSequence.getStartColumn(diffChange.modifiedStart);\r\n modifiedEndLineNumber = modifiedCharSequence.getEndLineNumber(diffChange.modifiedStart + diffChange.modifiedLength - 1);\r\n modifiedEndColumn = modifiedCharSequence.getEndColumn(diffChange.modifiedStart + diffChange.modifiedLength - 1);\r\n }\r\n return new CharChange(originalStartLineNumber, originalStartColumn, originalEndLineNumber, originalEndColumn, modifiedStartLineNumber, modifiedStartColumn, modifiedEndLineNumber, modifiedEndColumn);\r\n }\r\n}\r\nfunction postProcessCharChanges(rawChanges) {\r\n if (rawChanges.length <= 1) {\r\n return rawChanges;\r\n }\r\n const result = [rawChanges[0]];\r\n let prevChange = result[0];\r\n for (let i = 1, len = rawChanges.length; i < len; i++) {\r\n const currChange = rawChanges[i];\r\n const originalMatchingLength = currChange.originalStart - (prevChange.originalStart + prevChange.originalLength);\r\n const modifiedMatchingLength = currChange.modifiedStart - (prevChange.modifiedStart + prevChange.modifiedLength);\r\n // Both of the above should be equal, but the continueProcessingPredicate may prevent this from being true\r\n const matchingLength = Math.min(originalMatchingLength, modifiedMatchingLength);\r\n if (matchingLength < MINIMUM_MATCHING_CHARACTER_LENGTH) {\r\n // Merge the current change into the previous one\r\n prevChange.originalLength = (currChange.originalStart + currChange.originalLength) - prevChange.originalStart;\r\n prevChange.modifiedLength = (currChange.modifiedStart + currChange.modifiedLength) - prevChange.modifiedStart;\r\n }\r\n else {\r\n // Add the current change\r\n result.push(currChange);\r\n prevChange = currChange;\r\n }\r\n }\r\n return result;\r\n}\r\nclass LineChange {\r\n constructor(originalStartLineNumber, originalEndLineNumber, modifiedStartLineNumber, modifiedEndLineNumber, charChanges) {\r\n this.originalStartLineNumber = originalStartLineNumber;\r\n this.originalEndLineNumber = originalEndLineNumber;\r\n this.modifiedStartLineNumber = modifiedStartLineNumber;\r\n this.modifiedEndLineNumber = modifiedEndLineNumber;\r\n this.charChanges = charChanges;\r\n }\r\n static createFromDiffResult(shouldIgnoreTrimWhitespace, diffChange, originalLineSequence, modifiedLineSequence, continueCharDiff, shouldComputeCharChanges, shouldPostProcessCharChanges) {\r\n let originalStartLineNumber;\r\n let originalEndLineNumber;\r\n let modifiedStartLineNumber;\r\n let modifiedEndLineNumber;\r\n let charChanges = undefined;\r\n if (diffChange.originalLength === 0) {\r\n originalStartLineNumber = originalLineSequence.getStartLineNumber(diffChange.originalStart) - 1;\r\n originalEndLineNumber = 0;\r\n }\r\n else {\r\n originalStartLineNumber = originalLineSequence.getStartLineNumber(diffChange.originalStart);\r\n originalEndLineNumber = originalLineSequence.getEndLineNumber(diffChange.originalStart + diffChange.originalLength - 1);\r\n }\r\n if (diffChange.modifiedLength === 0) {\r\n modifiedStartLineNumber = modifiedLineSequence.getStartLineNumber(diffChange.modifiedStart) - 1;\r\n modifiedEndLineNumber = 0;\r\n }\r\n else {\r\n modifiedStartLineNumber = modifiedLineSequence.getStartLineNumber(diffChange.modifiedStart);\r\n modifiedEndLineNumber = modifiedLineSequence.getEndLineNumber(diffChange.modifiedStart + diffChange.modifiedLength - 1);\r\n }\r\n if (shouldComputeCharChanges && diffChange.originalLength > 0 && diffChange.originalLength < 20 && diffChange.modifiedLength > 0 && diffChange.modifiedLength < 20 && continueCharDiff()) {\r\n // Compute character changes for diff chunks of at most 20 lines...\r\n const originalCharSequence = originalLineSequence.createCharSequence(shouldIgnoreTrimWhitespace, diffChange.originalStart, diffChange.originalStart + diffChange.originalLength - 1);\r\n const modifiedCharSequence = modifiedLineSequence.createCharSequence(shouldIgnoreTrimWhitespace, diffChange.modifiedStart, diffChange.modifiedStart + diffChange.modifiedLength - 1);\r\n let rawChanges = computeDiff(originalCharSequence, modifiedCharSequence, continueCharDiff, true).changes;\r\n if (shouldPostProcessCharChanges) {\r\n rawChanges = postProcessCharChanges(rawChanges);\r\n }\r\n charChanges = [];\r\n for (let i = 0, length = rawChanges.length; i < length; i++) {\r\n charChanges.push(CharChange.createFromDiffChange(rawChanges[i], originalCharSequence, modifiedCharSequence));\r\n }\r\n }\r\n return new LineChange(originalStartLineNumber, originalEndLineNumber, modifiedStartLineNumber, modifiedEndLineNumber, charChanges);\r\n }\r\n}\r\nexport class DiffComputer {\r\n constructor(originalLines, modifiedLines, opts) {\r\n this.shouldComputeCharChanges = opts.shouldComputeCharChanges;\r\n this.shouldPostProcessCharChanges = opts.shouldPostProcessCharChanges;\r\n this.shouldIgnoreTrimWhitespace = opts.shouldIgnoreTrimWhitespace;\r\n this.shouldMakePrettyDiff = opts.shouldMakePrettyDiff;\r\n this.originalLines = originalLines;\r\n this.modifiedLines = modifiedLines;\r\n this.original = new LineSequence(originalLines);\r\n this.modified = new LineSequence(modifiedLines);\r\n this.continueLineDiff = createContinueProcessingPredicate(opts.maxComputationTime);\r\n this.continueCharDiff = createContinueProcessingPredicate(opts.maxComputationTime === 0 ? 0 : Math.min(opts.maxComputationTime, 5000)); // never run after 5s for character changes...\r\n }\r\n computeDiff() {\r\n if (this.original.lines.length === 1 && this.original.lines[0].length === 0) {\r\n // empty original => fast path\r\n if (this.modified.lines.length === 1 && this.modified.lines[0].length === 0) {\r\n return {\r\n quitEarly: false,\r\n changes: []\r\n };\r\n }\r\n return {\r\n quitEarly: false,\r\n changes: [{\r\n originalStartLineNumber: 1,\r\n originalEndLineNumber: 1,\r\n modifiedStartLineNumber: 1,\r\n modifiedEndLineNumber: this.modified.lines.length,\r\n charChanges: [{\r\n modifiedEndColumn: 0,\r\n modifiedEndLineNumber: 0,\r\n modifiedStartColumn: 0,\r\n modifiedStartLineNumber: 0,\r\n originalEndColumn: 0,\r\n originalEndLineNumber: 0,\r\n originalStartColumn: 0,\r\n originalStartLineNumber: 0\r\n }]\r\n }]\r\n };\r\n }\r\n if (this.modified.lines.length === 1 && this.modified.lines[0].length === 0) {\r\n // empty modified => fast path\r\n return {\r\n quitEarly: false,\r\n changes: [{\r\n originalStartLineNumber: 1,\r\n originalEndLineNumber: this.original.lines.length,\r\n modifiedStartLineNumber: 1,\r\n modifiedEndLineNumber: 1,\r\n charChanges: [{\r\n modifiedEndColumn: 0,\r\n modifiedEndLineNumber: 0,\r\n modifiedStartColumn: 0,\r\n modifiedStartLineNumber: 0,\r\n originalEndColumn: 0,\r\n originalEndLineNumber: 0,\r\n originalStartColumn: 0,\r\n originalStartLineNumber: 0\r\n }]\r\n }]\r\n };\r\n }\r\n const diffResult = computeDiff(this.original, this.modified, this.continueLineDiff, this.shouldMakePrettyDiff);\r\n const rawChanges = diffResult.changes;\r\n const quitEarly = diffResult.quitEarly;\r\n // The diff is always computed with ignoring trim whitespace\r\n // This ensures we get the prettiest diff\r\n if (this.shouldIgnoreTrimWhitespace) {\r\n const lineChanges = [];\r\n for (let i = 0, length = rawChanges.length; i < length; i++) {\r\n lineChanges.push(LineChange.createFromDiffResult(this.shouldIgnoreTrimWhitespace, rawChanges[i], this.original, this.modified, this.continueCharDiff, this.shouldComputeCharChanges, this.shouldPostProcessCharChanges));\r\n }\r\n return {\r\n quitEarly: quitEarly,\r\n changes: lineChanges\r\n };\r\n }\r\n // Need to post-process and introduce changes where the trim whitespace is different\r\n // Note that we are looping starting at -1 to also cover the lines before the first change\r\n const result = [];\r\n let originalLineIndex = 0;\r\n let modifiedLineIndex = 0;\r\n for (let i = -1 /* !!!! */, len = rawChanges.length; i < len; i++) {\r\n const nextChange = (i + 1 < len ? rawChanges[i + 1] : null);\r\n const originalStop = (nextChange ? nextChange.originalStart : this.originalLines.length);\r\n const modifiedStop = (nextChange ? nextChange.modifiedStart : this.modifiedLines.length);\r\n while (originalLineIndex < originalStop && modifiedLineIndex < modifiedStop) {\r\n const originalLine = this.originalLines[originalLineIndex];\r\n const modifiedLine = this.modifiedLines[modifiedLineIndex];\r\n if (originalLine !== modifiedLine) {\r\n // These lines differ only in trim whitespace\r\n // Check the leading whitespace\r\n {\r\n let originalStartColumn = getFirstNonBlankColumn(originalLine, 1);\r\n let modifiedStartColumn = getFirstNonBlankColumn(modifiedLine, 1);\r\n while (originalStartColumn > 1 && modifiedStartColumn > 1) {\r\n const originalChar = originalLine.charCodeAt(originalStartColumn - 2);\r\n const modifiedChar = modifiedLine.charCodeAt(modifiedStartColumn - 2);\r\n if (originalChar !== modifiedChar) {\r\n break;\r\n }\r\n originalStartColumn--;\r\n modifiedStartColumn--;\r\n }\r\n if (originalStartColumn > 1 || modifiedStartColumn > 1) {\r\n this._pushTrimWhitespaceCharChange(result, originalLineIndex + 1, 1, originalStartColumn, modifiedLineIndex + 1, 1, modifiedStartColumn);\r\n }\r\n }\r\n // Check the trailing whitespace\r\n {\r\n let originalEndColumn = getLastNonBlankColumn(originalLine, 1);\r\n let modifiedEndColumn = getLastNonBlankColumn(modifiedLine, 1);\r\n const originalMaxColumn = originalLine.length + 1;\r\n const modifiedMaxColumn = modifiedLine.length + 1;\r\n while (originalEndColumn < originalMaxColumn && modifiedEndColumn < modifiedMaxColumn) {\r\n const originalChar = originalLine.charCodeAt(originalEndColumn - 1);\r\n const modifiedChar = originalLine.charCodeAt(modifiedEndColumn - 1);\r\n if (originalChar !== modifiedChar) {\r\n break;\r\n }\r\n originalEndColumn++;\r\n modifiedEndColumn++;\r\n }\r\n if (originalEndColumn < originalMaxColumn || modifiedEndColumn < modifiedMaxColumn) {\r\n this._pushTrimWhitespaceCharChange(result, originalLineIndex + 1, originalEndColumn, originalMaxColumn, modifiedLineIndex + 1, modifiedEndColumn, modifiedMaxColumn);\r\n }\r\n }\r\n }\r\n originalLineIndex++;\r\n modifiedLineIndex++;\r\n }\r\n if (nextChange) {\r\n // Emit the actual change\r\n result.push(LineChange.createFromDiffResult(this.shouldIgnoreTrimWhitespace, nextChange, this.original, this.modified, this.continueCharDiff, this.shouldComputeCharChanges, this.shouldPostProcessCharChanges));\r\n originalLineIndex += nextChange.originalLength;\r\n modifiedLineIndex += nextChange.modifiedLength;\r\n }\r\n }\r\n return {\r\n quitEarly: quitEarly,\r\n changes: result\r\n };\r\n }\r\n _pushTrimWhitespaceCharChange(result, originalLineNumber, originalStartColumn, originalEndColumn, modifiedLineNumber, modifiedStartColumn, modifiedEndColumn) {\r\n if (this._mergeTrimWhitespaceCharChange(result, originalLineNumber, originalStartColumn, originalEndColumn, modifiedLineNumber, modifiedStartColumn, modifiedEndColumn)) {\r\n // Merged into previous\r\n return;\r\n }\r\n let charChanges = undefined;\r\n if (this.shouldComputeCharChanges) {\r\n charChanges = [new CharChange(originalLineNumber, originalStartColumn, originalLineNumber, originalEndColumn, modifiedLineNumber, modifiedStartColumn, modifiedLineNumber, modifiedEndColumn)];\r\n }\r\n result.push(new LineChange(originalLineNumber, originalLineNumber, modifiedLineNumber, modifiedLineNumber, charChanges));\r\n }\r\n _mergeTrimWhitespaceCharChange(result, originalLineNumber, originalStartColumn, originalEndColumn, modifiedLineNumber, modifiedStartColumn, modifiedEndColumn) {\r\n const len = result.length;\r\n if (len === 0) {\r\n return false;\r\n }\r\n const prevChange = result[len - 1];\r\n if (prevChange.originalEndLineNumber === 0 || prevChange.modifiedEndLineNumber === 0) {\r\n // Don't merge with inserts/deletes\r\n return false;\r\n }\r\n if (prevChange.originalEndLineNumber + 1 === originalLineNumber && prevChange.modifiedEndLineNumber + 1 === modifiedLineNumber) {\r\n prevChange.originalEndLineNumber = originalLineNumber;\r\n prevChange.modifiedEndLineNumber = modifiedLineNumber;\r\n if (this.shouldComputeCharChanges && prevChange.charChanges) {\r\n prevChange.charChanges.push(new CharChange(originalLineNumber, originalStartColumn, originalLineNumber, originalEndColumn, modifiedLineNumber, modifiedStartColumn, modifiedLineNumber, modifiedEndColumn));\r\n }\r\n return true;\r\n }\r\n return false;\r\n }\r\n}\r\nfunction getFirstNonBlankColumn(txt, defaultValue) {\r\n const r = strings.firstNonWhitespaceIndex(txt);\r\n if (r === -1) {\r\n return defaultValue;\r\n }\r\n return r + 1;\r\n}\r\nfunction getLastNonBlankColumn(txt, defaultValue) {\r\n const r = strings.lastNonWhitespaceIndex(txt);\r\n if (r === -1) {\r\n return defaultValue;\r\n }\r\n return r + 2;\r\n}\r\nfunction createContinueProcessingPredicate(maximumRuntime) {\r\n if (maximumRuntime === 0) {\r\n return () => true;\r\n }\r\n const startTime = Date.now();\r\n return () => {\r\n return Date.now() - startTime < maximumRuntime;\r\n };\r\n}\r\n","/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nexport function toUint8(v) {\r\n if (v < 0) {\r\n return 0;\r\n }\r\n if (v > 255 /* MAX_UINT_8 */) {\r\n return 255 /* MAX_UINT_8 */;\r\n }\r\n return v | 0;\r\n}\r\nexport function toUint32(v) {\r\n if (v < 0) {\r\n return 0;\r\n }\r\n if (v > 4294967295 /* MAX_UINT_32 */) {\r\n return 4294967295 /* MAX_UINT_32 */;\r\n }\r\n return v | 0;\r\n}\r\n","/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nimport { toUint32 } from '../../../base/common/uint.js';\r\nexport class PrefixSumIndexOfResult {\r\n constructor(index, remainder) {\r\n this._prefixSumIndexOfResultBrand = undefined;\r\n this.index = index;\r\n this.remainder = remainder;\r\n }\r\n}\r\nexport class PrefixSumComputer {\r\n constructor(values) {\r\n this.values = values;\r\n this.prefixSum = new Uint32Array(values.length);\r\n this.prefixSumValidIndex = new Int32Array(1);\r\n this.prefixSumValidIndex[0] = -1;\r\n }\r\n insertValues(insertIndex, insertValues) {\r\n insertIndex = toUint32(insertIndex);\r\n const oldValues = this.values;\r\n const oldPrefixSum = this.prefixSum;\r\n const insertValuesLen = insertValues.length;\r\n if (insertValuesLen === 0) {\r\n return false;\r\n }\r\n this.values = new Uint32Array(oldValues.length + insertValuesLen);\r\n this.values.set(oldValues.subarray(0, insertIndex), 0);\r\n this.values.set(oldValues.subarray(insertIndex), insertIndex + insertValuesLen);\r\n this.values.set(insertValues, insertIndex);\r\n if (insertIndex - 1 < this.prefixSumValidIndex[0]) {\r\n this.prefixSumValidIndex[0] = insertIndex - 1;\r\n }\r\n this.prefixSum = new Uint32Array(this.values.length);\r\n if (this.prefixSumValidIndex[0] >= 0) {\r\n this.prefixSum.set(oldPrefixSum.subarray(0, this.prefixSumValidIndex[0] + 1));\r\n }\r\n return true;\r\n }\r\n changeValue(index, value) {\r\n index = toUint32(index);\r\n value = toUint32(value);\r\n if (this.values[index] === value) {\r\n return false;\r\n }\r\n this.values[index] = value;\r\n if (index - 1 < this.prefixSumValidIndex[0]) {\r\n this.prefixSumValidIndex[0] = index - 1;\r\n }\r\n return true;\r\n }\r\n removeValues(startIndex, count) {\r\n startIndex = toUint32(startIndex);\r\n count = toUint32(count);\r\n const oldValues = this.values;\r\n const oldPrefixSum = this.prefixSum;\r\n if (startIndex >= oldValues.length) {\r\n return false;\r\n }\r\n let maxCount = oldValues.length - startIndex;\r\n if (count >= maxCount) {\r\n count = maxCount;\r\n }\r\n if (count === 0) {\r\n return false;\r\n }\r\n this.values = new Uint32Array(oldValues.length - count);\r\n this.values.set(oldValues.subarray(0, startIndex), 0);\r\n this.values.set(oldValues.subarray(startIndex + count), startIndex);\r\n this.prefixSum = new Uint32Array(this.values.length);\r\n if (startIndex - 1 < this.prefixSumValidIndex[0]) {\r\n this.prefixSumValidIndex[0] = startIndex - 1;\r\n }\r\n if (this.prefixSumValidIndex[0] >= 0) {\r\n this.prefixSum.set(oldPrefixSum.subarray(0, this.prefixSumValidIndex[0] + 1));\r\n }\r\n return true;\r\n }\r\n getTotalSum() {\r\n if (this.values.length === 0) {\r\n return 0;\r\n }\r\n return this._getPrefixSum(this.values.length - 1);\r\n }\r\n getPrefixSum(index) {\r\n if (index < 0) {\r\n return 0;\r\n }\r\n index = toUint32(index);\r\n return this._getPrefixSum(index);\r\n }\r\n _getPrefixSum(index) {\r\n if (index <= this.prefixSumValidIndex[0]) {\r\n return this.prefixSum[index];\r\n }\r\n let startIndex = this.prefixSumValidIndex[0] + 1;\r\n if (startIndex === 0) {\r\n this.prefixSum[0] = this.values[0];\r\n startIndex++;\r\n }\r\n if (index >= this.values.length) {\r\n index = this.values.length - 1;\r\n }\r\n for (let i = startIndex; i <= index; i++) {\r\n this.prefixSum[i] = this.prefixSum[i - 1] + this.values[i];\r\n }\r\n this.prefixSumValidIndex[0] = Math.max(this.prefixSumValidIndex[0], index);\r\n return this.prefixSum[index];\r\n }\r\n getIndexOf(sum) {\r\n sum = Math.floor(sum); //@perf\r\n // Compute all sums (to get a fully valid prefixSum)\r\n this.getTotalSum();\r\n let low = 0;\r\n let high = this.values.length - 1;\r\n let mid = 0;\r\n let midStop = 0;\r\n let midStart = 0;\r\n while (low <= high) {\r\n mid = low + ((high - low) / 2) | 0;\r\n midStop = this.prefixSum[mid];\r\n midStart = midStop - this.values[mid];\r\n if (sum < midStart) {\r\n high = mid - 1;\r\n }\r\n else if (sum >= midStop) {\r\n low = mid + 1;\r\n }\r\n else {\r\n break;\r\n }\r\n }\r\n return new PrefixSumIndexOfResult(mid, sum - midStart);\r\n }\r\n}\r\n","/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nexport const USUAL_WORD_SEPARATORS = '`~!@#$%^&*()-=+[{]}\\\\|;:\\'\",.<>/?';\r\n/**\r\n * Create a word definition regular expression based on default word separators.\r\n * Optionally provide allowed separators that should be included in words.\r\n *\r\n * The default would look like this:\r\n * /(-?\\d*\\.\\d\\w*)|([^\\`\\~\\!\\@\\#\\$\\%\\^\\&\\*\\(\\)\\-\\=\\+\\[\\{\\]\\}\\\\\\|\\;\\:\\'\\\"\\,\\.\\<\\>\\/\\?\\s]+)/g\r\n */\r\nfunction createWordRegExp(allowInWords = '') {\r\n let source = '(-?\\\\d*\\\\.\\\\d\\\\w*)|([^';\r\n for (const sep of USUAL_WORD_SEPARATORS) {\r\n if (allowInWords.indexOf(sep) >= 0) {\r\n continue;\r\n }\r\n source += '\\\\' + sep;\r\n }\r\n source += '\\\\s]+)';\r\n return new RegExp(source, 'g');\r\n}\r\n// catches numbers (including floating numbers) in the first group, and alphanum in the second\r\nexport const DEFAULT_WORD_REGEXP = createWordRegExp();\r\nexport function ensureValidWordDefinition(wordDefinition) {\r\n let result = DEFAULT_WORD_REGEXP;\r\n if (wordDefinition && (wordDefinition instanceof RegExp)) {\r\n if (!wordDefinition.global) {\r\n let flags = 'g';\r\n if (wordDefinition.ignoreCase) {\r\n flags += 'i';\r\n }\r\n if (wordDefinition.multiline) {\r\n flags += 'm';\r\n }\r\n if (wordDefinition.unicode) {\r\n flags += 'u';\r\n }\r\n result = new RegExp(wordDefinition.source, flags);\r\n }\r\n else {\r\n result = wordDefinition;\r\n }\r\n }\r\n result.lastIndex = 0;\r\n return result;\r\n}\r\nconst _defaultConfig = {\r\n maxLen: 1000,\r\n windowSize: 15,\r\n timeBudget: 150\r\n};\r\nexport function getWordAtText(column, wordDefinition, text, textOffset, config = _defaultConfig) {\r\n if (text.length > config.maxLen) {\r\n // don't throw strings that long at the regexp\r\n // but use a sub-string in which a word must occur\r\n let start = column - config.maxLen / 2;\r\n if (start < 0) {\r\n start = 0;\r\n }\r\n else {\r\n textOffset += start;\r\n }\r\n text = text.substring(start, column + config.maxLen / 2);\r\n return getWordAtText(column, wordDefinition, text, textOffset, config);\r\n }\r\n const t1 = Date.now();\r\n const pos = column - 1 - textOffset;\r\n let prevRegexIndex = -1;\r\n let match = null;\r\n for (let i = 1;; i++) {\r\n // check time budget\r\n if (Date.now() - t1 >= config.timeBudget) {\r\n break;\r\n }\r\n // reset the index at which the regexp should start matching, also know where it\r\n // should stop so that subsequent search don't repeat previous searches\r\n const regexIndex = pos - config.windowSize * i;\r\n wordDefinition.lastIndex = Math.max(0, regexIndex);\r\n const thisMatch = _findRegexMatchEnclosingPosition(wordDefinition, text, pos, prevRegexIndex);\r\n if (!thisMatch && match) {\r\n // stop: we have something\r\n break;\r\n }\r\n match = thisMatch;\r\n // stop: searched at start\r\n if (regexIndex <= 0) {\r\n break;\r\n }\r\n prevRegexIndex = regexIndex;\r\n }\r\n if (match) {\r\n let result = {\r\n word: match[0],\r\n startColumn: textOffset + 1 + match.index,\r\n endColumn: textOffset + 1 + match.index + match[0].length\r\n };\r\n wordDefinition.lastIndex = 0;\r\n return result;\r\n }\r\n return null;\r\n}\r\nfunction _findRegexMatchEnclosingPosition(wordDefinition, text, pos, stopPos) {\r\n let match;\r\n while (match = wordDefinition.exec(text)) {\r\n const matchIndex = match.index || 0;\r\n if (matchIndex <= pos && wordDefinition.lastIndex >= pos) {\r\n return match;\r\n }\r\n else if (stopPos > 0 && matchIndex > stopPos) {\r\n return null;\r\n }\r\n }\r\n return null;\r\n}\r\n","/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nimport { toUint8 } from '../../../base/common/uint.js';\r\n/**\r\n * A fast character classifier that uses a compact array for ASCII values.\r\n */\r\nexport class CharacterClassifier {\r\n constructor(_defaultValue) {\r\n let defaultValue = toUint8(_defaultValue);\r\n this._defaultValue = defaultValue;\r\n this._asciiMap = CharacterClassifier._createAsciiMap(defaultValue);\r\n this._map = new Map();\r\n }\r\n static _createAsciiMap(defaultValue) {\r\n let asciiMap = new Uint8Array(256);\r\n for (let i = 0; i < 256; i++) {\r\n asciiMap[i] = defaultValue;\r\n }\r\n return asciiMap;\r\n }\r\n set(charCode, _value) {\r\n let value = toUint8(_value);\r\n if (charCode >= 0 && charCode < 256) {\r\n this._asciiMap[charCode] = value;\r\n }\r\n else {\r\n this._map.set(charCode, value);\r\n }\r\n }\r\n get(charCode) {\r\n if (charCode >= 0 && charCode < 256) {\r\n return this._asciiMap[charCode];\r\n }\r\n else {\r\n return (this._map.get(charCode) || this._defaultValue);\r\n }\r\n }\r\n}\r\nexport class CharacterSet {\r\n constructor() {\r\n this._actual = new CharacterClassifier(0 /* False */);\r\n }\r\n add(charCode) {\r\n this._actual.set(charCode, 1 /* True */);\r\n }\r\n has(charCode) {\r\n return (this._actual.get(charCode) === 1 /* True */);\r\n }\r\n}\r\n","/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nimport { CharacterClassifier } from '../core/characterClassifier.js';\r\nexport class Uint8Matrix {\r\n constructor(rows, cols, defaultValue) {\r\n const data = new Uint8Array(rows * cols);\r\n for (let i = 0, len = rows * cols; i < len; i++) {\r\n data[i] = defaultValue;\r\n }\r\n this._data = data;\r\n this.rows = rows;\r\n this.cols = cols;\r\n }\r\n get(row, col) {\r\n return this._data[row * this.cols + col];\r\n }\r\n set(row, col, value) {\r\n this._data[row * this.cols + col] = value;\r\n }\r\n}\r\nexport class StateMachine {\r\n constructor(edges) {\r\n let maxCharCode = 0;\r\n let maxState = 0 /* Invalid */;\r\n for (let i = 0, len = edges.length; i < len; i++) {\r\n let [from, chCode, to] = edges[i];\r\n if (chCode > maxCharCode) {\r\n maxCharCode = chCode;\r\n }\r\n if (from > maxState) {\r\n maxState = from;\r\n }\r\n if (to > maxState) {\r\n maxState = to;\r\n }\r\n }\r\n maxCharCode++;\r\n maxState++;\r\n let states = new Uint8Matrix(maxState, maxCharCode, 0 /* Invalid */);\r\n for (let i = 0, len = edges.length; i < len; i++) {\r\n let [from, chCode, to] = edges[i];\r\n states.set(from, chCode, to);\r\n }\r\n this._states = states;\r\n this._maxCharCode = maxCharCode;\r\n }\r\n nextState(currentState, chCode) {\r\n if (chCode < 0 || chCode >= this._maxCharCode) {\r\n return 0 /* Invalid */;\r\n }\r\n return this._states.get(currentState, chCode);\r\n }\r\n}\r\n// State machine for http:// or https:// or file://\r\nlet _stateMachine = null;\r\nfunction getStateMachine() {\r\n if (_stateMachine === null) {\r\n _stateMachine = new StateMachine([\r\n [1 /* Start */, 104 /* h */, 2 /* H */],\r\n [1 /* Start */, 72 /* H */, 2 /* H */],\r\n [1 /* Start */, 102 /* f */, 6 /* F */],\r\n [1 /* Start */, 70 /* F */, 6 /* F */],\r\n [2 /* H */, 116 /* t */, 3 /* HT */],\r\n [2 /* H */, 84 /* T */, 3 /* HT */],\r\n [3 /* HT */, 116 /* t */, 4 /* HTT */],\r\n [3 /* HT */, 84 /* T */, 4 /* HTT */],\r\n [4 /* HTT */, 112 /* p */, 5 /* HTTP */],\r\n [4 /* HTT */, 80 /* P */, 5 /* HTTP */],\r\n [5 /* HTTP */, 115 /* s */, 9 /* BeforeColon */],\r\n [5 /* HTTP */, 83 /* S */, 9 /* BeforeColon */],\r\n [5 /* HTTP */, 58 /* Colon */, 10 /* AfterColon */],\r\n [6 /* F */, 105 /* i */, 7 /* FI */],\r\n [6 /* F */, 73 /* I */, 7 /* FI */],\r\n [7 /* FI */, 108 /* l */, 8 /* FIL */],\r\n [7 /* FI */, 76 /* L */, 8 /* FIL */],\r\n [8 /* FIL */, 101 /* e */, 9 /* BeforeColon */],\r\n [8 /* FIL */, 69 /* E */, 9 /* BeforeColon */],\r\n [9 /* BeforeColon */, 58 /* Colon */, 10 /* AfterColon */],\r\n [10 /* AfterColon */, 47 /* Slash */, 11 /* AlmostThere */],\r\n [11 /* AlmostThere */, 47 /* Slash */, 12 /* End */],\r\n ]);\r\n }\r\n return _stateMachine;\r\n}\r\nlet _classifier = null;\r\nfunction getClassifier() {\r\n if (_classifier === null) {\r\n _classifier = new CharacterClassifier(0 /* None */);\r\n const FORCE_TERMINATION_CHARACTERS = ' \\t<>\\'\\\"、。。、,.:;‘〈「『〔([{「」}])〕』」〉’`~…';\r\n for (let i = 0; i < FORCE_TERMINATION_CHARACTERS.length; i++) {\r\n _classifier.set(FORCE_TERMINATION_CHARACTERS.charCodeAt(i), 1 /* ForceTermination */);\r\n }\r\n const CANNOT_END_WITH_CHARACTERS = '.,;';\r\n for (let i = 0; i < CANNOT_END_WITH_CHARACTERS.length; i++) {\r\n _classifier.set(CANNOT_END_WITH_CHARACTERS.charCodeAt(i), 2 /* CannotEndIn */);\r\n }\r\n }\r\n return _classifier;\r\n}\r\nexport class LinkComputer {\r\n static _createLink(classifier, line, lineNumber, linkBeginIndex, linkEndIndex) {\r\n // Do not allow to end link in certain characters...\r\n let lastIncludedCharIndex = linkEndIndex - 1;\r\n do {\r\n const chCode = line.charCodeAt(lastIncludedCharIndex);\r\n const chClass = classifier.get(chCode);\r\n if (chClass !== 2 /* CannotEndIn */) {\r\n break;\r\n }\r\n lastIncludedCharIndex--;\r\n } while (lastIncludedCharIndex > linkBeginIndex);\r\n // Handle links enclosed in parens, square brackets and curlys.\r\n if (linkBeginIndex > 0) {\r\n const charCodeBeforeLink = line.charCodeAt(linkBeginIndex - 1);\r\n const lastCharCodeInLink = line.charCodeAt(lastIncludedCharIndex);\r\n if ((charCodeBeforeLink === 40 /* OpenParen */ && lastCharCodeInLink === 41 /* CloseParen */)\r\n || (charCodeBeforeLink === 91 /* OpenSquareBracket */ && lastCharCodeInLink === 93 /* CloseSquareBracket */)\r\n || (charCodeBeforeLink === 123 /* OpenCurlyBrace */ && lastCharCodeInLink === 125 /* CloseCurlyBrace */)) {\r\n // Do not end in ) if ( is before the link start\r\n // Do not end in ] if [ is before the link start\r\n // Do not end in } if { is before the link start\r\n lastIncludedCharIndex--;\r\n }\r\n }\r\n return {\r\n range: {\r\n startLineNumber: lineNumber,\r\n startColumn: linkBeginIndex + 1,\r\n endLineNumber: lineNumber,\r\n endColumn: lastIncludedCharIndex + 2\r\n },\r\n url: line.substring(linkBeginIndex, lastIncludedCharIndex + 1)\r\n };\r\n }\r\n static computeLinks(model, stateMachine = getStateMachine()) {\r\n const classifier = getClassifier();\r\n let result = [];\r\n for (let i = 1, lineCount = model.getLineCount(); i <= lineCount; i++) {\r\n const line = model.getLineContent(i);\r\n const len = line.length;\r\n let j = 0;\r\n let linkBeginIndex = 0;\r\n let linkBeginChCode = 0;\r\n let state = 1 /* Start */;\r\n let hasOpenParens = false;\r\n let hasOpenSquareBracket = false;\r\n let inSquareBrackets = false;\r\n let hasOpenCurlyBracket = false;\r\n while (j < len) {\r\n let resetStateMachine = false;\r\n const chCode = line.charCodeAt(j);\r\n if (state === 13 /* Accept */) {\r\n let chClass;\r\n switch (chCode) {\r\n case 40 /* OpenParen */:\r\n hasOpenParens = true;\r\n chClass = 0 /* None */;\r\n break;\r\n case 41 /* CloseParen */:\r\n chClass = (hasOpenParens ? 0 /* None */ : 1 /* ForceTermination */);\r\n break;\r\n case 91 /* OpenSquareBracket */:\r\n inSquareBrackets = true;\r\n hasOpenSquareBracket = true;\r\n chClass = 0 /* None */;\r\n break;\r\n case 93 /* CloseSquareBracket */:\r\n inSquareBrackets = false;\r\n chClass = (hasOpenSquareBracket ? 0 /* None */ : 1 /* ForceTermination */);\r\n break;\r\n case 123 /* OpenCurlyBrace */:\r\n hasOpenCurlyBracket = true;\r\n chClass = 0 /* None */;\r\n break;\r\n case 125 /* CloseCurlyBrace */:\r\n chClass = (hasOpenCurlyBracket ? 0 /* None */ : 1 /* ForceTermination */);\r\n break;\r\n /* The following three rules make it that ' or \" or ` are allowed inside links if the link began with a different one */\r\n case 39 /* SingleQuote */:\r\n chClass = (linkBeginChCode === 34 /* DoubleQuote */ || linkBeginChCode === 96 /* BackTick */) ? 0 /* None */ : 1 /* ForceTermination */;\r\n break;\r\n case 34 /* DoubleQuote */:\r\n chClass = (linkBeginChCode === 39 /* SingleQuote */ || linkBeginChCode === 96 /* BackTick */) ? 0 /* None */ : 1 /* ForceTermination */;\r\n break;\r\n case 96 /* BackTick */:\r\n chClass = (linkBeginChCode === 39 /* SingleQuote */ || linkBeginChCode === 34 /* DoubleQuote */) ? 0 /* None */ : 1 /* ForceTermination */;\r\n break;\r\n case 42 /* Asterisk */:\r\n // `*` terminates a link if the link began with `*`\r\n chClass = (linkBeginChCode === 42 /* Asterisk */) ? 1 /* ForceTermination */ : 0 /* None */;\r\n break;\r\n case 124 /* Pipe */:\r\n // `|` terminates a link if the link began with `|`\r\n chClass = (linkBeginChCode === 124 /* Pipe */) ? 1 /* ForceTermination */ : 0 /* None */;\r\n break;\r\n case 32 /* Space */:\r\n // ` ` allow space in between [ and ]\r\n chClass = (inSquareBrackets ? 0 /* None */ : 1 /* ForceTermination */);\r\n break;\r\n default:\r\n chClass = classifier.get(chCode);\r\n }\r\n // Check if character terminates link\r\n if (chClass === 1 /* ForceTermination */) {\r\n result.push(LinkComputer._createLink(classifier, line, i, linkBeginIndex, j));\r\n resetStateMachine = true;\r\n }\r\n }\r\n else if (state === 12 /* End */) {\r\n let chClass;\r\n if (chCode === 91 /* OpenSquareBracket */) {\r\n // Allow for the authority part to contain ipv6 addresses which contain [ and ]\r\n hasOpenSquareBracket = true;\r\n chClass = 0 /* None */;\r\n }\r\n else {\r\n chClass = classifier.get(chCode);\r\n }\r\n // Check if character terminates link\r\n if (chClass === 1 /* ForceTermination */) {\r\n resetStateMachine = true;\r\n }\r\n else {\r\n state = 13 /* Accept */;\r\n }\r\n }\r\n else {\r\n state = stateMachine.nextState(state, chCode);\r\n if (state === 0 /* Invalid */) {\r\n resetStateMachine = true;\r\n }\r\n }\r\n if (resetStateMachine) {\r\n state = 1 /* Start */;\r\n hasOpenParens = false;\r\n hasOpenSquareBracket = false;\r\n hasOpenCurlyBracket = false;\r\n // Record where the link started\r\n linkBeginIndex = j + 1;\r\n linkBeginChCode = chCode;\r\n }\r\n j++;\r\n }\r\n if (state === 13 /* Accept */) {\r\n result.push(LinkComputer._createLink(classifier, line, i, linkBeginIndex, len));\r\n }\r\n }\r\n return result;\r\n }\r\n}\r\n/**\r\n * Returns an array of all links contains in the provided\r\n * document. *Note* that this operation is computational\r\n * expensive and should not run in the UI thread.\r\n */\r\nexport function computeLinks(model) {\r\n if (!model || typeof model.getLineCount !== 'function' || typeof model.getLineContent !== 'function') {\r\n // Unknown caller!\r\n return [];\r\n }\r\n return LinkComputer.computeLinks(model);\r\n}\r\n","/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nexport class BasicInplaceReplace {\r\n constructor() {\r\n this._defaultValueSet = [\r\n ['true', 'false'],\r\n ['True', 'False'],\r\n ['Private', 'Public', 'Friend', 'ReadOnly', 'Partial', 'Protected', 'WriteOnly'],\r\n ['public', 'protected', 'private'],\r\n ];\r\n }\r\n navigateValueSet(range1, text1, range2, text2, up) {\r\n if (range1 && text1) {\r\n let result = this.doNavigateValueSet(text1, up);\r\n if (result) {\r\n return {\r\n range: range1,\r\n value: result\r\n };\r\n }\r\n }\r\n if (range2 && text2) {\r\n let result = this.doNavigateValueSet(text2, up);\r\n if (result) {\r\n return {\r\n range: range2,\r\n value: result\r\n };\r\n }\r\n }\r\n return null;\r\n }\r\n doNavigateValueSet(text, up) {\r\n let numberResult = this.numberReplace(text, up);\r\n if (numberResult !== null) {\r\n return numberResult;\r\n }\r\n return this.textReplace(text, up);\r\n }\r\n numberReplace(value, up) {\r\n let precision = Math.pow(10, value.length - (value.lastIndexOf('.') + 1));\r\n let n1 = Number(value);\r\n let n2 = parseFloat(value);\r\n if (!isNaN(n1) && !isNaN(n2) && n1 === n2) {\r\n if (n1 === 0 && !up) {\r\n return null; // don't do negative\r\n //\t\t\t} else if(n1 === 9 && up) {\r\n //\t\t\t\treturn null; // don't insert 10 into a number\r\n }\r\n else {\r\n n1 = Math.floor(n1 * precision);\r\n n1 += up ? precision : -precision;\r\n return String(n1 / precision);\r\n }\r\n }\r\n return null;\r\n }\r\n textReplace(value, up) {\r\n return this.valueSetsReplace(this._defaultValueSet, value, up);\r\n }\r\n valueSetsReplace(valueSets, value, up) {\r\n let result = null;\r\n for (let i = 0, len = valueSets.length; result === null && i < len; i++) {\r\n result = this.valueSetReplace(valueSets[i], value, up);\r\n }\r\n return result;\r\n }\r\n valueSetReplace(valueSet, value, up) {\r\n let idx = valueSet.indexOf(value);\r\n if (idx >= 0) {\r\n idx += up ? +1 : -1;\r\n if (idx < 0) {\r\n idx = valueSet.length - 1;\r\n }\r\n else {\r\n idx %= valueSet.length;\r\n }\r\n return valueSet[idx];\r\n }\r\n return null;\r\n }\r\n}\r\nBasicInplaceReplace.INSTANCE = new BasicInplaceReplace();\r\n","/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nclass Node {\r\n constructor(element) {\r\n this.element = element;\r\n this.next = Node.Undefined;\r\n this.prev = Node.Undefined;\r\n }\r\n}\r\nNode.Undefined = new Node(undefined);\r\nexport class LinkedList {\r\n constructor() {\r\n this._first = Node.Undefined;\r\n this._last = Node.Undefined;\r\n this._size = 0;\r\n }\r\n get size() {\r\n return this._size;\r\n }\r\n isEmpty() {\r\n return this._first === Node.Undefined;\r\n }\r\n clear() {\r\n let node = this._first;\r\n while (node !== Node.Undefined) {\r\n const next = node.next;\r\n node.prev = Node.Undefined;\r\n node.next = Node.Undefined;\r\n node = next;\r\n }\r\n this._first = Node.Undefined;\r\n this._last = Node.Undefined;\r\n this._size = 0;\r\n }\r\n unshift(element) {\r\n return this._insert(element, false);\r\n }\r\n push(element) {\r\n return this._insert(element, true);\r\n }\r\n _insert(element, atTheEnd) {\r\n const newNode = new Node(element);\r\n if (this._first === Node.Undefined) {\r\n this._first = newNode;\r\n this._last = newNode;\r\n }\r\n else if (atTheEnd) {\r\n // push\r\n const oldLast = this._last;\r\n this._last = newNode;\r\n newNode.prev = oldLast;\r\n oldLast.next = newNode;\r\n }\r\n else {\r\n // unshift\r\n const oldFirst = this._first;\r\n this._first = newNode;\r\n newNode.next = oldFirst;\r\n oldFirst.prev = newNode;\r\n }\r\n this._size += 1;\r\n let didRemove = false;\r\n return () => {\r\n if (!didRemove) {\r\n didRemove = true;\r\n this._remove(newNode);\r\n }\r\n };\r\n }\r\n shift() {\r\n if (this._first === Node.Undefined) {\r\n return undefined;\r\n }\r\n else {\r\n const res = this._first.element;\r\n this._remove(this._first);\r\n return res;\r\n }\r\n }\r\n pop() {\r\n if (this._last === Node.Undefined) {\r\n return undefined;\r\n }\r\n else {\r\n const res = this._last.element;\r\n this._remove(this._last);\r\n return res;\r\n }\r\n }\r\n _remove(node) {\r\n if (node.prev !== Node.Undefined && node.next !== Node.Undefined) {\r\n // middle\r\n const anchor = node.prev;\r\n anchor.next = node.next;\r\n node.next.prev = anchor;\r\n }\r\n else if (node.prev === Node.Undefined && node.next === Node.Undefined) {\r\n // only node\r\n this._first = Node.Undefined;\r\n this._last = Node.Undefined;\r\n }\r\n else if (node.next === Node.Undefined) {\r\n // last\r\n this._last = this._last.prev;\r\n this._last.next = Node.Undefined;\r\n }\r\n else if (node.prev === Node.Undefined) {\r\n // first\r\n this._first = this._first.next;\r\n this._first.prev = Node.Undefined;\r\n }\r\n // done\r\n this._size -= 1;\r\n }\r\n *[Symbol.iterator]() {\r\n let node = this._first;\r\n while (node !== Node.Undefined) {\r\n yield node.element;\r\n node = node.next;\r\n }\r\n }\r\n}\r\n","/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nimport { globals } from './platform.js';\r\nconst hasPerformanceNow = (globals.performance && typeof globals.performance.now === 'function');\r\nexport class StopWatch {\r\n constructor(highResolution) {\r\n this._highResolution = hasPerformanceNow && highResolution;\r\n this._startTime = this._now();\r\n this._stopTime = -1;\r\n }\r\n static create(highResolution = true) {\r\n return new StopWatch(highResolution);\r\n }\r\n stop() {\r\n this._stopTime = this._now();\r\n }\r\n elapsed() {\r\n if (this._stopTime !== -1) {\r\n return this._stopTime - this._startTime;\r\n }\r\n return this._now() - this._startTime;\r\n }\r\n _now() {\r\n return this._highResolution ? globals.performance.now() : Date.now();\r\n }\r\n}\r\n","import { onUnexpectedError } from './errors.js';\r\nimport { Disposable, combinedDisposable, DisposableStore, toDisposable } from './lifecycle.js';\r\nimport { LinkedList } from './linkedList.js';\r\nimport { StopWatch } from './stopwatch.js';\r\nexport var Event;\r\n(function (Event) {\r\n Event.None = () => Disposable.None;\r\n /**\r\n * Given an event, returns another event which only fires once.\r\n */\r\n function once(event) {\r\n return (listener, thisArgs = null, disposables) => {\r\n // we need this, in case the event fires during the listener call\r\n let didFire = false;\r\n let result;\r\n result = event(e => {\r\n if (didFire) {\r\n return;\r\n }\r\n else if (result) {\r\n result.dispose();\r\n }\r\n else {\r\n didFire = true;\r\n }\r\n return listener.call(thisArgs, e);\r\n }, null, disposables);\r\n if (didFire) {\r\n result.dispose();\r\n }\r\n return result;\r\n };\r\n }\r\n Event.once = once;\r\n /**\r\n * @deprecated DO NOT use, this leaks memory\r\n */\r\n function map(event, map) {\r\n return snapshot((listener, thisArgs = null, disposables) => event(i => listener.call(thisArgs, map(i)), null, disposables));\r\n }\r\n Event.map = map;\r\n /**\r\n * @deprecated DO NOT use, this leaks memory\r\n */\r\n function forEach(event, each) {\r\n return snapshot((listener, thisArgs = null, disposables) => event(i => { each(i); listener.call(thisArgs, i); }, null, disposables));\r\n }\r\n Event.forEach = forEach;\r\n function filter(event, filter) {\r\n return snapshot((listener, thisArgs = null, disposables) => event(e => filter(e) && listener.call(thisArgs, e), null, disposables));\r\n }\r\n Event.filter = filter;\r\n /**\r\n * Given an event, returns the same event but typed as `Event`.\r\n */\r\n function signal(event) {\r\n return event;\r\n }\r\n Event.signal = signal;\r\n function any(...events) {\r\n return (listener, thisArgs = null, disposables) => combinedDisposable(...events.map(event => event(e => listener.call(thisArgs, e), null, disposables)));\r\n }\r\n Event.any = any;\r\n /**\r\n * @deprecated DO NOT use, this leaks memory\r\n */\r\n function reduce(event, merge, initial) {\r\n let output = initial;\r\n return map(event, e => {\r\n output = merge(output, e);\r\n return output;\r\n });\r\n }\r\n Event.reduce = reduce;\r\n /**\r\n * @deprecated DO NOT use, this leaks memory\r\n */\r\n function snapshot(event) {\r\n let listener;\r\n const emitter = new Emitter({\r\n onFirstListenerAdd() {\r\n listener = event(emitter.fire, emitter);\r\n },\r\n onLastListenerRemove() {\r\n listener.dispose();\r\n }\r\n });\r\n return emitter.event;\r\n }\r\n /**\r\n * @deprecated DO NOT use, this leaks memory\r\n */\r\n function debounce(event, merge, delay = 100, leading = false, leakWarningThreshold) {\r\n let subscription;\r\n let output = undefined;\r\n let handle = undefined;\r\n let numDebouncedCalls = 0;\r\n const emitter = new Emitter({\r\n leakWarningThreshold,\r\n onFirstListenerAdd() {\r\n subscription = event(cur => {\r\n numDebouncedCalls++;\r\n output = merge(output, cur);\r\n if (leading && !handle) {\r\n emitter.fire(output);\r\n output = undefined;\r\n }\r\n clearTimeout(handle);\r\n handle = setTimeout(() => {\r\n const _output = output;\r\n output = undefined;\r\n handle = undefined;\r\n if (!leading || numDebouncedCalls > 1) {\r\n emitter.fire(_output);\r\n }\r\n numDebouncedCalls = 0;\r\n }, delay);\r\n });\r\n },\r\n onLastListenerRemove() {\r\n subscription.dispose();\r\n }\r\n });\r\n return emitter.event;\r\n }\r\n Event.debounce = debounce;\r\n /**\r\n * @deprecated DO NOT use, this leaks memory\r\n */\r\n function latch(event, equals = (a, b) => a === b) {\r\n let firstCall = true;\r\n let cache;\r\n return filter(event, value => {\r\n const shouldEmit = firstCall || !equals(value, cache);\r\n firstCall = false;\r\n cache = value;\r\n return shouldEmit;\r\n });\r\n }\r\n Event.latch = latch;\r\n /**\r\n * @deprecated DO NOT use, this leaks memory\r\n */\r\n function split(event, isT) {\r\n return [\r\n Event.filter(event, isT),\r\n Event.filter(event, e => !isT(e)),\r\n ];\r\n }\r\n Event.split = split;\r\n /**\r\n * @deprecated DO NOT use, this leaks memory\r\n */\r\n function buffer(event, nextTick = false, _buffer = []) {\r\n let buffer = _buffer.slice();\r\n let listener = event(e => {\r\n if (buffer) {\r\n buffer.push(e);\r\n }\r\n else {\r\n emitter.fire(e);\r\n }\r\n });\r\n const flush = () => {\r\n if (buffer) {\r\n buffer.forEach(e => emitter.fire(e));\r\n }\r\n buffer = null;\r\n };\r\n const emitter = new Emitter({\r\n onFirstListenerAdd() {\r\n if (!listener) {\r\n listener = event(e => emitter.fire(e));\r\n }\r\n },\r\n onFirstListenerDidAdd() {\r\n if (buffer) {\r\n if (nextTick) {\r\n setTimeout(flush);\r\n }\r\n else {\r\n flush();\r\n }\r\n }\r\n },\r\n onLastListenerRemove() {\r\n if (listener) {\r\n listener.dispose();\r\n }\r\n listener = null;\r\n }\r\n });\r\n return emitter.event;\r\n }\r\n Event.buffer = buffer;\r\n class ChainableEvent {\r\n constructor(event) {\r\n this.event = event;\r\n }\r\n map(fn) {\r\n return new ChainableEvent(map(this.event, fn));\r\n }\r\n forEach(fn) {\r\n return new ChainableEvent(forEach(this.event, fn));\r\n }\r\n filter(fn) {\r\n return new ChainableEvent(filter(this.event, fn));\r\n }\r\n reduce(merge, initial) {\r\n return new ChainableEvent(reduce(this.event, merge, initial));\r\n }\r\n latch() {\r\n return new ChainableEvent(latch(this.event));\r\n }\r\n debounce(merge, delay = 100, leading = false, leakWarningThreshold) {\r\n return new ChainableEvent(debounce(this.event, merge, delay, leading, leakWarningThreshold));\r\n }\r\n on(listener, thisArgs, disposables) {\r\n return this.event(listener, thisArgs, disposables);\r\n }\r\n once(listener, thisArgs, disposables) {\r\n return once(this.event)(listener, thisArgs, disposables);\r\n }\r\n }\r\n /**\r\n * @deprecated DO NOT use, this leaks memory\r\n */\r\n function chain(event) {\r\n return new ChainableEvent(event);\r\n }\r\n Event.chain = chain;\r\n function fromNodeEventEmitter(emitter, eventName, map = id => id) {\r\n const fn = (...args) => result.fire(map(...args));\r\n const onFirstListenerAdd = () => emitter.on(eventName, fn);\r\n const onLastListenerRemove = () => emitter.removeListener(eventName, fn);\r\n const result = new Emitter({ onFirstListenerAdd, onLastListenerRemove });\r\n return result.event;\r\n }\r\n Event.fromNodeEventEmitter = fromNodeEventEmitter;\r\n function fromDOMEventEmitter(emitter, eventName, map = id => id) {\r\n const fn = (...args) => result.fire(map(...args));\r\n const onFirstListenerAdd = () => emitter.addEventListener(eventName, fn);\r\n const onLastListenerRemove = () => emitter.removeEventListener(eventName, fn);\r\n const result = new Emitter({ onFirstListenerAdd, onLastListenerRemove });\r\n return result.event;\r\n }\r\n Event.fromDOMEventEmitter = fromDOMEventEmitter;\r\n function toPromise(event) {\r\n return new Promise(resolve => once(event)(resolve));\r\n }\r\n Event.toPromise = toPromise;\r\n})(Event || (Event = {}));\r\nclass EventProfiling {\r\n constructor(name) {\r\n this._listenerCount = 0;\r\n this._invocationCount = 0;\r\n this._elapsedOverall = 0;\r\n this._name = `${name}_${EventProfiling._idPool++}`;\r\n }\r\n start(listenerCount) {\r\n this._stopWatch = new StopWatch(true);\r\n this._listenerCount = listenerCount;\r\n }\r\n stop() {\r\n if (this._stopWatch) {\r\n const elapsed = this._stopWatch.elapsed();\r\n this._elapsedOverall += elapsed;\r\n this._invocationCount += 1;\r\n console.info(`did FIRE ${this._name}: elapsed_ms: ${elapsed.toFixed(5)}, listener: ${this._listenerCount} (elapsed_overall: ${this._elapsedOverall.toFixed(2)}, invocations: ${this._invocationCount})`);\r\n this._stopWatch = undefined;\r\n }\r\n }\r\n}\r\nEventProfiling._idPool = 0;\r\nlet _globalLeakWarningThreshold = -1;\r\nclass LeakageMonitor {\r\n constructor(customThreshold, name = Math.random().toString(18).slice(2, 5)) {\r\n this.customThreshold = customThreshold;\r\n this.name = name;\r\n this._warnCountdown = 0;\r\n }\r\n dispose() {\r\n if (this._stacks) {\r\n this._stacks.clear();\r\n }\r\n }\r\n check(listenerCount) {\r\n let threshold = _globalLeakWarningThreshold;\r\n if (typeof this.customThreshold === 'number') {\r\n threshold = this.customThreshold;\r\n }\r\n if (threshold <= 0 || listenerCount < threshold) {\r\n return undefined;\r\n }\r\n if (!this._stacks) {\r\n this._stacks = new Map();\r\n }\r\n const stack = new Error().stack.split('\\n').slice(3).join('\\n');\r\n const count = (this._stacks.get(stack) || 0);\r\n this._stacks.set(stack, count + 1);\r\n this._warnCountdown -= 1;\r\n if (this._warnCountdown <= 0) {\r\n // only warn on first exceed and then every time the limit\r\n // is exceeded by 50% again\r\n this._warnCountdown = threshold * 0.5;\r\n // find most frequent listener and print warning\r\n let topStack;\r\n let topCount = 0;\r\n for (const [stack, count] of this._stacks) {\r\n if (!topStack || topCount < count) {\r\n topStack = stack;\r\n topCount = count;\r\n }\r\n }\r\n console.warn(`[${this.name}] potential listener LEAK detected, having ${listenerCount} listeners already. MOST frequent listener (${topCount}):`);\r\n console.warn(topStack);\r\n }\r\n return () => {\r\n const count = (this._stacks.get(stack) || 0);\r\n this._stacks.set(stack, count - 1);\r\n };\r\n }\r\n}\r\n/**\r\n * The Emitter can be used to expose an Event to the public\r\n * to fire it from the insides.\r\n * Sample:\r\n class Document {\r\n\r\n private readonly _onDidChange = new Emitter<(value:string)=>any>();\r\n\r\n public onDidChange = this._onDidChange.event;\r\n\r\n // getter-style\r\n // get onDidChange(): Event<(value:string)=>any> {\r\n // \treturn this._onDidChange.event;\r\n // }\r\n\r\n private _doIt() {\r\n //...\r\n this._onDidChange.fire(value);\r\n }\r\n }\r\n */\r\nexport class Emitter {\r\n constructor(options) {\r\n var _a;\r\n this._disposed = false;\r\n this._options = options;\r\n this._leakageMon = _globalLeakWarningThreshold > 0 ? new LeakageMonitor(this._options && this._options.leakWarningThreshold) : undefined;\r\n this._perfMon = ((_a = this._options) === null || _a === void 0 ? void 0 : _a._profName) ? new EventProfiling(this._options._profName) : undefined;\r\n }\r\n /**\r\n * For the public to allow to subscribe\r\n * to events from this Emitter\r\n */\r\n get event() {\r\n if (!this._event) {\r\n this._event = (listener, thisArgs, disposables) => {\r\n var _a;\r\n if (!this._listeners) {\r\n this._listeners = new LinkedList();\r\n }\r\n const firstListener = this._listeners.isEmpty();\r\n if (firstListener && this._options && this._options.onFirstListenerAdd) {\r\n this._options.onFirstListenerAdd(this);\r\n }\r\n const remove = this._listeners.push(!thisArgs ? listener : [listener, thisArgs]);\r\n if (firstListener && this._options && this._options.onFirstListenerDidAdd) {\r\n this._options.onFirstListenerDidAdd(this);\r\n }\r\n if (this._options && this._options.onListenerDidAdd) {\r\n this._options.onListenerDidAdd(this, listener, thisArgs);\r\n }\r\n // check and record this emitter for potential leakage\r\n const removeMonitor = (_a = this._leakageMon) === null || _a === void 0 ? void 0 : _a.check(this._listeners.size);\r\n const result = toDisposable(() => {\r\n if (removeMonitor) {\r\n removeMonitor();\r\n }\r\n if (!this._disposed) {\r\n remove();\r\n if (this._options && this._options.onLastListenerRemove) {\r\n const hasListeners = (this._listeners && !this._listeners.isEmpty());\r\n if (!hasListeners) {\r\n this._options.onLastListenerRemove(this);\r\n }\r\n }\r\n }\r\n });\r\n if (disposables instanceof DisposableStore) {\r\n disposables.add(result);\r\n }\r\n else if (Array.isArray(disposables)) {\r\n disposables.push(result);\r\n }\r\n return result;\r\n };\r\n }\r\n return this._event;\r\n }\r\n /**\r\n * To be kept private to fire an event to\r\n * subscribers\r\n */\r\n fire(event) {\r\n var _a, _b;\r\n if (this._listeners) {\r\n // put all [listener,event]-pairs into delivery queue\r\n // then emit all event. an inner/nested event might be\r\n // the driver of this\r\n if (!this._deliveryQueue) {\r\n this._deliveryQueue = new LinkedList();\r\n }\r\n for (let listener of this._listeners) {\r\n this._deliveryQueue.push([listener, event]);\r\n }\r\n // start/stop performance insight collection\r\n (_a = this._perfMon) === null || _a === void 0 ? void 0 : _a.start(this._deliveryQueue.size);\r\n while (this._deliveryQueue.size > 0) {\r\n const [listener, event] = this._deliveryQueue.shift();\r\n try {\r\n if (typeof listener === 'function') {\r\n listener.call(undefined, event);\r\n }\r\n else {\r\n listener[0].call(listener[1], event);\r\n }\r\n }\r\n catch (e) {\r\n onUnexpectedError(e);\r\n }\r\n }\r\n (_b = this._perfMon) === null || _b === void 0 ? void 0 : _b.stop();\r\n }\r\n }\r\n dispose() {\r\n var _a, _b, _c, _d, _e;\r\n if (!this._disposed) {\r\n this._disposed = true;\r\n (_a = this._listeners) === null || _a === void 0 ? void 0 : _a.clear();\r\n (_b = this._deliveryQueue) === null || _b === void 0 ? void 0 : _b.clear();\r\n (_d = (_c = this._options) === null || _c === void 0 ? void 0 : _c.onLastListenerRemove) === null || _d === void 0 ? void 0 : _d.call(_c);\r\n (_e = this._leakageMon) === null || _e === void 0 ? void 0 : _e.dispose();\r\n }\r\n }\r\n}\r\nexport class PauseableEmitter extends Emitter {\r\n constructor(options) {\r\n super(options);\r\n this._isPaused = 0;\r\n this._eventQueue = new LinkedList();\r\n this._mergeFn = options === null || options === void 0 ? void 0 : options.merge;\r\n }\r\n pause() {\r\n this._isPaused++;\r\n }\r\n resume() {\r\n if (this._isPaused !== 0 && --this._isPaused === 0) {\r\n if (this._mergeFn) {\r\n // use the merge function to create a single composite\r\n // event. make a copy in case firing pauses this emitter\r\n const events = Array.from(this._eventQueue);\r\n this._eventQueue.clear();\r\n super.fire(this._mergeFn(events));\r\n }\r\n else {\r\n // no merging, fire each event individually and test\r\n // that this emitter isn't paused halfway through\r\n while (!this._isPaused && this._eventQueue.size !== 0) {\r\n super.fire(this._eventQueue.shift());\r\n }\r\n }\r\n }\r\n }\r\n fire(event) {\r\n if (this._listeners) {\r\n if (this._isPaused !== 0) {\r\n this._eventQueue.push(event);\r\n }\r\n else {\r\n super.fire(event);\r\n }\r\n }\r\n }\r\n}\r\nexport class DebounceEmitter extends PauseableEmitter {\r\n constructor(options) {\r\n var _a;\r\n super(options);\r\n this._delay = (_a = options.delay) !== null && _a !== void 0 ? _a : 100;\r\n }\r\n fire(event) {\r\n if (!this._handle) {\r\n this.pause();\r\n this._handle = setTimeout(() => {\r\n this._handle = undefined;\r\n this.resume();\r\n }, this._delay);\r\n }\r\n super.fire(event);\r\n }\r\n}\r\n/**\r\n * The EventBufferer is useful in situations in which you want\r\n * to delay firing your events during some code.\r\n * You can wrap that code and be sure that the event will not\r\n * be fired during that wrap.\r\n *\r\n * ```\r\n * const emitter: Emitter;\r\n * const delayer = new EventDelayer();\r\n * const delayedEvent = delayer.wrapEvent(emitter.event);\r\n *\r\n * delayedEvent(console.log);\r\n *\r\n * delayer.bufferEvents(() => {\r\n * emitter.fire(); // event will not be fired yet\r\n * });\r\n *\r\n * // event will only be fired at this point\r\n * ```\r\n */\r\nexport class EventBufferer {\r\n constructor() {\r\n this.buffers = [];\r\n }\r\n wrapEvent(event) {\r\n return (listener, thisArgs, disposables) => {\r\n return event(i => {\r\n const buffer = this.buffers[this.buffers.length - 1];\r\n if (buffer) {\r\n buffer.push(() => listener.call(thisArgs, i));\r\n }\r\n else {\r\n listener.call(thisArgs, i);\r\n }\r\n }, undefined, disposables);\r\n };\r\n }\r\n bufferEvents(fn) {\r\n const buffer = [];\r\n this.buffers.push(buffer);\r\n const r = fn();\r\n this.buffers.pop();\r\n buffer.forEach(flush => flush());\r\n return r;\r\n }\r\n}\r\n/**\r\n * A Relay is an event forwarder which functions as a replugabble event pipe.\r\n * Once created, you can connect an input event to it and it will simply forward\r\n * events from that input event through its own `event` property. The `input`\r\n * can be changed at any point in time.\r\n */\r\nexport class Relay {\r\n constructor() {\r\n this.listening = false;\r\n this.inputEvent = Event.None;\r\n this.inputEventListener = Disposable.None;\r\n this.emitter = new Emitter({\r\n onFirstListenerDidAdd: () => {\r\n this.listening = true;\r\n this.inputEventListener = this.inputEvent(this.emitter.fire, this.emitter);\r\n },\r\n onLastListenerRemove: () => {\r\n this.listening = false;\r\n this.inputEventListener.dispose();\r\n }\r\n });\r\n this.event = this.emitter.event;\r\n }\r\n set input(event) {\r\n this.inputEvent = event;\r\n if (this.listening) {\r\n this.inputEventListener.dispose();\r\n this.inputEventListener = event(this.emitter.fire, this.emitter);\r\n }\r\n }\r\n dispose() {\r\n this.inputEventListener.dispose();\r\n this.emitter.dispose();\r\n }\r\n}\r\n","/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nimport { Emitter, Event } from './event.js';\r\nconst shortcutEvent = Object.freeze(function (callback, context) {\r\n const handle = setTimeout(callback.bind(context), 0);\r\n return { dispose() { clearTimeout(handle); } };\r\n});\r\nexport var CancellationToken;\r\n(function (CancellationToken) {\r\n function isCancellationToken(thing) {\r\n if (thing === CancellationToken.None || thing === CancellationToken.Cancelled) {\r\n return true;\r\n }\r\n if (thing instanceof MutableToken) {\r\n return true;\r\n }\r\n if (!thing || typeof thing !== 'object') {\r\n return false;\r\n }\r\n return typeof thing.isCancellationRequested === 'boolean'\r\n && typeof thing.onCancellationRequested === 'function';\r\n }\r\n CancellationToken.isCancellationToken = isCancellationToken;\r\n CancellationToken.None = Object.freeze({\r\n isCancellationRequested: false,\r\n onCancellationRequested: Event.None\r\n });\r\n CancellationToken.Cancelled = Object.freeze({\r\n isCancellationRequested: true,\r\n onCancellationRequested: shortcutEvent\r\n });\r\n})(CancellationToken || (CancellationToken = {}));\r\nclass MutableToken {\r\n constructor() {\r\n this._isCancelled = false;\r\n this._emitter = null;\r\n }\r\n cancel() {\r\n if (!this._isCancelled) {\r\n this._isCancelled = true;\r\n if (this._emitter) {\r\n this._emitter.fire(undefined);\r\n this.dispose();\r\n }\r\n }\r\n }\r\n get isCancellationRequested() {\r\n return this._isCancelled;\r\n }\r\n get onCancellationRequested() {\r\n if (this._isCancelled) {\r\n return shortcutEvent;\r\n }\r\n if (!this._emitter) {\r\n this._emitter = new Emitter();\r\n }\r\n return this._emitter.event;\r\n }\r\n dispose() {\r\n if (this._emitter) {\r\n this._emitter.dispose();\r\n this._emitter = null;\r\n }\r\n }\r\n}\r\nexport class CancellationTokenSource {\r\n constructor(parent) {\r\n this._token = undefined;\r\n this._parentListener = undefined;\r\n this._parentListener = parent && parent.onCancellationRequested(this.cancel, this);\r\n }\r\n get token() {\r\n if (!this._token) {\r\n // be lazy and create the token only when\r\n // actually needed\r\n this._token = new MutableToken();\r\n }\r\n return this._token;\r\n }\r\n cancel() {\r\n if (!this._token) {\r\n // save an object by returning the default\r\n // cancelled token when cancellation happens\r\n // before someone asks for the token\r\n this._token = CancellationToken.Cancelled;\r\n }\r\n else if (this._token instanceof MutableToken) {\r\n // actually cancel\r\n this._token.cancel();\r\n }\r\n }\r\n dispose(cancel = false) {\r\n if (cancel) {\r\n this.cancel();\r\n }\r\n if (this._parentListener) {\r\n this._parentListener.dispose();\r\n }\r\n if (!this._token) {\r\n // ensure to initialize with an empty token if we had none\r\n this._token = CancellationToken.None;\r\n }\r\n else if (this._token instanceof MutableToken) {\r\n // actually dispose\r\n this._token.dispose();\r\n }\r\n }\r\n}\r\n","/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nimport { illegalArgument } from './errors.js';\r\nclass KeyCodeStrMap {\r\n constructor() {\r\n this._keyCodeToStr = [];\r\n this._strToKeyCode = Object.create(null);\r\n }\r\n define(keyCode, str) {\r\n this._keyCodeToStr[keyCode] = str;\r\n this._strToKeyCode[str.toLowerCase()] = keyCode;\r\n }\r\n keyCodeToStr(keyCode) {\r\n return this._keyCodeToStr[keyCode];\r\n }\r\n strToKeyCode(str) {\r\n return this._strToKeyCode[str.toLowerCase()] || 0 /* Unknown */;\r\n }\r\n}\r\nconst uiMap = new KeyCodeStrMap();\r\nconst userSettingsUSMap = new KeyCodeStrMap();\r\nconst userSettingsGeneralMap = new KeyCodeStrMap();\r\n(function () {\r\n function define(keyCode, uiLabel, usUserSettingsLabel = uiLabel, generalUserSettingsLabel = usUserSettingsLabel) {\r\n uiMap.define(keyCode, uiLabel);\r\n userSettingsUSMap.define(keyCode, usUserSettingsLabel);\r\n userSettingsGeneralMap.define(keyCode, generalUserSettingsLabel);\r\n }\r\n define(0 /* Unknown */, 'unknown');\r\n define(1 /* Backspace */, 'Backspace');\r\n define(2 /* Tab */, 'Tab');\r\n define(3 /* Enter */, 'Enter');\r\n define(4 /* Shift */, 'Shift');\r\n define(5 /* Ctrl */, 'Ctrl');\r\n define(6 /* Alt */, 'Alt');\r\n define(7 /* PauseBreak */, 'PauseBreak');\r\n define(8 /* CapsLock */, 'CapsLock');\r\n define(9 /* Escape */, 'Escape');\r\n define(10 /* Space */, 'Space');\r\n define(11 /* PageUp */, 'PageUp');\r\n define(12 /* PageDown */, 'PageDown');\r\n define(13 /* End */, 'End');\r\n define(14 /* Home */, 'Home');\r\n define(15 /* LeftArrow */, 'LeftArrow', 'Left');\r\n define(16 /* UpArrow */, 'UpArrow', 'Up');\r\n define(17 /* RightArrow */, 'RightArrow', 'Right');\r\n define(18 /* DownArrow */, 'DownArrow', 'Down');\r\n define(19 /* Insert */, 'Insert');\r\n define(20 /* Delete */, 'Delete');\r\n define(21 /* KEY_0 */, '0');\r\n define(22 /* KEY_1 */, '1');\r\n define(23 /* KEY_2 */, '2');\r\n define(24 /* KEY_3 */, '3');\r\n define(25 /* KEY_4 */, '4');\r\n define(26 /* KEY_5 */, '5');\r\n define(27 /* KEY_6 */, '6');\r\n define(28 /* KEY_7 */, '7');\r\n define(29 /* KEY_8 */, '8');\r\n define(30 /* KEY_9 */, '9');\r\n define(31 /* KEY_A */, 'A');\r\n define(32 /* KEY_B */, 'B');\r\n define(33 /* KEY_C */, 'C');\r\n define(34 /* KEY_D */, 'D');\r\n define(35 /* KEY_E */, 'E');\r\n define(36 /* KEY_F */, 'F');\r\n define(37 /* KEY_G */, 'G');\r\n define(38 /* KEY_H */, 'H');\r\n define(39 /* KEY_I */, 'I');\r\n define(40 /* KEY_J */, 'J');\r\n define(41 /* KEY_K */, 'K');\r\n define(42 /* KEY_L */, 'L');\r\n define(43 /* KEY_M */, 'M');\r\n define(44 /* KEY_N */, 'N');\r\n define(45 /* KEY_O */, 'O');\r\n define(46 /* KEY_P */, 'P');\r\n define(47 /* KEY_Q */, 'Q');\r\n define(48 /* KEY_R */, 'R');\r\n define(49 /* KEY_S */, 'S');\r\n define(50 /* KEY_T */, 'T');\r\n define(51 /* KEY_U */, 'U');\r\n define(52 /* KEY_V */, 'V');\r\n define(53 /* KEY_W */, 'W');\r\n define(54 /* KEY_X */, 'X');\r\n define(55 /* KEY_Y */, 'Y');\r\n define(56 /* KEY_Z */, 'Z');\r\n define(57 /* Meta */, 'Meta');\r\n define(58 /* ContextMenu */, 'ContextMenu');\r\n define(59 /* F1 */, 'F1');\r\n define(60 /* F2 */, 'F2');\r\n define(61 /* F3 */, 'F3');\r\n define(62 /* F4 */, 'F4');\r\n define(63 /* F5 */, 'F5');\r\n define(64 /* F6 */, 'F6');\r\n define(65 /* F7 */, 'F7');\r\n define(66 /* F8 */, 'F8');\r\n define(67 /* F9 */, 'F9');\r\n define(68 /* F10 */, 'F10');\r\n define(69 /* F11 */, 'F11');\r\n define(70 /* F12 */, 'F12');\r\n define(71 /* F13 */, 'F13');\r\n define(72 /* F14 */, 'F14');\r\n define(73 /* F15 */, 'F15');\r\n define(74 /* F16 */, 'F16');\r\n define(75 /* F17 */, 'F17');\r\n define(76 /* F18 */, 'F18');\r\n define(77 /* F19 */, 'F19');\r\n define(78 /* NumLock */, 'NumLock');\r\n define(79 /* ScrollLock */, 'ScrollLock');\r\n define(80 /* US_SEMICOLON */, ';', ';', 'OEM_1');\r\n define(81 /* US_EQUAL */, '=', '=', 'OEM_PLUS');\r\n define(82 /* US_COMMA */, ',', ',', 'OEM_COMMA');\r\n define(83 /* US_MINUS */, '-', '-', 'OEM_MINUS');\r\n define(84 /* US_DOT */, '.', '.', 'OEM_PERIOD');\r\n define(85 /* US_SLASH */, '/', '/', 'OEM_2');\r\n define(86 /* US_BACKTICK */, '`', '`', 'OEM_3');\r\n define(110 /* ABNT_C1 */, 'ABNT_C1');\r\n define(111 /* ABNT_C2 */, 'ABNT_C2');\r\n define(87 /* US_OPEN_SQUARE_BRACKET */, '[', '[', 'OEM_4');\r\n define(88 /* US_BACKSLASH */, '\\\\', '\\\\', 'OEM_5');\r\n define(89 /* US_CLOSE_SQUARE_BRACKET */, ']', ']', 'OEM_6');\r\n define(90 /* US_QUOTE */, '\\'', '\\'', 'OEM_7');\r\n define(91 /* OEM_8 */, 'OEM_8');\r\n define(92 /* OEM_102 */, 'OEM_102');\r\n define(93 /* NUMPAD_0 */, 'NumPad0');\r\n define(94 /* NUMPAD_1 */, 'NumPad1');\r\n define(95 /* NUMPAD_2 */, 'NumPad2');\r\n define(96 /* NUMPAD_3 */, 'NumPad3');\r\n define(97 /* NUMPAD_4 */, 'NumPad4');\r\n define(98 /* NUMPAD_5 */, 'NumPad5');\r\n define(99 /* NUMPAD_6 */, 'NumPad6');\r\n define(100 /* NUMPAD_7 */, 'NumPad7');\r\n define(101 /* NUMPAD_8 */, 'NumPad8');\r\n define(102 /* NUMPAD_9 */, 'NumPad9');\r\n define(103 /* NUMPAD_MULTIPLY */, 'NumPad_Multiply');\r\n define(104 /* NUMPAD_ADD */, 'NumPad_Add');\r\n define(105 /* NUMPAD_SEPARATOR */, 'NumPad_Separator');\r\n define(106 /* NUMPAD_SUBTRACT */, 'NumPad_Subtract');\r\n define(107 /* NUMPAD_DECIMAL */, 'NumPad_Decimal');\r\n define(108 /* NUMPAD_DIVIDE */, 'NumPad_Divide');\r\n})();\r\nexport var KeyCodeUtils;\r\n(function (KeyCodeUtils) {\r\n function toString(keyCode) {\r\n return uiMap.keyCodeToStr(keyCode);\r\n }\r\n KeyCodeUtils.toString = toString;\r\n function fromString(key) {\r\n return uiMap.strToKeyCode(key);\r\n }\r\n KeyCodeUtils.fromString = fromString;\r\n function toUserSettingsUS(keyCode) {\r\n return userSettingsUSMap.keyCodeToStr(keyCode);\r\n }\r\n KeyCodeUtils.toUserSettingsUS = toUserSettingsUS;\r\n function toUserSettingsGeneral(keyCode) {\r\n return userSettingsGeneralMap.keyCodeToStr(keyCode);\r\n }\r\n KeyCodeUtils.toUserSettingsGeneral = toUserSettingsGeneral;\r\n function fromUserSettings(key) {\r\n return userSettingsUSMap.strToKeyCode(key) || userSettingsGeneralMap.strToKeyCode(key);\r\n }\r\n KeyCodeUtils.fromUserSettings = fromUserSettings;\r\n})(KeyCodeUtils || (KeyCodeUtils = {}));\r\nexport function KeyChord(firstPart, secondPart) {\r\n const chordPart = ((secondPart & 0x0000FFFF) << 16) >>> 0;\r\n return (firstPart | chordPart) >>> 0;\r\n}\r\nexport function createKeybinding(keybinding, OS) {\r\n if (keybinding === 0) {\r\n return null;\r\n }\r\n const firstPart = (keybinding & 0x0000FFFF) >>> 0;\r\n const chordPart = (keybinding & 0xFFFF0000) >>> 16;\r\n if (chordPart !== 0) {\r\n return new ChordKeybinding([\r\n createSimpleKeybinding(firstPart, OS),\r\n createSimpleKeybinding(chordPart, OS)\r\n ]);\r\n }\r\n return new ChordKeybinding([createSimpleKeybinding(firstPart, OS)]);\r\n}\r\nexport function createSimpleKeybinding(keybinding, OS) {\r\n const ctrlCmd = (keybinding & 2048 /* CtrlCmd */ ? true : false);\r\n const winCtrl = (keybinding & 256 /* WinCtrl */ ? true : false);\r\n const ctrlKey = (OS === 2 /* Macintosh */ ? winCtrl : ctrlCmd);\r\n const shiftKey = (keybinding & 1024 /* Shift */ ? true : false);\r\n const altKey = (keybinding & 512 /* Alt */ ? true : false);\r\n const metaKey = (OS === 2 /* Macintosh */ ? ctrlCmd : winCtrl);\r\n const keyCode = (keybinding & 255 /* KeyCode */);\r\n return new SimpleKeybinding(ctrlKey, shiftKey, altKey, metaKey, keyCode);\r\n}\r\nexport class SimpleKeybinding {\r\n constructor(ctrlKey, shiftKey, altKey, metaKey, keyCode) {\r\n this.ctrlKey = ctrlKey;\r\n this.shiftKey = shiftKey;\r\n this.altKey = altKey;\r\n this.metaKey = metaKey;\r\n this.keyCode = keyCode;\r\n }\r\n equals(other) {\r\n return (this.ctrlKey === other.ctrlKey\r\n && this.shiftKey === other.shiftKey\r\n && this.altKey === other.altKey\r\n && this.metaKey === other.metaKey\r\n && this.keyCode === other.keyCode);\r\n }\r\n isModifierKey() {\r\n return (this.keyCode === 0 /* Unknown */\r\n || this.keyCode === 5 /* Ctrl */\r\n || this.keyCode === 57 /* Meta */\r\n || this.keyCode === 6 /* Alt */\r\n || this.keyCode === 4 /* Shift */);\r\n }\r\n toChord() {\r\n return new ChordKeybinding([this]);\r\n }\r\n /**\r\n * Does this keybinding refer to the key code of a modifier and it also has the modifier flag?\r\n */\r\n isDuplicateModifierCase() {\r\n return ((this.ctrlKey && this.keyCode === 5 /* Ctrl */)\r\n || (this.shiftKey && this.keyCode === 4 /* Shift */)\r\n || (this.altKey && this.keyCode === 6 /* Alt */)\r\n || (this.metaKey && this.keyCode === 57 /* Meta */));\r\n }\r\n}\r\nexport class ChordKeybinding {\r\n constructor(parts) {\r\n if (parts.length === 0) {\r\n throw illegalArgument(`parts`);\r\n }\r\n this.parts = parts;\r\n }\r\n}\r\nexport class ResolvedKeybindingPart {\r\n constructor(ctrlKey, shiftKey, altKey, metaKey, kbLabel, kbAriaLabel) {\r\n this.ctrlKey = ctrlKey;\r\n this.shiftKey = shiftKey;\r\n this.altKey = altKey;\r\n this.metaKey = metaKey;\r\n this.keyLabel = kbLabel;\r\n this.keyAriaLabel = kbAriaLabel;\r\n }\r\n}\r\n/**\r\n * A resolved keybinding. Can be a simple keybinding or a chord keybinding.\r\n */\r\nexport class ResolvedKeybinding {\r\n}\r\n","/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n// THIS IS A GENERATED FILE. DO NOT EDIT DIRECTLY.\r\nexport var AccessibilitySupport;\r\n(function (AccessibilitySupport) {\r\n /**\r\n * This should be the browser case where it is not known if a screen reader is attached or no.\r\n */\r\n AccessibilitySupport[AccessibilitySupport[\"Unknown\"] = 0] = \"Unknown\";\r\n AccessibilitySupport[AccessibilitySupport[\"Disabled\"] = 1] = \"Disabled\";\r\n AccessibilitySupport[AccessibilitySupport[\"Enabled\"] = 2] = \"Enabled\";\r\n})(AccessibilitySupport || (AccessibilitySupport = {}));\r\nexport var CompletionItemInsertTextRule;\r\n(function (CompletionItemInsertTextRule) {\r\n /**\r\n * Adjust whitespace/indentation of multiline insert texts to\r\n * match the current line indentation.\r\n */\r\n CompletionItemInsertTextRule[CompletionItemInsertTextRule[\"KeepWhitespace\"] = 1] = \"KeepWhitespace\";\r\n /**\r\n * `insertText` is a snippet.\r\n */\r\n CompletionItemInsertTextRule[CompletionItemInsertTextRule[\"InsertAsSnippet\"] = 4] = \"InsertAsSnippet\";\r\n})(CompletionItemInsertTextRule || (CompletionItemInsertTextRule = {}));\r\nexport var CompletionItemKind;\r\n(function (CompletionItemKind) {\r\n CompletionItemKind[CompletionItemKind[\"Method\"] = 0] = \"Method\";\r\n CompletionItemKind[CompletionItemKind[\"Function\"] = 1] = \"Function\";\r\n CompletionItemKind[CompletionItemKind[\"Constructor\"] = 2] = \"Constructor\";\r\n CompletionItemKind[CompletionItemKind[\"Field\"] = 3] = \"Field\";\r\n CompletionItemKind[CompletionItemKind[\"Variable\"] = 4] = \"Variable\";\r\n CompletionItemKind[CompletionItemKind[\"Class\"] = 5] = \"Class\";\r\n CompletionItemKind[CompletionItemKind[\"Struct\"] = 6] = \"Struct\";\r\n CompletionItemKind[CompletionItemKind[\"Interface\"] = 7] = \"Interface\";\r\n CompletionItemKind[CompletionItemKind[\"Module\"] = 8] = \"Module\";\r\n CompletionItemKind[CompletionItemKind[\"Property\"] = 9] = \"Property\";\r\n CompletionItemKind[CompletionItemKind[\"Event\"] = 10] = \"Event\";\r\n CompletionItemKind[CompletionItemKind[\"Operator\"] = 11] = \"Operator\";\r\n CompletionItemKind[CompletionItemKind[\"Unit\"] = 12] = \"Unit\";\r\n CompletionItemKind[CompletionItemKind[\"Value\"] = 13] = \"Value\";\r\n CompletionItemKind[CompletionItemKind[\"Constant\"] = 14] = \"Constant\";\r\n CompletionItemKind[CompletionItemKind[\"Enum\"] = 15] = \"Enum\";\r\n CompletionItemKind[CompletionItemKind[\"EnumMember\"] = 16] = \"EnumMember\";\r\n CompletionItemKind[CompletionItemKind[\"Keyword\"] = 17] = \"Keyword\";\r\n CompletionItemKind[CompletionItemKind[\"Text\"] = 18] = \"Text\";\r\n CompletionItemKind[CompletionItemKind[\"Color\"] = 19] = \"Color\";\r\n CompletionItemKind[CompletionItemKind[\"File\"] = 20] = \"File\";\r\n CompletionItemKind[CompletionItemKind[\"Reference\"] = 21] = \"Reference\";\r\n CompletionItemKind[CompletionItemKind[\"Customcolor\"] = 22] = \"Customcolor\";\r\n CompletionItemKind[CompletionItemKind[\"Folder\"] = 23] = \"Folder\";\r\n CompletionItemKind[CompletionItemKind[\"TypeParameter\"] = 24] = \"TypeParameter\";\r\n CompletionItemKind[CompletionItemKind[\"User\"] = 25] = \"User\";\r\n CompletionItemKind[CompletionItemKind[\"Issue\"] = 26] = \"Issue\";\r\n CompletionItemKind[CompletionItemKind[\"Snippet\"] = 27] = \"Snippet\";\r\n})(CompletionItemKind || (CompletionItemKind = {}));\r\nexport var CompletionItemTag;\r\n(function (CompletionItemTag) {\r\n CompletionItemTag[CompletionItemTag[\"Deprecated\"] = 1] = \"Deprecated\";\r\n})(CompletionItemTag || (CompletionItemTag = {}));\r\n/**\r\n * How a suggest provider was triggered.\r\n */\r\nexport var CompletionTriggerKind;\r\n(function (CompletionTriggerKind) {\r\n CompletionTriggerKind[CompletionTriggerKind[\"Invoke\"] = 0] = \"Invoke\";\r\n CompletionTriggerKind[CompletionTriggerKind[\"TriggerCharacter\"] = 1] = \"TriggerCharacter\";\r\n CompletionTriggerKind[CompletionTriggerKind[\"TriggerForIncompleteCompletions\"] = 2] = \"TriggerForIncompleteCompletions\";\r\n})(CompletionTriggerKind || (CompletionTriggerKind = {}));\r\n/**\r\n * A positioning preference for rendering content widgets.\r\n */\r\nexport var ContentWidgetPositionPreference;\r\n(function (ContentWidgetPositionPreference) {\r\n /**\r\n * Place the content widget exactly at a position\r\n */\r\n ContentWidgetPositionPreference[ContentWidgetPositionPreference[\"EXACT\"] = 0] = \"EXACT\";\r\n /**\r\n * Place the content widget above a position\r\n */\r\n ContentWidgetPositionPreference[ContentWidgetPositionPreference[\"ABOVE\"] = 1] = \"ABOVE\";\r\n /**\r\n * Place the content widget below a position\r\n */\r\n ContentWidgetPositionPreference[ContentWidgetPositionPreference[\"BELOW\"] = 2] = \"BELOW\";\r\n})(ContentWidgetPositionPreference || (ContentWidgetPositionPreference = {}));\r\n/**\r\n * Describes the reason the cursor has changed its position.\r\n */\r\nexport var CursorChangeReason;\r\n(function (CursorChangeReason) {\r\n /**\r\n * Unknown or not set.\r\n */\r\n CursorChangeReason[CursorChangeReason[\"NotSet\"] = 0] = \"NotSet\";\r\n /**\r\n * A `model.setValue()` was called.\r\n */\r\n CursorChangeReason[CursorChangeReason[\"ContentFlush\"] = 1] = \"ContentFlush\";\r\n /**\r\n * The `model` has been changed outside of this cursor and the cursor recovers its position from associated markers.\r\n */\r\n CursorChangeReason[CursorChangeReason[\"RecoverFromMarkers\"] = 2] = \"RecoverFromMarkers\";\r\n /**\r\n * There was an explicit user gesture.\r\n */\r\n CursorChangeReason[CursorChangeReason[\"Explicit\"] = 3] = \"Explicit\";\r\n /**\r\n * There was a Paste.\r\n */\r\n CursorChangeReason[CursorChangeReason[\"Paste\"] = 4] = \"Paste\";\r\n /**\r\n * There was an Undo.\r\n */\r\n CursorChangeReason[CursorChangeReason[\"Undo\"] = 5] = \"Undo\";\r\n /**\r\n * There was a Redo.\r\n */\r\n CursorChangeReason[CursorChangeReason[\"Redo\"] = 6] = \"Redo\";\r\n})(CursorChangeReason || (CursorChangeReason = {}));\r\n/**\r\n * The default end of line to use when instantiating models.\r\n */\r\nexport var DefaultEndOfLine;\r\n(function (DefaultEndOfLine) {\r\n /**\r\n * Use line feed (\\n) as the end of line character.\r\n */\r\n DefaultEndOfLine[DefaultEndOfLine[\"LF\"] = 1] = \"LF\";\r\n /**\r\n * Use carriage return and line feed (\\r\\n) as the end of line character.\r\n */\r\n DefaultEndOfLine[DefaultEndOfLine[\"CRLF\"] = 2] = \"CRLF\";\r\n})(DefaultEndOfLine || (DefaultEndOfLine = {}));\r\n/**\r\n * A document highlight kind.\r\n */\r\nexport var DocumentHighlightKind;\r\n(function (DocumentHighlightKind) {\r\n /**\r\n * A textual occurrence.\r\n */\r\n DocumentHighlightKind[DocumentHighlightKind[\"Text\"] = 0] = \"Text\";\r\n /**\r\n * Read-access of a symbol, like reading a variable.\r\n */\r\n DocumentHighlightKind[DocumentHighlightKind[\"Read\"] = 1] = \"Read\";\r\n /**\r\n * Write-access of a symbol, like writing to a variable.\r\n */\r\n DocumentHighlightKind[DocumentHighlightKind[\"Write\"] = 2] = \"Write\";\r\n})(DocumentHighlightKind || (DocumentHighlightKind = {}));\r\n/**\r\n * Configuration options for auto indentation in the editor\r\n */\r\nexport var EditorAutoIndentStrategy;\r\n(function (EditorAutoIndentStrategy) {\r\n EditorAutoIndentStrategy[EditorAutoIndentStrategy[\"None\"] = 0] = \"None\";\r\n EditorAutoIndentStrategy[EditorAutoIndentStrategy[\"Keep\"] = 1] = \"Keep\";\r\n EditorAutoIndentStrategy[EditorAutoIndentStrategy[\"Brackets\"] = 2] = \"Brackets\";\r\n EditorAutoIndentStrategy[EditorAutoIndentStrategy[\"Advanced\"] = 3] = \"Advanced\";\r\n EditorAutoIndentStrategy[EditorAutoIndentStrategy[\"Full\"] = 4] = \"Full\";\r\n})(EditorAutoIndentStrategy || (EditorAutoIndentStrategy = {}));\r\nexport var EditorOption;\r\n(function (EditorOption) {\r\n EditorOption[EditorOption[\"acceptSuggestionOnCommitCharacter\"] = 0] = \"acceptSuggestionOnCommitCharacter\";\r\n EditorOption[EditorOption[\"acceptSuggestionOnEnter\"] = 1] = \"acceptSuggestionOnEnter\";\r\n EditorOption[EditorOption[\"accessibilitySupport\"] = 2] = \"accessibilitySupport\";\r\n EditorOption[EditorOption[\"accessibilityPageSize\"] = 3] = \"accessibilityPageSize\";\r\n EditorOption[EditorOption[\"ariaLabel\"] = 4] = \"ariaLabel\";\r\n EditorOption[EditorOption[\"autoClosingBrackets\"] = 5] = \"autoClosingBrackets\";\r\n EditorOption[EditorOption[\"autoClosingDelete\"] = 6] = \"autoClosingDelete\";\r\n EditorOption[EditorOption[\"autoClosingOvertype\"] = 7] = \"autoClosingOvertype\";\r\n EditorOption[EditorOption[\"autoClosingQuotes\"] = 8] = \"autoClosingQuotes\";\r\n EditorOption[EditorOption[\"autoIndent\"] = 9] = \"autoIndent\";\r\n EditorOption[EditorOption[\"automaticLayout\"] = 10] = \"automaticLayout\";\r\n EditorOption[EditorOption[\"autoSurround\"] = 11] = \"autoSurround\";\r\n EditorOption[EditorOption[\"codeLens\"] = 12] = \"codeLens\";\r\n EditorOption[EditorOption[\"codeLensFontFamily\"] = 13] = \"codeLensFontFamily\";\r\n EditorOption[EditorOption[\"codeLensFontSize\"] = 14] = \"codeLensFontSize\";\r\n EditorOption[EditorOption[\"colorDecorators\"] = 15] = \"colorDecorators\";\r\n EditorOption[EditorOption[\"columnSelection\"] = 16] = \"columnSelection\";\r\n EditorOption[EditorOption[\"comments\"] = 17] = \"comments\";\r\n EditorOption[EditorOption[\"contextmenu\"] = 18] = \"contextmenu\";\r\n EditorOption[EditorOption[\"copyWithSyntaxHighlighting\"] = 19] = \"copyWithSyntaxHighlighting\";\r\n EditorOption[EditorOption[\"cursorBlinking\"] = 20] = \"cursorBlinking\";\r\n EditorOption[EditorOption[\"cursorSmoothCaretAnimation\"] = 21] = \"cursorSmoothCaretAnimation\";\r\n EditorOption[EditorOption[\"cursorStyle\"] = 22] = \"cursorStyle\";\r\n EditorOption[EditorOption[\"cursorSurroundingLines\"] = 23] = \"cursorSurroundingLines\";\r\n EditorOption[EditorOption[\"cursorSurroundingLinesStyle\"] = 24] = \"cursorSurroundingLinesStyle\";\r\n EditorOption[EditorOption[\"cursorWidth\"] = 25] = \"cursorWidth\";\r\n EditorOption[EditorOption[\"disableLayerHinting\"] = 26] = \"disableLayerHinting\";\r\n EditorOption[EditorOption[\"disableMonospaceOptimizations\"] = 27] = \"disableMonospaceOptimizations\";\r\n EditorOption[EditorOption[\"domReadOnly\"] = 28] = \"domReadOnly\";\r\n EditorOption[EditorOption[\"dragAndDrop\"] = 29] = \"dragAndDrop\";\r\n EditorOption[EditorOption[\"emptySelectionClipboard\"] = 30] = \"emptySelectionClipboard\";\r\n EditorOption[EditorOption[\"extraEditorClassName\"] = 31] = \"extraEditorClassName\";\r\n EditorOption[EditorOption[\"fastScrollSensitivity\"] = 32] = \"fastScrollSensitivity\";\r\n EditorOption[EditorOption[\"find\"] = 33] = \"find\";\r\n EditorOption[EditorOption[\"fixedOverflowWidgets\"] = 34] = \"fixedOverflowWidgets\";\r\n EditorOption[EditorOption[\"folding\"] = 35] = \"folding\";\r\n EditorOption[EditorOption[\"foldingStrategy\"] = 36] = \"foldingStrategy\";\r\n EditorOption[EditorOption[\"foldingHighlight\"] = 37] = \"foldingHighlight\";\r\n EditorOption[EditorOption[\"foldingImportsByDefault\"] = 38] = \"foldingImportsByDefault\";\r\n EditorOption[EditorOption[\"unfoldOnClickAfterEndOfLine\"] = 39] = \"unfoldOnClickAfterEndOfLine\";\r\n EditorOption[EditorOption[\"fontFamily\"] = 40] = \"fontFamily\";\r\n EditorOption[EditorOption[\"fontInfo\"] = 41] = \"fontInfo\";\r\n EditorOption[EditorOption[\"fontLigatures\"] = 42] = \"fontLigatures\";\r\n EditorOption[EditorOption[\"fontSize\"] = 43] = \"fontSize\";\r\n EditorOption[EditorOption[\"fontWeight\"] = 44] = \"fontWeight\";\r\n EditorOption[EditorOption[\"formatOnPaste\"] = 45] = \"formatOnPaste\";\r\n EditorOption[EditorOption[\"formatOnType\"] = 46] = \"formatOnType\";\r\n EditorOption[EditorOption[\"glyphMargin\"] = 47] = \"glyphMargin\";\r\n EditorOption[EditorOption[\"gotoLocation\"] = 48] = \"gotoLocation\";\r\n EditorOption[EditorOption[\"hideCursorInOverviewRuler\"] = 49] = \"hideCursorInOverviewRuler\";\r\n EditorOption[EditorOption[\"highlightActiveIndentGuide\"] = 50] = \"highlightActiveIndentGuide\";\r\n EditorOption[EditorOption[\"hover\"] = 51] = \"hover\";\r\n EditorOption[EditorOption[\"inDiffEditor\"] = 52] = \"inDiffEditor\";\r\n EditorOption[EditorOption[\"inlineSuggest\"] = 53] = \"inlineSuggest\";\r\n EditorOption[EditorOption[\"letterSpacing\"] = 54] = \"letterSpacing\";\r\n EditorOption[EditorOption[\"lightbulb\"] = 55] = \"lightbulb\";\r\n EditorOption[EditorOption[\"lineDecorationsWidth\"] = 56] = \"lineDecorationsWidth\";\r\n EditorOption[EditorOption[\"lineHeight\"] = 57] = \"lineHeight\";\r\n EditorOption[EditorOption[\"lineNumbers\"] = 58] = \"lineNumbers\";\r\n EditorOption[EditorOption[\"lineNumbersMinChars\"] = 59] = \"lineNumbersMinChars\";\r\n EditorOption[EditorOption[\"linkedEditing\"] = 60] = \"linkedEditing\";\r\n EditorOption[EditorOption[\"links\"] = 61] = \"links\";\r\n EditorOption[EditorOption[\"matchBrackets\"] = 62] = \"matchBrackets\";\r\n EditorOption[EditorOption[\"minimap\"] = 63] = \"minimap\";\r\n EditorOption[EditorOption[\"mouseStyle\"] = 64] = \"mouseStyle\";\r\n EditorOption[EditorOption[\"mouseWheelScrollSensitivity\"] = 65] = \"mouseWheelScrollSensitivity\";\r\n EditorOption[EditorOption[\"mouseWheelZoom\"] = 66] = \"mouseWheelZoom\";\r\n EditorOption[EditorOption[\"multiCursorMergeOverlapping\"] = 67] = \"multiCursorMergeOverlapping\";\r\n EditorOption[EditorOption[\"multiCursorModifier\"] = 68] = \"multiCursorModifier\";\r\n EditorOption[EditorOption[\"multiCursorPaste\"] = 69] = \"multiCursorPaste\";\r\n EditorOption[EditorOption[\"occurrencesHighlight\"] = 70] = \"occurrencesHighlight\";\r\n EditorOption[EditorOption[\"overviewRulerBorder\"] = 71] = \"overviewRulerBorder\";\r\n EditorOption[EditorOption[\"overviewRulerLanes\"] = 72] = \"overviewRulerLanes\";\r\n EditorOption[EditorOption[\"padding\"] = 73] = \"padding\";\r\n EditorOption[EditorOption[\"parameterHints\"] = 74] = \"parameterHints\";\r\n EditorOption[EditorOption[\"peekWidgetDefaultFocus\"] = 75] = \"peekWidgetDefaultFocus\";\r\n EditorOption[EditorOption[\"definitionLinkOpensInPeek\"] = 76] = \"definitionLinkOpensInPeek\";\r\n EditorOption[EditorOption[\"quickSuggestions\"] = 77] = \"quickSuggestions\";\r\n EditorOption[EditorOption[\"quickSuggestionsDelay\"] = 78] = \"quickSuggestionsDelay\";\r\n EditorOption[EditorOption[\"readOnly\"] = 79] = \"readOnly\";\r\n EditorOption[EditorOption[\"renameOnType\"] = 80] = \"renameOnType\";\r\n EditorOption[EditorOption[\"renderControlCharacters\"] = 81] = \"renderControlCharacters\";\r\n EditorOption[EditorOption[\"renderIndentGuides\"] = 82] = \"renderIndentGuides\";\r\n EditorOption[EditorOption[\"renderFinalNewline\"] = 83] = \"renderFinalNewline\";\r\n EditorOption[EditorOption[\"renderLineHighlight\"] = 84] = \"renderLineHighlight\";\r\n EditorOption[EditorOption[\"renderLineHighlightOnlyWhenFocus\"] = 85] = \"renderLineHighlightOnlyWhenFocus\";\r\n EditorOption[EditorOption[\"renderValidationDecorations\"] = 86] = \"renderValidationDecorations\";\r\n EditorOption[EditorOption[\"renderWhitespace\"] = 87] = \"renderWhitespace\";\r\n EditorOption[EditorOption[\"revealHorizontalRightPadding\"] = 88] = \"revealHorizontalRightPadding\";\r\n EditorOption[EditorOption[\"roundedSelection\"] = 89] = \"roundedSelection\";\r\n EditorOption[EditorOption[\"rulers\"] = 90] = \"rulers\";\r\n EditorOption[EditorOption[\"scrollbar\"] = 91] = \"scrollbar\";\r\n EditorOption[EditorOption[\"scrollBeyondLastColumn\"] = 92] = \"scrollBeyondLastColumn\";\r\n EditorOption[EditorOption[\"scrollBeyondLastLine\"] = 93] = \"scrollBeyondLastLine\";\r\n EditorOption[EditorOption[\"scrollPredominantAxis\"] = 94] = \"scrollPredominantAxis\";\r\n EditorOption[EditorOption[\"selectionClipboard\"] = 95] = \"selectionClipboard\";\r\n EditorOption[EditorOption[\"selectionHighlight\"] = 96] = \"selectionHighlight\";\r\n EditorOption[EditorOption[\"selectOnLineNumbers\"] = 97] = \"selectOnLineNumbers\";\r\n EditorOption[EditorOption[\"showFoldingControls\"] = 98] = \"showFoldingControls\";\r\n EditorOption[EditorOption[\"showUnused\"] = 99] = \"showUnused\";\r\n EditorOption[EditorOption[\"snippetSuggestions\"] = 100] = \"snippetSuggestions\";\r\n EditorOption[EditorOption[\"smartSelect\"] = 101] = \"smartSelect\";\r\n EditorOption[EditorOption[\"smoothScrolling\"] = 102] = \"smoothScrolling\";\r\n EditorOption[EditorOption[\"stickyTabStops\"] = 103] = \"stickyTabStops\";\r\n EditorOption[EditorOption[\"stopRenderingLineAfter\"] = 104] = \"stopRenderingLineAfter\";\r\n EditorOption[EditorOption[\"suggest\"] = 105] = \"suggest\";\r\n EditorOption[EditorOption[\"suggestFontSize\"] = 106] = \"suggestFontSize\";\r\n EditorOption[EditorOption[\"suggestLineHeight\"] = 107] = \"suggestLineHeight\";\r\n EditorOption[EditorOption[\"suggestOnTriggerCharacters\"] = 108] = \"suggestOnTriggerCharacters\";\r\n EditorOption[EditorOption[\"suggestSelection\"] = 109] = \"suggestSelection\";\r\n EditorOption[EditorOption[\"tabCompletion\"] = 110] = \"tabCompletion\";\r\n EditorOption[EditorOption[\"tabIndex\"] = 111] = \"tabIndex\";\r\n EditorOption[EditorOption[\"unusualLineTerminators\"] = 112] = \"unusualLineTerminators\";\r\n EditorOption[EditorOption[\"useShadowDOM\"] = 113] = \"useShadowDOM\";\r\n EditorOption[EditorOption[\"useTabStops\"] = 114] = \"useTabStops\";\r\n EditorOption[EditorOption[\"wordSeparators\"] = 115] = \"wordSeparators\";\r\n EditorOption[EditorOption[\"wordWrap\"] = 116] = \"wordWrap\";\r\n EditorOption[EditorOption[\"wordWrapBreakAfterCharacters\"] = 117] = \"wordWrapBreakAfterCharacters\";\r\n EditorOption[EditorOption[\"wordWrapBreakBeforeCharacters\"] = 118] = \"wordWrapBreakBeforeCharacters\";\r\n EditorOption[EditorOption[\"wordWrapColumn\"] = 119] = \"wordWrapColumn\";\r\n EditorOption[EditorOption[\"wordWrapOverride1\"] = 120] = \"wordWrapOverride1\";\r\n EditorOption[EditorOption[\"wordWrapOverride2\"] = 121] = \"wordWrapOverride2\";\r\n EditorOption[EditorOption[\"wrappingIndent\"] = 122] = \"wrappingIndent\";\r\n EditorOption[EditorOption[\"wrappingStrategy\"] = 123] = \"wrappingStrategy\";\r\n EditorOption[EditorOption[\"showDeprecated\"] = 124] = \"showDeprecated\";\r\n EditorOption[EditorOption[\"inlayHints\"] = 125] = \"inlayHints\";\r\n EditorOption[EditorOption[\"editorClassName\"] = 126] = \"editorClassName\";\r\n EditorOption[EditorOption[\"pixelRatio\"] = 127] = \"pixelRatio\";\r\n EditorOption[EditorOption[\"tabFocusMode\"] = 128] = \"tabFocusMode\";\r\n EditorOption[EditorOption[\"layoutInfo\"] = 129] = \"layoutInfo\";\r\n EditorOption[EditorOption[\"wrappingInfo\"] = 130] = \"wrappingInfo\";\r\n})(EditorOption || (EditorOption = {}));\r\n/**\r\n * End of line character preference.\r\n */\r\nexport var EndOfLinePreference;\r\n(function (EndOfLinePreference) {\r\n /**\r\n * Use the end of line character identified in the text buffer.\r\n */\r\n EndOfLinePreference[EndOfLinePreference[\"TextDefined\"] = 0] = \"TextDefined\";\r\n /**\r\n * Use line feed (\\n) as the end of line character.\r\n */\r\n EndOfLinePreference[EndOfLinePreference[\"LF\"] = 1] = \"LF\";\r\n /**\r\n * Use carriage return and line feed (\\r\\n) as the end of line character.\r\n */\r\n EndOfLinePreference[EndOfLinePreference[\"CRLF\"] = 2] = \"CRLF\";\r\n})(EndOfLinePreference || (EndOfLinePreference = {}));\r\n/**\r\n * End of line character preference.\r\n */\r\nexport var EndOfLineSequence;\r\n(function (EndOfLineSequence) {\r\n /**\r\n * Use line feed (\\n) as the end of line character.\r\n */\r\n EndOfLineSequence[EndOfLineSequence[\"LF\"] = 0] = \"LF\";\r\n /**\r\n * Use carriage return and line feed (\\r\\n) as the end of line character.\r\n */\r\n EndOfLineSequence[EndOfLineSequence[\"CRLF\"] = 1] = \"CRLF\";\r\n})(EndOfLineSequence || (EndOfLineSequence = {}));\r\n/**\r\n * Describes what to do with the indentation when pressing Enter.\r\n */\r\nexport var IndentAction;\r\n(function (IndentAction) {\r\n /**\r\n * Insert new line and copy the previous line's indentation.\r\n */\r\n IndentAction[IndentAction[\"None\"] = 0] = \"None\";\r\n /**\r\n * Insert new line and indent once (relative to the previous line's indentation).\r\n */\r\n IndentAction[IndentAction[\"Indent\"] = 1] = \"Indent\";\r\n /**\r\n * Insert two new lines:\r\n * - the first one indented which will hold the cursor\r\n * - the second one at the same indentation level\r\n */\r\n IndentAction[IndentAction[\"IndentOutdent\"] = 2] = \"IndentOutdent\";\r\n /**\r\n * Insert new line and outdent once (relative to the previous line's indentation).\r\n */\r\n IndentAction[IndentAction[\"Outdent\"] = 3] = \"Outdent\";\r\n})(IndentAction || (IndentAction = {}));\r\nexport var InlayHintKind;\r\n(function (InlayHintKind) {\r\n InlayHintKind[InlayHintKind[\"Other\"] = 0] = \"Other\";\r\n InlayHintKind[InlayHintKind[\"Type\"] = 1] = \"Type\";\r\n InlayHintKind[InlayHintKind[\"Parameter\"] = 2] = \"Parameter\";\r\n})(InlayHintKind || (InlayHintKind = {}));\r\n/**\r\n * How an {@link InlineCompletionsProvider inline completion provider} was triggered.\r\n */\r\nexport var InlineCompletionTriggerKind;\r\n(function (InlineCompletionTriggerKind) {\r\n /**\r\n * Completion was triggered automatically while editing.\r\n * It is sufficient to return a single completion item in this case.\r\n */\r\n InlineCompletionTriggerKind[InlineCompletionTriggerKind[\"Automatic\"] = 0] = \"Automatic\";\r\n /**\r\n * Completion was triggered explicitly by a user gesture.\r\n * Return multiple completion items to enable cycling through them.\r\n */\r\n InlineCompletionTriggerKind[InlineCompletionTriggerKind[\"Explicit\"] = 1] = \"Explicit\";\r\n})(InlineCompletionTriggerKind || (InlineCompletionTriggerKind = {}));\r\n/**\r\n * Virtual Key Codes, the value does not hold any inherent meaning.\r\n * Inspired somewhat from https://msdn.microsoft.com/en-us/library/windows/desktop/dd375731(v=vs.85).aspx\r\n * But these are \"more general\", as they should work across browsers & OS`s.\r\n */\r\nexport var KeyCode;\r\n(function (KeyCode) {\r\n KeyCode[KeyCode[\"DependsOnKbLayout\"] = -1] = \"DependsOnKbLayout\";\r\n /**\r\n * Placed first to cover the 0 value of the enum.\r\n */\r\n KeyCode[KeyCode[\"Unknown\"] = 0] = \"Unknown\";\r\n KeyCode[KeyCode[\"Backspace\"] = 1] = \"Backspace\";\r\n KeyCode[KeyCode[\"Tab\"] = 2] = \"Tab\";\r\n KeyCode[KeyCode[\"Enter\"] = 3] = \"Enter\";\r\n KeyCode[KeyCode[\"Shift\"] = 4] = \"Shift\";\r\n KeyCode[KeyCode[\"Ctrl\"] = 5] = \"Ctrl\";\r\n KeyCode[KeyCode[\"Alt\"] = 6] = \"Alt\";\r\n KeyCode[KeyCode[\"PauseBreak\"] = 7] = \"PauseBreak\";\r\n KeyCode[KeyCode[\"CapsLock\"] = 8] = \"CapsLock\";\r\n KeyCode[KeyCode[\"Escape\"] = 9] = \"Escape\";\r\n KeyCode[KeyCode[\"Space\"] = 10] = \"Space\";\r\n KeyCode[KeyCode[\"PageUp\"] = 11] = \"PageUp\";\r\n KeyCode[KeyCode[\"PageDown\"] = 12] = \"PageDown\";\r\n KeyCode[KeyCode[\"End\"] = 13] = \"End\";\r\n KeyCode[KeyCode[\"Home\"] = 14] = \"Home\";\r\n KeyCode[KeyCode[\"LeftArrow\"] = 15] = \"LeftArrow\";\r\n KeyCode[KeyCode[\"UpArrow\"] = 16] = \"UpArrow\";\r\n KeyCode[KeyCode[\"RightArrow\"] = 17] = \"RightArrow\";\r\n KeyCode[KeyCode[\"DownArrow\"] = 18] = \"DownArrow\";\r\n KeyCode[KeyCode[\"Insert\"] = 19] = \"Insert\";\r\n KeyCode[KeyCode[\"Delete\"] = 20] = \"Delete\";\r\n KeyCode[KeyCode[\"KEY_0\"] = 21] = \"KEY_0\";\r\n KeyCode[KeyCode[\"KEY_1\"] = 22] = \"KEY_1\";\r\n KeyCode[KeyCode[\"KEY_2\"] = 23] = \"KEY_2\";\r\n KeyCode[KeyCode[\"KEY_3\"] = 24] = \"KEY_3\";\r\n KeyCode[KeyCode[\"KEY_4\"] = 25] = \"KEY_4\";\r\n KeyCode[KeyCode[\"KEY_5\"] = 26] = \"KEY_5\";\r\n KeyCode[KeyCode[\"KEY_6\"] = 27] = \"KEY_6\";\r\n KeyCode[KeyCode[\"KEY_7\"] = 28] = \"KEY_7\";\r\n KeyCode[KeyCode[\"KEY_8\"] = 29] = \"KEY_8\";\r\n KeyCode[KeyCode[\"KEY_9\"] = 30] = \"KEY_9\";\r\n KeyCode[KeyCode[\"KEY_A\"] = 31] = \"KEY_A\";\r\n KeyCode[KeyCode[\"KEY_B\"] = 32] = \"KEY_B\";\r\n KeyCode[KeyCode[\"KEY_C\"] = 33] = \"KEY_C\";\r\n KeyCode[KeyCode[\"KEY_D\"] = 34] = \"KEY_D\";\r\n KeyCode[KeyCode[\"KEY_E\"] = 35] = \"KEY_E\";\r\n KeyCode[KeyCode[\"KEY_F\"] = 36] = \"KEY_F\";\r\n KeyCode[KeyCode[\"KEY_G\"] = 37] = \"KEY_G\";\r\n KeyCode[KeyCode[\"KEY_H\"] = 38] = \"KEY_H\";\r\n KeyCode[KeyCode[\"KEY_I\"] = 39] = \"KEY_I\";\r\n KeyCode[KeyCode[\"KEY_J\"] = 40] = \"KEY_J\";\r\n KeyCode[KeyCode[\"KEY_K\"] = 41] = \"KEY_K\";\r\n KeyCode[KeyCode[\"KEY_L\"] = 42] = \"KEY_L\";\r\n KeyCode[KeyCode[\"KEY_M\"] = 43] = \"KEY_M\";\r\n KeyCode[KeyCode[\"KEY_N\"] = 44] = \"KEY_N\";\r\n KeyCode[KeyCode[\"KEY_O\"] = 45] = \"KEY_O\";\r\n KeyCode[KeyCode[\"KEY_P\"] = 46] = \"KEY_P\";\r\n KeyCode[KeyCode[\"KEY_Q\"] = 47] = \"KEY_Q\";\r\n KeyCode[KeyCode[\"KEY_R\"] = 48] = \"KEY_R\";\r\n KeyCode[KeyCode[\"KEY_S\"] = 49] = \"KEY_S\";\r\n KeyCode[KeyCode[\"KEY_T\"] = 50] = \"KEY_T\";\r\n KeyCode[KeyCode[\"KEY_U\"] = 51] = \"KEY_U\";\r\n KeyCode[KeyCode[\"KEY_V\"] = 52] = \"KEY_V\";\r\n KeyCode[KeyCode[\"KEY_W\"] = 53] = \"KEY_W\";\r\n KeyCode[KeyCode[\"KEY_X\"] = 54] = \"KEY_X\";\r\n KeyCode[KeyCode[\"KEY_Y\"] = 55] = \"KEY_Y\";\r\n KeyCode[KeyCode[\"KEY_Z\"] = 56] = \"KEY_Z\";\r\n KeyCode[KeyCode[\"Meta\"] = 57] = \"Meta\";\r\n KeyCode[KeyCode[\"ContextMenu\"] = 58] = \"ContextMenu\";\r\n KeyCode[KeyCode[\"F1\"] = 59] = \"F1\";\r\n KeyCode[KeyCode[\"F2\"] = 60] = \"F2\";\r\n KeyCode[KeyCode[\"F3\"] = 61] = \"F3\";\r\n KeyCode[KeyCode[\"F4\"] = 62] = \"F4\";\r\n KeyCode[KeyCode[\"F5\"] = 63] = \"F5\";\r\n KeyCode[KeyCode[\"F6\"] = 64] = \"F6\";\r\n KeyCode[KeyCode[\"F7\"] = 65] = \"F7\";\r\n KeyCode[KeyCode[\"F8\"] = 66] = \"F8\";\r\n KeyCode[KeyCode[\"F9\"] = 67] = \"F9\";\r\n KeyCode[KeyCode[\"F10\"] = 68] = \"F10\";\r\n KeyCode[KeyCode[\"F11\"] = 69] = \"F11\";\r\n KeyCode[KeyCode[\"F12\"] = 70] = \"F12\";\r\n KeyCode[KeyCode[\"F13\"] = 71] = \"F13\";\r\n KeyCode[KeyCode[\"F14\"] = 72] = \"F14\";\r\n KeyCode[KeyCode[\"F15\"] = 73] = \"F15\";\r\n KeyCode[KeyCode[\"F16\"] = 74] = \"F16\";\r\n KeyCode[KeyCode[\"F17\"] = 75] = \"F17\";\r\n KeyCode[KeyCode[\"F18\"] = 76] = \"F18\";\r\n KeyCode[KeyCode[\"F19\"] = 77] = \"F19\";\r\n KeyCode[KeyCode[\"NumLock\"] = 78] = \"NumLock\";\r\n KeyCode[KeyCode[\"ScrollLock\"] = 79] = \"ScrollLock\";\r\n /**\r\n * Used for miscellaneous characters; it can vary by keyboard.\r\n * For the US standard keyboard, the ';:' key\r\n */\r\n KeyCode[KeyCode[\"US_SEMICOLON\"] = 80] = \"US_SEMICOLON\";\r\n /**\r\n * For any country/region, the '+' key\r\n * For the US standard keyboard, the '=+' key\r\n */\r\n KeyCode[KeyCode[\"US_EQUAL\"] = 81] = \"US_EQUAL\";\r\n /**\r\n * For any country/region, the ',' key\r\n * For the US standard keyboard, the ',<' key\r\n */\r\n KeyCode[KeyCode[\"US_COMMA\"] = 82] = \"US_COMMA\";\r\n /**\r\n * For any country/region, the '-' key\r\n * For the US standard keyboard, the '-_' key\r\n */\r\n KeyCode[KeyCode[\"US_MINUS\"] = 83] = \"US_MINUS\";\r\n /**\r\n * For any country/region, the '.' key\r\n * For the US standard keyboard, the '.>' key\r\n */\r\n KeyCode[KeyCode[\"US_DOT\"] = 84] = \"US_DOT\";\r\n /**\r\n * Used for miscellaneous characters; it can vary by keyboard.\r\n * For the US standard keyboard, the '/?' key\r\n */\r\n KeyCode[KeyCode[\"US_SLASH\"] = 85] = \"US_SLASH\";\r\n /**\r\n * Used for miscellaneous characters; it can vary by keyboard.\r\n * For the US standard keyboard, the '`~' key\r\n */\r\n KeyCode[KeyCode[\"US_BACKTICK\"] = 86] = \"US_BACKTICK\";\r\n /**\r\n * Used for miscellaneous characters; it can vary by keyboard.\r\n * For the US standard keyboard, the '[{' key\r\n */\r\n KeyCode[KeyCode[\"US_OPEN_SQUARE_BRACKET\"] = 87] = \"US_OPEN_SQUARE_BRACKET\";\r\n /**\r\n * Used for miscellaneous characters; it can vary by keyboard.\r\n * For the US standard keyboard, the '\\|' key\r\n */\r\n KeyCode[KeyCode[\"US_BACKSLASH\"] = 88] = \"US_BACKSLASH\";\r\n /**\r\n * Used for miscellaneous characters; it can vary by keyboard.\r\n * For the US standard keyboard, the ']}' key\r\n */\r\n KeyCode[KeyCode[\"US_CLOSE_SQUARE_BRACKET\"] = 89] = \"US_CLOSE_SQUARE_BRACKET\";\r\n /**\r\n * Used for miscellaneous characters; it can vary by keyboard.\r\n * For the US standard keyboard, the ''\"' key\r\n */\r\n KeyCode[KeyCode[\"US_QUOTE\"] = 90] = \"US_QUOTE\";\r\n /**\r\n * Used for miscellaneous characters; it can vary by keyboard.\r\n */\r\n KeyCode[KeyCode[\"OEM_8\"] = 91] = \"OEM_8\";\r\n /**\r\n * Either the angle bracket key or the backslash key on the RT 102-key keyboard.\r\n */\r\n KeyCode[KeyCode[\"OEM_102\"] = 92] = \"OEM_102\";\r\n KeyCode[KeyCode[\"NUMPAD_0\"] = 93] = \"NUMPAD_0\";\r\n KeyCode[KeyCode[\"NUMPAD_1\"] = 94] = \"NUMPAD_1\";\r\n KeyCode[KeyCode[\"NUMPAD_2\"] = 95] = \"NUMPAD_2\";\r\n KeyCode[KeyCode[\"NUMPAD_3\"] = 96] = \"NUMPAD_3\";\r\n KeyCode[KeyCode[\"NUMPAD_4\"] = 97] = \"NUMPAD_4\";\r\n KeyCode[KeyCode[\"NUMPAD_5\"] = 98] = \"NUMPAD_5\";\r\n KeyCode[KeyCode[\"NUMPAD_6\"] = 99] = \"NUMPAD_6\";\r\n KeyCode[KeyCode[\"NUMPAD_7\"] = 100] = \"NUMPAD_7\";\r\n KeyCode[KeyCode[\"NUMPAD_8\"] = 101] = \"NUMPAD_8\";\r\n KeyCode[KeyCode[\"NUMPAD_9\"] = 102] = \"NUMPAD_9\";\r\n KeyCode[KeyCode[\"NUMPAD_MULTIPLY\"] = 103] = \"NUMPAD_MULTIPLY\";\r\n KeyCode[KeyCode[\"NUMPAD_ADD\"] = 104] = \"NUMPAD_ADD\";\r\n KeyCode[KeyCode[\"NUMPAD_SEPARATOR\"] = 105] = \"NUMPAD_SEPARATOR\";\r\n KeyCode[KeyCode[\"NUMPAD_SUBTRACT\"] = 106] = \"NUMPAD_SUBTRACT\";\r\n KeyCode[KeyCode[\"NUMPAD_DECIMAL\"] = 107] = \"NUMPAD_DECIMAL\";\r\n KeyCode[KeyCode[\"NUMPAD_DIVIDE\"] = 108] = \"NUMPAD_DIVIDE\";\r\n /**\r\n * Cover all key codes when IME is processing input.\r\n */\r\n KeyCode[KeyCode[\"KEY_IN_COMPOSITION\"] = 109] = \"KEY_IN_COMPOSITION\";\r\n KeyCode[KeyCode[\"ABNT_C1\"] = 110] = \"ABNT_C1\";\r\n KeyCode[KeyCode[\"ABNT_C2\"] = 111] = \"ABNT_C2\";\r\n /**\r\n * Placed last to cover the length of the enum.\r\n * Please do not depend on this value!\r\n */\r\n KeyCode[KeyCode[\"MAX_VALUE\"] = 112] = \"MAX_VALUE\";\r\n})(KeyCode || (KeyCode = {}));\r\nexport var MarkerSeverity;\r\n(function (MarkerSeverity) {\r\n MarkerSeverity[MarkerSeverity[\"Hint\"] = 1] = \"Hint\";\r\n MarkerSeverity[MarkerSeverity[\"Info\"] = 2] = \"Info\";\r\n MarkerSeverity[MarkerSeverity[\"Warning\"] = 4] = \"Warning\";\r\n MarkerSeverity[MarkerSeverity[\"Error\"] = 8] = \"Error\";\r\n})(MarkerSeverity || (MarkerSeverity = {}));\r\nexport var MarkerTag;\r\n(function (MarkerTag) {\r\n MarkerTag[MarkerTag[\"Unnecessary\"] = 1] = \"Unnecessary\";\r\n MarkerTag[MarkerTag[\"Deprecated\"] = 2] = \"Deprecated\";\r\n})(MarkerTag || (MarkerTag = {}));\r\n/**\r\n * Position in the minimap to render the decoration.\r\n */\r\nexport var MinimapPosition;\r\n(function (MinimapPosition) {\r\n MinimapPosition[MinimapPosition[\"Inline\"] = 1] = \"Inline\";\r\n MinimapPosition[MinimapPosition[\"Gutter\"] = 2] = \"Gutter\";\r\n})(MinimapPosition || (MinimapPosition = {}));\r\n/**\r\n * Type of hit element with the mouse in the editor.\r\n */\r\nexport var MouseTargetType;\r\n(function (MouseTargetType) {\r\n /**\r\n * Mouse is on top of an unknown element.\r\n */\r\n MouseTargetType[MouseTargetType[\"UNKNOWN\"] = 0] = \"UNKNOWN\";\r\n /**\r\n * Mouse is on top of the textarea used for input.\r\n */\r\n MouseTargetType[MouseTargetType[\"TEXTAREA\"] = 1] = \"TEXTAREA\";\r\n /**\r\n * Mouse is on top of the glyph margin\r\n */\r\n MouseTargetType[MouseTargetType[\"GUTTER_GLYPH_MARGIN\"] = 2] = \"GUTTER_GLYPH_MARGIN\";\r\n /**\r\n * Mouse is on top of the line numbers\r\n */\r\n MouseTargetType[MouseTargetType[\"GUTTER_LINE_NUMBERS\"] = 3] = \"GUTTER_LINE_NUMBERS\";\r\n /**\r\n * Mouse is on top of the line decorations\r\n */\r\n MouseTargetType[MouseTargetType[\"GUTTER_LINE_DECORATIONS\"] = 4] = \"GUTTER_LINE_DECORATIONS\";\r\n /**\r\n * Mouse is on top of the whitespace left in the gutter by a view zone.\r\n */\r\n MouseTargetType[MouseTargetType[\"GUTTER_VIEW_ZONE\"] = 5] = \"GUTTER_VIEW_ZONE\";\r\n /**\r\n * Mouse is on top of text in the content.\r\n */\r\n MouseTargetType[MouseTargetType[\"CONTENT_TEXT\"] = 6] = \"CONTENT_TEXT\";\r\n /**\r\n * Mouse is on top of empty space in the content (e.g. after line text or below last line)\r\n */\r\n MouseTargetType[MouseTargetType[\"CONTENT_EMPTY\"] = 7] = \"CONTENT_EMPTY\";\r\n /**\r\n * Mouse is on top of a view zone in the content.\r\n */\r\n MouseTargetType[MouseTargetType[\"CONTENT_VIEW_ZONE\"] = 8] = \"CONTENT_VIEW_ZONE\";\r\n /**\r\n * Mouse is on top of a content widget.\r\n */\r\n MouseTargetType[MouseTargetType[\"CONTENT_WIDGET\"] = 9] = \"CONTENT_WIDGET\";\r\n /**\r\n * Mouse is on top of the decorations overview ruler.\r\n */\r\n MouseTargetType[MouseTargetType[\"OVERVIEW_RULER\"] = 10] = \"OVERVIEW_RULER\";\r\n /**\r\n * Mouse is on top of a scrollbar.\r\n */\r\n MouseTargetType[MouseTargetType[\"SCROLLBAR\"] = 11] = \"SCROLLBAR\";\r\n /**\r\n * Mouse is on top of an overlay widget.\r\n */\r\n MouseTargetType[MouseTargetType[\"OVERLAY_WIDGET\"] = 12] = \"OVERLAY_WIDGET\";\r\n /**\r\n * Mouse is outside of the editor.\r\n */\r\n MouseTargetType[MouseTargetType[\"OUTSIDE_EDITOR\"] = 13] = \"OUTSIDE_EDITOR\";\r\n})(MouseTargetType || (MouseTargetType = {}));\r\n/**\r\n * A positioning preference for rendering overlay widgets.\r\n */\r\nexport var OverlayWidgetPositionPreference;\r\n(function (OverlayWidgetPositionPreference) {\r\n /**\r\n * Position the overlay widget in the top right corner\r\n */\r\n OverlayWidgetPositionPreference[OverlayWidgetPositionPreference[\"TOP_RIGHT_CORNER\"] = 0] = \"TOP_RIGHT_CORNER\";\r\n /**\r\n * Position the overlay widget in the bottom right corner\r\n */\r\n OverlayWidgetPositionPreference[OverlayWidgetPositionPreference[\"BOTTOM_RIGHT_CORNER\"] = 1] = \"BOTTOM_RIGHT_CORNER\";\r\n /**\r\n * Position the overlay widget in the top center\r\n */\r\n OverlayWidgetPositionPreference[OverlayWidgetPositionPreference[\"TOP_CENTER\"] = 2] = \"TOP_CENTER\";\r\n})(OverlayWidgetPositionPreference || (OverlayWidgetPositionPreference = {}));\r\n/**\r\n * Vertical Lane in the overview ruler of the editor.\r\n */\r\nexport var OverviewRulerLane;\r\n(function (OverviewRulerLane) {\r\n OverviewRulerLane[OverviewRulerLane[\"Left\"] = 1] = \"Left\";\r\n OverviewRulerLane[OverviewRulerLane[\"Center\"] = 2] = \"Center\";\r\n OverviewRulerLane[OverviewRulerLane[\"Right\"] = 4] = \"Right\";\r\n OverviewRulerLane[OverviewRulerLane[\"Full\"] = 7] = \"Full\";\r\n})(OverviewRulerLane || (OverviewRulerLane = {}));\r\nexport var RenderLineNumbersType;\r\n(function (RenderLineNumbersType) {\r\n RenderLineNumbersType[RenderLineNumbersType[\"Off\"] = 0] = \"Off\";\r\n RenderLineNumbersType[RenderLineNumbersType[\"On\"] = 1] = \"On\";\r\n RenderLineNumbersType[RenderLineNumbersType[\"Relative\"] = 2] = \"Relative\";\r\n RenderLineNumbersType[RenderLineNumbersType[\"Interval\"] = 3] = \"Interval\";\r\n RenderLineNumbersType[RenderLineNumbersType[\"Custom\"] = 4] = \"Custom\";\r\n})(RenderLineNumbersType || (RenderLineNumbersType = {}));\r\nexport var RenderMinimap;\r\n(function (RenderMinimap) {\r\n RenderMinimap[RenderMinimap[\"None\"] = 0] = \"None\";\r\n RenderMinimap[RenderMinimap[\"Text\"] = 1] = \"Text\";\r\n RenderMinimap[RenderMinimap[\"Blocks\"] = 2] = \"Blocks\";\r\n})(RenderMinimap || (RenderMinimap = {}));\r\nexport var ScrollType;\r\n(function (ScrollType) {\r\n ScrollType[ScrollType[\"Smooth\"] = 0] = \"Smooth\";\r\n ScrollType[ScrollType[\"Immediate\"] = 1] = \"Immediate\";\r\n})(ScrollType || (ScrollType = {}));\r\nexport var ScrollbarVisibility;\r\n(function (ScrollbarVisibility) {\r\n ScrollbarVisibility[ScrollbarVisibility[\"Auto\"] = 1] = \"Auto\";\r\n ScrollbarVisibility[ScrollbarVisibility[\"Hidden\"] = 2] = \"Hidden\";\r\n ScrollbarVisibility[ScrollbarVisibility[\"Visible\"] = 3] = \"Visible\";\r\n})(ScrollbarVisibility || (ScrollbarVisibility = {}));\r\n/**\r\n * The direction of a selection.\r\n */\r\nexport var SelectionDirection;\r\n(function (SelectionDirection) {\r\n /**\r\n * The selection starts above where it ends.\r\n */\r\n SelectionDirection[SelectionDirection[\"LTR\"] = 0] = \"LTR\";\r\n /**\r\n * The selection starts below where it ends.\r\n */\r\n SelectionDirection[SelectionDirection[\"RTL\"] = 1] = \"RTL\";\r\n})(SelectionDirection || (SelectionDirection = {}));\r\nexport var SignatureHelpTriggerKind;\r\n(function (SignatureHelpTriggerKind) {\r\n SignatureHelpTriggerKind[SignatureHelpTriggerKind[\"Invoke\"] = 1] = \"Invoke\";\r\n SignatureHelpTriggerKind[SignatureHelpTriggerKind[\"TriggerCharacter\"] = 2] = \"TriggerCharacter\";\r\n SignatureHelpTriggerKind[SignatureHelpTriggerKind[\"ContentChange\"] = 3] = \"ContentChange\";\r\n})(SignatureHelpTriggerKind || (SignatureHelpTriggerKind = {}));\r\n/**\r\n * A symbol kind.\r\n */\r\nexport var SymbolKind;\r\n(function (SymbolKind) {\r\n SymbolKind[SymbolKind[\"File\"] = 0] = \"File\";\r\n SymbolKind[SymbolKind[\"Module\"] = 1] = \"Module\";\r\n SymbolKind[SymbolKind[\"Namespace\"] = 2] = \"Namespace\";\r\n SymbolKind[SymbolKind[\"Package\"] = 3] = \"Package\";\r\n SymbolKind[SymbolKind[\"Class\"] = 4] = \"Class\";\r\n SymbolKind[SymbolKind[\"Method\"] = 5] = \"Method\";\r\n SymbolKind[SymbolKind[\"Property\"] = 6] = \"Property\";\r\n SymbolKind[SymbolKind[\"Field\"] = 7] = \"Field\";\r\n SymbolKind[SymbolKind[\"Constructor\"] = 8] = \"Constructor\";\r\n SymbolKind[SymbolKind[\"Enum\"] = 9] = \"Enum\";\r\n SymbolKind[SymbolKind[\"Interface\"] = 10] = \"Interface\";\r\n SymbolKind[SymbolKind[\"Function\"] = 11] = \"Function\";\r\n SymbolKind[SymbolKind[\"Variable\"] = 12] = \"Variable\";\r\n SymbolKind[SymbolKind[\"Constant\"] = 13] = \"Constant\";\r\n SymbolKind[SymbolKind[\"String\"] = 14] = \"String\";\r\n SymbolKind[SymbolKind[\"Number\"] = 15] = \"Number\";\r\n SymbolKind[SymbolKind[\"Boolean\"] = 16] = \"Boolean\";\r\n SymbolKind[SymbolKind[\"Array\"] = 17] = \"Array\";\r\n SymbolKind[SymbolKind[\"Object\"] = 18] = \"Object\";\r\n SymbolKind[SymbolKind[\"Key\"] = 19] = \"Key\";\r\n SymbolKind[SymbolKind[\"Null\"] = 20] = \"Null\";\r\n SymbolKind[SymbolKind[\"EnumMember\"] = 21] = \"EnumMember\";\r\n SymbolKind[SymbolKind[\"Struct\"] = 22] = \"Struct\";\r\n SymbolKind[SymbolKind[\"Event\"] = 23] = \"Event\";\r\n SymbolKind[SymbolKind[\"Operator\"] = 24] = \"Operator\";\r\n SymbolKind[SymbolKind[\"TypeParameter\"] = 25] = \"TypeParameter\";\r\n})(SymbolKind || (SymbolKind = {}));\r\nexport var SymbolTag;\r\n(function (SymbolTag) {\r\n SymbolTag[SymbolTag[\"Deprecated\"] = 1] = \"Deprecated\";\r\n})(SymbolTag || (SymbolTag = {}));\r\n/**\r\n * The kind of animation in which the editor's cursor should be rendered.\r\n */\r\nexport var TextEditorCursorBlinkingStyle;\r\n(function (TextEditorCursorBlinkingStyle) {\r\n /**\r\n * Hidden\r\n */\r\n TextEditorCursorBlinkingStyle[TextEditorCursorBlinkingStyle[\"Hidden\"] = 0] = \"Hidden\";\r\n /**\r\n * Blinking\r\n */\r\n TextEditorCursorBlinkingStyle[TextEditorCursorBlinkingStyle[\"Blink\"] = 1] = \"Blink\";\r\n /**\r\n * Blinking with smooth fading\r\n */\r\n TextEditorCursorBlinkingStyle[TextEditorCursorBlinkingStyle[\"Smooth\"] = 2] = \"Smooth\";\r\n /**\r\n * Blinking with prolonged filled state and smooth fading\r\n */\r\n TextEditorCursorBlinkingStyle[TextEditorCursorBlinkingStyle[\"Phase\"] = 3] = \"Phase\";\r\n /**\r\n * Expand collapse animation on the y axis\r\n */\r\n TextEditorCursorBlinkingStyle[TextEditorCursorBlinkingStyle[\"Expand\"] = 4] = \"Expand\";\r\n /**\r\n * No-Blinking\r\n */\r\n TextEditorCursorBlinkingStyle[TextEditorCursorBlinkingStyle[\"Solid\"] = 5] = \"Solid\";\r\n})(TextEditorCursorBlinkingStyle || (TextEditorCursorBlinkingStyle = {}));\r\n/**\r\n * The style in which the editor's cursor should be rendered.\r\n */\r\nexport var TextEditorCursorStyle;\r\n(function (TextEditorCursorStyle) {\r\n /**\r\n * As a vertical line (sitting between two characters).\r\n */\r\n TextEditorCursorStyle[TextEditorCursorStyle[\"Line\"] = 1] = \"Line\";\r\n /**\r\n * As a block (sitting on top of a character).\r\n */\r\n TextEditorCursorStyle[TextEditorCursorStyle[\"Block\"] = 2] = \"Block\";\r\n /**\r\n * As a horizontal line (sitting under a character).\r\n */\r\n TextEditorCursorStyle[TextEditorCursorStyle[\"Underline\"] = 3] = \"Underline\";\r\n /**\r\n * As a thin vertical line (sitting between two characters).\r\n */\r\n TextEditorCursorStyle[TextEditorCursorStyle[\"LineThin\"] = 4] = \"LineThin\";\r\n /**\r\n * As an outlined block (sitting on top of a character).\r\n */\r\n TextEditorCursorStyle[TextEditorCursorStyle[\"BlockOutline\"] = 5] = \"BlockOutline\";\r\n /**\r\n * As a thin horizontal line (sitting under a character).\r\n */\r\n TextEditorCursorStyle[TextEditorCursorStyle[\"UnderlineThin\"] = 6] = \"UnderlineThin\";\r\n})(TextEditorCursorStyle || (TextEditorCursorStyle = {}));\r\n/**\r\n * Describes the behavior of decorations when typing/editing near their edges.\r\n * Note: Please do not edit the values, as they very carefully match `DecorationRangeBehavior`\r\n */\r\nexport var TrackedRangeStickiness;\r\n(function (TrackedRangeStickiness) {\r\n TrackedRangeStickiness[TrackedRangeStickiness[\"AlwaysGrowsWhenTypingAtEdges\"] = 0] = \"AlwaysGrowsWhenTypingAtEdges\";\r\n TrackedRangeStickiness[TrackedRangeStickiness[\"NeverGrowsWhenTypingAtEdges\"] = 1] = \"NeverGrowsWhenTypingAtEdges\";\r\n TrackedRangeStickiness[TrackedRangeStickiness[\"GrowsOnlyWhenTypingBefore\"] = 2] = \"GrowsOnlyWhenTypingBefore\";\r\n TrackedRangeStickiness[TrackedRangeStickiness[\"GrowsOnlyWhenTypingAfter\"] = 3] = \"GrowsOnlyWhenTypingAfter\";\r\n})(TrackedRangeStickiness || (TrackedRangeStickiness = {}));\r\n/**\r\n * Describes how to indent wrapped lines.\r\n */\r\nexport var WrappingIndent;\r\n(function (WrappingIndent) {\r\n /**\r\n * No indentation => wrapped lines begin at column 1.\r\n */\r\n WrappingIndent[WrappingIndent[\"None\"] = 0] = \"None\";\r\n /**\r\n * Same => wrapped lines get the same indentation as the parent.\r\n */\r\n WrappingIndent[WrappingIndent[\"Same\"] = 1] = \"Same\";\r\n /**\r\n * Indent => wrapped lines get +1 indentation toward the parent.\r\n */\r\n WrappingIndent[WrappingIndent[\"Indent\"] = 2] = \"Indent\";\r\n /**\r\n * DeepIndent => wrapped lines get +2 indentation toward the parent.\r\n */\r\n WrappingIndent[WrappingIndent[\"DeepIndent\"] = 3] = \"DeepIndent\";\r\n})(WrappingIndent || (WrappingIndent = {}));\r\n","/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nimport { Position } from './position.js';\r\nimport { Range } from './range.js';\r\n/**\r\n * A selection in the editor.\r\n * The selection is a range that has an orientation.\r\n */\r\nexport class Selection extends Range {\r\n constructor(selectionStartLineNumber, selectionStartColumn, positionLineNumber, positionColumn) {\r\n super(selectionStartLineNumber, selectionStartColumn, positionLineNumber, positionColumn);\r\n this.selectionStartLineNumber = selectionStartLineNumber;\r\n this.selectionStartColumn = selectionStartColumn;\r\n this.positionLineNumber = positionLineNumber;\r\n this.positionColumn = positionColumn;\r\n }\r\n /**\r\n * Transform to a human-readable representation.\r\n */\r\n toString() {\r\n return '[' + this.selectionStartLineNumber + ',' + this.selectionStartColumn + ' -> ' + this.positionLineNumber + ',' + this.positionColumn + ']';\r\n }\r\n /**\r\n * Test if equals other selection.\r\n */\r\n equalsSelection(other) {\r\n return (Selection.selectionsEqual(this, other));\r\n }\r\n /**\r\n * Test if the two selections are equal.\r\n */\r\n static selectionsEqual(a, b) {\r\n return (a.selectionStartLineNumber === b.selectionStartLineNumber &&\r\n a.selectionStartColumn === b.selectionStartColumn &&\r\n a.positionLineNumber === b.positionLineNumber &&\r\n a.positionColumn === b.positionColumn);\r\n }\r\n /**\r\n * Get directions (LTR or RTL).\r\n */\r\n getDirection() {\r\n if (this.selectionStartLineNumber === this.startLineNumber && this.selectionStartColumn === this.startColumn) {\r\n return 0 /* LTR */;\r\n }\r\n return 1 /* RTL */;\r\n }\r\n /**\r\n * Create a new selection with a different `positionLineNumber` and `positionColumn`.\r\n */\r\n setEndPosition(endLineNumber, endColumn) {\r\n if (this.getDirection() === 0 /* LTR */) {\r\n return new Selection(this.startLineNumber, this.startColumn, endLineNumber, endColumn);\r\n }\r\n return new Selection(endLineNumber, endColumn, this.startLineNumber, this.startColumn);\r\n }\r\n /**\r\n * Get the position at `positionLineNumber` and `positionColumn`.\r\n */\r\n getPosition() {\r\n return new Position(this.positionLineNumber, this.positionColumn);\r\n }\r\n /**\r\n * Create a new selection with a different `selectionStartLineNumber` and `selectionStartColumn`.\r\n */\r\n setStartPosition(startLineNumber, startColumn) {\r\n if (this.getDirection() === 0 /* LTR */) {\r\n return new Selection(startLineNumber, startColumn, this.endLineNumber, this.endColumn);\r\n }\r\n return new Selection(this.endLineNumber, this.endColumn, startLineNumber, startColumn);\r\n }\r\n // ----\r\n /**\r\n * Create a `Selection` from one or two positions\r\n */\r\n static fromPositions(start, end = start) {\r\n return new Selection(start.lineNumber, start.column, end.lineNumber, end.column);\r\n }\r\n /**\r\n * Create a `Selection` from an `ISelection`.\r\n */\r\n static liftSelection(sel) {\r\n return new Selection(sel.selectionStartLineNumber, sel.selectionStartColumn, sel.positionLineNumber, sel.positionColumn);\r\n }\r\n /**\r\n * `a` equals `b`.\r\n */\r\n static selectionsArrEqual(a, b) {\r\n if (a && !b || !a && b) {\r\n return false;\r\n }\r\n if (!a && !b) {\r\n return true;\r\n }\r\n if (a.length !== b.length) {\r\n return false;\r\n }\r\n for (let i = 0, len = a.length; i < len; i++) {\r\n if (!this.selectionsEqual(a[i], b[i])) {\r\n return false;\r\n }\r\n }\r\n return true;\r\n }\r\n /**\r\n * Test if `obj` is an `ISelection`.\r\n */\r\n static isISelection(obj) {\r\n return (obj\r\n && (typeof obj.selectionStartLineNumber === 'number')\r\n && (typeof obj.selectionStartColumn === 'number')\r\n && (typeof obj.positionLineNumber === 'number')\r\n && (typeof obj.positionColumn === 'number'));\r\n }\r\n /**\r\n * Create with a direction.\r\n */\r\n static createWithDirection(startLineNumber, startColumn, endLineNumber, endColumn, direction) {\r\n if (direction === 0 /* LTR */) {\r\n return new Selection(startLineNumber, startColumn, endLineNumber, endColumn);\r\n }\r\n return new Selection(endLineNumber, endColumn, startLineNumber, startColumn);\r\n }\r\n}\r\n","/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nimport { CancellationTokenSource } from '../../../base/common/cancellation.js';\r\nimport { Emitter } from '../../../base/common/event.js';\r\nimport { KeyChord } from '../../../base/common/keyCodes.js';\r\nimport { URI } from '../../../base/common/uri.js';\r\nimport { Position } from '../core/position.js';\r\nimport { Range } from '../core/range.js';\r\nimport { Selection } from '../core/selection.js';\r\nimport { Token } from '../core/token.js';\r\nimport * as standaloneEnums from './standaloneEnums.js';\r\nexport class KeyMod {\r\n static chord(firstPart, secondPart) {\r\n return KeyChord(firstPart, secondPart);\r\n }\r\n}\r\nKeyMod.CtrlCmd = 2048 /* CtrlCmd */;\r\nKeyMod.Shift = 1024 /* Shift */;\r\nKeyMod.Alt = 512 /* Alt */;\r\nKeyMod.WinCtrl = 256 /* WinCtrl */;\r\nexport function createMonacoBaseAPI() {\r\n return {\r\n editor: undefined,\r\n languages: undefined,\r\n CancellationTokenSource: CancellationTokenSource,\r\n Emitter: Emitter,\r\n KeyCode: standaloneEnums.KeyCode,\r\n KeyMod: KeyMod,\r\n Position: Position,\r\n Range: Range,\r\n Selection: Selection,\r\n SelectionDirection: standaloneEnums.SelectionDirection,\r\n MarkerSeverity: standaloneEnums.MarkerSeverity,\r\n MarkerTag: standaloneEnums.MarkerTag,\r\n Uri: URI,\r\n Token: Token\r\n };\r\n}\r\n","/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\r\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\r\n return new (P || (P = Promise))(function (resolve, reject) {\r\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\r\n step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n });\r\n};\r\nimport { stringDiff } from '../../../base/common/diff/diff.js';\r\nimport { globals } from '../../../base/common/platform.js';\r\nimport { URI } from '../../../base/common/uri.js';\r\nimport { Position } from '../core/position.js';\r\nimport { Range } from '../core/range.js';\r\nimport { DiffComputer } from '../diff/diffComputer.js';\r\nimport { MirrorTextModel as BaseMirrorModel } from '../model/mirrorTextModel.js';\r\nimport { ensureValidWordDefinition, getWordAtText } from '../model/wordHelper.js';\r\nimport { computeLinks } from '../modes/linkComputer.js';\r\nimport { BasicInplaceReplace } from '../modes/supports/inplaceReplaceSupport.js';\r\nimport { createMonacoBaseAPI } from '../standalone/standaloneBase.js';\r\nimport * as types from '../../../base/common/types.js';\r\nimport { StopWatch } from '../../../base/common/stopwatch.js';\r\n/**\r\n * @internal\r\n */\r\nclass MirrorModel extends BaseMirrorModel {\r\n get uri() {\r\n return this._uri;\r\n }\r\n get eol() {\r\n return this._eol;\r\n }\r\n getValue() {\r\n return this.getText();\r\n }\r\n getLinesContent() {\r\n return this._lines.slice(0);\r\n }\r\n getLineCount() {\r\n return this._lines.length;\r\n }\r\n getLineContent(lineNumber) {\r\n return this._lines[lineNumber - 1];\r\n }\r\n getWordAtPosition(position, wordDefinition) {\r\n let wordAtText = getWordAtText(position.column, ensureValidWordDefinition(wordDefinition), this._lines[position.lineNumber - 1], 0);\r\n if (wordAtText) {\r\n return new Range(position.lineNumber, wordAtText.startColumn, position.lineNumber, wordAtText.endColumn);\r\n }\r\n return null;\r\n }\r\n words(wordDefinition) {\r\n const lines = this._lines;\r\n const wordenize = this._wordenize.bind(this);\r\n let lineNumber = 0;\r\n let lineText = '';\r\n let wordRangesIdx = 0;\r\n let wordRanges = [];\r\n return {\r\n *[Symbol.iterator]() {\r\n while (true) {\r\n if (wordRangesIdx < wordRanges.length) {\r\n const value = lineText.substring(wordRanges[wordRangesIdx].start, wordRanges[wordRangesIdx].end);\r\n wordRangesIdx += 1;\r\n yield value;\r\n }\r\n else {\r\n if (lineNumber < lines.length) {\r\n lineText = lines[lineNumber];\r\n wordRanges = wordenize(lineText, wordDefinition);\r\n wordRangesIdx = 0;\r\n lineNumber += 1;\r\n }\r\n else {\r\n break;\r\n }\r\n }\r\n }\r\n }\r\n };\r\n }\r\n getLineWords(lineNumber, wordDefinition) {\r\n let content = this._lines[lineNumber - 1];\r\n let ranges = this._wordenize(content, wordDefinition);\r\n let words = [];\r\n for (const range of ranges) {\r\n words.push({\r\n word: content.substring(range.start, range.end),\r\n startColumn: range.start + 1,\r\n endColumn: range.end + 1\r\n });\r\n }\r\n return words;\r\n }\r\n _wordenize(content, wordDefinition) {\r\n const result = [];\r\n let match;\r\n wordDefinition.lastIndex = 0; // reset lastIndex just to be sure\r\n while (match = wordDefinition.exec(content)) {\r\n if (match[0].length === 0) {\r\n // it did match the empty string\r\n break;\r\n }\r\n result.push({ start: match.index, end: match.index + match[0].length });\r\n }\r\n return result;\r\n }\r\n getValueInRange(range) {\r\n range = this._validateRange(range);\r\n if (range.startLineNumber === range.endLineNumber) {\r\n return this._lines[range.startLineNumber - 1].substring(range.startColumn - 1, range.endColumn - 1);\r\n }\r\n let lineEnding = this._eol;\r\n let startLineIndex = range.startLineNumber - 1;\r\n let endLineIndex = range.endLineNumber - 1;\r\n let resultLines = [];\r\n resultLines.push(this._lines[startLineIndex].substring(range.startColumn - 1));\r\n for (let i = startLineIndex + 1; i < endLineIndex; i++) {\r\n resultLines.push(this._lines[i]);\r\n }\r\n resultLines.push(this._lines[endLineIndex].substring(0, range.endColumn - 1));\r\n return resultLines.join(lineEnding);\r\n }\r\n offsetAt(position) {\r\n position = this._validatePosition(position);\r\n this._ensureLineStarts();\r\n return this._lineStarts.getPrefixSum(position.lineNumber - 2) + (position.column - 1);\r\n }\r\n positionAt(offset) {\r\n offset = Math.floor(offset);\r\n offset = Math.max(0, offset);\r\n this._ensureLineStarts();\r\n let out = this._lineStarts.getIndexOf(offset);\r\n let lineLength = this._lines[out.index].length;\r\n // Ensure we return a valid position\r\n return {\r\n lineNumber: 1 + out.index,\r\n column: 1 + Math.min(out.remainder, lineLength)\r\n };\r\n }\r\n _validateRange(range) {\r\n const start = this._validatePosition({ lineNumber: range.startLineNumber, column: range.startColumn });\r\n const end = this._validatePosition({ lineNumber: range.endLineNumber, column: range.endColumn });\r\n if (start.lineNumber !== range.startLineNumber\r\n || start.column !== range.startColumn\r\n || end.lineNumber !== range.endLineNumber\r\n || end.column !== range.endColumn) {\r\n return {\r\n startLineNumber: start.lineNumber,\r\n startColumn: start.column,\r\n endLineNumber: end.lineNumber,\r\n endColumn: end.column\r\n };\r\n }\r\n return range;\r\n }\r\n _validatePosition(position) {\r\n if (!Position.isIPosition(position)) {\r\n throw new Error('bad position');\r\n }\r\n let { lineNumber, column } = position;\r\n let hasChanged = false;\r\n if (lineNumber < 1) {\r\n lineNumber = 1;\r\n column = 1;\r\n hasChanged = true;\r\n }\r\n else if (lineNumber > this._lines.length) {\r\n lineNumber = this._lines.length;\r\n column = this._lines[lineNumber - 1].length + 1;\r\n hasChanged = true;\r\n }\r\n else {\r\n let maxCharacter = this._lines[lineNumber - 1].length + 1;\r\n if (column < 1) {\r\n column = 1;\r\n hasChanged = true;\r\n }\r\n else if (column > maxCharacter) {\r\n column = maxCharacter;\r\n hasChanged = true;\r\n }\r\n }\r\n if (!hasChanged) {\r\n return position;\r\n }\r\n else {\r\n return { lineNumber, column };\r\n }\r\n }\r\n}\r\n/**\r\n * @internal\r\n */\r\nexport class EditorSimpleWorker {\r\n constructor(host, foreignModuleFactory) {\r\n this._host = host;\r\n this._models = Object.create(null);\r\n this._foreignModuleFactory = foreignModuleFactory;\r\n this._foreignModule = null;\r\n }\r\n dispose() {\r\n this._models = Object.create(null);\r\n }\r\n _getModel(uri) {\r\n return this._models[uri];\r\n }\r\n _getModels() {\r\n let all = [];\r\n Object.keys(this._models).forEach((key) => all.push(this._models[key]));\r\n return all;\r\n }\r\n acceptNewModel(data) {\r\n this._models[data.url] = new MirrorModel(URI.parse(data.url), data.lines, data.EOL, data.versionId);\r\n }\r\n acceptModelChanged(strURL, e) {\r\n if (!this._models[strURL]) {\r\n return;\r\n }\r\n let model = this._models[strURL];\r\n model.onEvents(e);\r\n }\r\n acceptRemovedModel(strURL) {\r\n if (!this._models[strURL]) {\r\n return;\r\n }\r\n delete this._models[strURL];\r\n }\r\n // ---- BEGIN diff --------------------------------------------------------------------------\r\n computeDiff(originalUrl, modifiedUrl, ignoreTrimWhitespace, maxComputationTime) {\r\n return __awaiter(this, void 0, void 0, function* () {\r\n const original = this._getModel(originalUrl);\r\n const modified = this._getModel(modifiedUrl);\r\n if (!original || !modified) {\r\n return null;\r\n }\r\n const originalLines = original.getLinesContent();\r\n const modifiedLines = modified.getLinesContent();\r\n const diffComputer = new DiffComputer(originalLines, modifiedLines, {\r\n shouldComputeCharChanges: true,\r\n shouldPostProcessCharChanges: true,\r\n shouldIgnoreTrimWhitespace: ignoreTrimWhitespace,\r\n shouldMakePrettyDiff: true,\r\n maxComputationTime: maxComputationTime\r\n });\r\n const diffResult = diffComputer.computeDiff();\r\n const identical = (diffResult.changes.length > 0 ? false : this._modelsAreIdentical(original, modified));\r\n return {\r\n quitEarly: diffResult.quitEarly,\r\n identical: identical,\r\n changes: diffResult.changes\r\n };\r\n });\r\n }\r\n _modelsAreIdentical(original, modified) {\r\n const originalLineCount = original.getLineCount();\r\n const modifiedLineCount = modified.getLineCount();\r\n if (originalLineCount !== modifiedLineCount) {\r\n return false;\r\n }\r\n for (let line = 1; line <= originalLineCount; line++) {\r\n const originalLine = original.getLineContent(line);\r\n const modifiedLine = modified.getLineContent(line);\r\n if (originalLine !== modifiedLine) {\r\n return false;\r\n }\r\n }\r\n return true;\r\n }\r\n computeMoreMinimalEdits(modelUrl, edits) {\r\n return __awaiter(this, void 0, void 0, function* () {\r\n const model = this._getModel(modelUrl);\r\n if (!model) {\r\n return edits;\r\n }\r\n const result = [];\r\n let lastEol = undefined;\r\n edits = edits.slice(0).sort((a, b) => {\r\n if (a.range && b.range) {\r\n return Range.compareRangesUsingStarts(a.range, b.range);\r\n }\r\n // eol only changes should go to the end\r\n let aRng = a.range ? 0 : 1;\r\n let bRng = b.range ? 0 : 1;\r\n return aRng - bRng;\r\n });\r\n for (let { range, text, eol } of edits) {\r\n if (typeof eol === 'number') {\r\n lastEol = eol;\r\n }\r\n if (Range.isEmpty(range) && !text) {\r\n // empty change\r\n continue;\r\n }\r\n const original = model.getValueInRange(range);\r\n text = text.replace(/\\r\\n|\\n|\\r/g, model.eol);\r\n if (original === text) {\r\n // noop\r\n continue;\r\n }\r\n // make sure diff won't take too long\r\n if (Math.max(text.length, original.length) > EditorSimpleWorker._diffLimit) {\r\n result.push({ range, text });\r\n continue;\r\n }\r\n // compute diff between original and edit.text\r\n const changes = stringDiff(original, text, false);\r\n const editOffset = model.offsetAt(Range.lift(range).getStartPosition());\r\n for (const change of changes) {\r\n const start = model.positionAt(editOffset + change.originalStart);\r\n const end = model.positionAt(editOffset + change.originalStart + change.originalLength);\r\n const newEdit = {\r\n text: text.substr(change.modifiedStart, change.modifiedLength),\r\n range: { startLineNumber: start.lineNumber, startColumn: start.column, endLineNumber: end.lineNumber, endColumn: end.column }\r\n };\r\n if (model.getValueInRange(newEdit.range) !== newEdit.text) {\r\n result.push(newEdit);\r\n }\r\n }\r\n }\r\n if (typeof lastEol === 'number') {\r\n result.push({ eol: lastEol, text: '', range: { startLineNumber: 0, startColumn: 0, endLineNumber: 0, endColumn: 0 } });\r\n }\r\n return result;\r\n });\r\n }\r\n // ---- END minimal edits ---------------------------------------------------------------\r\n computeLinks(modelUrl) {\r\n return __awaiter(this, void 0, void 0, function* () {\r\n let model = this._getModel(modelUrl);\r\n if (!model) {\r\n return null;\r\n }\r\n return computeLinks(model);\r\n });\r\n }\r\n textualSuggest(modelUrls, leadingWord, wordDef, wordDefFlags) {\r\n return __awaiter(this, void 0, void 0, function* () {\r\n const sw = new StopWatch(true);\r\n const wordDefRegExp = new RegExp(wordDef, wordDefFlags);\r\n const seen = new Set();\r\n outer: for (let url of modelUrls) {\r\n const model = this._getModel(url);\r\n if (!model) {\r\n continue;\r\n }\r\n for (let word of model.words(wordDefRegExp)) {\r\n if (word === leadingWord || !isNaN(Number(word))) {\r\n continue;\r\n }\r\n seen.add(word);\r\n if (seen.size > EditorSimpleWorker._suggestionsLimit) {\r\n break outer;\r\n }\r\n }\r\n }\r\n return { words: Array.from(seen), duration: sw.elapsed() };\r\n });\r\n }\r\n // ---- END suggest --------------------------------------------------------------------------\r\n //#region -- word ranges --\r\n computeWordRanges(modelUrl, range, wordDef, wordDefFlags) {\r\n return __awaiter(this, void 0, void 0, function* () {\r\n let model = this._getModel(modelUrl);\r\n if (!model) {\r\n return Object.create(null);\r\n }\r\n const wordDefRegExp = new RegExp(wordDef, wordDefFlags);\r\n const result = Object.create(null);\r\n for (let line = range.startLineNumber; line < range.endLineNumber; line++) {\r\n let words = model.getLineWords(line, wordDefRegExp);\r\n for (const word of words) {\r\n if (!isNaN(Number(word.word))) {\r\n continue;\r\n }\r\n let array = result[word.word];\r\n if (!array) {\r\n array = [];\r\n result[word.word] = array;\r\n }\r\n array.push({\r\n startLineNumber: line,\r\n startColumn: word.startColumn,\r\n endLineNumber: line,\r\n endColumn: word.endColumn\r\n });\r\n }\r\n }\r\n return result;\r\n });\r\n }\r\n //#endregion\r\n navigateValueSet(modelUrl, range, up, wordDef, wordDefFlags) {\r\n return __awaiter(this, void 0, void 0, function* () {\r\n let model = this._getModel(modelUrl);\r\n if (!model) {\r\n return null;\r\n }\r\n let wordDefRegExp = new RegExp(wordDef, wordDefFlags);\r\n if (range.startColumn === range.endColumn) {\r\n range = {\r\n startLineNumber: range.startLineNumber,\r\n startColumn: range.startColumn,\r\n endLineNumber: range.endLineNumber,\r\n endColumn: range.endColumn + 1\r\n };\r\n }\r\n let selectionText = model.getValueInRange(range);\r\n let wordRange = model.getWordAtPosition({ lineNumber: range.startLineNumber, column: range.startColumn }, wordDefRegExp);\r\n if (!wordRange) {\r\n return null;\r\n }\r\n let word = model.getValueInRange(wordRange);\r\n let result = BasicInplaceReplace.INSTANCE.navigateValueSet(range, selectionText, wordRange, word, up);\r\n return result;\r\n });\r\n }\r\n // ---- BEGIN foreign module support --------------------------------------------------------------------------\r\n loadForeignModule(moduleId, createData, foreignHostMethods) {\r\n const proxyMethodRequest = (method, args) => {\r\n return this._host.fhr(method, args);\r\n };\r\n const foreignHost = types.createProxyObject(foreignHostMethods, proxyMethodRequest);\r\n let ctx = {\r\n host: foreignHost,\r\n getMirrorModels: () => {\r\n return this._getModels();\r\n }\r\n };\r\n if (this._foreignModuleFactory) {\r\n this._foreignModule = this._foreignModuleFactory(ctx, createData);\r\n // static foreing module\r\n return Promise.resolve(types.getAllMethodNames(this._foreignModule));\r\n }\r\n // ESM-comment-begin\r\n // \t\treturn new Promise((resolve, reject) => {\r\n // \t\t\trequire([moduleId], (foreignModule: { create: IForeignModuleFactory }) => {\r\n // \t\t\t\tthis._foreignModule = foreignModule.create(ctx, createData);\r\n // \r\n // \t\t\t\tresolve(types.getAllMethodNames(this._foreignModule));\r\n // \r\n // \t\t\t}, reject);\r\n // \t\t});\r\n // ESM-comment-end\r\n // ESM-uncomment-begin\r\n return Promise.reject(new Error(`Unexpected usage`));\r\n // ESM-uncomment-end\r\n }\r\n // foreign method request\r\n fmr(method, args) {\r\n if (!this._foreignModule || typeof this._foreignModule[method] !== 'function') {\r\n return Promise.reject(new Error('Missing requestHandler or method: ' + method));\r\n }\r\n try {\r\n return Promise.resolve(this._foreignModule[method].apply(this._foreignModule, args));\r\n }\r\n catch (e) {\r\n return Promise.reject(e);\r\n }\r\n }\r\n}\r\n// ---- END diff --------------------------------------------------------------------------\r\n// ---- BEGIN minimal edits ---------------------------------------------------------------\r\nEditorSimpleWorker._diffLimit = 100000;\r\n// ---- BEGIN suggest --------------------------------------------------------------------------\r\nEditorSimpleWorker._suggestionsLimit = 10000;\r\n/**\r\n * Called on the worker side\r\n * @internal\r\n */\r\nexport function create(host) {\r\n return new EditorSimpleWorker(host, null);\r\n}\r\nif (typeof importScripts === 'function') {\r\n // Running in a web worker\r\n globals.monaco = createMonacoBaseAPI();\r\n}\r\n","/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nimport { splitLines } from '../../../base/common/strings.js';\r\nimport { Position } from '../core/position.js';\r\nimport { PrefixSumComputer } from '../viewModel/prefixSumComputer.js';\r\nexport class MirrorTextModel {\r\n constructor(uri, lines, eol, versionId) {\r\n this._uri = uri;\r\n this._lines = lines;\r\n this._eol = eol;\r\n this._versionId = versionId;\r\n this._lineStarts = null;\r\n this._cachedTextValue = null;\r\n }\r\n dispose() {\r\n this._lines.length = 0;\r\n }\r\n get version() {\r\n return this._versionId;\r\n }\r\n getText() {\r\n if (this._cachedTextValue === null) {\r\n this._cachedTextValue = this._lines.join(this._eol);\r\n }\r\n return this._cachedTextValue;\r\n }\r\n onEvents(e) {\r\n if (e.eol && e.eol !== this._eol) {\r\n this._eol = e.eol;\r\n this._lineStarts = null;\r\n }\r\n // Update my lines\r\n const changes = e.changes;\r\n for (const change of changes) {\r\n this._acceptDeleteRange(change.range);\r\n this._acceptInsertText(new Position(change.range.startLineNumber, change.range.startColumn), change.text);\r\n }\r\n this._versionId = e.versionId;\r\n this._cachedTextValue = null;\r\n }\r\n _ensureLineStarts() {\r\n if (!this._lineStarts) {\r\n const eolLength = this._eol.length;\r\n const linesLength = this._lines.length;\r\n const lineStartValues = new Uint32Array(linesLength);\r\n for (let i = 0; i < linesLength; i++) {\r\n lineStartValues[i] = this._lines[i].length + eolLength;\r\n }\r\n this._lineStarts = new PrefixSumComputer(lineStartValues);\r\n }\r\n }\r\n /**\r\n * All changes to a line's text go through this method\r\n */\r\n _setLineText(lineIndex, newValue) {\r\n this._lines[lineIndex] = newValue;\r\n if (this._lineStarts) {\r\n // update prefix sum\r\n this._lineStarts.changeValue(lineIndex, this._lines[lineIndex].length + this._eol.length);\r\n }\r\n }\r\n _acceptDeleteRange(range) {\r\n if (range.startLineNumber === range.endLineNumber) {\r\n if (range.startColumn === range.endColumn) {\r\n // Nothing to delete\r\n return;\r\n }\r\n // Delete text on the affected line\r\n this._setLineText(range.startLineNumber - 1, this._lines[range.startLineNumber - 1].substring(0, range.startColumn - 1)\r\n + this._lines[range.startLineNumber - 1].substring(range.endColumn - 1));\r\n return;\r\n }\r\n // Take remaining text on last line and append it to remaining text on first line\r\n this._setLineText(range.startLineNumber - 1, this._lines[range.startLineNumber - 1].substring(0, range.startColumn - 1)\r\n + this._lines[range.endLineNumber - 1].substring(range.endColumn - 1));\r\n // Delete middle lines\r\n this._lines.splice(range.startLineNumber, range.endLineNumber - range.startLineNumber);\r\n if (this._lineStarts) {\r\n // update prefix sum\r\n this._lineStarts.removeValues(range.startLineNumber, range.endLineNumber - range.startLineNumber);\r\n }\r\n }\r\n _acceptInsertText(position, insertText) {\r\n if (insertText.length === 0) {\r\n // Nothing to insert\r\n return;\r\n }\r\n let insertLines = splitLines(insertText);\r\n if (insertLines.length === 1) {\r\n // Inserting text on one line\r\n this._setLineText(position.lineNumber - 1, this._lines[position.lineNumber - 1].substring(0, position.column - 1)\r\n + insertLines[0]\r\n + this._lines[position.lineNumber - 1].substring(position.column - 1));\r\n return;\r\n }\r\n // Append overflowing text from first line to the end of text to insert\r\n insertLines[insertLines.length - 1] += this._lines[position.lineNumber - 1].substring(position.column - 1);\r\n // Delete overflowing text from first line and insert text on first line\r\n this._setLineText(position.lineNumber - 1, this._lines[position.lineNumber - 1].substring(0, position.column - 1)\r\n + insertLines[0]);\r\n // Insert new lines & store lengths\r\n let newLengths = new Uint32Array(insertLines.length - 1);\r\n for (let i = 1; i < insertLines.length; i++) {\r\n this._lines.splice(position.lineNumber + i - 1, 0, insertLines[i]);\r\n newLengths[i - 1] = insertLines[i].length + this._eol.length;\r\n }\r\n if (this._lineStarts) {\r\n // update prefix sum\r\n this._lineStarts.insertValues(position.lineNumber, newLengths);\r\n }\r\n }\r\n}\r\n","/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nexport class Token {\r\n constructor(offset, type, language) {\r\n this._tokenBrand = undefined;\r\n this.offset = offset | 0; // @perf\r\n this.type = type;\r\n this.language = language;\r\n }\r\n toString() {\r\n return '(' + this.offset + ', ' + this.type + ')';\r\n }\r\n}\r\nexport class TokenizationResult {\r\n constructor(tokens, endState) {\r\n this._tokenizationResultBrand = undefined;\r\n this.tokens = tokens;\r\n this.endState = endState;\r\n }\r\n}\r\nexport class TokenizationResult2 {\r\n constructor(tokens, endState) {\r\n this._tokenizationResult2Brand = undefined;\r\n this.tokens = tokens;\r\n this.endState = endState;\r\n }\r\n}\r\n","/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nimport { SimpleWorkerServer } from '../base/common/worker/simpleWorker.js';\r\nimport { EditorSimpleWorker } from './common/services/editorSimpleWorker.js';\r\nlet initialized = false;\r\nexport function initialize(foreignModule) {\r\n if (initialized) {\r\n return;\r\n }\r\n initialized = true;\r\n const simpleWorker = new SimpleWorkerServer((msg) => {\r\n self.postMessage(msg);\r\n }, (host) => new EditorSimpleWorker(host, foreignModule));\r\n self.onmessage = (e) => {\r\n simpleWorker.onmessage(e.data);\r\n };\r\n}\r\nself.onmessage = (e) => {\r\n // Ignore first message in this case and initialize if not yet initialized\r\n if (!initialized) {\r\n initialize(null);\r\n }\r\n};\r\n"],"names":["__webpack_require__","g","globalThis","this","Function","e","window","errorHandler","constructor","listeners","unexpectedErrorHandler","setTimeout","stack","Error","message","emit","forEach","listener","onUnexpectedError","onUnexpectedExternalError","error","name","canceledName","transformErrorForSerialization","$isError","stacktrace","once","fn","_this","result","didCall","apply","arguments","Iterable","is","thing","Symbol","iterator","_empty","Object","freeze","empty","single","element","from","iterable","isEmpty","next","done","first","value","some","predicate","find","filter","map","index","concat","iterables","concatNested","reduce","reducer","initialValue","slice","arr","to","length","consume","atMost","Number","POSITIVE_INFINITY","consumed","i","push","equals","a","b","comparator","at","bt","ai","bi","an","bn","_a","MultiDisposeError","errors","super","join","dispose","arg","d","Array","isArray","toDisposable","self","DisposableStore","_toDispose","Set","_isDisposed","clear","values","add","o","DISABLE_DISPOSED_WARNING","console","warn","_store","_register","None","LANGUAGE_DEFAULT","_locale","_translationsConfigFile","_userAgent","_isWindows","_isMacintosh","_isLinux","_isLinuxSnap","_isNative","_isWeb","_isIOS","_language","globals","nodeProcess","vscode","process","isElectronRenderer","versions","electron","type","isElectronSandboxed","sandboxed","env","navigator","platform","rawNlsConfig","nlsConfig","JSON","parse","resolved","availableLanguages","locale","userAgent","indexOf","maxTouchPoints","language","_platform","isWindows","isMacintosh","setImmediate","bind","postMessage","importScripts","pending","addEventListener","data","vscodeSetImmediateId","len","candidate","id","splice","callback","lastId","myId","nextTick","_promise","Promise","resolve","then","getAllMethodNames","obj","methods","prop","res","proto","getPrototypeOf","prototype","getOwnPropertyNames","getAllPropertyNames","createProxyObject","methodNames","invoke","createProxyMethod","method","args","call","methodName","SimpleWorkerProtocol","handler","_workerId","_handler","_lastSentReq","_pendingReplies","create","setWorkerId","workerId","sendMessage","req","String","reject","_send","vsWorker","handleMessage","_handleMessage","msg","seq","replyMessage","reply","err","requestMessage","r","undefined","detail","transfer","m","ArrayBuffer","SimpleWorkerServer","requestHandlerFactory","_requestHandlerFactory","_requestHandler","_protocol","onmessage","initialize","loaderConfig","moduleId","hostMethods","hostProxy","baseUrl","paths","vs","trustedTypesPolicy","catchError","require","config","module","DiffChange","originalStart","originalLength","modifiedStart","modifiedLength","getOriginalEnd","getModifiedEnd","isHighSurrogate","charCode","isLowSurrogate","fromCharCode","GraphemeBreakTree","_data","static","_INSTANCE","getGraphemeBreakType","codePoint","nodeCount","nodeIndex","numberHash","val","initialHashVal","stringHash","s","hashVal","charCodeAt","leftRotate","bits","totalBits","delta","fill","dest","count","byteLength","toHexString","bufferOrValue","bitsize","Uint8Array","toString","padStart","char","leftPad","StringSHA1","_h0","_h1","_h2","_h3","_h4","_buff","_buffDV","DataView","buffer","_buffLen","_totalLen","_leftoverHighSurrogate","_finished","update","str","strLen","buff","offset","buffLen","leftoverHighSurrogate","nextCharCode","_push","_step","digest","_wrapUp","ml","setUint32","Math","floor","bigBlock32","_bigBlock32","j","getUint32","f","k","temp","c","StringDiffSequence","source","getElements","characters","Int32Array","stringDiff","original","modified","pretty","LcsDiff","ComputeDiff","changes","Debug","condition","MyArray","sourceArray","sourceIndex","destinationArray","destinationIndex","DiffChangeHelper","m_changes","m_originalStart","m_modifiedStart","m_originalCount","m_modifiedCount","MarkNextChange","AddOriginalElement","originalIndex","modifiedIndex","min","AddModifiedElement","getChanges","getReverseChanges","reverse","originalSequence","modifiedSequence","continueProcessingPredicate","ContinueProcessingPredicate","_originalSequence","_modifiedSequence","originalStringElements","originalElementsOrHash","originalHasStrings","_getElements","modifiedStringElements","modifiedElementsOrHash","modifiedHasStrings","_hasStrings","_originalStringElements","_originalElementsOrHash","_modifiedStringElements","_modifiedElementsOrHash","m_forwardHistory","m_reverseHistory","sequence","elements","_isStringArray","hashes","ElementsAreEqual","newIndex","ElementsAreStrictEqual","_getStrictElement","getStrictElement","OriginalElementsAreEqual","index1","index2","ModifiedElementsAreEqual","_ComputeDiff","originalEnd","modifiedEnd","quitEarlyArr","ComputeDiffRecursive","PrettifyChanges","quitEarly","Assert","midOriginalArr","midModifiedArr","ComputeRecursionPoint","midOriginal","midModified","leftChanges","rightChanges","ConcatenateChanges","WALKTRACE","diagonalForwardBase","diagonalForwardStart","diagonalForwardEnd","diagonalForwardOffset","diagonalReverseBase","diagonalReverseStart","diagonalReverseEnd","diagonalReverseOffset","forwardPoints","reversePoints","deltaIsEven","forwardChanges","reverseChanges","changeHelper","diagonalMin","diagonalMax","diagonalRelative","lastOriginalIndex","historyIndex","diagonal","originalStartPoint","modifiedStartPoint","lastForwardChange","max","maxDifferences","numDiagonals","numDifferences","furthestOriginalIndex","furthestModifiedIndex","ClipDiagonalBound","tempOriginalIndex","abs","matchLengthOfLongest","Copy2","change","originalStop","modifiedStop","checkOriginal","checkModified","startStrictEqual","mergedChangeArr","ChangesOverlap","prevChange","bestDelta","bestScore","_boundaryScore","score","aChange","bChange","matchedLength","aOriginalStart","bOriginalEnd","abOriginalLength","aModifiedStart","bModifiedEnd","abModifiedLength","t","_findBetterContiguousSequence","originalMatchStart","modifiedMatchStart","desiredLength","originalMax","modifiedMax","bestOriginalStart","bestModifiedStart","_contiguousSequenceScore","l","_OriginalIsBoundary","test","_OriginalRegionIsBoundary","_ModifiedIsBoundary","_ModifiedRegionIsBoundary","left","right","Copy","diagonalBaseIndex","diffEven","safeProcess","sandboxProcess","cwd","CHAR_DOT","CHAR_FORWARD_SLASH","CHAR_BACKWARD_SLASH","CHAR_COLON","ErrorInvalidArgType","expected","actual","determiner","replace","code","validateString","isPathSeparator","isPosixPathSeparator","isWindowsDeviceRoot","normalizeString","path","allowAboveRoot","separator","lastSegmentLength","lastSlash","dots","lastSlashIndex","lastIndexOf","_format","sep","pathObject","dir","root","base","ext","win32","pathSegments","resolvedDevice","resolvedTail","resolvedAbsolute","toLowerCase","rootEnd","device","isAbsolute","last","firstPart","normalize","tail","joined","needsReplace","slashCount","firstLen","relative","fromOrig","toOrig","fromStart","fromEnd","fromLen","toStart","toEnd","toLen","lastCommonSep","fromCode","out","toNamespacedPath","resolvedPath","dirname","end","matchedSlash","basename","start","extIdx","firstNonSlashEnd","extname","startDot","startPart","preDotState","format","ret","delimiter","posix","trailingSeparator","hasRoot","_schemePattern","_singleSlashStart","_doubleSlashStart","_validateUri","_strict","scheme","authority","query","fragment","_slash","_regexp","URI","schemeOrData","_schemeFix","_referenceResolution","fsPath","with","uriToFsPath","Uri","match","exec","percentDecode","idx","substring","components","uri","pathFragment","newPath","file","skipEncoding","_asFormatted","toJSON","_formatted","external","_fsPath","_sep","_pathSepMarker","$mid","encodeTable","encodeURIComponentFast","uriComponent","allowSlash","nativeEncodePos","pos","encodeURIComponent","charAt","substr","escaped","encodeURIComponentMinimal","keepDriveLetterCasing","encoder","userinfo","decodeURIComponentGraceful","decodeURIComponent","_rEncodedAsHex","Position","lineNumber","column","newLineNumber","newColumn","deltaLineNumber","deltaColumn","other","isBefore","isBeforeOrEqual","aLineNumber","bLineNumber","clone","Range","startLineNumber","startColumn","endLineNumber","endColumn","range","containsPosition","position","containsRange","otherRange","strictContainsRange","plusRange","intersectRanges","resultStartLineNumber","resultStartColumn","resultEndLineNumber","resultEndColumn","otherStartLineNumber","otherStartColumn","otherEndLineNumber","otherEndColumn","equalsRange","getEndPosition","getStartPosition","setEndPosition","setStartPosition","collapseToStart","aStartLineNumber","bStartLineNumber","aStartColumn","bStartColumn","aEndLineNumber","bEndLineNumber","computeDiff","LineSequence","lines","startColumns","endColumns","getFirstNonBlankColumn","getLastNonBlankColumn","_startColumns","_endColumns","getStartLineNumber","getEndLineNumber","createCharSequence","shouldIgnoreTrimWhitespace","startIndex","endIndex","charCodes","lineNumbers","columns","lineContent","col","CharSequence","_charCodes","_lineNumbers","_columns","getStartColumn","getEndColumn","CharChange","originalStartLineNumber","originalStartColumn","originalEndLineNumber","originalEndColumn","modifiedStartLineNumber","modifiedStartColumn","modifiedEndLineNumber","modifiedEndColumn","diffChange","originalCharSequence","modifiedCharSequence","LineChange","charChanges","originalLineSequence","modifiedLineSequence","continueCharDiff","shouldComputeCharChanges","shouldPostProcessCharChanges","rawChanges","currChange","originalMatchingLength","modifiedMatchingLength","postProcessCharChanges","createFromDiffChange","DiffComputer","originalLines","modifiedLines","opts","shouldMakePrettyDiff","continueLineDiff","createContinueProcessingPredicate","maxComputationTime","diffResult","lineChanges","createFromDiffResult","originalLineIndex","modifiedLineIndex","nextChange","originalLine","modifiedLine","_pushTrimWhitespaceCharChange","originalMaxColumn","modifiedMaxColumn","originalLineNumber","modifiedLineNumber","_mergeTrimWhitespaceCharChange","txt","defaultValue","chCode","maximumRuntime","startTime","Date","now","toUint8","v","toUint32","PrefixSumIndexOfResult","remainder","_prefixSumIndexOfResultBrand","PrefixSumComputer","prefixSum","Uint32Array","prefixSumValidIndex","insertValues","insertIndex","oldValues","oldPrefixSum","insertValuesLen","set","subarray","changeValue","removeValues","maxCount","getTotalSum","_getPrefixSum","getPrefixSum","getIndexOf","sum","low","high","mid","midStop","midStart","DEFAULT_WORD_REGEXP","allowInWords","RegExp","createWordRegExp","_defaultConfig","maxLen","windowSize","timeBudget","getWordAtText","wordDefinition","text","textOffset","t1","prevRegexIndex","regexIndex","lastIndex","thisMatch","_findRegexMatchEnclosingPosition","word","stopPos","matchIndex","CharacterClassifier","_defaultValue","_asciiMap","_createAsciiMap","_map","Map","asciiMap","_value","get","Uint8Matrix","rows","cols","row","StateMachine","edges","maxCharCode","maxState","states","_states","_maxCharCode","nextState","currentState","_stateMachine","_classifier","LinkComputer","classifier","line","linkBeginIndex","linkEndIndex","lastIncludedCharIndex","charCodeBeforeLink","lastCharCodeInLink","url","model","stateMachine","getStateMachine","FORCE_TERMINATION_CHARACTERS","CANNOT_END_WITH_CHARACTERS","getClassifier","lineCount","getLineCount","getLineContent","linkBeginChCode","state","hasOpenParens","hasOpenSquareBracket","inSquareBrackets","hasOpenCurlyBracket","resetStateMachine","chClass","_createLink","BasicInplaceReplace","_defaultValueSet","navigateValueSet","range1","text1","range2","text2","up","doNavigateValueSet","numberResult","numberReplace","textReplace","precision","pow","n1","n2","parseFloat","isNaN","valueSetsReplace","valueSets","valueSetReplace","valueSet","INSTANCE","Node","Undefined","prev","_first","_last","_size","size","node","unshift","_insert","atTheEnd","newNode","oldLast","oldFirst","didRemove","_remove","shift","pop","anchor","hasPerformanceNow","performance","StopWatch","highResolution","_highResolution","_startTime","_now","_stopTime","stop","elapsed","Event","event","thisArgs","disposables","didFire","snapshot","each","merge","initial","output","emitter","Emitter","onFirstListenerAdd","fire","onLastListenerRemove","debounce","delay","leading","leakWarningThreshold","subscription","handle","numDebouncedCalls","cur","clearTimeout","_output","latch","cache","firstCall","shouldEmit","signal","any","events","combinedDisposable","split","isT","_buffer","flush","onFirstListenerDidAdd","ChainableEvent","on","chain","fromNodeEventEmitter","eventName","removeListener","fromDOMEventEmitter","removeEventListener","toPromise","EventProfiling","_listenerCount","_invocationCount","_elapsedOverall","_name","_idPool","listenerCount","_stopWatch","info","toFixed","options","_disposed","_options","_leakageMon","_perfMon","_profName","_event","_listeners","firstListener","remove","onListenerDidAdd","removeMonitor","check","_b","_deliveryQueue","_c","_d","_e","shortcutEvent","context","CancellationToken","isCancellationToken","Cancelled","MutableToken","isCancellationRequested","onCancellationRequested","_isCancelled","_emitter","cancel","KeyCodeStrMap","_keyCodeToStr","_strToKeyCode","define","keyCode","keyCodeToStr","strToKeyCode","uiMap","userSettingsUSMap","userSettingsGeneralMap","KeyCodeUtils","AccessibilitySupport","CompletionItemInsertTextRule","CompletionItemKind","CompletionItemTag","CompletionTriggerKind","ContentWidgetPositionPreference","CursorChangeReason","DefaultEndOfLine","DocumentHighlightKind","EditorAutoIndentStrategy","EditorOption","EndOfLinePreference","EndOfLineSequence","IndentAction","InlayHintKind","InlineCompletionTriggerKind","KeyCode","MarkerSeverity","MarkerTag","MinimapPosition","MouseTargetType","OverlayWidgetPositionPreference","OverviewRulerLane","RenderLineNumbersType","RenderMinimap","ScrollType","ScrollbarVisibility","SelectionDirection","SignatureHelpTriggerKind","SymbolKind","SymbolTag","TextEditorCursorBlinkingStyle","TextEditorCursorStyle","TrackedRangeStickiness","WrappingIndent","uiLabel","usUserSettingsLabel","generalUserSettingsLabel","fromString","key","toUserSettingsUS","toUserSettingsGeneral","fromUserSettings","Selection","selectionStartLineNumber","selectionStartColumn","positionLineNumber","positionColumn","equalsSelection","selectionsEqual","getDirection","getPosition","sel","direction","KeyMod","secondPart","KeyChord","CtrlCmd","Shift","Alt","WinCtrl","__awaiter","thisArg","_arguments","P","generator","fulfilled","step","rejected","MirrorModel","eol","versionId","_uri","_lines","_eol","_versionId","_lineStarts","_cachedTextValue","version","getText","onEvents","_acceptDeleteRange","_acceptInsertText","_ensureLineStarts","eolLength","linesLength","lineStartValues","_setLineText","lineIndex","newValue","insertText","insertLines","newLengths","getValue","getLinesContent","getWordAtPosition","wordAtText","global","flags","ignoreCase","multiline","unicode","ensureValidWordDefinition","words","wordenize","_wordenize","lineText","wordRangesIdx","wordRanges","getLineWords","content","ranges","getValueInRange","_validateRange","lineEnding","startLineIndex","endLineIndex","resultLines","offsetAt","_validatePosition","positionAt","lineLength","isIPosition","hasChanged","maxCharacter","EditorSimpleWorker","host","foreignModuleFactory","_host","_models","_foreignModuleFactory","_foreignModule","_getModel","_getModels","all","keys","acceptNewModel","EOL","acceptModelChanged","strURL","acceptRemovedModel","originalUrl","modifiedUrl","ignoreTrimWhitespace","identical","_modelsAreIdentical","originalLineCount","computeMoreMinimalEdits","modelUrl","edits","lastEol","sort","compareRangesUsingStarts","_diffLimit","editOffset","lift","newEdit","computeLinks","textualSuggest","modelUrls","leadingWord","wordDef","wordDefFlags","sw","wordDefRegExp","seen","outer","_suggestionsLimit","duration","computeWordRanges","array","selectionText","wordRange","loadForeignModule","createData","foreignHostMethods","ctx","fhr","getMirrorModels","fmr","monaco","editor","languages","CancellationTokenSource","parent","_token","_parentListener","token","Token","_tokenBrand","initialized","foreignModule","simpleWorker"],"sourceRoot":""} \ No newline at end of file diff --git a/grammar.html b/grammar.html deleted file mode 100644 index fc44317..0000000 --- a/grammar.html +++ /dev/null @@ -1,177 +0,0 @@ - - - - - - - -

main

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - -NUMBERS - - - - - - - - - - - - - -LETTERS - - - - - - - - - - - - - - - - - - - - -
-

LETTERS

-
- - - - - - - - - - - - - - - - - - - -/[a-zA-Z]/ - - - - - - - - - - - - - - - - -
-

NUMBERS

-
- - - - - - - - - - - - - - - - - - - -int - - - - - - - - - - - - - - - - -
- - \ No newline at end of file diff --git a/grammer.ne b/grammer.ne deleted file mode 100644 index f82cbd5..0000000 --- a/grammer.ne +++ /dev/null @@ -1,36 +0,0 @@ - -@builtin "whitespace.ne" # `_` means arbitrary amount of whitespace -@builtin "number.ne" # `int`, `decimal`, and `percentage` number primitives - -@{% - // Moo lexer documention is here: - // https://github.com/no-context/moo - - const moo = require("moo") - const lexer = moo.compile({ - whitespace: { match: /[\s\t\n]+/, lineBreaks: true }, - number: /[0-9]+/, - word: /[a-zA-Z]+/, - symbols: /[^a-zA-Z0-9\s\t\n\r]+/ - }); - - -const un_nest = (d) =>{ - - return d.flat(10) -} - -%} - -# Pass your lexer with @lexer: -@lexer lexer - - -main -> ( terminals ):* {% d=> un_nest(d[0]) %} - -terminals -> NUMBERS | LETTERS | SYMBOLS | WHITESPACE {% d=> d[0] %} - -LETTERS -> %word {%([first])=>( {"type": first.type,"text":first.text, token: 'LETTERS'}) %} -SYMBOLS -> %symbols {%([first])=>( {"type": first.type,"text":first.text, token: 'SYMBOLS'}) %} -NUMBERS -> %number {%([first])=>( {"type": first.type,"text":first.text, token: 'NUMBERS'}) %} -WHITESPACE -> %whitespace {%([first])=>( {"type": first.type,"text":first.text, token: 'WHITESPACE'}) %} diff --git a/src/index.html b/index.html similarity index 100% rename from src/index.html rename to index.html diff --git a/index.js b/index.js new file mode 100644 index 0000000..7a2a4b0 --- /dev/null +++ b/index.js @@ -0,0 +1,76 @@ +/*! For license information please see index.js.LICENSE.txt */ +(()=>{var e,t,n={5318:e=>{e.exports=function(e){return e&&e.__esModule?e:{default:e}},e.exports.default=e.exports,e.exports.__esModule=!0},1859:(e,t,n)=>{"use strict";n.d(t,{Z:()=>te});var i=n(1526),o=Math.abs,r=String.fromCharCode;function s(e){return e.trim()}function a(e,t,n){return e.replace(t,n)}function l(e,t){return e.indexOf(t)}function d(e,t){return 0|e.charCodeAt(t)}function c(e,t,n){return e.slice(t,n)}function h(e){return e.length}function u(e){return e.length}function g(e,t){return t.push(e),e}var p=1,m=1,f=0,_=0,b=0,C="";function v(e,t,n,i,o,r,s){return{value:e,root:t,parent:n,type:i,props:o,children:r,line:p,column:m,length:s,return:""}}function w(e,t,n){return v(e,t.root,t.parent,n,t.props,t.children,0)}function y(){return b=_>0?d(C,--_):0,m--,10===b&&(m=1,p--),b}function A(){return b=_2||L(b)>3?"":" "}function M(e,t){for(;--t&&A()&&!(b<48||b>102||b>57&&b<65||b>70&&b<97););return k(e,x()+(t<6&&32==S()&&32==A()))}function T(e){for(;A();)switch(b){case e:return _;case 34:case 39:return T(34===e||39===e?e:b);case 40:41===e&&T(e);break;case 92:A()}return _}function R(e,t){for(;A()&&e+b!==57&&(e+b!==84||47!==S()););return"/*"+k(t,_-1)+"*"+r(47===e?e:A())}function O(e){for(;!L(S());)A();return k(e,_)}var B="-ms-",P="-moz-",F="-webkit-",W="comm",z="rule",V="decl";function H(e,t){for(var n="",i=u(e),o=0;o6)switch(d(e,t+1)){case 109:if(45!==d(e,t+4))break;case 102:return a(e,/(.+:)(.+)-([^]+)/,"$1-webkit-$2-$3$1"+P+(108==d(e,t+3)?"$3":"$2-$3"))+e;case 115:return~l(e,"stretch")?$(a(e,"stretch","fill-available"),t)+e:e}break;case 4949:if(115!==d(e,t+1))break;case 6444:switch(d(e,h(e)-3-(~l(e,"!important")&&10))){case 107:return a(e,":",":"+F)+e;case 101:return a(e,/(.+:)([^;!]+)(;|!.+)?/,"$1"+F+(45===d(e,14)?"inline-":"")+"box$3$1"+F+"$2$3$1"+B+"$2box$3")+e}break;case 5936:switch(d(e,t+11)){case 114:return F+e+B+a(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return F+e+B+a(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return F+e+B+a(e,/[svh]\w+-[tblr]{2}/,"lr")+e}return F+e+B+e+e}return e}function U(e){return N(Z("",null,null,null,[""],e=E(e),0,[0],e))}function Z(e,t,n,i,o,s,l,d,c){for(var u=0,p=0,m=l,f=0,_=0,b=0,C=1,v=1,w=1,k=0,L="",E=o,N=s,T=i,B=L;v;)switch(b=k,k=A()){case 34:case 39:case 91:case 40:B+=D(k);break;case 9:case 10:case 13:case 32:B+=I(b);break;case 92:B+=M(x()-1,7);continue;case 47:switch(S()){case 42:case 47:g(q(R(A(),x()),t,n),c);break;default:B+="/"}break;case 123*C:d[u++]=h(B)*w;case 125*C:case 59:case 0:switch(k){case 0:case 125:v=0;case 59+p:_>0&&h(B)-m&&g(_>32?Y(B+";",i,n,m-1):Y(a(B," ","")+";",i,n,m-2),c);break;case 59:B+=";";default:if(g(T=K(B,t,n,u,p,o,d,L,E=[],N=[],m),s),123===k)if(0===p)Z(B,t,T,T,E,s,m,d,N);else switch(f){case 100:case 109:case 115:Z(e,T,T,i&&g(K(e,T,T,0,0,o,d,L,o,E=[],m),N),o,N,m,d,i?E:N);break;default:Z(B,T,T,T,[""],N,m,d,N)}}u=p=_=0,C=w=1,L=B="",m=l;break;case 58:m=1+h(B),_=b;default:if(C<1)if(123==k)--C;else if(125==k&&0==C++&&125==y())continue;switch(B+=r(k),k*C){case 38:w=p>0?1:(B+="\f",-1);break;case 44:d[u++]=(h(B)-1)*w,w=1;break;case 64:45===S()&&(B+=D(A())),f=S(),p=h(L=B+=O(x())),k++;break;case 45:45===b&&2==h(B)&&(C=0)}}return s}function K(e,t,n,i,r,l,d,h,g,p,m){for(var f=r-1,_=0===r?l:[""],b=u(_),C=0,w=0,y=0;C0?_[A]+" "+S:a(S,/&\f/g,_[A])))&&(g[y++]=x);return v(e,t,n,0===r?z:h,g,p,m)}function q(e,t,n){return v(e,t,n,W,r(b),c(e,2,-2),0)}function Y(e,t,n,i){return v(e,t,n,V,c(e,0,i),c(e,i+1,-1),i)}var G=function(e,t,n){for(var i=0,o=0;i=o,o=S(),38===i&&12===o&&(t[n]=1),!L(o);)A();return k(e,_)},Q=new WeakMap,X=function(e){if("rule"===e.type&&e.parent&&e.length){for(var t=e.value,n=e.parent,i=e.column===n.column&&e.line===n.line;"rule"!==n.type;)if(!(n=n.parent))return;if((1!==e.props.length||58===t.charCodeAt(0)||Q.get(n))&&!i){Q.set(e,!0);for(var o=[],s=function(e,t){return N(function(e,t){var n=-1,i=44;do{switch(L(i)){case 0:38===i&&12===S()&&(t[n]=1),e[n]+=G(_-1,t,n);break;case 2:e[n]+=D(i);break;case 4:if(44===i){e[++n]=58===S()?"&\f":"",t[n]=e[n].length;break}default:e[n]+=r(i)}}while(i=A());return e}(E(e),t))}(t,o),a=n.props,l=0,d=0;l{"use strict";n.d(t,{Z:()=>i});const i=function(e){var t=Object.create(null);return function(n){return void 0===t[n]&&(t[n]=e(n)),t[n]}}},4759:(e,t,n)=>{"use strict";n.d(t,{T:()=>a,w:()=>s});var i=n(7294),o=n(1859),r=(n(4199),Object.prototype.hasOwnProperty,(0,i.createContext)("undefined"!=typeof HTMLElement?(0,o.Z)({key:"css"}):null));r.Provider;var s=function(e){return(0,i.forwardRef)((function(t,n){var o=(0,i.useContext)(r);return e(t,o,n)}))},a=(0,i.createContext)({})},4199:(e,t,n)=>{"use strict";n.d(t,{O:()=>m});const i=function(e){for(var t,n=0,i=0,o=e.length;o>=4;++i,o-=4)t=1540483477*(65535&(t=255&e.charCodeAt(i)|(255&e.charCodeAt(++i))<<8|(255&e.charCodeAt(++i))<<16|(255&e.charCodeAt(++i))<<24))+(59797*(t>>>16)<<16),n=1540483477*(65535&(t^=t>>>24))+(59797*(t>>>16)<<16)^1540483477*(65535&n)+(59797*(n>>>16)<<16);switch(o){case 3:n^=(255&e.charCodeAt(i+2))<<16;case 2:n^=(255&e.charCodeAt(i+1))<<8;case 1:n=1540483477*(65535&(n^=255&e.charCodeAt(i)))+(59797*(n>>>16)<<16)}return(((n=1540483477*(65535&(n^=n>>>13))+(59797*(n>>>16)<<16))^n>>>15)>>>0).toString(36)},o={animationIterationCount:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1};var r=n(7866),s=/[A-Z]|^ms/g,a=/_EMO_([^_]+?)_([^]*?)_EMO_/g,l=function(e){return 45===e.charCodeAt(1)},d=function(e){return null!=e&&"boolean"!=typeof e},c=(0,r.Z)((function(e){return l(e)?e:e.replace(s,"-$&").toLowerCase()})),h=function(e,t){switch(e){case"animation":case"animationName":if("string"==typeof t)return t.replace(a,(function(e,t,n){return g={name:t,styles:n,next:g},t}))}return 1===o[e]||l(e)||"number"!=typeof t||0===t?t:t+"px"};function u(e,t,n){if(null==n)return"";if(void 0!==n.__emotion_styles)return n;switch(typeof n){case"boolean":return"";case"object":if(1===n.anim)return g={name:n.name,styles:n.styles,next:g},n.name;if(void 0!==n.styles){var i=n.next;if(void 0!==i)for(;void 0!==i;)g={name:i.name,styles:i.styles,next:g},i=i.next;return n.styles+";"}return function(e,t,n){var i="";if(Array.isArray(n))for(var o=0;o{"use strict";n.d(t,{m:()=>i});var i=function(){function e(e){var t=this;this._insertTag=function(e){var n;n=0===t.tags.length?t.prepend?t.container.firstChild:t.before:t.tags[t.tags.length-1].nextSibling,t.container.insertBefore(e,n),t.tags.push(e)},this.isSpeedy=void 0===e.speedy||e.speedy,this.tags=[],this.ctr=0,this.nonce=e.nonce,this.key=e.key,this.container=e.container,this.prepend=e.prepend,this.before=null}var t=e.prototype;return t.hydrate=function(e){e.forEach(this._insertTag)},t.insert=function(e){this.ctr%(this.isSpeedy?65e3:1)==0&&this._insertTag(function(e){var t=document.createElement("style");return t.setAttribute("data-emotion",e.key),void 0!==e.nonce&&t.setAttribute("nonce",e.nonce),t.appendChild(document.createTextNode("")),t.setAttribute("data-s",""),t}(this));var t=this.tags[this.tags.length-1];if(this.isSpeedy){var n=function(e){if(e.sheet)return e.sheet;for(var t=0;t{"use strict";function i(e,t,n){var i="";return n.split(" ").forEach((function(n){void 0!==e[n]?t.push(e[n]+";"):i+=n+" "})),i}n.d(t,{f:()=>i,M:()=>o});var o=function(e,t,n){var i=e.key+"-"+t.name;if(!1===n&&void 0===e.registered[i]&&(e.registered[i]=t.styles),void 0===e.inserted[t.name]){var o=t;do{e.insert(t===o?"."+i:"",o,e.sheet,!0),o=o.next}while(void 0!==o)}}},7463:(e,t,n)=>{"use strict";function i(e,t,n){const i={};return Object.keys(e).forEach((o=>{i[o]=e[o].reduce(((e,i)=>(i&&(n&&n[i]&&e.push(n[i]),e.push(t(i))),e)),[]).join(" ")})),i}n.d(t,{Z:()=>i})},3202:(e,t,n)=>{"use strict";n.d(t,{Z:()=>o});const i=e=>e,o=(()=>{let e=i;return{configure(t){e=t},generate:t=>e(t),reset(){e=i}}})()},1420:(e,t,n)=>{"use strict";n.d(t,{Z:()=>r});var i=n(3202);const o={active:"Mui-active",checked:"Mui-checked",completed:"Mui-completed",disabled:"Mui-disabled",error:"Mui-error",expanded:"Mui-expanded",focused:"Mui-focused",focusVisible:"Mui-focusVisible",required:"Mui-required",selected:"Mui-selected"};function r(e,t){return o[t]||`${i.Z.generate(e)}-${t}`}},1271:(e,t,n)=>{"use strict";n.d(t,{Z:()=>o});var i=n(1420);function o(e,t){const n={};return t.forEach((t=>{n[t]=(0,i.Z)(e,t)})),n}},1234:(e,t,n)=>{"use strict";var i=n(5318);t.Z=void 0;var o=i(n(4938)),r=n(5893),s=(0,o.default)((0,r.jsx)("path",{d:"M20 2h2v20h-2V2zM2 10h16V7H2v3zm6 7h10v-3H8v3z"}),"AlignHorizontalRight");t.Z=s},1499:(e,t,n)=>{"use strict";var i=n(5318);t.Z=void 0;var o=i(n(4938)),r=n(5893),s=(0,o.default)((0,r.jsx)("path",{d:"M12 1.95c-5.52 0-10 4.48-10 10s4.48 10 10 10h5v-2h-5c-4.34 0-8-3.66-8-8s3.66-8 8-8 8 3.66 8 8v1.43c0 .79-.71 1.57-1.5 1.57s-1.5-.78-1.5-1.57v-1.43c0-2.76-2.24-5-5-5s-5 2.24-5 5 2.24 5 5 5c1.38 0 2.64-.56 3.54-1.47.65.89 1.77 1.47 2.96 1.47 1.97 0 3.5-1.6 3.5-3.57v-1.43c0-5.52-4.48-10-10-10zm0 13c-1.66 0-3-1.34-3-3s1.34-3 3-3 3 1.34 3 3-1.34 3-3 3z"}),"AlternateEmailOutlined");t.Z=s},1098:(e,t,n)=>{"use strict";var i=n(5318);t.Z=void 0;var o=i(n(4938)),r=n(5893),s=(0,o.default)((0,r.jsx)("path",{d:"M19 3h-4.18C14.4 1.84 13.3 1 12 1c-1.3 0-2.4.84-2.82 2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-7 0c.55 0 1 .45 1 1s-.45 1-1 1-1-.45-1-1 .45-1 1-1zm2 14H7v-2h7v2zm3-4H7v-2h10v2zm0-4H7V7h10v2z"}),"Assignment");t.Z=s},5498:(e,t,n)=>{"use strict";var i=n(5318);t.Z=void 0;var o=i(n(4938)),r=n(5893),s=(0,o.default)((0,r.jsx)("path",{d:"M5 9.2h3V19H5zM10.6 5h2.8v14h-2.8zm5.6 8H19v6h-2.8z"}),"BarChart");t.Z=s},5709:(e,t,n)=>{"use strict";var i=n(5318);t.Z=void 0;var o=i(n(4938)),r=n(5893),s=(0,o.default)((0,r.jsx)("path",{d:"M3 13h8V3H3v10zm0 8h8v-6H3v6zm10 0h8V11h-8v10zm0-18v6h8V3h-8z"}),"Dashboard");t.Z=s},1075:(e,t,n)=>{"use strict";var i=n(5318);t.Z=void 0;var o=i(n(4938)),r=n(5893),s=(0,o.default)((0,r.jsx)("path",{d:"M9 11H7v2h2v-2zm4 0h-2v2h2v-2zm4 0h-2v2h2v-2zm2-7h-1V2h-2v2H8V2H6v2H5c-1.11 0-1.99.9-1.99 2L3 20c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm0 16H5V9h14v11z"}),"DateRange");t.Z=s},1054:(e,t,n)=>{"use strict";var i=n(5318);t.Z=void 0;var o=i(n(4938)),r=n(5893),s=(0,o.default)((0,r.jsx)("path",{d:"M19 15v4H5v-4h14m1-2H4c-.55 0-1 .45-1 1v6c0 .55.45 1 1 1h16c.55 0 1-.45 1-1v-6c0-.55-.45-1-1-1zM7 18.5c-.82 0-1.5-.67-1.5-1.5s.68-1.5 1.5-1.5 1.5.67 1.5 1.5-.67 1.5-1.5 1.5zM19 5v4H5V5h14m1-2H4c-.55 0-1 .45-1 1v6c0 .55.45 1 1 1h16c.55 0 1-.45 1-1V4c0-.55-.45-1-1-1zM7 8.5c-.82 0-1.5-.67-1.5-1.5S6.18 5.5 7 5.5s1.5.68 1.5 1.5S7.83 8.5 7 8.5z"}),"DnsOutlined");t.Z=s},6609:(e,t,n)=>{"use strict";var i=n(5318);t.Z=void 0;var o=i(n(4938)),r=n(5893),s=(0,o.default)((0,r.jsx)("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.42 0-8-3.58-8-8 0-1.85.63-3.55 1.69-4.9L16.9 18.31C15.55 19.37 13.85 20 12 20zm6.31-3.1L7.1 5.69C8.45 4.63 10.15 4 12 4c4.42 0 8 3.58 8 8 0 1.85-.63 3.55-1.69 4.9z"}),"DoNotDisturb");t.Z=s},4169:(e,t,n)=>{"use strict";var i=n(5318);t.Z=void 0;var o=i(n(4938)),r=n(5893),s=(0,o.default)((0,r.jsx)("path",{d:"M9.93 13.5h4.14L12 7.98zM20 2H4c-1.1 0-2 .9-2 2v16c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2zm-4.05 16.5-1.14-3H9.17l-1.12 3H5.96l5.11-13h1.86l5.11 13h-2.09z"}),"FontDownload");t.Z=s},5734:(e,t,n)=>{"use strict";var i=n(5318);t.Z=void 0;var o=i(n(4938)),r=n(5893),s=(0,o.default)((0,r.jsx)("path",{d:"M19 7v4H5.83l3.58-3.59L8 6l-6 6 6 6 1.41-1.41L5.83 13H21V7z"}),"KeyboardReturn");t.Z=s},6137:(e,t,n)=>{"use strict";var i=n(5318);t.Z=void 0;var o=i(n(4938)),r=n(5893),s=(0,o.default)((0,r.jsx)("path",{d:"M11.59 7.41 15.17 11H1v2h14.17l-3.59 3.59L13 18l6-6-6-6-1.41 1.41zM20 6v12h2V6h-2z"}),"KeyboardTab");t.Z=s},2403:(e,t,n)=>{"use strict";var i=n(5318);t.Z=void 0;var o=i(n(4938)),r=n(5893),s=(0,o.default)((0,r.jsx)("path",{d:"m11.99 18.54-7.37-5.73L3 14.07l9 7 9-7-1.63-1.27-7.38 5.74zM12 16l7.36-5.73L21 9l-9-7-9 7 1.63 1.27L12 16z"}),"Layers");t.Z=s},923:(e,t,n)=>{"use strict";var i=n(5318);t.Z=void 0;var o=i(n(4938)),r=n(5893),s=(0,o.default)((0,r.jsx)("path",{d:"M19 5v14H5V5h14m1.1-2H3.9c-.5 0-.9.4-.9.9v16.2c0 .4.4.9.9.9h16.2c.4 0 .9-.5.9-.9V3.9c0-.5-.5-.9-.9-.9zM11 7h6v2h-6V7zm0 4h6v2h-6v-2zm0 4h6v2h-6zM7 7h2v2H7zm0 4h2v2H7zm0 4h2v2H7z"}),"ListAlt");t.Z=s},3073:(e,t,n)=>{"use strict";var i=n(5318);t.Z=void 0;var o=i(n(4938)),r=n(5893),s=(0,o.default)([(0,r.jsx)("path",{d:"M5 8h2v8H5zm7 0H9c-.55 0-1 .45-1 1v6c0 .55.45 1 1 1h3c.55 0 1-.45 1-1V9c0-.55-.45-1-1-1zm-1 6h-1v-4h1v4zm7-6h-3c-.55 0-1 .45-1 1v6c0 .55.45 1 1 1h3c.55 0 1-.45 1-1V9c0-.55-.45-1-1-1zm-1 6h-1v-4h1v4z"},"0"),(0,r.jsx)("path",{d:"M2 4v16h20V4H2zm2 14V6h16v12H4z"},"1")],"Money");t.Z=s},8571:(e,t,n)=>{"use strict";var i=n(5318);t.Z=void 0;var o=i(n(4938)),r=n(5893),s=(0,o.default)((0,r.jsx)("path",{d:"M16 11c1.66 0 2.99-1.34 2.99-3S17.66 5 16 5c-1.66 0-3 1.34-3 3s1.34 3 3 3zm-8 0c1.66 0 2.99-1.34 2.99-3S9.66 5 8 5C6.34 5 5 6.34 5 8s1.34 3 3 3zm0 2c-2.33 0-7 1.17-7 3.5V19h14v-2.5c0-2.33-4.67-3.5-7-3.5zm8 0c-.29 0-.62.02-.97.05 1.16.84 1.97 1.97 1.97 3.45V19h6v-2.5c0-2.33-4.67-3.5-7-3.5z"}),"People");t.Z=s},1145:(e,t,n)=>{"use strict";var i=n(5318);t.Z=void 0;var o=i(n(4938)),r=n(5893),s=(0,o.default)((0,r.jsx)("path",{d:"M6.62 10.79c1.44 2.83 3.76 5.14 6.59 6.59l2.2-2.2c.27-.27.67-.36 1.02-.24 1.12.37 2.33.57 3.57.57.55 0 1 .45 1 1V20c0 .55-.45 1-1 1-9.39 0-17-7.61-17-17 0-.55.45-1 1-1h3.5c.55 0 1 .45 1 1 0 1.25.2 2.45.57 3.57.11.35.03.74-.25 1.02l-2.2 2.2z"}),"Phone");t.Z=s},5500:(e,t,n)=>{"use strict";var i=n(5318);t.Z=void 0;var o=i(n(4938)),r=n(5893),s=(0,o.default)((0,r.jsx)("path",{d:"M7 18c-1.1 0-1.99.9-1.99 2S5.9 22 7 22s2-.9 2-2-.9-2-2-2zM1 2v2h2l3.6 7.59-1.35 2.45c-.16.28-.25.61-.25.96 0 1.1.9 2 2 2h12v-2H7.42c-.14 0-.25-.11-.25-.25l.03-.12.9-1.63h7.45c.75 0 1.41-.41 1.75-1.03l3.58-6.49c.08-.14.12-.31.12-.48 0-.55-.45-1-1-1H5.21l-.94-2H1zm16 16c-1.1 0-1.99.9-1.99 2s.89 2 1.99 2 2-.9 2-2-.9-2-2-2z"}),"ShoppingCart");t.Z=s},322:(e,t,n)=>{"use strict";var i=n(5318);t.Z=void 0;var o=i(n(4938)),r=n(5893),s=(0,o.default)((0,r.jsx)("path",{d:"M11.99 2C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2zM12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8zm3.5-9c.83 0 1.5-.67 1.5-1.5S16.33 8 15.5 8 14 8.67 14 9.5s.67 1.5 1.5 1.5zm-7 0c.83 0 1.5-.67 1.5-1.5S9.33 8 8.5 8 7 8.67 7 9.5 7.67 11 8.5 11zm3.5 6.5c2.33 0 4.31-1.46 5.11-3.5H6.89c.8 2.04 2.78 3.5 5.11 3.5z"}),"TagFaces");t.Z=s},4938:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"default",{enumerable:!0,get:function(){return i.createSvgIcon}});var i=n(5637)},4345:(e,t,n)=>{"use strict";n.d(t,{Z:()=>ne});var i=n(7462),o=n(3366),r=n(9766),s=n(4869),a=n(1387),l=n(1796);const d={black:"#000",white:"#fff"},c={50:"#fafafa",100:"#f5f5f5",200:"#eeeeee",300:"#e0e0e0",400:"#bdbdbd",500:"#9e9e9e",600:"#757575",700:"#616161",800:"#424242",900:"#212121",A100:"#f5f5f5",A200:"#eeeeee",A400:"#bdbdbd",A700:"#616161"},h="#f3e5f5",u="#ce93d8",g="#ba68c8",p="#ab47bc",m="#9c27b0",f="#7b1fa2",_="#e57373",b="#ef5350",C="#f44336",v="#d32f2f",w="#c62828",y="#ffb74d",A="#ffa726",S="#ff9800",x="#f57c00",k="#e65100",L="#e3f2fd",E="#90caf9",N="#42a5f5",D="#1976d2",I="#1565c0",M="#4fc3f7",T="#29b6f6",R="#03a9f4",O="#0288d1",B="#01579b",P="#81c784",F="#66bb6a",W="#4caf50",z="#388e3c",V="#2e7d32",H="#1b5e20",j=["mode","contrastThreshold","tonalOffset"],$={text:{primary:"rgba(0, 0, 0, 0.87)",secondary:"rgba(0, 0, 0, 0.6)",disabled:"rgba(0, 0, 0, 0.38)"},divider:"rgba(0, 0, 0, 0.12)",background:{paper:d.white,default:d.white},action:{active:"rgba(0, 0, 0, 0.54)",hover:"rgba(0, 0, 0, 0.04)",hoverOpacity:.04,selected:"rgba(0, 0, 0, 0.08)",selectedOpacity:.08,disabled:"rgba(0, 0, 0, 0.26)",disabledBackground:"rgba(0, 0, 0, 0.12)",disabledOpacity:.38,focus:"rgba(0, 0, 0, 0.12)",focusOpacity:.12,activatedOpacity:.12}},U={text:{primary:d.white,secondary:"rgba(255, 255, 255, 0.7)",disabled:"rgba(255, 255, 255, 0.5)",icon:"rgba(255, 255, 255, 0.5)"},divider:"rgba(255, 255, 255, 0.12)",background:{paper:"#121212",default:"#121212"},action:{active:d.white,hover:"rgba(255, 255, 255, 0.08)",hoverOpacity:.08,selected:"rgba(255, 255, 255, 0.16)",selectedOpacity:.16,disabled:"rgba(255, 255, 255, 0.3)",disabledBackground:"rgba(255, 255, 255, 0.12)",disabledOpacity:.38,focus:"rgba(255, 255, 255, 0.12)",focusOpacity:.12,activatedOpacity:.24}};function Z(e,t,n,i){const o=i.light||i,r=i.dark||1.5*i;e[t]||(e.hasOwnProperty(n)?e[t]=e[n]:"light"===t?e.light=(0,l.$n)(e.main,o):"dark"===t&&(e.dark=(0,l._j)(e.main,r)))}const K=["fontFamily","fontSize","fontWeightLight","fontWeightRegular","fontWeightMedium","fontWeightBold","htmlFontSize","allVariants","pxToRem"],q={textTransform:"uppercase"},Y='"Roboto", "Helvetica", "Arial", sans-serif';function G(e,t){const n="function"==typeof t?t(e):t,{fontFamily:s=Y,fontSize:a=14,fontWeightLight:l=300,fontWeightRegular:d=400,fontWeightMedium:c=500,fontWeightBold:h=700,htmlFontSize:u=16,allVariants:g,pxToRem:p}=n,m=(0,o.Z)(n,K),f=a/14,_=p||(e=>e/u*f+"rem"),b=(e,t,n,o,r)=>{return(0,i.Z)({fontFamily:s,fontWeight:e,fontSize:_(t),lineHeight:n},s===Y?{letterSpacing:(a=o/t,Math.round(1e5*a)/1e5+"em")}:{},r,g);var a},C={h1:b(l,96,1.167,-1.5),h2:b(l,60,1.2,-.5),h3:b(d,48,1.167,0),h4:b(d,34,1.235,.25),h5:b(d,24,1.334,0),h6:b(c,20,1.6,.15),subtitle1:b(d,16,1.75,.15),subtitle2:b(c,14,1.57,.1),body1:b(d,16,1.5,.15),body2:b(d,14,1.43,.15),button:b(c,14,1.75,.4,q),caption:b(d,12,1.66,.4),overline:b(d,12,2.66,1,q)};return(0,r.Z)((0,i.Z)({htmlFontSize:u,pxToRem:_,fontFamily:s,fontSize:a,fontWeightLight:l,fontWeightRegular:d,fontWeightMedium:c,fontWeightBold:h},C),m,{clone:!1})}function Q(...e){return[`${e[0]}px ${e[1]}px ${e[2]}px ${e[3]}px rgba(0,0,0,0.2)`,`${e[4]}px ${e[5]}px ${e[6]}px ${e[7]}px rgba(0,0,0,0.14)`,`${e[8]}px ${e[9]}px ${e[10]}px ${e[11]}px rgba(0,0,0,0.12)`].join(",")}const X=["none",Q(0,2,1,-1,0,1,1,0,0,1,3,0),Q(0,3,1,-2,0,2,2,0,0,1,5,0),Q(0,3,3,-2,0,3,4,0,0,1,8,0),Q(0,2,4,-1,0,4,5,0,0,1,10,0),Q(0,3,5,-1,0,5,8,0,0,1,14,0),Q(0,3,5,-1,0,6,10,0,0,1,18,0),Q(0,4,5,-2,0,7,10,1,0,2,16,1),Q(0,5,5,-3,0,8,10,1,0,3,14,2),Q(0,5,6,-3,0,9,12,1,0,3,16,2),Q(0,6,6,-3,0,10,14,1,0,4,18,3),Q(0,6,7,-4,0,11,15,1,0,4,20,3),Q(0,7,8,-4,0,12,17,2,0,5,22,4),Q(0,7,8,-4,0,13,19,2,0,5,24,4),Q(0,7,9,-4,0,14,21,2,0,5,26,4),Q(0,8,9,-5,0,15,22,2,0,6,28,5),Q(0,8,10,-5,0,16,24,2,0,6,30,5),Q(0,8,11,-5,0,17,26,2,0,6,32,5),Q(0,9,11,-5,0,18,28,2,0,7,34,6),Q(0,9,12,-6,0,19,29,2,0,7,36,6),Q(0,10,13,-6,0,20,31,3,0,8,38,7),Q(0,10,13,-6,0,21,33,3,0,8,40,7),Q(0,10,14,-6,0,22,35,3,0,8,42,7),Q(0,11,14,-7,0,23,36,3,0,9,44,8),Q(0,11,15,-7,0,24,38,3,0,9,46,8)];var J=n(6067);const ee={mobileStepper:1e3,speedDial:1050,appBar:1100,drawer:1200,modal:1300,snackbar:1400,tooltip:1500},te=["breakpoints","mixins","spacing","palette","transitions","typography","shape"];const ne=function(e={},...t){const{mixins:n={},palette:K={},transitions:q={},typography:Y={}}=e,Q=(0,o.Z)(e,te),ne=function(e){const{mode:t="light",contrastThreshold:n=3,tonalOffset:s=.2}=e,K=(0,o.Z)(e,j),q=e.primary||function(e="light"){return"dark"===e?{main:E,light:L,dark:N}:{main:D,light:N,dark:I}}(t),Y=e.secondary||function(e="light"){return"dark"===e?{main:u,light:h,dark:p}:{main:m,light:g,dark:f}}(t),G=e.error||function(e="light"){return"dark"===e?{main:C,light:_,dark:v}:{main:v,light:b,dark:w}}(t),Q=e.info||function(e="light"){return"dark"===e?{main:T,light:M,dark:O}:{main:O,light:R,dark:B}}(t),X=e.success||function(e="light"){return"dark"===e?{main:F,light:P,dark:z}:{main:V,light:W,dark:H}}(t),J=e.warning||function(e="light"){return"dark"===e?{main:A,light:y,dark:x}:{main:"#ED6C02",light:S,dark:k}}(t);function ee(e){return(0,l.mi)(e,U.text.primary)>=n?U.text.primary:$.text.primary}const te=({color:e,name:t,mainShade:n=500,lightShade:o=300,darkShade:r=700})=>{if(!(e=(0,i.Z)({},e)).main&&e[n]&&(e.main=e[n]),!e.hasOwnProperty("main"))throw new Error((0,a.Z)(11,t?` (${t})`:"",n));if("string"!=typeof e.main)throw new Error((0,a.Z)(12,t?` (${t})`:"",JSON.stringify(e.main)));return Z(e,"light",o,s),Z(e,"dark",r,s),e.contrastText||(e.contrastText=ee(e.main)),e},ne={dark:U,light:$};return(0,r.Z)((0,i.Z)({common:d,mode:t,primary:te({color:q,name:"primary"}),secondary:te({color:Y,name:"secondary",mainShade:"A400",lightShade:"A200",darkShade:"A700"}),error:te({color:G,name:"error"}),warning:te({color:J,name:"warning"}),info:te({color:Q,name:"info"}),success:te({color:X,name:"success"}),grey:c,contrastThreshold:n,getContrastText:ee,augmentColor:te,tonalOffset:s},ne[t]),K)}(K),ie=(0,s.Z)(e);let oe=(0,r.Z)(ie,{mixins:(re=ie.breakpoints,ie.spacing,se=n,(0,i.Z)({toolbar:{minHeight:56,[`${re.up("xs")} and (orientation: landscape)`]:{minHeight:48},[re.up("sm")]:{minHeight:64}}},se)),palette:ne,shadows:X.slice(),typography:G(ne,Y),transitions:(0,J.ZP)(q),zIndex:(0,i.Z)({},ee)});var re,se;return oe=(0,r.Z)(oe,Q),oe=t.reduce(((e,t)=>(0,r.Z)(e,t)),oe),oe}},6067:(e,t,n)=>{"use strict";n.d(t,{x9:()=>a,ZP:()=>c});var i=n(3366),o=n(7462);const r=["duration","easing","delay"],s={easeInOut:"cubic-bezier(0.4, 0, 0.2, 1)",easeOut:"cubic-bezier(0.0, 0, 0.2, 1)",easeIn:"cubic-bezier(0.4, 0, 1, 1)",sharp:"cubic-bezier(0.4, 0, 0.6, 1)"},a={shortest:150,shorter:200,short:250,standard:300,complex:375,enteringScreen:225,leavingScreen:195};function l(e){return`${Math.round(e)}ms`}function d(e){if(!e)return 0;const t=e/36;return Math.round(10*(4+15*t**.25+t/5))}function c(e){const t=(0,o.Z)({},s,e.easing),n=(0,o.Z)({},a,e.duration);return(0,o.Z)({getAutoHeightDuration:d,create:(e=["all"],o={})=>{const{duration:s=n.standard,easing:a=t.easeInOut,delay:d=0}=o;return(0,i.Z)(o,r),(Array.isArray(e)?e:[e]).map((e=>`${e} ${"string"==typeof s?s:l(s)} ${a} ${"string"==typeof d?d:l(d)}`)).join(",")}},e,{easing:t,duration:n})}},247:(e,t,n)=>{"use strict";n.d(t,{Z:()=>i});const i=(0,n(4345).Z)()},9602:(e,t,n)=>{"use strict";n.d(t,{ZP:()=>y,FO:()=>C,Dz:()=>v});var i=n(7462),o=n(3366),r=n(9868),s=n(4869),a=n(6523),l=n(8320);const d=["variant"];function c(e){return 0===e.length}function h(e){const{variant:t}=e,n=(0,o.Z)(e,d);let i=t||"";return Object.keys(n).sort().forEach((t=>{i+="color"===t?c(i)?e[t]:(0,l.Z)(e[t]):`${c(i)?t:(0,l.Z)(t)}${(0,l.Z)(e[t].toString())}`})),i}const u=["name","slot","skipVariantsResolver","skipSx","overridesResolver"],g=["theme"],p=["theme"];function m(e){return 0===Object.keys(e).length}function f(e){return"ownerState"!==e&&"theme"!==e&&"sx"!==e&&"as"!==e}const _=(0,s.Z)();var b=n(247);const C=e=>f(e)&&"classes"!==e,v=f,w=function(e={}){const{defaultTheme:t=_,rootShouldForwardProp:n=f,slotShouldForwardProp:s=f}=e;return(e,l={})=>{const{name:d,slot:c,skipVariantsResolver:_,skipSx:b,overridesResolver:C}=l,v=(0,o.Z)(l,u),w=void 0!==_?_:c&&"Root"!==c||!1,y=b||!1;let A=f;"Root"===c?A=n:c&&(A=s);const S=(0,r.ZP)(e,(0,i.Z)({shouldForwardProp:A,label:void 0},v));return(e,...n)=>{const r=n?n.map((e=>"function"==typeof e&&e.__emotion_real!==e?n=>{let{theme:r}=n,s=(0,o.Z)(n,g);return e((0,i.Z)({theme:m(r)?t:r},s))}:e)):[];let s=e;d&&C&&r.push((e=>{const n=m(e.theme)?t:e.theme,i=((e,t)=>t.components&&t.components[e]&&t.components[e].styleOverrides?t.components[e].styleOverrides:null)(d,n);return i?C(e,i):null})),d&&!w&&r.push((e=>{const n=m(e.theme)?t:e.theme;return((e,t,n,i)=>{var o,r;const{ownerState:s={}}=e,a=[],l=null==n||null==(o=n.components)||null==(r=o[i])?void 0:r.variants;return l&&l.forEach((n=>{let i=!0;Object.keys(n.props).forEach((t=>{s[t]!==n.props[t]&&e[t]!==n.props[t]&&(i=!1)})),i&&a.push(t[h(n.props)])})),a})(e,((e,t)=>{let n=[];t&&t.components&&t.components[e]&&t.components[e].variants&&(n=t.components[e].variants);const i={};return n.forEach((e=>{const t=h(e.props);i[t]=e.style})),i})(d,n),n,d)})),y||r.push((e=>{const n=m(e.theme)?t:e.theme;return(0,a.Z)((0,i.Z)({},e,{theme:n}))}));const l=r.length-n.length;if(Array.isArray(e)&&l>0){const t=new Array(l).fill("");s=[...e,...t],s.raw=[...e.raw,...t]}else"function"==typeof e&&(s=n=>{let{theme:r}=n,s=(0,o.Z)(n,p);return e((0,i.Z)({theme:m(r)?t:r},s))});return S(s,...r)}}}({defaultTheme:b.Z,rootShouldForwardProp:C}),y=w},6122:(e,t,n)=>{"use strict";n.d(t,{Z:()=>s});var i=n(7462),o=n(6631);var r=n(247);function s({props:e,name:t}){return function({props:e,name:t,defaultTheme:n}){const r=function(e){const{theme:t,name:n,props:o}=e;if(!(t&&t.components&&t.components[n]&&t.components[n].defaultProps))return o;const r=(0,i.Z)({},o),s=t.components[n].defaultProps;let a;for(a in s)void 0===r[a]&&(r[a]=s[a]);return r}({theme:(0,o.Z)(n),name:t,props:e});return r}({props:e,name:t,defaultTheme:r.Z})}},1220:(e,t,n)=>{"use strict";n.d(t,{Z:()=>i});const i=n(8320).Z},5949:(e,t,n)=>{"use strict";n.d(t,{Z:()=>b});var i=n(7462),o=n(7294),r=n(3366),s=(n(5697),n(6010)),a=n(7463),l=n(1220),d=n(6122),c=n(9602),h=n(1420);function u(e){return(0,h.Z)("MuiSvgIcon",e)}(0,n(1271).Z)("MuiSvgIcon",["root","colorPrimary","colorSecondary","colorAction","colorError","colorDisabled","fontSizeInherit","fontSizeSmall","fontSizeMedium","fontSizeLarge"]);var g=n(5893);const p=["children","className","color","component","fontSize","htmlColor","titleAccess","viewBox"],m=(0,c.ZP)("svg",{name:"MuiSvgIcon",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,"inherit"!==n.color&&t[`color${(0,l.Z)(n.color)}`],t[`fontSize${(0,l.Z)(n.fontSize)}`]]}})((({theme:e,ownerState:t})=>{var n,i;return{userSelect:"none",width:"1em",height:"1em",display:"inline-block",fill:"currentColor",flexShrink:0,transition:e.transitions.create("fill",{duration:e.transitions.duration.shorter}),fontSize:{inherit:"inherit",small:e.typography.pxToRem(20),medium:e.typography.pxToRem(24),large:e.typography.pxToRem(35)}[t.fontSize],color:null!=(n=null==(i=e.palette[t.color])?void 0:i.main)?n:{action:e.palette.action.active,disabled:e.palette.action.disabled,inherit:void 0}[t.color]}})),f=o.forwardRef((function(e,t){const n=(0,d.Z)({props:e,name:"MuiSvgIcon"}),{children:o,className:c,color:h="inherit",component:f="svg",fontSize:_="medium",htmlColor:b,titleAccess:C,viewBox:v="0 0 24 24"}=n,w=(0,r.Z)(n,p),y=(0,i.Z)({},n,{color:h,component:f,fontSize:_,viewBox:v}),A=(e=>{const{color:t,fontSize:n,classes:i}=e,o={root:["root","inherit"!==t&&`color${(0,l.Z)(t)}`,`fontSize${(0,l.Z)(n)}`]};return(0,a.Z)(o,u,i)})(y);return(0,g.jsxs)(m,(0,i.Z)({as:f,className:(0,s.Z)(A.root,c),ownerState:y,focusable:"false",viewBox:v,color:b,"aria-hidden":!C||void 0,role:C?"img":void 0,ref:t},w,{children:[o,C?(0,g.jsx)("title",{children:C}):null]}))}));f.muiName="SvgIcon";const _=f;function b(e,t){const n=(n,o)=>(0,g.jsx)(_,(0,i.Z)({"data-testid":`${t}Icon`,ref:o},n,{children:e}));return n.muiName=_.muiName,o.memo(o.forwardRef(n))}},7144:(e,t,n)=>{"use strict";n.d(t,{Z:()=>i});const i=n(7596).Z},5637:(e,t,n)=>{"use strict";n.r(t),n.d(t,{capitalize:()=>i.Z,createChainedFunction:()=>o,createSvgIcon:()=>r.Z,debounce:()=>s.Z,deprecatedPropType:()=>a,isMuiElement:()=>l.Z,ownerDocument:()=>d.Z,ownerWindow:()=>c.Z,requirePropFactory:()=>h,setRef:()=>u,unstable_ClassNameGenerator:()=>w.Z,unstable_useEnhancedEffect:()=>g.Z,unstable_useId:()=>m,unsupportedProp:()=>f,useControlled:()=>_.Z,useEventCallback:()=>b.Z,useForkRef:()=>C.Z,useIsFocusVisible:()=>v.Z});var i=n(1220);const o=n(9064).Z;var r=n(5949),s=n(7144);const a=function(e,t){return()=>null};var l=n(8502),d=n(8038),c=n(5340);n(7462);const h=function(e,t){return()=>null},u=n(7960).Z;var g=n(8974),p=n(7294);const m=function(e){const[t,n]=p.useState(e),i=e||t;return p.useEffect((()=>{null==t&&n(`mui-${Math.round(1e9*Math.random())}`)}),[t]),i},f=function(e,t,n,i,o){return null};var _=n(2893),b=n(2068),C=n(1705),v=n(3511),w=n(3202)},8502:(e,t,n)=>{"use strict";n.d(t,{Z:()=>o});var i=n(7294);const o=function(e,t){return i.isValidElement(e)&&-1!==t.indexOf(e.type.muiName)}},8038:(e,t,n)=>{"use strict";n.d(t,{Z:()=>i});const i=n(7094).Z},5340:(e,t,n)=>{"use strict";n.d(t,{Z:()=>i});const i=n(8290).Z},2893:(e,t,n)=>{"use strict";n.d(t,{Z:()=>o});var i=n(7294);const o=function({controlled:e,default:t,name:n,state:o="value"}){const{current:r}=i.useRef(void 0!==e),[s,a]=i.useState(t);return[r?e:s,i.useCallback((e=>{r||a(e)}),[])]}},8974:(e,t,n)=>{"use strict";n.d(t,{Z:()=>i});const i=n(6600).Z},2068:(e,t,n)=>{"use strict";n.d(t,{Z:()=>i});const i=n(3633).Z},1705:(e,t,n)=>{"use strict";n.d(t,{Z:()=>i});const i=n(67).Z},3511:(e,t,n)=>{"use strict";n.d(t,{Z:()=>h});var i=n(7294);let o=!0,r=!1,s=null;const a={text:!0,search:!0,url:!0,tel:!0,email:!0,password:!0,number:!0,date:!0,month:!0,week:!0,time:!0,datetime:!0,"datetime-local":!0};function l(e){e.metaKey||e.altKey||e.ctrlKey||(o=!0)}function d(){o=!1}function c(){"hidden"===this.visibilityState&&r&&(o=!0)}const h=function(){const e=i.useCallback((e=>{var t;null!=e&&((t=e.ownerDocument).addEventListener("keydown",l,!0),t.addEventListener("mousedown",d,!0),t.addEventListener("pointerdown",d,!0),t.addEventListener("touchstart",d,!0),t.addEventListener("visibilitychange",c,!0))}),[]),t=i.useRef(!1);return{isFocusVisibleRef:t,onFocus:function(e){return!!function(e){const{target:t}=e;try{return t.matches(":focus-visible")}catch(e){}return o||function(e){const{type:t,tagName:n}=e;return!("INPUT"!==n||!a[t]||e.readOnly)||"TEXTAREA"===n&&!e.readOnly||!!e.isContentEditable}(t)}(e)&&(t.current=!0,!0)},onBlur:function(){return!!t.current&&(r=!0,window.clearTimeout(s),s=window.setTimeout((()=>{r=!1}),100),t.current=!1,!0)},ref:e}}},4819:(e,t,n)=>{"use strict";n.d(t,{Z:()=>i});const i=n(7294).createContext(null)},6760:(e,t,n)=>{"use strict";n.d(t,{Z:()=>r});var i=n(7294),o=n(4819);function r(){return i.useContext(o.Z)}},9868:(e,t,n)=>{"use strict";n.d(t,{ZP:()=>_});var i=n(7294),o=n(7462),r=n(7866),s=/^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|download|draggable|encType|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|translate|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|fallback|inert|itemProp|itemScope|itemType|itemID|itemRef|on|option|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/;const a=(0,r.Z)((function(e){return s.test(e)||111===e.charCodeAt(0)&&110===e.charCodeAt(1)&&e.charCodeAt(2)<91}));var l=n(4759),d=n(444),c=n(4199),h=a,u=function(e){return"theme"!==e},g=function(e){return"string"==typeof e&&e.charCodeAt(0)>96?h:u},p=function(e,t,n){var i;if(t){var o=t.shouldForwardProp;i=e.__emotion_forwardProp&&o?function(t){return e.__emotion_forwardProp(t)&&o(t)}:o}return"function"!=typeof i&&n&&(i=e.__emotion_forwardProp),i};var m=function e(t,n){var r,s,a=t.__emotion_real===t,h=a&&t.__emotion_base||t;void 0!==n&&(r=n.label,s=n.target);var u=p(t,n,a),m=u||g(h),f=!m("as");return function(){var _=arguments,b=a&&void 0!==t.__emotion_styles?t.__emotion_styles.slice(0):[];if(void 0!==r&&b.push("label:"+r+";"),null==_[0]||void 0===_[0].raw)b.push.apply(b,_);else{b.push(_[0][0]);for(var C=_.length,v=1;v{"use strict";n.d(t,{VO:()=>i,k9:()=>r,W8:()=>s,L7:()=>a,P$:()=>l}),n(5697);const i={xs:0,sm:600,md:900,lg:1200,xl:1536},o={keys:["xs","sm","md","lg","xl"],up:e=>`@media (min-width:${i[e]}px)`};function r(e,t,n){const r=e.theme||{};if(Array.isArray(t)){const e=r.breakpoints||o;return t.reduce(((i,o,r)=>(i[e.up(e.keys[r])]=n(t[r]),i)),{})}if("object"==typeof t){const e=r.breakpoints||o;return Object.keys(t).reduce(((o,r)=>{if(-1!==Object.keys(e.values||i).indexOf(r))o[e.up(r)]=n(t[r],r);else{const e=r;o[e]=t[e]}return o}),{})}return n(t)}function s(e={}){var t;return(null==e||null==(t=e.keys)?void 0:t.reduce(((t,n)=>(t[e.up(n)]={},t)),{}))||{}}function a(e,t){return e.reduce(((e,t)=>{const n=e[t];return 0===Object.keys(n).length&&delete e[t],e}),t)}function l({values:e,base:t}){const n=Object.keys(t);if(0===n.length)return e;let i;return n.reduce(((t,n)=>(t[n]="object"==typeof e?null!=e[n]?e[n]:e[i]:e,i=n,t)),{})}},1796:(e,t,n)=>{"use strict";n.d(t,{mi:()=>l,Fq:()=>d,_j:()=>c,$n:()=>h});var i=n(1387);function o(e,t=0,n=1){return Math.min(Math.max(t,e),n)}function r(e){if(e.type)return e;if("#"===e.charAt(0))return r(function(e){e=e.substr(1);const t=new RegExp(`.{1,${e.length>=6?2:1}}`,"g");let n=e.match(t);return n&&1===n[0].length&&(n=n.map((e=>e+e))),n?`rgb${4===n.length?"a":""}(${n.map(((e,t)=>t<3?parseInt(e,16):Math.round(parseInt(e,16)/255*1e3)/1e3)).join(", ")})`:""}(e));const t=e.indexOf("("),n=e.substring(0,t);if(-1===["rgb","rgba","hsl","hsla","color"].indexOf(n))throw new Error((0,i.Z)(9,e));let o,s=e.substring(t+1,e.length-1);if("color"===n){if(s=s.split(" "),o=s.shift(),4===s.length&&"/"===s[3].charAt(0)&&(s[3]=s[3].substr(1)),-1===["srgb","display-p3","a98-rgb","prophoto-rgb","rec-2020"].indexOf(o))throw new Error((0,i.Z)(10,o))}else s=s.split(",");return s=s.map((e=>parseFloat(e))),{type:n,values:s,colorSpace:o}}function s(e){const{type:t,colorSpace:n}=e;let{values:i}=e;return-1!==t.indexOf("rgb")?i=i.map(((e,t)=>t<3?parseInt(e,10):e)):-1!==t.indexOf("hsl")&&(i[1]=`${i[1]}%`,i[2]=`${i[2]}%`),i=-1!==t.indexOf("color")?`${n} ${i.join(" ")}`:`${i.join(", ")}`,`${t}(${i})`}function a(e){let t="hsl"===(e=r(e)).type?r(function(e){e=r(e);const{values:t}=e,n=t[0],i=t[1]/100,o=t[2]/100,a=i*Math.min(o,1-o),l=(e,t=(e+n/30)%12)=>o-a*Math.max(Math.min(t-3,9-t,1),-1);let d="rgb";const c=[Math.round(255*l(0)),Math.round(255*l(8)),Math.round(255*l(4))];return"hsla"===e.type&&(d+="a",c.push(t[3])),s({type:d,values:c})}(e)).values:e.values;return t=t.map((t=>("color"!==e.type&&(t/=255),t<=.03928?t/12.92:((t+.055)/1.055)**2.4))),Number((.2126*t[0]+.7152*t[1]+.0722*t[2]).toFixed(3))}function l(e,t){const n=a(e),i=a(t);return(Math.max(n,i)+.05)/(Math.min(n,i)+.05)}function d(e,t){return e=r(e),t=o(t),"rgb"!==e.type&&"hsl"!==e.type||(e.type+="a"),"color"===e.type?e.values[3]=`/${t}`:e.values[3]=t,s(e)}function c(e,t){if(e=r(e),t=o(t),-1!==e.type.indexOf("hsl"))e.values[2]*=1-t;else if(-1!==e.type.indexOf("rgb")||-1!==e.type.indexOf("color"))for(let n=0;n<3;n+=1)e.values[n]*=1-t;return s(e)}function h(e,t){if(e=r(e),t=o(t),-1!==e.type.indexOf("hsl"))e.values[2]+=(100-e.values[2])*t;else if(-1!==e.type.indexOf("rgb"))for(let n=0;n<3;n+=1)e.values[n]+=(255-e.values[n])*t;else if(-1!==e.type.indexOf("color"))for(let n=0;n<3;n+=1)e.values[n]+=(1-e.values[n])*t;return s(e)}},4869:(e,t,n)=>{"use strict";n.d(t,{Z:()=>c});var i=n(7462),o=n(3366),r=n(9766);const s=["values","unit","step"],a={borderRadius:4};var l=n(2605);const d=["breakpoints","palette","spacing","shape"],c=function(e={},...t){const{breakpoints:n={},palette:c={},spacing:h,shape:u={}}=e,g=(0,o.Z)(e,d),p=function(e){const{values:t={xs:0,sm:600,md:900,lg:1200,xl:1536},unit:n="px",step:r=5}=e,a=(0,o.Z)(e,s),l=Object.keys(t);function d(e){return`@media (min-width:${"number"==typeof t[e]?t[e]:e}${n})`}function c(e,i){const o=l.indexOf(i);return`@media (min-width:${"number"==typeof t[e]?t[e]:e}${n}) and (max-width:${(-1!==o&&"number"==typeof t[l[o]]?t[l[o]]:i)-r/100}${n})`}return(0,i.Z)({keys:l,values:t,up:d,down:function(e){return`@media (max-width:${("number"==typeof t[e]?t[e]:e)-r/100}${n})`},between:c,only:function(e){return l.indexOf(e)+1(0===e.length?[1]:e).map((e=>{const n=t(e);return"number"==typeof n?`${n}px`:n})).join(" ");return n.mui=!0,n}(h);let f=(0,r.Z)({breakpoints:p,direction:"ltr",components:{},palette:(0,i.Z)({mode:"light"},c),spacing:m,shape:(0,i.Z)({},a,u)},g);return f=t.reduce(((e,t)=>(0,r.Z)(e,t)),f),f}},4178:(e,t,n)=>{"use strict";n.d(t,{Z:()=>Y,G:()=>q});var i=n(4844),o=n(7730);const r=function(...e){const t=e.reduce(((e,t)=>(t.filterProps.forEach((n=>{e[n]=t})),e)),{}),n=e=>Object.keys(e).reduce(((n,i)=>t[i]?(0,o.Z)(n,t[i](e)):n),{});return n.propTypes={},n.filterProps=e.reduce(((e,t)=>e.concat(t.filterProps)),[]),n};var s=n(2605),a=n(9263);function l(e){return"number"!=typeof e?e:`${e}px solid`}const d=(0,i.Z)({prop:"border",themeKey:"borders",transform:l}),c=(0,i.Z)({prop:"borderTop",themeKey:"borders",transform:l}),h=(0,i.Z)({prop:"borderRight",themeKey:"borders",transform:l}),u=(0,i.Z)({prop:"borderBottom",themeKey:"borders",transform:l}),g=(0,i.Z)({prop:"borderLeft",themeKey:"borders",transform:l}),p=(0,i.Z)({prop:"borderColor",themeKey:"palette"}),m=(0,i.Z)({prop:"borderTopColor",themeKey:"palette"}),f=(0,i.Z)({prop:"borderRightColor",themeKey:"palette"}),_=(0,i.Z)({prop:"borderBottomColor",themeKey:"palette"}),b=(0,i.Z)({prop:"borderLeftColor",themeKey:"palette"}),C=e=>{if(void 0!==e.borderRadius&&null!==e.borderRadius){const t=(0,s.eI)(e.theme,"shape.borderRadius",4,"borderRadius"),n=e=>({borderRadius:(0,s.NA)(t,e)});return(0,a.k9)(e,e.borderRadius,n)}return null};C.propTypes={},C.filterProps=["borderRadius"];const v=r(d,c,h,u,g,p,m,f,_,b,C),w=r((0,i.Z)({prop:"displayPrint",cssProperty:!1,transform:e=>({"@media print":{display:e}})}),(0,i.Z)({prop:"display"}),(0,i.Z)({prop:"overflow"}),(0,i.Z)({prop:"textOverflow"}),(0,i.Z)({prop:"visibility"}),(0,i.Z)({prop:"whiteSpace"})),y=r((0,i.Z)({prop:"flexBasis"}),(0,i.Z)({prop:"flexDirection"}),(0,i.Z)({prop:"flexWrap"}),(0,i.Z)({prop:"justifyContent"}),(0,i.Z)({prop:"alignItems"}),(0,i.Z)({prop:"alignContent"}),(0,i.Z)({prop:"order"}),(0,i.Z)({prop:"flex"}),(0,i.Z)({prop:"flexGrow"}),(0,i.Z)({prop:"flexShrink"}),(0,i.Z)({prop:"alignSelf"}),(0,i.Z)({prop:"justifyItems"}),(0,i.Z)({prop:"justifySelf"})),A=e=>{if(void 0!==e.gap&&null!==e.gap){const t=(0,s.eI)(e.theme,"spacing",8,"gap"),n=e=>({gap:(0,s.NA)(t,e)});return(0,a.k9)(e,e.gap,n)}return null};A.propTypes={},A.filterProps=["gap"];const S=e=>{if(void 0!==e.columnGap&&null!==e.columnGap){const t=(0,s.eI)(e.theme,"spacing",8,"columnGap"),n=e=>({columnGap:(0,s.NA)(t,e)});return(0,a.k9)(e,e.columnGap,n)}return null};S.propTypes={},S.filterProps=["columnGap"];const x=e=>{if(void 0!==e.rowGap&&null!==e.rowGap){const t=(0,s.eI)(e.theme,"spacing",8,"rowGap"),n=e=>({rowGap:(0,s.NA)(t,e)});return(0,a.k9)(e,e.rowGap,n)}return null};x.propTypes={},x.filterProps=["rowGap"];const k=r(A,S,x,(0,i.Z)({prop:"gridColumn"}),(0,i.Z)({prop:"gridRow"}),(0,i.Z)({prop:"gridAutoFlow"}),(0,i.Z)({prop:"gridAutoColumns"}),(0,i.Z)({prop:"gridAutoRows"}),(0,i.Z)({prop:"gridTemplateColumns"}),(0,i.Z)({prop:"gridTemplateRows"}),(0,i.Z)({prop:"gridTemplateAreas"}),(0,i.Z)({prop:"gridArea"})),L=r((0,i.Z)({prop:"position"}),(0,i.Z)({prop:"zIndex",themeKey:"zIndex"}),(0,i.Z)({prop:"top"}),(0,i.Z)({prop:"right"}),(0,i.Z)({prop:"bottom"}),(0,i.Z)({prop:"left"})),E=r((0,i.Z)({prop:"color",themeKey:"palette"}),(0,i.Z)({prop:"bgcolor",cssProperty:"backgroundColor",themeKey:"palette"}),(0,i.Z)({prop:"backgroundColor",themeKey:"palette"})),N=(0,i.Z)({prop:"boxShadow",themeKey:"shadows"});function D(e){return e<=1&&0!==e?100*e+"%":e}const I=(0,i.Z)({prop:"width",transform:D}),M=e=>{if(void 0!==e.maxWidth&&null!==e.maxWidth){const t=t=>{var n,i,o;return{maxWidth:(null==(n=e.theme)||null==(i=n.breakpoints)||null==(o=i.values)?void 0:o[t])||a.VO[t]||D(t)}};return(0,a.k9)(e,e.maxWidth,t)}return null};M.filterProps=["maxWidth"];const T=(0,i.Z)({prop:"minWidth",transform:D}),R=(0,i.Z)({prop:"height",transform:D}),O=(0,i.Z)({prop:"maxHeight",transform:D}),B=(0,i.Z)({prop:"minHeight",transform:D}),P=((0,i.Z)({prop:"size",cssProperty:"width",transform:D}),(0,i.Z)({prop:"size",cssProperty:"height",transform:D}),r(I,M,T,R,O,B,(0,i.Z)({prop:"boxSizing"}))),F=(0,i.Z)({prop:"fontFamily",themeKey:"typography"}),W=(0,i.Z)({prop:"fontSize",themeKey:"typography"}),z=(0,i.Z)({prop:"fontStyle",themeKey:"typography"}),V=(0,i.Z)({prop:"fontWeight",themeKey:"typography"}),H=(0,i.Z)({prop:"letterSpacing"}),j=(0,i.Z)({prop:"lineHeight"}),$=(0,i.Z)({prop:"textAlign"}),U=r((0,i.Z)({prop:"typography",cssProperty:!1,themeKey:"typography"}),F,W,z,V,H,j,$),Z={borders:v.filterProps,display:w.filterProps,flexbox:y.filterProps,grid:k.filterProps,positions:L.filterProps,palette:E.filterProps,shadows:N.filterProps,sizing:P.filterProps,spacing:s.ZP.filterProps,typography:U.filterProps},K={borders:v,display:w,flexbox:y,grid:k,positions:L,palette:E,shadows:N,sizing:P,spacing:s.ZP,typography:U},q=Object.keys(Z).reduce(((e,t)=>(Z[t].forEach((n=>{e[n]=K[t]})),e)),{}),Y=function(e,t,n){const i={[e]:t,theme:n},o=q[e];return o?o(i):{[e]:t}}},7730:(e,t,n)=>{"use strict";n.d(t,{Z:()=>o});var i=n(9766);const o=function(e,t){return t?(0,i.Z)(e,t,{clone:!1}):e}},2605:(e,t,n)=>{"use strict";n.d(t,{hB:()=>p,eI:()=>g,ZP:()=>v,NA:()=>m});var i=n(9263),o=n(4844),r=n(7730);const s={m:"margin",p:"padding"},a={t:"Top",r:"Right",b:"Bottom",l:"Left",x:["Left","Right"],y:["Top","Bottom"]},l={marginX:"mx",marginY:"my",paddingX:"px",paddingY:"py"},d=function(e){const t={};return e=>(void 0===t[e]&&(t[e]=(e=>{if(e.length>2){if(!l[e])return[e];e=l[e]}const[t,n]=e.split(""),i=s[t],o=a[n]||"";return Array.isArray(o)?o.map((e=>i+e)):[i+o]})(e)),t[e])}(),c=["m","mt","mr","mb","ml","mx","my","margin","marginTop","marginRight","marginBottom","marginLeft","marginX","marginY","marginInline","marginInlineStart","marginInlineEnd","marginBlock","marginBlockStart","marginBlockEnd"],h=["p","pt","pr","pb","pl","px","py","padding","paddingTop","paddingRight","paddingBottom","paddingLeft","paddingX","paddingY","paddingInline","paddingInlineStart","paddingInlineEnd","paddingBlock","paddingBlockStart","paddingBlockEnd"],u=[...c,...h];function g(e,t,n,i){const r=(0,o.D)(e,t)||n;return"number"==typeof r?e=>"string"==typeof e?e:r*e:Array.isArray(r)?e=>"string"==typeof e?e:r[e]:"function"==typeof r?r:()=>{}}function p(e){return g(e,"spacing",8)}function m(e,t){if("string"==typeof t||null==t)return t;const n=e(Math.abs(t));return t>=0?n:"number"==typeof n?-n:`-${n}`}function f(e,t){const n=p(e.theme);return Object.keys(e).map((o=>function(e,t,n,o){if(-1===t.indexOf(n))return null;const r=function(e,t){return n=>e.reduce(((e,i)=>(e[i]=m(t,n),e)),{})}(d(n),o),s=e[n];return(0,i.k9)(e,s,r)}(e,t,o,n))).reduce(r.Z,{})}function _(e){return f(e,c)}function b(e){return f(e,h)}function C(e){return f(e,u)}_.propTypes={},_.filterProps=c,b.propTypes={},b.filterProps=h,C.propTypes={},C.filterProps=u;const v=C},4844:(e,t,n)=>{"use strict";n.d(t,{D:()=>r,Z:()=>a});var i=n(8320),o=n(9263);function r(e,t){return t&&"string"==typeof t?t.split(".").reduce(((e,t)=>e&&e[t]?e[t]:null),e):null}function s(e,t,n,i=n){let o;return o="function"==typeof e?e(n):Array.isArray(e)?e[n]||i:r(e,n)||i,t&&(o=t(o)),o}const a=function(e){const{prop:t,cssProperty:n=e.prop,themeKey:a,transform:l}=e,d=e=>{if(null==e[t])return null;const d=e[t],c=r(e.theme,a)||{};return(0,o.k9)(e,d,(e=>{let o=s(c,l,e);return e===o&&"string"==typeof e&&(o=s(c,l,`${t}${"default"===e?"":(0,i.Z)(e)}`,e)),!1===n?o:{[n]:o}}))};return d.propTypes={},d.filterProps=[t],d}},6523:(e,t,n)=>{"use strict";n.d(t,{Z:()=>a});var i=n(7730),o=n(4178),r=n(9263);function s(e){const{sx:t,theme:n={}}=e||{};if(!t)return null;let a=t;if("function"==typeof t)a=t(n);else if("object"!=typeof t)return t;const l=(0,r.W8)(n.breakpoints),d=Object.keys(l);let c=l;return Object.keys(a).forEach((e=>{const t="function"==typeof(l=a[e])?l(n):l;var l;if("object"==typeof t)if(o.G[e])c=(0,i.Z)(c,(0,o.Z)(e,t,n));else{const o=(0,r.k9)({theme:n},t,(t=>({[e]:t})));!function(...e){const t=e.reduce(((e,t)=>e.concat(Object.keys(t))),[]),n=new Set(t);return e.every((e=>n.size===Object.keys(e).length))}(o,t)?c=(0,i.Z)(c,o):c[e]=s({sx:t,theme:n})}else c=(0,i.Z)(c,(0,o.Z)(e,t,n))})),(0,r.L7)(d,c)}s.filterProps=["sx"];const a=s},6631:(e,t,n)=>{"use strict";n.d(t,{Z:()=>s});var i=n(4869),o=n(6760);const r=(0,i.Z)(),s=function(e=r){return function(e=null){const t=(0,o.Z)();return t&&(n=t,0!==Object.keys(n).length)?t:e;var n}(e)}},8320:(e,t,n)=>{"use strict";n.d(t,{Z:()=>o});var i=n(1387);function o(e){if("string"!=typeof e)throw new Error((0,i.Z)(7));return e.charAt(0).toUpperCase()+e.slice(1)}},9064:(e,t,n)=>{"use strict";function i(...e){return e.reduce(((e,t)=>null==t?e:function(...n){e.apply(this,n),t.apply(this,n)}),(()=>{}))}n.d(t,{Z:()=>i})},7596:(e,t,n)=>{"use strict";function i(e,t=166){let n;function i(...i){clearTimeout(n),n=setTimeout((()=>{e.apply(this,i)}),t)}return i.clear=()=>{clearTimeout(n)},i}n.d(t,{Z:()=>i})},9766:(e,t,n)=>{"use strict";n.d(t,{Z:()=>r});var i=n(7462);function o(e){return null!==e&&"object"==typeof e&&e.constructor===Object}function r(e,t,n={clone:!0}){const s=n.clone?(0,i.Z)({},e):e;return o(e)&&o(t)&&Object.keys(t).forEach((i=>{"__proto__"!==i&&(o(t[i])&&i in e&&o(e[i])?s[i]=r(e[i],t[i],n):s[i]=t[i])})),s}},1387:(e,t,n)=>{"use strict";function i(e){let t="https://mui.com/production-error/?code="+e;for(let e=1;ei})},7094:(e,t,n)=>{"use strict";function i(e){return e&&e.ownerDocument||document}n.d(t,{Z:()=>i})},8290:(e,t,n)=>{"use strict";n.d(t,{Z:()=>o});var i=n(7094);function o(e){return(0,i.Z)(e).defaultView||window}},7960:(e,t,n)=>{"use strict";function i(e,t){"function"==typeof e?e(t):e&&(e.current=t)}n.d(t,{Z:()=>i})},6600:(e,t,n)=>{"use strict";n.d(t,{Z:()=>o});var i=n(7294);const o="undefined"!=typeof window?i.useLayoutEffect:i.useEffect},3633:(e,t,n)=>{"use strict";n.d(t,{Z:()=>r});var i=n(7294),o=n(6600);function r(e){const t=i.useRef(e);return(0,o.Z)((()=>{t.current=e})),i.useCallback(((...e)=>(0,t.current)(...e)),[])}},67:(e,t,n)=>{"use strict";n.d(t,{Z:()=>r});var i=n(7294),o=n(7960);function r(e,t){return i.useMemo((()=>null==e&&null==t?null:n=>{(0,o.Z)(e,n),(0,o.Z)(t,n)}),[e,t])}},9222:e=>{e.exports={getSelectedText:function(e){return e.getModel().getValueInRange(e.getSelection())},string_to_regexp:function(e){var t=e.replace(/.*\/([gimy]*)$/,"$1"),n=e.replace(new RegExp("^/(.*?)/"+t+"$"),"$1");return new RegExp(n,t)},pasteRegexPattern:function(e,t){var n={identifier:{major:1,minor:1},range:e.getSelection(),text:t,forceMoveMarkers:!0};e.executeEdits("my-source",[n])},selectionReplace:function(e,t){var n={identifier:{major:1,minor:1},range:e.getSelection(),text:t,forceMoveMarkers:!0};e.executeEdits("my-source",[n])},multiSelectionReplace:function(e,t){var n=e.getSelections(),i={major:1,minor:1},o=n.map((function(e){return{identifier:i,range:e,text:t,forceMoveMarkers:!0}}));e.executeEdits("my-source",o)},multiSelectionReplaceFn:function(e,t){var n=e.getSelections(),i={major:1,minor:1},o=n.map((function(e){return{identifier:i,range:e,text:t(),forceMoveMarkers:!0}}));e.executeEdits("my-source",o)},updateEditor:function(e,t){var n=e.getModel().getFullModelRange();t!==e.getValue()&&e.getModel().pushEditOperations([],[{range:n,text:t}])}}},8091:(e,t,n)=>{function i(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var i,o,r=[],s=!0,a=!1;try{for(n=n.call(e);!(s=(i=n.next()).done)&&(r.push(i.value),!t||r.length!==t);s=!0);}catch(e){a=!0,o=e}finally{try{s||null==n.return||n.return()}finally{if(a)throw o}}return r}}(e,t)||function(e,t){if(e){if("string"==typeof e)return o(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?o(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function o(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,i=new Array(t);n{var i=n(9271);String.prototype.count=function(e){for(var t=0,n=0;n1&&void 0!==arguments[1]&&arguments[1];return o.reset(e),Array.from(o).map((function(e,n){return result={token:e.type.toUpperCase()},t&&(result.range={startLineNumber:e.line,endLineNumber:e.line+e.lineBreaks,startColumn:e.col,endColumn:e.text.length-e.text.lastIndexOf("\n")}),result}))};console.log(r("aaaa1111")),console.log(r("Example Text to convert into csv!")),input_example="\n3333bbbbb",console.log(r(input_example,include_range=!0)),e.exports=r},6010:(e,t,n)=>{"use strict";function i(e){var t,n,o="";if("string"==typeof e||"number"==typeof e)o+=e;else if("object"==typeof e)if(Array.isArray(e))for(t=0;to})},2757:(e,t,n)=>{"use strict";n.d(t,{Z:()=>a});var i=n(7537),o=n.n(i),r=n(3645),s=n.n(r)()(o());s.push([e.id,"/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n.monaco-action-bar {\r\n\twhite-space: nowrap;\r\n\theight: 100%;\r\n}\r\n\r\n.monaco-action-bar .actions-container {\r\n\tdisplay: flex;\r\n\tmargin: 0 auto;\r\n\tpadding: 0;\r\n\theight: 100%;\r\n\twidth: 100%;\r\n\talign-items: center;\r\n}\r\n\r\n.monaco-action-bar.vertical .actions-container {\r\n\tdisplay: inline-block;\r\n}\r\n\r\n.monaco-action-bar .action-item {\r\n\tdisplay: block;\r\n\talign-items: center;\r\n\tjustify-content: center;\r\n\tcursor: pointer;\r\n\tposition: relative; /* DO NOT REMOVE - this is the key to preventing the ghosting icon bug in Chrome 42 */\r\n}\r\n\r\n.monaco-action-bar .action-item.disabled {\r\n\tcursor: default;\r\n}\r\n\r\n.monaco-action-bar .action-item .icon,\r\n.monaco-action-bar .action-item .codicon {\r\n\tdisplay: block;\r\n}\r\n\r\n.monaco-action-bar .action-item .codicon {\r\n\tdisplay: flex;\r\n\talign-items: center;\r\n\twidth: 16px;\r\n\theight: 16px;\r\n}\r\n\r\n.monaco-action-bar .action-label {\r\n\tfont-size: 11px;\r\n\tpadding: 3px;\r\n\tborder-radius: 5px;\r\n}\r\n\r\n.monaco-action-bar .action-item.disabled .action-label,\r\n.monaco-action-bar .action-item.disabled .action-label::before,\r\n.monaco-action-bar .action-item.disabled .action-label:hover {\r\n\topacity: 0.4;\r\n}\r\n\r\n/* Vertical actions */\r\n\r\n.monaco-action-bar.vertical {\r\n\ttext-align: left;\r\n}\r\n\r\n.monaco-action-bar.vertical .action-item {\r\n\tdisplay: block;\r\n}\r\n\r\n.monaco-action-bar.vertical .action-label.separator {\r\n\tdisplay: block;\r\n\tborder-bottom: 1px solid #bbb;\r\n\tpadding-top: 1px;\r\n\tmargin-left: .8em;\r\n\tmargin-right: .8em;\r\n}\r\n\r\n.monaco-action-bar .action-item .action-label.separator {\r\n\twidth: 1px;\r\n\theight: 16px;\r\n\tmargin: 5px 4px !important;\r\n\tcursor: default;\r\n\tmin-width: 1px;\r\n\tpadding: 0;\r\n\tbackground-color: #bbb;\r\n}\r\n\r\n.secondary-actions .monaco-action-bar .action-label {\r\n\tmargin-left: 6px;\r\n}\r\n\r\n/* Action Items */\r\n.monaco-action-bar .action-item.select-container {\r\n\toverflow: hidden; /* somehow the dropdown overflows its container, we prevent it here to not push */\r\n\tflex: 1;\r\n\tmax-width: 170px;\r\n\tmin-width: 60px;\r\n\tdisplay: flex;\r\n\talign-items: center;\r\n\tjustify-content: center;\r\n\tmargin-right: 10px;\r\n}\r\n\r\n.monaco-action-bar .action-item.action-dropdown-item {\r\n\tdisplay: flex;\r\n}\r\n\r\n.monaco-action-bar .action-item.action-dropdown-item > .action-label {\r\n\tmargin-right: 1px;\r\n}\r\n","",{version:3,sources:["webpack://./node_modules/monaco-editor/esm/vs/base/browser/ui/actionbar/actionbar.css"],names:[],mappings:"AAAA;;;+FAG+F;;AAE/F;CACC,mBAAmB;CACnB,YAAY;AACb;;AAEA;CACC,aAAa;CACb,cAAc;CACd,UAAU;CACV,YAAY;CACZ,WAAW;CACX,mBAAmB;AACpB;;AAEA;CACC,qBAAqB;AACtB;;AAEA;CACC,cAAc;CACd,mBAAmB;CACnB,uBAAuB;CACvB,eAAe;CACf,kBAAkB,GAAG,qFAAqF;AAC3G;;AAEA;CACC,eAAe;AAChB;;AAEA;;CAEC,cAAc;AACf;;AAEA;CACC,aAAa;CACb,mBAAmB;CACnB,WAAW;CACX,YAAY;AACb;;AAEA;CACC,eAAe;CACf,YAAY;CACZ,kBAAkB;AACnB;;AAEA;;;CAGC,YAAY;AACb;;AAEA,qBAAqB;;AAErB;CACC,gBAAgB;AACjB;;AAEA;CACC,cAAc;AACf;;AAEA;CACC,cAAc;CACd,6BAA6B;CAC7B,gBAAgB;CAChB,iBAAiB;CACjB,kBAAkB;AACnB;;AAEA;CACC,UAAU;CACV,YAAY;CACZ,0BAA0B;CAC1B,eAAe;CACf,cAAc;CACd,UAAU;CACV,sBAAsB;AACvB;;AAEA;CACC,gBAAgB;AACjB;;AAEA,iBAAiB;AACjB;CACC,gBAAgB,EAAE,iFAAiF;CACnG,OAAO;CACP,gBAAgB;CAChB,eAAe;CACf,aAAa;CACb,mBAAmB;CACnB,uBAAuB;CACvB,kBAAkB;AACnB;;AAEA;CACC,aAAa;AACd;;AAEA;CACC,iBAAiB;AAClB",sourcesContent:["/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n.monaco-action-bar {\r\n\twhite-space: nowrap;\r\n\theight: 100%;\r\n}\r\n\r\n.monaco-action-bar .actions-container {\r\n\tdisplay: flex;\r\n\tmargin: 0 auto;\r\n\tpadding: 0;\r\n\theight: 100%;\r\n\twidth: 100%;\r\n\talign-items: center;\r\n}\r\n\r\n.monaco-action-bar.vertical .actions-container {\r\n\tdisplay: inline-block;\r\n}\r\n\r\n.monaco-action-bar .action-item {\r\n\tdisplay: block;\r\n\talign-items: center;\r\n\tjustify-content: center;\r\n\tcursor: pointer;\r\n\tposition: relative; /* DO NOT REMOVE - this is the key to preventing the ghosting icon bug in Chrome 42 */\r\n}\r\n\r\n.monaco-action-bar .action-item.disabled {\r\n\tcursor: default;\r\n}\r\n\r\n.monaco-action-bar .action-item .icon,\r\n.monaco-action-bar .action-item .codicon {\r\n\tdisplay: block;\r\n}\r\n\r\n.monaco-action-bar .action-item .codicon {\r\n\tdisplay: flex;\r\n\talign-items: center;\r\n\twidth: 16px;\r\n\theight: 16px;\r\n}\r\n\r\n.monaco-action-bar .action-label {\r\n\tfont-size: 11px;\r\n\tpadding: 3px;\r\n\tborder-radius: 5px;\r\n}\r\n\r\n.monaco-action-bar .action-item.disabled .action-label,\r\n.monaco-action-bar .action-item.disabled .action-label::before,\r\n.monaco-action-bar .action-item.disabled .action-label:hover {\r\n\topacity: 0.4;\r\n}\r\n\r\n/* Vertical actions */\r\n\r\n.monaco-action-bar.vertical {\r\n\ttext-align: left;\r\n}\r\n\r\n.monaco-action-bar.vertical .action-item {\r\n\tdisplay: block;\r\n}\r\n\r\n.monaco-action-bar.vertical .action-label.separator {\r\n\tdisplay: block;\r\n\tborder-bottom: 1px solid #bbb;\r\n\tpadding-top: 1px;\r\n\tmargin-left: .8em;\r\n\tmargin-right: .8em;\r\n}\r\n\r\n.monaco-action-bar .action-item .action-label.separator {\r\n\twidth: 1px;\r\n\theight: 16px;\r\n\tmargin: 5px 4px !important;\r\n\tcursor: default;\r\n\tmin-width: 1px;\r\n\tpadding: 0;\r\n\tbackground-color: #bbb;\r\n}\r\n\r\n.secondary-actions .monaco-action-bar .action-label {\r\n\tmargin-left: 6px;\r\n}\r\n\r\n/* Action Items */\r\n.monaco-action-bar .action-item.select-container {\r\n\toverflow: hidden; /* somehow the dropdown overflows its container, we prevent it here to not push */\r\n\tflex: 1;\r\n\tmax-width: 170px;\r\n\tmin-width: 60px;\r\n\tdisplay: flex;\r\n\talign-items: center;\r\n\tjustify-content: center;\r\n\tmargin-right: 10px;\r\n}\r\n\r\n.monaco-action-bar .action-item.action-dropdown-item {\r\n\tdisplay: flex;\r\n}\r\n\r\n.monaco-action-bar .action-item.action-dropdown-item > .action-label {\r\n\tmargin-right: 1px;\r\n}\r\n"],sourceRoot:""}]);const a=s},93:(e,t,n)=>{"use strict";n.d(t,{Z:()=>a});var i=n(7537),o=n.n(i),r=n(3645),s=n.n(r)()(o());s.push([e.id,"/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n.monaco-aria-container {\r\n\tposition: absolute; /* try to hide from window but not from screen readers */\r\n\tleft:-999em;\r\n}","",{version:3,sources:["webpack://./node_modules/monaco-editor/esm/vs/base/browser/ui/aria/aria.css"],names:[],mappings:"AAAA;;;+FAG+F;;AAE/F;CACC,kBAAkB,EAAE,wDAAwD;CAC5E,WAAW;AACZ",sourcesContent:["/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n.monaco-aria-container {\r\n\tposition: absolute; /* try to hide from window but not from screen readers */\r\n\tleft:-999em;\r\n}"],sourceRoot:""}]);const a=s},2013:(e,t,n)=>{"use strict";n.d(t,{Z:()=>a});var i=n(7537),o=n.n(i),r=n(3645),s=n.n(r)()(o());s.push([e.id,"/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n.monaco-text-button {\r\n\tbox-sizing: border-box;\r\n\tdisplay: flex;\r\n\twidth: 100%;\r\n\tpadding: 4px;\r\n\ttext-align: center;\r\n\tcursor: pointer;\r\n\tjustify-content: center;\r\n\talign-items: center;\r\n}\r\n\r\n.monaco-text-button:focus {\r\n\toutline-offset: 2px !important;\r\n}\r\n\r\n.monaco-text-button:hover {\r\n\ttext-decoration: none !important;\r\n}\r\n\r\n.monaco-button.disabled:focus,\r\n.monaco-button.disabled {\r\n\topacity: 0.4 !important;\r\n\tcursor: default;\r\n}\r\n\r\n.monaco-text-button > .codicon {\r\n\tmargin: 0 0.2em;\r\n\tcolor: inherit !important;\r\n}\r\n\r\n.monaco-button-dropdown {\r\n\tdisplay: flex;\r\n\tcursor: pointer;\r\n}\r\n\r\n.monaco-button-dropdown > .monaco-dropdown-button {\r\n\tmargin-left: 1px;\r\n}\r\n\r\n.monaco-description-button {\r\n\tflex-direction: column;\r\n}\r\n\r\n.monaco-description-button .monaco-button-label {\r\n\tfont-weight: 500;\r\n}\r\n\r\n.monaco-description-button .monaco-button-description {\r\n\tfont-style: italic;\r\n}\r\n","",{version:3,sources:["webpack://./node_modules/monaco-editor/esm/vs/base/browser/ui/button/button.css"],names:[],mappings:"AAAA;;;+FAG+F;;AAE/F;CACC,sBAAsB;CACtB,aAAa;CACb,WAAW;CACX,YAAY;CACZ,kBAAkB;CAClB,eAAe;CACf,uBAAuB;CACvB,mBAAmB;AACpB;;AAEA;CACC,8BAA8B;AAC/B;;AAEA;CACC,gCAAgC;AACjC;;AAEA;;CAEC,uBAAuB;CACvB,eAAe;AAChB;;AAEA;CACC,eAAe;CACf,yBAAyB;AAC1B;;AAEA;CACC,aAAa;CACb,eAAe;AAChB;;AAEA;CACC,gBAAgB;AACjB;;AAEA;CACC,sBAAsB;AACvB;;AAEA;CACC,gBAAgB;AACjB;;AAEA;CACC,kBAAkB;AACnB",sourcesContent:["/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n.monaco-text-button {\r\n\tbox-sizing: border-box;\r\n\tdisplay: flex;\r\n\twidth: 100%;\r\n\tpadding: 4px;\r\n\ttext-align: center;\r\n\tcursor: pointer;\r\n\tjustify-content: center;\r\n\talign-items: center;\r\n}\r\n\r\n.monaco-text-button:focus {\r\n\toutline-offset: 2px !important;\r\n}\r\n\r\n.monaco-text-button:hover {\r\n\ttext-decoration: none !important;\r\n}\r\n\r\n.monaco-button.disabled:focus,\r\n.monaco-button.disabled {\r\n\topacity: 0.4 !important;\r\n\tcursor: default;\r\n}\r\n\r\n.monaco-text-button > .codicon {\r\n\tmargin: 0 0.2em;\r\n\tcolor: inherit !important;\r\n}\r\n\r\n.monaco-button-dropdown {\r\n\tdisplay: flex;\r\n\tcursor: pointer;\r\n}\r\n\r\n.monaco-button-dropdown > .monaco-dropdown-button {\r\n\tmargin-left: 1px;\r\n}\r\n\r\n.monaco-description-button {\r\n\tflex-direction: column;\r\n}\r\n\r\n.monaco-description-button .monaco-button-label {\r\n\tfont-weight: 500;\r\n}\r\n\r\n.monaco-description-button .monaco-button-description {\r\n\tfont-style: italic;\r\n}\r\n"],sourceRoot:""}]);const a=s},4664:(e,t,n)=>{"use strict";n.d(t,{Z:()=>a});var i=n(7537),o=n.n(i),r=n(3645),s=n.n(r)()(o());s.push([e.id,"/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n.monaco-custom-checkbox {\r\n\tmargin-left: 2px;\r\n\tfloat: left;\r\n\tcursor: pointer;\r\n\toverflow: hidden;\r\n\topacity: 0.7;\r\n\twidth: 20px;\r\n\theight: 20px;\r\n\tborder: 1px solid transparent;\r\n\tpadding: 1px;\r\n\tbox-sizing:\tborder-box;\r\n\tuser-select: none;\r\n\t-webkit-user-select: none;\r\n\t-ms-user-select: none;\r\n}\r\n\r\n.monaco-custom-checkbox:hover,\r\n.monaco-custom-checkbox.checked {\r\n\topacity: 1;\r\n}\r\n\r\n.hc-black .monaco-custom-checkbox {\r\n\tbackground: none;\r\n}\r\n\r\n.hc-black .monaco-custom-checkbox:hover {\r\n\tbackground: none;\r\n}\r\n\r\n.monaco-custom-checkbox.monaco-simple-checkbox {\r\n\theight: 18px;\r\n\twidth: 18px;\r\n\tborder: 1px solid transparent;\r\n\tborder-radius: 3px;\r\n\tmargin-right: 9px;\r\n\tmargin-left: 0px;\r\n\tpadding: 0px;\r\n\topacity: 1;\r\n\tbackground-size: 16px !important;\r\n}\r\n\r\n/* hide check when unchecked */\r\n.monaco-custom-checkbox.monaco-simple-checkbox:not(.checked)::before {\r\n\tvisibility: hidden;\r\n}\r\n","",{version:3,sources:["webpack://./node_modules/monaco-editor/esm/vs/base/browser/ui/checkbox/checkbox.css"],names:[],mappings:"AAAA;;;+FAG+F;;AAE/F;CACC,gBAAgB;CAChB,WAAW;CACX,eAAe;CACf,gBAAgB;CAChB,YAAY;CACZ,WAAW;CACX,YAAY;CACZ,6BAA6B;CAC7B,YAAY;CACZ,sBAAsB;CACtB,iBAAiB;CACjB,yBAAyB;CACzB,qBAAqB;AACtB;;AAEA;;CAEC,UAAU;AACX;;AAEA;CACC,gBAAgB;AACjB;;AAEA;CACC,gBAAgB;AACjB;;AAEA;CACC,YAAY;CACZ,WAAW;CACX,6BAA6B;CAC7B,kBAAkB;CAClB,iBAAiB;CACjB,gBAAgB;CAChB,YAAY;CACZ,UAAU;CACV,gCAAgC;AACjC;;AAEA,8BAA8B;AAC9B;CACC,kBAAkB;AACnB",sourcesContent:["/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n.monaco-custom-checkbox {\r\n\tmargin-left: 2px;\r\n\tfloat: left;\r\n\tcursor: pointer;\r\n\toverflow: hidden;\r\n\topacity: 0.7;\r\n\twidth: 20px;\r\n\theight: 20px;\r\n\tborder: 1px solid transparent;\r\n\tpadding: 1px;\r\n\tbox-sizing:\tborder-box;\r\n\tuser-select: none;\r\n\t-webkit-user-select: none;\r\n\t-ms-user-select: none;\r\n}\r\n\r\n.monaco-custom-checkbox:hover,\r\n.monaco-custom-checkbox.checked {\r\n\topacity: 1;\r\n}\r\n\r\n.hc-black .monaco-custom-checkbox {\r\n\tbackground: none;\r\n}\r\n\r\n.hc-black .monaco-custom-checkbox:hover {\r\n\tbackground: none;\r\n}\r\n\r\n.monaco-custom-checkbox.monaco-simple-checkbox {\r\n\theight: 18px;\r\n\twidth: 18px;\r\n\tborder: 1px solid transparent;\r\n\tborder-radius: 3px;\r\n\tmargin-right: 9px;\r\n\tmargin-left: 0px;\r\n\tpadding: 0px;\r\n\topacity: 1;\r\n\tbackground-size: 16px !important;\r\n}\r\n\r\n/* hide check when unchecked */\r\n.monaco-custom-checkbox.monaco-simple-checkbox:not(.checked)::before {\r\n\tvisibility: hidden;\r\n}\r\n"],sourceRoot:""}]);const a=s},4081:(e,t,n)=>{"use strict";n.d(t,{Z:()=>a});var i=n(7537),o=n.n(i),r=n(3645),s=n.n(r)()(o());s.push([e.id,"/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n.codicon-wrench-subaction {\r\n\topacity: 0.5;\r\n}\r\n\r\n@keyframes codicon-spin {\r\n\t100% {\r\n\t\ttransform:rotate(360deg);\r\n\t}\r\n}\r\n\r\n.codicon-sync.codicon-modifier-spin,\r\n.codicon-loading.codicon-modifier-spin,\r\n.codicon-gear.codicon-modifier-spin,\r\n.codicon-notebook-state-executing.codicon-modifier-spin {\r\n\t/* Use steps to throttle FPS to reduce CPU usage */\r\n\tanimation: codicon-spin 1.5s steps(30) infinite;\r\n}\r\n\r\n.codicon-modifier-disabled {\r\n\topacity: 0.4;\r\n}\r\n\r\n/* custom speed & easing for loading icon */\r\n.codicon-loading,\r\n.codicon-tree-item-loading::before {\r\n\tanimation-duration: 1s !important;\r\n\tanimation-timing-function: cubic-bezier(0.53, 0.21, 0.29, 0.67) !important;\r\n}\r\n","",{version:3,sources:["webpack://./node_modules/monaco-editor/esm/vs/base/browser/ui/codicons/codicon/codicon-modifiers.css"],names:[],mappings:"AAAA;;;+FAG+F;;AAE/F;CACC,YAAY;AACb;;AAEA;CACC;EACC,wBAAwB;CACzB;AACD;;AAEA;;;;CAIC,kDAAkD;CAClD,+CAA+C;AAChD;;AAEA;CACC,YAAY;AACb;;AAEA,2CAA2C;AAC3C;;CAEC,iCAAiC;CACjC,0EAA0E;AAC3E",sourcesContent:["/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n.codicon-wrench-subaction {\r\n\topacity: 0.5;\r\n}\r\n\r\n@keyframes codicon-spin {\r\n\t100% {\r\n\t\ttransform:rotate(360deg);\r\n\t}\r\n}\r\n\r\n.codicon-sync.codicon-modifier-spin,\r\n.codicon-loading.codicon-modifier-spin,\r\n.codicon-gear.codicon-modifier-spin,\r\n.codicon-notebook-state-executing.codicon-modifier-spin {\r\n\t/* Use steps to throttle FPS to reduce CPU usage */\r\n\tanimation: codicon-spin 1.5s steps(30) infinite;\r\n}\r\n\r\n.codicon-modifier-disabled {\r\n\topacity: 0.4;\r\n}\r\n\r\n/* custom speed & easing for loading icon */\r\n.codicon-loading,\r\n.codicon-tree-item-loading::before {\r\n\tanimation-duration: 1s !important;\r\n\tanimation-timing-function: cubic-bezier(0.53, 0.21, 0.29, 0.67) !important;\r\n}\r\n"],sourceRoot:""}]);const a=s},58:(e,t,n)=>{"use strict";n.d(t,{Z:()=>u});var i=n(7537),o=n.n(i),r=n(3645),s=n.n(r),a=n(1667),l=n.n(a),d=new URL(n(3251),n.b),c=s()(o()),h=l()(d);c.push([e.id,'/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n@font-face {\r\n\tfont-family: "codicon";\r\n\tsrc: url('+h+") format(\"truetype\");\r\n}\r\n\r\n.codicon[class*='codicon-'] {\r\n\tfont: normal normal normal 16px/1 codicon;\r\n\tdisplay: inline-block;\r\n\ttext-decoration: none;\r\n\ttext-rendering: auto;\r\n\ttext-align: center;\r\n\t-webkit-font-smoothing: antialiased;\r\n\t-moz-osx-font-smoothing: grayscale;\r\n\tuser-select: none;\r\n\t-webkit-user-select: none;\r\n\t-ms-user-select: none;\r\n}\r\n\r\n/* icon rules are dynamically created in codiconStyles */\r\n","",{version:3,sources:["webpack://./node_modules/monaco-editor/esm/vs/base/browser/ui/codicons/codicon/codicon.css"],names:[],mappings:"AAAA;;;+FAG+F;;AAE/F;CACC,sBAAsB;CACtB,+DAA0C;AAC3C;;AAEA;CACC,yCAAyC;CACzC,qBAAqB;CACrB,qBAAqB;CACrB,oBAAoB;CACpB,kBAAkB;CAClB,mCAAmC;CACnC,kCAAkC;CAClC,iBAAiB;CACjB,yBAAyB;CACzB,qBAAqB;AACtB;;AAEA,wDAAwD",sourcesContent:['/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n@font-face {\r\n\tfont-family: "codicon";\r\n\tsrc: url(./codicon.ttf) format("truetype");\r\n}\r\n\r\n.codicon[class*=\'codicon-\'] {\r\n\tfont: normal normal normal 16px/1 codicon;\r\n\tdisplay: inline-block;\r\n\ttext-decoration: none;\r\n\ttext-rendering: auto;\r\n\ttext-align: center;\r\n\t-webkit-font-smoothing: antialiased;\r\n\t-moz-osx-font-smoothing: grayscale;\r\n\tuser-select: none;\r\n\t-webkit-user-select: none;\r\n\t-ms-user-select: none;\r\n}\r\n\r\n/* icon rules are dynamically created in codiconStyles */\r\n'],sourceRoot:""}]);const u=c},6328:(e,t,n)=>{"use strict";n.d(t,{Z:()=>a});var i=n(7537),o=n.n(i),r=n(3645),s=n.n(r)()(o());s.push([e.id,"/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n.context-view {\r\n\tposition: absolute;\r\n\tz-index: 2500;\r\n}\r\n\r\n.context-view.fixed {\r\n\tall: initial;\r\n\tfont-family: inherit;\r\n\tfont-size: 13px;\r\n\tposition: fixed;\r\n\tz-index: 2500;\r\n\tcolor: inherit;\r\n}\r\n","",{version:3,sources:["webpack://./node_modules/monaco-editor/esm/vs/base/browser/ui/contextview/contextview.css"],names:[],mappings:"AAAA;;;+FAG+F;;AAE/F;CACC,kBAAkB;CAClB,aAAa;AACd;;AAEA;CACC,YAAY;CACZ,oBAAoB;CACpB,eAAe;CACf,eAAe;CACf,aAAa;CACb,cAAc;AACf",sourcesContent:["/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n.context-view {\r\n\tposition: absolute;\r\n\tz-index: 2500;\r\n}\r\n\r\n.context-view.fixed {\r\n\tall: initial;\r\n\tfont-family: inherit;\r\n\tfont-size: 13px;\r\n\tposition: fixed;\r\n\tz-index: 2500;\r\n\tcolor: inherit;\r\n}\r\n"],sourceRoot:""}]);const a=s},477:(e,t,n)=>{"use strict";n.d(t,{Z:()=>a});var i=n(7537),o=n.n(i),r=n(3645),s=n.n(r)()(o());s.push([e.id,"/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n.monaco-count-badge {\r\n\tpadding: 3px 6px;\r\n\tborder-radius: 11px;\r\n\tfont-size: 11px;\r\n\tmin-width: 18px;\r\n\tmin-height: 18px;\r\n\tline-height: 11px;\r\n\tfont-weight: normal;\r\n\ttext-align: center;\r\n\tdisplay: inline-block;\r\n\tbox-sizing: border-box;\r\n}\r\n\r\n.monaco-count-badge.long {\r\n\tpadding: 2px 3px;\r\n\tborder-radius: 2px;\r\n\tmin-height: auto;\r\n\tline-height: normal;\r\n}\r\n","",{version:3,sources:["webpack://./node_modules/monaco-editor/esm/vs/base/browser/ui/countBadge/countBadge.css"],names:[],mappings:"AAAA;;;+FAG+F;;AAE/F;CACC,gBAAgB;CAChB,mBAAmB;CACnB,eAAe;CACf,eAAe;CACf,gBAAgB;CAChB,iBAAiB;CACjB,mBAAmB;CACnB,kBAAkB;CAClB,qBAAqB;CACrB,sBAAsB;AACvB;;AAEA;CACC,gBAAgB;CAChB,kBAAkB;CAClB,gBAAgB;CAChB,mBAAmB;AACpB",sourcesContent:["/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n.monaco-count-badge {\r\n\tpadding: 3px 6px;\r\n\tborder-radius: 11px;\r\n\tfont-size: 11px;\r\n\tmin-width: 18px;\r\n\tmin-height: 18px;\r\n\tline-height: 11px;\r\n\tfont-weight: normal;\r\n\ttext-align: center;\r\n\tdisplay: inline-block;\r\n\tbox-sizing: border-box;\r\n}\r\n\r\n.monaco-count-badge.long {\r\n\tpadding: 2px 3px;\r\n\tborder-radius: 2px;\r\n\tmin-height: auto;\r\n\tline-height: normal;\r\n}\r\n"],sourceRoot:""}]);const a=s},5035:(e,t,n)=>{"use strict";n.d(t,{Z:()=>a});var i=n(7537),o=n.n(i),r=n(3645),s=n.n(r)()(o());s.push([e.id,"/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n.monaco-dropdown {\r\n\theight: 100%;\r\n\tpadding: 0;\r\n}\r\n\r\n.monaco-dropdown > .dropdown-label {\r\n\tcursor: pointer;\r\n\theight: 100%;\r\n\tdisplay: flex;\r\n\talign-items: center;\r\n\tjustify-content: center;\r\n}\r\n\r\n.monaco-dropdown > .dropdown-label > .action-label.disabled {\r\n\tcursor: default;\r\n}\r\n\r\n.monaco-dropdown-with-primary {\r\n\tdisplay: flex !important;\r\n\tflex-direction: row;\r\n\tborder-radius: 5px;\r\n}\r\n\r\n.monaco-dropdown-with-primary > .action-container > .action-label {\r\n\tmargin-right: 0;\r\n}\r\n\r\n.monaco-dropdown-with-primary > .dropdown-action-container > .monaco-dropdown > .dropdown-label .codicon[class*='codicon-'] {\r\n\tfont-size: 12px;\r\n\tpadding-left: 0px;\r\n\tpadding-right: 0px;\r\n\tline-height: 16px;\r\n\tmargin-left: -3px;\r\n}\r\n\r\n.monaco-dropdown-with-primary > .dropdown-action-container > .monaco-dropdown > .dropdown-label > .action-label {\r\n\tdisplay: block;\r\n\tbackground-size: 16px;\r\n\tbackground-position: center center;\r\n\tbackground-repeat: no-repeat;\r\n}\r\n","",{version:3,sources:["webpack://./node_modules/monaco-editor/esm/vs/base/browser/ui/dropdown/dropdown.css"],names:[],mappings:"AAAA;;;+FAG+F;;AAE/F;CACC,YAAY;CACZ,UAAU;AACX;;AAEA;CACC,eAAe;CACf,YAAY;CACZ,aAAa;CACb,mBAAmB;CACnB,uBAAuB;AACxB;;AAEA;CACC,eAAe;AAChB;;AAEA;CACC,wBAAwB;CACxB,mBAAmB;CACnB,kBAAkB;AACnB;;AAEA;CACC,eAAe;AAChB;;AAEA;CACC,eAAe;CACf,iBAAiB;CACjB,kBAAkB;CAClB,iBAAiB;CACjB,iBAAiB;AAClB;;AAEA;CACC,cAAc;CACd,qBAAqB;CACrB,kCAAkC;CAClC,4BAA4B;AAC7B",sourcesContent:["/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n.monaco-dropdown {\r\n\theight: 100%;\r\n\tpadding: 0;\r\n}\r\n\r\n.monaco-dropdown > .dropdown-label {\r\n\tcursor: pointer;\r\n\theight: 100%;\r\n\tdisplay: flex;\r\n\talign-items: center;\r\n\tjustify-content: center;\r\n}\r\n\r\n.monaco-dropdown > .dropdown-label > .action-label.disabled {\r\n\tcursor: default;\r\n}\r\n\r\n.monaco-dropdown-with-primary {\r\n\tdisplay: flex !important;\r\n\tflex-direction: row;\r\n\tborder-radius: 5px;\r\n}\r\n\r\n.monaco-dropdown-with-primary > .action-container > .action-label {\r\n\tmargin-right: 0;\r\n}\r\n\r\n.monaco-dropdown-with-primary > .dropdown-action-container > .monaco-dropdown > .dropdown-label .codicon[class*='codicon-'] {\r\n\tfont-size: 12px;\r\n\tpadding-left: 0px;\r\n\tpadding-right: 0px;\r\n\tline-height: 16px;\r\n\tmargin-left: -3px;\r\n}\r\n\r\n.monaco-dropdown-with-primary > .dropdown-action-container > .monaco-dropdown > .dropdown-label > .action-label {\r\n\tdisplay: block;\r\n\tbackground-size: 16px;\r\n\tbackground-position: center center;\r\n\tbackground-repeat: no-repeat;\r\n}\r\n"],sourceRoot:""}]);const a=s},6266:(e,t,n)=>{"use strict";n.d(t,{Z:()=>a});var i=n(7537),o=n.n(i),r=n(3645),s=n.n(r)()(o());s.push([e.id,"/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n/* ---------- Find input ---------- */\r\n\r\n.monaco-findInput {\r\n\tposition: relative;\r\n}\r\n\r\n.monaco-findInput .monaco-inputbox {\r\n\tfont-size: 13px;\r\n\twidth: 100%;\r\n}\r\n\r\n.monaco-findInput > .controls {\r\n\tposition: absolute;\r\n\ttop: 3px;\r\n\tright: 2px;\r\n}\r\n\r\n.vs .monaco-findInput.disabled {\r\n\tbackground-color: #E1E1E1;\r\n}\r\n\r\n/* Theming */\r\n.vs-dark .monaco-findInput.disabled {\r\n\tbackground-color: #333;\r\n}\r\n\r\n/* Highlighting */\r\n.monaco-findInput.highlight-0 .controls {\r\n\tanimation: monaco-findInput-highlight-0 100ms linear 0s;\r\n}\r\n.monaco-findInput.highlight-1 .controls {\r\n\tanimation: monaco-findInput-highlight-1 100ms linear 0s;\r\n}\r\n.hc-black .monaco-findInput.highlight-0 .controls,\r\n.vs-dark .monaco-findInput.highlight-0 .controls {\r\n\tanimation: monaco-findInput-highlight-dark-0 100ms linear 0s;\r\n}\r\n.hc-black .monaco-findInput.highlight-1 .controls,\r\n.vs-dark .monaco-findInput.highlight-1 .controls {\r\n\tanimation: monaco-findInput-highlight-dark-1 100ms linear 0s;\r\n}\r\n\r\n@keyframes monaco-findInput-highlight-0 {\r\n\t0% { background: rgba(253, 255, 0, 0.8); }\r\n\t100% { background: transparent; }\r\n}\r\n@keyframes monaco-findInput-highlight-1 {\r\n\t0% { background: rgba(253, 255, 0, 0.8); }\r\n\t/* Made intentionally different such that the CSS minifier does not collapse the two animations into a single one*/\r\n\t99% { background: transparent; }\r\n}\r\n\r\n@keyframes monaco-findInput-highlight-dark-0 {\r\n\t0% { background: rgba(255, 255, 255, 0.44); }\r\n\t100% { background: transparent; }\r\n}\r\n@keyframes monaco-findInput-highlight-dark-1 {\r\n\t0% { background: rgba(255, 255, 255, 0.44); }\r\n\t/* Made intentionally different such that the CSS minifier does not collapse the two animations into a single one*/\r\n\t99% { background: transparent; }\r\n}","",{version:3,sources:["webpack://./node_modules/monaco-editor/esm/vs/base/browser/ui/findinput/findInput.css"],names:[],mappings:"AAAA;;;+FAG+F;AAC/F,qCAAqC;;AAErC;CACC,kBAAkB;AACnB;;AAEA;CACC,eAAe;CACf,WAAW;AACZ;;AAEA;CACC,kBAAkB;CAClB,QAAQ;CACR,UAAU;AACX;;AAEA;CACC,yBAAyB;AAC1B;;AAEA,YAAY;AACZ;CACC,sBAAsB;AACvB;;AAEA,iBAAiB;AACjB;CACC,uDAAuD;AACxD;AACA;CACC,uDAAuD;AACxD;AACA;;CAEC,4DAA4D;AAC7D;AACA;;CAEC,4DAA4D;AAC7D;;AAEA;CACC,KAAK,kCAAkC,EAAE;CACzC,OAAO,uBAAuB,EAAE;AACjC;AACA;CACC,KAAK,kCAAkC,EAAE;CACzC,kHAAkH;CAClH,MAAM,uBAAuB,EAAE;AAChC;;AAEA;CACC,KAAK,qCAAqC,EAAE;CAC5C,OAAO,uBAAuB,EAAE;AACjC;AACA;CACC,KAAK,qCAAqC,EAAE;CAC5C,kHAAkH;CAClH,MAAM,uBAAuB,EAAE;AAChC",sourcesContent:["/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n/* ---------- Find input ---------- */\r\n\r\n.monaco-findInput {\r\n\tposition: relative;\r\n}\r\n\r\n.monaco-findInput .monaco-inputbox {\r\n\tfont-size: 13px;\r\n\twidth: 100%;\r\n}\r\n\r\n.monaco-findInput > .controls {\r\n\tposition: absolute;\r\n\ttop: 3px;\r\n\tright: 2px;\r\n}\r\n\r\n.vs .monaco-findInput.disabled {\r\n\tbackground-color: #E1E1E1;\r\n}\r\n\r\n/* Theming */\r\n.vs-dark .monaco-findInput.disabled {\r\n\tbackground-color: #333;\r\n}\r\n\r\n/* Highlighting */\r\n.monaco-findInput.highlight-0 .controls {\r\n\tanimation: monaco-findInput-highlight-0 100ms linear 0s;\r\n}\r\n.monaco-findInput.highlight-1 .controls {\r\n\tanimation: monaco-findInput-highlight-1 100ms linear 0s;\r\n}\r\n.hc-black .monaco-findInput.highlight-0 .controls,\r\n.vs-dark .monaco-findInput.highlight-0 .controls {\r\n\tanimation: monaco-findInput-highlight-dark-0 100ms linear 0s;\r\n}\r\n.hc-black .monaco-findInput.highlight-1 .controls,\r\n.vs-dark .monaco-findInput.highlight-1 .controls {\r\n\tanimation: monaco-findInput-highlight-dark-1 100ms linear 0s;\r\n}\r\n\r\n@keyframes monaco-findInput-highlight-0 {\r\n\t0% { background: rgba(253, 255, 0, 0.8); }\r\n\t100% { background: transparent; }\r\n}\r\n@keyframes monaco-findInput-highlight-1 {\r\n\t0% { background: rgba(253, 255, 0, 0.8); }\r\n\t/* Made intentionally different such that the CSS minifier does not collapse the two animations into a single one*/\r\n\t99% { background: transparent; }\r\n}\r\n\r\n@keyframes monaco-findInput-highlight-dark-0 {\r\n\t0% { background: rgba(255, 255, 255, 0.44); }\r\n\t100% { background: transparent; }\r\n}\r\n@keyframes monaco-findInput-highlight-dark-1 {\r\n\t0% { background: rgba(255, 255, 255, 0.44); }\r\n\t/* Made intentionally different such that the CSS minifier does not collapse the two animations into a single one*/\r\n\t99% { background: transparent; }\r\n}"],sourceRoot:""}]);const a=s},3039:(e,t,n)=>{"use strict";n.d(t,{Z:()=>a});var i=n(7537),o=n.n(i),r=n(3645),s=n.n(r)()(o());s.push([e.id,"/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n.monaco-hover {\r\n\tcursor: default;\r\n\tposition: absolute;\r\n\toverflow: hidden;\r\n\tz-index: 50;\r\n\tuser-select: text;\r\n\t-webkit-user-select: text;\r\n\t-ms-user-select: text;\r\n\tbox-sizing: initial;\r\n\tanimation: fadein 100ms linear;\r\n\tline-height: 1.5em;\r\n}\r\n\r\n.monaco-hover.hidden {\r\n\tdisplay: none;\r\n}\r\n\r\n.monaco-hover .hover-contents {\r\n\tpadding: 4px 8px;\r\n}\r\n\r\n.monaco-hover .markdown-hover > .hover-contents:not(.code-hover-contents) {\r\n\tmax-width: 500px;\r\n\tword-wrap: break-word;\r\n}\r\n\r\n.monaco-hover .markdown-hover > .hover-contents:not(.code-hover-contents) hr {\r\n\tmin-width: 100%;\r\n}\r\n\r\n.monaco-hover p,\r\n.monaco-hover .code,\r\n.monaco-hover ul {\r\n\tmargin: 8px 0;\r\n}\r\n\r\n.monaco-hover code {\r\n\tfont-family: var(--monaco-monospace-font);\r\n}\r\n\r\n.monaco-hover hr {\r\n\tbox-sizing: border-box;\r\n\tborder-left: 0px;\r\n\tborder-right: 0px;\r\n\tmargin-top: 4px;\r\n\tmargin-bottom: -4px;\r\n\tmargin-left: -8px;\r\n\tmargin-right: -8px;\r\n\theight: 1px;\r\n}\r\n\r\n.monaco-hover p:first-child,\r\n.monaco-hover .code:first-child,\r\n.monaco-hover ul:first-child {\r\n\tmargin-top: 0;\r\n}\r\n\r\n.monaco-hover p:last-child,\r\n.monaco-hover .code:last-child,\r\n.monaco-hover ul:last-child {\r\n\tmargin-bottom: 0;\r\n}\r\n\r\n/* MarkupContent Layout */\r\n.monaco-hover ul {\r\n\tpadding-left: 20px;\r\n}\r\n.monaco-hover ol {\r\n\tpadding-left: 20px;\r\n}\r\n\r\n.monaco-hover li > p {\r\n\tmargin-bottom: 0;\r\n}\r\n\r\n.monaco-hover li > ul {\r\n\tmargin-top: 0;\r\n}\r\n\r\n.monaco-hover code {\r\n\tborder-radius: 3px;\r\n\tpadding: 0 0.4em;\r\n}\r\n\r\n.monaco-hover .monaco-tokenized-source {\r\n\twhite-space: pre-wrap;\r\n}\r\n\r\n.monaco-hover .hover-row.status-bar {\r\n\tfont-size: 12px;\r\n\tline-height: 22px;\r\n}\r\n\r\n.monaco-hover .hover-row.status-bar .actions {\r\n\tdisplay: flex;\r\n\tpadding: 0px 8px;\r\n}\r\n\r\n.monaco-hover .hover-row.status-bar .actions .action-container {\r\n\tmargin-right: 16px;\r\n\tcursor: pointer;\r\n}\r\n\r\n.monaco-hover .hover-row.status-bar .actions .action-container .action .icon {\r\n\tpadding-right: 4px;\r\n}\r\n\r\n.monaco-hover .markdown-hover .hover-contents .codicon {\r\n\tcolor: inherit;\r\n\tfont-size: inherit;\r\n\tvertical-align: middle;\r\n}\r\n\r\n.monaco-hover .hover-contents a.code-link:hover,\r\n.monaco-hover .hover-contents a.code-link {\r\n\tcolor: inherit;\r\n}\r\n\r\n.monaco-hover .hover-contents a.code-link:before {\r\n\tcontent: '(';\r\n}\r\n\r\n.monaco-hover .hover-contents a.code-link:after {\r\n\tcontent: ')';\r\n}\r\n\r\n.monaco-hover .hover-contents a.code-link > span {\r\n\ttext-decoration: underline;\r\n\t/** Hack to force underline to show **/\r\n\tborder-bottom: 1px solid transparent;\r\n\ttext-underline-position: under;\r\n}\r\n\r\n/** Spans in markdown hovers need a margin-bottom to avoid looking cramped: https://github.com/microsoft/vscode/issues/101496 **/\r\n.monaco-hover .markdown-hover .hover-contents:not(.code-hover-contents) span {\r\n\tmargin-bottom: 4px;\r\n\tdisplay: inline-block;\r\n}\r\n\r\n.monaco-hover-content .action-container a {\r\n\t-webkit-user-select: none;\r\n\tuser-select: none;\r\n}\r\n\r\n.monaco-hover-content .action-container.disabled {\r\n\tpointer-events: none;\r\n\topacity: 0.4;\r\n\tcursor: default;\r\n}\r\n","",{version:3,sources:["webpack://./node_modules/monaco-editor/esm/vs/base/browser/ui/hover/hover.css"],names:[],mappings:"AAAA;;;+FAG+F;;AAE/F;CACC,eAAe;CACf,kBAAkB;CAClB,gBAAgB;CAChB,WAAW;CACX,iBAAiB;CACjB,yBAAyB;CACzB,qBAAqB;CACrB,mBAAmB;CACnB,8BAA8B;CAC9B,kBAAkB;AACnB;;AAEA;CACC,aAAa;AACd;;AAEA;CACC,gBAAgB;AACjB;;AAEA;CACC,gBAAgB;CAChB,qBAAqB;AACtB;;AAEA;CACC,eAAe;AAChB;;AAEA;;;CAGC,aAAa;AACd;;AAEA;CACC,yCAAyC;AAC1C;;AAEA;CACC,sBAAsB;CACtB,gBAAgB;CAChB,iBAAiB;CACjB,eAAe;CACf,mBAAmB;CACnB,iBAAiB;CACjB,kBAAkB;CAClB,WAAW;AACZ;;AAEA;;;CAGC,aAAa;AACd;;AAEA;;;CAGC,gBAAgB;AACjB;;AAEA,yBAAyB;AACzB;CACC,kBAAkB;AACnB;AACA;CACC,kBAAkB;AACnB;;AAEA;CACC,gBAAgB;AACjB;;AAEA;CACC,aAAa;AACd;;AAEA;CACC,kBAAkB;CAClB,gBAAgB;AACjB;;AAEA;CACC,qBAAqB;AACtB;;AAEA;CACC,eAAe;CACf,iBAAiB;AAClB;;AAEA;CACC,aAAa;CACb,gBAAgB;AACjB;;AAEA;CACC,kBAAkB;CAClB,eAAe;AAChB;;AAEA;CACC,kBAAkB;AACnB;;AAEA;CACC,cAAc;CACd,kBAAkB;CAClB,sBAAsB;AACvB;;AAEA;;CAEC,cAAc;AACf;;AAEA;CACC,YAAY;AACb;;AAEA;CACC,YAAY;AACb;;AAEA;CACC,0BAA0B;CAC1B,sCAAsC;CACtC,oCAAoC;CACpC,8BAA8B;AAC/B;;AAEA,gIAAgI;AAChI;CACC,kBAAkB;CAClB,qBAAqB;AACtB;;AAEA;CACC,yBAAyB;CACzB,iBAAiB;AAClB;;AAEA;CACC,oBAAoB;CACpB,YAAY;CACZ,eAAe;AAChB",sourcesContent:["/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n.monaco-hover {\r\n\tcursor: default;\r\n\tposition: absolute;\r\n\toverflow: hidden;\r\n\tz-index: 50;\r\n\tuser-select: text;\r\n\t-webkit-user-select: text;\r\n\t-ms-user-select: text;\r\n\tbox-sizing: initial;\r\n\tanimation: fadein 100ms linear;\r\n\tline-height: 1.5em;\r\n}\r\n\r\n.monaco-hover.hidden {\r\n\tdisplay: none;\r\n}\r\n\r\n.monaco-hover .hover-contents {\r\n\tpadding: 4px 8px;\r\n}\r\n\r\n.monaco-hover .markdown-hover > .hover-contents:not(.code-hover-contents) {\r\n\tmax-width: 500px;\r\n\tword-wrap: break-word;\r\n}\r\n\r\n.monaco-hover .markdown-hover > .hover-contents:not(.code-hover-contents) hr {\r\n\tmin-width: 100%;\r\n}\r\n\r\n.monaco-hover p,\r\n.monaco-hover .code,\r\n.monaco-hover ul {\r\n\tmargin: 8px 0;\r\n}\r\n\r\n.monaco-hover code {\r\n\tfont-family: var(--monaco-monospace-font);\r\n}\r\n\r\n.monaco-hover hr {\r\n\tbox-sizing: border-box;\r\n\tborder-left: 0px;\r\n\tborder-right: 0px;\r\n\tmargin-top: 4px;\r\n\tmargin-bottom: -4px;\r\n\tmargin-left: -8px;\r\n\tmargin-right: -8px;\r\n\theight: 1px;\r\n}\r\n\r\n.monaco-hover p:first-child,\r\n.monaco-hover .code:first-child,\r\n.monaco-hover ul:first-child {\r\n\tmargin-top: 0;\r\n}\r\n\r\n.monaco-hover p:last-child,\r\n.monaco-hover .code:last-child,\r\n.monaco-hover ul:last-child {\r\n\tmargin-bottom: 0;\r\n}\r\n\r\n/* MarkupContent Layout */\r\n.monaco-hover ul {\r\n\tpadding-left: 20px;\r\n}\r\n.monaco-hover ol {\r\n\tpadding-left: 20px;\r\n}\r\n\r\n.monaco-hover li > p {\r\n\tmargin-bottom: 0;\r\n}\r\n\r\n.monaco-hover li > ul {\r\n\tmargin-top: 0;\r\n}\r\n\r\n.monaco-hover code {\r\n\tborder-radius: 3px;\r\n\tpadding: 0 0.4em;\r\n}\r\n\r\n.monaco-hover .monaco-tokenized-source {\r\n\twhite-space: pre-wrap;\r\n}\r\n\r\n.monaco-hover .hover-row.status-bar {\r\n\tfont-size: 12px;\r\n\tline-height: 22px;\r\n}\r\n\r\n.monaco-hover .hover-row.status-bar .actions {\r\n\tdisplay: flex;\r\n\tpadding: 0px 8px;\r\n}\r\n\r\n.monaco-hover .hover-row.status-bar .actions .action-container {\r\n\tmargin-right: 16px;\r\n\tcursor: pointer;\r\n}\r\n\r\n.monaco-hover .hover-row.status-bar .actions .action-container .action .icon {\r\n\tpadding-right: 4px;\r\n}\r\n\r\n.monaco-hover .markdown-hover .hover-contents .codicon {\r\n\tcolor: inherit;\r\n\tfont-size: inherit;\r\n\tvertical-align: middle;\r\n}\r\n\r\n.monaco-hover .hover-contents a.code-link:hover,\r\n.monaco-hover .hover-contents a.code-link {\r\n\tcolor: inherit;\r\n}\r\n\r\n.monaco-hover .hover-contents a.code-link:before {\r\n\tcontent: '(';\r\n}\r\n\r\n.monaco-hover .hover-contents a.code-link:after {\r\n\tcontent: ')';\r\n}\r\n\r\n.monaco-hover .hover-contents a.code-link > span {\r\n\ttext-decoration: underline;\r\n\t/** Hack to force underline to show **/\r\n\tborder-bottom: 1px solid transparent;\r\n\ttext-underline-position: under;\r\n}\r\n\r\n/** Spans in markdown hovers need a margin-bottom to avoid looking cramped: https://github.com/microsoft/vscode/issues/101496 **/\r\n.monaco-hover .markdown-hover .hover-contents:not(.code-hover-contents) span {\r\n\tmargin-bottom: 4px;\r\n\tdisplay: inline-block;\r\n}\r\n\r\n.monaco-hover-content .action-container a {\r\n\t-webkit-user-select: none;\r\n\tuser-select: none;\r\n}\r\n\r\n.monaco-hover-content .action-container.disabled {\r\n\tpointer-events: none;\r\n\topacity: 0.4;\r\n\tcursor: default;\r\n}\r\n"],sourceRoot:""}]);const a=s},4269:(e,t,n)=>{"use strict";n.d(t,{Z:()=>a});var i=n(7537),o=n.n(i),r=n(3645),s=n.n(r)()(o());s.push([e.id,"/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n/* ---------- Icon label ---------- */\r\n\r\n.monaco-icon-label {\r\n\tdisplay: flex; /* required for icons support :before rule */\r\n\toverflow: hidden;\r\n\ttext-overflow: ellipsis;\r\n}\r\n\r\n.monaco-icon-label::before {\r\n\r\n\t/* svg icons rendered as background image */\r\n\tbackground-size: 16px;\r\n\tbackground-position: left center;\r\n\tbackground-repeat: no-repeat;\r\n\tpadding-right: 6px;\r\n\twidth: 16px;\r\n\theight: 22px;\r\n\tline-height: inherit !important;\r\n\tdisplay: inline-block;\r\n\r\n\t/* fonts icons */\r\n\t-webkit-font-smoothing: antialiased;\r\n\t-moz-osx-font-smoothing: grayscale;\r\n\tvertical-align: top;\r\n\r\n\tflex-shrink: 0; /* fix for https://github.com/microsoft/vscode/issues/13787 */\r\n}\r\n\r\n.monaco-icon-label > .monaco-icon-label-container {\r\n\tmin-width: 0;\r\n\toverflow: hidden;\r\n\ttext-overflow: ellipsis;\r\n\tflex: 1;\r\n}\r\n\r\n.monaco-icon-label > .monaco-icon-label-container > .monaco-icon-name-container > .label-name {\r\n\tcolor: inherit;\r\n\twhite-space: pre; /* enable to show labels that include multiple whitespaces */\r\n}\r\n\r\n.monaco-icon-label > .monaco-icon-label-container > .monaco-icon-name-container > .label-name > .label-separator {\r\n\tmargin: 0 2px;\r\n\topacity: 0.5;\r\n}\r\n\r\n.monaco-icon-label > .monaco-icon-label-container > .monaco-icon-description-container > .label-description {\r\n\topacity: .7;\r\n\tmargin-left: 0.5em;\r\n\tfont-size: 0.9em;\r\n\twhite-space: pre; /* enable to show labels that include multiple whitespaces */\r\n}\r\n\r\n.monaco-icon-label.nowrap > .monaco-icon-label-container > .monaco-icon-description-container > .label-description{\r\n\twhite-space: nowrap\r\n}\r\n\r\n.vs .monaco-icon-label > .monaco-icon-label-container > .monaco-icon-description-container > .label-description {\r\n\topacity: .95;\r\n}\r\n\r\n.monaco-icon-label.italic > .monaco-icon-label-container > .monaco-icon-name-container > .label-name,\r\n.monaco-icon-label.italic > .monaco-icon-label-container > .monaco-icon-description-container > .label-description {\r\n\tfont-style: italic;\r\n}\r\n\r\n.monaco-icon-label.deprecated {\r\n\ttext-decoration: line-through;\r\n\topacity: 0.66;\r\n}\r\n\r\n/* make sure apply italic font style to decorations as well */\r\n.monaco-icon-label.italic::after {\r\n\tfont-style: italic;\r\n}\r\n\r\n.monaco-icon-label.strikethrough > .monaco-icon-label-container > .monaco-icon-name-container > .label-name,\r\n.monaco-icon-label.strikethrough > .monaco-icon-label-container > .monaco-icon-description-container > .label-description {\r\n\ttext-decoration: line-through;\r\n}\r\n\r\n.monaco-icon-label::after {\r\n\topacity: 0.75;\r\n\tfont-size: 90%;\r\n\tfont-weight: 600;\r\n\tmargin: 0 16px 0 5px;\r\n\ttext-align: center;\r\n}\r\n\r\n/* make sure selection color wins when a label is being selected */\r\n.monaco-list:focus .selected .monaco-icon-label, /* list */\r\n.monaco-list:focus .selected .monaco-icon-label::after\r\n{\r\n\tcolor: inherit !important;\r\n}\r\n\r\n.monaco-list-row.focused.selected .label-description,\r\n.monaco-list-row.selected .label-description {\r\n\topacity: .8;\r\n}\r\n","",{version:3,sources:["webpack://./node_modules/monaco-editor/esm/vs/base/browser/ui/iconLabel/iconlabel.css"],names:[],mappings:"AAAA;;;+FAG+F;;AAE/F,qCAAqC;;AAErC;CACC,aAAa,EAAE,4CAA4C;CAC3D,gBAAgB;CAChB,uBAAuB;AACxB;;AAEA;;CAEC,2CAA2C;CAC3C,qBAAqB;CACrB,gCAAgC;CAChC,4BAA4B;CAC5B,kBAAkB;CAClB,WAAW;CACX,YAAY;CACZ,+BAA+B;CAC/B,qBAAqB;;CAErB,gBAAgB;CAChB,mCAAmC;CACnC,kCAAkC;CAClC,mBAAmB;;CAEnB,cAAc,EAAE,6DAA6D;AAC9E;;AAEA;CACC,YAAY;CACZ,gBAAgB;CAChB,uBAAuB;CACvB,OAAO;AACR;;AAEA;CACC,cAAc;CACd,gBAAgB,EAAE,4DAA4D;AAC/E;;AAEA;CACC,aAAa;CACb,YAAY;AACb;;AAEA;CACC,WAAW;CACX,kBAAkB;CAClB,gBAAgB;CAChB,gBAAgB,EAAE,4DAA4D;AAC/E;;AAEA;CACC;AACD;;AAEA;CACC,YAAY;AACb;;AAEA;;CAEC,kBAAkB;AACnB;;AAEA;CACC,6BAA6B;CAC7B,aAAa;AACd;;AAEA,6DAA6D;AAC7D;CACC,kBAAkB;AACnB;;AAEA;;CAEC,6BAA6B;AAC9B;;AAEA;CACC,aAAa;CACb,cAAc;CACd,gBAAgB;CAChB,oBAAoB;CACpB,kBAAkB;AACnB;;AAEA,kEAAkE;AAClE;;;CAGC,yBAAyB;AAC1B;;AAEA;;CAEC,WAAW;AACZ",sourcesContent:["/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n/* ---------- Icon label ---------- */\r\n\r\n.monaco-icon-label {\r\n\tdisplay: flex; /* required for icons support :before rule */\r\n\toverflow: hidden;\r\n\ttext-overflow: ellipsis;\r\n}\r\n\r\n.monaco-icon-label::before {\r\n\r\n\t/* svg icons rendered as background image */\r\n\tbackground-size: 16px;\r\n\tbackground-position: left center;\r\n\tbackground-repeat: no-repeat;\r\n\tpadding-right: 6px;\r\n\twidth: 16px;\r\n\theight: 22px;\r\n\tline-height: inherit !important;\r\n\tdisplay: inline-block;\r\n\r\n\t/* fonts icons */\r\n\t-webkit-font-smoothing: antialiased;\r\n\t-moz-osx-font-smoothing: grayscale;\r\n\tvertical-align: top;\r\n\r\n\tflex-shrink: 0; /* fix for https://github.com/microsoft/vscode/issues/13787 */\r\n}\r\n\r\n.monaco-icon-label > .monaco-icon-label-container {\r\n\tmin-width: 0;\r\n\toverflow: hidden;\r\n\ttext-overflow: ellipsis;\r\n\tflex: 1;\r\n}\r\n\r\n.monaco-icon-label > .monaco-icon-label-container > .monaco-icon-name-container > .label-name {\r\n\tcolor: inherit;\r\n\twhite-space: pre; /* enable to show labels that include multiple whitespaces */\r\n}\r\n\r\n.monaco-icon-label > .monaco-icon-label-container > .monaco-icon-name-container > .label-name > .label-separator {\r\n\tmargin: 0 2px;\r\n\topacity: 0.5;\r\n}\r\n\r\n.monaco-icon-label > .monaco-icon-label-container > .monaco-icon-description-container > .label-description {\r\n\topacity: .7;\r\n\tmargin-left: 0.5em;\r\n\tfont-size: 0.9em;\r\n\twhite-space: pre; /* enable to show labels that include multiple whitespaces */\r\n}\r\n\r\n.monaco-icon-label.nowrap > .monaco-icon-label-container > .monaco-icon-description-container > .label-description{\r\n\twhite-space: nowrap\r\n}\r\n\r\n.vs .monaco-icon-label > .monaco-icon-label-container > .monaco-icon-description-container > .label-description {\r\n\topacity: .95;\r\n}\r\n\r\n.monaco-icon-label.italic > .monaco-icon-label-container > .monaco-icon-name-container > .label-name,\r\n.monaco-icon-label.italic > .monaco-icon-label-container > .monaco-icon-description-container > .label-description {\r\n\tfont-style: italic;\r\n}\r\n\r\n.monaco-icon-label.deprecated {\r\n\ttext-decoration: line-through;\r\n\topacity: 0.66;\r\n}\r\n\r\n/* make sure apply italic font style to decorations as well */\r\n.monaco-icon-label.italic::after {\r\n\tfont-style: italic;\r\n}\r\n\r\n.monaco-icon-label.strikethrough > .monaco-icon-label-container > .monaco-icon-name-container > .label-name,\r\n.monaco-icon-label.strikethrough > .monaco-icon-label-container > .monaco-icon-description-container > .label-description {\r\n\ttext-decoration: line-through;\r\n}\r\n\r\n.monaco-icon-label::after {\r\n\topacity: 0.75;\r\n\tfont-size: 90%;\r\n\tfont-weight: 600;\r\n\tmargin: 0 16px 0 5px;\r\n\ttext-align: center;\r\n}\r\n\r\n/* make sure selection color wins when a label is being selected */\r\n.monaco-list:focus .selected .monaco-icon-label, /* list */\r\n.monaco-list:focus .selected .monaco-icon-label::after\r\n{\r\n\tcolor: inherit !important;\r\n}\r\n\r\n.monaco-list-row.focused.selected .label-description,\r\n.monaco-list-row.selected .label-description {\r\n\topacity: .8;\r\n}\r\n"],sourceRoot:""}]);const a=s},1188:(e,t,n)=>{"use strict";n.d(t,{Z:()=>a});var i=n(7537),o=n.n(i),r=n(3645),s=n.n(r)()(o());s.push([e.id,"/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n.monaco-inputbox {\r\n\tposition: relative;\r\n\tdisplay: block;\r\n\tpadding: 0;\r\n\tbox-sizing:\tborder-box;\r\n\r\n\t/* Customizable */\r\n\tfont-size: inherit;\r\n}\r\n\r\n.monaco-inputbox.idle {\r\n\tborder: 1px solid transparent;\r\n}\r\n\r\n.monaco-inputbox > .ibwrapper > .input,\r\n.monaco-inputbox > .ibwrapper > .mirror {\r\n\r\n\t/* Customizable */\r\n\tpadding: 4px;\r\n}\r\n\r\n.monaco-inputbox > .ibwrapper {\r\n\tposition: relative;\r\n\twidth: 100%;\r\n\theight: 100%;\r\n}\r\n\r\n.monaco-inputbox > .ibwrapper > .input {\r\n\tdisplay: inline-block;\r\n\tbox-sizing:\tborder-box;\r\n\twidth: 100%;\r\n\theight: 100%;\r\n\tline-height: inherit;\r\n\tborder: none;\r\n\tfont-family: inherit;\r\n\tfont-size: inherit;\r\n\tresize: none;\r\n\tcolor: inherit;\r\n}\r\n\r\n.monaco-inputbox > .ibwrapper > input {\r\n\ttext-overflow: ellipsis;\r\n}\r\n\r\n.monaco-inputbox > .ibwrapper > textarea.input {\r\n\tdisplay: block;\r\n\t-ms-overflow-style: none; /* IE 10+: hide scrollbars */\r\n\tscrollbar-width: none; /* Firefox: hide scrollbars */\r\n\toutline: none;\r\n}\r\n\r\n.monaco-inputbox > .ibwrapper > textarea.input::-webkit-scrollbar {\r\n\tdisplay: none; /* Chrome + Safari: hide scrollbar */\r\n}\r\n\r\n.monaco-inputbox > .ibwrapper > textarea.input.empty {\r\n\twhite-space: nowrap;\r\n}\r\n\r\n.monaco-inputbox > .ibwrapper > .mirror {\r\n\tposition: absolute;\r\n\tdisplay: inline-block;\r\n\twidth: 100%;\r\n\ttop: 0;\r\n\tleft: 0;\r\n\tbox-sizing: border-box;\r\n\twhite-space: pre-wrap;\r\n\tvisibility: hidden;\r\n\tword-wrap: break-word;\r\n}\r\n\r\n/* Context view */\r\n\r\n.monaco-inputbox-container {\r\n\ttext-align: right;\r\n}\r\n\r\n.monaco-inputbox-container .monaco-inputbox-message {\r\n\tdisplay: inline-block;\r\n\toverflow: hidden;\r\n\ttext-align: left;\r\n\twidth: 100%;\r\n\tbox-sizing:\tborder-box;\r\n\tpadding: 0.4em;\r\n\tfont-size: 12px;\r\n\tline-height: 17px;\r\n\tmargin-top: -1px;\r\n\tword-wrap: break-word;\r\n}\r\n\r\n/* Action bar support */\r\n.monaco-inputbox .monaco-action-bar {\r\n\tposition: absolute;\r\n\tright: 2px;\r\n\ttop: 4px;\r\n}\r\n\r\n.monaco-inputbox .monaco-action-bar .action-item {\r\n\tmargin-left: 2px;\r\n}\r\n\r\n.monaco-inputbox .monaco-action-bar .action-item .codicon {\r\n\tbackground-repeat: no-repeat;\r\n\twidth: 16px;\r\n\theight: 16px;\r\n}\r\n","",{version:3,sources:["webpack://./node_modules/monaco-editor/esm/vs/base/browser/ui/inputbox/inputBox.css"],names:[],mappings:"AAAA;;;+FAG+F;;AAE/F;CACC,kBAAkB;CAClB,cAAc;CACd,UAAU;CACV,sBAAsB;;CAEtB,iBAAiB;CACjB,kBAAkB;AACnB;;AAEA;CACC,6BAA6B;AAC9B;;AAEA;;;CAGC,iBAAiB;CACjB,YAAY;AACb;;AAEA;CACC,kBAAkB;CAClB,WAAW;CACX,YAAY;AACb;;AAEA;CACC,qBAAqB;CACrB,sBAAsB;CACtB,WAAW;CACX,YAAY;CACZ,oBAAoB;CACpB,YAAY;CACZ,oBAAoB;CACpB,kBAAkB;CAClB,YAAY;CACZ,cAAc;AACf;;AAEA;CACC,uBAAuB;AACxB;;AAEA;CACC,cAAc;CACd,wBAAwB,EAAE,4BAA4B;CACtD,qBAAqB,EAAE,6BAA6B;CACpD,aAAa;AACd;;AAEA;CACC,aAAa,EAAE,oCAAoC;AACpD;;AAEA;CACC,mBAAmB;AACpB;;AAEA;CACC,kBAAkB;CAClB,qBAAqB;CACrB,WAAW;CACX,MAAM;CACN,OAAO;CACP,sBAAsB;CACtB,qBAAqB;CACrB,kBAAkB;CAClB,qBAAqB;AACtB;;AAEA,iBAAiB;;AAEjB;CACC,iBAAiB;AAClB;;AAEA;CACC,qBAAqB;CACrB,gBAAgB;CAChB,gBAAgB;CAChB,WAAW;CACX,sBAAsB;CACtB,cAAc;CACd,eAAe;CACf,iBAAiB;CACjB,gBAAgB;CAChB,qBAAqB;AACtB;;AAEA,uBAAuB;AACvB;CACC,kBAAkB;CAClB,UAAU;CACV,QAAQ;AACT;;AAEA;CACC,gBAAgB;AACjB;;AAEA;CACC,4BAA4B;CAC5B,WAAW;CACX,YAAY;AACb",sourcesContent:["/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n.monaco-inputbox {\r\n\tposition: relative;\r\n\tdisplay: block;\r\n\tpadding: 0;\r\n\tbox-sizing:\tborder-box;\r\n\r\n\t/* Customizable */\r\n\tfont-size: inherit;\r\n}\r\n\r\n.monaco-inputbox.idle {\r\n\tborder: 1px solid transparent;\r\n}\r\n\r\n.monaco-inputbox > .ibwrapper > .input,\r\n.monaco-inputbox > .ibwrapper > .mirror {\r\n\r\n\t/* Customizable */\r\n\tpadding: 4px;\r\n}\r\n\r\n.monaco-inputbox > .ibwrapper {\r\n\tposition: relative;\r\n\twidth: 100%;\r\n\theight: 100%;\r\n}\r\n\r\n.monaco-inputbox > .ibwrapper > .input {\r\n\tdisplay: inline-block;\r\n\tbox-sizing:\tborder-box;\r\n\twidth: 100%;\r\n\theight: 100%;\r\n\tline-height: inherit;\r\n\tborder: none;\r\n\tfont-family: inherit;\r\n\tfont-size: inherit;\r\n\tresize: none;\r\n\tcolor: inherit;\r\n}\r\n\r\n.monaco-inputbox > .ibwrapper > input {\r\n\ttext-overflow: ellipsis;\r\n}\r\n\r\n.monaco-inputbox > .ibwrapper > textarea.input {\r\n\tdisplay: block;\r\n\t-ms-overflow-style: none; /* IE 10+: hide scrollbars */\r\n\tscrollbar-width: none; /* Firefox: hide scrollbars */\r\n\toutline: none;\r\n}\r\n\r\n.monaco-inputbox > .ibwrapper > textarea.input::-webkit-scrollbar {\r\n\tdisplay: none; /* Chrome + Safari: hide scrollbar */\r\n}\r\n\r\n.monaco-inputbox > .ibwrapper > textarea.input.empty {\r\n\twhite-space: nowrap;\r\n}\r\n\r\n.monaco-inputbox > .ibwrapper > .mirror {\r\n\tposition: absolute;\r\n\tdisplay: inline-block;\r\n\twidth: 100%;\r\n\ttop: 0;\r\n\tleft: 0;\r\n\tbox-sizing: border-box;\r\n\twhite-space: pre-wrap;\r\n\tvisibility: hidden;\r\n\tword-wrap: break-word;\r\n}\r\n\r\n/* Context view */\r\n\r\n.monaco-inputbox-container {\r\n\ttext-align: right;\r\n}\r\n\r\n.monaco-inputbox-container .monaco-inputbox-message {\r\n\tdisplay: inline-block;\r\n\toverflow: hidden;\r\n\ttext-align: left;\r\n\twidth: 100%;\r\n\tbox-sizing:\tborder-box;\r\n\tpadding: 0.4em;\r\n\tfont-size: 12px;\r\n\tline-height: 17px;\r\n\tmargin-top: -1px;\r\n\tword-wrap: break-word;\r\n}\r\n\r\n/* Action bar support */\r\n.monaco-inputbox .monaco-action-bar {\r\n\tposition: absolute;\r\n\tright: 2px;\r\n\ttop: 4px;\r\n}\r\n\r\n.monaco-inputbox .monaco-action-bar .action-item {\r\n\tmargin-left: 2px;\r\n}\r\n\r\n.monaco-inputbox .monaco-action-bar .action-item .codicon {\r\n\tbackground-repeat: no-repeat;\r\n\twidth: 16px;\r\n\theight: 16px;\r\n}\r\n"],sourceRoot:""}]);const a=s},2298:(e,t,n)=>{"use strict";n.d(t,{Z:()=>a});var i=n(7537),o=n.n(i),r=n(3645),s=n.n(r)()(o());s.push([e.id,"/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n.monaco-keybinding {\r\n\tdisplay: flex;\r\n\talign-items: center;\r\n\tline-height: 10px;\r\n}\r\n\r\n.monaco-keybinding > .monaco-keybinding-key {\r\n\tdisplay: inline-block;\r\n\tborder-style: solid;\r\n\tborder-width: 1px;\r\n\tborder-radius: 3px;\r\n\tvertical-align: middle;\r\n\tfont-size: 11px;\r\n\tpadding: 3px 5px;\r\n\tmargin: 0 2px;\r\n}\r\n\r\n.monaco-keybinding > .monaco-keybinding-key:first-child {\r\n\tmargin-left: 0;\r\n}\r\n\r\n.monaco-keybinding > .monaco-keybinding-key:last-child {\r\n\tmargin-right: 0;\r\n}\r\n\r\n.monaco-keybinding > .monaco-keybinding-key-separator {\r\n\tdisplay: inline-block;\r\n}\r\n\r\n.monaco-keybinding > .monaco-keybinding-key-chord-separator {\r\n\twidth: 6px;\r\n}\r\n","",{version:3,sources:["webpack://./node_modules/monaco-editor/esm/vs/base/browser/ui/keybindingLabel/keybindingLabel.css"],names:[],mappings:"AAAA;;;+FAG+F;;AAE/F;CACC,aAAa;CACb,mBAAmB;CACnB,iBAAiB;AAClB;;AAEA;CACC,qBAAqB;CACrB,mBAAmB;CACnB,iBAAiB;CACjB,kBAAkB;CAClB,sBAAsB;CACtB,eAAe;CACf,gBAAgB;CAChB,aAAa;AACd;;AAEA;CACC,cAAc;AACf;;AAEA;CACC,eAAe;AAChB;;AAEA;CACC,qBAAqB;AACtB;;AAEA;CACC,UAAU;AACX",sourcesContent:["/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n.monaco-keybinding {\r\n\tdisplay: flex;\r\n\talign-items: center;\r\n\tline-height: 10px;\r\n}\r\n\r\n.monaco-keybinding > .monaco-keybinding-key {\r\n\tdisplay: inline-block;\r\n\tborder-style: solid;\r\n\tborder-width: 1px;\r\n\tborder-radius: 3px;\r\n\tvertical-align: middle;\r\n\tfont-size: 11px;\r\n\tpadding: 3px 5px;\r\n\tmargin: 0 2px;\r\n}\r\n\r\n.monaco-keybinding > .monaco-keybinding-key:first-child {\r\n\tmargin-left: 0;\r\n}\r\n\r\n.monaco-keybinding > .monaco-keybinding-key:last-child {\r\n\tmargin-right: 0;\r\n}\r\n\r\n.monaco-keybinding > .monaco-keybinding-key-separator {\r\n\tdisplay: inline-block;\r\n}\r\n\r\n.monaco-keybinding > .monaco-keybinding-key-chord-separator {\r\n\twidth: 6px;\r\n}\r\n"],sourceRoot:""}]);const a=s},7703:(e,t,n)=>{"use strict";n.d(t,{Z:()=>a});var i=n(7537),o=n.n(i),r=n(3645),s=n.n(r)()(o());s.push([e.id,"/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n.monaco-list {\r\n\tposition: relative;\r\n\theight: 100%;\r\n\twidth: 100%;\r\n\twhite-space: nowrap;\r\n}\r\n\r\n.monaco-list.mouse-support {\r\n\tuser-select: none;\r\n\t-webkit-user-select: none;\r\n\t-ms-user-select: none;\r\n}\r\n\r\n.monaco-list > .monaco-scrollable-element {\r\n\theight: 100%;\r\n}\r\n\r\n.monaco-list-rows {\r\n\tposition: relative;\r\n\twidth: 100%;\r\n\theight: 100%;\r\n}\r\n\r\n.monaco-list.horizontal-scrolling .monaco-list-rows {\r\n\twidth: auto;\r\n\tmin-width: 100%;\r\n}\r\n\r\n.monaco-list-row {\r\n\tposition: absolute;\r\n\tbox-sizing: border-box;\r\n\toverflow: hidden;\r\n\twidth: 100%;\r\n}\r\n\r\n.monaco-list.mouse-support .monaco-list-row {\r\n\tcursor: pointer;\r\n\ttouch-action: none;\r\n}\r\n\r\n/* for OS X ballistic scrolling */\r\n.monaco-list-row.scrolling {\r\n\tdisplay: none !important;\r\n}\r\n\r\n/* Focus */\r\n.monaco-list.element-focused,\r\n.monaco-list.selection-single,\r\n.monaco-list.selection-multiple {\r\n\toutline: 0 !important;\r\n}\r\n\r\n/* Dnd */\r\n.monaco-drag-image {\r\n\tdisplay: inline-block;\r\n\tpadding: 1px 7px;\r\n\tborder-radius: 10px;\r\n\tfont-size: 12px;\r\n\tposition: absolute;\r\n\tz-index: 1000;\r\n}\r\n\r\n/* Type filter */\r\n\r\n.monaco-list-type-filter {\r\n\tdisplay: flex;\r\n\talign-items: center;\r\n\tposition: absolute;\r\n\tborder-radius: 2px;\r\n\tpadding: 0px 3px;\r\n\tmax-width: calc(100% - 10px);\r\n\ttext-overflow: ellipsis;\r\n\toverflow: hidden;\r\n\ttext-align: right;\r\n\tbox-sizing: border-box;\r\n\tcursor: all-scroll;\r\n\tfont-size: 13px;\r\n\tline-height: 18px;\r\n\theight: 20px;\r\n\tz-index: 1;\r\n\ttop: 4px;\r\n}\r\n\r\n.monaco-list-type-filter.dragging {\r\n\ttransition: top 0.2s, left 0.2s;\r\n}\r\n\r\n.monaco-list-type-filter.ne {\r\n\tright: 4px;\r\n}\r\n\r\n.monaco-list-type-filter.nw {\r\n\tleft: 4px;\r\n}\r\n\r\n.monaco-list-type-filter > .controls {\r\n\tdisplay: flex;\r\n\talign-items: center;\r\n\tbox-sizing: border-box;\r\n\ttransition: width 0.2s;\r\n\twidth: 0;\r\n}\r\n\r\n.monaco-list-type-filter.dragging > .controls,\r\n.monaco-list-type-filter:hover > .controls {\r\n\twidth: 36px;\r\n}\r\n\r\n.monaco-list-type-filter > .controls > * {\r\n\tborder: none;\r\n\tbox-sizing: border-box;\r\n\t-webkit-appearance: none;\r\n\t-moz-appearance: none;\r\n\tbackground: none;\r\n\twidth: 16px;\r\n\theight: 16px;\r\n\tflex-shrink: 0;\r\n\tmargin: 0;\r\n\tpadding: 0;\r\n\tdisplay: flex;\r\n\talign-items: center;\r\n\tjustify-content: center;\r\n\tcursor: pointer;\r\n}\r\n\r\n.monaco-list-type-filter > .controls > .filter {\r\n\tmargin-left: 4px;\r\n}\r\n\r\n.monaco-list-type-filter-message {\r\n\tposition: absolute;\r\n\tbox-sizing: border-box;\r\n\twidth: 100%;\r\n\theight: 100%;\r\n\ttop: 0;\r\n\tleft: 0;\r\n\tpadding: 40px 1em 1em 1em;\r\n\ttext-align: center;\r\n\twhite-space: normal;\r\n\topacity: 0.7;\r\n\tpointer-events: none;\r\n}\r\n\r\n.monaco-list-type-filter-message:empty {\r\n\tdisplay: none;\r\n}\r\n\r\n/* Electron */\r\n\r\n.monaco-list-type-filter {\r\n\tcursor: grab;\r\n}\r\n\r\n.monaco-list-type-filter.dragging {\r\n\tcursor: grabbing;\r\n}\r\n","",{version:3,sources:["webpack://./node_modules/monaco-editor/esm/vs/base/browser/ui/list/list.css"],names:[],mappings:"AAAA;;;+FAG+F;;AAE/F;CACC,kBAAkB;CAClB,YAAY;CACZ,WAAW;CACX,mBAAmB;AACpB;;AAEA;CACC,iBAAiB;CACjB,yBAAyB;CACzB,qBAAqB;AACtB;;AAEA;CACC,YAAY;AACb;;AAEA;CACC,kBAAkB;CAClB,WAAW;CACX,YAAY;AACb;;AAEA;CACC,WAAW;CACX,eAAe;AAChB;;AAEA;CACC,kBAAkB;CAClB,sBAAsB;CACtB,gBAAgB;CAChB,WAAW;AACZ;;AAEA;CACC,eAAe;CACf,kBAAkB;AACnB;;AAEA,iCAAiC;AACjC;CACC,wBAAwB;AACzB;;AAEA,UAAU;AACV;;;CAGC,qBAAqB;AACtB;;AAEA,QAAQ;AACR;CACC,qBAAqB;CACrB,gBAAgB;CAChB,mBAAmB;CACnB,eAAe;CACf,kBAAkB;CAClB,aAAa;AACd;;AAEA,gBAAgB;;AAEhB;CACC,aAAa;CACb,mBAAmB;CACnB,kBAAkB;CAClB,kBAAkB;CAClB,gBAAgB;CAChB,4BAA4B;CAC5B,uBAAuB;CACvB,gBAAgB;CAChB,iBAAiB;CACjB,sBAAsB;CACtB,kBAAkB;CAClB,eAAe;CACf,iBAAiB;CACjB,YAAY;CACZ,UAAU;CACV,QAAQ;AACT;;AAEA;CACC,+BAA+B;AAChC;;AAEA;CACC,UAAU;AACX;;AAEA;CACC,SAAS;AACV;;AAEA;CACC,aAAa;CACb,mBAAmB;CACnB,sBAAsB;CACtB,sBAAsB;CACtB,QAAQ;AACT;;AAEA;;CAEC,WAAW;AACZ;;AAEA;CACC,YAAY;CACZ,sBAAsB;CACtB,wBAAwB;CACxB,qBAAqB;CACrB,gBAAgB;CAChB,WAAW;CACX,YAAY;CACZ,cAAc;CACd,SAAS;CACT,UAAU;CACV,aAAa;CACb,mBAAmB;CACnB,uBAAuB;CACvB,eAAe;AAChB;;AAEA;CACC,gBAAgB;AACjB;;AAEA;CACC,kBAAkB;CAClB,sBAAsB;CACtB,WAAW;CACX,YAAY;CACZ,MAAM;CACN,OAAO;CACP,yBAAyB;CACzB,kBAAkB;CAClB,mBAAmB;CACnB,YAAY;CACZ,oBAAoB;AACrB;;AAEA;CACC,aAAa;AACd;;AAEA,aAAa;;AAEb;CACC,YAAY;AACb;;AAEA;CACC,gBAAgB;AACjB",sourcesContent:["/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n.monaco-list {\r\n\tposition: relative;\r\n\theight: 100%;\r\n\twidth: 100%;\r\n\twhite-space: nowrap;\r\n}\r\n\r\n.monaco-list.mouse-support {\r\n\tuser-select: none;\r\n\t-webkit-user-select: none;\r\n\t-ms-user-select: none;\r\n}\r\n\r\n.monaco-list > .monaco-scrollable-element {\r\n\theight: 100%;\r\n}\r\n\r\n.monaco-list-rows {\r\n\tposition: relative;\r\n\twidth: 100%;\r\n\theight: 100%;\r\n}\r\n\r\n.monaco-list.horizontal-scrolling .monaco-list-rows {\r\n\twidth: auto;\r\n\tmin-width: 100%;\r\n}\r\n\r\n.monaco-list-row {\r\n\tposition: absolute;\r\n\tbox-sizing: border-box;\r\n\toverflow: hidden;\r\n\twidth: 100%;\r\n}\r\n\r\n.monaco-list.mouse-support .monaco-list-row {\r\n\tcursor: pointer;\r\n\ttouch-action: none;\r\n}\r\n\r\n/* for OS X ballistic scrolling */\r\n.monaco-list-row.scrolling {\r\n\tdisplay: none !important;\r\n}\r\n\r\n/* Focus */\r\n.monaco-list.element-focused,\r\n.monaco-list.selection-single,\r\n.monaco-list.selection-multiple {\r\n\toutline: 0 !important;\r\n}\r\n\r\n/* Dnd */\r\n.monaco-drag-image {\r\n\tdisplay: inline-block;\r\n\tpadding: 1px 7px;\r\n\tborder-radius: 10px;\r\n\tfont-size: 12px;\r\n\tposition: absolute;\r\n\tz-index: 1000;\r\n}\r\n\r\n/* Type filter */\r\n\r\n.monaco-list-type-filter {\r\n\tdisplay: flex;\r\n\talign-items: center;\r\n\tposition: absolute;\r\n\tborder-radius: 2px;\r\n\tpadding: 0px 3px;\r\n\tmax-width: calc(100% - 10px);\r\n\ttext-overflow: ellipsis;\r\n\toverflow: hidden;\r\n\ttext-align: right;\r\n\tbox-sizing: border-box;\r\n\tcursor: all-scroll;\r\n\tfont-size: 13px;\r\n\tline-height: 18px;\r\n\theight: 20px;\r\n\tz-index: 1;\r\n\ttop: 4px;\r\n}\r\n\r\n.monaco-list-type-filter.dragging {\r\n\ttransition: top 0.2s, left 0.2s;\r\n}\r\n\r\n.monaco-list-type-filter.ne {\r\n\tright: 4px;\r\n}\r\n\r\n.monaco-list-type-filter.nw {\r\n\tleft: 4px;\r\n}\r\n\r\n.monaco-list-type-filter > .controls {\r\n\tdisplay: flex;\r\n\talign-items: center;\r\n\tbox-sizing: border-box;\r\n\ttransition: width 0.2s;\r\n\twidth: 0;\r\n}\r\n\r\n.monaco-list-type-filter.dragging > .controls,\r\n.monaco-list-type-filter:hover > .controls {\r\n\twidth: 36px;\r\n}\r\n\r\n.monaco-list-type-filter > .controls > * {\r\n\tborder: none;\r\n\tbox-sizing: border-box;\r\n\t-webkit-appearance: none;\r\n\t-moz-appearance: none;\r\n\tbackground: none;\r\n\twidth: 16px;\r\n\theight: 16px;\r\n\tflex-shrink: 0;\r\n\tmargin: 0;\r\n\tpadding: 0;\r\n\tdisplay: flex;\r\n\talign-items: center;\r\n\tjustify-content: center;\r\n\tcursor: pointer;\r\n}\r\n\r\n.monaco-list-type-filter > .controls > .filter {\r\n\tmargin-left: 4px;\r\n}\r\n\r\n.monaco-list-type-filter-message {\r\n\tposition: absolute;\r\n\tbox-sizing: border-box;\r\n\twidth: 100%;\r\n\theight: 100%;\r\n\ttop: 0;\r\n\tleft: 0;\r\n\tpadding: 40px 1em 1em 1em;\r\n\ttext-align: center;\r\n\twhite-space: normal;\r\n\topacity: 0.7;\r\n\tpointer-events: none;\r\n}\r\n\r\n.monaco-list-type-filter-message:empty {\r\n\tdisplay: none;\r\n}\r\n\r\n/* Electron */\r\n\r\n.monaco-list-type-filter {\r\n\tcursor: grab;\r\n}\r\n\r\n.monaco-list-type-filter.dragging {\r\n\tcursor: grabbing;\r\n}\r\n"],sourceRoot:""}]);const a=s},7548:(e,t,n)=>{"use strict";n.d(t,{Z:()=>p});var i=n(7537),o=n.n(i),r=n(3645),s=n.n(r),a=n(1667),l=n.n(a),d=new URL(n(4768),n.b),c=new URL(n(5555),n.b),h=s()(o()),u=l()(d),g=l()(c);h.push([e.id,"/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n.monaco-mouse-cursor-text {\r\n\tcursor: text;\r\n}\r\n\r\n/* The following selector looks a bit funny, but that is needed to cover all the workbench and the editor!! */\r\n.vs-dark .mac .monaco-mouse-cursor-text, .hc-black .mac .monaco-mouse-cursor-text,\r\n.vs-dark.mac .monaco-mouse-cursor-text, .hc-black.mac .monaco-mouse-cursor-text {\r\n\tcursor: -webkit-image-set(url("+u+") 1x, url("+g+") 2x) 5 8, text;\r\n}\r\n","",{version:3,sources:["webpack://./node_modules/monaco-editor/esm/vs/base/browser/ui/mouseCursor/mouseCursor.css"],names:[],mappings:"AAAA;;;+FAG+F;;AAE/F;CACC,YAAY;AACb;;AAEA,6GAA6G;AAC7G;;CAEC,2HAA+kB;AAChlB",sourcesContent:["/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n.monaco-mouse-cursor-text {\r\n\tcursor: text;\r\n}\r\n\r\n/* The following selector looks a bit funny, but that is needed to cover all the workbench and the editor!! */\r\n.vs-dark .mac .monaco-mouse-cursor-text, .hc-black .mac .monaco-mouse-cursor-text,\r\n.vs-dark.mac .monaco-mouse-cursor-text, .hc-black.mac .monaco-mouse-cursor-text {\r\n\tcursor: -webkit-image-set(url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAQAAAC1+jfqAAAAL0lEQVQoz2NgCD3x//9/BhBYBWdhgFVAiVW4JBFKGIa4AqD0//9D3pt4I4tAdAMAHTQ/j5Zom30AAAAASUVORK5CYII=) 1x, url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAQAAADZc7J/AAAAz0lEQVRIx2NgYGBY/R8I/vx5eelX3n82IJ9FxGf6tksvf/8FiTMQAcAGQMDvSwu09abffY8QYSAScNk45G198eX//yev73/4///701eh//kZSARckrNBRvz//+8+6ZohwCzjGNjdgQxkAg7B9WADeBjIBqtJCbhRA0YNoIkBSNmaPEMoNmA0FkYNoFKhapJ6FGyAH3nauaSmPfwI0v/3OukVi0CIZ+F25KrtYcx/CTIy0e+rC7R1Z4KMICVTQQ14feVXIbR695u14+Ir4gwAAD49E54wc1kWAAAAAElFTkSuQmCC) 2x) 5 8, text;\r\n}\r\n"],sourceRoot:""}]);const p=h},4185:(e,t,n)=>{"use strict";n.d(t,{Z:()=>a});var i=n(7537),o=n.n(i),r=n(3645),s=n.n(r)()(o());s.push([e.id,"/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n.monaco-progress-container {\r\n\twidth: 100%;\r\n\theight: 5px;\r\n\toverflow: hidden; /* keep progress bit in bounds */\r\n}\r\n\r\n.monaco-progress-container .progress-bit {\r\n\twidth: 2%;\r\n\theight: 5px;\r\n\tposition: absolute;\r\n\tleft: 0;\r\n\tdisplay: none;\r\n}\r\n\r\n.monaco-progress-container.active .progress-bit {\r\n\tdisplay: inherit;\r\n}\r\n\r\n.monaco-progress-container.discrete .progress-bit {\r\n\tleft: 0;\r\n\ttransition: width 100ms linear;\r\n}\r\n\r\n.monaco-progress-container.discrete.done .progress-bit {\r\n\twidth: 100%;\r\n}\r\n\r\n.monaco-progress-container.infinite .progress-bit {\r\n\tanimation-name: progress;\r\n\tanimation-duration: 4s;\r\n\tanimation-iteration-count: infinite;\r\n\tanimation-timing-function: linear;\r\n\ttransform: translate3d(0px, 0px, 0px);\r\n}\r\n\r\n/**\r\n * The progress bit has a width: 2% (1/50) of the parent container. The animation moves it from 0% to 100% of\r\n * that container. Since translateX is relative to the progress bit size, we have to multiple it with\r\n * its relative size to the parent container:\r\n * parent width: 5000%\r\n * bit width: 100%\r\n * translateX should be as follow:\r\n * 50%: 5000% * 50% - 50% (set to center) = 2450%\r\n * 100%: 5000% * 100% - 100% (do not overflow) = 4900%\r\n */\r\n@keyframes progress { from { transform: translateX(0%) scaleX(1) } 50% { transform: translateX(2500%) scaleX(3) } to { transform: translateX(4900%) scaleX(1) } }\r\n","",{version:3,sources:["webpack://./node_modules/monaco-editor/esm/vs/base/browser/ui/progressbar/progressbar.css"],names:[],mappings:"AAAA;;;+FAG+F;;AAE/F;CACC,WAAW;CACX,WAAW;CACX,gBAAgB,EAAE,gCAAgC;AACnD;;AAEA;CACC,SAAS;CACT,WAAW;CACX,kBAAkB;CAClB,OAAO;CACP,aAAa;AACd;;AAEA;CACC,gBAAgB;AACjB;;AAEA;CACC,OAAO;CACP,8BAA8B;AAC/B;;AAEA;CACC,WAAW;AACZ;;AAEA;CACC,wBAAwB;CACxB,sBAAsB;CACtB,mCAAmC;CACnC,iCAAiC;CACjC,qCAAqC;AACtC;;AAEA;;;;;;;;;EASE;AACF,sBAAsB,OAAO,oCAAoC,EAAE,MAAM,uCAAuC,EAAE,KAAK,uCAAuC,EAAE",sourcesContent:["/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n.monaco-progress-container {\r\n\twidth: 100%;\r\n\theight: 5px;\r\n\toverflow: hidden; /* keep progress bit in bounds */\r\n}\r\n\r\n.monaco-progress-container .progress-bit {\r\n\twidth: 2%;\r\n\theight: 5px;\r\n\tposition: absolute;\r\n\tleft: 0;\r\n\tdisplay: none;\r\n}\r\n\r\n.monaco-progress-container.active .progress-bit {\r\n\tdisplay: inherit;\r\n}\r\n\r\n.monaco-progress-container.discrete .progress-bit {\r\n\tleft: 0;\r\n\ttransition: width 100ms linear;\r\n}\r\n\r\n.monaco-progress-container.discrete.done .progress-bit {\r\n\twidth: 100%;\r\n}\r\n\r\n.monaco-progress-container.infinite .progress-bit {\r\n\tanimation-name: progress;\r\n\tanimation-duration: 4s;\r\n\tanimation-iteration-count: infinite;\r\n\tanimation-timing-function: linear;\r\n\ttransform: translate3d(0px, 0px, 0px);\r\n}\r\n\r\n/**\r\n * The progress bit has a width: 2% (1/50) of the parent container. The animation moves it from 0% to 100% of\r\n * that container. Since translateX is relative to the progress bit size, we have to multiple it with\r\n * its relative size to the parent container:\r\n * parent width: 5000%\r\n * bit width: 100%\r\n * translateX should be as follow:\r\n * 50%: 5000% * 50% - 50% (set to center) = 2450%\r\n * 100%: 5000% * 100% - 100% (do not overflow) = 4900%\r\n */\r\n@keyframes progress { from { transform: translateX(0%) scaleX(1) } 50% { transform: translateX(2500%) scaleX(3) } to { transform: translateX(4900%) scaleX(1) } }\r\n"],sourceRoot:""}]);const a=s},1629:(e,t,n)=>{"use strict";n.d(t,{Z:()=>a});var i=n(7537),o=n.n(i),r=n(3645),s=n.n(r)()(o());s.push([e.id,"/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n:root {\r\n\t--sash-size: 4px;\r\n}\r\n\r\n.monaco-sash {\r\n\tposition: absolute;\r\n\tz-index: 35;\r\n\ttouch-action: none;\r\n}\r\n\r\n.monaco-sash.disabled {\r\n\tpointer-events: none;\r\n}\r\n\r\n.monaco-sash.mac.vertical {\r\n\tcursor: col-resize;\r\n}\r\n\r\n.monaco-sash.vertical.minimum {\r\n\tcursor: e-resize;\r\n}\r\n\r\n.monaco-sash.vertical.maximum {\r\n\tcursor: w-resize;\r\n}\r\n\r\n.monaco-sash.mac.horizontal {\r\n\tcursor: row-resize;\r\n}\r\n\r\n.monaco-sash.horizontal.minimum {\r\n\tcursor: s-resize;\r\n}\r\n\r\n.monaco-sash.horizontal.maximum {\r\n\tcursor: n-resize;\r\n}\r\n\r\n.monaco-sash.disabled {\r\n\tcursor: default !important;\r\n\tpointer-events: none !important;\r\n}\r\n\r\n.monaco-sash.vertical {\r\n\tcursor: ew-resize;\r\n\ttop: 0;\r\n\twidth: var(--sash-size);\r\n\theight: 100%;\r\n}\r\n\r\n.monaco-sash.horizontal {\r\n\tcursor: ns-resize;\r\n\tleft: 0;\r\n\twidth: 100%;\r\n\theight: var(--sash-size);\r\n}\r\n\r\n.monaco-sash:not(.disabled) > .orthogonal-drag-handle {\r\n\tcontent: \" \";\r\n\theight: calc(var(--sash-size) * 2);\r\n\twidth: calc(var(--sash-size) * 2);\r\n\tz-index: 100;\r\n\tdisplay: block;\r\n\tcursor: all-scroll;\r\n\tposition: absolute;\r\n}\r\n\r\n.monaco-sash.horizontal.orthogonal-edge-north:not(.disabled)\r\n\t> .orthogonal-drag-handle.start,\r\n.monaco-sash.horizontal.orthogonal-edge-south:not(.disabled)\r\n\t> .orthogonal-drag-handle.end {\r\n\tcursor: nwse-resize;\r\n}\r\n\r\n.monaco-sash.horizontal.orthogonal-edge-north:not(.disabled)\r\n\t> .orthogonal-drag-handle.end,\r\n.monaco-sash.horizontal.orthogonal-edge-south:not(.disabled)\r\n\t> .orthogonal-drag-handle.start {\r\n\tcursor: nesw-resize;\r\n}\r\n\r\n.monaco-sash.vertical > .orthogonal-drag-handle.start {\r\n\tleft: calc(var(--sash-size) * -0.5);\r\n\ttop: calc(var(--sash-size) * -1);\r\n}\r\n.monaco-sash.vertical > .orthogonal-drag-handle.end {\r\n\tleft: calc(var(--sash-size) * -0.5);\r\n\tbottom: calc(var(--sash-size) * -1);\r\n}\r\n.monaco-sash.horizontal > .orthogonal-drag-handle.start {\r\n\ttop: calc(var(--sash-size) * -0.5);\r\n\tleft: calc(var(--sash-size) * -1);\r\n}\r\n.monaco-sash.horizontal > .orthogonal-drag-handle.end {\r\n\ttop: calc(var(--sash-size) * -0.5);\r\n\tright: calc(var(--sash-size) * -1);\r\n}\r\n\r\n.monaco-sash:before {\r\n\tcontent: '';\r\n\tpointer-events: none;\r\n\tposition: absolute;\r\n\twidth: 100%;\r\n\theight: 100%;\r\n\ttransition: background-color 0.1s ease-out;\r\n\tbackground: transparent;\r\n}\r\n\r\n.monaco-sash.vertical:before {\r\n\twidth: var(--sash-hover-size);\r\n\tleft: calc(50% - (var(--sash-hover-size) / 2));\r\n}\r\n\r\n.monaco-sash.horizontal:before {\r\n\theight: var(--sash-hover-size);\r\n\ttop: calc(50% - (var(--sash-hover-size) / 2));\r\n}\r\n\r\n/** Debug **/\r\n\r\n.monaco-sash.debug {\r\n\tbackground: cyan;\r\n}\r\n\r\n.monaco-sash.debug.disabled {\r\n\tbackground: rgba(0, 255, 255, 0.2);\r\n}\r\n\r\n.monaco-sash.debug:not(.disabled) > .orthogonal-drag-handle {\r\n\tbackground: red;\r\n}\r\n","",{version:3,sources:["webpack://./node_modules/monaco-editor/esm/vs/base/browser/ui/sash/sash.css"],names:[],mappings:"AAAA;;;+FAG+F;;AAE/F;CACC,gBAAgB;AACjB;;AAEA;CACC,kBAAkB;CAClB,WAAW;CACX,kBAAkB;AACnB;;AAEA;CACC,oBAAoB;AACrB;;AAEA;CACC,kBAAkB;AACnB;;AAEA;CACC,gBAAgB;AACjB;;AAEA;CACC,gBAAgB;AACjB;;AAEA;CACC,kBAAkB;AACnB;;AAEA;CACC,gBAAgB;AACjB;;AAEA;CACC,gBAAgB;AACjB;;AAEA;CACC,0BAA0B;CAC1B,+BAA+B;AAChC;;AAEA;CACC,iBAAiB;CACjB,MAAM;CACN,uBAAuB;CACvB,YAAY;AACb;;AAEA;CACC,iBAAiB;CACjB,OAAO;CACP,WAAW;CACX,wBAAwB;AACzB;;AAEA;CACC,YAAY;CACZ,kCAAkC;CAClC,iCAAiC;CACjC,YAAY;CACZ,cAAc;CACd,kBAAkB;CAClB,kBAAkB;AACnB;;AAEA;;;;CAIC,mBAAmB;AACpB;;AAEA;;;;CAIC,mBAAmB;AACpB;;AAEA;CACC,mCAAmC;CACnC,gCAAgC;AACjC;AACA;CACC,mCAAmC;CACnC,mCAAmC;AACpC;AACA;CACC,kCAAkC;CAClC,iCAAiC;AAClC;AACA;CACC,kCAAkC;CAClC,kCAAkC;AACnC;;AAEA;CACC,WAAW;CACX,oBAAoB;CACpB,kBAAkB;CAClB,WAAW;CACX,YAAY;CACZ,0CAA0C;CAC1C,uBAAuB;AACxB;;AAEA;CACC,6BAA6B;CAC7B,8CAA8C;AAC/C;;AAEA;CACC,8BAA8B;CAC9B,6CAA6C;AAC9C;;AAEA,YAAY;;AAEZ;CACC,gBAAgB;AACjB;;AAEA;CACC,kCAAkC;AACnC;;AAEA;CACC,eAAe;AAChB",sourcesContent:["/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n:root {\r\n\t--sash-size: 4px;\r\n}\r\n\r\n.monaco-sash {\r\n\tposition: absolute;\r\n\tz-index: 35;\r\n\ttouch-action: none;\r\n}\r\n\r\n.monaco-sash.disabled {\r\n\tpointer-events: none;\r\n}\r\n\r\n.monaco-sash.mac.vertical {\r\n\tcursor: col-resize;\r\n}\r\n\r\n.monaco-sash.vertical.minimum {\r\n\tcursor: e-resize;\r\n}\r\n\r\n.monaco-sash.vertical.maximum {\r\n\tcursor: w-resize;\r\n}\r\n\r\n.monaco-sash.mac.horizontal {\r\n\tcursor: row-resize;\r\n}\r\n\r\n.monaco-sash.horizontal.minimum {\r\n\tcursor: s-resize;\r\n}\r\n\r\n.monaco-sash.horizontal.maximum {\r\n\tcursor: n-resize;\r\n}\r\n\r\n.monaco-sash.disabled {\r\n\tcursor: default !important;\r\n\tpointer-events: none !important;\r\n}\r\n\r\n.monaco-sash.vertical {\r\n\tcursor: ew-resize;\r\n\ttop: 0;\r\n\twidth: var(--sash-size);\r\n\theight: 100%;\r\n}\r\n\r\n.monaco-sash.horizontal {\r\n\tcursor: ns-resize;\r\n\tleft: 0;\r\n\twidth: 100%;\r\n\theight: var(--sash-size);\r\n}\r\n\r\n.monaco-sash:not(.disabled) > .orthogonal-drag-handle {\r\n\tcontent: \" \";\r\n\theight: calc(var(--sash-size) * 2);\r\n\twidth: calc(var(--sash-size) * 2);\r\n\tz-index: 100;\r\n\tdisplay: block;\r\n\tcursor: all-scroll;\r\n\tposition: absolute;\r\n}\r\n\r\n.monaco-sash.horizontal.orthogonal-edge-north:not(.disabled)\r\n\t> .orthogonal-drag-handle.start,\r\n.monaco-sash.horizontal.orthogonal-edge-south:not(.disabled)\r\n\t> .orthogonal-drag-handle.end {\r\n\tcursor: nwse-resize;\r\n}\r\n\r\n.monaco-sash.horizontal.orthogonal-edge-north:not(.disabled)\r\n\t> .orthogonal-drag-handle.end,\r\n.monaco-sash.horizontal.orthogonal-edge-south:not(.disabled)\r\n\t> .orthogonal-drag-handle.start {\r\n\tcursor: nesw-resize;\r\n}\r\n\r\n.monaco-sash.vertical > .orthogonal-drag-handle.start {\r\n\tleft: calc(var(--sash-size) * -0.5);\r\n\ttop: calc(var(--sash-size) * -1);\r\n}\r\n.monaco-sash.vertical > .orthogonal-drag-handle.end {\r\n\tleft: calc(var(--sash-size) * -0.5);\r\n\tbottom: calc(var(--sash-size) * -1);\r\n}\r\n.monaco-sash.horizontal > .orthogonal-drag-handle.start {\r\n\ttop: calc(var(--sash-size) * -0.5);\r\n\tleft: calc(var(--sash-size) * -1);\r\n}\r\n.monaco-sash.horizontal > .orthogonal-drag-handle.end {\r\n\ttop: calc(var(--sash-size) * -0.5);\r\n\tright: calc(var(--sash-size) * -1);\r\n}\r\n\r\n.monaco-sash:before {\r\n\tcontent: '';\r\n\tpointer-events: none;\r\n\tposition: absolute;\r\n\twidth: 100%;\r\n\theight: 100%;\r\n\ttransition: background-color 0.1s ease-out;\r\n\tbackground: transparent;\r\n}\r\n\r\n.monaco-sash.vertical:before {\r\n\twidth: var(--sash-hover-size);\r\n\tleft: calc(50% - (var(--sash-hover-size) / 2));\r\n}\r\n\r\n.monaco-sash.horizontal:before {\r\n\theight: var(--sash-hover-size);\r\n\ttop: calc(50% - (var(--sash-hover-size) / 2));\r\n}\r\n\r\n/** Debug **/\r\n\r\n.monaco-sash.debug {\r\n\tbackground: cyan;\r\n}\r\n\r\n.monaco-sash.debug.disabled {\r\n\tbackground: rgba(0, 255, 255, 0.2);\r\n}\r\n\r\n.monaco-sash.debug:not(.disabled) > .orthogonal-drag-handle {\r\n\tbackground: red;\r\n}\r\n"],sourceRoot:""}]);const a=s},7198:(e,t,n)=>{"use strict";n.d(t,{Z:()=>a});var i=n(7537),o=n.n(i),r=n(3645),s=n.n(r)()(o());s.push([e.id,"/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n/* Arrows */\r\n.monaco-scrollable-element > .scrollbar > .scra {\r\n\tcursor: pointer;\r\n\tfont-size: 11px !important;\r\n}\r\n\r\n.monaco-scrollable-element > .visible {\r\n\topacity: 1;\r\n\r\n\t/* Background rule added for IE9 - to allow clicks on dom node */\r\n\tbackground:rgba(0,0,0,0);\r\n\r\n\ttransition: opacity 100ms linear;\r\n}\r\n.monaco-scrollable-element > .invisible {\r\n\topacity: 0;\r\n\tpointer-events: none;\r\n}\r\n.monaco-scrollable-element > .invisible.fade {\r\n\ttransition: opacity 800ms linear;\r\n}\r\n\r\n/* Scrollable Content Inset Shadow */\r\n.monaco-scrollable-element > .shadow {\r\n\tposition: absolute;\r\n\tdisplay: none;\r\n}\r\n.monaco-scrollable-element > .shadow.top {\r\n\tdisplay: block;\r\n\ttop: 0;\r\n\tleft: 3px;\r\n\theight: 3px;\r\n\twidth: 100%;\r\n\tbox-shadow: #DDD 0 6px 6px -6px inset;\r\n}\r\n.monaco-scrollable-element > .shadow.left {\r\n\tdisplay: block;\r\n\ttop: 3px;\r\n\tleft: 0;\r\n\theight: 100%;\r\n\twidth: 3px;\r\n\tbox-shadow: #DDD 6px 0 6px -6px inset;\r\n}\r\n.monaco-scrollable-element > .shadow.top-left-corner {\r\n\tdisplay: block;\r\n\ttop: 0;\r\n\tleft: 0;\r\n\theight: 3px;\r\n\twidth: 3px;\r\n}\r\n.monaco-scrollable-element > .shadow.top.left {\r\n\tbox-shadow: #DDD 6px 6px 6px -6px inset;\r\n}\r\n\r\n/* ---------- Default Style ---------- */\r\n\r\n.vs .monaco-scrollable-element > .scrollbar > .slider {\r\n\tbackground: rgba(100, 100, 100, .4);\r\n}\r\n.vs-dark .monaco-scrollable-element > .scrollbar > .slider {\r\n\tbackground: rgba(121, 121, 121, .4);\r\n}\r\n.hc-black .monaco-scrollable-element > .scrollbar > .slider {\r\n\tbackground: rgba(111, 195, 223, .6);\r\n}\r\n\r\n.monaco-scrollable-element > .scrollbar > .slider:hover {\r\n\tbackground: rgba(100, 100, 100, .7);\r\n}\r\n.hc-black .monaco-scrollable-element > .scrollbar > .slider:hover {\r\n\tbackground: rgba(111, 195, 223, .8);\r\n}\r\n\r\n.monaco-scrollable-element > .scrollbar > .slider.active {\r\n\tbackground: rgba(0, 0, 0, .6);\r\n}\r\n.vs-dark .monaco-scrollable-element > .scrollbar > .slider.active {\r\n\tbackground: rgba(191, 191, 191, .4);\r\n}\r\n.hc-black .monaco-scrollable-element > .scrollbar > .slider.active {\r\n\tbackground: rgba(111, 195, 223, 1);\r\n}\r\n\r\n.vs-dark .monaco-scrollable-element .shadow.top {\r\n\tbox-shadow: none;\r\n}\r\n\r\n.vs-dark .monaco-scrollable-element .shadow.left {\r\n\tbox-shadow: #000 6px 0 6px -6px inset;\r\n}\r\n\r\n.vs-dark .monaco-scrollable-element .shadow.top.left {\r\n\tbox-shadow: #000 6px 6px 6px -6px inset;\r\n}\r\n\r\n.hc-black .monaco-scrollable-element .shadow.top {\r\n\tbox-shadow: none;\r\n}\r\n\r\n.hc-black .monaco-scrollable-element .shadow.left {\r\n\tbox-shadow: none;\r\n}\r\n\r\n.hc-black .monaco-scrollable-element .shadow.top.left {\r\n\tbox-shadow: none;\r\n}\r\n","",{version:3,sources:["webpack://./node_modules/monaco-editor/esm/vs/base/browser/ui/scrollbar/media/scrollbars.css"],names:[],mappings:"AAAA;;;+FAG+F;;AAE/F,WAAW;AACX;CACC,eAAe;CACf,0BAA0B;AAC3B;;AAEA;CACC,UAAU;;CAEV,gEAAgE;CAChE,wBAAwB;;CAExB,gCAAgC;AACjC;AACA;CACC,UAAU;CACV,oBAAoB;AACrB;AACA;CACC,gCAAgC;AACjC;;AAEA,oCAAoC;AACpC;CACC,kBAAkB;CAClB,aAAa;AACd;AACA;CACC,cAAc;CACd,MAAM;CACN,SAAS;CACT,WAAW;CACX,WAAW;CACX,qCAAqC;AACtC;AACA;CACC,cAAc;CACd,QAAQ;CACR,OAAO;CACP,YAAY;CACZ,UAAU;CACV,qCAAqC;AACtC;AACA;CACC,cAAc;CACd,MAAM;CACN,OAAO;CACP,WAAW;CACX,UAAU;AACX;AACA;CACC,uCAAuC;AACxC;;AAEA,wCAAwC;;AAExC;CACC,mCAAmC;AACpC;AACA;CACC,mCAAmC;AACpC;AACA;CACC,mCAAmC;AACpC;;AAEA;CACC,mCAAmC;AACpC;AACA;CACC,mCAAmC;AACpC;;AAEA;CACC,6BAA6B;AAC9B;AACA;CACC,mCAAmC;AACpC;AACA;CACC,kCAAkC;AACnC;;AAEA;CACC,gBAAgB;AACjB;;AAEA;CACC,qCAAqC;AACtC;;AAEA;CACC,uCAAuC;AACxC;;AAEA;CACC,gBAAgB;AACjB;;AAEA;CACC,gBAAgB;AACjB;;AAEA;CACC,gBAAgB;AACjB",sourcesContent:["/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n/* Arrows */\r\n.monaco-scrollable-element > .scrollbar > .scra {\r\n\tcursor: pointer;\r\n\tfont-size: 11px !important;\r\n}\r\n\r\n.monaco-scrollable-element > .visible {\r\n\topacity: 1;\r\n\r\n\t/* Background rule added for IE9 - to allow clicks on dom node */\r\n\tbackground:rgba(0,0,0,0);\r\n\r\n\ttransition: opacity 100ms linear;\r\n}\r\n.monaco-scrollable-element > .invisible {\r\n\topacity: 0;\r\n\tpointer-events: none;\r\n}\r\n.monaco-scrollable-element > .invisible.fade {\r\n\ttransition: opacity 800ms linear;\r\n}\r\n\r\n/* Scrollable Content Inset Shadow */\r\n.monaco-scrollable-element > .shadow {\r\n\tposition: absolute;\r\n\tdisplay: none;\r\n}\r\n.monaco-scrollable-element > .shadow.top {\r\n\tdisplay: block;\r\n\ttop: 0;\r\n\tleft: 3px;\r\n\theight: 3px;\r\n\twidth: 100%;\r\n\tbox-shadow: #DDD 0 6px 6px -6px inset;\r\n}\r\n.monaco-scrollable-element > .shadow.left {\r\n\tdisplay: block;\r\n\ttop: 3px;\r\n\tleft: 0;\r\n\theight: 100%;\r\n\twidth: 3px;\r\n\tbox-shadow: #DDD 6px 0 6px -6px inset;\r\n}\r\n.monaco-scrollable-element > .shadow.top-left-corner {\r\n\tdisplay: block;\r\n\ttop: 0;\r\n\tleft: 0;\r\n\theight: 3px;\r\n\twidth: 3px;\r\n}\r\n.monaco-scrollable-element > .shadow.top.left {\r\n\tbox-shadow: #DDD 6px 6px 6px -6px inset;\r\n}\r\n\r\n/* ---------- Default Style ---------- */\r\n\r\n.vs .monaco-scrollable-element > .scrollbar > .slider {\r\n\tbackground: rgba(100, 100, 100, .4);\r\n}\r\n.vs-dark .monaco-scrollable-element > .scrollbar > .slider {\r\n\tbackground: rgba(121, 121, 121, .4);\r\n}\r\n.hc-black .monaco-scrollable-element > .scrollbar > .slider {\r\n\tbackground: rgba(111, 195, 223, .6);\r\n}\r\n\r\n.monaco-scrollable-element > .scrollbar > .slider:hover {\r\n\tbackground: rgba(100, 100, 100, .7);\r\n}\r\n.hc-black .monaco-scrollable-element > .scrollbar > .slider:hover {\r\n\tbackground: rgba(111, 195, 223, .8);\r\n}\r\n\r\n.monaco-scrollable-element > .scrollbar > .slider.active {\r\n\tbackground: rgba(0, 0, 0, .6);\r\n}\r\n.vs-dark .monaco-scrollable-element > .scrollbar > .slider.active {\r\n\tbackground: rgba(191, 191, 191, .4);\r\n}\r\n.hc-black .monaco-scrollable-element > .scrollbar > .slider.active {\r\n\tbackground: rgba(111, 195, 223, 1);\r\n}\r\n\r\n.vs-dark .monaco-scrollable-element .shadow.top {\r\n\tbox-shadow: none;\r\n}\r\n\r\n.vs-dark .monaco-scrollable-element .shadow.left {\r\n\tbox-shadow: #000 6px 0 6px -6px inset;\r\n}\r\n\r\n.vs-dark .monaco-scrollable-element .shadow.top.left {\r\n\tbox-shadow: #000 6px 6px 6px -6px inset;\r\n}\r\n\r\n.hc-black .monaco-scrollable-element .shadow.top {\r\n\tbox-shadow: none;\r\n}\r\n\r\n.hc-black .monaco-scrollable-element .shadow.left {\r\n\tbox-shadow: none;\r\n}\r\n\r\n.hc-black .monaco-scrollable-element .shadow.top.left {\r\n\tbox-shadow: none;\r\n}\r\n"],sourceRoot:""}]);const a=s},2470:(e,t,n)=>{"use strict";n.d(t,{Z:()=>a});var i=n(7537),o=n.n(i),r=n(3645),s=n.n(r)()(o());s.push([e.id,"/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n.monaco-split-view2 {\r\n\tposition: relative;\r\n\twidth: 100%;\r\n\theight: 100%;\r\n}\r\n\r\n.monaco-split-view2 > .sash-container {\r\n\tposition: absolute;\r\n\twidth: 100%;\r\n\theight: 100%;\r\n\tpointer-events: none;\r\n}\r\n\r\n.monaco-split-view2 > .sash-container > .monaco-sash {\r\n\tpointer-events: initial;\r\n}\r\n\r\n.monaco-split-view2 > .monaco-scrollable-element {\r\n\twidth: 100%;\r\n\theight: 100%;\r\n}\r\n\r\n.monaco-split-view2 > .monaco-scrollable-element > .split-view-container {\r\n\twidth: 100%;\r\n\theight: 100%;\r\n\twhite-space: nowrap;\r\n\tposition: relative;\r\n}\r\n\r\n.monaco-split-view2 > .monaco-scrollable-element > .split-view-container > .split-view-view {\r\n\twhite-space: initial;\r\n\tposition: absolute;\r\n}\r\n\r\n.monaco-split-view2 > .monaco-scrollable-element > .split-view-container > .split-view-view:not(.visible) {\r\n\tdisplay: none;\r\n}\r\n\r\n.monaco-split-view2.vertical > .monaco-scrollable-element > .split-view-container > .split-view-view {\r\n\twidth: 100%;\r\n}\r\n\r\n.monaco-split-view2.horizontal > .monaco-scrollable-element > .split-view-container > .split-view-view {\r\n\theight: 100%;\r\n}\r\n\r\n.monaco-split-view2.separator-border > .monaco-scrollable-element > .split-view-container > .split-view-view:not(:first-child)::before {\r\n\tcontent: ' ';\r\n\tposition: absolute;\r\n\ttop: 0;\r\n\tleft: 0;\r\n\tz-index: 5;\r\n\tpointer-events: none;\r\n\tbackground-color: var(--separator-border);\r\n}\r\n\r\n.monaco-split-view2.separator-border.horizontal > .monaco-scrollable-element > .split-view-container > .split-view-view:not(:first-child)::before {\r\n\theight: 100%;\r\n\twidth: 1px;\r\n}\r\n\r\n.monaco-split-view2.separator-border.vertical > .monaco-scrollable-element > .split-view-container > .split-view-view:not(:first-child)::before {\r\n\theight: 1px;\r\n\twidth: 100%;\r\n}\r\n","",{version:3,sources:["webpack://./node_modules/monaco-editor/esm/vs/base/browser/ui/splitview/splitview.css"],names:[],mappings:"AAAA;;;+FAG+F;;AAE/F;CACC,kBAAkB;CAClB,WAAW;CACX,YAAY;AACb;;AAEA;CACC,kBAAkB;CAClB,WAAW;CACX,YAAY;CACZ,oBAAoB;AACrB;;AAEA;CACC,uBAAuB;AACxB;;AAEA;CACC,WAAW;CACX,YAAY;AACb;;AAEA;CACC,WAAW;CACX,YAAY;CACZ,mBAAmB;CACnB,kBAAkB;AACnB;;AAEA;CACC,oBAAoB;CACpB,kBAAkB;AACnB;;AAEA;CACC,aAAa;AACd;;AAEA;CACC,WAAW;AACZ;;AAEA;CACC,YAAY;AACb;;AAEA;CACC,YAAY;CACZ,kBAAkB;CAClB,MAAM;CACN,OAAO;CACP,UAAU;CACV,oBAAoB;CACpB,yCAAyC;AAC1C;;AAEA;CACC,YAAY;CACZ,UAAU;AACX;;AAEA;CACC,WAAW;CACX,WAAW;AACZ",sourcesContent:["/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n.monaco-split-view2 {\r\n\tposition: relative;\r\n\twidth: 100%;\r\n\theight: 100%;\r\n}\r\n\r\n.monaco-split-view2 > .sash-container {\r\n\tposition: absolute;\r\n\twidth: 100%;\r\n\theight: 100%;\r\n\tpointer-events: none;\r\n}\r\n\r\n.monaco-split-view2 > .sash-container > .monaco-sash {\r\n\tpointer-events: initial;\r\n}\r\n\r\n.monaco-split-view2 > .monaco-scrollable-element {\r\n\twidth: 100%;\r\n\theight: 100%;\r\n}\r\n\r\n.monaco-split-view2 > .monaco-scrollable-element > .split-view-container {\r\n\twidth: 100%;\r\n\theight: 100%;\r\n\twhite-space: nowrap;\r\n\tposition: relative;\r\n}\r\n\r\n.monaco-split-view2 > .monaco-scrollable-element > .split-view-container > .split-view-view {\r\n\twhite-space: initial;\r\n\tposition: absolute;\r\n}\r\n\r\n.monaco-split-view2 > .monaco-scrollable-element > .split-view-container > .split-view-view:not(.visible) {\r\n\tdisplay: none;\r\n}\r\n\r\n.monaco-split-view2.vertical > .monaco-scrollable-element > .split-view-container > .split-view-view {\r\n\twidth: 100%;\r\n}\r\n\r\n.monaco-split-view2.horizontal > .monaco-scrollable-element > .split-view-container > .split-view-view {\r\n\theight: 100%;\r\n}\r\n\r\n.monaco-split-view2.separator-border > .monaco-scrollable-element > .split-view-container > .split-view-view:not(:first-child)::before {\r\n\tcontent: ' ';\r\n\tposition: absolute;\r\n\ttop: 0;\r\n\tleft: 0;\r\n\tz-index: 5;\r\n\tpointer-events: none;\r\n\tbackground-color: var(--separator-border);\r\n}\r\n\r\n.monaco-split-view2.separator-border.horizontal > .monaco-scrollable-element > .split-view-container > .split-view-view:not(:first-child)::before {\r\n\theight: 100%;\r\n\twidth: 1px;\r\n}\r\n\r\n.monaco-split-view2.separator-border.vertical > .monaco-scrollable-element > .split-view-container > .split-view-view:not(:first-child)::before {\r\n\theight: 1px;\r\n\twidth: 100%;\r\n}\r\n"],sourceRoot:""}]);const a=s},1728:(e,t,n)=>{"use strict";n.d(t,{Z:()=>a});var i=n(7537),o=n.n(i),r=n(3645),s=n.n(r)()(o());s.push([e.id,'/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n.monaco-table {\r\n\tdisplay: flex;\r\n\tflex-direction: column;\r\n\tposition: relative;\r\n\theight: 100%;\r\n\twidth: 100%;\r\n\twhite-space: nowrap;\r\n}\r\n\r\n.monaco-table > .monaco-split-view2 {\r\n\tborder-bottom: 1px solid transparent;\r\n}\r\n\r\n.monaco-table > .monaco-list {\r\n\tflex: 1;\r\n}\r\n\r\n.monaco-table-tr {\r\n\tdisplay: flex;\r\n\theight: 100%;\r\n}\r\n\r\n.monaco-table-th {\r\n\twidth: 100%;\r\n\theight: 100%;\r\n\tfont-weight: bold;\r\n\toverflow: hidden;\r\n\ttext-overflow: ellipsis;\r\n}\r\n\r\n.monaco-table-th,\r\n.monaco-table-td {\r\n\tbox-sizing: border-box;\r\n\tflex-shrink: 0;\r\n\toverflow: hidden;\r\n\twhite-space: nowrap;\r\n\ttext-overflow: ellipsis;\r\n}\r\n\r\n.monaco-table > .monaco-split-view2 .monaco-sash.vertical::before {\r\n\tcontent: "";\r\n\tposition: absolute;\r\n\tleft: calc(var(--sash-size) / 2);\r\n\twidth: 0;\r\n\tborder-left: 1px solid transparent;\r\n}\r\n\r\n.monaco-table > .monaco-split-view2,\r\n.monaco-table > .monaco-split-view2 .monaco-sash.vertical::before {\r\n\ttransition: border-color 0.2s ease-out;\r\n}\r\n/*\r\n.monaco-table:hover > .monaco-split-view2,\r\n.monaco-table:hover > .monaco-split-view2 .monaco-sash.vertical::before {\r\n\tborder-color: rgba(204, 204, 204, 0.2);\r\n} */\r\n',"",{version:3,sources:["webpack://./node_modules/monaco-editor/esm/vs/base/browser/ui/table/table.css"],names:[],mappings:"AAAA;;;+FAG+F;;AAE/F;CACC,aAAa;CACb,sBAAsB;CACtB,kBAAkB;CAClB,YAAY;CACZ,WAAW;CACX,mBAAmB;AACpB;;AAEA;CACC,oCAAoC;AACrC;;AAEA;CACC,OAAO;AACR;;AAEA;CACC,aAAa;CACb,YAAY;AACb;;AAEA;CACC,WAAW;CACX,YAAY;CACZ,iBAAiB;CACjB,gBAAgB;CAChB,uBAAuB;AACxB;;AAEA;;CAEC,sBAAsB;CACtB,cAAc;CACd,gBAAgB;CAChB,mBAAmB;CACnB,uBAAuB;AACxB;;AAEA;CACC,WAAW;CACX,kBAAkB;CAClB,gCAAgC;CAChC,QAAQ;CACR,kCAAkC;AACnC;;AAEA;;CAEC,sCAAsC;AACvC;AACA;;;;GAIG",sourcesContent:['/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n.monaco-table {\r\n\tdisplay: flex;\r\n\tflex-direction: column;\r\n\tposition: relative;\r\n\theight: 100%;\r\n\twidth: 100%;\r\n\twhite-space: nowrap;\r\n}\r\n\r\n.monaco-table > .monaco-split-view2 {\r\n\tborder-bottom: 1px solid transparent;\r\n}\r\n\r\n.monaco-table > .monaco-list {\r\n\tflex: 1;\r\n}\r\n\r\n.monaco-table-tr {\r\n\tdisplay: flex;\r\n\theight: 100%;\r\n}\r\n\r\n.monaco-table-th {\r\n\twidth: 100%;\r\n\theight: 100%;\r\n\tfont-weight: bold;\r\n\toverflow: hidden;\r\n\ttext-overflow: ellipsis;\r\n}\r\n\r\n.monaco-table-th,\r\n.monaco-table-td {\r\n\tbox-sizing: border-box;\r\n\tflex-shrink: 0;\r\n\toverflow: hidden;\r\n\twhite-space: nowrap;\r\n\ttext-overflow: ellipsis;\r\n}\r\n\r\n.monaco-table > .monaco-split-view2 .monaco-sash.vertical::before {\r\n\tcontent: "";\r\n\tposition: absolute;\r\n\tleft: calc(var(--sash-size) / 2);\r\n\twidth: 0;\r\n\tborder-left: 1px solid transparent;\r\n}\r\n\r\n.monaco-table > .monaco-split-view2,\r\n.monaco-table > .monaco-split-view2 .monaco-sash.vertical::before {\r\n\ttransition: border-color 0.2s ease-out;\r\n}\r\n/*\r\n.monaco-table:hover > .monaco-split-view2,\r\n.monaco-table:hover > .monaco-split-view2 .monaco-sash.vertical::before {\r\n\tborder-color: rgba(204, 204, 204, 0.2);\r\n} */\r\n'],sourceRoot:""}]);const a=s},1766:(e,t,n)=>{"use strict";n.d(t,{Z:()=>a});var i=n(7537),o=n.n(i),r=n(3645),s=n.n(r)()(o());s.push([e.id,"/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n.monaco-tl-row {\r\n\tdisplay: flex;\r\n\theight: 100%;\r\n\talign-items: center;\r\n\tposition: relative;\r\n}\r\n\r\n.monaco-tl-indent {\r\n\theight: 100%;\r\n\tposition: absolute;\r\n\ttop: 0;\r\n\tleft: 16px;\r\n\tpointer-events: none;\r\n}\r\n\r\n.hide-arrows .monaco-tl-indent {\r\n\tleft: 12px;\r\n}\r\n\r\n.monaco-tl-indent > .indent-guide {\r\n\tdisplay: inline-block;\r\n\tbox-sizing: border-box;\r\n\theight: 100%;\r\n\tborder-left: 1px solid transparent;\r\n}\r\n\r\n.monaco-tl-indent > .indent-guide {\r\n\ttransition: border-color 0.1s linear;\r\n}\r\n\r\n.monaco-tl-twistie,\r\n.monaco-tl-contents {\r\n\theight: 100%;\r\n}\r\n\r\n.monaco-tl-twistie {\r\n\tfont-size: 10px;\r\n\ttext-align: right;\r\n\tpadding-right: 6px;\r\n\tflex-shrink: 0;\r\n\twidth: 16px;\r\n\tdisplay: flex !important;\r\n\talign-items: center;\r\n\tjustify-content: center;\r\n\ttransform: translateX(3px);\r\n}\r\n\r\n.monaco-tl-contents {\r\n\tflex: 1;\r\n\toverflow: hidden;\r\n}\r\n\r\n.monaco-tl-twistie::before {\r\n\tborder-radius: 20px;\r\n}\r\n\r\n.monaco-tl-twistie.collapsed::before {\r\n\ttransform: rotate(-90deg);\r\n}\r\n\r\n.monaco-tl-twistie.codicon-tree-item-loading::before {\r\n\t/* Use steps to throttle FPS to reduce CPU usage */\r\n\tanimation: codicon-spin 1.25s steps(30) infinite;\r\n}\r\n","",{version:3,sources:["webpack://./node_modules/monaco-editor/esm/vs/base/browser/ui/tree/media/tree.css"],names:[],mappings:"AAAA;;;+FAG+F;;AAE/F;CACC,aAAa;CACb,YAAY;CACZ,mBAAmB;CACnB,kBAAkB;AACnB;;AAEA;CACC,YAAY;CACZ,kBAAkB;CAClB,MAAM;CACN,UAAU;CACV,oBAAoB;AACrB;;AAEA;CACC,UAAU;AACX;;AAEA;CACC,qBAAqB;CACrB,sBAAsB;CACtB,YAAY;CACZ,kCAAkC;AACnC;;AAEA;CACC,oCAAoC;AACrC;;AAEA;;CAEC,YAAY;AACb;;AAEA;CACC,eAAe;CACf,iBAAiB;CACjB,kBAAkB;CAClB,cAAc;CACd,WAAW;CACX,wBAAwB;CACxB,mBAAmB;CACnB,uBAAuB;CACvB,0BAA0B;AAC3B;;AAEA;CACC,OAAO;CACP,gBAAgB;AACjB;;AAEA;CACC,mBAAmB;AACpB;;AAEA;CACC,yBAAyB;AAC1B;;AAEA;CACC,kDAAkD;CAClD,gDAAgD;AACjD",sourcesContent:["/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n.monaco-tl-row {\r\n\tdisplay: flex;\r\n\theight: 100%;\r\n\talign-items: center;\r\n\tposition: relative;\r\n}\r\n\r\n.monaco-tl-indent {\r\n\theight: 100%;\r\n\tposition: absolute;\r\n\ttop: 0;\r\n\tleft: 16px;\r\n\tpointer-events: none;\r\n}\r\n\r\n.hide-arrows .monaco-tl-indent {\r\n\tleft: 12px;\r\n}\r\n\r\n.monaco-tl-indent > .indent-guide {\r\n\tdisplay: inline-block;\r\n\tbox-sizing: border-box;\r\n\theight: 100%;\r\n\tborder-left: 1px solid transparent;\r\n}\r\n\r\n.monaco-tl-indent > .indent-guide {\r\n\ttransition: border-color 0.1s linear;\r\n}\r\n\r\n.monaco-tl-twistie,\r\n.monaco-tl-contents {\r\n\theight: 100%;\r\n}\r\n\r\n.monaco-tl-twistie {\r\n\tfont-size: 10px;\r\n\ttext-align: right;\r\n\tpadding-right: 6px;\r\n\tflex-shrink: 0;\r\n\twidth: 16px;\r\n\tdisplay: flex !important;\r\n\talign-items: center;\r\n\tjustify-content: center;\r\n\ttransform: translateX(3px);\r\n}\r\n\r\n.monaco-tl-contents {\r\n\tflex: 1;\r\n\toverflow: hidden;\r\n}\r\n\r\n.monaco-tl-twistie::before {\r\n\tborder-radius: 20px;\r\n}\r\n\r\n.monaco-tl-twistie.collapsed::before {\r\n\ttransform: rotate(-90deg);\r\n}\r\n\r\n.monaco-tl-twistie.codicon-tree-item-loading::before {\r\n\t/* Use steps to throttle FPS to reduce CPU usage */\r\n\tanimation: codicon-spin 1.25s steps(30) infinite;\r\n}\r\n"],sourceRoot:""}]);const a=s},3257:(e,t,n)=>{"use strict";n.d(t,{Z:()=>a});var i=n(7537),o=n.n(i),r=n(3645),s=n.n(r)()(o());s.push([e.id,"/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n.quick-input-widget {\r\n\tposition: absolute;\r\n\twidth: 600px;\r\n\tz-index: 2000;\r\n\tpadding: 0 1px 6px 1px;\r\n\tleft: 50%;\r\n\tmargin-left: -300px;\r\n}\r\n\r\n.quick-input-titlebar {\r\n\tdisplay: flex;\r\n\talign-items: center;\r\n}\r\n\r\n.quick-input-left-action-bar {\r\n\tdisplay: flex;\r\n\tmargin-left: 4px;\r\n\tflex: 1;\r\n}\r\n\r\n.quick-input-title {\r\n\tpadding: 3px 0px;\r\n\ttext-align: center;\r\n}\r\n\r\n.quick-input-right-action-bar {\r\n\tdisplay: flex;\r\n\tmargin-right: 4px;\r\n\tflex: 1;\r\n}\r\n\r\n.quick-input-right-action-bar > .actions-container {\r\n\tjustify-content: flex-end;\r\n}\r\n\r\n.quick-input-titlebar .monaco-action-bar .action-label.codicon {\r\n\tbackground-position: center;\r\n\tbackground-repeat: no-repeat;\r\n\tpadding: 2px;\r\n}\r\n\r\n.quick-input-description {\r\n\tmargin: 6px;\r\n}\r\n\r\n.quick-input-header .quick-input-description {\r\n\tmargin: 4px 2px;\r\n}\r\n\r\n.quick-input-header {\r\n\tdisplay: flex;\r\n\tpadding: 6px 6px 0px 6px;\r\n\tmargin-bottom: -2px;\r\n}\r\n\r\n.quick-input-widget.hidden-input .quick-input-header {\r\n\t/* reduce margins and paddings when input box hidden */\r\n\tpadding: 0;\r\n\tmargin-bottom: 0;\r\n}\r\n\r\n.quick-input-and-message {\r\n\tdisplay: flex;\r\n\tflex-direction: column;\r\n\tflex-grow: 1;\r\n\tposition: relative;\r\n}\r\n\r\n.quick-input-check-all {\r\n\talign-self: center;\r\n\tmargin: 0;\r\n}\r\n\r\n.quick-input-filter {\r\n\tflex-grow: 1;\r\n\tdisplay: flex;\r\n\tposition: relative;\r\n}\r\n\r\n.quick-input-box {\r\n\tflex-grow: 1;\r\n}\r\n\r\n.quick-input-widget.show-checkboxes .quick-input-box,\r\n.quick-input-widget.show-checkboxes .quick-input-message {\r\n\tmargin-left: 5px;\r\n}\r\n\r\n.quick-input-visible-count {\r\n\tposition: absolute;\r\n\tleft: -10000px;\r\n}\r\n\r\n.quick-input-count {\r\n\talign-self: center;\r\n\tposition: absolute;\r\n\tright: 4px;\r\n\tdisplay: flex;\r\n\talign-items: center;\r\n}\r\n\r\n.quick-input-count .monaco-count-badge {\r\n\tvertical-align: middle;\r\n\tpadding: 2px 4px;\r\n\tborder-radius: 2px;\r\n\tmin-height: auto;\r\n\tline-height: normal;\r\n}\r\n\r\n.quick-input-action {\r\n\tmargin-left: 6px;\r\n}\r\n\r\n.quick-input-action .monaco-text-button {\r\n\tfont-size: 11px;\r\n\tpadding: 0 6px;\r\n\tdisplay: flex;\r\n\theight: 27.5px;\r\n\talign-items: center;\r\n}\r\n\r\n.quick-input-message {\r\n\tmargin-top: -1px;\r\n\tpadding: 5px 5px 2px 5px;\r\n}\r\n\r\n.quick-input-message > .codicon {\r\n\tmargin: 0 0.2em;\r\n\tvertical-align: text-bottom;\r\n}\r\n\r\n.quick-input-progress.monaco-progress-container {\r\n\tposition: relative;\r\n}\r\n\r\n.quick-input-progress.monaco-progress-container,\r\n.quick-input-progress.monaco-progress-container .progress-bit {\r\n\theight: 2px;\r\n}\r\n\r\n.quick-input-list {\r\n\tline-height: 22px;\r\n\tmargin-top: 6px;\r\n}\r\n\r\n.quick-input-widget.hidden-input .quick-input-list {\r\n\tmargin-top: 0; /* reduce margins when input box hidden */\r\n}\r\n\r\n.quick-input-list .monaco-list {\r\n\toverflow: hidden;\r\n\tmax-height: calc(20 * 22px);\r\n}\r\n\r\n.quick-input-list .quick-input-list-entry {\r\n\tbox-sizing: border-box;\r\n\toverflow: hidden;\r\n\tdisplay: flex;\r\n\theight: 100%;\r\n\tpadding: 0 6px;\r\n}\r\n\r\n.quick-input-list .quick-input-list-entry.quick-input-list-separator-border {\r\n\tborder-top-width: 1px;\r\n\tborder-top-style: solid;\r\n}\r\n\r\n.quick-input-list .monaco-list-row[data-index=\"0\"] .quick-input-list-entry.quick-input-list-separator-border {\r\n\tborder-top-style: none;\r\n}\r\n\r\n.quick-input-list .quick-input-list-label {\r\n\toverflow: hidden;\r\n\tdisplay: flex;\r\n\theight: 100%;\r\n\tflex: 1;\r\n}\r\n\r\n.quick-input-list .quick-input-list-checkbox {\r\n\talign-self: center;\r\n\tmargin: 0;\r\n}\r\n\r\n.quick-input-list .quick-input-list-rows {\r\n\toverflow: hidden;\r\n\ttext-overflow: ellipsis;\r\n\tdisplay: flex;\r\n\tflex-direction: column;\r\n\theight: 100%;\r\n\tflex: 1;\r\n\tmargin-left: 5px;\r\n}\r\n\r\n.quick-input-widget.show-checkboxes .quick-input-list .quick-input-list-rows {\r\n\tmargin-left: 10px;\r\n}\r\n\r\n.quick-input-widget .quick-input-list .quick-input-list-checkbox {\r\n\tdisplay: none;\r\n}\r\n.quick-input-widget.show-checkboxes .quick-input-list .quick-input-list-checkbox {\r\n\tdisplay: inline;\r\n}\r\n\r\n.quick-input-list .quick-input-list-rows > .quick-input-list-row {\r\n\tdisplay: flex;\r\n\talign-items: center;\r\n}\r\n\r\n.quick-input-list .quick-input-list-rows > .quick-input-list-row .monaco-icon-label,\r\n.quick-input-list .quick-input-list-rows > .quick-input-list-row .monaco-icon-label .monaco-icon-label-container > .monaco-icon-name-container {\r\n\tflex: 1; /* make sure the icon label grows within the row */\r\n}\r\n\r\n.quick-input-list .quick-input-list-rows > .quick-input-list-row .codicon[class*='codicon-'] {\r\n\tvertical-align: text-bottom;\r\n}\r\n\r\n.quick-input-list .quick-input-list-rows .monaco-highlighted-label span {\r\n\topacity: 1;\r\n}\r\n\r\n.quick-input-list .quick-input-list-entry .quick-input-list-entry-keybinding {\r\n\tmargin-right: 8px; /* separate from the separator label or scrollbar if any */\r\n}\r\n\r\n.quick-input-list .quick-input-list-label-meta {\r\n\topacity: 0.7;\r\n\tline-height: normal;\r\n\ttext-overflow: ellipsis;\r\n\toverflow: hidden;\r\n}\r\n\r\n.quick-input-list .monaco-highlighted-label .highlight {\r\n\tfont-weight: bold;\r\n}\r\n\r\n.quick-input-list .quick-input-list-entry .quick-input-list-separator {\r\n\tmargin-right: 8px; /* separate from keybindings or actions */\r\n}\r\n\r\n.quick-input-list .quick-input-list-entry-action-bar {\r\n\tdisplay: flex;\r\n\tflex: 0;\r\n\toverflow: visible;\r\n}\r\n\r\n.quick-input-list .quick-input-list-entry-action-bar .action-label {\r\n\t/*\r\n\t * By default, actions in the quick input action bar are hidden\r\n\t * until hovered over them or selected.\r\n\t */\r\n\tdisplay: none;\r\n}\r\n\r\n.quick-input-list .quick-input-list-entry-action-bar .action-label.codicon {\r\n\tmargin-right: 4px;\r\n\tpadding: 0px 2px 2px 2px;\r\n}\r\n\r\n.quick-input-list .quick-input-list-entry-action-bar {\r\n\tmargin-top: 1px;\r\n}\r\n\r\n.quick-input-list .quick-input-list-entry-action-bar {\r\n\tmargin-right: 4px; /* separate from scrollbar */\r\n}\r\n\r\n.quick-input-list .quick-input-list-entry .quick-input-list-entry-action-bar .action-label.always-visible,\r\n.quick-input-list .quick-input-list-entry:hover .quick-input-list-entry-action-bar .action-label,\r\n.quick-input-list .monaco-list-row.focused .quick-input-list-entry-action-bar .action-label {\r\n\tdisplay: flex;\r\n}\r\n\r\n/* focused items in quick pick */\r\n.quick-input-list .monaco-list-row.focused .monaco-keybinding-key,\r\n.quick-input-list .monaco-list-row.focused .quick-input-list-entry .quick-input-list-separator {\r\n\tcolor: inherit\r\n}\r\n.quick-input-list .monaco-list-row.focused .monaco-keybinding-key {\r\n\tbackground: none;\r\n}\r\n","",{version:3,sources:["webpack://./node_modules/monaco-editor/esm/vs/base/parts/quickinput/browser/media/quickInput.css"],names:[],mappings:"AAAA;;;+FAG+F;;AAE/F;CACC,kBAAkB;CAClB,YAAY;CACZ,aAAa;CACb,sBAAsB;CACtB,SAAS;CACT,mBAAmB;AACpB;;AAEA;CACC,aAAa;CACb,mBAAmB;AACpB;;AAEA;CACC,aAAa;CACb,gBAAgB;CAChB,OAAO;AACR;;AAEA;CACC,gBAAgB;CAChB,kBAAkB;AACnB;;AAEA;CACC,a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BAAkB;CAClB,SAAS;AACV;;AAEA;CACC,gBAAgB;CAChB,uBAAuB;CACvB,aAAa;CACb,sBAAsB;CACtB,YAAY;CACZ,OAAO;CACP,gBAAgB;AACjB;;AAEA;CACC,iBAAiB;AAClB;;AAEA;CACC,aAAa;AACd;AACA;CACC,eAAe;AAChB;;AAEA;CACC,aAAa;CACb,mBAAmB;AACpB;;AAEA;;CAEC,OAAO,EAAE,kDAAkD;AAC5D;;AAEA;CACC,2BAA2B;AAC5B;;AAEA;CACC,UAAU;AACX;;AAEA;CACC,iBAAiB,EAAE,0DAA0D;AAC9E;;AAEA;CACC,YAAY;CACZ,mBAAmB;CACnB,uBAAuB;CACvB,gBAAgB;AACjB;;AAEA;CACC,iBAAiB;AAClB;;AAEA;CACC,iBAAiB,EAAE,yCAAyC;AAC7D;;AAEA;CACC,aAAa;CACb,OAAO;CACP,iBAAiB;AAClB;;AAEA;CACC;;;GAGE;CACF,aAAa;AACd;;AAEA;CACC,iBAAiB;CACjB,wBAAwB;AACzB;;AAEA;CACC,eAAe;AAChB;;AAEA;CACC,iBAAiB,EAAE,4BAA4B;AAChD;;AAEA;;;CAGC,aAAa;AACd;;AAEA,gCAAgC;AAChC;;CAEC;AACD;AACA;CACC,gBAAgB;AACjB",sourcesContent:["/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n.quick-input-widget {\r\n\tposition: absolute;\r\n\twidth: 600px;\r\n\tz-index: 2000;\r\n\tpadding: 0 1px 6px 1px;\r\n\tleft: 50%;\r\n\tmargin-left: -300px;\r\n}\r\n\r\n.quick-input-titlebar {\r\n\tdisplay: flex;\r\n\talign-items: center;\r\n}\r\n\r\n.quick-input-left-action-bar {\r\n\tdisplay: flex;\r\n\tmargin-left: 4px;\r\n\tflex: 1;\r\n}\r\n\r\n.quick-input-title {\r\n\tpadding: 3px 0px;\r\n\ttext-align: center;\r\n}\r\n\r\n.quick-input-right-action-bar {\r\n\tdisplay: flex;\r\n\tmargin-right: 4px;\r\n\tflex: 1;\r\n}\r\n\r\n.quick-input-right-action-bar > .actions-container {\r\n\tjustify-content: flex-end;\r\n}\r\n\r\n.quick-input-titlebar .monaco-action-bar .action-label.codicon {\r\n\tbackground-position: center;\r\n\tbackground-repeat: no-repeat;\r\n\tpadding: 2px;\r\n}\r\n\r\n.quick-input-description {\r\n\tmargin: 6px;\r\n}\r\n\r\n.quick-input-header .quick-input-description {\r\n\tmargin: 4px 2px;\r\n}\r\n\r\n.quick-input-header {\r\n\tdisplay: flex;\r\n\tpadding: 6px 6px 0px 6px;\r\n\tmargin-bottom: -2px;\r\n}\r\n\r\n.quick-input-widget.hidden-input .quick-input-header {\r\n\t/* reduce margins and paddings when input box hidden */\r\n\tpadding: 0;\r\n\tmargin-bottom: 0;\r\n}\r\n\r\n.quick-input-and-message {\r\n\tdisplay: flex;\r\n\tflex-direction: column;\r\n\tflex-grow: 1;\r\n\tposition: relative;\r\n}\r\n\r\n.quick-input-check-all {\r\n\talign-self: center;\r\n\tmargin: 0;\r\n}\r\n\r\n.quick-input-filter {\r\n\tflex-grow: 1;\r\n\tdisplay: flex;\r\n\tposition: relative;\r\n}\r\n\r\n.quick-input-box {\r\n\tflex-grow: 1;\r\n}\r\n\r\n.quick-input-widget.show-checkboxes .quick-input-box,\r\n.quick-input-widget.show-checkboxes .quick-input-message {\r\n\tmargin-left: 5px;\r\n}\r\n\r\n.quick-input-visible-count {\r\n\tposition: absolute;\r\n\tleft: -10000px;\r\n}\r\n\r\n.quick-input-count {\r\n\talign-self: center;\r\n\tposition: absolute;\r\n\tright: 4px;\r\n\tdisplay: flex;\r\n\talign-items: center;\r\n}\r\n\r\n.quick-input-count .monaco-count-badge {\r\n\tvertical-align: middle;\r\n\tpadding: 2px 4px;\r\n\tborder-radius: 2px;\r\n\tmin-height: auto;\r\n\tline-height: normal;\r\n}\r\n\r\n.quick-input-action {\r\n\tmargin-left: 6px;\r\n}\r\n\r\n.quick-input-action .monaco-text-button {\r\n\tfont-size: 11px;\r\n\tpadding: 0 6px;\r\n\tdisplay: flex;\r\n\theight: 27.5px;\r\n\talign-items: center;\r\n}\r\n\r\n.quick-input-message {\r\n\tmargin-top: -1px;\r\n\tpadding: 5px 5px 2px 5px;\r\n}\r\n\r\n.quick-input-message > .codicon {\r\n\tmargin: 0 0.2em;\r\n\tvertical-align: text-bottom;\r\n}\r\n\r\n.quick-input-progress.monaco-progress-container {\r\n\tposition: relative;\r\n}\r\n\r\n.quick-input-progress.monaco-progress-container,\r\n.quick-input-progress.monaco-progress-container .progress-bit {\r\n\theight: 2px;\r\n}\r\n\r\n.quick-input-list {\r\n\tline-height: 22px;\r\n\tmargin-top: 6px;\r\n}\r\n\r\n.quick-input-widget.hidden-input .quick-input-list {\r\n\tmargin-top: 0; /* reduce margins when input box hidden */\r\n}\r\n\r\n.quick-input-list .monaco-list {\r\n\toverflow: hidden;\r\n\tmax-height: calc(20 * 22px);\r\n}\r\n\r\n.quick-input-list .quick-input-list-entry {\r\n\tbox-sizing: border-box;\r\n\toverflow: hidden;\r\n\tdisplay: flex;\r\n\theight: 100%;\r\n\tpadding: 0 6px;\r\n}\r\n\r\n.quick-input-list .quick-input-list-entry.quick-input-list-separator-border {\r\n\tborder-top-width: 1px;\r\n\tborder-top-style: solid;\r\n}\r\n\r\n.quick-input-list .monaco-list-row[data-index=\"0\"] .quick-input-list-entry.quick-input-list-separator-border {\r\n\tborder-top-style: none;\r\n}\r\n\r\n.quick-input-list .quick-input-list-label {\r\n\toverflow: hidden;\r\n\tdisplay: flex;\r\n\theight: 100%;\r\n\tflex: 1;\r\n}\r\n\r\n.quick-input-list .quick-input-list-checkbox {\r\n\talign-self: center;\r\n\tmargin: 0;\r\n}\r\n\r\n.quick-input-list .quick-input-list-rows {\r\n\toverflow: hidden;\r\n\ttext-overflow: ellipsis;\r\n\tdisplay: flex;\r\n\tflex-direction: column;\r\n\theight: 100%;\r\n\tflex: 1;\r\n\tmargin-left: 5px;\r\n}\r\n\r\n.quick-input-widget.show-checkboxes .quick-input-list .quick-input-list-rows {\r\n\tmargin-left: 10px;\r\n}\r\n\r\n.quick-input-widget .quick-input-list .quick-input-list-checkbox {\r\n\tdisplay: none;\r\n}\r\n.quick-input-widget.show-checkboxes .quick-input-list .quick-input-list-checkbox {\r\n\tdisplay: inline;\r\n}\r\n\r\n.quick-input-list .quick-input-list-rows > .quick-input-list-row {\r\n\tdisplay: flex;\r\n\talign-items: center;\r\n}\r\n\r\n.quick-input-list .quick-input-list-rows > .quick-input-list-row .monaco-icon-label,\r\n.quick-input-list .quick-input-list-rows > .quick-input-list-row .monaco-icon-label .monaco-icon-label-container > .monaco-icon-name-container {\r\n\tflex: 1; /* make sure the icon label grows within the row */\r\n}\r\n\r\n.quick-input-list .quick-input-list-rows > .quick-input-list-row .codicon[class*='codicon-'] {\r\n\tvertical-align: text-bottom;\r\n}\r\n\r\n.quick-input-list .quick-input-list-rows .monaco-highlighted-label span {\r\n\topacity: 1;\r\n}\r\n\r\n.quick-input-list .quick-input-list-entry .quick-input-list-entry-keybinding {\r\n\tmargin-right: 8px; /* separate from the separator label or scrollbar if any */\r\n}\r\n\r\n.quick-input-list .quick-input-list-label-meta {\r\n\topacity: 0.7;\r\n\tline-height: normal;\r\n\ttext-overflow: ellipsis;\r\n\toverflow: hidden;\r\n}\r\n\r\n.quick-input-list .monaco-highlighted-label .highlight {\r\n\tfont-weight: bold;\r\n}\r\n\r\n.quick-input-list .quick-input-list-entry .quick-input-list-separator {\r\n\tmargin-right: 8px; /* separate from keybindings or actions */\r\n}\r\n\r\n.quick-input-list .quick-input-list-entry-action-bar {\r\n\tdisplay: flex;\r\n\tflex: 0;\r\n\toverflow: visible;\r\n}\r\n\r\n.quick-input-list .quick-input-list-entry-action-bar .action-label {\r\n\t/*\r\n\t * By default, actions in the quick input action bar are hidden\r\n\t * until hovered over them or selected.\r\n\t */\r\n\tdisplay: none;\r\n}\r\n\r\n.quick-input-list .quick-input-list-entry-action-bar .action-label.codicon {\r\n\tmargin-right: 4px;\r\n\tpadding: 0px 2px 2px 2px;\r\n}\r\n\r\n.quick-input-list .quick-input-list-entry-action-bar {\r\n\tmargin-top: 1px;\r\n}\r\n\r\n.quick-input-list .quick-input-list-entry-action-bar {\r\n\tmargin-right: 4px; /* separate from scrollbar */\r\n}\r\n\r\n.quick-input-list .quick-input-list-entry .quick-input-list-entry-action-bar .action-label.always-visible,\r\n.quick-input-list .quick-input-list-entry:hover .quick-input-list-entry-action-bar .action-label,\r\n.quick-input-list .monaco-list-row.focused .quick-input-list-entry-action-bar .action-label {\r\n\tdisplay: flex;\r\n}\r\n\r\n/* focused items in quick pick */\r\n.quick-input-list .monaco-list-row.focused .monaco-keybinding-key,\r\n.quick-input-list .monaco-list-row.focused .quick-input-list-entry .quick-input-list-separator {\r\n\tcolor: inherit\r\n}\r\n.quick-input-list .monaco-list-row.focused .monaco-keybinding-key {\r\n\tbackground: none;\r\n}\r\n"],sourceRoot:""}]);const a=s},504:(e,t,n)=>{"use strict";n.d(t,{Z:()=>a});var i=n(7537),o=n.n(i),r=n(3645),s=n.n(r)()(o());s.push([e.id,"/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n.monaco-editor .inputarea {\r\n\tmin-width: 0;\r\n\tmin-height: 0;\r\n\tmargin: 0;\r\n\tpadding: 0;\r\n\tposition: absolute;\r\n\toutline: none !important;\r\n\tresize: none;\r\n\tborder: none;\r\n\toverflow: hidden;\r\n\tcolor: transparent;\r\n\tbackground-color: transparent;\r\n}\r\n/*.monaco-editor .inputarea {\r\n\tposition: fixed !important;\r\n\twidth: 800px !important;\r\n\theight: 500px !important;\r\n\ttop: initial !important;\r\n\tleft: initial !important;\r\n\tbottom: 0 !important;\r\n\tright: 0 !important;\r\n\tcolor: black !important;\r\n\tbackground: white !important;\r\n\tline-height: 15px !important;\r\n\tfont-size: 14px !important;\r\n}*/\r\n.monaco-editor .inputarea.ime-input {\r\n\tz-index: 10;\r\n}\r\n","",{version:3,sources:["webpack://./node_modules/monaco-editor/esm/vs/editor/browser/controller/textAreaHandler.css"],names:[],mappings:"AAAA;;;+FAG+F;;AAE/F;CACC,YAAY;CACZ,aAAa;CACb,SAAS;CACT,UAAU;CACV,kBAAkB;CAClB,wBAAwB;CACxB,YAAY;CACZ,YAAY;CACZ,gBAAgB;CAChB,kBAAkB;CAClB,6BAA6B;AAC9B;AACA;;;;;;;;;;;;EAYE;AACF;CACC,WAAW;AACZ",sourcesContent:["/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n.monaco-editor .inputarea {\r\n\tmin-width: 0;\r\n\tmin-height: 0;\r\n\tmargin: 0;\r\n\tpadding: 0;\r\n\tposition: absolute;\r\n\toutline: none !important;\r\n\tresize: none;\r\n\tborder: none;\r\n\toverflow: hidden;\r\n\tcolor: transparent;\r\n\tbackground-color: transparent;\r\n}\r\n/*.monaco-editor .inputarea {\r\n\tposition: fixed !important;\r\n\twidth: 800px !important;\r\n\theight: 500px !important;\r\n\ttop: initial !important;\r\n\tleft: initial !important;\r\n\tbottom: 0 !important;\r\n\tright: 0 !important;\r\n\tcolor: black !important;\r\n\tbackground: white !important;\r\n\tline-height: 15px !important;\r\n\tfont-size: 14px !important;\r\n}*/\r\n.monaco-editor .inputarea.ime-input {\r\n\tz-index: 10;\r\n}\r\n"],sourceRoot:""}]);const a=s},1260:(e,t,n)=>{"use strict";n.d(t,{Z:()=>a});var i=n(7537),o=n.n(i),r=n(3645),s=n.n(r)()(o());s.push([e.id,"/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n.monaco-editor .view-overlays .current-line {\r\n\tdisplay: block;\r\n\tposition: absolute;\r\n\tleft: 0;\r\n\ttop: 0;\r\n\tbox-sizing: border-box;\r\n}\r\n\r\n.monaco-editor .margin-view-overlays .current-line {\r\n\tdisplay: block;\r\n\tposition: absolute;\r\n\tleft: 0;\r\n\ttop: 0;\r\n\tbox-sizing: border-box;\r\n}\r\n\r\n.monaco-editor .margin-view-overlays .current-line.current-line-margin.current-line-margin-both {\r\n\tborder-right: 0;\r\n}\r\n","",{version:3,sources:["webpack://./node_modules/monaco-editor/esm/vs/editor/browser/viewParts/currentLineHighlight/currentLineHighlight.css"],names:[],mappings:"AAAA;;;+FAG+F;;AAE/F;CACC,cAAc;CACd,kBAAkB;CAClB,OAAO;CACP,MAAM;CACN,sBAAsB;AACvB;;AAEA;CACC,cAAc;CACd,kBAAkB;CAClB,OAAO;CACP,MAAM;CACN,sBAAsB;AACvB;;AAEA;CACC,eAAe;AAChB",sourcesContent:["/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n.monaco-editor .view-overlays .current-line {\r\n\tdisplay: block;\r\n\tposition: absolute;\r\n\tleft: 0;\r\n\ttop: 0;\r\n\tbox-sizing: border-box;\r\n}\r\n\r\n.monaco-editor .margin-view-overlays .current-line {\r\n\tdisplay: block;\r\n\tposition: absolute;\r\n\tleft: 0;\r\n\ttop: 0;\r\n\tbox-sizing: border-box;\r\n}\r\n\r\n.monaco-editor .margin-view-overlays .current-line.current-line-margin.current-line-margin-both {\r\n\tborder-right: 0;\r\n}\r\n"],sourceRoot:""}]);const a=s},5686:(e,t,n)=>{"use strict";n.d(t,{Z:()=>a});var i=n(7537),o=n.n(i),r=n(3645),s=n.n(r)()(o());s.push([e.id,"/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n/*\r\n\tKeeping name short for faster parsing.\r\n\tcdr = core decorations rendering (div)\r\n*/\r\n.monaco-editor .lines-content .cdr {\r\n\tposition: absolute;\r\n}","",{version:3,sources:["webpack://./node_modules/monaco-editor/esm/vs/editor/browser/viewParts/decorations/decorations.css"],names:[],mappings:"AAAA;;;+FAG+F;;AAE/F;;;CAGC;AACD;CACC,kBAAkB;AACnB",sourcesContent:["/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n/*\r\n\tKeeping name short for faster parsing.\r\n\tcdr = core decorations rendering (div)\r\n*/\r\n.monaco-editor .lines-content .cdr {\r\n\tposition: absolute;\r\n}"],sourceRoot:""}]);const a=s},4827:(e,t,n)=>{"use strict";n.d(t,{Z:()=>a});var i=n(7537),o=n.n(i),r=n(3645),s=n.n(r)()(o());s.push([e.id,"/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n.monaco-editor .glyph-margin {\r\n\tposition: absolute;\r\n\ttop: 0;\r\n}\r\n\r\n/*\r\n\tKeeping name short for faster parsing.\r\n\tcgmr = core glyph margin rendering (div)\r\n*/\r\n.monaco-editor .margin-view-overlays .cgmr {\r\n\tposition: absolute;\r\n\tdisplay: flex;\r\n\talign-items: center;\r\n\tjustify-content: center;\r\n}\r\n","",{version:3,sources:["webpack://./node_modules/monaco-editor/esm/vs/editor/browser/viewParts/glyphMargin/glyphMargin.css"],names:[],mappings:"AAAA;;;+FAG+F;;AAE/F;CACC,kBAAkB;CAClB,MAAM;AACP;;AAEA;;;CAGC;AACD;CACC,kBAAkB;CAClB,aAAa;CACb,mBAAmB;CACnB,uBAAuB;AACxB",sourcesContent:["/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n.monaco-editor .glyph-margin {\r\n\tposition: absolute;\r\n\ttop: 0;\r\n}\r\n\r\n/*\r\n\tKeeping name short for faster parsing.\r\n\tcgmr = core glyph margin rendering (div)\r\n*/\r\n.monaco-editor .margin-view-overlays .cgmr {\r\n\tposition: absolute;\r\n\tdisplay: flex;\r\n\talign-items: center;\r\n\tjustify-content: center;\r\n}\r\n"],sourceRoot:""}]);const a=s},6848:(e,t,n)=>{"use strict";n.d(t,{Z:()=>a});var i=n(7537),o=n.n(i),r=n(3645),s=n.n(r)()(o());s.push([e.id,"/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n/*\r\n\tKeeping name short for faster parsing.\r\n\tcigr = core ident guides rendering (div)\r\n*/\r\n.monaco-editor .lines-content .cigr {\r\n\tposition: absolute;\r\n}\r\n.monaco-editor .lines-content .cigra {\r\n\tposition: absolute;\r\n}\r\n","",{version:3,sources:["webpack://./node_modules/monaco-editor/esm/vs/editor/browser/viewParts/indentGuides/indentGuides.css"],names:[],mappings:"AAAA;;;+FAG+F;;AAE/F;;;CAGC;AACD;CACC,kBAAkB;AACnB;AACA;CACC,kBAAkB;AACnB",sourcesContent:["/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n/*\r\n\tKeeping name short for faster parsing.\r\n\tcigr = core ident guides rendering (div)\r\n*/\r\n.monaco-editor .lines-content .cigr {\r\n\tposition: absolute;\r\n}\r\n.monaco-editor .lines-content .cigra {\r\n\tposition: absolute;\r\n}\r\n"],sourceRoot:""}]);const a=s},6184:(e,t,n)=>{"use strict";n.d(t,{Z:()=>a});var i=n(7537),o=n.n(i),r=n(3645),s=n.n(r)()(o());s.push([e.id,"/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n.monaco-editor .margin-view-overlays .line-numbers {\r\n\tfont-variant-numeric: tabular-nums;\r\n\tposition: absolute;\r\n\ttext-align: right;\r\n\tdisplay: inline-block;\r\n\tvertical-align: middle;\r\n\tbox-sizing: border-box;\r\n\tcursor: default;\r\n\theight: 100%;\r\n}\r\n\r\n.monaco-editor .relative-current-line-number {\r\n\ttext-align: left;\r\n\tdisplay: inline-block;\r\n\twidth: 100%;\r\n}\r\n\r\n.monaco-editor .margin-view-overlays .line-numbers.lh-odd {\r\n\tmargin-top: 1px;\r\n}\r\n","",{version:3,sources:["webpack://./node_modules/monaco-editor/esm/vs/editor/browser/viewParts/lineNumbers/lineNumbers.css"],names:[],mappings:"AAAA;;;+FAG+F;;AAE/F;CACC,kCAAkC;CAClC,kBAAkB;CAClB,iBAAiB;CACjB,qBAAqB;CACrB,sBAAsB;CACtB,sBAAsB;CACtB,eAAe;CACf,YAAY;AACb;;AAEA;CACC,gBAAgB;CAChB,qBAAqB;CACrB,WAAW;AACZ;;AAEA;CACC,eAAe;AAChB",sourcesContent:["/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n.monaco-editor .margin-view-overlays .line-numbers {\r\n\tfont-variant-numeric: tabular-nums;\r\n\tposition: absolute;\r\n\ttext-align: right;\r\n\tdisplay: inline-block;\r\n\tvertical-align: middle;\r\n\tbox-sizing: border-box;\r\n\tcursor: default;\r\n\theight: 100%;\r\n}\r\n\r\n.monaco-editor .relative-current-line-number {\r\n\ttext-align: left;\r\n\tdisplay: inline-block;\r\n\twidth: 100%;\r\n}\r\n\r\n.monaco-editor .margin-view-overlays .line-numbers.lh-odd {\r\n\tmargin-top: 1px;\r\n}\r\n"],sourceRoot:""}]);const a=s},9565:(e,t,n)=>{"use strict";n.d(t,{Z:()=>a});var i=n(7537),o=n.n(i),r=n(3645),s=n.n(r)()(o());s.push([e.id,"/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n/* Uncomment to see lines flashing when they're painted */\r\n/*.monaco-editor .view-lines > .view-line {\r\n\tbackground-color: none;\r\n\tanimation-name: flash-background;\r\n\tanimation-duration: 800ms;\r\n}\r\n@keyframes flash-background {\r\n\t0% { background-color: lightgreen; }\r\n\t100% { background-color: none }\r\n}*/\r\n\r\n.monaco-editor.no-user-select .lines-content,\r\n.monaco-editor.no-user-select .view-line,\r\n.monaco-editor.no-user-select .view-lines {\r\n\tuser-select: none;\r\n\t-webkit-user-select: none;\r\n\t-ms-user-select: none;\r\n}\r\n\r\n.monaco-editor .view-lines {\r\n\twhite-space: nowrap;\r\n}\r\n\r\n.monaco-editor .view-line {\r\n\tposition: absolute;\r\n\twidth: 100%;\r\n}\r\n\r\n.monaco-editor .mtkz {\r\n\tdisplay: inline-block;\r\n}\r\n\r\n/* TODO@tokenization bootstrap fix */\r\n/*.monaco-editor .view-line > span > span {\r\n\tfloat: none;\r\n\tmin-height: inherit;\r\n\tmargin-left: inherit;\r\n}*/\r\n","",{version:3,sources:["webpack://./node_modules/monaco-editor/esm/vs/editor/browser/viewParts/lines/viewLines.css"],names:[],mappings:"AAAA;;;+FAG+F;;AAE/F,yDAAyD;AACzD;;;;;;;;EAQE;;AAEF;;;CAGC,iBAAiB;CACjB,yBAAyB;CACzB,qBAAqB;AACtB;;AAEA;CACC,mBAAmB;AACpB;;AAEA;CACC,kBAAkB;CAClB,WAAW;AACZ;;AAEA;CACC,qBAAqB;AACtB;;AAEA,oCAAoC;AACpC;;;;EAIE",sourcesContent:["/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n/* Uncomment to see lines flashing when they're painted */\r\n/*.monaco-editor .view-lines > .view-line {\r\n\tbackground-color: none;\r\n\tanimation-name: flash-background;\r\n\tanimation-duration: 800ms;\r\n}\r\n@keyframes flash-background {\r\n\t0% { background-color: lightgreen; }\r\n\t100% { background-color: none }\r\n}*/\r\n\r\n.monaco-editor.no-user-select .lines-content,\r\n.monaco-editor.no-user-select .view-line,\r\n.monaco-editor.no-user-select .view-lines {\r\n\tuser-select: none;\r\n\t-webkit-user-select: none;\r\n\t-ms-user-select: none;\r\n}\r\n\r\n.monaco-editor .view-lines {\r\n\twhite-space: nowrap;\r\n}\r\n\r\n.monaco-editor .view-line {\r\n\tposition: absolute;\r\n\twidth: 100%;\r\n}\r\n\r\n.monaco-editor .mtkz {\r\n\tdisplay: inline-block;\r\n}\r\n\r\n/* TODO@tokenization bootstrap fix */\r\n/*.monaco-editor .view-line > span > span {\r\n\tfloat: none;\r\n\tmin-height: inherit;\r\n\tmargin-left: inherit;\r\n}*/\r\n"],sourceRoot:""}]);const a=s},4444:(e,t,n)=>{"use strict";n.d(t,{Z:()=>a});var i=n(7537),o=n.n(i),r=n(3645),s=n.n(r)()(o());s.push([e.id,"/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n.monaco-editor .lines-decorations {\r\n\tposition: absolute;\r\n\ttop: 0;\r\n\tbackground: white;\r\n}\r\n\r\n/*\r\n\tKeeping name short for faster parsing.\r\n\tcldr = core lines decorations rendering (div)\r\n*/\r\n.monaco-editor .margin-view-overlays .cldr {\r\n\tposition: absolute;\r\n\theight: 100%;\r\n}","",{version:3,sources:["webpack://./node_modules/monaco-editor/esm/vs/editor/browser/viewParts/linesDecorations/linesDecorations.css"],names:[],mappings:"AAAA;;;+FAG+F;AAC/F;CACC,kBAAkB;CAClB,MAAM;CACN,iBAAiB;AAClB;;AAEA;;;CAGC;AACD;CACC,kBAAkB;CAClB,YAAY;AACb",sourcesContent:["/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n.monaco-editor .lines-decorations {\r\n\tposition: absolute;\r\n\ttop: 0;\r\n\tbackground: white;\r\n}\r\n\r\n/*\r\n\tKeeping name short for faster parsing.\r\n\tcldr = core lines decorations rendering (div)\r\n*/\r\n.monaco-editor .margin-view-overlays .cldr {\r\n\tposition: absolute;\r\n\theight: 100%;\r\n}"],sourceRoot:""}]);const a=s},9364:(e,t,n)=>{"use strict";n.d(t,{Z:()=>a});var i=n(7537),o=n.n(i),r=n(3645),s=n.n(r)()(o());s.push([e.id,"/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n/*\r\n\tKeeping name short for faster parsing.\r\n\tcmdr = core margin decorations rendering (div)\r\n*/\r\n.monaco-editor .margin-view-overlays .cmdr {\r\n\tposition: absolute;\r\n\tleft: 0;\r\n\twidth: 100%;\r\n\theight: 100%;\r\n}","",{version:3,sources:["webpack://./node_modules/monaco-editor/esm/vs/editor/browser/viewParts/marginDecorations/marginDecorations.css"],names:[],mappings:"AAAA;;;+FAG+F;;AAE/F;;;CAGC;AACD;CACC,kBAAkB;CAClB,OAAO;CACP,WAAW;CACX,YAAY;AACb",sourcesContent:["/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n/*\r\n\tKeeping name short for faster parsing.\r\n\tcmdr = core margin decorations rendering (div)\r\n*/\r\n.monaco-editor .margin-view-overlays .cmdr {\r\n\tposition: absolute;\r\n\tleft: 0;\r\n\twidth: 100%;\r\n\theight: 100%;\r\n}"],sourceRoot:""}]);const a=s},563:(e,t,n)=>{"use strict";n.d(t,{Z:()=>a});var i=n(7537),o=n.n(i),r=n(3645),s=n.n(r)()(o());s.push([e.id,"/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n/* START cover the case that slider is visible on mouseover */\r\n.monaco-editor .minimap.slider-mouseover .minimap-slider {\r\n\topacity: 0;\r\n\ttransition: opacity 100ms linear;\r\n}\r\n.monaco-editor .minimap.slider-mouseover:hover .minimap-slider {\r\n\topacity: 1;\r\n}\r\n.monaco-editor .minimap.slider-mouseover .minimap-slider.active {\r\n\topacity: 1;\r\n}\r\n/* END cover the case that slider is visible on mouseover */\r\n\r\n.monaco-editor .minimap-shadow-hidden {\r\n\tposition: absolute;\r\n\twidth: 0;\r\n}\r\n.monaco-editor .minimap-shadow-visible {\r\n\tposition: absolute;\r\n\tleft: -6px;\r\n\twidth: 6px;\r\n}\r\n.monaco-editor.no-minimap-shadow .minimap-shadow-visible {\r\n\tposition: absolute;\r\n\tleft: -1px;\r\n\twidth: 1px;\r\n}\r\n","",{version:3,sources:["webpack://./node_modules/monaco-editor/esm/vs/editor/browser/viewParts/minimap/minimap.css"],names:[],mappings:"AAAA;;;+FAG+F;;AAE/F,6DAA6D;AAC7D;CACC,UAAU;CACV,gCAAgC;AACjC;AACA;CACC,UAAU;AACX;AACA;CACC,UAAU;AACX;AACA,2DAA2D;;AAE3D;CACC,kBAAkB;CAClB,QAAQ;AACT;AACA;CACC,kBAAkB;CAClB,UAAU;CACV,UAAU;AACX;AACA;CACC,kBAAkB;CAClB,UAAU;CACV,UAAU;AACX",sourcesContent:["/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n/* START cover the case that slider is visible on mouseover */\r\n.monaco-editor .minimap.slider-mouseover .minimap-slider {\r\n\topacity: 0;\r\n\ttransition: opacity 100ms linear;\r\n}\r\n.monaco-editor .minimap.slider-mouseover:hover .minimap-slider {\r\n\topacity: 1;\r\n}\r\n.monaco-editor .minimap.slider-mouseover .minimap-slider.active {\r\n\topacity: 1;\r\n}\r\n/* END cover the case that slider is visible on mouseover */\r\n\r\n.monaco-editor .minimap-shadow-hidden {\r\n\tposition: absolute;\r\n\twidth: 0;\r\n}\r\n.monaco-editor .minimap-shadow-visible {\r\n\tposition: absolute;\r\n\tleft: -6px;\r\n\twidth: 6px;\r\n}\r\n.monaco-editor.no-minimap-shadow .minimap-shadow-visible {\r\n\tposition: absolute;\r\n\tleft: -1px;\r\n\twidth: 1px;\r\n}\r\n"],sourceRoot:""}]);const a=s},9822:(e,t,n)=>{"use strict";n.d(t,{Z:()=>a});var i=n(7537),o=n.n(i),r=n(3645),s=n.n(r)()(o());s.push([e.id,"/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n.monaco-editor .overlayWidgets {\r\n\tposition: absolute;\r\n\ttop: 0;\r\n\tleft:0;\r\n}","",{version:3,sources:["webpack://./node_modules/monaco-editor/esm/vs/editor/browser/viewParts/overlayWidgets/overlayWidgets.css"],names:[],mappings:"AAAA;;;+FAG+F;AAC/F;CACC,kBAAkB;CAClB,MAAM;CACN,MAAM;AACP",sourcesContent:["/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n.monaco-editor .overlayWidgets {\r\n\tposition: absolute;\r\n\ttop: 0;\r\n\tleft:0;\r\n}"],sourceRoot:""}]);const a=s},9443:(e,t,n)=>{"use strict";n.d(t,{Z:()=>a});var i=n(7537),o=n.n(i),r=n(3645),s=n.n(r)()(o());s.push([e.id,"/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n.monaco-editor .view-ruler {\r\n\tposition: absolute;\r\n\ttop: 0;\r\n}","",{version:3,sources:["webpack://./node_modules/monaco-editor/esm/vs/editor/browser/viewParts/rulers/rulers.css"],names:[],mappings:"AAAA;;;+FAG+F;;AAE/F;CACC,kBAAkB;CAClB,MAAM;AACP",sourcesContent:["/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n.monaco-editor .view-ruler {\r\n\tposition: absolute;\r\n\ttop: 0;\r\n}"],sourceRoot:""}]);const a=s},9649:(e,t,n)=>{"use strict";n.d(t,{Z:()=>a});var i=n(7537),o=n.n(i),r=n(3645),s=n.n(r)()(o());s.push([e.id,"/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n.monaco-editor .scroll-decoration {\r\n\tposition: absolute;\r\n\ttop: 0;\r\n\tleft: 0;\r\n\theight: 6px;\r\n}","",{version:3,sources:["webpack://./node_modules/monaco-editor/esm/vs/editor/browser/viewParts/scrollDecoration/scrollDecoration.css"],names:[],mappings:"AAAA;;;+FAG+F;;AAE/F;CACC,kBAAkB;CAClB,MAAM;CACN,OAAO;CACP,WAAW;AACZ",sourcesContent:["/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n.monaco-editor .scroll-decoration {\r\n\tposition: absolute;\r\n\ttop: 0;\r\n\tleft: 0;\r\n\theight: 6px;\r\n}"],sourceRoot:""}]);const a=s},2595:(e,t,n)=>{"use strict";n.d(t,{Z:()=>a});var i=n(7537),o=n.n(i),r=n(3645),s=n.n(r)()(o());s.push([e.id,"/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n/*\r\n\tKeeping name short for faster parsing.\r\n\tcslr = core selections layer rendering (div)\r\n*/\r\n.monaco-editor .lines-content .cslr {\r\n\tposition: absolute;\r\n}\r\n\r\n.monaco-editor\t\t\t.top-left-radius\t\t{ border-top-left-radius: 3px; }\r\n.monaco-editor\t\t\t.bottom-left-radius\t\t{ border-bottom-left-radius: 3px; }\r\n.monaco-editor\t\t\t.top-right-radius\t\t{ border-top-right-radius: 3px; }\r\n.monaco-editor\t\t\t.bottom-right-radius\t{ border-bottom-right-radius: 3px; }\r\n\r\n.monaco-editor.hc-black .top-left-radius\t\t{ border-top-left-radius: 0; }\r\n.monaco-editor.hc-black .bottom-left-radius\t\t{ border-bottom-left-radius: 0; }\r\n.monaco-editor.hc-black .top-right-radius\t\t{ border-top-right-radius: 0; }\r\n.monaco-editor.hc-black .bottom-right-radius\t{ border-bottom-right-radius: 0; }\r\n","",{version:3,sources:["webpack://./node_modules/monaco-editor/esm/vs/editor/browser/viewParts/selections/selections.css"],names:[],mappings:"AAAA;;;+FAG+F;;AAE/F;;;CAGC;AACD;CACC,kBAAkB;AACnB;;AAEA,qCAAqC,2BAA2B,EAAE;AAClE,wCAAwC,8BAA8B,EAAE;AACxE,sCAAsC,4BAA4B,EAAE;AACpE,wCAAwC,+BAA+B,EAAE;;AAEzE,4CAA4C,yBAAyB,EAAE;AACvE,+CAA+C,4BAA4B,EAAE;AAC7E,6CAA6C,0BAA0B,EAAE;AACzE,+CAA+C,6BAA6B,EAAE",sourcesContent:["/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n/*\r\n\tKeeping name short for faster parsing.\r\n\tcslr = core selections layer rendering (div)\r\n*/\r\n.monaco-editor .lines-content .cslr {\r\n\tposition: absolute;\r\n}\r\n\r\n.monaco-editor\t\t\t.top-left-radius\t\t{ border-top-left-radius: 3px; }\r\n.monaco-editor\t\t\t.bottom-left-radius\t\t{ border-bottom-left-radius: 3px; }\r\n.monaco-editor\t\t\t.top-right-radius\t\t{ border-top-right-radius: 3px; }\r\n.monaco-editor\t\t\t.bottom-right-radius\t{ border-bottom-right-radius: 3px; }\r\n\r\n.monaco-editor.hc-black .top-left-radius\t\t{ border-top-left-radius: 0; }\r\n.monaco-editor.hc-black .bottom-left-radius\t\t{ border-bottom-left-radius: 0; }\r\n.monaco-editor.hc-black .top-right-radius\t\t{ border-top-right-radius: 0; }\r\n.monaco-editor.hc-black .bottom-right-radius\t{ border-bottom-right-radius: 0; }\r\n"],sourceRoot:""}]);const a=s},4057:(e,t,n)=>{"use strict";n.d(t,{Z:()=>a});var i=n(7537),o=n.n(i),r=n(3645),s=n.n(r)()(o());s.push([e.id,"/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n.monaco-editor .cursors-layer {\r\n\tposition: absolute;\r\n\ttop: 0;\r\n}\r\n\r\n.monaco-editor .cursors-layer > .cursor {\r\n\tposition: absolute;\r\n\toverflow: hidden;\r\n}\r\n\r\n/* -- smooth-caret-animation -- */\r\n.monaco-editor .cursors-layer.cursor-smooth-caret-animation > .cursor {\r\n\ttransition: all 80ms;\r\n}\r\n\r\n/* -- block-outline-style -- */\r\n.monaco-editor .cursors-layer.cursor-block-outline-style > .cursor {\r\n\tbox-sizing: border-box;\r\n\tbackground: transparent !important;\r\n\tborder-style: solid;\r\n\tborder-width: 1px;\r\n}\r\n\r\n/* -- underline-style -- */\r\n.monaco-editor .cursors-layer.cursor-underline-style > .cursor {\r\n\tborder-bottom-width: 2px;\r\n\tborder-bottom-style: solid;\r\n\tbackground: transparent !important;\r\n\tbox-sizing: border-box;\r\n}\r\n\r\n/* -- underline-thin-style -- */\r\n.monaco-editor .cursors-layer.cursor-underline-thin-style > .cursor {\r\n\tborder-bottom-width: 1px;\r\n\tborder-bottom-style: solid;\r\n\tbackground: transparent !important;\r\n\tbox-sizing: border-box;\r\n}\r\n\r\n@keyframes monaco-cursor-smooth {\r\n\t0%,\r\n\t20% {\r\n\t\topacity: 1;\r\n\t}\r\n\t60%,\r\n\t100% {\r\n\t\topacity: 0;\r\n\t}\r\n}\r\n\r\n@keyframes monaco-cursor-phase {\r\n\t0%,\r\n\t20% {\r\n\t\topacity: 1;\r\n\t}\r\n\t90%,\r\n\t100% {\r\n\t\topacity: 0;\r\n\t}\r\n}\r\n\r\n@keyframes monaco-cursor-expand {\r\n\t0%,\r\n\t20% {\r\n\t\ttransform: scaleY(1);\r\n\t}\r\n\t80%,\r\n\t100% {\r\n\t\ttransform: scaleY(0);\r\n\t}\r\n}\r\n\r\n.cursor-smooth {\r\n\tanimation: monaco-cursor-smooth 0.5s ease-in-out 0s 20 alternate;\r\n}\r\n\r\n.cursor-phase {\r\n\tanimation: monaco-cursor-phase 0.5s ease-in-out 0s 20 alternate;\r\n}\r\n\r\n.cursor-expand > .cursor {\r\n\tanimation: monaco-cursor-expand 0.5s ease-in-out 0s 20 alternate;\r\n}\r\n","",{version:3,sources:["webpack://./node_modules/monaco-editor/esm/vs/editor/browser/viewParts/viewCursors/viewCursors.css"],names:[],mappings:"AAAA;;;+FAG+F;AAC/F;CACC,kBAAkB;CAClB,MAAM;AACP;;AAEA;CACC,kBAAkB;CAClB,gBAAgB;AACjB;;AAEA,iCAAiC;AACjC;CACC,oBAAoB;AACrB;;AAEA,8BAA8B;AAC9B;CACC,sBAAsB;CACtB,kCAAkC;CAClC,mBAAmB;CACnB,iBAAiB;AAClB;;AAEA,0BAA0B;AAC1B;CACC,wBAAwB;CACxB,0BAA0B;CAC1B,kCAAkC;CAClC,sBAAsB;AACvB;;AAEA,+BAA+B;AAC/B;CACC,wBAAwB;CACxB,0BAA0B;CAC1B,kCAAkC;CAClC,sBAAsB;AACvB;;AAEA;CACC;;EAEC,UAAU;CACX;CACA;;EAEC,UAAU;CACX;AACD;;AAEA;CACC;;EAEC,UAAU;CACX;CACA;;EAEC,UAAU;CACX;AACD;;AAEA;CACC;;EAEC,oBAAoB;CACrB;CACA;;EAEC,oBAAoB;CACrB;AACD;;AAEA;CACC,gEAAgE;AACjE;;AAEA;CACC,+DAA+D;AAChE;;AAEA;CACC,gEAAgE;AACjE",sourcesContent:["/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n.monaco-editor .cursors-layer {\r\n\tposition: absolute;\r\n\ttop: 0;\r\n}\r\n\r\n.monaco-editor .cursors-layer > .cursor {\r\n\tposition: absolute;\r\n\toverflow: hidden;\r\n}\r\n\r\n/* -- smooth-caret-animation -- */\r\n.monaco-editor .cursors-layer.cursor-smooth-caret-animation > .cursor {\r\n\ttransition: all 80ms;\r\n}\r\n\r\n/* -- block-outline-style -- */\r\n.monaco-editor .cursors-layer.cursor-block-outline-style > .cursor {\r\n\tbox-sizing: border-box;\r\n\tbackground: transparent !important;\r\n\tborder-style: solid;\r\n\tborder-width: 1px;\r\n}\r\n\r\n/* -- underline-style -- */\r\n.monaco-editor .cursors-layer.cursor-underline-style > .cursor {\r\n\tborder-bottom-width: 2px;\r\n\tborder-bottom-style: solid;\r\n\tbackground: transparent !important;\r\n\tbox-sizing: border-box;\r\n}\r\n\r\n/* -- underline-thin-style -- */\r\n.monaco-editor .cursors-layer.cursor-underline-thin-style > .cursor {\r\n\tborder-bottom-width: 1px;\r\n\tborder-bottom-style: solid;\r\n\tbackground: transparent !important;\r\n\tbox-sizing: border-box;\r\n}\r\n\r\n@keyframes monaco-cursor-smooth {\r\n\t0%,\r\n\t20% {\r\n\t\topacity: 1;\r\n\t}\r\n\t60%,\r\n\t100% {\r\n\t\topacity: 0;\r\n\t}\r\n}\r\n\r\n@keyframes monaco-cursor-phase {\r\n\t0%,\r\n\t20% {\r\n\t\topacity: 1;\r\n\t}\r\n\t90%,\r\n\t100% {\r\n\t\topacity: 0;\r\n\t}\r\n}\r\n\r\n@keyframes monaco-cursor-expand {\r\n\t0%,\r\n\t20% {\r\n\t\ttransform: scaleY(1);\r\n\t}\r\n\t80%,\r\n\t100% {\r\n\t\ttransform: scaleY(0);\r\n\t}\r\n}\r\n\r\n.cursor-smooth {\r\n\tanimation: monaco-cursor-smooth 0.5s ease-in-out 0s 20 alternate;\r\n}\r\n\r\n.cursor-phase {\r\n\tanimation: monaco-cursor-phase 0.5s ease-in-out 0s 20 alternate;\r\n}\r\n\r\n.cursor-expand > .cursor {\r\n\tanimation: monaco-cursor-expand 0.5s ease-in-out 0s 20 alternate;\r\n}\r\n"],sourceRoot:""}]);const a=s},2360:(e,t,n)=>{"use strict";n.d(t,{Z:()=>a});var i=n(7537),o=n.n(i),r=n(3645),s=n.n(r)()(o());s.push([e.id,"/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n/* ---------- DiffEditor ---------- */\r\n\r\n.monaco-diff-editor .diffOverview {\r\n\tz-index: 9;\r\n}\r\n\r\n.monaco-diff-editor .diffOverview .diffViewport {\r\n\tz-index: 10;\r\n}\r\n\r\n/* colors not externalized: using transparancy on background */\r\n.monaco-diff-editor.vs\t\t\t.diffOverview { background: rgba(0, 0, 0, 0.03); }\r\n.monaco-diff-editor.vs-dark\t\t.diffOverview { background: rgba(255, 255, 255, 0.01); }\r\n\r\n.monaco-scrollable-element.modified-in-monaco-diff-editor.vs\t\t.scrollbar { background: rgba(0,0,0,0); }\r\n.monaco-scrollable-element.modified-in-monaco-diff-editor.vs-dark\t.scrollbar { background: rgba(0,0,0,0); }\r\n.monaco-scrollable-element.modified-in-monaco-diff-editor.hc-black\t.scrollbar { background: none; }\r\n\r\n.monaco-scrollable-element.modified-in-monaco-diff-editor .slider {\r\n\tz-index: 10;\r\n}\r\n.modified-in-monaco-diff-editor\t\t\t\t.slider.active { background: rgba(171, 171, 171, .4); }\r\n.modified-in-monaco-diff-editor.hc-black\t.slider.active { background: none; }\r\n\r\n/* ---------- Diff ---------- */\r\n\r\n.monaco-editor .insert-sign,\r\n.monaco-diff-editor .insert-sign,\r\n.monaco-editor .delete-sign,\r\n.monaco-diff-editor .delete-sign {\r\n\tfont-size: 11px !important;\r\n\topacity: 0.7 !important;\r\n\tdisplay: flex !important;\r\n\talign-items: center;\r\n}\r\n.monaco-editor.hc-black .insert-sign,\r\n.monaco-diff-editor.hc-black .insert-sign,\r\n.monaco-editor.hc-black .delete-sign,\r\n.monaco-diff-editor.hc-black .delete-sign {\r\n\topacity: 1;\r\n}\r\n\r\n.monaco-editor .inline-deleted-margin-view-zone {\r\n\ttext-align: right;\r\n}\r\n.monaco-editor .inline-added-margin-view-zone {\r\n\ttext-align: right;\r\n}\r\n\r\n/* ---------- Inline Diff ---------- */\r\n\r\n.monaco-editor .view-zones .view-lines .view-line span {\r\n\tdisplay: inline-block;\r\n}\r\n\r\n.monaco-editor .margin-view-zones .lightbulb-glyph:hover {\r\n\tcursor: pointer;\r\n}\r\n","",{version:3,sources:["webpack://./node_modules/monaco-editor/esm/vs/editor/browser/widget/media/diffEditor.css"],names:[],mappings:"AAAA;;;+FAG+F;AAC/F,qCAAqC;;AAErC;CACC,UAAU;AACX;;AAEA;CACC,WAAW;AACZ;;AAEA,8DAA8D;AAC9D,yCAAyC,+BAA+B,EAAE;AAC1E,6CAA6C,qCAAqC,EAAE;;AAEpF,2EAA2E,yBAAyB,EAAE;AACtG,+EAA+E,yBAAyB,EAAE;AAC1G,gFAAgF,gBAAgB,EAAE;;AAElG;CACC,WAAW;AACZ;AACA,oDAAoD,mCAAmC,EAAE;AACzF,0DAA0D,gBAAgB,EAAE;;AAE5E,+BAA+B;;AAE/B;;;;CAIC,0BAA0B;CAC1B,uBAAuB;CACvB,wBAAwB;CACxB,mBAAmB;AACpB;AACA;;;;CAIC,UAAU;AACX;;AAEA;CACC,iBAAiB;AAClB;AACA;CACC,iBAAiB;AAClB;;AAEA,sCAAsC;;AAEtC;CACC,qBAAqB;AACtB;;AAEA;CACC,eAAe;AAChB",sourcesContent:["/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n/* ---------- DiffEditor ---------- */\r\n\r\n.monaco-diff-editor .diffOverview {\r\n\tz-index: 9;\r\n}\r\n\r\n.monaco-diff-editor .diffOverview .diffViewport {\r\n\tz-index: 10;\r\n}\r\n\r\n/* colors not externalized: using transparancy on background */\r\n.monaco-diff-editor.vs\t\t\t.diffOverview { background: rgba(0, 0, 0, 0.03); }\r\n.monaco-diff-editor.vs-dark\t\t.diffOverview { background: rgba(255, 255, 255, 0.01); }\r\n\r\n.monaco-scrollable-element.modified-in-monaco-diff-editor.vs\t\t.scrollbar { background: rgba(0,0,0,0); }\r\n.monaco-scrollable-element.modified-in-monaco-diff-editor.vs-dark\t.scrollbar { background: rgba(0,0,0,0); }\r\n.monaco-scrollable-element.modified-in-monaco-diff-editor.hc-black\t.scrollbar { background: none; }\r\n\r\n.monaco-scrollable-element.modified-in-monaco-diff-editor .slider {\r\n\tz-index: 10;\r\n}\r\n.modified-in-monaco-diff-editor\t\t\t\t.slider.active { background: rgba(171, 171, 171, .4); }\r\n.modified-in-monaco-diff-editor.hc-black\t.slider.active { background: none; }\r\n\r\n/* ---------- Diff ---------- */\r\n\r\n.monaco-editor .insert-sign,\r\n.monaco-diff-editor .insert-sign,\r\n.monaco-editor .delete-sign,\r\n.monaco-diff-editor .delete-sign {\r\n\tfont-size: 11px !important;\r\n\topacity: 0.7 !important;\r\n\tdisplay: flex !important;\r\n\talign-items: center;\r\n}\r\n.monaco-editor.hc-black .insert-sign,\r\n.monaco-diff-editor.hc-black .insert-sign,\r\n.monaco-editor.hc-black .delete-sign,\r\n.monaco-diff-editor.hc-black .delete-sign {\r\n\topacity: 1;\r\n}\r\n\r\n.monaco-editor .inline-deleted-margin-view-zone {\r\n\ttext-align: right;\r\n}\r\n.monaco-editor .inline-added-margin-view-zone {\r\n\ttext-align: right;\r\n}\r\n\r\n/* ---------- Inline Diff ---------- */\r\n\r\n.monaco-editor .view-zones .view-lines .view-line span {\r\n\tdisplay: inline-block;\r\n}\r\n\r\n.monaco-editor .margin-view-zones .lightbulb-glyph:hover {\r\n\tcursor: pointer;\r\n}\r\n"],sourceRoot:""}]);const a=s},4504:(e,t,n)=>{"use strict";n.d(t,{Z:()=>a});var i=n(7537),o=n.n(i),r=n(3645),s=n.n(r)()(o());s.push([e.id,"/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n.monaco-diff-editor .diff-review-line-number {\r\n\ttext-align: right;\r\n\tdisplay: inline-block;\r\n}\r\n\r\n.monaco-diff-editor .diff-review {\r\n\tposition: absolute;\r\n\tuser-select: none;\r\n\t-webkit-user-select: none;\r\n\t-ms-user-select: none;\r\n}\r\n\r\n.monaco-diff-editor .diff-review-summary {\r\n\tpadding-left: 10px;\r\n}\r\n\r\n.monaco-diff-editor .diff-review-shadow {\r\n\tposition: absolute;\r\n}\r\n\r\n.monaco-diff-editor .diff-review-row {\r\n\twhite-space: pre;\r\n}\r\n\r\n.monaco-diff-editor .diff-review-table {\r\n\tdisplay: table;\r\n\tmin-width: 100%;\r\n}\r\n\r\n.monaco-diff-editor .diff-review-row {\r\n\tdisplay: table-row;\r\n\twidth: 100%;\r\n}\r\n\r\n.monaco-diff-editor .diff-review-spacer {\r\n\tdisplay: inline-block;\r\n\twidth: 10px;\r\n\tvertical-align: middle;\r\n}\r\n\r\n.monaco-diff-editor .diff-review-spacer > .codicon {\r\n\tfont-size: 9px !important;\r\n}\r\n\r\n.monaco-diff-editor .diff-review-actions {\r\n\tdisplay: inline-block;\r\n\tposition: absolute;\r\n\tright: 10px;\r\n\ttop: 2px;\r\n}\r\n\r\n.monaco-diff-editor .diff-review-actions .action-label {\r\n\twidth: 16px;\r\n\theight: 16px;\r\n\tmargin: 2px 0;\r\n}\r\n","",{version:3,sources:["webpack://./node_modules/monaco-editor/esm/vs/editor/browser/widget/media/diffReview.css"],names:[],mappings:"AAAA;;;+FAG+F;;AAE/F;CACC,iBAAiB;CACjB,qBAAqB;AACtB;;AAEA;CACC,kBAAkB;CAClB,iBAAiB;CACjB,yBAAyB;CACzB,qBAAqB;AACtB;;AAEA;CACC,kBAAkB;AACnB;;AAEA;CACC,kBAAkB;AACnB;;AAEA;CACC,gBAAgB;AACjB;;AAEA;CACC,cAAc;CACd,eAAe;AAChB;;AAEA;CACC,kBAAkB;CAClB,WAAW;AACZ;;AAEA;CACC,qBAAqB;CACrB,WAAW;CACX,sBAAsB;AACvB;;AAEA;CACC,yBAAyB;AAC1B;;AAEA;CACC,qBAAqB;CACrB,kBAAkB;CAClB,WAAW;CACX,QAAQ;AACT;;AAEA;CACC,WAAW;CACX,YAAY;CACZ,aAAa;AACd",sourcesContent:["/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n.monaco-diff-editor .diff-review-line-number {\r\n\ttext-align: right;\r\n\tdisplay: inline-block;\r\n}\r\n\r\n.monaco-diff-editor .diff-review {\r\n\tposition: absolute;\r\n\tuser-select: none;\r\n\t-webkit-user-select: none;\r\n\t-ms-user-select: none;\r\n}\r\n\r\n.monaco-diff-editor .diff-review-summary {\r\n\tpadding-left: 10px;\r\n}\r\n\r\n.monaco-diff-editor .diff-review-shadow {\r\n\tposition: absolute;\r\n}\r\n\r\n.monaco-diff-editor .diff-review-row {\r\n\twhite-space: pre;\r\n}\r\n\r\n.monaco-diff-editor .diff-review-table {\r\n\tdisplay: table;\r\n\tmin-width: 100%;\r\n}\r\n\r\n.monaco-diff-editor .diff-review-row {\r\n\tdisplay: table-row;\r\n\twidth: 100%;\r\n}\r\n\r\n.monaco-diff-editor .diff-review-spacer {\r\n\tdisplay: inline-block;\r\n\twidth: 10px;\r\n\tvertical-align: middle;\r\n}\r\n\r\n.monaco-diff-editor .diff-review-spacer > .codicon {\r\n\tfont-size: 9px !important;\r\n}\r\n\r\n.monaco-diff-editor .diff-review-actions {\r\n\tdisplay: inline-block;\r\n\tposition: absolute;\r\n\tright: 10px;\r\n\ttop: 2px;\r\n}\r\n\r\n.monaco-diff-editor .diff-review-actions .action-label {\r\n\twidth: 16px;\r\n\theight: 16px;\r\n\tmargin: 2px 0;\r\n}\r\n"],sourceRoot:""}]);const a=s},7337:(e,t,n)=>{"use strict";n.d(t,{Z:()=>a});var i=n(7537),o=n.n(i),r=n(3645),s=n.n(r)()(o());s.push([e.id,"/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n/* -------------------- IE10 remove auto clear button -------------------- */\r\n\r\n::-ms-clear {\r\n\tdisplay: none;\r\n}\r\n\r\n/* All widgets */\r\n/* I am not a big fan of this rule */\r\n.monaco-editor .editor-widget input {\r\n\tcolor: inherit;\r\n}\r\n\r\n/* -------------------- Editor -------------------- */\r\n\r\n.monaco-editor {\r\n\tposition: relative;\r\n\toverflow: visible;\r\n\t-webkit-text-size-adjust: 100%;\r\n}\r\n\r\n/* -------------------- Misc -------------------- */\r\n\r\n.monaco-editor .overflow-guard {\r\n\tposition: relative;\r\n\toverflow: hidden;\r\n}\r\n\r\n.monaco-editor .view-overlays {\r\n\tposition: absolute;\r\n\ttop: 0;\r\n}\r\n\r\n/*\r\n.monaco-editor .auto-closed-character {\r\n\topacity: 0.3;\r\n}\r\n*/\r\n","",{version:3,sources:["webpack://./node_modules/monaco-editor/esm/vs/editor/browser/widget/media/editor.css"],names:[],mappings:"AAAA;;;+FAG+F;;AAE/F,4EAA4E;;AAE5E;CACC,aAAa;AACd;;AAEA,gBAAgB;AAChB,oCAAoC;AACpC;CACC,cAAc;AACf;;AAEA,qDAAqD;;AAErD;CACC,kBAAkB;CAClB,iBAAiB;CACjB,8BAA8B;AAC/B;;AAEA,mDAAmD;;AAEnD;CACC,kBAAkB;CAClB,gBAAgB;AACjB;;AAEA;CACC,kBAAkB;CAClB,MAAM;AACP;;AAEA;;;;CAIC",sourcesContent:["/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n/* -------------------- IE10 remove auto clear button -------------------- */\r\n\r\n::-ms-clear {\r\n\tdisplay: none;\r\n}\r\n\r\n/* All widgets */\r\n/* I am not a big fan of this rule */\r\n.monaco-editor .editor-widget input {\r\n\tcolor: inherit;\r\n}\r\n\r\n/* -------------------- Editor -------------------- */\r\n\r\n.monaco-editor {\r\n\tposition: relative;\r\n\toverflow: visible;\r\n\t-webkit-text-size-adjust: 100%;\r\n}\r\n\r\n/* -------------------- Misc -------------------- */\r\n\r\n.monaco-editor .overflow-guard {\r\n\tposition: relative;\r\n\toverflow: hidden;\r\n}\r\n\r\n.monaco-editor .view-overlays {\r\n\tposition: absolute;\r\n\ttop: 0;\r\n}\r\n\r\n/*\r\n.monaco-editor .auto-closed-character {\r\n\topacity: 0.3;\r\n}\r\n*/\r\n"],sourceRoot:""}]);const a=s},2671:(e,t,n)=>{"use strict";n.d(t,{Z:()=>a});var i=n(7537),o=n.n(i),r=n(3645),s=n.n(r)()(o());s.push([e.id,"/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n.monaco-editor .selection-anchor {\r\n\tbackground-color: #007ACC;\r\n\twidth: 2px !important;\r\n}\r\n","",{version:3,sources:["webpack://./node_modules/monaco-editor/esm/vs/editor/contrib/anchorSelect/anchorSelect.css"],names:[],mappings:"AAAA;;;+FAG+F;;AAE/F;CACC,yBAAyB;CACzB,qBAAqB;AACtB",sourcesContent:["/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n.monaco-editor .selection-anchor {\r\n\tbackground-color: #007ACC;\r\n\twidth: 2px !important;\r\n}\r\n"],sourceRoot:""}]);const a=s},7667:(e,t,n)=>{"use strict";n.d(t,{Z:()=>a});var i=n(7537),o=n.n(i),r=n(3645),s=n.n(r)()(o());s.push([e.id,"/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n.monaco-editor .bracket-match {\r\n\tbox-sizing: border-box;\r\n}\r\n","",{version:3,sources:["webpack://./node_modules/monaco-editor/esm/vs/editor/contrib/bracketMatching/bracketMatching.css"],names:[],mappings:"AAAA;;;+FAG+F;;AAE/F;CACC,sBAAsB;AACvB",sourcesContent:["/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n.monaco-editor .bracket-match {\r\n\tbox-sizing: border-box;\r\n}\r\n"],sourceRoot:""}]);const a=s},4754:(e,t,n)=>{"use strict";n.d(t,{Z:()=>a});var i=n(7537),o=n.n(i),r=n(3645),s=n.n(r)()(o());s.push([e.id,"/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n.monaco-editor .contentWidgets .codicon-light-bulb,\r\n.monaco-editor .contentWidgets .codicon-lightbulb-autofix {\r\n\tdisplay: flex;\r\n\talign-items: center;\r\n\tjustify-content: center;\r\n}\r\n\r\n.monaco-editor .contentWidgets .codicon-light-bulb:hover,\r\n.monaco-editor .contentWidgets .codicon-lightbulb-autofix:hover {\r\n\tcursor: pointer;\r\n}\r\n","",{version:3,sources:["webpack://./node_modules/monaco-editor/esm/vs/editor/contrib/codeAction/lightBulbWidget.css"],names:[],mappings:"AAAA;;;+FAG+F;;AAE/F;;CAEC,aAAa;CACb,mBAAmB;CACnB,uBAAuB;AACxB;;AAEA;;CAEC,eAAe;AAChB",sourcesContent:["/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n.monaco-editor .contentWidgets .codicon-light-bulb,\r\n.monaco-editor .contentWidgets .codicon-lightbulb-autofix {\r\n\tdisplay: flex;\r\n\talign-items: center;\r\n\tjustify-content: center;\r\n}\r\n\r\n.monaco-editor .contentWidgets .codicon-light-bulb:hover,\r\n.monaco-editor .contentWidgets .codicon-lightbulb-autofix:hover {\r\n\tcursor: pointer;\r\n}\r\n"],sourceRoot:""}]);const a=s},5674:(e,t,n)=>{"use strict";n.d(t,{Z:()=>a});var i=n(7537),o=n.n(i),r=n(3645),s=n.n(r)()(o());s.push([e.id,"/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n.monaco-editor .codelens-decoration {\r\n\toverflow: hidden;\r\n\tdisplay: inline-block;\r\n\ttext-overflow: ellipsis;\r\n\twhite-space: nowrap;\r\n}\r\n\r\n.monaco-editor .codelens-decoration > span,\r\n.monaco-editor .codelens-decoration > a {\r\n\tuser-select: none;\r\n\t-webkit-user-select: none;\r\n\t-ms-user-select: none;\r\n\twhite-space: nowrap;\r\n\tvertical-align: sub;\r\n}\r\n\r\n.monaco-editor .codelens-decoration > a {\r\n\ttext-decoration: none;\r\n}\r\n\r\n.monaco-editor .codelens-decoration > a:hover {\r\n\tcursor: pointer;\r\n}\r\n\r\n.monaco-editor .codelens-decoration .codicon {\r\n\tvertical-align: middle;\r\n\tcolor: currentColor !important;\r\n}\r\n\r\n.monaco-editor .codelens-decoration > a:hover .codicon::before {\r\n\tcursor: pointer;\r\n}\r\n\r\n@keyframes fadein {\r\n\t0% { opacity: 0; visibility: visible;}\r\n\t100% { opacity: 1; }\r\n}\r\n\r\n.monaco-editor .codelens-decoration.fadein {\r\n\tanimation: fadein 0.1s linear;\r\n}\r\n","",{version:3,sources:["webpack://./node_modules/monaco-editor/esm/vs/editor/contrib/codelens/codelensWidget.css"],names:[],mappings:"AAAA;;;+FAG+F;;AAE/F;CACC,gBAAgB;CAChB,qBAAqB;CACrB,uBAAuB;CACvB,mBAAmB;AACpB;;AAEA;;CAEC,iBAAiB;CACjB,yBAAyB;CACzB,qBAAqB;CACrB,mBAAmB;CACnB,mBAAmB;AACpB;;AAEA;CACC,qBAAqB;AACtB;;AAEA;CACC,eAAe;AAChB;;AAEA;CACC,sBAAsB;CACtB,8BAA8B;AAC/B;;AAEA;CACC,eAAe;AAChB;;AAEA;CACC,KAAK,UAAU,EAAE,mBAAmB,CAAC;CACrC,OAAO,UAAU,EAAE;AACpB;;AAEA;CACC,6BAA6B;AAC9B",sourcesContent:["/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n.monaco-editor .codelens-decoration {\r\n\toverflow: hidden;\r\n\tdisplay: inline-block;\r\n\ttext-overflow: ellipsis;\r\n\twhite-space: nowrap;\r\n}\r\n\r\n.monaco-editor .codelens-decoration > span,\r\n.monaco-editor .codelens-decoration > a {\r\n\tuser-select: none;\r\n\t-webkit-user-select: none;\r\n\t-ms-user-select: none;\r\n\twhite-space: nowrap;\r\n\tvertical-align: sub;\r\n}\r\n\r\n.monaco-editor .codelens-decoration > a {\r\n\ttext-decoration: none;\r\n}\r\n\r\n.monaco-editor .codelens-decoration > a:hover {\r\n\tcursor: pointer;\r\n}\r\n\r\n.monaco-editor .codelens-decoration .codicon {\r\n\tvertical-align: middle;\r\n\tcolor: currentColor !important;\r\n}\r\n\r\n.monaco-editor .codelens-decoration > a:hover .codicon::before {\r\n\tcursor: pointer;\r\n}\r\n\r\n@keyframes fadein {\r\n\t0% { opacity: 0; visibility: visible;}\r\n\t100% { opacity: 1; }\r\n}\r\n\r\n.monaco-editor .codelens-decoration.fadein {\r\n\tanimation: fadein 0.1s linear;\r\n}\r\n"],sourceRoot:""}]);const a=s},6562:(e,t,n)=>{"use strict";n.d(t,{Z:()=>u});var i=n(7537),o=n.n(i),r=n(3645),s=n.n(r),a=n(1667),l=n.n(a),d=new URL(n(4748),n.b),c=s()(o()),h=l()(d);c.push([e.id,"/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n.colorpicker-widget {\r\n\theight: 190px;\r\n\tuser-select: none;\r\n\t-webkit-user-select: none;\r\n\t-ms-user-select: none;\r\n}\r\n\r\n.monaco-editor .colorpicker-hover:focus {\r\n\toutline: none;\r\n}\r\n\r\n\r\n/* Header */\r\n\r\n.colorpicker-header {\r\n\tdisplay: flex;\r\n\theight: 24px;\r\n\tposition: relative;\r\n\tbackground: url("+h+");\r\n\tbackground-size: 9px 9px;\r\n\timage-rendering: pixelated;\r\n}\r\n\r\n.colorpicker-header .picked-color {\r\n\twidth: 216px;\r\n\ttext-align: center;\r\n\tline-height: 24px;\r\n\tcursor: pointer;\r\n\tcolor: white;\r\n\tflex: 1;\r\n\ttext-align: center;\r\n}\r\n\r\n.colorpicker-header .picked-color.light {\r\n\tcolor: black;\r\n}\r\n\r\n.colorpicker-header .original-color {\r\n\twidth: 74px;\r\n\tz-index: inherit;\r\n\tcursor: pointer;\r\n}\r\n\r\n\r\n/* Body */\r\n\r\n.colorpicker-body {\r\n\tdisplay: flex;\r\n\tpadding: 8px;\r\n\tposition: relative;\r\n}\r\n\r\n.colorpicker-body .saturation-wrap {\r\n\toverflow: hidden;\r\n\theight: 150px;\r\n\tposition: relative;\r\n\tmin-width: 220px;\r\n\tflex: 1;\r\n}\r\n\r\n.colorpicker-body .saturation-box {\r\n\theight: 150px;\r\n\tposition: absolute;\r\n}\r\n\r\n.colorpicker-body .saturation-selection {\r\n\twidth: 9px;\r\n\theight: 9px;\r\n\tmargin: -5px 0 0 -5px;\r\n\tborder: 1px solid rgb(255, 255, 255);\r\n\tborder-radius: 100%;\r\n\tbox-shadow: 0px 0px 2px rgba(0, 0, 0, 0.8);\r\n\tposition: absolute;\r\n}\r\n\r\n.colorpicker-body .strip {\r\n\twidth: 25px;\r\n\theight: 150px;\r\n}\r\n\r\n.colorpicker-body .hue-strip {\r\n\tposition: relative;\r\n\tmargin-left: 8px;\r\n\tcursor: grab;\r\n\tbackground: linear-gradient(to bottom, #ff0000 0%, #ffff00 17%, #00ff00 33%, #00ffff 50%, #0000ff 67%, #ff00ff 83%, #ff0000 100%);\r\n}\r\n\r\n.colorpicker-body .opacity-strip {\r\n\tposition: relative;\r\n\tmargin-left: 8px;\r\n\tcursor: grab;\r\n\tbackground: url("+h+");\r\n\tbackground-size: 9px 9px;\r\n\timage-rendering: pixelated;\r\n}\r\n\r\n.colorpicker-body .strip.grabbing {\r\n\tcursor: grabbing;\r\n}\r\n\r\n.colorpicker-body .slider {\r\n\tposition: absolute;\r\n\ttop: 0;\r\n\tleft: -2px;\r\n\twidth: calc(100% + 4px);\r\n\theight: 4px;\r\n\tbox-sizing: border-box;\r\n\tborder: 1px solid rgba(255, 255, 255, 0.71);\r\n\tbox-shadow: 0px 0px 1px rgba(0, 0, 0, 0.85);\r\n}\r\n\r\n.colorpicker-body .strip .overlay {\r\n\theight: 150px;\r\n\tpointer-events: none;\r\n}\r\n","",{version:3,sources:["webpack://./node_modules/monaco-editor/esm/vs/editor/contrib/colorPicker/colorPicker.css"],names:[],mappings:"AAAA;;;+FAG+F;;AAE/F;CACC,aAAa;CACb,iBAAiB;CACjB,yBAAyB;CACzB,qBAAqB;AACtB;;AAEA;CACC,aAAa;AACd;;;AAGA,WAAW;;AAEX;CACC,aAAa;CACb,YAAY;CACZ,kBAAkB;CAClB,mDAAiR;CACjR,wBAAwB;CACxB,0BAA0B;AAC3B;;AAEA;CACC,YAAY;CACZ,kBAAkB;CAClB,iBAAiB;CACjB,eAAe;CACf,YAAY;CACZ,OAAO;CACP,kBAAkB;AACnB;;AAEA;CACC,YAAY;AACb;;AAEA;CACC,WAAW;CACX,gBAAgB;CAChB,eAAe;AAChB;;;AAGA,SAAS;;AAET;CACC,aAAa;CACb,YAAY;CACZ,kBAAkB;AACnB;;AAEA;CACC,gBAAgB;CAChB,aAAa;CACb,kBAAkB;CAClB,gBAAgB;CAChB,OAAO;AACR;;AAEA;CACC,aAAa;CACb,kBAAkB;AACnB;;AAEA;CACC,UAAU;CACV,WAAW;CACX,qBAAqB;CACrB,oCAAoC;CACpC,mBAAmB;CACnB,0CAA0C;CAC1C,kBAAkB;AACnB;;AAEA;CACC,WAAW;CACX,aAAa;AACd;;AAEA;CACC,kBAAkB;CAClB,gBAAgB;CAChB,YAAY;CACZ,iIAAiI;AAClI;;AAEA;CACC,kBAAkB;CAClB,gBAAgB;CAChB,YAAY;CACZ,mDAAiR;CACjR,wBAAwB;CACxB,0BAA0B;AAC3B;;AAEA;CACC,gBAAgB;AACjB;;AAEA;CACC,kBAAkB;CAClB,MAAM;CACN,UAAU;CACV,uBAAuB;CACvB,WAAW;CACX,sBAAsB;CACtB,2CAA2C;CAC3C,2CAA2C;AAC5C;;AAEA;CACC,aAAa;CACb,oBAAoB;AACrB",sourcesContent:['/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n.colorpicker-widget {\r\n\theight: 190px;\r\n\tuser-select: none;\r\n\t-webkit-user-select: none;\r\n\t-ms-user-select: none;\r\n}\r\n\r\n.monaco-editor .colorpicker-hover:focus {\r\n\toutline: none;\r\n}\r\n\r\n\r\n/* Header */\r\n\r\n.colorpicker-header {\r\n\tdisplay: flex;\r\n\theight: 24px;\r\n\tposition: relative;\r\n\tbackground: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAQAAAAECAYAAACp8Z5+AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAAZdEVYdFNvZnR3YXJlAHBhaW50Lm5ldCA0LjAuMTZEaa/1AAAAHUlEQVQYV2PYvXu3JAi7uLiAMaYAjAGTQBPYLQkAa/0Zef3qRswAAAAASUVORK5CYII=");\r\n\tbackground-size: 9px 9px;\r\n\timage-rendering: pixelated;\r\n}\r\n\r\n.colorpicker-header .picked-color {\r\n\twidth: 216px;\r\n\ttext-align: center;\r\n\tline-height: 24px;\r\n\tcursor: pointer;\r\n\tcolor: white;\r\n\tflex: 1;\r\n\ttext-align: center;\r\n}\r\n\r\n.colorpicker-header .picked-color.light {\r\n\tcolor: black;\r\n}\r\n\r\n.colorpicker-header .original-color {\r\n\twidth: 74px;\r\n\tz-index: inherit;\r\n\tcursor: pointer;\r\n}\r\n\r\n\r\n/* Body */\r\n\r\n.colorpicker-body {\r\n\tdisplay: flex;\r\n\tpadding: 8px;\r\n\tposition: relative;\r\n}\r\n\r\n.colorpicker-body .saturation-wrap {\r\n\toverflow: hidden;\r\n\theight: 150px;\r\n\tposition: relative;\r\n\tmin-width: 220px;\r\n\tflex: 1;\r\n}\r\n\r\n.colorpicker-body .saturation-box {\r\n\theight: 150px;\r\n\tposition: absolute;\r\n}\r\n\r\n.colorpicker-body .saturation-selection {\r\n\twidth: 9px;\r\n\theight: 9px;\r\n\tmargin: -5px 0 0 -5px;\r\n\tborder: 1px solid rgb(255, 255, 255);\r\n\tborder-radius: 100%;\r\n\tbox-shadow: 0px 0px 2px rgba(0, 0, 0, 0.8);\r\n\tposition: absolute;\r\n}\r\n\r\n.colorpicker-body .strip {\r\n\twidth: 25px;\r\n\theight: 150px;\r\n}\r\n\r\n.colorpicker-body .hue-strip {\r\n\tposition: relative;\r\n\tmargin-left: 8px;\r\n\tcursor: grab;\r\n\tbackground: linear-gradient(to bottom, #ff0000 0%, #ffff00 17%, #00ff00 33%, #00ffff 50%, #0000ff 67%, #ff00ff 83%, #ff0000 100%);\r\n}\r\n\r\n.colorpicker-body .opacity-strip {\r\n\tposition: relative;\r\n\tmargin-left: 8px;\r\n\tcursor: grab;\r\n\tbackground: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAQAAAAECAYAAACp8Z5+AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAAZdEVYdFNvZnR3YXJlAHBhaW50Lm5ldCA0LjAuMTZEaa/1AAAAHUlEQVQYV2PYvXu3JAi7uLiAMaYAjAGTQBPYLQkAa/0Zef3qRswAAAAASUVORK5CYII=");\r\n\tbackground-size: 9px 9px;\r\n\timage-rendering: pixelated;\r\n}\r\n\r\n.colorpicker-body .strip.grabbing {\r\n\tcursor: grabbing;\r\n}\r\n\r\n.colorpicker-body .slider {\r\n\tposition: absolute;\r\n\ttop: 0;\r\n\tleft: -2px;\r\n\twidth: calc(100% + 4px);\r\n\theight: 4px;\r\n\tbox-sizing: border-box;\r\n\tborder: 1px solid rgba(255, 255, 255, 0.71);\r\n\tbox-shadow: 0px 0px 1px rgba(0, 0, 0, 0.85);\r\n}\r\n\r\n.colorpicker-body .strip .overlay {\r\n\theight: 150px;\r\n\tpointer-events: none;\r\n}\r\n'],sourceRoot:""}]);const u=c},9100:(e,t,n)=>{"use strict";n.d(t,{Z:()=>a});var i=n(7537),o=n.n(i),r=n(3645),s=n.n(r)()(o());s.push([e.id,"/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n.monaco-editor.vs .dnd-target {\r\n\tborder-right: 2px dotted black;\r\n\tcolor: white; /* opposite of black */\r\n}\r\n.monaco-editor.vs-dark .dnd-target {\r\n\tborder-right: 2px dotted #AEAFAD;\r\n\tcolor: #51504f; /* opposite of #AEAFAD */\r\n}\r\n.monaco-editor.hc-black .dnd-target {\r\n\tborder-right: 2px dotted #fff;\r\n\tcolor: #000; /* opposite of #fff */\r\n}\r\n\r\n.monaco-editor.mouse-default .view-lines,\r\n.monaco-editor.vs-dark.mac.mouse-default .view-lines,\r\n.monaco-editor.hc-black.mac.mouse-default .view-lines {\r\n\tcursor: default;\r\n}\r\n.monaco-editor.mouse-copy .view-lines,\r\n.monaco-editor.vs-dark.mac.mouse-copy .view-lines,\r\n.monaco-editor.hc-black.mac.mouse-copy .view-lines {\r\n\tcursor: copy;\r\n}","",{version:3,sources:["webpack://./node_modules/monaco-editor/esm/vs/editor/contrib/dnd/dnd.css"],names:[],mappings:"AAAA;;;+FAG+F;;AAE/F;CACC,8BAA8B;CAC9B,YAAY,EAAE,sBAAsB;AACrC;AACA;CACC,gCAAgC;CAChC,cAAc,EAAE,wBAAwB;AACzC;AACA;CACC,6BAA6B;CAC7B,WAAW,EAAE,qBAAqB;AACnC;;AAEA;;;CAGC,eAAe;AAChB;AACA;;;CAGC,YAAY;AACb",sourcesContent:["/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n.monaco-editor.vs .dnd-target {\r\n\tborder-right: 2px dotted black;\r\n\tcolor: white; /* opposite of black */\r\n}\r\n.monaco-editor.vs-dark .dnd-target {\r\n\tborder-right: 2px dotted #AEAFAD;\r\n\tcolor: #51504f; /* opposite of #AEAFAD */\r\n}\r\n.monaco-editor.hc-black .dnd-target {\r\n\tborder-right: 2px dotted #fff;\r\n\tcolor: #000; /* opposite of #fff */\r\n}\r\n\r\n.monaco-editor.mouse-default .view-lines,\r\n.monaco-editor.vs-dark.mac.mouse-default .view-lines,\r\n.monaco-editor.hc-black.mac.mouse-default .view-lines {\r\n\tcursor: default;\r\n}\r\n.monaco-editor.mouse-copy .view-lines,\r\n.monaco-editor.vs-dark.mac.mouse-copy .view-lines,\r\n.monaco-editor.hc-black.mac.mouse-copy .view-lines {\r\n\tcursor: copy;\r\n}"],sourceRoot:""}]);const a=s},5160:(e,t,n)=>{"use strict";n.d(t,{Z:()=>a});var i=n(7537),o=n.n(i),r=n(3645),s=n.n(r)()(o());s.push([e.id,"/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n/* Find widget */\r\n.monaco-editor .find-widget {\r\n\tposition: absolute;\r\n\tz-index: 35;\r\n\theight: 33px;\r\n\toverflow: hidden;\r\n\tline-height: 19px;\r\n\ttransition: transform 200ms linear;\r\n\tpadding: 0 4px;\r\n\tbox-sizing: border-box;\r\n\ttransform: translateY(calc(-100% - 10px)); /* shadow (10px) */\r\n}\r\n\r\n.monaco-editor .find-widget textarea {\r\n\tmargin: 0px;\r\n}\r\n\r\n.monaco-editor .find-widget.hiddenEditor {\r\n\tdisplay: none;\r\n}\r\n\r\n/* Find widget when replace is toggled on */\r\n.monaco-editor .find-widget.replaceToggled > .replace-part {\r\n\tdisplay: flex;\r\n}\r\n\r\n.monaco-editor .find-widget.visible {\r\n\ttransform: translateY(0);\r\n}\r\n\r\n.monaco-editor .find-widget .monaco-inputbox.synthetic-focus {\r\n\toutline: 1px solid -webkit-focus-ring-color;\r\n\toutline-offset: -1px;\r\n}\r\n\r\n.monaco-editor .find-widget .monaco-inputbox .input {\r\n\tbackground-color: transparent;\r\n\tmin-height: 0;\r\n}\r\n\r\n.monaco-editor .find-widget .monaco-findInput .input {\r\n\tfont-size: 13px;\r\n}\r\n\r\n.monaco-editor .find-widget > .find-part,\r\n.monaco-editor .find-widget > .replace-part {\r\n\tmargin: 4px 0 0 17px;\r\n\tfont-size: 12px;\r\n\tdisplay: flex;\r\n}\r\n\r\n.monaco-editor .find-widget > .find-part .monaco-inputbox,\r\n.monaco-editor .find-widget > .replace-part .monaco-inputbox {\r\n\tmin-height: 25px;\r\n}\r\n\r\n\r\n.monaco-editor .find-widget > .replace-part .monaco-inputbox > .ibwrapper > .mirror {\r\n\tpadding-right: 22px;\r\n}\r\n\r\n.monaco-editor .find-widget > .find-part .monaco-inputbox > .ibwrapper > .input,\r\n.monaco-editor .find-widget > .find-part .monaco-inputbox > .ibwrapper > .mirror,\r\n.monaco-editor .find-widget > .replace-part .monaco-inputbox > .ibwrapper > .input,\r\n.monaco-editor .find-widget > .replace-part .monaco-inputbox > .ibwrapper > .mirror {\r\n\tpadding-top: 2px;\r\n\tpadding-bottom: 2px;\r\n}\r\n\r\n.monaco-editor .find-widget > .find-part .find-actions {\r\n\theight: 25px;\r\n\tdisplay: flex;\r\n\talign-items: center;\r\n}\r\n\r\n.monaco-editor .find-widget > .replace-part .replace-actions {\r\n\theight: 25px;\r\n\tdisplay: flex;\r\n\talign-items: center;\r\n}\r\n\r\n.monaco-editor .find-widget .monaco-findInput {\r\n\tvertical-align: middle;\r\n\tdisplay: flex;\r\n\tflex:1;\r\n}\r\n\r\n.monaco-editor .find-widget .monaco-findInput .monaco-scrollable-element {\r\n\t/* Make sure textarea inherits the width correctly */\r\n\twidth: 100%;\r\n}\r\n\r\n.monaco-editor .find-widget .monaco-findInput .monaco-scrollable-element .scrollbar.vertical {\r\n\t/* Hide vertical scrollbar */\r\n\topacity: 0;\r\n}\r\n\r\n.monaco-editor .find-widget .matchesCount {\r\n\tdisplay: flex;\r\n\tflex: initial;\r\n\tmargin: 0 0 0 3px;\r\n\tpadding: 2px 0 0 2px;\r\n\theight: 25px;\r\n\tvertical-align: middle;\r\n\tbox-sizing: border-box;\r\n\ttext-align: center;\r\n\tline-height: 23px;\r\n}\r\n\r\n.monaco-editor .find-widget .button {\r\n\twidth: 20px;\r\n\theight: 20px;\r\n\tdisplay: flex;\r\n\tflex: initial;\r\n\tmargin-left: 3px;\r\n\tbackground-position: center center;\r\n\tbackground-repeat: no-repeat;\r\n\tcursor: pointer;\r\n\tdisplay: flex;\r\n\talign-items: center;\r\n\tjustify-content: center;\r\n}\r\n\r\n.monaco-editor .find-widget .button.left {\r\n\tmargin-left: 0;\r\n\tmargin-right: 3px;\r\n}\r\n\r\n.monaco-editor .find-widget .button.wide {\r\n\twidth: auto;\r\n\tpadding: 1px 6px;\r\n\ttop: -1px;\r\n}\r\n\r\n.monaco-editor .find-widget .button.toggle {\r\n\tposition: absolute;\r\n\ttop: 0;\r\n\tleft: 3px;\r\n\twidth: 18px;\r\n\theight: 100%;\r\n\tbox-sizing: border-box;\r\n}\r\n\r\n.monaco-editor .find-widget .button.toggle.disabled {\r\n\tdisplay: none;\r\n}\r\n\r\n.monaco-editor .find-widget .disabled {\r\n\topacity: 0.3;\r\n\tcursor: default;\r\n}\r\n\r\n.monaco-editor .find-widget > .replace-part {\r\n\tdisplay: none;\r\n}\r\n\r\n.monaco-editor .find-widget > .replace-part > .monaco-findInput {\r\n\tposition: relative;\r\n\tdisplay: flex;\r\n\tvertical-align: middle;\r\n\tflex: auto;\r\n\tflex-grow: 0;\r\n\tflex-shrink: 0;\r\n}\r\n\r\n.monaco-editor .find-widget > .replace-part > .monaco-findInput > .controls {\r\n\tposition: absolute;\r\n\ttop: 3px;\r\n\tright: 2px;\r\n}\r\n\r\n/* REDUCED */\r\n.monaco-editor .find-widget.reduced-find-widget .matchesCount {\r\n\tdisplay:none;\r\n}\r\n\r\n/* NARROW (SMALLER THAN REDUCED) */\r\n.monaco-editor .find-widget.narrow-find-widget {\r\n\tmax-width: 257px !important;\r\n}\r\n\r\n/* COLLAPSED (SMALLER THAN NARROW) */\r\n.monaco-editor .find-widget.collapsed-find-widget {\r\n\tmax-width: 170px !important;\r\n}\r\n\r\n.monaco-editor .find-widget.collapsed-find-widget .button.previous,\r\n.monaco-editor .find-widget.collapsed-find-widget .button.next,\r\n.monaco-editor .find-widget.collapsed-find-widget .button.replace,\r\n.monaco-editor .find-widget.collapsed-find-widget .button.replace-all,\r\n.monaco-editor .find-widget.collapsed-find-widget > .find-part .monaco-findInput .controls {\r\n\tdisplay:none;\r\n}\r\n\r\n.monaco-editor .findMatch {\r\n\tanimation-duration: 0;\r\n\tanimation-name: inherit !important;\r\n}\r\n\r\n.monaco-editor .find-widget .monaco-sash {\r\n\tleft: 0 !important;\r\n}\r\n\r\n.monaco-editor.hc-black .find-widget .button:before {\r\n\tposition: relative;\r\n\ttop: 1px;\r\n\tleft: 2px;\r\n}\r\n","",{version:3,sources:["webpack://./node_modules/monaco-editor/esm/vs/editor/contrib/find/findWidget.css"],names:[],mappings:"AAAA;;;+FAG+F;;AAE/F,gBAAgB;AAChB;CACC,kBAAkB;CAClB,WAAW;CACX,YAAY;CACZ,gBAAgB;CAChB,iBAAiB;CACjB,kCAAkC;CAClC,cAAc;CACd,sBAAsB;CACtB,yCAAyC,EAAE,kBAAkB;AAC9D;;AAEA;CACC,WAAW;AACZ;;AAEA;CACC,aAAa;AACd;;AAEA,2CAA2C;AAC3C;CACC,aAAa;AACd;;AAEA;CACC,wBAAwB;AACzB;;AAEA;CACC,2CAA2C;CAC3C,oBAAoB;AACrB;;AAEA;CACC,6BAA6B;CAC7B,aAAa;AACd;;AAEA;CACC,eAAe;AAChB;;AAEA;;CAEC,oBAAoB;CACpB,eAAe;CACf,aAAa;AACd;;AAEA;;CAEC,gBAAgB;AACjB;;;AAGA;CACC,mBAAmB;AACpB;;AAEA;;;;CAIC,gBAAgB;CAChB,mBAAmB;AACpB;;AAEA;CACC,YAAY;CACZ,aAAa;CACb,mBAAmB;AACpB;;AAEA;CACC,YAAY;CACZ,aAAa;CACb,mBAAmB;AACpB;;AAEA;CACC,sBAAsB;CACtB,aAAa;CACb,MAAM;AACP;;AAEA;CACC,oDAAoD;CACpD,WAAW;AACZ;;AAEA;CACC,4BAA4B;CAC5B,UAAU;AACX;;AAEA;CACC,aAAa;CACb,aAAa;CACb,iBAAiB;CACjB,oBAAoB;CACpB,YAAY;CACZ,sBAAsB;CACtB,sBAAsB;CACtB,kBAAkB;CAClB,iBAAiB;AAClB;;AAEA;CACC,WAAW;CACX,YAAY;CACZ,aAAa;CACb,aAAa;CACb,gBAAgB;CAChB,kCAAkC;CAClC,4BAA4B;CAC5B,eAAe;CACf,aAAa;CACb,mBAAmB;CACnB,uBAAuB;AACxB;;AAEA;CACC,cAAc;CACd,iBAAiB;AAClB;;AAEA;CACC,WAAW;CACX,gBAAgB;CAChB,SAAS;AACV;;AAEA;CACC,kBAAkB;CAClB,MAAM;CACN,SAAS;CACT,WAAW;CACX,YAAY;CACZ,sBAAsB;AACvB;;AAEA;CACC,aAAa;AACd;;AAEA;CACC,YAAY;CACZ,eAAe;AAChB;;AAEA;CACC,aAAa;AACd;;AAEA;CACC,kBAAkB;CAClB,aAAa;CACb,sBAAsB;CACtB,UAAU;CACV,YAAY;CACZ,cAAc;AACf;;AAEA;CACC,kBAAkB;CAClB,QAAQ;CACR,UAAU;AACX;;AAEA,YAAY;AACZ;CACC,YAAY;AACb;;AAEA,kCAAkC;AAClC;CACC,2BAA2B;AAC5B;;AAEA,oCAAoC;AACpC;CACC,2BAA2B;AAC5B;;AAEA;;;;;CAKC,YAAY;AACb;;AAEA;CACC,qBAAqB;CACrB,kCAAkC;AACnC;;AAEA;CACC,kBAAkB;AACnB;;AAEA;CACC,kBAAkB;CAClB,QAAQ;CACR,SAAS;AACV",sourcesContent:["/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n/* Find widget */\r\n.monaco-editor .find-widget {\r\n\tposition: absolute;\r\n\tz-index: 35;\r\n\theight: 33px;\r\n\toverflow: hidden;\r\n\tline-height: 19px;\r\n\ttransition: transform 200ms linear;\r\n\tpadding: 0 4px;\r\n\tbox-sizing: border-box;\r\n\ttransform: translateY(calc(-100% - 10px)); /* shadow (10px) */\r\n}\r\n\r\n.monaco-editor .find-widget textarea {\r\n\tmargin: 0px;\r\n}\r\n\r\n.monaco-editor .find-widget.hiddenEditor {\r\n\tdisplay: none;\r\n}\r\n\r\n/* Find widget when replace is toggled on */\r\n.monaco-editor .find-widget.replaceToggled > .replace-part {\r\n\tdisplay: flex;\r\n}\r\n\r\n.monaco-editor .find-widget.visible {\r\n\ttransform: translateY(0);\r\n}\r\n\r\n.monaco-editor .find-widget .monaco-inputbox.synthetic-focus {\r\n\toutline: 1px solid -webkit-focus-ring-color;\r\n\toutline-offset: -1px;\r\n}\r\n\r\n.monaco-editor .find-widget .monaco-inputbox .input {\r\n\tbackground-color: transparent;\r\n\tmin-height: 0;\r\n}\r\n\r\n.monaco-editor .find-widget .monaco-findInput .input {\r\n\tfont-size: 13px;\r\n}\r\n\r\n.monaco-editor .find-widget > .find-part,\r\n.monaco-editor .find-widget > .replace-part {\r\n\tmargin: 4px 0 0 17px;\r\n\tfont-size: 12px;\r\n\tdisplay: flex;\r\n}\r\n\r\n.monaco-editor .find-widget > .find-part .monaco-inputbox,\r\n.monaco-editor .find-widget > .replace-part .monaco-inputbox {\r\n\tmin-height: 25px;\r\n}\r\n\r\n\r\n.monaco-editor .find-widget > .replace-part .monaco-inputbox > .ibwrapper > .mirror {\r\n\tpadding-right: 22px;\r\n}\r\n\r\n.monaco-editor .find-widget > .find-part .monaco-inputbox > .ibwrapper > .input,\r\n.monaco-editor .find-widget > .find-part .monaco-inputbox > .ibwrapper > .mirror,\r\n.monaco-editor .find-widget > .replace-part .monaco-inputbox > .ibwrapper > .input,\r\n.monaco-editor .find-widget > .replace-part .monaco-inputbox > .ibwrapper > .mirror {\r\n\tpadding-top: 2px;\r\n\tpadding-bottom: 2px;\r\n}\r\n\r\n.monaco-editor .find-widget > .find-part .find-actions {\r\n\theight: 25px;\r\n\tdisplay: flex;\r\n\talign-items: center;\r\n}\r\n\r\n.monaco-editor .find-widget > .replace-part .replace-actions {\r\n\theight: 25px;\r\n\tdisplay: flex;\r\n\talign-items: center;\r\n}\r\n\r\n.monaco-editor .find-widget .monaco-findInput {\r\n\tvertical-align: middle;\r\n\tdisplay: flex;\r\n\tflex:1;\r\n}\r\n\r\n.monaco-editor .find-widget .monaco-findInput .monaco-scrollable-element {\r\n\t/* Make sure textarea inherits the width correctly */\r\n\twidth: 100%;\r\n}\r\n\r\n.monaco-editor .find-widget .monaco-findInput .monaco-scrollable-element .scrollbar.vertical {\r\n\t/* Hide vertical scrollbar */\r\n\topacity: 0;\r\n}\r\n\r\n.monaco-editor .find-widget .matchesCount {\r\n\tdisplay: flex;\r\n\tflex: initial;\r\n\tmargin: 0 0 0 3px;\r\n\tpadding: 2px 0 0 2px;\r\n\theight: 25px;\r\n\tvertical-align: middle;\r\n\tbox-sizing: border-box;\r\n\ttext-align: center;\r\n\tline-height: 23px;\r\n}\r\n\r\n.monaco-editor .find-widget .button {\r\n\twidth: 20px;\r\n\theight: 20px;\r\n\tdisplay: flex;\r\n\tflex: initial;\r\n\tmargin-left: 3px;\r\n\tbackground-position: center center;\r\n\tbackground-repeat: no-repeat;\r\n\tcursor: pointer;\r\n\tdisplay: flex;\r\n\talign-items: center;\r\n\tjustify-content: center;\r\n}\r\n\r\n.monaco-editor .find-widget .button.left {\r\n\tmargin-left: 0;\r\n\tmargin-right: 3px;\r\n}\r\n\r\n.monaco-editor .find-widget .button.wide {\r\n\twidth: auto;\r\n\tpadding: 1px 6px;\r\n\ttop: -1px;\r\n}\r\n\r\n.monaco-editor .find-widget .button.toggle {\r\n\tposition: absolute;\r\n\ttop: 0;\r\n\tleft: 3px;\r\n\twidth: 18px;\r\n\theight: 100%;\r\n\tbox-sizing: border-box;\r\n}\r\n\r\n.monaco-editor .find-widget .button.toggle.disabled {\r\n\tdisplay: none;\r\n}\r\n\r\n.monaco-editor .find-widget .disabled {\r\n\topacity: 0.3;\r\n\tcursor: default;\r\n}\r\n\r\n.monaco-editor .find-widget > .replace-part {\r\n\tdisplay: none;\r\n}\r\n\r\n.monaco-editor .find-widget > .replace-part > .monaco-findInput {\r\n\tposition: relative;\r\n\tdisplay: flex;\r\n\tvertical-align: middle;\r\n\tflex: auto;\r\n\tflex-grow: 0;\r\n\tflex-shrink: 0;\r\n}\r\n\r\n.monaco-editor .find-widget > .replace-part > .monaco-findInput > .controls {\r\n\tposition: absolute;\r\n\ttop: 3px;\r\n\tright: 2px;\r\n}\r\n\r\n/* REDUCED */\r\n.monaco-editor .find-widget.reduced-find-widget .matchesCount {\r\n\tdisplay:none;\r\n}\r\n\r\n/* NARROW (SMALLER THAN REDUCED) */\r\n.monaco-editor .find-widget.narrow-find-widget {\r\n\tmax-width: 257px !important;\r\n}\r\n\r\n/* COLLAPSED (SMALLER THAN NARROW) */\r\n.monaco-editor .find-widget.collapsed-find-widget {\r\n\tmax-width: 170px !important;\r\n}\r\n\r\n.monaco-editor .find-widget.collapsed-find-widget .button.previous,\r\n.monaco-editor .find-widget.collapsed-find-widget .button.next,\r\n.monaco-editor .find-widget.collapsed-find-widget .button.replace,\r\n.monaco-editor .find-widget.collapsed-find-widget .button.replace-all,\r\n.monaco-editor .find-widget.collapsed-find-widget > .find-part .monaco-findInput .controls {\r\n\tdisplay:none;\r\n}\r\n\r\n.monaco-editor .findMatch {\r\n\tanimation-duration: 0;\r\n\tanimation-name: inherit !important;\r\n}\r\n\r\n.monaco-editor .find-widget .monaco-sash {\r\n\tleft: 0 !important;\r\n}\r\n\r\n.monaco-editor.hc-black .find-widget .button:before {\r\n\tposition: relative;\r\n\ttop: 1px;\r\n\tleft: 2px;\r\n}\r\n"],sourceRoot:""}]);const a=s},6977:(e,t,n)=>{"use strict";n.d(t,{Z:()=>a});var i=n(7537),o=n.n(i),r=n(3645),s=n.n(r)()(o());s.push([e.id,'/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n.monaco-editor .margin-view-overlays .codicon-folding-expanded,\r\n.monaco-editor .margin-view-overlays .codicon-folding-collapsed {\r\n\tcursor: pointer;\r\n\topacity: 0;\r\n\ttransition: opacity 0.5s;\r\n\tdisplay: flex;\r\n\talign-items: center;\r\n\tjustify-content: center;\r\n\tfont-size: 140%;\r\n\tmargin-left: 2px;\r\n}\r\n\r\n.monaco-editor .margin-view-overlays:hover .codicon,\r\n.monaco-editor .margin-view-overlays .codicon.codicon-folding-collapsed,\r\n.monaco-editor .margin-view-overlays .codicon.alwaysShowFoldIcons {\r\n\topacity: 1;\r\n}\r\n\r\n.monaco-editor .inline-folded:after {\r\n\tcolor: grey;\r\n\tmargin: 0.1em 0.2em 0 0.2em;\r\n\tcontent: "⋯";\r\n\tdisplay: inline;\r\n\tline-height: 1em;\r\n\tcursor: pointer;\r\n}\r\n',"",{version:3,sources:["webpack://./node_modules/monaco-editor/esm/vs/editor/contrib/folding/folding.css"],names:[],mappings:"AAAA;;;+FAG+F;;AAE/F;;CAEC,eAAe;CACf,UAAU;CACV,wBAAwB;CACxB,aAAa;CACb,mBAAmB;CACnB,uBAAuB;CACvB,eAAe;CACf,gBAAgB;AACjB;;AAEA;;;CAGC,UAAU;AACX;;AAEA;CACC,WAAW;CACX,2BAA2B;CAC3B,YAAY;CACZ,eAAe;CACf,gBAAgB;CAChB,eAAe;AAChB",sourcesContent:['/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n.monaco-editor .margin-view-overlays .codicon-folding-expanded,\r\n.monaco-editor .margin-view-overlays .codicon-folding-collapsed {\r\n\tcursor: pointer;\r\n\topacity: 0;\r\n\ttransition: opacity 0.5s;\r\n\tdisplay: flex;\r\n\talign-items: center;\r\n\tjustify-content: center;\r\n\tfont-size: 140%;\r\n\tmargin-left: 2px;\r\n}\r\n\r\n.monaco-editor .margin-view-overlays:hover .codicon,\r\n.monaco-editor .margin-view-overlays .codicon.codicon-folding-collapsed,\r\n.monaco-editor .margin-view-overlays .codicon.alwaysShowFoldIcons {\r\n\topacity: 1;\r\n}\r\n\r\n.monaco-editor .inline-folded:after {\r\n\tcolor: grey;\r\n\tmargin: 0.1em 0.2em 0 0.2em;\r\n\tcontent: "⋯";\r\n\tdisplay: inline;\r\n\tline-height: 1em;\r\n\tcursor: pointer;\r\n}\r\n'],sourceRoot:""}]);const a=s},8994:(e,t,n)=>{"use strict";n.d(t,{Z:()=>a});var i=n(7537),o=n.n(i),r=n(3645),s=n.n(r)()(o());s.push([e.id,"/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n/* marker zone */\r\n\r\n.monaco-editor .peekview-widget .head .peekview-title .severity-icon {\r\n\tdisplay: inline-block;\r\n\tvertical-align: text-top;\r\n\tmargin-right: 4px;\r\n}\r\n\r\n.monaco-editor .marker-widget {\r\n\ttext-overflow: ellipsis;\r\n\twhite-space: nowrap;\r\n}\r\n\r\n.monaco-editor .marker-widget > .stale {\r\n\topacity: 0.6;\r\n\tfont-style: italic;\r\n}\r\n\r\n.monaco-editor .marker-widget .title {\r\n\tdisplay: inline-block;\r\n\tpadding-right: 5px;\r\n}\r\n\r\n.monaco-editor .marker-widget .descriptioncontainer {\r\n\tposition: absolute;\r\n\twhite-space: pre;\r\n\tuser-select: text;\r\n\t-webkit-user-select: text;\r\n\t-ms-user-select: text;\r\n\tpadding: 8px 12px 0 20px;\r\n}\r\n\r\n.monaco-editor .marker-widget .descriptioncontainer .message {\r\n\tdisplay: flex;\r\n\tflex-direction: column;\r\n}\r\n\r\n.monaco-editor .marker-widget .descriptioncontainer .message .details {\r\n\tpadding-left: 6px;\r\n}\r\n\r\n.monaco-editor .marker-widget .descriptioncontainer .message .source,\r\n.monaco-editor .marker-widget .descriptioncontainer .message span.code {\r\n\topacity: 0.6;\r\n}\r\n\r\n.monaco-editor .marker-widget .descriptioncontainer .message a.code-link {\r\n\topacity: 0.6;\r\n\tcolor: inherit;\r\n}\r\n\r\n.monaco-editor .marker-widget .descriptioncontainer .message a.code-link:before {\r\n\tcontent: '(';\r\n}\r\n\r\n.monaco-editor .marker-widget .descriptioncontainer .message a.code-link:after {\r\n\tcontent: ')';\r\n}\r\n\r\n.monaco-editor .marker-widget .descriptioncontainer .message a.code-link > span {\r\n\ttext-decoration: underline;\r\n\t/** Hack to force underline to show **/\r\n\tborder-bottom: 1px solid transparent;\r\n\ttext-underline-position: under;\r\n}\r\n\r\n.monaco-editor .marker-widget .descriptioncontainer .filename {\r\n\tcursor: pointer;\r\n}\r\n","",{version:3,sources:["webpack://./node_modules/monaco-editor/esm/vs/editor/contrib/gotoError/media/gotoErrorWidget.css"],names:[],mappings:"AAAA;;;+FAG+F;;AAE/F,gBAAgB;;AAEhB;CACC,qBAAqB;CACrB,wBAAwB;CACxB,iBAAiB;AAClB;;AAEA;CACC,uBAAuB;CACvB,mBAAmB;AACpB;;AAEA;CACC,YAAY;CACZ,kBAAkB;AACnB;;AAEA;CACC,qBAAqB;CACrB,kBAAkB;AACnB;;AAEA;CACC,kBAAkB;CAClB,gBAAgB;CAChB,iBAAiB;CACjB,yBAAyB;CACzB,qBAAqB;CACrB,wBAAwB;AACzB;;AAEA;CACC,aAAa;CACb,sBAAsB;AACvB;;AAEA;CACC,iBAAiB;AAClB;;AAEA;;CAEC,YAAY;AACb;;AAEA;CACC,YAAY;CACZ,cAAc;AACf;;AAEA;CACC,YAAY;AACb;;AAEA;CACC,YAAY;AACb;;AAEA;CACC,0BAA0B;CAC1B,sCAAsC;CACtC,oCAAoC;CACpC,8BAA8B;AAC/B;;AAEA;CACC,eAAe;AAChB",sourcesContent:["/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n/* marker zone */\r\n\r\n.monaco-editor .peekview-widget .head .peekview-title .severity-icon {\r\n\tdisplay: inline-block;\r\n\tvertical-align: text-top;\r\n\tmargin-right: 4px;\r\n}\r\n\r\n.monaco-editor .marker-widget {\r\n\ttext-overflow: ellipsis;\r\n\twhite-space: nowrap;\r\n}\r\n\r\n.monaco-editor .marker-widget > .stale {\r\n\topacity: 0.6;\r\n\tfont-style: italic;\r\n}\r\n\r\n.monaco-editor .marker-widget .title {\r\n\tdisplay: inline-block;\r\n\tpadding-right: 5px;\r\n}\r\n\r\n.monaco-editor .marker-widget .descriptioncontainer {\r\n\tposition: absolute;\r\n\twhite-space: pre;\r\n\tuser-select: text;\r\n\t-webkit-user-select: text;\r\n\t-ms-user-select: text;\r\n\tpadding: 8px 12px 0 20px;\r\n}\r\n\r\n.monaco-editor .marker-widget .descriptioncontainer .message {\r\n\tdisplay: flex;\r\n\tflex-direction: column;\r\n}\r\n\r\n.monaco-editor .marker-widget .descriptioncontainer .message .details {\r\n\tpadding-left: 6px;\r\n}\r\n\r\n.monaco-editor .marker-widget .descriptioncontainer .message .source,\r\n.monaco-editor .marker-widget .descriptioncontainer .message span.code {\r\n\topacity: 0.6;\r\n}\r\n\r\n.monaco-editor .marker-widget .descriptioncontainer .message a.code-link {\r\n\topacity: 0.6;\r\n\tcolor: inherit;\r\n}\r\n\r\n.monaco-editor .marker-widget .descriptioncontainer .message a.code-link:before {\r\n\tcontent: '(';\r\n}\r\n\r\n.monaco-editor .marker-widget .descriptioncontainer .message a.code-link:after {\r\n\tcontent: ')';\r\n}\r\n\r\n.monaco-editor .marker-widget .descriptioncontainer .message a.code-link > span {\r\n\ttext-decoration: underline;\r\n\t/** Hack to force underline to show **/\r\n\tborder-bottom: 1px solid transparent;\r\n\ttext-underline-position: under;\r\n}\r\n\r\n.monaco-editor .marker-widget .descriptioncontainer .filename {\r\n\tcursor: pointer;\r\n}\r\n"],sourceRoot:""}]);const a=s},2760:(e,t,n)=>{"use strict";n.d(t,{Z:()=>a});var i=n(7537),o=n.n(i),r=n(3645),s=n.n(r)()(o());s.push([e.id,"/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n.monaco-editor .goto-definition-link {\r\n\ttext-decoration: underline;\r\n\tcursor: pointer;\r\n}","",{version:3,sources:["webpack://./node_modules/monaco-editor/esm/vs/editor/contrib/gotoSymbol/link/goToDefinitionAtPosition.css"],names:[],mappings:"AAAA;;;+FAG+F;;AAE/F;CACC,0BAA0B;CAC1B,eAAe;AAChB",sourcesContent:["/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n.monaco-editor .goto-definition-link {\r\n\ttext-decoration: underline;\r\n\tcursor: pointer;\r\n}"],sourceRoot:""}]);const a=s},9669:(e,t,n)=>{"use strict";n.d(t,{Z:()=>a});var i=n(7537),o=n.n(i),r=n(3645),s=n.n(r)()(o());s.push([e.id,"/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n/* -- zone widget */\r\n.monaco-editor .zone-widget .zone-widget-container.reference-zone-widget {\r\n\tborder-top-width: 1px;\r\n\tborder-bottom-width: 1px;\r\n}\r\n\r\n.monaco-editor .reference-zone-widget .inline {\r\n\tdisplay: inline-block;\r\n\tvertical-align: top;\r\n}\r\n\r\n.monaco-editor .reference-zone-widget .messages {\r\n\theight: 100%;\r\n\twidth: 100%;\r\n\ttext-align: center;\r\n\tpadding: 3em 0;\r\n}\r\n\r\n.monaco-editor .reference-zone-widget .ref-tree {\r\n\tline-height: 23px;\r\n}\r\n\r\n.monaco-editor .reference-zone-widget .ref-tree .reference {\r\n\ttext-overflow: ellipsis;\r\n\toverflow: hidden;\r\n}\r\n\r\n.monaco-editor .reference-zone-widget .ref-tree .reference-file {\r\n\tdisplay: inline-flex;\r\n\twidth: 100%;\r\n\theight: 100%;\r\n}\r\n\r\n.monaco-editor .reference-zone-widget .ref-tree .monaco-list:focus .selected .reference-file {\r\n\tcolor: inherit !important;\r\n}\r\n\r\n.monaco-editor .reference-zone-widget .ref-tree .reference-file .count {\r\n\tmargin-right: 12px;\r\n\tmargin-left: auto;\r\n}\r\n\r\n/* High Contrast Theming */\r\n\r\n.monaco-editor.hc-black .reference-zone-widget .ref-tree .reference-file {\r\n\tfont-weight: bold;\r\n}\r\n","",{version:3,sources:["webpack://./node_modules/monaco-editor/esm/vs/editor/contrib/gotoSymbol/peek/referencesWidget.css"],names:[],mappings:"AAAA;;;+FAG+F;;AAE/F,mBAAmB;AACnB;CACC,qBAAqB;CACrB,wBAAwB;AACzB;;AAEA;CACC,qBAAqB;CACrB,mBAAmB;AACpB;;AAEA;CACC,YAAY;CACZ,WAAW;CACX,kBAAkB;CAClB,cAAc;AACf;;AAEA;CACC,iBAAiB;AAClB;;AAEA;CACC,uBAAuB;CACvB,gBAAgB;AACjB;;AAEA;CACC,oBAAoB;CACpB,WAAW;CACX,YAAY;AACb;;AAEA;CACC,yBAAyB;AAC1B;;AAEA;CACC,kBAAkB;CAClB,iBAAiB;AAClB;;AAEA,0BAA0B;;AAE1B;CACC,iBAAiB;AAClB",sourcesContent:["/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n/* -- zone widget */\r\n.monaco-editor .zone-widget .zone-widget-container.reference-zone-widget {\r\n\tborder-top-width: 1px;\r\n\tborder-bottom-width: 1px;\r\n}\r\n\r\n.monaco-editor .reference-zone-widget .inline {\r\n\tdisplay: inline-block;\r\n\tvertical-align: top;\r\n}\r\n\r\n.monaco-editor .reference-zone-widget .messages {\r\n\theight: 100%;\r\n\twidth: 100%;\r\n\ttext-align: center;\r\n\tpadding: 3em 0;\r\n}\r\n\r\n.monaco-editor .reference-zone-widget .ref-tree {\r\n\tline-height: 23px;\r\n}\r\n\r\n.monaco-editor .reference-zone-widget .ref-tree .reference {\r\n\ttext-overflow: ellipsis;\r\n\toverflow: hidden;\r\n}\r\n\r\n.monaco-editor .reference-zone-widget .ref-tree .reference-file {\r\n\tdisplay: inline-flex;\r\n\twidth: 100%;\r\n\theight: 100%;\r\n}\r\n\r\n.monaco-editor .reference-zone-widget .ref-tree .monaco-list:focus .selected .reference-file {\r\n\tcolor: inherit !important;\r\n}\r\n\r\n.monaco-editor .reference-zone-widget .ref-tree .reference-file .count {\r\n\tmargin-right: 12px;\r\n\tmargin-left: auto;\r\n}\r\n\r\n/* High Contrast Theming */\r\n\r\n.monaco-editor.hc-black .reference-zone-widget .ref-tree .reference-file {\r\n\tfont-weight: bold;\r\n}\r\n"],sourceRoot:""}]);const a=s},3975:(e,t,n)=>{"use strict";n.d(t,{Z:()=>a});var i=n(7537),o=n.n(i),r=n(3645),s=n.n(r)()(o());s.push([e.id,"/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n.monaco-editor .suggest-preview-additional-widget {\r\n\twhite-space: nowrap;\r\n}\r\n\r\n.monaco-editor .suggest-preview-additional-widget .content-spacer {\r\n\tcolor: transparent;\r\n\twhite-space: pre;\r\n}\r\n\r\n.monaco-editor .suggest-preview-additional-widget .button {\r\n\tdisplay: inline-block;\r\n\tcursor: pointer;\r\n\ttext-decoration: underline;\r\n\ttext-underline-position: under;\r\n}\r\n\r\n.monaco-editor .ghost-text-hidden {\r\n\topacity: 0;\r\n\tfont-size: 0;\r\n}\r\n","",{version:3,sources:["webpack://./node_modules/monaco-editor/esm/vs/editor/contrib/inlineCompletions/ghostText.css"],names:[],mappings:"AAAA;;;+FAG+F;;AAE/F;CACC,mBAAmB;AACpB;;AAEA;CACC,kBAAkB;CAClB,gBAAgB;AACjB;;AAEA;CACC,qBAAqB;CACrB,eAAe;CACf,0BAA0B;CAC1B,8BAA8B;AAC/B;;AAEA;CACC,UAAU;CACV,YAAY;AACb",sourcesContent:["/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n.monaco-editor .suggest-preview-additional-widget {\r\n\twhite-space: nowrap;\r\n}\r\n\r\n.monaco-editor .suggest-preview-additional-widget .content-spacer {\r\n\tcolor: transparent;\r\n\twhite-space: pre;\r\n}\r\n\r\n.monaco-editor .suggest-preview-additional-widget .button {\r\n\tdisplay: inline-block;\r\n\tcursor: pointer;\r\n\ttext-decoration: underline;\r\n\ttext-underline-position: under;\r\n}\r\n\r\n.monaco-editor .ghost-text-hidden {\r\n\topacity: 0;\r\n\tfont-size: 0;\r\n}\r\n"],sourceRoot:""}]);const a=s},7854:(e,t,n)=>{"use strict";n.d(t,{Z:()=>a});var i=n(7537),o=n.n(i),r=n(3645),s=n.n(r)()(o());s.push([e.id,"/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n.monaco-editor .detected-link,\r\n.monaco-editor .detected-link-active {\r\n\ttext-decoration: underline;\r\n\ttext-underline-position: under;\r\n}\r\n\r\n.monaco-editor .detected-link-active {\r\n\tcursor: pointer;\r\n}\r\n","",{version:3,sources:["webpack://./node_modules/monaco-editor/esm/vs/editor/contrib/links/links.css"],names:[],mappings:"AAAA;;;+FAG+F;AAC/F;;CAEC,0BAA0B;CAC1B,8BAA8B;AAC/B;;AAEA;CACC,eAAe;AAChB",sourcesContent:["/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n.monaco-editor .detected-link,\r\n.monaco-editor .detected-link-active {\r\n\ttext-decoration: underline;\r\n\ttext-underline-position: under;\r\n}\r\n\r\n.monaco-editor .detected-link-active {\r\n\tcursor: pointer;\r\n}\r\n"],sourceRoot:""}]);const a=s},1356:(e,t,n)=>{"use strict";n.d(t,{Z:()=>a});var i=n(7537),o=n.n(i),r=n(3645),s=n.n(r)()(o());s.push([e.id,"/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n.monaco-editor .monaco-editor-overlaymessage {\r\n\tpadding-bottom: 8px;\r\n\tz-index: 10000;\r\n}\r\n\r\n.monaco-editor .monaco-editor-overlaymessage.below {\r\n\tpadding-bottom: 0;\r\n\tpadding-top: 8px;\r\n\tz-index: 10000;\r\n}\r\n\r\n@keyframes fadeIn {\r\n\tfrom { opacity: 0; }\r\n\tto { opacity: 1; }\r\n}\r\n.monaco-editor .monaco-editor-overlaymessage.fadeIn {\r\n\tanimation: fadeIn 150ms ease-out;\r\n}\r\n\r\n@keyframes fadeOut {\r\n\tfrom { opacity: 1; }\r\n\tto { opacity: 0; }\r\n}\r\n.monaco-editor .monaco-editor-overlaymessage.fadeOut {\r\n\tanimation: fadeOut 100ms ease-out;\r\n}\r\n\r\n.monaco-editor .monaco-editor-overlaymessage .message {\r\n\tpadding: 1px 4px;\r\n}\r\n\r\n.monaco-editor .monaco-editor-overlaymessage .anchor {\r\n\twidth: 0 !important;\r\n\theight: 0 !important;\r\n\tborder-color: transparent;\r\n\tborder-style: solid;\r\n\tz-index: 1000;\r\n\tborder-width: 8px;\r\n\tposition: absolute;\r\n}\r\n\r\n.monaco-editor .monaco-editor-overlaymessage:not(.below) .anchor.top,\r\n.monaco-editor .monaco-editor-overlaymessage.below .anchor.below {\r\n\tdisplay: none;\r\n}\r\n\r\n.monaco-editor .monaco-editor-overlaymessage.below .anchor.top {\r\n\tdisplay: inherit;\r\n\ttop: -8px;\r\n}\r\n","",{version:3,sources:["webpack://./node_modules/monaco-editor/esm/vs/editor/contrib/message/messageController.css"],names:[],mappings:"AAAA;;;+FAG+F;;AAE/F;CACC,mBAAmB;CACnB,cAAc;AACf;;AAEA;CACC,iBAAiB;CACjB,gBAAgB;CAChB,cAAc;AACf;;AAEA;CACC,OAAO,UAAU,EAAE;CACnB,KAAK,UAAU,EAAE;AAClB;AACA;CACC,gCAAgC;AACjC;;AAEA;CACC,OAAO,UAAU,EAAE;CACnB,KAAK,UAAU,EAAE;AAClB;AACA;CACC,iCAAiC;AAClC;;AAEA;CACC,gBAAgB;AACjB;;AAEA;CACC,mBAAmB;CACnB,oBAAoB;CACpB,yBAAyB;CACzB,mBAAmB;CACnB,aAAa;CACb,iBAAiB;CACjB,kBAAkB;AACnB;;AAEA;;CAEC,aAAa;AACd;;AAEA;CACC,gBAAgB;CAChB,SAAS;AACV",sourcesContent:["/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n.monaco-editor .monaco-editor-overlaymessage {\r\n\tpadding-bottom: 8px;\r\n\tz-index: 10000;\r\n}\r\n\r\n.monaco-editor .monaco-editor-overlaymessage.below {\r\n\tpadding-bottom: 0;\r\n\tpadding-top: 8px;\r\n\tz-index: 10000;\r\n}\r\n\r\n@keyframes fadeIn {\r\n\tfrom { opacity: 0; }\r\n\tto { opacity: 1; }\r\n}\r\n.monaco-editor .monaco-editor-overlaymessage.fadeIn {\r\n\tanimation: fadeIn 150ms ease-out;\r\n}\r\n\r\n@keyframes fadeOut {\r\n\tfrom { opacity: 1; }\r\n\tto { opacity: 0; }\r\n}\r\n.monaco-editor .monaco-editor-overlaymessage.fadeOut {\r\n\tanimation: fadeOut 100ms ease-out;\r\n}\r\n\r\n.monaco-editor .monaco-editor-overlaymessage .message {\r\n\tpadding: 1px 4px;\r\n}\r\n\r\n.monaco-editor .monaco-editor-overlaymessage .anchor {\r\n\twidth: 0 !important;\r\n\theight: 0 !important;\r\n\tborder-color: transparent;\r\n\tborder-style: solid;\r\n\tz-index: 1000;\r\n\tborder-width: 8px;\r\n\tposition: absolute;\r\n}\r\n\r\n.monaco-editor .monaco-editor-overlaymessage:not(.below) .anchor.top,\r\n.monaco-editor .monaco-editor-overlaymessage.below .anchor.below {\r\n\tdisplay: none;\r\n}\r\n\r\n.monaco-editor .monaco-editor-overlaymessage.below .anchor.top {\r\n\tdisplay: inherit;\r\n\ttop: -8px;\r\n}\r\n"],sourceRoot:""}]);const a=s},2265:(e,t,n)=>{"use strict";n.d(t,{Z:()=>a});var i=n(7537),o=n.n(i),r=n(3645),s=n.n(r)()(o());s.push([e.id,"/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n.monaco-editor .parameter-hints-widget {\r\n\tz-index: 10;\r\n\tdisplay: flex;\r\n\tflex-direction: column;\r\n\tline-height: 1.5em;\r\n}\r\n\r\n.monaco-editor .parameter-hints-widget > .phwrapper {\r\n\tmax-width: 440px;\r\n\tdisplay: flex;\r\n\tflex-direction: row;\r\n}\r\n\r\n.monaco-editor .parameter-hints-widget.multiple {\r\n\tmin-height: 3.3em;\r\n\tpadding: 0;\r\n}\r\n\r\n.monaco-editor .parameter-hints-widget.visible {\r\n\ttransition: left .05s ease-in-out;\r\n}\r\n\r\n.monaco-editor .parameter-hints-widget p,\r\n.monaco-editor .parameter-hints-widget ul {\r\n\tmargin: 8px 0;\r\n}\r\n\r\n.monaco-editor .parameter-hints-widget .monaco-scrollable-element,\r\n.monaco-editor .parameter-hints-widget .body {\r\n\tdisplay: flex;\r\n\tflex: 1;\r\n\tflex-direction: column;\r\n\tmin-height: 100%;\r\n}\r\n\r\n.monaco-editor .parameter-hints-widget .signature {\r\n\tpadding: 4px 5px;\r\n}\r\n\r\n.monaco-editor .parameter-hints-widget .docs {\r\n\tpadding: 0 10px 0 5px;\r\n\twhite-space: pre-wrap;\r\n}\r\n\r\n.monaco-editor .parameter-hints-widget .docs.empty {\r\n\tdisplay: none;\r\n}\r\n\r\n.monaco-editor .parameter-hints-widget .docs .markdown-docs {\r\n\twhite-space: initial;\r\n}\r\n\r\n.monaco-editor .parameter-hints-widget .docs .markdown-docs code {\r\n\tfont-family: var(--monaco-monospace-font);\r\n}\r\n\r\n.monaco-editor .parameter-hints-widget .docs .code {\r\n\twhite-space: pre-wrap;\r\n}\r\n\r\n.monaco-editor .parameter-hints-widget .docs code {\r\n\tborder-radius: 3px;\r\n\tpadding: 0 0.4em;\r\n}\r\n\r\n.monaco-editor .parameter-hints-widget .controls {\r\n\tdisplay: none;\r\n\tflex-direction: column;\r\n\talign-items: center;\r\n\tmin-width: 22px;\r\n\tjustify-content: flex-end;\r\n}\r\n\r\n.monaco-editor .parameter-hints-widget.multiple .controls {\r\n\tdisplay: flex;\r\n\tpadding: 0 2px;\r\n}\r\n\r\n.monaco-editor .parameter-hints-widget.multiple .button {\r\n\twidth: 16px;\r\n\theight: 16px;\r\n\tbackground-repeat: no-repeat;\r\n\tcursor: pointer;\r\n}\r\n\r\n.monaco-editor .parameter-hints-widget .button.previous {\r\n\tbottom: 24px;\r\n}\r\n\r\n.monaco-editor .parameter-hints-widget .overloads {\r\n\ttext-align: center;\r\n\theight: 12px;\r\n\tline-height: 12px;\r\n\topacity: 0.5;\r\n\tfont-family: var(--monaco-monospace-font);\r\n}\r\n\r\n.monaco-editor .parameter-hints-widget .signature .parameter.active {\r\n\tfont-weight: bold;\r\n\ttext-decoration: underline;\r\n}\r\n\r\n.monaco-editor .parameter-hints-widget .documentation-parameter > .parameter {\r\n\tfont-weight: bold;\r\n\tmargin-right: 0.5em;\r\n}\r\n","",{version:3,sources:["webpack://./node_modules/monaco-editor/esm/vs/editor/contrib/parameterHints/parameterHints.css"],names:[],mappings:"AAAA;;;+FAG+F;;AAE/F;CACC,WAAW;CACX,aAAa;CACb,sBAAsB;CACtB,kBAAkB;AACnB;;AAEA;CACC,gBAAgB;CAChB,aAAa;CACb,mBAAmB;AACpB;;AAEA;CACC,iBAAiB;CACjB,UAAU;AACX;;AAEA;CACC,iCAAiC;AAClC;;AAEA;;CAEC,aAAa;AACd;;AAEA;;CAEC,aAAa;CACb,OAAO;CACP,sBAAsB;CACtB,gBAAgB;AACjB;;AAEA;CACC,gBAAgB;AACjB;;AAEA;CACC,qBAAqB;CACrB,qBAAqB;AACtB;;AAEA;CACC,aAAa;AACd;;AAEA;CACC,oBAAoB;AACrB;;AAEA;CACC,yCAAyC;AAC1C;;AAEA;CACC,qBAAqB;AACtB;;AAEA;CACC,kBAAkB;CAClB,gBAAgB;AACjB;;AAEA;CACC,aAAa;CACb,sBAAsB;CACtB,mBAAmB;CACnB,eAAe;CACf,yBAAyB;AAC1B;;AAEA;CACC,aAAa;CACb,cAAc;AACf;;AAEA;CACC,WAAW;CACX,YAAY;CACZ,4BAA4B;CAC5B,eAAe;AAChB;;AAEA;CACC,YAAY;AACb;;AAEA;CACC,kBAAkB;CAClB,YAAY;CACZ,iBAAiB;CACjB,YAAY;CACZ,yCAAyC;AAC1C;;AAEA;CACC,iBAAiB;CACjB,0BAA0B;AAC3B;;AAEA;CACC,iBAAiB;CACjB,mBAAmB;AACpB",sourcesContent:["/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n.monaco-editor .parameter-hints-widget {\r\n\tz-index: 10;\r\n\tdisplay: flex;\r\n\tflex-direction: column;\r\n\tline-height: 1.5em;\r\n}\r\n\r\n.monaco-editor .parameter-hints-widget > .phwrapper {\r\n\tmax-width: 440px;\r\n\tdisplay: flex;\r\n\tflex-direction: row;\r\n}\r\n\r\n.monaco-editor .parameter-hints-widget.multiple {\r\n\tmin-height: 3.3em;\r\n\tpadding: 0;\r\n}\r\n\r\n.monaco-editor .parameter-hints-widget.visible {\r\n\ttransition: left .05s ease-in-out;\r\n}\r\n\r\n.monaco-editor .parameter-hints-widget p,\r\n.monaco-editor .parameter-hints-widget ul {\r\n\tmargin: 8px 0;\r\n}\r\n\r\n.monaco-editor .parameter-hints-widget .monaco-scrollable-element,\r\n.monaco-editor .parameter-hints-widget .body {\r\n\tdisplay: flex;\r\n\tflex: 1;\r\n\tflex-direction: column;\r\n\tmin-height: 100%;\r\n}\r\n\r\n.monaco-editor .parameter-hints-widget .signature {\r\n\tpadding: 4px 5px;\r\n}\r\n\r\n.monaco-editor .parameter-hints-widget .docs {\r\n\tpadding: 0 10px 0 5px;\r\n\twhite-space: pre-wrap;\r\n}\r\n\r\n.monaco-editor .parameter-hints-widget .docs.empty {\r\n\tdisplay: none;\r\n}\r\n\r\n.monaco-editor .parameter-hints-widget .docs .markdown-docs {\r\n\twhite-space: initial;\r\n}\r\n\r\n.monaco-editor .parameter-hints-widget .docs .markdown-docs code {\r\n\tfont-family: var(--monaco-monospace-font);\r\n}\r\n\r\n.monaco-editor .parameter-hints-widget .docs .code {\r\n\twhite-space: pre-wrap;\r\n}\r\n\r\n.monaco-editor .parameter-hints-widget .docs code {\r\n\tborder-radius: 3px;\r\n\tpadding: 0 0.4em;\r\n}\r\n\r\n.monaco-editor .parameter-hints-widget .controls {\r\n\tdisplay: none;\r\n\tflex-direction: column;\r\n\talign-items: center;\r\n\tmin-width: 22px;\r\n\tjustify-content: flex-end;\r\n}\r\n\r\n.monaco-editor .parameter-hints-widget.multiple .controls {\r\n\tdisplay: flex;\r\n\tpadding: 0 2px;\r\n}\r\n\r\n.monaco-editor .parameter-hints-widget.multiple .button {\r\n\twidth: 16px;\r\n\theight: 16px;\r\n\tbackground-repeat: no-repeat;\r\n\tcursor: pointer;\r\n}\r\n\r\n.monaco-editor .parameter-hints-widget .button.previous {\r\n\tbottom: 24px;\r\n}\r\n\r\n.monaco-editor .parameter-hints-widget .overloads {\r\n\ttext-align: center;\r\n\theight: 12px;\r\n\tline-height: 12px;\r\n\topacity: 0.5;\r\n\tfont-family: var(--monaco-monospace-font);\r\n}\r\n\r\n.monaco-editor .parameter-hints-widget .signature .parameter.active {\r\n\tfont-weight: bold;\r\n\ttext-decoration: underline;\r\n}\r\n\r\n.monaco-editor .parameter-hints-widget .documentation-parameter > .parameter {\r\n\tfont-weight: bold;\r\n\tmargin-right: 0.5em;\r\n}\r\n"],sourceRoot:""}]);const a=s},1283:(e,t,n)=>{"use strict";n.d(t,{Z:()=>a});var i=n(7537),o=n.n(i),r=n(3645),s=n.n(r)()(o());s.push([e.id,"/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n.monaco-editor .peekview-widget .head {\r\n\tbox-sizing: border-box;\r\n\tdisplay: flex;\r\n}\r\n\r\n.monaco-editor .peekview-widget .head .peekview-title {\r\n\tdisplay: flex;\r\n\talign-items: center;\r\n\tfont-size: 13px;\r\n\tmargin-left: 20px;\r\n\tcursor: pointer;\r\n\tmin-width: 0;\r\n}\r\n\r\n.monaco-editor .peekview-widget .head .peekview-title .dirname:not(:empty) {\r\n\tfont-size: 0.9em;\r\n\tmargin-left: 0.5em;\r\n}\r\n\r\n.monaco-editor .peekview-widget .head .peekview-title .meta {\r\n\twhite-space: nowrap;\r\n}\r\n\r\n.monaco-editor .peekview-widget .head .peekview-title .dirname {\r\n\twhite-space: nowrap;\r\n}\r\n\r\n.monaco-editor .peekview-widget .head .peekview-title .filename {\r\n\toverflow: hidden;\r\n\ttext-overflow: ellipsis;\r\n\twhite-space: nowrap;\r\n}\r\n\r\n.monaco-editor .peekview-widget .head .peekview-title .meta:not(:empty)::before {\r\n\tcontent: '-';\r\n\tpadding: 0 0.3em;\r\n}\r\n\r\n.monaco-editor .peekview-widget .head .peekview-actions {\r\n\tflex: 1;\r\n\ttext-align: right;\r\n\tpadding-right: 2px;\r\n}\r\n\r\n.monaco-editor .peekview-widget .head .peekview-actions > .monaco-action-bar {\r\n\tdisplay: inline-block;\r\n}\r\n\r\n.monaco-editor .peekview-widget .head .peekview-actions > .monaco-action-bar,\r\n.monaco-editor .peekview-widget .head .peekview-actions > .monaco-action-bar > .actions-container {\r\n\theight: 100%;\r\n}\r\n\r\n.monaco-editor .peekview-widget > .body {\r\n\tborder-top: 1px solid;\r\n\tposition: relative;\r\n}\r\n\r\n.monaco-editor .peekview-widget .head .peekview-title .codicon {\r\n\tmargin-right: 4px;\r\n}\r\n\r\n.monaco-editor .peekview-widget .monaco-list .monaco-list-row.focused .codicon {\r\n\tcolor: inherit !important;\r\n}\r\n","",{version:3,sources:["webpack://./node_modules/monaco-editor/esm/vs/editor/contrib/peekView/media/peekViewWidget.css"],names:[],mappings:"AAAA;;;+FAG+F;;AAE/F;CACC,sBAAsB;CACtB,aAAa;AACd;;AAEA;CACC,aAAa;CACb,mBAAmB;CACnB,eAAe;CACf,iBAAiB;CACjB,eAAe;CACf,YAAY;AACb;;AAEA;CACC,gBAAgB;CAChB,kBAAkB;AACnB;;AAEA;CACC,mBAAmB;AACpB;;AAEA;CACC,mBAAmB;AACpB;;AAEA;CACC,gBAAgB;CAChB,uBAAuB;CACvB,mBAAmB;AACpB;;AAEA;CACC,YAAY;CACZ,gBAAgB;AACjB;;AAEA;CACC,OAAO;CACP,iBAAiB;CACjB,kBAAkB;AACnB;;AAEA;CACC,qBAAqB;AACtB;;AAEA;;CAEC,YAAY;AACb;;AAEA;CACC,qBAAqB;CACrB,kBAAkB;AACnB;;AAEA;CACC,iBAAiB;AAClB;;AAEA;CACC,yBAAyB;AAC1B",sourcesContent:["/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n.monaco-editor .peekview-widget .head {\r\n\tbox-sizing: border-box;\r\n\tdisplay: flex;\r\n}\r\n\r\n.monaco-editor .peekview-widget .head .peekview-title {\r\n\tdisplay: flex;\r\n\talign-items: center;\r\n\tfont-size: 13px;\r\n\tmargin-left: 20px;\r\n\tcursor: pointer;\r\n\tmin-width: 0;\r\n}\r\n\r\n.monaco-editor .peekview-widget .head .peekview-title .dirname:not(:empty) {\r\n\tfont-size: 0.9em;\r\n\tmargin-left: 0.5em;\r\n}\r\n\r\n.monaco-editor .peekview-widget .head .peekview-title .meta {\r\n\twhite-space: nowrap;\r\n}\r\n\r\n.monaco-editor .peekview-widget .head .peekview-title .dirname {\r\n\twhite-space: nowrap;\r\n}\r\n\r\n.monaco-editor .peekview-widget .head .peekview-title .filename {\r\n\toverflow: hidden;\r\n\ttext-overflow: ellipsis;\r\n\twhite-space: nowrap;\r\n}\r\n\r\n.monaco-editor .peekview-widget .head .peekview-title .meta:not(:empty)::before {\r\n\tcontent: '-';\r\n\tpadding: 0 0.3em;\r\n}\r\n\r\n.monaco-editor .peekview-widget .head .peekview-actions {\r\n\tflex: 1;\r\n\ttext-align: right;\r\n\tpadding-right: 2px;\r\n}\r\n\r\n.monaco-editor .peekview-widget .head .peekview-actions > .monaco-action-bar {\r\n\tdisplay: inline-block;\r\n}\r\n\r\n.monaco-editor .peekview-widget .head .peekview-actions > .monaco-action-bar,\r\n.monaco-editor .peekview-widget .head .peekview-actions > .monaco-action-bar > .actions-container {\r\n\theight: 100%;\r\n}\r\n\r\n.monaco-editor .peekview-widget > .body {\r\n\tborder-top: 1px solid;\r\n\tposition: relative;\r\n}\r\n\r\n.monaco-editor .peekview-widget .head .peekview-title .codicon {\r\n\tmargin-right: 4px;\r\n}\r\n\r\n.monaco-editor .peekview-widget .monaco-list .monaco-list-row.focused .codicon {\r\n\tcolor: inherit !important;\r\n}\r\n"],sourceRoot:""}]);const a=s},7113:(e,t,n)=>{"use strict";n.d(t,{Z:()=>a});var i=n(7537),o=n.n(i),r=n(3645),s=n.n(r)()(o());s.push([e.id,"/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n.monaco-editor .rename-box {\r\n\tz-index: 100;\r\n\tcolor: inherit;\r\n}\r\n\r\n.monaco-editor .rename-box.preview {\r\n\tpadding: 3px 3px 0 3px;\r\n}\r\n\r\n.monaco-editor .rename-box .rename-input {\r\n\tpadding: 3px;\r\n\twidth: calc(100% - 6px);\r\n}\r\n\r\n.monaco-editor .rename-box .rename-label {\r\n\tdisplay: none;\r\n\topacity: .8;\r\n}\r\n\r\n.monaco-editor .rename-box.preview .rename-label {\r\n\tdisplay: inherit;\r\n}\r\n","",{version:3,sources:["webpack://./node_modules/monaco-editor/esm/vs/editor/contrib/rename/renameInputField.css"],names:[],mappings:"AAAA;;;+FAG+F;;AAE/F;CACC,YAAY;CACZ,cAAc;AACf;;AAEA;CACC,sBAAsB;AACvB;;AAEA;CACC,YAAY;CACZ,uBAAuB;AACxB;;AAEA;CACC,aAAa;CACb,WAAW;AACZ;;AAEA;CACC,gBAAgB;AACjB",sourcesContent:["/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n.monaco-editor .rename-box {\r\n\tz-index: 100;\r\n\tcolor: inherit;\r\n}\r\n\r\n.monaco-editor .rename-box.preview {\r\n\tpadding: 3px 3px 0 3px;\r\n}\r\n\r\n.monaco-editor .rename-box .rename-input {\r\n\tpadding: 3px;\r\n\twidth: calc(100% - 6px);\r\n}\r\n\r\n.monaco-editor .rename-box .rename-label {\r\n\tdisplay: none;\r\n\topacity: .8;\r\n}\r\n\r\n.monaco-editor .rename-box.preview .rename-label {\r\n\tdisplay: inherit;\r\n}\r\n"],sourceRoot:""}]);const a=s},8894:(e,t,n)=>{"use strict";n.d(t,{Z:()=>a});var i=n(7537),o=n.n(i),r=n(3645),s=n.n(r)()(o());s.push([e.id,"/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n.monaco-editor .snippet-placeholder {\r\n\tmin-width: 2px;\r\n\toutline-style: solid;\r\n\toutline-width: 1px;\r\n}\r\n\r\n.monaco-editor .finish-snippet-placeholder {\r\n\toutline-style: solid;\r\n\toutline-width: 1px;\r\n}\r\n","",{version:3,sources:["webpack://./node_modules/monaco-editor/esm/vs/editor/contrib/snippet/snippetSession.css"],names:[],mappings:"AAAA;;;+FAG+F;;AAE/F;CACC,cAAc;CACd,oBAAoB;CACpB,kBAAkB;AACnB;;AAEA;CACC,oBAAoB;CACpB,kBAAkB;AACnB",sourcesContent:["/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n.monaco-editor .snippet-placeholder {\r\n\tmin-width: 2px;\r\n\toutline-style: solid;\r\n\toutline-width: 1px;\r\n}\r\n\r\n.monaco-editor .finish-snippet-placeholder {\r\n\toutline-style: solid;\r\n\toutline-width: 1px;\r\n}\r\n"],sourceRoot:""}]);const a=s},36:(e,t,n)=>{"use strict";n.d(t,{Z:()=>a});var i=n(7537),o=n.n(i),r=n(3645),s=n.n(r)()(o());s.push([e.id,"/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n/* Suggest widget*/\r\n\r\n.monaco-editor .suggest-widget {\r\n\twidth: 430px;\r\n\tz-index: 40;\r\n\tdisplay: flex;\r\n\tflex-direction: column;\r\n}\r\n\r\n.monaco-editor .suggest-widget.message {\r\n\tflex-direction: row;\r\n\talign-items: center;\r\n}\r\n\r\n.monaco-editor .suggest-widget,\r\n.monaco-editor .suggest-details {\r\n\tflex: 0 1 auto;\r\n\twidth: 100%;\r\n\tborder-style: solid;\r\n\tborder-width: 1px;\r\n}\r\n\r\n.monaco-editor.hc-black .suggest-widget,\r\n.monaco-editor.hc-black .suggest-details {\r\n\tborder-width: 2px;\r\n}\r\n\r\n/* Styles for status bar part */\r\n\r\n\r\n.monaco-editor .suggest-widget .suggest-status-bar {\r\n\tbox-sizing: border-box;\r\n\tdisplay: none;\r\n\tflex-flow: row nowrap;\r\n\tjustify-content: space-between;\r\n\twidth: 100%;\r\n\tfont-size: 80%;\r\n\tpadding: 0 4px 0 4px;\r\n\tborder-top: 1px solid transparent;\r\n\toverflow: hidden;\r\n}\r\n\r\n.monaco-editor .suggest-widget.with-status-bar .suggest-status-bar {\r\n\tdisplay: flex;\r\n}\r\n\r\n.monaco-editor .suggest-widget .suggest-status-bar .left {\r\n\tpadding-right: 8px;\r\n}\r\n\r\n.monaco-editor .suggest-widget.with-status-bar .suggest-status-bar .action-label {\r\n\topacity: 0.5;\r\n\tcolor: inherit;\r\n}\r\n\r\n.monaco-editor .suggest-widget.with-status-bar .suggest-status-bar .action-item:not(:last-of-type) .action-label {\r\n\tmargin-right: 0;\r\n}\r\n\r\n.monaco-editor .suggest-widget.with-status-bar .suggest-status-bar .action-item:not(:last-of-type) .action-label::after {\r\n\tcontent: ', ';\r\n\tmargin-right: 0.3em;\r\n}\r\n\r\n.monaco-editor .suggest-widget.with-status-bar .monaco-list .monaco-list-row>.contents>.main>.right>.readMore,\r\n.monaco-editor .suggest-widget.with-status-bar .monaco-list .monaco-list-row.focused.string-label>.contents>.main>.right>.readMore {\r\n\tdisplay: none;\r\n}\r\n\r\n.monaco-editor .suggest-widget.with-status-bar:not(.docs-side) .monaco-list .monaco-list-row:hover>.contents>.main>.right.can-expand-details>.details-label {\r\n\twidth: 100%;\r\n}\r\n\r\n/* Styles for Message element for when widget is loading or is empty */\r\n\r\n.monaco-editor .suggest-widget>.message {\r\n\tpadding-left: 22px;\r\n}\r\n\r\n/** Styles for the list element **/\r\n\r\n.monaco-editor .suggest-widget>.tree {\r\n\theight: 100%;\r\n\twidth: 100%;\r\n}\r\n\r\n.monaco-editor .suggest-widget .monaco-list {\r\n\tuser-select: none;\r\n\t-webkit-user-select: none;\r\n\t-ms-user-select: none;\r\n}\r\n\r\n/** Styles for each row in the list element **/\r\n\r\n.monaco-editor .suggest-widget .monaco-list .monaco-list-row {\r\n\tdisplay: flex;\r\n\t-mox-box-sizing: border-box;\r\n\tbox-sizing: border-box;\r\n\tpadding-right: 10px;\r\n\tbackground-repeat: no-repeat;\r\n\tbackground-position: 2px 2px;\r\n\twhite-space: nowrap;\r\n\tcursor: pointer;\r\n\ttouch-action: none;\r\n}\r\n\r\n.monaco-editor .suggest-widget .monaco-list .monaco-list-row>.contents {\r\n\tflex: 1;\r\n\theight: 100%;\r\n\toverflow: hidden;\r\n\tpadding-left: 2px;\r\n}\r\n\r\n.monaco-editor .suggest-widget .monaco-list .monaco-list-row>.contents>.main {\r\n\tdisplay: flex;\r\n\toverflow: hidden;\r\n\ttext-overflow: ellipsis;\r\n\twhite-space: pre;\r\n\tjustify-content: space-between;\r\n}\r\n\r\n.monaco-editor .suggest-widget .monaco-list .monaco-list-row>.contents>.main>.left, .monaco-editor .suggest-widget .monaco-list .monaco-list-row>.contents>.main>.right {\r\n\tdisplay: flex;\r\n}\r\n\r\n.monaco-editor .suggest-widget:not(.frozen) .monaco-highlighted-label .highlight {\r\n\tfont-weight: bold;\r\n}\r\n\r\n/** ReadMore Icon styles **/\r\n\r\n.monaco-editor .suggest-details>.monaco-scrollable-element>.body>.header>.codicon-close,\r\n.monaco-editor .suggest-widget .monaco-list .monaco-list-row>.contents>.main>.right>.readMore::before {\r\n\tcolor: inherit;\r\n\topacity: 1;\r\n\tfont-size: 14px;\r\n\tcursor: pointer;\r\n}\r\n\r\n.monaco-editor .suggest-details>.monaco-scrollable-element>.body>.header>.codicon-close {\r\n\tposition: absolute;\r\n\ttop: 6px;\r\n\tright: 2px;\r\n}\r\n\r\n.monaco-editor .suggest-details>.monaco-scrollable-element>.body>.header>.codicon-close:hover,\r\n.monaco-editor .suggest-widget .monaco-list .monaco-list-row>.contents>.main>.right>.readMore:hover {\r\n\topacity: 1;\r\n}\r\n\r\n/** signature, qualifier, type/details opacity **/\r\n\r\n.monaco-editor .suggest-widget .monaco-list .monaco-list-row>.contents>.main>.right>.details-label {\r\n\topacity: 0.7;\r\n}\r\n\r\n.monaco-editor .suggest-widget .monaco-list .monaco-list-row>.contents>.main>.left>.signature-label {\r\n\toverflow: hidden;\r\n\ttext-overflow: ellipsis;\r\n\topacity: 0.6;\r\n}\r\n\r\n.monaco-editor .suggest-widget .monaco-list .monaco-list-row>.contents>.main>.left>.qualifier-label {\r\n\tmargin-left: 12px;\r\n\topacity: 0.4;\r\n\tfont-size: 85%;\r\n\tline-height: initial;\r\n\ttext-overflow: ellipsis;\r\n\toverflow: hidden;\r\n\talign-self: center;\r\n}\r\n\r\n/** Type Info and icon next to the label in the focused completion item **/\r\n\r\n.monaco-editor .suggest-widget .monaco-list .monaco-list-row>.contents>.main>.right>.details-label {\r\n\tfont-size: 85%;\r\n\tmargin-left: 1.1em;\r\n\toverflow: hidden;\r\n\ttext-overflow: ellipsis;\r\n\twhite-space: nowrap;\r\n}\r\n\r\n.monaco-editor .suggest-widget .monaco-list .monaco-list-row>.contents>.main>.right>.details-label>.monaco-tokenized-source {\r\n\tdisplay: inline;\r\n}\r\n\r\n/** Details: if using CompletionItem#details, show on focus **/\r\n\r\n.monaco-editor .suggest-widget .monaco-list .monaco-list-row>.contents>.main>.right>.details-label {\r\n\tdisplay: none;\r\n}\r\n\r\n.monaco-editor .suggest-widget:not(.shows-details) .monaco-list .monaco-list-row.focused>.contents>.main>.right>.details-label {\r\n\tdisplay: inline;\r\n}\r\n\r\n/** Details: if using CompletionItemLabel#details, always show **/\r\n\r\n.monaco-editor .suggest-widget .monaco-list .monaco-list-row:not(.string-label)>.contents>.main>.right>.details-label,\r\n.monaco-editor .suggest-widget.docs-side .monaco-list .monaco-list-row.focused:not(.string-label)>.contents>.main>.right>.details-label {\r\n\tdisplay: inline;\r\n}\r\n\r\n/** Ellipsis on hover **/\r\n\r\n.monaco-editor .suggest-widget:not(.docs-side) .monaco-list .monaco-list-row:hover>.contents>.main>.right.can-expand-details>.details-label {\r\n\twidth: calc(100% - 26px);\r\n}\r\n\r\n.monaco-editor .suggest-widget .monaco-list .monaco-list-row>.contents>.main>.left {\r\n\tflex-shrink: 1;\r\n\tflex-grow: 1;\r\n\toverflow: hidden;\r\n}\r\n\r\n.monaco-editor .suggest-widget .monaco-list .monaco-list-row>.contents>.main>.left>.monaco-icon-label {\r\n\tflex-shrink: 0;\r\n}\r\n\r\n.monaco-editor .suggest-widget .monaco-list .monaco-list-row:not(.string-label)>.contents>.main>.left>.monaco-icon-label {\r\n\tmax-width: 100%;\r\n}\r\n\r\n.monaco-editor .suggest-widget .monaco-list .monaco-list-row.string-label>.contents>.main>.left>.monaco-icon-label {\r\n\tflex-shrink: 1;\r\n}\r\n\r\n.monaco-editor .suggest-widget .monaco-list .monaco-list-row>.contents>.main>.right {\r\n\toverflow: hidden;\r\n\tflex-shrink: 4;\r\n\tmax-width: 70%;\r\n}\r\n\r\n.monaco-editor .suggest-widget .monaco-list .monaco-list-row>.contents>.main>.right>.readMore {\r\n\tdisplay: inline-block;\r\n\tposition: absolute;\r\n\tright: 10px;\r\n\twidth: 18px;\r\n\theight: 18px;\r\n\tvisibility: hidden;\r\n}\r\n\r\n/** Do NOT display ReadMore when docs is side/below **/\r\n\r\n.monaco-editor .suggest-widget.docs-side .monaco-list .monaco-list-row>.contents>.main>.right>.readMore, .monaco-editor .suggest-widget.docs-below .monaco-list .monaco-list-row>.contents>.main>.right>.readMore {\r\n\tdisplay: none !important;\r\n}\r\n\r\n/** Do NOT display ReadMore when using plain CompletionItemLabel (details/documentation might not be resolved) **/\r\n\r\n.monaco-editor .suggest-widget .monaco-list .monaco-list-row.string-label>.contents>.main>.right>.readMore {\r\n\tdisplay: none;\r\n}\r\n\r\n/** Focused item can show ReadMore, but can't when docs is side/below **/\r\n\r\n.monaco-editor .suggest-widget .monaco-list .monaco-list-row.focused.string-label>.contents>.main>.right>.readMore {\r\n\tdisplay: inline-block;\r\n}\r\n\r\n.monaco-editor .suggest-widget.docs-side .monaco-list .monaco-list-row>.contents>.main>.right>.readMore,\r\n.monaco-editor .suggest-widget.docs-below .monaco-list .monaco-list-row>.contents>.main>.right>.readMore {\r\n\tdisplay: none;\r\n}\r\n\r\n.monaco-editor .suggest-widget .monaco-list .monaco-list-row:hover>.contents>.main>.right>.readMore {\r\n\tvisibility: visible;\r\n}\r\n\r\n/** Styles for each row in the list **/\r\n\r\n.monaco-editor .suggest-widget .monaco-list .monaco-list-row .monaco-icon-label.deprecated {\r\n\topacity: 0.66;\r\n\ttext-decoration: unset;\r\n}\r\n\r\n.monaco-editor .suggest-widget .monaco-list .monaco-list-row .monaco-icon-label.deprecated>.monaco-icon-label-container>.monaco-icon-name-container {\r\n\ttext-decoration: line-through;\r\n}\r\n\r\n.monaco-editor .suggest-widget .monaco-list .monaco-list-row .monaco-icon-label::before {\r\n\theight: 100%;\r\n}\r\n\r\n.monaco-editor .suggest-widget .monaco-list .monaco-list-row .icon {\r\n\tdisplay: block;\r\n\theight: 16px;\r\n\twidth: 16px;\r\n\tmargin-left: 2px;\r\n\tbackground-repeat: no-repeat;\r\n\tbackground-size: 80%;\r\n\tbackground-position: center;\r\n}\r\n\r\n.monaco-editor .suggest-widget .monaco-list .monaco-list-row .icon.hide {\r\n\tdisplay: none;\r\n}\r\n\r\n.monaco-editor .suggest-widget .monaco-list .monaco-list-row .suggest-icon {\r\n\tdisplay: flex;\r\n\talign-items: center;\r\n\tmargin-right: 4px;\r\n}\r\n\r\n.monaco-editor .suggest-widget.no-icons .monaco-list .monaco-list-row .icon, .monaco-editor .suggest-widget.no-icons .monaco-list .monaco-list-row .suggest-icon::before {\r\n\tdisplay: none;\r\n}\r\n\r\n.monaco-editor .suggest-widget .monaco-list .monaco-list-row .icon.customcolor .colorspan {\r\n\tmargin: 0 0 0 0.3em;\r\n\tborder: 0.1em solid #000;\r\n\twidth: 0.7em;\r\n\theight: 0.7em;\r\n\tdisplay: inline-block;\r\n}\r\n\r\n/** Styles for the docs of the completion item in focus **/\r\n\r\n.monaco-editor .suggest-details-container {\r\n\tz-index: 41;\r\n}\r\n\r\n.monaco-editor .suggest-details {\r\n\tdisplay: flex;\r\n\tflex-direction: column;\r\n\tcursor: default;\r\n}\r\n\r\n.monaco-editor .suggest-details.no-docs {\r\n\tdisplay: none;\r\n}\r\n\r\n.monaco-editor .suggest-details>.monaco-scrollable-element {\r\n\tflex: 1;\r\n}\r\n\r\n.monaco-editor .suggest-details>.monaco-scrollable-element>.body {\r\n\tbox-sizing: border-box;\r\n\theight: 100%;\r\n\twidth: 100%;\r\n}\r\n\r\n.monaco-editor .suggest-details>.monaco-scrollable-element>.body>.header>.type {\r\n\tflex: 2;\r\n\toverflow: hidden;\r\n\ttext-overflow: ellipsis;\r\n\topacity: 0.7;\r\n\twhite-space: pre;\r\n\tmargin: 0 24px 0 0;\r\n\tpadding: 4px 0 12px 5px;\r\n}\r\n\r\n.monaco-editor .suggest-details>.monaco-scrollable-element>.body>.header>.type.auto-wrap {\r\n\twhite-space: normal;\r\n\tword-break: break-all;\r\n}\r\n\r\n\r\n.monaco-editor .suggest-details>.monaco-scrollable-element>.body>.docs {\r\n\tmargin: 0;\r\n\tpadding: 4px 5px;\r\n\twhite-space: pre-wrap;\r\n}\r\n\r\n.monaco-editor .suggest-details.no-type>.monaco-scrollable-element>.body>.docs {\r\n\tmargin-right: 24px;\r\n}\r\n\r\n.monaco-editor .suggest-details>.monaco-scrollable-element>.body>.docs.markdown-docs {\r\n\tpadding: 0;\r\n\twhite-space: initial;\r\n\tmin-height: calc(1rem + 8px);\r\n}\r\n\r\n.monaco-editor .suggest-details>.monaco-scrollable-element>.body>.docs.markdown-docs>div,\r\n.monaco-editor .suggest-details>.monaco-scrollable-element>.body>.docs.markdown-docs>span:not(:empty) {\r\n\tpadding: 4px 5px;\r\n}\r\n\r\n.monaco-editor .suggest-details>.monaco-scrollable-element>.body>.docs.markdown-docs>div>p:first-child {\r\n\tmargin-top: 0;\r\n}\r\n\r\n.monaco-editor .suggest-details>.monaco-scrollable-element>.body>.docs.markdown-docs>div>p:last-child {\r\n\tmargin-bottom: 0;\r\n}\r\n\r\n.monaco-editor .suggest-details>.monaco-scrollable-element>.body>.docs .code {\r\n\twhite-space: pre-wrap;\r\n\tword-wrap: break-word;\r\n}\r\n\r\n.monaco-editor .suggest-details>.monaco-scrollable-element>.body>.docs.markdown-docs .codicon {\r\n\tvertical-align: sub;\r\n}\r\n\r\n.monaco-editor .suggest-details>.monaco-scrollable-element>.body>p:empty {\r\n\tdisplay: none;\r\n}\r\n\r\n.monaco-editor .suggest-details code {\r\n\tborder-radius: 3px;\r\n\tpadding: 0 0.4em;\r\n}\r\n\r\n.monaco-editor .suggest-details ul {\r\n\tpadding-left: 20px;\r\n}\r\n\r\n.monaco-editor .suggest-details ol {\r\n\tpadding-left: 20px;\r\n}\r\n\r\n.monaco-editor .suggest-details p code {\r\n\tfont-family: var(--monaco-monospace-font);\r\n}\r\n","",{version:3,sources:["webpack://./node_modules/monaco-editor/esm/vs/editor/contrib/suggest/media/suggest.css"],names:[],mappings:"AAAA;;;+FAG+F;;AAE/F,kBAAkB;;AAElB;CACC,YAAY;CACZ,WAAW;CACX,aAAa;CACb,sBAAsB;AACvB;;AAEA;CACC,mBAAmB;CACnB,mBAAmB;AACpB;;AAEA;;CAEC,cAAc;CACd,WAAW;CACX,mBAAmB;CACnB,iBAAiB;AAClB;;AAEA;;CAEC,iBAAiB;AAClB;;AAEA,+BAA+B;;;AAG/B;CACC,sBAAsB;CACtB,aAAa;CACb,qBAAqB;CACrB,8BAA8B;CAC9B,WAAW;CACX,cAAc;CACd,oBAAoB;CACpB,iCAAiC;CACjC,gBAAgB;AACjB;;AAEA;CACC,aAAa;AACd;;AAEA;CACC,kBAAkB;AACnB;;AAEA;CACC,YAAY;CACZ,cAAc;AACf;;AAEA;CACC,eAAe;AAChB;;AAEA;CACC,aAAa;CACb,m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C7B;;AAEA;;CAEC,gBAAgB;AACjB;;AAEA;CACC,aAAa;AACd;;AAEA;CACC,gBAAgB;AACjB;;AAEA;CACC,qBAAqB;CACrB,qBAAqB;AACtB;;AAEA;CACC,mBAAmB;AACpB;;AAEA;CACC,aAAa;AACd;;AAEA;CACC,kBAAkB;CAClB,gBAAgB;AACjB;;AAEA;CACC,kBAAkB;AACnB;;AAEA;CACC,kBAAkB;AACnB;;AAEA;CACC,yCAAyC;AAC1C",sourcesContent:["/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n/* Suggest widget*/\r\n\r\n.monaco-editor .suggest-widget {\r\n\twidth: 430px;\r\n\tz-index: 40;\r\n\tdisplay: flex;\r\n\tflex-direction: column;\r\n}\r\n\r\n.monaco-editor .suggest-widget.message {\r\n\tflex-direction: row;\r\n\talign-items: center;\r\n}\r\n\r\n.monaco-editor .suggest-widget,\r\n.monaco-editor .suggest-details {\r\n\tflex: 0 1 auto;\r\n\twidth: 100%;\r\n\tborder-style: solid;\r\n\tborder-width: 1px;\r\n}\r\n\r\n.monaco-editor.hc-black .suggest-widget,\r\n.monaco-editor.hc-black .suggest-details {\r\n\tborder-width: 2px;\r\n}\r\n\r\n/* Styles for status bar part */\r\n\r\n\r\n.monaco-editor .suggest-widget .suggest-status-bar {\r\n\tbox-sizing: border-box;\r\n\tdisplay: none;\r\n\tflex-flow: row nowrap;\r\n\tjustify-content: space-between;\r\n\twidth: 100%;\r\n\tfont-size: 80%;\r\n\tpadding: 0 4px 0 4px;\r\n\tborder-top: 1px solid transparent;\r\n\toverflow: hidden;\r\n}\r\n\r\n.monaco-editor .suggest-widget.with-status-bar .suggest-status-bar {\r\n\tdisplay: flex;\r\n}\r\n\r\n.monaco-editor .suggest-widget .suggest-status-bar .left {\r\n\tpadding-right: 8px;\r\n}\r\n\r\n.monaco-editor .suggest-widget.with-status-bar .suggest-status-bar .action-label {\r\n\topacity: 0.5;\r\n\tcolor: inherit;\r\n}\r\n\r\n.monaco-editor .suggest-widget.with-status-bar .suggest-status-bar .action-item:not(:last-of-type) .action-label {\r\n\tmargin-right: 0;\r\n}\r\n\r\n.monaco-editor .suggest-widget.with-status-bar .suggest-status-bar .action-item:not(:last-of-type) .action-label::after {\r\n\tcontent: ', ';\r\n\tmargin-right: 0.3em;\r\n}\r\n\r\n.monaco-editor .suggest-widget.with-status-bar .monaco-list .monaco-list-row>.contents>.main>.right>.readMore,\r\n.monaco-editor .suggest-widget.with-status-bar .monaco-list .monaco-list-row.focused.string-label>.contents>.main>.right>.readMore {\r\n\tdisplay: none;\r\n}\r\n\r\n.monaco-editor .suggest-widget.with-status-bar:not(.docs-side) .monaco-list .monaco-list-row:hover>.contents>.main>.right.can-expand-details>.details-label {\r\n\twidth: 100%;\r\n}\r\n\r\n/* Styles for Message element for when widget is loading or is empty */\r\n\r\n.monaco-editor .suggest-widget>.message {\r\n\tpadding-left: 22px;\r\n}\r\n\r\n/** Styles for the list element **/\r\n\r\n.monaco-editor .suggest-widget>.tree {\r\n\theight: 100%;\r\n\twidth: 100%;\r\n}\r\n\r\n.monaco-editor .suggest-widget .monaco-list {\r\n\tuser-select: none;\r\n\t-webkit-user-select: none;\r\n\t-ms-user-select: none;\r\n}\r\n\r\n/** Styles for each row in the list element **/\r\n\r\n.monaco-editor .suggest-widget .monaco-list .monaco-list-row {\r\n\tdisplay: flex;\r\n\t-mox-box-sizing: border-box;\r\n\tbox-sizing: border-box;\r\n\tpadding-right: 10px;\r\n\tbackground-repeat: no-repeat;\r\n\tbackground-position: 2px 2px;\r\n\twhite-space: nowrap;\r\n\tcursor: pointer;\r\n\ttouch-action: none;\r\n}\r\n\r\n.monaco-editor .suggest-widget .monaco-list .monaco-list-row>.contents {\r\n\tflex: 1;\r\n\theight: 100%;\r\n\toverflow: hidden;\r\n\tpadding-left: 2px;\r\n}\r\n\r\n.monaco-editor .suggest-widget .monaco-list .monaco-list-row>.contents>.main {\r\n\tdisplay: flex;\r\n\toverflow: hidden;\r\n\ttext-overflow: ellipsis;\r\n\twhite-space: pre;\r\n\tjustify-content: space-between;\r\n}\r\n\r\n.monaco-editor .suggest-widget .monaco-list .monaco-list-row>.contents>.main>.left, .monaco-editor .suggest-widget .monaco-list .monaco-list-row>.contents>.main>.right {\r\n\tdisplay: flex;\r\n}\r\n\r\n.monaco-editor .suggest-widget:not(.frozen) .monaco-highlighted-label .highlight {\r\n\tfont-weight: bold;\r\n}\r\n\r\n/** ReadMore Icon styles **/\r\n\r\n.monaco-editor .suggest-details>.monaco-scrollable-element>.body>.header>.codicon-close,\r\n.monaco-editor .suggest-widget .monaco-list .monaco-list-row>.contents>.main>.right>.readMore::before {\r\n\tcolor: inherit;\r\n\topacity: 1;\r\n\tfont-size: 14px;\r\n\tcursor: pointer;\r\n}\r\n\r\n.monaco-editor .suggest-details>.monaco-scrollable-element>.body>.header>.codicon-close {\r\n\tposition: absolute;\r\n\ttop: 6px;\r\n\tright: 2px;\r\n}\r\n\r\n.monaco-editor .suggest-details>.monaco-scrollable-element>.body>.header>.codicon-close:hover,\r\n.monaco-editor .suggest-widget .monaco-list .monaco-list-row>.contents>.main>.right>.readMore:hover {\r\n\topacity: 1;\r\n}\r\n\r\n/** signature, qualifier, type/details opacity **/\r\n\r\n.monaco-editor .suggest-widget .monaco-list .monaco-list-row>.contents>.main>.right>.details-label {\r\n\topacity: 0.7;\r\n}\r\n\r\n.monaco-editor .suggest-widget .monaco-list .monaco-list-row>.contents>.main>.left>.signature-label {\r\n\toverflow: hidden;\r\n\ttext-overflow: ellipsis;\r\n\topacity: 0.6;\r\n}\r\n\r\n.monaco-editor .suggest-widget .monaco-list .monaco-list-row>.contents>.main>.left>.qualifier-label {\r\n\tmargin-left: 12px;\r\n\topacity: 0.4;\r\n\tfont-size: 85%;\r\n\tline-height: initial;\r\n\ttext-overflow: ellipsis;\r\n\toverflow: hidden;\r\n\talign-self: center;\r\n}\r\n\r\n/** Type Info and icon next to the label in the focused completion item **/\r\n\r\n.monaco-editor .suggest-widget .monaco-list .monaco-list-row>.contents>.main>.right>.details-label {\r\n\tfont-size: 85%;\r\n\tmargin-left: 1.1em;\r\n\toverflow: hidden;\r\n\ttext-overflow: ellipsis;\r\n\twhite-space: nowrap;\r\n}\r\n\r\n.monaco-editor .suggest-widget .monaco-list .monaco-list-row>.contents>.main>.right>.details-label>.monaco-tokenized-source {\r\n\tdisplay: inline;\r\n}\r\n\r\n/** Details: if using CompletionItem#details, show on focus **/\r\n\r\n.monaco-editor .suggest-widget .monaco-list .monaco-list-row>.contents>.main>.right>.details-label {\r\n\tdisplay: none;\r\n}\r\n\r\n.monaco-editor .suggest-widget:not(.shows-details) .monaco-list .monaco-list-row.focused>.contents>.main>.right>.details-label {\r\n\tdisplay: inline;\r\n}\r\n\r\n/** Details: if using CompletionItemLabel#details, always show **/\r\n\r\n.monaco-editor .suggest-widget .monaco-list .monaco-list-row:not(.string-label)>.contents>.main>.right>.details-label,\r\n.monaco-editor .suggest-widget.docs-side .monaco-list .monaco-list-row.focused:not(.string-label)>.contents>.main>.right>.details-label {\r\n\tdisplay: inline;\r\n}\r\n\r\n/** Ellipsis on hover **/\r\n\r\n.monaco-editor .suggest-widget:not(.docs-side) .monaco-list .monaco-list-row:hover>.contents>.main>.right.can-expand-details>.details-label {\r\n\twidth: calc(100% - 26px);\r\n}\r\n\r\n.monaco-editor .suggest-widget .monaco-list .monaco-list-row>.contents>.main>.left {\r\n\tflex-shrink: 1;\r\n\tflex-grow: 1;\r\n\toverflow: hidden;\r\n}\r\n\r\n.monaco-editor .suggest-widget .monaco-list .monaco-list-row>.contents>.main>.left>.monaco-icon-label {\r\n\tflex-shrink: 0;\r\n}\r\n\r\n.monaco-editor .suggest-widget .monaco-list .monaco-list-row:not(.string-label)>.contents>.main>.left>.monaco-icon-label {\r\n\tmax-width: 100%;\r\n}\r\n\r\n.monaco-editor .suggest-widget .monaco-list .monaco-list-row.string-label>.contents>.main>.left>.monaco-icon-label {\r\n\tflex-shrink: 1;\r\n}\r\n\r\n.monaco-editor .suggest-widget .monaco-list .monaco-list-row>.contents>.main>.right {\r\n\toverflow: hidden;\r\n\tflex-shrink: 4;\r\n\tmax-width: 70%;\r\n}\r\n\r\n.monaco-editor .suggest-widget .monaco-list .monaco-list-row>.contents>.main>.right>.readMore {\r\n\tdisplay: inline-block;\r\n\tposition: absolute;\r\n\tright: 10px;\r\n\twidth: 18px;\r\n\theight: 18px;\r\n\tvisibility: hidden;\r\n}\r\n\r\n/** Do NOT display ReadMore when docs is side/below **/\r\n\r\n.monaco-editor .suggest-widget.docs-side .monaco-list .monaco-list-row>.contents>.main>.right>.readMore, .monaco-editor .suggest-widget.docs-below .monaco-list .monaco-list-row>.contents>.main>.right>.readMore {\r\n\tdisplay: none !important;\r\n}\r\n\r\n/** Do NOT display ReadMore when using plain CompletionItemLabel (details/documentation might not be resolved) **/\r\n\r\n.monaco-editor .suggest-widget .monaco-list .monaco-list-row.string-label>.contents>.main>.right>.readMore {\r\n\tdisplay: none;\r\n}\r\n\r\n/** Focused item can show ReadMore, but can't when docs is side/below **/\r\n\r\n.monaco-editor .suggest-widget .monaco-list .monaco-list-row.focused.string-label>.contents>.main>.right>.readMore {\r\n\tdisplay: inline-block;\r\n}\r\n\r\n.monaco-editor .suggest-widget.docs-side .monaco-list .monaco-list-row>.contents>.main>.right>.readMore,\r\n.monaco-editor .suggest-widget.docs-below .monaco-list .monaco-list-row>.contents>.main>.right>.readMore {\r\n\tdisplay: none;\r\n}\r\n\r\n.monaco-editor .suggest-widget .monaco-list .monaco-list-row:hover>.contents>.main>.right>.readMore {\r\n\tvisibility: visible;\r\n}\r\n\r\n/** Styles for each row in the list **/\r\n\r\n.monaco-editor .suggest-widget .monaco-list .monaco-list-row .monaco-icon-label.deprecated {\r\n\topacity: 0.66;\r\n\ttext-decoration: unset;\r\n}\r\n\r\n.monaco-editor .suggest-widget .monaco-list .monaco-list-row .monaco-icon-label.deprecated>.monaco-icon-label-container>.monaco-icon-name-container {\r\n\ttext-decoration: line-through;\r\n}\r\n\r\n.monaco-editor .suggest-widget .monaco-list .monaco-list-row .monaco-icon-label::before {\r\n\theight: 100%;\r\n}\r\n\r\n.monaco-editor .suggest-widget .monaco-list .monaco-list-row .icon {\r\n\tdisplay: block;\r\n\theight: 16px;\r\n\twidth: 16px;\r\n\tmargin-left: 2px;\r\n\tbackground-repeat: no-repeat;\r\n\tbackground-size: 80%;\r\n\tbackground-position: center;\r\n}\r\n\r\n.monaco-editor .suggest-widget .monaco-list .monaco-list-row .icon.hide {\r\n\tdisplay: none;\r\n}\r\n\r\n.monaco-editor .suggest-widget .monaco-list .monaco-list-row .suggest-icon {\r\n\tdisplay: flex;\r\n\talign-items: center;\r\n\tmargin-right: 4px;\r\n}\r\n\r\n.monaco-editor .suggest-widget.no-icons .monaco-list .monaco-list-row .icon, .monaco-editor .suggest-widget.no-icons .monaco-list .monaco-list-row .suggest-icon::before {\r\n\tdisplay: none;\r\n}\r\n\r\n.monaco-editor .suggest-widget .monaco-list .monaco-list-row .icon.customcolor .colorspan {\r\n\tmargin: 0 0 0 0.3em;\r\n\tborder: 0.1em solid #000;\r\n\twidth: 0.7em;\r\n\theight: 0.7em;\r\n\tdisplay: inline-block;\r\n}\r\n\r\n/** Styles for the docs of the completion item in focus **/\r\n\r\n.monaco-editor .suggest-details-container {\r\n\tz-index: 41;\r\n}\r\n\r\n.monaco-editor .suggest-details {\r\n\tdisplay: flex;\r\n\tflex-direction: column;\r\n\tcursor: default;\r\n}\r\n\r\n.monaco-editor .suggest-details.no-docs {\r\n\tdisplay: none;\r\n}\r\n\r\n.monaco-editor .suggest-details>.monaco-scrollable-element {\r\n\tflex: 1;\r\n}\r\n\r\n.monaco-editor .suggest-details>.monaco-scrollable-element>.body {\r\n\tbox-sizing: border-box;\r\n\theight: 100%;\r\n\twidth: 100%;\r\n}\r\n\r\n.monaco-editor .suggest-details>.monaco-scrollable-element>.body>.header>.type {\r\n\tflex: 2;\r\n\toverflow: hidden;\r\n\ttext-overflow: ellipsis;\r\n\topacity: 0.7;\r\n\twhite-space: pre;\r\n\tmargin: 0 24px 0 0;\r\n\tpadding: 4px 0 12px 5px;\r\n}\r\n\r\n.monaco-editor .suggest-details>.monaco-scrollable-element>.body>.header>.type.auto-wrap {\r\n\twhite-space: normal;\r\n\tword-break: break-all;\r\n}\r\n\r\n\r\n.monaco-editor .suggest-details>.monaco-scrollable-element>.body>.docs {\r\n\tmargin: 0;\r\n\tpadding: 4px 5px;\r\n\twhite-space: pre-wrap;\r\n}\r\n\r\n.monaco-editor .suggest-details.no-type>.monaco-scrollable-element>.body>.docs {\r\n\tmargin-right: 24px;\r\n}\r\n\r\n.monaco-editor .suggest-details>.monaco-scrollable-element>.body>.docs.markdown-docs {\r\n\tpadding: 0;\r\n\twhite-space: initial;\r\n\tmin-height: calc(1rem + 8px);\r\n}\r\n\r\n.monaco-editor .suggest-details>.monaco-scrollable-element>.body>.docs.markdown-docs>div,\r\n.monaco-editor .suggest-details>.monaco-scrollable-element>.body>.docs.markdown-docs>span:not(:empty) {\r\n\tpadding: 4px 5px;\r\n}\r\n\r\n.monaco-editor .suggest-details>.monaco-scrollable-element>.body>.docs.markdown-docs>div>p:first-child {\r\n\tmargin-top: 0;\r\n}\r\n\r\n.monaco-editor .suggest-details>.monaco-scrollable-element>.body>.docs.markdown-docs>div>p:last-child {\r\n\tmargin-bottom: 0;\r\n}\r\n\r\n.monaco-editor .suggest-details>.monaco-scrollable-element>.body>.docs .code {\r\n\twhite-space: pre-wrap;\r\n\tword-wrap: break-word;\r\n}\r\n\r\n.monaco-editor .suggest-details>.monaco-scrollable-element>.body>.docs.markdown-docs .codicon {\r\n\tvertical-align: sub;\r\n}\r\n\r\n.monaco-editor .suggest-details>.monaco-scrollable-element>.body>p:empty {\r\n\tdisplay: none;\r\n}\r\n\r\n.monaco-editor .suggest-details code {\r\n\tborder-radius: 3px;\r\n\tpadding: 0 0.4em;\r\n}\r\n\r\n.monaco-editor .suggest-details ul {\r\n\tpadding-left: 20px;\r\n}\r\n\r\n.monaco-editor .suggest-details ol {\r\n\tpadding-left: 20px;\r\n}\r\n\r\n.monaco-editor .suggest-details p code {\r\n\tfont-family: var(--monaco-monospace-font);\r\n}\r\n"],sourceRoot:""}]);const a=s},6458:(e,t,n)=>{"use strict";n.d(t,{Z:()=>a});var i=n(7537),o=n.n(i),r=n(3645),s=n.n(r)()(o());s.push([e.id,"/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n.monaco-editor .zone-widget {\r\n\tposition: absolute;\r\n\tz-index: 10;\r\n}\r\n\r\n\r\n.monaco-editor .zone-widget .zone-widget-container {\r\n\tborder-top-style: solid;\r\n\tborder-bottom-style: solid;\r\n\tborder-top-width: 0;\r\n\tborder-bottom-width: 0;\r\n\tposition: relative;\r\n}\r\n","",{version:3,sources:["webpack://./node_modules/monaco-editor/esm/vs/editor/contrib/zoneWidget/zoneWidget.css"],names:[],mappings:"AAAA;;;+FAG+F;AAC/F;CACC,kBAAkB;CAClB,WAAW;AACZ;;;AAGA;CACC,uBAAuB;CACvB,0BAA0B;CAC1B,mBAAmB;CACnB,sBAAsB;CACtB,kBAAkB;AACnB",sourcesContent:["/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n.monaco-editor .zone-widget {\r\n\tposition: absolute;\r\n\tz-index: 10;\r\n}\r\n\r\n\r\n.monaco-editor .zone-widget .zone-widget-container {\r\n\tborder-top-style: solid;\r\n\tborder-bottom-style: solid;\r\n\tborder-top-width: 0;\r\n\tborder-bottom-width: 0;\r\n\tposition: relative;\r\n}\r\n"],sourceRoot:""}]);const a=s},8844:(e,t,n)=>{"use strict";n.d(t,{Z:()=>a});var i=n(7537),o=n.n(i),r=n(3645),s=n.n(r)()(o());s.push([e.id,"/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n.monaco-editor .accessibilityHelpWidget {\r\n\tpadding: 10px;\r\n\tvertical-align: middle;\r\n\toverflow: scroll;\r\n}","",{version:3,sources:["webpack://./node_modules/monaco-editor/esm/vs/editor/standalone/browser/accessibilityHelp/accessibilityHelp.css"],names:[],mappings:"AAAA;;;+FAG+F;;AAE/F;CACC,aAAa;CACb,sBAAsB;CACtB,gBAAgB;AACjB",sourcesContent:["/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n.monaco-editor .accessibilityHelpWidget {\r\n\tpadding: 10px;\r\n\tvertical-align: middle;\r\n\toverflow: scroll;\r\n}"],sourceRoot:""}]);const a=s},1556:(e,t,n)=>{"use strict";n.d(t,{Z:()=>p});var i=n(7537),o=n.n(i),r=n(3645),s=n.n(r),a=n(1667),l=n.n(a),d=new URL(n(2766),n.b),c=new URL(n(1568),n.b),h=s()(o()),u=l()(d),g=l()(c);h.push([e.id,"/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n.monaco-editor .iPadShowKeyboard {\r\n\twidth: 58px;\r\n\tmin-width: 0;\r\n\theight: 36px;\r\n\tmin-height: 0;\r\n\tmargin: 0;\r\n\tpadding: 0;\r\n\tposition: absolute;\r\n\tresize: none;\r\n\toverflow: hidden;\r\n\tbackground: url("+u+") center center no-repeat;\r\n\tborder: 4px solid #F6F6F6;\r\n\tborder-radius: 4px;\r\n}\r\n\r\n.monaco-editor.vs-dark .iPadShowKeyboard {\r\n\tbackground: url("+g+") center center no-repeat;\r\n\tborder: 4px solid #252526;\r\n}","",{version:3,sources:["webpack://./node_modules/monaco-editor/esm/vs/editor/standalone/browser/iPadShowKeyboard/iPadShowKeyboard.css"],names:[],mappings:"AAAA;;;+FAG+F;;AAE/F;CACC,WAAW;CACX,YAAY;CACZ,YAAY;CACZ,aAAa;CACb,SAAS;CACT,UAAU;CACV,kBAAkB;CAClB,YAAY;CACZ,gBAAgB;CAChB,2EAAioD;CACjoD,yBAAyB;CACzB,kBAAkB;AACnB;;AAEA;CACC,2EAAioD;CACjoD,yBAAyB;AAC1B",sourcesContent:['/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n.monaco-editor .iPadShowKeyboard {\r\n\twidth: 58px;\r\n\tmin-width: 0;\r\n\theight: 36px;\r\n\tmin-height: 0;\r\n\tmargin: 0;\r\n\tpadding: 0;\r\n\tposition: absolute;\r\n\tresize: none;\r\n\toverflow: hidden;\r\n\tbackground: url("data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTMiIGhlaWdodD0iMzYiIHZpZXdCb3g9IjAgMCA1MyAzNiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4NCjxnIGNsaXAtcGF0aD0idXJsKCNjbGlwMCkiPg0KPHBhdGggZmlsbC1ydWxlPSJldmVub2RkIiBjbGlwLXJ1bGU9ImV2ZW5vZGQiIGQ9Ik00OC4wMzY0IDQuMDEwNDJINC4wMDc3OUw0LjAwNzc5IDMyLjAyODZINDguMDM2NFY0LjAxMDQyWk00LjAwNzc5IDAuMDA3ODEyNUMxLjc5NzIxIDAuMDA3ODEyNSAwLjAwNTE4Nzk5IDEuNzk5ODQgMC4wMDUxODc5OSA0LjAxMDQyVjMyLjA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TMwMkgyOC4wMjM0VjEyLjAxNTZIMjQuMDIwOFY4LjAxMzAyWk0zNi4wMjg2IDguMDEzMDJIMzIuMDI2VjEyLjAxNTZIMzYuMDI4NlY4LjAxMzAyWk00MC4wMzEyIDguMDEzMDJINDQuMDMzOVYxMi4wMTU2SDQwLjAzMTJWOC4wMTMwMlpNMTYuMDE1NiAxNi4wMTgySDguMDEwNDJWMjAuMDIwOEgxNi4wMTU2VjE2LjAxODJaTTIwLjAxODIgMTYuMDE4MkgyNC4wMjA4VjIwLjAyMDhIMjAuMDE4MlYxNi4wMTgyWk0zMi4wMjYgMTYuMDE4MkgyOC4wMjM0VjIwLjAyMDhIMzIuMDI2VjE2LjAxODJaTTQ0LjAzMzkgMTYuMDE4MlYyMC4wMjA4SDM2LjAyODZWMTYuMDE4Mkg0NC4wMzM5Wk0xMi4wMTMgMjQuMDIzNEg4LjAxMDQyVjI4LjAyNkgxMi4wMTNWMjQuMDIzNFpNMTYuMDE1NiAyNC4wMjM0SDM2LjAyODZWMjguMDI2SDE2LjAxNTZWMjQuMDIzNFpNNDQuMDMzOSAyNC4wMjM0SDQwLjAzMTJWMjguMDI2SDQ0LjAzMzlWMjQuMDIzNFoiIGZpbGw9IiNDNUM1QzUiLz4NCjwvZz4NCjxkZWZzPg0KPGNsaXBQYXRoIGlkPSJjbGlwMCI+DQo8cmVjdCB3aWR0aD0iNTMiIGhlaWdodD0iMzYiIGZpbGw9IndoaXRlIi8+DQo8L2NsaXBQYXRoPg0KPC9kZWZzPg0KPC9zdmc+DQo=") center center no-repeat;\r\n\tborder: 4px solid #252526;\r\n}'],sourceRoot:""}]);const p=h},5189:(e,t,n)=>{"use strict";n.d(t,{Z:()=>a});var i=n(7537),o=n.n(i),r=n(3645),s=n.n(r)()(o());s.push([e.id,"/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n.monaco-editor .tokens-inspect-widget {\r\n\tz-index: 50;\r\n\tuser-select: text;\r\n\t-webkit-user-select: text;\r\n\t-ms-user-select: text;\r\n\tpadding: 10px;\r\n}\r\n\r\n.tokens-inspect-separator {\r\n\theight: 1px;\r\n\tborder: 0;\r\n}\r\n\r\n.monaco-editor .tokens-inspect-widget .tm-token {\r\n\tfont-family: var(--monaco-monospace-font);\r\n}\r\n\r\n.monaco-editor .tokens-inspect-widget .tm-token-length {\r\n\tfont-weight: normal;\r\n\tfont-size: 60%;\r\n\tfloat: right;\r\n}\r\n\r\n.monaco-editor .tokens-inspect-widget .tm-metadata-table {\r\n\twidth: 100%;\r\n}\r\n\r\n.monaco-editor .tokens-inspect-widget .tm-metadata-value {\r\n\tfont-family: var(--monaco-monospace-font);\r\n\ttext-align: right;\r\n}\r\n\r\n.monaco-editor .tokens-inspect-widget .tm-token-type {\r\n\tfont-family: var(--monaco-monospace-font);\r\n}\r\n","",{version:3,sources:["webpack://./node_modules/monaco-editor/esm/vs/editor/standalone/browser/inspectTokens/inspectTokens.css"],names:[],mappings:"AAAA;;;+FAG+F;;AAE/F;CACC,WAAW;CACX,iBAAiB;CACjB,yBAAyB;CACzB,qBAAqB;CACrB,aAAa;AACd;;AAEA;CACC,WAAW;CACX,SAAS;AACV;;AAEA;CACC,yCAAyC;AAC1C;;AAEA;CACC,mBAAmB;CACnB,cAAc;CACd,YAAY;AACb;;AAEA;CACC,WAAW;AACZ;;AAEA;CACC,yCAAyC;CACzC,iBAAiB;AAClB;;AAEA;CACC,yCAAyC;AAC1C",sourcesContent:["/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n.monaco-editor .tokens-inspect-widget {\r\n\tz-index: 50;\r\n\tuser-select: text;\r\n\t-webkit-user-select: text;\r\n\t-ms-user-select: text;\r\n\tpadding: 10px;\r\n}\r\n\r\n.tokens-inspect-separator {\r\n\theight: 1px;\r\n\tborder: 0;\r\n}\r\n\r\n.monaco-editor .tokens-inspect-widget .tm-token {\r\n\tfont-family: var(--monaco-monospace-font);\r\n}\r\n\r\n.monaco-editor .tokens-inspect-widget .tm-token-length {\r\n\tfont-weight: normal;\r\n\tfont-size: 60%;\r\n\tfloat: right;\r\n}\r\n\r\n.monaco-editor .tokens-inspect-widget .tm-metadata-table {\r\n\twidth: 100%;\r\n}\r\n\r\n.monaco-editor .tokens-inspect-widget .tm-metadata-value {\r\n\tfont-family: var(--monaco-monospace-font);\r\n\ttext-align: right;\r\n}\r\n\r\n.monaco-editor .tokens-inspect-widget .tm-token-type {\r\n\tfont-family: var(--monaco-monospace-font);\r\n}\r\n"],sourceRoot:""}]);const a=s},3198:(e,t,n)=>{"use strict";n.d(t,{Z:()=>a});var i=n(7537),o=n.n(i),r=n(3645),s=n.n(r)()(o());s.push([e.id,"/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n.quick-input-widget {\r\n\tfont-size: 13px;\r\n}\r\n\r\n.quick-input-widget .monaco-highlighted-label .highlight,\r\n.quick-input-widget .monaco-highlighted-label .highlight {\r\n\tcolor: #0066BF;\r\n}\r\n\r\n.vs .quick-input-widget .monaco-list-row.focused .monaco-highlighted-label .highlight,\r\n.vs .quick-input-widget .monaco-list-row.focused .monaco-highlighted-label .highlight {\r\n\tcolor: #9DDDFF;\r\n}\r\n\r\n.vs-dark .quick-input-widget .monaco-highlighted-label .highlight,\r\n.vs-dark .quick-input-widget .monaco-highlighted-label .highlight {\r\n\tcolor: #0097fb;\r\n}\r\n\r\n.hc-black .quick-input-widget .monaco-highlighted-label .highlight,\r\n.hc-black .quick-input-widget .monaco-highlighted-label .highlight {\r\n\tcolor: #F38518;\r\n}\r\n\r\n.monaco-keybinding > .monaco-keybinding-key {\r\n\tbackground-color: rgba(221, 221, 221, 0.4);\r\n\tborder: solid 1px rgba(204, 204, 204, 0.4);\r\n\tborder-bottom-color: rgba(187, 187, 187, 0.4);\r\n\tbox-shadow: inset 0 -1px 0 rgba(187, 187, 187, 0.4);\r\n\tcolor: #555;\r\n}\r\n\r\n.hc-black .monaco-keybinding > .monaco-keybinding-key {\r\n\tbackground-color: transparent;\r\n\tborder: solid 1px rgb(111, 195, 223);\r\n\tbox-shadow: none;\r\n\tcolor: #fff;\r\n}\r\n\r\n.vs-dark .monaco-keybinding > .monaco-keybinding-key {\r\n\tbackground-color: rgba(128, 128, 128, 0.17);\r\n\tborder: solid 1px rgba(51, 51, 51, 0.6);\r\n\tborder-bottom-color: rgba(68, 68, 68, 0.6);\r\n\tbox-shadow: inset 0 -1px 0 rgba(68, 68, 68, 0.6);\r\n\tcolor: #ccc;\r\n}\r\n","",{version:3,sources:["webpack://./node_modules/monaco-editor/esm/vs/editor/standalone/browser/quickInput/standaloneQuickInput.css"],names:[],mappings:"AAAA;;;+FAG+F;;AAE/F;CACC,eAAe;AAChB;;AAEA;;CAEC,cAAc;AACf;;AAEA;;CAEC,cAAc;AACf;;AAEA;;CAEC,cAAc;AACf;;AAEA;;CAEC,cAAc;AACf;;AAEA;CACC,0CAA0C;CAC1C,0CAA0C;CAC1C,6CAA6C;CAC7C,mDAAmD;CACnD,WAAW;AACZ;;AAEA;CACC,6BAA6B;CAC7B,oCAAoC;CACpC,gBAAgB;CAChB,WAAW;AACZ;;AAEA;CACC,2CAA2C;CAC3C,uCAAuC;CACvC,0CAA0C;CAC1C,gDAAgD;CAChD,WAAW;AACZ",sourcesContent:["/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n.quick-input-widget {\r\n\tfont-size: 13px;\r\n}\r\n\r\n.quick-input-widget .monaco-highlighted-label .highlight,\r\n.quick-input-widget .monaco-highlighted-label .highlight {\r\n\tcolor: #0066BF;\r\n}\r\n\r\n.vs .quick-input-widget .monaco-list-row.focused .monaco-highlighted-label .highlight,\r\n.vs .quick-input-widget .monaco-list-row.focused .monaco-highlighted-label .highlight {\r\n\tcolor: #9DDDFF;\r\n}\r\n\r\n.vs-dark .quick-input-widget .monaco-highlighted-label .highlight,\r\n.vs-dark .quick-input-widget .monaco-highlighted-label .highlight {\r\n\tcolor: #0097fb;\r\n}\r\n\r\n.hc-black .quick-input-widget .monaco-highlighted-label .highlight,\r\n.hc-black .quick-input-widget .monaco-highlighted-label .highlight {\r\n\tcolor: #F38518;\r\n}\r\n\r\n.monaco-keybinding > .monaco-keybinding-key {\r\n\tbackground-color: rgba(221, 221, 221, 0.4);\r\n\tborder: solid 1px rgba(204, 204, 204, 0.4);\r\n\tborder-bottom-color: rgba(187, 187, 187, 0.4);\r\n\tbox-shadow: inset 0 -1px 0 rgba(187, 187, 187, 0.4);\r\n\tcolor: #555;\r\n}\r\n\r\n.hc-black .monaco-keybinding > .monaco-keybinding-key {\r\n\tbackground-color: transparent;\r\n\tborder: solid 1px rgb(111, 195, 223);\r\n\tbox-shadow: none;\r\n\tcolor: #fff;\r\n}\r\n\r\n.vs-dark .monaco-keybinding > .monaco-keybinding-key {\r\n\tbackground-color: rgba(128, 128, 128, 0.17);\r\n\tborder: solid 1px rgba(51, 51, 51, 0.6);\r\n\tborder-bottom-color: rgba(68, 68, 68, 0.6);\r\n\tbox-shadow: inset 0 -1px 0 rgba(68, 68, 68, 0.6);\r\n\tcolor: #ccc;\r\n}\r\n"],sourceRoot:""}]);const a=s},643:(e,t,n)=>{"use strict";n.d(t,{Z:()=>a});var i=n(7537),o=n.n(i),r=n(3645),s=n.n(r)()(o());s.push([e.id,'/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n\r\n/* Default standalone editor fonts */\r\n.monaco-editor {\r\n\tfont-family: -apple-system, BlinkMacSystemFont, "Segoe WPC", "Segoe UI", "HelveticaNeue-Light", system-ui, "Ubuntu", "Droid Sans", sans-serif;\r\n\t--monaco-monospace-font: "SF Mono", Monaco, Menlo, Consolas, "Ubuntu Mono", "Liberation Mono", "DejaVu Sans Mono", "Courier New", monospace;\r\n}\r\n\r\n.monaco-menu .monaco-action-bar.vertical .action-item .action-menu-item:focus .action-label {\r\n\tstroke-width: 1.2px;\r\n}\r\n\r\n.monaco-editor.vs-dark .monaco-menu .monaco-action-bar.vertical .action-menu-item:focus .action-label,\r\n.monaco-editor.hc-black .monaco-menu .monaco-action-bar.vertical .action-menu-item:focus .action-label {\r\n\tstroke-width: 1.2px;\r\n}\r\n\r\n.monaco-hover p {\r\n\tmargin: 0;\r\n}\r\n\r\n/* See https://github.com/microsoft/monaco-editor/issues/2168#issuecomment-780078600 */\r\n.monaco-aria-container {\r\n\tposition: absolute !important;\r\n\ttop: 0; /* avoid being placed underneath a sibling element */\r\n\theight: 1px;\r\n\twidth: 1px;\r\n\tmargin: -1px;\r\n\toverflow: hidden;\r\n\tpadding: 0;\r\n\tclip: rect(1px, 1px, 1px, 1px);\r\n\tclip-path: inset(50%);\r\n}\r\n\r\n/* The hc-black theme is already high contrast optimized */\r\n.monaco-editor.hc-black {\r\n\t-ms-high-contrast-adjust: none;\r\n}\r\n/* In case the browser goes into high contrast mode and the editor is not configured with the hc-black theme */\r\n@media screen and (-ms-high-contrast:active) {\r\n\r\n\t/* current line highlight */\r\n\t.monaco-editor.vs .view-overlays .current-line,\r\n\t.monaco-editor.vs-dark .view-overlays .current-line {\r\n\t\tborder-color: windowtext !important;\r\n\t\tborder-left: 0;\r\n\t\tborder-right: 0;\r\n\t}\r\n\r\n\t/* view cursors */\r\n\t.monaco-editor.vs .cursor,\r\n\t.monaco-editor.vs-dark .cursor {\r\n\t\tbackground-color: windowtext !important;\r\n\t}\r\n\t/* dnd target */\r\n\t.monaco-editor.vs .dnd-target,\r\n\t.monaco-editor.vs-dark .dnd-target {\r\n\t\tborder-color: windowtext !important;\r\n\t}\r\n\r\n\t/* selected text background */\r\n\t.monaco-editor.vs .selected-text,\r\n\t.monaco-editor.vs-dark .selected-text {\r\n\t\tbackground-color: highlight !important;\r\n\t}\r\n\r\n\t/* allow the text to have a transparent background. */\r\n\t.monaco-editor.vs .view-line,\r\n\t.monaco-editor.vs-dark .view-line {\r\n\t\t-ms-high-contrast-adjust: none;\r\n\t}\r\n\r\n\t/* text color */\r\n\t.monaco-editor.vs .view-line span,\r\n\t.monaco-editor.vs-dark .view-line span {\r\n\t\tcolor: windowtext !important;\r\n\t}\r\n\t/* selected text color */\r\n\t.monaco-editor.vs .view-line span.inline-selected-text,\r\n\t.monaco-editor.vs-dark .view-line span.inline-selected-text {\r\n\t\tcolor: highlighttext !important;\r\n\t}\r\n\r\n\t/* allow decorations */\r\n\t.monaco-editor.vs .view-overlays,\r\n\t.monaco-editor.vs-dark .view-overlays {\r\n\t\t-ms-high-contrast-adjust: none;\r\n\t}\r\n\r\n\t/* various decorations */\r\n\t.monaco-editor.vs .selectionHighlight,\r\n\t.monaco-editor.vs-dark .selectionHighlight,\r\n\t.monaco-editor.vs .wordHighlight,\r\n\t.monaco-editor.vs-dark .wordHighlight,\r\n\t.monaco-editor.vs .wordHighlightStrong,\r\n\t.monaco-editor.vs-dark .wordHighlightStrong,\r\n\t.monaco-editor.vs .reference-decoration,\r\n\t.monaco-editor.vs-dark .reference-decoration {\r\n\t\tborder: 2px dotted highlight !important;\r\n\t\tbackground: transparent !important;\r\n\t\tbox-sizing: border-box;\r\n\t}\r\n\t.monaco-editor.vs .rangeHighlight,\r\n\t.monaco-editor.vs-dark .rangeHighlight {\r\n\t\tbackground: transparent !important;\r\n\t\tborder: 1px dotted activeborder !important;\r\n\t\tbox-sizing: border-box;\r\n\t}\r\n\t.monaco-editor.vs .bracket-match,\r\n\t.monaco-editor.vs-dark .bracket-match {\r\n\t\tborder-color: windowtext !important;\r\n\t\tbackground: transparent !important;\r\n\t}\r\n\r\n\t/* find widget */\r\n\t.monaco-editor.vs .findMatch,\r\n\t.monaco-editor.vs-dark .findMatch,\r\n\t.monaco-editor.vs .currentFindMatch,\r\n\t.monaco-editor.vs-dark .currentFindMatch {\r\n\t\tborder: 2px dotted activeborder !important;\r\n\t\tbackground: transparent !important;\r\n\t\tbox-sizing: border-box;\r\n\t}\r\n\t.monaco-editor.vs .find-widget,\r\n\t.monaco-editor.vs-dark .find-widget {\r\n\t\tborder: 1px solid windowtext;\r\n\t}\r\n\r\n\t/* list - used by suggest widget */\r\n\t.monaco-editor.vs .monaco-list .monaco-list-row,\r\n\t.monaco-editor.vs-dark .monaco-list .monaco-list-row {\r\n\t\t-ms-high-contrast-adjust: none;\r\n\t\tcolor: windowtext !important;\r\n\t}\r\n\t.monaco-editor.vs .monaco-list .monaco-list-row.focused,\r\n\t.monaco-editor.vs-dark .monaco-list .monaco-list-row.focused {\r\n\t\tcolor: highlighttext !important;\r\n\t\tbackground-color: highlight !important;\r\n\t}\r\n\t.monaco-editor.vs .monaco-list .monaco-list-row:hover,\r\n\t.monaco-editor.vs-dark .monaco-list .monaco-list-row:hover {\r\n\t\tbackground: transparent !important;\r\n\t\tborder: 1px solid highlight;\r\n\t\tbox-sizing: border-box;\r\n\t}\r\n\r\n\t/* scrollbars */\r\n\t.monaco-editor.vs .monaco-scrollable-element > .scrollbar,\r\n\t.monaco-editor.vs-dark .monaco-scrollable-element > .scrollbar {\r\n\t\t-ms-high-contrast-adjust: none;\r\n\t\tbackground: background !important;\r\n\t\tborder: 1px solid windowtext;\r\n\t\tbox-sizing: border-box;\r\n\t}\r\n\t.monaco-editor.vs .monaco-scrollable-element > .scrollbar > .slider,\r\n\t.monaco-editor.vs-dark .monaco-scrollable-element > .scrollbar > .slider {\r\n\t\tbackground: windowtext !important;\r\n\t}\r\n\t.monaco-editor.vs .monaco-scrollable-element > .scrollbar > .slider:hover,\r\n\t.monaco-editor.vs-dark .monaco-scrollable-element > .scrollbar > .slider:hover {\r\n\t\tbackground: highlight !important;\r\n\t}\r\n\t.monaco-editor.vs .monaco-scrollable-element > .scrollbar > .slider.active,\r\n\t.monaco-editor.vs-dark .monaco-scrollable-element > .scrollbar > .slider.active {\r\n\t\tbackground: highlight !important;\r\n\t}\r\n\r\n\t/* overview ruler */\r\n\t.monaco-editor.vs .decorationsOverviewRuler,\r\n\t.monaco-editor.vs-dark .decorationsOverviewRuler {\r\n\t\topacity: 0;\r\n\t}\r\n\r\n\t/* minimap */\r\n\t.monaco-editor.vs .minimap,\r\n\t.monaco-editor.vs-dark .minimap {\r\n\t\tdisplay: none;\r\n\t}\r\n\r\n\t/* squiggles */\r\n\t.monaco-editor.vs .squiggly-d-error,\r\n\t.monaco-editor.vs-dark .squiggly-d-error {\r\n\t\tbackground: transparent !important;\r\n\t\tborder-bottom: 4px double #E47777;\r\n\t}\r\n\t.monaco-editor.vs .squiggly-c-warning,\r\n\t.monaco-editor.vs-dark .squiggly-c-warning {\r\n\t\tborder-bottom: 4px double #71B771;\r\n\t}\r\n\t.monaco-editor.vs .squiggly-b-info,\r\n\t.monaco-editor.vs-dark .squiggly-b-info {\r\n\t\tborder-bottom: 4px double #71B771;\r\n\t}\r\n\t.monaco-editor.vs .squiggly-a-hint,\r\n\t.monaco-editor.vs-dark .squiggly-a-hint {\r\n\t\tborder-bottom: 4px double #6c6c6c;\r\n\t}\r\n\r\n\t/* contextmenu */\r\n\t.monaco-editor.vs .monaco-menu .monaco-action-bar.vertical .action-menu-item:focus .action-label,\r\n\t.monaco-editor.vs-dark .monaco-menu .monaco-action-bar.vertical .action-menu-item:focus .action-label {\r\n\t\t-ms-high-contrast-adjust: none;\r\n\t\tcolor: highlighttext !important;\r\n\t\tbackground-color: highlight !important;\r\n\t}\r\n\t.monaco-editor.vs .monaco-menu .monaco-action-bar.vertical .action-menu-item:hover .action-label,\r\n\t.monaco-editor.vs-dark .monaco-menu .monaco-action-bar.vertical .action-menu-item:hover .action-label {\r\n\t\t-ms-high-contrast-adjust: none;\r\n\t\tbackground: transparent !important;\r\n\t\tborder: 1px solid highlight;\r\n\t\tbox-sizing: border-box;\r\n\t}\r\n\r\n\t/* diff editor */\r\n\t.monaco-diff-editor.vs .diffOverviewRuler,\r\n\t.monaco-diff-editor.vs-dark .diffOverviewRuler {\r\n\t\tdisplay: none;\r\n\t}\r\n\t.monaco-editor.vs .line-insert,\r\n\t.monaco-editor.vs-dark .line-insert,\r\n\t.monaco-editor.vs .line-delete,\r\n\t.monaco-editor.vs-dark .line-delete {\r\n\t\tbackground: transparent !important;\r\n\t\tborder: 1px solid highlight !important;\r\n\t\tbox-sizing: border-box;\r\n\t}\r\n\t.monaco-editor.vs .char-insert,\r\n\t.monaco-editor.vs-dark .char-insert,\r\n\t.monaco-editor.vs .char-delete,\r\n\t.monaco-editor.vs-dark .char-delete {\r\n\t\tbackground: transparent !important;\r\n\t}\r\n}\r\n\r\n/*.monaco-editor.vs [tabindex="0"]:focus {\r\n\toutline: 1px solid rgba(0, 122, 204, 0.4);\r\n\toutline-offset: -1px;\r\n\topacity: 1 !important;\r\n}\r\n\r\n.monaco-editor.vs-dark [tabindex="0"]:focus {\r\n\toutline: 1px solid rgba(14, 99, 156, 0.6);\r\n\toutline-offset: -1px;\r\n\topacity: 1 !important;\r\n}*/\r\n',"",{version:3,sources:["webpack://./node_modules/monaco-editor/esm/vs/editor/standalone/browser/standalone-tokens.css"],names:[],mappings:"AAAA;;;+FAG+F;;;AAG/F,oCAAoC;AACpC;CACC,6IAA6I;CAC7I,2IAA2I;AAC5I;;AAEA;CACC,mBAAmB;AACpB;;AAEA;;CAEC,mBAAmB;AACpB;;AAEA;CACC,SAAS;AACV;;AAEA,sFAAsF;AACtF;CACC,6BAA6B;CAC7B,MAAM,EAAE,oDAAoD;CAC5D,WAAW;CACX,UAAU;CACV,YAAY;CACZ,gBAAgB;CAChB,UAAU;CACV,8BAA8B;CAC9B,qBAAqB;AACtB;;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C;CAClC;;CAEA,gBAAgB;CAChB;;EAEC,8BAA8B;EAC9B,+BAA+B;EAC/B,sCAAsC;CACvC;CACA;;EAEC,8BAA8B;EAC9B,kCAAkC;EAClC,2BAA2B;EAC3B,sBAAsB;CACvB;;CAEA,gBAAgB;CAChB;;EAEC,aAAa;CACd;CACA;;;;EAIC,kCAAkC;EAClC,sCAAsC;EACtC,sBAAsB;CACvB;CACA;;;;EAIC,kCAAkC;CACnC;AACD;;AAEA;;;;;;;;;;EAUE",sourcesContent:['/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n\r\n/* Default standalone editor fonts */\r\n.monaco-editor {\r\n\tfont-family: -apple-system, BlinkMacSystemFont, "Segoe WPC", "Segoe UI", "HelveticaNeue-Light", system-ui, "Ubuntu", "Droid Sans", sans-serif;\r\n\t--monaco-monospace-font: "SF Mono", Monaco, Menlo, Consolas, "Ubuntu Mono", "Liberation Mono", "DejaVu Sans Mono", "Courier New", monospace;\r\n}\r\n\r\n.monaco-menu .monaco-action-bar.vertical .action-item .action-menu-item:focus .action-label {\r\n\tstroke-width: 1.2px;\r\n}\r\n\r\n.monaco-editor.vs-dark .monaco-menu .monaco-action-bar.vertical .action-menu-item:focus .action-label,\r\n.monaco-editor.hc-black .monaco-menu .monaco-action-bar.vertical .action-menu-item:focus .action-label {\r\n\tstroke-width: 1.2px;\r\n}\r\n\r\n.monaco-hover p {\r\n\tmargin: 0;\r\n}\r\n\r\n/* See https://github.com/microsoft/monaco-editor/issues/2168#issuecomment-780078600 */\r\n.monaco-aria-container {\r\n\tposition: absolute !important;\r\n\ttop: 0; /* avoid being placed underneath a sibling element */\r\n\theight: 1px;\r\n\twidth: 1px;\r\n\tmargin: -1px;\r\n\toverflow: hidden;\r\n\tpadding: 0;\r\n\tclip: rect(1px, 1px, 1px, 1px);\r\n\tclip-path: inset(50%);\r\n}\r\n\r\n/* The hc-black theme is already high contrast optimized */\r\n.monaco-editor.hc-black {\r\n\t-ms-high-contrast-adjust: none;\r\n}\r\n/* In case the browser goes into high contrast mode and the editor is not configured with the hc-black theme */\r\n@media screen and (-ms-high-contrast:active) {\r\n\r\n\t/* current line highlight */\r\n\t.monaco-editor.vs .view-overlays .current-line,\r\n\t.monaco-editor.vs-dark .view-overlays .current-line {\r\n\t\tborder-color: windowtext !important;\r\n\t\tborder-left: 0;\r\n\t\tborder-right: 0;\r\n\t}\r\n\r\n\t/* view cursors */\r\n\t.monaco-editor.vs .cursor,\r\n\t.monaco-editor.vs-dark .cursor {\r\n\t\tbackground-color: windowtext !important;\r\n\t}\r\n\t/* dnd target */\r\n\t.monaco-editor.vs .dnd-target,\r\n\t.monaco-editor.vs-dark .dnd-target {\r\n\t\tborder-color: windowtext !important;\r\n\t}\r\n\r\n\t/* selected text background */\r\n\t.monaco-editor.vs .selected-text,\r\n\t.monaco-editor.vs-dark .selected-text {\r\n\t\tbackground-color: highlight !important;\r\n\t}\r\n\r\n\t/* allow the text to have a transparent background. */\r\n\t.monaco-editor.vs .view-line,\r\n\t.monaco-editor.vs-dark .view-line {\r\n\t\t-ms-high-contrast-adjust: none;\r\n\t}\r\n\r\n\t/* text color */\r\n\t.monaco-editor.vs .view-line span,\r\n\t.monaco-editor.vs-dark .view-line span {\r\n\t\tcolor: windowtext !important;\r\n\t}\r\n\t/* selected text color */\r\n\t.monaco-editor.vs .view-line span.inline-selected-text,\r\n\t.monaco-editor.vs-dark .view-line span.inline-selected-text {\r\n\t\tcolor: highlighttext !important;\r\n\t}\r\n\r\n\t/* allow decorations */\r\n\t.monaco-editor.vs .view-overlays,\r\n\t.monaco-editor.vs-dark .view-overlays {\r\n\t\t-ms-high-contrast-adjust: none;\r\n\t}\r\n\r\n\t/* various decorations */\r\n\t.monaco-editor.vs .selectionHighlight,\r\n\t.monaco-editor.vs-dark .selectionHighlight,\r\n\t.monaco-editor.vs .wordHighlight,\r\n\t.monaco-editor.vs-dark .wordHighlight,\r\n\t.monaco-editor.vs .wordHighlightStrong,\r\n\t.monaco-editor.vs-dark .wordHighlightStrong,\r\n\t.monaco-editor.vs .reference-decoration,\r\n\t.monaco-editor.vs-dark .reference-decoration {\r\n\t\tborder: 2px dotted highlight !important;\r\n\t\tbackground: transparent !important;\r\n\t\tbox-sizing: border-box;\r\n\t}\r\n\t.monaco-editor.vs .rangeHighlight,\r\n\t.monaco-editor.vs-dark .rangeHighlight {\r\n\t\tbackground: transparent !important;\r\n\t\tborder: 1px dotted activeborder !important;\r\n\t\tbox-sizing: border-box;\r\n\t}\r\n\t.monaco-editor.vs .bracket-match,\r\n\t.monaco-editor.vs-dark .bracket-match {\r\n\t\tborder-color: windowtext !important;\r\n\t\tbackground: transparent !important;\r\n\t}\r\n\r\n\t/* find widget */\r\n\t.monaco-editor.vs .findMatch,\r\n\t.monaco-editor.vs-dark .findMatch,\r\n\t.monaco-editor.vs .currentFindMatch,\r\n\t.monaco-editor.vs-dark .currentFindMatch {\r\n\t\tborder: 2px dotted activeborder !important;\r\n\t\tbackground: transparent !important;\r\n\t\tbox-sizing: border-box;\r\n\t}\r\n\t.monaco-editor.vs .find-widget,\r\n\t.monaco-editor.vs-dark .find-widget {\r\n\t\tborder: 1px solid windowtext;\r\n\t}\r\n\r\n\t/* list - used by suggest widget */\r\n\t.monaco-editor.vs .monaco-list .monaco-list-row,\r\n\t.monaco-editor.vs-dark .monaco-list .monaco-list-row {\r\n\t\t-ms-high-contrast-adjust: none;\r\n\t\tcolor: windowtext !important;\r\n\t}\r\n\t.monaco-editor.vs .monaco-list .monaco-list-row.focused,\r\n\t.monaco-editor.vs-dark .monaco-list .monaco-list-row.focused {\r\n\t\tcolor: highlighttext !important;\r\n\t\tbackground-color: highlight !important;\r\n\t}\r\n\t.monaco-editor.vs .monaco-list .monaco-list-row:hover,\r\n\t.monaco-editor.vs-dark .monaco-list .monaco-list-row:hover {\r\n\t\tbackground: transparent !important;\r\n\t\tborder: 1px solid highlight;\r\n\t\tbox-sizing: border-box;\r\n\t}\r\n\r\n\t/* scrollbars */\r\n\t.monaco-editor.vs .monaco-scrollable-element > .scrollbar,\r\n\t.monaco-editor.vs-dark .monaco-scrollable-element > .scrollbar {\r\n\t\t-ms-high-contrast-adjust: none;\r\n\t\tbackground: background !important;\r\n\t\tborder: 1px solid windowtext;\r\n\t\tbox-sizing: border-box;\r\n\t}\r\n\t.monaco-editor.vs .monaco-scrollable-element > .scrollbar > .slider,\r\n\t.monaco-editor.vs-dark .monaco-scrollable-element > .scrollbar > .slider {\r\n\t\tbackground: windowtext !important;\r\n\t}\r\n\t.monaco-editor.vs .monaco-scrollable-element > .scrollbar > .slider:hover,\r\n\t.monaco-editor.vs-dark .monaco-scrollable-element > .scrollbar > .slider:hover {\r\n\t\tbackground: highlight !important;\r\n\t}\r\n\t.monaco-editor.vs .monaco-scrollable-element > .scrollbar > .slider.active,\r\n\t.monaco-editor.vs-dark .monaco-scrollable-element > .scrollbar > .slider.active {\r\n\t\tbackground: highlight !important;\r\n\t}\r\n\r\n\t/* overview ruler */\r\n\t.monaco-editor.vs .decorationsOverviewRuler,\r\n\t.monaco-editor.vs-dark .decorationsOverviewRuler {\r\n\t\topacity: 0;\r\n\t}\r\n\r\n\t/* minimap */\r\n\t.monaco-editor.vs .minimap,\r\n\t.monaco-editor.vs-dark .minimap {\r\n\t\tdisplay: none;\r\n\t}\r\n\r\n\t/* squiggles */\r\n\t.monaco-editor.vs .squiggly-d-error,\r\n\t.monaco-editor.vs-dark .squiggly-d-error {\r\n\t\tbackground: transparent !important;\r\n\t\tborder-bottom: 4px double #E47777;\r\n\t}\r\n\t.monaco-editor.vs .squiggly-c-warning,\r\n\t.monaco-editor.vs-dark .squiggly-c-warning {\r\n\t\tborder-bottom: 4px double #71B771;\r\n\t}\r\n\t.monaco-editor.vs .squiggly-b-info,\r\n\t.monaco-editor.vs-dark .squiggly-b-info {\r\n\t\tborder-bottom: 4px double #71B771;\r\n\t}\r\n\t.monaco-editor.vs .squiggly-a-hint,\r\n\t.monaco-editor.vs-dark .squiggly-a-hint {\r\n\t\tborder-bottom: 4px double #6c6c6c;\r\n\t}\r\n\r\n\t/* contextmenu */\r\n\t.monaco-editor.vs .monaco-menu .monaco-action-bar.vertical .action-menu-item:focus .action-label,\r\n\t.monaco-editor.vs-dark .monaco-menu .monaco-action-bar.vertical .action-menu-item:focus .action-label {\r\n\t\t-ms-high-contrast-adjust: none;\r\n\t\tcolor: highlighttext !important;\r\n\t\tbackground-color: highlight !important;\r\n\t}\r\n\t.monaco-editor.vs .monaco-menu .monaco-action-bar.vertical .action-menu-item:hover .action-label,\r\n\t.monaco-editor.vs-dark .monaco-menu .monaco-action-bar.vertical .action-menu-item:hover .action-label {\r\n\t\t-ms-high-contrast-adjust: none;\r\n\t\tbackground: transparent !important;\r\n\t\tborder: 1px solid highlight;\r\n\t\tbox-sizing: border-box;\r\n\t}\r\n\r\n\t/* diff editor */\r\n\t.monaco-diff-editor.vs .diffOverviewRuler,\r\n\t.monaco-diff-editor.vs-dark .diffOverviewRuler {\r\n\t\tdisplay: none;\r\n\t}\r\n\t.monaco-editor.vs .line-insert,\r\n\t.monaco-editor.vs-dark .line-insert,\r\n\t.monaco-editor.vs .line-delete,\r\n\t.monaco-editor.vs-dark .line-delete {\r\n\t\tbackground: transparent !important;\r\n\t\tborder: 1px solid highlight !important;\r\n\t\tbox-sizing: border-box;\r\n\t}\r\n\t.monaco-editor.vs .char-insert,\r\n\t.monaco-editor.vs-dark .char-insert,\r\n\t.monaco-editor.vs .char-delete,\r\n\t.monaco-editor.vs-dark .char-delete {\r\n\t\tbackground: transparent !important;\r\n\t}\r\n}\r\n\r\n/*.monaco-editor.vs [tabindex="0"]:focus {\r\n\toutline: 1px solid rgba(0, 122, 204, 0.4);\r\n\toutline-offset: -1px;\r\n\topacity: 1 !important;\r\n}\r\n\r\n.monaco-editor.vs-dark [tabindex="0"]:focus {\r\n\toutline: 1px solid rgba(14, 99, 156, 0.6);\r\n\toutline-offset: -1px;\r\n\topacity: 1 !important;\r\n}*/\r\n'],sourceRoot:""}]);const a=s},1854:(e,t,n)=>{"use strict";n.d(t,{Z:()=>a});var i=n(7537),o=n.n(i),r=n(3645),s=n.n(r)()(o());s.push([e.id,"/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n.monaco-action-bar .action-item.menu-entry .action-label.icon {\r\n\twidth: 16px;\r\n\theight: 16px;\r\n\tbackground-repeat: no-repeat;\r\n\tbackground-position: 50%;\r\n\tbackground-size: 16px;\r\n}\r\n\r\n.monaco-action-bar .action-item.menu-entry .action-label {\r\n\tbackground-image: var(--menu-entry-icon-light);\r\n}\r\n\r\n.vs-dark .monaco-action-bar .action-item.menu-entry .action-label,\r\n.hc-black .monaco-action-bar .action-item.menu-entry .action-label {\r\n\tbackground-image: var(--menu-entry-icon-dark);\r\n}\r\n","",{version:3,sources:["webpack://./node_modules/monaco-editor/esm/vs/platform/actions/browser/menuEntryActionViewItem.css"],names:[],mappings:"AAAA;;;+FAG+F;;AAE/F;CACC,WAAW;CACX,YAAY;CACZ,4BAA4B;CAC5B,wBAAwB;CACxB,qBAAqB;AACtB;;AAEA;CACC,8CAA8C;AAC/C;;AAEA;;CAEC,6CAA6C;AAC9C",sourcesContent:["/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n.monaco-action-bar .action-item.menu-entry .action-label.icon {\r\n\twidth: 16px;\r\n\theight: 16px;\r\n\tbackground-repeat: no-repeat;\r\n\tbackground-position: 50%;\r\n\tbackground-size: 16px;\r\n}\r\n\r\n.monaco-action-bar .action-item.menu-entry .action-label {\r\n\tbackground-image: var(--menu-entry-icon-light);\r\n}\r\n\r\n.vs-dark .monaco-action-bar .action-item.menu-entry .action-label,\r\n.hc-black .monaco-action-bar .action-item.menu-entry .action-label {\r\n\tbackground-image: var(--menu-entry-icon-dark);\r\n}\r\n"],sourceRoot:""}]);const a=s},4932:(e,t,n)=>{"use strict";n.d(t,{Z:()=>a});var i=n(7537),o=n.n(i),r=n(3645),s=n.n(r)()(o());s.push([e.id,"/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n.context-view .monaco-menu {\r\n\tmin-width: 130px;\r\n}\r\n\r\n","",{version:3,sources:["webpack://./node_modules/monaco-editor/esm/vs/platform/contextview/browser/contextMenuHandler.css"],names:[],mappings:"AAAA;;;+FAG+F;;AAE/F;CACC,gBAAgB;AACjB",sourcesContent:["/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n.context-view .monaco-menu {\r\n\tmin-width: 130px;\r\n}\r\n\r\n"],sourceRoot:""}]);const a=s},3645:e=>{"use strict";e.exports=function(e){var t=[];return t.toString=function(){return this.map((function(t){var n="",i=void 0!==t[5];return t[4]&&(n+="@supports (".concat(t[4],") {")),t[2]&&(n+="@media ".concat(t[2]," {")),i&&(n+="@layer".concat(t[5].length>0?" ".concat(t[5]):""," {")),n+=e(t),i&&(n+="}"),t[2]&&(n+="}"),t[4]&&(n+="}"),n})).join("")},t.i=function(e,n,i,o,r){"string"==typeof e&&(e=[[null,e,void 0]]);var s={};if(i)for(var a=0;a0?" ".concat(c[5]):""," {").concat(c[1],"}")),c[5]=r),n&&(c[2]?(c[1]="@media ".concat(c[2]," {").concat(c[1],"}"),c[2]=n):c[2]=n),o&&(c[4]?(c[1]="@supports (".concat(c[4],") {").concat(c[1],"}"),c[4]=o):c[4]="".concat(o)),t.push(c))}},t}},1667:e=>{"use strict";e.exports=function(e,t){return t||(t={}),e?(e=String(e.__esModule?e.default:e),/^['"].*['"]$/.test(e)&&(e=e.slice(1,-1)),t.hash&&(e+=t.hash),/["'() \t\n]|(%20)/.test(e)||t.needQuotes?'"'.concat(e.replace(/"/g,'\\"').replace(/\n/g,"\\n"),'"'):e):e}},7537:e=>{"use strict";e.exports=function(e){var t=e[1],n=e[3];if(!n)return t;if("function"==typeof btoa){var i=btoa(unescape(encodeURIComponent(JSON.stringify(n)))),o="sourceMappingURL=data:application/json;charset=utf-8;base64,".concat(i),r="/*# ".concat(o," */"),s=n.sources.map((function(e){return"/*# sourceURL=".concat(n.sourceRoot||"").concat(e," */")}));return[t].concat(s).concat([r]).join("\n")}return[t].join("\n")}},9450:e=>{"use strict";class t{constructor(e,t){this.low=e,this.high=t,this.length=1+t-e}overlaps(e){return!(this.highe.high)}touches(e){return!(this.high+1e.high)}add(e){return new t(Math.min(this.low,e.low),Math.max(this.high,e.high))}subtract(e){return e.low<=this.low&&e.high>=this.high?[]:e.low>this.low&&e.highe+t.length),0)}add(e,i){var o=e=>{for(var t=0;t{for(var t=0;t{for(var n=0;n{for(var n=t.low;n<=t.high;)e.push(n),n++;return e}),[])}subranges(){return this.ranges.map((e=>({low:e.low,high:e.high,length:1+e.high-e.low})))}}e.exports=n},8679:(e,t,n)=>{"use strict";var i=n(1296),o={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},r={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},s={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},a={};function l(e){return i.isMemo(e)?s:a[e.$$typeof]||o}a[i.ForwardRef]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},a[i.Memo]=s;var d=Object.defineProperty,c=Object.getOwnPropertyNames,h=Object.getOwnPropertySymbols,u=Object.getOwnPropertyDescriptor,g=Object.getPrototypeOf,p=Object.prototype;e.exports=function e(t,n,i){if("string"!=typeof n){if(p){var o=g(n);o&&o!==p&&e(t,o,i)}var s=c(n);h&&(s=s.concat(h(n)));for(var a=l(t),m=l(n),f=0;f{"use strict";var n="function"==typeof Symbol&&Symbol.for,i=n?Symbol.for("react.element"):60103,o=n?Symbol.for("react.portal"):60106,r=n?Symbol.for("react.fragment"):60107,s=n?Symbol.for("react.strict_mode"):60108,a=n?Symbol.for("react.profiler"):60114,l=n?Symbol.for("react.provider"):60109,d=n?Symbol.for("react.context"):60110,c=n?Symbol.for("react.async_mode"):60111,h=n?Symbol.for("react.concurrent_mode"):60111,u=n?Symbol.for("react.forward_ref"):60112,g=n?Symbol.for("react.suspense"):60113,p=n?Symbol.for("react.suspense_list"):60120,m=n?Symbol.for("react.memo"):60115,f=n?Symbol.for("react.lazy"):60116,_=n?Symbol.for("react.block"):60121,b=n?Symbol.for("react.fundamental"):60117,C=n?Symbol.for("react.responder"):60118,v=n?Symbol.for("react.scope"):60119;function w(e){if("object"==typeof e&&null!==e){var t=e.$$typeof;switch(t){case i:switch(e=e.type){case c:case h:case r:case a:case s:case g:return e;default:switch(e=e&&e.$$typeof){case d:case u:case f:case m:case l:return e;default:return t}}case o:return t}}}function y(e){return w(e)===h}t.AsyncMode=c,t.ConcurrentMode=h,t.ContextConsumer=d,t.ContextProvider=l,t.Element=i,t.ForwardRef=u,t.Fragment=r,t.Lazy=f,t.Memo=m,t.Portal=o,t.Profiler=a,t.StrictMode=s,t.Suspense=g,t.isAsyncMode=function(e){return y(e)||w(e)===c},t.isConcurrentMode=y,t.isContextConsumer=function(e){return w(e)===d},t.isContextProvider=function(e){return w(e)===l},t.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===i},t.isForwardRef=function(e){return w(e)===u},t.isFragment=function(e){return w(e)===r},t.isLazy=function(e){return w(e)===f},t.isMemo=function(e){return w(e)===m},t.isPortal=function(e){return w(e)===o},t.isProfiler=function(e){return w(e)===a},t.isStrictMode=function(e){return w(e)===s},t.isSuspense=function(e){return w(e)===g},t.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===r||e===h||e===a||e===s||e===g||e===p||"object"==typeof e&&null!==e&&(e.$$typeof===f||e.$$typeof===m||e.$$typeof===l||e.$$typeof===d||e.$$typeof===u||e.$$typeof===b||e.$$typeof===C||e.$$typeof===v||e.$$typeof===_)},t.typeOf=w},1296:(e,t,n)=>{"use strict";e.exports=n(6103)},1593:(e,t,n)=>{var i;self.MonacoEnvironment=(i={editorWorkerService:"editor.worker.js",json:"json.worker.js",typescript:"ts.worker.js",javascript:"ts.worker.js"},{globalAPI:!1,getWorkerUrl:function(e,t){var o=n.p,r=(o?o.replace(/\/$/,"")+"/":"")+i[t];if(/^((http:)|(https:)|(file:)|(\/\/))/.test(r)){var s=String(window.location),a=s.substr(0,s.length-window.location.hash.length-window.location.search.length-window.location.pathname.length);if(r.substring(0,a.length)!==a){/^(\/\/)/.test(r)&&(r=window.location.protocol+r);var l=new Blob(["/*"+t+'*/importScripts("'+r+'");'],{type:"application/javascript"});return URL.createObjectURL(l)}}return r}}),n(5898),n(4396),n(6012),n(4594),n(2015),n(9093),n(8191),n(7956),n(9098),n(6522),n(8728),n(2834),n(6961),n(1372),n(255),n(3190),n(3111),n(4818),n(5091),n(2097),n(2729),n(5389),n(3285),n(1321),n(3554),n(638),n(7586),n(3793),n(5733),n(6307),n(674),n(370),n(8486),n(4993),n(7720),n(8944),n(8936),n(5048),n(7290),n(1955),n(2860),n(9830),n(5662),n(9720),n(7847),n(1725),n(185),n(3497),n(9453),n(661),e.exports=n(110),n(2323),n(3763),n(8307),n(8828)},6268:(e,t,n)=>{"use strict";n.d(t,{px:()=>r,WP:()=>s,fX:()=>a,ie:()=>l,mX:()=>d,vU:()=>h,Pf:()=>u,i7:()=>g,G6:()=>p,MG:()=>m,Dt:()=>f,$W:()=>_});var i=n(4669);class o{constructor(){this._zoomLevel=0,this._lastZoomLevelChangeTime=0,this._onDidChangeZoomLevel=new i.Q5,this.onDidChangeZoomLevel=this._onDidChangeZoomLevel.event,this._zoomFactor=1}getZoomLevel(){return this._zoomLevel}getTimeSinceLastZoomLevelChanged(){return Date.now()-this._lastZoomLevelChangeTime}getZoomFactor(){return this._zoomFactor}getPixelRatio(){let e=document.createElement("canvas").getContext("2d");return(window.devicePixelRatio||1)/(e.webkitBackingStorePixelRatio||e.mozBackingStorePixelRatio||e.msBackingStorePixelRatio||e.oBackingStorePixelRatio||e.backingStorePixelRatio||1)}}function r(){return o.INSTANCE.getZoomLevel()}function s(){return o.INSTANCE.getTimeSinceLastZoomLevelChanged()}function a(e){return o.INSTANCE.onDidChangeZoomLevel(e)}function l(){return o.INSTANCE.getZoomFactor()}function d(){return o.INSTANCE.getPixelRatio()}o.INSTANCE=new o;const c=navigator.userAgent,h=c.indexOf("Firefox")>=0,u=c.indexOf("AppleWebKit")>=0,g=c.indexOf("Chrome")>=0,p=!g&&c.indexOf("Safari")>=0,m=!g&&!p&&u,f=c.indexOf("Android")>=0,_=window.matchMedia&&window.matchMedia("(display-mode: standalone)").matches},161:(e,t,n)=>{"use strict";n.d(t,{D:()=>r});var i=n(6268),o=n(1432);const r={clipboard:{writeText:o.tY||document.queryCommandSupported&&document.queryCommandSupported("copy")||!!(navigator&&navigator.clipboard&&navigator.clipboard.writeText),readText:o.tY||!!(navigator&&navigator.clipboard&&navigator.clipboard.readText)},keyboard:o.tY||i.$W?0:navigator.keyboard||i.G6?1:2,touch:"ontouchstart"in window||navigator.maxTouchPoints>0,pointerEvents:window.PointerEvent&&("ontouchstart"in window||window.navigator.maxTouchPoints>0||navigator.maxTouchPoints>0)}},3547:(e,t,n)=>{"use strict";n.d(t,{go:()=>i,TN:()=>o,P$:()=>r});const i={RESOURCES:"ResourceURLs",DOWNLOAD_URL:"DownloadURL",FILES:"Files",TEXT:n(1170).vW.text,TERMINALS:"Terminals"};class o{constructor(e){this.data=e}update(){}getData(){return this.data}}const r={CurrentDragAndDropData:void 0}},5321:(e,t,n)=>{"use strict";n.d(t,{PO:()=>g,Uw:()=>p,nm:()=>f,mu:()=>b,Gw:()=>C,Lo:()=>v,qV:()=>w,j_:()=>y,RE:()=>A,lI:()=>S,jL:()=>x,Y_:()=>D,Dx:()=>I,D6:()=>M,Ro:()=>R,xQ:()=>O,dp:()=>B,i:()=>P,DI:()=>F,w:()=>W,FK:()=>z,If:()=>V,wn:()=>H,jg:()=>j,Fx:()=>$,uU:()=>U,OO:()=>K,Ay:()=>q,vY:()=>Y,dS:()=>G,fk:()=>J,uN:()=>ee,Re:()=>te,tw:()=>ne,zB:()=>ie,vL:()=>oe,_0:()=>re,go:()=>ae,R3:()=>le,Ce:()=>de,mc:()=>ce,$:()=>pe,$Z:()=>me,Cp:()=>fe,H$:()=>_e,Uh:()=>be,V3:()=>Ce,jt:()=>ve,wY:()=>we,_h:()=>ye,_q:()=>Ae,uB:()=>Se});var i=n(6268),o=n(9069),r=n(3938),s=n(5393),a=n(7301),l=n(4669),d=n(5976),c=n(1432),h=n(6663),u=n(161);function g(e){for(;e.firstChild;)e.firstChild.remove()}function p(e){var t;return null!==(t=null==e?void 0:e.isConnected)&&void 0!==t&&t}class m{constructor(e,t,n,i){this._node=e,this._type=t,this._handler=n,this._options=i||!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 f(e,t,n,i){return new m(e,t,n,i)}function _(e){return function(t){return e(new r.n(t))}}let b=function(e,t,n,i){let r=n;return"click"===t||"mousedown"===t?r=_(n):"keydown"!==t&&"keypress"!==t&&"keyup"!==t||(r=function(e){return function(t){return e(new o.y(t))}}(n)),f(e,t,r,i)},C=function(e,t,n){return v(e,_(t),n)};function v(e,t,n){return f(e,c.gn&&u.D.pointerEvents?ne.POINTER_DOWN:ne.MOUSE_DOWN,t,n)}function w(e,t,n){return f(e,c.gn&&u.D.pointerEvents?ne.POINTER_UP:ne.MOUSE_UP,t,n)}function y(e,t){return f(e,"mouseout",(n=>{let i=n.relatedTarget;for(;i&&i!==e;)i=i.parentNode;i!==e&&t(n)}))}function A(e,t){return f(e,"pointerout",(n=>{let i=n.relatedTarget;for(;i&&i!==e;)i=i.parentNode;i!==e&&t(n)}))}let S,x,k=null;class L{constructor(e,t=0){this._runner=e,this.priority=t,this._canceled=!1}dispose(){this._canceled=!0}execute(){if(!this._canceled)try{this._runner()}catch(e){(0,a.dL)(e)}}static sort(e,t){return t.priority-e.priority}}!function(){let e=[],t=null,n=!1,i=!1,o=()=>{for(n=!1,t=e,e=[],i=!0;t.length>0;)t.sort(L.sort),t.shift().execute();i=!1};x=(t,i=0)=>{let r=new L(t,i);return e.push(r),n||(n=!0,function(e){if(!k){const e=e=>setTimeout((()=>e((new Date).getTime())),0);k=self.requestAnimationFrame||self.msRequestAnimationFrame||self.webkitRequestAnimationFrame||self.mozRequestAnimationFrame||self.oRequestAnimationFrame||e}k.call(self,e)}(o)),r},S=(e,n)=>{if(i){let i=new L(e,n);return t.push(i),i}return x(e,n)}}();const E=function(e,t){return t};class N extends d.JT{constructor(e,t,n,i=E,o=8){super();let r=null,a=0,l=this._register(new s._F),d=()=>{a=(new Date).getTime(),n(r),r=null};this._register(f(e,t,(e=>{r=i(r,e);let t=(new Date).getTime()-a;t>=o?(l.cancel(),d()):l.setIfNotSet(d,o-t)})))}}function D(e,t,n,i,o){return new N(e,t,n,i,o)}function I(e){return document.defaultView.getComputedStyle(e,null)}function M(e){if(e!==document.body)return new R(e.clientWidth,e.clientHeight);if(c.gn&&window.visualViewport)return new R(window.visualViewport.width,window.visualViewport.height);if(window.innerWidth&&window.innerHeight)return new R(window.innerWidth,window.innerHeight);if(document.body&&document.body.clientWidth&&document.body.clientHeight)return new R(document.body.clientWidth,document.body.clientHeight);if(document.documentElement&&document.documentElement.clientWidth&&document.documentElement.clientHeight)return new R(document.documentElement.clientWidth,document.documentElement.clientHeight);throw new Error("Unable to figure out browser width and height")}class T{static convertToPixels(e,t){return parseFloat(t)||0}static getDimension(e,t,n){let i=I(e),o="0";return i&&(o=i.getPropertyValue?i.getPropertyValue(t):i.getAttribute(n)),T.convertToPixels(e,o)}static getBorderLeftWidth(e){return T.getDimension(e,"border-left-width","borderLeftWidth")}static getBorderRightWidth(e){return T.getDimension(e,"border-right-width","borderRightWidth")}static getBorderTopWidth(e){return T.getDimension(e,"border-top-width","borderTopWidth")}static getBorderBottomWidth(e){return T.getDimension(e,"border-bottom-width","borderBottomWidth")}static getPaddingLeft(e){return T.getDimension(e,"padding-left","paddingLeft")}static getPaddingRight(e){return T.getDimension(e,"padding-right","paddingRight")}static getPaddingTop(e){return T.getDimension(e,"padding-top","paddingTop")}static getPaddingBottom(e){return T.getDimension(e,"padding-bottom","paddingBottom")}static getMarginLeft(e){return T.getDimension(e,"margin-left","marginLeft")}static getMarginTop(e){return T.getDimension(e,"margin-top","marginTop")}static getMarginRight(e){return T.getDimension(e,"margin-right","marginRight")}static getMarginBottom(e){return T.getDimension(e,"margin-bottom","marginBottom")}}class R{constructor(e,t){this.width=e,this.height=t}with(e=this.width,t=this.height){return e!==this.width||t!==this.height?new R(e,t):this}static is(e){return"object"==typeof e&&"number"==typeof e.height&&"number"==typeof e.width}static lift(e){return e instanceof R?e:new R(e.width,e.height)}static equals(e,t){return e===t||!(!e||!t)&&e.width===t.width&&e.height===t.height}}function O(e){let t=e.offsetParent,n=e.offsetTop,i=e.offsetLeft;for(;null!==(e=e.parentNode)&&e!==document.body&&e!==document.documentElement;){n-=e.scrollTop;const o=Z(e)?null:I(e);o&&(i-="rtl"!==o.direction?e.scrollLeft:-e.scrollLeft),e===t&&(i+=T.getBorderLeftWidth(e),n+=T.getBorderTopWidth(e),n+=e.offsetTop,i+=e.offsetLeft,t=e.offsetParent)}return{left:i,top:n}}function B(e,t,n){"number"==typeof t&&(e.style.width=`${t}px`),"number"==typeof n&&(e.style.height=`${n}px`)}function P(e){let t=e.getBoundingClientRect();return{left:t.left+F.scrollX,top:t.top+F.scrollY,width:t.width,height:t.height}}const F=new class{get scrollX(){return"number"==typeof window.scrollX?window.scrollX:document.body.scrollLeft+document.documentElement.scrollLeft}get scrollY(){return"number"==typeof window.scrollY?window.scrollY:document.body.scrollTop+document.documentElement.scrollTop}};function W(e){let t=T.getMarginLeft(e)+T.getMarginRight(e);return e.offsetWidth+t}function z(e){let t=T.getBorderLeftWidth(e)+T.getBorderRightWidth(e),n=T.getPaddingLeft(e)+T.getPaddingRight(e);return e.offsetWidth-t-n}function V(e){let t=T.getBorderTopWidth(e)+T.getBorderBottomWidth(e),n=T.getPaddingTop(e)+T.getPaddingBottom(e);return e.offsetHeight-t-n}function H(e){let t=T.getMarginTop(e)+T.getMarginBottom(e);return e.offsetHeight+t}function j(e,t){for(;e;){if(e===t)return!0;e=e.parentNode}return!1}function $(e,t,n){for(;e&&e.nodeType===e.ELEMENT_NODE;){if(e.classList.contains(t))return e;if(n)if("string"==typeof n){if(e.classList.contains(n))return null}else if(e===n)return null;e=e.parentNode}return null}function U(e,t,n){return!!$(e,t,n)}function Z(e){return e&&!!e.host&&!!e.mode}function K(e){return!!q(e)}function q(e){for(;e.parentNode;){if(e===document.body)return null;e=e.parentNode}return Z(e)?e:null}function Y(){let e=document.activeElement;for(;null==e?void 0:e.shadowRoot;)e=e.shadowRoot.activeElement;return e}function G(e=document.getElementsByTagName("head")[0]){let t=document.createElement("style");return t.type="text/css",t.media="screen",e.appendChild(t),t}let Q=null;function X(){return Q||(Q=G()),Q}function J(e,t,n=X()){n&&t&&n.sheet.insertRule(e+"{"+t+"}",0)}function ee(e,t=X()){if(!t)return;let n=function(e){var t,n;return(null===(t=null==e?void 0:e.sheet)||void 0===t?void 0:t.rules)?e.sheet.rules:(null===(n=null==e?void 0:e.sheet)||void 0===n?void 0:n.cssRules)?e.sheet.cssRules:[]}(t),i=[];for(let t=0;t=0;e--)t.sheet.deleteRule(i[e])}function te(e){return"object"==typeof HTMLElement?e instanceof HTMLElement:e&&"object"==typeof e&&1===e.nodeType&&"string"==typeof e.nodeName}const ne={CLICK:"click",AUXCLICK:"auxclick",DBLCLICK:"dblclick",MOUSE_UP:"mouseup",MOUSE_DOWN:"mousedown",MOUSE_OVER:"mouseover",MOUSE_MOVE:"mousemove",MOUSE_OUT:"mouseout",MOUSE_ENTER:"mouseenter",MOUSE_LEAVE:"mouseleave",MOUSE_WHEEL:"wheel",POINTER_UP:"pointerup",POINTER_DOWN:"pointerdown",POINTER_MOVE:"pointermove",CONTEXT_MENU:"contextmenu",WHEEL:"wheel",KEY_DOWN:"keydown",KEY_PRESS:"keypress",KEY_UP:"keyup",LOAD:"load",BEFORE_UNLOAD:"beforeunload",UNLOAD:"unload",ABORT:"abort",ERROR:"error",RESIZE:"resize",SCROLL:"scroll",FULLSCREEN_CHANGE:"fullscreenchange",WK_FULLSCREEN_CHANGE:"webkitfullscreenchange",SELECT:"select",CHANGE:"change",SUBMIT:"submit",RESET:"reset",FOCUS:"focus",FOCUS_IN:"focusin",FOCUS_OUT:"focusout",BLUR:"blur",INPUT:"input",STORAGE:"storage",DRAG_START:"dragstart",DRAG:"drag",DRAG_ENTER:"dragenter",DRAG_LEAVE:"dragleave",DRAG_OVER:"dragover",DROP:"drop",DRAG_END:"dragend",ANIMATION_START:i.Pf?"webkitAnimationStart":"animationstart",ANIMATION_END:i.Pf?"webkitAnimationEnd":"animationend",ANIMATION_ITERATION:i.Pf?"webkitAnimationIteration":"animationiteration"},ie={stop:function(e,t){e.preventDefault?e.preventDefault():e.returnValue=!1,t&&(e.stopPropagation?e.stopPropagation():e.cancelBubble=!0)}};function oe(e){let t=[];for(let n=0;e&&e.nodeType===e.ELEMENT_NODE;n++)t[n]=e.scrollTop,e=e.parentNode;return t}function re(e,t){for(let n=0;e&&e.nodeType===e.ELEMENT_NODE;n++)e.scrollTop!==t[n]&&(e.scrollTop=t[n]),e=e.parentNode}class se extends d.JT{constructor(e){super(),this._onDidFocus=this._register(new l.Q5),this.onDidFocus=this._onDidFocus.event,this._onDidBlur=this._register(new l.Q5),this.onDidBlur=this._onDidBlur.event;let t=j(document.activeElement,e),n=!1;const i=()=>{n=!1,t||(t=!0,this._onDidFocus.fire())},o=()=>{t&&(n=!0,window.setTimeout((()=>{n&&(n=!1,t=!1,this._onDidBlur.fire())}),0))};this._refreshStateHandler=()=>{j(document.activeElement,e)!==t&&(t?o():i())},this._register(f(e,ne.FOCUS,i,!0)),this._register(f(e,ne.BLUR,o,!0))}}function ae(e){return new se(e)}function le(e,...t){if(e.append(...t),1===t.length&&"string"!=typeof t[0])return t[0]}function de(e,t){return e.insertBefore(t,e.firstChild),t}function ce(e,...t){e.innerText="",le(e,...t)}const he=/([\w\-]+)?(#([\w\-]+))?((\.([\w\-]+))*)/;var ue;function ge(e,t,n,...i){let o=he.exec(t);if(!o)throw new Error("Bad use of emmet");n=Object.assign({},n||{});let r,s=o[1]||"div";return r=e!==ue.HTML?document.createElementNS(e,s):document.createElement(s),o[3]&&(r.id=o[3]),o[4]&&(r.className=o[4].replace(/\./g," ").trim()),Object.keys(n).forEach((e=>{const t=n[e];void 0!==t&&(/^on\w+$/.test(e)?r[e]=t:"selected"===e?t&&r.setAttribute(e,"true"):r.setAttribute(e,t))})),r.append(...i),r}function pe(e,t,...n){return ge(ue.HTML,e,t,...n)}function me(...e){for(let t of e)t.style.display="",t.removeAttribute("aria-hidden")}function fe(...e){for(let t of e)t.style.display="none",t.setAttribute("aria-hidden","true")}function _e(e){return Array.prototype.slice.call(document.getElementsByTagName(e),0)}function be(e){const t=window.devicePixelRatio*e;return Math.max(1,Math.floor(t))/window.devicePixelRatio}function Ce(e){window.open(e,"_blank","noopener")}function ve(e){const t=()=>{e(),n=x(t)};let n=x(t);return(0,d.OF)((()=>n.dispose()))}function we(e){return e?`url('${h.Gi.asBrowserUri(e).toString(!0).replace(/'/g,"%27")}')`:"url('')"}function ye(e){return`'${e.replace(/'/g,"%27")}'`}!function(e){e.HTML="http://www.w3.org/1999/xhtml",e.SVG="http://www.w3.org/2000/svg"}(ue||(ue={})),pe.SVG=function(e,t,...n){return ge(ue.SVG,e,t,...n)},h.WX.setPreferredWebSchema(/^https:/.test(window.location.href)?"https":"http");class Ae extends l.Q5{constructor(){super(),this._subscriptions=new d.SL,this._keyStatus={altKey:!1,shiftKey:!1,ctrlKey:!1,metaKey:!1},this._subscriptions.add(f(window,"keydown",(e=>{if(e.defaultPrevented)return;const t=new o.y(e);if(6!==t.keyCode||!e.repeat){if(e.altKey&&!this._keyStatus.altKey)this._keyStatus.lastKeyPressed="alt";else if(e.ctrlKey&&!this._keyStatus.ctrlKey)this._keyStatus.lastKeyPressed="ctrl";else if(e.metaKey&&!this._keyStatus.metaKey)this._keyStatus.lastKeyPressed="meta";else if(e.shiftKey&&!this._keyStatus.shiftKey)this._keyStatus.lastKeyPressed="shift";else{if(6===t.keyCode)return;this._keyStatus.lastKeyPressed=void 0}this._keyStatus.altKey=e.altKey,this._keyStatus.ctrlKey=e.ctrlKey,this._keyStatus.metaKey=e.metaKey,this._keyStatus.shiftKey=e.shiftKey,this._keyStatus.lastKeyPressed&&(this._keyStatus.event=e,this.fire(this._keyStatus))}}),!0)),this._subscriptions.add(f(window,"keyup",(e=>{e.defaultPrevented||(!e.altKey&&this._keyStatus.altKey?this._keyStatus.lastKeyReleased="alt":!e.ctrlKey&&this._keyStatus.ctrlKey?this._keyStatus.lastKeyReleased="ctrl":!e.metaKey&&this._keyStatus.metaKey?this._keyStatus.lastKeyReleased="meta":!e.shiftKey&&this._keyStatus.shiftKey?this._keyStatus.lastKeyReleased="shift":this._keyStatus.lastKeyReleased=void 0,this._keyStatus.lastKeyPressed!==this._keyStatus.lastKeyReleased&&(this._keyStatus.lastKeyPressed=void 0),this._keyStatus.altKey=e.altKey,this._keyStatus.ctrlKey=e.ctrlKey,this._keyStatus.metaKey=e.metaKey,this._keyStatus.shiftKey=e.shiftKey,this._keyStatus.lastKeyReleased&&(this._keyStatus.event=e,this.fire(this._keyStatus)))}),!0)),this._subscriptions.add(f(document.body,"mousedown",(()=>{this._keyStatus.lastKeyPressed=void 0}),!0)),this._subscriptions.add(f(document.body,"mouseup",(()=>{this._keyStatus.lastKeyPressed=void 0}),!0)),this._subscriptions.add(f(document.body,"mousemove",(e=>{e.buttons&&(this._keyStatus.lastKeyPressed=void 0)}),!0)),this._subscriptions.add(f(window,"blur",(()=>{this.resetKeyStatus()})))}get keyStatus(){return this._keyStatus}resetKeyStatus(){this.doResetKeyStatus(),this.fire(this._keyStatus)}doResetKeyStatus(){this._keyStatus={altKey:!1,shiftKey:!1,ctrlKey:!1,metaKey:!1}}static getInstance(){return Ae.instance||(Ae.instance=new Ae),Ae.instance}dispose(){super.dispose(),this._subscriptions.dispose()}}function Se(e,t){const n=window.matchMedia(e);"function"==typeof n.addEventListener?n.addEventListener("change",t):n.addListener(t)}},4850:(e,t,n)=>{"use strict";n.d(t,{Y:()=>o,p:()=>r});var i=n(4669);class o{constructor(e,t,n){const o=e=>this.emitter.fire(e);this.emitter=new i.Q5({onFirstListenerAdd:()=>e.addEventListener(t,o,n),onLastListenerRemove:()=>e.removeEventListener(t,o,n)})}get event(){return this.emitter.event}dispose(){this.emitter.dispose()}}function r(e){return e.preventDefault(),e.stopPropagation(),e}},8626:(e,t,n)=>{"use strict";n.d(t,{Z:()=>i,X:()=>o});class i{constructor(e){this.domNode=e,this._maxWidth=-1,this._width=-1,this._height=-1,this._top=-1,this._left=-1,this._bottom=-1,this._right=-1,this._fontFamily="",this._fontWeight="",this._fontSize=-1,this._fontFeatureSettings="",this._lineHeight=-1,this._letterSpacing=-100,this._className="",this._display="",this._position="",this._visibility="",this._backgroundColor="",this._layerHint=!1,this._contain="none",this._boxShadow=""}setMaxWidth(e){this._maxWidth!==e&&(this._maxWidth=e,this.domNode.style.maxWidth=this._maxWidth+"px")}setWidth(e){this._width!==e&&(this._width=e,this.domNode.style.width=this._width+"px")}setHeight(e){this._height!==e&&(this._height=e,this.domNode.style.height=this._height+"px")}setTop(e){this._top!==e&&(this._top=e,this.domNode.style.top=this._top+"px")}unsetTop(){-1!==this._top&&(this._top=-1,this.domNode.style.top="")}setLeft(e){this._left!==e&&(this._left=e,this.domNode.style.left=this._left+"px")}setBottom(e){this._bottom!==e&&(this._bottom=e,this.domNode.style.bottom=this._bottom+"px")}setRight(e){this._right!==e&&(this._right=e,this.domNode.style.right=this._right+"px")}setFontFamily(e){this._fontFamily!==e&&(this._fontFamily=e,this.domNode.style.fontFamily=this._fontFamily)}setFontWeight(e){this._fontWeight!==e&&(this._fontWeight=e,this.domNode.style.fontWeight=this._fontWeight)}setFontSize(e){this._fontSize!==e&&(this._fontSize=e,this.domNode.style.fontSize=this._fontSize+"px")}setFontFeatureSettings(e){this._fontFeatureSettings!==e&&(this._fontFeatureSettings=e,this.domNode.style.fontFeatureSettings=this._fontFeatureSettings)}setLineHeight(e){this._lineHeight!==e&&(this._lineHeight=e,this.domNode.style.lineHeight=this._lineHeight+"px")}setLetterSpacing(e){this._letterSpacing!==e&&(this._letterSpacing=e,this.domNode.style.letterSpacing=this._letterSpacing+"px")}setClassName(e){this._className!==e&&(this._className=e,this.domNode.className=this._className)}toggleClassName(e,t){this.domNode.classList.toggle(e,t),this._className=this.domNode.className}setDisplay(e){this._display!==e&&(this._display=e,this.domNode.style.display=this._display)}setPosition(e){this._position!==e&&(this._position=e,this.domNode.style.position=this._position)}setVisibility(e){this._visibility!==e&&(this._visibility=e,this.domNode.style.visibility=this._visibility)}setBackgroundColor(e){this._backgroundColor!==e&&(this._backgroundColor=e,this.domNode.style.backgroundColor=this._backgroundColor)}setLayerHinting(e){this._layerHint!==e&&(this._layerHint=e,this.domNode.style.transform=this._layerHint?"translate3d(0px, 0px, 0px)":"")}setBoxShadow(e){this._boxShadow!==e&&(this._boxShadow=e,this.domNode.style.boxShadow=e)}setContain(e){this._contain!==e&&(this._contain=e,this.domNode.style.contain=this._contain)}setAttribute(e,t){this.domNode.setAttribute(e,t)}removeAttribute(e){this.domNode.removeAttribute(e)}appendChild(e){this.domNode.appendChild(e.domNode)}removeChild(e){this.domNode.removeChild(e.domNode)}}function o(e){return new i(e)}},8764:(e,t,n)=>{"use strict";n.d(t,{IY:()=>o,BO:()=>r,az:()=>s});var i=n(5321);function o(e,t={}){const n=s(t);return n.textContent=e,n}function r(e,t={}){const n=s(t);return l(n,function(e,t){const n={type:1,children:[]};let i=0,o=n;const r=[],s=new a(e);for(;!s.eos();){let e=s.next();const n="\\"===e&&0!==d(s.peek(),t);if(n&&(e=s.next()),n||0===d(e,t)||e!==s.peek())if("\n"===e)2===o.type&&(o=r.pop()),o.children.push({type:8});else if(2!==o.type){const t={type:2,content:e};o.children.push(t),r.push(o),o=t}else o.content+=e;else{s.advance(),2===o.type&&(o=r.pop());const n=d(e,t);if(o.type===n||5===o.type&&6===n)o=r.pop();else{const e={type:n,children:[]};5===n&&(e.index=i,i++),o.children.push(e),r.push(o),o=e}}}return 2===o.type&&(o=r.pop()),r.length,n}(e,!!t.renderCodeSegements),t.actionHandler,t.renderCodeSegements),n}function s(e){const t=e.inline?"span":"div",n=document.createElement(t);return e.className&&(n.className=e.className),n}class a{constructor(e){this.source=e,this.index=0}eos(){return this.index>=this.source.length}next(){const e=this.peek();return this.advance(),e}peek(){return this.source[this.index]}advance(){this.index++}}function l(e,t,n,o){let r;if(2===t.type)r=document.createTextNode(t.content||"");else if(3===t.type)r=document.createElement("b");else if(4===t.type)r=document.createElement("i");else if(7===t.type&&o)r=document.createElement("code");else if(5===t.type&&n){const e=document.createElement("a");e.href="#",n.disposeables.add(i.mu(e,"click",(e=>{n.callback(String(t.index),e)}))),r=e}else 8===t.type?r=document.createElement("br"):1===t.type&&(r=e);r&&e!==r&&e.appendChild(r),r&&Array.isArray(t.children)&&t.children.forEach((e=>{l(r,e,n,o)}))}function d(e,t){switch(e){case"*":return 3;case"_":return 4;case"[":return 5;case"]":return 6;case"`":return t?7:0;default:return 0}}},7974:(e,t,n)=>{"use strict";n.d(t,{e:()=>l,Z:()=>d});var i=n(5321),o=n(262),r=n(3938),s=n(5976),a=n(1432);function l(e,t){let n=new r.n(t);return n.preventDefault(),{leftButton:n.leftButton,buttons:n.buttons,posx:n.posx,posy:n.posy}}class d{constructor(){this._hooks=new s.SL,this._mouseMoveEventMerger=null,this._mouseMoveCallback=null,this._onStopCallback=null}dispose(){this.stopMonitoring(!1),this._hooks.dispose()}stopMonitoring(e,t){if(!this.isMonitoring())return;this._hooks.clear(),this._mouseMoveEventMerger=null,this._mouseMoveCallback=null;const n=this._onStopCallback;this._onStopCallback=null,e&&n&&n(t)}isMonitoring(){return!!this._mouseMoveEventMerger}startMonitoring(e,t,n,s,l){if(this.isMonitoring())return;this._mouseMoveEventMerger=n,this._mouseMoveCallback=s,this._onStopCallback=l;const d=o.E.getSameOriginWindowChain(),c=a.gn?"pointermove":"mousemove",h=d.map((e=>e.window.document)),u=i.Ay(e);u&&h.unshift(u);for(const e of h)this._hooks.add(i.Y_(e,c,(e=>{e.buttons===t?this._mouseMoveCallback(e):this.stopMonitoring(!0)}),((e,t)=>this._mouseMoveEventMerger(e,t)))),this._hooks.add(i.nm(e,"mouseup",(e=>this.stopMonitoring(!0))));if(o.E.hasDifferentOriginAncestor()){let e=d[d.length-1];this._hooks.add(i.nm(e.window.document,"mouseout",(e=>{"html"===new r.n(e).target.tagName.toLowerCase()&&this.stopMonitoring(!0)}))),this._hooks.add(i.nm(e.window.document,"mouseover",(e=>{"html"===new r.n(e).target.tagName.toLowerCase()&&this.stopMonitoring(!0)}))),this._hooks.add(i.nm(e.window.document.body,"mouseleave",(e=>{this.stopMonitoring(!0)})))}}}},262:(e,t,n)=>{"use strict";n.d(t,{E:()=>s});let i=!1,o=null;function r(e){if(!e.parent||e.parent===e)return null;try{let t=e.location,n=e.parent.location;if("null"!==t.origin&&"null"!==n.origin&&(t.protocol!==n.protocol||t.hostname!==n.hostname||t.port!==n.port))return i=!0,null}catch(e){return i=!0,null}return e.parent}class s{static getSameOriginWindowChain(){if(!o){o=[];let e,t=window;do{e=r(t),e?o.push({window:t,iframeElement:t.frameElement||null}):o.push({window:t,iframeElement:null}),t=e}while(t)}return o.slice(0)}static hasDifferentOriginAncestor(){return o||this.getSameOriginWindowChain(),i}static getPositionOfChildWindowRelativeToAncestorWindow(e,t){if(!t||e===t)return{top:0,left:0};let n=0,i=0,o=this.getSameOriginWindowChain();for(const e of o){if(n+=e.window.scrollY,i+=e.window.scrollX,e.window===t)break;if(!e.iframeElement)break;let o=e.iframeElement.getBoundingClientRect();n+=o.top,i+=o.left}return{top:n,left:i}}}},9069:(e,t,n)=>{"use strict";n.d(t,{y:()=>c});var i=n(6268),o=n(2258),r=n(1432);let s=new Array(230),a=new Array(112);!function(){for(let e=0;e{"use strict";n.d(t,{n:()=>s,q:()=>a});var i=n(6268),o=n(262),r=n(1432);class s{constructor(e){this.timestamp=Date.now(),this.browserEvent=e,this.leftButton=0===e.button,this.middleButton=1===e.button,this.rightButton=2===e.button,this.buttons=e.buttons,this.target=e.target,this.detail=e.detail||1,"dblclick"===e.type&&(this.detail=2),this.ctrlKey=e.ctrlKey,this.shiftKey=e.shiftKey,this.altKey=e.altKey,this.metaKey=e.metaKey,"number"==typeof e.pageX?(this.posx=e.pageX,this.posy=e.pageY):(this.posx=e.clientX+document.body.scrollLeft+document.documentElement.scrollLeft,this.posy=e.clientY+document.body.scrollTop+document.documentElement.scrollTop);let t=o.E.getPositionOfChildWindowRelativeToAncestorWindow(self,e.view);this.posx-=t.left,this.posy-=t.top}preventDefault(){this.browserEvent.preventDefault()}stopPropagation(){this.browserEvent.stopPropagation()}}class a{constructor(e,t=0,n=0){if(this.browserEvent=e||null,this.target=e?e.target||e.targetNode||e.srcElement:null,this.deltaY=n,this.deltaX=t,e){let t=e,n=e;if(void 0!==t.wheelDeltaY)this.deltaY=t.wheelDeltaY/120;else if(void 0!==n.VERTICAL_AXIS&&n.axis===n.VERTICAL_AXIS)this.deltaY=-n.detail/3;else if("wheel"===e.type){const t=e;t.deltaMode===t.DOM_DELTA_LINE?i.vU&&!r.dz?this.deltaY=-e.deltaY/3:this.deltaY=-e.deltaY:this.deltaY=-e.deltaY/40}if(void 0!==t.wheelDeltaX)i.G6&&r.ED?this.deltaX=-t.wheelDeltaX/120:this.deltaX=t.wheelDeltaX/120;else if(void 0!==n.HORIZONTAL_AXIS&&n.axis===n.HORIZONTAL_AXIS)this.deltaX=-e.detail/3;else if("wheel"===e.type){const t=e;t.deltaMode===t.DOM_DELTA_LINE?i.vU&&!r.dz?this.deltaX=-e.deltaX/3:this.deltaX=-e.deltaX:this.deltaX=-e.deltaX/40}0===this.deltaY&&0===this.deltaX&&e.wheelDelta&&(this.deltaY=e.wheelDelta/120)}}preventDefault(){this.browserEvent&&this.browserEvent.preventDefault()}stopPropagation(){this.browserEvent&&this.browserEvent.stopPropagation()}}},553:(e,t,n)=>{"use strict";n.d(t,{t:()=>i,o:()=>l});var i,o=n(9488),r=n(5976),s=n(5321),a=n(9898);!function(e){e.Tap="-monaco-gesturetap",e.Change="-monaco-gesturechange",e.Start="-monaco-gesturestart",e.End="-monaco-gesturesend",e.Contextmenu="-monaco-gesturecontextmenu"}(i||(i={}));class l extends r.JT{constructor(){super(),this.dispatched=!1,this.activeTouches={},this.handle=null,this.targets=[],this.ignoreTargets=[],this._lastSetTapCountTime=0,this._register(s.nm(document,"touchstart",(e=>this.onTouchStart(e)),{passive:!1})),this._register(s.nm(document,"touchend",(e=>this.onTouchEnd(e)))),this._register(s.nm(document,"touchmove",(e=>this.onTouchMove(e)),{passive:!1}))}static addTarget(e){return l.isTouchDevice()?(l.INSTANCE||(l.INSTANCE=new l),l.INSTANCE.targets.push(e),{dispose:()=>{l.INSTANCE.targets=l.INSTANCE.targets.filter((t=>t!==e))}}):r.JT.None}static ignoreTarget(e){return l.isTouchDevice()?(l.INSTANCE||(l.INSTANCE=new l),l.INSTANCE.ignoreTargets.push(e),{dispose:()=>{l.INSTANCE.ignoreTargets=l.INSTANCE.ignoreTargets.filter((t=>t!==e))}}):r.JT.None}static isTouchDevice(){return"ontouchstart"in window||navigator.maxTouchPoints>0}dispose(){this.handle&&(this.handle.dispose(),this.handle=null),super.dispose()}onTouchStart(e){let t=Date.now();this.handle&&(this.handle.dispose(),this.handle=null);for(let n=0,o=e.targetTouches.length;n=l.HOLD_DELAY&&Math.abs(a.initialPageX-o.Gb(a.rollingPageX))<30&&Math.abs(a.initialPageY-o.Gb(a.rollingPageY))<30){let e=this.newGestureEvent(i.Contextmenu,a.initialTarget);e.pageX=o.Gb(a.rollingPageX),e.pageY=o.Gb(a.rollingPageY),this.dispatchEvent(e)}else if(1===n){let e=o.Gb(a.rollingPageX),n=o.Gb(a.rollingPageY),i=o.Gb(a.rollingTimestamps)-a.rollingTimestamps[0],r=e-a.rollingPageX[0],s=n-a.rollingPageY[0];const l=this.targets.filter((e=>a.initialTarget instanceof Node&&e.contains(a.initialTarget)));this.inertia(l,t,Math.abs(r)/i,r>0?1:-1,e,Math.abs(s)/i,s>0?1:-1,n)}this.dispatchEvent(this.newGestureEvent(i.End,a.initialTarget)),delete this.activeTouches[s.identifier]}this.dispatched&&(e.preventDefault(),e.stopPropagation(),this.dispatched=!1)}newGestureEvent(e,t){let n=document.createEvent("CustomEvent");return n.initEvent(e,!1,!0),n.initialTarget=t,n.tapCount=0,n}dispatchEvent(e){if(e.type===i.Tap){const t=(new Date).getTime();let n=0;n=t-this._lastSetTapCountTime>l.CLEAR_TAP_COUNT_TIME?1:2,this._lastSetTapCountTime=t,e.tapCount=n}else e.type!==i.Change&&e.type!==i.Contextmenu||(this._lastSetTapCountTime=0);for(let t=0;t{e.initialTarget instanceof Node&&t.contains(e.initialTarget)&&(t.dispatchEvent(e),this.dispatched=!0)}))}inertia(e,t,n,o,r,a,d,c){this.handle=s.jL((()=>{let s=Date.now(),h=s-t,u=0,g=0,p=!0;n+=l.SCROLL_FRICTION*h,a+=l.SCROLL_FRICTION*h,n>0&&(p=!1,u=o*n*h),a>0&&(p=!1,g=d*a*h);let m=this.newGestureEvent(i.Change);m.translationX=u,m.translationY=g,e.forEach((e=>e.dispatchEvent(m))),p||this.inertia(e,s,n,o,r+u,a,d,c+g)}))}onTouchMove(e){let t=Date.now();for(let n=0,r=e.changedTouches.length;n3&&(s.rollingPageX.shift(),s.rollingPageY.shift(),s.rollingTimestamps.shift()),s.rollingPageX.push(r.pageX),s.rollingPageY.push(r.pageY),s.rollingTimestamps.push(t)}this.dispatched&&(e.preventDefault(),e.stopPropagation(),this.dispatched=!1)}}l.SCROLL_FRICTION=-.005,l.HOLD_DELAY=700,l.CLEAR_TAP_COUNT_TIME=400,function(e,t,n,i){var o,r=arguments.length,s=r<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,i);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,n,s):o(t,n))||s);r>3&&s&&Object.defineProperty(t,n,s)}([a.H],l,"isTouchDevice",null)},6033:(e,t,n)=>{"use strict";n.d(t,{Y:()=>u,g:()=>g}),n(5408);var i=n(1432),o=n(3580),r=n(5976),s=n(4741),a=n(8401),l=n(553),d=n(3547),c=n(6268),h=n(5321);class u extends r.JT{constructor(e,t,n={}){super(),this.options=n,this._context=e||this,this._action=t,t instanceof s.aU&&this._register(t.onDidChange((e=>{this.element&&this.handleActionChangeEvent(e)})))}handleActionChangeEvent(e){void 0!==e.enabled&&this.updateEnabled(),void 0!==e.checked&&this.updateChecked(),void 0!==e.class&&this.updateClass(),void 0!==e.label&&(this.updateLabel(),this.updateTooltip()),void 0!==e.tooltip&&this.updateTooltip()}get actionRunner(){return this._actionRunner||(this._actionRunner=this._register(new s.Wi)),this._actionRunner}set actionRunner(e){this._actionRunner=e}getAction(){return this._action}isEnabled(){return this._action.enabled}setActionContext(e){this._context=e}render(e){const t=this.element=e;this._register(l.o.addTarget(e));const n=this.options&&this.options.draggable;n&&(e.draggable=!0,c.vU&&this._register((0,h.nm)(e,h.tw.DRAG_START,(e=>{var t;return null===(t=e.dataTransfer)||void 0===t?void 0:t.setData(d.go.TEXT,this._action.label)})))),this._register((0,h.nm)(t,l.t.Tap,(e=>this.onClick(e,!0)))),this._register((0,h.nm)(t,h.tw.MOUSE_DOWN,(e=>{n||h.zB.stop(e,!0),this._action.enabled&&0===e.button&&t.classList.add("active")}))),i.dz&&this._register((0,h.nm)(t,h.tw.CONTEXT_MENU,(e=>{0===e.button&&!0===e.ctrlKey&&this.onClick(e)}))),this._register((0,h.nm)(t,h.tw.CLICK,(e=>{h.zB.stop(e,!0),this.options&&this.options.isMenu||i.xS((()=>this.onClick(e)))}))),this._register((0,h.nm)(t,h.tw.DBLCLICK,(e=>{h.zB.stop(e,!0)}))),[h.tw.MOUSE_UP,h.tw.MOUSE_OUT].forEach((e=>{this._register((0,h.nm)(t,e,(e=>{h.zB.stop(e),t.classList.remove("active")})))}))}onClick(e,t=!1){var n;h.zB.stop(e,!0);const i=a.Jp(this._context)?(null===(n=this.options)||void 0===n?void 0:n.useEventAsContext)?e:{preserveFocus:t}:this._context;this.actionRunner.run(this._action,i)}focus(){this.element&&(this.element.tabIndex=0,this.element.focus(),this.element.classList.add("focused"))}blur(){this.element&&(this.element.blur(),this.element.tabIndex=-1,this.element.classList.remove("focused"))}setFocusable(e){this.element&&(this.element.tabIndex=e?0:-1)}get trapsArrowNavigation(){return!1}updateEnabled(){}updateLabel(){}updateTooltip(){}updateClass(){}updateChecked(){}dispose(){this.element&&(this.element.remove(),this.element=void 0),super.dispose()}}class g extends u{constructor(e,t,n={}){super(e,t,n),this.options=n,this.options.icon=void 0!==n.icon&&n.icon,this.options.label=void 0===n.label||n.label,this.cssClass=""}render(e){super.render(e),this.element&&(this.label=(0,h.R3)(this.element,(0,h.$)("a.action-label"))),this.label&&(this._action.id===s.Z0.ID?this.label.setAttribute("role","presentation"):this.options.isMenu?this.label.setAttribute("role","menuitem"):this.label.setAttribute("role","button")),this.options.label&&this.options.keybinding&&this.element&&((0,h.R3)(this.element,(0,h.$)("span.keybinding")).textContent=this.options.keybinding),this.updateClass(),this.updateLabel(),this.updateTooltip(),this.updateEnabled(),this.updateChecked()}focus(){this.label&&(this.label.tabIndex=0,this.label.focus())}blur(){this.label&&(this.label.tabIndex=-1)}setFocusable(e){this.label&&(this.label.tabIndex=e?0:-1)}updateLabel(){this.options.label&&this.label&&(this.label.textContent=this.getAction().label)}updateTooltip(){let e=null;this.getAction().tooltip?e=this.getAction().tooltip:!this.options.label&&this.getAction().label&&this.options.icon&&(e=this.getAction().label,this.options.keybinding&&(e=o.N({key:"titleLabel",comment:["action title","action keybinding"]},"{0} ({1})",e,this.options.keybinding))),e&&this.label&&(this.label.title=e)}updateClass(){this.cssClass&&this.label&&this.label.classList.remove(...this.cssClass.split(" ")),this.options.icon?(this.cssClass=this.getAction().class,this.label&&(this.label.classList.add("codicon"),this.cssClass&&this.label.classList.add(...this.cssClass.split(" "))),this.updateEnabled()):this.label&&this.label.classList.remove("codicon")}updateEnabled(){this.getAction().enabled?(this.label&&(this.label.removeAttribute("aria-disabled"),this.label.classList.remove("disabled")),this.element&&this.element.classList.remove("disabled")):(this.label&&(this.label.setAttribute("aria-disabled","true"),this.label.classList.add("disabled")),this.element&&this.element.classList.add("disabled"))}updateChecked(){this.label&&(this.getAction().checked?this.label.classList.add("checked"):this.label.classList.remove("checked"))}}},317:(e,t,n)=>{"use strict";n.d(t,{o:()=>c}),n(5408);var i=n(5976),o=n(4741),r=n(5321),s=n(8401),a=n(9069),l=n(4669),d=n(6033);class c extends i.JT{constructor(e,t={}){var n,i,s,c,h,u;let g,p;switch(super(),this.triggerKeyDown=!1,this.focusable=!0,this._onDidBlur=this._register(new l.Q5),this.onDidBlur=this._onDidBlur.event,this._onDidCancel=this._register(new l.Q5({onFirstListenerAdd:()=>this.cancelHasListener=!0})),this.onDidCancel=this._onDidCancel.event,this.cancelHasListener=!1,this._onDidRun=this._register(new l.Q5),this.onDidRun=this._onDidRun.event,this._onBeforeRun=this._register(new l.Q5),this.onBeforeRun=this._onBeforeRun.event,this.options=t,this._context=null!==(n=t.context)&&void 0!==n?n:null,this._orientation=null!==(i=this.options.orientation)&&void 0!==i?i:0,this._triggerKeys={keyDown:null!==(c=null===(s=this.options.triggerKeys)||void 0===s?void 0:s.keyDown)&&void 0!==c&&c,keys:null!==(u=null===(h=this.options.triggerKeys)||void 0===h?void 0:h.keys)&&void 0!==u?u:[3,10]},this.options.actionRunner?this._actionRunner=this.options.actionRunner:(this._actionRunner=new o.Wi,this._register(this._actionRunner)),this._register(this._actionRunner.onDidRun((e=>this._onDidRun.fire(e)))),this._register(this._actionRunner.onBeforeRun((e=>this._onBeforeRun.fire(e)))),this._actionIds=[],this.viewItems=[],this.focusedItem=void 0,this.domNode=document.createElement("div"),this.domNode.className="monaco-action-bar",!1!==t.animated&&this.domNode.classList.add("animated"),this._orientation){case 0:g=[15],p=[17];break;case 1:g=[16],p=[18],this.domNode.className+=" vertical"}this._register(r.nm(this.domNode,r.tw.KEY_DOWN,(e=>{const t=new a.y(e);let n=!0;const i="number"==typeof this.focusedItem?this.viewItems[this.focusedItem]:void 0;g&&(t.equals(g[0])||t.equals(g[1]))?n=this.focusPrevious():p&&(t.equals(p[0])||t.equals(p[1]))?n=this.focusNext():t.equals(9)&&this.cancelHasListener?this._onDidCancel.fire():t.equals(14)?n=this.focusFirst():t.equals(13)?n=this.focusLast():t.equals(2)&&i instanceof d.Y&&i.trapsArrowNavigation?n=this.focusNext():this.isTriggerKeyEvent(t)?this._triggerKeys.keyDown?this.doTrigger(t):this.triggerKeyDown=!0:n=!1,n&&(t.preventDefault(),t.stopPropagation())}))),this._register(r.nm(this.domNode,r.tw.KEY_UP,(e=>{const t=new a.y(e);this.isTriggerKeyEvent(t)?(!this._triggerKeys.keyDown&&this.triggerKeyDown&&(this.triggerKeyDown=!1,this.doTrigger(t)),t.preventDefault(),t.stopPropagation()):(t.equals(2)||t.equals(1026))&&this.updateFocusedItem()}))),this.focusTracker=this._register(r.go(this.domNode)),this._register(this.focusTracker.onDidBlur((()=>{r.vY()!==this.domNode&&r.jg(r.vY(),this.domNode)||(this._onDidBlur.fire(),this.focusedItem=void 0,this.triggerKeyDown=!1)}))),this._register(this.focusTracker.onDidFocus((()=>this.updateFocusedItem()))),this.actionsList=document.createElement("ul"),this.actionsList.className="actions-container",this.actionsList.setAttribute("role","toolbar"),this.options.ariaLabel&&this.actionsList.setAttribute("aria-label",this.options.ariaLabel),this.domNode.appendChild(this.actionsList),e.appendChild(this.domNode)}isTriggerKeyEvent(e){let t=!1;return this._triggerKeys.keys.forEach((n=>{t=t||e.equals(n)})),t}updateFocusedItem(){for(let e=0;et.setActionContext(e)))}get actionRunner(){return this._actionRunner}set actionRunner(e){e&&(this._actionRunner=e,this.viewItems.forEach((t=>t.actionRunner=e)))}getContainer(){return this.domNode}push(e,t={}){const n=Array.isArray(e)?e:[e];let i=s.hj(t.index)?t.index:null;n.forEach((e=>{const n=document.createElement("li");let o;n.className="action-item",n.setAttribute("role","presentation"),this.options.allowContextMenu||this._register(r.nm(n,r.tw.CONTEXT_MENU,(e=>{r.zB.stop(e,!0)}))),this.options.actionViewItemProvider&&(o=this.options.actionViewItemProvider(e)),o||(o=new d.g(this.context,e,t)),o.actionRunner=this._actionRunner,o.setActionContext(this.context),o.render(n),this.focusable&&o instanceof d.Y&&0===this.viewItems.length&&o.setFocusable(!0),null===i||i<0||i>=this.actionsList.children.length?(this.actionsList.appendChild(n),this.viewItems.push(o),this._actionIds.push(e.id)):(this.actionsList.insertBefore(n,this.actionsList.children[i]),this.viewItems.splice(i,0,o),this._actionIds.splice(i,0,e.id),i++)})),"number"==typeof this.focusedItem&&this.focus(this.focusedItem)}clear(){(0,i.B9)(this.viewItems),this.viewItems=[],this._actionIds=[],r.PO(this.actionsList)}length(){return this.viewItems.length}focus(e){let t,n=!1;if(void 0===e?n=!0:"number"==typeof e?t=e:"boolean"==typeof e&&(n=e),n&&void 0===this.focusedItem){const e=this.viewItems.findIndex((e=>e.isEnabled()));this.focusedItem=-1===e?void 0:e,this.updateFocus()}else void 0!==t&&(this.focusedItem=t),this.updateFocus()}focusFirst(){return this.focusedItem=this.length()>1?1:0,this.focusPrevious()}focusLast(){return this.focusedItem=this.length()<2?0:this.length()-2,this.focusNext()}focusNext(){if(void 0===this.focusedItem)this.focusedItem=this.viewItems.length-1;else if(this.viewItems.length<=1)return!1;const e=this.focusedItem;let t;do{if(this.options.preventLoopNavigation&&this.focusedItem+1>=this.viewItems.length)return this.focusedItem=e,!1;this.focusedItem=(this.focusedItem+1)%this.viewItems.length,t=this.viewItems[this.focusedItem]}while(this.focusedItem!==e&&this.options.focusOnlyEnabledItems&&!t.isEnabled());return this.updateFocus(),!0}focusPrevious(){if(void 0===this.focusedItem)this.focusedItem=0;else if(this.viewItems.length<=1)return!1;const e=this.focusedItem;let t;do{if(this.focusedItem=this.focusedItem-1,this.focusedItem<0){if(this.options.preventLoopNavigation)return this.focusedItem=e,!1;this.focusedItem=this.viewItems.length-1}t=this.viewItems[this.focusedItem]}while(this.focusedItem!==e&&this.options.focusOnlyEnabledItems&&!t.isEnabled());return this.updateFocus(!0),!0}updateFocus(e,t){void 0===this.focusedItem&&this.actionsList.focus({preventScroll:t});for(let n=0;n{"use strict";n.d(t,{Z9:()=>x,wW:()=>S,i7:()=>k});var i=n(3379),o=n.n(i),r=n(7795),s=n.n(r),a=n(569),l=n.n(a),d=n(3565),c=n.n(d),h=n(9216),u=n.n(h),g=n(4589),p=n.n(g),m=n(93),f={};f.styleTagTransform=p(),f.setAttributes=c(),f.insert=l().bind(null,"head"),f.domAPI=s(),f.insertStyleElement=u(),o()(m.Z,f),m.Z&&m.Z.locals&&m.Z.locals;var _=n(1432),b=n(5321);let C,v,w,y,A;function S(e){C=document.createElement("div"),C.className="monaco-aria-container";const t=()=>{const e=document.createElement("div");return e.className="monaco-alert",e.setAttribute("role","alert"),e.setAttribute("aria-atomic","true"),C.appendChild(e),e};v=t(),w=t();const n=()=>{const e=document.createElement("div");return e.className="monaco-status",e.setAttribute("role","complementary"),e.setAttribute("aria-live","polite"),e.setAttribute("aria-atomic","true"),C.appendChild(e),e};y=n(),A=n(),e.appendChild(C)}function x(e){C&&(v.textContent!==e?(b.PO(w),L(v,e)):(b.PO(v),L(w,e)))}function k(e){C&&(_.dz?x(e):y.textContent!==e?(b.PO(A),L(y,e)):(b.PO(y),L(A,e)))}function L(e,t){b.PO(e),t.length>2e4&&(t=t.substr(0,2e4)),e.textContent=t,e.style.visibility="hidden",e.style.visibility="visible"}},9899:(e,t,n)=>{"use strict";n.d(t,{a:()=>v});var i=n(3379),o=n.n(i),r=n(7795),s=n.n(r),a=n(569),l=n.n(a),d=n(3565),c=n.n(d),h=n(9216),u=n.n(h),g=n(4589),p=n.n(g),m=n(58),f={};f.styleTagTransform=p(),f.setAttributes=c(),f.insert=l().bind(null,"head"),f.domAPI=s(),f.insertStyleElement=u(),o()(m.Z,f),m.Z&&m.Z.locals&&m.Z.locals;var _=n(4081),b={};b.styleTagTransform=p(),b.setAttributes=c(),b.insert=l().bind(null,"head"),b.domAPI=s(),b.insertStyleElement=u(),o()(_.Z,b),_.Z&&_.Z.locals&&_.Z.locals;var C=n(3046);function v(e){let t=e.definition;for(;t instanceof C.lA;)t=t.definition;return`.codicon-${e.id}:before { content: '${t.fontCharacter}'; }`}},9162:(e,t,n)=>{"use strict";n.d(t,{Z:()=>y});var i=n(3379),o=n.n(i),r=n(7795),s=n.n(r),a=n(569),l=n.n(a),d=n(3565),c=n.n(d),h=n(9216),u=n.n(h),g=n(4589),p=n.n(g),m=n(477),f={};f.styleTagTransform=p(),f.setAttributes=c(),f.insert=l().bind(null,"head"),f.domAPI=s(),f.insertStyleElement=u(),o()(m.Z,f),m.Z&&m.Z.locals&&m.Z.locals;var _=n(5321),b=n(7295),C=n(1264),v=n(6248);const w={badgeBackground:C.Il.fromHex("#4D4D4D"),badgeForeground:C.Il.fromHex("#FFFFFF")};class y{constructor(e,t){this.count=0,this.options=t||Object.create(null),(0,v.jB)(this.options,w,!1),this.badgeBackground=this.options.badgeBackground,this.badgeForeground=this.options.badgeForeground,this.badgeBorder=this.options.badgeBorder,this.element=(0,_.R3)(e,(0,_.$)(".monaco-count-badge")),this.countFormat=this.options.countFormat||"{0}",this.titleFormat=this.options.titleFormat||"",this.setCount(this.options.count||0)}setCount(e){this.count=e,this.render()}setTitleFormat(e){this.titleFormat=e,this.render()}render(){this.element.textContent=(0,b.WU)(this.countFormat,this.count),this.element.title=(0,b.WU)(this.titleFormat,this.count),this.applyStyles()}style(e){this.badgeBackground=e.badgeBackground,this.badgeForeground=e.badgeForeground,this.badgeBorder=e.badgeBorder,this.applyStyles()}applyStyles(){if(this.element){const e=this.badgeBackground?this.badgeBackground.toString():"",t=this.badgeForeground?this.badgeForeground.toString():"",n=this.badgeBorder?this.badgeBorder.toString():"";this.element.style.backgroundColor=e,this.element.style.color=t,this.element.style.borderWidth=n?"1px":"",this.element.style.borderStyle=n?"solid":"",this.element.style.borderColor=n}}}},4650:(e,t,n)=>{"use strict";n.d(t,{q:()=>s});var i=n(6248),o=n(5321),r=n(6811);class s{constructor(e,t){this.supportIcons=t,this.text="",this.title="",this.highlights=[],this.didEverRender=!1,this.domNode=document.createElement("span"),this.domNode.className="monaco-highlighted-label",e.appendChild(this.domNode)}get element(){return this.domNode}set(e,t=[],n="",o){e||(e=""),o&&(e=s.escapeNewLines(e,t)),this.didEverRender&&this.text===e&&this.title===n&&i.fS(this.highlights,t)||(this.text=e,this.title=n,this.highlights=t,this.render())}render(){const e=[];let t=0;for(const n of this.highlights){if(n.end===n.start)continue;if(t{i="\r\n"===e?-1:0,o+=n;for(const e of t)e.end<=o||(e.start>=o&&(e.start+=i),e.end>=o&&(e.end+=i));return n+=i,"⏎"}))}}},3326:(e,t,n)=>{"use strict";n.d(t,{g:()=>E});var i=n(3379),o=n.n(i),r=n(7795),s=n.n(r),a=n(569),l=n.n(a),d=n(3565),c=n.n(d),h=n(9216),u=n.n(h),g=n(4589),p=n.n(g),m=n(4269),f={};f.styleTagTransform=p(),f.setAttributes=c(),f.insert=l().bind(null,"head"),f.domAPI=s(),f.insertStyleElement=u(),o()(m.Z,f),m.Z&&m.Z.locals&&m.Z.locals;var _=n(5321),b=n(4650),C=n(5976),v=n(1134),w=n(6248),y=n(8401),A=n(1050),S=n(3580),x=n(5393),k=function(e,t,n,i){return new(n||(n=Promise))((function(o,r){function s(e){try{l(i.next(e))}catch(e){r(e)}}function a(e){try{l(i.throw(e))}catch(e){r(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,a)}l((i=i.apply(e,t||[])).next())}))};class L{constructor(e){this._element=e}get element(){return this._element}set textContent(e){this.disposed||e===this._textContent||(this._textContent=e,this._element.textContent=e)}set className(e){this.disposed||e===this._className||(this._className=e,this._element.className=e)}set empty(e){this.disposed||e===this._empty||(this._empty=e,this._element.style.marginLeft=e?"0":"")}dispose(){this.disposed=!0}}class E extends C.JT{constructor(e,t){super(),this.customHovers=new Map,this.domNode=this._register(new L(_.R3(e,_.$(".monaco-icon-label")))),this.labelContainer=_.R3(this.domNode.element,_.$(".monaco-icon-label-container"));const n=_.R3(this.labelContainer,_.$("span.monaco-icon-name-container"));this.descriptionContainer=this._register(new L(_.R3(this.labelContainer,_.$("span.monaco-icon-description-container")))),(null==t?void 0:t.supportHighlights)||(null==t?void 0:t.supportIcons)?this.nameNode=new D(n,!!t.supportIcons):this.nameNode=new N(n),(null==t?void 0:t.supportDescriptionHighlights)?this.descriptionNodeFactory=()=>new b.q(_.R3(this.descriptionContainer.element,_.$("span.label-description")),!!t.supportIcons):this.descriptionNodeFactory=()=>this._register(new L(_.R3(this.descriptionContainer.element,_.$("span.label-description")))),this.hoverDelegate=null==t?void 0:t.hoverDelegate}setLabel(e,t,n){const i=["monaco-icon-label"];n&&(n.extraClasses&&i.push(...n.extraClasses),n.italic&&i.push("italic"),n.strikethrough&&i.push("strikethrough")),this.domNode.className=i.join(" "),this.setupHover(this.labelContainer,null==n?void 0:n.title),this.nameNode.setLabel(e,n),(t||this.descriptionNode)&&(this.descriptionNode||(this.descriptionNode=this.descriptionNodeFactory()),this.descriptionNode instanceof b.q?(this.descriptionNode.set(t||"",n?n.descriptionMatches:void 0),this.setupHover(this.descriptionNode.element,null==n?void 0:n.descriptionTitle)):(this.descriptionNode.textContent=t||"",this.setupHover(this.descriptionNode.element,(null==n?void 0:n.descriptionTitle)||""),this.descriptionNode.empty=!t))}setupHover(e,t){const n=this.customHovers.get(e);if(n&&(n.dispose(),this.customHovers.delete(e)),t)if(this.hoverDelegate){const n=function(e,t,n){if(!n)return;const i=function(e){if((0,y.HD)(e))return()=>k(this,void 0,void 0,(function*(){return e}));if((0,y.mf)(e.markdown))return e.markdown;{const t=e.markdown;return()=>k(this,void 0,void 0,(function*(){return t}))}}(n);let o,r;const s=_.nm(t,_.tw.MOUSE_OVER,(s=>{if(o)return;const a=new A.A,l=e=>{const n=e.type===_.tw.MOUSE_DOWN;n&&(null==r||r.dispose(),r=void 0),(n||e.fromElement===t)&&(null==o||o.dispose(),o=void 0)},d=_.nm(t,_.tw.MOUSE_LEAVE,l,!0),c=_.nm(t,_.tw.MOUSE_DOWN,l,!0),h={targetElements:[t],dispose:()=>{}};let u;if(void 0===e.placement||"mouse"===e.placement){const e=e=>h.x=e.x+10;u=_.nm(t,_.tw.MOUSE_MOVE,e,!0)}const g=new x.pY((()=>k(this,void 0,void 0,(function*(){var t;if(o){const s={text:(0,S.N)("iconLabel.loading","Loading..."),target:h,hoverPosition:2};null==r||r.dispose(),r=e.showHover(s);const l=null!==(t=yield i(a.token))&&void 0!==t?t:(0,y.HD)(n)?void 0:n.markdownNotSupportedFallback;if(null==r||r.dispose(),r=void 0,l&&o){const t={text:l,target:h,showPointer:"element"===e.placement,hoverPosition:2};r=e.showHover(t)}}null==u||u.dispose()}))),e.delay);g.schedule(),o=(0,C.OF)((()=>{g.dispose(),null==u||u.dispose(),c.dispose(),d.dispose(),a.dispose(!0)}))}),!0);return(0,C.OF)((()=>{s.dispose(),null==o||o.dispose(),null==r||r.dispose()}))}(this.hoverDelegate,e,t);n&&this.customHovers.set(e,n)}else!function(e,t){(0,y.HD)(t)?e.title=t:(null==t?void 0:t.markdownNotSupportedFallback)?e.title=t.markdownNotSupportedFallback:e.removeAttribute("title")}(e,t);else e.removeAttribute("title")}dispose(){super.dispose();for(const e of this.customHovers.values())e.dispose();this.customHovers.clear()}}class N{constructor(e){this.container=e,this.label=void 0,this.singleLabel=void 0}setLabel(e,t){if(this.label!==e||!(0,w.fS)(this.options,t))if(this.label=e,this.options=t,"string"==typeof e)this.singleLabel||(this.container.innerText="",this.container.classList.remove("multiple"),this.singleLabel=_.R3(this.container,_.$("a.label-name",{id:null==t?void 0:t.domId}))),this.singleLabel.textContent=e;else{this.container.innerText="",this.container.classList.add("multiple"),this.singleLabel=void 0;for(let n=0;n{const o={start:i,end:i+e.length},r=n.map((e=>v.e.intersect(o,e))).filter((e=>!v.e.isEmpty(e))).map((({start:e,end:t})=>({start:e-i,end:t-i})));return i=o.end+t.length,r}))}(e,n,null==t?void 0:t.matches);for(let o=0;o{"use strict";n.d(t,{T:()=>s});var i=n(5321),o=n(3046);const r=new RegExp(`(\\\\)?\\$\\((${o.dT.iconNameExpression}(?:${o.dT.iconModifierExpression})?)\\)`,"g");function s(e){const t=new Array;let n,i=0,o=0;for(;null!==(n=r.exec(e));){o=n.index||0,t.push(e.substring(i,o)),i=(n.index||0)+n[0].length;const[,r,s]=n;t.push(r?`$(${s})`:a({id:s}))}return i{"use strict";n.d(t,{p:()=>T,W:()=>M});var i=n(3379),o=n.n(i),r=n(7795),s=n.n(r),a=n(569),l=n.n(a),d=n(3565),c=n.n(d),h=n(9216),u=n.n(h),g=n(4589),p=n.n(g),m=n(1188),f={};f.styleTagTransform=p(),f.setAttributes=c(),f.insert=l().bind(null,"head"),f.domAPI=s(),f.insertStyleElement=u(),o()(m.Z,f),m.Z&&m.Z.locals&&m.Z.locals;var _=n(3580),b=n(5321),C=n(8764),v=n(6346),w=n(317),y=n(4669),A=n(3794),S=n(1264),x=n(6248);class k{constructor(e,t=0,n=e.length,i=t-1){this.items=e,this.start=t,this.end=n,this.index=i}current(){return this.index===this.start-1||this.index===this.end?null:this.items[this.index]}next(){return this.index=Math.min(this.index+1,this.end),this.current()}previous(){return this.index=Math.max(this.index-1,this.start-1),this.current()}first(){return this.index=this.start,this.current()}last(){return this.index=this.end-1,this.current()}}class L{constructor(e=[],t=10){this._initialize(e),this._limit=t,this._onChange()}add(e){this._history.delete(e),this._history.add(e),this._onChange()}next(){return this._currentPosition()!==this._elements.length-1?this._navigator.next():null}previous(){return 0!==this._currentPosition()?this._navigator.previous():null}current(){return this._navigator.current()}first(){return this._navigator.first()}last(){return this._navigator.last()}has(e){return this._history.has(e)}_onChange(){this._reduceToLimit();const e=this._elements;this._navigator=new k(e,0,e.length,e.length)}_reduceToLimit(){const e=this._elements;e.length>this._limit&&this._initialize(e.slice(e.length-this._limit))}_currentPosition(){const e=this._navigator.current();return e?this._elements.indexOf(e):-1}_initialize(e){this._history=new Set;for(const t of e)this._history.add(t)}get _elements(){const e=[];return this._history.forEach((t=>e.push(t))),e}}var E=n(6781),N=n(4850);const D=b.$,I={inputBackground:S.Il.fromHex("#3C3C3C"),inputForeground:S.Il.fromHex("#CCCCCC"),inputValidationInfoBorder:S.Il.fromHex("#55AAFF"),inputValidationInfoBackground:S.Il.fromHex("#063B49"),inputValidationWarningBorder:S.Il.fromHex("#B89500"),inputValidationWarningBackground:S.Il.fromHex("#352A05"),inputValidationErrorBorder:S.Il.fromHex("#BE1100"),inputValidationErrorBackground:S.Il.fromHex("#5A1D1D")};class M extends A.${constructor(e,t,n){var i;super(),this.state="idle",this.maxHeight=Number.POSITIVE_INFINITY,this._onDidChange=this._register(new y.Q5),this.onDidChange=this._onDidChange.event,this._onDidHeightChange=this._register(new y.Q5),this.onDidHeightChange=this._onDidHeightChange.event,this.contextViewProvider=t,this.options=n||Object.create(null),(0,x.jB)(this.options,I,!1),this.message=null,this.placeholder=this.options.placeholder||"",this.tooltip=null!==(i=this.options.tooltip)&&void 0!==i?i:this.placeholder||"",this.ariaLabel=this.options.ariaLabel||"",this.inputBackground=this.options.inputBackground,this.inputForeground=this.options.inputForeground,this.inputBorder=this.options.inputBorder,this.inputValidationInfoBorder=this.options.inputValidationInfoBorder,this.inputValidationInfoBackground=this.options.inputValidationInfoBackground,this.inputValidationInfoForeground=this.options.inputValidationInfoForeground,this.inputValidationWarningBorder=this.options.inputValidationWarningBorder,this.inputValidationWarningBackground=this.options.inputValidationWarningBackground,this.inputValidationWarningForeground=this.options.inputValidationWarningForeground,this.inputValidationErrorBorder=this.options.inputValidationErrorBorder,this.inputValidationErrorBackground=this.options.inputValidationErrorBackground,this.inputValidationErrorForeground=this.options.inputValidationErrorForeground,this.options.validationOptions&&(this.validation=this.options.validationOptions.validation),this.element=b.R3(e,D(".monaco-inputbox.idle"));let o=this.options.flexibleHeight?"textarea":"input",r=b.R3(this.element,D(".ibwrapper"));if(this.input=b.R3(r,D(o+".input.empty")),this.input.setAttribute("autocorrect","off"),this.input.setAttribute("autocapitalize","off"),this.input.setAttribute("spellcheck","false"),this.onfocus(this.input,(()=>this.element.classList.add("synthetic-focus"))),this.onblur(this.input,(()=>this.element.classList.remove("synthetic-focus"))),this.options.flexibleHeight){this.maxHeight="number"==typeof this.options.flexibleMaxHeight?this.options.flexibleMaxHeight:Number.POSITIVE_INFINITY,this.mirror=b.R3(r,D("div.mirror")),this.mirror.innerText=" ",this.scrollableElement=new E.NB(this.element,{vertical:1}),this.options.flexibleWidth&&(this.input.setAttribute("wrap","off"),this.mirror.style.whiteSpace="pre",this.mirror.style.wordWrap="initial"),b.R3(e,this.scrollableElement.getDomNode()),this._register(this.scrollableElement),this._register(this.scrollableElement.onScroll((e=>this.input.scrollTop=e.scrollTop)));const t=this._register(new N.Y(document,"selectionchange")),n=y.ju.filter(t.event,(()=>{const e=document.getSelection();return(null==e?void 0:e.anchorNode)===r}));this._register(n(this.updateScrollDimensions,this)),this._register(this.onDidHeightChange(this.updateScrollDimensions,this))}else this.input.type=this.options.type||"text",this.input.setAttribute("wrap","off");this.ariaLabel&&this.input.setAttribute("aria-label",this.ariaLabel),this.placeholder&&!this.options.showPlaceholderOnFocus&&this.setPlaceHolder(this.placeholder),this.tooltip&&this.setTooltip(this.tooltip),this.oninput(this.input,(()=>this.onValueChange())),this.onblur(this.input,(()=>this.onBlur())),this.onfocus(this.input,(()=>this.onFocus())),this.ignoreGesture(this.input),setTimeout((()=>this.updateMirror()),0),this.options.actions&&(this.actionbar=this._register(new w.o(this.element)),this.actionbar.push(this.options.actions,{icon:!0,label:!1})),this.applyStyles()}onBlur(){this._hideMessage(),this.options.showPlaceholderOnFocus&&this.input.setAttribute("placeholder","")}onFocus(){this._showMessage(),this.options.showPlaceholderOnFocus&&this.input.setAttribute("placeholder",this.placeholder||"")}setPlaceHolder(e){this.placeholder=e,this.input.setAttribute("placeholder",e)}setTooltip(e){this.tooltip=e,this.input.title=e}setAriaLabel(e){this.ariaLabel=e,e?this.input.setAttribute("aria-label",this.ariaLabel):this.input.removeAttribute("aria-label")}getAriaLabel(){return this.ariaLabel}get inputElement(){return this.input}get value(){return this.input.value}set value(e){this.input.value!==e&&(this.input.value=e,this.onValueChange())}get height(){return"number"==typeof this.cachedHeight?this.cachedHeight:b.wn(this.element)}focus(){this.input.focus()}blur(){this.input.blur()}hasFocus(){return document.activeElement===this.input}select(e=null){this.input.select(),e&&(this.input.setSelectionRange(e.start,e.end),e.end===this.input.value.length&&(this.input.scrollLeft=this.input.scrollWidth))}isSelectionAtEnd(){return this.input.selectionEnd===this.input.value.length&&this.input.selectionStart===this.input.selectionEnd}enable(){this.input.removeAttribute("disabled")}disable(){this.blur(),this.input.disabled=!0,this._hideMessage()}get width(){return b.w(this.input)}set width(e){if(this.options.flexibleHeight&&this.options.flexibleWidth){let t=0;this.mirror&&(t=(parseFloat(this.mirror.style.paddingLeft||"")||0)+(parseFloat(this.mirror.style.paddingRight||"")||0)),this.input.style.width=e-t+"px"}else this.input.style.width=e+"px";this.mirror&&(this.mirror.style.width=e+"px")}set paddingRight(e){this.options.flexibleHeight&&this.options.flexibleWidth?this.input.style.width=`calc(100% - ${e}px)`:this.input.style.paddingRight=e+"px",this.mirror&&(this.mirror.style.paddingRight=e+"px")}updateScrollDimensions(){if("number"!=typeof this.cachedContentHeight||"number"!=typeof this.cachedHeight||!this.scrollableElement)return;const e=this.cachedContentHeight,t=this.cachedHeight,n=this.input.scrollTop;this.scrollableElement.setScrollDimensions({scrollHeight:e,height:t}),this.scrollableElement.setScrollPosition({scrollTop:n})}showMessage(e,t){this.message=e,this.element.classList.remove("idle"),this.element.classList.remove("info"),this.element.classList.remove("warning"),this.element.classList.remove("error"),this.element.classList.add(this.classForType(e.type));const n=this.stylesForType(this.message.type);this.element.style.border=n.border?`1px solid ${n.border}`:"",(this.hasFocus()||t)&&this._showMessage()}hideMessage(){this.message=null,this.element.classList.remove("info"),this.element.classList.remove("warning"),this.element.classList.remove("error"),this.element.classList.add("idle"),this._hideMessage(),this.applyStyles()}validate(){let e=null;return this.validation&&(e=this.validation(this.value),e?(this.inputElement.setAttribute("aria-invalid","true"),this.showMessage(e)):this.inputElement.hasAttribute("aria-invalid")&&(this.inputElement.removeAttribute("aria-invalid"),this.hideMessage())),null==e?void 0:e.type}stylesForType(e){switch(e){case 1:return{border:this.inputValidationInfoBorder,background:this.inputValidationInfoBackground,foreground:this.inputValidationInfoForeground};case 2:return{border:this.inputValidationWarningBorder,background:this.inputValidationWarningBackground,foreground:this.inputValidationWarningForeground};default:return{border:this.inputValidationErrorBorder,background:this.inputValidationErrorBackground,foreground:this.inputValidationErrorForeground}}}classForType(e){switch(e){case 1:return"info";case 2:return"warning";default:return"error"}}_showMessage(){if(!this.contextViewProvider||!this.message)return;let e,t,n=()=>e.style.width=b.w(this.element)+"px";this.contextViewProvider.showContextView({getAnchor:()=>this.element,anchorAlignment:1,render:t=>{if(!this.message)return null;e=b.R3(t,D(".monaco-inputbox-container")),n();const i={inline:!0,className:"monaco-inputbox-message"},o=this.message.formatContent?(0,C.BO)(this.message.content,i):(0,C.IY)(this.message.content,i);o.classList.add(this.classForType(this.message.type));const r=this.stylesForType(this.message.type);return o.style.backgroundColor=r.background?r.background.toString():"",o.style.color=r.foreground?r.foreground.toString():"",o.style.border=r.border?`1px solid ${r.border}`:"",b.R3(e,o),null},onHide:()=>{this.state="closed"},layout:n}),t=3===this.message.type?_.N("alertErrorMessage","Error: {0}",this.message.content):2===this.message.type?_.N("alertWarningMessage","Warning: {0}",this.message.content):_.N("alertInfoMessage","Info: {0}",this.message.content),v.Z9(t),this.state="open"}_hideMessage(){this.contextViewProvider&&("open"===this.state&&this.contextViewProvider.hideContextView(),this.state="idle")}onValueChange(){this._onDidChange.fire(this.value),this.validate(),this.updateMirror(),this.input.classList.toggle("empty",!this.value),"open"===this.state&&this.contextViewProvider&&this.contextViewProvider.layout()}updateMirror(){if(!this.mirror)return;const e=this.value,t=10===e.charCodeAt(e.length-1)?" ":"";(e+t).replace(/\u000c/g,"")?this.mirror.textContent=e+t:this.mirror.innerText=" ",this.layout()}style(e){this.inputBackground=e.inputBackground,this.inputForeground=e.inputForeground,this.inputBorder=e.inputBorder,this.inputValidationInfoBackground=e.inputValidationInfoBackground,this.inputValidationInfoForeground=e.inputValidationInfoForeground,this.inputValidationInfoBorder=e.inputValidationInfoBorder,this.inputValidationWarningBackground=e.inputValidationWarningBackground,this.inputValidationWarningForeground=e.inputValidationWarningForeground,this.inputValidationWarningBorder=e.inputValidationWarningBorder,this.inputValidationErrorBackground=e.inputValidationErrorBackground,this.inputValidationErrorForeground=e.inputValidationErrorForeground,this.inputValidationErrorBorder=e.inputValidationErrorBorder,this.applyStyles()}applyStyles(){const e=this.inputBackground?this.inputBackground.toString():"",t=this.inputForeground?this.inputForeground.toString():"",n=this.inputBorder?this.inputBorder.toString():"";this.element.style.backgroundColor=e,this.element.style.color=t,this.input.style.backgroundColor="inherit",this.input.style.color=t,this.element.style.borderWidth=n?"1px":"",this.element.style.borderStyle=n?"solid":"",this.element.style.borderColor=n}layout(){if(!this.mirror)return;const e=this.cachedContentHeight;this.cachedContentHeight=b.wn(this.mirror),e!==this.cachedContentHeight&&(this.cachedHeight=Math.min(this.cachedContentHeight,this.maxHeight),this.input.style.height=this.cachedHeight+"px",this._onDidHeightChange.fire(this.cachedContentHeight))}insertAtCursor(e){const t=this.inputElement,n=t.selectionStart,i=t.selectionEnd,o=t.value;null!==n&&null!==i&&(this.value=o.substr(0,n)+e+o.substr(i),t.setSelectionRange(n+1,n+1),this.layout())}dispose(){this._hideMessage(),this.message=null,this.actionbar&&this.actionbar.dispose(),super.dispose()}}class T extends M{constructor(e,t,n){super(e,t,n),this.history=new L(n.history,100)}addToHistory(){this.value&&this.value!==this.getCurrentValue()&&this.history.add(this.value)}showNextValue(){this.history.has(this.value)||this.addToHistory();let e=this.getNextValue();e&&(e=e===this.value?this.getNextValue():e),e&&(this.value=e,v.i7(this.value))}showPreviousValue(){this.history.has(this.value)||this.addToHistory();let e=this.getPreviousValue();e&&(e=e===this.value?this.getPreviousValue():e),e&&(this.value=e,v.i7(this.value))}getCurrentValue(){let e=this.history.current();return e||(e=this.history.last(),this.history.next()),e}getPreviousValue(){return this.history.previous()||this.history.first()}getNextValue(){return this.history.next()||this.history.last()}}},5707:(e,t,n)=>{"use strict";n.d(t,{kX:()=>A,Bv:()=>L});var i=n(6248),o=n(5976),r=n(553),s=n(4669),a=n(6781),l=n(6633),d=n(1134);function c(e,t){const n=[];for(let i of t){if(e.start>=i.range.end)continue;if(e.end({range:h(e.range,i),size:e.size}))),s=n.map(((t,n)=>({range:{start:e+n,end:e+n+1},size:t.size})));this.groups=function(...e){return function(e){const t=[];let n=null;for(let i of e){const e=i.range.start,o=i.range.end,r=i.size;n&&r===n.size?n.range.end=o:(n={range:{start:e,end:o},size:r},t.push(n))}return t}(e.reduce(((e,t)=>e.concat(t)),[]))}(o,s,r),this._size=this.groups.reduce(((e,t)=>e+t.size*(t.range.end-t.range.start)),0)}get count(){const e=this.groups.length;return e?this.groups[e-1].range.end:0}get size(){return this._size}indexAt(e){if(e<0)return-1;let t=0,n=0;for(let i of this.groups){const o=i.range.end-i.range.start,r=n+o*i.size;if(e{for(const n of e)this.getRenderer(t).disposeTemplate(n.templateData),n.templateData=null})),this.cache.clear()}getRenderer(e){const t=this.renderers.get(e);if(!t)throw new Error(`No renderer found for ${e}`);return t}}var m=n(9898),f=n(9488),_=n(3547),b=n(5393),C=n(6268),v=n(4850),w=function(e,t,n,i){var o,r=arguments.length,s=r<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,i);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,n,s):o(t,n))||s);return r>3&&s&&Object.defineProperty(t,n,s),s};const y={useShadows:!0,verticalScrollMode:1,setRowLineHeight:!0,setRowHeight:!0,supportDynamicHeights:!1,dnd:{getDragElements:e=>[e],getDragURI:()=>null,onDragStart(){},onDragOver:()=>!1,drop(){}},horizontalScrolling:!1,transformOptimization:!0,alwaysConsumeMouseWheel:!0};class A{constructor(e){this.elements=e}update(){}getData(){return this.elements}}class S{constructor(e){this.elements=e}update(){}getData(){return this.elements}}class x{constructor(){this.types=[],this.files=[]}update(e){if(e.types&&this.types.splice(0,this.types.length,...e.types),e.files){this.files.splice(0,this.files.length);for(let t=0;tn,(null==e?void 0:e.getPosInSet)?this.getPosInSet=e.getPosInSet.bind(e):this.getPosInSet=(e,t)=>t+1,(null==e?void 0:e.getRole)?this.getRole=e.getRole.bind(e):this.getRole=e=>"listitem",(null==e?void 0:e.isChecked)?this.isChecked=e.isChecked.bind(e):this.isChecked=e=>{}}}class L{constructor(e,t,n,d=y){if(this.virtualDelegate=t,this.domId="list_id_"+ ++L.InstanceCount,this.renderers=new Map,this.renderWidth=0,this._scrollHeight=0,this.scrollableElementUpdateDisposable=null,this.scrollableElementWidthDelayer=new b.vp(50),this.splicing=!1,this.dragOverAnimationStopDisposable=o.JT.None,this.dragOverMouseY=0,this.canDrop=!1,this.currentDragFeedbackDisposable=o.JT.None,this.onDragLeaveTimeout=o.JT.None,this.disposables=new o.SL,this._onDidChangeContentHeight=new s.Q5,this._horizontalScrolling=!1,d.horizontalScrolling&&d.supportDynamicHeights)throw new Error("Horizontal scrolling and dynamic heights not supported simultaneously");this.items=[],this.itemId=0,this.rangeMap=new u;for(const e of n)this.renderers.set(e.templateId,e);this.cache=this.disposables.add(new p(this.renderers)),this.lastRenderTop=0,this.lastRenderHeight=0,this.domNode=document.createElement("div"),this.domNode.className="monaco-list",this.domNode.classList.add(this.domId),this.domNode.tabIndex=0,this.domNode.classList.toggle("mouse-support","boolean"!=typeof d.mouseSupport||d.mouseSupport),this._horizontalScrolling=(0,i.CJ)(d,(e=>e.horizontalScrolling),y.horizontalScrolling),this.domNode.classList.toggle("horizontal-scrolling",this._horizontalScrolling),this.additionalScrollHeight=void 0===d.additionalScrollHeight?0:d.additionalScrollHeight,this.accessibilityProvider=new k(d.accessibilityProvider),this.rowsContainer=document.createElement("div"),this.rowsContainer.className="monaco-list-rows",(0,i.CJ)(d,(e=>e.transformOptimization),y.transformOptimization)&&(this.rowsContainer.style.transform="translate3d(0px, 0px, 0px)"),this.disposables.add(r.o.addTarget(this.rowsContainer)),this.scrollable=new l.Rm((0,i.CJ)(d,(e=>e.smoothScrolling),!1)?125:0,(e=>(0,g.jL)(e))),this.scrollableElement=this.disposables.add(new a.$Z(this.rowsContainer,{alwaysConsumeMouseWheel:(0,i.CJ)(d,(e=>e.alwaysConsumeMouseWheel),y.alwaysConsumeMouseWheel),horizontal:1,vertical:(0,i.CJ)(d,(e=>e.verticalScrollMode),y.verticalScrollMode),useShadows:(0,i.CJ)(d,(e=>e.useShadows),y.useShadows),mouseWheelScrollSensitivity:d.mouseWheelScrollSensitivity,fastScrollSensitivity:d.fastScrollSensitivity},this.scrollable)),this.domNode.appendChild(this.scrollableElement.getDomNode()),e.appendChild(this.domNode),this.scrollableElement.onScroll(this.onScroll,this,this.disposables),this.disposables.add((0,g.nm)(this.rowsContainer,r.t.Change,(e=>this.onTouchChange(e)))),this.disposables.add((0,g.nm)(this.scrollableElement.getDomNode(),"scroll",(e=>e.target.scrollTop=0))),this.disposables.add((0,g.nm)(this.domNode,"dragover",(e=>this.onDragOver(this.toDragEvent(e))))),this.disposables.add((0,g.nm)(this.domNode,"drop",(e=>this.onDrop(this.toDragEvent(e))))),this.disposables.add((0,g.nm)(this.domNode,"dragleave",(e=>this.onDragLeave(this.toDragEvent(e))))),this.disposables.add((0,g.nm)(this.domNode,"dragend",(e=>this.onDragEnd(e)))),this.setRowLineHeight=(0,i.CJ)(d,(e=>e.setRowLineHeight),y.setRowLineHeight),this.setRowHeight=(0,i.CJ)(d,(e=>e.setRowHeight),y.setRowHeight),this.supportDynamicHeights=(0,i.CJ)(d,(e=>e.supportDynamicHeights),y.supportDynamicHeights),this.dnd=(0,i.CJ)(d,(e=>e.dnd),y.dnd),this.layout()}get contentHeight(){return this.rangeMap.size}get horizontalScrolling(){return this._horizontalScrolling}set horizontalScrolling(e){if(e!==this._horizontalScrolling){if(e&&this.supportDynamicHeights)throw new Error("Horizontal scrolling and dynamic heights not supported simultaneously");if(this._horizontalScrolling=e,this.domNode.classList.toggle("horizontal-scrolling",this._horizontalScrolling),this._horizontalScrolling){for(const e of this.items)this.measureItemWidth(e);this.updateScrollWidth(),this.scrollableElement.setScrollDimensions({width:(0,g.FK)(this.domNode)}),this.rowsContainer.style.width=`${Math.max(this.scrollWidth||0,this.renderWidth)}px`}else this.scrollableElementWidthDelayer.cancel(),this.scrollableElement.setScrollDimensions({width:this.renderWidth,scrollWidth:this.renderWidth}),this.rowsContainer.style.width=""}}updateOptions(e){void 0!==e.additionalScrollHeight&&(this.additionalScrollHeight=e.additionalScrollHeight,this.scrollableElement.setScrollDimensions({scrollHeight:this.scrollHeight})),void 0!==e.smoothScrolling&&this.scrollable.setSmoothScrollDuration(e.smoothScrolling?125:0),void 0!==e.horizontalScrolling&&(this.horizontalScrolling=e.horizontalScrolling),void 0!==e.mouseWheelScrollSensitivity&&this.scrollableElement.updateOptions({mouseWheelScrollSensitivity:e.mouseWheelScrollSensitivity}),void 0!==e.fastScrollSensitivity&&this.scrollableElement.updateOptions({fastScrollSensitivity:e.fastScrollSensitivity})}splice(e,t,n=[]){if(this.splicing)throw new Error("Can't run recursive splices.");this.splicing=!0;try{return this._splice(e,t,n)}finally{this.splicing=!1,this._onDidChangeContentHeight.fire(this.contentHeight)}}_splice(e,t,n=[]){const i=this.getRenderRange(this.lastRenderTop,this.lastRenderHeight),r={start:e,end:e+t},s=d.e.intersect(i,r),a=new Map;for(let e=s.start;e({id:String(this.itemId++),element:e,templateId:this.virtualDelegate.getTemplateId(e),size:this.virtualDelegate.getHeight(e),width:void 0,hasDynamicHeight:!!this.virtualDelegate.hasDynamicHeight&&this.virtualDelegate.hasDynamicHeight(e),lastDynamicHeightWidth:void 0,row:null,uri:void 0,dropTarget:!1,dragStartDisposable:o.JT.None})));let m;0===e&&t>=this.items.length?(this.rangeMap=new u,this.rangeMap.splice(0,0,p),m=this.items,this.items=p):(this.rangeMap.splice(e,t,p),m=this.items.splice(e,t,...p));const f=n.length-t,_=this.getRenderRange(this.lastRenderTop,this.lastRenderHeight),b=h(c,f),C=d.e.intersect(_,b);for(let e=C.start;eh(e,f))),y=[{start:e,end:e+n.length},...w].map((e=>d.e.intersect(_,e))),A=this.getNextToLastElement(y);for(const e of y)for(let t=e.start;te.element))}eventuallyUpdateScrollDimensions(){this._scrollHeight=this.contentHeight,this.rowsContainer.style.height=`${this._scrollHeight}px`,this.scrollableElementUpdateDisposable||(this.scrollableElementUpdateDisposable=(0,g.jL)((()=>{this.scrollableElement.setScrollDimensions({scrollHeight:this.scrollHeight}),this.updateScrollWidth(),this.scrollableElementUpdateDisposable=null})))}eventuallyUpdateScrollWidth(){this.horizontalScrolling?this.scrollableElementWidthDelayer.trigger((()=>this.updateScrollWidth())):this.scrollableElementWidthDelayer.cancel()}updateScrollWidth(){if(!this.horizontalScrolling)return;let e=0;for(const t of this.items)void 0!==t.width&&(e=Math.max(e,t.width));this.scrollWidth=e,this.scrollableElement.setScrollDimensions({scrollWidth:0===e?0:e+10})}rerender(){if(this.supportDynamicHeights){for(const e of this.items)e.lastDynamicHeightWidth=void 0;this._rerender(this.lastRenderTop,this.lastRenderHeight)}}get length(){return this.items.length}get renderHeight(){return this.scrollableElement.getScrollDimensions().height}element(e){return this.items[e].element}domElement(e){const t=this.items[e].row;return t&&t.domNode}elementHeight(e){return this.items[e].size}elementTop(e){return this.rangeMap.positionAt(e)}indexAt(e){return this.rangeMap.indexAt(e)}indexAfter(e){return this.rangeMap.indexAfter(e)}layout(e,t){let n={height:"number"==typeof e?e:(0,g.If)(this.domNode)};this.scrollableElementUpdateDisposable&&(this.scrollableElementUpdateDisposable.dispose(),this.scrollableElementUpdateDisposable=null,n.scrollHeight=this.scrollHeight),this.scrollableElement.setScrollDimensions(n),void 0!==t&&(this.renderWidth=t,this.supportDynamicHeights&&this._rerender(this.scrollTop,this.renderHeight)),this.horizontalScrolling&&this.scrollableElement.setScrollDimensions({width:"number"==typeof t?t:(0,g.FK)(this.domNode)})}render(e,t,n,i,o,r=!1){const s=this.getRenderRange(t,n),a=d.e.relativeComplement(s,e),l=d.e.relativeComplement(e,s),c=this.getNextToLastElement(a);if(r){const t=d.e.intersect(e,s);for(let e=t.start;ethis.onDragStart(i.element,a,e)))),this.horizontalScrolling&&(this.measureItemWidth(i),this.eventuallyUpdateScrollWidth())}measureItemWidth(e){if(!e.row||!e.row.domNode)return;e.row.domNode.style.width=C.vU?"-moz-fit-content":"fit-content",e.width=(0,g.FK)(e.row.domNode);const t=window.getComputedStyle(e.row.domNode);t.paddingLeft&&(e.width+=parseFloat(t.paddingLeft)),t.paddingRight&&(e.width+=parseFloat(t.paddingRight)),e.row.domNode.style.width=""}updateItemInDOM(e,t){e.row.domNode.style.top=`${this.elementTop(t)}px`,this.setRowHeight&&(e.row.domNode.style.height=`${e.size}px`),this.setRowLineHeight&&(e.row.domNode.style.lineHeight=`${e.size}px`),e.row.domNode.setAttribute("data-index",`${t}`),e.row.domNode.setAttribute("data-last-element",t===this.length-1?"true":"false"),e.row.domNode.setAttribute("aria-setsize",String(this.accessibilityProvider.getSetSize(e.element,t,this.length))),e.row.domNode.setAttribute("aria-posinset",String(this.accessibilityProvider.getPosInSet(e.element,t))),e.row.domNode.setAttribute("id",this.getElementDomId(t)),e.row.domNode.classList.toggle("drop-target",e.dropTarget)}removeItemFromDOM(e){const t=this.items[e];if(t.dragStartDisposable.dispose(),t.row){const n=this.renderers.get(t.templateId);n&&n.disposeElement&&n.disposeElement(t.element,e,t.row.templateData,t.size),this.cache.release(t.row),t.row=null}this.horizontalScrolling&&this.eventuallyUpdateScrollWidth()}getScrollTop(){return this.scrollableElement.getScrollPosition().scrollTop}setScrollTop(e,t){this.scrollableElementUpdateDisposable&&(this.scrollableElementUpdateDisposable.dispose(),this.scrollableElementUpdateDisposable=null,this.scrollableElement.setScrollDimensions({scrollHeight:this.scrollHeight})),this.scrollableElement.setScrollPosition({scrollTop:e,reuseAnimation:t})}get scrollTop(){return this.getScrollTop()}set scrollTop(e){this.setScrollTop(e)}get scrollHeight(){return this._scrollHeight+(this.horizontalScrolling?10:0)+this.additionalScrollHeight}get onMouseClick(){return s.ju.map(this.disposables.add(new v.Y(this.domNode,"click")).event,(e=>this.toMouseEvent(e)))}get onMouseDblClick(){return s.ju.map(this.disposables.add(new v.Y(this.domNode,"dblclick")).event,(e=>this.toMouseEvent(e)))}get onMouseMiddleClick(){return s.ju.filter(s.ju.map(this.disposables.add(new v.Y(this.domNode,"auxclick")).event,(e=>this.toMouseEvent(e))),(e=>1===e.browserEvent.button))}get onMouseDown(){return s.ju.map(this.disposables.add(new v.Y(this.domNode,"mousedown")).event,(e=>this.toMouseEvent(e)))}get onContextMenu(){return s.ju.any(s.ju.map(this.disposables.add(new v.Y(this.domNode,"contextmenu")).event,(e=>this.toMouseEvent(e))),s.ju.map(this.disposables.add(new v.Y(this.domNode,r.t.Contextmenu)).event,(e=>this.toGestureEvent(e))))}get onTouchStart(){return s.ju.map(this.disposables.add(new v.Y(this.domNode,"touchstart")).event,(e=>this.toTouchEvent(e)))}get onTap(){return s.ju.map(this.disposables.add(new v.Y(this.rowsContainer,r.t.Tap)).event,(e=>this.toGestureEvent(e)))}toMouseEvent(e){const t=this.getItemIndexFromEventTarget(e.target||null),n=void 0===t?void 0:this.items[t];return{browserEvent:e,index:t,element:n&&n.element}}toTouchEvent(e){const t=this.getItemIndexFromEventTarget(e.target||null),n=void 0===t?void 0:this.items[t];return{browserEvent:e,index:t,element:n&&n.element}}toGestureEvent(e){const t=this.getItemIndexFromEventTarget(e.initialTarget||null),n=void 0===t?void 0:this.items[t];return{browserEvent:e,index:t,element:n&&n.element}}toDragEvent(e){const t=this.getItemIndexFromEventTarget(e.target||null),n=void 0===t?void 0:this.items[t];return{browserEvent:e,index:t,element:n&&n.element}}onScroll(e){try{const t=this.getRenderRange(this.lastRenderTop,this.lastRenderHeight);this.render(t,e.scrollTop,e.height,e.scrollLeft,e.scrollWidth),this.supportDynamicHeights&&this._rerender(e.scrollTop,e.height,e.inSmoothScrolling)}catch(t){throw console.error("Got bad scroll event:",e),t}}onTouchChange(e){e.preventDefault(),e.stopPropagation(),this.scrollTop-=e.translationY}onDragStart(e,t,n){if(!n.dataTransfer)return;const i=this.dnd.getDragElements(e);if(n.dataTransfer.effectAllowed="copyMove",n.dataTransfer.setData(_.go.TEXT,t),n.dataTransfer.setDragImage){let e;this.dnd.getDragLabel&&(e=this.dnd.getDragLabel(i,n)),void 0===e&&(e=String(i.length));const t=(0,g.$)(".monaco-drag-image");t.textContent=e,document.body.appendChild(t),n.dataTransfer.setDragImage(t,-10,-10),setTimeout((()=>document.body.removeChild(t)),0)}this.currentDragData=new A(i),_.P$.CurrentDragAndDropData=new S(i),this.dnd.onDragStart&&this.dnd.onDragStart(this.currentDragData,n)}onDragOver(e){if(e.browserEvent.preventDefault(),this.onDragLeaveTimeout.dispose(),_.P$.CurrentDragAndDropData&&"vscode-ui"===_.P$.CurrentDragAndDropData.getData())return!1;if(this.setupDragAndDropScrollTopAnimation(e.browserEvent),!e.browserEvent.dataTransfer)return!1;if(!this.currentDragData)if(_.P$.CurrentDragAndDropData)this.currentDragData=_.P$.CurrentDragAndDropData;else{if(!e.browserEvent.dataTransfer.types)return!1;this.currentDragData=new x}const t=this.dnd.onDragOver(this.currentDragData,e.element,e.index,e.browserEvent);if(this.canDrop="boolean"==typeof t?t:t.accept,!this.canDrop)return this.currentDragFeedback=void 0,this.currentDragFeedbackDisposable.dispose(),!1;let n;if(e.browserEvent.dataTransfer.dropEffect="boolean"!=typeof t&&0===t.effect?"copy":"move",n="boolean"!=typeof t&&t.feedback?t.feedback:void 0===e.index?[-1]:[e.index],n=(0,f.EB)(n).filter((e=>e>=-1&&ee-t)),n=-1===n[0]?[-1]:n,i=this.currentDragFeedback,r=n,Array.isArray(i)&&Array.isArray(r)?(0,f.fS)(i,r):i===r)return!0;var i,r;if(this.currentDragFeedback=n,this.currentDragFeedbackDisposable.dispose(),-1===n[0])this.domNode.classList.add("drop-target"),this.rowsContainer.classList.add("drop-target"),this.currentDragFeedbackDisposable=(0,o.OF)((()=>{this.domNode.classList.remove("drop-target"),this.rowsContainer.classList.remove("drop-target")}));else{for(const e of n){const t=this.items[e];t.dropTarget=!0,t.row&&t.row.domNode.classList.add("drop-target")}this.currentDragFeedbackDisposable=(0,o.OF)((()=>{for(const e of n){const t=this.items[e];t.dropTarget=!1,t.row&&t.row.domNode.classList.remove("drop-target")}}))}return!0}onDragLeave(e){var t,n;this.onDragLeaveTimeout.dispose(),this.onDragLeaveTimeout=(0,b.Vg)((()=>this.clearDragOverFeedback()),100),this.currentDragData&&(null===(n=(t=this.dnd).onDragLeave)||void 0===n||n.call(t,this.currentDragData,e.element,e.index,e.browserEvent))}onDrop(e){if(!this.canDrop)return;const t=this.currentDragData;this.teardownDragAndDropScrollTopAnimation(),this.clearDragOverFeedback(),this.currentDragData=void 0,_.P$.CurrentDragAndDropData=void 0,t&&e.browserEvent.dataTransfer&&(e.browserEvent.preventDefault(),t.update(e.browserEvent.dataTransfer),this.dnd.drop(t,e.element,e.index,e.browserEvent))}onDragEnd(e){this.canDrop=!1,this.teardownDragAndDropScrollTopAnimation(),this.clearDragOverFeedback(),this.currentDragData=void 0,_.P$.CurrentDragAndDropData=void 0,this.dnd.onDragEnd&&this.dnd.onDragEnd(e)}clearDragOverFeedback(){this.currentDragFeedback=void 0,this.currentDragFeedbackDisposable.dispose(),this.currentDragFeedbackDisposable=o.JT.None}setupDragAndDropScrollTopAnimation(e){if(!this.dragOverAnimationDisposable){const e=(0,g.xQ)(this.domNode).top;this.dragOverAnimationDisposable=(0,g.jt)(this.animateDragAndDropScrollTop.bind(this,e))}this.dragOverAnimationStopDisposable.dispose(),this.dragOverAnimationStopDisposable=(0,b.Vg)((()=>{this.dragOverAnimationDisposable&&(this.dragOverAnimationDisposable.dispose(),this.dragOverAnimationDisposable=void 0)}),1e3),this.dragOverMouseY=e.pageY}animateDragAndDropScrollTop(e){if(void 0===this.dragOverMouseY)return;const t=this.dragOverMouseY-e,n=this.renderHeight-35;t<35?this.scrollTop+=Math.max(-14,Math.floor(.3*(t-35))):t>n&&(this.scrollTop+=Math.min(14,Math.floor(.3*(t-n))))}teardownDragAndDropScrollTopAnimation(){this.dragOverAnimationStopDisposable.dispose(),this.dragOverAnimationDisposable&&(this.dragOverAnimationDisposable.dispose(),this.dragOverAnimationDisposable=void 0)}getItemIndexFromEventTarget(e){const t=this.scrollableElement.getDomNode();let n=e;for(;n instanceof HTMLElement&&n!==this.rowsContainer&&t.contains(n);){const e=n.getAttribute("data-index");if(e){const t=Number(e);if(!isNaN(t))return t}n=n.parentElement}}getRenderRange(e,t){return{start:this.rangeMap.indexAt(e),end:this.rangeMap.indexAfter(e+t-1)}}_rerender(e,t,n){const i=this.getRenderRange(e,t);let o,r;e===this.elementTop(i.start)?(o=i.start,r=0):i.end-i.start>1&&(o=i.start+1,r=this.elementTop(o)-e);let s=0;for(;;){const a=this.getRenderRange(e,t);let l=!1;for(let e=a.start;e{"use strict";n.d(t,{WK:()=>M,wD:()=>W,aV:()=>K,sx:()=>F,cK:()=>N,hD:()=>D,wn:()=>B,Zo:()=>O}),n(3164);var i=n(5976),o=n(8401),r=n(9488),s=n(9898),a=n(1432),l=n(553),d=n(9069),c=n(4669),h=n(4850);class u extends Error{constructor(e,t){super(`ListError [${e}] ${t}`)}}var g=n(5707),p=n(1264),m=n(6248);class f{constructor(e){this.spliceables=e}splice(e,t,n){this.spliceables.forEach((i=>i.splice(e,t,n)))}}var _,b=n(9870),C=n(5392),v=n(6346),w=n(5321),y=n(5393),A=function(e,t,n,i){var o,r=arguments.length,s=r<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,i);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,n,s):o(t,n))||s);return r>3&&s&&Object.defineProperty(t,n,s),s},S=function(e,t,n,i){return new(n||(n=Promise))((function(o,r){function s(e){try{l(i.next(e))}catch(e){r(e)}}function a(e){try{l(i.throw(e))}catch(e){r(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,a)}l((i=i.apply(e,t||[])).next())}))};class x{constructor(e){this.trait=e,this.renderedElements=[]}get templateId(){return`template:${this.trait.trait}`}renderTemplate(e){return e}renderElement(e,t,n){const i=this.renderedElements.findIndex((e=>e.templateData===n));if(i>=0){const e=this.renderedElements[i];this.trait.unrender(n),e.index=t}else{const e={index:t,templateData:n};this.renderedElements.push(e)}this.trait.renderIndex(t,n)}splice(e,t,n){const i=[];for(const o of this.renderedElements)o.index=e+t&&i.push({index:o.index+n-t,templateData:o.templateData});this.renderedElements=i}renderIndexes(e){for(const{index:t,templateData:n}of this.renderedElements)e.indexOf(t)>-1&&this.trait.renderIndex(t,n)}disposeTemplate(e){const t=this.renderedElements.findIndex((t=>t.templateData===e));t<0||this.renderedElements.splice(t,1)}}class k{constructor(e){this._trait=e,this.length=0,this.indexes=[],this.sortedIndexes=[],this._onChange=new c.Q5,this.onChange=this._onChange.event}get trait(){return this._trait}get renderer(){return new x(this)}splice(e,t,n){var i;t=Math.max(0,Math.min(t,this.length-e));const o=n.length-t,r=e+t,s=[...this.sortedIndexes.filter((t=>tt?n+e:-1)).filter((e=>-1!==e)),...this.sortedIndexes.filter((e=>e>=r)).map((e=>e+o))],a=this.length+o;if(this.sortedIndexes.length>0&&0===s.length&&a>0){const t=null!==(i=this.sortedIndexes.find((t=>t>=e)))&&void 0!==i?i:a-1;s.push(Math.min(t,a-1))}this.renderer.splice(e,t,n.length),this._set(s,s),this.length=a}renderIndex(e,t){t.classList.toggle(this._trait,this.contains(e))}unrender(e){e.classList.remove(this._trait)}set(e,t){return this._set(e,[...e].sort(j),t)}_set(e,t,n){const i=this.indexes,o=this.sortedIndexes;this.indexes=e,this.sortedIndexes=t;const r=H(o,e);return this.renderer.renderIndexes(r),this._onChange.fire({indexes:e,browserEvent:n}),i}get(){return this.indexes}contains(e){return(0,r.ry)(this.sortedIndexes,e,j)>=0}dispose(){(0,i.B9)(this._onChange)}}A([s.H],k.prototype,"renderer",null);class L extends k{constructor(e){super("selected"),this.setAriaSelected=e}renderIndex(e,t){super.renderIndex(e,t),this.setAriaSelected&&(this.contains(e)?t.setAttribute("aria-selected","true"):t.setAttribute("aria-selected","false"))}}class E{constructor(e,t,n){this.trait=e,this.view=t,this.identityProvider=n}splice(e,t,n){if(!this.identityProvider)return this.trait.splice(e,t,n.map((()=>!1)));const i=this.trait.get().map((e=>this.identityProvider.getId(this.view.element(e)).toString())),o=n.map((e=>i.indexOf(this.identityProvider.getId(e).toString())>-1));this.trait.splice(e,t,o)}}function N(e){return"INPUT"===e.tagName||"TEXTAREA"===e.tagName}function D(e){return!!e.classList.contains("monaco-editor")||!e.classList.contains("monaco-list")&&!!e.parentElement&&D(e.parentElement)}class I{constructor(e,t,n){this.list=e,this.view=t,this.disposables=new i.SL,this.multipleSelectionDisposables=new i.SL,this.onKeyDown.filter((e=>3===e.keyCode)).on(this.onEnter,this,this.disposables),this.onKeyDown.filter((e=>16===e.keyCode)).on(this.onUpArrow,this,this.disposables),this.onKeyDown.filter((e=>18===e.keyCode)).on(this.onDownArrow,this,this.disposables),this.onKeyDown.filter((e=>11===e.keyCode)).on(this.onPageUpArrow,this,this.disposables),this.onKeyDown.filter((e=>12===e.keyCode)).on(this.onPageDownArrow,this,this.disposables),this.onKeyDown.filter((e=>9===e.keyCode)).on(this.onEscape,this,this.disposables),!1!==n.multipleSelectionSupport&&this.onKeyDown.filter((e=>(a.dz?e.metaKey:e.ctrlKey)&&31===e.keyCode)).on(this.onCtrlA,this,this.multipleSelectionDisposables)}get onKeyDown(){return c.ju.chain(this.disposables.add(new h.Y(this.view.domNode,"keydown")).event).filter((e=>!N(e.target))).map((e=>new d.y(e)))}updateOptions(e){void 0!==e.multipleSelectionSupport&&(this.multipleSelectionDisposables.clear(),e.multipleSelectionSupport&&this.onKeyDown.filter((e=>(a.dz?e.metaKey:e.ctrlKey)&&31===e.keyCode)).on(this.onCtrlA,this,this.multipleSelectionDisposables))}onEnter(e){e.preventDefault(),e.stopPropagation(),this.list.setSelection(this.list.getFocus(),e.browserEvent)}onUpArrow(e){e.preventDefault(),e.stopPropagation(),this.list.focusPrevious(1,!1,e.browserEvent),this.list.reveal(this.list.getFocus()[0]),this.view.domNode.focus()}onDownArrow(e){e.preventDefault(),e.stopPropagation(),this.list.focusNext(1,!1,e.browserEvent),this.list.reveal(this.list.getFocus()[0]),this.view.domNode.focus()}onPageUpArrow(e){e.preventDefault(),e.stopPropagation(),this.list.focusPreviousPage(e.browserEvent),this.list.reveal(this.list.getFocus()[0]),this.view.domNode.focus()}onPageDownArrow(e){e.preventDefault(),e.stopPropagation(),this.list.focusNextPage(e.browserEvent),this.list.reveal(this.list.getFocus()[0]),this.view.domNode.focus()}onCtrlA(e){e.preventDefault(),e.stopPropagation(),this.list.setSelection((0,r.w6)(this.list.length),e.browserEvent),this.view.domNode.focus()}onEscape(e){this.list.getSelection().length&&(e.preventDefault(),e.stopPropagation(),this.list.setSelection([],e.browserEvent),this.view.domNode.focus())}dispose(){this.disposables.dispose(),this.multipleSelectionDisposables.dispose()}}A([s.H],I.prototype,"onKeyDown",null),function(e){e[e.Idle=0]="Idle",e[e.Typing=1]="Typing"}(_||(_={}));const M=new class{mightProducePrintableCharacter(e){return!(e.ctrlKey||e.metaKey||e.altKey)&&(e.keyCode>=31&&e.keyCode<=56||e.keyCode>=21&&e.keyCode<=30||e.keyCode>=93&&e.keyCode<=102||e.keyCode>=80&&e.keyCode<=90)}};class T{constructor(e,t,n,o){this.list=e,this.view=t,this.keyboardNavigationLabelProvider=n,this.delegate=o,this.enabled=!1,this.state=_.Idle,this.automaticKeyboardNavigation=!0,this.triggered=!1,this.previouslyFocused=-1,this.enabledDisposables=new i.SL,this.disposables=new i.SL,this.updateOptions(e.options)}updateOptions(e){void 0===e.enableKeyboardNavigation||e.enableKeyboardNavigation?this.enable():this.disable(),void 0!==e.automaticKeyboardNavigation&&(this.automaticKeyboardNavigation=e.automaticKeyboardNavigation)}enable(){if(this.enabled)return;const e=c.ju.chain(this.enabledDisposables.add(new h.Y(this.view.domNode,"keydown")).event).filter((e=>!N(e.target))).filter((()=>this.automaticKeyboardNavigation||this.triggered)).map((e=>new d.y(e))).filter((e=>this.delegate.mightProducePrintableCharacter(e))).forEach((e=>{e.stopPropagation(),e.preventDefault()})).map((e=>e.browserEvent.key)).event,t=c.ju.debounce(e,(()=>null),800);c.ju.reduce(c.ju.any(e,t),((e,t)=>null===t?null:(e||"")+t))(this.onInput,this,this.enabledDisposables),t(this.onClear,this,this.enabledDisposables),this.enabled=!0,this.triggered=!1}disable(){this.enabled&&(this.enabledDisposables.clear(),this.enabled=!1,this.triggered=!1)}onClear(){var e;const t=this.list.getFocus();if(t.length>0&&t[0]===this.previouslyFocused){const n=null===(e=this.list.options.accessibilityProvider)||void 0===e?void 0:e.getAriaLabel(this.list.element(t[0]));n&&(0,v.Z9)(n)}this.previouslyFocused=-1}onInput(e){if(!e)return this.state=_.Idle,void(this.triggered=!1);const t=this.list.getFocus(),n=t.length>0?t[0]:0,i=this.state===_.Idle?1:0;this.state=_.Typing;for(let t=0;t!N(e.target))).map((e=>new d.y(e))).filter((e=>!(2!==e.keyCode||e.ctrlKey||e.metaKey||e.shiftKey||e.altKey))).on(this.onTab,this,this.disposables)}onTab(e){if(e.target!==this.view.domNode)return;const t=this.list.getFocus();if(0===t.length)return;const n=this.view.domElement(t[0]);if(!n)return;const i=n.querySelector("[tabIndex]");if(!(i&&i instanceof HTMLElement&&-1!==i.tabIndex))return;const o=window.getComputedStyle(i);"hidden"!==o.visibility&&"none"!==o.display&&(e.preventDefault(),e.stopPropagation(),i.focus())}dispose(){this.disposables.dispose()}}function O(e){return a.dz?e.browserEvent.metaKey:e.browserEvent.ctrlKey}function B(e){return e.browserEvent.shiftKey}const P={isSelectionSingleChangeEvent:O,isSelectionRangeChangeEvent:B};class F{constructor(e){this.list=e,this.disposables=new i.SL,this._onPointer=new c.Q5,this.onPointer=this._onPointer.event,!1!==e.options.multipleSelectionSupport&&(this.multipleSelectionController=this.list.options.multipleSelectionController||P),this.mouseSupport=void 0===e.options.mouseSupport||!!e.options.mouseSupport,this.mouseSupport&&(e.onMouseDown(this.onMouseDown,this,this.disposables),e.onContextMenu(this.onContextMenu,this,this.disposables),e.onMouseDblClick(this.onDoubleClick,this,this.disposables),e.onTouchStart(this.onMouseDown,this,this.disposables),this.disposables.add(l.o.addTarget(e.getHTMLElement()))),c.ju.any(e.onMouseClick,e.onMouseMiddleClick,e.onTap)(this.onViewPointer,this,this.disposables)}updateOptions(e){void 0!==e.multipleSelectionSupport&&(this.multipleSelectionController=void 0,e.multipleSelectionSupport&&(this.multipleSelectionController=this.list.options.multipleSelectionController||P))}isSelectionSingleChangeEvent(e){return!!this.multipleSelectionController&&this.multipleSelectionController.isSelectionSingleChangeEvent(e)}isSelectionRangeChangeEvent(e){return!!this.multipleSelectionController&&this.multipleSelectionController.isSelectionRangeChangeEvent(e)}isSelectionChangeEvent(e){return this.isSelectionSingleChangeEvent(e)||this.isSelectionRangeChangeEvent(e)}onMouseDown(e){D(e.browserEvent.target)||document.activeElement!==e.browserEvent.target&&this.list.domFocus()}onContextMenu(e){if(D(e.browserEvent.target))return;const t=void 0===e.index?[]:[e.index];this.list.setFocus(t,e.browserEvent)}onViewPointer(e){if(!this.mouseSupport)return;if(N(e.browserEvent.target)||D(e.browserEvent.target))return;const t=e.index;return void 0===t?(this.list.setFocus([],e.browserEvent),this.list.setSelection([],e.browserEvent),void this.list.setAnchor(void 0)):this.isSelectionRangeChangeEvent(e)||this.isSelectionChangeEvent(e)?this.changeSelection(e):(this.list.setFocus([t],e.browserEvent),this.list.setAnchor(t),(n=e.browserEvent)instanceof MouseEvent&&2===n.button||this.list.setSelection([t],e.browserEvent),void this._onPointer.fire(e));var n}onDoubleClick(e){if(N(e.browserEvent.target)||D(e.browserEvent.target))return;if(this.isSelectionChangeEvent(e))return;const t=this.list.getFocus();this.list.setSelection(t,e.browserEvent)}changeSelection(e){const t=e.index;let n=this.list.getAnchor();if(this.isSelectionRangeChangeEvent(e)){if(void 0===n){const e=this.list.getFocus()[0];n=null!=e?e:t,this.list.setAnchor(n)}const i=Math.min(n,t),o=Math.max(n,t),s=(0,r.w6)(i,o+1),a=this.list.getSelection(),l=function(e,t){const n=e.indexOf(t);if(-1===n)return[];const i=[];let o=n-1;for(;o>=0&&e[o]===t-(n-o);)i.push(e[o--]);for(i.reverse(),o=n;o=e.length)n.push(t[o++]);else if(o>=t.length)n.push(e[i++]);else{if(e[i]===t[o]){i++,o++;continue}e[i]e!==t));this.list.setFocus([t]),this.list.setAnchor(t),n.length===i.length?this.list.setSelection([...i,t],e.browserEvent):this.list.setSelection(i,e.browserEvent)}}dispose(){this.disposables.dispose()}}class W{constructor(e,t){this.styleElement=e,this.selectorSuffix=t}style(e){const t=this.selectorSuffix&&`.${this.selectorSuffix}`,n=[];e.listBackground&&(e.listBackground.isOpaque()?n.push(`.monaco-list${t} .monaco-list-rows { background: ${e.listBackground}; }`):a.dz||console.warn(`List with id '${this.selectorSuffix}' was styled with a non-opaque background color. This will break sub-pixel antialiasing.`)),e.listFocusBackground&&(n.push(`.monaco-list${t}:focus .monaco-list-row.focused { background-color: ${e.listFocusBackground}; }`),n.push(`.monaco-list${t}:focus .monaco-list-row.focused:hover { background-color: ${e.listFocusBackground}; }`)),e.listFocusForeground&&n.push(`.monaco-list${t}:focus .monaco-list-row.focused { color: ${e.listFocusForeground}; }`),e.listActiveSelectionBackground&&(n.push(`.monaco-list${t}:focus .monaco-list-row.selected { background-color: ${e.listActiveSelectionBackground}; }`),n.push(`.monaco-list${t}:focus .monaco-list-row.selected:hover { background-color: ${e.listActiveSelectionBackground}; }`)),e.listActiveSelectionForeground&&n.push(`.monaco-list${t}:focus .monaco-list-row.selected { color: ${e.listActiveSelectionForeground}; }`),e.listActiveSelectionIconForeground&&n.push(`.monaco-list${t}:focus .monaco-list-row.selected .codicon { color: ${e.listActiveSelectionIconForeground}; }`),e.listFocusAndSelectionBackground&&n.push(`\n\t\t\t\t.monaco-drag-image,\n\t\t\t\t.monaco-list${t}:focus .monaco-list-row.selected.focused { background-color: ${e.listFocusAndSelectionBackground}; }\n\t\t\t`),e.listFocusAndSelectionForeground&&n.push(`\n\t\t\t\t.monaco-drag-image,\n\t\t\t\t.monaco-list${t}:focus .monaco-list-row.selected.focused { color: ${e.listFocusAndSelectionForeground}; }\n\t\t\t`),e.listInactiveFocusForeground&&(n.push(`.monaco-list${t} .monaco-list-row.focused { color: ${e.listInactiveFocusForeground}; }`),n.push(`.monaco-list${t} .monaco-list-row.focused:hover { color: ${e.listInactiveFocusForeground}; }`)),e.listInactiveSelectionIconForeground&&n.push(`.monaco-list${t} .monaco-list-row.focused .codicon { color: ${e.listInactiveSelectionIconForeground}; }`),e.listInactiveFocusBackground&&(n.push(`.monaco-list${t} .monaco-list-row.focused { background-color: ${e.listInactiveFocusBackground}; }`),n.push(`.monaco-list${t} .monaco-list-row.focused:hover { background-color: ${e.listInactiveFocusBackground}; }`)),e.listInactiveSelectionBackground&&(n.push(`.monaco-list${t} .monaco-list-row.selected { background-color: ${e.listInactiveSelectionBackground}; }`),n.push(`.monaco-list${t} .monaco-list-row.selected:hover { background-color: ${e.listInactiveSelectionBackground}; }`)),e.listInactiveSelectionForeground&&n.push(`.monaco-list${t} .monaco-list-row.selected { color: ${e.listInactiveSelectionForeground}; }`),e.listHoverBackground&&n.push(`.monaco-list${t}:not(.drop-target) .monaco-list-row:hover:not(.selected):not(.focused) { background-color: ${e.listHoverBackground}; }`),e.listHoverForeground&&n.push(`.monaco-list${t} .monaco-list-row:hover:not(.selected):not(.focused) { color: ${e.listHoverForeground}; }`),e.listSelectionOutline&&n.push(`.monaco-list${t} .monaco-list-row.selected { outline: 1px dotted ${e.listSelectionOutline}; outline-offset: -1px; }`),e.listFocusOutline&&n.push(`\n\t\t\t\t.monaco-drag-image,\n\t\t\t\t.monaco-list${t}:focus .monaco-list-row.focused { outline: 1px solid ${e.listFocusOutline}; outline-offset: -1px; }\n\t\t\t`),e.listInactiveFocusOutline&&n.push(`.monaco-list${t} .monaco-list-row.focused { outline: 1px dotted ${e.listInactiveFocusOutline}; outline-offset: -1px; }`),e.listHoverOutline&&n.push(`.monaco-list${t} .monaco-list-row:hover { outline: 1px dashed ${e.listHoverOutline}; outline-offset: -1px; }`),e.listDropBackground&&n.push(`\n\t\t\t\t.monaco-list${t}.drop-target,\n\t\t\t\t.monaco-list${t} .monaco-list-rows.drop-target,\n\t\t\t\t.monaco-list${t} .monaco-list-row.drop-target { background-color: ${e.listDropBackground} !important; color: inherit !important; }\n\t\t\t`),e.listFilterWidgetBackground&&n.push(`.monaco-list-type-filter { background-color: ${e.listFilterWidgetBackground} }`),e.listFilterWidgetOutline&&n.push(`.monaco-list-type-filter { border: 1px solid ${e.listFilterWidgetOutline}; }`),e.listFilterWidgetNoMatchesOutline&&n.push(`.monaco-list-type-filter.no-matches { border: 1px solid ${e.listFilterWidgetNoMatchesOutline}; }`),e.listMatchesShadow&&n.push(`.monaco-list-type-filter { box-shadow: 1px 1px 1px ${e.listMatchesShadow}; }`),e.tableColumnsBorder&&n.push(`\n\t\t\t\t.monaco-table:hover > .monaco-split-view2,\n\t\t\t\t.monaco-table:hover > .monaco-split-view2 .monaco-sash.vertical::before {\n\t\t\t\t\tborder-color: ${e.tableColumnsBorder};\n\t\t\t}`),this.styleElement.textContent=n.join("\n")}}const z={listFocusBackground:p.Il.fromHex("#7FB0D0"),listActiveSelectionBackground:p.Il.fromHex("#0E639C"),listActiveSelectionForeground:p.Il.fromHex("#FFFFFF"),listActiveSelectionIconForeground:p.Il.fromHex("#FFFFFF"),listFocusAndSelectionBackground:p.Il.fromHex("#094771"),listFocusAndSelectionForeground:p.Il.fromHex("#FFFFFF"),listInactiveSelectionBackground:p.Il.fromHex("#3F3F46"),listInactiveSelectionIconForeground:p.Il.fromHex("#FFFFFF"),listHoverBackground:p.Il.fromHex("#2A2D2E"),listDropBackground:p.Il.fromHex("#383B3D"),treeIndentGuidesStroke:p.Il.fromHex("#a9a9a9"),tableColumnsBorder:p.Il.fromHex("#cccccc").transparent(.2)},V={keyboardSupport:!0,mouseSupport:!0,multipleSelectionSupport:!0,dnd:{getDragURI:()=>null,onDragStart(){},onDragOver:()=>!1,drop(){}}};function H(e,t){const n=[];let i=0,o=0;for(;i=e.length)n.push(t[o++]);else if(o>=t.length)n.push(e[i++]);else{if(e[i]===t[o]){n.push(e[i]),i++,o++;continue}e[i]e-t;class ${constructor(e,t){this._templateId=e,this.renderers=t}get templateId(){return this._templateId}renderTemplate(e){return this.renderers.map((t=>t.renderTemplate(e)))}renderElement(e,t,n,i){let o=0;for(const r of this.renderers)r.renderElement(e,t,n[o++],i)}disposeElement(e,t,n,i){let o=0;for(const r of this.renderers)r.disposeElement&&r.disposeElement(e,t,n[o],i),o+=1}disposeTemplate(e){let t=0;for(const n of this.renderers)n.disposeTemplate(e[t++])}}class U{constructor(e){this.accessibilityProvider=e,this.templateId="a18n"}renderTemplate(e){return e}renderElement(e,t,n){const i=this.accessibilityProvider.getAriaLabel(e);i?n.setAttribute("aria-label",i):n.removeAttribute("aria-label");const o=this.accessibilityProvider.getAriaLevel&&this.accessibilityProvider.getAriaLevel(e);"number"==typeof o?n.setAttribute("aria-level",`${o}`):n.removeAttribute("aria-level")}disposeTemplate(e){}}class Z{constructor(e,t){this.list=e,this.dnd=t}getDragElements(e){const t=this.list.getSelectedElements();return t.indexOf(e)>-1?t:[e]}getDragURI(e){return this.dnd.getDragURI(e)}getDragLabel(e,t){if(this.dnd.getDragLabel)return this.dnd.getDragLabel(e,t)}onDragStart(e,t){this.dnd.onDragStart&&this.dnd.onDragStart(e,t)}onDragOver(e,t,n,i){return this.dnd.onDragOver(e,t,n,i)}onDragLeave(e,t,n,i){var o,r;null===(r=(o=this.dnd).onDragLeave)||void 0===r||r.call(o,e,t,n,i)}onDragEnd(e){this.dnd.onDragEnd&&this.dnd.onDragEnd(e)}drop(e,t,n,i){this.dnd.drop(e,t,n,i)}}class K{constructor(e,t,n,o,r=V){var s;this.user=e,this._options=r,this.focus=new k("focused"),this.anchor=new k("anchor"),this.eventBufferer=new c.E7,this._ariaLabel="",this.disposables=new i.SL,this._onDidDispose=new c.Q5,this.onDidDispose=this._onDidDispose.event;const a=this._options.accessibilityProvider&&this._options.accessibilityProvider.getWidgetRole?null===(s=this._options.accessibilityProvider)||void 0===s?void 0:s.getWidgetRole():"list";this.selection=new L("listbox"!==a),(0,m.jB)(r,z,!1);const l=[this.focus.renderer,this.selection.renderer];this.accessibilityProvider=r.accessibilityProvider,this.accessibilityProvider&&(l.push(new U(this.accessibilityProvider)),this.accessibilityProvider.onDidChangeActiveDescendant&&this.accessibilityProvider.onDidChangeActiveDescendant(this.onDidChangeActiveDescendant,this,this.disposables)),o=o.map((e=>new $(e.templateId,[...l,e])));const d=Object.assign(Object.assign({},r),{dnd:r.dnd&&new Z(this,r.dnd)});if(this.view=new g.Bv(t,n,o,d),this.view.domNode.setAttribute("role",a),r.styleController)this.styleController=r.styleController(this.view.domId);else{const e=(0,w.dS)(this.view.domNode);this.styleController=new W(e,this.view.domId)}if(this.spliceable=new f([new E(this.focus,this.view,r.identityProvider),new E(this.selection,this.view,r.identityProvider),new E(this.anchor,this.view,r.identityProvider),this.view]),this.disposables.add(this.focus),this.disposables.add(this.selection),this.disposables.add(this.anchor),this.disposables.add(this.view),this.disposables.add(this._onDidDispose),this.disposables.add(new R(this,this.view)),("boolean"!=typeof r.keyboardSupport||r.keyboardSupport)&&(this.keyboardController=new I(this,this.view,r),this.disposables.add(this.keyboardController)),r.keyboardNavigationLabelProvider){const e=r.keyboardNavigationDelegate||M;this.typeLabelController=new T(this,this.view,r.keyboardNavigationLabelProvider,e),this.disposables.add(this.typeLabelController)}this.mouseController=this.createMouseController(r),this.disposables.add(this.mouseController),this.onDidChangeFocus(this._onFocusChange,this,this.disposables),this.onDidChangeSelection(this._onSelectionChange,this,this.disposables),this.accessibilityProvider&&(this.ariaLabel=this.accessibilityProvider.getWidgetAriaLabel()),!1!==this._options.multipleSelectionSupport&&this.view.domNode.setAttribute("aria-multiselectable","true")}get onDidChangeFocus(){return c.ju.map(this.eventBufferer.wrapEvent(this.focus.onChange),(e=>this.toListEvent(e)))}get onDidChangeSelection(){return c.ju.map(this.eventBufferer.wrapEvent(this.selection.onChange),(e=>this.toListEvent(e)))}get domId(){return this.view.domId}get onMouseClick(){return this.view.onMouseClick}get onMouseDblClick(){return this.view.onMouseDblClick}get onMouseMiddleClick(){return this.view.onMouseMiddleClick}get onPointer(){return this.mouseController.onPointer}get onMouseDown(){return this.view.onMouseDown}get onTouchStart(){return this.view.onTouchStart}get onTap(){return this.view.onTap}get onContextMenu(){let e=!1;const t=c.ju.chain(this.disposables.add(new h.Y(this.view.domNode,"keydown")).event).map((e=>new d.y(e))).filter((t=>e=58===t.keyCode||t.shiftKey&&68===t.keyCode)).map(h.p).filter((()=>!1)).event,n=c.ju.chain(this.disposables.add(new h.Y(this.view.domNode,"keyup")).event).forEach((()=>e=!1)).map((e=>new d.y(e))).filter((e=>58===e.keyCode||e.shiftKey&&68===e.keyCode)).map(h.p).map((({browserEvent:e})=>{const t=this.getFocus(),n=t.length?t[0]:void 0;return{index:n,element:void 0!==n?this.view.element(n):void 0,anchor:void 0!==n?this.view.domElement(n):this.view.domNode,browserEvent:e}})).event,i=c.ju.chain(this.view.onContextMenu).filter((t=>!e)).map((({element:e,index:t,browserEvent:n})=>({element:e,index:t,anchor:{x:n.pageX+1,y:n.pageY},browserEvent:n}))).event;return c.ju.any(t,n,i)}get onKeyDown(){return this.disposables.add(new h.Y(this.view.domNode,"keydown")).event}get onDidFocus(){return c.ju.signal(this.disposables.add(new h.Y(this.view.domNode,"focus",!0)).event)}createMouseController(e){return new F(this)}updateOptions(e={}){var t;this._options=Object.assign(Object.assign({},this._options),e),this.typeLabelController&&this.typeLabelController.updateOptions(this._options),void 0!==this._options.multipleSelectionController&&(this._options.multipleSelectionSupport?this.view.domNode.setAttribute("aria-multiselectable","true"):this.view.domNode.removeAttribute("aria-multiselectable")),this.mouseController.updateOptions(e),null===(t=this.keyboardController)||void 0===t||t.updateOptions(e),this.view.updateOptions(e)}get options(){return this._options}splice(e,t,n=[]){if(e<0||e>this.view.length)throw new u(this.user,`Invalid start index: ${e}`);if(t<0)throw new u(this.user,`Invalid delete count: ${t}`);0===t&&0===n.length||this.eventBufferer.bufferEvents((()=>this.spliceable.splice(e,t,n)))}rerender(){this.view.rerender()}element(e){return this.view.element(e)}get length(){return this.view.length}get contentHeight(){return this.view.contentHeight}get scrollTop(){return this.view.getScrollTop()}set scrollTop(e){this.view.setScrollTop(e)}get ariaLabel(){return this._ariaLabel}set ariaLabel(e){this._ariaLabel=e,this.view.domNode.setAttribute("aria-label",e)}domFocus(){this.view.domNode.focus({preventScroll:!0})}layout(e,t){this.view.layout(e,t)}setSelection(e,t){for(const t of e)if(t<0||t>=this.length)throw new u(this.user,`Invalid index ${t}`);this.selection.set(e,t)}getSelection(){return this.selection.get()}getSelectedElements(){return this.getSelection().map((e=>this.view.element(e)))}setAnchor(e){if(void 0!==e){if(e<0||e>=this.length)throw new u(this.user,`Invalid index ${e}`);this.anchor.set([e])}else this.anchor.set([])}getAnchor(){return(0,r.Xh)(this.anchor.get(),void 0)}getAnchorElement(){const e=this.getAnchor();return void 0===e?void 0:this.element(e)}setFocus(e,t){for(const t of e)if(t<0||t>=this.length)throw new u(this.user,`Invalid index ${t}`);this.focus.set(e,t)}focusNext(e=1,t=!1,n,i){if(0===this.length)return;const o=this.focus.get(),r=this.findNextIndex(o.length>0?o[0]+e:0,t,i);r>-1&&this.setFocus([r],n)}focusPrevious(e=1,t=!1,n,i){if(0===this.length)return;const o=this.focus.get(),r=this.findPreviousIndex(o.length>0?o[0]-e:0,t,i);r>-1&&this.setFocus([r],n)}focusNextPage(e,t){return S(this,void 0,void 0,(function*(){let n=this.view.indexAt(this.view.getScrollTop()+this.view.renderHeight);n=0===n?0:n-1;const i=this.view.element(n),o=this.getFocusedElements()[0];if(o!==i){const i=this.findPreviousIndex(n,!1,t);i>-1&&o!==this.view.element(i)?this.setFocus([i],e):this.setFocus([n],e)}else{const i=this.view.getScrollTop();this.view.setScrollTop(i+this.view.renderHeight-this.view.elementHeight(n)),this.view.getScrollTop()!==i&&(this.setFocus([]),yield(0,y.Vs)(0),yield this.focusNextPage(e,t))}}))}focusPreviousPage(e,t){return S(this,void 0,void 0,(function*(){let n;const i=this.view.getScrollTop();n=0===i?this.view.indexAt(i):this.view.indexAfter(i-1);const o=this.view.element(n),r=this.getFocusedElements()[0];if(r!==o){const i=this.findNextIndex(n,!1,t);i>-1&&r!==this.view.element(i)?this.setFocus([i],e):this.setFocus([n],e)}else{const n=i;this.view.setScrollTop(i-this.view.renderHeight),this.view.getScrollTop()!==n&&(this.setFocus([]),yield(0,y.Vs)(0),yield this.focusPreviousPage(e,t))}}))}focusLast(e,t){if(0===this.length)return;const n=this.findPreviousIndex(this.length-1,!1,t);n>-1&&this.setFocus([n],e)}focusFirst(e,t){this.focusNth(0,e,t)}focusNth(e,t,n){if(0===this.length)return;const i=this.findNextIndex(e,!1,n);i>-1&&this.setFocus([i],t)}findNextIndex(e,t=!1,n){for(let i=0;i=this.length&&!t)return-1;if(e%=this.length,!n||n(this.element(e)))return e;e++}return-1}findPreviousIndex(e,t=!1,n){for(let i=0;ithis.view.element(e)))}reveal(e,t){if(e<0||e>=this.length)throw new u(this.user,`Invalid index ${e}`);const n=this.view.getScrollTop(),i=this.view.elementTop(e),r=this.view.elementHeight(e);if((0,o.hj)(t)){const e=r-this.view.renderHeight;this.view.setScrollTop(e*(0,b.u)(t,0,1)+i)}else{const e=i+r,t=n+this.view.renderHeight;i=t||(i=t&&r>=this.view.renderHeight?this.view.setScrollTop(i):e>=t&&this.view.setScrollTop(e-this.view.renderHeight))}}getRelativeTop(e){if(e<0||e>=this.length)throw new u(this.user,`Invalid index ${e}`);const t=this.view.getScrollTop(),n=this.view.elementTop(e),i=this.view.elementHeight(e);if(nt+this.view.renderHeight)return null;const o=i-this.view.renderHeight;return Math.abs((t-n)/o)}getHTMLElement(){return this.view.domNode}style(e){this.styleController.style(e)}toListEvent({indexes:e,browserEvent:t}){return{indexes:e,elements:e.map((e=>this.view.element(e))),browserEvent:t}}_onFocusChange(){const e=this.focus.get();this.view.domNode.classList.toggle("element-focused",e.length>0),this.onDidChangeActiveDescendant()}onDidChangeActiveDescendant(){var e;const t=this.focus.get();if(t.length>0){let n;(null===(e=this.accessibilityProvider)||void 0===e?void 0:e.getActiveDescendantId)&&(n=this.accessibilityProvider.getActiveDescendantId(this.view.element(t[0]))),this.view.domNode.setAttribute("aria-activedescendant",n||this.view.getElementDomId(t[0]))}else this.view.domNode.removeAttribute("aria-activedescendant")}_onSelectionChange(){const e=this.selection.get();this.view.domNode.classList.toggle("selection-none",0===e.length),this.view.domNode.classList.toggle("selection-single",1===e.length),this.view.domNode.classList.toggle("selection-multiple",e.length>1)}dispose(){this._onDidDispose.fire(),this.disposables.dispose(),this._onDidDispose.dispose()}}A([s.H],K.prototype,"onDidChangeFocus",null),A([s.H],K.prototype,"onDidChangeSelection",null),A([s.H],K.prototype,"onContextMenu",null),A([s.H],K.prototype,"onKeyDown",null),A([s.H],K.prototype,"onDidFocus",null)},1185:(e,t,n)=>{"use strict";n.d(t,{S:()=>_});var i=n(3379),o=n.n(i),r=n(7795),s=n.n(r),a=n(569),l=n.n(a),d=n(3565),c=n.n(d),h=n(9216),u=n.n(h),g=n(4589),p=n.n(g),m=n(7548),f={};f.styleTagTransform=p(),f.setAttributes=c(),f.insert=l().bind(null,"head"),f.domAPI=s(),f.insertStyleElement=u(),o()(m.Z,f),m.Z&&m.Z.locals&&m.Z.locals;const _="monaco-mouse-cursor-text"},3841:(e,t,n)=>{"use strict";n.d(t,{l:()=>_,g:()=>M});var i=n(3379),o=n.n(i),r=n(7795),s=n.n(r),a=n(569),l=n.n(a),d=n(3565),c=n.n(d),h=n(9216),u=n.n(h),g=n(4589),p=n.n(g),m=n(1629),f={};f.styleTagTransform=p(),f.setAttributes=c(),f.insert=l().bind(null,"head"),f.domAPI=s(),f.insertStyleElement=u(),o()(m.Z,f),m.Z&&m.Z.locals&&m.Z.locals;var _,b=n(5976),C=n(1432),v=n(553),w=n(4669),y=n(5321),A=n(4850),S=n(5393),x=n(9898),k=function(e,t,n,i){var o,r=arguments.length,s=r<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,i);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,n,s):o(t,n))||s);return r>3&&s&&Object.defineProperty(t,n,s),s};!function(e){e.North="north",e.South="south",e.East="east",e.West="west"}(_||(_={}));const L=new w.Q5,E=new w.Q5;class N{constructor(){this.disposables=new b.SL}get onPointerMove(){return this.disposables.add(new A.Y(window,"mousemove")).event}get onPointerUp(){return this.disposables.add(new A.Y(window,"mouseup")).event}dispose(){this.disposables.dispose()}}k([x.H],N.prototype,"onPointerMove",null),k([x.H],N.prototype,"onPointerUp",null);class D{constructor(e){this.el=e,this.disposables=new b.SL}get onPointerMove(){return this.disposables.add(new A.Y(this.el,v.t.Change)).event}get onPointerUp(){return this.disposables.add(new A.Y(this.el,v.t.End)).event}dispose(){this.disposables.dispose()}}k([x.H],D.prototype,"onPointerMove",null),k([x.H],D.prototype,"onPointerUp",null);class I{constructor(e){this.factory=e}get onPointerMove(){return this.factory.onPointerMove}get onPointerUp(){return this.factory.onPointerUp}dispose(){}}k([x.H],I.prototype,"onPointerMove",null),k([x.H],I.prototype,"onPointerUp",null);class M extends b.JT{constructor(e,t,n){super(),this.hoverDelay=300,this.hoverDelayer=this._register(new S.vp(this.hoverDelay)),this._state=3,this._onDidEnablementChange=this._register(new w.Q5),this.onDidEnablementChange=this._onDidEnablementChange.event,this._onDidStart=this._register(new w.Q5),this.onDidStart=this._onDidStart.event,this._onDidChange=this._register(new w.Q5),this.onDidChange=this._onDidChange.event,this._onDidReset=this._register(new w.Q5),this.onDidReset=this._onDidReset.event,this._onDidEnd=this._register(new w.Q5),this.onDidEnd=this._onDidEnd.event,this.linkedSash=void 0,this.orthogonalStartSashDisposables=this._register(new b.SL),this.orthogonalStartDragHandleDisposables=this._register(new b.SL),this.orthogonalEndSashDisposables=this._register(new b.SL),this.orthogonalEndDragHandleDisposables=this._register(new b.SL),this.el=(0,y.R3)(e,(0,y.$)(".monaco-sash")),n.orthogonalEdge&&this.el.classList.add(`orthogonal-edge-${n.orthogonalEdge}`),C.dz&&this.el.classList.add("mac");const i=this._register(new A.Y(this.el,"mousedown")).event;this._register(i((e=>this.onPointerStart(e,new N)),this));const o=this._register(new A.Y(this.el,"dblclick")).event;this._register(o(this.onPointerDoublePress,this));const r=this._register(new A.Y(this.el,"mouseenter")).event;this._register(r((()=>M.onMouseEnter(this))));const s=this._register(new A.Y(this.el,"mouseleave")).event;this._register(s((()=>M.onMouseLeave(this)))),this._register(v.o.addTarget(this.el));const a=w.ju.map(this._register(new A.Y(this.el,v.t.Start)).event,(e=>{var t;return Object.assign(Object.assign({},e),{target:null!==(t=e.initialTarget)&&void 0!==t?t:null})}));this._register(a((e=>this.onPointerStart(e,new D(this.el))),this));const l=this._register(new A.Y(this.el,v.t.Tap)).event,d=w.ju.map(w.ju.filter(w.ju.debounce(l,((e,t)=>{var n;return{event:t,count:(null!==(n=null==e?void 0:e.count)&&void 0!==n?n:0)+1}}),250),(({count:e})=>2===e)),(({event:e})=>{var t;return Object.assign(Object.assign({},e),{target:null!==(t=e.initialTarget)&&void 0!==t?t:null})}));this._register(d(this.onPointerDoublePress,this)),"number"==typeof n.size?(this.size=n.size,0===n.orientation?this.el.style.width=`${this.size}px`:this.el.style.height=`${this.size}px`):(this.size=4,this._register(L.event((e=>{this.size=e,this.layout()})))),this._register(E.event((e=>this.hoverDelay=e))),this.hidden=!1,this.layoutProvider=t,this.orthogonalStartSash=n.orthogonalStartSash,this.orthogonalEndSash=n.orthogonalEndSash,this.orientation=n.orientation||0,1===this.orientation?(this.el.classList.add("horizontal"),this.el.classList.remove("vertical")):(this.el.classList.remove("horizontal"),this.el.classList.add("vertical")),this.el.classList.toggle("debug",!1),this.layout()}get state(){return this._state}set state(e){this._state!==e&&(this.el.classList.toggle("disabled",0===e),this.el.classList.toggle("minimum",1===e),this.el.classList.toggle("maximum",2===e),this._state=e,this._onDidEnablementChange.fire(e))}get orthogonalStartSash(){return this._orthogonalStartSash}set orthogonalStartSash(e){if(this.orthogonalStartDragHandleDisposables.clear(),this.orthogonalStartSashDisposables.clear(),e){const t=t=>{this.orthogonalStartDragHandleDisposables.clear(),0!==t&&(this._orthogonalStartDragHandle=(0,y.R3)(this.el,(0,y.$)(".orthogonal-drag-handle.start")),this.orthogonalStartDragHandleDisposables.add((0,b.OF)((()=>this._orthogonalStartDragHandle.remove()))),this.orthogonalStartDragHandleDisposables.add(new A.Y(this._orthogonalStartDragHandle,"mouseenter")).event((()=>M.onMouseEnter(e)),void 0,this.orthogonalStartDragHandleDisposables),this.orthogonalStartDragHandleDisposables.add(new A.Y(this._orthogonalStartDragHandle,"mouseleave")).event((()=>M.onMouseLeave(e)),void 0,this.orthogonalStartDragHandleDisposables))};this.orthogonalStartSashDisposables.add(e.onDidEnablementChange(t,this)),t(e.state)}this._orthogonalStartSash=e}get orthogonalEndSash(){return this._orthogonalEndSash}set orthogonalEndSash(e){if(this.orthogonalEndDragHandleDisposables.clear(),this.orthogonalEndSashDisposables.clear(),e){const t=t=>{this.orthogonalEndDragHandleDisposables.clear(),0!==t&&(this._orthogonalEndDragHandle=(0,y.R3)(this.el,(0,y.$)(".orthogonal-drag-handle.end")),this.orthogonalEndDragHandleDisposables.add((0,b.OF)((()=>this._orthogonalEndDragHandle.remove()))),this.orthogonalEndDragHandleDisposables.add(new A.Y(this._orthogonalEndDragHandle,"mouseenter")).event((()=>M.onMouseEnter(e)),void 0,this.orthogonalEndDragHandleDisposables),this.orthogonalEndDragHandleDisposables.add(new A.Y(this._orthogonalEndDragHandle,"mouseleave")).event((()=>M.onMouseLeave(e)),void 0,this.orthogonalEndDragHandleDisposables))};this.orthogonalEndSashDisposables.add(e.onDidEnablementChange(t,this)),t(e.state)}this._orthogonalEndSash=e}onPointerStart(e,t){y.zB.stop(e);let n=!1;if(!e.__orthogonalSashEvent){const i=this.getOrthogonalSash(e);i&&(n=!0,e.__orthogonalSashEvent=!0,i.onPointerStart(e,new I(t)))}if(this.linkedSash&&!e.__linkedSashEvent&&(e.__linkedSashEvent=!0,this.linkedSash.onPointerStart(e,new I(t))),!this.state)return;const i=(0,y.H$)("iframe");for(const e of i)e.style.pointerEvents="none";const o=e.pageX,r=e.pageY,s=e.altKey,a={startX:o,currentX:o,startY:r,currentY:r,altKey:s};this.el.classList.add("active"),this._onDidStart.fire(a);const l=(0,y.dS)(this.el),d=()=>{let e="";e=n?"all-scroll":1===this.orientation?1===this.state?"s-resize":2===this.state?"n-resize":C.dz?"row-resize":"ns-resize":1===this.state?"e-resize":2===this.state?"w-resize":C.dz?"col-resize":"ew-resize",l.textContent=`* { cursor: ${e} !important; }`},c=new b.SL;d(),n||this.onDidEnablementChange(d,null,c),t.onPointerMove((e=>{y.zB.stop(e,!1);const t={startX:o,currentX:e.pageX,startY:r,currentY:e.pageY,altKey:s};this._onDidChange.fire(t)}),null,c),t.onPointerUp((e=>{y.zB.stop(e,!1),this.el.removeChild(l),this.el.classList.remove("active"),this._onDidEnd.fire(),c.dispose();for(const e of i)e.style.pointerEvents="auto"}),null,c),c.add(t)}onPointerDoublePress(e){const t=this.getOrthogonalSash(e);t&&t._onDidReset.fire(),this.linkedSash&&this.linkedSash._onDidReset.fire(),this._onDidReset.fire()}static onMouseEnter(e,t=!1){e.el.classList.contains("active")?(e.hoverDelayer.cancel(),e.el.classList.add("hover")):e.hoverDelayer.trigger((()=>e.el.classList.add("hover")),e.hoverDelay).then(void 0,(()=>{})),!t&&e.linkedSash&&M.onMouseEnter(e.linkedSash,!0)}static onMouseLeave(e,t=!1){e.hoverDelayer.cancel(),e.el.classList.remove("hover"),!t&&e.linkedSash&&M.onMouseLeave(e.linkedSash,!0)}clearSashHoverState(){M.onMouseLeave(this)}layout(){if(0===this.orientation){const e=this.layoutProvider;this.el.style.left=e.getVerticalSashLeft(this)-this.size/2+"px",e.getVerticalSashTop&&(this.el.style.top=e.getVerticalSashTop(this)+"px"),e.getVerticalSashHeight&&(this.el.style.height=e.getVerticalSashHeight(this)+"px")}else{const e=this.layoutProvider;this.el.style.top=e.getHorizontalSashTop(this)-this.size/2+"px",e.getHorizontalSashLeft&&(this.el.style.left=e.getHorizontalSashLeft(this)+"px"),e.getHorizontalSashWidth&&(this.el.style.width=e.getHorizontalSashWidth(this)+"px")}}hide(){this.hidden=!0,this.el.style.display="none",this.el.setAttribute("aria-hidden","true")}getOrthogonalSash(e){if(e.target&&e.target instanceof HTMLElement)return e.target.classList.contains("orthogonal-drag-handle")?e.target.classList.contains("start")?this.orthogonalStartSash:this.orthogonalEndSash:void 0}dispose(){super.dispose(),this.el.remove()}}},6781:(e,t,n)=>{"use strict";n.d(t,{s$:()=>$,NB:()=>H,$Z:()=>j});var i=n(3379),o=n.n(i),r=n(7795),s=n.n(r),a=n(569),l=n.n(a),d=n(3565),c=n.n(d),h=n(9216),u=n.n(h),g=n(4589),p=n.n(g),m=n(7198),f={};f.styleTagTransform=p(),f.setAttributes=c(),f.insert=l().bind(null,"head"),f.domAPI=s(),f.insertStyleElement=u(),o()(m.Z,f),m.Z&&m.Z.locals&&m.Z.locals;var _=n(5321),b=n(8626),C=n(3938),v=n(7974),w=n(3794),y=n(5393);class A extends w.${constructor(e){super(),this._onActivate=e.onActivate,this.bgDomNode=document.createElement("div"),this.bgDomNode.className="arrow-background",this.bgDomNode.style.position="absolute",this.bgDomNode.style.width=e.bgWidth+"px",this.bgDomNode.style.height=e.bgHeight+"px",void 0!==e.top&&(this.bgDomNode.style.top="0px"),void 0!==e.left&&(this.bgDomNode.style.left="0px"),void 0!==e.bottom&&(this.bgDomNode.style.bottom="0px"),void 0!==e.right&&(this.bgDomNode.style.right="0px"),this.domNode=document.createElement("div"),this.domNode.className=e.className,this.domNode.classList.add(...e.icon.classNamesArray),this.domNode.style.position="absolute",this.domNode.style.width="11px",this.domNode.style.height="11px",void 0!==e.top&&(this.domNode.style.top=e.top+"px"),void 0!==e.left&&(this.domNode.style.left=e.left+"px"),void 0!==e.bottom&&(this.domNode.style.bottom=e.bottom+"px"),void 0!==e.right&&(this.domNode.style.right=e.right+"px"),this._mouseMoveMonitor=this._register(new v.Z),this.onmousedown(this.bgDomNode,(e=>this._arrowMouseDown(e))),this.onmousedown(this.domNode,(e=>this._arrowMouseDown(e))),this._mousedownRepeatTimer=this._register(new y.zh),this._mousedownScheduleRepeatTimer=this._register(new y._F)}_arrowMouseDown(e){this._onActivate(),this._mousedownRepeatTimer.cancel(),this._mousedownScheduleRepeatTimer.cancelAndSet((()=>{this._mousedownRepeatTimer.cancelAndSet((()=>this._onActivate()),1e3/24)}),200),this._mouseMoveMonitor.startMonitoring(e.target,e.buttons,v.e,(e=>{}),(()=>{this._mousedownRepeatTimer.cancel(),this._mousedownScheduleRepeatTimer.cancel()})),e.preventDefault()}}var S=n(5976);class x extends S.JT{constructor(e,t,n){super(),this._visibility=e,this._visibleClassName=t,this._invisibleClassName=n,this._domNode=null,this._isVisible=!1,this._isNeeded=!1,this._rawShouldBeVisible=!1,this._shouldBeVisible=!1,this._revealTimer=this._register(new y._F)}setVisibility(e){this._visibility!==e&&(this._visibility=e,this._updateShouldBeVisible())}setShouldBeVisible(e){this._rawShouldBeVisible=e,this._updateShouldBeVisible()}_applyVisibilitySetting(){return 2!==this._visibility&&(3===this._visibility||this._rawShouldBeVisible)}_updateShouldBeVisible(){const e=this._applyVisibilitySetting();this._shouldBeVisible!==e&&(this._shouldBeVisible=e,this.ensureVisibility())}setIsNeeded(e){this._isNeeded!==e&&(this._isNeeded=e,this.ensureVisibility())}setDomNode(e){this._domNode=e,this._domNode.setClassName(this._invisibleClassName),this.setShouldBeVisible(!1)}ensureVisibility(){this._isNeeded?this._shouldBeVisible?this._reveal():this._hide(!0):this._hide(!1)}_reveal(){this._isVisible||(this._isVisible=!0,this._revealTimer.setIfNotSet((()=>{this._domNode&&this._domNode.setClassName(this._visibleClassName)}),0))}_hide(e){this._revealTimer.cancel(),this._isVisible&&(this._isVisible=!1,this._domNode&&this._domNode.setClassName(this._invisibleClassName+(e?" fade":"")))}}var k=n(1432);class L extends w.${constructor(e){super(),this._lazyRender=e.lazyRender,this._host=e.host,this._scrollable=e.scrollable,this._scrollByPage=e.scrollByPage,this._scrollbarState=e.scrollbarState,this._visibilityController=this._register(new x(e.visibility,"visible scrollbar "+e.extraScrollbarClassName,"invisible scrollbar "+e.extraScrollbarClassName)),this._visibilityController.setIsNeeded(this._scrollbarState.isNeeded()),this._mouseMoveMonitor=this._register(new v.Z),this._shouldRender=!0,this.domNode=(0,b.X)(document.createElement("div")),this.domNode.setAttribute("role","presentation"),this.domNode.setAttribute("aria-hidden","true"),this._visibilityController.setDomNode(this.domNode),this.domNode.setPosition("absolute"),this.onmousedown(this.domNode.domNode,(e=>this._domNodeMouseDown(e)))}_createArrow(e){const t=this._register(new A(e));this.domNode.domNode.appendChild(t.bgDomNode),this.domNode.domNode.appendChild(t.domNode)}_createSlider(e,t,n,i){this.slider=(0,b.X)(document.createElement("div")),this.slider.setClassName("slider"),this.slider.setPosition("absolute"),this.slider.setTop(e),this.slider.setLeft(t),"number"==typeof n&&this.slider.setWidth(n),"number"==typeof i&&this.slider.setHeight(i),this.slider.setLayerHinting(!0),this.slider.setContain("strict"),this.domNode.domNode.appendChild(this.slider.domNode),this.onmousedown(this.slider.domNode,(e=>{e.leftButton&&(e.preventDefault(),this._sliderMouseDown(e,(()=>{})))})),this.onclick(this.slider.domNode,(e=>{e.leftButton&&e.stopPropagation()}))}_onElementSize(e){return this._scrollbarState.setVisibleSize(e)&&(this._visibilityController.setIsNeeded(this._scrollbarState.isNeeded()),this._shouldRender=!0,this._lazyRender||this.render()),this._shouldRender}_onElementScrollSize(e){return this._scrollbarState.setScrollSize(e)&&(this._visibilityController.setIsNeeded(this._scrollbarState.isNeeded()),this._shouldRender=!0,this._lazyRender||this.render()),this._shouldRender}_onElementScrollPosition(e){return this._scrollbarState.setScrollPosition(e)&&(this._visibilityController.setIsNeeded(this._scrollbarState.isNeeded()),this._shouldRender=!0,this._lazyRender||this.render()),this._shouldRender}beginReveal(){this._visibilityController.setShouldBeVisible(!0)}beginHide(){this._visibilityController.setShouldBeVisible(!1)}render(){this._shouldRender&&(this._shouldRender=!1,this._renderDomNode(this._scrollbarState.getRectangleLargeSize(),this._scrollbarState.getRectangleSmallSize()),this._updateSlider(this._scrollbarState.getSliderSize(),this._scrollbarState.getArrowSize()+this._scrollbarState.getSliderPosition()))}_domNodeMouseDown(e){e.target===this.domNode.domNode&&this._onMouseDown(e)}delegateMouseDown(e){const t=this.domNode.domNode.getClientRects()[0].top,n=t+this._scrollbarState.getSliderPosition(),i=t+this._scrollbarState.getSliderPosition()+this._scrollbarState.getSliderSize(),o=this._sliderMousePosition(e);n<=o&&o<=i?e.leftButton&&(e.preventDefault(),this._sliderMouseDown(e,(()=>{}))):this._onMouseDown(e)}_onMouseDown(e){let t,n;if(e.target===this.domNode.domNode&&"number"==typeof e.browserEvent.offsetX&&"number"==typeof e.browserEvent.offsetY)t=e.browserEvent.offsetX,n=e.browserEvent.offsetY;else{const i=_.i(this.domNode.domNode);t=e.posx-i.left,n=e.posy-i.top}const i=this._mouseDownRelativePosition(t,n);this._setDesiredScrollPositionNow(this._scrollByPage?this._scrollbarState.getDesiredScrollPositionFromOffsetPaged(i):this._scrollbarState.getDesiredScrollPositionFromOffset(i)),e.leftButton&&(e.preventDefault(),this._sliderMouseDown(e,(()=>{})))}_sliderMouseDown(e,t){const n=this._sliderMousePosition(e),i=this._sliderOrthogonalMousePosition(e),o=this._scrollbarState.clone();this.slider.toggleClassName("active",!0),this._mouseMoveMonitor.startMonitoring(e.target,e.buttons,v.e,(e=>{const t=this._sliderOrthogonalMousePosition(e),r=Math.abs(t-i);if(k.ED&&r>140)return void this._setDesiredScrollPositionNow(o.getScrollPosition());const s=this._sliderMousePosition(e)-n;this._setDesiredScrollPositionNow(o.getDesiredScrollPositionFromDelta(s))}),(()=>{this.slider.toggleClassName("active",!1),this._host.onDragEnd(),t()})),this._host.onDragStart()}_setDesiredScrollPositionNow(e){const t={};this.writeScrollPosition(t,e),this._scrollable.setScrollPositionNow(t)}updateScrollbarSize(e){this._updateScrollbarSize(e),this._scrollbarState.setScrollbarSize(e),this._shouldRender=!0,this._lazyRender||this.render()}isNeeded(){return this._scrollbarState.isNeeded()}}class E{constructor(e,t,n,i,o,r){this._scrollbarSize=Math.round(t),this._oppositeScrollbarSize=Math.round(n),this._arrowSize=Math.round(e),this._visibleSize=i,this._scrollSize=o,this._scrollPosition=r,this._computedAvailableSize=0,this._computedIsNeeded=!1,this._computedSliderSize=0,this._computedSliderRatio=0,this._computedSliderPosition=0,this._refreshComputedValues()}clone(){return new E(this._arrowSize,this._scrollbarSize,this._oppositeScrollbarSize,this._visibleSize,this._scrollSize,this._scrollPosition)}setVisibleSize(e){const t=Math.round(e);return this._visibleSize!==t&&(this._visibleSize=t,this._refreshComputedValues(),!0)}setScrollSize(e){const t=Math.round(e);return this._scrollSize!==t&&(this._scrollSize=t,this._refreshComputedValues(),!0)}setScrollPosition(e){const t=Math.round(e);return this._scrollPosition!==t&&(this._scrollPosition=t,this._refreshComputedValues(),!0)}setScrollbarSize(e){this._scrollbarSize=Math.round(e)}setOppositeScrollbarSize(e){this._oppositeScrollbarSize=Math.round(e)}static _computeValues(e,t,n,i,o){const r=Math.max(0,n-e),s=Math.max(0,r-2*t),a=i>0&&i>n;if(!a)return{computedAvailableSize:Math.round(r),computedIsNeeded:a,computedSliderSize:Math.round(s),computedSliderRatio:0,computedSliderPosition:0};const l=Math.round(Math.max(20,Math.floor(n*s/i))),d=(s-l)/(i-n),c=o*d;return{computedAvailableSize:Math.round(r),computedIsNeeded:a,computedSliderSize:Math.round(l),computedSliderRatio:d,computedSliderPosition:Math.round(c)}}_refreshComputedValues(){const e=E._computeValues(this._oppositeScrollbarSize,this._arrowSize,this._visibleSize,this._scrollSize,this._scrollPosition);this._computedAvailableSize=e.computedAvailableSize,this._computedIsNeeded=e.computedIsNeeded,this._computedSliderSize=e.computedSliderSize,this._computedSliderRatio=e.computedSliderRatio,this._computedSliderPosition=e.computedSliderPosition}getArrowSize(){return this._arrowSize}getScrollPosition(){return this._scrollPosition}getRectangleLargeSize(){return this._computedAvailableSize}getRectangleSmallSize(){return this._scrollbarSize}isNeeded(){return this._computedIsNeeded}getSliderSize(){return this._computedSliderSize}getSliderPosition(){return this._computedSliderPosition}getDesiredScrollPositionFromOffset(e){if(!this._computedIsNeeded)return 0;const t=e-this._arrowSize-this._computedSliderSize/2;return Math.round(t/this._computedSliderRatio)}getDesiredScrollPositionFromOffsetPaged(e){if(!this._computedIsNeeded)return 0;const t=e-this._arrowSize;let n=this._scrollPosition;return tthis._host.onMouseWheel(new C.q(null,1,0))}),this._createArrow({className:"scra",icon:I,top:n,left:void 0,bottom:void 0,right:e,bgWidth:t.arrowSize,bgHeight:t.horizontalScrollbarSize,onActivate:()=>this._host.onMouseWheel(new C.q(null,-1,0))})}this._createSlider(Math.floor((t.horizontalScrollbarSize-t.horizontalSliderSize)/2),0,void 0,t.horizontalSliderSize)}_updateSlider(e,t){this.slider.setWidth(e),this.slider.setLeft(t)}_renderDomNode(e,t){this.domNode.setWidth(e),this.domNode.setHeight(t),this.domNode.setLeft(0),this.domNode.setBottom(0)}onDidScroll(e){return this._shouldRender=this._onElementScrollSize(e.scrollWidth)||this._shouldRender,this._shouldRender=this._onElementScrollPosition(e.scrollLeft)||this._shouldRender,this._shouldRender=this._onElementSize(e.width)||this._shouldRender,this._shouldRender}_mouseDownRelativePosition(e,t){return e}_sliderMousePosition(e){return e.posx}_sliderOrthogonalMousePosition(e){return e.posy}_updateScrollbarSize(e){this.slider.setHeight(e)}writeScrollPosition(e,t){e.scrollLeft=t}updateOptions(e){this.updateScrollbarSize(2===e.horizontal?0:e.horizontalScrollbarSize),this._scrollbarState.setOppositeScrollbarSize(2===e.vertical?0:e.verticalScrollbarSize),this._visibilityController.setVisibility(e.horizontal),this._scrollByPage=e.scrollByPage}}const T=(0,N.CM)("scrollbar-button-up",N.lA.triangleUp),R=(0,N.CM)("scrollbar-button-down",N.lA.triangleDown);class O extends L{constructor(e,t,n){const i=e.getScrollDimensions(),o=e.getCurrentScrollPosition();if(super({lazyRender:t.lazyRender,host:n,scrollbarState:new E(t.verticalHasArrows?t.arrowSize:0,2===t.vertical?0:t.verticalScrollbarSize,0,i.height,i.scrollHeight,o.scrollTop),visibility:t.vertical,extraScrollbarClassName:"vertical",scrollable:e,scrollByPage:t.scrollByPage}),t.verticalHasArrows){const e=(t.arrowSize-11)/2,n=(t.verticalScrollbarSize-11)/2;this._createArrow({className:"scra",icon:T,top:e,left:n,bottom:void 0,right:void 0,bgWidth:t.verticalScrollbarSize,bgHeight:t.arrowSize,onActivate:()=>this._host.onMouseWheel(new C.q(null,0,1))}),this._createArrow({className:"scra",icon:R,top:void 0,left:n,bottom:e,right:void 0,bgWidth:t.verticalScrollbarSize,bgHeight:t.arrowSize,onActivate:()=>this._host.onMouseWheel(new C.q(null,0,-1))})}this._createSlider(0,Math.floor((t.verticalScrollbarSize-t.verticalSliderSize)/2),t.verticalSliderSize,void 0)}_updateSlider(e,t){this.slider.setHeight(e),this.slider.setTop(t)}_renderDomNode(e,t){this.domNode.setWidth(t),this.domNode.setHeight(e),this.domNode.setRight(0),this.domNode.setTop(0)}onDidScroll(e){return this._shouldRender=this._onElementScrollSize(e.scrollHeight)||this._shouldRender,this._shouldRender=this._onElementScrollPosition(e.scrollTop)||this._shouldRender,this._shouldRender=this._onElementSize(e.height)||this._shouldRender,this._shouldRender}_mouseDownRelativePosition(e,t){return t}_sliderMousePosition(e){return e.posy}_sliderOrthogonalMousePosition(e){return e.posx}_updateScrollbarSize(e){this.slider.setWidth(e)}writeScrollPosition(e,t){e.scrollTop=t}updateOptions(e){this.updateScrollbarSize(2===e.vertical?0:e.verticalScrollbarSize),this._scrollbarState.setOppositeScrollbarSize(0),this._visibilityController.setVisibility(e.vertical),this._scrollByPage=e.scrollByPage}}var B=n(4669),P=n(6633),F=n(6268);class W{constructor(e,t,n){this.timestamp=e,this.deltaX=t,this.deltaY=n,this.score=0}}class z{constructor(){this._capacity=5,this._memory=[],this._front=-1,this._rear=-1}isPhysicalMouseWheel(){if(-1===this._front&&-1===this._rear)return!1;let e=1,t=0,n=1,i=this._rear;for(;;){const o=i===this._front?e:Math.pow(2,-n);if(e-=o,t+=this._memory[i].score*o,i===this._front)break;i=(this._capacity+i-1)%this._capacity,n++}return t<=.5}accept(e,t,n){const i=new W(e,t,n);i.score=this._computeScore(i),-1===this._front&&-1===this._rear?(this._memory[0]=i,this._front=0,this._rear=0):(this._rear=(this._rear+1)%this._capacity,this._rear===this._front&&(this._front=(this._front+1)%this._capacity),this._memory[this._rear]=i)}_computeScore(e){if(Math.abs(e.deltaX)>0&&Math.abs(e.deltaY)>0)return 1;let t=.5;return-1===this._front&&-1===this._rear||this._memory[this._rear],this._isAlmostInt(e.deltaX)&&this._isAlmostInt(e.deltaY)||(t+=.25),Math.min(Math.max(t,0),1)}_isAlmostInt(e){return Math.abs(Math.round(e)-e)<.01}}z.INSTANCE=new z;class V extends w.${constructor(e,t,n){super(),this._onScroll=this._register(new B.Q5),this.onScroll=this._onScroll.event,this._onWillScroll=this._register(new B.Q5),e.style.overflow="hidden",this._options=function(e){const t={lazyRender:void 0!==e.lazyRender&&e.lazyRender,className:void 0!==e.className?e.className:"",useShadows:void 0===e.useShadows||e.useShadows,handleMouseWheel:void 0===e.handleMouseWheel||e.handleMouseWheel,flipAxes:void 0!==e.flipAxes&&e.flipAxes,consumeMouseWheelIfScrollbarIsNeeded:void 0!==e.consumeMouseWheelIfScrollbarIsNeeded&&e.consumeMouseWheelIfScrollbarIsNeeded,alwaysConsumeMouseWheel:void 0!==e.alwaysConsumeMouseWheel&&e.alwaysConsumeMouseWheel,scrollYToX:void 0!==e.scrollYToX&&e.scrollYToX,mouseWheelScrollSensitivity:void 0!==e.mouseWheelScrollSensitivity?e.mouseWheelScrollSensitivity:1,fastScrollSensitivity:void 0!==e.fastScrollSensitivity?e.fastScrollSensitivity:5,scrollPredominantAxis:void 0===e.scrollPredominantAxis||e.scrollPredominantAxis,mouseWheelSmoothScroll:void 0===e.mouseWheelSmoothScroll||e.mouseWheelSmoothScroll,arrowSize:void 0!==e.arrowSize?e.arrowSize:11,listenOnDomNode:void 0!==e.listenOnDomNode?e.listenOnDomNode:null,horizontal:void 0!==e.horizontal?e.horizontal:1,horizontalScrollbarSize:void 0!==e.horizontalScrollbarSize?e.horizontalScrollbarSize:10,horizontalSliderSize:void 0!==e.horizontalSliderSize?e.horizontalSliderSize:0,horizontalHasArrows:void 0!==e.horizontalHasArrows&&e.horizontalHasArrows,vertical:void 0!==e.vertical?e.vertical:1,verticalScrollbarSize:void 0!==e.verticalScrollbarSize?e.verticalScrollbarSize:10,verticalHasArrows:void 0!==e.verticalHasArrows&&e.verticalHasArrows,verticalSliderSize:void 0!==e.verticalSliderSize?e.verticalSliderSize:0,scrollByPage:void 0!==e.scrollByPage&&e.scrollByPage};return t.horizontalSliderSize=void 0!==e.horizontalSliderSize?e.horizontalSliderSize:t.horizontalScrollbarSize,t.verticalSliderSize=void 0!==e.verticalSliderSize?e.verticalSliderSize:t.verticalScrollbarSize,k.dz&&(t.className+=" mac"),t}(t),this._scrollable=n,this._register(this._scrollable.onScroll((e=>{this._onWillScroll.fire(e),this._onDidScroll(e),this._onScroll.fire(e)})));const i={onMouseWheel:e=>this._onMouseWheel(e),onDragStart:()=>this._onDragStart(),onDragEnd:()=>this._onDragEnd()};this._verticalScrollbar=this._register(new O(this._scrollable,this._options,i)),this._horizontalScrollbar=this._register(new M(this._scrollable,this._options,i)),this._domNode=document.createElement("div"),this._domNode.className="monaco-scrollable-element "+this._options.className,this._domNode.setAttribute("role","presentation"),this._domNode.style.position="relative",this._domNode.style.overflow="hidden",this._domNode.appendChild(e),this._domNode.appendChild(this._horizontalScrollbar.domNode.domNode),this._domNode.appendChild(this._verticalScrollbar.domNode.domNode),this._options.useShadows?(this._leftShadowDomNode=(0,b.X)(document.createElement("div")),this._leftShadowDomNode.setClassName("shadow"),this._domNode.appendChild(this._leftShadowDomNode.domNode),this._topShadowDomNode=(0,b.X)(document.createElement("div")),this._topShadowDomNode.setClassName("shadow"),this._domNode.appendChild(this._topShadowDomNode.domNode),this._topLeftShadowDomNode=(0,b.X)(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,(e=>this._onMouseOver(e))),this.onnonbubblingmouseout(this._listenOnDomNode,(e=>this._onMouseOut(e))),this._hideTimeout=this._register(new y._F),this._isDragging=!1,this._mouseIsOver=!1,this._shouldRender=!0,this._revealOnScroll=!0}dispose(){this._mouseWheelToDispose=(0,S.B9)(this._mouseWheelToDispose),super.dispose()}getDomNode(){return this._domNode}getOverviewRulerLayoutInfo(){return{parent:this._domNode,insertBefore:this._verticalScrollbar.domNode.domNode}}delegateVerticalScrollbarMouseDown(e){this._verticalScrollbar.delegateMouseDown(e)}getScrollDimensions(){return this._scrollable.getScrollDimensions()}setScrollDimensions(e){this._scrollable.setScrollDimensions(e,!1)}updateClassName(e){this._options.className=e,k.dz&&(this._options.className+=" mac"),this._domNode.className="monaco-scrollable-element "+this._options.className}updateOptions(e){void 0!==e.handleMouseWheel&&(this._options.handleMouseWheel=e.handleMouseWheel,this._setListeningToMouseWheel(this._options.handleMouseWheel)),void 0!==e.mouseWheelScrollSensitivity&&(this._options.mouseWheelScrollSensitivity=e.mouseWheelScrollSensitivity),void 0!==e.fastScrollSensitivity&&(this._options.fastScrollSensitivity=e.fastScrollSensitivity),void 0!==e.scrollPredominantAxis&&(this._options.scrollPredominantAxis=e.scrollPredominantAxis),void 0!==e.horizontal&&(this._options.horizontal=e.horizontal),void 0!==e.vertical&&(this._options.vertical=e.vertical),void 0!==e.horizontalScrollbarSize&&(this._options.horizontalScrollbarSize=e.horizontalScrollbarSize),void 0!==e.verticalScrollbarSize&&(this._options.verticalScrollbarSize=e.verticalScrollbarSize),void 0!==e.scrollByPage&&(this._options.scrollByPage=e.scrollByPage),this._horizontalScrollbar.updateOptions(this._options),this._verticalScrollbar.updateOptions(this._options),this._options.lazyRender||this._render()}_setListeningToMouseWheel(e){if(this._mouseWheelToDispose.length>0!==e&&(this._mouseWheelToDispose=(0,S.B9)(this._mouseWheelToDispose),e)){const e=e=>{this._onMouseWheel(new C.q(e))};this._mouseWheelToDispose.push(_.nm(this._listenOnDomNode,_.tw.MOUSE_WHEEL,e,{passive:!1}))}}_onMouseWheel(e){const t=z.INSTANCE;{const n=window.devicePixelRatio/(0,F.ie)();k.ED||k.IJ?t.accept(Date.now(),e.deltaX/n,e.deltaY/n):t.accept(Date.now(),e.deltaX,e.deltaY)}let n=!1;if(e.deltaY||e.deltaX){let i=e.deltaY*this._options.mouseWheelScrollSensitivity,o=e.deltaX*this._options.mouseWheelScrollSensitivity;this._options.scrollPredominantAxis&&(Math.abs(i)>=Math.abs(o)?o=0:i=0),this._options.flipAxes&&([i,o]=[o,i]);const r=!k.dz&&e.browserEvent&&e.browserEvent.shiftKey;!this._options.scrollYToX&&!r||o||(o=i,i=0),e.browserEvent&&e.browserEvent.altKey&&(o*=this._options.fastScrollSensitivity,i*=this._options.fastScrollSensitivity);const s=this._scrollable.getFutureScrollPosition();let a={};if(i){const e=s.scrollTop-50*i;this._verticalScrollbar.writeScrollPosition(a,e)}if(o){const e=s.scrollLeft-50*o;this._horizontalScrollbar.writeScrollPosition(a,e)}a=this._scrollable.validateScrollPosition(a),(s.scrollLeft!==a.scrollLeft||s.scrollTop!==a.scrollTop)&&(this._options.mouseWheelSmoothScroll&&t.isPhysicalMouseWheel()?this._scrollable.setScrollPositionSmooth(a):this._scrollable.setScrollPositionNow(a),n=!0)}let i=n;!i&&this._options.alwaysConsumeMouseWheel&&(i=!0),!i&&this._options.consumeMouseWheelIfScrollbarIsNeeded&&(this._verticalScrollbar.isNeeded()||this._horizontalScrollbar.isNeeded())&&(i=!0),i&&(e.preventDefault(),e.stopPropagation())}_onDidScroll(e){this._shouldRender=this._horizontalScrollbar.onDidScroll(e)||this._shouldRender,this._shouldRender=this._verticalScrollbar.onDidScroll(e)||this._shouldRender,this._options.useShadows&&(this._shouldRender=!0),this._revealOnScroll&&this._reveal(),this._options.lazyRender||this._render()}renderNow(){if(!this._options.lazyRender)throw new Error("Please use `lazyRender` together with `renderNow`!");this._render()}_render(){if(this._shouldRender&&(this._shouldRender=!1,this._horizontalScrollbar.render(),this._verticalScrollbar.render(),this._options.useShadows)){const e=this._scrollable.getCurrentScrollPosition(),t=e.scrollTop>0,n=e.scrollLeft>0,i=n?" left":"",o=t?" top":"",r=n||t?" top-left-corner":"";this._leftShadowDomNode.setClassName(`shadow${i}`),this._topShadowDomNode.setClassName(`shadow${o}`),this._topLeftShadowDomNode.setClassName(`shadow${r}${o}${i}`)}}_onDragStart(){this._isDragging=!0,this._reveal()}_onDragEnd(){this._isDragging=!1,this._hide()}_onMouseOut(e){this._mouseIsOver=!1,this._hide()}_onMouseOver(e){this._mouseIsOver=!0,this._reveal()}_reveal(){this._verticalScrollbar.beginReveal(),this._horizontalScrollbar.beginReveal(),this._scheduleHide()}_hide(){this._mouseIsOver||this._isDragging||(this._verticalScrollbar.beginHide(),this._horizontalScrollbar.beginHide())}_scheduleHide(){this._mouseIsOver||this._isDragging||this._hideTimeout.cancelAndSet((()=>this._hide()),500)}}class H extends V{constructor(e,t){(t=t||{}).mouseWheelSmoothScroll=!1;const n=new P.Rm(0,(e=>_.jL(e)));super(e,t,n),this._register(n)}setScrollPosition(e){this._scrollable.setScrollPositionNow(e)}}class j extends V{constructor(e,t,n){super(e,t,n)}setScrollPosition(e){e.reuseAnimation?this._scrollable.setScrollPositionSmooth(e,e.reuseAnimation):this._scrollable.setScrollPositionNow(e)}getScrollPosition(){return this._scrollable.getCurrentScrollPosition()}}class $ extends H{constructor(e,t){super(e,t),this._element=e,this.onScroll((e=>{e.scrollTopChanged&&(this._element.scrollTop=e.scrollTop),e.scrollLeftChanged&&(this._element.scrollLeft=e.scrollLeft)})),this.scanDomNode()}scanDomNode(){this.setScrollDimensions({width:this._element.clientWidth,scrollWidth:this._element.scrollWidth,height:this._element.clientHeight,scrollHeight:this._element.scrollHeight}),this.setScrollPosition({scrollLeft:this._element.scrollLeft,scrollTop:this._element.scrollTop})}}},9782:(e,t,n)=>{"use strict";n.d(t,{M:()=>M,z:()=>T});var i=n(3379),o=n.n(i),r=n(7795),s=n.n(r),a=n(569),l=n.n(a),d=n(3565),c=n.n(d),h=n(9216),u=n.n(h),g=n(4589),p=n.n(g),m=n(2470),f={};f.styleTagTransform=p(),f.setAttributes=c(),f.insert=l().bind(null,"head"),f.domAPI=s(),f.insertStyleElement=u(),o()(m.Z,f),m.Z&&m.Z.locals&&m.Z.locals;var _=n(5976),b=n(4669),C=n(8401),v=n(9870),w=n(9488),y=n(3841),A=n(1264),S=n(5321),x=n(6781),k=n(6633);const L={separatorBorder:A.Il.transparent};class E{constructor(e,t,n,i){this.container=e,this.view=t,this.disposable=i,this._cachedVisibleSize=void 0,"number"==typeof n?(this._size=n,this._cachedVisibleSize=void 0,e.classList.add("visible")):(this._size=0,this._cachedVisibleSize=n.cachedVisibleSize)}set size(e){this._size=e}get size(){return this._size}get visible(){return void 0===this._cachedVisibleSize}setVisible(e,t){e!==this.visible&&(e?(this.size=(0,v.u)(this._cachedVisibleSize,this.viewMinimumSize,this.viewMaximumSize),this._cachedVisibleSize=void 0):(this._cachedVisibleSize="number"==typeof t?t:this.size,this.size=0),this.container.classList.toggle("visible",e),this.view.setVisible&&this.view.setVisible(e))}get minimumSize(){return this.visible?this.view.minimumSize:0}get viewMinimumSize(){return this.view.minimumSize}get maximumSize(){return this.visible?this.view.maximumSize:0}get viewMaximumSize(){return this.view.maximumSize}get priority(){return this.view.priority}get snap(){return!!this.view.snap}set enabled(e){this.container.style.pointerEvents=e?"":"none"}layout(e,t){this.layoutContainer(e),this.view.layout(this.size,e,t)}dispose(){return this.disposable.dispose(),this.view}}class N extends E{layoutContainer(e){this.container.style.top=`${e}px`,this.container.style.height=`${this.size}px`}}class D extends E{layoutContainer(e){this.container.style.left=`${e}px`,this.container.style.width=`${this.size}px`}}var I,M;!function(e){e[e.Idle=0]="Idle",e[e.Busy=1]="Busy"}(I||(I={})),function(e){e.Distribute={type:"distribute"},e.Split=function(e){return{type:"split",index:e}},e.Invisible=function(e){return{type:"invisible",cachedVisibleSize:e}}}(M||(M={}));class T extends _.JT{constructor(e,t={}){var n,i;super(),this.size=0,this.contentSize=0,this.proportions=void 0,this.viewItems=[],this.sashItems=[],this.state=I.Idle,this._onDidSashChange=this._register(new b.Q5),this.onDidSashChange=this._onDidSashChange.event,this._onDidSashReset=this._register(new b.Q5),this._startSnappingEnabled=!0,this._endSnappingEnabled=!0,this.orientation=C.o8(t.orientation)?0:t.orientation,this.inverseAltBehavior=!!t.inverseAltBehavior,this.proportionalLayout=!!C.o8(t.proportionalLayout)||!!t.proportionalLayout,this.getSashOrthogonalSize=t.getSashOrthogonalSize,this.el=document.createElement("div"),this.el.classList.add("monaco-split-view2"),this.el.classList.add(0===this.orientation?"vertical":"horizontal"),e.appendChild(this.el),this.sashContainer=(0,S.R3)(this.el,(0,S.$)(".sash-container")),this.viewContainer=(0,S.$)(".split-view-container"),this.scrollable=new k.Rm(125,S.jL),this.scrollableElement=this._register(new x.$Z(this.viewContainer,{vertical:0===this.orientation?null!==(n=t.scrollbarVisibility)&&void 0!==n?n:1:2,horizontal:1===this.orientation?null!==(i=t.scrollbarVisibility)&&void 0!==i?i:1:2},this.scrollable)),this.onDidScroll=this.scrollableElement.onScroll,this._register(this.onDidScroll((e=>{this.viewContainer.scrollTop=e.scrollTop,this.viewContainer.scrollLeft=e.scrollLeft}))),(0,S.R3)(this.el,this.scrollableElement.getDomNode()),this.style(t.styles||L),t.descriptor&&(this.size=t.descriptor.size,t.descriptor.views.forEach(((e,t)=>{const n=C.o8(e.visible)||e.visible?e.size:{type:"invisible",cachedVisibleSize:e.size},i=e.view;this.doAddView(i,n,t,!0)})),this.contentSize=this.viewItems.reduce(((e,t)=>e+t.size),0),this.saveProportions())}get orthogonalStartSash(){return this._orthogonalStartSash}set orthogonalStartSash(e){for(const t of this.sashItems)t.sash.orthogonalStartSash=e;this._orthogonalStartSash=e}get orthogonalEndSash(){return this._orthogonalEndSash}set orthogonalEndSash(e){for(const t of this.sashItems)t.sash.orthogonalEndSash=e;this._orthogonalEndSash=e}get startSnappingEnabled(){return this._startSnappingEnabled}set startSnappingEnabled(e){this._startSnappingEnabled!==e&&(this._startSnappingEnabled=e,this.updateSashEnablement())}get endSnappingEnabled(){return this._endSnappingEnabled}set endSnappingEnabled(e){this._endSnappingEnabled!==e&&(this._endSnappingEnabled=e,this.updateSashEnablement())}style(e){e.separatorBorder.isTransparent()?(this.el.classList.remove("separator-border"),this.el.style.removeProperty("--separator-border")):(this.el.classList.add("separator-border"),this.el.style.setProperty("--separator-border",e.separatorBorder.toString()))}addView(e,t,n=this.viewItems.length,i){this.doAddView(e,t,n,i)}layout(e,t){const n=Math.max(this.size,this.contentSize);if(this.size=e,this.layoutContext=t,this.proportions)for(let t=0;t1===this.viewItems[e].priority)),o=t.filter((e=>2===this.viewItems[e].priority));this.resize(this.viewItems.length-1,e-n,void 0,i,o)}this.distributeEmptySpace(),this.layoutViews()}saveProportions(){this.proportionalLayout&&this.contentSize>0&&(this.proportions=this.viewItems.map((e=>e.size/this.contentSize)))}onSashStart({sash:e,start:t,alt:n}){for(const e of this.viewItems)e.enabled=!1;const i=this.sashItems.findIndex((t=>t.sash===e)),o=(0,_.F8)((0,S.nm)(document.body,"keydown",(e=>r(this.sashDragState.current,e.altKey))),(0,S.nm)(document.body,"keyup",(()=>r(this.sashDragState.current,!1)))),r=(e,t)=>{const n=this.viewItems.map((e=>e.size));let r,s,a=Number.NEGATIVE_INFINITY,l=Number.POSITIVE_INFINITY;if(this.inverseAltBehavior&&(t=!t),t)if(i===this.sashItems.length-1){const e=this.viewItems[i];a=(e.minimumSize-e.size)/2,l=(e.maximumSize-e.size)/2}else{const e=this.viewItems[i+1];a=(e.size-e.maximumSize)/2,l=(e.size-e.minimumSize)/2}if(!t){const e=(0,w.w6)(i,-1),t=(0,w.w6)(i+1,this.viewItems.length),o=e.reduce(((e,t)=>e+(this.viewItems[t].minimumSize-n[t])),0),a=e.reduce(((e,t)=>e+(this.viewItems[t].viewMaximumSize-n[t])),0),l=0===t.length?Number.POSITIVE_INFINITY:t.reduce(((e,t)=>e+(n[t]-this.viewItems[t].minimumSize)),0),d=0===t.length?Number.NEGATIVE_INFINITY:t.reduce(((e,t)=>e+(n[t]-this.viewItems[t].viewMaximumSize)),0),c=Math.max(o,d),h=Math.min(l,a),u=this.findFirstSnapIndex(e),g=this.findFirstSnapIndex(t);if("number"==typeof u){const e=this.viewItems[u],t=Math.floor(e.viewMinimumSize/2);r={index:u,limitDelta:e.visible?c-t:c+t,size:e.size}}if("number"==typeof g){const e=this.viewItems[g],t=Math.floor(e.viewMinimumSize/2);s={index:g,limitDelta:e.visible?h+t:h-t,size:e.size}}}this.sashDragState={start:e,current:e,index:i,sizes:n,minDelta:a,maxDelta:l,alt:t,snapBefore:r,snapAfter:s,disposable:o}};r(t,n)}onSashChange({current:e}){const{index:t,start:n,sizes:i,alt:o,minDelta:r,maxDelta:s,snapBefore:a,snapAfter:l}=this.sashDragState;this.sashDragState.current=e;const d=e-n,c=this.resize(t,d,i,void 0,void 0,r,s,a,l);if(o){const e=t===this.sashItems.length-1,n=this.viewItems.map((e=>e.size)),i=e?t:t+1,o=this.viewItems[i],r=o.size-o.maximumSize,s=o.size-o.minimumSize,a=e?t-1:t+1;this.resize(a,-c,n,void 0,void 0,r,s)}this.distributeEmptySpace(),this.layoutViews()}onSashEnd(e){this._onDidSashChange.fire(e),this.sashDragState.disposable.dispose(),this.saveProportions();for(const e of this.viewItems)e.enabled=!0}onViewChange(e,t){const n=this.viewItems.indexOf(e);n<0||n>=this.viewItems.length||(t="number"==typeof t?t:e.size,t=(0,v.u)(t,e.minimumSize,e.maximumSize),this.inverseAltBehavior&&n>0?(this.resize(n-1,Math.floor((e.size-t)/2)),this.distributeEmptySpace(),this.layoutViews()):(e.size=t,this.relayout([n],void 0)))}resizeView(e,t){if(this.state!==I.Idle)throw new Error("Cant modify splitview");if(this.state=I.Busy,e<0||e>=this.viewItems.length)return;const n=(0,w.w6)(this.viewItems.length).filter((t=>t!==e)),i=[...n.filter((e=>1===this.viewItems[e].priority)),e],o=n.filter((e=>2===this.viewItems[e].priority)),r=this.viewItems[e];t=Math.round(t),t=(0,v.u)(t,r.minimumSize,Math.min(r.maximumSize,this.size)),r.size=t,this.relayout(i,o),this.state=I.Idle}distributeViewSizes(){const e=[];let t=0;for(const n of this.viewItems)n.maximumSize-n.minimumSize>0&&(e.push(n),t+=n.size);const n=Math.floor(t/e.length);for(const t of e)t.size=(0,v.u)(n,t.minimumSize,t.maximumSize);const i=(0,w.w6)(this.viewItems.length),o=i.filter((e=>1===this.viewItems[e].priority)),r=i.filter((e=>2===this.viewItems[e].priority));this.relayout(o,r)}getViewSize(e){return e<0||e>=this.viewItems.length?-1:this.viewItems[e].size}doAddView(e,t,n=this.viewItems.length,i){if(this.state!==I.Idle)throw new Error("Cant modify splitview");this.state=I.Busy;const o=(0,S.$)(".split-view-view");n===this.viewItems.length?this.viewContainer.appendChild(o):this.viewContainer.insertBefore(o,this.viewContainer.children.item(n));const r=e.onDidChange((e=>this.onViewChange(d,e))),s=(0,_.OF)((()=>this.viewContainer.removeChild(o))),a=(0,_.F8)(r,s);let l;l="number"==typeof t?t:"split"===t.type?this.getViewSize(t.index)/2:"invisible"===t.type?{cachedVisibleSize:t.cachedVisibleSize}:e.minimumSize;const d=0===this.orientation?new N(o,e,l,a):new D(o,e,l,a);if(this.viewItems.splice(n,0,d),this.viewItems.length>1){let e={orthogonalStartSash:this.orthogonalStartSash,orthogonalEndSash:this.orthogonalEndSash};const t=0===this.orientation?new y.g(this.sashContainer,{getHorizontalSashTop:e=>this.getSashPosition(e),getHorizontalSashWidth:this.getSashOrthogonalSize},Object.assign(Object.assign({},e),{orientation:1})):new y.g(this.sashContainer,{getVerticalSashLeft:e=>this.getSashPosition(e),getVerticalSashHeight:this.getSashOrthogonalSize},Object.assign(Object.assign({},e),{orientation:0})),i=0===this.orientation?e=>({sash:t,start:e.startY,current:e.currentY,alt:e.altKey}):e=>({sash:t,start:e.startX,current:e.currentX,alt:e.altKey}),o=b.ju.map(t.onDidStart,i)(this.onSashStart,this),r=b.ju.map(t.onDidChange,i)(this.onSashChange,this),s=b.ju.map(t.onDidEnd,(()=>this.sashItems.findIndex((e=>e.sash===t)))),a=s(this.onSashEnd,this),l=t.onDidReset((()=>{const e=this.sashItems.findIndex((e=>e.sash===t)),n=(0,w.w6)(e,-1),i=(0,w.w6)(e+1,this.viewItems.length),o=this.findFirstSnapIndex(n),r=this.findFirstSnapIndex(i);("number"!=typeof o||this.viewItems[o].visible)&&("number"!=typeof r||this.viewItems[r].visible)&&this._onDidSashReset.fire(e)})),d=(0,_.F8)(o,r,a,l,t),c={sash:t,disposable:d};this.sashItems.splice(n-1,0,c)}let c;o.appendChild(e.element),"number"!=typeof t&&"split"===t.type&&(c=[t.index]),i||this.relayout([n],c),this.state=I.Idle,i||"number"==typeof t||"distribute"!==t.type||this.distributeViewSizes()}relayout(e,t){const n=this.viewItems.reduce(((e,t)=>e+t.size),0);this.resize(this.viewItems.length-1,this.size-n,void 0,e,t),this.distributeEmptySpace(),this.layoutViews(),this.saveProportions()}resize(e,t,n=this.viewItems.map((e=>e.size)),i,o,r=Number.NEGATIVE_INFINITY,s=Number.POSITIVE_INFINITY,a,l){if(e<0||e>=this.viewItems.length)return 0;const d=(0,w.w6)(e,-1),c=(0,w.w6)(e+1,this.viewItems.length);if(o)for(const e of o)(0,w.zI)(d,e),(0,w.zI)(c,e);if(i)for(const e of i)(0,w.al)(d,e),(0,w.al)(c,e);const h=d.map((e=>this.viewItems[e])),u=d.map((e=>n[e])),g=c.map((e=>this.viewItems[e])),p=c.map((e=>n[e])),m=d.reduce(((e,t)=>e+(this.viewItems[t].minimumSize-n[t])),0),f=d.reduce(((e,t)=>e+(this.viewItems[t].maximumSize-n[t])),0),_=0===c.length?Number.POSITIVE_INFINITY:c.reduce(((e,t)=>e+(n[t]-this.viewItems[t].minimumSize)),0),b=0===c.length?Number.NEGATIVE_INFINITY:c.reduce(((e,t)=>e+(n[t]-this.viewItems[t].maximumSize)),0),C=Math.max(m,b,r),y=Math.min(_,f,s);let A=!1;if(a){const e=this.viewItems[a.index],n=t>=a.limitDelta;A=n!==e.visible,e.setVisible(n,a.size)}if(!A&&l){const e=this.viewItems[l.index],n=te+t.size),0);let n=this.size-t;const i=(0,w.w6)(this.viewItems.length-1,-1),o=i.filter((e=>1===this.viewItems[e].priority)),r=i.filter((e=>2===this.viewItems[e].priority));for(const e of r)(0,w.zI)(i,e);for(const e of o)(0,w.al)(i,e);"number"==typeof e&&(0,w.al)(i,e);for(let e=0;0!==n&&ee+t.size),0);let e=0;for(const t of this.viewItems)t.layout(e,this.layoutContext),e+=t.size;this.sashItems.forEach((e=>e.sash.layout())),this.updateSashEnablement(),this.updateScrollableElement()}updateScrollableElement(){0===this.orientation?this.scrollableElement.setScrollDimensions({height:this.size,scrollHeight:this.contentSize}):this.scrollableElement.setScrollDimensions({width:this.size,scrollWidth:this.contentSize})}updateSashEnablement(){let e=!1;const t=this.viewItems.map((t=>e=t.size-t.minimumSize>0||e));e=!1;const n=this.viewItems.map((t=>e=t.maximumSize-t.size>0||e)),i=[...this.viewItems].reverse();e=!1;const o=i.map((t=>e=t.size-t.minimumSize>0||e)).reverse();e=!1;const r=i.map((t=>e=t.maximumSize-t.size>0||e)).reverse();let s=0;for(let e=0;e0||this.startSnappingEnabled)?i.state=1:c&&t[e]&&(s0)return;if(!e.visible&&e.snap)return t}}dispose(){super.dispose(),this.viewItems.forEach((e=>e.dispose())),this.viewItems=[],this.sashItems.forEach((e=>e.disposable.dispose())),this.sashItems=[]}}},3794:(e,t,n)=>{"use strict";n.d(t,{$:()=>l});var i=n(5321),o=n(9069),r=n(3938),s=n(5976),a=n(553);class l extends s.JT{onclick(e,t){this._register(i.nm(e,i.tw.CLICK,(e=>t(new r.n(e)))))}onmousedown(e,t){this._register(i.nm(e,i.tw.MOUSE_DOWN,(e=>t(new r.n(e)))))}onmouseover(e,t){this._register(i.nm(e,i.tw.MOUSE_OVER,(e=>t(new r.n(e)))))}onnonbubblingmouseout(e,t){this._register(i.j_(e,(e=>t(new r.n(e)))))}onkeydown(e,t){this._register(i.nm(e,i.tw.KEY_DOWN,(e=>t(new o.y(e)))))}onkeyup(e,t){this._register(i.nm(e,i.tw.KEY_UP,(e=>t(new o.y(e)))))}oninput(e,t){this._register(i.nm(e,i.tw.INPUT,t))}onblur(e,t){this._register(i.nm(e,i.tw.BLUR,t))}onfocus(e,t){this._register(i.nm(e,i.tw.FOCUS,t))}ignoreGesture(e){a.o.ignoreTarget(e)}}},4741:(e,t,n)=>{"use strict";n.d(t,{aU:()=>a,Wi:()=>l,Z0:()=>d,wY:()=>c,eZ:()=>h});var i=n(3580),o=n(5976),r=n(4669),s=function(e,t,n,i){return new(n||(n=Promise))((function(o,r){function s(e){try{l(i.next(e))}catch(e){r(e)}}function a(e){try{l(i.throw(e))}catch(e){r(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,a)}l((i=i.apply(e,t||[])).next())}))};class a extends o.JT{constructor(e,t="",n="",i=!0,o){super(),this._onDidChange=this._register(new r.Q5),this.onDidChange=this._onDidChange.event,this._enabled=!0,this._checked=!1,this._id=e,this._label=t,this._cssClass=n,this._enabled=i,this._actionCallback=o}get id(){return this._id}get label(){return this._label}set label(e){this._setLabel(e)}_setLabel(e){this._label!==e&&(this._label=e,this._onDidChange.fire({label:e}))}get tooltip(){return this._tooltip||""}set tooltip(e){this._setTooltip(e)}_setTooltip(e){this._tooltip!==e&&(this._tooltip=e,this._onDidChange.fire({tooltip:e}))}get class(){return this._cssClass}set class(e){this._setClass(e)}_setClass(e){this._cssClass!==e&&(this._cssClass=e,this._onDidChange.fire({class:e}))}get enabled(){return this._enabled}set enabled(e){this._setEnabled(e)}_setEnabled(e){this._enabled!==e&&(this._enabled=e,this._onDidChange.fire({enabled:e}))}get checked(){return this._checked}set checked(e){this._setChecked(e)}_setChecked(e){this._checked!==e&&(this._checked=e,this._onDidChange.fire({checked:e}))}run(e,t){return s(this,void 0,void 0,(function*(){this._actionCallback&&(yield this._actionCallback(e))}))}}class l extends o.JT{constructor(){super(...arguments),this._onBeforeRun=this._register(new r.Q5),this.onBeforeRun=this._onBeforeRun.event,this._onDidRun=this._register(new r.Q5),this.onDidRun=this._onDidRun.event}run(e,t){return s(this,void 0,void 0,(function*(){if(!e.enabled)return;let n;this._onBeforeRun.fire({action:e});try{yield this.runAction(e,t)}catch(e){n=e}this._onDidRun.fire({action:e,error:n})}))}runAction(e,t){return s(this,void 0,void 0,(function*(){yield e.run(t)}))}}class d extends a{constructor(e){super(d.ID,e,e?"separator text":"separator"),this.checked=!1,this.enabled=!1}}d.ID="vs.actions.separator";class c{constructor(e,t,n,i){this.tooltip="",this.enabled=!0,this.checked=!1,this.id=e,this.label=t,this.class=i,this._actions=n}get actions(){return this._actions}dispose(){}run(){return s(this,void 0,void 0,(function*(){}))}}class h extends a{constructor(){super(h.ID,i.N("submenu.empty","(empty)"),void 0,!1)}}h.ID="vs.actions.empty"},9488:(e,t,n)=>{"use strict";function i(e,t=0){return e[e.length-(1+t)]}function o(e){if(0===e.length)throw new Error("Invalid tail call");return[e.slice(0,e.length-1),e[e.length-1]]}function r(e,t,n=((e,t)=>e===t)){if(e===t)return!0;if(!e||!t)return!1;if(e.length!==t.length)return!1;for(let i=0,o=e.length;i0))return r;o=r-1}}return-(i+1)}function a(e,t){let n=0,i=e.length;if(0===i)return 0;for(;n=t.length)throw new TypeError("invalid index");let i=t[Math.floor(t.length*Math.random())],o=[],r=[],s=[];for(let e of t){const t=n(e,i);t<0?o.push(e):t>0?r.push(e):s.push(e)}return e!!e))}function h(e){return!Array.isArray(e)||0===e.length}function u(e){return Array.isArray(e)&&e.length>0}function g(e,t){if(!t)return e.filter(((t,n)=>e.indexOf(t)===n));const n=Object.create(null);return e.filter((e=>{const i=t(e);return!n[i]&&(n[i]=!0,!0)}))}function p(e){const t=new Set;return e.filter((e=>!t.has(e)&&(t.add(e),!0)))}function m(e,t){return e.length>0?e[0]:t}function f(e){return[].concat(...e)}function _(e,t){let n="number"==typeof t?e:0;"number"==typeof t?n=e:(n=0,t=e);const i=[];if(n<=t)for(let e=n;et;e--)i.push(e);return i}function b(e,t,n){const i=e.slice(0,t),o=e.slice(t);return i.concat(n,o)}function C(e,t){const n=e.indexOf(t);n>-1&&(e.splice(n,1),e.unshift(t))}function v(e,t){const n=e.indexOf(t);n>-1&&(e.splice(n,1),e.push(t))}function w(e){return Array.isArray(e)?e:[e]}function y(e,t,n,i){const o=A(e,t),r=e.splice(o,n);return function(e,t,n){const i=A(e,t),o=e.length,r=n.length;e.length=o+r;for(let t=o-1;t>=i;t--)e[t+r]=e[t];for(let t=0;ti,JH:()=>o,fS:()=>r,ry:()=>s,lG:()=>a,HW:()=>l,vM:()=>d,kX:()=>c,XY:()=>h,Of:()=>u,EB:()=>g,cU:()=>p,Xh:()=>m,xH:()=>f,w6:()=>_,Zv:()=>b,zI:()=>C,al:()=>v,_2:()=>w,db:()=>y,H9:()=>S});class S{constructor(e){this.items=e,this.firstIdx=0,this.lastIdx=this.items.length-1}takeWhile(e){let t=this.firstIdx;for(;t=0&&e(this.items[t]);)t--;const n=t===this.lastIdx?null:this.items.slice(t+1,this.lastIdx+1);return this.lastIdx=t,n}}},5146:(e,t,n)=>{"use strict";function i(e,t){if(!e)throw new Error(t?`Assertion failed (${t})`:"Assertion Failed")}n.d(t,{ok:()=>i})},5393:(e,t,n)=>{"use strict";n.d(t,{J8:()=>s,PG:()=>a,eP:()=>l,vp:()=>c,rH:()=>h,Vs:()=>u,Vg:()=>g,Ps:()=>p,_F:()=>m,zh:()=>f,pY:()=>_,To:()=>b,Ue:()=>C,jT:()=>v});var i=n(1050),o=n(7301),r=n(5976);function s(e){return!!e&&"function"==typeof e.then}function a(e){const t=new i.A,n=e(t.token),r=new Promise(((e,i)=>{const r=t.token.onCancellationRequested((()=>{r.dispose(),t.dispose(),i((0,o.F0)())}));Promise.resolve(n).then((n=>{r.dispose(),t.dispose(),e(n)}),(e=>{r.dispose(),t.dispose(),i(e)}))}));return new class{cancel(){t.cancel()}then(e,t){return r.then(e,t)}catch(e){return this.then(void 0,e)}finally(e){return r.finally(e)}}}function l(e,t,n){return Promise.race([e,new Promise((e=>t.onCancellationRequested((()=>e(n)))))])}class d{constructor(){this.activePromise=null,this.queuedPromise=null,this.queuedPromiseFactory=null}queue(e){if(this.activePromise){if(this.queuedPromiseFactory=e,!this.queuedPromise){const e=()=>{this.queuedPromise=null;const e=this.queue(this.queuedPromiseFactory);return this.queuedPromiseFactory=null,e};this.queuedPromise=new Promise((t=>{this.activePromise.then(e,e).then(t)}))}return new Promise(((e,t)=>{this.queuedPromise.then(e,t)}))}return this.activePromise=e(),new Promise(((e,t)=>{this.activePromise.then((t=>{this.activePromise=null,e(t)}),(e=>{this.activePromise=null,t(e)}))}))}}class c{constructor(e){this.defaultDelay=e,this.timeout=null,this.completionPromise=null,this.doResolve=null,this.doReject=null,this.task=null}trigger(e,t=this.defaultDelay){return this.task=e,this.cancelTimeout(),this.completionPromise||(this.completionPromise=new Promise(((e,t)=>{this.doResolve=e,this.doReject=t})).then((()=>{if(this.completionPromise=null,this.doResolve=null,this.task){const e=this.task;return this.task=null,e()}}))),this.timeout=setTimeout((()=>{this.timeout=null,this.doResolve&&this.doResolve(null)}),t),this.completionPromise}isTriggered(){return null!==this.timeout}cancel(){this.cancelTimeout(),this.completionPromise&&(this.doReject&&this.doReject((0,o.F0)()),this.completionPromise=null)}cancelTimeout(){null!==this.timeout&&(clearTimeout(this.timeout),this.timeout=null)}dispose(){this.cancel()}}class h{constructor(e){this.delayer=new c(e),this.throttler=new d}trigger(e,t){return this.delayer.trigger((()=>this.throttler.queue(e)),t)}dispose(){this.delayer.dispose()}}function u(e,t){return t?new Promise(((n,i)=>{const r=setTimeout((()=>{s.dispose(),n()}),e),s=t.onCancellationRequested((()=>{clearTimeout(r),s.dispose(),i((0,o.F0)())}))})):a((t=>u(e,t)))}function g(e,t=0){const n=setTimeout(e,t);return(0,r.OF)((()=>clearTimeout(n)))}function p(e,t=(e=>!!e),n=null){let i=0;const o=e.length,r=()=>{if(i>=o)return Promise.resolve(n);const s=e[i++];return Promise.resolve(s()).then((e=>t(e)?Promise.resolve(e):r()))};return r()}class m{constructor(e,t){this._token=-1,"function"==typeof e&&"number"==typeof t&&this.setIfNotSet(e,t)}dispose(){this.cancel()}cancel(){-1!==this._token&&(clearTimeout(this._token),this._token=-1)}cancelAndSet(e,t){this.cancel(),this._token=setTimeout((()=>{this._token=-1,e()}),t)}setIfNotSet(e,t){-1===this._token&&(this._token=setTimeout((()=>{this._token=-1,e()}),t))}}class f{constructor(){this._token=-1}dispose(){this.cancel()}cancel(){-1!==this._token&&(clearInterval(this._token),this._token=-1)}cancelAndSet(e,t){this.cancel(),this._token=setInterval((()=>{e()}),t)}}class _{constructor(e,t){this.timeoutToken=-1,this.runner=e,this.timeout=t,this.timeoutHandler=this.onTimeout.bind(this)}dispose(){this.cancel(),this.runner=null}cancel(){this.isScheduled()&&(clearTimeout(this.timeoutToken),this.timeoutToken=-1)}schedule(e=this.timeout){this.cancel(),this.timeoutToken=setTimeout(this.timeoutHandler,e)}get delay(){return this.timeout}set delay(e){this.timeout=e}isScheduled(){return-1!==this.timeoutToken}onTimeout(){this.timeoutToken=-1,this.runner&&this.doRun()}doRun(){this.runner&&this.runner()}}let b;!function(){if("function"!=typeof requestIdleCallback||"function"!=typeof cancelIdleCallback){const e=Object.freeze({didTimeout:!0,timeRemaining:()=>15});b=t=>{const n=setTimeout((()=>t(e)));let i=!1;return{dispose(){i||(i=!0,clearTimeout(n))}}}}else b=(e,t)=>{const n=requestIdleCallback(e,"number"==typeof t?{timeout:t}:void 0);let i=!1;return{dispose(){i||(i=!0,cancelIdleCallback(n))}}}}();class C{constructor(e){this._didRun=!1,this._executor=()=>{try{this._value=e()}catch(e){this._error=e}finally{this._didRun=!0}},this._handle=b((()=>this._executor()))}dispose(){this._handle.dispose()}get value(){if(this._didRun||(this._handle.dispose(),this._executor()),this._error)throw this._error;return this._value}}var v;!function(e){e.settled=function(e){return t=this,n=void 0,o=function*(){let t;const n=yield Promise.all(e.map((e=>e.then((e=>e),(e=>{t||(t=e)})))));if(void 0!==t)throw t;return n},new((i=void 0)||(i=Promise))((function(e,r){function s(e){try{l(o.next(e))}catch(e){r(e)}}function a(e){try{l(o.throw(e))}catch(e){r(e)}}function l(t){var n;t.done?e(t.value):(n=t.value,n instanceof i?n:new i((function(e){e(n)}))).then(s,a)}l((o=o.apply(t,n||[])).next())}));var t,n,i,o}}(v||(v={}))},3060:(e,t,n)=>{"use strict";n.d(t,{KN:()=>a,mP:()=>l,oq:()=>d,Ag:()=>c,T4:()=>h,Q$:()=>u,Cg:()=>g});var i=n(7295);const o="undefined"!=typeof Buffer,r="undefined"!=typeof TextDecoder;let s;class a{constructor(e){this.buffer=e,this.byteLength=this.buffer.byteLength}static wrap(e){return o&&!Buffer.isBuffer(e)&&(e=Buffer.from(e.buffer,e.byteOffset,e.byteLength)),new a(e)}toString(){return o?this.buffer.toString():r?(s||(s=new TextDecoder),s.decode(this.buffer)):i.CZ(this.buffer)}}function l(e,t){return e[t+0]<<0>>>0|e[t+1]<<8>>>0}function d(e,t,n){e[n+0]=255&t,t>>>=8,e[n+1]=255&t}function c(e,t){return e[t]*Math.pow(2,24)+e[t+1]*Math.pow(2,16)+e[t+2]*Math.pow(2,8)+e[t+3]}function h(e,t,n){e[n+3]=t,t>>>=8,e[n+2]=t,t>>>=8,e[n+1]=t,t>>>=8,e[n]=t}function u(e,t){return e[t]}function g(e,t,n){e[n]=t}},1050:(e,t,n)=>{"use strict";n.d(t,{T:()=>r,A:()=>a});var i=n(4669);const o=Object.freeze((function(e,t){const n=setTimeout(e.bind(t),0);return{dispose(){clearTimeout(n)}}}));var r;!function(e){e.isCancellationToken=function(t){return t===e.None||t===e.Cancelled||t instanceof s||!(!t||"object"!=typeof t)&&"boolean"==typeof t.isCancellationRequested&&"function"==typeof t.onCancellationRequested},e.None=Object.freeze({isCancellationRequested:!1,onCancellationRequested:i.ju.None}),e.Cancelled=Object.freeze({isCancellationRequested:!0,onCancellationRequested:o})}(r||(r={}));class s{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?o:(this._emitter||(this._emitter=new i.Q5),this._emitter.event)}dispose(){this._emitter&&(this._emitter.dispose(),this._emitter=null)}}class a{constructor(e){this._token=void 0,this._parentListener=void 0,this._parentListener=e&&e.onCancellationRequested(this.cancel,this)}get token(){return this._token||(this._token=new s),this._token}cancel(){this._token?this._token instanceof s&&this._token.cancel():this._token=r.Cancelled}dispose(e=!1){e&&this.cancel(),this._parentListener&&this._parentListener.dispose(),this._token?this._token instanceof s&&this._token.dispose():this._token=r.None}}},3046:(e,t,n)=>{"use strict";n.d(t,{fK:()=>r,CM:()=>s,JL:()=>a,lA:()=>l,dT:()=>d});var i=n(4669);const o=new class{constructor(){this._icons=new Map,this._onDidRegister=new i.Q5}add(e){const t=this._icons.get(e.id);t?e.description?t.description=e.description:console.error(`Duplicate registration of codicon ${e.id}`):(this._icons.set(e.id,e),this._onDidRegister.fire(e))}get(e){return this._icons.get(e)}get all(){return this._icons.values()}get onDidRegister(){return this._onDidRegister.event}},r=o;function s(e,t){return new l(e,t)}function a(e){return e?e.replace(/\$\((.*?)\)/g,((e,t)=>` ${t} `)).trim():""}class l{constructor(e,t,n){this.id=e,this.definition=t,this.description=n,o.add(this)}get classNames(){return"codicon codicon-"+this.id}get classNamesArray(){return["codicon","codicon-"+this.id]}get cssSelector(){return".codicon.codicon-"+this.id}}var d;!function(e){e.iconNameSegment="[A-Za-z0-9]+",e.iconNameExpression="[A-Za-z0-9\\-]+",e.iconModifierExpression="~[A-Za-z]+";const t=new RegExp(`^(${e.iconNameExpression})(${e.iconModifierExpression})?$`);function n(e){if(e instanceof l)return["codicon","codicon-"+e.id];const i=t.exec(e.id);if(!i)return n(l.error);let[,o,r]=i;const s=["codicon","codicon-"+o];return r&&s.push("codicon-modifier-"+r.substr(1)),s}e.asClassNameArray=n,e.asClassName=function(e){return n(e).join(" ")},e.asCSSSelector=function(e){return"."+n(e).join(".")}}(d||(d={})),function(e){e.add=new e("add",{fontCharacter:"\\ea60"}),e.plus=new e("plus",{fontCharacter:"\\ea60"}),e.gistNew=new e("gist-new",{fontCharacter:"\\ea60"}),e.repoCreate=new e("repo-create",{fontCharacter:"\\ea60"}),e.lightbulb=new e("lightbulb",{fontCharacter:"\\ea61"}),e.lightBulb=new e("light-bulb",{fontCharacter:"\\ea61"}),e.repo=new e("repo",{fontCharacter:"\\ea62"}),e.repoDelete=new e("repo-delete",{fontCharacter:"\\ea62"}),e.gistFork=new e("gist-fork",{fontCharacter:"\\ea63"}),e.repoForked=new e("repo-forked",{fontCharacter:"\\ea63"}),e.gitPullRequest=new e("git-pull-request",{fontCharacter:"\\ea64"}),e.gitPullRequestAbandoned=new e("git-pull-request-abandoned",{fontCharacter:"\\ea64"}),e.recordKeys=new e("record-keys",{fontCharacter:"\\ea65"}),e.keyboard=new e("keyboard",{fontCharacter:"\\ea65"}),e.tag=new e("tag",{fontCharacter:"\\ea66"}),e.tagAdd=new e("tag-add",{fontCharacter:"\\ea66"}),e.tagRemove=new e("tag-remove",{fontCharacter:"\\ea66"}),e.person=new e("person",{fontCharacter:"\\ea67"}),e.personFollow=new e("person-follow",{fontCharacter:"\\ea67"}),e.personOutline=new e("person-outline",{fontCharacter:"\\ea67"}),e.personFilled=new e("person-filled",{fontCharacter:"\\ea67"}),e.gitBranch=new e("git-branch",{fontCharacter:"\\ea68"}),e.gitBranchCreate=new e("git-branch-create",{fontCharacter:"\\ea68"}),e.gitBranchDelete=new e("git-branch-delete",{fontCharacter:"\\ea68"}),e.sourceControl=new e("source-control",{fontCharacter:"\\ea68"}),e.mirror=new e("mirror",{fontCharacter:"\\ea69"}),e.mirrorPublic=new e("mirror-public",{fontCharacter:"\\ea69"}),e.star=new e("star",{fontCharacter:"\\ea6a"}),e.starAdd=new e("star-add",{fontCharacter:"\\ea6a"}),e.starDelete=new e("star-delete",{fontCharacter:"\\ea6a"}),e.starEmpty=new e("star-empty",{fontCharacter:"\\ea6a"}),e.comment=new e("comment",{fontCharacter:"\\ea6b"}),e.commentAdd=new e("comment-add",{fontCharacter:"\\ea6b"}),e.alert=new e("alert",{fontCharacter:"\\ea6c"}),e.warning=new e("warning",{fontCharacter:"\\ea6c"}),e.search=new e("search",{fontCharacter:"\\ea6d"}),e.searchSave=new e("search-save",{fontCharacter:"\\ea6d"}),e.logOut=new e("log-out",{fontCharacter:"\\ea6e"}),e.signOut=new e("sign-out",{fontCharacter:"\\ea6e"}),e.logIn=new e("log-in",{fontCharacter:"\\ea6f"}),e.signIn=new e("sign-in",{fontCharacter:"\\ea6f"}),e.eye=new e("eye",{fontCharacter:"\\ea70"}),e.eyeUnwatch=new e("eye-unwatch",{fontCharacter:"\\ea70"}),e.eyeWatch=new e("eye-watch",{fontCharacter:"\\ea70"}),e.circleFilled=new e("circle-filled",{fontCharacter:"\\ea71"}),e.primitiveDot=new e("primitive-dot",{fontCharacter:"\\ea71"}),e.closeDirty=new e("close-dirty",{fontCharacter:"\\ea71"}),e.debugBreakpoint=new e("debug-breakpoint",{fontCharacter:"\\ea71"}),e.debugBreakpointDisabled=new e("debug-breakpoint-disabled",{fontCharacter:"\\ea71"}),e.debugHint=new e("debug-hint",{fontCharacter:"\\ea71"}),e.primitiveSquare=new e("primitive-square",{fontCharacter:"\\ea72"}),e.edit=new e("edit",{fontCharacter:"\\ea73"}),e.pencil=new e("pencil",{fontCharacter:"\\ea73"}),e.info=new e("info",{fontCharacter:"\\ea74"}),e.issueOpened=new e("issue-opened",{fontCharacter:"\\ea74"}),e.gistPrivate=new e("gist-private",{fontCharacter:"\\ea75"}),e.gitForkPrivate=new e("git-fork-private",{fontCharacter:"\\ea75"}),e.lock=new e("lock",{fontCharacter:"\\ea75"}),e.mirrorPrivate=new e("mirror-private",{fontCharacter:"\\ea75"}),e.close=new e("close",{fontCharacter:"\\ea76"}),e.removeClose=new e("remove-close",{fontCharacter:"\\ea76"}),e.x=new e("x",{fontCharacter:"\\ea76"}),e.repoSync=new e("repo-sync",{fontCharacter:"\\ea77"}),e.sync=new e("sync",{fontCharacter:"\\ea77"}),e.clone=new e("clone",{fontCharacter:"\\ea78"}),e.desktopDownload=new e("desktop-download",{fontCharacter:"\\ea78"}),e.beaker=new e("beaker",{fontCharacter:"\\ea79"}),e.microscope=new e("microscope",{fontCharacter:"\\ea79"}),e.vm=new e("vm",{fontCharacter:"\\ea7a"}),e.deviceDesktop=new e("device-desktop",{fontCharacter:"\\ea7a"}),e.file=new e("file",{fontCharacter:"\\ea7b"}),e.fileText=new e("file-text",{fontCharacter:"\\ea7b"}),e.more=new e("more",{fontCharacter:"\\ea7c"}),e.ellipsis=new e("ellipsis",{fontCharacter:"\\ea7c"}),e.kebabHorizontal=new e("kebab-horizontal",{fontCharacter:"\\ea7c"}),e.mailReply=new e("mail-reply",{fontCharacter:"\\ea7d"}),e.reply=new e("reply",{fontCharacter:"\\ea7d"}),e.organization=new e("organization",{fontCharacter:"\\ea7e"}),e.organizationFilled=new e("organization-filled",{fontCharacter:"\\ea7e"}),e.organizationOutline=new e("organization-outline",{fontCharacter:"\\ea7e"}),e.newFile=new e("new-file",{fontCharacter:"\\ea7f"}),e.fileAdd=new e("file-add",{fontCharacter:"\\ea7f"}),e.newFolder=new e("new-folder",{fontCharacter:"\\ea80"}),e.fileDirectoryCreate=new e("file-directory-create",{fontCharacter:"\\ea80"}),e.trash=new e("trash",{fontCharacter:"\\ea81"}),e.trashcan=new e("trashcan",{fontCharacter:"\\ea81"}),e.history=new e("history",{fontCharacter:"\\ea82"}),e.clock=new e("clock",{fontCharacter:"\\ea82"}),e.folder=new e("folder",{fontCharacter:"\\ea83"}),e.fileDirectory=new e("file-directory",{fontCharacter:"\\ea83"}),e.symbolFolder=new e("symbol-folder",{fontCharacter:"\\ea83"}),e.logoGithub=new e("logo-github",{fontCharacter:"\\ea84"}),e.markGithub=new e("mark-github",{fontCharacter:"\\ea84"}),e.github=new e("github",{fontCharacter:"\\ea84"}),e.terminal=new e("terminal",{fontCharacter:"\\ea85"}),e.console=new e("console",{fontCharacter:"\\ea85"}),e.repl=new e("repl",{fontCharacter:"\\ea85"}),e.zap=new e("zap",{fontCharacter:"\\ea86"}),e.symbolEvent=new e("symbol-event",{fontCharacter:"\\ea86"}),e.error=new e("error",{fontCharacter:"\\ea87"}),e.stop=new e("stop",{fontCharacter:"\\ea87"}),e.variable=new e("variable",{fontCharacter:"\\ea88"}),e.symbolVariable=new e("symbol-variable",{fontCharacter:"\\ea88"}),e.array=new e("array",{fontCharacter:"\\ea8a"}),e.symbolArray=new e("symbol-array",{fontCharacter:"\\ea8a"}),e.symbolModule=new e("symbol-module",{fontCharacter:"\\ea8b"}),e.symbolPackage=new e("symbol-package",{fontCharacter:"\\ea8b"}),e.symbolNamespace=new e("symbol-namespace",{fontCharacter:"\\ea8b"}),e.symbolObject=new e("symbol-object",{fontCharacter:"\\ea8b"}),e.symbolMethod=new e("symbol-method",{fontCharacter:"\\ea8c"}),e.symbolFunction=new e("symbol-function",{fontCharacter:"\\ea8c"}),e.symbolConstructor=new e("symbol-constructor",{fontCharacter:"\\ea8c"}),e.symbolBoolean=new e("symbol-boolean",{fontCharacter:"\\ea8f"}),e.symbolNull=new e("symbol-null",{fontCharacter:"\\ea8f"}),e.symbolNumeric=new e("symbol-numeric",{fontCharacter:"\\ea90"}),e.symbolNumber=new e("symbol-number",{fontCharacter:"\\ea90"}),e.symbolStructure=new e("symbol-structure",{fontCharacter:"\\ea91"}),e.symbolStruct=new e("symbol-struct",{fontCharacter:"\\ea91"}),e.symbolParameter=new e("symbol-parameter",{fontCharacter:"\\ea92"}),e.symbolTypeParameter=new e("symbol-type-parameter",{fontCharacter:"\\ea92"}),e.symbolKey=new e("symbol-key",{fontCharacter:"\\ea93"}),e.symbolText=new e("symbol-text",{fontCharacter:"\\ea93"}),e.symbolReference=new e("symbol-reference",{fontCharacter:"\\ea94"}),e.goToFile=new e("go-to-file",{fontCharacter:"\\ea94"}),e.symbolEnum=new e("symbol-enum",{fontCharacter:"\\ea95"}),e.symbolValue=new e("symbol-value",{fontCharacter:"\\ea95"}),e.symbolRuler=new e("symbol-ruler",{fontCharacter:"\\ea96"}),e.symbolUnit=new e("symbol-unit",{fontCharacter:"\\ea96"}),e.activateBreakpoints=new e("activate-breakpoints",{fontCharacter:"\\ea97"}),e.archive=new e("archive",{fontCharacter:"\\ea98"}),e.arrowBoth=new e("arrow-both",{fontCharacter:"\\ea99"}),e.arrowDown=new e("arrow-down",{fontCharacter:"\\ea9a"}),e.arrowLeft=new e("arrow-left",{fontCharacter:"\\ea9b"}),e.arrowRight=new e("arrow-right",{fontCharacter:"\\ea9c"}),e.arrowSmallDown=new e("arrow-small-down",{fontCharacter:"\\ea9d"}),e.arrowSmallLeft=new e("arrow-small-left",{fontCharacter:"\\ea9e"}),e.arrowSmallRight=new e("arrow-small-right",{fontCharacter:"\\ea9f"}),e.arrowSmallUp=new e("arrow-small-up",{fontCharacter:"\\eaa0"}),e.arrowUp=new e("arrow-up",{fontCharacter:"\\eaa1"}),e.bell=new e("bell",{fontCharacter:"\\eaa2"}),e.bold=new e("bold",{fontCharacter:"\\eaa3"}),e.book=new e("book",{fontCharacter:"\\eaa4"}),e.bookmark=new e("bookmark",{fontCharacter:"\\eaa5"}),e.debugBreakpointConditionalUnverified=new e("debug-breakpoint-conditional-unverified",{fontCharacter:"\\eaa6"}),e.debugBreakpointConditional=new e("debug-breakpoint-conditional",{fontCharacter:"\\eaa7"}),e.debugBreakpointConditionalDisabled=new e("debug-breakpoint-conditional-disabled",{fontCharacter:"\\eaa7"}),e.debugBreakpointDataUnverified=new e("debug-breakpoint-data-unverified",{fontCharacter:"\\eaa8"}),e.debugBreakpointData=new e("debug-breakpoint-data",{fontCharacter:"\\eaa9"}),e.debugBreakpointDataDisabled=new e("debug-breakpoint-data-disabled",{fontCharacter:"\\eaa9"}),e.debugBreakpointLogUnverified=new e("debug-breakpoint-log-unverified",{fontCharacter:"\\eaaa"}),e.debugBreakpointLog=new e("debug-breakpoint-log",{fontCharacter:"\\eaab"}),e.debugBreakpointLogDisabled=new e("debug-breakpoint-log-disabled",{fontCharacter:"\\eaab"}),e.briefcase=new e("briefcase",{fontCharacter:"\\eaac"}),e.broadcast=new e("broadcast",{fontCharacter:"\\eaad"}),e.browser=new e("browser",{fontCharacter:"\\eaae"}),e.bug=new e("bug",{fontCharacter:"\\eaaf"}),e.calendar=new e("calendar",{fontCharacter:"\\eab0"}),e.caseSensitive=new e("case-sensitive",{fontCharacter:"\\eab1"}),e.check=new e("check",{fontCharacter:"\\eab2"}),e.checklist=new e("checklist",{fontCharacter:"\\eab3"}),e.chevronDown=new e("chevron-down",{fontCharacter:"\\eab4"}),e.chevronLeft=new e("chevron-left",{fontCharacter:"\\eab5"}),e.chevronRight=new e("chevron-right",{fontCharacter:"\\eab6"}),e.chevronUp=new e("chevron-up",{fontCharacter:"\\eab7"}),e.chromeClose=new e("chrome-close",{fontCharacter:"\\eab8"}),e.chromeMaximize=new e("chrome-maximize",{fontCharacter:"\\eab9"}),e.chromeMinimize=new e("chrome-minimize",{fontCharacter:"\\eaba"}),e.chromeRestore=new e("chrome-restore",{fontCharacter:"\\eabb"}),e.circleOutline=new e("circle-outline",{fontCharacter:"\\eabc"}),e.debugBreakpointUnverified=new e("debug-breakpoint-unverified",{fontCharacter:"\\eabc"}),e.circleSlash=new e("circle-slash",{fontCharacter:"\\eabd"}),e.circuitBoard=new e("circuit-board",{fontCharacter:"\\eabe"}),e.clearAll=new e("clear-all",{fontCharacter:"\\eabf"}),e.clippy=new e("clippy",{fontCharacter:"\\eac0"}),e.closeAll=new e("close-all",{fontCharacter:"\\eac1"}),e.cloudDownload=new e("cloud-download",{fontCharacter:"\\eac2"}),e.cloudUpload=new e("cloud-upload",{fontCharacter:"\\eac3"}),e.code=new e("code",{fontCharacter:"\\eac4"}),e.collapseAll=new e("collapse-all",{fontCharacter:"\\eac5"}),e.colorMode=new e("color-mode",{fontCharacter:"\\eac6"}),e.commentDiscussion=new e("comment-discussion",{fontCharacter:"\\eac7"}),e.compareChanges=new e("compare-changes",{fontCharacter:"\\eafd"}),e.creditCard=new e("credit-card",{fontCharacter:"\\eac9"}),e.dash=new e("dash",{fontCharacter:"\\eacc"}),e.dashboard=new e("dashboard",{fontCharacter:"\\eacd"}),e.database=new e("database",{fontCharacter:"\\eace"}),e.debugContinue=new e("debug-continue",{fontCharacter:"\\eacf"}),e.debugDisconnect=new e("debug-disconnect",{fontCharacter:"\\ead0"}),e.debugPause=new e("debug-pause",{fontCharacter:"\\ead1"}),e.debugRestart=new e("debug-restart",{fontCharacter:"\\ead2"}),e.debugStart=new e("debug-start",{fontCharacter:"\\ead3"}),e.debugStepInto=new e("debug-step-into",{fontCharacter:"\\ead4"}),e.debugStepOut=new e("debug-step-out",{fontCharacter:"\\ead5"}),e.debugStepOver=new e("debug-step-over",{fontCharacter:"\\ead6"}),e.debugStop=new e("debug-stop",{fontCharacter:"\\ead7"}),e.debug=new e("debug",{fontCharacter:"\\ead8"}),e.deviceCameraVideo=new e("device-camera-video",{fontCharacter:"\\ead9"}),e.deviceCamera=new e("device-camera",{fontCharacter:"\\eada"}),e.deviceMobile=new e("device-mobile",{fontCharacter:"\\eadb"}),e.diffAdded=new e("diff-added",{fontCharacter:"\\eadc"}),e.diffIgnored=new e("diff-ignored",{fontCharacter:"\\eadd"}),e.diffModified=new e("diff-modified",{fontCharacter:"\\eade"}),e.diffRemoved=new e("diff-removed",{fontCharacter:"\\eadf"}),e.diffRenamed=new e("diff-renamed",{fontCharacter:"\\eae0"}),e.diff=new e("diff",{fontCharacter:"\\eae1"}),e.discard=new e("discard",{fontCharacter:"\\eae2"}),e.editorLayout=new e("editor-layout",{fontCharacter:"\\eae3"}),e.emptyWindow=new e("empty-window",{fontCharacter:"\\eae4"}),e.exclude=new e("exclude",{fontCharacter:"\\eae5"}),e.extensions=new e("extensions",{fontCharacter:"\\eae6"}),e.eyeClosed=new e("eye-closed",{fontCharacter:"\\eae7"}),e.fileBinary=new e("file-binary",{fontCharacter:"\\eae8"}),e.fileCode=new e("file-code",{fontCharacter:"\\eae9"}),e.fileMedia=new e("file-media",{fontCharacter:"\\eaea"}),e.filePdf=new e("file-pdf",{fontCharacter:"\\eaeb"}),e.fileSubmodule=new e("file-submodule",{fontCharacter:"\\eaec"}),e.fileSymlinkDirectory=new e("file-symlink-directory",{fontCharacter:"\\eaed"}),e.fileSymlinkFile=new e("file-symlink-file",{fontCharacter:"\\eaee"}),e.fileZip=new e("file-zip",{fontCharacter:"\\eaef"}),e.files=new e("files",{fontCharacter:"\\eaf0"}),e.filter=new e("filter",{fontCharacter:"\\eaf1"}),e.flame=new e("flame",{fontCharacter:"\\eaf2"}),e.foldDown=new e("fold-down",{fontCharacter:"\\eaf3"}),e.foldUp=new e("fold-up",{fontCharacter:"\\eaf4"}),e.fold=new e("fold",{fontCharacter:"\\eaf5"}),e.folderActive=new e("folder-active",{fontCharacter:"\\eaf6"}),e.folderOpened=new e("folder-opened",{fontCharacter:"\\eaf7"}),e.gear=new e("gear",{fontCharacter:"\\eaf8"}),e.gift=new e("gift",{fontCharacter:"\\eaf9"}),e.gistSecret=new e("gist-secret",{fontCharacter:"\\eafa"}),e.gist=new e("gist",{fontCharacter:"\\eafb"}),e.gitCommit=new e("git-commit",{fontCharacter:"\\eafc"}),e.gitCompare=new e("git-compare",{fontCharacter:"\\eafd"}),e.gitMerge=new e("git-merge",{fontCharacter:"\\eafe"}),e.githubAction=new e("github-action",{fontCharacter:"\\eaff"}),e.githubAlt=new e("github-alt",{fontCharacter:"\\eb00"}),e.globe=new e("globe",{fontCharacter:"\\eb01"}),e.grabber=new e("grabber",{fontCharacter:"\\eb02"}),e.graph=new e("graph",{fontCharacter:"\\eb03"}),e.gripper=new e("gripper",{fontCharacter:"\\eb04"}),e.heart=new e("heart",{fontCharacter:"\\eb05"}),e.home=new e("home",{fontCharacter:"\\eb06"}),e.horizontalRule=new e("horizontal-rule",{fontCharacter:"\\eb07"}),e.hubot=new e("hubot",{fontCharacter:"\\eb08"}),e.inbox=new e("inbox",{fontCharacter:"\\eb09"}),e.issueClosed=new e("issue-closed",{fontCharacter:"\\eba4"}),e.issueReopened=new e("issue-reopened",{fontCharacter:"\\eb0b"}),e.issues=new e("issues",{fontCharacter:"\\eb0c"}),e.italic=new e("italic",{fontCharacter:"\\eb0d"}),e.jersey=new e("jersey",{fontCharacter:"\\eb0e"}),e.json=new e("json",{fontCharacter:"\\eb0f"}),e.kebabVertical=new e("kebab-vertical",{fontCharacter:"\\eb10"}),e.key=new e("key",{fontCharacter:"\\eb11"}),e.law=new e("law",{fontCharacter:"\\eb12"}),e.lightbulbAutofix=new e("lightbulb-autofix",{fontCharacter:"\\eb13"}),e.linkExternal=new e("link-external",{fontCharacter:"\\eb14"}),e.link=new e("link",{fontCharacter:"\\eb15"}),e.listOrdered=new e("list-ordered",{fontCharacter:"\\eb16"}),e.listUnordered=new e("list-unordered",{fontCharacter:"\\eb17"}),e.liveShare=new e("live-share",{fontCharacter:"\\eb18"}),e.loading=new e("loading",{fontCharacter:"\\eb19"}),e.location=new e("location",{fontCharacter:"\\eb1a"}),e.mailRead=new e("mail-read",{fontCharacter:"\\eb1b"}),e.mail=new e("mail",{fontCharacter:"\\eb1c"}),e.markdown=new e("markdown",{fontCharacter:"\\eb1d"}),e.megaphone=new e("megaphone",{fontCharacter:"\\eb1e"}),e.mention=new e("mention",{fontCharacter:"\\eb1f"}),e.milestone=new e("milestone",{fontCharacter:"\\eb20"}),e.mortarBoard=new e("mortar-board",{fontCharacter:"\\eb21"}),e.move=new e("move",{fontCharacter:"\\eb22"}),e.multipleWindows=new e("multiple-windows",{fontCharacter:"\\eb23"}),e.mute=new e("mute",{fontCharacter:"\\eb24"}),e.noNewline=new e("no-newline",{fontCharacter:"\\eb25"}),e.note=new e("note",{fontCharacter:"\\eb26"}),e.octoface=new e("octoface",{fontCharacter:"\\eb27"}),e.openPreview=new e("open-preview",{fontCharacter:"\\eb28"}),e.package_=new e("package",{fontCharacter:"\\eb29"}),e.paintcan=new e("paintcan",{fontCharacter:"\\eb2a"}),e.pin=new e("pin",{fontCharacter:"\\eb2b"}),e.play=new e("play",{fontCharacter:"\\eb2c"}),e.run=new e("run",{fontCharacter:"\\eb2c"}),e.plug=new e("plug",{fontCharacter:"\\eb2d"}),e.preserveCase=new e("preserve-case",{fontCharacter:"\\eb2e"}),e.preview=new e("preview",{fontCharacter:"\\eb2f"}),e.project=new e("project",{fontCharacter:"\\eb30"}),e.pulse=new e("pulse",{fontCharacter:"\\eb31"}),e.question=new e("question",{fontCharacter:"\\eb32"}),e.quote=new e("quote",{fontCharacter:"\\eb33"}),e.radioTower=new e("radio-tower",{fontCharacter:"\\eb34"}),e.reactions=new e("reactions",{fontCharacter:"\\eb35"}),e.references=new e("references",{fontCharacter:"\\eb36"}),e.refresh=new e("refresh",{fontCharacter:"\\eb37"}),e.regex=new e("regex",{fontCharacter:"\\eb38"}),e.remoteExplorer=new e("remote-explorer",{fontCharacter:"\\eb39"}),e.remote=new e("remote",{fontCharacter:"\\eb3a"}),e.remove=new e("remove",{fontCharacter:"\\eb3b"}),e.replaceAll=new e("replace-all",{fontCharacter:"\\eb3c"}),e.replace=new e("replace",{fontCharacter:"\\eb3d"}),e.repoClone=new e("repo-clone",{fontCharacter:"\\eb3e"}),e.repoForcePush=new e("repo-force-push",{fontCharacter:"\\eb3f"}),e.repoPull=new e("repo-pull",{fontCharacter:"\\eb40"}),e.repoPush=new e("repo-push",{fontCharacter:"\\eb41"}),e.report=new e("report",{fontCharacter:"\\eb42"}),e.requestChanges=new e("request-changes",{fontCharacter:"\\eb43"}),e.rocket=new e("rocket",{fontCharacter:"\\eb44"}),e.rootFolderOpened=new e("root-folder-opened",{fontCharacter:"\\eb45"}),e.rootFolder=new e("root-folder",{fontCharacter:"\\eb46"}),e.rss=new e("rss",{fontCharacter:"\\eb47"}),e.ruby=new e("ruby",{fontCharacter:"\\eb48"}),e.saveAll=new e("save-all",{fontCharacter:"\\eb49"}),e.saveAs=new e("save-as",{fontCharacter:"\\eb4a"}),e.save=new e("save",{fontCharacter:"\\eb4b"}),e.screenFull=new e("screen-full",{fontCharacter:"\\eb4c"}),e.screenNormal=new e("screen-normal",{fontCharacter:"\\eb4d"}),e.searchStop=new e("search-stop",{fontCharacter:"\\eb4e"}),e.server=new e("server",{fontCharacter:"\\eb50"}),e.settingsGear=new e("settings-gear",{fontCharacter:"\\eb51"}),e.settings=new e("settings",{fontCharacter:"\\eb52"}),e.shield=new e("shield",{fontCharacter:"\\eb53"}),e.smiley=new e("smiley",{fontCharacter:"\\eb54"}),e.sortPrecedence=new e("sort-precedence",{fontCharacter:"\\eb55"}),e.splitHorizontal=new e("split-horizontal",{fontCharacter:"\\eb56"}),e.splitVertical=new e("split-vertical",{fontCharacter:"\\eb57"}),e.squirrel=new e("squirrel",{fontCharacter:"\\eb58"}),e.starFull=new e("star-full",{fontCharacter:"\\eb59"}),e.starHalf=new e("star-half",{fontCharacter:"\\eb5a"}),e.symbolClass=new e("symbol-class",{fontCharacter:"\\eb5b"}),e.symbolColor=new e("symbol-color",{fontCharacter:"\\eb5c"}),e.symbolConstant=new e("symbol-constant",{fontCharacter:"\\eb5d"}),e.symbolEnumMember=new e("symbol-enum-member",{fontCharacter:"\\eb5e"}),e.symbolField=new e("symbol-field",{fontCharacter:"\\eb5f"}),e.symbolFile=new e("symbol-file",{fontCharacter:"\\eb60"}),e.symbolInterface=new e("symbol-interface",{fontCharacter:"\\eb61"}),e.symbolKeyword=new e("symbol-keyword",{fontCharacter:"\\eb62"}),e.symbolMisc=new e("symbol-misc",{fontCharacter:"\\eb63"}),e.symbolOperator=new e("symbol-operator",{fontCharacter:"\\eb64"}),e.symbolProperty=new e("symbol-property",{fontCharacter:"\\eb65"}),e.wrench=new e("wrench",{fontCharacter:"\\eb65"}),e.wrenchSubaction=new e("wrench-subaction",{fontCharacter:"\\eb65"}),e.symbolSnippet=new e("symbol-snippet",{fontCharacter:"\\eb66"}),e.tasklist=new e("tasklist",{fontCharacter:"\\eb67"}),e.telescope=new e("telescope",{fontCharacter:"\\eb68"}),e.textSize=new e("text-size",{fontCharacter:"\\eb69"}),e.threeBars=new e("three-bars",{fontCharacter:"\\eb6a"}),e.thumbsdown=new e("thumbsdown",{fontCharacter:"\\eb6b"}),e.thumbsup=new e("thumbsup",{fontCharacter:"\\eb6c"}),e.tools=new e("tools",{fontCharacter:"\\eb6d"}),e.triangleDown=new e("triangle-down",{fontCharacter:"\\eb6e"}),e.triangleLeft=new e("triangle-left",{fontCharacter:"\\eb6f"}),e.triangleRight=new e("triangle-right",{fontCharacter:"\\eb70"}),e.triangleUp=new e("triangle-up",{fontCharacter:"\\eb71"}),e.twitter=new e("twitter",{fontCharacter:"\\eb72"}),e.unfold=new e("unfold",{fontCharacter:"\\eb73"}),e.unlock=new e("unlock",{fontCharacter:"\\eb74"}),e.unmute=new e("unmute",{fontCharacter:"\\eb75"}),e.unverified=new e("unverified",{fontCharacter:"\\eb76"}),e.verified=new e("verified",{fontCharacter:"\\eb77"}),e.versions=new e("versions",{fontCharacter:"\\eb78"}),e.vmActive=new e("vm-active",{fontCharacter:"\\eb79"}),e.vmOutline=new e("vm-outline",{fontCharacter:"\\eb7a"}),e.vmRunning=new e("vm-running",{fontCharacter:"\\eb7b"}),e.watch=new e("watch",{fontCharacter:"\\eb7c"}),e.whitespace=new e("whitespace",{fontCharacter:"\\eb7d"}),e.wholeWord=new e("whole-word",{fontCharacter:"\\eb7e"}),e.window=new e("window",{fontCharacter:"\\eb7f"}),e.wordWrap=new e("word-wrap",{fontCharacter:"\\eb80"}),e.zoomIn=new e("zoom-in",{fontCharacter:"\\eb81"}),e.zoomOut=new e("zoom-out",{fontCharacter:"\\eb82"}),e.listFilter=new e("list-filter",{fontCharacter:"\\eb83"}),e.listFlat=new e("list-flat",{fontCharacter:"\\eb84"}),e.listSelection=new e("list-selection",{fontCharacter:"\\eb85"}),e.selection=new e("selection",{fontCharacter:"\\eb85"}),e.listTree=new e("list-tree",{fontCharacter:"\\eb86"}),e.debugBreakpointFunctionUnverified=new e("debug-breakpoint-function-unverified",{fontCharacter:"\\eb87"}),e.debugBreakpointFunction=new e("debug-breakpoint-function",{fontCharacter:"\\eb88"}),e.debugBreakpointFunctionDisabled=new e("debug-breakpoint-function-disabled",{fontCharacter:"\\eb88"}),e.debugStackframeActive=new e("debug-stackframe-active",{fontCharacter:"\\eb89"}),e.debugStackframeDot=new e("debug-stackframe-dot",{fontCharacter:"\\eb8a"}),e.debugStackframe=new e("debug-stackframe",{fontCharacter:"\\eb8b"}),e.debugStackframeFocused=new e("debug-stackframe-focused",{fontCharacter:"\\eb8b"}),e.debugBreakpointUnsupported=new e("debug-breakpoint-unsupported",{fontCharacter:"\\eb8c"}),e.symbolString=new e("symbol-string",{fontCharacter:"\\eb8d"}),e.debugReverseContinue=new e("debug-reverse-continue",{fontCharacter:"\\eb8e"}),e.debugStepBack=new e("debug-step-back",{fontCharacter:"\\eb8f"}),e.debugRestartFrame=new e("debug-restart-frame",{fontCharacter:"\\eb90"}),e.callIncoming=new e("call-incoming",{fontCharacter:"\\eb92"}),e.callOutgoing=new e("call-outgoing",{fontCharacter:"\\eb93"}),e.menu=new e("menu",{fontCharacter:"\\eb94"}),e.expandAll=new e("expand-all",{fontCharacter:"\\eb95"}),e.feedback=new e("feedback",{fontCharacter:"\\eb96"}),e.groupByRefType=new e("group-by-ref-type",{fontCharacter:"\\eb97"}),e.ungroupByRefType=new e("ungroup-by-ref-type",{fontCharacter:"\\eb98"}),e.account=new e("account",{fontCharacter:"\\eb99"}),e.bellDot=new e("bell-dot",{fontCharacter:"\\eb9a"}),e.debugConsole=new e("debug-console",{fontCharacter:"\\eb9b"}),e.library=new e("library",{fontCharacter:"\\eb9c"}),e.output=new e("output",{fontCharacter:"\\eb9d"}),e.runAll=new e("run-all",{fontCharacter:"\\eb9e"}),e.syncIgnored=new e("sync-ignored",{fontCharacter:"\\eb9f"}),e.pinned=new e("pinned",{fontCharacter:"\\eba0"}),e.githubInverted=new e("github-inverted",{fontCharacter:"\\eba1"}),e.debugAlt=new e("debug-alt",{fontCharacter:"\\eb91"}),e.serverProcess=new e("server-process",{fontCharacter:"\\eba2"}),e.serverEnvironment=new e("server-environment",{fontCharacter:"\\eba3"}),e.pass=new e("pass",{fontCharacter:"\\eba4"}),e.stopCircle=new e("stop-circle",{fontCharacter:"\\eba5"}),e.playCircle=new e("play-circle",{fontCharacter:"\\eba6"}),e.record=new e("record",{fontCharacter:"\\eba7"}),e.debugAltSmall=new e("debug-alt-small",{fontCharacter:"\\eba8"}),e.vmConnect=new e("vm-connect",{fontCharacter:"\\eba9"}),e.cloud=new e("cloud",{fontCharacter:"\\ebaa"}),e.merge=new e("merge",{fontCharacter:"\\ebab"}),e.exportIcon=new e("export",{fontCharacter:"\\ebac"}),e.graphLeft=new e("graph-left",{fontCharacter:"\\ebad"}),e.magnet=new e("magnet",{fontCharacter:"\\ebae"}),e.notebook=new e("notebook",{fontCharacter:"\\ebaf"}),e.redo=new e("redo",{fontCharacter:"\\ebb0"}),e.checkAll=new e("check-all",{fontCharacter:"\\ebb1"}),e.pinnedDirty=new e("pinned-dirty",{fontCharacter:"\\ebb2"}),e.passFilled=new e("pass-filled",{fontCharacter:"\\ebb3"}),e.circleLargeFilled=new e("circle-large-filled",{fontCharacter:"\\ebb4"}),e.circleLargeOutline=new e("circle-large-outline",{fontCharacter:"\\ebb5"}),e.combine=new e("combine",{fontCharacter:"\\ebb6"}),e.gather=new e("gather",{fontCharacter:"\\ebb6"}),e.table=new e("table",{fontCharacter:"\\ebb7"}),e.variableGroup=new e("variable-group",{fontCharacter:"\\ebb8"}),e.typeHierarchy=new e("type-hierarchy",{fontCharacter:"\\ebb9"}),e.typeHierarchySub=new e("type-hierarchy-sub",{fontCharacter:"\\ebba"}),e.typeHierarchySuper=new e("type-hierarchy-super",{fontCharacter:"\\ebbb"}),e.gitPullRequestCreate=new e("git-pull-request-create",{fontCharacter:"\\ebbc"}),e.runAbove=new e("run-above",{fontCharacter:"\\ebbd"}),e.runBelow=new e("run-below",{fontCharacter:"\\ebbe"}),e.notebookTemplate=new e("notebook-template",{fontCharacter:"\\ebbf"}),e.debugRerun=new e("debug-rerun",{fontCharacter:"\\ebc0"}),e.workspaceTrusted=new e("workspace-trusted",{fontCharacter:"\\ebc1"}),e.workspaceUntrusted=new e("workspace-untrusted",{fontCharacter:"\\ebc2"}),e.workspaceUnspecified=new e("workspace-unspecified",{fontCharacter:"\\ebc3"}),e.terminalCmd=new e("terminal-cmd",{fontCharacter:"\\ebc4"}),e.terminalDebian=new e("terminal-debian",{fontCharacter:"\\ebc5"}),e.terminalLinux=new e("terminal-linux",{fontCharacter:"\\ebc6"}),e.terminalPowershell=new e("terminal-powershell",{fontCharacter:"\\ebc7"}),e.terminalTmux=new e("terminal-tmux",{fontCharacter:"\\ebc8"}),e.terminalUbuntu=new e("terminal-ubuntu",{fontCharacter:"\\ebc9"}),e.terminalBash=new e("terminal-bash",{fontCharacter:"\\ebca"}),e.arrowSwap=new e("arrow-swap",{fontCharacter:"\\ebcb"}),e.copy=new e("copy",{fontCharacter:"\\ebcc"}),e.personAdd=new e("person-add",{fontCharacter:"\\ebcd"}),e.filterFilled=new e("filter-filled",{fontCharacter:"\\ebce"}),e.wand=new e("wand",{fontCharacter:"\\ebcf"}),e.debugLineByLine=new e("debug-line-by-line",{fontCharacter:"\\ebd0"}),e.inspect=new e("inspect",{fontCharacter:"\\ebd1"}),e.layers=new e("layers",{fontCharacter:"\\ebd2"}),e.layersDot=new e("layers-dot",{fontCharacter:"\\ebd3"}),e.layersActive=new e("layers-active",{fontCharacter:"\\ebd4"}),e.compass=new e("compass",{fontCharacter:"\\ebd5"}),e.compassDot=new e("compass-dot",{fontCharacter:"\\ebd6"}),e.compassActive=new e("compass-active",{fontCharacter:"\\ebd7"}),e.azure=new e("azure",{fontCharacter:"\\ebd8"}),e.issueDraft=new e("issue-draft",{fontCharacter:"\\ebd9"}),e.gitPullRequestClosed=new e("git-pull-request-closed",{fontCharacter:"\\ebda"}),e.gitPullRequestDraft=new e("git-pull-request-draft",{fontCharacter:"\\ebdb"}),e.debugAll=new e("debug-all",{fontCharacter:"\\ebdc"}),e.debugCoverage=new e("debug-coverage",{fontCharacter:"\\ebdd"}),e.dropDownButton=new e("drop-down-button",e.chevronDown.definition)}(l||(l={}))},6626:(e,t,n)=>{"use strict";n.d(t,{E:()=>o,r:()=>r});const i=Object.prototype.hasOwnProperty;function o(e,t){for(let n in e)if(i.call(e,n)&&!1===t({key:n,value:e[n]},(function(){delete e[n]})))return}class r{constructor(){this.map=new Map}add(e,t){let n=this.map.get(e);n||(n=new Set,this.map.set(e,n)),n.add(t)}delete(e,t){const n=this.map.get(e);n&&(n.delete(t),0===n.size&&this.map.delete(e))}forEach(e,t){const n=this.map.get(e);n&&n.forEach(t)}}},1264:(e,t,n)=>{"use strict";function i(e,t){const n=Math.pow(10,t);return Math.round(e*n)/n}n.d(t,{VS:()=>o,tx:()=>s,Il:()=>a});class o{constructor(e,t,n,o=1){this._rgbaBrand=void 0,this.r=0|Math.min(255,Math.max(0,e)),this.g=0|Math.min(255,Math.max(0,t)),this.b=0|Math.min(255,Math.max(0,n)),this.a=i(Math.max(Math.min(1,o),0),3)}static equals(e,t){return e.r===t.r&&e.g===t.g&&e.b===t.b&&e.a===t.a}}class r{constructor(e,t,n,o){this._hslaBrand=void 0,this.h=0|Math.max(Math.min(360,e),0),this.s=i(Math.max(Math.min(1,t),0),3),this.l=i(Math.max(Math.min(1,n),0),3),this.a=i(Math.max(Math.min(1,o),0),3)}static equals(e,t){return e.h===t.h&&e.s===t.s&&e.l===t.l&&e.a===t.a}static fromRGBA(e){const t=e.r/255,n=e.g/255,i=e.b/255,o=e.a,s=Math.max(t,n,i),a=Math.min(t,n,i);let l=0,d=0;const c=(a+s)/2,h=s-a;if(h>0){switch(d=Math.min(c<=.5?h/(2*c):h/(2-2*c),1),s){case t:l=(n-i)/h+(n1&&(n-=1),n<1/6?e+6*(t-e)*n:n<.5?t:n<2/3?e+(t-e)*(2/3-n)*6:e}static toRGBA(e){const t=e.h/360,{s:n,l:i,a:s}=e;let a,l,d;if(0===n)a=l=d=i;else{const e=i<.5?i*(1+n):i+n-i*n,o=2*i-e;a=r._hue2rgb(o,e,t+1/3),l=r._hue2rgb(o,e,t),d=r._hue2rgb(o,e,t-1/3)}return new o(Math.round(255*a),Math.round(255*l),Math.round(255*d),s)}}class s{constructor(e,t,n,o){this._hsvaBrand=void 0,this.h=0|Math.max(Math.min(360,e),0),this.s=i(Math.max(Math.min(1,t),0),3),this.v=i(Math.max(Math.min(1,n),0),3),this.a=i(Math.max(Math.min(1,o),0),3)}static equals(e,t){return e.h===t.h&&e.s===t.s&&e.v===t.v&&e.a===t.a}static fromRGBA(e){const t=e.r/255,n=e.g/255,i=e.b/255,o=Math.max(t,n,i),r=o-Math.min(t,n,i),a=0===o?0:r/o;let l;return l=0===r?0:o===t?((n-i)/r%6+6)%6:o===n?(i-t)/r+2:(t-n)/r+4,new s(Math.round(60*l),a,o,e.a)}static toRGBA(e){const{h:t,s:n,v:i,a:r}=e,s=i*n,a=s*(1-Math.abs(t/60%2-1)),l=i-s;let[d,c,h]=[0,0,0];return t<60?(d=s,c=a):t<120?(d=a,c=s):t<180?(c=s,h=a):t<240?(c=a,h=s):t<300?(d=a,h=s):t<=360&&(d=s,h=a),d=Math.round(255*(d+l)),c=Math.round(255*(c+l)),h=Math.round(255*(h+l)),new o(d,c,h,r)}}class a{constructor(e){if(!e)throw new Error("Color needs a value");if(e instanceof o)this.rgba=e;else if(e instanceof r)this._hsla=e,this.rgba=r.toRGBA(e);else{if(!(e instanceof s))throw new Error("Invalid color ctor argument");this._hsva=e,this.rgba=s.toRGBA(e)}}static fromHex(e){return a.Format.CSS.parseHex(e)||a.red}get hsla(){return this._hsla?this._hsla:r.fromRGBA(this.rgba)}get hsva(){return this._hsva?this._hsva:s.fromRGBA(this.rgba)}equals(e){return!!e&&o.equals(this.rgba,e.rgba)&&r.equals(this.hsla,e.hsla)&&s.equals(this.hsva,e.hsva)}getRelativeLuminance(){return i(.2126*a._relativeLuminanceForComponent(this.rgba.r)+.7152*a._relativeLuminanceForComponent(this.rgba.g)+.0722*a._relativeLuminanceForComponent(this.rgba.b),4)}static _relativeLuminanceForComponent(e){const t=e/255;return t<=.03928?t/12.92:Math.pow((t+.055)/1.055,2.4)}isLighter(){return(299*this.rgba.r+587*this.rgba.g+114*this.rgba.b)/1e3>=128}isLighterThan(e){return this.getRelativeLuminance()>e.getRelativeLuminance()}isDarkerThan(e){return this.getRelativeLuminance(){"use strict";function i(e,t,n){let i=null,o=null;if("function"==typeof n.value?(i="value",o=n.value,0!==o.length&&console.warn("Memoize should only be used in functions with zero parameters")):"function"==typeof n.get&&(i="get",o=n.get),!o)throw new Error("not supported");const r=`$memoize$${t}`;n[i]=function(...e){return this.hasOwnProperty(r)||Object.defineProperty(this,r,{configurable:!1,enumerable:!1,writable:!1,value:o.apply(this,e)}),this[r]}}n.d(t,{H:()=>i})},2484:(e,t,n)=>{"use strict";n.d(t,{Hs:()=>c,a$:()=>s});class i{constructor(e,t,n,i){this.originalStart=e,this.originalLength=t,this.modifiedStart=n,this.modifiedLength=i}getOriginalEnd(){return this.originalStart+this.originalLength}getModifiedEnd(){return this.modifiedStart+this.modifiedLength}}var o=n(9954);class r{constructor(e){this.source=e}getElements(){const e=this.source,t=new Int32Array(e.length);for(let n=0,i=e.length;n0||this.m_modifiedCount>0)&&this.m_changes.push(new i(this.m_originalStart,this.m_originalCount,this.m_modifiedStart,this.m_modifiedCount)),this.m_originalCount=0,this.m_modifiedCount=0,this.m_originalStart=1073741824,this.m_modifiedStart=1073741824}AddOriginalElement(e,t){this.m_originalStart=Math.min(this.m_originalStart,e),this.m_modifiedStart=Math.min(this.m_modifiedStart,t),this.m_originalCount++}AddModifiedElement(e,t){this.m_originalStart=Math.min(this.m_originalStart,e),this.m_modifiedStart=Math.min(this.m_modifiedStart,t),this.m_modifiedCount++}getChanges(){return(this.m_originalCount>0||this.m_modifiedCount>0)&&this.MarkNextChange(),this.m_changes}getReverseChanges(){return(this.m_originalCount>0||this.m_modifiedCount>0)&&this.MarkNextChange(),this.m_changes.reverse(),this.m_changes}}class c{constructor(e,t,n=null){this.ContinueProcessingPredicate=n,this._originalSequence=e,this._modifiedSequence=t;const[i,o,r]=c._getElements(e),[s,a,l]=c._getElements(t);this._hasStrings=r&&l,this._originalStringElements=i,this._originalElementsOrHash=o,this._modifiedStringElements=s,this._modifiedElementsOrHash=a,this.m_forwardHistory=[],this.m_reverseHistory=[]}static _isStringArray(e){return e.length>0&&"string"==typeof e[0]}static _getElements(e){const t=e.getElements();if(c._isStringArray(t)){const e=new Int32Array(t.length);for(let n=0,i=t.length;n=e&&o>=n&&this.ElementsAreEqual(t,o);)t--,o--;if(e>t||n>o){let r;return n<=o?(a.Assert(e===t+1,"originalStart should only be one more than originalEnd"),r=[new i(e,0,n,o-n+1)]):e<=t?(a.Assert(n===o+1,"modifiedStart should only be one more than modifiedEnd"),r=[new i(e,t-e+1,n,0)]):(a.Assert(e===t+1,"originalStart should only be one more than originalEnd"),a.Assert(n===o+1,"modifiedStart should only be one more than modifiedEnd"),r=[]),r}const s=[0],l=[0],d=this.ComputeRecursionPoint(e,t,n,o,s,l,r),c=s[0],h=l[0];if(null!==d)return d;if(!r[0]){const s=this.ComputeDiffRecursive(e,c,n,h,r);let a=[];return a=r[0]?[new i(c+1,t-(c+1)+1,h+1,o-(h+1)+1)]:this.ComputeDiffRecursive(c+1,t,h+1,o,r),this.ConcatenateChanges(s,a)}return[new i(e,t-e+1,n,o-n+1)]}WALKTRACE(e,t,n,o,r,s,a,l,c,h,u,g,p,m,f,_,b,C){let v=null,w=null,y=new d,A=t,S=n,x=p[0]-_[0]-o,k=-1073741824,L=this.m_forwardHistory.length-1;do{const t=x+e;t===A||t=0&&(e=(c=this.m_forwardHistory[L])[0],A=1,S=c.length-1)}while(--L>=-1);if(v=y.getReverseChanges(),C[0]){let e=p[0]+1,t=_[0]+1;if(null!==v&&v.length>0){const n=v[v.length-1];e=Math.max(e,n.getOriginalEnd()),t=Math.max(t,n.getModifiedEnd())}w=[new i(e,g-e+1,t,f-t+1)]}else{y=new d,A=s,S=a,x=p[0]-_[0]-l,k=1073741824,L=b?this.m_reverseHistory.length-1:this.m_reverseHistory.length-2;do{const e=x+r;e===A||e=h[e+1]?(m=(u=h[e+1]-1)-x-l,u>k&&y.MarkNextChange(),k=u+1,y.AddOriginalElement(u+1,m+1),x=e+1-r):(m=(u=h[e-1])-x-l,u>k&&y.MarkNextChange(),k=u,y.AddModifiedElement(u+1,m+1),x=e-1-r),L>=0&&(r=(h=this.m_reverseHistory[L])[0],A=1,S=h.length-1)}while(--L>=-1);w=y.getChanges()}return this.ConcatenateChanges(v,w)}ComputeRecursionPoint(e,t,n,o,r,s,a){let d=0,c=0,h=0,u=0,g=0,p=0;e--,n--,r[0]=0,s[0]=0,this.m_forwardHistory=[],this.m_reverseHistory=[];const m=t-e+(o-n),f=m+1,_=new Int32Array(f),b=new Int32Array(f),C=o-n,v=t-e,w=e-n,y=t-o,A=(v-C)%2==0;_[C]=e,b[v]=t,a[0]=!1;for(let S=1;S<=m/2+1;S++){let m=0,x=0;h=this.ClipDiagonalBound(C-S,S,C,f),u=this.ClipDiagonalBound(C+S,S,C,f);for(let e=h;e<=u;e+=2){d=e===h||em+x&&(m=d,x=c),!A&&Math.abs(e-v)<=S-1&&d>=b[e])return r[0]=d,s[0]=c,n<=b[e]&&S<=1448?this.WALKTRACE(C,h,u,w,v,g,p,y,_,b,d,t,r,c,o,s,A,a):null}const k=(m-e+(x-n)-S)/2;if(null!==this.ContinueProcessingPredicate&&!this.ContinueProcessingPredicate(m,k))return a[0]=!0,r[0]=m,s[0]=x,k>0&&S<=1448?this.WALKTRACE(C,h,u,w,v,g,p,y,_,b,d,t,r,c,o,s,A,a):(e++,n++,[new i(e,t-e+1,n,o-n+1)]);g=this.ClipDiagonalBound(v-S,S,v,f),p=this.ClipDiagonalBound(v+S,S,v,f);for(let i=g;i<=p;i+=2){d=i===g||i=b[i+1]?b[i+1]-1:b[i-1],c=d-(i-v)-y;const l=d;for(;d>e&&c>n&&this.ElementsAreEqual(d,c);)d--,c--;if(b[i]=d,A&&Math.abs(i-C)<=S&&d<=_[i])return r[0]=d,s[0]=c,l>=_[i]&&S<=1448?this.WALKTRACE(C,h,u,w,v,g,p,y,_,b,d,t,r,c,o,s,A,a):null}if(S<=1447){let e=new Int32Array(u-h+2);e[0]=C-h+1,l.Copy2(_,h,e,1,u-h+1),this.m_forwardHistory.push(e),e=new Int32Array(p-g+2),e[0]=v-g+1,l.Copy2(b,g,e,1,p-g+1),this.m_reverseHistory.push(e)}}return this.WALKTRACE(C,h,u,w,v,g,p,y,_,b,d,t,r,c,o,s,A,a)}PrettifyChanges(e){for(let t=0;t0,s=n.modifiedLength>0;for(;n.originalStart+n.originalLength=0;t--){const n=e[t];let i=0,o=0;if(t>0){const n=e[t-1];i=n.originalStart+n.originalLength,o=n.modifiedStart+n.modifiedLength}const r=n.originalLength>0,s=n.modifiedLength>0;let a=0,l=this._boundaryScore(n.originalStart,n.originalLength,n.modifiedStart,n.modifiedLength);for(let e=1;;e++){const t=n.originalStart-e,d=n.modifiedStart-e;if(tl&&(l=c,a=e)}n.originalStart-=a,n.modifiedStart-=a;const d=[null];t>0&&this.ChangesOverlap(e[t-1],e[t],d)&&(e[t-1]=d[0],e.splice(t,1),t++)}if(this._hasStrings)for(let t=1,n=e.length;t0&&n>a&&(a=n,l=t,d=e)}return a>0?[l,d]:null}_contiguousSequenceScore(e,t,n){let i=0;for(let o=0;o=this._originalElementsOrHash.length-1||this._hasStrings&&/^\s*$/.test(this._originalStringElements[e])}_OriginalRegionIsBoundary(e,t){if(this._OriginalIsBoundary(e)||this._OriginalIsBoundary(e-1))return!0;if(t>0){const n=e+t;if(this._OriginalIsBoundary(n-1)||this._OriginalIsBoundary(n))return!0}return!1}_ModifiedIsBoundary(e){return e<=0||e>=this._modifiedElementsOrHash.length-1||this._hasStrings&&/^\s*$/.test(this._modifiedStringElements[e])}_ModifiedRegionIsBoundary(e,t){if(this._ModifiedIsBoundary(e)||this._ModifiedIsBoundary(e-1))return!0;if(t>0){const n=e+t;if(this._ModifiedIsBoundary(n-1)||this._ModifiedIsBoundary(n))return!0}return!1}_boundaryScore(e,t,n,i){return(this._OriginalRegionIsBoundary(e,t)?1:0)+(this._ModifiedRegionIsBoundary(n,i)?1:0)}ConcatenateChanges(e,t){let n=[];if(0===e.length||0===t.length)return t.length>0?t:e;if(this.ChangesOverlap(e[e.length-1],t[0],n)){const i=new Array(e.length+t.length-1);return l.Copy(e,0,i,0,e.length-1),i[e.length-1]=n[0],l.Copy(t,1,i,e.length,t.length-1),i}{const n=new Array(e.length+t.length);return l.Copy(e,0,n,0,e.length),l.Copy(t,0,n,e.length,t.length),n}}ChangesOverlap(e,t,n){if(a.Assert(e.originalStart<=t.originalStart,"Left change is not less than or equal to right change"),a.Assert(e.modifiedStart<=t.modifiedStart,"Left change is not less than or equal to right change"),e.originalStart+e.originalLength>=t.originalStart||e.modifiedStart+e.modifiedLength>=t.modifiedStart){const o=e.originalStart;let r=e.originalLength;const s=e.modifiedStart;let a=e.modifiedLength;return e.originalStart+e.originalLength>=t.originalStart&&(r=t.originalStart+t.originalLength-e.originalStart),e.modifiedStart+e.modifiedLength>=t.modifiedStart&&(a=t.modifiedStart+t.modifiedLength-e.modifiedStart),n[0]=new i(o,r,s,a),!0}return n[0]=null,!1}ClipDiagonalBound(e,t,n,i){if(e>=0&&e{"use strict";n.d(t,{dL:()=>o,Cp:()=>r,ri:()=>s,VV:()=>l,F0:()=>d,b1:()=>c,L6:()=>h});const i=new class{constructor(){this.listeners=[],this.unexpectedErrorHandler=function(e){setTimeout((()=>{if(e.stack)throw new Error(e.message+"\n\n"+e.stack);throw e}),0)}}emit(e){this.listeners.forEach((t=>{t(e)}))}onUnexpectedError(e){this.unexpectedErrorHandler(e),this.emit(e)}onUnexpectedExternalError(e){this.unexpectedErrorHandler(e)}};function o(e){l(e)||i.onUnexpectedError(e)}function r(e){l(e)||i.onUnexpectedExternalError(e)}function s(e){if(e instanceof Error){let{name:t,message:n}=e;return{$isError:!0,name:t,message:n,stack:e.stacktrace||e.stack}}return e}const a="Canceled";function l(e){return e instanceof Error&&e.name===a&&e.message===a}function d(){const e=new Error(a);return e.name=e.message,e}function c(e){return e?new Error(`Illegal argument: ${e}`):new Error("Illegal argument")}function h(e){return e?new Error(`Illegal state: ${e}`):new Error("Illegal state")}},4669:(e,t,n)=>{"use strict";n.d(t,{ju:()=>i,Q5:()=>d,K3:()=>c,D0:()=>h,E7:()=>u,ZD:()=>g});var i,o=n(7301),r=n(5976),s=n(1741),a=n(4013);!function(e){function t(e){return(t,n=null,i)=>{let o,r=!1;return o=e((e=>{if(!r)return o?o.dispose():r=!0,t.call(n,e)}),null,i),r&&o.dispose(),o}}function n(e,t){return a(((n,i=null,o)=>e((e=>n.call(i,t(e))),null,o)))}function i(e,t){return a(((n,i=null,o)=>e((e=>{t(e),n.call(i,e)}),null,o)))}function o(e,t){return a(((n,i=null,o)=>e((e=>t(e)&&n.call(i,e)),null,o)))}function s(e,t,i){let o=i;return n(e,(e=>(o=t(o,e),o)))}function a(e){let t;const n=new d({onFirstListenerAdd(){t=e(n.fire,n)},onLastListenerRemove(){t.dispose()}});return n.event}function l(e,t,n=100,i=!1,o){let r,s,a,l=0;const c=new d({leakWarningThreshold:o,onFirstListenerAdd(){r=e((e=>{l++,s=t(s,e),i&&!a&&(c.fire(s),s=void 0),clearTimeout(a),a=setTimeout((()=>{const e=s;s=void 0,a=void 0,(!i||l>1)&&c.fire(e),l=0}),n)}))},onLastListenerRemove(){r.dispose()}});return c.event}function c(e,t=((e,t)=>e===t)){let n,i=!0;return o(e,(e=>{const o=i||!t(e,n);return i=!1,n=e,o}))}e.None=()=>r.JT.None,e.once=t,e.map=n,e.forEach=i,e.filter=o,e.signal=function(e){return e},e.any=function(...e){return(t,n=null,i)=>(0,r.F8)(...e.map((e=>e((e=>t.call(n,e)),null,i))))},e.reduce=s,e.debounce=l,e.latch=c,e.split=function(t,n){return[e.filter(t,n),e.filter(t,(e=>!n(e)))]},e.buffer=function(e,t=!1,n=[]){let i=n.slice(),o=e((e=>{i?i.push(e):s.fire(e)}));const r=()=>{i&&i.forEach((e=>s.fire(e))),i=null},s=new d({onFirstListenerAdd(){o||(o=e((e=>s.fire(e))))},onFirstListenerDidAdd(){i&&(t?setTimeout(r):r())},onLastListenerRemove(){o&&o.dispose(),o=null}});return s.event};class h{constructor(e){this.event=e}map(e){return new h(n(this.event,e))}forEach(e){return new h(i(this.event,e))}filter(e){return new h(o(this.event,e))}reduce(e,t){return new h(s(this.event,e,t))}latch(){return new h(c(this.event))}debounce(e,t=100,n=!1,i){return new h(l(this.event,e,t,n,i))}on(e,t,n){return this.event(e,t,n)}once(e,n,i){return t(this.event)(e,n,i)}}e.chain=function(e){return new h(e)},e.fromNodeEventEmitter=function(e,t,n=(e=>e)){const i=(...e)=>o.fire(n(...e)),o=new d({onFirstListenerAdd:()=>e.on(t,i),onLastListenerRemove:()=>e.removeListener(t,i)});return o.event},e.fromDOMEventEmitter=function(e,t,n=(e=>e)){const i=(...e)=>o.fire(n(...e)),o=new d({onFirstListenerAdd:()=>e.addEventListener(t,i),onLastListenerRemove:()=>e.removeEventListener(t,i)});return o.event},e.toPromise=function(e){return new Promise((n=>t(e)(n)))}}(i||(i={}));class l{constructor(e){this._listenerCount=0,this._invocationCount=0,this._elapsedOverall=0,this._name=`${e}_${l._idPool++}`}start(e){this._stopWatch=new a.G(!0),this._listenerCount=e}stop(){if(this._stopWatch){const e=this._stopWatch.elapsed();this._elapsedOverall+=e,this._invocationCount+=1,console.info(`did FIRE ${this._name}: elapsed_ms: ${e.toFixed(5)}, listener: ${this._listenerCount} (elapsed_overall: ${this._elapsedOverall.toFixed(2)}, invocations: ${this._invocationCount})`),this._stopWatch=void 0}}}l._idPool=0;class d{constructor(e){var t;this._disposed=!1,this._options=e,this._leakageMon=void 0,this._perfMon=(null===(t=this._options)||void 0===t?void 0:t._profName)?new l(this._options._profName):void 0}get event(){return this._event||(this._event=(e,t,n)=>{var i;this._listeners||(this._listeners=new s.S);const o=this._listeners.isEmpty();o&&this._options&&this._options.onFirstListenerAdd&&this._options.onFirstListenerAdd(this);const a=this._listeners.push(t?[e,t]:e);o&&this._options&&this._options.onFirstListenerDidAdd&&this._options.onFirstListenerDidAdd(this),this._options&&this._options.onListenerDidAdd&&this._options.onListenerDidAdd(this,e,t);const l=null===(i=this._leakageMon)||void 0===i?void 0:i.check(this._listeners.size),d=(0,r.OF)((()=>{l&&l(),!this._disposed&&(a(),this._options&&this._options.onLastListenerRemove)&&(this._listeners&&!this._listeners.isEmpty()||this._options.onLastListenerRemove(this))}));return n instanceof r.SL?n.add(d):Array.isArray(n)&&n.push(d),d}),this._event}fire(e){var t,n;if(this._listeners){this._deliveryQueue||(this._deliveryQueue=new s.S);for(let t of this._listeners)this._deliveryQueue.push([t,e]);for(null===(t=this._perfMon)||void 0===t||t.start(this._deliveryQueue.size);this._deliveryQueue.size>0;){const[e,t]=this._deliveryQueue.shift();try{"function"==typeof e?e.call(void 0,t):e[0].call(e[1],t)}catch(e){(0,o.dL)(e)}}null===(n=this._perfMon)||void 0===n||n.stop()}}dispose(){var e,t,n,i,o;this._disposed||(this._disposed=!0,null===(e=this._listeners)||void 0===e||e.clear(),null===(t=this._deliveryQueue)||void 0===t||t.clear(),null===(i=null===(n=this._options)||void 0===n?void 0:n.onLastListenerRemove)||void 0===i||i.call(n),null===(o=this._leakageMon)||void 0===o||o.dispose())}}class c extends d{constructor(e){super(e),this._isPaused=0,this._eventQueue=new s.S,this._mergeFn=null==e?void 0:e.merge}pause(){this._isPaused++}resume(){if(0!==this._isPaused&&0==--this._isPaused)if(this._mergeFn){const e=Array.from(this._eventQueue);this._eventQueue.clear(),super.fire(this._mergeFn(e))}else for(;!this._isPaused&&0!==this._eventQueue.size;)super.fire(this._eventQueue.shift())}fire(e){this._listeners&&(0!==this._isPaused?this._eventQueue.push(e):super.fire(e))}}class h extends c{constructor(e){var t;super(e),this._delay=null!==(t=e.delay)&&void 0!==t?t:100}fire(e){this._handle||(this.pause(),this._handle=setTimeout((()=>{this._handle=void 0,this.resume()}),this._delay)),super.fire(e)}}class u{constructor(){this.buffers=[]}wrapEvent(e){return(t,n,i)=>e((e=>{const i=this.buffers[this.buffers.length-1];i?i.push((()=>t.call(n,e))):t.call(n,e)}),void 0,i)}bufferEvents(e){const t=[];this.buffers.push(t);const n=e();return this.buffers.pop(),t.forEach((e=>e())),n}}class g{constructor(){this.listening=!1,this.inputEvent=i.None,this.inputEventListener=r.JT.None,this.emitter=new d({onFirstListenerDidAdd:()=>{this.listening=!0,this.inputEventListener=this.inputEvent(this.emitter.fire,this.emitter)},onLastListenerRemove:()=>{this.listening=!1,this.inputEventListener.dispose()}}),this.event=this.emitter.event}set input(e){this.inputEvent=e,this.listening&&(this.inputEventListener.dispose(),this.inputEventListener=e(this.emitter.fire,this.emitter))}dispose(){this.inputEventListener.dispose(),this.emitter.dispose()}}},5527:(e,t,n)=>{"use strict";n.d(t,{fn:()=>s,KM:()=>a,vY:()=>l,oP:()=>d});var i=n(1432),o=n(7295),r=n(8721);function s(e){return-1===e.indexOf("/")&&(e=function(e){return e.replace(/[\\/]/g,r.KR.sep)}(e)),/^[a-zA-Z]:(\/|$)/.test(e)&&(e="/"+e),e}function a(e,t,n,i=r.ir){if(e===t)return!0;if(!e||!t)return!1;if(t.length>e.length)return!1;if(n){if(!(0,o.ok)(e,t))return!1;if(t.length===e.length)return!0;let n=t.length;return t.charAt(t.length-1)===i&&n--,e.charAt(n)===i}return t.charAt(t.length-1)!==i&&(t+=i),0===e.indexOf(t)}function l(e){const t=(0,r.Fv)(e);return i.ED?!(e.length>3)&&d(t)&&(2===e.length||92===t.charCodeAt(2)):t===r.KR.sep}function d(e){return!!i.ED&&((t=e.charCodeAt(0))>=65&&t<=90||t>=97&&t<=122)&&58===e.charCodeAt(1);var t}},5392:(e,t,n)=>{"use strict";n.d(t,{or:()=>r,Ji:()=>s,ir:()=>a,KZ:()=>v,Oh:()=>k,jB:()=>L,mB:()=>E,CL:()=>z,EW:()=>V,l7:()=>j});var i=n(3702),o=n(7295);function r(...e){return function(t,n){for(let i=0,o=e.length;i0?[{start:0,end:t.length}]:[]:null}.bind(void 0,!0);function a(e,t){const n=t.toLowerCase().indexOf(e.toLowerCase());return-1===n?null:[{start:n,end:n+e.length}]}function l(e,t,n,i){if(n===e.length)return[];if(i===t.length)return null;if(e[n]===t[i]){let o=null;return(o=l(e,t,n+1,i+1))?f({start:i,end:i+1},o):null}return l(e,t,n,i+1)}function d(e){return 97<=e&&e<=122}function c(e){return 65<=e&&e<=90}function h(e){return 48<=e&&e<=57}function u(e){return 32===e||9===e||10===e||13===e}const g=new Set;function p(e){return u(e)||g.has(e)}function m(e){return d(e)||c(e)||h(e)}function f(e,t){return 0===t.length?t=[e]:e.end===t[0].start?t[0].start=e.start:t.unshift(e),t}function _(e,t){for(let n=t;n0&&!m(e.charCodeAt(n-1)))return n}return e.length}function b(e,t,n,i){if(n===e.length)return[];if(i===t.length)return null;if(e[n]!==t[i].toLowerCase())return null;{let o=null,r=i+1;for(o=b(e,t,n+1,i+1);!o&&(r=_(t,r))60)return null;const n=function(e){let t=0,n=0,i=0,o=0,r=0;for(let s=0;s.2&&t<.8&&i>.6&&o<.2}(n)){if(!function(e){const{upperPercent:t,lowerPercent:n}=e;return 0===n&&t>.6}(n))return null;t=t.toLowerCase()}let i=null,o=0;for(e=e.toLowerCase();o0&&p(e.charCodeAt(n-1)))return n;return e.length}"`~!@#$%^&*()-=+[{]}\\|;:'\",.<>/?".split("").forEach((e=>g.add(e.charCodeAt(0))));const A=r(s,C,a),S=r(s,C,(function(e,t){return l(e.toLowerCase(),t.toLowerCase(),0,0)})),x=new i.z6(1e4);function k(e,t,n=!1){if("string"!=typeof e||"string"!=typeof t)return null;let i=x.get(e);i||(i=new RegExp(o.un(e),"i"),x.set(e,i));const r=i.exec(t);return r?[{start:r.index,end:r.index+r[0].length}]:n?S(e,t):A(e,t)}function L(e,t,n,i,o,r){const s=Math.min(13,e.length);for(;n1;i--){const o=e[i]+n,r=t[t.length-1];r&&r.end===o?r.end=o+1:t.push({start:o,end:o+1})}return t}const N=128;function D(){const e=[],t=[];for(let e=0;e<=N;e++)t[e]=0;for(let n=0;n<=N;n++)e.push(t.slice(0));return e}function I(e){const t=[];for(let n=0;n<=e;n++)t[n]=0;return t}const M=I(256),T=I(256),R=D(),O=D(),B=D();function P(e,t){if(t<0||t>=e.length)return!1;const n=e.codePointAt(t);switch(n){case 95:case 45:case 46:case 32:case 47:case 92:case 39:case 34:case 58:case 36:case 60:case 40:case 91:return!0;case void 0:return!1;default:return!!o.C8(n)}}function F(e,t){if(t<0||t>=e.length)return!1;switch(e.charCodeAt(t)){case 32:case 9:return!0;default:return!1}}function W(e,t,n){return t[e]!==n[e]}var z;function V(e,t,n,i,o,r,s){const a=e.length>N?N:e.length,l=i.length>N?N:i.length;if(n>=a||r>=l||a-n>l-r)return;if(!function(e,t,n,i,o,r,s=!1){for(;t=n&&a>=i;)o[s]===r[a]&&(T[s]=a,s--),a--}(a,l,n,r,t,o);let d=1,c=1,h=n,u=r;const g=[!1];for(d=1,h=n;hs,b=_?O[d][c-1]+(R[d][c-1]>0?-5:0):0,C=u>s+1&&R[d][c-1]>0,v=C?O[d][c-2]+(R[d][c-2]>0?-5:0):0;if(C&&(!_||v>=b)&&(!m||v>=f))O[d][c]=v,B[d][c]=3,R[d][c]=0;else if(_&&(!m||b>=f))O[d][c]=b,B[d][c]=2,R[d][c]=0;else{if(!m)throw new Error("not possible");O[d][c]=f,B[d][c]=1,R[d][c]=R[d-1][c-1]+1}}}if(!g[0]&&!s)return;d--,c--;const p=[O[d][c],r];let m=0,f=0;for(;d>=1;){let e=c;do{const t=B[d][e];if(3===t)e-=2;else{if(2!==t)break;e-=1}}while(e>=1);m>1&&t[n+d-1]===o[r+c-1]&&!W(e+r-1,i,o)&&m+1>R[d][e]&&(e=c),e===c?m++:m=1,f||(f=e),d--,c=e-1,p.push(c)}l===a&&(p[0]+=2);const _=f-a;return p[0]-=_,p}function H(e,t,n,i,o,r,s,a,l,d,c){if(t[n]!==r[s])return Number.MIN_SAFE_INTEGER;let h=1,u=!1;return s===n-i?h=e[n]===o[s]?7:5:!W(s,o,r)||0!==s&&W(s-1,o,r)?!P(r,s)||0!==s&&P(r,s-1)?(P(r,s-1)||F(r,s-1))&&(h=5,u=!0):h=5:(h=e[n]===o[s]?7:5,u=!0),h>1&&n===i&&(c[0]=!0),u||(u=W(s,o,r)||P(r,s-1)||F(r,s-1)),n===i?s>l&&(h-=u?3:5):h+=d?u?2:0:u?0:1,s+1===a&&(h-=u?3:5),h}function j(e,t,n,i,o,r,s){return function(e,t,n,i,o,r,s,a){let l=V(e,t,n,i,o,r,a);if(e.length>=3){const t=Math.min(7,e.length-1);for(let s=n+1;sl[0])&&(l=e))}}}return l}(e,t,n,i,o,r,0,s)}function $(e,t){if(t+1>=e.length)return;const n=e[t],i=e[t+1];return n!==i?e.slice(0,t)+i+n+e.slice(t+2):void 0}!function(e){e.Default=[-100,0],e.isDefault=function(e){return!e||2===e.length&&-100===e[0]&&0===e[1]}}(z||(z={}))},8289:(e,t,n)=>{"use strict";function i(e){const t=this;let n,i=!1;return function(){return i||(i=!0,n=e.apply(t,arguments)),n}}n.d(t,{I:()=>i})},4118:(e,t,n)=>{"use strict";n.d(t,{EQ:()=>k});var i=n(7295),o=n(5527),r=n(8721),s=n(3702),a=n(5393);const l="**",d=/\//g;function c(e){switch(e){case 0:return"";case 1:return"[^/\\\\]*?";default:return"(?:[/\\\\]|[^/\\\\]+[/\\\\]|[/\\\\][^/\\\\]+)*?"}}function h(e,t){if(!e)return[];const n=[];let i=!1,o=!1,r="";for(const s of e){switch(s){case t:if(!i&&!o){n.push(r),r="";continue}break;case"{":i=!0;break;case"}":i=!1;break;case"[":o=!0;break;case"]":o=!1}r+=s}return r&&n.push(r),n}function u(e){if(!e)return"";let t="";const n=h(e,"/");if(n.every((e=>e===l)))t=".*";else{let e=!1;n.forEach(((o,r)=>{if(o===l)return void(e||(t+=c(2),e=!0));let s=!1,a="",d=!1,g="";for(const e of o)if("}"!==e&&s)a+=e;else if(!d||"]"===e&&g)switch(e){case"{":s=!0;continue;case"[":d=!0;continue;case"}":const n=`(?:${h(a,",").map((e=>u(e))).join("|")})`;t+=n,s=!1,a="";break;case"]":t+="["+g+"]",d=!1,g="";break;case"?":t+="[^/\\\\]";continue;case"*":t+=c(1);continue;default:t+=i.ec(e)}else{let t;t="-"===e?e:"^"!==e&&"!"!==e||g?"/"===e?"":i.ec(e):"^",g+=t}ry(e,t))).filter((e=>e!==w)),e),i=n.length;if(!i)return w;if(1===i)return n[0];const o=function(t,i){for(let o=0,r=n.length;o!!e.allBasenames));r&&(o.allBasenames=r.allBasenames);const s=n.reduce(((e,t)=>t.allPaths?e.concat(t.allPaths):e),[]);return s.length&&(o.allPaths=s),o}(n,t):(o=_.exec(S(n,t)))?x(o[1].substr(1),n,!0):(o=b.exec(S(n,t)))?x(o[1],n,!1):function(e){try{const t=new RegExp(`^${u(e)}$`);return function(n){return t.lastIndex=0,"string"==typeof n&&t.test(n)?e:null}}catch(e){return w}}(n);return C.set(i,r),A(r,e)}function A(e,t){return"string"==typeof t?e:function(n,i){return o.KM(n,t.base)?e(r.Gf(t.base,n),i):null}}function S(e,t){return t.trimForExclusions&&e.endsWith("/**")?e.substr(0,e.length-2):e}function x(e,t,n){const i=r.ir===r.KR.sep,o=i?e:e.replace(d,r.ir),s=r.ir+o,a=r.KR.sep+e,l=n?function(n,r){return"string"!=typeof n||n!==o&&!n.endsWith(s)&&(i||n!==e&&!n.endsWith(a))?null:t}:function(n,r){return"string"!=typeof n||n!==o&&(i||n!==e)?null:t};return l.allPaths=[(n?"*/":"./")+e],l}function k(e,t,n){return!(!e||"string"!=typeof t)&&function(e,t={}){if(!e)return v;if("string"==typeof e||function(e){const t=e;return t&&"string"==typeof t.base&&"string"==typeof t.pattern}(e)){const n=y(e,t);if(n===w)return v;const i=function(e,t){return!!n(e,t)};return n.allBasenames&&(i.allBasenames=n.allBasenames),n.allPaths&&(i.allPaths=n.allPaths),i}return function(e,t){const n=L(Object.getOwnPropertyNames(e).map((n=>function(e,t,n){if(!1===t)return w;const i=y(e,n);if(i===w)return w;if("boolean"==typeof t)return i;if(t){const n=t.when;if("string"==typeof n){const t=(t,o,r,s)=>{if(!s||!i(t,o))return null;const l=s(n.replace("$(basename)",r));return(0,a.J8)(l)?l.then((t=>t?e:null)):l?e:null};return t.requiresSiblings=!0,t}}return i}(n,e[n],t))).filter((e=>e!==w))),i=n.length;if(!i)return w;if(!n.some((e=>!!e.requiresSiblings))){if(1===i)return n[0];const e=function(e,t){for(let i=0,o=n.length;i!!e.allBasenames));t&&(e.allBasenames=t.allBasenames);const o=n.reduce(((e,t)=>t.allPaths?e.concat(t.allPaths):e),[]);return o.length&&(e.allPaths=o),e}const o=function(e,t,i){let o;for(let s=0,a=n.length;s!!e.allBasenames));s&&(o.allBasenames=s.allBasenames);const l=n.reduce(((e,t)=>t.allPaths?e.concat(t.allPaths):e),[]);return l.length&&(o.allPaths=l),o}(e,t)}(e)(t,void 0,n)}function L(e,t){const n=e.filter((e=>!!e.basenames));if(n.length<2)return e;const i=n.reduce(((e,t)=>{const n=t.basenames;return n?e.concat(n):e}),[]);let o;if(t){o=[];for(let e=0,n=i.length;e{const n=t.patterns;return n?e.concat(n):e}),[]);const r=function(e,t){if("string"!=typeof e)return null;if(!t){let n;for(n=e.length;n>0;n--){const t=e.charCodeAt(n-1);if(47===t||92===t)break}t=e.substr(n)}const n=i.indexOf(t);return-1!==n?o[n]:null};r.basenames=i,r.patterns=o,r.allBasenames=i;const s=e.filter((e=>!e.basenames));return s.push(r),s}},9954:(e,t,n)=>{"use strict";n.d(t,{vp:()=>o,Cv:()=>a,yP:()=>h});var i=n(7295);function o(e){return r(e,0)}function r(e,t){switch(typeof e){case"object":return null===e?s(349,t):Array.isArray(e)?(n=e,i=s(104579,i=t),n.reduce(((e,t)=>r(t,e)),i)):function(e,t){return t=s(181387,t),Object.keys(e).sort().reduce(((t,n)=>(t=a(n,t),r(e[n],t))),t)}(e,t);case"string":return a(e,t);case"boolean":return function(e,t){return s(e?433:863,t)}(e,t);case"number":return s(e,t);case"undefined":return s(937,t);default:return s(617,t)}var n,i}function s(e,t){return(t<<5)-t+e|0}function a(e,t){t=s(149417,t);for(let n=0,i=e.length;n>>i)>>>0}function d(e,t=0,n=e.byteLength,i=0){for(let o=0;oe.toString(16).padStart(2,"0"))).join(""):function(e,t,n="0"){for(;e.length>>0).toString(16),t/4)}class h{constructor(){this._h0=1732584193,this._h1=4023233417,this._h2=2562383102,this._h3=271733878,this._h4=3285377520,this._buff=new Uint8Array(67),this._buffDV=new DataView(this._buff.buffer),this._buffLen=0,this._totalLen=0,this._leftoverHighSurrogate=0,this._finished=!1}update(e){const t=e.length;if(0===t)return;const n=this._buff;let o,r,s=this._buffLen,a=this._leftoverHighSurrogate;for(0!==a?(o=a,r=-1,a=0):(o=e.charCodeAt(0),r=0);;){let l=o;if(i.ZG(o)){if(!(r+1>>6,e[t++]=128|(63&n)>>>0):n<65536?(e[t++]=224|(61440&n)>>>12,e[t++]=128|(4032&n)>>>6,e[t++]=128|(63&n)>>>0):(e[t++]=240|(1835008&n)>>>18,e[t++]=128|(258048&n)>>>12,e[t++]=128|(4032&n)>>>6,e[t++]=128|(63&n)>>>0),t>=64&&(this._step(),t-=64,this._totalLen+=64,e[0]=e[64],e[1]=e[65],e[2]=e[66]),t}digest(){return this._finished||(this._finished=!0,this._leftoverHighSurrogate&&(this._leftoverHighSurrogate=0,this._buffLen=this._push(this._buff,this._buffLen,65533)),this._totalLen+=this._buffLen,this._wrapUp()),c(this._h0)+c(this._h1)+c(this._h2)+c(this._h3)+c(this._h4)}_wrapUp(){this._buff[this._buffLen++]=128,d(this._buff,this._buffLen),this._buffLen>56&&(this._step(),d(this._buff));const e=8*this._totalLen;this._buffDV.setUint32(56,Math.floor(e/4294967296),!1),this._buffDV.setUint32(60,e%4294967296,!1),this._step()}_step(){const e=h._bigBlock32,t=this._buffDV;for(let n=0;n<64;n+=4)e.setUint32(n,t.getUint32(n,!1),!1);for(let t=64;t<320;t+=4)e.setUint32(t,l(e.getUint32(t-12,!1)^e.getUint32(t-32,!1)^e.getUint32(t-56,!1)^e.getUint32(t-64,!1),1),!1);let n,i,o,r=this._h0,s=this._h1,a=this._h2,d=this._h3,c=this._h4;for(let t=0;t<80;t++)t<20?(n=s&a|~s&d,i=1518500249):t<40?(n=s^a^d,i=1859775393):t<60?(n=s&a|s&d|a&d,i=2400959708):(n=s^a^d,i=3395469782),o=l(r,5)+n+c+i+e.getUint32(4*t,!1)&4294967295,c=d,d=a,a=l(s,30),s=r,r=o;this._h0=this._h0+r&4294967295,this._h1=this._h1+s&4294967295,this._h2=this._h2+a&4294967295,this._h3=this._h3+d&4294967295,this._h4=this._h4+c&4294967295}}h._bigBlock32=new DataView(new ArrayBuffer(320))},9365:(e,t,n)=>{"use strict";n.d(t,{W5:()=>r,CP:()=>s,oR:()=>a,v1:()=>l});var i=n(1212),o=n(7301);class r{constructor(e="",t=!1){var n,i;if(this.value=e,"string"!=typeof this.value)throw(0,o.b1)("value");"boolean"==typeof t?(this.isTrusted=t,this.supportThemeIcons=!1):(this.isTrusted=null!==(n=t.isTrusted)&&void 0!==n?n:void 0,this.supportThemeIcons=null!==(i=t.supportThemeIcons)&&void 0!==i&&i)}appendText(e,t=0){var n;return this.value+=(n=this.supportThemeIcons?(0,i.Qo)(e):e,n.replace(/[\\`*_{}[\]()#+\-.!]/g,"\\$&")).replace(/([ \t]+)/g,((e,t)=>" ".repeat(t.length))).replace(/^>/gm,"\\>").replace(/\n/g,1===t?"\\\n":"\n\n"),this}appendMarkdown(e){return this.value+=e,this}appendCodeblock(e,t){return this.value+="\n```",this.value+=e,this.value+="\n",this.value+=t,this.value+="\n```\n",this}}function s(e){return(t=e)instanceof r||t&&"object"==typeof t&&!("string"!=typeof t.value||"boolean"!=typeof t.isTrusted&&void 0!==t.isTrusted||"boolean"!=typeof t.supportThemeIcons&&void 0!==t.supportThemeIcons)?!e.value:!Array.isArray(e)||e.every(s);var t}function a(e){return e?e.replace(/\\([\\`*_{}[\]()#+\-.!])/g,"$1"):e}function l(e){const t=[],n=e.split("|").map((e=>e.trim()));e=n[0];const i=n[1];if(i){const e=/height=(\d+)/.exec(i),n=/width=(\d+)/.exec(i),o=e?e[1]:"",r=n?n[1]:"",s=isFinite(parseInt(r)),a=isFinite(parseInt(o));s&&t.push(`width="${r}"`),a&&t.push(`height="${o}"`)}return{href:e,dimensions:t}}},1212:(e,t,n)=>{"use strict";n.d(t,{Qo:()=>d,f$:()=>h,x$:()=>g,Ho:()=>p,Gt:()=>m});var i=n(3046),o=n(5392),r=n(7295);const s="$(",a=new RegExp(`\\$\\(${i.dT.iconNameExpression}(?:${i.dT.iconModifierExpression})?\\)`,"g"),l=new RegExp(`(\\\\)?${a.source}`,"g");function d(e){return e.replace(l,((e,t)=>t?e:`\\${e}`))}const c=new RegExp(`\\\\${a.source}`,"g");function h(e){return e.replace(c,(e=>`\\${e}`))}const u=new RegExp(`(\\s)?(\\\\)?${a.source}(\\s)?`,"g");function g(e){return-1===e.indexOf(s)?e:e.replace(u,((e,t,n,i)=>n?e:t||i||""))}function p(e){const t=e.indexOf(s);return-1===t?{text:e}:function(e,t){const n=[];let i="";function o(e){if(e){i+=e;for(const t of e)n.push(c)}}let r,a,l=-1,d="",c=0,h=t;const u=e.length;for(o(e.substr(0,t));h{"use strict";n.d(t,{R:()=>i,a:()=>o});class i{constructor(e){this._prefix=e,this._lastId=0}nextId(){return this._prefix+ ++this._lastId}}const o=new i("id#")},3725:(e,t,n)=>{"use strict";var i;n.d(t,{$:()=>i}),function(e){e.is=function(e){return e&&"object"==typeof e&&"function"==typeof e[Symbol.iterator]};const t=Object.freeze([]);e.empty=function(){return t},e.single=function*(e){yield e},e.from=function(e){return e||t},e.isEmpty=function(e){return!e||!0===e[Symbol.iterator]().next().done},e.first=function(e){return e[Symbol.iterator]().next().value},e.some=function(e,t){for(const n of e)if(t(n))return!0;return!1},e.find=function(e,t){for(const n of e)if(t(n))return n},e.filter=function*(e,t){for(const n of e)t(n)&&(yield n)},e.map=function*(e,t){let n=0;for(const i of e)yield t(i,n++)},e.concat=function*(...e){for(const t of e)for(const e of t)yield e},e.concatNested=function*(e){for(const t of e)for(const e of t)yield e},e.reduce=function(e,t,n){let i=n;for(const n of e)i=t(i,n);return i},e.slice=function*(e,t,n=e.length){for(t<0&&(t+=e.length),n<0?n+=e.length:n>e.length&&(n=e.length);to}]},e.equals=function(e,t,n=((e,t)=>e===t)){const i=e[Symbol.iterator](),o=t[Symbol.iterator]();for(;;){const e=i.next(),t=o.next();if(e.done!==t.done)return!1;if(e.done)return!0;if(!n(e.value,t.value))return!1}}}(i||(i={}))},2258:(e,t,n)=>{"use strict";n.d(t,{kL:()=>l,gx:()=>d,gm:()=>c,QC:()=>u,BQ:()=>p,f1:()=>m});var i=n(7301);class o{constructor(){this._keyCodeToStr=[],this._strToKeyCode=Object.create(null)}define(e,t){this._keyCodeToStr[e]=t,this._strToKeyCode[t.toLowerCase()]=e}keyCodeToStr(e){return this._keyCodeToStr[e]}strToKeyCode(e){return this._strToKeyCode[e.toLowerCase()]||0}}const r=new o,s=new o,a=new o;var l;function d(e,t){return(e|(65535&t)<<16>>>0)>>>0}function c(e,t){if(0===e)return null;const n=(65535&e)>>>0,i=(4294901760&e)>>>16;return new g(0!==i?[h(n,t),h(i,t)]:[h(n,t)])}function h(e,t){const n=!!(2048&e),i=!!(256&e);return new u(2===t?i:n,!!(1024&e),!!(512&e),2===t?n:i,255&e)}!function(){function e(e,t,n=t,i=n){r.define(e,t),s.define(e,n),a.define(e,i)}e(0,"unknown"),e(1,"Backspace"),e(2,"Tab"),e(3,"Enter"),e(4,"Shift"),e(5,"Ctrl"),e(6,"Alt"),e(7,"PauseBreak"),e(8,"CapsLock"),e(9,"Escape"),e(10,"Space"),e(11,"PageUp"),e(12,"PageDown"),e(13,"End"),e(14,"Home"),e(15,"LeftArrow","Left"),e(16,"UpArrow","Up"),e(17,"RightArrow","Right"),e(18,"DownArrow","Down"),e(19,"Insert"),e(20,"Delete"),e(21,"0"),e(22,"1"),e(23,"2"),e(24,"3"),e(25,"4"),e(26,"5"),e(27,"6"),e(28,"7"),e(29,"8"),e(30,"9"),e(31,"A"),e(32,"B"),e(33,"C"),e(34,"D"),e(35,"E"),e(36,"F"),e(37,"G"),e(38,"H"),e(39,"I"),e(40,"J"),e(41,"K"),e(42,"L"),e(43,"M"),e(44,"N"),e(45,"O"),e(46,"P"),e(47,"Q"),e(48,"R"),e(49,"S"),e(50,"T"),e(51,"U"),e(52,"V"),e(53,"W"),e(54,"X"),e(55,"Y"),e(56,"Z"),e(57,"Meta"),e(58,"ContextMenu"),e(59,"F1"),e(60,"F2"),e(61,"F3"),e(62,"F4"),e(63,"F5"),e(64,"F6"),e(65,"F7"),e(66,"F8"),e(67,"F9"),e(68,"F10"),e(69,"F11"),e(70,"F12"),e(71,"F13"),e(72,"F14"),e(73,"F15"),e(74,"F16"),e(75,"F17"),e(76,"F18"),e(77,"F19"),e(78,"NumLock"),e(79,"ScrollLock"),e(80,";",";","OEM_1"),e(81,"=","=","OEM_PLUS"),e(82,",",",","OEM_COMMA"),e(83,"-","-","OEM_MINUS"),e(84,".",".","OEM_PERIOD"),e(85,"/","/","OEM_2"),e(86,"`","`","OEM_3"),e(110,"ABNT_C1"),e(111,"ABNT_C2"),e(87,"[","[","OEM_4"),e(88,"\\","\\","OEM_5"),e(89,"]","]","OEM_6"),e(90,"'","'","OEM_7"),e(91,"OEM_8"),e(92,"OEM_102"),e(93,"NumPad0"),e(94,"NumPad1"),e(95,"NumPad2"),e(96,"NumPad3"),e(97,"NumPad4"),e(98,"NumPad5"),e(99,"NumPad6"),e(100,"NumPad7"),e(101,"NumPad8"),e(102,"NumPad9"),e(103,"NumPad_Multiply"),e(104,"NumPad_Add"),e(105,"NumPad_Separator"),e(106,"NumPad_Subtract"),e(107,"NumPad_Decimal"),e(108,"NumPad_Divide")}(),function(e){e.toString=function(e){return r.keyCodeToStr(e)},e.fromString=function(e){return r.strToKeyCode(e)},e.toUserSettingsUS=function(e){return s.keyCodeToStr(e)},e.toUserSettingsGeneral=function(e){return a.keyCodeToStr(e)},e.fromUserSettings=function(e){return s.strToKeyCode(e)||a.strToKeyCode(e)}}(l||(l={}));class u{constructor(e,t,n,i,o){this.ctrlKey=e,this.shiftKey=t,this.altKey=n,this.metaKey=i,this.keyCode=o}equals(e){return this.ctrlKey===e.ctrlKey&&this.shiftKey===e.shiftKey&&this.altKey===e.altKey&&this.metaKey===e.metaKey&&this.keyCode===e.keyCode}isModifierKey(){return 0===this.keyCode||5===this.keyCode||57===this.keyCode||6===this.keyCode||4===this.keyCode}toChord(){return new g([this])}isDuplicateModifierCase(){return this.ctrlKey&&5===this.keyCode||this.shiftKey&&4===this.keyCode||this.altKey&&6===this.keyCode||this.metaKey&&57===this.keyCode}}class g{constructor(e){if(0===e.length)throw(0,i.b1)("parts");this.parts=e}}class p{constructor(e,t,n,i,o,r){this.ctrlKey=e,this.shiftKey=t,this.altKey=n,this.metaKey=i,this.keyLabel=o,this.keyAriaLabel=r}}class m{}},8030:(e,t,n)=>{"use strict";n.d(t,{xo:()=>r,X4:()=>s});var i=n(3580);class o{constructor(e,t,n=t){this.modifierLabels=[null],this.modifierLabels[2]=e,this.modifierLabels[1]=t,this.modifierLabels[3]=n}toLabel(e,t,n){if(0===t.length)return null;const i=[];for(let o=0,r=t.length;o{"use strict";n.d(t,{p:()=>l,D:()=>d});var i=n(666),o=n(6663),r=n(1432),s=n(5935),a=n(5527);function l(e){if(!e)return;"string"==typeof e&&(e=i.o.file(e));const t=(0,s.EZ)(e)||(e.scheme===o.lg.file?e.fsPath:e.path);return r.ED&&(0,a.vY)(t)?d(t):t}function d(e){return(0,a.oP)(e)?e.charAt(0).toUpperCase()+e.slice(1):e}},5976:(e,t,n)=>{"use strict";n.d(t,{dk:()=>r,Wf:()=>a,B9:()=>l,F8:()=>d,OF:()=>c,SL:()=>h,JT:()=>u,XK:()=>g,Jz:()=>p});var i=n(8289),o=n(3725);function r(e){return e}class s extends Error{constructor(e){super(`Encountered errors while disposing of store. Errors: [${e.join(", ")}]`),this.errors=e}}function a(e){return"function"==typeof e.dispose&&0===e.dispose.length}function l(e){if(o.$.is(e)){let t=[];for(const n of e)if(n)try{n.dispose()}catch(e){t.push(e)}if(1===t.length)throw t[0];if(t.length>1)throw new s(t);return Array.isArray(e)?[]:e}if(e)return e.dispose(),e}function d(...e){const t=c((()=>l(e)));return t}function c(e){const t={dispose:(0,i.I)((()=>{e()}))};return t}class h{constructor(){this._toDispose=new Set,this._isDisposed=!1}dispose(){this._isDisposed||(this._isDisposed=!0,this.clear())}clear(){try{l(this._toDispose.values())}finally{this._toDispose.clear()}}add(e){if(!e)return e;if(e===this)throw new Error("Cannot register a disposable on itself!");return this._isDisposed?h.DISABLE_DISPOSED_WARNING||console.warn(new Error("Trying to add a disposable to a DisposableStore that has already been disposed of. The added object will be leaked!").stack):this._toDispose.add(e),e}}h.DISABLE_DISPOSED_WARNING=!1;class u{constructor(){this._store=new h,this._store}dispose(){this._store.dispose()}_register(e){if(e===this)throw new Error("Cannot register a disposable on itself!");return this._store.add(e)}}u.None=Object.freeze({dispose(){}});class g{constructor(){this._isDisposed=!1}get value(){return this._isDisposed?void 0:this._value}set value(e){var t;this._isDisposed||e===this._value||(null===(t=this._value)||void 0===t||t.dispose(),this._value=e)}clear(){this.value=void 0}dispose(){var e;this._isDisposed=!0,null===(e=this._value)||void 0===e||e.dispose(),this._value=void 0}clearAndLeak(){const e=this._value;return this._value=void 0,e}}class p{constructor(e){this.object=e}dispose(){}}},1741:(e,t,n)=>{"use strict";n.d(t,{S:()=>o});class i{constructor(e){this.element=e,this.next=i.Undefined,this.prev=i.Undefined}}i.Undefined=new i(void 0);class o{constructor(){this._first=i.Undefined,this._last=i.Undefined,this._size=0}get size(){return this._size}isEmpty(){return this._first===i.Undefined}clear(){let e=this._first;for(;e!==i.Undefined;){const t=e.next;e.prev=i.Undefined,e.next=i.Undefined,e=t}this._first=i.Undefined,this._last=i.Undefined,this._size=0}unshift(e){return this._insert(e,!1)}push(e){return this._insert(e,!0)}_insert(e,t){const n=new i(e);if(this._first===i.Undefined)this._first=n,this._last=n;else if(t){const e=this._last;this._last=n,n.prev=e,e.next=n}else{const e=this._first;this._first=n,n.next=e,e.prev=n}this._size+=1;let o=!1;return()=>{o||(o=!0,this._remove(n))}}shift(){if(this._first!==i.Undefined){const e=this._first.element;return this._remove(this._first),e}}pop(){if(this._last!==i.Undefined){const e=this._last.element;return this._remove(this._last),e}}_remove(e){if(e.prev!==i.Undefined&&e.next!==i.Undefined){const t=e.prev;t.next=e.next,e.next.prev=t}else e.prev===i.Undefined&&e.next===i.Undefined?(this._first=i.Undefined,this._last=i.Undefined):e.next===i.Undefined?(this._last=this._last.prev,this._last.next=i.Undefined):e.prev===i.Undefined&&(this._first=this._first.next,this._first.prev=i.Undefined);this._size-=1}*[Symbol.iterator](){let e=this._first;for(;e!==i.Undefined;)yield e.element,e=e.next}}},3702:(e,t,n)=>{"use strict";n.d(t,{Id:()=>u,Y9:()=>g,z6:()=>m});var i,o,r=n(666),s=n(7295);class a{constructor(){this._value="",this._pos=0}reset(e){return this._value=e,this._pos=0,this}next(){return this._pos+=1,this}hasNext(){return this._pos!1)){return new u(new c(e))}static forStrings(){return new u(new a)}static forConfigKeys(){return new u(new l)}clear(){this._root=void 0}set(e,t){const n=this._iter.reset(e);let i;for(this._root||(this._root=new h,this._root.segment=n.value()),i=this._root;;){const e=n.cmp(i.segment);if(e>0)i.left||(i.left=new h,i.left.segment=n.value()),i=i.left;else if(e<0)i.right||(i.right=new h,i.right.segment=n.value()),i=i.right;else{if(!n.hasNext())break;n.next(),i.mid||(i.mid=new h,i.mid.segment=n.value()),i=i.mid}}const o=i.value;return i.value=t,i.key=e,o}get(e){var t;return null===(t=this._getNode(e))||void 0===t?void 0:t.value}_getNode(e){const t=this._iter.reset(e);let n=this._root;for(;n;){const e=t.cmp(n.segment);if(e>0)n=n.left;else if(e<0)n=n.right;else{if(!t.hasNext())break;t.next(),n=n.mid}}return n}has(e){const t=this._getNode(e);return!(void 0===(null==t?void 0:t.value)&&void 0===(null==t?void 0:t.mid))}delete(e){return this._delete(e,!1)}deleteSuperstr(e){return this._delete(e,!0)}_delete(e,t){const n=this._iter.reset(e),i=[];let o=this._root;for(;o;){const e=n.cmp(o.segment);if(e>0)i.push([1,o]),o=o.left;else if(e<0)i.push([-1,o]),o=o.right;else{if(!n.hasNext()){for(t?(o.left=void 0,o.mid=void 0,o.right=void 0):o.value=void 0;i.length>0&&o.isEmpty();){let[e,t]=i.pop();switch(e){case 1:t.left=void 0;break;case 0:t.mid=void 0;break;case-1:t.right=void 0}o=t}break}n.next(),i.push([0,o]),o=o.mid}}}findSubstr(e){const t=this._iter.reset(e);let n,i=this._root;for(;i;){const e=t.cmp(i.segment);if(e>0)i=i.left;else if(e<0)i=i.right;else{if(!t.hasNext())break;t.next(),n=i.value||n,i=i.mid}}return i&&i.value||n}findSuperstr(e){const t=this._iter.reset(e);let n=this._root;for(;n;){const e=t.cmp(n.segment);if(e>0)n=n.left;else if(e<0)n=n.right;else{if(!t.hasNext())return n.mid?this._entries(n.mid):void 0;t.next(),n=n.mid}}}forEach(e){for(const[t,n]of this)e(n,t)}*[Symbol.iterator](){yield*this._entries(this._root)}*_entries(e){if(!e)return;const t=[e];for(;t.length>0;){const e=t.pop();e&&(e.value&&(yield[e.key,e.value]),e.left&&t.push(e.left),e.mid&&t.push(e.mid),e.right&&t.push(e.right))}}}class g{constructor(e,t){this[i]="ResourceMap",e instanceof g?(this.map=new Map(e.map),this.toKey=null!=t?t:g.defaultToKey):(this.map=new Map,this.toKey=null!=e?e:g.defaultToKey)}set(e,t){return this.map.set(this.toKey(e),t),this}get(e){return this.map.get(this.toKey(e))}has(e){return this.map.has(this.toKey(e))}get size(){return this.map.size}clear(){this.map.clear()}delete(e){return this.map.delete(this.toKey(e))}forEach(e,t){void 0!==t&&(e=e.bind(t));for(let[t,n]of this.map)e(n,r.o.parse(t),this)}values(){return this.map.values()}*keys(){for(let e of this.map.keys())yield r.o.parse(e)}*entries(){for(let e of this.map.entries())yield[r.o.parse(e[0]),e[1]]}*[(i=Symbol.toStringTag,Symbol.iterator)](){for(let e of this.map)yield[r.o.parse(e[0]),e[1]]}}g.defaultToKey=e=>e.toString();class p{constructor(){this[o]="LinkedMap",this._map=new Map,this._head=void 0,this._tail=void 0,this._size=0,this._state=0}clear(){this._map.clear(),this._head=void 0,this._tail=void 0,this._size=0,this._state++}isEmpty(){return!this._head&&!this._tail}get size(){return this._size}get first(){var e;return null===(e=this._head)||void 0===e?void 0:e.value}get last(){var e;return null===(e=this._tail)||void 0===e?void 0:e.value}has(e){return this._map.has(e)}get(e,t=0){const n=this._map.get(e);if(n)return 0!==t&&this.touch(n,t),n.value}set(e,t,n=0){let i=this._map.get(e);if(i)i.value=t,0!==n&&this.touch(i,n);else{switch(i={key:e,value:t,next:void 0,previous:void 0},n){case 0:this.addItemLast(i);break;case 1:this.addItemFirst(i);break;default:this.addItemLast(i)}this._map.set(e,i),this._size++}return this}delete(e){return!!this.remove(e)}remove(e){const t=this._map.get(e);if(t)return this._map.delete(e),this.removeItem(t),this._size--,t.value}shift(){if(!this._head&&!this._tail)return;if(!this._head||!this._tail)throw new Error("Invalid list");const e=this._head;return this._map.delete(e.key),this.removeItem(e),this._size--,e.value}forEach(e,t){const n=this._state;let i=this._head;for(;i;){if(t?e.bind(t)(i.value,i.key,this):e(i.value,i.key,this),this._state!==n)throw new Error("LinkedMap got modified during iteration.");i=i.next}}keys(){const e=this,t=this._state;let n=this._head;const i={[Symbol.iterator]:()=>i,next(){if(e._state!==t)throw new Error("LinkedMap got modified during iteration.");if(n){const e={value:n.key,done:!1};return n=n.next,e}return{value:void 0,done:!0}}};return i}values(){const e=this,t=this._state;let n=this._head;const i={[Symbol.iterator]:()=>i,next(){if(e._state!==t)throw new Error("LinkedMap got modified during iteration.");if(n){const e={value:n.value,done:!1};return n=n.next,e}return{value:void 0,done:!0}}};return i}entries(){const e=this,t=this._state;let n=this._head;const i={[Symbol.iterator]:()=>i,next(){if(e._state!==t)throw new Error("LinkedMap got modified during iteration.");if(n){const e={value:[n.key,n.value],done:!1};return n=n.next,e}return{value:void 0,done:!0}}};return i}[(o=Symbol.toStringTag,Symbol.iterator)](){return this.entries()}trimOld(e){if(e>=this.size)return;if(0===e)return void this.clear();let t=this._head,n=this.size;for(;t&&n>e;)this._map.delete(t.key),t=t.next,n--;this._head=t,this._size=n,t&&(t.previous=void 0),this._state++}addItemFirst(e){if(this._head||this._tail){if(!this._head)throw new Error("Invalid list");e.next=this._head,this._head.previous=e}else this._tail=e;this._head=e,this._state++}addItemLast(e){if(this._head||this._tail){if(!this._tail)throw new Error("Invalid list");e.previous=this._tail,this._tail.next=e}else this._head=e;this._tail=e,this._state++}removeItem(e){if(e===this._head&&e===this._tail)this._head=void 0,this._tail=void 0;else if(e===this._head){if(!e.next)throw new Error("Invalid list");e.next.previous=void 0,this._head=e.next}else if(e===this._tail){if(!e.previous)throw new Error("Invalid list");e.previous.next=void 0,this._tail=e.previous}else{const t=e.next,n=e.previous;if(!t||!n)throw new Error("Invalid list");t.previous=n,n.next=t}e.next=void 0,e.previous=void 0,this._state++}touch(e,t){if(!this._head||!this._tail)throw new Error("Invalid list");if(1===t||2===t)if(1===t){if(e===this._head)return;const t=e.next,n=e.previous;e===this._tail?(n.next=void 0,this._tail=n):(t.previous=n,n.next=t),e.previous=void 0,e.next=this._head,this._head.previous=e,this._head=e,this._state++}else if(2===t){if(e===this._tail)return;const t=e.next,n=e.previous;e===this._head?(t.previous=void 0,this._head=t):(t.previous=n,n.next=t),e.next=void 0,e.previous=this._tail,this._tail.next=e,this._tail=e,this._state++}}toJSON(){const e=[];return this.forEach(((t,n)=>{e.push([n,t])})),e}fromJSON(e){this.clear();for(const[t,n]of e)this.set(t,n)}}class m extends p{constructor(e,t=1){super(),this._limit=e,this._ratio=Math.min(Math.max(0,t),1)}get limit(){return this._limit}set limit(e){this._limit=e,this.checkTrim()}get(e,t=2){return super.get(e,t)}peek(e){return super.get(e,0)}set(e,t){return super.set(e,t,2),this.checkTrim(),this}checkTrim(){this.size>this._limit&&this.trimOld(Math.round(this._limit*this._ratio))}}},3720:function(e){e.exports=function(){"use strict";function e(e,t){for(var n=0;ne.length)&&(t=e.length);for(var n=0,i=new Array(t);n=e.length?{done:!0}:{done:!1,value:e[o++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}return(i=e[Symbol.iterator]()).next.bind(i)}var i=function(e){var t={exports:{}};return e(t,t.exports),t.exports}((function(e){function t(){return{baseUrl:null,breaks:!1,gfm:!0,headerIds:!0,headerPrefix:"",highlight:null,langPrefix:"language-",mangle:!0,pedantic:!1,renderer:null,sanitize:!1,sanitizer:null,silent:!1,smartLists:!1,smartypants:!1,tokenizer:null,walkTokens:null,xhtml:!1}}e.exports={defaults:{baseUrl:null,breaks:!1,gfm:!0,headerIds:!0,headerPrefix:"",highlight:null,langPrefix:"language-",mangle:!0,pedantic:!1,renderer:null,sanitize:!1,sanitizer:null,silent:!1,smartLists:!1,smartypants:!1,tokenizer:null,walkTokens:null,xhtml:!1},getDefaults:t,changeDefaults:function(t){e.exports.defaults=t}}})),o=/[&<>"']/,r=/[&<>"']/g,s=/[<>"']|&(?!#?\w+;)/,a=/[<>"']|&(?!#?\w+;)/g,l={"&":"&","<":"<",">":">",'"':""","'":"'"},d=function(e){return l[e]};var c=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/gi;function h(e){return e.replace(c,(function(e,t){return"colon"===(t=t.toLowerCase())?":":"#"===t.charAt(0)?"x"===t.charAt(1)?String.fromCharCode(parseInt(t.substring(2),16)):String.fromCharCode(+t.substring(1)):""}))}var u=/(^|[^\[])\^/g;var g=/[^\w:]/g,p=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;var m={},f=/^[^:]+:\/*[^/]*$/,_=/^([^:]+:)[\s\S]*$/,b=/^([^:]+:\/*[^/]*)[\s\S]*$/;function C(e,t){m[" "+e]||(f.test(e)?m[" "+e]=e+"/":m[" "+e]=v(e,"/",!0));var n=-1===(e=m[" "+e]).indexOf(":");return"//"===t.substring(0,2)?n?t:e.replace(_,"$1")+t:"/"===t.charAt(0)?n?t:e.replace(b,"$1")+t:e+t}function v(e,t,n){var i=e.length;if(0===i)return"";for(var o=0;o=0&&"\\"===n[o];)i=!i;return i?"|":" |"})).split(/ \|/),i=0;if(n.length>t)n.splice(t);else for(;n.length1;)1&t&&(n+=e),t>>=1,e+=e;return n+e},M=i.defaults,T=E,R=L,O=w,B=N;function P(e,t,n){var i=t.href,o=t.title?O(t.title):null,r=e[1].replace(/\\([\[\]])/g,"$1");return"!"!==e[0].charAt(0)?{type:"link",raw:n,href:i,title:o,text:r}:{type:"image",raw:n,href:i,title:o,text:O(r)}}var F=function(){function e(e){this.options=e||M}var t=e.prototype;return t.space=function(e){var t=this.rules.block.newline.exec(e);if(t)return t[0].length>1?{type:"space",raw:t[0]}:{raw:"\n"}},t.code=function(e){var t=this.rules.block.code.exec(e);if(t){var n=t[0].replace(/^ {1,4}/gm,"");return{type:"code",raw:t[0],codeBlockStyle:"indented",text:this.options.pedantic?n:T(n,"\n")}}},t.fences=function(e){var t=this.rules.block.fences.exec(e);if(t){var n=t[0],i=function(e,t){var n=e.match(/^(\s+)(?:```)/);if(null===n)return t;var i=n[1];return t.split("\n").map((function(e){var t=e.match(/^\s+/);return null===t?e:t[0].length>=i.length?e.slice(i.length):e})).join("\n")}(n,t[3]||"");return{type:"code",raw:n,lang:t[2]?t[2].trim():t[2],text:i}}},t.heading=function(e){var t=this.rules.block.heading.exec(e);if(t){var n=t[2].trim();if(/#$/.test(n)){var i=T(n,"#");this.options.pedantic?n=i.trim():i&&!/ $/.test(i)||(n=i.trim())}return{type:"heading",raw:t[0],depth:t[1].length,text:n}}},t.nptable=function(e){var t=this.rules.block.nptable.exec(e);if(t){var n={type:"table",header:R(t[1].replace(/^ *| *\| *$/g,"")),align:t[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:t[3]?t[3].replace(/\n$/,"").split("\n"):[],raw:t[0]};if(n.header.length===n.align.length){var i,o=n.align.length;for(i=0;i ?/gm,"");return{type:"blockquote",raw:t[0],text:n}}},t.list=function(e){var t=this.rules.block.list.exec(e);if(t){var n,i,o,r,s,a,l,d,c=t[0],h=t[2],u=h.length>1,g={type:"list",raw:c,ordered:u,start:u?+h.slice(0,-1):"",loose:!1,items:[]},p=t[0].match(this.rules.block.item),m=!1,f=p.length;o=this.rules.block.listItemStart.exec(p[0]);for(var _=0;_o[1].length:r[1].length>o[0].length||r[1].length>3){p.splice(_,2,p[_]+"\n"+p[_+1]),_--,f--;continue}(!this.options.pedantic||this.options.smartLists?r[2][r[2].length-1]!==h[h.length-1]:u===(1===r[2].length))&&(s=p.slice(_+1).join("\n"),g.raw=g.raw.substring(0,g.raw.length-s.length),_=f-1),o=r}i=n.length,~(n=n.replace(/^ *([*+-]|\d+[.)]) ?/,"")).indexOf("\n ")&&(i-=n.length,n=this.options.pedantic?n.replace(/^ {1,4}/gm,""):n.replace(new RegExp("^ {1,"+i+"}","gm"),"")),a=m||/\n\n(?!\s*$)/.test(n),_!==f-1&&(m="\n"===n.charAt(n.length-1),a||(a=m)),a&&(g.loose=!0),this.options.gfm&&(d=void 0,(l=/^\[[ xX]\] /.test(n))&&(d=" "!==n[1],n=n.replace(/^\[[ xX]\] +/,""))),g.items.push({type:"list_item",raw:c,task:l,checked:d,loose:a,text:n})}return g}},t.html=function(e){var t=this.rules.block.html.exec(e);if(t)return{type:this.options.sanitize?"paragraph":"html",raw:t[0],pre:!this.options.sanitizer&&("pre"===t[1]||"script"===t[1]||"style"===t[1]),text:this.options.sanitize?this.options.sanitizer?this.options.sanitizer(t[0]):O(t[0]):t[0]}},t.def=function(e){var t=this.rules.block.def.exec(e);if(t)return t[3]&&(t[3]=t[3].substring(1,t[3].length-1)),{tag:t[1].toLowerCase().replace(/\s+/g," "),raw:t[0],href:t[2],title:t[3]}},t.table=function(e){var t=this.rules.block.table.exec(e);if(t){var n={type:"table",header:R(t[1].replace(/^ *| *\| *$/g,"")),align:t[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:t[3]?t[3].replace(/\n$/,"").split("\n"):[]};if(n.header.length===n.align.length){n.raw=t[0];var i,o=n.align.length;for(i=0;i/i.test(i[0])&&(t=!1),!n&&/^<(pre|code|kbd|script)(\s|>)/i.test(i[0])?n=!0:n&&/^<\/(pre|code|kbd|script)(\s|>)/i.test(i[0])&&(n=!1),{type:this.options.sanitize?"text":"html",raw:i[0],inLink:t,inRawBlock:n,text:this.options.sanitize?this.options.sanitizer?this.options.sanitizer(i[0]):O(i[0]):i[0]}},t.link=function(e){var t=this.rules.inline.link.exec(e);if(t){var n=t[2].trim();if(!this.options.pedantic&&/^$/.test(n))return;var i=T(n.slice(0,-1),"\\");if((n.length-i.length)%2==0)return}else{var o=B(t[2],"()");if(o>-1){var r=(0===t[0].indexOf("!")?5:4)+t[1].length+o;t[2]=t[2].substring(0,o),t[0]=t[0].substring(0,r).trim(),t[3]=""}}var s=t[2],a="";if(this.options.pedantic){var l=/^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(s);l&&(s=l[1],a=l[3])}else a=t[3]?t[3].slice(1,-1):"";return s=s.trim(),/^$/.test(n)?s.slice(1):s.slice(1,-1)),P(t,{href:s?s.replace(this.rules.inline._escapes,"$1"):s,title:a?a.replace(this.rules.inline._escapes,"$1"):a},t[0])}},t.reflink=function(e,t){var n;if((n=this.rules.inline.reflink.exec(e))||(n=this.rules.inline.nolink.exec(e))){var i=(n[2]||n[1]).replace(/\s+/g," ");if(!(i=t[i.toLowerCase()])||!i.href){var o=n[0].charAt(0);return{type:"text",raw:o,text:o}}return P(n,i,n[0])}},t.emStrong=function(e,t,n){void 0===n&&(n="");var i=this.rules.inline.emStrong.lDelim.exec(e);if(i&&(!i[3]||!n.match(/(?:[0-9A-Za-z\xAA\xB2\xB3\xB5\xB9\xBA\xBC-\xBE\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0560-\u0588\u05D0-\u05EA\u05EF-\u05F2\u0620-\u064A\u0660-\u0669\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07C0-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u0860-\u086A\u08A0-\u08B4\u08B6-\u08C7\u0904-\u0939\u093D\u0950\u0958-\u0961\u0966-\u096F\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09E6-\u09F1\u09F4-\u09F9\u09F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\u0F00\u0F20-\u0F33\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F-\u1049\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u1090-\u1099\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1369-\u137C\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u17E0-\u17E9\u17F0-\u17F9\u1810-\u1819\u1820-\u1878\u1880-\u1884\u1887-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19DA\u1A00-\u1A16\u1A20-\u1A54\u1A80-\u1A89\u1A90-\u1A99\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B50-\u1B59\u1B83-\u1BA0\u1BAE-\u1BE5\u1C00-\u1C23\u1C40-\u1C49\u1C4D-\u1C7D\u1C80-\u1C88\u1C90-\u1CBA\u1CBD-\u1CBF\u1CE9-\u1CEC\u1CEE-\u1CF3\u1CF5\u1CF6\u1CFA\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2070\u2071\u2074-\u2079\u207F-\u2089\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2150-\u2189\u2460-\u249B\u24EA-\u24FF\u2776-\u2793\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2CFD\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312F\u3131-\u318E\u3192-\u3195\u31A0-\u31BF\u31F0-\u31FF\u3220-\u3229\u3248-\u324F\u3251-\u325F\u3280-\u3289\u32B1-\u32BF\u3400-\u4DBF\u4E00-\u9FFC\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7BF\uA7C2-\uA7CA\uA7F5-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA830-\uA835\uA840-\uA873\uA882-\uA8B3\uA8D0-\uA8D9\uA8F2-\uA8F7\uA8FB\uA8FD\uA8FE\uA900-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF-\uA9D9\uA9E0-\uA9E4\uA9E6-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA50-\uAA59\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAA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DAA-\uDDD0\uDDE1\uDDE3\uDE00\uDE0B-\uDE32\uDE3A\uDE50\uDE5C-\uDE89\uDE9D\uDEC0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC2E\uDC40\uDC50-\uDC6C\uDC72-\uDC8F\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD30\uDD46\uDD50-\uDD59\uDD60-\uDD65\uDD67\uDD68\uDD6A-\uDD89\uDD98\uDDA0-\uDDA9\uDEE0-\uDEF2\uDFB0\uDFC0-\uDFD4]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD81C-\uD820\uD822\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879\uD880-\uD883][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDE60-\uDE69\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF50-\uDF59\uDF5B-\uDF61\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDE40-\uDE96\uDF00-\uDF4A\uDF50\uDF93-\uDF9F\uDFE0\uDFE1\uDFE3]|\uD821[\uDC00-\uDFF7]|\uD823[\uDC00-\uDCD5\uDD00-\uDD08]|\uD82C[\uDC00-\uDD1E\uDD50-\uDD52\uDD64-\uDD67\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99]|\uD834[\uDEE0-\uDEF3\uDF60-\uDF78]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB\uDFCE-\uDFFF]|\uD838[\uDD00-\uDD2C\uDD37-\uDD3D\uDD40-\uDD49\uDD4E\uDEC0-\uDEEB\uDEF0-\uDEF9]|\uD83A[\uDC00-\uDCC4\uDCC7-\uDCCF\uDD00-\uDD43\uDD4B\uDD50-\uDD59]|\uD83B[\uDC71-\uDCAB\uDCAD-\uDCAF\uDCB1-\uDCB4\uDD01-\uDD2D\uDD2F-\uDD3D\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD83C[\uDD00-\uDD0C]|\uD83E[\uDFF0-\uDFF9]|\uD869[\uDC00-\uDEDD\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]|\uD884[\uDC00-\uDF4A])/))){var o=i[1]||i[2]||"";if(!o||o&&(""===n||this.rules.inline.punctuation.exec(n))){var r,s,a=i[0].length-1,l=a,d=0,c="*"===i[0][0]?this.rules.inline.emStrong.rDelimAst:this.rules.inline.emStrong.rDelimUnd;for(c.lastIndex=0,t=t.slice(-1*e.length+a);null!=(i=c.exec(t));)if(r=i[1]||i[2]||i[3]||i[4]||i[5]||i[6])if(s=r.length,i[3]||i[4])l+=s;else if(!((i[5]||i[6])&&a%3)||(a+s)%3){if(!((l-=s)>0)){if(l+d-s<=0&&!t.slice(c.lastIndex).match(c)&&(s=Math.min(s,s+l+d)),Math.min(a,s)%2)return{type:"em",raw:e.slice(0,a+i.index+s+1),text:e.slice(1,a+i.index+s)};if(Math.min(a,s)%2==0)return{type:"strong",raw:e.slice(0,a+i.index+s+1),text:e.slice(2,a+i.index+s-1)}}}else d+=s}}},t.codespan=function(e){var t=this.rules.inline.code.exec(e);if(t){var n=t[2].replace(/\n/g," "),i=/[^ ]/.test(n),o=/^ /.test(n)&&/ $/.test(n);return i&&o&&(n=n.substring(1,n.length-1)),n=O(n,!0),{type:"codespan",raw:t[0],text:n}}},t.br=function(e){var t=this.rules.inline.br.exec(e);if(t)return{type:"br",raw:t[0]}},t.del=function(e){var t=this.rules.inline.del.exec(e);if(t)return{type:"del",raw:t[0],text:t[2]}},t.autolink=function(e,t){var n,i,o=this.rules.inline.autolink.exec(e);if(o)return i="@"===o[2]?"mailto:"+(n=O(this.options.mangle?t(o[1]):o[1])):n=O(o[1]),{type:"link",raw:o[0],text:n,href:i,tokens:[{type:"text",raw:n,text:n}]}},t.url=function(e,t){var n;if(n=this.rules.inline.url.exec(e)){var i,o;if("@"===n[2])o="mailto:"+(i=O(this.options.mangle?t(n[0]):n[0]));else{var r;do{r=n[0],n[0]=this.rules.inline._backpedal.exec(n[0])[0]}while(r!==n[0]);i=O(n[0]),o="www."===n[1]?"http://"+i:i}return{type:"link",raw:n[0],text:i,href:o,tokens:[{type:"text",raw:i,text:i}]}}},t.inlineText=function(e,t,n){var i,o=this.rules.inline.text.exec(e);if(o)return i=t?this.options.sanitize?this.options.sanitizer?this.options.sanitizer(o[0]):O(o[0]):o[0]:O(this.options.smartypants?n(o[0]):o[0]),{type:"text",raw:o[0],text:i}},e}(),W=x,z=A,V=k,H={newline:/^(?: *(?:\n|$))+/,code:/^( {4}[^\n]+(?:\n(?: *(?:\n|$))*)?)+/,fences:/^ {0,3}(`{3,}(?=[^`\n]*\n)|~{3,})([^\n]*)\n(?:|([\s\S]*?)\n)(?: {0,3}\1[~`]* *(?:\n+|$)|$)/,hr:/^ {0,3}((?:- *){3,}|(?:_ *){3,}|(?:\* *){3,})(?:\n+|$)/,heading:/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,blockquote:/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/,list:/^( {0,3})(bull) [\s\S]+?(?:hr|def|\n{2,}(?! )(?! {0,3}bull )\n*|\s*$)/,html:"^ {0,3}(?:<(script|pre|style)[\\s>][\\s\\S]*?(?:[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|\\n*|$)|\\n*|$)|)[\\s\\S]*?(?:\\n{2,}|$)|<(?!script|pre|style)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:\\n{2,}|$)|(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:\\n{2,}|$))",def:/^ {0,3}\[(label)\]: *\n? *]+)>?(?:(?: +\n? *| *\n *)(title))? *(?:\n+|$)/,nptable:W,table:W,lheading:/^([^\n]+)\n {0,3}(=+|-+) *(?:\n+|$)/,_paragraph:/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html| +\n)[^\n]+)*)/,text:/^[^\n]+/,_label:/(?!\s*\])(?:\\[\[\]]|[^\[\]])+/,_title:/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/};H.def=z(H.def).replace("label",H._label).replace("title",H._title).getRegex(),H.bullet=/(?:[*+-]|\d{1,9}[.)])/,H.item=/^( *)(bull) ?[^\n]*(?:\n(?! *bull ?)[^\n]*)*/,H.item=z(H.item,"gm").replace(/bull/g,H.bullet).getRegex(),H.listItemStart=z(/^( *)(bull)/).replace("bull",H.bullet).getRegex(),H.list=z(H.list).replace(/bull/g,H.bullet).replace("hr","\\n+(?=\\1?(?:(?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$))").replace("def","\\n+(?="+H.def.source+")").getRegex(),H._tag="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|section|source|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",H._comment=/|$)/,H.html=z(H.html,"i").replace("comment",H._comment).replace("tag",H._tag).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),H.paragraph=z(H._paragraph).replace("hr",H.hr).replace("heading"," {0,3}#{1,6} ").replace("|lheading","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html",")|<(?:script|pre|style|!--)").replace("tag",H._tag).getRegex(),H.blockquote=z(H.blockquote).replace("paragraph",H.paragraph).getRegex(),H.normal=V({},H),H.gfm=V({},H.normal,{nptable:"^ *([^|\\n ].*\\|.*)\\n {0,3}([-:]+ *\\|[-| :]*)(?:\\n((?:(?!\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)",table:"^ *\\|(.+)\\n {0,3}\\|?( *[-:]+[-| :]*)(?:\\n *((?:(?!\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)"}),H.gfm.nptable=z(H.gfm.nptable).replace("hr",H.hr).replace("heading"," {0,3}#{1,6} ").replace("blockquote"," {0,3}>").replace("code"," {4}[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html",")|<(?:script|pre|style|!--)").replace("tag",H._tag).getRegex(),H.gfm.table=z(H.gfm.table).replace("hr",H.hr).replace("heading"," {0,3}#{1,6} ").replace("blockquote"," {0,3}>").replace("code"," {4}[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html",")|<(?:script|pre|style|!--)").replace("tag",H._tag).getRegex(),H.pedantic=V({},H.normal,{html:z("^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+? *(?:\\n{2,}|\\s*$)|\\s]*)*?/?> *(?:\\n{2,}|\\s*$))").replace("comment",H._comment).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:W,paragraph:z(H.normal._paragraph).replace("hr",H.hr).replace("heading"," *#{1,6} *[^\n]").replace("lheading",H.lheading).replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").getRegex()});var j={escape:/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,autolink:/^<(scheme:[^\s\x00-\x1f<>]*|email)>/,url:W,tag:"^comment|^|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^|^",link:/^!?\[(label)\]\(\s*(href)(?:\s+(title))?\s*\)/,reflink:/^!?\[(label)\]\[(?!\s*\])((?:\\[\[\]]?|[^\[\]\\])+)\]/,nolink:/^!?\[(?!\s*\])((?:\[[^\[\]]*\]|\\[\[\]]|[^\[\]])*)\](?:\[\])?/,reflinkSearch:"reflink|nolink(?!\\()",emStrong:{lDelim:/^(?:\*+(?:([punct_])|[^\s*]))|^_+(?:([punct*])|([^\s_]))/,rDelimAst:/\_\_[^_]*?\*[^_]*?\_\_|[punct_](\*+)(?=[\s]|$)|[^punct*_\s](\*+)(?=[punct_\s]|$)|[punct_\s](\*+)(?=[^punct*_\s])|[\s](\*+)(?=[punct_])|[punct_](\*+)(?=[punct_])|[^punct*_\s](\*+)(?=[^punct*_\s])/,rDelimUnd:/\*\*[^*]*?\_[^*]*?\*\*|[punct*](\_+)(?=[\s]|$)|[^punct*_\s](\_+)(?=[punct*\s]|$)|[punct*\s](\_+)(?=[^punct*_\s])|[\s](\_+)(?=[punct*])|[punct*](\_+)(?=[punct*])/},code:/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,br:/^( {2,}|\\)\n(?!\s*$)/,del:W,text:/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\?@\\[\\]`^{|}~"};j.punctuation=z(j.punctuation).replace(/punctuation/g,j._punctuation).getRegex(),j.blockSkip=/\[[^\]]*?\]\([^\)]*?\)|`[^`]*?`|<[^>]*?>/g,j.escapedEmSt=/\\\*|\\_/g,j._comment=z(H._comment).replace("(?:--\x3e|$)","--\x3e").getRegex(),j.emStrong.lDelim=z(j.emStrong.lDelim).replace(/punct/g,j._punctuation).getRegex(),j.emStrong.rDelimAst=z(j.emStrong.rDelimAst,"g").replace(/punct/g,j._punctuation).getRegex(),j.emStrong.rDelimUnd=z(j.emStrong.rDelimUnd,"g").replace(/punct/g,j._punctuation).getRegex(),j._escapes=/\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/g,j._scheme=/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/,j._email=/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/,j.autolink=z(j.autolink).replace("scheme",j._scheme).replace("email",j._email).getRegex(),j._attribute=/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/,j.tag=z(j.tag).replace("comment",j._comment).replace("attribute",j._attribute).getRegex(),j._label=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,j._href=/<(?:\\.|[^\n<>\\])+>|[^\s\x00-\x1f]*/,j._title=/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/,j.link=z(j.link).replace("label",j._label).replace("href",j._href).replace("title",j._title).getRegex(),j.reflink=z(j.reflink).replace("label",j._label).getRegex(),j.reflinkSearch=z(j.reflinkSearch,"g").replace("reflink",j.reflink).replace("nolink",j.nolink).getRegex(),j.normal=V({},j),j.pedantic=V({},j.normal,{strong:{start:/^__|\*\*/,middle:/^__(?=\S)([\s\S]*?\S)__(?!_)|^\*\*(?=\S)([\s\S]*?\S)\*\*(?!\*)/,endAst:/\*\*(?!\*)/g,endUnd:/__(?!_)/g},em:{start:/^_|\*/,middle:/^()\*(?=\S)([\s\S]*?\S)\*(?!\*)|^_(?=\S)([\s\S]*?\S)_(?!_)/,endAst:/\*(?!\*)/g,endUnd:/_(?!_)/g},link:z(/^!?\[(label)\]\((.*?)\)/).replace("label",j._label).getRegex(),reflink:z(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",j._label).getRegex()}),j.gfm=V({},j.normal,{escape:z(j.escape).replace("])","~|])").getRegex(),_extended_email:/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/,url:/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/,_backpedal:/(?:[^?!.,:;*_~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])([\s\S]*?[^\s~])\1(?=[^~]|$)/,text:/^([`~]+|[^`~])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\.5&&(n="x"+n.toString(16)),i+="&#"+n+";";return i}var Q=function(){function t(e){this.tokens=[],this.tokens.links=Object.create(null),this.options=e||U,this.options.tokenizer=this.options.tokenizer||new F,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options;var t={block:Z.normal,inline:K.normal};this.options.pedantic?(t.block=Z.pedantic,t.inline=K.pedantic):this.options.gfm&&(t.block=Z.gfm,this.options.breaks?t.inline=K.breaks:t.inline=K.gfm),this.tokenizer.rules=t}t.lex=function(e,n){return new t(n).lex(e)},t.lexInline=function(e,n){return new t(n).inlineTokens(e)};var n,i,o,r=t.prototype;return r.lex=function(e){return e=e.replace(/\r\n|\r/g,"\n").replace(/\t/g," "),this.blockTokens(e,this.tokens,!0),this.inline(this.tokens),this.tokens},r.blockTokens=function(e,t,n){var i,o,r,s;for(void 0===t&&(t=[]),void 0===n&&(n=!0),this.options.pedantic&&(e=e.replace(/^ +$/gm,""));e;)if(i=this.tokenizer.space(e))e=e.substring(i.raw.length),i.type&&t.push(i);else if(i=this.tokenizer.code(e))e=e.substring(i.raw.length),(s=t[t.length-1])&&"paragraph"===s.type?(s.raw+="\n"+i.raw,s.text+="\n"+i.text):t.push(i);else if(i=this.tokenizer.fences(e))e=e.substring(i.raw.length),t.push(i);else if(i=this.tokenizer.heading(e))e=e.substring(i.raw.length),t.push(i);else if(i=this.tokenizer.nptable(e))e=e.substring(i.raw.length),t.push(i);else if(i=this.tokenizer.hr(e))e=e.substring(i.raw.length),t.push(i);else if(i=this.tokenizer.blockquote(e))e=e.substring(i.raw.length),i.tokens=this.blockTokens(i.text,[],n),t.push(i);else if(i=this.tokenizer.list(e)){for(e=e.substring(i.raw.length),r=i.items.length,o=0;o0)for(;null!=(s=this.tokenizer.rules.inline.reflinkSearch.exec(d));)c.includes(s[0].slice(s[0].lastIndexOf("[")+1,-1))&&(d=d.slice(0,s.index)+"["+q("a",s[0].length-2)+"]"+d.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;null!=(s=this.tokenizer.rules.inline.blockSkip.exec(d));)d=d.slice(0,s.index)+"["+q("a",s[0].length-2)+"]"+d.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);for(;null!=(s=this.tokenizer.rules.inline.escapedEmSt.exec(d));)d=d.slice(0,s.index)+"++"+d.slice(this.tokenizer.rules.inline.escapedEmSt.lastIndex);for(;e;)if(a||(l=""),a=!1,o=this.tokenizer.escape(e))e=e.substring(o.raw.length),t.push(o);else if(o=this.tokenizer.tag(e,n,i)){e=e.substring(o.raw.length),n=o.inLink,i=o.inRawBlock;var h=t[t.length-1];h&&"text"===o.type&&"text"===h.type?(h.raw+=o.raw,h.text+=o.text):t.push(o)}else if(o=this.tokenizer.link(e))e=e.substring(o.raw.length),"link"===o.type&&(o.tokens=this.inlineTokens(o.text,[],!0,i)),t.push(o);else if(o=this.tokenizer.reflink(e,this.tokens.links)){e=e.substring(o.raw.length);var u=t[t.length-1];"link"===o.type?(o.tokens=this.inlineTokens(o.text,[],!0,i),t.push(o)):u&&"text"===o.type&&"text"===u.type?(u.raw+=o.raw,u.text+=o.text):t.push(o)}else if(o=this.tokenizer.emStrong(e,d,l))e=e.substring(o.raw.length),o.tokens=this.inlineTokens(o.text,[],n,i),t.push(o);else if(o=this.tokenizer.codespan(e))e=e.substring(o.raw.length),t.push(o);else if(o=this.tokenizer.br(e))e=e.substring(o.raw.length),t.push(o);else if(o=this.tokenizer.del(e))e=e.substring(o.raw.length),o.tokens=this.inlineTokens(o.text,[],n,i),t.push(o);else if(o=this.tokenizer.autolink(e,G))e=e.substring(o.raw.length),t.push(o);else if(n||!(o=this.tokenizer.url(e,G))){if(o=this.tokenizer.inlineText(e,i,Y))e=e.substring(o.raw.length),"_"!==o.raw.slice(-1)&&(l=o.raw.slice(-1)),a=!0,(r=t[t.length-1])&&"text"===r.type?(r.raw+=o.raw,r.text+=o.text):t.push(o);else if(e){var g="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(g);break}throw new Error(g)}}else e=e.substring(o.raw.length),t.push(o);return t},n=t,o=[{key:"rules",get:function(){return{block:Z,inline:K}}}],(i=null)&&e(n.prototype,i),o&&e(n,o),t}(),X=i.defaults,J=S,ee=w,te=function(){function e(e){this.options=e||X}var t=e.prototype;return t.code=function(e,t,n){var i=(t||"").match(/\S*/)[0];if(this.options.highlight){var o=this.options.highlight(e,i);null!=o&&o!==e&&(n=!0,e=o)}return e=e.replace(/\n$/,"")+"\n",i?'
'+(n?e:ee(e,!0))+"
\n":"
"+(n?e:ee(e,!0))+"
\n"},t.blockquote=function(e){return"
\n"+e+"
\n"},t.html=function(e){return e},t.heading=function(e,t,n,i){return this.options.headerIds?"'+e+"\n":""+e+"\n"},t.hr=function(){return this.options.xhtml?"
\n":"
\n"},t.list=function(e,t,n){var i=t?"ol":"ul";return"<"+i+(t&&1!==n?' start="'+n+'"':"")+">\n"+e+"\n"},t.listitem=function(e){return"
  • "+e+"
  • \n"},t.checkbox=function(e){return" "},t.paragraph=function(e){return"

    "+e+"

    \n"},t.table=function(e,t){return t&&(t=""+t+""),"\n\n"+e+"\n"+t+"
    \n"},t.tablerow=function(e){return"\n"+e+"\n"},t.tablecell=function(e,t){var n=t.header?"th":"td";return(t.align?"<"+n+' align="'+t.align+'">':"<"+n+">")+e+"\n"},t.strong=function(e){return""+e+""},t.em=function(e){return""+e+""},t.codespan=function(e){return""+e+""},t.br=function(){return this.options.xhtml?"
    ":"
    "},t.del=function(e){return""+e+""},t.link=function(e,t,n){if(null===(e=J(this.options.sanitize,this.options.baseUrl,e)))return n;var i='"+n+""},t.image=function(e,t,n){if(null===(e=J(this.options.sanitize,this.options.baseUrl,e)))return n;var i=''+n+'":">")},t.text=function(e){return e},e}(),ne=function(){function e(){}var t=e.prototype;return t.strong=function(e){return e},t.em=function(e){return e},t.codespan=function(e){return e},t.del=function(e){return e},t.html=function(e){return e},t.text=function(e){return e},t.link=function(e,t,n){return""+n},t.image=function(e,t,n){return""+n},t.br=function(){return""},e}(),ie=function(){function e(){this.seen={}}var t=e.prototype;return t.serialize=function(e){return e.toLowerCase().trim().replace(/<[!\/a-z].*?>/gi,"").replace(/[\u2000-\u206F\u2E00-\u2E7F\\'!"#$%&()*+,./:;<=>?@[\]^`{|}~]/g,"").replace(/\s/g,"-")},t.getNextSafeSlug=function(e,t){var n=e,i=0;if(this.seen.hasOwnProperty(n)){i=this.seen[e];do{n=e+"-"+ ++i}while(this.seen.hasOwnProperty(n))}return t||(this.seen[e]=i,this.seen[n]=0),n},t.slug=function(e,t){void 0===t&&(t={});var n=this.serialize(e);return this.getNextSafeSlug(n,t.dryrun)},e}(),oe=i.defaults,re=y,se=function(){function e(e){this.options=e||oe,this.options.renderer=this.options.renderer||new te,this.renderer=this.options.renderer,this.renderer.options=this.options,this.textRenderer=new ne,this.slugger=new ie}e.parse=function(t,n){return new e(n).parse(t)},e.parseInline=function(t,n){return new e(n).parseInline(t)};var t=e.prototype;return t.parse=function(e,t){void 0===t&&(t=!0);var n,i,o,r,s,a,l,d,c,h,u,g,p,m,f,_,b,C,v="",w=e.length;for(n=0;n0&&"text"===f.tokens[0].type?(f.tokens[0].text=C+" "+f.tokens[0].text,f.tokens[0].tokens&&f.tokens[0].tokens.length>0&&"text"===f.tokens[0].tokens[0].type&&(f.tokens[0].tokens[0].text=C+" "+f.tokens[0].tokens[0].text)):f.tokens.unshift({type:"text",text:C}):m+=C),m+=this.parse(f.tokens,p),c+=this.renderer.listitem(m,b,_);v+=this.renderer.list(c,u,g);continue;case"html":v+=this.renderer.html(h.text);continue;case"paragraph":v+=this.renderer.paragraph(this.parseInline(h.tokens));continue;case"text":for(c=h.tokens?this.parseInline(h.tokens):h.text;n+1An error occurred:

    "+de(e.message+"",!0)+"
    ";throw e}}return ge.options=ge.setOptions=function(e){return ae(ge.defaults,e),he(ge.defaults),ge},ge.getDefaults=ce,ge.defaults=ue,ge.use=function(e){var t=ae({},e);if(e.renderer&&function(){var n=ge.defaults.renderer||new te,i=function(t){var i=n[t];n[t]=function(){for(var o=arguments.length,r=new Array(o),s=0;sAn error occurred:

    "+de(e.message+"",!0)+"
    ";throw e}},ge.Parser=se,ge.parser=se.parse,ge.Renderer=te,ge.TextRenderer=ne,ge.Lexer=Q,ge.lexer=Q.lex,ge.Tokenizer=F,ge.Slugger=ie,ge.parse=ge,ge}()},3897:(e,t,n)=>{"use strict";n.d(t,{Q:()=>r});var i=n(3060),o=n(666);function r(e){let t=JSON.parse(e);return t=s(t),t}function s(e,t=0){if(!e||t>200)return e;if("object"==typeof e){switch(e.$mid){case 1:return o.o.revive(e);case 2:return new RegExp(e.source,e.flags)}if(e instanceof i.KN||e instanceof Uint8Array)return e;if(Array.isArray(e))for(let n=0;n{"use strict";n.d(t,{vW:()=>i,sA:()=>u,G8:()=>g});var i,o=n(8721),r=n(7295),s=n(4118),a=n(6663),l=n(5935);!function(e){e.text="text/plain",e.binary="application/octet-stream",e.unknown="application/unknown",e.markdown="text/markdown"}(i||(i={}));let d=[],c=[],h=[];function u(e,t=!1){const n=function(e){return{id:e.id,mime:e.mime,filename:e.filename,extension:e.extension,filepattern:e.filepattern,firstline:e.firstline,userConfigured:e.userConfigured,filenameLowercase:e.filename?e.filename.toLowerCase():void 0,extensionLowercase:e.extension?e.extension.toLowerCase():void 0,filepatternLowercase:e.filepattern?e.filepattern.toLowerCase():void 0,filepatternOnPath:!!e.filepattern&&e.filepattern.indexOf(o.KR.sep)>=0}}(e);d.push(n),n.userConfigured?h.push(n):c.push(n),t&&!n.userConfigured&&d.forEach((e=>{e.mime===n.mime||e.userConfigured||(n.extension&&e.extension===n.extension&&console.warn(`Overwriting extension <<${n.extension}>> to now point to mime <<${n.mime}>>`),n.filename&&e.filename===n.filename&&console.warn(`Overwriting filename <<${n.filename}>> to now point to mime <<${n.mime}>>`),n.filepattern&&e.filepattern===n.filepattern&&console.warn(`Overwriting filepattern <<${n.filepattern}>> to now point to mime <<${n.mime}>>`),n.firstline&&e.firstline===n.firstline&&console.warn(`Overwriting firstline <<${n.firstline}>> to now point to mime <<${n.mime}>>`))}))}function g(e,t){let n;if(e)switch(e.scheme){case a.lg.file:n=e.fsPath;break;case a.lg.data:n=l.Vb.parseMetaData(e).get(l.Vb.META_DATA_LABEL);break;default:n=e.path}if(!n)return[i.unknown];n=n.toLowerCase();const s=(0,o.EZ)(n),u=p(n,s,h);if(u)return[u,i.text];const g=p(n,s,c);if(g)return[g,i.text];if(t){const e=function(e){if((0,r.uS)(e)&&(e=e.substr(1)),e.length>0)for(let t=d.length-1;t>=0;t--){const n=d[t];if(!n.firstline)continue;const i=e.match(n.firstline);if(i&&i.length>0)return n.mime}return null}(t);if(e)return[e,i.text]}return[i.unknown]}function p(e,t,n){let i=null,o=null,r=null;for(let a=n.length-1;a>=0;a--){const l=n[a];if(t===l.filenameLowercase){i=l;break}if(l.filepattern&&(!o||l.filepattern.length>o.filepattern.length)){const n=l.filepatternOnPath?e:t;(0,s.EQ)(l.filepatternLowercase,n)&&(o=l)}l.extension&&(!r||l.extension.length>r.extension.length)&&t.endsWith(l.extensionLowercase)&&(r=l)}return i?i.mime:o?o.mime:r?r.mime:null}},6663:(e,t,n)=>{"use strict";n.d(t,{lg:()=>i,WX:()=>s,Gi:()=>a});var i,o=n(666),r=n(1432);!function(e){e.inMemory="inmemory",e.vscode="vscode",e.internal="private",e.walkThrough="walkThrough",e.walkThroughSnippet="walkThroughSnippet",e.http="http",e.https="https",e.file="file",e.mailto="mailto",e.untitled="untitled",e.data="data",e.command="command",e.vscodeRemote="vscode-remote",e.vscodeRemoteResource="vscode-remote-resource",e.userData="vscode-userdata",e.vscodeCustomEditor="vscode-custom-editor",e.vscodeNotebook="vscode-notebook",e.vscodeNotebookCell="vscode-notebook-cell",e.vscodeNotebookCellMetadata="vscode-notebook-cell-metadata",e.vscodeNotebookCellOutput="vscode-notebook-cell-output",e.vscodeInteractive="vscode-interactive",e.vscodeInteractiveInput="vscode-interactive-input",e.vscodeSettings="vscode-settings",e.vscodeWorkspaceTrust="vscode-workspace-trust",e.vscodeTerminal="vscode-terminal",e.webviewPanel="webview-panel",e.vscodeWebview="vscode-webview",e.extension="extension",e.vscodeFileResource="vscode-file",e.tmp="tmp"}(i||(i={}));const s=new class{constructor(){this._hosts=Object.create(null),this._ports=Object.create(null),this._connectionTokens=Object.create(null),this._preferredWebSchema="http",this._delegate=null}setPreferredWebSchema(e){this._preferredWebSchema=e}rewrite(e){if(this._delegate)return this._delegate(e);const t=e.authority;let n=this._hosts[t];n&&-1!==n.indexOf(":")&&(n=`[${n}]`);const s=this._ports[t],a=this._connectionTokens[t];let l=`path=${encodeURIComponent(e.path)}`;return"string"==typeof a&&(l+=`&tkn=${encodeURIComponent(a)}`),o.o.from({scheme:r.$L?this._preferredWebSchema:i.vscodeRemoteResource,authority:`${n}:${s}`,path:"/vscode-remote-resource",query:l})}},a=new class{constructor(){this.FALLBACK_AUTHORITY="vscode-app"}asBrowserUri(e,t,n){const o=this.toUri(e,t);if(o.scheme===i.vscodeRemote)return s.rewrite(o);let a=!1;return r.tY&&(n||r.MM)&&o.scheme===i.file&&(a=!0),o.scheme===i.file&&"function"==typeof r.li.importScripts&&"vscode-file://vscode-app"===r.li.origin&&(a=!0),a?o.with({scheme:i.vscodeFileResource,authority:o.authority||this.FALLBACK_AUTHORITY,query:null,fragment:null}):o}toUri(e,t){return o.o.isUri(e)?e:o.o.parse(t.toUrl(e))}}},9870:(e,t,n)=>{"use strict";function i(e,t,n){return Math.min(Math.max(e,t),n)}n.d(t,{u:()=>i,n:()=>o});class o{constructor(){this._n=1,this._val=0}update(e){return this._val=this._val+(e-this._val)/this._n,this._n+=1,this}get value(){return this._val}}},6248:(e,t,n)=>{"use strict";n.d(t,{I8:()=>o,_A:()=>r,rs:()=>a,jB:()=>d,fS:()=>c,CJ:()=>h});var i=n(8401);function o(e){if(!e||"object"!=typeof e)return e;if(e instanceof RegExp)return e;const t=Array.isArray(e)?[]:{};return Object.keys(e).forEach((n=>{e[n]&&"object"==typeof e[n]?t[n]=o(e[n]):t[n]=e[n]})),t}function r(e){if(!e||"object"!=typeof e)return e;const t=[e];for(;t.length>0;){const e=t.shift();Object.freeze(e);for(const n in e)if(s.call(e,n)){const i=e[n];"object"!=typeof i||Object.isFrozen(i)||t.push(i)}}return e}const s=Object.prototype.hasOwnProperty;function a(e,t){return l(e,t,new Set)}function l(e,t,n){if((0,i.Jp)(e))return e;const o=t(e);if(void 0!==o)return o;if((0,i.kJ)(e)){const i=[];for(const o of e)i.push(l(o,t,n));return i}if((0,i.Kn)(e)){if(n.has(e))throw new Error("Cannot clone recursive data-structure");n.add(e);const i={};for(let o in e)s.call(e,o)&&(i[o]=l(e[o],t,n));return n.delete(e),i}return e}function d(e,t,n=!0){return(0,i.Kn)(e)?((0,i.Kn)(t)&&Object.keys(t).forEach((o=>{o in e?n&&((0,i.Kn)(e[o])&&(0,i.Kn)(t[o])?d(e[o],t[o],n):e[o]=t[o]):e[o]=t[o]})),e):t}function c(e,t){if(e===t)return!0;if(null==e||null==t)return!1;if(typeof e!=typeof t)return!1;if("object"!=typeof e)return!1;if(Array.isArray(e)!==Array.isArray(t))return!1;let n,i;if(Array.isArray(e)){if(e.length!==t.length)return!1;for(n=0;n{"use strict";n.d(t,{EZ:()=>x,XX:()=>S,DZ:()=>k,Fv:()=>w,KR:()=>v,Gf:()=>A,DB:()=>y,ir:()=>L,Ku:()=>C});var i=n(1432);let o;if(void 0!==i.li.vscode&&void 0!==i.li.vscode.process){const e=i.li.vscode.process;o={get platform(){return e.platform},get env(){return e.env},cwd:()=>e.cwd(),nextTick:e=>(0,i.xS)(e)}}else o="undefined"!=typeof process?{get platform(){return process.platform},get env(){return process.env},cwd:()=>process.env.VSCODE_CWD||process.cwd(),nextTick:e=>process.nextTick(e)}:{get platform(){return i.ED?"win32":i.dz?"darwin":"linux"},nextTick:e=>(0,i.xS)(e),get env(){return{}},cwd:()=>"/"};const r=o.cwd,s=o.env,a=o.platform,l=46,d=47,c=92,h=58;class u extends Error{constructor(e,t,n){let i;"string"==typeof t&&0===t.indexOf("not ")?(i="must not be",t=t.replace(/^not /,"")):i="must be";const o=-1!==e.indexOf(".")?"property":"argument";let r=`The "${e}" ${o} ${i} of type ${t}`;r+=". Received type "+typeof n,super(r),this.code="ERR_INVALID_ARG_TYPE"}}function g(e,t){if("string"!=typeof e)throw new u(t,"string",e)}function p(e){return e===d||e===c}function m(e){return e===d}function f(e){return e>=65&&e<=90||e>=97&&e<=122}function _(e,t,n,i){let o="",r=0,s=-1,a=0,c=0;for(let h=0;h<=e.length;++h){if(h2){const e=o.lastIndexOf(n);-1===e?(o="",r=0):(o=o.slice(0,e),r=o.length-1-o.lastIndexOf(n)),s=h,a=0;continue}if(0!==o.length){o="",r=0,s=h,a=0;continue}}t&&(o+=o.length>0?`${n}..`:"..",r=2)}else o.length>0?o+=`${n}${e.slice(s+1,h)}`:o=e.slice(s+1,h),r=h-s-1;s=h,a=0}else c===l&&-1!==a?++a:a=-1}return o}function b(e,t){if(null===t||"object"!=typeof t)throw new u("pathObject","Object",t);const n=t.dir||t.root,i=t.base||`${t.name||""}${t.ext||""}`;return n?n===t.root?`${n}${i}`:`${n}${e}${i}`:i}const C={resolve(...e){let t="",n="",i=!1;for(let o=e.length-1;o>=-1;o--){let a;if(o>=0){if(a=e[o],g(a,"path"),0===a.length)continue}else 0===t.length?a=r():(a=s[`=${t}`]||r(),(void 0===a||a.slice(0,2).toLowerCase()!==t.toLowerCase()&&a.charCodeAt(2)===c)&&(a=`${t}\\`));const l=a.length;let d=0,u="",m=!1;const _=a.charCodeAt(0);if(1===l)p(_)&&(d=1,m=!0);else if(p(_))if(m=!0,p(a.charCodeAt(1))){let e=2,t=e;for(;e2&&p(a.charCodeAt(2))&&(m=!0,d=3));if(u.length>0)if(t.length>0){if(u.toLowerCase()!==t.toLowerCase())continue}else t=u;if(i){if(t.length>0)break}else if(n=`${a.slice(d)}\\${n}`,i=m,m&&t.length>0)break}return n=_(n,!i,"\\",p),i?`${t}\\${n}`:`${t}${n}`||"."},normalize(e){g(e,"path");const t=e.length;if(0===t)return".";let n,i=0,o=!1;const r=e.charCodeAt(0);if(1===t)return m(r)?"\\":e;if(p(r))if(o=!0,p(e.charCodeAt(1))){let o=2,r=o;for(;o2&&p(e.charCodeAt(2))&&(o=!0,i=3));let s=i0&&p(e.charCodeAt(t-1))&&(s+="\\"),void 0===n?o?`\\${s}`:s:o?`${n}\\${s}`:`${n}${s}`},isAbsolute(e){g(e,"path");const t=e.length;if(0===t)return!1;const n=e.charCodeAt(0);return p(n)||t>2&&f(n)&&e.charCodeAt(1)===h&&p(e.charCodeAt(2))},join(...e){if(0===e.length)return".";let t,n;for(let i=0;i0&&(void 0===t?t=n=o:t+=`\\${o}`)}if(void 0===t)return".";let i=!0,o=0;if("string"==typeof n&&p(n.charCodeAt(0))){++o;const e=n.length;e>1&&p(n.charCodeAt(1))&&(++o,e>2&&(p(n.charCodeAt(2))?++o:i=!1))}if(i){for(;o=2&&(t=`\\${t.slice(o)}`)}return C.normalize(t)},relative(e,t){if(g(e,"from"),g(t,"to"),e===t)return"";const n=C.resolve(e),i=C.resolve(t);if(n===i)return"";if((e=n.toLowerCase())===(t=i.toLowerCase()))return"";let o=0;for(;oo&&e.charCodeAt(r-1)===c;)r--;const s=r-o;let a=0;for(;aa&&t.charCodeAt(l-1)===c;)l--;const d=l-a,h=sh){if(t.charCodeAt(a+p)===c)return i.slice(a+p+1);if(2===p)return i.slice(a+p)}s>h&&(e.charCodeAt(o+p)===c?u=p:2===p&&(u=3)),-1===u&&(u=0)}let m="";for(p=o+u+1;p<=r;++p)p!==r&&e.charCodeAt(p)!==c||(m+=0===m.length?"..":"\\..");return a+=u,m.length>0?`${m}${i.slice(a,l)}`:(i.charCodeAt(a)===c&&++a,i.slice(a,l))},toNamespacedPath(e){if("string"!=typeof e)return e;if(0===e.length)return"";const t=C.resolve(e);if(t.length<=2)return e;if(t.charCodeAt(0)===c){if(t.charCodeAt(1)===c){const e=t.charCodeAt(2);if(63!==e&&e!==l)return`\\\\?\\UNC\\${t.slice(2)}`}}else if(f(t.charCodeAt(0))&&t.charCodeAt(1)===h&&t.charCodeAt(2)===c)return`\\\\?\\${t}`;return e},dirname(e){g(e,"path");const t=e.length;if(0===t)return".";let n=-1,i=0;const o=e.charCodeAt(0);if(1===t)return p(o)?e:".";if(p(o)){if(n=i=1,p(e.charCodeAt(1))){let o=2,r=o;for(;o2&&p(e.charCodeAt(2))?3:2,i=n);let r=-1,s=!0;for(let n=t-1;n>=i;--n)if(p(e.charCodeAt(n))){if(!s){r=n;break}}else s=!1;if(-1===r){if(-1===n)return".";r=n}return e.slice(0,r)},basename(e,t){void 0!==t&&g(t,"ext"),g(e,"path");let n,i=0,o=-1,r=!0;if(e.length>=2&&f(e.charCodeAt(0))&&e.charCodeAt(1)===h&&(i=2),void 0!==t&&t.length>0&&t.length<=e.length){if(t===e)return"";let s=t.length-1,a=-1;for(n=e.length-1;n>=i;--n){const l=e.charCodeAt(n);if(p(l)){if(!r){i=n+1;break}}else-1===a&&(r=!1,a=n+1),s>=0&&(l===t.charCodeAt(s)?-1==--s&&(o=n):(s=-1,o=a))}return i===o?o=a:-1===o&&(o=e.length),e.slice(i,o)}for(n=e.length-1;n>=i;--n)if(p(e.charCodeAt(n))){if(!r){i=n+1;break}}else-1===o&&(r=!1,o=n+1);return-1===o?"":e.slice(i,o)},extname(e){g(e,"path");let t=0,n=-1,i=0,o=-1,r=!0,s=0;e.length>=2&&e.charCodeAt(1)===h&&f(e.charCodeAt(0))&&(t=i=2);for(let a=e.length-1;a>=t;--a){const t=e.charCodeAt(a);if(p(t)){if(!r){i=a+1;break}}else-1===o&&(r=!1,o=a+1),t===l?-1===n?n=a:1!==s&&(s=1):-1!==n&&(s=-1)}return-1===n||-1===o||0===s||1===s&&n===o-1&&n===i+1?"":e.slice(n,o)},format:b.bind(null,"\\"),parse(e){g(e,"path");const t={root:"",dir:"",base:"",ext:"",name:""};if(0===e.length)return t;const n=e.length;let i=0,o=e.charCodeAt(0);if(1===n)return p(o)?(t.root=t.dir=e,t):(t.base=t.name=e,t);if(p(o)){if(i=1,p(e.charCodeAt(1))){let t=2,o=t;for(;t0&&(t.root=e.slice(0,i));let r=-1,s=i,a=-1,d=!0,c=e.length-1,u=0;for(;c>=i;--c)if(o=e.charCodeAt(c),p(o)){if(!d){s=c+1;break}}else-1===a&&(d=!1,a=c+1),o===l?-1===r?r=c:1!==u&&(u=1):-1!==r&&(u=-1);return-1!==a&&(-1===r||0===u||1===u&&r===a-1&&r===s+1?t.base=t.name=e.slice(s,a):(t.name=e.slice(s,r),t.base=e.slice(s,a),t.ext=e.slice(r,a))),t.dir=s>0&&s!==i?e.slice(0,s-1):t.root,t},sep:"\\",delimiter:";",win32:null,posix:null},v={resolve(...e){let t="",n=!1;for(let i=e.length-1;i>=-1&&!n;i--){const o=i>=0?e[i]:r();g(o,"path"),0!==o.length&&(t=`${o}/${t}`,n=o.charCodeAt(0)===d)}return t=_(t,!n,"/",m),n?`/${t}`:t.length>0?t:"."},normalize(e){if(g(e,"path"),0===e.length)return".";const t=e.charCodeAt(0)===d,n=e.charCodeAt(e.length-1)===d;return 0===(e=_(e,!t,"/",m)).length?t?"/":n?"./":".":(n&&(e+="/"),t?`/${e}`:e)},isAbsolute:e=>(g(e,"path"),e.length>0&&e.charCodeAt(0)===d),join(...e){if(0===e.length)return".";let t;for(let n=0;n0&&(void 0===t?t=i:t+=`/${i}`)}return void 0===t?".":v.normalize(t)},relative(e,t){if(g(e,"from"),g(t,"to"),e===t)return"";if((e=v.resolve(e))===(t=v.resolve(t)))return"";const n=e.length,i=n-1,o=t.length-1,r=ir){if(t.charCodeAt(1+a)===d)return t.slice(1+a+1);if(0===a)return t.slice(1+a)}else i>r&&(e.charCodeAt(1+a)===d?s=a:0===a&&(s=0));let l="";for(a=1+s+1;a<=n;++a)a!==n&&e.charCodeAt(a)!==d||(l+=0===l.length?"..":"/..");return`${l}${t.slice(1+s)}`},toNamespacedPath:e=>e,dirname(e){if(g(e,"path"),0===e.length)return".";const t=e.charCodeAt(0)===d;let n=-1,i=!0;for(let t=e.length-1;t>=1;--t)if(e.charCodeAt(t)===d){if(!i){n=t;break}}else i=!1;return-1===n?t?"/":".":t&&1===n?"//":e.slice(0,n)},basename(e,t){void 0!==t&&g(t,"ext"),g(e,"path");let n,i=0,o=-1,r=!0;if(void 0!==t&&t.length>0&&t.length<=e.length){if(t===e)return"";let s=t.length-1,a=-1;for(n=e.length-1;n>=0;--n){const l=e.charCodeAt(n);if(l===d){if(!r){i=n+1;break}}else-1===a&&(r=!1,a=n+1),s>=0&&(l===t.charCodeAt(s)?-1==--s&&(o=n):(s=-1,o=a))}return i===o?o=a:-1===o&&(o=e.length),e.slice(i,o)}for(n=e.length-1;n>=0;--n)if(e.charCodeAt(n)===d){if(!r){i=n+1;break}}else-1===o&&(r=!1,o=n+1);return-1===o?"":e.slice(i,o)},extname(e){g(e,"path");let t=-1,n=0,i=-1,o=!0,r=0;for(let s=e.length-1;s>=0;--s){const a=e.charCodeAt(s);if(a!==d)-1===i&&(o=!1,i=s+1),a===l?-1===t?t=s:1!==r&&(r=1):-1!==t&&(r=-1);else if(!o){n=s+1;break}}return-1===t||-1===i||0===r||1===r&&t===i-1&&t===n+1?"":e.slice(t,i)},format:b.bind(null,"/"),parse(e){g(e,"path");const t={root:"",dir:"",base:"",ext:"",name:""};if(0===e.length)return t;const n=e.charCodeAt(0)===d;let i;n?(t.root="/",i=1):i=0;let o=-1,r=0,s=-1,a=!0,c=e.length-1,h=0;for(;c>=i;--c){const t=e.charCodeAt(c);if(t!==d)-1===s&&(a=!1,s=c+1),t===l?-1===o?o=c:1!==h&&(h=1):-1!==o&&(h=-1);else if(!a){r=c+1;break}}if(-1!==s){const i=0===r&&n?1:r;-1===o||0===h||1===h&&o===s-1&&o===r+1?t.base=t.name=e.slice(i,s):(t.name=e.slice(i,o),t.base=e.slice(i,s),t.ext=e.slice(o,s))}return r>0?t.dir=e.slice(0,r-1):n&&(t.dir="/"),t},sep:"/",delimiter:":",win32:null,posix:null};v.win32=C.win32=C,v.posix=C.posix=v;const w="win32"===a?C.normalize:v.normalize,y="win32"===a?C.resolve:v.resolve,A="win32"===a?C.relative:v.relative,S="win32"===a?C.dirname:v.dirname,x="win32"===a?C.basename:v.basename,k="win32"===a?C.extname:v.extname,L="win32"===a?C.sep:v.sep},1432:(e,t,n)=>{"use strict";var i;n.d(t,{li:()=>f,MM:()=>v,ED:()=>y,dz:()=>A,IJ:()=>S,tY:()=>x,$L:()=>k,gn:()=>L,WE:()=>E,xS:()=>N,OS:()=>D,r:()=>T});const o="en";let r,s,a,l=!1,d=!1,c=!1,h=!1,u=!1,g=!1,p=!1,m=null;const f="object"==typeof self?self:"object"==typeof n.g?n.g:{};let _;void 0!==f.vscode&&void 0!==f.vscode.process?_=f.vscode.process:"undefined"!=typeof process&&(_=process);const b="string"==typeof(null===(i=null==_?void 0:_.versions)||void 0===i?void 0:i.electron)&&"renderer"===_.type,C=b&&(null==_?void 0:_.sandboxed),v="string"==typeof(()=>{if(C)return"bypassHeatCheck";const e=null==_?void 0:_.env.VSCODE_BROWSER_CODE_LOADING;return"string"==typeof e?"none"===e||"code"===e||"bypassHeatCheck"===e||"bypassHeatCheckAndEagerCompile"===e?e:"bypassHeatCheck":void 0})();if("object"!=typeof navigator||b)if("object"==typeof _){l="win32"===_.platform,d="darwin"===_.platform,c="linux"===_.platform,h=c&&!!_.env.SNAP&&!!_.env.SNAP_REVISION,r=o,m=o;const e=_.env.VSCODE_NLS_CONFIG;if(e)try{const t=JSON.parse(e),n=t.availableLanguages["*"];r=t.locale,m=n||o,s=t._translationsConfigFile}catch(e){}u=!0}else console.error("Unable to resolve platform.");else a=navigator.userAgent,l=a.indexOf("Windows")>=0,d=a.indexOf("Macintosh")>=0,p=(a.indexOf("Macintosh")>=0||a.indexOf("iPad")>=0||a.indexOf("iPhone")>=0)&&!!navigator.maxTouchPoints&&navigator.maxTouchPoints>0,c=a.indexOf("Linux")>=0,g=!0,r=navigator.language,m=r;let w=0;d?w=1:l?w=3:c&&(w=2);const y=l,A=d,S=c,x=u,k=g,L=p,E=a,N=function(){if(f.setImmediate)return f.setImmediate.bind(f);if("function"==typeof f.postMessage&&!f.importScripts){let e=[];f.addEventListener("message",(t=>{if(t.data&&t.data.vscodeSetImmediateId)for(let n=0,i=e.length;n{const i=++t;e.push({id:i,callback:n}),f.postMessage({vscodeSetImmediateId:i},"*")}}if("function"==typeof(null==_?void 0:_.nextTick))return _.nextTick.bind(_);const e=Promise.resolve();return t=>e.then(t)}(),D=d||p?2:l?1:3;let I=!0,M=!1;function T(){if(!M){M=!0;const e=new Uint8Array(2);e[0]=1,e[1]=2;const t=new Uint16Array(e.buffer);I=513===t[0]}return I}},1134:(e,t,n)=>{"use strict";var i;n.d(t,{e:()=>i}),function(e){function t(e,t){if(e.start>=t.end||t.start>=e.end)return{start:0,end:0};const n=Math.max(e.start,t.start),i=Math.min(e.end,t.end);return i-n<=0?{start:0,end:0}:{start:n,end:i}}function n(e){return e.end-e.start<=0}e.intersect=t,e.isEmpty=n,e.intersects=function(e,i){return!n(t(e,i))},e.relativeComplement=function(e,t){const i=[],o={start:e.start,end:Math.min(t.start,e.end)},r={start:Math.max(t.end,e.start),end:e.end};return n(o)||i.push(o),n(r)||i.push(r),i}}(i||(i={}))},5935:(e,t,n)=>{"use strict";n.d(t,{z_:()=>l,SF:()=>d,Xy:()=>c,Hx:()=>h,EZ:()=>u,XX:()=>g,Vo:()=>p,AH:()=>m,i3:()=>f,Vb:()=>_});var i=n(5527),o=n(8721),r=n(666),s=n(7295),a=n(6663);function l(e){return(0,r.q)(e,!0)}const d=new class{constructor(e){this._ignorePathCasing=e}compare(e,t,n=!1){return e===t?0:(0,s.qu)(this.getComparisonKey(e,n),this.getComparisonKey(t,n))}isEqual(e,t,n=!1){return e===t||!(!e||!t)&&this.getComparisonKey(e,n)===this.getComparisonKey(t,n)}getComparisonKey(e,t=!1){return e.with({path:this._ignorePathCasing(e)?e.path.toLowerCase():void 0,fragment:t?null:void 0}).toString()}joinPath(e,...t){return r.o.joinPath(e,...t)}basenameOrAuthority(e){return u(e)||e.authority}basename(e){return o.KR.basename(e.path)}dirname(e){if(0===e.path.length)return e;let t;return e.scheme===a.lg.file?t=r.o.file(o.XX(l(e))).path:(t=o.KR.dirname(e.path),e.authority&&t.length&&47!==t.charCodeAt(0)&&(console.error(`dirname("${e.toString})) resulted in a relative path`),t="/")),e.with({path:t})}normalizePath(e){if(!e.path.length)return e;let t;return t=e.scheme===a.lg.file?r.o.file(o.Fv(l(e))).path:o.KR.normalize(e.path),e.with({path:t})}resolvePath(e,t){if(e.scheme===a.lg.file){const n=r.o.file(o.DB(l(e),t));return e.with({authority:n.authority,path:n.path})}return t=i.fn(t),e.with({path:o.KR.resolve(e.path,t)})}}((()=>!1)),c=d.isEqual.bind(d),h=d.basenameOrAuthority.bind(d),u=d.basename.bind(d),g=d.dirname.bind(d),p=d.joinPath.bind(d),m=d.normalizePath.bind(d),f=d.resolvePath.bind(d);var _;!function(e){e.META_DATA_LABEL="label",e.META_DATA_DESCRIPTION="description",e.META_DATA_SIZE="size",e.META_DATA_MIME="mime",e.parseMetaData=function(t){const n=new Map;t.path.substring(t.path.indexOf(";")+1,t.path.lastIndexOf(";")).split(";").forEach((e=>{const[t,i]=e.split(":");t&&i&&n.set(t,i)}));const i=t.path.substring(0,t.path.indexOf(";"));return i&&n.set(e.META_DATA_MIME,i),n}}(_||(_={}))},6633:(e,t,n)=>{"use strict";n.d(t,{Rm:()=>s});var i=n(4669),o=n(5976);class r{constructor(e,t,n,i,o,r){this._scrollStateBrand=void 0,e|=0,t|=0,n|=0,i|=0,o|=0,r|=0,this.rawScrollLeft=n,this.rawScrollTop=r,e<0&&(e=0),n+e>t&&(n=t-e),n<0&&(n=0),i<0&&(i=0),r+i>o&&(r=o-i),r<0&&(r=0),this.width=e,this.scrollWidth=t,this.scrollLeft=n,this.height=i,this.scrollHeight=o,this.scrollTop=r}equals(e){return this.rawScrollLeft===e.rawScrollLeft&&this.rawScrollTop===e.rawScrollTop&&this.width===e.width&&this.scrollWidth===e.scrollWidth&&this.scrollLeft===e.scrollLeft&&this.height===e.height&&this.scrollHeight===e.scrollHeight&&this.scrollTop===e.scrollTop}withScrollDimensions(e,t){return new r(void 0!==e.width?e.width:this.width,void 0!==e.scrollWidth?e.scrollWidth:this.scrollWidth,t?this.rawScrollLeft:this.scrollLeft,void 0!==e.height?e.height:this.height,void 0!==e.scrollHeight?e.scrollHeight:this.scrollHeight,t?this.rawScrollTop:this.scrollTop)}withScrollPosition(e){return new r(this.width,this.scrollWidth,void 0!==e.scrollLeft?e.scrollLeft:this.rawScrollLeft,this.height,this.scrollHeight,void 0!==e.scrollTop?e.scrollTop:this.rawScrollTop)}createScrollEvent(e,t){const n=this.width!==e.width,i=this.scrollWidth!==e.scrollWidth,o=this.scrollLeft!==e.scrollLeft,r=this.height!==e.height,s=this.scrollHeight!==e.scrollHeight,a=this.scrollTop!==e.scrollTop;return{inSmoothScrolling:t,oldWidth:e.width,oldScrollWidth:e.scrollWidth,oldScrollLeft:e.scrollLeft,width:this.width,scrollWidth:this.scrollWidth,scrollLeft:this.scrollLeft,oldHeight:e.height,oldScrollHeight:e.scrollHeight,oldScrollTop:e.scrollTop,height:this.height,scrollHeight:this.scrollHeight,scrollTop:this.scrollTop,widthChanged:n,scrollWidthChanged:i,scrollLeftChanged:o,heightChanged:r,scrollHeightChanged:s,scrollTopChanged:a}}}class s extends o.JT{constructor(e,t){super(),this._scrollableBrand=void 0,this._onScroll=this._register(new i.Q5),this.onScroll=this._onScroll.event,this._smoothScrollDuration=e,this._scheduleAtNextAnimationFrame=t,this._state=new r(0,0,0,0,0,0),this._smoothScrolling=null}dispose(){this._smoothScrolling&&(this._smoothScrolling.dispose(),this._smoothScrolling=null),super.dispose()}setSmoothScrollDuration(e){this._smoothScrollDuration=e}validateScrollPosition(e){return this._state.withScrollPosition(e)}getScrollDimensions(){return this._state}setScrollDimensions(e,t){const n=this._state.withScrollDimensions(e,t);this._setState(n,Boolean(this._smoothScrolling)),this._smoothScrolling&&this._smoothScrolling.acceptScrollDimensions(this._state)}getFutureScrollPosition(){return this._smoothScrolling?this._smoothScrolling.to:this._state}getCurrentScrollPosition(){return this._state}setScrollPositionNow(e){const t=this._state.withScrollPosition(e);this._smoothScrolling&&(this._smoothScrolling.dispose(),this._smoothScrolling=null),this._setState(t,!1)}setScrollPositionSmooth(e,t){if(0===this._smoothScrollDuration)return this.setScrollPositionNow(e);if(this._smoothScrolling){e={scrollLeft:void 0===e.scrollLeft?this._smoothScrolling.to.scrollLeft:e.scrollLeft,scrollTop:void 0===e.scrollTop?this._smoothScrolling.to.scrollTop:e.scrollTop};const n=this._state.withScrollPosition(e);if(this._smoothScrolling.to.scrollLeft===n.scrollLeft&&this._smoothScrolling.to.scrollTop===n.scrollTop)return;let i;i=t?new d(this._smoothScrolling.from,n,this._smoothScrolling.startTime,this._smoothScrolling.duration):this._smoothScrolling.combine(this._state,n,this._smoothScrollDuration),this._smoothScrolling.dispose(),this._smoothScrolling=i}else{const t=this._state.withScrollPosition(e);this._smoothScrolling=d.start(this._state,t,this._smoothScrollDuration)}this._smoothScrolling.animationFrameDisposable=this._scheduleAtNextAnimationFrame((()=>{this._smoothScrolling&&(this._smoothScrolling.animationFrameDisposable=null,this._performSmoothScrolling())}))}_performSmoothScrolling(){if(!this._smoothScrolling)return;const e=this._smoothScrolling.tick(),t=this._state.withScrollPosition(e);return this._setState(t,!0),this._smoothScrolling?e.isDone?(this._smoothScrolling.dispose(),void(this._smoothScrolling=null)):void(this._smoothScrolling.animationFrameDisposable=this._scheduleAtNextAnimationFrame((()=>{this._smoothScrolling&&(this._smoothScrolling.animationFrameDisposable=null,this._performSmoothScrolling())}))):void 0}_setState(e,t){const n=this._state;n.equals(e)||(this._state=e,this._onScroll.fire(this._state.createScrollEvent(n,t)))}}class a{constructor(e,t,n){this.scrollLeft=e,this.scrollTop=t,this.isDone=n}}function l(e,t){const n=t-e;return function(t){return e+n*(1-(i=1-t,Math.pow(i,3)));var i}}class d{constructor(e,t,n,i){this.from=e,this.to=t,this.duration=i,this.startTime=n,this.animationFrameDisposable=null,this._initAnimations()}_initAnimations(){this.scrollLeft=this._initAnimation(this.from.scrollLeft,this.to.scrollLeft,this.to.width),this.scrollTop=this._initAnimation(this.from.scrollTop,this.to.scrollTop,this.to.height)}_initAnimation(e,t,n){if(Math.abs(e-t)>2.5*n){let s,a;return e{"use strict";n.d(t,{Z:()=>r});var i,o=n(7295);!function(e){e[e.Ignore=0]="Ignore",e[e.Info=1]="Info",e[e.Warning=2]="Warning",e[e.Error=3]="Error"}(i||(i={})),function(e){const t="error",n="warning",i="info";e.fromValue=function(r){return r?o.qq(t,r)?e.Error:o.qq(n,r)||o.qq("warn",r)?e.Warning:o.qq(i,r)?e.Info:e.Ignore:e.Ignore},e.toString=function(o){switch(o){case e.Error:return t;case e.Warning:return n;case e.Info:return i;default:return"ignore"}}}(i||(i={}));const r=i},4013:(e,t,n)=>{"use strict";n.d(t,{G:()=>r});var i=n(1432);const o=i.li.performance&&"function"==typeof i.li.performance.now;class r{constructor(e){this._highResolution=o&&e,this._startTime=this._now(),this._stopTime=-1}static create(e=!0){return new r(e)}stop(){this._stopTime=this._now()}elapsed(){return-1!==this._stopTime?this._stopTime-this._startTime:this._now()-this._startTime}_now(){return this._highResolution?i.li.performance.now():Date.now()}}},7295:(e,t,n)=>{"use strict";function i(e){return!e||"string"!=typeof e||0===e.trim().length}n.d(t,{m5:()=>i,WU:()=>r,YU:()=>s,ec:()=>a,fy:()=>l,j3:()=>d,oL:()=>c,un:()=>h,R1:()=>u,GF:()=>g,IO:()=>p,mr:()=>m,uq:()=>f,LC:()=>_,V8:()=>b,ow:()=>C,qu:()=>v,TT:()=>w,zY:()=>y,j_:()=>A,mK:()=>S,df:()=>x,qq:()=>L,ok:()=>N,Mh:()=>D,P1:()=>I,ZG:()=>M,YK:()=>T,rL:()=>R,ZH:()=>O,vH:()=>P,HO:()=>F,CZ:()=>W,Ut:()=>V,RP:()=>j,$i:()=>U,Qe:()=>Z,ab:()=>K,xe:()=>q,K7:()=>Y,C8:()=>G,c1:()=>Q,uS:()=>X,Kw:()=>J,PJ:()=>ee,S6:()=>te,fi:()=>ne,oH:()=>oe});const o=/{(\d+)}/g;function r(e,...t){return 0===t.length?e:e.replace(o,(function(e,n){const i=parseInt(n,10);return isNaN(i)||i<0||i>=t.length?e:t[i]}))}function s(e){return e.replace(/[<>&]/g,(function(e){switch(e){case"<":return"<";case">":return">";case"&":return"&";default:return e}}))}function a(e){return e.replace(/[\\\{\}\*\+\?\|\^\$\.\[\]\(\)]/g,"\\$&")}function l(e,t=" "){return c(d(e,t),t)}function d(e,t){if(!e||!t)return e;const n=t.length;if(0===n||0===e.length)return e;let i=0;for(;e.indexOf(t,i)===i;)i+=n;return e.substring(i)}function c(e,t){if(!e||!t)return e;const n=t.length,i=e.length;if(0===n||0===i)return e;let o=i,r=-1;for(;r=e.lastIndexOf(t,o-1),-1!==r&&r+n===o;){if(0===r)return"";o=r}return e.substring(0,o)}function h(e){return e.replace(/[\-\\\{\}\+\?\|\^\$\.\,\[\]\(\)\#\s]/g,"\\$&").replace(/[\*]/g,".*")}function u(e){return e.replace(/\*/g,"")}function g(e,t,n={}){if(!e)throw new Error("Cannot create regex from empty string");t||(e=a(e)),n.wholeWord&&(/\B/.test(e.charAt(0))||(e="\\b"+e),/\B/.test(e.charAt(e.length-1))||(e+="\\b"));let i="";return n.global&&(i+="g"),n.matchCase||(i+="i"),n.multiline&&(i+="m"),n.unicode&&(i+="u"),new RegExp(e,i)}function p(e){return"^"!==e.source&&"^$"!==e.source&&"$"!==e.source&&"^\\s*$"!==e.source&&!(!e.exec("")||0!==e.lastIndex)}function m(e){return(e.global?"g":"")+(e.ignoreCase?"i":"")+(e.multiline?"m":"")+(e.unicode?"u":"")}function f(e){return e.split(/\r\n|\r|\n/)}function _(e){for(let t=0,n=e.length;t=0;n--){const t=e.charCodeAt(n);if(32!==t&&9!==t)return n}return-1}function v(e,t){return et?1:0}function w(e,t,n=0,i=e.length,o=0,r=t.length){for(;nr)return 1}const s=i-n,a=r-o;return sa?1:0}function y(e,t){return A(e,t,0,e.length,0,t.length)}function A(e,t,n=0,i=e.length,o=0,r=t.length){for(;na?1:0}function S(e){return e>=97&&e<=122}function x(e){return e>=65&&e<=90}function k(e){return S(e)||x(e)}function L(e,t){return e.length===t.length&&E(e,t)}function E(e,t,n=e.length){for(let i=0;ie.length)&&E(e,t,n)}function D(e,t){let n,i=Math.min(e.length,t.length);for(n=0;n1){const i=e.charCodeAt(t-2);if(M(i))return R(i,n)}return n}function P(e,t){const n=ie.getInstance(),i=t,o=e.length,r=O(e,o,t);t+=r>=65536?2:1;let s=n.getGraphemeBreakType(r);for(;t=65536?2:1,s=r}return t-i}function F(e,t){const n=ie.getInstance(),i=t,o=B(e,t);t-=o>=65536?2:1;let r=n.getGraphemeBreakType(o);for(;t>0;){const i=B(e,t),o=n.getGraphemeBreakType(i);if(ne(o,r))break;t-=i>=65536?2:1,r=o}return i-t}function W(e){const t=e.byteLength,n=[];let i=0;for(;i=240&&i+3>>0|(63&e[i++])<<12>>>0|(63&e[i++])<<6>>>0|(63&e[i++])<<0>>>0:o>=224&&i+2>>0|(63&e[i++])<<6>>>0|(63&e[i++])<<0>>>0:o>=192&&i+1>>0|(63&e[i++])<<0>>>0:e[i++],r>=0&&r<=55295||r>=57344&&r<=65535)n.push(String.fromCharCode(r));else if(r>=65536&&r<=1114111){const e=r-65536,t=55296+((1047552&e)>>>10),i=56320+((1023&e)>>>0);n.push(String.fromCharCode(t)),n.push(String.fromCharCode(i))}else n.push(String.fromCharCode(65533))}return n.join("")}const z=/(?:[\u05BE\u05C0\u05C3\u05C6\u05D0-\u05F4\u0608\u060B\u060D\u061B-\u064A\u066D-\u066F\u0671-\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u0710\u0712-\u072F\u074D-\u07A5\u07B1-\u07EA\u07F4\u07F5\u07FA-\u0815\u081A\u0824\u0828\u0830-\u0858\u085E-\u08BD\u200F\uFB1D\uFB1F-\uFB28\uFB2A-\uFD3D\uFD50-\uFDFC\uFE70-\uFEFC]|\uD802[\uDC00-\uDD1B\uDD20-\uDE00\uDE10-\uDE33\uDE40-\uDEE4\uDEEB-\uDF35\uDF40-\uDFFF]|\uD803[\uDC00-\uDCFF]|\uD83A[\uDC00-\uDCCF\uDD00-\uDD43\uDD50-\uDFFF]|\uD83B[\uDC00-\uDEBB])/;function V(e){return z.test(e)}const H=/(?:[\u231A\u231B\u23F0\u23F3\u2600-\u27BF\u2B50\u2B55]|\uD83C[\uDDE6-\uDDFF\uDF00-\uDFFF]|\uD83D[\uDC00-\uDE4F\uDE80-\uDEFC\uDFE0-\uDFEB]|\uD83E[\uDD00-\uDDFF\uDE70-\uDED6])/;function j(e){return H.test(e)}const $=/^[\t\n\r\x20-\x7E]*$/;function U(e){return $.test(e)}const Z=/[\u2028\u2029]/;function K(e){return Z.test(e)}function q(e){for(let t=0,n=e.length;t=11904&&e<=55215||e>=63744&&e<=64255||e>=65281&&e<=65374}function G(e){return e>=127462&&e<=127487||8986===e||8987===e||9200===e||9203===e||e>=9728&&e<=10175||11088===e||11093===e||e>=127744&&e<=128591||e>=128640&&e<=128764||e>=128992&&e<=129003||e>=129280&&e<=129535||e>=129648&&e<=129750}const Q=String.fromCharCode(65279);function X(e){return!!(e&&e.length>0&&65279===e.charCodeAt(0))}function J(e,t=!1){return!!e&&(t&&(e=e.replace(/\\./g,"")),e.toLowerCase()!==e)}function ee(e){return(e%=52)<26?String.fromCharCode(97+e):String.fromCharCode(65+e-26)}function te(e){return ie.getInstance().getGraphemeBreakType(e)}function ne(e,t){return 0===e?5!==t&&7!==t:!(2===e&&3===t||4!==e&&2!==e&&3!==e&&4!==t&&2!==t&&3!==t&&(8===e&&(8===t||9===t||11===t||12===t)||!(11!==e&&9!==e||9!==t&&10!==t)||(12===e||10===e)&&10===t||5===t||13===t||7===t||1===e||13===e&&14===t||6===e&&6===t))}class ie{constructor(){this._data=JSON.parse("[0,0,0,51592,51592,11,44424,44424,11,72251,72254,5,7150,7150,7,48008,48008,11,55176,55176,11,128420,128420,14,3276,3277,5,9979,9980,14,46216,46216,11,49800,49800,11,53384,53384,11,70726,70726,5,122915,122916,5,129320,129327,14,2558,2558,5,5906,5908,5,9762,9763,14,43360,43388,8,45320,45320,11,47112,47112,11,48904,48904,11,50696,50696,11,52488,52488,11,54280,54280,11,70082,70083,1,71350,71350,7,73111,73111,5,127892,127893,14,128726,128727,14,129473,129474,14,2027,2035,5,2901,2902,5,3784,3789,5,6754,6754,5,8418,8420,5,9877,9877,14,11088,11088,14,44008,44008,5,44872,44872,11,45768,45768,11,46664,46664,11,47560,47560,11,48456,48456,11,49352,49352,11,50248,50248,11,51144,51144,11,52040,52040,11,52936,52936,11,53832,53832,11,54728,54728,11,69811,69814,5,70459,70460,5,71096,71099,7,71998,71998,5,72874,72880,5,119149,119149,7,127374,127374,14,128335,128335,14,128482,128482,14,128765,128767,14,129399,129400,14,129680,129685,14,1476,1477,5,2377,2380,7,2759,2760,5,3137,3140,7,3458,3459,7,4153,4154,5,6432,6434,5,6978,6978,5,7675,7679,5,9723,9726,14,9823,9823,14,9919,9923,14,10035,10036,14,42736,42737,5,43596,43596,5,44200,44200,11,44648,44648,11,45096,45096,11,45544,45544,11,45992,45992,11,46440,46440,11,46888,46888,11,47336,47336,11,47784,47784,11,48232,48232,11,48680,48680,11,49128,49128,11,49576,49576,11,50024,50024,11,50472,50472,11,50920,50920,11,51368,51368,11,51816,51816,11,52264,52264,11,52712,52712,11,53160,53160,11,53608,53608,11,54056,54056,11,54504,54504,11,54952,54952,11,68108,68111,5,69933,69940,5,70197,70197,7,70498,70499,7,70845,70845,5,71229,71229,5,71727,71735,5,72154,72155,5,72344,72345,5,73023,73029,5,94095,94098,5,121403,121452,5,126981,127182,14,127538,127546,14,127990,127990,14,128391,128391,14,128445,128449,14,128500,128505,14,128752,128752,14,129160,129167,14,129356,129356,14,129432,129442,14,129648,129651,14,129751,131069,14,173,173,4,1757,1757,1,2274,2274,1,2494,2494,5,2641,2641,5,2876,2876,5,3014,3016,7,3262,3262,7,3393,3396,5,3570,3571,7,3968,3972,5,4228,4228,7,6086,6086,5,6679,6680,5,6912,6915,5,7080,7081,5,7380,7392,5,8252,8252,14,9096,9096,14,9748,9749,14,9784,9786,14,9833,9850,14,9890,9894,14,9938,9938,14,9999,9999,14,10085,10087,14,12349,12349,14,43136,43137,7,43454,43456,7,43755,43755,7,44088,44088,11,44312,44312,11,44536,44536,11,44760,44760,11,44984,44984,11,45208,45208,11,45432,45432,11,45656,45656,11,45880,45880,11,46104,46104,11,46328,46328,11,46552,46552,11,46776,46776,11,47000,47000,11,47224,47224,11,47448,47448,11,47672,47672,11,47896,47896,11,48120,48120,11,48344,48344,11,48568,48568,11,48792,48792,11,49016,49016,11,49240,49240,11,49464,49464,11,49688,49688,11,49912,49912,11,50136,50136,11,50360,50360,11,50584,50584,11,50808,50808,11,51032,51032,11,51256,51256,11,51480,51480,11,51704,51704,11,51928,51928,11,52152,52152,11,52376,52376,11,52600,52600,11,52824,52824,11,53048,53048,11,53272,53272,11,53496,53496,11,53720,53720,11,53944,53944,11,54168,54168,11,54392,54392,11,54616,54616,11,54840,54840,11,55064,55064,11,65438,65439,5,69633,69633,5,69837,69837,1,70018,70018,7,70188,70190,7,70368,70370,7,70465,70468,7,70712,70719,5,70835,70840,5,70850,70851,5,71132,71133,5,71340,71340,7,71458,71461,5,71985,71989,7,72002,72002,7,72193,72202,5,72281,72283,5,72766,72766,7,72885,72886,5,73104,73105,5,92912,92916,5,113824,113827,4,119173,119179,5,121505,121519,5,125136,125142,5,127279,127279,14,127489,127490,14,127570,127743,14,127900,127901,14,128254,128254,14,128369,128370,14,128400,128400,14,128425,128432,14,128468,128475,14,128489,128494,14,128715,128720,14,128745,128745,14,128759,128760,14,129004,129023,14,129296,129304,14,129340,129342,14,129388,129392,14,129404,129407,14,129454,129455,14,129485,129487,14,129659,129663,14,129719,129727,14,917536,917631,5,13,13,2,1160,1161,5,1564,1564,4,1807,1807,1,2085,2087,5,2363,2363,7,2402,2403,5,2507,2508,7,2622,2624,7,2691,2691,7,2786,2787,5,2881,2884,5,3006,3006,5,3072,3072,5,3170,3171,5,3267,3268,7,3330,3331,7,3406,3406,1,3538,3540,5,3655,3662,5,3897,3897,5,4038,4038,5,4184,4185,5,4352,4447,8,6068,6069,5,6155,6157,5,6448,6449,7,6742,6742,5,6783,6783,5,6966,6970,5,7042,7042,7,7143,7143,7,7212,7219,5,7412,7412,5,8206,8207,4,8294,8303,4,8596,8601,14,9410,9410,14,9742,9742,14,9757,9757,14,9770,9770,14,9794,9794,14,9828,9828,14,9855,9855,14,9882,9882,14,9900,9903,14,9929,9933,14,9963,9967,14,9987,9988,14,10006,10006,14,10062,10062,14,10175,10175,14,11744,11775,5,42607,42607,5,43043,43044,7,43263,43263,5,43444,43445,7,43569,43570,5,43698,43700,5,43766,43766,5,44032,44032,11,44144,44144,11,44256,44256,11,44368,44368,11,44480,44480,11,44592,44592,11,44704,44704,11,44816,44816,11,44928,44928,11,45040,45040,11,45152,45152,11,45264,45264,11,45376,45376,11,45488,45488,11,45600,45600,11,45712,45712,11,45824,45824,11,45936,45936,11,46048,46048,11,46160,46160,11,46272,46272,11,46384,46384,11,46496,46496,11,46608,46608,11,46720,46720,11,46832,46832,11,46944,46944,11,47056,47056,11,47168,47168,11,47280,47280,11,47392,47392,11,47504,47504,11,47616,47616,11,47728,47728,11,47840,47840,11,47952,47952,11,48064,48064,11,48176,48176,11,48288,48288,11,48400,48400,11,48512,48512,11,48624,48624,11,48736,48736,11,48848,48848,11,48960,48960,11,49072,49072,11,49184,49184,11,49296,49296,11,49408,49408,11,49520,49520,11,49632,49632,11,49744,49744,11,49856,49856,11,49968,49968,11,50080,50080,11,50192,50192,11,50304,50304,11,50416,50416,11,50528,50528,11,50640,50640,11,50752,50752,11,50864,50864,11,50976,50976,11,51088,51088,11,51200,51200,11,51312,51312,11,51424,51424,11,51536,51536,11,51648,51648,11,51760,51760,11,51872,51872,11,51984,51984,11,52096,52096,11,52208,52208,11,52320,52320,11,52432,52432,11,52544,52544,11,52656,52656,11,52768,52768,11,52880,52880,11,52992,52992,11,53104,53104,11,53216,53216,11,53328,53328,11,53440,53440,11,53552,53552,11,53664,53664,11,53776,53776,11,53888,53888,11,54000,54000,11,54112,54112,11,54224,54224,11,54336,54336,11,54448,54448,11,54560,54560,11,54672,54672,11,54784,54784,11,54896,54896,11,55008,55008,11,55120,55120,11,64286,64286,5,66272,66272,5,68900,68903,5,69762,69762,7,69817,69818,5,69927,69931,5,70003,70003,5,70070,70078,5,70094,70094,7,70194,70195,7,70206,70206,5,70400,70401,5,70463,70463,7,70475,70477,7,70512,70516,5,70722,70724,5,70832,70832,5,70842,70842,5,70847,70848,5,71088,71089,7,71102,71102,7,71219,71226,5,71231,71232,5,71342,71343,7,71453,71455,5,71463,71467,5,71737,71738,5,71995,71996,5,72000,72000,7,72145,72147,7,72160,72160,5,72249,72249,7,72273,72278,5,72330,72342,5,72752,72758,5,72850,72871,5,72882,72883,5,73018,73018,5,73031,73031,5,73109,73109,5,73461,73462,7,94031,94031,5,94192,94193,7,119142,119142,7,119155,119162,4,119362,119364,5,121476,121476,5,122888,122904,5,123184,123190,5,126976,126979,14,127184,127231,14,127344,127345,14,127405,127461,14,127514,127514,14,127561,127567,14,127778,127779,14,127896,127896,14,127985,127986,14,127995,127999,5,128326,128328,14,128360,128366,14,128378,128378,14,128394,128397,14,128405,128406,14,128422,128423,14,128435,128443,14,128453,128464,14,128479,128480,14,128484,128487,14,128496,128498,14,128640,128709,14,128723,128724,14,128736,128741,14,128747,128748,14,128755,128755,14,128762,128762,14,128981,128991,14,129096,129103,14,129292,129292,14,129311,129311,14,129329,129330,14,129344,129349,14,129360,129374,14,129394,129394,14,129402,129402,14,129413,129425,14,129445,129450,14,129466,129471,14,129483,129483,14,129511,129535,14,129653,129655,14,129667,129670,14,129705,129711,14,129731,129743,14,917505,917505,4,917760,917999,5,10,10,3,127,159,4,768,879,5,1471,1471,5,1536,1541,1,1648,1648,5,1767,1768,5,1840,1866,5,2070,2073,5,2137,2139,5,2307,2307,7,2366,2368,7,2382,2383,7,2434,2435,7,2497,2500,5,2519,2519,5,2563,2563,7,2631,2632,5,2677,2677,5,2750,2752,7,2763,2764,7,2817,2817,5,2879,2879,5,2891,2892,7,2914,2915,5,3008,3008,5,3021,3021,5,3076,3076,5,3146,3149,5,3202,3203,7,3264,3265,7,3271,3272,7,3298,3299,5,3390,3390,5,3402,3404,7,3426,3427,5,3535,3535,5,3544,3550,7,3635,3635,7,3763,3763,7,3893,3893,5,3953,3966,5,3981,3991,5,4145,4145,7,4157,4158,5,4209,4212,5,4237,4237,5,4520,4607,10,5970,5971,5,6071,6077,5,6089,6099,5,6277,6278,5,6439,6440,5,6451,6456,7,6683,6683,5,6744,6750,5,6765,6770,7,6846,6846,5,6964,6964,5,6972,6972,5,7019,7027,5,7074,7077,5,7083,7085,5,7146,7148,7,7154,7155,7,7222,7223,5,7394,7400,5,7416,7417,5,8204,8204,5,8233,8233,4,8288,8292,4,8413,8416,5,8482,8482,14,8986,8987,14,9193,9203,14,9654,9654,14,9733,9733,14,9745,9745,14,9752,9752,14,9760,9760,14,9766,9766,14,9774,9775,14,9792,9792,14,9800,9811,14,9825,9826,14,9831,9831,14,9852,9853,14,9872,9873,14,9880,9880,14,9885,9887,14,9896,9897,14,9906,9916,14,9926,9927,14,9936,9936,14,9941,9960,14,9974,9974,14,9982,9985,14,9992,9997,14,10002,10002,14,10017,10017,14,10055,10055,14,10071,10071,14,10145,10145,14,11013,11015,14,11503,11505,5,12334,12335,5,12951,12951,14,42612,42621,5,43014,43014,5,43047,43047,7,43204,43205,5,43335,43345,5,43395,43395,7,43450,43451,7,43561,43566,5,43573,43574,5,43644,43644,5,43710,43711,5,43758,43759,7,44005,44005,5,44012,44012,7,44060,44060,11,44116,44116,11,44172,44172,11,44228,44228,11,44284,44284,11,44340,44340,11,44396,44396,11,44452,44452,11,44508,44508,11,44564,44564,11,44620,44620,11,44676,44676,11,44732,44732,11,44788,44788,11,44844,44844,11,44900,44900,11,44956,44956,11,45012,45012,11,45068,45068,11,45124,45124,11,45180,45180,11,45236,45236,11,45292,45292,11,45348,45348,11,45404,45404,11,45460,45460,11,45516,45516,11,45572,45572,11,45628,45628,11,45684,45684,11,45740,45740,11,45796,45796,11,45852,45852,11,45908,45908,11,45964,45964,11,46020,46020,11,46076,46076,11,46132,46132,11,46188,46188,11,46244,46244,11,46300,46300,11,46356,46356,11,46412,46412,11,46468,46468,11,46524,46524,11,46580,46580,11,46636,46636,11,46692,46692,11,46748,46748,11,46804,46804,11,46860,46860,11,46916,46916,11,46972,46972,11,47028,47028,11,47084,47084,11,47140,47140,11,47196,47196,11,47252,47252,11,47308,47308,11,47364,47364,11,47420,47420,11,47476,47476,11,47532,47532,11,47588,47588,11,47644,47644,11,47700,47700,11,47756,47756,11,47812,47812,11,47868,47868,11,47924,47924,11,47980,47980,11,48036,48036,11,48092,48092,11,48148,48148,11,48204,48204,11,48260,48260,11,48316,48316,11,48372,48372,11,48428,48428,11,48484,48484,11,48540,48540,11,48596,48596,11,48652,48652,11,48708,48708,11,48764,48764,11,48820,48820,11,48876,48876,11,48932,48932,11,48988,48988,11,49044,49044,11,49100,49100,11,49156,49156,11,49212,49212,11,49268,49268,11,49324,49324,11,49380,49380,11,49436,49436,11,49492,49492,11,49548,49548,11,49604,49604,11,49660,49660,11,49716,49716,11,49772,49772,11,49828,49828,11,49884,49884,11,49940,49940,11,49996,49996,11,50052,50052,11,50108,50108,11,50164,50164,11,50220,50220,11,50276,50276,11,50332,50332,11,50388,50388,11,50444,50444,11,50500,50500,11,50556,50556,11,50612,50612,11,50668,50668,11,50724,50724,11,50780,50780,11,50836,50836,11,50892,50892,11,50948,50948,11,51004,51004,11,51060,51060,11,51116,51116,11,51172,51172,11,51228,51228,11,51284,51284,11,51340,51340,11,51396,51396,11,51452,51452,11,51508,51508,11,51564,51564,11,51620,51620,11,51676,51676,11,51732,51732,11,51788,51788,11,51844,51844,11,51900,51900,11,51956,51956,11,52012,52012,11,52068,52068,11,52124,52124,11,52180,52180,11,52236,52236,11,52292,52292,11,52348,52348,11,52404,52404,11,52460,52460,11,52516,52516,11,52572,52572,11,52628,52628,11,52684,52684,11,52740,52740,11,52796,52796,11,52852,52852,11,52908,52908,11,52964,52964,11,53020,53020,11,53076,53076,11,53132,53132,11,53188,53188,11,53244,53244,11,53300,53300,11,53356,53356,11,53412,53412,11,53468,53468,11,53524,53524,11,53580,53580,11,53636,53636,11,53692,53692,11,53748,53748,11,53804,53804,11,53860,53860,11,53916,53916,11,53972,53972,11,54028,54028,11,54084,54084,11,54140,54140,11,54196,54196,11,54252,54252,11,54308,54308,11,54364,54364,11,54420,54420,11,54476,54476,11,54532,54532,11,54588,54588,11,54644,54644,11,54700,54700,11,54756,54756,11,54812,54812,11,54868,54868,11,54924,54924,11,54980,54980,11,55036,55036,11,55092,55092,11,55148,55148,11,55216,55238,9,65056,65071,5,65529,65531,4,68097,68099,5,68159,68159,5,69446,69456,5,69688,69702,5,69808,69810,7,69815,69816,7,69821,69821,1,69888,69890,5,69932,69932,7,69957,69958,7,70016,70017,5,70067,70069,7,70079,70080,7,70089,70092,5,70095,70095,5,70191,70193,5,70196,70196,5,70198,70199,5,70367,70367,5,70371,70378,5,70402,70403,7,70462,70462,5,70464,70464,5,70471,70472,7,70487,70487,5,70502,70508,5,70709,70711,7,70720,70721,7,70725,70725,7,70750,70750,5,70833,70834,7,70841,70841,7,70843,70844,7,70846,70846,7,70849,70849,7,71087,71087,5,71090,71093,5,71100,71101,5,71103,71104,5,71216,71218,7,71227,71228,7,71230,71230,7,71339,71339,5,71341,71341,5,71344,71349,5,71351,71351,5,71456,71457,7,71462,71462,7,71724,71726,7,71736,71736,7,71984,71984,5,71991,71992,7,71997,71997,7,71999,71999,1,72001,72001,1,72003,72003,5,72148,72151,5,72156,72159,7,72164,72164,7,72243,72248,5,72250,72250,1,72263,72263,5,72279,72280,7,72324,72329,1,72343,72343,7,72751,72751,7,72760,72765,5,72767,72767,5,72873,72873,7,72881,72881,7,72884,72884,7,73009,73014,5,73020,73021,5,73030,73030,1,73098,73102,7,73107,73108,7,73110,73110,7,73459,73460,5,78896,78904,4,92976,92982,5,94033,94087,7,94180,94180,5,113821,113822,5,119141,119141,5,119143,119145,5,119150,119154,5,119163,119170,5,119210,119213,5,121344,121398,5,121461,121461,5,121499,121503,5,122880,122886,5,122907,122913,5,122918,122922,5,123628,123631,5,125252,125258,5,126980,126980,14,127183,127183,14,127245,127247,14,127340,127343,14,127358,127359,14,127377,127386,14,127462,127487,6,127491,127503,14,127535,127535,14,127548,127551,14,127568,127569,14,127744,127777,14,127780,127891,14,127894,127895,14,127897,127899,14,127902,127984,14,127987,127989,14,127991,127994,14,128000,128253,14,128255,128317,14,128329,128334,14,128336,128359,14,128367,128368,14,128371,128377,14,128379,128390,14,128392,128393,14,128398,128399,14,128401,128404,14,128407,128419,14,128421,128421,14,128424,128424,14,128433,128434,14,128444,128444,14,128450,128452,14,128465,128467,14,128476,128478,14,128481,128481,14,128483,128483,14,128488,128488,14,128495,128495,14,128499,128499,14,128506,128591,14,128710,128714,14,128721,128722,14,128725,128725,14,128728,128735,14,128742,128744,14,128746,128746,14,128749,128751,14,128753,128754,14,128756,128758,14,128761,128761,14,128763,128764,14,128884,128895,14,128992,129003,14,129036,129039,14,129114,129119,14,129198,129279,14,129293,129295,14,129305,129310,14,129312,129319,14,129328,129328,14,129331,129338,14,129343,129343,14,129351,129355,14,129357,129359,14,129375,129387,14,129393,129393,14,129395,129398,14,129401,129401,14,129403,129403,14,129408,129412,14,129426,129431,14,129443,129444,14,129451,129453,14,129456,129465,14,129472,129472,14,129475,129482,14,129484,129484,14,129488,129510,14,129536,129647,14,129652,129652,14,129656,129658,14,129664,129666,14,129671,129679,14,129686,129704,14,129712,129718,14,129728,129730,14,129744,129750,14,917504,917504,4,917506,917535,4,917632,917759,4,918000,921599,4,0,9,4,11,12,4,14,31,4,169,169,14,174,174,14,1155,1159,5,1425,1469,5,1473,1474,5,1479,1479,5,1552,1562,5,1611,1631,5,1750,1756,5,1759,1764,5,1770,1773,5,1809,1809,5,1958,1968,5,2045,2045,5,2075,2083,5,2089,2093,5,2259,2273,5,2275,2306,5,2362,2362,5,2364,2364,5,2369,2376,5,2381,2381,5,2385,2391,5,2433,2433,5,2492,2492,5,2495,2496,7,2503,2504,7,2509,2509,5,2530,2531,5,2561,2562,5,2620,2620,5,2625,2626,5,2635,2637,5,2672,2673,5,2689,2690,5,2748,2748,5,2753,2757,5,2761,2761,7,2765,2765,5,2810,2815,5,2818,2819,7,2878,2878,5,2880,2880,7,2887,2888,7,2893,2893,5,2903,2903,5,2946,2946,5,3007,3007,7,3009,3010,7,3018,3020,7,3031,3031,5,3073,3075,7,3134,3136,5,3142,3144,5,3157,3158,5,3201,3201,5,3260,3260,5,3263,3263,5,3266,3266,5,3270,3270,5,3274,3275,7,3285,3286,5,3328,3329,5,3387,3388,5,3391,3392,7,3398,3400,7,3405,3405,5,3415,3415,5,3457,3457,5,3530,3530,5,3536,3537,7,3542,3542,5,3551,3551,5,3633,3633,5,3636,3642,5,3761,3761,5,3764,3772,5,3864,3865,5,3895,3895,5,3902,3903,7,3967,3967,7,3974,3975,5,3993,4028,5,4141,4144,5,4146,4151,5,4155,4156,7,4182,4183,7,4190,4192,5,4226,4226,5,4229,4230,5,4253,4253,5,4448,4519,9,4957,4959,5,5938,5940,5,6002,6003,5,6070,6070,7,6078,6085,7,6087,6088,7,6109,6109,5,6158,6158,4,6313,6313,5,6435,6438,7,6441,6443,7,6450,6450,5,6457,6459,5,6681,6682,7,6741,6741,7,6743,6743,7,6752,6752,5,6757,6764,5,6771,6780,5,6832,6845,5,6847,6848,5,6916,6916,7,6965,6965,5,6971,6971,7,6973,6977,7,6979,6980,7,7040,7041,5,7073,7073,7,7078,7079,7,7082,7082,7,7142,7142,5,7144,7145,5,7149,7149,5,7151,7153,5,7204,7211,7,7220,7221,7,7376,7378,5,7393,7393,7,7405,7405,5,7415,7415,7,7616,7673,5,8203,8203,4,8205,8205,13,8232,8232,4,8234,8238,4,8265,8265,14,8293,8293,4,8400,8412,5,8417,8417,5,8421,8432,5,8505,8505,14,8617,8618,14,9000,9000,14,9167,9167,14,9208,9210,14,9642,9643,14,9664,9664,14,9728,9732,14,9735,9741,14,9743,9744,14,9746,9746,14,9750,9751,14,9753,9756,14,9758,9759,14,9761,9761,14,9764,9765,14,9767,9769,14,9771,9773,14,9776,9783,14,9787,9791,14,9793,9793,14,9795,9799,14,9812,9822,14,9824,9824,14,9827,9827,14,9829,9830,14,9832,9832,14,9851,9851,14,9854,9854,14,9856,9861,14,9874,9876,14,9878,9879,14,9881,9881,14,9883,9884,14,9888,9889,14,9895,9895,14,9898,9899,14,9904,9905,14,9917,9918,14,9924,9925,14,9928,9928,14,9934,9935,14,9937,9937,14,9939,9940,14,9961,9962,14,9968,9973,14,9975,9978,14,9981,9981,14,9986,9986,14,9989,9989,14,9998,9998,14,10000,10001,14,10004,10004,14,10013,10013,14,10024,10024,14,10052,10052,14,10060,10060,14,10067,10069,14,10083,10084,14,10133,10135,14,10160,10160,14,10548,10549,14,11035,11036,14,11093,11093,14,11647,11647,5,12330,12333,5,12336,12336,14,12441,12442,5,12953,12953,14,42608,42610,5,42654,42655,5,43010,43010,5,43019,43019,5,43045,43046,5,43052,43052,5,43188,43203,7,43232,43249,5,43302,43309,5,43346,43347,7,43392,43394,5,43443,43443,5,43446,43449,5,43452,43453,5,43493,43493,5,43567,43568,7,43571,43572,7,43587,43587,5,43597,43597,7,43696,43696,5,43703,43704,5,43713,43713,5,43756,43757,5,43765,43765,7,44003,44004,7,44006,44007,7,44009,44010,7,44013,44013,5,44033,44059,12,44061,44087,12,44089,44115,12,44117,44143,12,44145,44171,12,44173,44199,12,44201,44227,12,44229,44255,12,44257,44283,12,44285,44311,12,44313,44339,12,44341,44367,12,44369,44395,12,44397,44423,12,44425,44451,12,44453,44479,12,44481,44507,12,44509,44535,12,44537,44563,12,44565,44591,12,44593,44619,12,44621,44647,12,44649,44675,12,44677,44703,12,44705,44731,12,44733,44759,12,44761,44787,12,44789,44815,12,44817,44843,12,44845,44871,12,44873,44899,12,44901,44927,12,44929,44955,12,44957,44983,12,44985,45011,12,45013,45039,12,45041,45067,12,45069,45095,12,45097,45123,12,45125,45151,12,45153,45179,12,45181,45207,12,45209,45235,12,45237,45263,12,45265,45291,12,45293,45319,12,45321,45347,12,45349,45375,12,45377,45403,12,45405,45431,12,45433,45459,12,45461,45487,12,45489,45515,12,45517,45543,12,45545,45571,12,45573,45599,12,45601,45627,12,45629,45655,12,45657,45683,12,45685,45711,12,45713,45739,12,45741,45767,12,45769,45795,12,45797,45823,12,45825,45851,12,45853,45879,12,45881,45907,12,45909,45935,12,45937,45963,12,45965,45991,12,45993,46019,12,46021,46047,12,46049,46075,12,46077,46103,12,46105,46131,12,46133,46159,12,46161,46187,12,46189,46215,12,46217,46243,12,46245,46271,12,46273,46299,12,46301,46327,12,46329,46355,12,46357,46383,12,46385,46411,12,46413,46439,12,46441,46467,12,46469,46495,12,46497,46523,12,46525,46551,12,46553,46579,12,46581,46607,12,46609,46635,12,46637,46663,12,46665,46691,12,46693,46719,12,46721,46747,12,46749,46775,12,46777,46803,12,46805,46831,12,46833,46859,12,46861,46887,12,46889,46915,12,46917,46943,12,46945,46971,12,46973,46999,12,47001,47027,12,47029,47055,12,47057,47083,12,47085,47111,12,47113,47139,12,47141,47167,12,47169,47195,12,47197,47223,12,47225,47251,12,47253,47279,12,47281,47307,12,47309,47335,12,47337,47363,12,47365,47391,12,47393,47419,12,47421,47447,12,47449,47475,12,47477,47503,12,47505,47531,12,47533,47559,12,47561,47587,12,47589,47615,12,47617,47643,12,47645,47671,12,47673,47699,12,47701,47727,12,47729,47755,12,47757,47783,12,47785,47811,12,47813,47839,12,47841,47867,12,47869,47895,12,47897,47923,12,47925,47951,12,47953,47979,12,47981,48007,12,48009,48035,12,48037,48063,12,48065,48091,12,48093,48119,12,48121,48147,12,48149,48175,12,48177,48203,12,48205,48231,12,48233,48259,12,48261,48287,12,48289,48315,12,48317,48343,12,48345,48371,12,48373,48399,12,48401,48427,12,48429,48455,12,48457,48483,12,48485,48511,12,48513,48539,12,48541,48567,12,48569,48595,12,48597,48623,12,48625,48651,12,48653,48679,12,48681,48707,12,48709,48735,12,48737,48763,12,48765,48791,12,48793,48819,12,48821,48847,12,48849,48875,12,48877,48903,12,48905,48931,12,48933,48959,12,48961,48987,12,48989,49015,12,49017,49043,12,49045,49071,12,49073,49099,12,49101,49127,12,49129,49155,12,49157,49183,12,49185,49211,12,49213,49239,12,49241,49267,12,49269,49295,12,49297,49323,12,49325,49351,12,49353,49379,12,49381,49407,12,49409,49435,12,49437,49463,12,49465,49491,12,49493,49519,12,49521,49547,12,49549,49575,12,49577,49603,12,49605,49631,12,49633,49659,12,49661,49687,12,49689,49715,12,49717,49743,12,49745,49771,12,49773,49799,12,49801,49827,12,49829,49855,12,49857,49883,12,49885,49911,12,49913,49939,12,49941,49967,12,49969,49995,12,49997,50023,12,50025,50051,12,50053,50079,12,50081,50107,12,50109,50135,12,50137,50163,12,50165,50191,12,50193,50219,12,50221,50247,12,50249,50275,12,50277,50303,12,50305,50331,12,50333,50359,12,50361,50387,12,50389,50415,12,50417,50443,12,50445,50471,12,50473,50499,12,50501,50527,12,50529,50555,12,50557,50583,12,50585,50611,12,50613,50639,12,50641,50667,12,50669,50695,12,50697,50723,12,50725,50751,12,50753,50779,12,50781,50807,12,50809,50835,12,50837,50863,12,50865,50891,12,50893,50919,12,50921,50947,12,50949,50975,12,50977,51003,12,51005,51031,12,51033,51059,12,51061,51087,12,51089,51115,12,51117,51143,12,51145,51171,12,51173,51199,12,51201,51227,12,51229,51255,12,51257,51283,12,51285,51311,12,51313,51339,12,51341,51367,12,51369,51395,12,51397,51423,12,51425,51451,12,51453,51479,12,51481,51507,12,51509,51535,12,51537,51563,12,51565,51591,12,51593,51619,12,51621,51647,12,51649,51675,12,51677,51703,12,51705,51731,12,51733,51759,12,51761,51787,12,51789,51815,12,51817,51843,12,51845,51871,12,51873,51899,12,51901,51927,12,51929,51955,12,51957,51983,12,51985,52011,12,52013,52039,12,52041,52067,12,52069,52095,12,52097,52123,12,52125,52151,12,52153,52179,12,52181,52207,12,52209,52235,12,52237,52263,12,52265,52291,12,52293,52319,12,52321,52347,12,52349,52375,12,52377,52403,12,52405,52431,12,52433,52459,12,52461,52487,12,52489,52515,12,52517,52543,12,52545,52571,12,52573,52599,12,52601,52627,12,52629,52655,12,52657,52683,12,52685,52711,12,52713,52739,12,52741,52767,12,52769,52795,12,52797,52823,12,52825,52851,12,52853,52879,12,52881,52907,12,52909,52935,12,52937,52963,12,52965,52991,12,52993,53019,12,53021,53047,12,53049,53075,12,53077,53103,12,53105,53131,12,53133,53159,12,53161,53187,12,53189,53215,12,53217,53243,12,53245,53271,12,53273,53299,12,53301,53327,12,53329,53355,12,53357,53383,12,53385,53411,12,53413,53439,12,53441,53467,12,53469,53495,12,53497,53523,12,53525,53551,12,53553,53579,12,53581,53607,12,53609,53635,12,53637,53663,12,53665,53691,12,53693,53719,12,53721,53747,12,53749,53775,12,53777,53803,12,53805,53831,12,53833,53859,12,53861,53887,12,53889,53915,12,53917,53943,12,53945,53971,12,53973,53999,12,54001,54027,12,54029,54055,12,54057,54083,12,54085,54111,12,54113,54139,12,54141,54167,12,54169,54195,12,54197,54223,12,54225,54251,12,54253,54279,12,54281,54307,12,54309,54335,12,54337,54363,12,54365,54391,12,54393,54419,12,54421,54447,12,54449,54475,12,54477,54503,12,54505,54531,12,54533,54559,12,54561,54587,12,54589,54615,12,54617,54643,12,54645,54671,12,54673,54699,12,54701,54727,12,54729,54755,12,54757,54783,12,54785,54811,12,54813,54839,12,54841,54867,12,54869,54895,12,54897,54923,12,54925,54951,12,54953,54979,12,54981,55007,12,55009,55035,12,55037,55063,12,55065,55091,12,55093,55119,12,55121,55147,12,55149,55175,12,55177,55203,12,55243,55291,10,65024,65039,5,65279,65279,4,65520,65528,4,66045,66045,5,66422,66426,5,68101,68102,5,68152,68154,5,68325,68326,5,69291,69292,5,69632,69632,7,69634,69634,7,69759,69761,5]")}static getInstance(){return ie._INSTANCE||(ie._INSTANCE=new ie),ie._INSTANCE}getGraphemeBreakType(e){if(e<32)return 10===e?3:13===e?2:4;if(e<127)return 0;const t=this._data,n=t.length/3;let i=1;for(;i<=n;)if(et[3*i+1]))return t[3*i+2];i=2*i+1}return 0}}function oe(e,t){if(0===e)return 0;const n=function(e,t){let n=B(t,e);for(e-=re(n);se(n)||65039===n||8419===n;){if(0===e)return;n=B(t,e),e-=re(n)}if(G(n)){if(e>=0){const n=B(t,e);8205===n&&(e-=re(n))}return e}}(e,t);return void 0!==n?n:e-re(B(t,e))}function re(e){return e>=65536?2:1}function se(e){return 127995<=e&&e<=127999}ie._INSTANCE=null},8401:(e,t,n)=>{"use strict";function i(e){return Array.isArray(e)}function o(e){return"string"==typeof e}function r(e){return!("object"!=typeof e||null===e||Array.isArray(e)||e instanceof RegExp||e instanceof Date)}function s(e){return"number"==typeof e&&!isNaN(e)}function a(e){return!0===e||!1===e}function l(e){return void 0===e}function d(e){return l(e)||null===e}function c(e,t){if(!e)throw new Error(t?`Unexpected type, expected '${t}'`:"Unexpected type")}function h(e){if(d(e))throw new Error("Assertion Failed: argument is undefined or null");return e}function u(e){return"function"==typeof e}function g(e,t){const n=Math.min(e.length,t.length);for(let i=0;ifunction(){const n=Array.prototype.slice.call(arguments,0);return t(e,n)};let i={};for(const t of e)i[t]=n(t);return i}function _(e){return null===e?void 0:e}function b(e,t="Unreachable"){throw new Error(t)}n.d(t,{kJ:()=>i,HD:()=>o,Kn:()=>r,hj:()=>s,jn:()=>a,o8:()=>l,Jp:()=>d,p_:()=>c,cW:()=>h,mf:()=>u,D8:()=>g,$E:()=>m,IU:()=>f,f6:()=>_,vE:()=>b})},5427:(e,t,n)=>{"use strict";function i(e){return e<0?0:e>255?255:0|e}function o(e){return e<0?0:e>4294967295?4294967295:0|e}n.d(t,{K:()=>i,A:()=>o})},666:(e,t,n)=>{"use strict";n.d(t,{o:()=>u,q:()=>b});var i=n(1432),o=n(8721);const r=/^\w[\w\d+.-]*$/,s=/^\//,a=/^\/\//;function l(e,t){if(!e.scheme&&t)throw new Error(`[UriError]: Scheme is missing: {scheme: "", authority: "${e.authority}", path: "${e.path}", query: "${e.query}", fragment: "${e.fragment}"}`);if(e.scheme&&!r.test(e.scheme))throw new Error("[UriError]: Scheme contains illegal characters.");if(e.path)if(e.authority){if(!s.test(e.path))throw new Error('[UriError]: If a URI contains an authority component, then the path component must either be empty or begin with a slash ("/") character')}else if(a.test(e.path))throw new Error('[UriError]: If a URI does not contain an authority component, then the path cannot begin with two slash characters ("//")')}const d="",c="/",h=/^(([^:/?#]+?):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?/;class u{constructor(e,t,n,i,o,r=!1){"object"==typeof e?(this.scheme=e.scheme||d,this.authority=e.authority||d,this.path=e.path||d,this.query=e.query||d,this.fragment=e.fragment||d):(this.scheme=function(e,t){return e||t?e:"file"}(e,r),this.authority=t||d,this.path=function(e,t){switch(e){case"https":case"http":case"file":t?t[0]!==c&&(t=c+t):t=c}return t}(this.scheme,n||d),this.query=i||d,this.fragment=o||d,l(this,r))}static isUri(e){return e instanceof u||!!e&&"string"==typeof e.authority&&"string"==typeof e.fragment&&"string"==typeof e.path&&"string"==typeof e.query&&"string"==typeof e.scheme&&"string"==typeof e.fsPath&&"function"==typeof e.with&&"function"==typeof e.toString}get fsPath(){return b(this,!1)}with(e){if(!e)return this;let{scheme:t,authority:n,path:i,query:o,fragment:r}=e;return void 0===t?t=this.scheme:null===t&&(t=d),void 0===n?n=this.authority:null===n&&(n=d),void 0===i?i=this.path:null===i&&(i=d),void 0===o?o=this.query:null===o&&(o=d),void 0===r?r=this.fragment:null===r&&(r=d),t===this.scheme&&n===this.authority&&i===this.path&&o===this.query&&r===this.fragment?this:new p(t,n,i,o,r)}static parse(e,t=!1){const n=h.exec(e);return n?new p(n[2]||d,y(n[4]||d),y(n[5]||d),y(n[7]||d),y(n[9]||d),t):new p(d,d,d,d,d)}static file(e){let t=d;if(i.ED&&(e=e.replace(/\\/g,c)),e[0]===c&&e[1]===c){const n=e.indexOf(c,2);-1===n?(t=e.substring(2),e=c):(t=e.substring(2,n),e=e.substring(n)||c)}return new p("file",t,e,d,d)}static from(e){const t=new p(e.scheme,e.authority,e.path,e.query,e.fragment);return l(t,!0),t}static joinPath(e,...t){if(!e.path)throw new Error("[UriError]: cannot call joinPath on URI without path");let n;return n=i.ED&&"file"===e.scheme?u.file(o.Ku.join(b(e,!0),...t)).path:o.KR.join(e.path,...t),e.with({path:n})}toString(e=!1){return C(this,e)}toJSON(){return this}static revive(e){if(e){if(e instanceof u)return e;{const t=new p(e);return t._formatted=e.external,t._fsPath=e._sep===g?e.fsPath:null,t}}return e}}const g=i.ED?1:void 0;class p extends u{constructor(){super(...arguments),this._formatted=null,this._fsPath=null}get fsPath(){return this._fsPath||(this._fsPath=b(this,!1)),this._fsPath}toString(e=!1){return e?C(this,!0):(this._formatted||(this._formatted=C(this,!1)),this._formatted)}toJSON(){const e={$mid:1};return this._fsPath&&(e.fsPath=this._fsPath,e._sep=g),this._formatted&&(e.external=this._formatted),this.path&&(e.path=this.path),this.scheme&&(e.scheme=this.scheme),this.authority&&(e.authority=this.authority),this.query&&(e.query=this.query),this.fragment&&(e.fragment=this.fragment),e}}const m={58:"%3A",47:"%2F",63:"%3F",35:"%23",91:"%5B",93:"%5D",64:"%40",33:"%21",36:"%24",38:"%26",39:"%27",40:"%28",41:"%29",42:"%2A",43:"%2B",44:"%2C",59:"%3B",61:"%3D",32:"%20"};function f(e,t){let n,i=-1;for(let o=0;o=97&&r<=122||r>=65&&r<=90||r>=48&&r<=57||45===r||46===r||95===r||126===r||t&&47===r)-1!==i&&(n+=encodeURIComponent(e.substring(i,o)),i=-1),void 0!==n&&(n+=e.charAt(o));else{void 0===n&&(n=e.substr(0,o));const t=m[r];void 0!==t?(-1!==i&&(n+=encodeURIComponent(e.substring(i,o)),i=-1),n+=t):-1===i&&(i=o)}}return-1!==i&&(n+=encodeURIComponent(e.substring(i))),void 0!==n?n:e}function _(e){let t;for(let n=0;n1&&"file"===e.scheme?`//${e.authority}${e.path}`:47===e.path.charCodeAt(0)&&(e.path.charCodeAt(1)>=65&&e.path.charCodeAt(1)<=90||e.path.charCodeAt(1)>=97&&e.path.charCodeAt(1)<=122)&&58===e.path.charCodeAt(2)?t?e.path.substr(1):e.path[1].toLowerCase()+e.path.substr(2):e.path,i.ED&&(n=n.replace(/\//g,"\\")),n}function C(e,t){const n=t?_:f;let i="",{scheme:o,authority:r,path:s,query:a,fragment:l}=e;if(o&&(i+=o,i+=":"),(r||"file"===o)&&(i+=c,i+=c),r){let e=r.indexOf("@");if(-1!==e){const t=r.substr(0,e);r=r.substr(e+1),e=t.indexOf(":"),-1===e?i+=n(t,!1):(i+=n(t.substr(0,e),!1),i+=":",i+=n(t.substr(e+1),!1)),i+="@"}r=r.toLowerCase(),e=r.indexOf(":"),-1===e?i+=n(r,!1):(i+=n(r.substr(0,e),!1),i+=r.substr(e))}if(s){if(s.length>=3&&47===s.charCodeAt(0)&&58===s.charCodeAt(2)){const e=s.charCodeAt(1);e>=65&&e<=90&&(s=`/${String.fromCharCode(e+32)}:${s.substr(3)}`)}else if(s.length>=2&&58===s.charCodeAt(1)){const e=s.charCodeAt(0);e>=65&&e<=90&&(s=`${String.fromCharCode(e+32)}:${s.substr(2)}`)}i+=n(s,!0)}return a&&(i+="?",i+=n(a,!1)),l&&(i+="#",i+=t?l:f(l,!1)),i}function v(e){try{return decodeURIComponent(e)}catch(t){return e.length>3?e.substr(0,3)+v(e.substr(3)):e}}const w=/(%[0-9A-Za-z][0-9A-Za-z])+/g;function y(e){return e.match(w)?e.replace(w,(e=>v(e))):e}},7746:(e,t,n)=>{"use strict";n.d(t,{X5:()=>i,Jq:()=>o,jG:()=>r});const i={ctrlCmd:!1,alt:!1};var o,r;!function(e){e[e.Blur=1]="Blur",e[e.Gesture=2]="Gesture",e[e.Other=3]="Other"}(o||(o={})),function(e){e[e.NONE=0]="NONE",e[e.FIRST=1]="FIRST",e[e.SECOND=2]="SECOND",e[e.LAST=3]="LAST"}(r||(r={}))},5552:(e,t,n)=>{"use strict";n.d(t,{H:()=>a});var i=n(9587),o={},r={},s=function(){function e(e){var t=this;this._languageId=e,this._loadingTriggered=!1,this._lazyLoadPromise=new Promise((function(e,n){t._lazyLoadPromiseResolve=e,t._lazyLoadPromiseReject=n}))}return e.getOrCreate=function(t){return r[t]||(r[t]=new e(t)),r[t]},e.prototype.whenLoaded=function(){return this._lazyLoadPromise},e.prototype.load=function(){var e=this;return this._loadingTriggered||(this._loadingTriggered=!0,o[this._languageId].loader().then((function(t){return e._lazyLoadPromiseResolve(t)}),(function(t){return e._lazyLoadPromiseReject(t)}))),this._lazyLoadPromise},e}();function a(e){var t=e.id;o[t]=e,i.Mj.register(e);var n=s.getOrCreate(t);i.Mj.setMonarchTokensProvider(t,n.whenLoaded().then((function(e){return e.language}))),i.Mj.onLanguage(t,(function(){n.load().then((function(e){i.Mj.setLanguageConfiguration(t,e.conf)}))}))}},9587:(e,t,n)=>{"use strict";n.d(t,{Mj:()=>i.languages});var i=n(1593)},3763:(e,t,n)=>{"use strict";n.r(t),(0,n(5552).H)({id:"javascript",extensions:[".js",".es6",".jsx",".mjs"],firstLine:"^#!.*\\bnode",filenames:["jakefile"],aliases:["JavaScript","javascript","js"],mimetypes:["text/javascript"],loader:function(){return n.e(134).then(n.bind(n,5810))}})},8307:(e,t,n)=>{"use strict";n.r(t),(0,n(5552).H)({id:"typescript",extensions:[".ts",".tsx"],aliases:["TypeScript","ts","typescript"],mimetypes:["text/typescript"],loader:function(){return n.e(717).then(n.bind(n,6717))}})},9052:(e,t,n)=>{"use strict";n.d(t,{V:()=>f,P:()=>p});var i=n(6268),o=n(4669),r=n(5976),s=n(1432);class a{constructor(e,t){this.chr=e,this.type=t,this.width=0}fulfill(e){this.width=e}}class l{constructor(e,t){this._bareFontInfo=e,this._requests=t,this._container=null,this._testElements=null}read(){this._createDomElements(),document.body.appendChild(this._container),this._readFromDomElements(),document.body.removeChild(this._container),this._container=null,this._testElements=null}_createDomElements(){const e=document.createElement("div");e.style.position="absolute",e.style.top="-50000px",e.style.width="50000px";const t=document.createElement("div");t.style.fontFamily=this._bareFontInfo.getMassagedFontFamily(),t.style.fontWeight=this._bareFontInfo.fontWeight,t.style.fontSize=this._bareFontInfo.fontSize+"px",t.style.fontFeatureSettings=this._bareFontInfo.fontFeatureSettings,t.style.lineHeight=this._bareFontInfo.lineHeight+"px",t.style.letterSpacing=this._bareFontInfo.letterSpacing+"px",e.appendChild(t);const n=document.createElement("div");n.style.fontFamily=this._bareFontInfo.getMassagedFontFamily(),n.style.fontWeight="bold",n.style.fontSize=this._bareFontInfo.fontSize+"px",n.style.fontFeatureSettings=this._bareFontInfo.fontFeatureSettings,n.style.lineHeight=this._bareFontInfo.lineHeight+"px",n.style.letterSpacing=this._bareFontInfo.letterSpacing+"px",e.appendChild(n);const i=document.createElement("div");i.style.fontFamily=this._bareFontInfo.getMassagedFontFamily(),i.style.fontWeight=this._bareFontInfo.fontWeight,i.style.fontSize=this._bareFontInfo.fontSize+"px",i.style.fontFeatureSettings=this._bareFontInfo.fontFeatureSettings,i.style.lineHeight=this._bareFontInfo.lineHeight+"px",i.style.letterSpacing=this._bareFontInfo.letterSpacing+"px",i.style.fontStyle="italic",e.appendChild(i);const o=[];for(const e of this._requests){let r;0===e.type&&(r=t),2===e.type&&(r=n),1===e.type&&(r=i),r.appendChild(document.createElement("br"));const s=document.createElement("span");l._render(s,e),r.appendChild(s),o.push(s)}this._container=e,this._testElements=o}static _render(e,t){if(" "===t.chr){let t=" ";for(let e=0;e<8;e++)t+=t;e.innerText=t}else{let n=t.chr;for(let e=0;e<8;e++)n+=n;e.textContent=n}}_readFromDomElements(){for(let e=0,t=this._requests.length;ethis._values[e]))}}function p(){m.INSTANCE.clearCache()}class m extends r.JT{constructor(){super(),this._onDidChange=this._register(new o.Q5),this.onDidChange=this._onDidChange.event,this._cache=new g,this._evictUntrustedReadingsTimeout=-1}dispose(){-1!==this._evictUntrustedReadingsTimeout&&(clearTimeout(this._evictUntrustedReadingsTimeout),this._evictUntrustedReadingsTimeout=-1),super.dispose()}clearCache(){this._cache=new g,this._onDidChange.fire()}_writeToCache(e,t){this._cache.put(e,t),t.isTrusted||-1!==this._evictUntrustedReadingsTimeout||(this._evictUntrustedReadingsTimeout=setTimeout((()=>{this._evictUntrustedReadingsTimeout=-1,this._evictUntrustedReadings()}),5e3))}_evictUntrustedReadings(){const e=this._cache.getValues();let t=!1;for(const n of e)n.isTrusted||(t=!0,this._cache.remove(n));t&&this._onDidChange.fire()}readConfiguration(e){if(!this._cache.has(e)){let t=m._actualReadConfiguration(e);(t.typicalHalfwidthCharacterWidth<=2||t.typicalFullwidthCharacterWidth<=2||t.spaceWidth<=2||t.maxDigitWidth<=2)&&(t=new u.pR({zoomLevel:i.px(),pixelRatio:i.mX(),fontFamily:t.fontFamily,fontWeight:t.fontWeight,fontSize:t.fontSize,fontFeatureSettings:t.fontFeatureSettings,lineHeight:t.lineHeight,letterSpacing:t.letterSpacing,isMonospace:t.isMonospace,typicalHalfwidthCharacterWidth:Math.max(t.typicalHalfwidthCharacterWidth,5),typicalFullwidthCharacterWidth:Math.max(t.typicalFullwidthCharacterWidth,5),canUseHalfwidthRightwardsArrow:t.canUseHalfwidthRightwardsArrow,spaceWidth:Math.max(t.spaceWidth,5),middotWidth:Math.max(t.middotWidth,5),wsmiddotWidth:Math.max(t.wsmiddotWidth,5),maxDigitWidth:Math.max(t.maxDigitWidth,5)},!1)),this._writeToCache(e,t)}return this._cache.get(e)}static createRequest(e,t,n,i){const o=new a(e,t);return n.push(o),i&&i.push(o),o}static _actualReadConfiguration(e){const t=[],n=[],o=this.createRequest("n",0,t,n),r=this.createRequest("m",0,t,null),s=this.createRequest(" ",0,t,n),a=this.createRequest("0",0,t,n),d=this.createRequest("1",0,t,n),c=this.createRequest("2",0,t,n),g=this.createRequest("3",0,t,n),p=this.createRequest("4",0,t,n),m=this.createRequest("5",0,t,n),f=this.createRequest("6",0,t,n),_=this.createRequest("7",0,t,n),b=this.createRequest("8",0,t,n),C=this.createRequest("9",0,t,n),v=this.createRequest("→",0,t,n),w=this.createRequest("→",0,t,null),y=this.createRequest("·",0,t,n),A=this.createRequest(String.fromCharCode(11825),0,t,null);this.createRequest("|",0,t,n),this.createRequest("/",0,t,n),this.createRequest("-",0,t,n),this.createRequest("_",0,t,n),this.createRequest("i",0,t,n),this.createRequest("l",0,t,n),this.createRequest("m",0,t,n),this.createRequest("|",1,t,n),this.createRequest("_",1,t,n),this.createRequest("i",1,t,n),this.createRequest("l",1,t,n),this.createRequest("m",1,t,n),this.createRequest("n",1,t,n),this.createRequest("|",2,t,n),this.createRequest("_",2,t,n),this.createRequest("i",2,t,n),this.createRequest("l",2,t,n),this.createRequest("m",2,t,n),this.createRequest("n",2,t,n),function(e,t){new l(e,t).read()}(e,t);const S=Math.max(a.width,d.width,c.width,g.width,p.width,m.width,f.width,_.width,b.width,C.width);let x=e.fontFeatureSettings===h.n0.OFF;const k=n[0].width;for(let e=1,t=n.length;x&&e.001){x=!1;break}}let L=!0;x&&w.width!==k&&(L=!1),w.width>v.width&&(L=!1);const E=i.WP()>2e3;return new u.pR({zoomLevel:i.px(),pixelRatio:i.mX(),fontFamily:e.fontFamily,fontWeight:e.fontWeight,fontSize:e.fontSize,fontFeatureSettings:e.fontFeatureSettings,lineHeight:e.lineHeight,letterSpacing:e.letterSpacing,isMonospace:x,typicalHalfwidthCharacterWidth:o.width,typicalFullwidthCharacterWidth:r.width,canUseHalfwidthRightwardsArrow:L,spaceWidth:s.width,middotWidth:y.width,wsmiddotWidth:A.width,maxDigitWidth:S},E)}}m.INSTANCE=new m;class f extends c.fv{constructor(e,t,n=null,o){super(e,t),this.accessibilityService=o,this._elementSizeObserver=this._register(new d.I(n,t.dimension,(()=>this._recomputeOptions()))),this._register(m.INSTANCE.onDidChange((()=>this._recomputeOptions()))),this._validatedOptions.get(10)&&this._elementSizeObserver.startObserving(),this._register(i.fX((e=>this._recomputeOptions()))),this._register(this.accessibilityService.onDidChangeScreenReaderOptimized((()=>this._recomputeOptions()))),this._recomputeOptions()}static applyFontInfoSlow(e,t){e.style.fontFamily=t.getMassagedFontFamily(),e.style.fontWeight=t.fontWeight,e.style.fontSize=t.fontSize+"px",e.style.fontFeatureSettings=t.fontFeatureSettings,e.style.lineHeight=t.lineHeight+"px",e.style.letterSpacing=t.letterSpacing+"px"}static applyFontInfo(e,t){e.setFontFamily(t.getMassagedFontFamily()),e.setFontWeight(t.fontWeight),e.setFontSize(t.fontSize),e.setFontFeatureSettings(t.fontFeatureSettings),e.setLineHeight(t.lineHeight),e.setLetterSpacing(t.letterSpacing)}observeReferenceElement(e){this._elementSizeObserver.observe(e)}updatePixelRatio(){this._recomputeOptions()}static _getExtraEditorClassName(){let e="";return i.G6||i.MG||(e+="no-user-select "),i.G6&&(e+="no-minimap-shadow "),s.dz&&(e+="mac "),e}_getEnvConfiguration(){return{extraEditorClassName:f._getExtraEditorClassName(),outerWidth:this._elementSizeObserver.getWidth(),outerHeight:this._elementSizeObserver.getHeight(),emptySelectionClipboard:i.Pf||i.vU,pixelRatio:i.mX(),zoomLevel:i.px(),accessibilitySupport:this.accessibilityService.isScreenReaderOptimized()?2:this.accessibilityService.getAccessibilitySupport()}}readConfiguration(e){return m.INSTANCE.readConfiguration(e)}}},4534:(e,t,n)=>{"use strict";n.d(t,{I:()=>o});var i=n(5976);class o extends i.JT{constructor(e,t,n){super(),this.referenceDomElement=e,this.changeCallback=n,this.width=-1,this.height=-1,this.resizeObserver=null,this.measureReferenceDomElementToken=-1,this.measureReferenceDomElement(!1,t)}dispose(){this.stopObserving(),super.dispose()}getWidth(){return this.width}getHeight(){return this.height}startObserving(){"undefined"!=typeof ResizeObserver?!this.resizeObserver&&this.referenceDomElement&&(this.resizeObserver=new ResizeObserver((e=>{e&&e[0]&&e[0].contentRect?this.observe({width:e[0].contentRect.width,height:e[0].contentRect.height}):this.observe()})),this.resizeObserver.observe(this.referenceDomElement)):-1===this.measureReferenceDomElementToken&&(this.measureReferenceDomElementToken=setInterval((()=>this.observe()),100))}stopObserving(){this.resizeObserver&&(this.resizeObserver.disconnect(),this.resizeObserver=null),-1!==this.measureReferenceDomElementToken&&(clearInterval(this.measureReferenceDomElementToken),this.measureReferenceDomElementToken=-1)}observe(e){this.measureReferenceDomElement(!0,e)}measureReferenceDomElement(e,t){let n=0,i=0;t?(n=t.width,i=t.height):this.referenceDomElement&&(n=this.referenceDomElement.clientWidth,i=this.referenceDomElement.clientHeight),n=Math.max(5,n),i=Math.max(5,i),this.width===n&&this.height===i||(this.width=n,this.height=i,e&&this.changeCallback())}}},8728:(e,t,n)=>{"use strict";n.r(t),n.d(t,{CoreEditingCommands:()=>L,CoreEditorCommand:()=>y,CoreNavigationCommands:()=>m,EditorScroll_:()=>g,RevealLine_:()=>p});var i=n(3580),o=n(6268),r=n(8401),s=n(6346),a=n(6830),l=n(1640),d=n(3181),c=n(187),h=n(4314);class u{static columnSelect(e,t,n,i,o,r){let s=Math.abs(o-n)+1,a=n>o,l=i>r,u=ir)continue;if(_i)continue;if(f0&&i--,u.columnSelect(e,t,n.fromViewLineNumber,n.fromViewVisualColumn,n.toViewLineNumber,i)}static columnSelectRight(e,t,n){let i=0;const o=Math.min(n.fromViewLineNumber,n.toViewLineNumber),r=Math.max(n.fromViewLineNumber,n.toViewLineNumber);for(let n=o;n<=r;n++){const o=t.getLineMaxColumn(n),r=d.io.visibleColumnFromColumn2(e,t,new c.L(n,o));i=Math.max(i,r)}let s=n.toViewVisualColumn;return s{const n=e.get(l.$).getFocusedCodeEditor();return!(!n||!n.hasTextFocus())&&this._runEditorCommand(e,n,t)})),e.addImplementation(1e3,"generic-dom-input-textarea",((e,t)=>{const n=document.activeElement;return!!(n&&["input","textarea"].indexOf(n.tagName.toLowerCase())>=0)&&(this.runDOMCommand(),!0)})),e.addImplementation(0,"generic-dom",((e,t)=>{const n=e.get(l.$).getActiveCodeEditor();return!!n&&(n.focus(),this._runEditorCommand(e,n,t))}))}_runEditorCommand(e,t,n){return this.runEditorCommand(e,t,n)||!0}}!function(e){class t extends y{constructor(e){super(e),this._inSelectionMode=e.inSelectionMode}runCoreEditorCommand(e,t){e.model.pushStackElement(),e.setCursorStates(t.source,3,[_.P.moveTo(e,e.getPrimaryCursorState(),this._inSelectionMode,t.position,t.viewPosition)]),e.revealPrimaryCursor(t.source,!0)}}e.MoveTo=(0,a.fK)(new t({id:"_moveTo",inSelectionMode:!1,precondition:void 0})),e.MoveToSelect=(0,a.fK)(new t({id:"_moveToSelect",inSelectionMode:!0,precondition:void 0}));class n extends y{runCoreEditorCommand(e,t){e.model.pushStackElement();const n=this._getColumnSelectResult(e,e.getPrimaryCursorState(),e.getCursorColumnSelectData(),t);e.setCursorStates(t.source,3,n.viewStates.map((e=>d.Vi.fromViewState(e)))),e.setCursorColumnSelectData({isReal:!0,fromViewLineNumber:n.fromLineNumber,fromViewVisualColumn:n.fromVisualColumn,toViewLineNumber:n.toLineNumber,toViewVisualColumn:n.toVisualColumn}),n.reversed?e.revealTopMostCursor(t.source):e.revealBottomMostCursor(t.source)}}e.ColumnSelect=(0,a.fK)(new class extends n{constructor(){super({id:"columnSelect",precondition:void 0})}_getColumnSelectResult(e,t,n,i){const o=e.model.validatePosition(i.position),r=e.coordinatesConverter.validateViewPosition(new c.L(i.viewPosition.lineNumber,i.viewPosition.column),o);let s=i.doColumnSelect?n.fromViewLineNumber:r.lineNumber,a=i.doColumnSelect?n.fromViewVisualColumn:i.mouseColumn-1;return u.columnSelect(e.cursorConfig,e,s,a,r.lineNumber,i.mouseColumn-1)}}),e.CursorColumnSelectLeft=(0,a.fK)(new class extends n{constructor(){super({id:"cursorColumnSelectLeft",precondition:void 0,kbOpts:{weight:0,kbExpr:C.u.textInputFocus,primary:3599,linux:{primary:0}}})}_getColumnSelectResult(e,t,n,i){return u.columnSelectLeft(e.cursorConfig,e,n)}}),e.CursorColumnSelectRight=(0,a.fK)(new class extends n{constructor(){super({id:"cursorColumnSelectRight",precondition:void 0,kbOpts:{weight:0,kbExpr:C.u.textInputFocus,primary:3601,linux:{primary:0}}})}_getColumnSelectResult(e,t,n,i){return u.columnSelectRight(e.cursorConfig,e,n)}});class r extends n{constructor(e){super(e),this._isPaged=e.isPaged}_getColumnSelectResult(e,t,n,i){return u.columnSelectUp(e.cursorConfig,e,n,this._isPaged)}}e.CursorColumnSelectUp=(0,a.fK)(new r({isPaged:!1,id:"cursorColumnSelectUp",precondition:void 0,kbOpts:{weight:0,kbExpr:C.u.textInputFocus,primary:3600,linux:{primary:0}}})),e.CursorColumnSelectPageUp=(0,a.fK)(new r({isPaged:!0,id:"cursorColumnSelectPageUp",precondition:void 0,kbOpts:{weight:0,kbExpr:C.u.textInputFocus,primary:3595,linux:{primary:0}}}));class l extends n{constructor(e){super(e),this._isPaged=e.isPaged}_getColumnSelectResult(e,t,n,i){return u.columnSelectDown(e.cursorConfig,e,n,this._isPaged)}}e.CursorColumnSelectDown=(0,a.fK)(new l({isPaged:!1,id:"cursorColumnSelectDown",precondition:void 0,kbOpts:{weight:0,kbExpr:C.u.textInputFocus,primary:3602,linux:{primary:0}}})),e.CursorColumnSelectPageDown=(0,a.fK)(new l({isPaged:!0,id:"cursorColumnSelectPageDown",precondition:void 0,kbOpts:{weight:0,kbExpr:C.u.textInputFocus,primary:3596,linux:{primary:0}}}));class m extends y{constructor(){super({id:"cursorMove",precondition:void 0,description:_.N.description})}runCoreEditorCommand(e,t){const n=_.N.parse(t);n&&this._runCursorMove(e,t.source,n)}_runCursorMove(e,t,n){e.model.pushStackElement(),e.setCursorStates(t,3,m._move(e,e.getCursorStates(),n)),e.revealPrimaryCursor(t,!0)}static _move(e,t,n){const i=n.select,o=n.value;switch(n.direction){case 0:case 1:case 2:case 3:case 4:case 5:case 6:case 7:case 8:case 9:case 10:return _.P.simpleMove(e,t,n.direction,i,o,n.unit);case 11:case 13:case 12:case 14:return _.P.viewportMove(e,t,n.direction,i,o);default:return null}}}e.CursorMoveImpl=m,e.CursorMove=(0,a.fK)(new m);class f extends y{constructor(e){super(e),this._staticArgs=e.args}runCoreEditorCommand(e,t){let n=this._staticArgs;-1===this._staticArgs.value&&(n={direction:this._staticArgs.direction,unit:this._staticArgs.unit,select:this._staticArgs.select,value:e.cursorConfig.pageSize}),e.model.pushStackElement(),e.setCursorStates(t.source,3,_.P.simpleMove(e,e.getCursorStates(),n.direction,n.select,n.value,n.unit)),e.revealPrimaryCursor(t.source,!0)}}e.CursorLeft=(0,a.fK)(new f({args:{direction:0,unit:0,select:!1,value:1},id:"cursorLeft",precondition:void 0,kbOpts:{weight:0,kbExpr:C.u.textInputFocus,primary:15,mac:{primary:15,secondary:[288]}}})),e.CursorLeftSelect=(0,a.fK)(new f({args:{direction:0,unit:0,select:!0,value:1},id:"cursorLeftSelect",precondition:void 0,kbOpts:{weight:0,kbExpr:C.u.textInputFocus,primary:1039}})),e.CursorRight=(0,a.fK)(new f({args:{direction:1,unit:0,select:!1,value:1},id:"cursorRight",precondition:void 0,kbOpts:{weight:0,kbExpr:C.u.textInputFocus,primary:17,mac:{primary:17,secondary:[292]}}})),e.CursorRightSelect=(0,a.fK)(new f({args:{direction:1,unit:0,select:!0,value:1},id:"cursorRightSelect",precondition:void 0,kbOpts:{weight:0,kbExpr:C.u.textInputFocus,primary:1041}})),e.CursorUp=(0,a.fK)(new f({args:{direction:2,unit:2,select:!1,value:1},id:"cursorUp",precondition:void 0,kbOpts:{weight:0,kbExpr:C.u.textInputFocus,primary:16,mac:{primary:16,secondary:[302]}}})),e.CursorUpSelect=(0,a.fK)(new f({args:{direction:2,unit:2,select:!0,value:1},id:"cursorUpSelect",precondition:void 0,kbOpts:{weight:0,kbExpr:C.u.textInputFocus,primary:1040,secondary:[3088],mac:{primary:1040},linux:{primary:1040}}})),e.CursorPageUp=(0,a.fK)(new f({args:{direction:2,unit:2,select:!1,value:-1},id:"cursorPageUp",precondition:void 0,kbOpts:{weight:0,kbExpr:C.u.textInputFocus,primary:11}})),e.CursorPageUpSelect=(0,a.fK)(new f({args:{direction:2,unit:2,select:!0,value:-1},id:"cursorPageUpSelect",precondition:void 0,kbOpts:{weight:0,kbExpr:C.u.textInputFocus,primary:1035}})),e.CursorDown=(0,a.fK)(new f({args:{direction:3,unit:2,select:!1,value:1},id:"cursorDown",precondition:void 0,kbOpts:{weight:0,kbExpr:C.u.textInputFocus,primary:18,mac:{primary:18,secondary:[300]}}})),e.CursorDownSelect=(0,a.fK)(new f({args:{direction:3,unit:2,select:!0,value:1},id:"cursorDownSelect",precondition:void 0,kbOpts:{weight:0,kbExpr:C.u.textInputFocus,primary:1042,secondary:[3090],mac:{primary:1042},linux:{primary:1042}}})),e.CursorPageDown=(0,a.fK)(new f({args:{direction:3,unit:2,select:!1,value:-1},id:"cursorPageDown",precondition:void 0,kbOpts:{weight:0,kbExpr:C.u.textInputFocus,primary:12}})),e.CursorPageDownSelect=(0,a.fK)(new f({args:{direction:3,unit:2,select:!0,value:-1},id:"cursorPageDownSelect",precondition:void 0,kbOpts:{weight:0,kbExpr:C.u.textInputFocus,primary:1036}})),e.CreateCursor=(0,a.fK)(new class extends y{constructor(){super({id:"createCursor",precondition:void 0})}runCoreEditorCommand(e,t){let n;n=t.wholeLine?_.P.line(e,e.getPrimaryCursorState(),!1,t.position,t.viewPosition):_.P.moveTo(e,e.getPrimaryCursorState(),!1,t.position,t.viewPosition);const i=e.getCursorStates();if(i.length>1){const o=n.modelState?n.modelState.position:null,r=n.viewState?n.viewState.position:null;for(let n=0,s=i.length;nr&&(o=r);const s=new h.e(o,1,o,e.model.getLineMaxColumn(o));let a=0;if(n.at)switch(n.at){case p.RawAtArgument.Top:a=3;break;case p.RawAtArgument.Center:a=1;break;case p.RawAtArgument.Bottom:a=4}const l=e.coordinatesConverter.convertModelRangeToViewRange(s);e.revealRange(t.source,!1,l,a,0)}}),e.SelectAll=new class extends A{constructor(){super(a.Sq)}runDOMCommand(){o.vU&&(document.activeElement.focus(),document.activeElement.select()),document.execCommand("selectAll")}runEditorCommand(e,t,n){const i=t._getViewModel();i&&this.runCoreEditorCommand(i,n)}runCoreEditorCommand(e,t){e.model.pushStackElement(),e.setCursorStates("keyboard",3,[_.P.selectAll(e,e.getPrimaryCursorState())])}},e.SetSelection=(0,a.fK)(new class extends y{constructor(){super({id:"setSelection",precondition:void 0})}runCoreEditorCommand(e,t){e.model.pushStackElement(),e.setCursorStates(t.source,3,[d.Vi.fromModelSelection(t.selection)])}})}(m||(m={}));const S=v.Ao.and(C.u.textInputFocus,C.u.columnSelection);function x(e,t){w.W.registerKeybindingRule({id:e,primary:t,when:S,weight:1})}function k(e){return e.register(),e}var L;x(m.CursorColumnSelectLeft.id,1039),x(m.CursorColumnSelectRight.id,1041),x(m.CursorColumnSelectUp.id,1040),x(m.CursorColumnSelectPageUp.id,1035),x(m.CursorColumnSelectDown.id,1042),x(m.CursorColumnSelectPageDown.id,1036),function(e){class t extends a._l{runEditorCommand(e,t,n){const i=t._getViewModel();i&&this.runCoreEditingCommand(t,i,n||{})}}e.CoreEditingCommand=t,e.LineBreakInsert=(0,a.fK)(new class extends t{constructor(){super({id:"lineBreakInsert",precondition:C.u.writable,kbOpts:{weight:0,kbExpr:C.u.textInputFocus,primary:0,mac:{primary:301}}})}runCoreEditingCommand(e,t,n){e.pushUndoStop(),e.executeCommands(this.id,b.u.lineBreakInsert(t.cursorConfig,t.model,t.getCursorStates().map((e=>e.modelState.selection))))}}),e.Outdent=(0,a.fK)(new class extends t{constructor(){super({id:"outdent",precondition:C.u.writable,kbOpts:{weight:0,kbExpr:v.Ao.and(C.u.editorTextFocus,C.u.tabDoesNotMoveFocus),primary:1026}})}runCoreEditingCommand(e,t,n){e.pushUndoStop(),e.executeCommands(this.id,b.u.outdent(t.cursorConfig,t.model,t.getCursorStates().map((e=>e.modelState.selection)))),e.pushUndoStop()}}),e.Tab=(0,a.fK)(new class extends t{constructor(){super({id:"tab",precondition:C.u.writable,kbOpts:{weight:0,kbExpr:v.Ao.and(C.u.editorTextFocus,C.u.tabDoesNotMoveFocus),primary:2}})}runCoreEditingCommand(e,t,n){e.pushUndoStop(),e.executeCommands(this.id,b.u.tab(t.cursorConfig,t.model,t.getCursorStates().map((e=>e.modelState.selection)))),e.pushUndoStop()}}),e.DeleteLeft=(0,a.fK)(new class extends t{constructor(){super({id:"deleteLeft",precondition:void 0,kbOpts:{weight:0,kbExpr:C.u.textInputFocus,primary:1,secondary:[1025],mac:{primary:1,secondary:[1025,294,257]}}})}runCoreEditingCommand(e,t,n){const[i,o]=f.A.deleteLeft(t.getPrevEditOperationType(),t.cursorConfig,t.model,t.getCursorStates().map((e=>e.modelState.selection)),t.getCursorAutoClosedCharacters());i&&e.pushUndoStop(),e.executeCommands(this.id,o),t.setPrevEditOperationType(2)}}),e.DeleteRight=(0,a.fK)(new class extends t{constructor(){super({id:"deleteRight",precondition:void 0,kbOpts:{weight:0,kbExpr:C.u.textInputFocus,primary:20,mac:{primary:20,secondary:[290,276]}}})}runCoreEditingCommand(e,t,n){const[i,o]=f.A.deleteRight(t.getPrevEditOperationType(),t.cursorConfig,t.model,t.getCursorStates().map((e=>e.modelState.selection)));i&&e.pushUndoStop(),e.executeCommands(this.id,o),t.setPrevEditOperationType(3)}}),e.Undo=new class extends A{constructor(){super(a.n_)}runDOMCommand(){document.execCommand("undo")}runEditorCommand(e,t,n){if(t.hasModel()&&!0!==t.getOption(79))return t.getModel().undo()}},e.Redo=new class extends A{constructor(){super(a.kz)}runDOMCommand(){document.execCommand("redo")}runEditorCommand(e,t,n){if(t.hasModel()&&!0!==t.getOption(79))return t.getModel().redo()}}}(L||(L={}));class E extends a.mY{constructor(e,t,n){super({id:e,precondition:void 0,description:n}),this._handlerId=t}runCommand(e,t){const n=e.get(l.$).getFocusedCodeEditor();n&&n.trigger("keyboard",this._handlerId,t)}}function N(e,t){k(new E("default:"+e,e)),k(new E(e,e,t))}N("type",{description:"Type",args:[{name:"args",schema:{type:"object",required:["text"],properties:{text:{type:"string"}}}}]}),N("replacePreviousChar"),N("compositionType"),N("compositionStart"),N("compositionEnd"),N("paste"),N("cut")},5715:(e,t,n)=>{"use strict";n.d(t,{pd:()=>i,RA:()=>m,Nl:()=>f,Fz:()=>_});var i,o=n(6268),r=n(5321),s=n(5393),a=n(4669),l=n(5976),d=n(1170),c=n(1432),h=n(7295),u=n(5887),g=n(187),p=n(3860);!function(e){e.Tap="-monaco-textarea-synthetic-tap"}(i||(i={}));const m={forceCopyWithSyntaxHighlighting:!1};class f{constructor(){this._lastState=null}set(e,t){this._lastState={lastCopiedValue:e,data:t}}get(e){return this._lastState&&this._lastState.lastCopiedValue===e?this._lastState.data:(this._lastState=null,null)}}f.INSTANCE=new f;class _ extends l.JT{constructor(e,t){super(),this.textArea=t,this._onFocus=this._register(new a.Q5),this.onFocus=this._onFocus.event,this._onBlur=this._register(new a.Q5),this.onBlur=this._onBlur.event,this._onKeyDown=this._register(new a.Q5),this.onKeyDown=this._onKeyDown.event,this._onKeyUp=this._register(new a.Q5),this.onKeyUp=this._onKeyUp.event,this._onCut=this._register(new a.Q5),this.onCut=this._onCut.event,this._onPaste=this._register(new a.Q5),this.onPaste=this._onPaste.event,this._onType=this._register(new a.Q5),this.onType=this._onType.event,this._onCompositionStart=this._register(new a.Q5),this.onCompositionStart=this._onCompositionStart.event,this._onCompositionUpdate=this._register(new a.Q5),this.onCompositionUpdate=this._onCompositionUpdate.event,this._onCompositionEnd=this._register(new a.Q5),this.onCompositionEnd=this._onCompositionEnd.event,this._onSelectionChangeRequest=this._register(new a.Q5),this.onSelectionChangeRequest=this._onSelectionChangeRequest.event,this._host=e,this._textArea=this._register(new C(t)),this._asyncTriggerCut=this._register(new s.pY((()=>this._onCut.fire()),0)),this._asyncFocusGainWriteScreenReaderContent=this._register(new s.pY((()=>this.writeScreenReaderContent("asyncFocusGain")),0)),this._textAreaState=u.un.EMPTY,this._selectionChangeListener=null,this.writeScreenReaderContent("ctor"),this._hasFocus=!1,this._isDoingComposition=!1,this._nextCommand=0;let n=null;this._register(r.mu(t.domNode,"keydown",(e=>{(109===e.keyCode||this._isDoingComposition&&1===e.keyCode)&&e.stopPropagation(),e.equals(9)&&e.preventDefault(),n=e,this._onKeyDown.fire(e)}))),this._register(r.mu(t.domNode,"keyup",(e=>{this._onKeyUp.fire(e)}))),this._register(r.nm(t.domNode,"compositionstart",(e=>{if(u.al&&console.log("[compositionstart]",e),!this._isDoingComposition){if(this._isDoingComposition=!0,c.dz&&this._textAreaState.selectionStart===this._textAreaState.selectionEnd&&this._textAreaState.selectionStart>0&&this._textAreaState.value.substr(this._textAreaState.selectionStart-1,1)===e.data&&(n&&n.equals(109)&&("ArrowRight"===n.code||"ArrowLeft"===n.code)||o.vU))return u.al&&console.log("[compositionstart] Handling long press case on macOS + arrow key or Firefox",e),this._textAreaState=new u.un(this._textAreaState.value,this._textAreaState.selectionStart-1,this._textAreaState.selectionEnd,this._textAreaState.selectionStartPosition?new g.L(this._textAreaState.selectionStartPosition.lineNumber,this._textAreaState.selectionStartPosition.column-1):null,this._textAreaState.selectionEndPosition),void this._onCompositionStart.fire({revealDeltaColumns:-1});o.Dt?this._onCompositionStart.fire({revealDeltaColumns:-this._textAreaState.selectionStart}):(this._setAndWriteTextAreaState("compositionstart",u.un.EMPTY),this._onCompositionStart.fire({revealDeltaColumns:0}))}})));const l=e=>{const t=this._textAreaState,n=u.un.readFromTextArea(this._textArea);return[n,u.un.deduceInput(t,n,e)]},d=()=>{const e=this._textAreaState,t=u.un.readFromTextArea(this._textArea);return[t,u.un.deduceAndroidCompositionInput(e,t)]},p=e=>{const t=this._textAreaState,n=u.un.selectedText(e);return[n,{text:n.value,replacePrevCharCnt:t.selectionEnd-t.selectionStart,replaceNextCharCnt:0,positionDelta:0}]};this._register(r.nm(t.domNode,"compositionupdate",(e=>{if(u.al&&console.log("[compositionupdate]",e),o.Dt){const[t,n]=d();return this._textAreaState=t,this._onType.fire(n),void this._onCompositionUpdate.fire(e)}const[t,n]=p(e.data||"");this._textAreaState=t,this._onType.fire(n),this._onCompositionUpdate.fire(e)}))),this._register(r.nm(t.domNode,"compositionend",(e=>{if(u.al&&console.log("[compositionend]",e),!this._isDoingComposition)return;if(this._isDoingComposition=!1,o.Dt){const[e,t]=d();return this._textAreaState=e,this._onType.fire(t),void this._onCompositionEnd.fire()}const[t,n]=p(e.data||"");this._textAreaState=t,this._onType.fire(n),(o.i7||o.vU)&&(this._textAreaState=u.un.readFromTextArea(this._textArea)),this._onCompositionEnd.fire()}))),this._register(r.nm(t.domNode,"input",(()=>{if(this._textArea.setIgnoreSelectionChangeTime("received input event"),this._isDoingComposition)return;const[e,t]=l(c.dz);0===t.replacePrevCharCnt&&1===t.text.length&&h.ZG(t.text.charCodeAt(0))||(this._textAreaState=e,0===this._nextCommand?""===t.text&&0===t.replacePrevCharCnt||this._onType.fire(t):(""===t.text&&0===t.replacePrevCharCnt||this._firePaste(t.text,null),this._nextCommand=0))}))),this._register(r.nm(t.domNode,"cut",(e=>{this._textArea.setIgnoreSelectionChangeTime("received cut event"),this._ensureClipboardGetsEditorSelection(e),this._asyncTriggerCut.schedule()}))),this._register(r.nm(t.domNode,"copy",(e=>{this._ensureClipboardGetsEditorSelection(e)}))),this._register(r.nm(t.domNode,"paste",(e=>{if(this._textArea.setIgnoreSelectionChangeTime("received paste event"),b.canUseTextData(e)){const[t,n]=b.getTextData(e);""!==t&&this._firePaste(t,n)}else this._textArea.getSelectionStart()!==this._textArea.getSelectionEnd()&&this._setAndWriteTextAreaState("paste",u.un.EMPTY),this._nextCommand=1}))),this._register(r.nm(t.domNode,"focus",(()=>{const e=this._hasFocus;this._setHasFocus(!0),o.G6&&!e&&this._hasFocus&&this._asyncFocusGainWriteScreenReaderContent.schedule()}))),this._register(r.nm(t.domNode,"blur",(()=>{this._isDoingComposition&&(this._isDoingComposition=!1,this.writeScreenReaderContent("blurWithoutCompositionEnd"),this._onCompositionEnd.fire()),this._setHasFocus(!1)}))),this._register(r.nm(t.domNode,i.Tap,(()=>{o.Dt&&this._isDoingComposition&&(this._isDoingComposition=!1,this.writeScreenReaderContent("tapWithoutCompositionEnd"),this._onCompositionEnd.fire())})))}_installSelectionChangeListener(){let e=0;return r.nm(document,"selectionchange",(t=>{if(!this._hasFocus)return;if(this._isDoingComposition)return;if(!o.i7)return;const n=Date.now(),i=n-e;if(e=n,i<5)return;const r=n-this._textArea.getIgnoreSelectionChangeTime();if(this._textArea.resetSelectionChangeTime(),r<100)return;if(!this._textAreaState.selectionStartPosition||!this._textAreaState.selectionEndPosition)return;const s=this._textArea.getValue();if(this._textAreaState.value!==s)return;const a=this._textArea.getSelectionStart(),l=this._textArea.getSelectionEnd();if(this._textAreaState.selectionStart===a&&this._textAreaState.selectionEnd===l)return;const d=this._textAreaState.deduceEditorPosition(a),c=this._host.deduceModelPosition(d[0],d[1],d[2]),h=this._textAreaState.deduceEditorPosition(l),u=this._host.deduceModelPosition(h[0],h[1],h[2]),g=new p.Y(c.lineNumber,c.column,u.lineNumber,u.column);this._onSelectionChangeRequest.fire(g)}))}dispose(){super.dispose(),this._selectionChangeListener&&(this._selectionChangeListener.dispose(),this._selectionChangeListener=null)}focusTextArea(){this._setHasFocus(!0),this.refreshFocusState()}isFocused(){return this._hasFocus}refreshFocusState(){const e=r.Ay(this.textArea.domNode);e?this._setHasFocus(e.activeElement===this.textArea.domNode):r.Uw(this.textArea.domNode)?this._setHasFocus(document.activeElement===this.textArea.domNode):this._setHasFocus(!1)}_setHasFocus(e){this._hasFocus!==e&&(this._hasFocus=e,this._selectionChangeListener&&(this._selectionChangeListener.dispose(),this._selectionChangeListener=null),this._hasFocus&&(this._selectionChangeListener=this._installSelectionChangeListener()),this._hasFocus&&this.writeScreenReaderContent("focusgain"),this._hasFocus?this._onFocus.fire():this._onBlur.fire())}_setAndWriteTextAreaState(e,t){this._hasFocus||(t=t.collapseSelection()),t.writeToTextArea(e,this._textArea,this._hasFocus),this._textAreaState=t}writeScreenReaderContent(e){this._isDoingComposition||this._setAndWriteTextAreaState(e,this._host.getScreenReaderContent(this._textAreaState))}_ensureClipboardGetsEditorSelection(e){const t=this._host.getDataToCopy(b.canUseTextData(e)),n={version:1,isFromEmptySelection:t.isFromEmptySelection,multicursorText:t.multicursorText,mode:t.mode};f.INSTANCE.set(o.vU?t.text.replace(/\r\n/g,"\n"):t.text,n),b.canUseTextData(e)?b.setTextData(e,t.text,t.html,n):this._setAndWriteTextAreaState("copy or cut",u.un.selectedText(t.text))}_firePaste(e,t){t||(t=f.INSTANCE.get(e)),this._onPaste.fire({text:e,metadata:t})}}class b{static canUseTextData(e){return!!e.clipboardData||!!window.clipboardData}static getTextData(e){if(e.clipboardData){e.preventDefault();const t=e.clipboardData.getData(d.vW.text);let n=null;const i=e.clipboardData.getData("vscode-editor-data");if("string"==typeof i)try{n=JSON.parse(i),1!==n.version&&(n=null)}catch(e){}return[t,n]}if(window.clipboardData)return e.preventDefault(),[window.clipboardData.getData("Text"),null];throw new Error("ClipboardEventUtils.getTextData: Cannot use text data!")}static setTextData(e,t,n,i){if(e.clipboardData)return e.clipboardData.setData(d.vW.text,t),"string"==typeof n&&e.clipboardData.setData("text/html",n),e.clipboardData.setData("vscode-editor-data",JSON.stringify(i)),void e.preventDefault();if(window.clipboardData)return window.clipboardData.setData("Text",t),void e.preventDefault();throw new Error("ClipboardEventUtils.setTextData: Cannot use text data!")}}class C extends l.JT{constructor(e){super(),this._actual=e,this._ignoreSelectionChangeTime=0}setIgnoreSelectionChangeTime(e){this._ignoreSelectionChangeTime=Date.now()}getIgnoreSelectionChangeTime(){return this._ignoreSelectionChangeTime}resetSelectionChangeTime(){this._ignoreSelectionChangeTime=0}getValue(){return this._actual.domNode.value}setValue(e,t){const n=this._actual.domNode;n.value!==t&&(this.setIgnoreSelectionChangeTime("setValue"),n.value=t)}getSelectionStart(){return"backward"===this._actual.domNode.selectionDirection?this._actual.domNode.selectionEnd:this._actual.domNode.selectionStart}getSelectionEnd(){return"backward"===this._actual.domNode.selectionDirection?this._actual.domNode.selectionStart:this._actual.domNode.selectionEnd}setSelectionRange(e,t,n){const i=this._actual.domNode;let s=null;const a=r.Ay(i);s=a?a.activeElement:document.activeElement;const l=s===i,d=i.selectionStart,c=i.selectionEnd;if(l&&d===t&&c===n)o.vU&&window.parent!==window&&i.focus();else{if(l)return this.setIgnoreSelectionChangeTime("setSelectionRange"),i.setSelectionRange(t,n),void(o.vU&&window.parent!==window&&i.focus());try{const e=r.vL(i);this.setIgnoreSelectionChangeTime("setSelectionRange"),i.focus(),i.setSelectionRange(t,n),r._0(i,e)}catch(e){}}}}},5887:(e,t,n)=>{"use strict";n.d(t,{al:()=>s,un:()=>a,ee:()=>l});var i=n(7295),o=n(187),r=n(4314);const s=!1;class a{constructor(e,t,n,i,o){this.value=e,this.selectionStart=t,this.selectionEnd=n,this.selectionStartPosition=i,this.selectionEndPosition=o}toString(){return"[ <"+this.value+">, selectionStart: "+this.selectionStart+", selectionEnd: "+this.selectionEnd+"]"}static readFromTextArea(e){return new a(e.getValue(),e.getSelectionStart(),e.getSelectionEnd(),null,null)}collapseSelection(){return new a(this.value,this.value.length,this.value.length,null,null)}writeToTextArea(e,t,n){s&&console.log("writeToTextArea "+e+": "+this.toString()),t.setValue(e,this.value),n&&t.setSelectionRange(e,this.selectionStart,this.selectionEnd)}deduceEditorPosition(e){if(e<=this.selectionStart){const t=this.value.substring(e,this.selectionStart);return this._finishDeduceEditorPosition(this.selectionStartPosition,t,-1)}if(e>=this.selectionEnd){const t=this.value.substring(this.selectionEnd,e);return this._finishDeduceEditorPosition(this.selectionEndPosition,t,1)}const t=this.value.substring(this.selectionStart,e);if(-1===t.indexOf(String.fromCharCode(8230)))return this._finishDeduceEditorPosition(this.selectionStartPosition,t,1);const n=this.value.substring(e,this.selectionEnd);return this._finishDeduceEditorPosition(this.selectionEndPosition,n,-1)}_finishDeduceEditorPosition(e,t,n){let i=0,o=-1;for(;-1!==(o=t.indexOf("\n",o+1));)i++;return[e,n*t.length,i]}static selectedText(e){return new a(e,0,e.length,null,null)}static deduceInput(e,t,n){if(!e)return{text:"",replacePrevCharCnt:0,replaceNextCharCnt:0,positionDelta:0};s&&(console.log("------------------------deduceInput"),console.log("PREVIOUS STATE: "+e.toString()),console.log("CURRENT STATE: "+t.toString()));let o=e.value,r=e.selectionStart,a=e.selectionEnd,l=t.value,d=t.selectionStart,c=t.selectionEnd;const h=o.substring(a),u=l.substring(c),g=i.P1(h,u);l=l.substring(0,l.length-g),o=o.substring(0,o.length-g);const p=o.substring(0,r),m=l.substring(0,d),f=i.Mh(p,m);if(l=l.substring(f),o=o.substring(f),d-=f,r-=f,c-=f,a-=f,s&&(console.log("AFTER DIFFING PREVIOUS STATE: <"+o+">, selectionStart: "+r+", selectionEnd: "+a),console.log("AFTER DIFFING CURRENT STATE: <"+l+">, selectionStart: "+d+", selectionEnd: "+c)),n&&d===c&&o.length>0){let e=null;if(d===l.length?l.startsWith(o)&&(e=l.substring(o.length)):l.endsWith(o)&&(e=l.substring(0,l.length-o.length)),null!==e&&e.length>0&&(/\uFE0F/.test(e)||i.RP(e)))return{text:e,replacePrevCharCnt:0,replaceNextCharCnt:0,positionDelta:0}}if(d===c){if(o===l&&0===r&&a===o.length&&d===l.length&&-1===l.indexOf("\n")&&i.xe(l))return{text:"",replacePrevCharCnt:0,replaceNextCharCnt:0,positionDelta:0};const e=p.length-f;return s&&console.log("REMOVE PREVIOUS: "+(p.length-f)+" chars"),{text:l,replacePrevCharCnt:e,replaceNextCharCnt:0,positionDelta:0}}return{text:l,replacePrevCharCnt:a-r,replaceNextCharCnt:0,positionDelta:0}}static deduceAndroidCompositionInput(e,t){if(!e)return{text:"",replacePrevCharCnt:0,replaceNextCharCnt:0,positionDelta:0};if(s&&(console.log("------------------------deduceAndroidCompositionInput"),console.log("PREVIOUS STATE: "+e.toString()),console.log("CURRENT STATE: "+t.toString())),e.value===t.value)return{text:"",replacePrevCharCnt:0,replaceNextCharCnt:0,positionDelta:t.selectionEnd-e.selectionEnd};const n=Math.min(i.Mh(e.value,t.value),e.selectionEnd),o=Math.min(i.P1(e.value,t.value),e.value.length-e.selectionEnd),r=e.value.substring(n,e.value.length-o),a=t.value.substring(n,t.value.length-o),l=e.selectionStart-n,d=e.selectionEnd-n,c=t.selectionStart-n,h=t.selectionEnd-n;return s&&(console.log("AFTER DIFFING PREVIOUS STATE: <"+r+">, selectionStart: "+l+", selectionEnd: "+d),console.log("AFTER DIFFING CURRENT STATE: <"+a+">, selectionStart: "+c+", selectionEnd: "+h)),{text:a,replacePrevCharCnt:d,replaceNextCharCnt:r.length-d,positionDelta:h-a.length}}}a.EMPTY=new a("",0,0,null,null);class l{static _getPageOfLine(e,t){return Math.floor((e-1)/t)}static _getRangeForPage(e,t){const n=e*t,i=n+1,o=n+t;return new r.e(i,1,o+1,1)}static fromEditorSelection(e,t,n,i,s){const d=l._getPageOfLine(n.startLineNumber,i),c=l._getRangeForPage(d,i),h=l._getPageOfLine(n.endLineNumber,i),u=l._getRangeForPage(h,i),g=c.intersectRanges(new r.e(1,1,n.startLineNumber,n.startColumn));let p=t.getValueInRange(g,1);const m=t.getLineCount(),f=t.getLineMaxColumn(m),_=u.intersectRanges(new r.e(n.endLineNumber,n.endColumn,m,f));let b,C=t.getValueInRange(_,1);if(d===h||d+1===h)b=t.getValueInRange(n,1);else{const e=c.intersectRanges(n),i=u.intersectRanges(n);b=t.getValueInRange(e,1)+String.fromCharCode(8230)+t.getValueInRange(i,1)}if(s){const e=500;p.length>e&&(p=p.substring(p.length-e,p.length)),C.length>e&&(C=C.substring(0,e)),b.length>2*e&&(b=b.substring(0,e)+String.fromCharCode(8230)+b.substring(b.length-e,b.length))}return new a(p+b+C,p.length,p.length+b.length,new o.L(n.startLineNumber,n.startColumn),new o.L(n.endLineNumber,n.endColumn))}}},9925:(e,t,n)=>{"use strict";n.d(t,{yy:()=>f,Dl:()=>_,ZF:()=>C,YQ:()=>b});var i=n(7295),o=n(4314),r=n(1050),s=n(5976),a=n(6830),l=n(8819),d=n(1741),c=n(2065),h=n(5026),u=n(3580);const g=(0,c.yh)("IEditorCancelService"),p=new l.uy("cancellableOperation",!1,(0,u.N)("cancellableOperation","Whether the editor runs a cancellable operation, e.g. like 'Peek References'"));(0,h.z)(g,class{constructor(){this._tokens=new WeakMap}add(e,t){let n,i=this._tokens.get(e);return i||(i=e.invokeWithinContext((e=>({key:p.bindTo(e.get(l.i6)),tokens:new d.S}))),this._tokens.set(e,i)),i.key.set(!0),n=i.tokens.push(t),()=>{n&&(n(),i.key.set(!i.tokens.isEmpty()),n=void 0)}}cancel(e){const t=this._tokens.get(e);if(!t)return;const n=t.tokens.pop();n&&(n.cancel(),t.key.set(!t.tokens.isEmpty()))}},!0);class m extends r.A{constructor(e,t){super(t),this.editor=e,this._unregister=e.invokeWithinContext((t=>t.get(g).add(e,this)))}dispose(){this._unregister(),super.dispose()}}(0,a.fK)(new class extends a._l{constructor(){super({id:"editor.cancelOperation",kbOpts:{weight:100,primary:9},precondition:p})}runEditorCommand(e,t){e.get(g).cancel(t)}});class f{constructor(e,t){if(this.flags=t,0!=(1&this.flags)){const t=e.getModel();this.modelVersionId=t?i.WU("{0}#{1}",t.uri.toString(),t.getVersionId()):null}else this.modelVersionId=null;0!=(4&this.flags)?this.position=e.getPosition():this.position=null,0!=(2&this.flags)?this.selection=e.getSelection():this.selection=null,0!=(8&this.flags)?(this.scrollLeft=e.getScrollLeft(),this.scrollTop=e.getScrollTop()):(this.scrollLeft=-1,this.scrollTop=-1)}_equals(e){if(!(e instanceof f))return!1;const t=e;return this.modelVersionId===t.modelVersionId&&this.scrollLeft===t.scrollLeft&&this.scrollTop===t.scrollTop&&!(!this.position&&t.position||this.position&&!t.position||this.position&&t.position&&!this.position.equals(t.position))&&!(!this.selection&&t.selection||this.selection&&!t.selection||this.selection&&t.selection&&!this.selection.equalsRange(t.selection))}validate(e){return this._equals(new f(e,this.flags))}}class _ extends m{constructor(e,t,n,i){super(e,i),this._listener=new s.SL,4&t&&this._listener.add(e.onDidChangeCursorPosition((e=>{n&&o.e.containsPosition(n,e.position)||this.cancel()}))),2&t&&this._listener.add(e.onDidChangeCursorSelection((e=>{n&&o.e.containsRange(n,e.selection)||this.cancel()}))),8&t&&this._listener.add(e.onDidScrollChange((e=>this.cancel()))),1&t&&(this._listener.add(e.onDidChangeModel((e=>this.cancel()))),this._listener.add(e.onDidChangeModelContent((e=>this.cancel()))))}dispose(){this._listener.dispose(),super.dispose()}}class b extends r.A{constructor(e,t){super(t),this._listener=e.onDidChangeContent((()=>this.cancel()))}dispose(){this._listener.dispose(),super.dispose()}}class C{constructor(e,t,n){this._visiblePosition=e,this._visiblePositionScrollDelta=t,this._cursorPosition=n}static capture(e){let t=null,n=0;if(0!==e.getScrollTop()){const i=e.getVisibleRanges();if(i.length>0){t=i[0].getStartPosition();const o=e.getTopForPosition(t.lineNumber,t.column);n=e.getScrollTop()-o}}return new C(t,n,e.getPosition())}restore(e){if(this._visiblePosition){const t=e.getTopForPosition(this._visiblePosition.lineNumber,this._visiblePosition.column);e.setScrollTop(t+this._visiblePositionScrollDelta)}}restoreRelativeVerticalPositionOfCursor(e){const t=e.getPosition();if(!this._cursorPosition||!t)return;const n=e.getTopForLineNumber(t.lineNumber)-e.getTopForLineNumber(this._cursorPosition.lineNumber);e.setScrollTop(e.getScrollTop()+n)}}},3947:(e,t,n)=>{"use strict";n.d(t,{$:()=>I});var i=n(5321),o=n(8764),r=n(7301),s=n(9365),a=n(4742),l=n(3720);let d;!function e(t,n,i){function o(s,a){if(!n[s]){if(!t[s]){if(r)return r(s,!0);var l=new Error("Cannot find module '"+s+"'");throw l.code="MODULE_NOT_FOUND",l}var d=n[s]={exports:{}};t[s][0].call(d.exports,(function(e){return o(t[s][1][e]||e)}),d,d.exports,e,t,n,i)}return n[s].exports}for(var r=void 0,s=0;s\s]+))?)*)\s*(\/?)\s*>/,a=/^<\s*\/\s*([\w:-]+)[^>]*>/,l=/([\w:-]+)(?:\s*=\s*(?:(?:"((?:[^"])*)")|(?:'((?:[^'])*)')|([^>\s]+)))?/g,d=/^=0&&(t.comment&&t.comment(e.substring(4,i)),e=e.substring(i+3),n=!1):c.test(e)?p(a,f):d.test(e)&&p(s,m),function(){if(n){var i,o=e.indexOf("<");o>=0?(i=e.substring(0,o),e=e.substring(o)):(i=e,e=""),t.chars&&t.chars(i)}}();var o=e===u;u=e,o&&(e="")}function p(t,i){var o=e.match(t);o&&(e=e.substring(o[0].length),o[0].replace(t,i),n=!1)}function m(e,n,s,a){var d={},c=o(n),u=r.voids[c]||!!a;s.replace(l,(function(e,t,n,o,r){d[t]=void 0===n&&void 0===o&&void 0===r?void 0:i.decode(n||o||r||"")})),u||h.push(c),t.start&&t.start(c,d,u)}function f(e,n){var i,r=0,s=o(n);if(s)for(r=h.length-1;r>=0&&h[r]!==s;r--);if(r>=0){for(i=h.length-1;i>=r;i--)t.end&&t.end(h[i]);h.length=r}}f()}},{"./attributes":1,"./elements":3,"./lowercase":5,he:9}],8:[function(e,t,n){var i=e("he"),o=e("./lowercase"),r=e("./attributes"),s=e("./elements");t.exports=function(e,t){var n,a=t||{};return c(),{start:function(e,t,s){var c=o(e);n.ignoring?d(c):-1!==(a.allowedTags||[]).indexOf(c)&&(!a.filter||a.filter({tag:c,attrs:t}))?(l("<"),l(c),Object.keys(t).forEach((function(e){var n=t[e],s=(a.allowedClasses||{})[c]||[],d=(a.allowedAttributes||{})[c]||[];d=d.concat((a.allowedAttributes||{})["*"]||[]);var h=o(e);("class"===h&&-1===d.indexOf(h)?(n=n.split(" ").filter((function(e){return s&&-1!==s.indexOf(e)})).join(" ").trim()).length:-1!==d.indexOf(h)&&(!0!==r.uris[h]||function(e){var t=e[0];if("#"===t||"/"===t)return!0;var n=e.indexOf(":");if(-1===n)return!0;var i=e.indexOf("?");if(-1!==i&&n>i)return!0;var o=e.indexOf("#");return-1!==o&&n>o||a.allowedSchemes.some((function(t){return 0===e.indexOf(t+":")}))}(n)))&&(l(" "),l(e),"string"==typeof n&&(l('="'),l(i.encode(n)),l('"')))})),l(s?"/>":">")):d(c)},end:function(e){var t=o(e);-1!==(a.allowedTags||[]).indexOf(t)&&!1===n.ignoring?(l("")):function(e){n.ignoring===e&&--n.depth<=0&&c()}(t)},chars:function(e){!1===n.ignoring&&l(a.transformText?a.transformText(e):e)}};function l(t){e.push(t)}function d(e){s.voids[e]||(!1===n.ignoring?n={ignoring:e,depth:1}:n.ignoring===e&&n.depth++)}function c(){n={ignoring:!1,depth:0}}}},{"./attributes":1,"./elements":3,"./lowercase":5,he:9}],9:[function(e,t,n){var i={"&":"&","<":"<",">":">",'"':""","'":"'"},o={"&":"&","<":"<",">":">",""":'"',"'":"'"},r=/(&|<|>|"|')/g,s=/[&<>"']/g;function a(e){return i[e]}function l(e){return o[e]}function d(e){return null==e?"":String(e).replace(s,a)}function c(e){return null==e?"":String(e).replace(r,l)}d.options=c.options={},t.exports={encode:d,escape:d,decode:c,unescape:c,version:"1.0.0-browser"}},{}],10:[function(e,t,n){function i(e,t){return e[t]=!0,e}t.exports=function(e){return e.reduce(i,{})}},{}]},{},[4]);var c,h=d,u=n(3897),g=n(6248),p=n(7295),m=n(666),f=n(6663),_=n(1212),b=n(5935),C=n(3938),v=n(6811),w=n(4669),y=n(4850);const A=null===(c=window.trustedTypes)||void 0===c?void 0:c.createPolicy("insane",{createHTML:(e,t)=>h(e,t)});var S,x=n(988),k=n(1531),L=n(5713),E=n(5976),N=n(4101),D=function(e,t){return function(n,i){t(n,i,e)}};let I=class e{constructor(e,t,n){this._options=e,this._modeService=t,this._openerService=n,this._onDidRenderAsync=new w.Q5,this.onDidRenderAsync=this._onDidRenderAsync.event}dispose(){this._onDidRenderAsync.dispose()}render(e,t,n){const d=new E.SL;let c;return c=e?function(e,t={},n={}){var d;const c=(0,o.az)(t),S=function(t){let n;try{n=(0,u.Q)(decodeURIComponent(t))}catch(e){}return n?(n=(0,g.rs)(n,(t=>e.uris&&e.uris[t]?m.o.revive(e.uris[t]):void 0)),encodeURIComponent(JSON.stringify(n))):t},x=function(t,n){const i=e.uris&&e.uris[t];if(!i)return t;let o=m.o.revive(i);return m.o.parse(t).toString()===o.toString()?t:n?f.Gi.asBrowserUri(o).toString(!0):(o.query&&(o=o.with({query:S(o.query)})),o.toString())};let k;const L=new Promise((e=>k=e)),E=new l.Renderer;if(E.image=(e,n,i)=>{let o=[],r=[];if(e){({href:e,dimensions:o}=(0,s.v1)(e)),e=x(e,!0);try{const n=m.o.parse(e);t.baseUrl&&n.scheme===f.lg.file&&(e=(0,b.i3)(t.baseUrl,e).toString())}catch(e){}r.push(`src="${e}"`)}return i&&r.push(`alt="${i}"`),n&&r.push(`title="${n}"`),o.length&&(r=r.concat(o)),""},E.link=(n,i,o)=>(n===o&&(o=(0,s.oR)(o)),n=x(n,!1),t.baseUrl&&(/^\w[\w\d+.-]*:/.test(n)||(n=(0,b.i3)(t.baseUrl,n).toString())),i=(0,s.oR)(i),!(n=(0,s.oR)(n))||n.match(/^data:|javascript:/i)||n.match(/^command:/i)&&!e.isTrusted||n.match(/^command:(\/\/\/)?_workbench\.downloadResource/i)?o:`/g,">").replace(/"/g,""").replace(/'/g,"'")}" title="${i||n}">${o}`),E.paragraph=t=>(e.supportThemeIcons&&(t=(0,v.T)(t).map((e=>"string"==typeof e?e:e.outerHTML)).join("")),`

    ${t}

    `),t.codeBlockRenderer&&(E.code=(e,n)=>{const o=t.codeBlockRenderer(n,e),r=a.a.nextId(),s=Promise.all([o,L]).then((e=>{const t=c.querySelector(`div[data-code="${r}"]`);t&&i.mc(t,e[0])})).catch((e=>{}));return t.asyncRenderCallback&&s.then(t.asyncRenderCallback),`
    ${(0,p.YU)(e)}
    `}),t.actionHandler){const e=t.actionHandler.disposeables.add(new y.Y(c,"click")),n=t.actionHandler.disposeables.add(new y.Y(c,"auxclick"));t.actionHandler.disposeables.add(w.ju.any(e.event,n.event)((e=>{const n=new C.n(e);if(!n.leftButton&&!n.middleButton)return;let i=n.target;if("A"===i.tagName||(i=i.parentElement,i&&"A"===i.tagName))try{const e=i.dataset.href;e&&t.actionHandler.callback(e,n)}catch(e){(0,r.dL)(e)}finally{n.preventDefault()}})))}n.sanitizer=t=>(e.isTrusted?t.match(/^(]+>)|(<\/\s*span>)$/):void 0)?t:"",n.sanitize=!0,n.silent=!0,n.renderer=E;let N=null!==(d=e.value)&&void 0!==d?d:"";N.length>1e5&&(N=`${N.substr(0,1e5)}…`),e.supportThemeIcons&&(N=(0,_.f$)(N));const D=l.parse(N,n);if(c.innerHTML=function(e,t){var n;const i=function(e){const t=[f.lg.http,f.lg.https,f.lg.mailto,f.lg.data,f.lg.file,f.lg.vscodeRemote,f.lg.vscodeRemoteResource];return e.isTrusted&&t.push(f.lg.command),{allowedSchemes:t,allowedTags:["ul","li","p","code","blockquote","ol","h1","h2","h3","h4","h5","h6","hr","em","pre","table","thead","tbody","tr","th","td","div","del","a","strong","br","img","span"],allowedAttributes:{a:["href","name","target","data-href"],img:["src","title","alt","width","height"],div:["class","data-code"],span:["class","style"],th:["align"],td:["align"]},filter:t=>!("span"===t.tag&&e.isTrusted&&(t.attrs.style&&1===Object.keys(t.attrs).length?!t.attrs.style.match(/^(color\:#[0-9a-fA-F]+;)?(background-color\:#[0-9a-fA-F]+;)?$/):!t.attrs.class||!t.attrs.class.match(/^codicon codicon-[a-z\-]+( codicon-modifier-[a-z\-]+)?$/)))}}(e);return null!==(n=null==A?void 0:A.createHTML(t,i))&&void 0!==n?n:h(t,i)}(e,D),k(),t.asyncRenderCallback)for(const e of c.getElementsByTagName("img")){const n=i.nm(e,"load",(()=>{n.dispose(),t.asyncRenderCallback()}))}return c}(e,Object.assign(Object.assign({},this._getRenderOptions(e,d)),t),n):document.createElement("span"),{element:c,dispose:()=>d.dispose()}}_getRenderOptions(t,n){return{baseUrl:this._options.baseUrl,codeBlockRenderer:(t,n)=>{return i=this,o=void 0,s=function*(){var i,o,r,s;let a;t?a=this._modeService.getModeIdForLanguageName(t):this._options.editor&&(a=null===(i=this._options.editor.getModel())||void 0===i?void 0:i.getLanguageIdentifier().language),a||(a="plaintext"),this._modeService.triggerMode(a);const l=null!==(o=yield N.RW.getPromise(a))&&void 0!==o?o:void 0,d=document.createElement("span");d.innerHTML=null!==(s=null===(r=e._ttpTokenizer)||void 0===r?void 0:r.createHTML(n,l))&&void 0!==s?s:(0,L.C)(n,l);let c=this._options.codeBlockFontFamily;return this._options.editor&&(c=this._options.editor.getOption(41).fontFamily),c&&(d.style.fontFamily=c),d},new((r=void 0)||(r=Promise))((function(e,t){function n(e){try{l(s.next(e))}catch(e){t(e)}}function a(e){try{l(s.throw(e))}catch(e){t(e)}}function l(t){var i;t.done?e(t.value):(i=t.value,i instanceof r?i:new r((function(e){e(i)}))).then(n,a)}l((s=s.apply(i,o||[])).next())}));var i,o,r,s},asyncRenderCallback:()=>this._onDidRenderAsync.fire(),actionHandler:{callback:e=>this._openerService.open(e,{fromUserGesture:!0,allowContributedOpeners:!0,allowCommands:t.isTrusted}).catch(r.dL),disposeables:n}}}};I._ttpTokenizer=null===(S=window.trustedTypes)||void 0===S?void 0:S.createPolicy("tokenizeToString",{createHTML:(e,t)=>(0,L.C)(e,t)}),I=function(e,t,n,i){var o,r=arguments.length,s=r<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,i);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,n,s):o(t,n))||s);return r>3&&s&&Object.defineProperty(t,n,s),s}([D(1,k.h),D(2,x.v4)],I)},5520:(e,t,n)=>{"use strict";n.d(t,{CL:()=>o,QI:()=>r,Pi:()=>s});var i=n(6518);function o(e){return!(!e||"function"!=typeof e.getEditorType)&&e.getEditorType()===i.g.ICodeEditor}function r(e){return!(!e||"function"!=typeof e.getEditorType)&&e.getEditorType()===i.g.IDiffEditor}function s(e){return o(e)?e:r(e)?e.getModifiedEditor():null}},6830:(e,t,n)=>{"use strict";n.d(t,{mY:()=>b,AJ:()=>C,_l:()=>w,R6:()=>y,jY:()=>A,sb:()=>S,f:()=>x,fK:()=>k,Qr:()=>L,rn:()=>E,QG:()=>N,_K:()=>D,Uc:()=>i,n_:()=>T,kz:()=>R,Sq:()=>O});var i,o=n(3580),r=n(666),s=n(1640),a=n(187),l=n(1200),d=n(8216),c=n(4144),h=n(4565),u=n(8819),g=n(9989),p=n(9872),m=n(829),f=n(8401),_=n(3557);class b{constructor(e){this.id=e.id,this.precondition=e.precondition,this._kbOpts=e.kbOpts,this._menuOpts=e.menuOpts,this._description=e.description}register(){if(Array.isArray(this._menuOpts)?this._menuOpts.forEach(this._registerMenuItem,this):this._menuOpts&&this._registerMenuItem(this._menuOpts),this._kbOpts){const e=Array.isArray(this._kbOpts)?this._kbOpts:[this._kbOpts];for(const t of e){let e=t.kbExpr;this.precondition&&(e=e?u.Ao.and(e,this.precondition):this.precondition);const n={id:this.id,weight:t.weight,args:t.args,when:e,primary:t.primary,secondary:t.secondary,win:t.win,linux:t.linux,mac:t.mac};g.W.registerKeybindingRule(n)}}h.P.registerCommand({id:this.id,handler:(e,t)=>this.runCommand(e,t),description:this._description})}_registerMenuItem(e){c.BH.appendMenuItem(e.menuId,{group:e.group,command:{id:this.id,title:e.title,icon:e.icon,precondition:this.precondition},when:e.when,order:e.order})}}class C extends b{constructor(){super(...arguments),this._implementations=[]}addImplementation(e,t,n){return this._implementations.push({priority:e,name:t,implementation:n}),this._implementations.sort(((e,t)=>t.priority-e.priority)),{dispose:()=>{for(let e=0;e{if(e.get(u.i6).contextMatchesRules((0,f.f6)(this.precondition)))return this.runEditorCommand(e,i,t)}))}}class y extends w{constructor(e){super(y.convertOptions(e)),this.label=e.label,this.alias=e.alias}static convertOptions(e){let t;function n(t){return t.menuId||(t.menuId=c.eH.EditorContext),t.title||(t.title=e.label),t.when=u.Ao.and(e.precondition,t.when),t}return t=Array.isArray(e.menuOpts)?e.menuOpts:e.menuOpts?[e.menuOpts]:[],Array.isArray(e.contextMenuOpts)?t.push(...e.contextMenuOpts.map(n)):e.contextMenuOpts&&t.push(n(e.contextMenuOpts)),e.menuOpts=t,e}runEditorCommand(e,t,n){return this.reportTelemetry(e,t),this.run(e,t,n||{})}reportTelemetry(e,t){e.get(m.b).publicLog2("editorActionInvoked",{name:this.label,id:this.id})}}class A extends y{constructor(){super(...arguments),this._implementations=[]}addImplementation(e,t){return this._implementations.push([e,t]),this._implementations.sort(((e,t)=>t[0]-e[0])),{dispose:()=>{for(let e=0;enew Promise(((i,r)=>{try{i(t(e.object.textEditorModel,a.L.lift(o),n.slice(2)))}catch(e){r(e)}})).finally((()=>{e.dispose()}))))}))}function x(e,t){h.P.registerCommand(e,(function(e,...n){const[i]=n;(0,f.p_)(r.o.isUri(i));const o=e.get(l.q).getModel(i);return o?t(o,...n.slice(1)):e.get(d.S).createModelReference(i).then((e=>new Promise(((i,o)=>{try{i(t(e.object.textEditorModel,n.slice(1)))}catch(e){o(e)}})).finally((()=>{e.dispose()}))))}))}function k(e){return I.INSTANCE.registerEditorCommand(e),e}function L(e){const t=new e;return I.INSTANCE.registerEditorAction(t),t}function E(e){return I.INSTANCE.registerEditorAction(e),e}function N(e){I.INSTANCE.registerEditorAction(e)}function D(e,t){I.INSTANCE.registerEditorContribution(e,t)}!function(e){e.getEditorCommand=function(e){return I.INSTANCE.getEditorCommand(e)},e.getEditorActions=function(){return I.INSTANCE.getEditorActions()},e.getEditorContributions=function(){return I.INSTANCE.getEditorContributions()},e.getSomeEditorContributions=function(e){return I.INSTANCE.getEditorContributions().filter((t=>e.indexOf(t.id)>=0))},e.getDiffEditorContributions=function(){return I.INSTANCE.getDiffEditorContributions()}}(i||(i={}));class I{constructor(){this.editorContributions=[],this.diffEditorContributions=[],this.editorActions=[],this.editorCommands=Object.create(null)}registerEditorContribution(e,t){this.editorContributions.push({id:e,ctor:t})}getEditorContributions(){return this.editorContributions.slice(0)}getDiffEditorContributions(){return this.diffEditorContributions.slice(0)}registerEditorAction(e){e.register(),this.editorActions.push(e)}getEditorActions(){return this.editorActions.slice(0)}registerEditorCommand(e){e.register(),this.editorCommands[e.id]=e}getEditorCommand(e){return this.editorCommands[e]||null}}function M(e){return e.register(),e}I.INSTANCE=new I,p.B.add("editor.contributions",I.INSTANCE);const T=M(new C({id:"undo",precondition:void 0,kbOpts:{weight:0,primary:2104},menuOpts:[{menuId:c.eH.MenubarEditMenu,group:"1_do",title:o.N({key:"miUndo",comment:["&& denotes a mnemonic"]},"&&Undo"),order:1},{menuId:c.eH.CommandPalette,group:"",title:o.N("undo","Undo"),order:1}]}));M(new v(T,{id:"default:undo",precondition:void 0}));const R=M(new C({id:"redo",precondition:void 0,kbOpts:{weight:0,primary:2103,secondary:[3128],mac:{primary:3128}},menuOpts:[{menuId:c.eH.MenubarEditMenu,group:"1_do",title:o.N({key:"miRedo",comment:["&& denotes a mnemonic"]},"&&Redo"),order:2},{menuId:c.eH.CommandPalette,group:"",title:o.N("redo","Redo"),order:1}]}));M(new v(R,{id:"default:redo",precondition:void 0}));const O=M(new C({id:"editor.action.selectAll",precondition:void 0,kbOpts:{weight:0,kbExpr:null,primary:2079},menuOpts:[{menuId:c.eH.MenubarSelectionMenu,group:"1_basic",title:o.N({key:"miSelectAll",comment:["&& denotes a mnemonic"]},"&&Select All"),order:1},{menuId:c.eH.CommandPalette,group:"",title:o.N("selectAll","Select All"),order:1}]}))},6007:(e,t,n)=>{"use strict";n.d(t,{vu:()=>s,fo:()=>a,Gl:()=>l});var i=n(2065),o=n(666),r=n(8401);const s=(0,i.yh)("IWorkspaceEditService");class a{constructor(e){this.metadata=e}static convert(e){return e.edits.map((e=>{if(t=e,(0,r.Kn)(t)&&o.o.isUri(t.resource)&&(0,r.Kn)(t.edit))return new l(e.resource,e.edit,e.modelVersionId,e.metadata);var t;if(function(e){return(0,r.Kn)(e)&&(Boolean(e.newUri)||Boolean(e.oldUri))}(e))return new d(e.oldUri,e.newUri,e.options,e.metadata);throw new Error("Unsupported edit")}))}}class l extends a{constructor(e,t,n,i){super(i),this.resource=e,this.textEdit=t,this.versionId=n}}class d extends a{constructor(e,t,n,i){super(i),this.oldResource=e,this.newResource=t,this.options=n}}},1640:(e,t,n)=>{"use strict";n.d(t,{$:()=>i});const i=(0,n(2065).yh)("codeEditorService")},6341:(e,t,n)=>{"use strict";n.d(t,{Gm:()=>Vo});var i=n(6479),o=n(6830);let r=class{constructor(e,t){}dispose(){}};var s,a;r.ID="editor.contrib.markerDecorations",r=function(e,t,n,i){var o,r=arguments.length,s=r<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,i);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,n,s):o(t,n))||s);return r>3&&s&&Object.defineProperty(t,n,s),s}([(s=1,a=i.i,function(e,t){a(e,t,s)})],r),(0,o._K)(r.ID,r);var l=n(3379),d=n.n(l),c=n(7795),h=n.n(c),u=n(569),g=n.n(u),p=n(3565),m=n.n(p),f=n(9216),_=n.n(f),b=n(4589),C=n.n(b),v=n(7337),w={};w.styleTagTransform=C(),w.setAttributes=m(),w.insert=g().bind(null,"head"),w.domAPI=h(),w.insertStyleElement=_(),d()(v.Z,w),v.Z&&v.Z.locals&&v.Z.locals;var y=n(3580),A=n(5321),S=n(7301),x=n(4669),k=n(5976),L=n(6663),E=n(9052),N=n(1640),D=n(6268),I=n(3860),M=n(8626),T=n(1432),R=n(553),O=n(3938),B=n(5393),P=n(7974);class F{constructor(e,t){this.x=e,this.y=t,this._pageCoordinatesBrand=void 0}toClientCoordinates(){return new W(this.x-A.DI.scrollX,this.y-A.DI.scrollY)}}class W{constructor(e,t){this.clientX=e,this.clientY=t,this._clientCoordinatesBrand=void 0}toPageCoordinates(){return new F(this.clientX+A.DI.scrollX,this.clientY+A.DI.scrollY)}}class z{constructor(e,t,n,i){this.x=e,this.y=t,this.width=n,this.height=i,this._editorPagePositionBrand=void 0}}function V(e){const t=A.i(e);return new z(t.left,t.top,t.width,t.height)}class H extends O.n{constructor(e,t){super(e),this._editorMouseEventBrand=void 0,this.pos=new F(this.posx,this.posy),this.editorPos=V(t)}}class j{constructor(e){this._editorViewDomNode=e}_create(e){return new H(e,this._editorViewDomNode)}onContextMenu(e,t){return A.nm(e,"contextmenu",(e=>{t(this._create(e))}))}onMouseUp(e,t){return A.nm(e,"mouseup",(e=>{t(this._create(e))}))}onMouseDown(e,t){return A.nm(e,"mousedown",(e=>{t(this._create(e))}))}onMouseLeave(e,t){return A.j_(e,(e=>{t(this._create(e))}))}onMouseMoveThrottled(e,t,n,i){return A.Y_(e,"mousemove",t,((e,t)=>n(e,this._create(t))),i)}}class ${constructor(e){this._editorViewDomNode=e}_create(e){return new H(e,this._editorViewDomNode)}onPointerUp(e,t){return A.nm(e,"pointerup",(e=>{t(this._create(e))}))}onPointerDown(e,t){return A.nm(e,"pointerdown",(e=>{t(this._create(e))}))}onPointerLeave(e,t){return A.RE(e,(e=>{t(this._create(e))}))}onPointerMoveThrottled(e,t,n,i){return A.Y_(e,"pointermove",t,((e,t)=>n(e,this._create(t))),i)}}class U extends k.JT{constructor(e){super(),this._editorViewDomNode=e,this._globalMouseMoveMonitor=this._register(new P.Z),this._keydownListener=null}startMonitoring(e,t,n,i,o){this._keydownListener=A.mu(document,"keydown",(e=>{e.toKeybinding().isModifierKey()||this._globalMouseMoveMonitor.stopMonitoring(!0,e.browserEvent)}),!0),this._globalMouseMoveMonitor.startMonitoring(e,t,((e,t)=>n(e,new H(t,this._editorViewDomNode))),i,(e=>{this._keydownListener.dispose(),o(e)}))}stopMonitoring(){this._globalMouseMoveMonitor.stopMonitoring(!0)}}class Z extends k.JT{constructor(){super(),this._shouldRender=!0}shouldRender(){return this._shouldRender}forceShouldRender(){this._shouldRender=!0}setShouldRender(){this._shouldRender=!0}onDidRender(){this._shouldRender=!1}onCompositionStart(e){return!1}onCompositionEnd(e){return!1}onConfigurationChanged(e){return!1}onCursorStateChanged(e){return!1}onDecorationsChanged(e){return!1}onFlushed(e){return!1}onFocusChanged(e){return!1}onLanguageConfigurationChanged(e){return!1}onLineMappingChanged(e){return!1}onLinesChanged(e){return!1}onLinesDeleted(e){return!1}onLinesInserted(e){return!1}onRevealRangeRequest(e){return!1}onScrollChanged(e){return!1}onThemeChanged(e){return!1}onTokensChanged(e){return!1}onTokensColorsChanged(e){return!1}onZonesChanged(e){return!1}handleEvents(e){let t=!1;for(let n=0,i=e.length;n=a?o=Math.max(o,a+l-i):(t[n++]=new Q(i,o),i=a,o=l)}return t[n++]=new Q(i,o),t}static _createHorizontalRangesFromClientRects(e,t){if(!e||0===e.length)return null;const n=[];for(let i=0,o=e.length;ia)return null;if((t=Math.min(a,Math.max(0,t)))===(i=Math.min(a,Math.max(0,i)))&&n===o&&0===n&&!e.children[t].firstChild){const n=e.children[t].getClientRects();return this._createHorizontalRangesFromClientRects(n,r)}t!==i&&i>0&&0===o&&(i--,o=1073741824);let l=e.children[t].firstChild,d=e.children[i].firstChild;if(l&&d||(!l&&0===n&&t>0&&(l=e.children[t-1].firstChild,n=1073741824),!d&&0===o&&i>0&&(d=e.children[i-1].firstChild,o=1073741824)),!l||!d)return null;n=Math.min(l.textContent.length,Math.max(0,n)),o=Math.min(d.textContent.length,Math.max(0,o));const c=this._readClientRects(l,n,d,o,s);return this._createHorizontalRangesFromClientRects(c,r)}}var ne=n(2550),ie=n(7736),oe=n(2321),re=n(4141);const se=!!T.tY||!(T.IJ||D.vU||D.G6);let ae=!0;class le{constructor(e,t){this._domNode=e,this._clientRectDeltaLeft=0,this._clientRectDeltaLeftRead=!1,this.endNode=t}get clientRectDeltaLeft(){return this._clientRectDeltaLeftRead||(this._clientRectDeltaLeftRead=!0,this._clientRectDeltaLeft=this._domNode.getBoundingClientRect().left),this._clientRectDeltaLeft}}class de{constructor(e,t){this.themeType=t;const n=e.options,i=n.get(41);this.renderWhitespace=n.get(87),this.renderControlCharacters=n.get(81),this.spaceWidth=i.spaceWidth,this.middotWidth=i.middotWidth,this.wsmiddotWidth=i.wsmiddotWidth,this.useMonospaceOptimizations=i.isMonospace&&!n.get(27),this.canUseHalfwidthRightwardsArrow=i.canUseHalfwidthRightwardsArrow,this.lineHeight=n.get(57),this.stopRenderingLineAfter=n.get(104),this.fontLigatures=n.get(42)}equals(e){return this.themeType===e.themeType&&this.renderWhitespace===e.renderWhitespace&&this.renderControlCharacters===e.renderControlCharacters&&this.spaceWidth===e.spaceWidth&&this.middotWidth===e.middotWidth&&this.wsmiddotWidth===e.wsmiddotWidth&&this.useMonospaceOptimizations===e.useMonospaceOptimizations&&this.canUseHalfwidthRightwardsArrow===e.canUseHalfwidthRightwardsArrow&&this.lineHeight===e.lineHeight&&this.stopRenderingLineAfter===e.stopRenderingLineAfter&&this.fontLigatures===e.fontLigatures}}class ce{constructor(e){this._options=e,this._isMaybeInvalid=!0,this._renderedViewLine=null}getDomNode(){return this._renderedViewLine&&this._renderedViewLine.domNode?this._renderedViewLine.domNode.domNode:null}setDomNode(e){if(!this._renderedViewLine)throw new Error("I have no rendered view line to set the dom node to...");this._renderedViewLine.domNode=(0,M.X)(e)}onContentChanged(){this._isMaybeInvalid=!0}onTokensChanged(){this._isMaybeInvalid=!0}onDecorationsChanged(){this._isMaybeInvalid=!0}onOptionsChanged(e){this._isMaybeInvalid=!0,this._options=e}onSelectionChanged(){return(this._options.themeType===oe.e.HIGH_CONTRAST||"selection"===this._options.renderWhitespace)&&(this._isMaybeInvalid=!0,!0)}renderLine(e,t,n,i){if(!1===this._isMaybeInvalid)return!1;this._isMaybeInvalid=!1;const o=n.getViewLineRenderingData(e),r=this._options,s=ne.Kp.filter(o.inlineDecorations,e,o.minColumn,o.maxColumn);let a=null;if(r.themeType===oe.e.HIGH_CONTRAST||"selection"===this._options.renderWhitespace){const t=n.selections;for(const n of t){if(n.endLineNumbere)continue;const t=n.startLineNumber===e?n.startColumn:o.minColumn,i=n.endLineNumber===e?n.endColumn:o.maxColumn;t');const d=(0,ie.d1)(l,i);i.appendASCIIString("");let c=null;return ae&&se&&o.isBasicASCII&&r.useMonospaceOptimizations&&0===d.containsForeignElements&&o.content.length<300&&l.lineTokens.getCount()<100&&(c=new he(this._renderedViewLine?this._renderedViewLine.domNode:null,l,d.characterMapping)),c||(c=pe(this._renderedViewLine?this._renderedViewLine.domNode:null,l,d.characterMapping,d.containsRTL,d.containsForeignElements)),this._renderedViewLine=c,!0}layoutLine(e,t){this._renderedViewLine&&this._renderedViewLine.domNode&&(this._renderedViewLine.domNode.setTop(t),this._renderedViewLine.domNode.setHeight(this._options.lineHeight))}getWidth(){return this._renderedViewLine?this._renderedViewLine.getWidth():0}getWidthIsFast(){return!this._renderedViewLine||this._renderedViewLine.getWidthIsFast()}needsMonospaceFontCheck(){return!!this._renderedViewLine&&this._renderedViewLine instanceof he}monospaceAssumptionsAreValid(){return this._renderedViewLine&&this._renderedViewLine instanceof he?this._renderedViewLine.monospaceAssumptionsAreValid():ae}onMonospaceAssumptionsInvalidated(){this._renderedViewLine&&this._renderedViewLine instanceof he&&(this._renderedViewLine=this._renderedViewLine.toSlowRenderedLine())}getVisibleRangesForRange(e,t,n){if(!this._renderedViewLine)return null;e|=0,t|=0,e=Math.min(this._renderedViewLine.input.lineContent.length+1,Math.max(1,e)),t=Math.min(this._renderedViewLine.input.lineContent.length+1,Math.max(1,t));const i=0|this._renderedViewLine.input.stopRenderingLineAfter;let o=!1;-1!==i&&e>i+1&&t>i+1&&(o=!0),-1!==i&&e>i+1&&(e=i+1),-1!==i&&t>i+1&&(t=i+1);const r=this._renderedViewLine.getVisibleRangesForRange(e,t,n);return r&&r.length>0?new J(o,r):null}getColumnOfNodeOffset(e,t,n){return this._renderedViewLine?this._renderedViewLine.getColumnOfNodeOffset(e,t,n):1}}ce.CLASS_NAME="view-line";class he{constructor(e,t,n){this.domNode=e,this.input=t,this._characterMapping=n,this._charWidth=t.spaceWidth}getWidth(){return this._getCharPosition(this._characterMapping.length)}getWidthIsFast(){return!0}monospaceAssumptionsAreValid(){if(!this.domNode)return ae;const e=this.getWidth(),t=this.domNode.domNode.firstChild.offsetWidth;return Math.abs(e-t)>=2&&(console.warn("monospace assumptions have been violated, therefore disabling monospace optimizations!"),ae=!1),ae}toSlowRenderedLine(){return pe(this.domNode,this.input,this._characterMapping,!1,0)}getVisibleRangesForRange(e,t,n){const i=this._getCharPosition(e),o=this._getCharPosition(t);return[new Q(i,o-i)]}_getCharPosition(e){const t=this._characterMapping.getAbsoluteOffset(e);return Math.round(this._charWidth*t)}getColumnOfNodeOffset(e,t,n){const i=t.textContent.length;let o=-1;for(;t;)t=t.previousSibling,o++;return this._characterMapping.getColumn(new ie.Nd(o,n),i)}}class ue{constructor(e,t,n,i,o){if(this.domNode=e,this.input=t,this._characterMapping=n,this._isWhitespaceOnly=/^\s*$/.test(t.lineContent),this._containsForeignElements=o,this._cachedWidth=-1,this._pixelOffsetCache=null,!i||0===this._characterMapping.length){this._pixelOffsetCache=new Int32Array(Math.max(2,this._characterMapping.length+1));for(let e=0,t=this._characterMapping.length;e<=t;e++)this._pixelOffsetCache[e]=-1}}_getReadingTarget(e){return e.domNode.firstChild}getWidth(){return this.domNode?(-1===this._cachedWidth&&(this._cachedWidth=this._getReadingTarget(this.domNode).offsetWidth),this._cachedWidth):0}getWidthIsFast(){return-1!==this._cachedWidth}getVisibleRangesForRange(e,t,n){if(!this.domNode)return null;if(null!==this._pixelOffsetCache){const i=this._readPixelOffset(this.domNode,e,n);if(-1===i)return null;const o=this._readPixelOffset(this.domNode,t,n);return-1===o?null:[new Q(i,o-i)]}return this._readVisibleRangesForRange(this.domNode,e,t,n)}_readVisibleRangesForRange(e,t,n,i){if(t===n){const n=this._readPixelOffset(e,t,i);return-1===n?null:[new Q(n,0)]}return this._readRawVisibleRangesForRange(e,t,n,i)}_readPixelOffset(e,t,n){if(0===this._characterMapping.length){if(0===this._containsForeignElements)return 0;if(2===this._containsForeignElements)return 0;if(1===this._containsForeignElements)return this.getWidth();const t=this._getReadingTarget(e);return t.firstChild?t.firstChild.offsetWidth:0}if(null!==this._pixelOffsetCache){const i=this._pixelOffsetCache[t];if(-1!==i)return i;const o=this._actualReadPixelOffset(e,t,n);return this._pixelOffsetCache[t]=o,o}return this._actualReadPixelOffset(e,t,n)}_actualReadPixelOffset(e,t,n){if(0===this._characterMapping.length){const t=te.readHorizontalRanges(this._getReadingTarget(e),0,0,0,0,n.clientRectDeltaLeft,n.endNode);return t&&0!==t.length?t[0].left:-1}if(t===this._characterMapping.length&&this._isWhitespaceOnly&&0===this._containsForeignElements)return this.getWidth();const i=this._characterMapping.getDomPosition(t),o=te.readHorizontalRanges(this._getReadingTarget(e),i.partIndex,i.charIndex,i.partIndex,i.charIndex,n.clientRectDeltaLeft,n.endNode);if(!o||0===o.length)return-1;const r=o[0].left;if(this.input.isBasicASCII){const e=this._characterMapping.getAbsoluteOffset(t),n=Math.round(this.input.spaceWidth*e);if(Math.abs(n-r)<=1)return n}return r}_readRawVisibleRangesForRange(e,t,n,i){if(1===t&&n===this._characterMapping.length)return[new Q(0,this.getWidth())];const o=this._characterMapping.getDomPosition(t),r=this._characterMapping.getDomPosition(n);return te.readHorizontalRanges(this._getReadingTarget(e),o.partIndex,o.charIndex,r.partIndex,r.charIndex,i.clientRectDeltaLeft,i.endNode)}getColumnOfNodeOffset(e,t,n){const i=t.textContent.length;let o=-1;for(;t;)t=t.previousSibling,o++;return this._characterMapping.getColumn(new ie.Nd(o,n),i)}}class ge extends ue{_readVisibleRangesForRange(e,t,n,i){const o=super._readVisibleRangesForRange(e,t,n,i);if(!o||0===o.length||t===n||1===t&&n===this._characterMapping.length)return o;if(!this.input.containsRTL){const t=this._readPixelOffset(e,n,i);if(-1!==t){const e=o[o.length-1];e.left=4&&3===e[0]&&7===e[3]}static isStrictChildOfViewLines(e){return e.length>4&&3===e[0]&&7===e[3]}static isChildOfScrollableElement(e){return e.length>=2&&3===e[0]&&5===e[1]}static isChildOfMinimap(e){return e.length>=2&&3===e[0]&&8===e[1]}static isChildOfContentWidgets(e){return e.length>=4&&3===e[0]&&1===e[3]}static isChildOfOverflowingContentWidgets(e){return e.length>=1&&2===e[0]}static isChildOfOverlayWidgets(e){return e.length>=2&&3===e[0]&&4===e[1]}}class xe{constructor(e,t,n){this.model=e.model;const i=e.configuration.options;this.layoutInfo=i.get(129),this.viewDomNode=t.viewDomNode,this.lineHeight=i.get(57),this.stickyTabStops=i.get(103),this.typicalHalfwidthCharacterWidth=i.get(41).typicalHalfwidthCharacterWidth,this.lastRenderData=n,this._context=e,this._viewHelper=t}getZoneAtCoord(e){return xe.getZoneAtCoord(this._context,e)}static getZoneAtCoord(e,t){const n=e.viewLayout.getWhitespaceAtVerticalOffset(t);if(n){const i=n.verticalOffset+n.height/2,o=e.model.getLineCount();let r,s=null,a=null;return n.afterLineNumber!==o&&(a=new fe.L(n.afterLineNumber+1,1)),n.afterLineNumber>0&&(s=new fe.L(n.afterLineNumber,e.model.getLineMaxColumn(n.afterLineNumber))),r=null===a?s:null===s?a:t=e.layoutInfo.glyphMarginLeft,this.isInContentArea=!this.isInMarginArea,this.mouseColumn=Math.max(0,Ne._getMouseColumn(this.mouseContentHorizontalOffset,e.typicalHalfwidthCharacterWidth))}}{constructor(e,t,n,i){super(e,t,n),this._ctx=e,i?(this.target=i,this.targetPath=q.collect(i,e.viewDomNode)):(this.target=null,this.targetPath=new Uint8Array(0))}toString(){return`pos(${this.pos.x},${this.pos.y}), editorPos(${this.editorPos.x},${this.editorPos.y}), mouseVerticalOffset: ${this.mouseVerticalOffset}, mouseContentHorizontalOffset: ${this.mouseContentHorizontalOffset}\n\ttarget: ${this.target?this.target.outerHTML:null}`}fulfill(e,t=null,n=null,i=null){let o=this.mouseColumn;return t&&t.columnr.contentLeft+r.width)continue;const n=e.getVerticalOffsetForLineNumber(r.position.lineNumber);if(n<=o&&o<=n+r.height)return t.fulfill(6,r.position,null,{mightBeForeignElement:!1})}}return null}static _hitTestViewZone(e,t){const n=e.getZoneAtCoord(t.mouseVerticalOffset);if(n){const e=t.isInContentArea?8:5;return t.fulfill(e,n.position,null,n)}return null}static _hitTestTextArea(e,t){return Se.isTextArea(t.targetPath)?e.lastRenderData.lastTextareaPosition?t.fulfill(6,e.lastRenderData.lastTextareaPosition,null,{mightBeForeignElement:!1}):t.fulfill(1,e.lastRenderData.lastTextareaPosition):null}static _hitTestMargin(e,t){if(t.isInMarginArea){const n=e.getFullLineRangeAtCoord(t.mouseVerticalOffset),i=n.range.getStartPosition();let o=Math.abs(t.pos.x-t.editorPos.x);const r={isAfterLines:n.isAfterLines,glyphMarginLeft:e.layoutInfo.glyphMarginLeft,glyphMarginWidth:e.layoutInfo.glyphMarginWidth,lineNumbersWidth:e.layoutInfo.lineNumbersWidth,offsetX:o};return o-=e.layoutInfo.glyphMarginLeft,o<=e.layoutInfo.glyphMarginWidth?t.fulfill(2,i,n.range,r):(o-=e.layoutInfo.glyphMarginWidth,o<=e.layoutInfo.lineNumbersWidth?t.fulfill(3,i,n.range,r):(o-=e.layoutInfo.lineNumbersWidth,t.fulfill(4,i,n.range,r)))}return null}static _hitTestViewLines(e,t,n){if(!Se.isChildOfViewLines(t.targetPath))return null;if(e.isInTopPadding(t.mouseVerticalOffset))return t.fulfill(7,new fe.L(1,1),null,Le);if(e.isAfterLines(t.mouseVerticalOffset)||e.isInBottomPadding(t.mouseVerticalOffset)){const n=e.model.getLineCount(),i=e.model.getLineMaxColumn(n);return t.fulfill(7,new fe.L(n,i),null,Le)}if(n){if(Se.isStrictChildOfViewLines(t.targetPath)){const n=e.getLineNumberAtVerticalOffset(t.mouseVerticalOffset);if(0===e.model.getLineLength(n)){const i=e.getLineWidth(n),o=Ee(t.mouseContentHorizontalOffset-i);return t.fulfill(7,new fe.L(n,1),null,o)}const i=e.getLineWidth(n);if(t.mouseContentHorizontalOffset>=i){const o=Ee(t.mouseContentHorizontalOffset-i),r=new fe.L(n,e.model.getLineMaxColumn(n));return t.fulfill(7,r,null,o)}}return t.fulfill(0)}const i=Ne._doHitTest(e,t);return 1===i.type?Ne.createMouseTargetFromHitTestPosition(e,t,i.spanNode,i.position,i.injectedText):this._createMouseTarget(e,t.withTarget(i.hitTarget),!0)}static _hitTestMinimap(e,t){if(Se.isChildOfMinimap(t.targetPath)){const n=e.getLineNumberAtVerticalOffset(t.mouseVerticalOffset),i=e.model.getLineMaxColumn(n);return t.fulfill(11,new fe.L(n,i))}return null}static _hitTestScrollbarSlider(e,t){if(Se.isChildOfScrollableElement(t.targetPath)&&t.target&&1===t.target.nodeType){const n=t.target.className;if(n&&/\b(slider|scrollbar)\b/.test(n)){const n=e.getLineNumberAtVerticalOffset(t.mouseVerticalOffset),i=e.model.getLineMaxColumn(n);return t.fulfill(11,new fe.L(n,i))}}return null}static _hitTestScrollbar(e,t){if(Se.isChildOfScrollableElement(t.targetPath)){const n=e.getLineNumberAtVerticalOffset(t.mouseVerticalOffset),i=e.model.getLineMaxColumn(n);return t.fulfill(11,new fe.L(n,i))}return null}getMouseColumn(e,t){const n=this._context.configuration.options,i=n.get(129),o=this._context.viewLayout.getCurrentScrollLeft()+t.x-e.x-i.contentLeft;return Ne._getMouseColumn(o,n.get(41).typicalHalfwidthCharacterWidth)}static _getMouseColumn(e,t){return e<0?1:Math.round(e/t)+1}static createMouseTargetFromHitTestPosition(e,t,n,i,o){const r=i.lineNumber,s=i.column,a=e.getLineWidth(r);if(t.mouseContentHorizontalOffset>a){const e=Ee(t.mouseContentHorizontalOffset-a);return t.fulfill(7,i,null,e)}const l=e.visibleRangeForPosition(r,s);if(!l)return t.fulfill(0,i);const d=l.left;if(t.mouseContentHorizontalOffset===d)return t.fulfill(6,i,null,{mightBeForeignElement:!!o});const c=[];if(c.push({offset:l.left,column:s}),s>1){const t=e.visibleRangeForPosition(r,s-1);t&&c.push({offset:t.left,column:s-1})}if(se.offset-t.offset));const h=t.pos.toClientCoordinates(),u=n.getBoundingClientRect(),g=u.left<=h.clientX&&h.clientX<=u.right;for(let e=1;e=t.editorPos.y+e.layoutInfo.height&&(o=t.editorPos.y+e.layoutInfo.height-1);const r=new F(t.pos.x,o),s=this._actualDoHitTestWithCaretRangeFromPoint(e,r.toClientCoordinates());return 1===s.type?s:this._actualDoHitTestWithCaretRangeFromPoint(e,t.pos.toClientCoordinates())}static _actualDoHitTestWithCaretRangeFromPoint(e,t){const n=A.Ay(e.viewDomNode);let i;if(i=n?void 0===n.caretRangeFromPoint?function(e,t,n){const i=document.createRange();let o=e.elementFromPoint(t,n);if(null!==o){for(;o&&o.firstChild&&o.firstChild.nodeType!==o.firstChild.TEXT_NODE&&o.lastChild&&o.lastChild.firstChild;)o=o.lastChild;const e=o.getBoundingClientRect(),n=window.getComputedStyle(o,null).getPropertyValue("font"),r=o.innerText;let s,a=e.left,l=0;if(t>e.left+e.width)l=r.length;else{const e=De.getInstance();for(let i=0;ithis._createMouseTarget(e,t)),(e=>this._getMouseColumn(e)))),this.lastMouseLeaveTime=-1,this._height=this._context.configuration.options.get(129).height;const i=new j(this.viewHelper.viewDomNode);this._register(i.onContextMenu(this.viewHelper.viewDomNode,(e=>this._onContextMenu(e,!0)))),this._register(i.onMouseMoveThrottled(this.viewHelper.viewDomNode,(e=>this._onMouseMove(e)),Me(this.mouseTargetFactory),Te.MOUSE_MOVE_MINIMUM_TIME)),this._register(i.onMouseUp(this.viewHelper.viewDomNode,(e=>this._onMouseUp(e)))),this._register(i.onMouseLeave(this.viewHelper.viewDomNode,(e=>this._onMouseLeave(e)))),this._register(i.onMouseDown(this.viewHelper.viewDomNode,(e=>this._onMouseDown(e)))),this._register(A.nm(this.viewHelper.viewDomNode,A.tw.MOUSE_WHEEL,(e=>{if(this.viewController.emitMouseWheel(e),!this._context.configuration.options.get(66))return;const t=new O.q(e);if(T.dz?(e.metaKey||e.ctrlKey)&&!e.shiftKey&&!e.altKey:e.ctrlKey&&!e.metaKey&&!e.shiftKey&&!e.altKey){const e=Ie.C.getZoomLevel(),n=t.deltaY>0?1:-1;Ie.C.setZoomLevel(e+n),t.preventDefault(),t.stopPropagation()}}),{capture:!0,passive:!1})),this._context.addEventHandler(this)}dispose(){this._context.removeEventHandler(this),super.dispose()}onConfigurationChanged(e){if(e.hasChanged(129)){const e=this._context.configuration.options.get(129).height;this._height!==e&&(this._height=e,this._mouseDownOperation.onHeightChanged())}return!1}onCursorStateChanged(e){return this._mouseDownOperation.onCursorStateChanged(e),!1}onFocusChanged(e){return!1}onScrollChanged(e){return this._mouseDownOperation.onScrollChanged(),!1}getTargetAtClientPoint(e,t){const n=new W(e,t).toPageCoordinates(),i=V(this.viewHelper.viewDomNode);return n.yi.y+i.height||n.xi.x+i.width?null:this.mouseTargetFactory.createMouseTarget(this.viewHelper.getLastRenderData(),i,n,null)}_createMouseTarget(e,t){return this.mouseTargetFactory.createMouseTarget(this.viewHelper.getLastRenderData(),e.editorPos,e.pos,t?e.target:null)}_getMouseColumn(e){return this.mouseTargetFactory.getMouseColumn(e.editorPos,e.pos)}_onContextMenu(e,t){this.viewController.emitContextMenu({event:e,target:this._createMouseTarget(e,t)})}_onMouseMove(e){this._mouseDownOperation.isActive()||e.timestamp{e.preventDefault(),this.viewHelper.focusTextArea()};if(l&&(n||o&&r))d(),this._mouseDownOperation.start(t.type,e);else if(i)e.preventDefault();else if(s){const n=t.detail;this.viewHelper.shouldSuppressMouseDownOnViewZone(n.viewZoneId)&&(d(),this._mouseDownOperation.start(t.type,e),e.preventDefault())}else a&&this.viewHelper.shouldSuppressMouseDownOnWidget(t.detail)&&(d(),e.preventDefault());this.viewController.emitMouseDown({event:e,target:t})}}Te.MOUSE_MOVE_MINIMUM_TIME=100;class Re extends k.JT{constructor(e,t,n,i,o){super(),this._context=e,this._viewController=t,this._viewHelper=n,this._createMouseTarget=i,this._getMouseColumn=o,this._mouseMoveMonitor=this._register(new U(this._viewHelper.viewDomNode)),this._onScrollTimeout=this._register(new B._F),this._mouseState=new Oe,this._currentSelection=new I.Y(1,1,1,1),this._isActive=!1,this._lastMouseEvent=null}dispose(){super.dispose()}isActive(){return this._isActive}_onMouseDownThenMove(e){this._lastMouseEvent=e,this._mouseState.setModifiers(e);const t=this._findMousePosition(e,!0);t&&(this._mouseState.isDragAndDrop?this._viewController.emitMouseDrag({event:e,target:t}):this._dispatchMouse(t,!0))}start(e,t){this._lastMouseEvent=t,this._mouseState.setStartedOnLineNumbers(3===e),this._mouseState.setStartButtons(t),this._mouseState.setModifiers(t);const n=this._findMousePosition(t,!0);if(!n||!n.position)return;this._mouseState.trySetCount(t.detail,n.position),t.detail=this._mouseState.count;const i=this._context.configuration.options;if(!i.get(79)&&i.get(29)&&!i.get(16)&&!this._mouseState.altKey&&t.detail<2&&!this._isActive&&!this._currentSelection.isEmpty()&&6===n.type&&n.position&&this._currentSelection.containsPosition(n.position))return this._mouseState.isDragAndDrop=!0,this._isActive=!0,void this._mouseMoveMonitor.startMonitoring(t.target,t.buttons,Me(null),(e=>this._onMouseDownThenMove(e)),(e=>{const t=this._findMousePosition(this._lastMouseEvent,!0);e&&e instanceof KeyboardEvent?this._viewController.emitMouseDropCanceled():this._viewController.emitMouseDrop({event:this._lastMouseEvent,target:t?this._createMouseTarget(this._lastMouseEvent,!0):null}),this._stop()}));this._mouseState.isDragAndDrop=!1,this._dispatchMouse(n,t.shiftKey),this._isActive||(this._isActive=!0,this._mouseMoveMonitor.startMonitoring(t.target,t.buttons,Me(null),(e=>this._onMouseDownThenMove(e)),(()=>this._stop())))}_stop(){this._isActive=!1,this._onScrollTimeout.cancel()}onHeightChanged(){this._mouseMoveMonitor.stopMonitoring()}onScrollChanged(){this._isActive&&this._onScrollTimeout.setIfNotSet((()=>{if(!this._lastMouseEvent)return;const e=this._findMousePosition(this._lastMouseEvent,!1);e&&(this._mouseState.isDragAndDrop||this._dispatchMouse(e,!0))}),10)}onCursorStateChanged(e){this._currentSelection=e.selections[0]}_getPositionOutsideEditor(e){const t=e.editorPos,n=this._context.model,i=this._context.viewLayout,o=this._getMouseColumn(e);if(e.posyt.y+t.height){const r=i.getCurrentScrollTop()+(e.posy-t.y),s=xe.getZoneAtCoord(this._context,r);if(s){const e=this._helpPositionJumpOverViewZone(s);if(e)return new Ae(null,13,o,e)}const a=i.getLineNumberAtVerticalOffset(r);return new Ae(null,13,o,new fe.L(a,n.getLineMaxColumn(a)))}const r=i.getLineNumberAtVerticalOffset(i.getCurrentScrollTop()+(e.posy-t.y));return e.posxt.x+t.width?new Ae(null,13,o,new fe.L(r,n.getLineMaxColumn(r))):null}_findMousePosition(e,t){const n=this._getPositionOutsideEditor(e);if(n)return n;const i=this._createMouseTarget(e,t);if(!i.position)return null;if(8===i.type||5===i.type){const e=this._helpPositionJumpOverViewZone(i.detail);if(e)return new Ae(i.element,i.type,i.mouseColumn,e,null,i.detail)}return i}_helpPositionJumpOverViewZone(e){const t=new fe.L(this._currentSelection.selectionStartLineNumber,this._currentSelection.selectionStartColumn),n=e.positionBefore,i=e.positionAfter;return n&&i?n.isBefore(t)?n:i:null}_dispatchMouse(e,t){e.position&&this._viewController.dispatchMouse({position:e.position,mouseColumn:e.mouseColumn,startedOnLineNumbers:this._mouseState.startedOnLineNumbers,inSelectionMode:t,mouseDownCount:this._mouseState.count,altKey:this._mouseState.altKey,ctrlKey:this._mouseState.ctrlKey,metaKey:this._mouseState.metaKey,shiftKey:this._mouseState.shiftKey,leftButton:this._mouseState.leftButton,middleButton:this._mouseState.middleButton})}}class Oe{constructor(){this._altKey=!1,this._ctrlKey=!1,this._metaKey=!1,this._shiftKey=!1,this._leftButton=!1,this._middleButton=!1,this._startedOnLineNumbers=!1,this._lastMouseDownPosition=null,this._lastMouseDownPositionEqualCount=0,this._lastMouseDownCount=0,this._lastSetMouseDownCountTime=0,this.isDragAndDrop=!1}get altKey(){return this._altKey}get ctrlKey(){return this._ctrlKey}get metaKey(){return this._metaKey}get shiftKey(){return this._shiftKey}get leftButton(){return this._leftButton}get middleButton(){return this._middleButton}get startedOnLineNumbers(){return this._startedOnLineNumbers}get count(){return this._lastMouseDownCount}setModifiers(e){this._altKey=e.altKey,this._ctrlKey=e.ctrlKey,this._metaKey=e.metaKey,this._shiftKey=e.shiftKey}setStartButtons(e){this._leftButton=e.leftButton,this._middleButton=e.middleButton}setStartedOnLineNumbers(e){this._startedOnLineNumbers=e}trySetCount(e,t){const n=(new Date).getTime();n-this._lastSetMouseDownCountTime>Oe.CLEAR_MOUSE_DOWN_COUNT_TIME&&(e=1),this._lastSetMouseDownCountTime=n,e>this._lastMouseDownCount+1&&(e=this._lastMouseDownCount+1),this._lastMouseDownPosition&&this._lastMouseDownPosition.equals(t)?this._lastMouseDownPositionEqualCount++:this._lastMouseDownPositionEqualCount=1,this._lastMouseDownPosition=t,this._lastMouseDownCount=Math.min(e,this._lastMouseDownPositionEqualCount)}}Oe.CLEAR_MOUSE_DOWN_COUNT_TIME=400;var Be=n(161),Pe=n(5715);class Fe extends Te{constructor(e,t,n){super(e,t,n),this._register(R.o.addTarget(this.viewHelper.linesContentDomNode)),this._register(A.nm(this.viewHelper.linesContentDomNode,R.t.Tap,(e=>this.onTap(e)))),this._register(A.nm(this.viewHelper.linesContentDomNode,R.t.Change,(e=>this.onChange(e)))),this._register(A.nm(this.viewHelper.linesContentDomNode,R.t.Contextmenu,(e=>this._onContextMenu(new H(e,this.viewHelper.viewDomNode),!1)))),this._lastPointerType="mouse",this._register(A.nm(this.viewHelper.linesContentDomNode,"pointerdown",(e=>{const t=e.pointerType;this._lastPointerType="mouse"!==t?"touch"===t?"touch":"pen":"mouse"})));const i=new $(this.viewHelper.viewDomNode);this._register(i.onPointerMoveThrottled(this.viewHelper.viewDomNode,(e=>this._onMouseMove(e)),Me(this.mouseTargetFactory),Te.MOUSE_MOVE_MINIMUM_TIME)),this._register(i.onPointerUp(this.viewHelper.viewDomNode,(e=>this._onMouseUp(e)))),this._register(i.onPointerLeave(this.viewHelper.viewDomNode,(e=>this._onMouseLeave(e)))),this._register(i.onPointerDown(this.viewHelper.viewDomNode,(e=>this._onMouseDown(e))))}onTap(e){if(!e.initialTarget||!this.viewHelper.linesContentDomNode.contains(e.initialTarget))return;e.preventDefault(),this.viewHelper.focusTextArea();const t=this._createMouseTarget(new H(e,this.viewHelper.viewDomNode),!1);t.position&&this.viewController.dispatchMouse({position:t.position,mouseColumn:t.position.column,startedOnLineNumbers:!1,mouseDownCount:e.tapCount,inSelectionMode:!1,altKey:!1,ctrlKey:!1,metaKey:!1,shiftKey:!1,leftButton:!1,middleButton:!1})}onChange(e){"touch"===this._lastPointerType&&this._context.model.deltaScrollNow(-e.translationX,-e.translationY)}_onMouseDown(e){"touch"!==e.browserEvent.pointerType&&super._onMouseDown(e)}}class We extends Te{constructor(e,t,n){super(e,t,n),this._register(R.o.addTarget(this.viewHelper.linesContentDomNode)),this._register(A.nm(this.viewHelper.linesContentDomNode,R.t.Tap,(e=>this.onTap(e)))),this._register(A.nm(this.viewHelper.linesContentDomNode,R.t.Change,(e=>this.onChange(e)))),this._register(A.nm(this.viewHelper.linesContentDomNode,R.t.Contextmenu,(e=>this._onContextMenu(new H(e,this.viewHelper.viewDomNode),!1))))}onTap(e){e.preventDefault(),this.viewHelper.focusTextArea();const t=this._createMouseTarget(new H(e,this.viewHelper.viewDomNode),!1);if(t.position){const e=document.createEvent("CustomEvent");e.initEvent(Pe.pd.Tap,!1,!0),this.viewHelper.dispatchTextAreaEvent(e),this.viewController.moveTo(t.position)}}onChange(e){this._context.model.deltaScrollNow(-e.translationX,-e.translationY)}}class ze extends k.JT{constructor(e,t,n){super(),T.gn&&Be.D.pointerEvents?this.handler=this._register(new Fe(e,t,n)):window.TouchEvent?this.handler=this._register(new We(e,t,n)):this.handler=this._register(new Te(e,t,n))}getTargetAtClientPoint(e,t){return this.handler.getTargetAtClientPoint(e,t)}}var Ve=n(504),He={};He.styleTagTransform=C(),He.setAttributes=m(),He.insert=g().bind(null,"head"),He.domAPI=h(),He.insertStyleElement=_(),d()(Ve.Z,He),Ve.Z&&Ve.Z.locals&&Ve.Z.locals;var je=n(7295),$e=n(5887),Ue=n(6184),Ze={};Ze.styleTagTransform=C(),Ze.setAttributes=m(),Ze.insert=g().bind(null,"head"),Ze.domAPI=h(),Ze.insertStyleElement=_(),d()(Ue.Z,Ze),Ue.Z&&Ue.Z.locals&&Ue.Z.locals;class Ke extends Z{}var qe=n(7869),Ye=n(7781);class Ge extends Ke{constructor(e){super(),this._context=e,this._readConfig(),this._lastCursorModelPosition=new fe.L(1,1),this._renderResult=null,this._activeLineNumber=1,this._context.addEventHandler(this)}_readConfig(){const e=this._context.configuration.options;this._lineHeight=e.get(57);const t=e.get(58);this._renderLineNumbers=t.renderType,this._renderCustomLineNumbers=t.renderFn,this._renderFinalNewline=e.get(83);const n=e.get(129);this._lineNumbersLeft=n.lineNumbersLeft,this._lineNumbersWidth=n.lineNumbersWidth}dispose(){this._context.removeEventHandler(this),this._renderResult=null,super.dispose()}onConfigurationChanged(e){return this._readConfig(),!0}onCursorStateChanged(e){const t=e.selections[0].getPosition();this._lastCursorModelPosition=this._context.model.coordinatesConverter.convertViewPositionToModelPosition(t);let n=!1;return this._activeLineNumber!==t.lineNumber&&(this._activeLineNumber=t.lineNumber,n=!0),2!==this._renderLineNumbers&&3!==this._renderLineNumbers||(n=!0),n}onFlushed(e){return!0}onLinesChanged(e){return!0}onLinesDeleted(e){return!0}onLinesInserted(e){return!0}onScrollChanged(e){return e.scrollTopChanged}onZonesChanged(e){return!0}_getLineRenderLineNumber(e){const t=this._context.model.coordinatesConverter.convertViewPositionToModelPosition(new fe.L(e,1));if(1!==t.column)return"";const n=t.lineNumber;if(this._renderCustomLineNumbers)return this._renderCustomLineNumbers(n);if(2===this._renderLineNumbers){const e=Math.abs(this._lastCursorModelPosition.lineNumber-n);return 0===e?''+n+"":String(e)}return 3===this._renderLineNumbers?this._lastCursorModelPosition.lineNumber===n||n%10==0?String(n):"":String(n)}prepareRender(e){if(0===this._renderLineNumbers)return void(this._renderResult=null);const t=T.IJ?this._lineHeight%2==0?" lh-even":" lh-odd":"",n=e.visibleRange.startLineNumber,i=e.visibleRange.endLineNumber,o='
    ',r=this._context.model.getLineCount(),s=[];for(let e=n;e<=i;e++){const i=e-n;if(!this._renderFinalNewline&&e===r&&0===this._context.model.getLineLength(e)){s[i]="";continue}const a=this._getLineRenderLineNumber(e);a?e===this._activeLineNumber?s[i]='
    '+a+"
    ":s[i]=o+a+"
    ":s[i]=""}this._renderResult=s}render(e,t){if(!this._renderResult)return"";const n=t-e;return n<0||n>=this._renderResult.length?"":this._renderResult[n]}}Ge.CLASS_NAME="line-numbers",(0,Ye.Ic)(((e,t)=>{const n=e.getColor(qe.hw);n&&t.addRule(`.monaco-editor .line-numbers { color: ${n}; }`);const i=e.getColor(qe.DD);i&&t.addRule(`.monaco-editor .line-numbers.active-line-number { color: ${i}; }`)}));class Qe extends K{constructor(e){super(e);const t=this._context.configuration.options,n=t.get(129);this._canUseLayerHinting=!t.get(26),this._contentLeft=n.contentLeft,this._glyphMarginLeft=n.glyphMarginLeft,this._glyphMarginWidth=n.glyphMarginWidth,this._domNode=(0,M.X)(document.createElement("div")),this._domNode.setClassName(Qe.OUTER_CLASS_NAME),this._domNode.setPosition("absolute"),this._domNode.setAttribute("role","presentation"),this._domNode.setAttribute("aria-hidden","true"),this._glyphMarginBackgroundDomNode=(0,M.X)(document.createElement("div")),this._glyphMarginBackgroundDomNode.setClassName(Qe.CLASS_NAME),this._domNode.appendChild(this._glyphMarginBackgroundDomNode)}dispose(){super.dispose()}getDomNode(){return this._domNode}onConfigurationChanged(e){const t=this._context.configuration.options,n=t.get(129);return this._canUseLayerHinting=!t.get(26),this._contentLeft=n.contentLeft,this._glyphMarginLeft=n.glyphMarginLeft,this._glyphMarginWidth=n.glyphMarginWidth,!0}onScrollChanged(e){return super.onScrollChanged(e)||e.scrollTopChanged}prepareRender(e){}render(e){this._domNode.setLayerHinting(this._canUseLayerHinting),this._domNode.setContain("strict");const t=e.scrollTop-e.bigNumbersDelta;this._domNode.setTop(-t);const n=Math.min(e.scrollHeight,1e6);this._domNode.setHeight(n),this._domNode.setWidth(this._contentLeft),this._glyphMarginBackgroundDomNode.setLeft(this._glyphMarginLeft),this._glyphMarginBackgroundDomNode.setWidth(this._glyphMarginWidth),this._glyphMarginBackgroundDomNode.setHeight(n)}}Qe.CLASS_NAME="glyph-margin",Qe.OUTER_CLASS_NAME="margin";var Xe=n(9410),Je=n(1185);class et{constructor(e,t,n){this._visibleTextAreaBrand=void 0,this.top=e,this.left=t,this.width=n}setWidth(e){return new et(this.top,this.left,e)}}const tt=D.vU;class nt extends K{constructor(e,t,n){super(e),this._primaryCursorPosition=new fe.L(1,1),this._primaryCursorVisibleRange=null,this._viewController=t,this._viewHelper=n,this._scrollLeft=0,this._scrollTop=0;const i=this._context.configuration.options,o=i.get(129);this._setAccessibilityOptions(i),this._contentLeft=o.contentLeft,this._contentWidth=o.contentWidth,this._contentHeight=o.height,this._fontInfo=i.get(41),this._lineHeight=i.get(57),this._emptySelectionClipboard=i.get(30),this._copyWithSyntaxHighlighting=i.get(19),this._visibleTextArea=null,this._selections=[new I.Y(1,1,1,1)],this._modelSelections=[new I.Y(1,1,1,1)],this._lastRenderPosition=null,this.textArea=(0,M.X)(document.createElement("textarea")),q.write(this.textArea,6),this.textArea.setClassName(`inputarea ${Je.S}`),this.textArea.setAttribute("wrap","off"),this.textArea.setAttribute("autocorrect","off"),this.textArea.setAttribute("autocapitalize","off"),this.textArea.setAttribute("autocomplete","off"),this.textArea.setAttribute("spellcheck","false"),this.textArea.setAttribute("aria-label",this._getAriaLabel(i)),this.textArea.setAttribute("tabindex",String(i.get(111))),this.textArea.setAttribute("role","textbox"),this.textArea.setAttribute("aria-roledescription",y.N("editor","editor")),this.textArea.setAttribute("aria-multiline","true"),this.textArea.setAttribute("aria-haspopup","false"),this.textArea.setAttribute("aria-autocomplete","both"),i.get(28)&&i.get(79)&&this.textArea.setAttribute("readonly","true"),this.textAreaCover=(0,M.X)(document.createElement("div")),this.textAreaCover.setPosition("absolute");const r={getLineCount:()=>this._context.model.getLineCount(),getLineMaxColumn:e=>this._context.model.getLineMaxColumn(e),getValueInRange:(e,t)=>this._context.model.getValueInRange(e,t)},s={getDataToCopy:e=>{const t=this._context.model.getPlainTextToCopy(this._modelSelections,this._emptySelectionClipboard,T.ED),n=this._context.model.getEOL(),i=this._emptySelectionClipboard&&1===this._modelSelections.length&&this._modelSelections[0].isEmpty(),o=Array.isArray(t)?t:null,r=Array.isArray(t)?t.join(n):t;let s,a=null;if(e&&(Pe.RA.forceCopyWithSyntaxHighlighting||this._copyWithSyntaxHighlighting&&r.length<65536)){const e=this._context.model.getRichTextToCopy(this._modelSelections,this._emptySelectionClipboard);e&&(s=e.html,a=e.mode)}return{isFromEmptySelection:i,multicursorText:o,text:r,html:s,mode:a}},getScreenReaderContent:e=>{if(1===this._accessibilitySupport){if(T.dz){const e=this._selections[0];if(e.isEmpty()){const t=e.getStartPosition();let n=this._getWordBeforePosition(t);if(0===n.length&&(n=this._getCharacterBeforePosition(t)),n.length>0)return new $e.un(n,n.length,n.length,t,t)}}return $e.un.EMPTY}if(D.Dt){const e=this._selections[0];if(e.isEmpty()){const t=e.getStartPosition(),[n,i]=this._getAndroidWordAtPosition(t);if(n.length>0)return new $e.un(n,i,i,t,t)}return $e.un.EMPTY}return $e.ee.fromEditorSelection(e,r,this._selections[0],this._accessibilityPageSize,0===this._accessibilitySupport)},deduceModelPosition:(e,t,n)=>this._context.model.deduceModelPositionRelativeToViewPosition(e,t,n)};this._textAreaInput=this._register(new Pe.Fz(s,this.textArea)),this._register(this._textAreaInput.onKeyDown((e=>{this._viewController.emitKeyDown(e)}))),this._register(this._textAreaInput.onKeyUp((e=>{this._viewController.emitKeyUp(e)}))),this._register(this._textAreaInput.onPaste((e=>{let t=!1,n=null,i=null;e.metadata&&(t=this._emptySelectionClipboard&&!!e.metadata.isFromEmptySelection,n=void 0!==e.metadata.multicursorText?e.metadata.multicursorText:null,i=e.metadata.mode),this._viewController.paste(e.text,t,n,i)}))),this._register(this._textAreaInput.onCut((()=>{this._viewController.cut()}))),this._register(this._textAreaInput.onType((e=>{e.replacePrevCharCnt||e.replaceNextCharCnt||e.positionDelta?($e.al&&console.log(` => compositionType: <<${e.text}>>, ${e.replacePrevCharCnt}, ${e.replaceNextCharCnt}, ${e.positionDelta}`),this._viewController.compositionType(e.text,e.replacePrevCharCnt,e.replaceNextCharCnt,e.positionDelta)):($e.al&&console.log(` => type: <<${e.text}>>`),this._viewController.type(e.text))}))),this._register(this._textAreaInput.onSelectionChangeRequest((e=>{this._viewController.setSelection(e)}))),this._register(this._textAreaInput.onCompositionStart((e=>{const t=this._selections[0].startLineNumber,n=this._selections[0].startColumn+e.revealDeltaColumns;this._context.model.revealRange("keyboard",!0,new _e.e(t,n,t,n),0,1);const i=this._viewHelper.visibleRangeForPositionRelativeToEditor(t,n);i&&(this._visibleTextArea=new et(this._context.viewLayout.getVerticalOffsetForLineNumber(t),i.left,tt?0:1),this._render()),this.textArea.setClassName(`inputarea ${Je.S} ime-input`),this._viewController.compositionStart(),this._context.model.onCompositionStart()}))),this._register(this._textAreaInput.onCompositionUpdate((e=>{this._visibleTextArea&&(this._visibleTextArea=this._visibleTextArea.setWidth(function(e,t){const n=document.createElement("canvas").getContext("2d");var i;n.font=("normal",`normal normal ${(i=t).fontWeight} ${i.fontSize}px / ${i.lineHeight}px ${i.fontFamily}`);const o=n.measureText(e);return D.vU?o.width+2:o.width}(e.data,this._fontInfo)),this._render())}))),this._register(this._textAreaInput.onCompositionEnd((()=>{this._visibleTextArea=null,this._render(),this.textArea.setClassName(`inputarea ${Je.S}`),this._viewController.compositionEnd(),this._context.model.onCompositionEnd()}))),this._register(this._textAreaInput.onFocus((()=>{this._context.model.setHasFocus(!0)}))),this._register(this._textAreaInput.onBlur((()=>{this._context.model.setHasFocus(!1)})))}dispose(){super.dispose()}_getAndroidWordAtPosition(e){const t=this._context.model.getLineContent(e.lineNumber),n=(0,Xe.u)('`~!@#$%^&*()-=+[{]}\\|;:",.<>/?');let i=!0,o=e.column,r=!0,s=e.column,a=0;for(;a<50&&(i||r);){if(i&&o<=1&&(i=!1),i){const e=t.charCodeAt(o-2);0!==n.get(e)?i=!1:o--}if(r&&s>t.length&&(r=!1),r){const e=t.charCodeAt(s-1);0!==n.get(e)?r=!1:s++}a++}return[t.substring(o-1,s-1),e.column-o]}_getWordBeforePosition(e){const t=this._context.model.getLineContent(e.lineNumber),n=(0,Xe.u)(this._context.configuration.options.get(115));let i=e.column,o=0;for(;i>1;){const r=t.charCodeAt(i-2);if(0!==n.get(r)||o>50)return t.substring(i-1,e.column-1);o++,i--}return t.substring(0,e.column-1)}_getCharacterBeforePosition(e){if(e.column>1){const t=this._context.model.getLineContent(e.lineNumber).charAt(e.column-2);if(!je.ZG(t.charCodeAt(0)))return t}return""}_getAriaLabel(e){return 1===e.get(2)?y.N("accessibilityOffAriaLabel","The editor is not accessible at this time. Press {0} for options.",T.IJ?"Shift+Alt+F1":"Alt+F1"):e.get(4)}_setAccessibilityOptions(e){this._accessibilitySupport=e.get(2);const t=e.get(3);2===this._accessibilitySupport&&t===re.BH.accessibilityPageSize.defaultValue?this._accessibilityPageSize=500:this._accessibilityPageSize=t}onConfigurationChanged(e){const t=this._context.configuration.options,n=t.get(129);return this._setAccessibilityOptions(t),this._contentLeft=n.contentLeft,this._contentWidth=n.contentWidth,this._contentHeight=n.height,this._fontInfo=t.get(41),this._lineHeight=t.get(57),this._emptySelectionClipboard=t.get(30),this._copyWithSyntaxHighlighting=t.get(19),this.textArea.setAttribute("aria-label",this._getAriaLabel(t)),this.textArea.setAttribute("tabindex",String(t.get(111))),(e.hasChanged(28)||e.hasChanged(79))&&(t.get(28)&&t.get(79)?this.textArea.setAttribute("readonly","true"):this.textArea.removeAttribute("readonly")),e.hasChanged(2)&&this._textAreaInput.writeScreenReaderContent("strategy changed"),!0}onCursorStateChanged(e){return this._selections=e.selections.slice(0),this._modelSelections=e.modelSelections.slice(0),this._textAreaInput.writeScreenReaderContent("selection changed"),!0}onDecorationsChanged(e){return!0}onFlushed(e){return!0}onLinesChanged(e){return!0}onLinesDeleted(e){return!0}onLinesInserted(e){return!0}onScrollChanged(e){return this._scrollLeft=e.scrollLeft,this._scrollTop=e.scrollTop,!0}onZonesChanged(e){return!0}isFocused(){return this._textAreaInput.isFocused()}focusTextArea(){this._textAreaInput.focusTextArea()}getLastRenderData(){return this._lastRenderPosition}setAriaOptions(e){e.activeDescendant?(this.textArea.setAttribute("aria-haspopup","true"),this.textArea.setAttribute("aria-autocomplete","list"),this.textArea.setAttribute("aria-activedescendant",e.activeDescendant)):(this.textArea.setAttribute("aria-haspopup","false"),this.textArea.setAttribute("aria-autocomplete","both"),this.textArea.removeAttribute("aria-activedescendant")),e.role&&this.textArea.setAttribute("role",e.role)}prepareRender(e){this._primaryCursorPosition=new fe.L(this._selections[0].positionLineNumber,this._selections[0].positionColumn),this._primaryCursorVisibleRange=e.visibleRangeForPosition(this._primaryCursorPosition)}render(e){this._textAreaInput.writeScreenReaderContent("render"),this._render()}_render(){if(this._visibleTextArea)return void this._renderInsideEditor(null,this._visibleTextArea.top-this._scrollTop,this._contentLeft+this._visibleTextArea.left-this._scrollLeft,this._visibleTextArea.width,this._lineHeight);if(!this._primaryCursorVisibleRange)return void this._renderAtTopLeft();const e=this._contentLeft+this._primaryCursorVisibleRange.left-this._scrollLeft;if(ethis._contentLeft+this._contentWidth)return void this._renderAtTopLeft();const t=this._context.viewLayout.getVerticalOffsetForLineNumber(this._selections[0].positionLineNumber)-this._scrollTop;t<0||t>this._contentHeight?this._renderAtTopLeft():T.dz?this._renderInsideEditor(this._primaryCursorPosition,t,e,tt?0:1,this._lineHeight):this._renderInsideEditor(this._primaryCursorPosition,t,e,tt?0:1,tt?0:1)}_renderInsideEditor(e,t,n,i,o){this._lastRenderPosition=e;const r=this.textArea,s=this.textAreaCover;E.V.applyFontInfo(r,this._fontInfo),r.setTop(t),r.setLeft(n),r.setWidth(i),r.setHeight(o),s.setTop(0),s.setLeft(0),s.setWidth(0),s.setHeight(0)}_renderAtTopLeft(){this._lastRenderPosition=null;const e=this.textArea,t=this.textAreaCover;if(E.V.applyFontInfo(e,this._fontInfo),e.setTop(0),e.setLeft(0),t.setTop(0),t.setLeft(0),tt)return e.setWidth(0),e.setHeight(0),t.setWidth(0),void t.setHeight(0);e.setWidth(1),e.setHeight(1),t.setWidth(1),t.setHeight(1);const n=this._context.configuration.options;n.get(47)?t.setClassName("monaco-editor-background textAreaCover "+Qe.OUTER_CLASS_NAME):0!==n.get(58).renderType?t.setClassName("monaco-editor-background textAreaCover "+Ge.CLASS_NAME):t.setClassName("monaco-editor-background textAreaCover")}}var it=n(8728);class ot{constructor(e,t,n,i){this.configuration=e,this.viewModel=t,this.userInputEvents=n,this.commandDelegate=i}paste(e,t,n,i){this.commandDelegate.paste(e,t,n,i)}type(e){this.commandDelegate.type(e)}compositionType(e,t,n,i){this.commandDelegate.compositionType(e,t,n,i)}compositionStart(){this.commandDelegate.startComposition()}compositionEnd(){this.commandDelegate.endComposition()}cut(){this.commandDelegate.cut()}setSelection(e){it.CoreNavigationCommands.SetSelection.runCoreEditorCommand(this.viewModel,{source:"keyboard",selection:e})}_validateViewColumn(e){const t=this.viewModel.getLineMinColumn(e.lineNumber);return e.column=4?this._selectAll():3===e.mouseDownCount?this._hasMulticursorModifier(e)?e.inSelectionMode?this._lastCursorLineSelectDrag(e.position):this._lastCursorLineSelect(e.position):e.inSelectionMode?this._lineSelectDrag(e.position):this._lineSelect(e.position):2===e.mouseDownCount?this._hasMulticursorModifier(e)?this._lastCursorWordSelect(e.position):e.inSelectionMode?this._wordSelectDrag(e.position):this._wordSelect(e.position):this._hasMulticursorModifier(e)?this._hasNonMulticursorModifier(e)||(e.shiftKey?this._columnSelect(e.position,e.mouseColumn,!0):e.inSelectionMode?this._lastCursorMoveToSelect(e.position):this._createCursor(e.position,!1)):e.inSelectionMode?e.altKey||i?this._columnSelect(e.position,e.mouseColumn,!0):this._moveToSelect(e.position):this.moveTo(e.position)}_usualArgs(e){return e=this._validateViewColumn(e),{source:"mouse",position:this._convertViewToModelPosition(e),viewPosition:e}}moveTo(e){it.CoreNavigationCommands.MoveTo.runCoreEditorCommand(this.viewModel,this._usualArgs(e))}_moveToSelect(e){it.CoreNavigationCommands.MoveToSelect.runCoreEditorCommand(this.viewModel,this._usualArgs(e))}_columnSelect(e,t,n){e=this._validateViewColumn(e),it.CoreNavigationCommands.ColumnSelect.runCoreEditorCommand(this.viewModel,{source:"mouse",position:this._convertViewToModelPosition(e),viewPosition:e,mouseColumn:t,doColumnSelect:n})}_createCursor(e,t){e=this._validateViewColumn(e),it.CoreNavigationCommands.CreateCursor.runCoreEditorCommand(this.viewModel,{source:"mouse",position:this._convertViewToModelPosition(e),viewPosition:e,wholeLine:t})}_lastCursorMoveToSelect(e){it.CoreNavigationCommands.LastCursorMoveToSelect.runCoreEditorCommand(this.viewModel,this._usualArgs(e))}_wordSelect(e){it.CoreNavigationCommands.WordSelect.runCoreEditorCommand(this.viewModel,this._usualArgs(e))}_wordSelectDrag(e){it.CoreNavigationCommands.WordSelectDrag.runCoreEditorCommand(this.viewModel,this._usualArgs(e))}_lastCursorWordSelect(e){it.CoreNavigationCommands.LastCursorWordSelect.runCoreEditorCommand(this.viewModel,this._usualArgs(e))}_lineSelect(e){it.CoreNavigationCommands.LineSelect.runCoreEditorCommand(this.viewModel,this._usualArgs(e))}_lineSelectDrag(e){it.CoreNavigationCommands.LineSelectDrag.runCoreEditorCommand(this.viewModel,this._usualArgs(e))}_lastCursorLineSelect(e){it.CoreNavigationCommands.LastCursorLineSelect.runCoreEditorCommand(this.viewModel,this._usualArgs(e))}_lastCursorLineSelectDrag(e){it.CoreNavigationCommands.LastCursorLineSelectDrag.runCoreEditorCommand(this.viewModel,this._usualArgs(e))}_selectAll(){it.CoreNavigationCommands.SelectAll.runCoreEditorCommand(this.viewModel,{source:"mouse"})}_convertViewToModelPosition(e){return this.viewModel.coordinatesConverter.convertViewPositionToModelPosition(e)}emitKeyDown(e){this.userInputEvents.emitKeyDown(e)}emitKeyUp(e){this.userInputEvents.emitKeyUp(e)}emitContextMenu(e){this.userInputEvents.emitContextMenu(e)}emitMouseMove(e){this.userInputEvents.emitMouseMove(e)}emitMouseLeave(e){this.userInputEvents.emitMouseLeave(e)}emitMouseUp(e){this.userInputEvents.emitMouseUp(e)}emitMouseDown(e){this.userInputEvents.emitMouseDown(e)}emitMouseDrag(e){this.userInputEvents.emitMouseDrag(e)}emitMouseDrop(e){this.userInputEvents.emitMouseDrop(e)}emitMouseDropCanceled(){this.userInputEvents.emitMouseDropCanceled()}emitMouseWheel(e){this.userInputEvents.emitMouseWheel(e)}}class rt{constructor(e){this.onKeyDown=null,this.onKeyUp=null,this.onContextMenu=null,this.onMouseMove=null,this.onMouseLeave=null,this.onMouseDown=null,this.onMouseUp=null,this.onMouseDrag=null,this.onMouseDrop=null,this.onMouseDropCanceled=null,this.onMouseWheel=null,this._coordinatesConverter=e}emitKeyDown(e){this.onKeyDown&&this.onKeyDown(e)}emitKeyUp(e){this.onKeyUp&&this.onKeyUp(e)}emitContextMenu(e){this.onContextMenu&&this.onContextMenu(this._convertViewToModelMouseEvent(e))}emitMouseMove(e){this.onMouseMove&&this.onMouseMove(this._convertViewToModelMouseEvent(e))}emitMouseLeave(e){this.onMouseLeave&&this.onMouseLeave(this._convertViewToModelMouseEvent(e))}emitMouseDown(e){this.onMouseDown&&this.onMouseDown(this._convertViewToModelMouseEvent(e))}emitMouseUp(e){this.onMouseUp&&this.onMouseUp(this._convertViewToModelMouseEvent(e))}emitMouseDrag(e){this.onMouseDrag&&this.onMouseDrag(this._convertViewToModelMouseEvent(e))}emitMouseDrop(e){this.onMouseDrop&&this.onMouseDrop(this._convertViewToModelMouseEvent(e))}emitMouseDropCanceled(){this.onMouseDropCanceled&&this.onMouseDropCanceled()}emitMouseWheel(e){this.onMouseWheel&&this.onMouseWheel(e)}_convertViewToModelMouseEvent(e){return e.target?{event:e.event,target:this._convertViewToModelMouseTarget(e.target)}:e}_convertViewToModelMouseTarget(e){return rt.convertViewToModelMouseTarget(e,this._coordinatesConverter)}static convertViewToModelMouseTarget(e,t){return new st(e.element,e.type,e.mouseColumn,e.position?t.convertViewPositionToModelPosition(e.position):null,e.range?t.convertViewRangeToModelRange(e.range):null,e.detail)}}class st{constructor(e,t,n,i,o,r){this.element=e,this.type=t,this.mouseColumn=n,this.position=i,this.range=o,this.detail=r}toString(){return Ae.toString(this)}}var at,lt=n(72);class dt{constructor(e){this._createLine=e,this._set(1,[])}flush(){this._set(1,[])}_set(e,t){this._lines=t,this._rendLineNumberStart=e}_get(){return{rendLineNumberStart:this._rendLineNumberStart,lines:this._lines}}getStartLineNumber(){return this._rendLineNumberStart}getEndLineNumber(){return this._rendLineNumberStart+this._lines.length-1}getCount(){return this._lines.length}getLine(e){const t=e-this._rendLineNumberStart;if(t<0||t>=this._lines.length)throw new Error("Illegal value for lineNumber");return this._lines[t]}onLinesDeleted(e,t){if(0===this.getCount())return null;const n=this.getStartLineNumber(),i=this.getEndLineNumber();if(ti)return null;let o=0,r=0;for(let s=n;s<=i;s++){const n=s-this._rendLineNumberStart;e<=s&&s<=t&&(0===r?(o=n,r=1):r++)}if(e=n&&r<=i&&(this._lines[r-this._rendLineNumberStart].onContentChanged(),o=!0);return o}onLinesInserted(e,t){if(0===this.getCount())return null;const n=t-e+1,i=this.getStartLineNumber(),o=this.getEndLineNumber();if(e<=i)return this._rendLineNumberStart+=n,null;if(e>o)return null;if(n+e>o)return this._lines.splice(e-this._rendLineNumberStart,o-e+1);const r=[];for(let e=0;en)continue;const s=Math.max(t,r.fromLineNumber),a=Math.min(n,r.toLineNumber);for(let e=s;e<=a;e++){const t=e-this._rendLineNumberStart;this._lines[t].onTokensChanged(),i=!0}}return i}}class ct{constructor(e){this._host=e,this.domNode=this._createDomNode(),this._linesCollection=new dt((()=>this._host.createVisibleLine()))}_createDomNode(){const e=(0,M.X)(document.createElement("div"));return e.setClassName("view-layer"),e.setPosition("absolute"),e.domNode.setAttribute("role","presentation"),e.domNode.setAttribute("aria-hidden","true"),e}onConfigurationChanged(e){return!!e.hasChanged(129)}onFlushed(e){return this._linesCollection.flush(),!0}onLinesChanged(e){return this._linesCollection.onLinesChanged(e.fromLineNumber,e.toLineNumber)}onLinesDeleted(e){const t=this._linesCollection.onLinesDeleted(e.fromLineNumber,e.toLineNumber);if(t)for(let e=0,n=t.length;et){const e=t,r=Math.min(n,o.rendLineNumberStart-1);e<=r&&(this._insertLinesBefore(o,e,r,i,t),o.linesLength+=r-e+1)}else if(o.rendLineNumberStart0&&(this._removeLinesBefore(o,e),o.linesLength-=e)}if(o.rendLineNumberStart=t,o.rendLineNumberStart+o.linesLength-1n){const e=Math.max(0,n-o.rendLineNumberStart+1),t=o.linesLength-1-e+1;t>0&&(this._removeLinesAfter(o,t),o.linesLength-=t)}return this._finishRendering(o,!1,i),o}_renderUntouchedLines(e,t,n,i,o){const r=e.rendLineNumberStart,s=e.lines;for(let e=t;e<=n;e++){const t=r+e;s[e].layoutLine(t,i[t-o])}}_insertLinesBefore(e,t,n,i,o){const r=[];let s=0;for(let e=t;e<=n;e++)r[s++]=this.host.createVisibleLine();e.lines=r.concat(e.lines)}_removeLinesBefore(e,t){for(let n=0;n=0;t--){const n=e.lines[t];i[t]&&(n.setDomNode(r),r=r.previousSibling)}}_finishRenderingInvalidLines(e,t,n){const i=document.createElement("div");ht._ttPolicy&&(t=ht._ttPolicy.createHTML(t)),i.innerHTML=t;for(let t=0;te}),ht._sb=(0,lt.l$)(1e5);class ut extends K{constructor(e){super(e),this._visibleLines=new ct(this),this.domNode=this._visibleLines.domNode,this._dynamicOverlays=[],this._isFocused=!1,this.domNode.setClassName("view-overlays")}shouldRender(){if(super.shouldRender())return!0;for(let e=0,t=this._dynamicOverlays.length;ee.shouldRender()));for(let n=0,i=t.length;n'),i.appendASCIIString(o),i.appendASCIIString(""),!0)}layoutLine(e,t){this._domNode&&(this._domNode.setTop(t),this._domNode.setHeight(this._lineHeight))}}class pt extends ut{constructor(e){super(e);const t=this._context.configuration.options.get(129);this._contentWidth=t.contentWidth,this.domNode.setHeight(0)}onConfigurationChanged(e){const t=this._context.configuration.options.get(129);return this._contentWidth=t.contentWidth,super.onConfigurationChanged(e)||!0}onScrollChanged(e){return super.onScrollChanged(e)||e.scrollWidthChanged}_viewOverlaysRender(e){super._viewOverlaysRender(e),this.domNode.setWidth(Math.max(e.scrollWidth,this._contentWidth))}}class mt extends ut{constructor(e){super(e);const t=this._context.configuration.options,n=t.get(129);this._contentLeft=n.contentLeft,this.domNode.setClassName("margin-view-overlays"),this.domNode.setWidth(1),E.V.applyFontInfo(this.domNode,t.get(41))}onConfigurationChanged(e){const t=this._context.configuration.options;E.V.applyFontInfo(this.domNode,t.get(41));const n=t.get(129);return this._contentLeft=n.contentLeft,super.onConfigurationChanged(e)||!0}onScrollChanged(e){return super.onScrollChanged(e)||e.scrollHeightChanged}_viewOverlaysRender(e){super._viewOverlaysRender(e);const t=Math.min(e.scrollHeight,1e6);this.domNode.setHeight(t),this.domNode.setWidth(this._contentLeft)}}class ft{constructor(e,t){this._coordinateBrand=void 0,this.top=e,this.left=t}}class _t extends K{constructor(e,t){super(e),this._viewDomNode=t,this._widgets={},this.domNode=(0,M.X)(document.createElement("div")),q.write(this.domNode,1),this.domNode.setClassName("contentWidgets"),this.domNode.setPosition("absolute"),this.domNode.setTop(0),this.overflowingContentWidgetsDomNode=(0,M.X)(document.createElement("div")),q.write(this.overflowingContentWidgetsDomNode,2),this.overflowingContentWidgetsDomNode.setClassName("overflowingContentWidgets")}dispose(){super.dispose(),this._widgets={}}onConfigurationChanged(e){const t=Object.keys(this._widgets);for(const n of t)this._widgets[n].onConfigurationChanged(e);return!0}onDecorationsChanged(e){return!0}onFlushed(e){return!0}onLineMappingChanged(e){const t=Object.keys(this._widgets);for(const n of t)this._widgets[n].onLineMappingChanged(e);return!0}onLinesChanged(e){return!0}onLinesDeleted(e){return!0}onLinesInserted(e){return!0}onScrollChanged(e){return!0}onZonesChanged(e){return!0}addWidget(e){const t=new bt(this._context,this._viewDomNode,e);this._widgets[t.id]=t,t.allowEditorOverflow?this.overflowingContentWidgetsDomNode.appendChild(t.domNode):this.domNode.appendChild(t.domNode),this.setShouldRender()}setWidgetPosition(e,t,n){this._widgets[e.getId()].setPosition(t,n),this.setShouldRender()}removeWidget(e){const t=e.getId();if(this._widgets.hasOwnProperty(t)){const e=this._widgets[t];delete this._widgets[t];const n=e.domNode.domNode;n.parentNode.removeChild(n),n.removeAttribute("monaco-visible-content-widget"),this.setShouldRender()}}shouldSuppressMouseDownOnWidget(e){return!!this._widgets.hasOwnProperty(e)&&this._widgets[e].suppressMouseDown}onBeforeRender(e){const t=Object.keys(this._widgets);for(const n of t)this._widgets[n].onBeforeRender(e)}prepareRender(e){const t=Object.keys(this._widgets);for(const n of t)this._widgets[n].prepareRender(e)}render(e){const t=Object.keys(this._widgets);for(const n of t)this._widgets[n].render(e)}}class bt{constructor(e,t,n){this._context=e,this._viewDomNode=t,this._actual=n,this.domNode=(0,M.X)(this._actual.getDomNode()),this.id=this._actual.getId(),this.allowEditorOverflow=this._actual.allowEditorOverflow||!1,this.suppressMouseDown=this._actual.suppressMouseDown||!1;const i=this._context.configuration.options,o=i.get(129);this._fixedOverflowWidgets=i.get(34),this._contentWidth=o.contentWidth,this._contentLeft=o.contentLeft,this._lineHeight=i.get(57),this._range=null,this._viewRange=null,this._preference=[],this._cachedDomNodeClientWidth=-1,this._cachedDomNodeClientHeight=-1,this._maxWidth=this._getMaxWidth(),this._isVisible=!1,this._renderData=null,this.domNode.setPosition(this._fixedOverflowWidgets&&this.allowEditorOverflow?"fixed":"absolute"),this.domNode.setVisibility("hidden"),this.domNode.setAttribute("widgetId",this.id),this.domNode.setMaxWidth(this._maxWidth)}onConfigurationChanged(e){const t=this._context.configuration.options;if(this._lineHeight=t.get(57),e.hasChanged(129)){const e=t.get(129);this._contentLeft=e.contentLeft,this._contentWidth=e.contentWidth,this._maxWidth=this._getMaxWidth()}}onLineMappingChanged(e){this._setPosition(this._range)}_setPosition(e){if(this._range=e,this._viewRange=null,this._range){const e=this._context.model.validateModelRange(this._range);(this._context.model.coordinatesConverter.modelPositionIsVisible(e.getStartPosition())||this._context.model.coordinatesConverter.modelPositionIsVisible(e.getEndPosition()))&&(this._viewRange=this._context.model.coordinatesConverter.convertModelRangeToViewRange(e))}}_getMaxWidth(){return this.allowEditorOverflow?window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth:this._contentWidth}setPosition(e,t){this._setPosition(e),this._preference=t,this._cachedDomNodeClientWidth=-1,this._cachedDomNodeClientHeight=-1}_layoutBoxInViewport(e,t,n,i,o){const r=e.top,s=r,a=t.top+this._lineHeight,l=r-i,d=s>=i,c=a,h=o.viewportHeight-a>=i;let u=e.left,g=t.left;return u+n>o.scrollLeft+o.viewportWidth&&(u=o.scrollLeft+o.viewportWidth-n),g+n>o.scrollLeft+o.viewportWidth&&(g=o.scrollLeft+o.viewportWidth-n),ur){const e=s-(r-i);s-=e,n-=e}if(s=22,f=d+i<=c.height-22;return this._fixedOverflowWidgets?{fitsAbove:m,aboveTop:Math.max(l,22),aboveLeft:u,fitsBelow:f,belowTop:d,belowLeft:p}:{fitsAbove:m,aboveTop:r,aboveLeft:h,fitsBelow:f,belowTop:s,belowLeft:g}}_prepareRenderWidgetAtExactPositionOverflowing(e){return new ft(e.top,e.left+this._contentLeft)}_getTopAndBottomLeft(e){if(!this._viewRange)return[null,null];const t=e.linesVisibleRangesForRange(this._viewRange,!1);if(!t||0===t.length)return[null,null];let n=t[0],i=t[0];for(const e of t)e.lineNumberi.lineNumber&&(i=e);let o=1073741824;for(const e of n.ranges)e.lefte.endLineNumber||this.domNode.setMaxWidth(this._maxWidth))}prepareRender(e){this._renderData=this._prepareRenderWidget(e)}render(e){if(!this._renderData)return this._isVisible&&(this.domNode.removeAttribute("monaco-visible-content-widget"),this._isVisible=!1,this.domNode.setVisibility("hidden")),void("function"==typeof this._actual.afterRender&&Ct(this._actual.afterRender,this._actual,null));this.allowEditorOverflow?(this.domNode.setTop(this._renderData.coordinate.top),this.domNode.setLeft(this._renderData.coordinate.left)):(this.domNode.setTop(this._renderData.coordinate.top+e.scrollTop-e.bigNumbersDelta),this.domNode.setLeft(this._renderData.coordinate.left)),this._isVisible||(this.domNode.setVisibility("inherit"),this.domNode.setAttribute("monaco-visible-content-widget","true"),this._isVisible=!0),"function"==typeof this._actual.afterRender&&Ct(this._actual.afterRender,this._actual,this._renderData.position)}}function Ct(e,t,...n){try{return e.call(t,...n)}catch(e){return null}}var vt=n(1260),wt={};wt.styleTagTransform=C(),wt.setAttributes=m(),wt.insert=g().bind(null,"head"),wt.domAPI=h(),wt.insertStyleElement=_(),d()(vt.Z,wt),vt.Z&&vt.Z.locals&&vt.Z.locals;var yt=n(9488);let At=!0;class St extends Ke{constructor(e){super(),this._context=e;const t=this._context.configuration.options,n=t.get(129);this._lineHeight=t.get(57),this._renderLineHighlight=t.get(84),this._renderLineHighlightOnlyWhenFocus=t.get(85),this._contentLeft=n.contentLeft,this._contentWidth=n.contentWidth,this._selectionIsEmpty=!0,this._focused=!1,this._cursorLineNumbers=[1],this._selections=[new I.Y(1,1,1,1)],this._renderData=null,this._context.addEventHandler(this)}dispose(){this._context.removeEventHandler(this),super.dispose()}_readFromSelections(){let e=!1;const t=At?this._selections.slice(0,1):this._selections,n=t.map((e=>e.positionLineNumber));n.sort(((e,t)=>e-t)),yt.fS(this._cursorLineNumbers,n)||(this._cursorLineNumbers=n,e=!0);const i=t.every((e=>e.isEmpty()));return this._selectionIsEmpty!==i&&(this._selectionIsEmpty=i,e=!0),e}onThemeChanged(e){return this._readFromSelections()}onConfigurationChanged(e){const t=this._context.configuration.options,n=t.get(129);return this._lineHeight=t.get(57),this._renderLineHighlight=t.get(84),this._renderLineHighlightOnlyWhenFocus=t.get(85),this._contentLeft=n.contentLeft,this._contentWidth=n.contentWidth,!0}onCursorStateChanged(e){return this._selections=e.selections,this._readFromSelections()}onFlushed(e){return!0}onLinesDeleted(e){return!0}onLinesInserted(e){return!0}onScrollChanged(e){return e.scrollWidthChanged||e.scrollTopChanged}onZonesChanged(e){return!0}onFocusChanged(e){return!!this._renderLineHighlightOnlyWhenFocus&&(this._focused=e.isFocused,!0)}prepareRender(e){if(!this._shouldRenderThis())return void(this._renderData=null);const t=this._renderOne(e),n=e.visibleRange.startLineNumber,i=e.visibleRange.endLineNumber,o=this._cursorLineNumbers.length;let r=0;const s=[];for(let e=n;e<=i;e++){const i=e-n;for(;r=this._renderData.length?"":this._renderData[n]}}class xt extends St{_renderOne(e){return`
    `}_shouldRenderThis(){return("line"===this._renderLineHighlight||"all"===this._renderLineHighlight)&&this._selectionIsEmpty&&(!this._renderLineHighlightOnlyWhenFocus||this._focused)}_shouldRenderOther(){return("gutter"===this._renderLineHighlight||"all"===this._renderLineHighlight)&&(!this._renderLineHighlightOnlyWhenFocus||this._focused)}}class kt extends St{_renderOne(e){return`
    `}_shouldRenderMargin(){return("gutter"===this._renderLineHighlight||"all"===this._renderLineHighlight)&&(!this._renderLineHighlightOnlyWhenFocus||this._focused)}_shouldRenderThis(){return!0}_shouldRenderOther(){return("line"===this._renderLineHighlight||"all"===this._renderLineHighlight)&&this._selectionIsEmpty&&(!this._renderLineHighlightOnlyWhenFocus||this._focused)}}(0,Ye.Ic)(((e,t)=>{At=!1;const n=e.getColor(qe.Kh);if(n&&(t.addRule(`.monaco-editor .view-overlays .current-line { background-color: ${n}; }`),t.addRule(`.monaco-editor .margin-view-overlays .current-line-margin { background-color: ${n}; border: none; }`)),!n||n.isTransparent()||e.defines(qe.Mm)){const n=e.getColor(qe.Mm);n&&(At=!0,t.addRule(`.monaco-editor .view-overlays .current-line { border: 2px solid ${n}; }`),t.addRule(`.monaco-editor .margin-view-overlays .current-line-margin { border: 2px solid ${n}; }`),"hc"===e.type&&(t.addRule(".monaco-editor .view-overlays .current-line { border-width: 1px; }"),t.addRule(".monaco-editor .margin-view-overlays .current-line-margin { border-width: 1px; }")))}}));var Lt=n(5686),Et={};Et.styleTagTransform=C(),Et.setAttributes=m(),Et.insert=g().bind(null,"head"),Et.domAPI=h(),Et.insertStyleElement=_(),d()(Lt.Z,Et),Lt.Z&&Lt.Z.locals&&Lt.Z.locals;class Nt extends Ke{constructor(e){super(),this._context=e;const t=this._context.configuration.options;this._lineHeight=t.get(57),this._typicalHalfwidthCharacterWidth=t.get(41).typicalHalfwidthCharacterWidth,this._renderResult=null,this._context.addEventHandler(this)}dispose(){this._context.removeEventHandler(this),this._renderResult=null,super.dispose()}onConfigurationChanged(e){const t=this._context.configuration.options;return this._lineHeight=t.get(57),this._typicalHalfwidthCharacterWidth=t.get(41).typicalHalfwidthCharacterWidth,!0}onDecorationsChanged(e){return!0}onFlushed(e){return!0}onLinesChanged(e){return!0}onLinesDeleted(e){return!0}onLinesInserted(e){return!0}onScrollChanged(e){return e.scrollTopChanged||e.scrollWidthChanged}onZonesChanged(e){return!0}prepareRender(e){const t=e.getDecorationsInViewport();let n=[],i=0;for(let e=0,o=t.length;e{if(e.options.zIndext.options.zIndex)return 1;const n=e.options.className,i=t.options.className;return ni?1:_e.e.compareRangesUsingStarts(e.range,t.range)}));const o=e.visibleRange.startLineNumber,r=e.visibleRange.endLineNumber,s=[];for(let e=o;e<=r;e++)s[e-o]="";this._renderWholeLineDecorations(e,n,s),this._renderNormalDecorations(e,n,s),this._renderResult=s}_renderWholeLineDecorations(e,t,n){const i=String(this._lineHeight),o=e.visibleRange.startLineNumber,r=e.visibleRange.endLineNumber;for(let e=0,s=t.length;e',l=Math.max(s.range.startLineNumber,o),d=Math.min(s.range.endLineNumber,r);for(let e=l;e<=d;e++)n[e-o]+=a}}_renderNormalDecorations(e,t,n){const i=String(this._lineHeight),o=e.visibleRange.startLineNumber;let r=null,s=!1,a=null;for(let l=0,d=t.length;l';s[l]+=r}}}render(e,t){if(!this._renderResult)return"";const n=t-e;return n<0||n>=this._renderResult.length?"":this._renderResult[n]}}var Dt=n(6781);class It extends K{constructor(e,t,n,i){super(e);const o=this._context.configuration.options,r=o.get(91),s=o.get(65),a=o.get(32),l=o.get(94),d={listenOnDomNode:n.domNode,className:"editor-scrollable "+(0,Ye.m6)(e.theme.type),useShadows:!1,lazyRender:!0,vertical:r.vertical,horizontal:r.horizontal,verticalHasArrows:r.verticalHasArrows,horizontalHasArrows:r.horizontalHasArrows,verticalScrollbarSize:r.verticalScrollbarSize,verticalSliderSize:r.verticalSliderSize,horizontalScrollbarSize:r.horizontalScrollbarSize,horizontalSliderSize:r.horizontalSliderSize,handleMouseWheel:r.handleMouseWheel,alwaysConsumeMouseWheel:r.alwaysConsumeMouseWheel,arrowSize:r.arrowSize,mouseWheelScrollSensitivity:s,fastScrollSensitivity:a,scrollPredominantAxis:l,scrollByPage:r.scrollByPage};this.scrollbar=this._register(new Dt.$Z(t.domNode,d,this._context.viewLayout.getScrollable())),q.write(this.scrollbar.getDomNode(),5),this.scrollbarDomNode=(0,M.X)(this.scrollbar.getDomNode()),this.scrollbarDomNode.setPosition("absolute"),this._setLayout();const c=(e,t,n)=>{const i={};if(t){const t=e.scrollTop;t&&(i.scrollTop=this._context.viewLayout.getCurrentScrollTop()+t,e.scrollTop=0)}if(n){const t=e.scrollLeft;t&&(i.scrollLeft=this._context.viewLayout.getCurrentScrollLeft()+t,e.scrollLeft=0)}this._context.model.setScrollPosition(i,1)};this._register(A.nm(n.domNode,"scroll",(e=>c(n.domNode,!0,!0)))),this._register(A.nm(t.domNode,"scroll",(e=>c(t.domNode,!0,!1)))),this._register(A.nm(i.domNode,"scroll",(e=>c(i.domNode,!0,!1)))),this._register(A.nm(this.scrollbarDomNode.domNode,"scroll",(e=>c(this.scrollbarDomNode.domNode,!0,!1))))}dispose(){super.dispose()}_setLayout(){const e=this._context.configuration.options,t=e.get(129);this.scrollbarDomNode.setLeft(t.contentLeft),"right"===e.get(63).side?this.scrollbarDomNode.setWidth(t.contentWidth+t.minimap.minimapWidth):this.scrollbarDomNode.setWidth(t.contentWidth),this.scrollbarDomNode.setHeight(t.height)}getOverviewRulerLayoutInfo(){return this.scrollbar.getOverviewRulerLayoutInfo()}getDomNode(){return this.scrollbarDomNode}delegateVerticalScrollbarMouseDown(e){this.scrollbar.delegateVerticalScrollbarMouseDown(e)}onConfigurationChanged(e){if(e.hasChanged(91)||e.hasChanged(65)||e.hasChanged(32)){const e=this._context.configuration.options,t=e.get(91),n=e.get(65),i=e.get(32),o=e.get(94),r={vertical:t.vertical,horizontal:t.horizontal,verticalScrollbarSize:t.verticalScrollbarSize,horizontalScrollbarSize:t.horizontalScrollbarSize,scrollByPage:t.scrollByPage,handleMouseWheel:t.handleMouseWheel,mouseWheelScrollSensitivity:n,fastScrollSensitivity:i,scrollPredominantAxis:o};this.scrollbar.updateOptions(r)}return e.hasChanged(129)&&this._setLayout(),!0}onScrollChanged(e){return!0}onThemeChanged(e){return this.scrollbar.updateClassName("editor-scrollable "+(0,Ye.m6)(this._context.theme.type)),!0}prepareRender(e){}render(e){this.scrollbar.renderNow()}}var Mt=n(4827),Tt={};Tt.styleTagTransform=C(),Tt.setAttributes=m(),Tt.insert=g().bind(null,"head"),Tt.domAPI=h(),Tt.insertStyleElement=_(),d()(Mt.Z,Tt),Mt.Z&&Mt.Z.locals&&Mt.Z.locals;class Rt{constructor(e,t,n){this._decorationToRenderBrand=void 0,this.startLineNumber=+e,this.endLineNumber=+t,this.className=String(n)}}class Ot extends Ke{_render(e,t,n){const i=[];for(let n=e;n<=t;n++)i[n-e]=[];if(0===n.length)return i;n.sort(((e,t)=>e.className===t.className?e.startLineNumber===t.startLineNumber?e.endLineNumber-t.endLineNumber:e.startLineNumber-t.startLineNumber:e.className',s=[];for(let e=t;e<=n;e++){const n=e-t,o=i[n];0===o.length?s[n]="":s[n]='
    =this._renderResult.length?"":this._renderResult[n]}}var Pt=n(6848),Ft={};Ft.styleTagTransform=C(),Ft.setAttributes=m(),Ft.insert=g().bind(null,"head"),Ft.domAPI=h(),Ft.insertStyleElement=_(),d()(Pt.Z,Ft),Pt.Z&&Pt.Z.locals&&Pt.Z.locals;class Wt extends Ke{constructor(e){super(),this._context=e,this._primaryLineNumber=0;const t=this._context.configuration.options,n=t.get(130),i=t.get(41);this._lineHeight=t.get(57),this._spaceWidth=i.spaceWidth,this._enabled=t.get(82),this._activeIndentEnabled=t.get(50),this._maxIndentLeft=-1===n.wrappingColumn?-1:n.wrappingColumn*i.typicalHalfwidthCharacterWidth,this._renderResult=null,this._context.addEventHandler(this)}dispose(){this._context.removeEventHandler(this),this._renderResult=null,super.dispose()}onConfigurationChanged(e){const t=this._context.configuration.options,n=t.get(130),i=t.get(41);return this._lineHeight=t.get(57),this._spaceWidth=i.spaceWidth,this._enabled=t.get(82),this._activeIndentEnabled=t.get(50),this._maxIndentLeft=-1===n.wrappingColumn?-1:n.wrappingColumn*i.typicalHalfwidthCharacterWidth,!0}onCursorStateChanged(e){const t=e.selections[0],n=t.isEmpty()?t.positionLineNumber:0;return this._primaryLineNumber!==n&&(this._primaryLineNumber=n,!0)}onDecorationsChanged(e){return!0}onFlushed(e){return!0}onLinesChanged(e){return!0}onLinesDeleted(e){return!0}onLinesInserted(e){return!0}onScrollChanged(e){return e.scrollTopChanged}onZonesChanged(e){return!0}onLanguageConfigurationChanged(e){return!0}prepareRender(e){if(!this._enabled)return void(this._renderResult=null);const t=e.visibleRange.startLineNumber,n=e.visibleRange.endLineNumber,{indentSize:i}=this._context.model.getTextModelOptions(),o=i*this._spaceWidth,r=e.scrollWidth,s=this._lineHeight,a=this._context.model.getLinesIndentGuides(t,n);let l=0,d=0,c=0;if(this._activeIndentEnabled&&this._primaryLineNumber){const e=this._context.model.getActiveIndentGuide(this._primaryLineNumber,t,n);l=e.startLineNumber,d=e.endLineNumber,c=e.indent}const h=[];for(let i=t;i<=n;i++){const n=l<=i&&i<=d,u=i-t,g=a[u];let p="";if(g>=1){const t=e.visibleRangeForPosition(new fe.L(i,1));let a=t?t.left:0;for(let e=1;e<=g&&(p+=`
    `,a+=o,!(a>r||this._maxIndentLeft>0&&a>this._maxIndentLeft));e++);}h[u]=p}this._renderResult=h}render(e,t){if(!this._renderResult)return"";const n=t-e;return n<0||n>=this._renderResult.length?"":this._renderResult[n]}}(0,Ye.Ic)(((e,t)=>{const n=e.getColor(qe.tR);n&&t.addRule(`.monaco-editor .lines-content .cigr { box-shadow: 1px 0 0 0 ${n} inset; }`);const i=e.getColor(qe.Ym)||n;i&&t.addRule(`.monaco-editor .lines-content .cigra { box-shadow: 1px 0 0 0 ${i} inset; }`)}));var zt=n(9565),Vt={};Vt.styleTagTransform=C(),Vt.setAttributes=m(),Vt.insert=g().bind(null,"head"),Vt.domAPI=h(),Vt.insertStyleElement=_(),d()(zt.Z,Vt),zt.Z&&zt.Z.locals&&zt.Z.locals;class Ht{constructor(){this._currentVisibleRange=new _e.e(1,1,1,1)}getCurrentVisibleRange(){return this._currentVisibleRange}setCurrentVisibleRange(e){this._currentVisibleRange=e}}class jt{constructor(e,t,n,i,o,r){this.lineNumber=e,this.startColumn=t,this.endColumn=n,this.startScrollTop=i,this.stopScrollTop=o,this.scrollType=r,this.type="range",this.minLineNumber=e,this.maxLineNumber=e}}class $t{constructor(e,t,n,i){this.selections=e,this.startScrollTop=t,this.stopScrollTop=n,this.scrollType=i,this.type="selections";let o=e[0].startLineNumber,r=e[0].endLineNumber;for(let t=1,n=e.length;t{this._updateLineWidthsSlow()}),200),this._asyncCheckMonospaceFontAssumptions=new B.pY((()=>{this._checkMonospaceFontAssumptions()}),2e3),this._lastRenderedData=new Ht,this._horizontalRevealRequest=null}dispose(){this._asyncUpdateLineWidths.dispose(),this._asyncCheckMonospaceFontAssumptions.dispose(),super.dispose()}getDomNode(){return this.domNode}createVisibleLine(){return new ce(this._viewLineOptions)}onConfigurationChanged(e){this._visibleLines.onConfigurationChanged(e),e.hasChanged(130)&&(this._maxLineWidth=0);const t=this._context.configuration.options,n=t.get(41),i=t.get(130);return this._lineHeight=t.get(57),this._typicalHalfwidthCharacterWidth=n.typicalHalfwidthCharacterWidth,this._isViewportWrapping=i.isViewportWrapping,this._revealHorizontalRightPadding=t.get(88),this._cursorSurroundingLines=t.get(23),this._cursorSurroundingLinesStyle=t.get(24),this._canUseLayerHinting=!t.get(26),E.V.applyFontInfo(this.domNode,n),this._onOptionsMaybeChanged(),e.hasChanged(129)&&(this._maxLineWidth=0),!0}_onOptionsMaybeChanged(){const e=this._context.configuration,t=new de(e,this._context.theme.type);if(!this._viewLineOptions.equals(t)){this._viewLineOptions=t;const e=this._visibleLines.getStartLineNumber(),n=this._visibleLines.getEndLineNumber();for(let t=e;t<=n;t++)this._visibleLines.getVisibleLine(t).onOptionsChanged(this._viewLineOptions);return!0}return!1}onCursorStateChanged(e){const t=this._visibleLines.getStartLineNumber(),n=this._visibleLines.getEndLineNumber();let i=!1;for(let e=t;e<=n;e++)i=this._visibleLines.getVisibleLine(e).onSelectionChanged()||i;return i}onDecorationsChanged(e){{const e=this._visibleLines.getStartLineNumber(),t=this._visibleLines.getEndLineNumber();for(let n=e;n<=t;n++)this._visibleLines.getVisibleLine(n).onDecorationsChanged()}return!0}onFlushed(e){const t=this._visibleLines.onFlushed(e);return this._maxLineWidth=0,t}onLinesChanged(e){return this._visibleLines.onLinesChanged(e)}onLinesDeleted(e){return this._visibleLines.onLinesDeleted(e)}onLinesInserted(e){return this._visibleLines.onLinesInserted(e)}onRevealRangeRequest(e){const t=this._computeScrollTopToRevealRange(this._context.viewLayout.getFutureViewport(),e.source,e.range,e.selections,e.verticalType);if(-1===t)return!1;let n=this._context.viewLayout.validateScrollPosition({scrollTop:t});e.revealHorizontal?e.range&&e.range.startLineNumber!==e.range.endLineNumber?n={scrollTop:n.scrollTop,scrollLeft:0}:e.range?this._horizontalRevealRequest=new jt(e.range.startLineNumber,e.range.startColumn,e.range.endColumn,this._context.viewLayout.getCurrentScrollTop(),n.scrollTop,e.scrollType):e.selections&&e.selections.length>0&&(this._horizontalRevealRequest=new $t(e.selections,this._context.viewLayout.getCurrentScrollTop(),n.scrollTop,e.scrollType)):this._horizontalRevealRequest=null;const i=Math.abs(this._context.viewLayout.getCurrentScrollTop()-n.scrollTop)<=this._lineHeight?1:e.scrollType;return this._context.model.setScrollPosition(n,i),!0}onScrollChanged(e){if(this._horizontalRevealRequest&&e.scrollLeftChanged&&(this._horizontalRevealRequest=null),this._horizontalRevealRequest&&e.scrollTopChanged){const t=Math.min(this._horizontalRevealRequest.startScrollTop,this._horizontalRevealRequest.stopScrollTop),n=Math.max(this._horizontalRevealRequest.startScrollTop,this._horizontalRevealRequest.stopScrollTop);(e.scrollTopn)&&(this._horizontalRevealRequest=null)}return this.domNode.setWidth(e.scrollWidth),this._visibleLines.onScrollChanged(e)||!0}onTokensChanged(e){return this._visibleLines.onTokensChanged(e)}onZonesChanged(e){return this._context.model.setMaxLineWidth(this._maxLineWidth),this._visibleLines.onZonesChanged(e)}onThemeChanged(e){return this._onOptionsMaybeChanged()}getPositionFromDOMInfo(e,t){const n=this._getViewLineDomNode(e);if(null===n)return null;const i=this._getLineNumberFor(n);if(-1===i)return null;if(i<1||i>this._context.model.getLineCount())return null;if(1===this._context.model.getLineMaxColumn(i))return new fe.L(i,1);const o=this._visibleLines.getStartLineNumber(),r=this._visibleLines.getEndLineNumber();if(ir)return null;let s=this._visibleLines.getVisibleLine(i).getColumnOfNodeOffset(i,e,t);const a=this._context.model.getLineMinColumn(i);return sn?-1:this._visibleLines.getVisibleLine(e).getWidth()}linesVisibleRangesForRange(e,t){if(this.shouldRender())return null;const n=e.endLineNumber,i=_e.e.intersectRanges(e,this._lastRenderedData.getCurrentVisibleRange());if(!i)return null;let o=[],r=0;const s=new le(this.domNode.domNode,this._textRangeRestingSpot);let a=0;t&&(a=this._context.model.coordinatesConverter.convertViewPositionToModelPosition(new fe.L(i.startLineNumber,1)).lineNumber);const l=this._visibleLines.getStartLineNumber(),d=this._visibleLines.getEndLineNumber();for(let e=i.startLineNumber;e<=i.endLineNumber;e++){if(ed)continue;const c=e===i.startLineNumber?i.startColumn:1,h=e===i.endLineNumber?i.endColumn:this._context.model.getLineMaxColumn(e),u=this._visibleLines.getVisibleLine(e).getVisibleRangesForRange(c,h,s);if(u){if(t&&ethis._visibleLines.getEndLineNumber()?null:this._visibleLines.getVisibleLine(e).getVisibleRangesForRange(t,n,new le(this.domNode.domNode,this._textRangeRestingSpot))}visibleRangeForPosition(e){const t=this._visibleRangesForLineRange(e.lineNumber,e.column,e.column);return t?new X(t.outsideRenderedLine,t.ranges[0].left):null}updateLineWidths(){this._updateLineWidths(!1)}_updateLineWidthsFast(){return this._updateLineWidths(!0)}_updateLineWidthsSlow(){this._updateLineWidths(!1)}_updateLineWidths(e){const t=this._visibleLines.getStartLineNumber(),n=this._visibleLines.getEndLineNumber();let i=1,o=!0;for(let r=t;r<=n;r++){const t=this._visibleLines.getVisibleLine(r);!e||t.getWidthIsFast()?i=Math.max(i,t.getWidth()):o=!1}return o&&1===t&&n===this._context.model.getLineCount()&&(this._maxLineWidth=0),this._ensureMaxLineWidth(i),o}_checkMonospaceFontAssumptions(){let e=-1,t=-1;const n=this._visibleLines.getStartLineNumber(),i=this._visibleLines.getEndLineNumber();for(let o=n;o<=i;o++){const n=this._visibleLines.getVisibleLine(o);if(n.needsMonospaceFontCheck()){const i=n.getWidth();i>t&&(t=i,e=o)}}if(-1!==e&&!this._visibleLines.getVisibleLine(e).monospaceAssumptionsAreValid())for(let e=n;e<=i;e++)this._visibleLines.getVisibleLine(e).onMonospaceAssumptionsInvalidated()}prepareRender(){throw new Error("Not supported")}render(){throw new Error("Not supported")}renderText(e){if(this._visibleLines.renderLines(e),this._lastRenderedData.setCurrentVisibleRange(e.visibleRange),this.domNode.setWidth(this._context.viewLayout.getScrollWidth()),this.domNode.setHeight(Math.min(this._context.viewLayout.getScrollHeight(),1e6)),this._horizontalRevealRequest){const t=this._horizontalRevealRequest;if(e.startLineNumber<=t.minLineNumber&&t.maxLineNumber<=e.endLineNumber){this._horizontalRevealRequest=null,this.onDidRender();const e=this._computeScrollLeftToReveal(t);e&&(this._isViewportWrapping||this._ensureMaxLineWidth(e.maxHorizontalOffset),this._context.model.setScrollPosition({scrollLeft:e.scrollLeft},t.scrollType))}}if(this._updateLineWidthsFast()||this._asyncUpdateLineWidths.schedule(),T.IJ&&!this._asyncCheckMonospaceFontAssumptions.isScheduled()){const e=this._visibleLines.getStartLineNumber(),t=this._visibleLines.getEndLineNumber();for(let n=e;n<=t;n++)if(this._visibleLines.getVisibleLine(n).needsMonospaceFontCheck()){this._asyncCheckMonospaceFontAssumptions.schedule();break}}this._linesContent.setLayerHinting(this._canUseLayerHinting),this._linesContent.setContain("strict");const t=this._context.viewLayout.getCurrentScrollTop()-e.bigNumbersDelta;this._linesContent.setTop(-t),this._linesContent.setLeft(-this._context.viewLayout.getCurrentScrollLeft())}_ensureMaxLineWidth(e){const t=Math.ceil(e);this._maxLineWidth0){let e=i[0].startLineNumber,t=i[0].endLineNumber;for(let n=1,o=i.length;ns){if(!l)return-1;h=d}else if(5===o||6===o)if(6===o&&r<=d&&c<=a)h=r;else{const e=d-Math.max(5*this._lineHeight,.2*s),t=c-s;h=Math.max(t,e)}else if(1===o||2===o)if(2===o&&r<=d&&c<=a)h=r;else{const e=(d+c)/2;h=Math.max(0,e-s/2)}else h=this._computeMinimumScrolling(r,a,d,c,3===o,4===o);return h}_computeScrollLeftToReveal(e){const t=this._context.viewLayout.getCurrentViewport(),n=t.left,i=n+t.width;let o=1073741824,r=0;if("range"===e.type){const t=this._visibleRangesForLineRange(e.lineNumber,e.startColumn,e.endColumn);if(!t)return null;for(const e of t.ranges)o=Math.min(o,e.left),r=Math.max(r,e.left+e.width)}else for(const t of e.selections){if(t.startLineNumber!==t.endLineNumber)return null;const e=this._visibleRangesForLineRange(t.startLineNumber,t.startColumn,t.endColumn);if(!e)return null;for(const t of e.ranges)o=Math.min(o,t.left),r=Math.max(r,t.left+t.width)}return o=Math.max(0,o-Ut.HORIZONTAL_EXTRA_PX),r+=this._revealHorizontalRightPadding,"selections"===e.type&&r-o>t.width?null:{scrollLeft:this._computeMinimumScrolling(n,i,o,r),maxHorizontalOffset:r}}_computeMinimumScrolling(e,t,n,i,o,r){o=!!o,r=!!r;const s=(t|=0)-(e|=0);return(i|=0)-(n|=0)t?Math.max(0,i-s):e:n}}Ut.HORIZONTAL_EXTRA_PX=30;var Zt=n(4444),Kt={};Kt.styleTagTransform=C(),Kt.setAttributes=m(),Kt.insert=g().bind(null,"head"),Kt.domAPI=h(),Kt.insertStyleElement=_(),d()(Zt.Z,Kt),Zt.Z&&Zt.Z.locals&&Zt.Z.locals;class qt extends Ot{constructor(e){super(),this._context=e;const t=this._context.configuration.options.get(129);this._decorationsLeft=t.decorationsLeft,this._decorationsWidth=t.decorationsWidth,this._renderResult=null,this._context.addEventHandler(this)}dispose(){this._context.removeEventHandler(this),this._renderResult=null,super.dispose()}onConfigurationChanged(e){const t=this._context.configuration.options.get(129);return this._decorationsLeft=t.decorationsLeft,this._decorationsWidth=t.decorationsWidth,!0}onDecorationsChanged(e){return!0}onFlushed(e){return!0}onLinesChanged(e){return!0}onLinesDeleted(e){return!0}onLinesInserted(e){return!0}onScrollChanged(e){return e.scrollTopChanged}onZonesChanged(e){return!0}_getDecorations(e){const t=e.getDecorationsInViewport();let n=[],i=0;for(let e=0,o=t.length;e
    ',r=[];for(let e=t;e<=n;e++){const n=e-t,s=i[n];let a="";for(let e=0,t=s.length;e';o[n]=s}this._renderResult=o}render(e,t){return this._renderResult?this._renderResult[t-e]:""}}var Xt=n(563),Jt={};Jt.styleTagTransform=C(),Jt.setAttributes=m(),Jt.insert=g().bind(null,"head"),Jt.domAPI=h(),Jt.insertStyleElement=_(),d()(Xt.Z,Jt),Xt.Z&&Xt.Z.locals&&Xt.Z.locals;class en{constructor(e,t,n,i){this._rgba8Brand=void 0,this.r=en._clamp(e),this.g=en._clamp(t),this.b=en._clamp(n),this.a=en._clamp(i)}equals(e){return this.r===e.r&&this.g===e.g&&this.b===e.b&&this.a===e.a}static _clamp(e){return e<0?0:e>255?255:0|e}}en.Empty=new en(0,0,0,0);var tn=n(4101);class nn extends k.JT{constructor(){super(),this._onDidChange=new x.Q5,this.onDidChange=this._onDidChange.event,this._updateColorMap(),this._register(tn.RW.onDidChange((e=>{e.changedColorMap&&this._updateColorMap()})))}static getInstance(){return this._INSTANCE||(this._INSTANCE=(0,k.dk)(new nn)),this._INSTANCE}_updateColorMap(){const e=tn.RW.getColorMap();if(!e)return this._colors=[en.Empty],void(this._backgroundIsLight=!0);this._colors=[en.Empty];for(let t=1;t=.5,this._onDidChange.fire(void 0)}getColor(e){return(e<1||e>=this._colors.length)&&(e=2),this._colors[e]}backgroundIsLight(){return this._backgroundIsLight}}nn._INSTANCE=null;var on=n(3824),rn=n(3910);const sn=(()=>{const e=[];for(let t=32;t<=126;t++)e.push(t);return e.push(65533),e})();var an=n(5427);class ln{constructor(e,t){this.scale=t,this._minimapCharRendererBrand=void 0,this.charDataNormal=ln.soften(e,.8),this.charDataLight=ln.soften(e,50/60)}static soften(e,t){let n=new Uint8ClampedArray(e.length);for(let i=0,o=e.length;ie.width||n+h>e.height)return void console.warn("bad render request outside image data");const u=a?this.charDataLight:this.charDataNormal,g=((e,t)=>(e-=32)<0||e>96?t<=2?(e+96)%96:95:e)(i,s),p=4*e.width,m=r.r,f=r.g,_=r.b,b=o.r-m,C=o.g-f,v=o.b-_,w=e.data;let y=g*d*c,A=n*p+4*t;for(let e=0;ee.width||n+d>e.height)return void console.warn("bad render request outside image data");const c=4*e.width,h=o.r,u=o.g,g=o.b,p=h+.5*(i.r-h),m=u+.5*(i.g-u),f=g+.5*(i.b-g),_=e.data;let b=n*c+4*t;for(let e=0;e{const t=new Uint8ClampedArray(e.length/2);for(let n=0;n>1]=cn[e[n]]<<4|15&cn[e[n+1]];return t},un={1:(0,dn.I)((()=>hn("0000511D6300CF609C709645A78432005642574171487021003C451900274D35D762755E8B629C5BA856AF57BA649530C167D1512A272A3F6038604460398526BCA2A968DB6F8957C768BE5FBE2FB467CF5D8D5B795DC7625B5DFF50DE64C466DB2FC47CD860A65E9A2EB96CB54CE06DA763AB2EA26860524D3763536601005116008177A8705E53AB738E6A982F88BAA35B5F5B626D9C636B449B737E5B7B678598869A662F6B5B8542706C704C80736A607578685B70594A49715A4522E792"))),2:(0,dn.I)((()=>hn("000000000000000055394F383D2800008B8B1F210002000081B1CBCBCC820000847AAF6B9AAF2119BE08B8881AD60000A44FD07DCCF107015338130C00000000385972265F390B406E2437634B4B48031B12B8A0847000001E15B29A402F0000000000004B33460B00007A752C2A0000000000004D3900000084394B82013400ABA5CFC7AD9C0302A45A3E5A98AB000089A43382D97900008BA54AA087A70A0248A6A7AE6DBE0000BF6F94987EA40A01A06DCFA7A7A9030496C32F77891D0000A99FB1A0AFA80603B29AB9CA75930D010C0948354D3900000C0948354F37460D0028BE673D8400000000AF9D7B6E00002B007AA8933400007AA642675C2700007984CFB9C3985B768772A8A6B7B20000CAAECAAFC4B700009F94A6009F840009D09F9BA4CA9C0000CC8FC76DC87F0000C991C472A2000000A894A48CA7B501079BA2C9C69BA20000B19A5D3FA89000005CA6009DA2960901B0A7F0669FB200009D009E00B7890000DAD0F5D092820000D294D4C48BD10000B5A7A4A3B1A50402CAB6CBA6A2000000B5A7A4A3B1A8044FCDADD19D9CB00000B7778F7B8AAE0803C9AB5D3F5D3F00009EA09EA0BAB006039EA0989A8C7900009B9EF4D6B7C00000A9A7816CACA80000ABAC84705D3F000096DA635CDC8C00006F486F266F263D4784006124097B00374F6D2D6D2D6D4A3A95872322000000030000000000008D8939130000000000002E22A5C9CBC70600AB25C0B5C9B400061A2DB04CA67001082AA6BEBEBFC606002321DACBC19E03087AA08B6768380000282FBAC0B8CA7A88AD25BBA5A29900004C396C5894A6000040485A6E356E9442A32CD17EADA70000B4237923628600003E2DE9C1D7B500002F25BBA5A2990000231DB6AFB4A804023025C0B5CAB588062B2CBDBEC0C706882435A75CA20000002326BD6A82A908048B4B9A5A668000002423A09CB4BB060025259C9D8A7900001C1FCAB2C7C700002A2A9387ABA200002626A4A47D6E9D14333163A0C87500004B6F9C2D643A257049364936493647358A34438355497F1A0000A24C1D590000D38DFFBDD4CD3126")))};class gn{static create(e,t){if(this.lastCreated&&e===this.lastCreated.scale&&t===this.lastFontFamily)return this.lastCreated;let n;return n=un[e]?new ln(un[e](),e):gn.createFromSampleData(gn.createSampleData(t).data,e),this.lastFontFamily=t,this.lastCreated=n,n}static createSampleData(e){const t=document.createElement("canvas"),n=t.getContext("2d");t.style.height="16px",t.height=16,t.width=960,t.style.width="960px",n.fillStyle="#ffffff",n.font=`bold 16px ${e}`,n.textBaseline="middle";let i=0;for(const e of sn)n.fillText(String.fromCharCode(e),i,8),i+=10;return n.getImageData(0,0,960,16)}static createFromSampleData(e,t){if(61440!==e.length)throw new Error("Unexpected source in MinimapCharRenderer");let n=gn._downsample(e,t);return new ln(n,t)}static _downsampleChar(e,t,n,i,o){const r=1*o,s=2*o;let a=i,l=0;for(let i=0;i0){const e=255/a;for(let t=0;tgn.create(this.fontScale,a.fontFamily))),this.backgroundColor=mn._getMinimapBackground(t,n)}static _getMinimapBackground(e,t){const n=e.getColor(rn.kV);return n?new en(n.rgba.r,n.rgba.g,n.rgba.b,n.rgba.a):t.getColor(2)}equals(e){return this.renderMinimap===e.renderMinimap&&this.size===e.size&&this.minimapHeightIsEditorHeight===e.minimapHeightIsEditorHeight&&this.scrollBeyondLastLine===e.scrollBeyondLastLine&&this.showSlider===e.showSlider&&this.pixelRatio===e.pixelRatio&&this.typicalHalfwidthCharacterWidth===e.typicalHalfwidthCharacterWidth&&this.lineHeight===e.lineHeight&&this.minimapLeft===e.minimapLeft&&this.minimapWidth===e.minimapWidth&&this.minimapHeight===e.minimapHeight&&this.canvasInnerWidth===e.canvasInnerWidth&&this.canvasInnerHeight===e.canvasInnerHeight&&this.canvasOuterWidth===e.canvasOuterWidth&&this.canvasOuterHeight===e.canvasOuterHeight&&this.isSampling===e.isSampling&&this.editorHeight===e.editorHeight&&this.fontScale===e.fontScale&&this.minimapLineHeight===e.minimapLineHeight&&this.minimapCharWidth===e.minimapCharWidth&&this.backgroundColor&&this.backgroundColor.equals(e.backgroundColor)}}class fn{constructor(e,t,n,i,o,r,s,a){this.scrollTop=e,this.scrollHeight=t,this.sliderNeeded=n,this._computedSliderRatio=i,this.sliderTop=o,this.sliderHeight=r,this.startLineNumber=s,this.endLineNumber=a}getDesiredScrollTopFromDelta(e){return Math.round(this.scrollTop+e/this._computedSliderRatio)}getDesiredScrollTopFromTouchLocation(e){return Math.round((e-this.sliderHeight/2)/this._computedSliderRatio)}static create(e,t,n,i,o,r,s,a,l,d,c){const h=e.pixelRatio,u=e.minimapLineHeight,g=Math.floor(e.canvasInnerHeight/u),p=e.lineHeight;if(e.minimapHeightIsEditorHeight){const t=a*e.lineHeight+(e.scrollBeyondLastLine?o-e.lineHeight:0),n=Math.max(1,Math.floor(o*o/t)),i=Math.max(0,e.minimapHeight-n),r=i/(d-o),c=l*r,h=i>0,u=Math.floor(e.canvasInnerHeight/e.minimapLineHeight);return new fn(l,d,h,r,c,n,1,Math.min(s,u))}let m,f;if(r&&n!==s){const e=n-t+1;m=Math.floor(e*u/h)}else{const e=o/p;m=Math.floor(e*u/h)}f=e.scrollBeyondLastLine?(s-1)*u/h:Math.max(0,s*u/h-m),f=Math.min(e.minimapHeight-m,f);const _=f/(d-o),b=l*_;let C=0;if(e.scrollBeyondLastLine&&(C=o/p-1),g>=s+C)return new fn(l,d,f>0,_,b,m,1,s);{let e=Math.max(1,Math.floor(t-b*h/u));c&&c.scrollHeight===d&&(c.scrollTop>l&&(e=Math.min(e,c.startLineNumber)),c.scrollTop_n.INVALID)),this._renderedLines._set(e.startLineNumber,n)}linesEquals(e){if(!this.scrollEquals(e))return!1;const t=this._renderedLines._get().lines;for(let e=0,n=t.length;e1){for(let t=0,n=s-1;t0&&this.minimapLines[n-1]>=e;)n--;let i=this.modelLineToMinimapLine(t)-1;for(;i+1t)return null}return[n+1,i+1]}decorationLineRangeToMinimapLineRange(e,t){let n=this.modelLineToMinimapLine(e),i=this.modelLineToMinimapLine(t);return e!==t&&i===n&&(i===this.minimapLines.length?n>1&&n--:i++),[n,i]}onLinesDeleted(e){const t=e.toLineNumber-e.fromLineNumber+1;let n=this.minimapLines.length,i=0;for(let o=this.minimapLines.length-1;o>=0&&!(this.minimapLines[o]=0&&!(this.minimapLines[n]0,scrollWidth:e.scrollWidth,scrollHeight:e.scrollHeight,viewportStartLineNumber:t,viewportEndLineNumber:n,viewportStartLineNumberVerticalOffset:e.getVerticalOffsetForLineNumber(t),scrollTop:e.scrollTop,scrollLeft:e.scrollLeft,viewportWidth:e.viewportWidth,viewportHeight:e.viewportHeight};this._actual.render(i)}_recreateLineSampling(){this._minimapSelections=null;const e=Boolean(this._samplingState),[t,n]=vn.compute(this.options,this._context.model.getLineCount(),this._samplingState);if(this._samplingState=t,e&&this._samplingState)for(const e of n)switch(e.type){case"deleted":this._actual.onLinesDeleted(e.deleteFromLineNumber,e.deleteToLineNumber);break;case"inserted":this._actual.onLinesInserted(e.insertFromLineNumber,e.insertToLineNumber);break;case"flush":this._actual.onFlushed()}}getLineCount(){return this._samplingState?this._samplingState.minimapLines.length:this._context.model.getLineCount()}getRealLineCount(){return this._context.model.getLineCount()}getLineContent(e){return this._samplingState?this._context.model.getLineContent(this._samplingState.minimapLines[e-1]):this._context.model.getLineContent(e)}getMinimapLinesRenderingData(e,t,n){if(this._samplingState){let i=[];for(let o=0,r=t-e+1;o{if(e.preventDefault(),0===this._model.options.renderMinimap)return;if(!this._lastRenderData)return;if("proportional"!==this._model.options.size){if(e.leftButton&&this._lastRenderData){const t=A.i(this._slider.domNode),n=t.top+t.height/2;this._startSliderDragging(e.buttons,e.posx,n,e.posy,this._lastRenderData.renderedLayout)}return}const t=this._model.options.minimapLineHeight,n=this._model.options.canvasInnerHeight/this._model.options.canvasOuterHeight*e.browserEvent.offsetY;let i=Math.floor(n/t)+this._lastRenderData.renderedLayout.startLineNumber;i=Math.min(i,this._model.getLineCount()),this._model.revealLineNumber(i)})),this._sliderMouseMoveMonitor=new P.Z,this._sliderMouseDownListener=A.mu(this._slider.domNode,"mousedown",(e=>{e.preventDefault(),e.stopPropagation(),e.leftButton&&this._lastRenderData&&this._startSliderDragging(e.buttons,e.posx,e.posy,e.posy,this._lastRenderData.renderedLayout)})),this._gestureDisposable=R.o.addTarget(this._domNode.domNode),this._sliderTouchStartListener=A.nm(this._domNode.domNode,R.t.Start,(e=>{e.preventDefault(),e.stopPropagation(),this._lastRenderData&&(this._slider.toggleClassName("active",!0),this._gestureInProgress=!0,this.scrollDueToTouchEvent(e))}),{passive:!1}),this._sliderTouchMoveListener=A.nm(this._domNode.domNode,R.t.Change,(e=>{e.preventDefault(),e.stopPropagation(),this._lastRenderData&&this._gestureInProgress&&this.scrollDueToTouchEvent(e)}),{passive:!1}),this._sliderTouchEndListener=A.mu(this._domNode.domNode,R.t.End,(e=>{e.preventDefault(),e.stopPropagation(),this._gestureInProgress=!1,this._slider.toggleClassName("active",!1)}))}_startSliderDragging(e,t,n,i,o){this._slider.toggleClassName("active",!0);const r=(e,i)=>{const r=Math.abs(i-t);if(T.ED&&r>140)return void this._model.setScrollTop(o.scrollTop);const s=e-n;this._model.setScrollTop(o.getDesiredScrollTopFromDelta(s))};i!==n&&r(i,t),this._sliderMouseMoveMonitor.startMonitoring(this._slider.domNode,e,P.e,(e=>r(e.posy,e.posx)),(()=>{this._slider.toggleClassName("active",!1)}))}scrollDueToTouchEvent(e){const t=this._domNode.domNode.getBoundingClientRect().top,n=this._lastRenderData.renderedLayout.getDesiredScrollTopFromTouchLocation(e.pageY-t);this._model.setScrollTop(n)}dispose(){this._mouseDownListener.dispose(),this._sliderMouseMoveMonitor.dispose(),this._sliderMouseDownListener.dispose(),this._gestureDisposable.dispose(),this._sliderTouchStartListener.dispose(),this._sliderTouchMoveListener.dispose(),this._sliderTouchEndListener.dispose(),super.dispose()}_getMinimapDomNodeClassName(){return"always"===this._model.options.showSlider?"minimap slider-always":"minimap slider-mouseover"}getDomNode(){return this._domNode}_applyLayout(){this._domNode.setLeft(this._model.options.minimapLeft),this._domNode.setWidth(this._model.options.minimapWidth),this._domNode.setHeight(this._model.options.minimapHeight),this._shadow.setHeight(this._model.options.minimapHeight),this._canvas.setWidth(this._model.options.canvasOuterWidth),this._canvas.setHeight(this._model.options.canvasOuterHeight),this._canvas.domNode.width=this._model.options.canvasInnerWidth,this._canvas.domNode.height=this._model.options.canvasInnerHeight,this._decorationsCanvas.setWidth(this._model.options.canvasOuterWidth),this._decorationsCanvas.setHeight(this._model.options.canvasOuterHeight),this._decorationsCanvas.domNode.width=this._model.options.canvasInnerWidth,this._decorationsCanvas.domNode.height=this._model.options.canvasInnerHeight,this._slider.setWidth(this._model.options.minimapWidth)}_getBuffer(){return this._buffers||this._model.options.canvasInnerWidth>0&&this._model.options.canvasInnerHeight>0&&(this._buffers=new Cn(this._canvas.domNode.getContext("2d"),this._model.options.canvasInnerWidth,this._model.options.canvasInnerHeight,this._model.options.backgroundColor)),this._buffers?this._buffers.getBuffer():null}onDidChangeOptions(){this._lastRenderData=null,this._buffers=null,this._applyLayout(),this._domNode.setClassName(this._getMinimapDomNodeClassName())}onSelectionChanged(){return this._renderDecorations=!0,!0}onDecorationsChanged(){return this._renderDecorations=!0,!0}onFlushed(){return this._lastRenderData=null,!0}onLinesChanged(e,t){return!!this._lastRenderData&&this._lastRenderData.onLinesChanged(e,t)}onLinesDeleted(e,t){return this._lastRenderData&&this._lastRenderData.onLinesDeleted(e,t),!0}onLinesInserted(e,t){return this._lastRenderData&&this._lastRenderData.onLinesInserted(e,t),!0}onScrollChanged(){return this._renderDecorations=!0,!0}onThemeChanged(){return this._selectionColor=this._theme.getColor(rn.ov),this._renderDecorations=!0,!0}onTokensChanged(e){return!!this._lastRenderData&&this._lastRenderData.onTokensChanged(e)}onTokensColorsChanged(){return this._lastRenderData=null,this._buffers=null,!0}onZonesChanged(){return this._lastRenderData=null,!0}render(e){if(0===this._model.options.renderMinimap)return this._shadow.setClassName("minimap-shadow-hidden"),this._sliderHorizontal.setWidth(0),void this._sliderHorizontal.setHeight(0);e.scrollLeft+e.viewportWidth>=e.scrollWidth?this._shadow.setClassName("minimap-shadow-hidden"):this._shadow.setClassName("minimap-shadow-visible");const t=fn.create(this._model.options,e.viewportStartLineNumber,e.viewportEndLineNumber,e.viewportStartLineNumberVerticalOffset,e.viewportHeight,e.viewportContainsWhitespaceGaps,this._model.getLineCount(),this._model.getRealLineCount(),e.scrollTop,e.scrollHeight,this._lastRenderData?this._lastRenderData.renderedLayout:null);this._slider.setDisplay(t.sliderNeeded?"block":"none"),this._slider.setTop(t.sliderTop),this._slider.setHeight(t.sliderHeight);const n=e.scrollLeft/this._model.options.typicalHalfwidthCharacterWidth,i=Math.min(this._model.options.minimapWidth,Math.round(n*this._model.options.minimapCharWidth/this._model.options.pixelRatio));this._sliderHorizontal.setLeft(i),this._sliderHorizontal.setWidth(this._model.options.minimapWidth-i),this._sliderHorizontal.setTop(0),this._sliderHorizontal.setHeight(t.sliderHeight),this.renderDecorations(t),this._lastRenderData=this.renderLines(t)}renderDecorations(e){if(this._renderDecorations){this._renderDecorations=!1;const t=this._model.getSelections(),n=this._model.getMinimapDecorationsInViewport(e.startLineNumber,e.endLineNumber),{canvasInnerWidth:i,canvasInnerHeight:o}=this._model.options,r=this._model.options.minimapLineHeight,s=this._model.options.minimapCharWidth,a=this._model.getOptions().tabSize,l=this._decorationsCanvas.domNode.getContext("2d");l.clearRect(0,0,i,o);const d=new Map;for(let n=0;nthis._model.options.canvasInnerHeight)return;let h=t.get(r);const u=!h;if(!h){const e=this._model.getLineContent(r);h=[re.y0];for(let t=1;tr?h.length-1:p-1;if(b>0){const t=h[b]-_||2;this.renderDecoration(e,i,_,c,t,s)}u&&this.renderLineHighlight(e,i,c,s)}renderLineHighlight(e,t,n,i){e.fillStyle=t&&t.transparent(.5).toString()||"",e.fillRect(re.y0,n,e.canvas.width,i)}renderDecoration(e,t,n,i,o,r){e.fillStyle=t&&t.toString()||"",e.fillRect(n,i,o,r)}renderLines(e){const t=e.startLineNumber,n=e.endLineNumber,i=this._model.options.minimapLineHeight;if(this._lastRenderData&&this._lastRenderData.linesEquals(e)){const t=this._lastRenderData._get();return new bn(e,t.imageData,t.lines)}const o=this._getBuffer();if(!o)return null;let[r,s,a]=yn._renderUntouchedLines(o,t,n,i,this._lastRenderData);const l=this._model.getMinimapLinesRenderingData(t,n,a),d=this._model.getOptions().tabSize,c=this._model.options.backgroundColor,h=this._model.tokensColorTracker,u=h.backgroundIsLight(),g=this._model.options.renderMinimap,p=this._model.options.charRenderer(),m=this._model.options.fontScale,f=this._model.options.minimapCharWidth,_=(1===g?2:3)*m,b=i>_?Math.floor((i-_)/2):0;let C=0;const v=[];for(let e=0,r=n-t+1;e=0&&om)return;const r=g.charCodeAt(b);if(9===r){const e=d-(b+C)%d;C+=e-1,_+=e*o}else if(32===r)_+=o;else{const d=je.K7(r)?2:1;for(let c=0;cm)return}}}}}(0,Ye.Ic)(((e,t)=>{const n=e.getColor(rn.kV);n&&t.addRule(`.monaco-editor .minimap > canvas { opacity: ${n.rgba.a}; will-change: opacity; }`);const i=e.getColor(rn.CA);i&&t.addRule(`.monaco-editor .minimap-slider .minimap-slider-horizontal { background: ${i}; }`);const o=e.getColor(rn.Xy);o&&t.addRule(`.monaco-editor .minimap-slider:hover .minimap-slider-horizontal { background: ${o}; }`);const r=e.getColor(rn.br);r&&t.addRule(`.monaco-editor .minimap-slider.active .minimap-slider-horizontal { background: ${r}; }`);const s=e.getColor(rn._w);s&&t.addRule(`.monaco-editor .minimap-shadow-visible { box-shadow: ${s} -6px 0 6px -6px inset; }`)}));var An=n(9822),Sn={};Sn.styleTagTransform=C(),Sn.setAttributes=m(),Sn.insert=g().bind(null,"head"),Sn.domAPI=h(),Sn.insertStyleElement=_(),d()(An.Z,Sn),An.Z&&An.Z.locals&&An.Z.locals;class xn extends K{constructor(e){super(e);const t=this._context.configuration.options.get(129);this._widgets={},this._verticalScrollbarWidth=t.verticalScrollbarWidth,this._minimapWidth=t.minimap.minimapWidth,this._horizontalScrollbarHeight=t.horizontalScrollbarHeight,this._editorHeight=t.height,this._editorWidth=t.width,this._domNode=(0,M.X)(document.createElement("div")),q.write(this._domNode,4),this._domNode.setClassName("overlayWidgets")}dispose(){super.dispose(),this._widgets={}}getDomNode(){return this._domNode}onConfigurationChanged(e){const t=this._context.configuration.options.get(129);return this._verticalScrollbarWidth=t.verticalScrollbarWidth,this._minimapWidth=t.minimap.minimapWidth,this._horizontalScrollbarHeight=t.horizontalScrollbarHeight,this._editorHeight=t.height,this._editorWidth=t.width,!0}addWidget(e){const t=(0,M.X)(e.getDomNode());this._widgets[e.getId()]={widget:e,preference:null,domNode:t},t.setPosition("absolute"),t.setAttribute("widgetId",e.getId()),this._domNode.appendChild(t),this.setShouldRender()}setWidgetPosition(e,t){const n=this._widgets[e.getId()];return n.preference!==t&&(n.preference=t,this.setShouldRender(),!0)}removeWidget(e){const t=e.getId();if(this._widgets.hasOwnProperty(t)){const e=this._widgets[t].domNode.domNode;delete this._widgets[t],e.parentNode.removeChild(e),this.setShouldRender()}}_renderWidget(e){const t=e.domNode;if(null!==e.preference)if(0===e.preference)t.setTop(0),t.setRight(2*this._verticalScrollbarWidth+this._minimapWidth);else if(1===e.preference){const e=t.domNode.clientHeight;t.setTop(this._editorHeight-e-2*this._horizontalScrollbarHeight),t.setRight(2*this._verticalScrollbarWidth+this._minimapWidth)}else 2===e.preference&&(t.setTop(0),t.domNode.style.right="50%");else t.unsetTop()}prepareRender(e){}render(e){this._domNode.setWidth(this._editorWidth);const t=Object.keys(this._widgets);for(let e=0,n=t.length;e=3){const t=Math.floor(i/3),n=Math.floor(i/3),o=i-t-n,r=e+t;return[[0,e,r,e,e+t+o,e,r,e],[0,t,o,t+o,n,t+o+n,o+n,t+o+n]]}if(2===n){const t=Math.floor(i/2),n=i-t;return[[0,e,e,e,e+t,e,e,e],[0,t,t,t,n,t+n,t+n,t+n]]}return[[0,e,e,e,e,e,e,e],[0,i,i,i,i,i,i,i]]}equals(e){return this.lineHeight===e.lineHeight&&this.pixelRatio===e.pixelRatio&&this.overviewRulerLanes===e.overviewRulerLanes&&this.renderBorder===e.renderBorder&&this.borderColor===e.borderColor&&this.hideCursor===e.hideCursor&&this.cursorColor===e.cursorColor&&this.themeType===e.themeType&&this.backgroundColor===e.backgroundColor&&this.top===e.top&&this.right===e.right&&this.domWidth===e.domWidth&&this.domHeight===e.domHeight&&this.canvasWidth===e.canvasWidth&&this.canvasHeight===e.canvasHeight}}class En extends K{constructor(e){super(e),this._domNode=(0,M.X)(document.createElement("canvas")),this._domNode.setClassName("decorationsOverviewRuler"),this._domNode.setPosition("absolute"),this._domNode.setLayerHinting(!0),this._domNode.setContain("strict"),this._domNode.setAttribute("aria-hidden","true"),this._updateSettings(!1),this._tokensColorTrackerListener=tn.RW.onDidChange((e=>{e.changedColorMap&&this._updateSettings(!0)})),this._cursorPositions=[]}dispose(){super.dispose(),this._tokensColorTrackerListener.dispose()}_updateSettings(e){const t=new Ln(this._context.configuration,this._context.theme);return!(this._settings&&this._settings.equals(t)||(this._settings=t,this._domNode.setTop(this._settings.top),this._domNode.setRight(this._settings.right),this._domNode.setWidth(this._settings.domWidth),this._domNode.setHeight(this._settings.domHeight),this._domNode.domNode.width=this._settings.canvasWidth,this._domNode.domNode.height=this._settings.canvasHeight,e&&this._render(),0))}onConfigurationChanged(e){return this._updateSettings(!1)}onCursorStateChanged(e){this._cursorPositions=[];for(let t=0,n=e.selections.length;tt&&(e=t-a),_=e-a,b=e+a}_>f+1||r!==p?(0!==e&&l.fillRect(d[p],m,c[p],f-m),p=r,m=_,f=b):b>f&&(f=b)}l.fillRect(d[p],m,c[p],f-m)}if(!this._settings.hideCursor&&this._settings.cursorColor){const e=2*this._settings.pixelRatio|0,n=e/2|0,r=this._settings.x[7],s=this._settings.w[7];l.fillStyle=this._settings.cursorColor;let a=-100,d=-100;for(let c=0,h=this._cursorPositions.length;ct&&(u=t-n);const g=u-n,p=g+e;g>d+1?(0!==c&&l.fillRect(r,a,s,d-a),a=g,d=p):p>d&&(d=p)}l.fillRect(r,a,s,d-a)}this._settings.renderBorder&&this._settings.borderColor&&this._settings.overviewRulerLanes>0&&(l.beginPath(),l.lineWidth=1,l.strokeStyle=this._settings.borderColor,l.moveTo(0,0),l.lineTo(0,t),l.stroke(),l.moveTo(0,0),l.lineTo(e,0),l.stroke())}}var Nn=n(2003);class Dn extends Z{constructor(e,t){super(),this._context=e;const n=this._context.configuration.options;this._domNode=(0,M.X)(document.createElement("canvas")),this._domNode.setClassName(t),this._domNode.setPosition("absolute"),this._domNode.setLayerHinting(!0),this._domNode.setContain("strict"),this._zoneManager=new Nn.Tj((e=>this._context.viewLayout.getVerticalOffsetForLineNumber(e))),this._zoneManager.setDOMWidth(0),this._zoneManager.setDOMHeight(0),this._zoneManager.setOuterHeight(this._context.viewLayout.getScrollHeight()),this._zoneManager.setLineHeight(n.get(57)),this._zoneManager.setPixelRatio(n.get(127)),this._context.addEventHandler(this)}dispose(){this._context.removeEventHandler(this),super.dispose()}onConfigurationChanged(e){const t=this._context.configuration.options;return e.hasChanged(57)&&(this._zoneManager.setLineHeight(t.get(57)),this._render()),e.hasChanged(127)&&(this._zoneManager.setPixelRatio(t.get(127)),this._domNode.setWidth(this._zoneManager.getDOMWidth()),this._domNode.setHeight(this._zoneManager.getDOMHeight()),this._domNode.domNode.width=this._zoneManager.getCanvasWidth(),this._domNode.domNode.height=this._zoneManager.getCanvasHeight(),this._render()),!0}onFlushed(e){return this._render(),!0}onScrollChanged(e){return e.scrollHeightChanged&&(this._zoneManager.setOuterHeight(e.scrollHeight),this._render()),!0}onZonesChanged(e){return this._render(),!0}getDomNode(){return this._domNode.domNode}setLayout(e){this._domNode.setTop(e.top),this._domNode.setRight(e.right);let t=!1;t=this._zoneManager.setDOMWidth(e.width)||t,t=this._zoneManager.setDOMHeight(e.height)||t,t&&(this._domNode.setWidth(this._zoneManager.getDOMWidth()),this._domNode.setHeight(this._zoneManager.getDOMHeight()),this._domNode.domNode.width=this._zoneManager.getCanvasWidth(),this._domNode.domNode.height=this._zoneManager.getCanvasHeight(),this._render())}setZones(e){this._zoneManager.setZones(e),this._render()}_render(){if(0===this._zoneManager.getOuterHeight())return!1;const e=this._zoneManager.getCanvasWidth(),t=this._zoneManager.getCanvasHeight(),n=this._zoneManager.resolveColorZones(),i=this._zoneManager.getId2Color(),o=this._domNode.domNode.getContext("2d");return o.clearRect(0,0,e,t),n.length>0&&this._renderOneLane(o,n,i,e),!0}_renderOneLane(e,t,n,i){let o=0,r=0,s=0;for(const a of t){const t=a.colorId,l=a.from,d=a.to;t!==o?(e.fillRect(0,r,i,s-r),o=t,e.fillStyle=n[o],r=l,s=d):s>=l?s=Math.max(s,d):(e.fillRect(0,r,i,s-r),r=l,s=d)}e.fillRect(0,r,i,s-r)}}var In=n(9443),Mn={};Mn.styleTagTransform=C(),Mn.setAttributes=m(),Mn.insert=g().bind(null,"head"),Mn.domAPI=h(),Mn.insertStyleElement=_(),d()(In.Z,Mn),In.Z&&In.Z.locals&&In.Z.locals;class Tn extends K{constructor(e){super(e),this.domNode=(0,M.X)(document.createElement("div")),this.domNode.setAttribute("role","presentation"),this.domNode.setAttribute("aria-hidden","true"),this.domNode.setClassName("view-rulers"),this._renderedRulers=[];const t=this._context.configuration.options;this._rulers=t.get(90),this._typicalHalfwidthCharacterWidth=t.get(41).typicalHalfwidthCharacterWidth}dispose(){super.dispose()}onConfigurationChanged(e){const t=this._context.configuration.options;return this._rulers=t.get(90),this._typicalHalfwidthCharacterWidth=t.get(41).typicalHalfwidthCharacterWidth,!0}onScrollChanged(e){return e.scrollHeightChanged}prepareRender(e){}_ensureRulersCount(){const e=this._renderedRulers.length,t=this._rulers.length;if(e===t)return;if(e0;){const e=(0,M.X)(document.createElement("div"));e.setClassName("view-ruler"),e.setWidth(i),this.domNode.appendChild(e),this._renderedRulers.push(e),o--}return}let n=e-t;for(;n>0;){const e=this._renderedRulers.pop();this.domNode.removeChild(e),n--}}render(e){this._ensureRulersCount();for(let t=0,n=this._rulers.length;t{const n=e.getColor(qe.zk);n&&t.addRule(`.monaco-editor .view-ruler { box-shadow: 1px 0 0 0 ${n} inset; }`)}));var Rn=n(9649),On={};On.styleTagTransform=C(),On.setAttributes=m(),On.insert=g().bind(null,"head"),On.domAPI=h(),On.insertStyleElement=_(),d()(Rn.Z,On),Rn.Z&&Rn.Z.locals&&Rn.Z.locals;class Bn extends K{constructor(e){super(e),this._scrollTop=0,this._width=0,this._updateWidth(),this._shouldShow=!1;const t=this._context.configuration.options.get(91);this._useShadows=t.useShadows,this._domNode=(0,M.X)(document.createElement("div")),this._domNode.setAttribute("role","presentation"),this._domNode.setAttribute("aria-hidden","true")}dispose(){super.dispose()}_updateShouldShow(){const e=this._useShadows&&this._scrollTop>0;return this._shouldShow!==e&&(this._shouldShow=e,!0)}getDomNode(){return this._domNode}_updateWidth(){const e=this._context.configuration.options.get(129);0===e.minimap.renderMinimap||e.minimap.minimapWidth>0&&0===e.minimap.minimapLeft?this._width=e.width:this._width=e.width-e.minimap.minimapWidth-e.verticalScrollbarWidth}onConfigurationChanged(e){const t=this._context.configuration.options.get(91);return this._useShadows=t.useShadows,this._updateWidth(),this._updateShouldShow(),!0}onScrollChanged(e){return this._scrollTop=e.scrollTop,this._updateShouldShow()}prepareRender(e){}render(e){this._domNode.setWidth(this._width),this._domNode.setClassName(this._shouldShow?"scroll-decoration":"")}}(0,Ye.Ic)(((e,t)=>{const n=e.getColor(rn._w);n&&t.addRule(`.monaco-editor .scroll-decoration { box-shadow: ${n} 0 6px 6px -6px inset; }`)}));var Pn=n(2595),Fn={};Fn.styleTagTransform=C(),Fn.setAttributes=m(),Fn.insert=g().bind(null,"head"),Fn.domAPI=h(),Fn.insertStyleElement=_(),d()(Pn.Z,Fn),Pn.Z&&Pn.Z.locals&&Pn.Z.locals;class Wn{constructor(e){this.left=e.left,this.width=e.width,this.startStyle=null,this.endStyle=null}}class zn{constructor(e,t){this.lineNumber=e,this.ranges=t}}function Vn(e){return new Wn(e)}function Hn(e){return new zn(e.lineNumber,e.ranges.map(Vn))}class jn extends Ke{constructor(e){super(),this._previousFrameVisibleRangesWithStyle=[],this._context=e;const t=this._context.configuration.options;this._lineHeight=t.get(57),this._roundedSelection=t.get(89),this._typicalHalfwidthCharacterWidth=t.get(41).typicalHalfwidthCharacterWidth,this._selections=[],this._renderResult=null,this._context.addEventHandler(this)}dispose(){this._context.removeEventHandler(this),this._renderResult=null,super.dispose()}onConfigurationChanged(e){const t=this._context.configuration.options;return this._lineHeight=t.get(57),this._roundedSelection=t.get(89),this._typicalHalfwidthCharacterWidth=t.get(41).typicalHalfwidthCharacterWidth,!0}onCursorStateChanged(e){return this._selections=e.selections.slice(0),!0}onDecorationsChanged(e){return!0}onFlushed(e){return!0}onLinesChanged(e){return!0}onLinesDeleted(e){return!0}onLinesInserted(e){return!0}onScrollChanged(e){return e.scrollTopChanged}onZonesChanged(e){return!0}_visibleRangesHaveGaps(e){for(let t=0,n=e.length;t1)return!0;return!1}_enrichVisibleRangesWithStyle(e,t,n){const i=this._typicalHalfwidthCharacterWidth/4;let o=null,r=null;if(n&&n.length>0&&t.length>0){const i=t[0].lineNumber;if(i===e.startLineNumber)for(let e=0;!o&&e=0;e--)n[e].lineNumber===s&&(r=n[e].ranges[0]);o&&!o.startStyle&&(o=null),r&&!r.startStyle&&(r=null)}for(let e=0,n=t.length;e0){const n=t[e-1].ranges[0].left,o=t[e-1].ranges[0].left+t[e-1].ranges[0].width;$n(a-n)n&&(d.top=1),$n(l-o)'}_actualRenderOneSelection(e,t,n,i){if(0===i.length)return;const o=!!i[0].ranges[0].startStyle,r=this._lineHeight.toString(),s=(this._lineHeight-1).toString(),a=i[0].lineNumber,l=i[i.length-1].lineNumber;for(let d=0,c=i.length;d1,s)}this._previousFrameVisibleRangesWithStyle=o,this._renderResult=t.map((([e,t])=>e+t))}render(e,t){if(!this._renderResult)return"";const n=t-e;return n<0||n>=this._renderResult.length?"":this._renderResult[n]}}function $n(e){return e<0?-e:e}jn.SELECTION_CLASS_NAME="selected-text",jn.SELECTION_TOP_LEFT="top-left-radius",jn.SELECTION_BOTTOM_LEFT="bottom-left-radius",jn.SELECTION_TOP_RIGHT="top-right-radius",jn.SELECTION_BOTTOM_RIGHT="bottom-right-radius",jn.EDITOR_BACKGROUND_CLASS_NAME="monaco-editor-background",jn.ROUNDED_PIECE_WIDTH=10,(0,Ye.Ic)(((e,t)=>{const n=e.getColor(rn.hE);n&&t.addRule(`.monaco-editor .focused .selected-text { background-color: ${n}; }`);const i=e.getColor(rn.ES);i&&t.addRule(`.monaco-editor .selected-text { background-color: ${i}; }`);const o=e.getColor(rn.yb);o&&!o.isTransparent()&&t.addRule(`.monaco-editor .view-line span.inline-selected-text { color: ${o}; }`)}));var Un=n(4057),Zn={};Zn.styleTagTransform=C(),Zn.setAttributes=m(),Zn.insert=g().bind(null,"head"),Zn.domAPI=h(),Zn.insertStyleElement=_(),d()(Un.Z,Zn),Un.Z&&Un.Z.locals&&Un.Z.locals;class Kn{constructor(e,t,n,i,o,r){this.top=e,this.left=t,this.width=n,this.height=i,this.textContent=o,this.textContentClassName=r}}class qn{constructor(e){this._context=e;const t=this._context.configuration.options,n=t.get(41);this._cursorStyle=t.get(22),this._lineHeight=t.get(57),this._typicalHalfwidthCharacterWidth=n.typicalHalfwidthCharacterWidth,this._lineCursorWidth=Math.min(t.get(25),this._typicalHalfwidthCharacterWidth),this._isVisible=!0,this._domNode=(0,M.X)(document.createElement("div")),this._domNode.setClassName(`cursor ${Je.S}`),this._domNode.setHeight(this._lineHeight),this._domNode.setTop(0),this._domNode.setLeft(0),E.V.applyFontInfo(this._domNode,n),this._domNode.setDisplay("none"),this._position=new fe.L(1,1),this._lastRenderedContent="",this._renderData=null}getDomNode(){return this._domNode}getPosition(){return this._position}show(){this._isVisible||(this._domNode.setVisibility("inherit"),this._isVisible=!0)}hide(){this._isVisible&&(this._domNode.setVisibility("hidden"),this._isVisible=!1)}onConfigurationChanged(e){const t=this._context.configuration.options,n=t.get(41);return this._cursorStyle=t.get(22),this._lineHeight=t.get(57),this._typicalHalfwidthCharacterWidth=n.typicalHalfwidthCharacterWidth,this._lineCursorWidth=Math.min(t.get(25),this._typicalHalfwidthCharacterWidth),E.V.applyFontInfo(this._domNode,n),!0}onCursorPositionChanged(e){return this._position=e,!0}_prepareRender(e){let t="";if(this._cursorStyle===re.d2.Line||this._cursorStyle===re.d2.LineThin){const n=e.visibleRangeForPosition(this._position);if(!n||n.outsideRenderedLine)return null;let i;if(this._cursorStyle===re.d2.Line){if(i=A.Uh(this._lineCursorWidth>0?this._lineCursorWidth:2),i>2){const e=this._context.model.getLineContent(this._position.lineNumber),n=je.vH(e,this._position.column-1);t=e.substr(this._position.column-1,n)}}else i=A.Uh(1);let o=n.left;i>=2&&o>=1&&(o-=1);const r=e.getVerticalOffsetForLineNumber(this._position.lineNumber)-e.bigNumbersDelta;return new Kn(r,o,i,this._lineHeight,t,"")}const n=this._context.model.getLineContent(this._position.lineNumber),i=je.vH(n,this._position.column-1),o=e.linesVisibleRangesForRange(new _e.e(this._position.lineNumber,this._position.column,this._position.lineNumber,this._position.column+i),!1);if(!o||0===o.length)return null;const r=o[0];if(r.outsideRenderedLine||0===r.ranges.length)return null;const s=r.ranges[0],a=s.width<1?this._typicalHalfwidthCharacterWidth:s.width;let l="";if(this._cursorStyle===re.d2.Block){const e=this._context.model.getViewLineData(this._position.lineNumber);t=n.substr(this._position.column-1,i);const o=e.tokens.findTokenIndexAtOffset(this._position.column-1);l=e.tokens.getClassName(o)}let d=e.getVerticalOffsetForLineNumber(this._position.lineNumber)-e.bigNumbersDelta,c=this._lineHeight;return this._cursorStyle!==re.d2.Underline&&this._cursorStyle!==re.d2.UnderlineThin||(d+=this._lineHeight-2,c=2),new Kn(d,s.left,a,c,t,l)}prepareRender(e){this._renderData=this._prepareRender(e)}render(e){return this._renderData?(this._lastRenderedContent!==this._renderData.textContent&&(this._lastRenderedContent=this._renderData.textContent,this._domNode.domNode.textContent=this._lastRenderedContent),this._domNode.setClassName(`cursor ${Je.S} ${this._renderData.textContentClassName}`),this._domNode.setDisplay("block"),this._domNode.setTop(this._renderData.top),this._domNode.setLeft(this._renderData.left),this._domNode.setWidth(this._renderData.width),this._domNode.setLineHeight(this._renderData.height),this._domNode.setHeight(this._renderData.height),{domNode:this._domNode.domNode,position:this._position,contentLeft:this._renderData.left,height:this._renderData.height,width:2}):(this._domNode.setDisplay("none"),null)}}class Yn extends K{constructor(e){super(e);const t=this._context.configuration.options;this._readOnly=t.get(79),this._cursorBlinking=t.get(20),this._cursorStyle=t.get(22),this._cursorSmoothCaretAnimation=t.get(21),this._selectionIsEmpty=!0,this._isComposingInput=!1,this._isVisible=!1,this._primaryCursor=new qn(this._context),this._secondaryCursors=[],this._renderData=[],this._domNode=(0,M.X)(document.createElement("div")),this._domNode.setAttribute("role","presentation"),this._domNode.setAttribute("aria-hidden","true"),this._updateDomClassName(),this._domNode.appendChild(this._primaryCursor.getDomNode()),this._startCursorBlinkAnimation=new B._F,this._cursorFlatBlinkInterval=new B.zh,this._blinkingEnabled=!1,this._editorHasFocus=!1,this._updateBlinking()}dispose(){super.dispose(),this._startCursorBlinkAnimation.dispose(),this._cursorFlatBlinkInterval.dispose()}getDomNode(){return this._domNode}onCompositionStart(e){return this._isComposingInput=!0,this._updateBlinking(),!0}onCompositionEnd(e){return this._isComposingInput=!1,this._updateBlinking(),!0}onConfigurationChanged(e){const t=this._context.configuration.options;this._readOnly=t.get(79),this._cursorBlinking=t.get(20),this._cursorStyle=t.get(22),this._cursorSmoothCaretAnimation=t.get(21),this._updateBlinking(),this._updateDomClassName(),this._primaryCursor.onConfigurationChanged(e);for(let t=0,n=this._secondaryCursors.length;tt.length){const e=this._secondaryCursors.length-t.length;for(let t=0;t{for(let n=0,i=e.ranges.length;n{this._isVisible?this._hide():this._show()}),Yn.BLINK_INTERVAL):this._startCursorBlinkAnimation.setIfNotSet((()=>{this._blinkingEnabled=!0,this._updateDomClassName()}),Yn.BLINK_INTERVAL))}_updateDomClassName(){this._domNode.setClassName(this._getClassName())}_getClassName(){let e="cursors-layer";switch(this._selectionIsEmpty||(e+=" has-selection"),this._cursorStyle){case re.d2.Line:e+=" cursor-line-style";break;case re.d2.Block:e+=" cursor-block-style";break;case re.d2.Underline:e+=" cursor-underline-style";break;case re.d2.LineThin:e+=" cursor-line-thin-style";break;case re.d2.BlockOutline:e+=" cursor-block-outline-style";break;case re.d2.UnderlineThin:e+=" cursor-underline-thin-style";break;default:e+=" cursor-line-style"}if(this._blinkingEnabled)switch(this._getCursorBlinking()){case 1:e+=" cursor-blink";break;case 2:e+=" cursor-smooth";break;case 3:e+=" cursor-phase";break;case 4:e+=" cursor-expand";break;default:e+=" cursor-solid"}else e+=" cursor-solid";return this._cursorSmoothCaretAnimation&&(e+=" cursor-smooth-caret-animation"),e}_show(){this._primaryCursor.show();for(let e=0,t=this._secondaryCursors.length;e{const n=e.getColor(qe.n0);if(n){let i=e.getColor(qe.fY);i||(i=n.opposite()),t.addRule(`.monaco-editor .cursors-layer .cursor { background-color: ${n}; border-color: ${n}; color: ${i}; }`),"hc"===e.type&&t.addRule(`.monaco-editor .cursors-layer.has-selection .cursor { border-left: 1px solid ${i}; border-right: 1px solid ${i}; }`)}}));const Gn=()=>{throw new Error("Invalid change accessor")};class Qn extends K{constructor(e){super(e);const t=this._context.configuration.options,n=t.get(129);this._lineHeight=t.get(57),this._contentWidth=n.contentWidth,this._contentLeft=n.contentLeft,this.domNode=(0,M.X)(document.createElement("div")),this.domNode.setClassName("view-zones"),this.domNode.setPosition("absolute"),this.domNode.setAttribute("role","presentation"),this.domNode.setAttribute("aria-hidden","true"),this.marginDomNode=(0,M.X)(document.createElement("div")),this.marginDomNode.setClassName("margin-view-zones"),this.marginDomNode.setPosition("absolute"),this.marginDomNode.setAttribute("role","presentation"),this.marginDomNode.setAttribute("aria-hidden","true"),this._zones={}}dispose(){super.dispose(),this._zones={}}_recomputeWhitespacesProps(){const e=this._context.viewLayout.getWhitespaces(),t=new Map;for(const n of e)t.set(n.id,n);let n=!1;return this._context.model.changeWhitespace((e=>{const i=Object.keys(this._zones);for(let o=0,r=i.length;o{const i={addZone:e=>(t=!0,this._addZone(n,e)),removeZone:e=>{e&&(t=this._removeZone(n,e)||t)},layoutZone:e=>{e&&(t=this._layoutZone(n,e)||t)}};!function(e,t){try{e(t)}catch(e){(0,S.dL)(e)}}(e,i),i.addZone=Gn,i.removeZone=Gn,i.layoutZone=Gn})),t}_addZone(e,t){const n=this._computeWhitespaceProps(t),i={whitespaceId:e.insertWhitespace(n.afterViewLineNumber,this._getZoneOrdinal(t),n.heightInPx,n.minWidthInPx),delegate:t,isVisible:!1,domNode:(0,M.X)(t.domNode),marginDomNode:t.marginDomNode?(0,M.X)(t.marginDomNode):null};return this._safeCallOnComputedHeight(i.delegate,n.heightInPx),i.domNode.setPosition("absolute"),i.domNode.domNode.style.width="100%",i.domNode.setDisplay("none"),i.domNode.setAttribute("monaco-view-zone",i.whitespaceId),this.domNode.appendChild(i.domNode),i.marginDomNode&&(i.marginDomNode.setPosition("absolute"),i.marginDomNode.domNode.style.width="100%",i.marginDomNode.setDisplay("none"),i.marginDomNode.setAttribute("monaco-view-zone",i.whitespaceId),this.marginDomNode.appendChild(i.marginDomNode)),this._zones[i.whitespaceId]=i,this.setShouldRender(),i.whitespaceId}_removeZone(e,t){if(this._zones.hasOwnProperty(t)){const n=this._zones[t];return delete this._zones[t],e.removeWhitespace(n.whitespaceId),n.domNode.removeAttribute("monaco-visible-view-zone"),n.domNode.removeAttribute("monaco-view-zone"),n.domNode.domNode.parentNode.removeChild(n.domNode.domNode),n.marginDomNode&&(n.marginDomNode.removeAttribute("monaco-visible-view-zone"),n.marginDomNode.removeAttribute("monaco-view-zone"),n.marginDomNode.domNode.parentNode.removeChild(n.marginDomNode.domNode)),this.setShouldRender(),!0}return!1}_layoutZone(e,t){if(this._zones.hasOwnProperty(t)){const n=this._zones[t],i=this._computeWhitespaceProps(n.delegate);return e.changeOneWhitespace(n.whitespaceId,i.afterViewLineNumber,i.heightInPx),this._safeCallOnComputedHeight(n.delegate,i.heightInPx),this.setShouldRender(),!0}return!1}shouldSuppressMouseDownOnViewZone(e){if(this._zones.hasOwnProperty(e)){const t=this._zones[e];return Boolean(t.delegate.suppressMouseDown)}return!1}_heightInPixels(e){return"number"==typeof e.heightInPx?e.heightInPx:"number"==typeof e.heightInLines?this._lineHeight*e.heightInLines:this._lineHeight}_minWidthInPixels(e){return"number"==typeof e.minWidthInPx?e.minWidthInPx:0}_safeCallOnComputedHeight(e,t){if("function"==typeof e.onComputedHeight)try{e.onComputedHeight(t)}catch(e){(0,S.dL)(e)}}_safeCallOnDomNodeTop(e,t){if("function"==typeof e.onDomNodeTop)try{e.onDomNodeTop(t)}catch(e){(0,S.dL)(e)}}prepareRender(e){}render(e){const t=e.viewportData.whitespaceViewportData,n={};let i=!1;for(let e=0,o=t.length;e{this._context.theme.update(e),this._context.model.onDidColorThemeChange(),this.render(!0,!1)}))),this._viewParts=[],this._textAreaHandler=new nt(this._context,s,this._createTextAreaHandlerHelper()),this._viewParts.push(this._textAreaHandler),this._linesContent=(0,M.X)(document.createElement("div")),this._linesContent.setClassName("lines-content monaco-editor-background"),this._linesContent.setPosition("absolute"),this.domNode=(0,M.X)(document.createElement("div")),this.domNode.setClassName(this._getEditorClassName()),this.domNode.setAttribute("role","code"),this._overflowGuardContainer=(0,M.X)(document.createElement("div")),q.write(this._overflowGuardContainer,3),this._overflowGuardContainer.setClassName("overflow-guard"),this._scrollbar=new It(this._context,this._linesContent,this.domNode,this._overflowGuardContainer),this._viewParts.push(this._scrollbar),this._viewLines=new Ut(this._context,this._linesContent),this._viewZones=new Qn(this._context),this._viewParts.push(this._viewZones);const a=new En(this._context);this._viewParts.push(a);const l=new Bn(this._context);this._viewParts.push(l);const d=new pt(this._context);this._viewParts.push(d),d.addDynamicOverlay(new xt(this._context)),d.addDynamicOverlay(new jn(this._context)),d.addDynamicOverlay(new Wt(this._context)),d.addDynamicOverlay(new Nt(this._context));const c=new mt(this._context);this._viewParts.push(c),c.addDynamicOverlay(new kt(this._context)),c.addDynamicOverlay(new Bt(this._context)),c.addDynamicOverlay(new Qt(this._context)),c.addDynamicOverlay(new qt(this._context)),c.addDynamicOverlay(new Ge(this._context));const h=new Qe(this._context);h.getDomNode().appendChild(this._viewZones.marginDomNode),h.getDomNode().appendChild(c.getDomNode()),this._viewParts.push(h),this._contentWidgets=new _t(this._context,this.domNode),this._viewParts.push(this._contentWidgets),this._viewCursors=new Yn(this._context),this._viewParts.push(this._viewCursors),this._overlayWidgets=new xn(this._context),this._viewParts.push(this._overlayWidgets);const u=new Tn(this._context);this._viewParts.push(u);const g=new wn(this._context);if(this._viewParts.push(g),a){const e=this._scrollbar.getOverviewRulerLayoutInfo();e.parent.insertBefore(a.getDomNode(),e.insertBefore)}this._linesContent.appendChild(d.getDomNode()),this._linesContent.appendChild(u.domNode),this._linesContent.appendChild(this._viewZones.domNode),this._linesContent.appendChild(this._viewLines.getDomNode()),this._linesContent.appendChild(this._contentWidgets.domNode),this._linesContent.appendChild(this._viewCursors.getDomNode()),this._overflowGuardContainer.appendChild(h.getDomNode()),this._overflowGuardContainer.appendChild(this._scrollbar.getDomNode()),this._overflowGuardContainer.appendChild(l.getDomNode()),this._overflowGuardContainer.appendChild(this._textAreaHandler.textArea),this._overflowGuardContainer.appendChild(this._textAreaHandler.textAreaCover),this._overflowGuardContainer.appendChild(this._overlayWidgets.getDomNode()),this._overflowGuardContainer.appendChild(g.getDomNode()),this.domNode.appendChild(this._overflowGuardContainer),r?r.appendChild(this._contentWidgets.overflowingContentWidgetsDomNode.domNode):this.domNode.appendChild(this._contentWidgets.overflowingContentWidgetsDomNode),this._applyLayout(),this._pointerHandler=this._register(new ze(this._context,s,this._createPointerHandlerHelper()))}_flushAccumulatedAndRenderNow(){this._renderNow()}_createPointerHandlerHelper(){return{viewDomNode:this.domNode.domNode,linesContentDomNode:this._linesContent.domNode,focusTextArea:()=>{this.focus()},dispatchTextAreaEvent:e=>{this._textAreaHandler.textArea.domNode.dispatchEvent(e)},getLastRenderData:()=>{const e=this._viewCursors.getLastRenderData()||[],t=this._textAreaHandler.getLastRenderData();return new ye(e,t)},shouldSuppressMouseDownOnViewZone:e=>this._viewZones.shouldSuppressMouseDownOnViewZone(e),shouldSuppressMouseDownOnWidget:e=>this._contentWidgets.shouldSuppressMouseDownOnWidget(e),getPositionFromDOMInfo:(e,t)=>(this._flushAccumulatedAndRenderNow(),this._viewLines.getPositionFromDOMInfo(e,t)),visibleRangeForPosition:(e,t)=>(this._flushAccumulatedAndRenderNow(),this._viewLines.visibleRangeForPosition(new fe.L(e,t))),getLineWidth:e=>(this._flushAccumulatedAndRenderNow(),this._viewLines.getLineWidth(e))}}_createTextAreaHandlerHelper(){return{visibleRangeForPositionRelativeToEditor:(e,t)=>(this._flushAccumulatedAndRenderNow(),this._viewLines.visibleRangeForPosition(new fe.L(e,t)))}}_applyLayout(){const e=this._context.configuration.options.get(129);this.domNode.setWidth(e.width),this.domNode.setHeight(e.height),this._overflowGuardContainer.setWidth(e.width),this._overflowGuardContainer.setHeight(e.height),this._linesContent.setWidth(1e6),this._linesContent.setHeight(1e6)}_getEditorClassName(){const e=this._textAreaHandler.isFocused()?" focused":"";return this._context.configuration.options.get(126)+" "+(0,Ye.m6)(this._context.theme.type)+e}handleEvents(e){super.handleEvents(e),this._scheduleRender()}onConfigurationChanged(e){return this._configPixelRatio=this._context.configuration.options.get(127),this.domNode.setClassName(this._getEditorClassName()),this._applyLayout(),!1}onCursorStateChanged(e){return this._selections=e.selections,!1}onFocusChanged(e){return this.domNode.setClassName(this._getEditorClassName()),!1}onThemeChanged(e){return this.domNode.setClassName(this._getEditorClassName()),!1}dispose(){null!==this._renderAnimationFrame&&(this._renderAnimationFrame.dispose(),this._renderAnimationFrame=null),this._contentWidgets.overflowingContentWidgetsDomNode.domNode.remove(),this._context.removeEventHandler(this),this._viewLines.dispose();for(const e of this._viewParts)e.dispose();super.dispose()}_scheduleRender(){null===this._renderAnimationFrame&&(this._renderAnimationFrame=A.lI(this._onRenderScheduled.bind(this),100))}_onRenderScheduled(){this._renderAnimationFrame=null,this._flushAccumulatedAndRenderNow()}_renderNow(){!function(e){try{e()}catch(e){(0,S.dL)(e)}}((()=>this._actualRender()))}_getViewPartsToRender(){let e=[],t=0;for(const n of this._viewParts)n.shouldRender()&&(e[t++]=n);return e}_actualRender(){if(!A.Uw(this.domNode.domNode))return;let e=this._getViewPartsToRender();if(!this._viewLines.shouldRender()&&0===e.length)return;const t=this._context.viewLayout.getLinesViewportData();this._context.model.setViewport(t.startLineNumber,t.endLineNumber,t.centeredLineNumber);const n=new ei(this._selections,t,this._context.viewLayout.getWhitespaceViewportData(),this._context.model);this._contentWidgets.shouldRender()&&this._contentWidgets.onBeforeRender(n),this._viewLines.shouldRender()&&(this._viewLines.renderText(n),this._viewLines.onDidRender(),e=this._getViewPartsToRender());const i=new Y(this._context.viewLayout,n,this._viewLines);for(const t of e)t.prepareRender(i);for(const t of e)t.render(i),t.onDidRender();Math.abs(D.mX()-this._configPixelRatio)>.001&&this._context.configuration.updatePixelRatio()}delegateVerticalScrollbarMouseDown(e){this._scrollbar.delegateVerticalScrollbarMouseDown(e)}restoreState(e){this._context.model.setScrollPosition({scrollTop:e.scrollTop},1),this._context.model.tokenizeViewport(),this._renderNow(),this._viewLines.updateLineWidths(),this._context.model.setScrollPosition({scrollLeft:e.scrollLeft},1)}getOffsetForColumn(e,t){const n=this._context.model.validateModelPosition({lineNumber:e,column:t}),i=this._context.model.coordinatesConverter.convertModelPositionToViewPosition(n);this._flushAccumulatedAndRenderNow();const o=this._viewLines.visibleRangeForPosition(new fe.L(i.lineNumber,i.column));return o?o.left:-1}getTargetAtClientPoint(e,t){const n=this._pointerHandler.getTargetAtClientPoint(e,t);return n?rt.convertViewToModelMouseTarget(n,this._context.model.coordinatesConverter):null}createOverviewRuler(e){return new Dn(this._context,e)}change(e){this._viewZones.changeViewZones(e),this._scheduleRender()}render(e,t){if(t){this._viewLines.forceShouldRender();for(const e of this._viewParts)e.forceShouldRender()}e?this._flushAccumulatedAndRenderNow():this._scheduleRender()}focus(){this._textAreaHandler.focusTextArea()}isFocused(){return this._textAreaHandler.isFocused()}setAriaOptions(e){this._textAreaHandler.setAriaOptions(e)}addContentWidget(e){this._contentWidgets.addWidget(e.widget),this.layoutContentWidget(e),this._scheduleRender()}layoutContentWidget(e){let t=e.position&&e.position.range||null;if(null===t){const n=e.position?e.position.position:null;null!==n&&(t=new _e.e(n.lineNumber,n.column,n.lineNumber,n.column))}const n=e.position?e.position.preference:null;this._contentWidgets.setWidgetPosition(e.widget,t,n),this._scheduleRender()}removeContentWidget(e){this._contentWidgets.removeWidget(e.widget),this._scheduleRender()}addOverlayWidget(e){this._overlayWidgets.addWidget(e.widget),this.layoutOverlayWidget(e),this._scheduleRender()}layoutOverlayWidget(e){const t=e.position?e.position.preference:null;this._overlayWidgets.setWidgetPosition(e.widget,t)&&this._scheduleRender()}removeOverlayWidget(e){this._overlayWidgets.removeWidget(e.widget),this._scheduleRender()}}class ni{constructor(e){this._selTrackedRange=null,this._trackSelection=!0,this._setState(e,new be.rS(new _e.e(1,1,1,1),0,new fe.L(1,1),0),new be.rS(new _e.e(1,1,1,1),0,new fe.L(1,1),0))}dispose(e){this._removeTrackedRange(e)}startTrackingSelection(e){this._trackSelection=!0,this._updateTrackedRange(e)}stopTrackingSelection(e){this._trackSelection=!1,this._removeTrackedRange(e)}_updateTrackedRange(e){this._trackSelection&&(this._selTrackedRange=e.model._setTrackedRange(this._selTrackedRange,this.modelState.selection,0))}_removeTrackedRange(e){this._selTrackedRange=e.model._setTrackedRange(this._selTrackedRange,null,0)}asCursorState(){return new be.Vi(this.modelState,this.viewState)}readSelectionFromMarkers(e){const t=e.model._getTrackedRange(this._selTrackedRange);return 0===this.modelState.selection.getDirection()?new I.Y(t.startLineNumber,t.startColumn,t.endLineNumber,t.endColumn):new I.Y(t.endLineNumber,t.endColumn,t.startLineNumber,t.startColumn)}ensureValidState(e){this._setState(e,this.modelState,this.viewState)}setState(e,t,n){this._setState(e,t,n)}static _validatePositionWithCache(e,t,n,i){return t.equals(n)?i:e.normalizePosition(t,2)}static _validateViewState(e,t){const n=t.position,i=t.selectionStart.getStartPosition(),o=t.selectionStart.getEndPosition(),r=e.normalizePosition(n,2),s=this._validatePositionWithCache(e,i,n,r),a=this._validatePositionWithCache(e,o,i,s);return n.equals(r)&&i.equals(s)&&o.equals(a)?t:new be.rS(_e.e.fromPositions(s,a),t.selectionStartLeftoverVisibleColumns+i.column-s.column,r,t.leftoverVisibleColumns+n.column-r.column)}_setState(e,t,n){if(n&&(n=ni._validateViewState(e.viewModel,n)),t){const n=e.model.validateRange(t.selectionStart),i=t.selectionStart.equalsRange(n)?t.selectionStartLeftoverVisibleColumns:0,o=e.model.validatePosition(t.position),r=t.position.equals(o)?t.leftoverVisibleColumns:0;t=new be.rS(n,i,o,r)}else{if(!n)return;const i=e.model.validateRange(e.coordinatesConverter.convertViewRangeToModelRange(n.selectionStart)),o=e.model.validatePosition(e.coordinatesConverter.convertViewPositionToModelPosition(n.position));t=new be.rS(i,n.selectionStartLeftoverVisibleColumns,o,n.leftoverVisibleColumns)}if(n){const i=e.coordinatesConverter.validateViewRange(n.selectionStart,t.selectionStart),o=e.coordinatesConverter.validateViewPosition(n.position,t.position);n=new be.rS(i,t.selectionStartLeftoverVisibleColumns,o,t.leftoverVisibleColumns)}else{const i=e.coordinatesConverter.convertModelPositionToViewPosition(new fe.L(t.selectionStart.startLineNumber,t.selectionStart.startColumn)),o=e.coordinatesConverter.convertModelPositionToViewPosition(new fe.L(t.selectionStart.endLineNumber,t.selectionStart.endColumn)),r=new _e.e(i.lineNumber,i.column,o.lineNumber,o.column),s=e.coordinatesConverter.convertModelPositionToViewPosition(t.position);n=new be.rS(r,t.selectionStartLeftoverVisibleColumns,s,t.leftoverVisibleColumns)}this.modelState=t,this.viewState=n,this._updateTrackedRange(e)}}class ii{constructor(e){this.context=e,this.primaryCursor=new ni(e),this.secondaryCursors=[],this.lastAddedCursorIndex=0}dispose(){this.primaryCursor.dispose(this.context),this.killSecondaryCursors()}startTrackingSelections(){this.primaryCursor.startTrackingSelection(this.context);for(let e=0,t=this.secondaryCursors.length;en){let e=t-n;for(let t=0;t=e+1&&this.lastAddedCursorIndex--,this.secondaryCursors[e].dispose(this.context),this.secondaryCursors.splice(e,1)}_getAll(){let e=[];e[0]=this.primaryCursor;for(let t=0,n=this.secondaryCursors.length;te.selection.startLineNumber===t.selection.startLineNumber?e.selection.startColumn-t.selection.startColumn:e.selection.startLineNumber-t.selection.startLineNumber));for(let n=0;na&&e.index--;e.splice(a,1),t.splice(s,1),this._removeSecondaryCursor(a-1),n--}}}}var oi=n(1380),ri=n(3582),si=n(3256);class ai{constructor(){this.type=0}}class li{constructor(){this.type=1}}class di{constructor(e){this.type=2,this._source=e}hasChanged(e){return this._source.hasChanged(e)}}class ci{constructor(e,t){this.type=3,this.selections=e,this.modelSelections=t}}class hi{constructor(e){this.type=4,e?(this.affectsMinimap=e.affectsMinimap,this.affectsOverviewRuler=e.affectsOverviewRuler):(this.affectsMinimap=!0,this.affectsOverviewRuler=!0)}}class ui{constructor(){this.type=5}}class gi{constructor(e){this.type=6,this.isFocused=e}}class pi{constructor(){this.type=7}}class mi{constructor(){this.type=8}}class fi{constructor(e,t){this.type=9,this.fromLineNumber=e,this.toLineNumber=t}}class _i{constructor(e,t){this.type=10,this.fromLineNumber=e,this.toLineNumber=t}}class bi{constructor(e,t){this.type=11,this.fromLineNumber=e,this.toLineNumber=t}}class Ci{constructor(e,t,n,i,o,r){this.type=12,this.source=e,this.range=t,this.selections=n,this.verticalType=i,this.revealHorizontal=o,this.scrollType=r}}class vi{constructor(e){this.type=13,this.scrollWidth=e.scrollWidth,this.scrollLeft=e.scrollLeft,this.scrollHeight=e.scrollHeight,this.scrollTop=e.scrollTop,this.scrollWidthChanged=e.scrollWidthChanged,this.scrollLeftChanged=e.scrollLeftChanged,this.scrollHeightChanged=e.scrollHeightChanged,this.scrollTopChanged=e.scrollTopChanged}}class wi{constructor(){this.type=14}}class yi{constructor(e){this.type=15,this.ranges=e}}class Ai{constructor(){this.type=16}}class Si{constructor(){this.type=17}}class xi extends k.JT{constructor(){super(),this._onEvent=this._register(new x.Q5),this.onEvent=this._onEvent.event,this._eventHandlers=[],this._viewEventQueue=null,this._isConsumingViewEventQueue=!1,this._collector=null,this._collectorCnt=0,this._outgoingEvents=[]}emitOutgoingEvent(e){this._addOutgoingEvent(e),this._emitOugoingEvents()}_addOutgoingEvent(e){for(let t=0,n=this._outgoingEvents.length;t0;){if(this._collector||this._isConsumingViewEventQueue)return;const e=this._outgoingEvents.shift();e.isNoOp()||this._onEvent.fire(e)}}addViewEventHandler(e){for(let t=0,n=this._eventHandlers.length;t0&&this._emitMany(t)}this._emitOugoingEvents()}emitSingleViewEvent(e){try{this.beginEmitViewEvents().emitViewEvent(e)}finally{this.endEmitViewEvents()}}_emitMany(e){this._viewEventQueue?this._viewEventQueue=this._viewEventQueue.concat(e):this._viewEventQueue=e,this._isConsumingViewEventQueue||this._consumeViewEventQueue()}_consumeViewEventQueue(){try{this._isConsumingViewEventQueue=!0,this._doConsumeQueue()}finally{this._isConsumingViewEventQueue=!1}}_doConsumeQueue(){for(;this._viewEventQueue;){const e=this._viewEventQueue;this._viewEventQueue=null;const t=this._eventHandlers.slice(0);for(const n of t)n.handleEvents(e)}}}class ki{constructor(){this.viewEvents=[],this.outgoingEvents=[]}emitViewEvent(e){this.viewEvents.push(e)}emitOutgoingEvent(e){this.outgoingEvents.push(e)}}class Li{constructor(e,t,n,i){this.kind=0,this._oldContentWidth=e,this._oldContentHeight=t,this.contentWidth=n,this.contentHeight=i,this.contentWidthChanged=this._oldContentWidth!==this.contentWidth,this.contentHeightChanged=this._oldContentHeight!==this.contentHeight}isNoOp(){return!this.contentWidthChanged&&!this.contentHeightChanged}merge(e){return 0!==e.kind?this:new Li(this._oldContentWidth,this._oldContentHeight,e.contentWidth,e.contentHeight)}}class Ei{constructor(e,t){this.kind=1,this.oldHasFocus=e,this.hasFocus=t}isNoOp(){return this.oldHasFocus===this.hasFocus}merge(e){return 1!==e.kind?this:new Ei(this.oldHasFocus,e.hasFocus)}}class Ni{constructor(e,t,n,i,o,r,s,a){this.kind=2,this._oldScrollWidth=e,this._oldScrollLeft=t,this._oldScrollHeight=n,this._oldScrollTop=i,this.scrollWidth=o,this.scrollLeft=r,this.scrollHeight=s,this.scrollTop=a,this.scrollWidthChanged=this._oldScrollWidth!==this.scrollWidth,this.scrollLeftChanged=this._oldScrollLeft!==this.scrollLeft,this.scrollHeightChanged=this._oldScrollHeight!==this.scrollHeight,this.scrollTopChanged=this._oldScrollTop!==this.scrollTop}isNoOp(){return!(this.scrollWidthChanged||this.scrollLeftChanged||this.scrollHeightChanged||this.scrollTopChanged)}merge(e){return 2!==e.kind?this:new Ni(this._oldScrollWidth,this._oldScrollLeft,this._oldScrollHeight,this._oldScrollTop,e.scrollWidth,e.scrollLeft,e.scrollHeight,e.scrollTop)}}class Di{constructor(){this.kind=3}isNoOp(){return!1}merge(e){return this}}class Ii{constructor(e,t,n,i,o,r,s){this.kind=5,this.oldSelections=e,this.selections=t,this.oldModelVersionId=n,this.modelVersionId=i,this.source=o,this.reason=r,this.reachedMaxCursorCount=s}static _selectionsAreEqual(e,t){if(!e&&!t)return!0;if(!e||!t)return!1;const n=e.length;if(n!==t.length)return!1;for(let i=0;i=t.length)return!1;if(!t[n].strictContainsRange(e[n]))return!1}return!0}}class Oi extends k.JT{constructor(e,t,n,i){super(),this._model=e,this._knownModelVersionId=this._model.getVersionId(),this._viewModel=t,this._coordinatesConverter=n,this.context=new be.zp(this._model,this._viewModel,this._coordinatesConverter,i),this._cursors=new ii(this.context),this._hasFocus=!1,this._isHandling=!1,this._isDoingComposition=!1,this._selectionsWhenCompositionStarted=null,this._columnSelectData=null,this._autoClosedActions=[],this._prevEditOperationType=0}dispose(){this._cursors.dispose(),this._autoClosedActions=(0,k.B9)(this._autoClosedActions),super.dispose()}updateConfiguration(e){this.context=new be.zp(this._model,this._viewModel,this._coordinatesConverter,e),this._cursors.updateContext(this.context)}onLineMappingChanged(e){this._knownModelVersionId===this._model.getVersionId()&&this.setStates(e,"viewModel",0,this.getCursorStates())}setHasFocus(e){this._hasFocus=e}_validateAutoClosedActions(){if(this._autoClosedActions.length>0){let e=this._cursors.getSelections();for(let t=0;tOi.MAX_CURSOR_COUNT&&(i=i.slice(0,Oi.MAX_CURSOR_COUNT),o=!0);const r=new Ti(this._model,this);return this._cursors.setStates(i),this._cursors.normalize(),this._columnSelectData=null,this._validateAutoClosedActions(),this._emitStateChangedIfNecessary(e,t,n,r,o)}setCursorColumnSelectData(e){this._columnSelectData=e}revealPrimary(e,t,n,i){const o=this._cursors.getViewPositions();if(o.length>1)this._emitCursorRevealRange(e,t,null,this._cursors.getViewSelections(),0,n,i);else{const r=o[0],s=new _e.e(r.lineNumber,r.column,r.lineNumber,r.column);this._emitCursorRevealRange(e,t,s,null,0,n,i)}}_revealPrimaryCursor(e,t,n,i,o){const r=this._cursors.getViewPositions();if(r.length>1)this._emitCursorRevealRange(e,t,null,this._cursors.getViewSelections(),n,i,o);else{const s=r[0],a=new _e.e(s.lineNumber,s.column,s.lineNumber,s.column);this._emitCursorRevealRange(e,t,a,null,n,i,o)}}_emitCursorRevealRange(e,t,n,i,o,r,s){e.emitViewEvent(new Ci(t,n,i,o,r,s))}saveState(){let e=[];const t=this._cursors.getSelections();for(let n=0,i=t.length;n0){const n=be.Vi.fromModelSelections(t.resultingSelection);this.setStates(e,"modelChange",t.isUndoing?5:t.isRedoing?6:2,n)&&this._revealPrimaryCursor(e,"modelChange",0,!0,0)}else{const t=this._cursors.readSelectionFromMarkers();this.setStates(e,"modelChange",2,be.Vi.fromModelSelections(t))}}}getSelection(){return this._cursors.getPrimaryCursor().modelState.selection}getTopMostViewPosition(){return this._cursors.getTopMostViewPosition()}getBottomMostViewPosition(){return this._cursors.getBottomMostViewPosition()}getCursorColumnSelectData(){if(this._columnSelectData)return this._columnSelectData;const e=this._cursors.getPrimaryCursor(),t=e.viewState.selectionStart.getStartPosition(),n=e.viewState.position;return{isReal:!1,fromViewLineNumber:t.lineNumber,fromViewVisualColumn:be.io.visibleColumnFromColumn2(this.context.cursorConfig,this._viewModel,t),toViewLineNumber:n.lineNumber,toViewVisualColumn:be.io.visibleColumnFromColumn2(this.context.cursorConfig,this._viewModel,n)}}getSelections(){return this._cursors.getSelections()}setSelections(e,t,n,i){this.setStates(e,t,i,be.Vi.fromModelSelections(n))}getPrevEditOperationType(){return this._prevEditOperationType}setPrevEditOperationType(e){this._prevEditOperationType=e}_pushAutoClosedAction(e,t){let n=[],i=[];for(let o=0,r=e.length;o0&&(r[0]._isTracked=!0);let s=e.model.pushEditOperations(e.selectionsBefore,r,(n=>{let i=[];for(let t=0;te.identifier.minor-t.identifier.minor;let r=[];for(let n=0;n0?(i[n].sort(o),r[n]=t[n].computeCursorState(e.model,{getInverseEditOperations:()=>i[n],getTrackedSelection:t=>{const n=parseInt(t,10),i=e.model._getTrackedRange(e.trackedRanges[n]);return 0===e.trackedRangesDirection[n]?new I.Y(i.startLineNumber,i.startColumn,i.endLineNumber,i.endColumn):new I.Y(i.endLineNumber,i.endColumn,i.startLineNumber,i.startColumn)}})):r[n]=e.selectionsBefore[n];return r}));s||(s=e.selectionsBefore);let a=[];for(let e in o)o.hasOwnProperty(e)&&a.push(parseInt(e,10));a.sort(((e,t)=>t-e));for(const e of a)s.splice(e,1);return s}static _arrayIsEmpty(e){for(let t=0,n=e.length;t{_e.e.isEmpty(e)&&""===r||i.push({identifier:{major:t,minor:o++},range:e,text:r,forceMoveMarkers:s,isAutoWhitespaceEdit:n.insertsAutoWhitespace})};let s=!1;const a={addEditOperation:r,addTrackedEditOperation:(e,t,n)=>{s=!0,r(e,t,n)},trackSelection:(t,n)=>{const i=I.Y.liftSelection(t);let o;if(i.isEmpty())if("boolean"==typeof n)o=n?2:3;else{const t=e.model.getLineMaxColumn(i.startLineNumber);o=i.startColumn===t?2:3}else o=1;const r=e.trackedRanges.length,s=e.model._setTrackedRange(null,i,o);return e.trackedRanges[r]=s,e.trackedRangesDirection[r]=i.getDirection(),r.toString()}};try{n.getEditOperations(e.model,a)}catch(e){return(0,S.dL)(e),{operations:[],hadTrackedEditOperation:!1}}return{operations:i,hadTrackedEditOperation:s}}static _getLoserCursorMap(e){(e=e.slice(0)).sort(((e,t)=>-_e.e.compareRangesUsingEnds(e.range,t.range)));let t={};for(let n=1;no.identifier.major?i.identifier.major:o.identifier.major,t[r.toString()]=!0;for(let t=0;t0&&n--}}return t}}.executeCommands(this._model,this._cursors.getSelections(),e.commands);if(t){this._interpretCommandResult(t);let n=[],i=[];for(let t=0;t0&&this._pushAutoClosedAction(n,i),this._prevEditOperationType=e.type}e.shouldPushStackElementAfter&&this._model.pushStackElement()}_interpretCommandResult(e){e&&0!==e.length||(e=this._cursors.readSelectionFromMarkers()),this._columnSelectData=null,this._cursors.setSelections(e),this._cursors.normalize()}_emitStateChangedIfNecessary(e,t,n,i,o){const r=new Ti(this._model,this);if(r.equals(i))return!1;const s=this._cursors.getSelections(),a=this._cursors.getViewSelections();if(e.emitViewEvent(new ci(a,s)),!i||i.cursorState.length!==r.cursorState.length||r.cursorState.some(((e,t)=>!e.modelState.equals(i.cursorState[t].modelState)))){const a=i?i.cursorState.map((e=>e.modelState.selection)):null,l=i?i.modelVersionId:0;e.emitOutgoingEvent(new Ii(a,s,l,r.modelVersionId,t||"keyboard",n,o))}return!0}_findAutoClosingPairs(e){if(!e.length)return null;let t=[];for(let n=0,i=e.length;n=0)return null;const o=i.text.match(/([)\]}>'"`])([^)\]}>'"`]*)$/);if(!o)return null;const r=o[1],s=this.context.cursorConfig.autoClosingPairs.autoClosingPairsCloseSingleChar.get(r);if(!s||1!==s.length)return null;const a=s[0].open,l=i.text.length-o[2].length-1,d=i.text.lastIndexOf(a,l-1);if(-1===d)return null;t.push([d,l])}return t}executeEdits(e,t,n,i){let o=null;"snippet"===t&&(o=this._findAutoClosingPairs(n)),o&&(n[0]._isTracked=!0);let r=[],s=[];const a=this._model.pushEditOperations(this.getSelections(),n,(e=>{if(o)for(let t=0,n=o.length;t0&&this._pushAutoClosedAction(r,s)}_executeEdit(e,t,n,i=0){if(this.context.cursorConfig.readOnly)return;const o=new Ti(this._model,this);this._cursors.stopTrackingSelections(),this._isHandling=!0;try{this._cursors.ensureValidState(),e()}catch(e){(0,S.dL)(e)}this._isHandling=!1,this._cursors.startTrackingSelections(),this._validateAutoClosedActions(),this._emitStateChangedIfNecessary(t,n,i,o,!1)&&this._revealPrimaryCursor(t,n,0,!0,0)}setIsDoingComposition(e){this._isDoingComposition=e}getAutoClosedCharacters(){return Ri.getAllAutoClosedCharacters(this._autoClosedActions)}startComposition(e){this._selectionsWhenCompositionStarted=this.getSelections().slice(0)}endComposition(e,t){this._executeEdit((()=>{"keyboard"===t&&(this._executeEditOperation(ri.u.compositionEndWithInterceptors(this._prevEditOperationType,this.context.cursorConfig,this._model,this._selectionsWhenCompositionStarted,this.getSelections(),this.getAutoClosedCharacters())),this._selectionsWhenCompositionStarted=null)}),e,t)}type(e,t,n){this._executeEdit((()=>{if("keyboard"===n){const e=t.length;let n=0;for(;n{this._executeEditOperation(ri.u.compositionType(this._prevEditOperationType,this.context.cursorConfig,this._model,this.getSelections(),t,n,i,o))}),e,r);else if(0!==o){const t=this.getSelections().map((e=>{const t=e.getPosition();return new I.Y(t.lineNumber,t.column+o,t.lineNumber,t.column+o)}));this.setSelections(e,r,t,0)}}paste(e,t,n,i,o){this._executeEdit((()=>{this._executeEditOperation(ri.u.paste(this.context.cursorConfig,this._model,this.getSelections(),t,n,i||[]))}),e,o,4)}cut(e,t){this._executeEdit((()=>{this._executeEditOperation(oi.A.cut(this.context.cursorConfig,this._model,this.getSelections()))}),e,t)}executeCommand(e,t,n){this._executeEdit((()=>{this._cursors.killSecondaryCursors(),this._executeEditOperation(new be.Tp(0,[t],{shouldPushStackElementBefore:!1,shouldPushStackElementAfter:!1}))}),e,n)}executeCommands(e,t,n){this._executeEdit((()=>{this._executeEditOperation(new be.Tp(0,t,{shouldPushStackElementBefore:!1,shouldPushStackElementAfter:!1}))}),e,n)}}Oi.MAX_CURSOR_COUNT=1e4;var Bi=n(653),Pi=n(6518),Fi=n(9102),Wi=n(5713),zi=n(6633);class Vi{constructor(){this._hasPending=!1,this._inserts=[],this._changes=[],this._removes=[]}insert(e){this._hasPending=!0,this._inserts.push(e)}change(e){this._hasPending=!0,this._changes.push(e)}remove(e){this._hasPending=!0,this._removes.push(e)}mustCommit(){return this._hasPending}commit(e){if(!this._hasPending)return;const t=this._inserts,n=this._changes,i=this._removes;this._hasPending=!1,this._inserts=[],this._changes=[],this._removes=[],e._commitPendingChanges(t,n,i)}}class Hi{constructor(e,t,n,i,o){this.id=e,this.afterLineNumber=t,this.ordinal=n,this.height=i,this.minWidth=o,this.prefixSum=0}}class ji{constructor(e,t,n,i){this._instanceId=je.PJ(++ji.INSTANCE_COUNT),this._pendingChanges=new Vi,this._lastWhitespaceId=0,this._arr=[],this._prefixSumValidIndex=-1,this._minWidth=-1,this._lineCount=e,this._lineHeight=t,this._paddingTop=n,this._paddingBottom=i}static findInsertionIndex(e,t,n){let i=0,o=e.length;for(;i>>1;t===e[r].afterLineNumber?n{t=!0,e|=0,n|=0,i|=0,o|=0;const r=this._instanceId+ ++this._lastWhitespaceId;return this._pendingChanges.insert(new Hi(r,e,n,i,o)),r},changeOneWhitespace:(e,n,i)=>{t=!0,n|=0,i|=0,this._pendingChanges.change({id:e,newAfterLineNumber:n,newHeight:i})},removeWhitespace:e=>{t=!0,this._pendingChanges.remove({id:e})}})}finally{this._pendingChanges.commit(this)}return t}_commitPendingChanges(e,t,n){if((e.length>0||n.length>0)&&(this._minWidth=-1),e.length+t.length+n.length<=1){for(const t of e)this._insertWhitespace(t);for(const e of t)this._changeOneWhitespace(e.id,e.newAfterLineNumber,e.newHeight);for(const e of n){const t=this._findWhitespaceIndex(e.id);-1!==t&&this._removeWhitespace(t)}return}const i=new Set;for(const e of n)i.add(e.id);const o=new Map;for(const e of t)o.set(e.id,e);const r=e=>{let t=[];for(const n of e)if(!i.has(n.id)){if(o.has(n.id)){const e=o.get(n.id);n.afterLineNumber=e.newAfterLineNumber,n.height=e.newHeight}t.push(n)}return t},s=r(this._arr).concat(r(e));s.sort(((e,t)=>e.afterLineNumber===t.afterLineNumber?e.ordinal-t.ordinal:e.afterLineNumber-t.afterLineNumber)),this._arr=s,this._prefixSumValidIndex=-1}_checkPendingChanges(){this._pendingChanges.mustCommit()&&this._pendingChanges.commit(this)}_insertWhitespace(e){const t=ji.findInsertionIndex(this._arr,e.afterLineNumber,e.ordinal);this._arr.splice(t,0,e),this._prefixSumValidIndex=Math.min(this._prefixSumValidIndex,t-1)}_findWhitespaceIndex(e){const t=this._arr;for(let n=0,i=t.length;nt&&(this._arr[n].afterLineNumber-=t-e+1)}}onLinesInserted(e,t){this._checkPendingChanges(),e|=0,t|=0,this._lineCount+=t-e+1;for(let n=0,i=this._arr.length;n=t.length||t[o+1].afterLineNumber>=e)return o;n=o+1|0}else i=o-1|0}return-1}_findFirstWhitespaceAfterLineNumber(e){e|=0;const t=this._findLastWhitespaceBeforeLineNumber(e)+1;return t1?this._lineHeight*(e-1):0,t+this.getWhitespaceAccumulatedHeightBeforeLineNumber(e)+this._paddingTop}getWhitespaceMinWidth(){if(this._checkPendingChanges(),-1===this._minWidth){let e=0;for(let t=0,n=this._arr.length;tthis.getLinesTotalHeight()}isInTopPadding(e){return 0!==this._paddingTop&&(this._checkPendingChanges(),e=this.getLinesTotalHeight()-this._paddingBottom)}getLineNumberAtOrAfterVerticalOffset(e){if(this._checkPendingChanges(),(e|=0)<0)return 1;const t=0|this._lineCount,n=this._lineHeight;let i=1,o=t;for(;i=r+n)i=t+1;else{if(e>=r)return t;o=t}}return i>t?t:i}getLinesViewportData(e,t){this._checkPendingChanges(),e|=0,t|=0;const n=this._lineHeight,i=0|this.getLineNumberAtOrAfterVerticalOffset(e),o=0|this.getVerticalOffsetForLineNumber(i);let r=0|this._lineCount,s=0|this.getFirstWhitespaceIndexAfterLineNumber(i);const a=0|this.getWhitespacesCount();let l,d;-1===s?(s=a,d=r+1,l=0):(d=0|this.getAfterLineNumberForWhitespaceIndex(s),l=0|this.getHeightForWhitespaceIndex(s));let c=o,h=c;const u=5e5;let g=0;o>=u&&(g=Math.floor(o/u)*u,g=Math.floor(g/n)*n,h-=g);const p=[],m=e+(t-e)/2;let f=-1;for(let e=i;e<=r;e++){if(-1===f){const t=c,i=c+n;(t<=m&&mm)&&(f=e)}for(c+=n,p[e-i]=h,h+=n;d===e;)h+=l,c+=l,s++,s>=a?d=r+1:(d=0|this.getAfterLineNumberForWhitespaceIndex(s),l=0|this.getHeightForWhitespaceIndex(s));if(c>=t){r=e;break}}-1===f&&(f=r);const _=0|this.getVerticalOffsetForLineNumber(r);let b=i,C=r;return bt&&C--,{bigNumbersDelta:g,startLineNumber:i,endLineNumber:r,relativeVerticalOffset:p,centeredLineNumber:f,completelyVisibleStartLineNumber:b,completelyVisibleEndLineNumber:C}}getVerticalOffsetForWhitespaceIndex(e){this._checkPendingChanges(),e|=0;const t=this.getAfterLineNumberForWhitespaceIndex(e);let n,i;return n=t>=1?this._lineHeight*t:0,i=e>0?this.getWhitespacesAccumulatedHeight(e-1):0,n+i+this._paddingTop}getWhitespaceIndexAtOrAfterVerticallOffset(e){this._checkPendingChanges(),e|=0;let t=0,n=this.getWhitespacesCount()-1;if(n<0)return-1;if(e>=this.getVerticalOffsetForWhitespaceIndex(n)+this.getHeightForWhitespaceIndex(n))return-1;for(;t=o+this.getHeightForWhitespaceIndex(i))t=i+1;else{if(e>=o)return i;n=i}}return t}getWhitespaceAtVerticalOffset(e){this._checkPendingChanges(),e|=0;const t=this.getWhitespaceIndexAtOrAfterVerticallOffset(e);if(t<0)return null;if(t>=this.getWhitespacesCount())return null;const n=this.getVerticalOffsetForWhitespaceIndex(t);if(n>e)return null;const i=this.getHeightForWhitespaceIndex(t);return{id:this.getIdForWhitespaceIndex(t),afterLineNumber:this.getAfterLineNumberForWhitespaceIndex(t),verticalOffset:n,height:i}}getWhitespaceViewportData(e,t){this._checkPendingChanges(),e|=0,t|=0;const n=this.getWhitespaceIndexAtOrAfterVerticallOffset(e),i=this.getWhitespacesCount()-1;if(n<0)return[];let o=[];for(let e=n;e<=i;e++){const n=this.getVerticalOffsetForWhitespaceIndex(e),i=this.getHeightForWhitespaceIndex(e);if(n>=t)break;o.push({id:this.getIdForWhitespaceIndex(e),afterLineNumber:this.getAfterLineNumberForWhitespaceIndex(e),verticalOffset:n,height:i})}return o}getWhitespaces(){return this._checkPendingChanges(),this._arr.slice(0)}getWhitespacesCount(){return this._checkPendingChanges(),this._arr.length}getIdForWhitespaceIndex(e){return this._checkPendingChanges(),e|=0,this._arr[e].id}getAfterLineNumberForWhitespaceIndex(e){return this._checkPendingChanges(),e|=0,this._arr[e].afterLineNumber}getHeightForWhitespaceIndex(e){return this._checkPendingChanges(),e|=0,this._arr[e].height}}ji.INSTANCE_COUNT=0;class $i{constructor(e,t,n,i){(e|=0)<0&&(e=0),(t|=0)<0&&(t=0),(n|=0)<0&&(n=0),(i|=0)<0&&(i=0),this.width=e,this.contentWidth=t,this.scrollWidth=Math.max(e,t),this.height=n,this.contentHeight=i,this.scrollHeight=Math.max(n,i)}equals(e){return this.width===e.width&&this.contentWidth===e.contentWidth&&this.height===e.height&&this.contentHeight===e.contentHeight}}class Ui extends k.JT{constructor(e,t){super(),this._onDidContentSizeChange=this._register(new x.Q5),this.onDidContentSizeChange=this._onDidContentSizeChange.event,this._dimensions=new $i(0,0,0,0),this._scrollable=this._register(new zi.Rm(e,t)),this.onDidScroll=this._scrollable.onScroll}getScrollable(){return this._scrollable}setSmoothScrollDuration(e){this._scrollable.setSmoothScrollDuration(e)}validateScrollPosition(e){return this._scrollable.validateScrollPosition(e)}getScrollDimensions(){return this._dimensions}setScrollDimensions(e){if(this._dimensions.equals(e))return;const t=this._dimensions;this._dimensions=e,this._scrollable.setScrollDimensions({width:e.width,scrollWidth:e.scrollWidth,height:e.height,scrollHeight:e.scrollHeight},!0);const n=t.contentWidth!==e.contentWidth,i=t.contentHeight!==e.contentHeight;(n||i)&&this._onDidContentSizeChange.fire(new Li(t.contentWidth,t.contentHeight,e.contentWidth,e.contentHeight))}getFutureScrollPosition(){return this._scrollable.getFutureScrollPosition()}getCurrentScrollPosition(){return this._scrollable.getCurrentScrollPosition()}setScrollPositionNow(e){this._scrollable.setScrollPositionNow(e)}setScrollPositionSmooth(e){this._scrollable.setScrollPositionSmooth(e)}}class Zi extends k.JT{constructor(e,t,n){super(),this._configuration=e;const i=this._configuration.options,o=i.get(129),r=i.get(73);this._linesLayout=new ji(t,i.get(57),r.top,r.bottom),this._scrollable=this._register(new Ui(0,n)),this._configureSmoothScrollDuration(),this._scrollable.setScrollDimensions(new $i(o.contentWidth,0,o.height,0)),this.onDidScroll=this._scrollable.onDidScroll,this.onDidContentSizeChange=this._scrollable.onDidContentSizeChange,this._updateHeight()}dispose(){super.dispose()}getScrollable(){return this._scrollable.getScrollable()}onHeightMaybeChanged(){this._updateHeight()}_configureSmoothScrollDuration(){this._scrollable.setSmoothScrollDuration(this._configuration.options.get(102)?125:0)}onConfigurationChanged(e){const t=this._configuration.options;if(e.hasChanged(57)&&this._linesLayout.setLineHeight(t.get(57)),e.hasChanged(73)){const e=t.get(73);this._linesLayout.setPadding(e.top,e.bottom)}if(e.hasChanged(129)){const e=t.get(129),n=e.contentWidth,i=e.height,o=this._scrollable.getScrollDimensions(),r=o.contentWidth;this._scrollable.setScrollDimensions(new $i(n,o.contentWidth,i,this._getContentHeight(n,i,r)))}else this._updateHeight();e.hasChanged(102)&&this._configureSmoothScrollDuration()}onFlushed(e){this._linesLayout.onFlushed(e)}onLinesDeleted(e,t){this._linesLayout.onLinesDeleted(e,t)}onLinesInserted(e,t){this._linesLayout.onLinesInserted(e,t)}_getHorizontalScrollbarHeight(e,t){const n=this._configuration.options.get(91);return 2===n.horizontal||e>=t?0:n.horizontalScrollbarSize}_getContentHeight(e,t,n){const i=this._configuration.options;let o=this._linesLayout.getLinesTotalHeight();return i.get(93)?o+=Math.max(0,t-i.get(57)-i.get(73).bottom):o+=this._getHorizontalScrollbarHeight(e,n),o}_updateHeight(){const e=this._scrollable.getScrollDimensions(),t=e.width,n=e.height,i=e.contentWidth;this._scrollable.setScrollDimensions(new $i(t,e.contentWidth,n,this._getContentHeight(t,n,i)))}getCurrentViewport(){const e=this._scrollable.getScrollDimensions(),t=this._scrollable.getCurrentScrollPosition();return new on.l_(t.scrollTop,t.scrollLeft,e.width,e.height)}getFutureViewport(){const e=this._scrollable.getScrollDimensions(),t=this._scrollable.getFutureScrollPosition();return new on.l_(t.scrollTop,t.scrollLeft,e.width,e.height)}_computeContentWidth(e){const t=this._configuration.options,n=t.get(130),i=t.get(41);if(n.isViewportWrapping){const n=t.get(129),o=t.get(63);return e>n.contentWidth+i.typicalHalfwidthCharacterWidth&&o.enabled&&"right"===o.side?e+n.verticalScrollbarWidth:e}{const n=t.get(92)*i.typicalHalfwidthCharacterWidth,o=this._linesLayout.getWhitespaceMinWidth();return Math.max(e+n,o)}}setMaxLineWidth(e){const t=this._scrollable.getScrollDimensions();this._scrollable.setScrollDimensions(new $i(t.width,this._computeContentWidth(e),t.height,t.contentHeight)),this._updateHeight()}saveState(){const e=this._scrollable.getFutureScrollPosition();let t=e.scrollTop,n=this._linesLayout.getLineNumberAtOrAfterVerticalOffset(t);return{scrollTop:t,scrollTopWithoutViewZones:t-this._linesLayout.getWhitespaceAccumulatedHeightBeforeLineNumber(n),scrollLeft:e.scrollLeft}}changeWhitespace(e){const t=this._linesLayout.changeWhitespace(e);return t&&this.onHeightMaybeChanged(),t}getVerticalOffsetForLineNumber(e){return this._linesLayout.getVerticalOffsetForLineNumber(e)}isAfterLines(e){return this._linesLayout.isAfterLines(e)}isInTopPadding(e){return this._linesLayout.isInTopPadding(e)}isInBottomPadding(e){return this._linesLayout.isInBottomPadding(e)}getLineNumberAtVerticalOffset(e){return this._linesLayout.getLineNumberAtOrAfterVerticalOffset(e)}getWhitespaceAtVerticalOffset(e){return this._linesLayout.getWhitespaceAtVerticalOffset(e)}getLinesViewportData(){const e=this.getCurrentViewport();return this._linesLayout.getLinesViewportData(e.top,e.top+e.height)}getLinesViewportDataAtScrollTop(e){const t=this._scrollable.getScrollDimensions();return e+t.height>t.scrollHeight&&(e=t.scrollHeight-t.height),e<0&&(e=0),this._linesLayout.getLinesViewportData(e,e+t.height)}getWhitespaceViewportData(){const e=this.getCurrentViewport();return this._linesLayout.getWhitespaceViewportData(e.top,e.top+e.height)}getWhitespaces(){return this._linesLayout.getWhitespaces()}getContentWidth(){return this._scrollable.getScrollDimensions().contentWidth}getScrollWidth(){return this._scrollable.getScrollDimensions().scrollWidth}getContentHeight(){return this._scrollable.getScrollDimensions().contentHeight}getScrollHeight(){return this._scrollable.getScrollDimensions().scrollHeight}getCurrentScrollLeft(){return this._scrollable.getCurrentScrollPosition().scrollLeft}getCurrentScrollTop(){return this._scrollable.getCurrentScrollPosition().scrollTop}validateScrollPosition(e){return this._scrollable.validateScrollPosition(e)}setScrollPosition(e,t){1===t?this._scrollable.setScrollPositionNow(e):this._scrollable.setScrollPositionSmooth(e)}deltaScrollNow(e,t){const n=this._scrollable.getCurrentScrollPosition();this._scrollable.setScrollPositionNow({scrollLeft:n.scrollLeft+e,scrollTop:n.scrollTop+t})}}var Ki=n(8411),qi=n(3103),Yi=n(3544);class Gi{constructor(e){this._lines=e}convertViewPositionToModelPosition(e){return this._lines.convertViewPositionToModelPosition(e.lineNumber,e.column)}convertViewRangeToModelRange(e){return this._lines.convertViewRangeToModelRange(e)}validateViewPosition(e,t){return this._lines.validateViewPosition(e.lineNumber,e.column,t)}validateViewRange(e,t){return this._lines.validateViewRange(e,t)}convertModelPositionToViewPosition(e,t){return this._lines.convertModelPositionToViewPosition(e.lineNumber,e.column,t)}convertModelRangeToViewRange(e,t){return this._lines.convertModelRangeToViewRange(e,t)}modelPositionIsVisible(e){return this._lines.modelPositionIsVisible(e.lineNumber,e.column)}getModelLineViewLineCount(e){return this._lines.getModelLineViewLineCount(e)}}class Qi{constructor(e){this._counts=e,this._isValid=!1,this._validEndIndex=-1,this._modelToView=[],this._viewToModel=[]}_invalidate(e){this._isValid=!1,this._validEndIndex=Math.min(this._validEndIndex,e-1)}_ensureValid(){if(!this._isValid){for(let e=this._validEndIndex+1,t=this._counts.length;e0?this._modelToView[e-1]:0;this._modelToView[e]=n+t;for(let i=0;i0?this._modelToView[t-1]:0;return new Yi.T(t,e-n)}}class Xi{constructor(e,t,n,i,o,r,s,a,l){this._editorId=e,this.model=t,this._validModelVersionId=-1,this._domLineBreaksComputerFactory=n,this._monospaceLineBreaksComputerFactory=i,this.fontInfo=o,this.tabSize=r,this.wrappingStrategy=s,this.wrappingColumn=a,this.wrappingIndent=l,this._constructLines(!0,null)}dispose(){this.hiddenAreasIds=this.model.deltaDecorations(this.hiddenAreasIds,[])}createCoordinatesConverter(){return new Gi(this)}_constructLines(e,t){this.lines=[],e&&(this.hiddenAreasIds=[]);const n=this.model.getLinesContent(),i=this.model.getInjectedTextDecorations(this._editorId),o=si.gk.fromDecorations(i),r=n.length,s=this.createLineBreaksComputer(),a=o.length;let l=0,d=lthis.model.getDecorationRange(e))).sort(_e.e.compareRangesUsingStarts),g=1,p=0,m=-1,f=m+1=g&&t<=p,i=ro(c[e],!n);h[e]=i.getViewLineCount(),this.lines[e]=i}this._validModelVersionId=this.model.getVersionId(),this.prefixSumComputer=new Qi(h)}getHiddenAreas(){return this.hiddenAreasIds.map((e=>this.model.getDecorationRange(e)))}_reduceRanges(e){if(0===e.length)return[];let t=e.map((e=>this.model.validateRange(e))).sort(_e.e.compareRangesUsingStarts),n=[],i=t[0].startLineNumber,o=t[0].endLineNumber;for(let e=1,r=t.length;eo+1?(n.push(new _e.e(i,1,o,1)),i=r.startLineNumber,o=r.endLineNumber):r.endLineNumber>o&&(o=r.endLineNumber)}return n.push(new _e.e(i,1,o,1)),n}setHiddenAreas(e){let t=this._reduceRanges(e),n=this.hiddenAreasIds.map((e=>this.model.getDecorationRange(e))).sort(_e.e.compareRangesUsingStarts);if(t.length===n.length){let e=!1;for(let i=0;i=r&&t<=s?this.lines[e].isVisible()&&(this.lines[e]=this.lines[e].setVisible(!1),n=!0):(d=!0,this.lines[e].isVisible()||(this.lines[e]=this.lines[e].setVisible(!0),n=!0)),n){let t=this.lines[e].getViewLineCount();this.prefixSumComputer.changeValue(e,t)}}return d||this.setHiddenAreas([]),!0}modelPositionIsVisible(e,t){return!(e<1||e>this.lines.length)&&this.lines[e-1].isVisible()}getModelLineViewLineCount(e){return e<1||e>this.lines.length?1:this.lines[e-1].getViewLineCount()}setTabSize(e){return this.tabSize!==e&&(this.tabSize=e,this._constructLines(!1,null),!0)}setWrappingSettings(e,t,n,i){const o=this.fontInfo.equals(e),r=this.wrappingStrategy===t,s=this.wrappingColumn===n,a=this.wrappingIndent===i;if(o&&r&&s&&a)return!1;const l=o&&r&&!s&&a;this.fontInfo=e,this.wrappingStrategy=t,this.wrappingColumn=n,this.wrappingIndent=i;let d=null;if(l){d=[];for(let e=0,t=this.lines.length;e2&&!this.lines[t-2].isVisible();let r=1===t?1:this.prefixSumComputer.getAccumulatedValue(t-2)+1,s=0,a=[],l=[];for(let e=0,t=i.length;es?(l=1===t?1:this.prefixSumComputer.getAccumulatedValue(t-2)+1,d=l+s-1,u=d+1,g=u+(o-s)-1,a=!0):ot?t:0|e}getActiveIndentGuide(e,t,n){e=this._toValidViewLineNumber(e),t=this._toValidViewLineNumber(t),n=this._toValidViewLineNumber(n);const i=this.convertViewPositionToModelPosition(e,this.getViewLineMinColumn(e)),o=this.convertViewPositionToModelPosition(t,this.getViewLineMinColumn(t)),r=this.convertViewPositionToModelPosition(n,this.getViewLineMinColumn(n)),s=this.model.getActiveIndentGuide(i.lineNumber,o.lineNumber,r.lineNumber),a=this.convertModelPositionToViewPosition(s.startLineNumber,1),l=this.convertModelPositionToViewPosition(s.endLineNumber,this.model.getLineMaxColumn(s.endLineNumber));return{startLineNumber:a.lineNumber,endLineNumber:l.lineNumber,indent:s.indent}}getViewLinesIndentGuides(e,t){e=this._toValidViewLineNumber(e),t=this._toValidViewLineNumber(t);const n=this.convertViewPositionToModelPosition(e,this.getViewLineMinColumn(e)),i=this.convertViewPositionToModelPosition(t,this.getViewLineMaxColumn(t));let o=[],r=[],s=[];const a=n.lineNumber-1,l=i.lineNumber-1;let d=null;for(let e=a;e<=l;e++){const t=this.lines[e];if(t.isVisible()){let i=t.getViewLineNumberOfModelPosition(0,e===a?n.column:1),o=t.getViewLineNumberOfModelPosition(0,this.model.getLineMaxColumn(e+1)),l=o-i+1,c=0;l>1&&1===t.getViewLineMinColumn(this.model,e+1,o)&&(c=0===i?1:2),r.push(l),s.push(c),null===d&&(d=new fe.L(e+1,0))}else null!==d&&(o=o.concat(this.model.getLinesIndentGuides(d.lineNumber,e)),d=null)}null!==d&&(o=o.concat(this.model.getLinesIndentGuides(d.lineNumber,i.lineNumber)),d=null);const c=t-e+1;let h=new Array(c),u=0;for(let e=0,t=o.length;et&&(h=!0,c=t-o+1);let u=d+c;if(l.getViewLinesData(this.model,i+1,d,u,o-e,n,a),o+=c,h)break}return a}validateViewPosition(e,t,n){e=this._toValidViewLineNumber(e);let i=this.prefixSumComputer.getIndexOf(e-1),o=i.index,r=i.remainder,s=this.lines[o],a=s.getViewLineMinColumn(this.model,o+1,r),l=s.getViewLineMaxColumn(this.model,o+1,r);tl&&(t=l);let d=s.getModelColumnOfViewPosition(r,t);return this.model.validatePosition(new fe.L(o+1,d)).equals(n)?new fe.L(e,t):this.convertModelPositionToViewPosition(n.lineNumber,n.column)}validateViewRange(e,t){const n=this.validateViewPosition(e.startLineNumber,e.startColumn,t.getStartPosition()),i=this.validateViewPosition(e.endLineNumber,e.endColumn,t.getEndPosition());return new _e.e(n.lineNumber,n.column,i.lineNumber,i.column)}convertViewPositionToModelPosition(e,t){e=this._toValidViewLineNumber(e);let n=this.prefixSumComputer.getIndexOf(e-1),i=n.index,o=n.remainder,r=this.lines[i].getModelColumnOfViewPosition(o,t);return this.model.validatePosition(new fe.L(i+1,r))}convertViewRangeToModelRange(e){const t=this.convertViewPositionToModelPosition(e.startLineNumber,e.startColumn),n=this.convertViewPositionToModelPosition(e.endLineNumber,e.endColumn);return new _e.e(t.lineNumber,t.column,n.lineNumber,n.column)}convertModelPositionToViewPosition(e,t,n=2){const i=this.model.validatePosition(new fe.L(e,t)),o=i.lineNumber,r=i.column;let s=o-1,a=!1;for(;s>0&&!this.lines[s].isVisible();)s--,a=!0;if(0===s&&!this.lines[s].isVisible())return new fe.L(1,1);const l=1+(0===s?0:this.prefixSumComputer.getAccumulatedValue(s-1));let d;return d=a?this.lines[s].getViewPositionOfModelPosition(l,this.model.getLineMaxColumn(s+1),n):this.lines[o-1].getViewPositionOfModelPosition(l,r,n),d}convertModelRangeToViewRange(e,t=0){if(e.isEmpty()){const n=this.convertModelPositionToViewPosition(e.startLineNumber,e.startColumn,t);return _e.e.fromPositions(n)}{const t=this.convertModelPositionToViewPosition(e.startLineNumber,e.startColumn,1),n=this.convertModelPositionToViewPosition(e.endLineNumber,e.endColumn,0);return new _e.e(t.lineNumber,t.column,n.lineNumber,n.column)}}_getViewLineNumberForModelPosition(e,t){let n=e-1;if(this.lines[n].isVisible()){const e=1+(0===n?0:this.prefixSumComputer.getAccumulatedValue(n-1));return this.lines[n].getViewLineNumberOfModelPosition(e,t)}for(;n>0&&!this.lines[n].isVisible();)n--;if(0===n&&!this.lines[n].isVisible())return 1;const i=1+(0===n?0:this.prefixSumComputer.getAccumulatedValue(n-1));return this.lines[n].getViewLineNumberOfModelPosition(i,this.model.getLineMaxColumn(n+1))}getAllOverviewRulerDecorations(e,t,n){const i=this.model.getOverviewRulerDecorations(e,t),o=new lo;for(const e of i){const t=e.options.overviewRuler,i=t?t.position:0;if(0===i)continue;const r=t.getColor(n),s=this._getViewLineNumberForModelPosition(e.range.startLineNumber,e.range.startColumn),a=this._getViewLineNumberForModelPosition(e.range.endLineNumber,e.range.endColumn);o.accept(r,s,a,i)}return o.result}getDecorationsInRange(e,t,n){const i=this.convertViewPositionToModelPosition(e.startLineNumber,e.startColumn),o=this.convertViewPositionToModelPosition(e.endLineNumber,e.endColumn);if(o.lineNumber-i.lineNumber<=e.endLineNumber-e.startLineNumber)return this.model.getDecorationsInRange(new _e.e(i.lineNumber,1,o.lineNumber,o.column),t,n);let r=[];const s=i.lineNumber-1,a=o.lineNumber-1;let l=null;for(let e=s;e<=a;e++)if(this.lines[e].isVisible())null===l&&(l=new fe.L(e+1,e===s?i.column:1));else if(null!==l){const i=this.model.getLineMaxColumn(e);r=r.concat(this.model.getDecorationsInRange(new _e.e(l.lineNumber,l.column,e,i),t,n)),l=null}null!==l&&(r=r.concat(this.model.getDecorationsInRange(new _e.e(l.lineNumber,l.column,o.lineNumber,o.column),t,n)),l=null),r.sort(((e,t)=>{const n=_e.e.compareRangesUsingStarts(e.range,t.range);return 0===n?e.idt.id?1:0:n}));let d=[],c=0,h=null;for(const e of r){const t=e.id;h!==t&&(h=t,d[c++]=e)}return d}getInjectedTextAt(e){const t=this._toValidViewLineNumber(e.lineNumber),n=this.prefixSumComputer.getIndexOf(t-1),i=n.index,o=n.remainder;return this.lines[i].getInjectedTextAt(o,e.column)}normalizePosition(e,t){const n=this._toValidViewLineNumber(e.lineNumber),i=this.prefixSumComputer.getIndexOf(n-1),o=i.index,r=i.remainder;return this.lines[o].normalizePosition(this.model,o+1,r,e,t)}getLineIndentColumn(e){const t=this._toValidViewLineNumber(e),n=this.prefixSumComputer.getIndexOf(t-1),i=n.index;return 0===n.remainder?this.model.getLineIndentColumn(i+1):0}}class Ji{constructor(){}isVisible(){return!0}setVisible(e){return e?this:eo.INSTANCE}getLineBreakData(){return null}getViewLineCount(){return 1}getViewLineContent(e,t,n){return e.getLineContent(t)}getViewLineLength(e,t,n){return e.getLineLength(t)}getViewLineMinColumn(e,t,n){return e.getLineMinColumn(t)}getViewLineMaxColumn(e,t,n){return e.getLineMaxColumn(t)}getViewLineData(e,t,n){let i=e.getLineTokens(t),o=i.getLineContent();return new on.IP(o,!1,1,o.length+1,0,i.inflate(),null)}getViewLinesData(e,t,n,i,o,r,s){r[o]?s[o]=this.getViewLineData(e,t,0):s[o]=null}getModelColumnOfViewPosition(e,t){return t}getViewPositionOfModelPosition(e,t){return new fe.L(e,t)}getViewLineNumberOfModelPosition(e,t){return e}normalizePosition(e,t,n,i,o){return i}getInjectedTextAt(e,t){return null}}Ji.INSTANCE=new Ji;class eo{constructor(){}isVisible(){return!1}setVisible(e){return e?Ji.INSTANCE:this}getLineBreakData(){return null}getViewLineCount(){return 0}getViewLineContent(e,t,n){throw new Error("Not supported")}getViewLineLength(e,t,n){throw new Error("Not supported")}getViewLineMinColumn(e,t,n){throw new Error("Not supported")}getViewLineMaxColumn(e,t,n){throw new Error("Not supported")}getViewLineData(e,t,n){throw new Error("Not supported")}getViewLinesData(e,t,n,i,o,r,s){throw new Error("Not supported")}getModelColumnOfViewPosition(e,t){throw new Error("Not supported")}getViewPositionOfModelPosition(e,t){throw new Error("Not supported")}getViewLineNumberOfModelPosition(e,t){throw new Error("Not supported")}normalizePosition(e,t,n,i,o){throw new Error("Not supported")}getInjectedTextAt(e,t){throw new Error("Not supported")}}eo.INSTANCE=new eo;class to{constructor(e,t){this._lineBreakData=e,this._isVisible=t}isVisible(){return this._isVisible}setVisible(e){return this._isVisible=e,this}getLineBreakData(){return this._lineBreakData}getViewLineCount(){return this._isVisible?this._lineBreakData.breakOffsets.length:0}getInputStartOffsetOfOutputLineIndex(e){return this._lineBreakData.getInputOffsetOfOutputPosition(e,0)}getInputEndOffsetOfOutputLineIndex(e,t,n){return n+1===this._lineBreakData.breakOffsets.length?e.getLineMaxColumn(t)-1:this._lineBreakData.getInputOffsetOfOutputPosition(n+1,0)}getViewLineContent(e,t,n){if(!this._isVisible)throw new Error("Not supported");const i=n>0?this._lineBreakData.breakOffsets[n-1]:0,o=nnew si.gk(0,0,e+1,this._lineBreakData.injectionOptions[t],0)));r=si.gk.applyInjectedText(e.getLineContent(t),n).substring(i,o)}else r=e.getValueInRange({startLineNumber:t,startColumn:i+1,endLineNumber:t,endColumn:o+1});return n>0&&(r=io(this._lineBreakData.wrappedTextIndentLength)+r),r}getViewLineLength(e,t,n){if(!this._isVisible)throw new Error("Not supported");const i=n>0?this._lineBreakData.breakOffsets[n-1]:0;let o=(n0&&(o=this._lineBreakData.wrappedTextIndentLength+o),o}getViewLineMinColumn(e,t,n){if(!this._isVisible)throw new Error("Not supported");return this._getViewLineMinColumn(n)}_getViewLineMinColumn(e){return e>0?this._lineBreakData.wrappedTextIndentLength+1:1}getViewLineMaxColumn(e,t,n){if(!this._isVisible)throw new Error("Not supported");return this.getViewLineLength(e,t,n)+1}getViewLineData(e,t,n){if(!this._isVisible)throw new Error("Not supported");const i=this._lineBreakData,o=n>0?i.wrappedTextIndentLength:0,r=i.injectionOffsets,s=i.injectionOptions;let a,l,d;if(r){const c=e.getLineTokens(t).withInserted(r.map(((e,t)=>({offset:e,text:s[t].content,tokenMetadata:Ki.A.defaultTokenMetadata})))),h=n>0?i.breakOffsets[n-1]:0,u=i.breakOffsets[n];a=c.getLineContent().substring(h,u),l=c.sliceAndInflate(h,u,o),d=new Array;let g=0;for(let e=0;eu)break;if(h0?i.wrappedTextIndentLength:0,r=e+Math.max(o-h,0),s=e+Math.min(a-h,u);r!==s&&d.push(new on.Wx(r,s,t.inlineClassName,t.inlineClassNameAffectsLetterSpacing))}}g+=t}}else{const i=this.getInputStartOffsetOfOutputLineIndex(n),r=this.getInputEndOffsetOfOutputLineIndex(e,t,n),s=e.getLineTokens(t);a=e.getValueInRange({startLineNumber:t,startColumn:i+1,endLineNumber:t,endColumn:r+1}),l=s.sliceAndInflate(i,r,o),d=null}n>0&&(a=io(i.wrappedTextIndentLength)+a);const c=n>0?i.wrappedTextIndentLength+1:1,h=a.length+1,u=n+10&&(n0&&(r+=this._lineBreakData.wrappedTextIndentLength),new fe.L(e+o,r)}getViewLineNumberOfModelPosition(e,t){if(!this._isVisible)throw new Error("Not supported");return e+this._lineBreakData.getOutputPositionOfInputOffset(t-1).outputLineIndex}normalizePosition(e,t,n,i,o){if(null!==this._lineBreakData.injectionOffsets){const e=i.lineNumber-n,t=this._lineBreakData.outputPositionToOffsetInUnwrappedLine(n,i.column-1),r=this._lineBreakData.normalizeOffsetAroundInjections(t,o);if(r!==t)return this._lineBreakData.getOutputPositionOfOffsetInUnwrappedLine(r,o).toPosition(e,this._lineBreakData.wrappedTextIndentLength)}if(0===o){if(n>0&&i.column===this._getViewLineMinColumn(n))return new fe.L(i.lineNumber-1,this.getViewLineMaxColumn(e,t,n-1))}else if(1===o&&n=no.length)for(let t=1;t<=e;t++)no[t]=oo(t);return no[e]}function oo(e){return new Array(e+1).join(" ")}function ro(e,t){return null===e?t?Ji.INSTANCE:eo.INSTANCE:new to(e,t)}class so{constructor(e){this._lines=e}_validPosition(e){return this._lines.model.validatePosition(e)}_validRange(e){return this._lines.model.validateRange(e)}convertViewPositionToModelPosition(e){return this._validPosition(e)}convertViewRangeToModelRange(e){return this._validRange(e)}validateViewPosition(e,t){return this._validPosition(t)}validateViewRange(e,t){return this._validRange(t)}convertModelPositionToViewPosition(e){return this._validPosition(e)}convertModelRangeToViewRange(e){return this._validRange(e)}modelPositionIsVisible(e){const t=this._lines.model.getLineCount();return!(e.lineNumber<1||e.lineNumber>t)}getModelLineViewLineCount(e){return 1}}class ao{constructor(e){this.model=e}dispose(){}createCoordinatesConverter(){return new so(this)}getHiddenAreas(){return[]}setHiddenAreas(e){return!1}setTabSize(e){return!1}setWrappingSettings(e,t,n,i){return!1}createLineBreaksComputer(){let e=[];return{addRequest:(t,n,i)=>{e.push(null)},finalize:()=>e}}onModelFlushed(){}onModelLinesDeleted(e,t,n){return new _i(t,n)}onModelLinesInserted(e,t,n,i){return new bi(t,n)}onModelLineChanged(e,t,n){return[!1,new fi(t,t),null,null]}acceptVersionId(e){}getViewLineCount(){return this.model.getLineCount()}getActiveIndentGuide(e,t,n){return{startLineNumber:e,endLineNumber:e,indent:0}}getViewLinesIndentGuides(e,t){const n=t-e+1;let i=new Array(n);for(let e=0;e=t)return void(n>r&&(o[o.length-1]=n));o.push(i,t,n)}else this.result[e]=[i,t,n]}}class co{constructor(e,t,n,i,o){this.editorId=e,this.model=t,this.configuration=n,this._linesCollection=i,this._coordinatesConverter=o,this._decorationsCache=Object.create(null),this._cachedModelDecorationsResolver=null,this._cachedModelDecorationsResolverViewRange=null}_clearCachedModelDecorationsResolver(){this._cachedModelDecorationsResolver=null,this._cachedModelDecorationsResolverViewRange=null}dispose(){this._decorationsCache=Object.create(null),this._clearCachedModelDecorationsResolver()}reset(){this._decorationsCache=Object.create(null),this._clearCachedModelDecorationsResolver()}onModelDecorationsChanged(){this._decorationsCache=Object.create(null),this._clearCachedModelDecorationsResolver()}onLineMappingChanged(){this._decorationsCache=Object.create(null),this._clearCachedModelDecorationsResolver()}_getOrCreateViewModelDecoration(e){const t=e.id;let n=this._decorationsCache[t];if(!n){const i=e.range,o=e.options;let r;if(o.isWholeLine){const e=this._coordinatesConverter.convertModelPositionToViewPosition(new fe.L(i.startLineNumber,1),0),t=this._coordinatesConverter.convertModelPositionToViewPosition(new fe.L(i.endLineNumber,this.model.getLineMaxColumn(i.endLineNumber)),1);r=new _e.e(e.lineNumber,e.column,t.lineNumber,t.column)}else r=this._coordinatesConverter.convertModelRangeToViewRange(i,1);n=new on.$l(r,o),this._decorationsCache[t]=n}return n}getDecorationsViewportData(e){let t=null!==this._cachedModelDecorationsResolver;return t=t&&e.equalsRange(this._cachedModelDecorationsResolverViewRange),t||(this._cachedModelDecorationsResolver=this._getDecorationsViewportData(e),this._cachedModelDecorationsResolverViewRange=e),this._cachedModelDecorationsResolver}_getDecorationsViewportData(e){const t=this._linesCollection.getDecorationsInRange(e,this.editorId,(0,re.$J)(this.configuration.options)),n=e.startLineNumber,i=e.endLineNumber;let o=[],r=0,s=[];for(let e=n;e<=i;e++)s[e-n]=[];for(let e=0,a=t.length;ethis.tokenizeViewport()),50)),this._updateConfigurationViewLineCount=this._register(new B.pY((()=>this._updateConfigurationViewLineCountNow()),0)),this._hasFocus=!1,this._viewportStartLine=-1,this._viewportStartLineTrackedRange=null,this._viewportStartLineDelta=0,this.model.isTooLargeForTokenization())this._lines=new ao(this.model);else{const e=this._configuration.options,t=e.get(41),n=e.get(123),r=e.get(130),s=e.get(122);this._lines=new Xi(this._editorId,this.model,i,o,t,this.model.getOptions().tabSize,n,r.wrappingColumn,s)}this.coordinatesConverter=this._lines.createCoordinatesConverter(),this._cursor=this._register(new Oi(n,this,this.coordinatesConverter,this.cursorConfig)),this.viewLayout=this._register(new Zi(this._configuration,this.getLineCount(),r)),this._register(this.viewLayout.onDidScroll((e=>{e.scrollTopChanged&&this._tokenizeViewportSoon.schedule(),this._eventDispatcher.emitSingleViewEvent(new vi(e)),this._eventDispatcher.emitOutgoingEvent(new Ni(e.oldScrollWidth,e.oldScrollLeft,e.oldScrollHeight,e.oldScrollTop,e.scrollWidth,e.scrollLeft,e.scrollHeight,e.scrollTop))}))),this._register(this.viewLayout.onDidContentSizeChange((e=>{this._eventDispatcher.emitOutgoingEvent(e)}))),this._decorations=new co(this._editorId,this.model,this._configuration,this._lines,this.coordinatesConverter),this._registerModelEvents(),this._register(this._configuration.onDidChangeFast((e=>{try{const t=this._eventDispatcher.beginEmitViewEvents();this._onConfigurationChanged(t,e)}finally{this._eventDispatcher.endEmitViewEvents()}}))),this._register(nn.getInstance().onDidChange((()=>{this._eventDispatcher.emitSingleViewEvent(new Ai)}))),this._updateConfigurationViewLineCountNow()}dispose(){super.dispose(),this._decorations.dispose(),this._lines.dispose(),this.invalidateMinimapColorCache(),this._viewportStartLineTrackedRange=this.model._setTrackedRange(this._viewportStartLineTrackedRange,null,1),this._eventDispatcher.dispose()}createLineBreaksComputer(){return this._lines.createLineBreaksComputer()}addViewEventHandler(e){this._eventDispatcher.addViewEventHandler(e)}removeViewEventHandler(e){this._eventDispatcher.removeViewEventHandler(e)}_updateConfigurationViewLineCountNow(){this._configuration.setViewLineCount(this._lines.getViewLineCount())}tokenizeViewport(){const e=this.viewLayout.getLinesViewportData(),t=this.coordinatesConverter.convertViewPositionToModelPosition(new fe.L(e.startLineNumber,1)),n=this.coordinatesConverter.convertViewPositionToModelPosition(new fe.L(e.endLineNumber,1));this.model.tokenizeViewport(t.lineNumber,n.lineNumber)}setHasFocus(e){this._hasFocus=e,this._cursor.setHasFocus(e),this._eventDispatcher.emitSingleViewEvent(new gi(e)),this._eventDispatcher.emitOutgoingEvent(new Ei(!e,e))}onCompositionStart(){this._eventDispatcher.emitSingleViewEvent(new ai)}onCompositionEnd(){this._eventDispatcher.emitSingleViewEvent(new li)}onDidColorThemeChange(){this._eventDispatcher.emitSingleViewEvent(new wi)}_onConfigurationChanged(e,t){let n=null;if(-1!==this._viewportStartLine){let e=new fe.L(this._viewportStartLine,this.getLineMinColumn(this._viewportStartLine));n=this.coordinatesConverter.convertViewPositionToModelPosition(e)}let i=!1;const o=this._configuration.options,r=o.get(41),s=o.get(123),a=o.get(130),l=o.get(122);if(this._lines.setWrappingSettings(r,s,a.wrappingColumn,l)&&(e.emitViewEvent(new ui),e.emitViewEvent(new mi),e.emitViewEvent(new hi(null)),this._cursor.onLineMappingChanged(e),this._decorations.onLineMappingChanged(),this.viewLayout.onFlushed(this.getLineCount()),0!==this.viewLayout.getCurrentScrollTop()&&(i=!0),this._updateConfigurationViewLineCount.schedule()),t.hasChanged(79)&&(this._decorations.reset(),e.emitViewEvent(new hi(null))),e.emitViewEvent(new di(t)),this.viewLayout.onConfigurationChanged(t),i&&n){const e=this.coordinatesConverter.convertModelPositionToViewPosition(n),t=this.viewLayout.getVerticalOffsetForLineNumber(e.lineNumber);this.viewLayout.setScrollPosition({scrollTop:t+this._viewportStartLineDelta},1)}be.LM.shouldRecreate(t)&&(this.cursorConfig=new be.LM(this.model.getLanguageIdentifier(),this.model.getOptions(),this._configuration),this._cursor.updateConfiguration(this.cursorConfig))}_registerModelEvents(){this._register(this.model.onDidChangeContentOrInjectedText((e=>{try{const t=this._eventDispatcher.beginEmitViewEvents();let n=!1,i=!1;const o=e.changes,r=e instanceof si.dQ?e.versionId:null,s=this._lines.createLineBreaksComputer();for(const e of o)switch(e.changeType){case 4:for(let t=0;t!e.ownerId||e.ownerId===this._editorId))),s.addRequest(n,i,null)}break;case 2:{let t=null;e.injectedText&&(t=e.injectedText.filter((e=>!e.ownerId||e.ownerId===this._editorId))),s.addRequest(e.detail,t,null);break}}const a=s.finalize();let l=0;for(const e of o)switch(e.changeType){case 1:this._lines.onModelFlushed(),t.emitViewEvent(new ui),this._decorations.reset(),this.viewLayout.onFlushed(this.getLineCount()),n=!0;break;case 3:{const i=this._lines.onModelLinesDeleted(r,e.fromLineNumber,e.toLineNumber);null!==i&&(t.emitViewEvent(i),this.viewLayout.onLinesDeleted(i.fromLineNumber,i.toLineNumber)),n=!0;break}case 4:{const i=a.slice(l,l+e.detail.length);l+=e.detail.length;const o=this._lines.onModelLinesInserted(r,e.fromLineNumber,e.toLineNumber,i);null!==o&&(t.emitViewEvent(o),this.viewLayout.onLinesInserted(o.fromLineNumber,o.toLineNumber)),n=!0;break}case 2:{const n=a[l];l++;const[o,s,d,c]=this._lines.onModelLineChanged(r,e.lineNumber,n);i=o,s&&t.emitViewEvent(s),d&&(t.emitViewEvent(d),this.viewLayout.onLinesInserted(d.fromLineNumber,d.toLineNumber)),c&&(t.emitViewEvent(c),this.viewLayout.onLinesDeleted(c.fromLineNumber,c.toLineNumber));break}}null!==r&&this._lines.acceptVersionId(r),this.viewLayout.onHeightMaybeChanged(),!n&&i&&(t.emitViewEvent(new mi),t.emitViewEvent(new hi(null)),this._cursor.onLineMappingChanged(t),this._decorations.onLineMappingChanged())}finally{this._eventDispatcher.endEmitViewEvents()}if(this._viewportStartLine=-1,this._configuration.setMaxLineNumber(this.model.getLineCount()),this._updateConfigurationViewLineCountNow(),!this._hasFocus&&this.model.getAttachedEditorCount()>=2&&this._viewportStartLineTrackedRange){const e=this.model._getTrackedRange(this._viewportStartLineTrackedRange);if(e){const t=this.coordinatesConverter.convertModelPositionToViewPosition(e.getStartPosition()),n=this.viewLayout.getVerticalOffsetForLineNumber(t.lineNumber);this.viewLayout.setScrollPosition({scrollTop:n+this._viewportStartLineDelta},1)}}try{const t=this._eventDispatcher.beginEmitViewEvents();this._cursor.onModelContentChanged(t,e)}finally{this._eventDispatcher.endEmitViewEvents()}}))),this._register(this.model.onDidChangeTokens((e=>{let t=[];for(let n=0,i=e.ranges.length;n{this._eventDispatcher.emitSingleViewEvent(new pi),this.cursorConfig=new be.LM(this.model.getLanguageIdentifier(),this.model.getOptions(),this._configuration),this._cursor.updateConfiguration(this.cursorConfig)}))),this._register(this.model.onDidChangeLanguage((e=>{this.cursorConfig=new be.LM(this.model.getLanguageIdentifier(),this.model.getOptions(),this._configuration),this._cursor.updateConfiguration(this.cursorConfig)}))),this._register(this.model.onDidChangeOptions((e=>{if(this._lines.setTabSize(this.model.getOptions().tabSize)){try{const e=this._eventDispatcher.beginEmitViewEvents();e.emitViewEvent(new ui),e.emitViewEvent(new mi),e.emitViewEvent(new hi(null)),this._cursor.onLineMappingChanged(e),this._decorations.onLineMappingChanged(),this.viewLayout.onFlushed(this.getLineCount())}finally{this._eventDispatcher.endEmitViewEvents()}this._updateConfigurationViewLineCount.schedule()}this.cursorConfig=new be.LM(this.model.getLanguageIdentifier(),this.model.getOptions(),this._configuration),this._cursor.updateConfiguration(this.cursorConfig)}))),this._register(this.model.onDidChangeDecorations((e=>{this._decorations.onModelDecorationsChanged(),this._eventDispatcher.emitSingleViewEvent(new hi(e))})))}setHiddenAreas(e){try{const t=this._eventDispatcher.beginEmitViewEvents();this._lines.setHiddenAreas(e)&&(t.emitViewEvent(new ui),t.emitViewEvent(new mi),t.emitViewEvent(new hi(null)),this._cursor.onLineMappingChanged(t),this._decorations.onLineMappingChanged(),this.viewLayout.onFlushed(this.getLineCount()),this.viewLayout.onHeightMaybeChanged())}finally{this._eventDispatcher.endEmitViewEvents()}this._updateConfigurationViewLineCount.schedule()}getVisibleRangesPlusViewportAboveBelow(){const e=this._configuration.options.get(129),t=this._configuration.options.get(57),n=Math.max(20,Math.round(e.height/t)),i=this.viewLayout.getLinesViewportData(),o=Math.max(1,i.completelyVisibleStartLineNumber-n),r=Math.min(this.getLineCount(),i.completelyVisibleEndLineNumber+n);return this._toModelVisibleRanges(new _e.e(o,this.getLineMinColumn(o),r,this.getLineMaxColumn(r)))}getVisibleRanges(){const e=this.getCompletelyVisibleViewRange();return this._toModelVisibleRanges(e)}_toModelVisibleRanges(e){const t=this.coordinatesConverter.convertViewRangeToModelRange(e),n=this._lines.getHiddenAreas();if(0===n.length)return[t];let i=[],o=0,r=t.startLineNumber,s=t.startColumn,a=t.endLineNumber,l=t.endColumn;for(let e=0,t=n.length;ea||(re.toInlineDecoration(t)))]),new on.wA(r.minColumn,r.maxColumn,r.content,r.continuesWithWrappedLine,n,i,r.tokens,s,o,r.startVisibleColumn)}getViewLineData(e){return this._lines.getViewLineData(e)}getMinimapLinesRenderingData(e,t,n){let i=this._lines.getViewLinesData(e,t,n);return new on.ud(this.getTabSize(),i)}getAllOverviewRulerDecorations(e){return this._lines.getAllOverviewRulerDecorations(this._editorId,(0,re.$J)(this._configuration.options),e)}invalidateOverviewRulerColorCache(){const e=this.model.getOverviewRulerDecorations();for(const t of e){const e=t.options.overviewRuler;e&&e.invalidateCachedColor()}}invalidateMinimapColorCache(){const e=this.model.getAllDecorations();for(const t of e){const e=t.options.minimap;e&&e.invalidateCachedColor()}}getValueInRange(e,t){const n=this.coordinatesConverter.convertViewRangeToModelRange(e);return this.model.getValueInRange(n,t)}getModelLineMaxColumn(e){return this.model.getLineMaxColumn(e)}validateModelPosition(e){return this.model.validatePosition(e)}validateModelRange(e){return this.model.validateRange(e)}deduceModelPositionRelativeToViewPosition(e,t,n){const i=this.coordinatesConverter.convertViewPositionToModelPosition(e);2===this.model.getEOL().length&&(t<0?t-=n:t+=n);const o=this.model.getOffsetAt(i)+t;return this.model.getPositionAt(o)}getEOL(){return this.model.getEOL()}getPlainTextToCopy(e,t,n){const i=n?"\r\n":this.model.getEOL();(e=e.slice(0)).sort(_e.e.compareRangesUsingStarts);let o=!1,r=!1;for(const t of e)t.isEmpty()?o=!0:r=!0;if(!r){if(!t)return"";const n=e.map((e=>e.startLineNumber));let o="";for(let e=0;e0&&n[e-1]===n[e]||(o+=this.model.getLineContent(n[e])+i);return o}if(o&&t){let t=[],i=0;for(const o of e){const e=o.startLineNumber;o.isEmpty()?e!==i&&t.push(this.model.getLineContent(e)):t.push(this.model.getValueInRange(o,n?2:0)),i=e}return 1===t.length?t[0]:t}let s=[];for(const t of e)t.isEmpty()||s.push(this.model.getValueInRange(t,n?2:0));return 1===s.length?s[0]:s}getRichTextToCopy(e,t){const n=this.model.getLanguageIdentifier();if(1===n.id)return null;if(1!==e.length)return null;let i=e[0];if(i.isEmpty()){if(!t)return null;const e=i.startLineNumber;i=new _e.e(e,this.model.getLineMinColumn(e),e,this.model.getLineMaxColumn(e))}const o=this._configuration.options.get(41),r=this._getColorMap();let s;return/[:;\\\/<>]/.test(o.fontFamily)||o.fontFamily===re.hL.fontFamily?s=re.hL.fontFamily:(s=o.fontFamily,s=s.replace(/"/g,"'"),/[,']/.test(s)||/[+ ]/.test(s)&&(s=`'${s}'`),s=`${s}, ${re.hL.fontFamily}`),{mode:n.language,html:`
    `+this._getHTMLToCopy(i,r)+"
    "}}_getHTMLToCopy(e,t){const n=e.startLineNumber,i=e.startColumn,o=e.endLineNumber,r=e.endColumn,s=this.getTabSize();let a="";for(let e=n;e<=o;e++){const l=this.model.getLineTokens(e),d=l.getLineContent(),c=e===n?i-1:0,h=e===o?r-1:d.length;a+=""===d?"
    ":(0,Wi.F)(d,l.inflate(),t,c,h,s,T.ED)}return a}_getColorMap(){let e=tn.RW.getColorMap(),t=["#000000"];if(e)for(let n=1,i=e.length;nthis._cursor.setStates(i,e,t,n)))}getCursorColumnSelectData(){return this._cursor.getCursorColumnSelectData()}getCursorAutoClosedCharacters(){return this._cursor.getAutoClosedCharacters()}setCursorColumnSelectData(e){this._cursor.setCursorColumnSelectData(e)}getPrevEditOperationType(){return this._cursor.getPrevEditOperationType()}setPrevEditOperationType(e){this._cursor.setPrevEditOperationType(e)}getSelection(){return this._cursor.getSelection()}getSelections(){return this._cursor.getSelections()}getPosition(){return this._cursor.getPrimaryCursorState().modelState.position}setSelections(e,t,n=0){this._withViewEventsCollector((i=>this._cursor.setSelections(i,e,t,n)))}saveCursorState(){return this._cursor.saveState()}restoreCursorState(e){this._withViewEventsCollector((t=>this._cursor.restoreState(t,e)))}_executeCursorEdit(e){this._cursor.context.cursorConfig.readOnly?this._eventDispatcher.emitOutgoingEvent(new Mi):this._withViewEventsCollector(e)}executeEdits(e,t,n){this._executeCursorEdit((i=>this._cursor.executeEdits(i,e,t,n)))}startComposition(){this._cursor.setIsDoingComposition(!0),this._executeCursorEdit((e=>this._cursor.startComposition(e)))}endComposition(e){this._cursor.setIsDoingComposition(!1),this._executeCursorEdit((t=>this._cursor.endComposition(t,e)))}type(e,t){this._executeCursorEdit((n=>this._cursor.type(n,e,t)))}compositionType(e,t,n,i,o){this._executeCursorEdit((r=>this._cursor.compositionType(r,e,t,n,i,o)))}paste(e,t,n,i){this._executeCursorEdit((o=>this._cursor.paste(o,e,t,n,i)))}cut(e){this._executeCursorEdit((t=>this._cursor.cut(t,e)))}executeCommand(e,t){this._executeCursorEdit((n=>this._cursor.executeCommand(n,e,t)))}executeCommands(e,t){this._executeCursorEdit((n=>this._cursor.executeCommands(n,e,t)))}revealPrimaryCursor(e,t){this._withViewEventsCollector((n=>this._cursor.revealPrimary(n,e,t,0)))}revealTopMostCursor(e){const t=this._cursor.getTopMostViewPosition(),n=new _e.e(t.lineNumber,t.column,t.lineNumber,t.column);this._withViewEventsCollector((t=>t.emitViewEvent(new Ci(e,n,null,0,!0,0))))}revealBottomMostCursor(e){const t=this._cursor.getBottomMostViewPosition(),n=new _e.e(t.lineNumber,t.column,t.lineNumber,t.column);this._withViewEventsCollector((t=>t.emitViewEvent(new Ci(e,n,null,0,!0,0))))}revealRange(e,t,n,i,o){this._withViewEventsCollector((r=>r.emitViewEvent(new Ci(e,n,null,i,t,o))))}getVerticalOffsetForLineNumber(e){return this.viewLayout.getVerticalOffsetForLineNumber(e)}getScrollTop(){return this.viewLayout.getCurrentScrollTop()}setScrollTop(e,t){this.viewLayout.setScrollPosition({scrollTop:e},t)}setScrollPosition(e,t){this.viewLayout.setScrollPosition(e,t)}deltaScrollNow(e,t){this.viewLayout.deltaScrollNow(e,t)}changeWhitespace(e){this.viewLayout.changeWhitespace(e)&&(this._eventDispatcher.emitSingleViewEvent(new Si),this._eventDispatcher.emitOutgoingEvent(new Di))}setMaxLineWidth(e){this.viewLayout.setMaxLineWidth(e)}_withViewEventsCollector(e){try{e(this._eventDispatcher.beginEmitViewEvents())}finally{this._eventDispatcher.endEmitViewEvents()}}normalizePosition(e,t){return this._lines.normalizePosition(e,t)}getLineIndentColumn(e){return this._lines.getLineIndentColumn(e)}}var uo=n(4565),go=n(8819),po=n(2065),mo=n(972),fo=n(9422),_o=n(1106),bo=n(8401),Co=n(4906);class vo extends Co.N{constructor(e,t){super(0);for(let t=0;t=0&&e<256?this._asciiMap[e]:e>=12352&&e<=12543||e>=13312&&e<=19903||e>=19968&&e<=40959?3:this._map.get(e)||this._defaultValue}}let wo=[],yo=[];class Ao{constructor(e,t){this.classifier=new vo(e,t)}static create(e){return new Ao(e.get(118),e.get(117))}createLineBreaksComputer(e,t,n,i){t|=0,n=+n;const o=[],r=[],s=[];return{addRequest:(e,t,n)=>{o.push(e),r.push(t),s.push(n)},finalize:()=>{const a=e.typicalFullwidthCharacterWidth/e.typicalHalfwidthCharacterWidth;let l=[];for(let e=0,d=o.length;e=0){let e=Math.abs(d[C]-_);for(;C+1=e)break;e=t,C++}}for(;Ct&&(t=m,o=f);let s=0,c=0,v=0,w=0;if(o<=_){let f=o,b=0===t?0:n.charCodeAt(t-1),C=0===t?0:e.get(b),y=!0;for(let o=t;om&&Eo(0,C,a,l)&&(s=t,c=f),f+=d,f>_){t>m?(v=t,w=f-d):(v=o+1,w=f),f-c>h&&(s=0),y=!1;break}b=a,C=l}if(y){p>0&&(u[p]=l[l.length-1],g[p]=d[l.length-1],p++);break}}if(0===s){let a=o,l=n.charCodeAt(t),d=e.get(l),u=!1;for(let i=t-1;i>=m;i--){const t=i+1,o=n.charCodeAt(i);if(9===o){u=!0;break}let g,p;if(je.YK(o)?(i--,g=0,p=2):(g=e.get(o),p=je.K7(o)?r:1),a<=_){if(0===v&&(v=t,w=a),a<=_-h)break;if(Eo(0,g,l,d)){s=t,c=a;break}}a-=p,l=o,d=g}if(0!==s){const e=h-(w-c);if(e<=i){const t=n.charCodeAt(v);let o;o=je.ZG(t)?2:ko(t,w,i,r),e-o<0&&(s=0)}}if(u){C--;continue}}if(0===s&&(s=v,c=w),s<=m){const e=n.charCodeAt(m);je.ZG(e)?(s=m+2,c=f+2):(s=m+1,c=f+ko(e,f,i,r))}for(m=s,u[p]=s,f=c,g[p]=c,p++,_=c+h;C<0||C=y)break;y=e,C++}}return 0===p?null:(u.length=p,g.length=p,wo=t.breakOffsets,yo=t.breakOffsetsVisibleColumn,t.breakOffsets=u,t.breakOffsetsVisibleColumn=g,t.wrappedTextIndentLength=c,t)}function xo(e,t,n,i,o,r,s){const a=si.gk.applyInjectedText(t,n);let l,d;if(n&&n.length>0?(l=n.map((e=>e.options)),d=n.map((e=>e.column-1))):(l=null,d=null),-1===o)return l?new on.le([a.length],[],0,d,l):null;const c=a.length;if(c<=1)return l?new on.le([a.length],[],0,d,l):null;const h=No(a,i,o,r,s),u=o-h;let g=[],p=[],m=0,f=0,_=0,b=o,C=a.charCodeAt(0),v=e.get(C),w=ko(C,0,i,r),y=1;je.ZG(C)&&(w+=1,C=a.charCodeAt(1),v=e.get(C),y++);for(let t=y;tb&&((0===f||w-_>u)&&(f=n,_=w-l),g[m]=f,p[m]=_,m++,b=_+u,f=0),C=o,v=s}return 0!==m||n&&0!==n.length?(g[m]=c,p[m]=w,new on.le(g,p,h,d,l)):null}function ko(e,t,n,i){return 9===e?n-t%n:je.K7(e)||e<32?i:1}function Lo(e,t){return t-e%t}function Eo(e,t,n,i){return 32!==n&&(2===t||3===t&&2!==i||1===i||3===i&&1!==t)}function No(e,t,n,i,o){let r=0;if(0!==o){const s=je.LC(e);if(-1!==s){for(let n=0;nn&&(r=0)}}return r}var Do;const Io=null===(Do=window.trustedTypes)||void 0===Do?void 0:Do.createPolicy("domLineBreaksComputer",{createHTML:e=>e});class Mo{static create(){return new Mo}constructor(){}createLineBreaksComputer(e,t,n,i){t|=0,n=+n;let o=[],r=[];return{addRequest:(e,t,n)=>{o.push(e),r.push(t)},finalize:()=>function(e,t,n,i,o,r){var s;function a(t){const n=r[t];if(n){const i=si.gk.applyInjectedText(e[t],n),o=n.map((e=>e.options)),r=n.map((e=>e.column-1));return new on.le([i.length],[],0,r,o)}return null}if(-1===i){const t=[];for(let n=0,i=e.length;nl?(a=0,d=0):f=l-e}const _=s.substr(a),b=To(_,d,n,f,c);h[i]=a,u[i]=d,g[i]=_,p[i]=b[0],m[i]=b[1]}const f=c.build(),_=null!==(s=null==Io?void 0:Io.createHTML(f))&&void 0!==s?s:f;d.innerHTML=_,d.style.position="absolute",d.style.top="10000",d.style.wordWrap="break-word",document.body.appendChild(d);let b=document.createRange();const C=Array.prototype.slice.call(d.children,0);let v=[];for(let t=0;te.options)),d=c.map((e=>e.column-1))):(l=null,d=null),v[t]=new on.le(e,s,i,d,l)}return document.body.removeChild(d),v}(o,e,t,n,i,r)}}}function To(e,t,n,i,o){o.appendASCIIString('
    ');const r=e.length;let s=t,a=0,l=[],d=[],c=0");for(let t=0;t"),l[t]=a,d[t]=s;const i=c;c=t+1"),l[e.length]=a,d[e.length]=s,o.appendASCIIString("
    "),[l,d]}function Ro(e,t,n,i){if(n.length<=1)return null;const o=Array.prototype.slice.call(t.children,0),r=[];try{Oo(e,o,i,0,null,n.length-1,null,r)}catch(e){return console.log(e),null}return 0===r.length?null:(r.push(n.length),r)}function Oo(e,t,n,i,o,r,s,a){if(i===r)return;if(o=o||Bo(e,t,n[i],n[i+1]),s=s||Bo(e,t,n[r],n[r+1]),Math.abs(o[0].top-s[0].top)<=.1)return;if(i+1===r)return void a.push(r);const l=i+(r-i)/2|0,d=Bo(e,t,n[l],n[l+1]);Oo(e,t,n,i,o,l,d,a),Oo(e,t,n,l,d,r,s,a)}function Bo(e,t,n,i){return e.setStart(t[n/16384|0].firstChild,n%16384),e.setEnd(t[i/16384|0].firstChild,i%16384),e.getClientRects()}var Po=n(5795),Fo=function(e,t){return function(n,i){t(n,i,e)}};let Wo=0;class zo{constructor(e,t,n,i,o){this.model=e,this.viewModel=t,this.view=n,this.hasRealView=i,this.listenersToRemove=o}dispose(){(0,k.B9)(this.listenersToRemove),this.model.onBeforeDetached(),this.hasRealView&&this.view.dispose(),this.viewModel.dispose()}}let Vo=class e extends k.JT{constructor(e,t,n,i,r,s,a,l,d,c){super(),this._onDidDispose=this._register(new x.Q5),this.onDidDispose=this._onDidDispose.event,this._onDidChangeModelContent=this._register(new x.Q5),this.onDidChangeModelContent=this._onDidChangeModelContent.event,this._onDidChangeModelLanguage=this._register(new x.Q5),this.onDidChangeModelLanguage=this._onDidChangeModelLanguage.event,this._onDidChangeModelLanguageConfiguration=this._register(new x.Q5),this.onDidChangeModelLanguageConfiguration=this._onDidChangeModelLanguageConfiguration.event,this._onDidChangeModelOptions=this._register(new x.Q5),this.onDidChangeModelOptions=this._onDidChangeModelOptions.event,this._onDidChangeModelDecorations=this._register(new x.Q5),this.onDidChangeModelDecorations=this._onDidChangeModelDecorations.event,this._onDidChangeConfiguration=this._register(new x.Q5),this.onDidChangeConfiguration=this._onDidChangeConfiguration.event,this._onDidChangeModel=this._register(new x.Q5),this.onDidChangeModel=this._onDidChangeModel.event,this._onDidChangeCursorPosition=this._register(new x.Q5),this.onDidChangeCursorPosition=this._onDidChangeCursorPosition.event,this._onDidChangeCursorSelection=this._register(new x.Q5),this.onDidChangeCursorSelection=this._onDidChangeCursorSelection.event,this._onDidAttemptReadOnlyEdit=this._register(new x.Q5),this.onDidAttemptReadOnlyEdit=this._onDidAttemptReadOnlyEdit.event,this._onDidLayoutChange=this._register(new x.Q5),this.onDidLayoutChange=this._onDidLayoutChange.event,this._editorTextFocus=this._register(new Ho),this.onDidFocusEditorText=this._editorTextFocus.onDidChangeToTrue,this.onDidBlurEditorText=this._editorTextFocus.onDidChangeToFalse,this._editorWidgetFocus=this._register(new Ho),this.onDidFocusEditorWidget=this._editorWidgetFocus.onDidChangeToTrue,this.onDidBlurEditorWidget=this._editorWidgetFocus.onDidChangeToFalse,this._onWillType=this._register(new x.Q5),this.onWillType=this._onWillType.event,this._onDidType=this._register(new x.Q5),this.onDidType=this._onDidType.event,this._onDidCompositionStart=this._register(new x.Q5),this.onDidCompositionStart=this._onDidCompositionStart.event,this._onDidCompositionEnd=this._register(new x.Q5),this.onDidCompositionEnd=this._onDidCompositionEnd.event,this._onDidPaste=this._register(new x.Q5),this.onDidPaste=this._onDidPaste.event,this._onMouseUp=this._register(new x.Q5),this.onMouseUp=this._onMouseUp.event,this._onMouseDown=this._register(new x.Q5),this.onMouseDown=this._onMouseDown.event,this._onMouseDrag=this._register(new x.Q5),this.onMouseDrag=this._onMouseDrag.event,this._onMouseDrop=this._register(new x.Q5),this.onMouseDrop=this._onMouseDrop.event,this._onMouseDropCanceled=this._register(new x.Q5),this.onMouseDropCanceled=this._onMouseDropCanceled.event,this._onContextMenu=this._register(new x.Q5),this.onContextMenu=this._onContextMenu.event,this._onMouseMove=this._register(new x.Q5),this.onMouseMove=this._onMouseMove.event,this._onMouseLeave=this._register(new x.Q5),this.onMouseLeave=this._onMouseLeave.event,this._onMouseWheel=this._register(new x.Q5),this.onMouseWheel=this._onMouseWheel.event,this._onKeyUp=this._register(new x.Q5),this.onKeyUp=this._onKeyUp.event,this._onKeyDown=this._register(new x.Q5),this.onKeyDown=this._onKeyDown.event,this._onDidContentSizeChange=this._register(new x.Q5),this.onDidContentSizeChange=this._onDidContentSizeChange.event,this._onDidScrollChange=this._register(new x.Q5),this.onDidScrollChange=this._onDidScrollChange.event,this._onDidChangeViewZones=this._register(new x.Q5),this.onDidChangeViewZones=this._onDidChangeViewZones.event;const h=Object.assign({},t);let u;this._domElement=e,this._overflowWidgetsDomNode=h.overflowWidgetsDomNode,delete h.overflowWidgetsDomNode,this._id=++Wo,this._decorationTypeKeysToIds={},this._decorationTypeSubtypes={},this.isSimpleWidget=n.isSimpleWidget||!1,this._telemetryData=n.telemetryData,this._configuration=this._register(this._createConfiguration(h,c)),this._register(this._configuration.onDidChange((e=>{this._onDidChangeConfiguration.fire(e);const t=this._configuration.options;if(e.hasChanged(129)){const e=t.get(129);this._onDidLayoutChange.fire(e)}}))),this._contextKeyService=this._register(a.createScoped(this._domElement)),this._notificationService=d,this._codeEditorService=r,this._commandService=s,this._themeService=l,this._register(new jo(this,this._contextKeyService)),this._register(new $o(this,this._contextKeyService)),this._instantiationService=i.createChild(new mo.y([go.i6,this._contextKeyService])),this._modelData=null,this._contributions={},this._actions={},this._focusTracker=new Uo(e),this._register(this._focusTracker.onChange((()=>{this._editorWidgetFocus.setValue(this._focusTracker.hasFocus())}))),this._contentWidgets={},this._overlayWidgets={},u=Array.isArray(n.contributions)?n.contributions:o.Uc.getEditorContributions();for(const e of u)if(this._contributions[e.id])(0,S.dL)(new Error(`Cannot have two contributions with the same id ${e.id}`));else try{const t=this._instantiationService.createInstance(e.ctor,this);this._contributions[e.id]=t}catch(e){(0,S.dL)(e)}o.Uc.getEditorActions().forEach((e=>{if(this._actions[e.id])return void(0,S.dL)(new Error(`Cannot have two actions with the same id ${e.id}`));const t=new Bi.p(e.id,e.label,e.alias,(0,bo.f6)(e.precondition),(()=>this._instantiationService.invokeFunction((t=>Promise.resolve(e.runEditorCommand(t,this,null))))),this._contextKeyService);this._actions[t.id]=t})),this._codeEditorService.addCodeEditor(this)}_createConfiguration(e,t){return new E.V(this.isSimpleWidget,e,this._domElement,t)}getId(){return this.getEditorType()+":"+this._id}getEditorType(){return Pi.g.ICodeEditor}dispose(){this._codeEditorService.removeCodeEditor(this),this._focusTracker.dispose();const e=Object.keys(this._contributions);for(let t=0,n=e.length;t_e.e.lift(e))))}getVisibleColumnFromPosition(e){if(!this._modelData)return e.column;const t=this._modelData.model.validatePosition(e),n=this._modelData.model.getOptions().tabSize;return be.io.visibleColumnFromColumn(this._modelData.model.getLineContent(t.lineNumber),t.column,n)+1}getPosition(){return this._modelData?this._modelData.viewModel.getPosition():null}setPosition(e){if(this._modelData){if(!fe.L.isIPosition(e))throw new Error("Invalid arguments");this._modelData.viewModel.setSelections("api",[{selectionStartLineNumber:e.lineNumber,selectionStartColumn:e.column,positionLineNumber:e.lineNumber,positionColumn:e.column}])}}_sendRevealRange(e,t,n,i){if(!this._modelData)return;if(!_e.e.isIRange(e))throw new Error("Invalid arguments");const o=this._modelData.model.validateRange(e),r=this._modelData.viewModel.coordinatesConverter.convertModelRangeToViewRange(o);this._modelData.viewModel.revealRange("api",n,r,t,i)}revealLine(e,t=0){this._revealLine(e,0,t)}revealLineInCenter(e,t=0){this._revealLine(e,1,t)}revealLineInCenterIfOutsideViewport(e,t=0){this._revealLine(e,2,t)}revealLineNearTop(e,t=0){this._revealLine(e,5,t)}_revealLine(e,t,n){if("number"!=typeof e)throw new Error("Invalid arguments");this._sendRevealRange(new _e.e(e,1,e,1),t,!1,n)}revealPosition(e,t=0){this._revealPosition(e,0,!0,t)}revealPositionInCenter(e,t=0){this._revealPosition(e,1,!0,t)}revealPositionInCenterIfOutsideViewport(e,t=0){this._revealPosition(e,2,!0,t)}revealPositionNearTop(e,t=0){this._revealPosition(e,5,!0,t)}_revealPosition(e,t,n,i){if(!fe.L.isIPosition(e))throw new Error("Invalid arguments");this._sendRevealRange(new _e.e(e.lineNumber,e.column,e.lineNumber,e.column),t,n,i)}getSelection(){return this._modelData?this._modelData.viewModel.getSelection():null}getSelections(){return this._modelData?this._modelData.viewModel.getSelections():null}setSelection(e){const t=I.Y.isISelection(e),n=_e.e.isIRange(e);if(!t&&!n)throw new Error("Invalid arguments");if(t)this._setSelectionImpl(e);else if(n){const t={selectionStartLineNumber:e.startLineNumber,selectionStartColumn:e.startColumn,positionLineNumber:e.endLineNumber,positionColumn:e.endColumn};this._setSelectionImpl(t)}}_setSelectionImpl(e){if(!this._modelData)return;const t=new I.Y(e.selectionStartLineNumber,e.selectionStartColumn,e.positionLineNumber,e.positionColumn);this._modelData.viewModel.setSelections("api",[t])}revealLines(e,t,n=0){this._revealLines(e,t,0,n)}revealLinesInCenter(e,t,n=0){this._revealLines(e,t,1,n)}revealLinesInCenterIfOutsideViewport(e,t,n=0){this._revealLines(e,t,2,n)}revealLinesNearTop(e,t,n=0){this._revealLines(e,t,5,n)}_revealLines(e,t,n,i){if("number"!=typeof e||"number"!=typeof t)throw new Error("Invalid arguments");this._sendRevealRange(new _e.e(e,1,t,1),n,!1,i)}revealRange(e,t=0,n=!1,i=!0){this._revealRange(e,n?1:0,i,t)}revealRangeInCenter(e,t=0){this._revealRange(e,1,!0,t)}revealRangeInCenterIfOutsideViewport(e,t=0){this._revealRange(e,2,!0,t)}revealRangeNearTop(e,t=0){this._revealRange(e,5,!0,t)}revealRangeNearTopIfOutsideViewport(e,t=0){this._revealRange(e,6,!0,t)}revealRangeAtTop(e,t=0){this._revealRange(e,3,!0,t)}_revealRange(e,t,n,i){if(!_e.e.isIRange(e))throw new Error("Invalid arguments");this._sendRevealRange(_e.e.lift(e),t,n,i)}setSelections(e,t="api",n=0){if(this._modelData){if(!e||0===e.length)throw new Error("Invalid arguments");for(let t=0,n=e.length;te.isSupported())),e}getAction(e){return this._actions[e]||null}trigger(e,t,n){switch(n=n||{},t){case"compositionStart":return void this._startComposition();case"compositionEnd":return void this._endComposition(e);case"type":{const t=n;return void this._type(e,t.text||"")}case"replacePreviousChar":{const t=n;return void this._compositionType(e,t.text||"",t.replaceCharCnt||0,0,0)}case"compositionType":{const t=n;return void this._compositionType(e,t.text||"",t.replacePrevCharCnt||0,t.replaceNextCharCnt||0,t.positionDelta||0)}case"paste":{const t=n;return void this._paste(e,t.text||"",t.pasteOnNewLine||!1,t.multicursorText||null,t.mode||null)}case"cut":return void this._cut(e)}const i=this.getAction(t);i?Promise.resolve(i.run()).then(void 0,S.dL):this._modelData&&(this._triggerEditorCommand(e,t,n)||this._triggerCommand(t,n))}_triggerCommand(e,t){this._commandService.executeCommand(e,t)}_startComposition(){this._modelData&&(this._modelData.viewModel.startComposition(),this._onDidCompositionStart.fire())}_endComposition(e){this._modelData&&(this._modelData.viewModel.endComposition(e),this._onDidCompositionEnd.fire())}_type(e,t){this._modelData&&0!==t.length&&("keyboard"===e&&this._onWillType.fire(t),this._modelData.viewModel.type(t,e),"keyboard"===e&&this._onDidType.fire(t))}_compositionType(e,t,n,i,o){this._modelData&&this._modelData.viewModel.compositionType(t,n,i,o,e)}_paste(e,t,n,i,o){if(!this._modelData||0===t.length)return;const r=this._modelData.viewModel.getSelection().getStartPosition();this._modelData.viewModel.paste(t,n,i,e);const s=this._modelData.viewModel.getSelection().getStartPosition();"keyboard"===e&&this._onDidPaste.fire({range:new _e.e(r.lineNumber,r.column,s.lineNumber,s.column),mode:o})}_cut(e){this._modelData&&this._modelData.viewModel.cut(e)}_triggerEditorCommand(e,t,n){const i=o.Uc.getEditorCommand(t);return!!i&&((n=n||{}).source=e,this._instantiationService.invokeFunction((e=>{Promise.resolve(i.runEditorCommand(e,this,n)).then(void 0,S.dL)})),!0)}_getViewModel(){return this._modelData?this._modelData.viewModel:null}pushUndoStop(){return!!this._modelData&&!this._configuration.options.get(79)&&(this._modelData.model.pushStackElement(),!0)}popUndoStop(){return!!this._modelData&&!this._configuration.options.get(79)&&(this._modelData.model.popStackElement(),!0)}executeEdits(e,t,n){if(!this._modelData)return!1;if(this._configuration.options.get(79))return!1;let i;return i=n?Array.isArray(n)?()=>n:n:()=>null,this._modelData.viewModel.executeEdits(e,t,i),!0}executeCommand(e,t){this._modelData&&this._modelData.viewModel.executeCommand(t,e)}executeCommands(e,t){this._modelData&&this._modelData.viewModel.executeCommands(t,e)}changeDecorations(e){return this._modelData?this._modelData.model.changeDecorations(e,this._id):null}getLineDecorations(e){return this._modelData?this._modelData.model.getLineDecorations(e,this._id,(0,re.$J)(this._configuration.options)):null}deltaDecorations(e,t){return this._modelData?0===e.length&&0===t.length?e:this._modelData.model.deltaDecorations(e,t,this._id):[]}removeDecorations(e){const t=this._decorationTypeKeysToIds[e];t&&this.deltaDecorations(t,[]),this._decorationTypeKeysToIds.hasOwnProperty(e)&&delete this._decorationTypeKeysToIds[e],this._decorationTypeSubtypes.hasOwnProperty(e)&&delete this._decorationTypeSubtypes[e]}getLayoutInfo(){return this._configuration.options.get(129)}createOverviewRuler(e){return this._modelData&&this._modelData.hasRealView?this._modelData.view.createOverviewRuler(e):null}getContainerDomNode(){return this._domElement}getDomNode(){return this._modelData&&this._modelData.hasRealView?this._modelData.view.domNode.domNode:null}delegateVerticalScrollbarMouseDown(e){this._modelData&&this._modelData.hasRealView&&this._modelData.view.delegateVerticalScrollbarMouseDown(e)}layout(e){this._configuration.observeReferenceElement(e),this.render()}focus(){this._modelData&&this._modelData.hasRealView&&this._modelData.view.focus()}hasTextFocus(){return!(!this._modelData||!this._modelData.hasRealView)&&this._modelData.view.isFocused()}hasWidgetFocus(){return this._focusTracker&&this._focusTracker.hasFocus()}addContentWidget(e){const t={widget:e,position:e.getPosition()};this._contentWidgets.hasOwnProperty(e.getId())&&console.warn("Overwriting a content widget with the same id."),this._contentWidgets[e.getId()]=t,this._modelData&&this._modelData.hasRealView&&this._modelData.view.addContentWidget(t)}layoutContentWidget(e){const t=e.getId();if(this._contentWidgets.hasOwnProperty(t)){const n=this._contentWidgets[t];n.position=e.getPosition(),this._modelData&&this._modelData.hasRealView&&this._modelData.view.layoutContentWidget(n)}}removeContentWidget(e){const t=e.getId();if(this._contentWidgets.hasOwnProperty(t)){const e=this._contentWidgets[t];delete this._contentWidgets[t],this._modelData&&this._modelData.hasRealView&&this._modelData.view.removeContentWidget(e)}}addOverlayWidget(e){const t={widget:e,position:e.getPosition()};this._overlayWidgets.hasOwnProperty(e.getId())&&console.warn("Overwriting an overlay widget with the same id."),this._overlayWidgets[e.getId()]=t,this._modelData&&this._modelData.hasRealView&&this._modelData.view.addOverlayWidget(t)}layoutOverlayWidget(e){const t=e.getId();if(this._overlayWidgets.hasOwnProperty(t)){const n=this._overlayWidgets[t];n.position=e.getPosition(),this._modelData&&this._modelData.hasRealView&&this._modelData.view.layoutOverlayWidget(n)}}removeOverlayWidget(e){const t=e.getId();if(this._overlayWidgets.hasOwnProperty(t)){const e=this._overlayWidgets[t];delete this._overlayWidgets[t],this._modelData&&this._modelData.hasRealView&&this._modelData.view.removeOverlayWidget(e)}}changeViewZones(e){this._modelData&&this._modelData.hasRealView&&this._modelData.view.change(e)}getTargetAtClientPoint(e,t){return this._modelData&&this._modelData.hasRealView?this._modelData.view.getTargetAtClientPoint(e,t):null}getScrolledVisiblePosition(t){if(!this._modelData||!this._modelData.hasRealView)return null;const n=this._modelData.model.validatePosition(t),i=this._configuration.options,o=i.get(129);return{top:e._getVerticalOffsetForPosition(this._modelData,n.lineNumber,n.column)-this.getScrollTop(),left:this._modelData.view.getOffsetForColumn(n.lineNumber,n.column)+o.glyphMarginWidth+o.lineNumbersWidth+o.decorationsWidth-this.getScrollLeft(),height:i.get(57)}}getOffsetForColumn(e,t){return this._modelData&&this._modelData.hasRealView?this._modelData.view.getOffsetForColumn(e,t):-1}render(e=!1){this._modelData&&this._modelData.hasRealView&&this._modelData.view.render(!0,e)}setAriaOptions(e){this._modelData&&this._modelData.hasRealView&&this._modelData.view.setAriaOptions(e)}applyFontInfo(e){E.V.applyFontInfoSlow(e,this._configuration.options.get(41))}_attachModel(e){if(!e)return void(this._modelData=null);const t=[];this._domElement.setAttribute("data-mode-id",e.getLanguageIdentifier().language),this._configuration.setIsDominatedByLongLines(e.isDominatedByLongLines()),this._configuration.setMaxLineNumber(e.getLineCount()),e.onBeforeAttached();const n=new ho(this._id,this._configuration,e,Mo.create(),Ao.create(this._configuration.options),(e=>A.jL(e)));t.push(e.onDidChangeDecorations((e=>this._onDidChangeModelDecorations.fire(e)))),t.push(e.onDidChangeLanguage((t=>{this._domElement.setAttribute("data-mode-id",e.getLanguageIdentifier().language),this._onDidChangeModelLanguage.fire(t)}))),t.push(e.onDidChangeLanguageConfiguration((e=>this._onDidChangeModelLanguageConfiguration.fire(e)))),t.push(e.onDidChangeContent((e=>this._onDidChangeModelContent.fire(e)))),t.push(e.onDidChangeOptions((e=>this._onDidChangeModelOptions.fire(e)))),t.push(e.onWillDispose((()=>this.setModel(null)))),t.push(n.onEvent((e=>{switch(e.kind){case 0:this._onDidContentSizeChange.fire(e);break;case 1:this._editorTextFocus.setValue(e.hasFocus);break;case 2:this._onDidScrollChange.fire(e);break;case 3:this._onDidChangeViewZones.fire();break;case 4:this._onDidAttemptReadOnlyEdit.fire();break;case 5:{e.reachedMaxCursorCount&&this._notificationService.warn(y.N("cursors.maximum","The number of cursors has been limited to {0}.",Oi.MAX_CURSOR_COUNT));const t=[];for(let n=0,i=e.selections.length;n{this._paste("keyboard",e,t,n,i)},type:e=>{this._type("keyboard",e)},compositionType:(e,t,n,i)=>{this._compositionType("keyboard",e,t,n,i)},startComposition:()=>{this._startComposition()},endComposition:()=>{this._endComposition("keyboard")},cut:()=>{this._cut("keyboard")}}:{paste:(e,t,n,i)=>{const o={text:e,pasteOnNewLine:t,multicursorText:n,mode:i};this._commandService.executeCommand("paste",o)},type:e=>{const t={text:e};this._commandService.executeCommand("type",t)},compositionType:(e,t,n,i)=>{if(n||i){const o={text:e,replacePrevCharCnt:t,replaceNextCharCnt:n,positionDelta:i};this._commandService.executeCommand("compositionType",o)}else{const n={text:e,replaceCharCnt:t};this._commandService.executeCommand("replacePreviousChar",n)}},startComposition:()=>{this._commandService.executeCommand("compositionStart",{})},endComposition:()=>{this._commandService.executeCommand("compositionEnd",{})},cut:()=>{this._commandService.executeCommand("cut",{})}};const n=new rt(e.coordinatesConverter);return n.onKeyDown=e=>this._onKeyDown.fire(e),n.onKeyUp=e=>this._onKeyUp.fire(e),n.onContextMenu=e=>this._onContextMenu.fire(e),n.onMouseMove=e=>this._onMouseMove.fire(e),n.onMouseLeave=e=>this._onMouseLeave.fire(e),n.onMouseDown=e=>this._onMouseDown.fire(e),n.onMouseUp=e=>this._onMouseUp.fire(e),n.onMouseDrag=e=>this._onMouseDrag.fire(e),n.onMouseDrop=e=>this._onMouseDrop.fire(e),n.onMouseDropCanceled=e=>this._onMouseDropCanceled.fire(e),n.onMouseWheel=e=>this._onMouseWheel.fire(e),[new ti(t,this._configuration,this._themeService,e,n,this._overflowWidgetsDomNode),!0]}_postDetachModelCleanup(e){e&&e.removeAllDecorationsWithOwnerId(this._id)}_detachModel(){if(!this._modelData)return null;const e=this._modelData.model,t=this._modelData.hasRealView?this._modelData.view.domNode.domNode:null;return this._modelData.dispose(),this._modelData=null,this._domElement.removeAttribute("data-mode-id"),t&&this._domElement.contains(t)&&this._domElement.removeChild(t),e}_removeDecorationType(e){this._codeEditorService.removeDecorationType(e)}hasModel(){return null!==this._modelData}};Vo=function(e,t,n,i){var o,r=arguments.length,s=r<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,i);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,n,s):o(t,n))||s);return r>3&&s&&Object.defineProperty(t,n,s),s}([Fo(3,po.TG),Fo(4,N.$),Fo(5,uo.H),Fo(6,go.i6),Fo(7,Ye.XE),Fo(8,fo.lT),Fo(9,_o.F)],Vo);class Ho extends k.JT{constructor(){super(),this._onDidChangeToTrue=this._register(new x.Q5),this.onDidChangeToTrue=this._onDidChangeToTrue.event,this._onDidChangeToFalse=this._register(new x.Q5),this.onDidChangeToFalse=this._onDidChangeToFalse.event,this._value=0}setValue(e){const t=e?2:1;this._value!==t&&(this._value=t,2===this._value?this._onDidChangeToTrue.fire():1===this._value&&this._onDidChangeToFalse.fire())}}class jo extends k.JT{constructor(e,t){super(),this._editor=e,t.createKey("editorId",e.getId()),this._editorSimpleInput=Fi.u.editorSimpleInput.bindTo(t),this._editorFocus=Fi.u.focus.bindTo(t),this._textInputFocus=Fi.u.textInputFocus.bindTo(t),this._editorTextFocus=Fi.u.editorTextFocus.bindTo(t),this._editorTabMovesFocus=Fi.u.tabMovesFocus.bindTo(t),this._editorReadonly=Fi.u.readOnly.bindTo(t),this._inDiffEditor=Fi.u.inDiffEditor.bindTo(t),this._editorColumnSelection=Fi.u.columnSelection.bindTo(t),this._hasMultipleSelections=Fi.u.hasMultipleSelections.bindTo(t),this._hasNonEmptySelection=Fi.u.hasNonEmptySelection.bindTo(t),this._canUndo=Fi.u.canUndo.bindTo(t),this._canRedo=Fi.u.canRedo.bindTo(t),this._register(this._editor.onDidChangeConfiguration((()=>this._updateFromConfig()))),this._register(this._editor.onDidChangeCursorSelection((()=>this._updateFromSelection()))),this._register(this._editor.onDidFocusEditorWidget((()=>this._updateFromFocus()))),this._register(this._editor.onDidBlurEditorWidget((()=>this._updateFromFocus()))),this._register(this._editor.onDidFocusEditorText((()=>this._updateFromFocus()))),this._register(this._editor.onDidBlurEditorText((()=>this._updateFromFocus()))),this._register(this._editor.onDidChangeModel((()=>this._updateFromModel()))),this._register(this._editor.onDidChangeConfiguration((()=>this._updateFromModel()))),this._updateFromConfig(),this._updateFromSelection(),this._updateFromFocus(),this._updateFromModel(),this._editorSimpleInput.set(this._editor.isSimpleWidget)}_updateFromConfig(){const e=this._editor.getOptions();this._editorTabMovesFocus.set(e.get(128)),this._editorReadonly.set(e.get(79)),this._inDiffEditor.set(e.get(52)),this._editorColumnSelection.set(e.get(16))}_updateFromSelection(){const e=this._editor.getSelections();e?(this._hasMultipleSelections.set(e.length>1),this._hasNonEmptySelection.set(e.some((e=>!e.isEmpty())))):(this._hasMultipleSelections.reset(),this._hasNonEmptySelection.reset())}_updateFromFocus(){this._editorFocus.set(this._editor.hasWidgetFocus()&&!this._editor.isSimpleWidget),this._editorTextFocus.set(this._editor.hasTextFocus()&&!this._editor.isSimpleWidget),this._textInputFocus.set(this._editor.hasTextFocus())}_updateFromModel(){const e=this._editor.getModel();this._canUndo.set(Boolean(e&&e.canUndo())),this._canRedo.set(Boolean(e&&e.canRedo()))}}class $o extends k.JT{constructor(e,t){super(),this._editor=e,this._contextKeyService=t,this._langId=Fi.u.languageId.bindTo(t),this._hasCompletionItemProvider=Fi.u.hasCompletionItemProvider.bindTo(t),this._hasCodeActionsProvider=Fi.u.hasCodeActionsProvider.bindTo(t),this._hasCodeLensProvider=Fi.u.hasCodeLensProvider.bindTo(t),this._hasDefinitionProvider=Fi.u.hasDefinitionProvider.bindTo(t),this._hasDeclarationProvider=Fi.u.hasDeclarationProvider.bindTo(t),this._hasImplementationProvider=Fi.u.hasImplementationProvider.bindTo(t),this._hasTypeDefinitionProvider=Fi.u.hasTypeDefinitionProvider.bindTo(t),this._hasHoverProvider=Fi.u.hasHoverProvider.bindTo(t),this._hasDocumentHighlightProvider=Fi.u.hasDocumentHighlightProvider.bindTo(t),this._hasDocumentSymbolProvider=Fi.u.hasDocumentSymbolProvider.bindTo(t),this._hasReferenceProvider=Fi.u.hasReferenceProvider.bindTo(t),this._hasRenameProvider=Fi.u.hasRenameProvider.bindTo(t),this._hasSignatureHelpProvider=Fi.u.hasSignatureHelpProvider.bindTo(t),this._hasInlayHintsProvider=Fi.u.hasInlayHintsProvider.bindTo(t),this._hasDocumentFormattingProvider=Fi.u.hasDocumentFormattingProvider.bindTo(t),this._hasDocumentSelectionFormattingProvider=Fi.u.hasDocumentSelectionFormattingProvider.bindTo(t),this._hasMultipleDocumentFormattingProvider=Fi.u.hasMultipleDocumentFormattingProvider.bindTo(t),this._hasMultipleDocumentSelectionFormattingProvider=Fi.u.hasMultipleDocumentSelectionFormattingProvider.bindTo(t),this._isInWalkThrough=Fi.u.isInWalkThroughSnippet.bindTo(t);const n=()=>this._update();this._register(e.onDidChangeModel(n)),this._register(e.onDidChangeModelLanguage(n)),this._register(tn.KZ.onDidChange(n)),this._register(tn.H9.onDidChange(n)),this._register(tn.He.onDidChange(n)),this._register(tn.Ct.onDidChange(n)),this._register(tn.RN.onDidChange(n)),this._register(tn.vI.onDidChange(n)),this._register(tn.tA.onDidChange(n)),this._register(tn.xp.onDidChange(n)),this._register(tn.vH.onDidChange(n)),this._register(tn.vJ.onDidChange(n)),this._register(tn.FL.onDidChange(n)),this._register(tn.G0.onDidChange(n)),this._register(tn.Az.onDidChange(n)),this._register(tn.vN.onDidChange(n)),this._register(tn.nD.onDidChange(n)),this._register(tn.mX.onDidChange(n)),n()}dispose(){super.dispose()}reset(){this._contextKeyService.bufferChangeEvents((()=>{this._langId.reset(),this._hasCompletionItemProvider.reset(),this._hasCodeActionsProvider.reset(),this._hasCodeLensProvider.reset(),this._hasDefinitionProvider.reset(),this._hasDeclarationProvider.reset(),this._hasImplementationProvider.reset(),this._hasTypeDefinitionProvider.reset(),this._hasHoverProvider.reset(),this._hasDocumentHighlightProvider.reset(),this._hasDocumentSymbolProvider.reset(),this._hasReferenceProvider.reset(),this._hasRenameProvider.reset(),this._hasDocumentFormattingProvider.reset(),this._hasDocumentSelectionFormattingProvider.reset(),this._hasSignatureHelpProvider.reset(),this._isInWalkThrough.reset()}))}_update(){const e=this._editor.getModel();e?this._contextKeyService.bufferChangeEvents((()=>{this._langId.set(e.getLanguageIdentifier().language),this._hasCompletionItemProvider.set(tn.KZ.has(e)),this._hasCodeActionsProvider.set(tn.H9.has(e)),this._hasCodeLensProvider.set(tn.He.has(e)),this._hasDefinitionProvider.set(tn.Ct.has(e)),this._hasDeclarationProvider.set(tn.RN.has(e)),this._hasImplementationProvider.set(tn.vI.has(e)),this._hasTypeDefinitionProvider.set(tn.tA.has(e)),this._hasHoverProvider.set(tn.xp.has(e)),this._hasDocumentHighlightProvider.set(tn.vH.has(e)),this._hasDocumentSymbolProvider.set(tn.vJ.has(e)),this._hasReferenceProvider.set(tn.FL.has(e)),this._hasRenameProvider.set(tn.G0.has(e)),this._hasSignatureHelpProvider.set(tn.nD.has(e)),this._hasInlayHintsProvider.set(tn.mX.has(e)),this._hasDocumentFormattingProvider.set(tn.Az.has(e)||tn.vN.has(e)),this._hasDocumentSelectionFormattingProvider.set(tn.vN.has(e)),this._hasMultipleDocumentFormattingProvider.set(tn.Az.all(e).length+tn.vN.all(e).length>1),this._hasMultipleDocumentSelectionFormattingProvider.set(tn.vN.all(e).length>1),this._isInWalkThrough.set(e.uri.scheme===L.lg.walkThroughSnippet)})):this.reset()}}class Uo extends k.JT{constructor(e){super(),this._onChange=this._register(new x.Q5),this.onChange=this._onChange.event,this._hasFocus=!1,this._domFocusTracker=this._register(A.go(e)),this._register(this._domFocusTracker.onDidFocus((()=>{this._hasFocus=!0,this._onChange.fire(void 0)}))),this._register(this._domFocusTracker.onDidBlur((()=>{this._hasFocus=!1,this._onChange.fire(void 0)})))}hasFocus(){return this._hasFocus}}const Zo=encodeURIComponent("");function qo(e){return Zo+encodeURIComponent(e.toString())+Ko}const Yo=encodeURIComponent('');(0,Ye.Ic)(((e,t)=>{const n=e.getColor(rn.b6);n&&t.addRule(`.monaco-editor .squiggly-error { border-bottom: 4px double ${n}; }`);const i=e.getColor(rn.lX);i&&t.addRule(`.monaco-editor .squiggly-error { background: url("data:image/svg+xml,${qo(i)}") repeat-x bottom left; }`);const o=e.getColor(rn.A2);o&&t.addRule(`.monaco-editor .squiggly-error::before { display: block; content: ''; width: 100%; height: 100%; background: ${o}; }`);const r=e.getColor(rn.pW);r&&t.addRule(`.monaco-editor .squiggly-warning { border-bottom: 4px double ${r}; }`);const s=e.getColor(rn.uo);s&&t.addRule(`.monaco-editor .squiggly-warning { background: url("data:image/svg+xml,${qo(s)}") repeat-x bottom left; }`);const a=e.getColor(rn.gp);a&&t.addRule(`.monaco-editor .squiggly-warning::before { display: block; content: ''; width: 100%; height: 100%; background: ${a}; }`);const l=e.getColor(rn.T8);l&&t.addRule(`.monaco-editor .squiggly-info { border-bottom: 4px double ${l}; }`);const d=e.getColor(rn.c6);d&&t.addRule(`.monaco-editor .squiggly-info { background: url("data:image/svg+xml,${qo(d)}") repeat-x bottom left; }`);const c=e.getColor(rn.fe);c&&t.addRule(`.monaco-editor .squiggly-info::before { display: block; content: ''; width: 100%; height: 100%; background: ${c}; }`);const h=e.getColor(rn.fE);h&&t.addRule(`.monaco-editor .squiggly-hint { border-bottom: 2px dotted ${h}; }`);const u=e.getColor(rn.Du);u&&t.addRule(`.monaco-editor .squiggly-hint { background: url("data:image/svg+xml,${function(e){return Yo+encodeURIComponent(e.toString())+Go}(u)}") no-repeat bottom left; }`);const g=e.getColor(qe.zu);g&&t.addRule(`.monaco-editor.showUnused .squiggly-inline-unnecessary { opacity: ${g.rgba.a}; }`);const p=e.getColor(qe.kp);p&&t.addRule(`.monaco-editor.showUnused .squiggly-unnecessary { border-bottom: 2px dashed ${p}; }`);const m=e.getColor(rn.NO)||"inherit";t.addRule(`.monaco-editor.showDeprecated .squiggly-inline-deprecated { text-decoration: line-through; text-decoration-color: ${m}}`)}))},4527:(e,t,n)=>{"use strict";n.d(t,{H:()=>g});var i=n(6248),o=n(1640),r=n(6341),s=n(4565),a=n(8819),l=n(2065),d=n(9422),c=n(7781),h=n(1106),u=function(e,t){return function(n,i){t(n,i,e)}};let g=class extends r.Gm{constructor(e,t,n,i,o,r,s,a,l,d){super(e,Object.assign(Object.assign({},n.getRawOptions()),{overflowWidgetsDomNode:n.getOverflowWidgetsDomNode()}),{},i,o,r,s,a,l,d),this._parentEditor=n,this._overwriteOptions=t,super.updateOptions(this._overwriteOptions),this._register(n.onDidChangeConfiguration((e=>this._onParentConfigurationChanged(e))))}getParentEditor(){return this._parentEditor}_onParentConfigurationChanged(e){super.updateOptions(this._parentEditor.getRawOptions()),super.updateOptions(this._overwriteOptions)}updateOptions(e){i.jB(this._overwriteOptions,e,!0),super.updateOptions(this._overwriteOptions)}};g=function(e,t,n,i){var o,r=arguments.length,s=r<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,i);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,n,s):o(t,n))||s);return r>3&&s&&Object.defineProperty(t,n,s),s}([u(3,l.TG),u(4,o.$),u(5,s.H),u(6,a.i6),u(7,c.XE),u(8,d.lT),u(9,h.F)],g)},1329:(e,t,n)=>{"use strict";n.d(t,{T4:()=>o,OY:()=>r,Sj:()=>s,Uo:()=>a,hP:()=>l});var i=n(3860);class o{constructor(e,t,n=!1){this._range=e,this._text=t,this.insertsAutoWhitespace=n}getEditOperations(e,t){t.addTrackedEditOperation(this._range,this._text)}computeCursorState(e,t){let n=t.getInverseEditOperations()[0].range;return new i.Y(n.endLineNumber,n.endColumn,n.endLineNumber,n.endColumn)}}class r{constructor(e,t){this._range=e,this._text=t}getEditOperations(e,t){t.addTrackedEditOperation(this._range,this._text)}computeCursorState(e,t){const n=t.getInverseEditOperations()[0].range;return new i.Y(n.startLineNumber,n.startColumn,n.endLineNumber,n.endColumn)}}class s{constructor(e,t,n=!1){this._range=e,this._text=t,this.insertsAutoWhitespace=n}getEditOperations(e,t){t.addTrackedEditOperation(this._range,this._text)}computeCursorState(e,t){let n=t.getInverseEditOperations()[0].range;return new i.Y(n.startLineNumber,n.startColumn,n.startLineNumber,n.startColumn)}}class a{constructor(e,t,n,i,o=!1){this._range=e,this._text=t,this._columnDeltaOffset=i,this._lineNumberDeltaOffset=n,this.insertsAutoWhitespace=o}getEditOperations(e,t){t.addTrackedEditOperation(this._range,this._text)}computeCursorState(e,t){let n=t.getInverseEditOperations()[0].range;return new i.Y(n.endLineNumber+this._lineNumberDeltaOffset,n.endColumn+this._columnDeltaOffset,n.endLineNumber+this._lineNumberDeltaOffset,n.endColumn+this._columnDeltaOffset)}}class l{constructor(e,t,n,i=!1){this._range=e,this._text=t,this._initialSelection=n,this._forceMoveMarkers=i,this._selectionId=null}getEditOperations(e,t){t.addTrackedEditOperation(this._range,this._text,this._forceMoveMarkers),this._selectionId=t.trackSelection(this._initialSelection)}computeCursorState(e,t){return t.getTrackedSelection(this._selectionId)}}},291:(e,t,n)=>{"use strict";n.d(t,{U:()=>c});var i=n(7295),o=n(3181),r=n(4314),s=n(3860),a=n(3831);const l=Object.create(null);function d(e,t){if(t<=0)return"";l[e]||(l[e]=["",e]);const n=l[e];for(let i=n.length;i<=t;i++)n[i]=n[i-1]+e;return n[t]}class c{constructor(e,t){this._opts=t,this._selection=e,this._selectionId=null,this._useLastEditRangeForCursorEndPosition=!1,this._selectionStartColumnStaysPut=!1}static unshiftIndent(e,t,n,i,r){const s=o.io.visibleColumnFromColumn(e,t,n);if(r){const e=d(" ",i);return d(e,o.io.prevIndentTabStop(s,i)/i)}return d("\t",o.io.prevRenderTabStop(s,n)/n)}static shiftIndent(e,t,n,i,r){const s=o.io.visibleColumnFromColumn(e,t,n);if(r){const e=d(" ",i);return d(e,o.io.nextIndentTabStop(s,i)/i)}return d("\t",o.io.nextRenderTabStop(s,n)/n)}_addEditOperation(e,t,n){this._useLastEditRangeForCursorEndPosition?e.addTrackedEditOperation(t,n):e.addEditOperation(t,n)}getEditOperations(e,t){const n=this._selection.startLineNumber;let s=this._selection.endLineNumber;1===this._selection.endColumn&&n!==s&&(s-=1);const{tabSize:l,indentSize:h,insertSpaces:u}=this._opts,g=n===s;if(this._opts.useTabStops){this._selection.isEmpty()&&/^\s*$/.test(e.getLineContent(n))&&(this._useLastEditRangeForCursorEndPosition=!0);let d=0,p=0;for(let m=n;m<=s;m++,d=p){p=0;let s,f=e.getLineContent(m),_=i.LC(f);if((!this._opts.isUnshift||0!==f.length&&0!==_)&&(g||this._opts.isUnshift||0!==f.length)){if(-1===_&&(_=f.length),m>1&&o.io.visibleColumnFromColumn(f,_+1,l)%h!=0&&e.isCheapToTokenize(m-1)){let t=a.zu.getEnterAction(this._opts.autoIndent,e,new r.e(m-1,e.getLineMaxColumn(m-1),m-1,e.getLineMaxColumn(m-1)));if(t){if(p=d,t.appendText)for(let e=0,n=t.appendText.length;e{"use strict";n.d(t,{nG:()=>p,fv:()=>v,ei:()=>L,Pe:()=>E});var i=n(3580),o=n(4669),r=n(5976),s=n(6248),a=n(9488),l=n(4141),d=n(2334),c=n(7374),h=n(3193),u=n(9872),g=n(6626);const p=new class{constructor(){this._tabFocus=!1,this._onDidChangeTabFocus=new o.Q5,this.onDidChangeTabFocus=this._onDidChangeTabFocus.event}getTabFocusMode(){return this._tabFocus}setTabFocusMode(e){this._tabFocus!==e&&(this._tabFocus=e,this._onDidChangeTabFocus.fire(this._tabFocus))}},m=Object.hasOwnProperty;class f{constructor(){this._values=[]}_read(e){return this._values[e]}get(e){return this._values[e]}_write(e,t){this._values[e]=t}}class _{constructor(){this._values=[]}_read(e){return this._values[e]}_write(e,t){this._values[e]=t}}class b{static readOptions(e){const t=e,n=new _;for(const e of l.Bc){const i="_never_"===e.name?void 0:t[e.name];n._write(e.id,i)}return n}static validateOptions(e){const t=new l.hu;for(const n of l.Bc)t._write(n.id,n.validate(e._read(n.id)));return t}static computeOptions(e,t){const n=new f;for(const i of l.Bc)n._write(i.id,i.compute(t,n,e._read(i.id)));return n}static _deepEquals(e,t){if("object"!=typeof e||"object"!=typeof t)return e===t;if(Array.isArray(e)||Array.isArray(t))return!(!Array.isArray(e)||!Array.isArray(t))&&a.fS(e,t);for(let n in e)if(!b._deepEquals(e[n],t[n]))return!1;return!0}static checkEquals(e,t){const n=[];let i=!1;for(const o of l.Bc){const r=!b._deepEquals(e._read(o.id),t._read(o.id));n[o.id]=r,r&&(i=!0)}return i?new l.Bb(n):null}}function C(e){const t=s.I8(e);return function(e){const t=e.wordWrap;!0===t?e.wordWrap="on":!1===t&&(e.wordWrap="off");const n=e.lineNumbers;!0===n?e.lineNumbers="on":!1===n&&(e.lineNumbers="off"),!1===e.autoClosingBrackets&&(e.autoClosingBrackets="never",e.autoClosingQuotes="never",e.autoSurround="never"),"visible"===e.cursorBlinking&&(e.cursorBlinking="solid");const i=e.renderWhitespace;!0===i?e.renderWhitespace="boundary":!1===i&&(e.renderWhitespace="none");const o=e.renderLineHighlight;!0===o?e.renderLineHighlight="line":!1===o&&(e.renderLineHighlight="none");const r=e.acceptSuggestionOnEnter;!0===r?e.acceptSuggestionOnEnter="on":!1===r&&(e.acceptSuggestionOnEnter="off");const s=e.tabCompletion;!1===s?e.tabCompletion="off":!0===s&&(e.tabCompletion="onlySnippets");const a=e.suggest;if(a&&"object"==typeof a.filteredTypes&&a.filteredTypes){const e={method:"showMethods",function:"showFunctions",constructor:"showConstructors",deprecated:"showDeprecated",field:"showFields",variable:"showVariables",class:"showClasses",struct:"showStructs",interface:"showInterfaces",module:"showModules",property:"showProperties",event:"showEvents",operator:"showOperators",unit:"showUnits",value:"showValues",constant:"showConstants",enum:"showEnums",enumMember:"showEnumMembers",keyword:"showKeywords",text:"showWords",color:"showColors",file:"showFiles",reference:"showReferences",folder:"showFolders",typeParameter:"showTypeParameters",snippet:"showSnippets"};(0,g.E)(e,(e=>{const t=a.filteredTypes[e.key];!1===t&&(a[e.value]=t)}))}const l=e.hover;!0===l?e.hover={enabled:!0}:!1===l&&(e.hover={enabled:!1});const d=e.parameterHints;!0===d?e.parameterHints={enabled:!0}:!1===d&&(e.parameterHints={enabled:!1});const c=e.autoIndent;!0===c?e.autoIndent="full":!1===c&&(e.autoIndent="advanced");const h=e.matchBrackets;!0===h?e.matchBrackets="always":!1===h&&(e.matchBrackets="never")}(t),t}class v extends r.JT{constructor(e,t){super(),this._onDidChange=this._register(new o.Q5),this.onDidChange=this._onDidChange.event,this._onDidChangeFast=this._register(new o.Q5),this.onDidChangeFast=this._onDidChangeFast.event,this.isSimpleWidget=e,this._isDominatedByLongLines=!1,this._computeOptionsMemory=new l.LJ,this._viewLineCount=1,this._lineNumbersDigitCount=1,this._rawOptions=C(t),this._readOptions=b.readOptions(this._rawOptions),this._validatedOptions=b.validateOptions(this._readOptions),this._register(d.C.onDidChangeZoomLevel((e=>this._recomputeOptions()))),this._register(p.onDidChangeTabFocus((e=>this._recomputeOptions())))}observeReferenceElement(e){}updatePixelRatio(){}_recomputeOptions(){const e=this.options,t=this._computeInternalOptions();if(e){const n=b.checkEquals(e,t);if(null===n)return;this.options=t,this._onDidChangeFast.fire(n),this._onDidChange.fire(n)}else this.options=t}getRawOptions(){return this._rawOptions}_computeInternalOptions(){const e=this._getEnvConfiguration(),t=c.E4.createFromValidatedSettings(this._validatedOptions,e.zoomLevel,e.pixelRatio,this.isSimpleWidget),n={memory:this._computeOptionsMemory,outerWidth:e.outerWidth,outerHeight:e.outerHeight,fontInfo:this.readConfiguration(t),extraEditorClassName:e.extraEditorClassName,isDominatedByLongLines:this._isDominatedByLongLines,viewLineCount:this._viewLineCount,lineNumbersDigitCount:this._lineNumbersDigitCount,emptySelectionClipboard:e.emptySelectionClipboard,pixelRatio:e.pixelRatio,tabFocusMode:p.getTabFocusMode(),accessibilitySupport:e.accessibilitySupport};return b.computeOptions(this._validatedOptions,n)}static _subsetEquals(e,t){for(const n in t)if(m.call(t,n)){const i=t[n],o=e[n];if(o===i)continue;if(Array.isArray(o)&&Array.isArray(i)){if(!a.fS(o,i))return!1;continue}if(o&&"object"==typeof o&&i&&"object"==typeof i){if(!this._subsetEquals(o,i))return!1;continue}return!1}return!0}updateOptions(e){if(void 0===e)return;const t=C(e);v._subsetEquals(this._rawOptions,t)||(this._rawOptions=s.jB(this._rawOptions,t||{}),this._readOptions=b.readOptions(this._rawOptions),this._validatedOptions=b.validateOptions(this._readOptions),this._recomputeOptions())}setIsDominatedByLongLines(e){this._isDominatedByLongLines=e,this._recomputeOptions()}setMaxLineNumber(e){const t=v._digitCount(e);this._lineNumbersDigitCount!==t&&(this._lineNumbersDigitCount=t,this._recomputeOptions())}setViewLineCount(e){this._viewLineCount!==e&&(this._viewLineCount=e,this._recomputeOptions())}static _digitCount(e){let t=0;for(;e;)e=Math.floor(e/10),t++;return t||1}}const w=Object.freeze({id:"editor",order:5,type:"object",title:i.N("editorConfigurationTitle","Editor"),scope:5}),y=u.B.as(h.IP.Configuration),A=Object.assign(Object.assign({},w),{properties:{"editor.tabSize":{type:"number",default:l.DB.tabSize,minimum:1,markdownDescription:i.N("tabSize","The number of spaces a tab is equal to. This setting is overridden based on the file contents when `#editor.detectIndentation#` is on.")},"editor.insertSpaces":{type:"boolean",default:l.DB.insertSpaces,markdownDescription:i.N("insertSpaces","Insert spaces when pressing `Tab`. This setting is overridden based on the file contents when `#editor.detectIndentation#` is on.")},"editor.detectIndentation":{type:"boolean",default:l.DB.detectIndentation,markdownDescription:i.N("detectIndentation","Controls whether `#editor.tabSize#` and `#editor.insertSpaces#` will be automatically detected when a file is opened based on the file contents.")},"editor.trimAutoWhitespace":{type:"boolean",default:l.DB.trimAutoWhitespace,description:i.N("trimAutoWhitespace","Remove trailing auto inserted whitespace.")},"editor.largeFileOptimizations":{type:"boolean",default:l.DB.largeFileOptimizations,description:i.N("largeFileOptimizations","Special handling for large files to disable certain memory intensive features.")},"editor.wordBasedSuggestions":{type:"boolean",default:!0,description:i.N("wordBasedSuggestions","Controls whether completions should be computed based on words in the document.")},"editor.wordBasedSuggestionsMode":{enum:["currentDocument","matchingDocuments","allDocuments"],default:"matchingDocuments",enumDescriptions:[i.N("wordBasedSuggestionsMode.currentDocument","Only suggest words from the active document."),i.N("wordBasedSuggestionsMode.matchingDocuments","Suggest words from all open documents of the same language."),i.N("wordBasedSuggestionsMode.allDocuments","Suggest words from all open documents.")],description:i.N("wordBasedSuggestionsMode","Controls from which documents word based completions are computed.")},"editor.semanticHighlighting.enabled":{enum:[!0,!1,"configuredByTheme"],enumDescriptions:[i.N("semanticHighlighting.true","Semantic highlighting enabled for all color themes."),i.N("semanticHighlighting.false","Semantic highlighting disabled for all color themes."),i.N("semanticHighlighting.configuredByTheme","Semantic highlighting is configured by the current color theme's `semanticHighlighting` setting.")],default:"configuredByTheme",description:i.N("semanticHighlighting.enabled","Controls whether the semanticHighlighting is shown for the languages that support it.")},"editor.stablePeek":{type:"boolean",default:!1,markdownDescription:i.N("stablePeek","Keep peek editors open even when double clicking their content or when hitting `Escape`.")},"editor.maxTokenizationLineLength":{type:"integer",default:2e4,description:i.N("maxTokenizationLineLength","Lines above this length will not be tokenized for performance reasons")},"diffEditor.maxComputationTime":{type:"number",default:5e3,description:i.N("maxComputationTime","Timeout in milliseconds after which diff computation is cancelled. Use 0 for no timeout.")},"diffEditor.renderSideBySide":{type:"boolean",default:!0,description:i.N("sideBySide","Controls whether the diff editor shows the diff side by side or inline.")},"diffEditor.ignoreTrimWhitespace":{type:"boolean",default:!0,description:i.N("ignoreTrimWhitespace","When enabled, the diff editor ignores changes in leading or trailing whitespace.")},"diffEditor.renderIndicators":{type:"boolean",default:!0,description:i.N("renderIndicators","Controls whether the diff editor shows +/- indicators for added/removed changes.")},"diffEditor.codeLens":{type:"boolean",default:!1,description:i.N("codeLens","Controls whether the editor shows CodeLens.")},"diffEditor.wordWrap":{type:"string",enum:["off","on","inherit"],default:"inherit",markdownEnumDescriptions:[i.N("wordWrap.off","Lines will never wrap."),i.N("wordWrap.on","Lines will wrap at the viewport width."),i.N("wordWrap.inherit","Lines will wrap according to the `#editor.wordWrap#` setting.")]}}});for(const e of l.Bc){const t=e.schema;if(void 0!==t)if(void 0!==(S=t).type||void 0!==S.anyOf)A.properties[`editor.${e.name}`]=t;else for(let e in t)m.call(t,e)&&(A.properties[e]=t[e])}var S;let x=null;function k(){return null===x&&(x=Object.create(null),Object.keys(A.properties).forEach((e=>{x[e]=!0}))),x}function L(e){return k()[`editor.${e}`]||!1}function E(e){return k()[`diffEditor.${e}`]||!1}y.registerConfiguration(A)},4141:(e,t,n)=>{"use strict";n.d(t,{y0:()=>s,Bb:()=>a,hu:()=>l,LJ:()=>d,O7:()=>g,NY:()=>b,d2:()=>w,n0:()=>y,gk:()=>S,$J:()=>x,hL:()=>L,DB:()=>E,Bc:()=>N,BH:()=>I});var i=n(3580),o=n(1432),r=n(7461);const s=8;class a{constructor(e){this._values=e}hasChanged(e){return this._values[e]}}class l{constructor(){this._values=[]}_read(e){return this._values[e]}get(e){return this._values[e]}_write(e,t){this._values[e]=t}}class d{constructor(){this.stableMinimapLayoutInput=null,this.stableFitMaxMinimapScale=0,this.stableFitRemainingWidth=0}}class c{constructor(e,t,n,i){this.id=e,this.name=t,this.defaultValue=n,this.schema=i}compute(e,t,n){return n}}class h{constructor(e,t=null){this.schema=void 0,this.id=e,this.name="_never_",this.defaultValue=void 0,this.deps=t}validate(e){return this.defaultValue}}class u{constructor(e,t,n,i){this.id=e,this.name=t,this.defaultValue=n,this.schema=i}validate(e){return void 0===e?this.defaultValue:e}compute(e,t,n){return n}}function g(e,t){return void 0===e?t:"false"!==e&&Boolean(e)}class p extends u{constructor(e,t,n,i){void 0!==i&&(i.type="boolean",i.default=n),super(e,t,n,i)}validate(e){return g(e,this.defaultValue)}}class m extends u{constructor(e,t,n,i,o,r){void 0!==r&&(r.type="integer",r.default=n,r.minimum=i,r.maximum=o),super(e,t,n,r),this.minimum=i,this.maximum=o}static clampedInt(e,t,n,i){if(void 0===e)return t;let o=parseInt(e,10);return isNaN(o)?t:(o=Math.max(n,o),o=Math.min(i,o),0|o)}validate(e){return m.clampedInt(e,this.defaultValue,this.minimum,this.maximum)}}class f extends u{constructor(e,t,n,i,o){void 0!==o&&(o.type="number",o.default=n),super(e,t,n,o),this.validationFn=i}static clamp(e,t,n){return en?n:e}static float(e,t){if("number"==typeof e)return e;if(void 0===e)return t;const n=parseFloat(e);return isNaN(n)?t:n}validate(e){return this.validationFn(f.float(e,this.defaultValue))}}class _ extends u{static string(e,t){return"string"!=typeof e?t:e}constructor(e,t,n,i){void 0!==i&&(i.type="string",i.default=n),super(e,t,n,i)}validate(e){return _.string(e,this.defaultValue)}}function b(e,t,n){return"string"!=typeof e||-1===n.indexOf(e)?t:e}class C extends u{constructor(e,t,n,i,o){void 0!==o&&(o.type="string",o.enum=i,o.default=n),super(e,t,n,o),this._allowedValues=i}validate(e){return b(e,this.defaultValue,this._allowedValues)}}class v extends c{constructor(e,t,n,i,o,r,s){void 0!==s&&(s.type="string",s.enum=o,s.default=i),super(e,t,n,s),this._allowedValues=o,this._convert=r}validate(e){return"string"!=typeof e||-1===this._allowedValues.indexOf(e)?this.defaultValue:this._convert(e)}}var w;!function(e){e[e.Line=1]="Line",e[e.Block=2]="Block",e[e.Underline=3]="Underline",e[e.LineThin=4]="LineThin",e[e.BlockOutline=5]="BlockOutline",e[e.UnderlineThin=6]="UnderlineThin"}(w||(w={}));class y extends c{constructor(){super(42,"fontLigatures",y.OFF,{anyOf:[{type:"boolean",description:i.N("fontLigatures","Enables/Disables font ligatures ('calt' and 'liga' font features). Change this to a string for fine-grained control of the 'font-feature-settings' CSS property.")},{type:"string",description:i.N("fontFeatureSettings","Explicit 'font-feature-settings' CSS property. A boolean can be passed instead if one only needs to turn on/off ligatures.")}],description:i.N("fontLigaturesGeneral","Configures font ligatures or font features. Can be either a boolean to enable/disable ligatures or a string for the value of the CSS 'font-feature-settings' property."),default:!1})}validate(e){return void 0===e?this.defaultValue:"string"==typeof e?"false"===e?y.OFF:"true"===e?y.ON:e:Boolean(e)?y.ON:y.OFF}}y.OFF='"liga" off, "calt" off',y.ON='"liga" on, "calt" on';class A extends c{constructor(){super(44,"fontWeight",L.fontWeight,{anyOf:[{type:"number",minimum:A.MINIMUM_VALUE,maximum:A.MAXIMUM_VALUE,errorMessage:i.N("fontWeightErrorMessage",'Only "normal" and "bold" keywords or numbers between 1 and 1000 are allowed.')},{type:"string",pattern:"^(normal|bold|1000|[1-9][0-9]{0,2})$"},{enum:A.SUGGESTION_VALUES}],default:L.fontWeight,description:i.N("fontWeight",'Controls the font weight. Accepts "normal" and "bold" keywords or numbers between 1 and 1000.')})}validate(e){return"normal"===e||"bold"===e?e:String(m.clampedInt(e,L.fontWeight,A.MINIMUM_VALUE,A.MAXIMUM_VALUE))}}A.SUGGESTION_VALUES=["normal","bold","100","200","300","400","500","600","700","800","900"],A.MINIMUM_VALUE=1,A.MAXIMUM_VALUE=1e3;class S extends h{constructor(){super(129,[47,56,35,63,91,58,59,93,116,119,120,121,2])}compute(e,t,n){return S.computeLayout(t,{memory:e.memory,outerWidth:e.outerWidth,outerHeight:e.outerHeight,isDominatedByLongLines:e.isDominatedByLongLines,lineHeight:e.fontInfo.lineHeight,viewLineCount:e.viewLineCount,lineNumbersDigitCount:e.lineNumbersDigitCount,typicalHalfwidthCharacterWidth:e.fontInfo.typicalHalfwidthCharacterWidth,maxDigitWidth:e.fontInfo.maxDigitWidth,pixelRatio:e.pixelRatio})}static computeContainedMinimapLineCount(e){const t=e.height/e.lineHeight,n=e.scrollBeyondLastLine?t-1:0,i=(e.viewLineCount+n)/(e.pixelRatio*e.height);return{typicalViewportLineCount:t,extraLinesBeyondLastLine:n,desiredRatio:i,minimapLineCount:Math.floor(e.viewLineCount/i)}}static _computeMinimapLayout(e,t){const n=e.outerWidth,i=e.outerHeight,o=e.pixelRatio;if(!e.minimap.enabled)return{renderMinimap:0,minimapLeft:0,minimapWidth:0,minimapHeightIsEditorHeight:!1,minimapIsSampling:!1,minimapScale:1,minimapLineHeight:1,minimapCanvasInnerWidth:0,minimapCanvasInnerHeight:Math.floor(o*i),minimapCanvasOuterWidth:0,minimapCanvasOuterHeight:i};const r=t.stableMinimapLayoutInput,a=r&&e.outerHeight===r.outerHeight&&e.lineHeight===r.lineHeight&&e.typicalHalfwidthCharacterWidth===r.typicalHalfwidthCharacterWidth&&e.pixelRatio===r.pixelRatio&&e.scrollBeyondLastLine===r.scrollBeyondLastLine&&e.minimap.enabled===r.minimap.enabled&&e.minimap.side===r.minimap.side&&e.minimap.size===r.minimap.size&&e.minimap.showSlider===r.minimap.showSlider&&e.minimap.renderCharacters===r.minimap.renderCharacters&&e.minimap.maxColumn===r.minimap.maxColumn&&e.minimap.scale===r.minimap.scale&&e.verticalScrollbarWidth===r.verticalScrollbarWidth&&e.isViewportWrapping===r.isViewportWrapping,l=e.lineHeight,d=e.typicalHalfwidthCharacterWidth,c=e.scrollBeyondLastLine,h=e.minimap.renderCharacters;let u=o>=2?Math.round(2*e.minimap.scale):e.minimap.scale;const g=e.minimap.maxColumn,p=e.minimap.size,m=e.minimap.side,f=e.verticalScrollbarWidth,_=e.viewLineCount,b=e.remainingWidth,C=e.isViewportWrapping,v=h?2:3;let w=Math.floor(o*i);const y=w/o;let A=!1,x=!1,k=v*u,L=u/o,E=1;if("fill"===p||"fit"===p){const{typicalViewportLineCount:n,extraLinesBeyondLastLine:r,desiredRatio:s,minimapLineCount:d}=S.computeContainedMinimapLineCount({viewLineCount:_,scrollBeyondLastLine:c,height:i,lineHeight:l,pixelRatio:o});if(_/d>1)A=!0,x=!0,u=1,k=1,L=u/o;else{let i=!1,d=u+1;if("fit"===p){const e=Math.ceil((_+r)*k);C&&a&&b<=t.stableFitRemainingWidth?(i=!0,d=t.stableFitMaxMinimapScale):i=e>w}if("fill"===p||i){A=!0;const i=u;k=Math.min(l*o,Math.max(1,Math.floor(1/s))),C&&a&&b<=t.stableFitRemainingWidth&&(d=t.stableFitMaxMinimapScale),u=Math.min(d,Math.max(1,Math.floor(k/v))),u>i&&(E=Math.min(2,u/i)),L=u/o/E,w=Math.ceil(Math.max(n,_+r)*k),C?(t.stableMinimapLayoutInput=e,t.stableFitRemainingWidth=b,t.stableFitMaxMinimapScale=u):(t.stableMinimapLayoutInput=null,t.stableFitRemainingWidth=0)}}}const N=Math.floor(g*L),D=Math.min(N,Math.max(0,Math.floor((b-f-2)*L/(d+L)))+s);let I=Math.floor(o*D);const M=I/o;return I=Math.floor(I*E),{renderMinimap:h?1:2,minimapLeft:"left"===m?0:n-D-f,minimapWidth:D,minimapHeightIsEditorHeight:A,minimapIsSampling:x,minimapScale:u,minimapLineHeight:k,minimapCanvasInnerWidth:I,minimapCanvasInnerHeight:w,minimapCanvasOuterWidth:M,minimapCanvasOuterHeight:y}}static computeLayout(e,t){const n=0|t.outerWidth,i=0|t.outerHeight,o=0|t.lineHeight,r=0|t.lineNumbersDigitCount,s=t.typicalHalfwidthCharacterWidth,a=t.maxDigitWidth,l=t.pixelRatio,c=t.viewLineCount,h=e.get(121),u="inherit"===h?e.get(120):h,g="inherit"===u?e.get(116):u,p=e.get(119),f=e.get(2),_=t.isDominatedByLongLines,b=e.get(47),C=0!==e.get(58).renderType,v=e.get(59),w=e.get(93),y=e.get(63),A=e.get(91),x=A.verticalScrollbarSize,k=A.verticalHasArrows,L=A.arrowSize,E=A.horizontalScrollbarSize,N=e.get(56),D=e.get(35);let I;if("string"==typeof N&&/^\d+(\.\d+)?ch$/.test(N)){const e=parseFloat(N.substr(0,N.length-2));I=m.clampedInt(e*s,0,0,1e3)}else I=m.clampedInt(N,0,0,1e3);D&&(I+=16);let M=0;if(C){const e=Math.max(r,v);M=Math.round(e*a)}let T=0;b&&(T=o);let R=0,O=R+T,B=O+M,P=B+I;const F=n-T-M-I;let W=!1,z=!1,V=-1;2!==f&&("inherit"===u&&_?(W=!0,z=!0):"on"===g||"bounded"===g?z=!0:"wordWrapColumn"===g&&(V=p));const H=S._computeMinimapLayout({outerWidth:n,outerHeight:i,lineHeight:o,typicalHalfwidthCharacterWidth:s,pixelRatio:l,scrollBeyondLastLine:w,minimap:y,verticalScrollbarWidth:x,viewLineCount:c,remainingWidth:F,isViewportWrapping:z},t.memory||new d);0!==H.renderMinimap&&0===H.minimapLeft&&(R+=H.minimapWidth,O+=H.minimapWidth,B+=H.minimapWidth,P+=H.minimapWidth);const j=F-H.minimapWidth,$=Math.max(1,Math.floor((j-x-2)/s)),U=k?L:0;return z&&(V=Math.max(1,$),"bounded"===g&&(V=Math.min(V,p))),{width:n,height:i,glyphMarginLeft:R,glyphMarginWidth:T,lineNumbersLeft:O,lineNumbersWidth:M,decorationsLeft:B,decorationsWidth:I,contentLeft:P,contentWidth:j,minimap:H,viewportColumn:$,isWordWrapMinified:W,isViewportWrapping:z,wrappingColumn:V,verticalScrollbarWidth:x,horizontalScrollbarHeight:E,overviewRuler:{top:U,width:x,height:i-2*U,right:0}}}}function x(e){const t=e.get(86);return"editable"===t?e.get(79):"on"!==t}function k(e,t){if("string"!=typeof e)return t;switch(e){case"hidden":return 2;case"visible":return 3;default:return 1}}const L={fontFamily:o.dz?"Menlo, Monaco, 'Courier New', monospace":o.IJ?"'Droid Sans Mono', 'monospace', monospace, 'Droid Sans Fallback'":"Consolas, 'Courier New', monospace",fontWeight:"normal",fontSize:o.dz?12:14,lineHeight:0,letterSpacing:0},E={tabSize:4,indentSize:4,insertSpaces:!0,detectIndentation:!0,trimAutoWhitespace:!0,largeFileOptimizations:!0},N=[];function D(e){return N[e.id]=e,e}const I={acceptSuggestionOnCommitCharacter:D(new p(0,"acceptSuggestionOnCommitCharacter",!0,{markdownDescription:i.N("acceptSuggestionOnCommitCharacter","Controls whether suggestions should be accepted on commit characters. For example, in JavaScript, the semi-colon (`;`) can be a commit character that accepts a suggestion and types that character.")})),acceptSuggestionOnEnter:D(new C(1,"acceptSuggestionOnEnter","on",["on","smart","off"],{markdownEnumDescriptions:["",i.N("acceptSuggestionOnEnterSmart","Only accept a suggestion with `Enter` when it makes a textual change."),""],markdownDescription:i.N("acceptSuggestionOnEnter","Controls whether suggestions should be accepted on `Enter`, in addition to `Tab`. Helps to avoid ambiguity between inserting new lines or accepting suggestions.")})),accessibilitySupport:D(new class extends c{constructor(){super(2,"accessibilitySupport",0,{type:"string",enum:["auto","on","off"],enumDescriptions:[i.N("accessibilitySupport.auto","The editor will use platform APIs to detect when a Screen Reader is attached."),i.N("accessibilitySupport.on","The editor will be permanently optimized for usage with a Screen Reader. Word wrapping will be disabled."),i.N("accessibilitySupport.off","The editor will never be optimized for usage with a Screen Reader.")],default:"auto",description:i.N("accessibilitySupport","Controls whether the editor should run in a mode where it is optimized for screen readers. Setting to on will disable word wrapping.")})}validate(e){switch(e){case"auto":return 0;case"off":return 1;case"on":return 2}return this.defaultValue}compute(e,t,n){return 0===n?e.accessibilitySupport:n}}),accessibilityPageSize:D(new m(3,"accessibilityPageSize",10,1,1073741824,{description:i.N("accessibilityPageSize","Controls the number of lines in the editor that can be read out by a screen reader at once. When we detect a screen reader we automatically set the default to be 500. Warning: this has a performance implication for numbers larger than the default.")})),ariaLabel:D(new _(4,"ariaLabel",i.N("editorViewAccessibleLabel","Editor content"))),autoClosingBrackets:D(new C(5,"autoClosingBrackets","languageDefined",["always","languageDefined","beforeWhitespace","never"],{enumDescriptions:["",i.N("editor.autoClosingBrackets.languageDefined","Use language configurations to determine when to autoclose brackets."),i.N("editor.autoClosingBrackets.beforeWhitespace","Autoclose brackets only when the cursor is to the left of whitespace."),""],description:i.N("autoClosingBrackets","Controls whether the editor should automatically close brackets after the user adds an opening bracket.")})),autoClosingDelete:D(new C(6,"autoClosingDelete","auto",["always","auto","never"],{enumDescriptions:["",i.N("editor.autoClosingDelete.auto","Remove adjacent closing quotes or brackets only if they were automatically inserted."),""],description:i.N("autoClosingDelete","Controls whether the editor should remove adjacent closing quotes or brackets when deleting.")})),autoClosingOvertype:D(new C(7,"autoClosingOvertype","auto",["always","auto","never"],{enumDescriptions:["",i.N("editor.autoClosingOvertype.auto","Type over closing quotes or brackets only if they were automatically inserted."),""],description:i.N("autoClosingOvertype","Controls whether the editor should type over closing quotes or brackets.")})),autoClosingQuotes:D(new C(8,"autoClosingQuotes","languageDefined",["always","languageDefined","beforeWhitespace","never"],{enumDescriptions:["",i.N("editor.autoClosingQuotes.languageDefined","Use language configurations to determine when to autoclose quotes."),i.N("editor.autoClosingQuotes.beforeWhitespace","Autoclose quotes only when the cursor is to the left of whitespace."),""],description:i.N("autoClosingQuotes","Controls whether the editor should automatically close quotes after the user adds an opening quote.")})),autoIndent:D(new v(9,"autoIndent",4,"full",["none","keep","brackets","advanced","full"],(function(e){switch(e){case"none":return 0;case"keep":return 1;case"brackets":return 2;case"advanced":return 3;case"full":return 4}}),{enumDescriptions:[i.N("editor.autoIndent.none","The editor will not insert indentation automatically."),i.N("editor.autoIndent.keep","The editor will keep the current line's indentation."),i.N("editor.autoIndent.brackets","The editor will keep the current line's indentation and honor language defined brackets."),i.N("editor.autoIndent.advanced","The editor will keep the current line's indentation, honor language defined brackets and invoke special onEnterRules defined by languages."),i.N("editor.autoIndent.full","The editor will keep the current line's indentation, honor language defined brackets, invoke special onEnterRules defined by languages, and honor indentationRules defined by languages.")],description:i.N("autoIndent","Controls whether the editor should automatically adjust the indentation when users type, paste, move or indent lines.")})),automaticLayout:D(new p(10,"automaticLayout",!1)),autoSurround:D(new C(11,"autoSurround","languageDefined",["languageDefined","quotes","brackets","never"],{enumDescriptions:[i.N("editor.autoSurround.languageDefined","Use language configurations to determine when to automatically surround selections."),i.N("editor.autoSurround.quotes","Surround with quotes but not brackets."),i.N("editor.autoSurround.brackets","Surround with brackets but not quotes."),""],description:i.N("autoSurround","Controls whether the editor should automatically surround selections when typing quotes or brackets.")})),stickyTabStops:D(new p(103,"stickyTabStops",!1,{description:i.N("stickyTabStops","Emulate selection behavior of tab characters when using spaces for indentation. Selection will stick to tab stops.")})),codeLens:D(new p(12,"codeLens",!0,{description:i.N("codeLens","Controls whether the editor shows CodeLens.")})),codeLensFontFamily:D(new _(13,"codeLensFontFamily","",{description:i.N("codeLensFontFamily","Controls the font family for CodeLens.")})),codeLensFontSize:D(new m(14,"codeLensFontSize",0,0,100,{type:"number",default:0,minimum:0,maximum:100,markdownDescription:i.N("codeLensFontSize","Controls the font size in pixels for CodeLens. When set to `0`, the 90% of `#editor.fontSize#` is used.")})),colorDecorators:D(new p(15,"colorDecorators",!0,{description:i.N("colorDecorators","Controls whether the editor should render the inline color decorators and color picker.")})),columnSelection:D(new p(16,"columnSelection",!1,{description:i.N("columnSelection","Enable that the selection with the mouse and keys is doing column selection.")})),comments:D(new class extends c{constructor(){const e={insertSpace:!0,ignoreEmptyLines:!0};super(17,"comments",e,{"editor.comments.insertSpace":{type:"boolean",default:e.insertSpace,description:i.N("comments.insertSpace","Controls whether a space character is inserted when commenting.")},"editor.comments.ignoreEmptyLines":{type:"boolean",default:e.ignoreEmptyLines,description:i.N("comments.ignoreEmptyLines","Controls if empty lines should be ignored with toggle, add or remove actions for line comments.")}})}validate(e){if(!e||"object"!=typeof e)return this.defaultValue;const t=e;return{insertSpace:g(t.insertSpace,this.defaultValue.insertSpace),ignoreEmptyLines:g(t.ignoreEmptyLines,this.defaultValue.ignoreEmptyLines)}}}),contextmenu:D(new p(18,"contextmenu",!0)),copyWithSyntaxHighlighting:D(new p(19,"copyWithSyntaxHighlighting",!0,{description:i.N("copyWithSyntaxHighlighting","Controls whether syntax highlighting should be copied into the clipboard.")})),cursorBlinking:D(new v(20,"cursorBlinking",1,"blink",["blink","smooth","phase","expand","solid"],(function(e){switch(e){case"blink":return 1;case"smooth":return 2;case"phase":return 3;case"expand":return 4;case"solid":return 5}}),{description:i.N("cursorBlinking","Control the cursor animation style.")})),cursorSmoothCaretAnimation:D(new p(21,"cursorSmoothCaretAnimation",!1,{description:i.N("cursorSmoothCaretAnimation","Controls whether the smooth caret animation should be enabled.")})),cursorStyle:D(new v(22,"cursorStyle",w.Line,"line",["line","block","underline","line-thin","block-outline","underline-thin"],(function(e){switch(e){case"line":return w.Line;case"block":return w.Block;case"underline":return w.Underline;case"line-thin":return w.LineThin;case"block-outline":return w.BlockOutline;case"underline-thin":return w.UnderlineThin}}),{description:i.N("cursorStyle","Controls the cursor style.")})),cursorSurroundingLines:D(new m(23,"cursorSurroundingLines",0,0,1073741824,{description:i.N("cursorSurroundingLines","Controls the minimal number of visible leading and trailing lines surrounding the cursor. Known as 'scrollOff' or 'scrollOffset' in some other editors.")})),cursorSurroundingLinesStyle:D(new C(24,"cursorSurroundingLinesStyle","default",["default","all"],{enumDescriptions:[i.N("cursorSurroundingLinesStyle.default","`cursorSurroundingLines` is enforced only when triggered via the keyboard or API."),i.N("cursorSurroundingLinesStyle.all","`cursorSurroundingLines` is enforced always.")],description:i.N("cursorSurroundingLinesStyle","Controls when `cursorSurroundingLines` should be enforced.")})),cursorWidth:D(new m(25,"cursorWidth",0,0,1073741824,{markdownDescription:i.N("cursorWidth","Controls the width of the cursor when `#editor.cursorStyle#` is set to `line`.")})),disableLayerHinting:D(new p(26,"disableLayerHinting",!1)),disableMonospaceOptimizations:D(new p(27,"disableMonospaceOptimizations",!1)),domReadOnly:D(new p(28,"domReadOnly",!1)),dragAndDrop:D(new p(29,"dragAndDrop",!0,{description:i.N("dragAndDrop","Controls whether the editor should allow moving selections via drag and drop.")})),emptySelectionClipboard:D(new class extends p{constructor(){super(30,"emptySelectionClipboard",!0,{description:i.N("emptySelectionClipboard","Controls whether copying without a selection copies the current line.")})}compute(e,t,n){return n&&e.emptySelectionClipboard}}),extraEditorClassName:D(new _(31,"extraEditorClassName","")),fastScrollSensitivity:D(new f(32,"fastScrollSensitivity",5,(e=>e<=0?5:e),{markdownDescription:i.N("fastScrollSensitivity","Scrolling speed multiplier when pressing `Alt`.")})),find:D(new class extends c{constructor(){const e={cursorMoveOnType:!0,seedSearchStringFromSelection:"always",autoFindInSelection:"never",globalFindClipboard:!1,addExtraSpaceOnTop:!0,loop:!0};super(33,"find",e,{"editor.find.cursorMoveOnType":{type:"boolean",default:e.cursorMoveOnType,description:i.N("find.cursorMoveOnType","Controls whether the cursor should jump to find matches while typing.")},"editor.find.seedSearchStringFromSelection":{type:"string",enum:["never","always","selection"],default:e.seedSearchStringFromSelection,enumDescriptions:[i.N("editor.find.seedSearchStringFromSelection.never","Never seed search string from the editor selection."),i.N("editor.find.seedSearchStringFromSelection.always","Always seed search string from the editor selection, including word at cursor position."),i.N("editor.find.seedSearchStringFromSelection.selection","Only seed search string from the editor selection.")],description:i.N("find.seedSearchStringFromSelection","Controls whether the search string in the Find Widget is seeded from the editor selection.")},"editor.find.autoFindInSelection":{type:"string",enum:["never","always","multiline"],default:e.autoFindInSelection,enumDescriptions:[i.N("editor.find.autoFindInSelection.never","Never turn on Find in Selection automatically (default)."),i.N("editor.find.autoFindInSelection.always","Always turn on Find in Selection automatically."),i.N("editor.find.autoFindInSelection.multiline","Turn on Find in Selection automatically when multiple lines of content are selected.")],description:i.N("find.autoFindInSelection","Controls the condition for turning on Find in Selection automatically.")},"editor.find.globalFindClipboard":{type:"boolean",default:e.globalFindClipboard,description:i.N("find.globalFindClipboard","Controls whether the Find Widget should read or modify the shared find clipboard on macOS."),included:o.dz},"editor.find.addExtraSpaceOnTop":{type:"boolean",default:e.addExtraSpaceOnTop,description:i.N("find.addExtraSpaceOnTop","Controls whether the Find Widget should add extra lines on top of the editor. When true, you can scroll beyond the first line when the Find Widget is visible.")},"editor.find.loop":{type:"boolean",default:e.loop,description:i.N("find.loop","Controls whether the search automatically restarts from the beginning (or the end) when no further matches can be found.")}})}validate(e){if(!e||"object"!=typeof e)return this.defaultValue;const t=e;return{cursorMoveOnType:g(t.cursorMoveOnType,this.defaultValue.cursorMoveOnType),seedSearchStringFromSelection:"boolean"==typeof e.seedSearchStringFromSelection?e.seedSearchStringFromSelection?"always":"never":b(t.seedSearchStringFromSelection,this.defaultValue.seedSearchStringFromSelection,["never","always","selection"]),autoFindInSelection:"boolean"==typeof e.autoFindInSelection?e.autoFindInSelection?"always":"never":b(t.autoFindInSelection,this.defaultValue.autoFindInSelection,["never","always","multiline"]),globalFindClipboard:g(t.globalFindClipboard,this.defaultValue.globalFindClipboard),addExtraSpaceOnTop:g(t.addExtraSpaceOnTop,this.defaultValue.addExtraSpaceOnTop),loop:g(t.loop,this.defaultValue.loop)}}}),fixedOverflowWidgets:D(new p(34,"fixedOverflowWidgets",!1)),folding:D(new p(35,"folding",!0,{description:i.N("folding","Controls whether the editor has code folding enabled.")})),foldingStrategy:D(new C(36,"foldingStrategy","auto",["auto","indentation"],{enumDescriptions:[i.N("foldingStrategy.auto","Use a language-specific folding strategy if available, else the indentation-based one."),i.N("foldingStrategy.indentation","Use the indentation-based folding strategy.")],description:i.N("foldingStrategy","Controls the strategy for computing folding ranges.")})),foldingHighlight:D(new p(37,"foldingHighlight",!0,{description:i.N("foldingHighlight","Controls whether the editor should highlight folded ranges.")})),foldingImportsByDefault:D(new p(38,"foldingImportsByDefault",!1,{description:i.N("foldingImportsByDefault","Controls whether the editor automatically collapses import ranges.")})),unfoldOnClickAfterEndOfLine:D(new p(39,"unfoldOnClickAfterEndOfLine",!1,{description:i.N("unfoldOnClickAfterEndOfLine","Controls whether clicking on the empty content after a folded line will unfold the line.")})),fontFamily:D(new _(40,"fontFamily",L.fontFamily,{description:i.N("fontFamily","Controls the font family.")})),fontInfo:D(new class extends h{constructor(){super(41)}compute(e,t,n){return e.fontInfo}}),fontLigatures2:D(new y),fontSize:D(new class extends u{constructor(){super(43,"fontSize",L.fontSize,{type:"number",minimum:6,maximum:100,default:L.fontSize,description:i.N("fontSize","Controls the font size in pixels.")})}validate(e){let t=f.float(e,this.defaultValue);return 0===t?L.fontSize:f.clamp(t,6,100)}compute(e,t,n){return e.fontInfo.fontSize}}),fontWeight:D(new A),formatOnPaste:D(new p(45,"formatOnPaste",!1,{description:i.N("formatOnPaste","Controls whether the editor should automatically format the pasted content. A formatter must be available and the formatter should be able to format a range in a document.")})),formatOnType:D(new p(46,"formatOnType",!1,{description:i.N("formatOnType","Controls whether the editor should automatically format the line after typing.")})),glyphMargin:D(new p(47,"glyphMargin",!0,{description:i.N("glyphMargin","Controls whether the editor should render the vertical glyph margin. Glyph margin is mostly used for debugging.")})),gotoLocation:D(new class extends c{constructor(){const e={multiple:"peek",multipleDefinitions:"peek",multipleTypeDefinitions:"peek",multipleDeclarations:"peek",multipleImplementations:"peek",multipleReferences:"peek",alternativeDefinitionCommand:"editor.action.goToReferences",alternativeTypeDefinitionCommand:"editor.action.goToReferences",alternativeDeclarationCommand:"editor.action.goToReferences",alternativeImplementationCommand:"",alternativeReferenceCommand:""},t={type:"string",enum:["peek","gotoAndPeek","goto"],default:e.multiple,enumDescriptions:[i.N("editor.gotoLocation.multiple.peek","Show peek view of the results (default)"),i.N("editor.gotoLocation.multiple.gotoAndPeek","Go to the primary result and show a peek view"),i.N("editor.gotoLocation.multiple.goto","Go to the primary result and enable peek-less navigation to others")]},n=["","editor.action.referenceSearch.trigger","editor.action.goToReferences","editor.action.peekImplementation","editor.action.goToImplementation","editor.action.peekTypeDefinition","editor.action.goToTypeDefinition","editor.action.peekDeclaration","editor.action.revealDeclaration","editor.action.peekDefinition","editor.action.revealDefinitionAside","editor.action.revealDefinition"];super(48,"gotoLocation",e,{"editor.gotoLocation.multiple":{deprecationMessage:i.N("editor.gotoLocation.multiple.deprecated","This setting is deprecated, please use separate settings like 'editor.editor.gotoLocation.multipleDefinitions' or 'editor.editor.gotoLocation.multipleImplementations' instead.")},"editor.gotoLocation.multipleDefinitions":Object.assign({description:i.N("editor.editor.gotoLocation.multipleDefinitions","Controls the behavior the 'Go to Definition'-command when multiple target locations exist.")},t),"editor.gotoLocation.multipleTypeDefinitions":Object.assign({description:i.N("editor.editor.gotoLocation.multipleTypeDefinitions","Controls the behavior the 'Go to Type Definition'-command when multiple target locations exist.")},t),"editor.gotoLocation.multipleDeclarations":Object.assign({description:i.N("editor.editor.gotoLocation.multipleDeclarations","Controls the behavior the 'Go to Declaration'-command when multiple target locations exist.")},t),"editor.gotoLocation.multipleImplementations":Object.assign({description:i.N("editor.editor.gotoLocation.multipleImplemenattions","Controls the behavior the 'Go to Implementations'-command when multiple target locations exist.")},t),"editor.gotoLocation.multipleReferences":Object.assign({description:i.N("editor.editor.gotoLocation.multipleReferences","Controls the behavior the 'Go to References'-command when multiple target locations exist.")},t),"editor.gotoLocation.alternativeDefinitionCommand":{type:"string",default:e.alternativeDefinitionCommand,enum:n,description:i.N("alternativeDefinitionCommand","Alternative command id that is being executed when the result of 'Go to Definition' is the current location.")},"editor.gotoLocation.alternativeTypeDefinitionCommand":{type:"string",default:e.alternativeTypeDefinitionCommand,enum:n,description:i.N("alternativeTypeDefinitionCommand","Alternative command id that is being executed when the result of 'Go to Type Definition' is the current location.")},"editor.gotoLocation.alternativeDeclarationCommand":{type:"string",default:e.alternativeDeclarationCommand,enum:n,description:i.N("alternativeDeclarationCommand","Alternative command id that is being executed when the result of 'Go to Declaration' is the current location.")},"editor.gotoLocation.alternativeImplementationCommand":{type:"string",default:e.alternativeImplementationCommand,enum:n,description:i.N("alternativeImplementationCommand","Alternative command id that is being executed when the result of 'Go to Implementation' is the current location.")},"editor.gotoLocation.alternativeReferenceCommand":{type:"string",default:e.alternativeReferenceCommand,enum:n,description:i.N("alternativeReferenceCommand","Alternative command id that is being executed when the result of 'Go to Reference' is the current location.")}})}validate(e){var t,n,i,o,r;if(!e||"object"!=typeof e)return this.defaultValue;const s=e;return{multiple:b(s.multiple,this.defaultValue.multiple,["peek","gotoAndPeek","goto"]),multipleDefinitions:null!==(t=s.multipleDefinitions)&&void 0!==t?t:b(s.multipleDefinitions,"peek",["peek","gotoAndPeek","goto"]),multipleTypeDefinitions:null!==(n=s.multipleTypeDefinitions)&&void 0!==n?n:b(s.multipleTypeDefinitions,"peek",["peek","gotoAndPeek","goto"]),multipleDeclarations:null!==(i=s.multipleDeclarations)&&void 0!==i?i:b(s.multipleDeclarations,"peek",["peek","gotoAndPeek","goto"]),multipleImplementations:null!==(o=s.multipleImplementations)&&void 0!==o?o:b(s.multipleImplementations,"peek",["peek","gotoAndPeek","goto"]),multipleReferences:null!==(r=s.multipleReferences)&&void 0!==r?r:b(s.multipleReferences,"peek",["peek","gotoAndPeek","goto"]),alternativeDefinitionCommand:_.string(s.alternativeDefinitionCommand,this.defaultValue.alternativeDefinitionCommand),alternativeTypeDefinitionCommand:_.string(s.alternativeTypeDefinitionCommand,this.defaultValue.alternativeTypeDefinitionCommand),alternativeDeclarationCommand:_.string(s.alternativeDeclarationCommand,this.defaultValue.alternativeDeclarationCommand),alternativeImplementationCommand:_.string(s.alternativeImplementationCommand,this.defaultValue.alternativeImplementationCommand),alternativeReferenceCommand:_.string(s.alternativeReferenceCommand,this.defaultValue.alternativeReferenceCommand)}}}),hideCursorInOverviewRuler:D(new p(49,"hideCursorInOverviewRuler",!1,{description:i.N("hideCursorInOverviewRuler","Controls whether the cursor should be hidden in the overview ruler.")})),highlightActiveIndentGuide:D(new p(50,"highlightActiveIndentGuide",!0,{description:i.N("highlightActiveIndentGuide","Controls whether the editor should highlight the active indent guide.")})),hover:D(new class extends c{constructor(){const e={enabled:!0,delay:300,sticky:!0};super(51,"hover",e,{"editor.hover.enabled":{type:"boolean",default:e.enabled,description:i.N("hover.enabled","Controls whether the hover is shown.")},"editor.hover.delay":{type:"number",default:e.delay,description:i.N("hover.delay","Controls the delay in milliseconds after which the hover is shown.")},"editor.hover.sticky":{type:"boolean",default:e.sticky,description:i.N("hover.sticky","Controls whether the hover should remain visible when mouse is moved over it.")}})}validate(e){if(!e||"object"!=typeof e)return this.defaultValue;const t=e;return{enabled:g(t.enabled,this.defaultValue.enabled),delay:m.clampedInt(t.delay,this.defaultValue.delay,0,1e4),sticky:g(t.sticky,this.defaultValue.sticky)}}}),inDiffEditor:D(new p(52,"inDiffEditor",!1)),letterSpacing:D(new f(54,"letterSpacing",L.letterSpacing,(e=>f.clamp(e,-5,20)),{description:i.N("letterSpacing","Controls the letter spacing in pixels.")})),lightbulb:D(new class extends c{constructor(){const e={enabled:!0};super(55,"lightbulb",e,{"editor.lightbulb.enabled":{type:"boolean",default:e.enabled,description:i.N("codeActions","Enables the code action lightbulb in the editor.")}})}validate(e){return e&&"object"==typeof e?{enabled:g(e.enabled,this.defaultValue.enabled)}:this.defaultValue}}),lineDecorationsWidth:D(new u(56,"lineDecorationsWidth",10)),lineHeight:D(new class extends f{constructor(){super(57,"lineHeight",L.lineHeight,(e=>f.clamp(e,0,150)),{markdownDescription:i.N("lineHeight","Controls the line height. \n - Use 0 to automatically compute the line height from the font size.\n - Values between 0 and 8 will be used as a multiplier with the font size.\n - Values greater than or equal to 8 will be used as effective values.")})}compute(e,t,n){return e.fontInfo.lineHeight}}),lineNumbers:D(new class extends c{constructor(){super(58,"lineNumbers",{renderType:1,renderFn:null},{type:"string",enum:["off","on","relative","interval"],enumDescriptions:[i.N("lineNumbers.off","Line numbers are not rendered."),i.N("lineNumbers.on","Line numbers are rendered as absolute number."),i.N("lineNumbers.relative","Line numbers are rendered as distance in lines to cursor position."),i.N("lineNumbers.interval","Line numbers are rendered every 10 lines.")],default:"on",description:i.N("lineNumbers","Controls the display of line numbers.")})}validate(e){let t=this.defaultValue.renderType,n=this.defaultValue.renderFn;return void 0!==e&&("function"==typeof e?(t=4,n=e):t="interval"===e?3:"relative"===e?2:"on"===e?1:0),{renderType:t,renderFn:n}}}),lineNumbersMinChars:D(new m(59,"lineNumbersMinChars",5,1,300)),linkedEditing:D(new p(60,"linkedEditing",!1,{description:i.N("linkedEditing","Controls whether the editor has linked editing enabled. Depending on the language, related symbols, e.g. HTML tags, are updated while editing.")})),links:D(new p(61,"links",!0,{description:i.N("links","Controls whether the editor should detect links and make them clickable.")})),matchBrackets:D(new C(62,"matchBrackets","always",["always","near","never"],{description:i.N("matchBrackets","Highlight matching brackets.")})),minimap:D(new class extends c{constructor(){const e={enabled:!0,size:"proportional",side:"right",showSlider:"mouseover",renderCharacters:!0,maxColumn:120,scale:1};super(63,"minimap",e,{"editor.minimap.enabled":{type:"boolean",default:e.enabled,description:i.N("minimap.enabled","Controls whether the minimap is shown.")},"editor.minimap.size":{type:"string",enum:["proportional","fill","fit"],enumDescriptions:[i.N("minimap.size.proportional","The minimap has the same size as the editor contents (and might scroll)."),i.N("minimap.size.fill","The minimap will stretch or shrink as necessary to fill the height of the editor (no scrolling)."),i.N("minimap.size.fit","The minimap will shrink as necessary to never be larger than the editor (no scrolling).")],default:e.size,description:i.N("minimap.size","Controls the size of the minimap.")},"editor.minimap.side":{type:"string",enum:["left","right"],default:e.side,description:i.N("minimap.side","Controls the side where to render the minimap.")},"editor.minimap.showSlider":{type:"string",enum:["always","mouseover"],default:e.showSlider,description:i.N("minimap.showSlider","Controls when the minimap slider is shown.")},"editor.minimap.scale":{type:"number",default:e.scale,minimum:1,maximum:3,enum:[1,2,3],description:i.N("minimap.scale","Scale of content drawn in the minimap: 1, 2 or 3.")},"editor.minimap.renderCharacters":{type:"boolean",default:e.renderCharacters,description:i.N("minimap.renderCharacters","Render the actual characters on a line as opposed to color blocks.")},"editor.minimap.maxColumn":{type:"number",default:e.maxColumn,description:i.N("minimap.maxColumn","Limit the width of the minimap to render at most a certain number of columns.")}})}validate(e){if(!e||"object"!=typeof e)return this.defaultValue;const t=e;return{enabled:g(t.enabled,this.defaultValue.enabled),size:b(t.size,this.defaultValue.size,["proportional","fill","fit"]),side:b(t.side,this.defaultValue.side,["right","left"]),showSlider:b(t.showSlider,this.defaultValue.showSlider,["always","mouseover"]),renderCharacters:g(t.renderCharacters,this.defaultValue.renderCharacters),scale:m.clampedInt(t.scale,1,1,3),maxColumn:m.clampedInt(t.maxColumn,this.defaultValue.maxColumn,1,1e4)}}}),mouseStyle:D(new C(64,"mouseStyle","text",["text","default","copy"])),mouseWheelScrollSensitivity:D(new f(65,"mouseWheelScrollSensitivity",1,(e=>0===e?1:e),{markdownDescription:i.N("mouseWheelScrollSensitivity","A multiplier to be used on the `deltaX` and `deltaY` of mouse wheel scroll events.")})),mouseWheelZoom:D(new p(66,"mouseWheelZoom",!1,{markdownDescription:i.N("mouseWheelZoom","Zoom the font of the editor when using mouse wheel and holding `Ctrl`.")})),multiCursorMergeOverlapping:D(new p(67,"multiCursorMergeOverlapping",!0,{description:i.N("multiCursorMergeOverlapping","Merge multiple cursors when they are overlapping.")})),multiCursorModifier:D(new v(68,"multiCursorModifier","altKey","alt",["ctrlCmd","alt"],(function(e){return"ctrlCmd"===e?o.dz?"metaKey":"ctrlKey":"altKey"}),{markdownEnumDescriptions:[i.N("multiCursorModifier.ctrlCmd","Maps to `Control` on Windows and Linux and to `Command` on macOS."),i.N("multiCursorModifier.alt","Maps to `Alt` on Windows and Linux and to `Option` on macOS.")],markdownDescription:i.N({key:"multiCursorModifier",comment:["- `ctrlCmd` refers to a value the setting can take and should not be localized.","- `Control` and `Command` refer to the modifier keys Ctrl or Cmd on the keyboard and can be localized."]},"The modifier to be used to add multiple cursors with the mouse. The Go To Definition and Open Link mouse gestures will adapt such that they do not conflict with the multicursor modifier. [Read more](https://code.visualstudio.com/docs/editor/codebasics#_multicursor-modifier).")})),multiCursorPaste:D(new C(69,"multiCursorPaste","spread",["spread","full"],{markdownEnumDescriptions:[i.N("multiCursorPaste.spread","Each cursor pastes a single line of the text."),i.N("multiCursorPaste.full","Each cursor pastes the full text.")],markdownDescription:i.N("multiCursorPaste","Controls pasting when the line count of the pasted text matches the cursor count.")})),occurrencesHighlight:D(new p(70,"occurrencesHighlight",!0,{description:i.N("occurrencesHighlight","Controls whether the editor should highlight semantic symbol occurrences.")})),overviewRulerBorder:D(new p(71,"overviewRulerBorder",!0,{description:i.N("overviewRulerBorder","Controls whether a border should be drawn around the overview ruler.")})),overviewRulerLanes:D(new m(72,"overviewRulerLanes",3,0,3)),padding:D(new class extends c{constructor(){super(73,"padding",{top:0,bottom:0},{"editor.padding.top":{type:"number",default:0,minimum:0,maximum:1e3,description:i.N("padding.top","Controls the amount of space between the top edge of the editor and the first line.")},"editor.padding.bottom":{type:"number",default:0,minimum:0,maximum:1e3,description:i.N("padding.bottom","Controls the amount of space between the bottom edge of the editor and the last line.")}})}validate(e){if(!e||"object"!=typeof e)return this.defaultValue;const t=e;return{top:m.clampedInt(t.top,0,0,1e3),bottom:m.clampedInt(t.bottom,0,0,1e3)}}}),parameterHints:D(new class extends c{constructor(){const e={enabled:!0,cycle:!1};super(74,"parameterHints",e,{"editor.parameterHints.enabled":{type:"boolean",default:e.enabled,description:i.N("parameterHints.enabled","Enables a pop-up that shows parameter documentation and type information as you type.")},"editor.parameterHints.cycle":{type:"boolean",default:e.cycle,description:i.N("parameterHints.cycle","Controls whether the parameter hints menu cycles or closes when reaching the end of the list.")}})}validate(e){if(!e||"object"!=typeof e)return this.defaultValue;const t=e;return{enabled:g(t.enabled,this.defaultValue.enabled),cycle:g(t.cycle,this.defaultValue.cycle)}}}),peekWidgetDefaultFocus:D(new C(75,"peekWidgetDefaultFocus","tree",["tree","editor"],{enumDescriptions:[i.N("peekWidgetDefaultFocus.tree","Focus the tree when opening peek"),i.N("peekWidgetDefaultFocus.editor","Focus the editor when opening peek")],description:i.N("peekWidgetDefaultFocus","Controls whether to focus the inline editor or the tree in the peek widget.")})),definitionLinkOpensInPeek:D(new p(76,"definitionLinkOpensInPeek",!1,{description:i.N("definitionLinkOpensInPeek","Controls whether the Go to Definition mouse gesture always opens the peek widget.")})),quickSuggestions:D(new class extends c{constructor(){const e={other:!0,comments:!1,strings:!1};super(77,"quickSuggestions",e,{anyOf:[{type:"boolean"},{type:"object",properties:{strings:{type:"boolean",default:e.strings,description:i.N("quickSuggestions.strings","Enable quick suggestions inside strings.")},comments:{type:"boolean",default:e.comments,description:i.N("quickSuggestions.comments","Enable quick suggestions inside comments.")},other:{type:"boolean",default:e.other,description:i.N("quickSuggestions.other","Enable quick suggestions outside of strings and comments.")}}}],default:e,description:i.N("quickSuggestions","Controls whether suggestions should automatically show up while typing.")}),this.defaultValue=e}validate(e){if("boolean"==typeof e)return e;if(e&&"object"==typeof e){const t=e,n={other:g(t.other,this.defaultValue.other),comments:g(t.comments,this.defaultValue.comments),strings:g(t.strings,this.defaultValue.strings)};return!!(n.other&&n.comments&&n.strings)||!!(n.other||n.comments||n.strings)&&n}return this.defaultValue}}),quickSuggestionsDelay:D(new m(78,"quickSuggestionsDelay",10,0,1073741824,{description:i.N("quickSuggestionsDelay","Controls the delay in milliseconds after which quick suggestions will show up.")})),readOnly:D(new p(79,"readOnly",!1)),renameOnType:D(new p(80,"renameOnType",!1,{description:i.N("renameOnType","Controls whether the editor auto renames on type."),markdownDeprecationMessage:i.N("renameOnTypeDeprecate","Deprecated, use `editor.linkedEditing` instead.")})),renderControlCharacters:D(new p(81,"renderControlCharacters",!1,{description:i.N("renderControlCharacters","Controls whether the editor should render control characters.")})),renderIndentGuides:D(new p(82,"renderIndentGuides",!0,{description:i.N("renderIndentGuides","Controls whether the editor should render indent guides.")})),renderFinalNewline:D(new p(83,"renderFinalNewline",!0,{description:i.N("renderFinalNewline","Render last line number when the file ends with a newline.")})),renderLineHighlight:D(new C(84,"renderLineHighlight","line",["none","gutter","line","all"],{enumDescriptions:["","","",i.N("renderLineHighlight.all","Highlights both the gutter and the current line.")],description:i.N("renderLineHighlight","Controls how the editor should render the current line highlight.")})),renderLineHighlightOnlyWhenFocus:D(new p(85,"renderLineHighlightOnlyWhenFocus",!1,{description:i.N("renderLineHighlightOnlyWhenFocus","Controls if the editor should render the current line highlight only when the editor is focused.")})),renderValidationDecorations:D(new C(86,"renderValidationDecorations","editable",["editable","on","off"])),renderWhitespace:D(new C(87,"renderWhitespace","selection",["none","boundary","selection","trailing","all"],{enumDescriptions:["",i.N("renderWhitespace.boundary","Render whitespace characters except for single spaces between words."),i.N("renderWhitespace.selection","Render whitespace characters only on selected text."),i.N("renderWhitespace.trailing","Render only trailing whitespace characters."),""],description:i.N("renderWhitespace","Controls how the editor should render whitespace characters.")})),revealHorizontalRightPadding:D(new m(88,"revealHorizontalRightPadding",30,0,1e3)),roundedSelection:D(new p(89,"roundedSelection",!0,{description:i.N("roundedSelection","Controls whether selections should have rounded corners.")})),rulers:D(new class extends c{constructor(){const e=[],t={type:"number",description:i.N("rulers.size","Number of monospace characters at which this editor ruler will render.")};super(90,"rulers",e,{type:"array",items:{anyOf:[t,{type:["object"],properties:{column:t,color:{type:"string",description:i.N("rulers.color","Color of this editor ruler."),format:"color-hex"}}}]},default:e,description:i.N("rulers","Render vertical rulers after a certain number of monospace characters. Use multiple values for multiple rulers. No rulers are drawn if array is empty.")})}validate(e){if(Array.isArray(e)){let t=[];for(let n of e)if("number"==typeof n)t.push({column:m.clampedInt(n,0,0,1e4),color:null});else if(n&&"object"==typeof n){const e=n;t.push({column:m.clampedInt(e.column,0,0,1e4),color:e.color})}return t.sort(((e,t)=>e.column-t.column)),t}return this.defaultValue}}),scrollbar:D(new class extends c{constructor(){const e={vertical:1,horizontal:1,arrowSize:11,useShadows:!0,verticalHasArrows:!1,horizontalHasArrows:!1,horizontalScrollbarSize:12,horizontalSliderSize:12,verticalScrollbarSize:14,verticalSliderSize:14,handleMouseWheel:!0,alwaysConsumeMouseWheel:!0,scrollByPage:!1};super(91,"scrollbar",e,{"editor.scrollbar.vertical":{type:"string",enum:["auto","visible","hidden"],enumDescriptions:[i.N("scrollbar.vertical.auto","The vertical scrollbar will be visible only when necessary."),i.N("scrollbar.vertical.visible","The vertical scrollbar will always be visible."),i.N("scrollbar.vertical.fit","The vertical scrollbar will always be hidden.")],default:"auto",description:i.N("scrollbar.vertical","Controls the visibility of the vertical scrollbar.")},"editor.scrollbar.horizontal":{type:"string",enum:["auto","visible","hidden"],enumDescriptions:[i.N("scrollbar.horizontal.auto","The horizontal scrollbar will be visible only when necessary."),i.N("scrollbar.horizontal.visible","The horizontal scrollbar will always be visible."),i.N("scrollbar.horizontal.fit","The horizontal scrollbar will always be hidden.")],default:"auto",description:i.N("scrollbar.horizontal","Controls the visibility of the horizontal scrollbar.")},"editor.scrollbar.verticalScrollbarSize":{type:"number",default:e.verticalScrollbarSize,description:i.N("scrollbar.verticalScrollbarSize","The width of the vertical scrollbar.")},"editor.scrollbar.horizontalScrollbarSize":{type:"number",default:e.horizontalScrollbarSize,description:i.N("scrollbar.horizontalScrollbarSize","The height of the horizontal scrollbar.")},"editor.scrollbar.scrollByPage":{type:"boolean",default:e.scrollByPage,description:i.N("scrollbar.scrollByPage","Controls whether clicks scroll by page or jump to click position.")}})}validate(e){if(!e||"object"!=typeof e)return this.defaultValue;const t=e,n=m.clampedInt(t.horizontalScrollbarSize,this.defaultValue.horizontalScrollbarSize,0,1e3),i=m.clampedInt(t.verticalScrollbarSize,this.defaultValue.verticalScrollbarSize,0,1e3);return{arrowSize:m.clampedInt(t.arrowSize,this.defaultValue.arrowSize,0,1e3),vertical:k(t.vertical,this.defaultValue.vertical),horizontal:k(t.horizontal,this.defaultValue.horizontal),useShadows:g(t.useShadows,this.defaultValue.useShadows),verticalHasArrows:g(t.verticalHasArrows,this.defaultValue.verticalHasArrows),horizontalHasArrows:g(t.horizontalHasArrows,this.defaultValue.horizontalHasArrows),handleMouseWheel:g(t.handleMouseWheel,this.defaultValue.handleMouseWheel),alwaysConsumeMouseWheel:g(t.alwaysConsumeMouseWheel,this.defaultValue.alwaysConsumeMouseWheel),horizontalScrollbarSize:n,horizontalSliderSize:m.clampedInt(t.horizontalSliderSize,n,0,1e3),verticalScrollbarSize:i,verticalSliderSize:m.clampedInt(t.verticalSliderSize,i,0,1e3),scrollByPage:g(t.scrollByPage,this.defaultValue.scrollByPage)}}}),scrollBeyondLastColumn:D(new m(92,"scrollBeyondLastColumn",5,0,1073741824,{description:i.N("scrollBeyondLastColumn","Controls the number of extra characters beyond which the editor will scroll horizontally.")})),scrollBeyondLastLine:D(new p(93,"scrollBeyondLastLine",!0,{description:i.N("scrollBeyondLastLine","Controls whether the editor will scroll beyond the last line.")})),scrollPredominantAxis:D(new p(94,"scrollPredominantAxis",!0,{description:i.N("scrollPredominantAxis","Scroll only along the predominant axis when scrolling both vertically and horizontally at the same time. Prevents horizontal drift when scrolling vertically on a trackpad.")})),selectionClipboard:D(new p(95,"selectionClipboard",!0,{description:i.N("selectionClipboard","Controls whether the Linux primary clipboard should be supported."),included:o.IJ})),selectionHighlight:D(new p(96,"selectionHighlight",!0,{description:i.N("selectionHighlight","Controls whether the editor should highlight matches similar to the selection.")})),selectOnLineNumbers:D(new p(97,"selectOnLineNumbers",!0)),showFoldingControls:D(new C(98,"showFoldingControls","mouseover",["always","mouseover"],{enumDescriptions:[i.N("showFoldingControls.always","Always show the folding controls."),i.N("showFoldingControls.mouseover","Only show the folding controls when the mouse is over the gutter.")],description:i.N("showFoldingControls","Controls when the folding controls on the gutter are shown.")})),showUnused:D(new p(99,"showUnused",!0,{description:i.N("showUnused","Controls fading out of unused code.")})),showDeprecated:D(new p(124,"showDeprecated",!0,{description:i.N("showDeprecated","Controls strikethrough deprecated variables.")})),inlayHints:D(new class extends c{constructor(){const e={enabled:!0,fontSize:0,fontFamily:""};super(125,"inlayHints",e,{"editor.inlayHints.enabled":{type:"boolean",default:e.enabled,description:i.N("inlayHints.enable","Enables the inlay hints in the editor.")},"editor.inlayHints.fontSize":{type:"number",default:e.fontSize,markdownDescription:i.N("inlayHints.fontSize","Controls font size of inlay hints in the editor. When set to `0`, the 90% of `#editor.fontSize#` is used.")},"editor.inlayHints.fontFamily":{type:"string",default:e.fontFamily,description:i.N("inlayHints.fontFamily","Controls font family of inlay hints in the editor. When set to empty, the `#editor.fontFamily#` is used.")}})}validate(e){if(!e||"object"!=typeof e)return this.defaultValue;const t=e;return{enabled:g(t.enabled,this.defaultValue.enabled),fontSize:m.clampedInt(t.fontSize,this.defaultValue.fontSize,0,100),fontFamily:_.string(t.fontFamily,this.defaultValue.fontFamily)}}}),snippetSuggestions:D(new C(100,"snippetSuggestions","inline",["top","bottom","inline","none"],{enumDescriptions:[i.N("snippetSuggestions.top","Show snippet suggestions on top of other suggestions."),i.N("snippetSuggestions.bottom","Show snippet suggestions below other suggestions."),i.N("snippetSuggestions.inline","Show snippets suggestions with other suggestions."),i.N("snippetSuggestions.none","Do not show snippet suggestions.")],description:i.N("snippetSuggestions","Controls whether snippets are shown with other suggestions and how they are sorted.")})),smartSelect:D(new class extends c{constructor(){super(101,"smartSelect",{selectLeadingAndTrailingWhitespace:!0},{"editor.smartSelect.selectLeadingAndTrailingWhitespace":{description:i.N("selectLeadingAndTrailingWhitespace","Whether leading and trailing whitespace should always be selected."),default:!0,type:"boolean"}})}validate(e){return e&&"object"==typeof e?{selectLeadingAndTrailingWhitespace:g(e.selectLeadingAndTrailingWhitespace,this.defaultValue.selectLeadingAndTrailingWhitespace)}:this.defaultValue}}),smoothScrolling:D(new p(102,"smoothScrolling",!1,{description:i.N("smoothScrolling","Controls whether the editor will scroll using an animation.")})),stopRenderingLineAfter:D(new m(104,"stopRenderingLineAfter",1e4,-1,1073741824)),suggest:D(new class extends c{constructor(){const e={insertMode:"insert",filterGraceful:!0,snippetsPreventQuickSuggestions:!0,localityBonus:!1,shareSuggestSelections:!1,showIcons:!0,showStatusBar:!1,preview:!1,previewMode:"subwordSmart",showInlineDetails:!0,showMethods:!0,showFunctions:!0,showConstructors:!0,showDeprecated:!0,showFields:!0,showVariables:!0,showClasses:!0,showStructs:!0,showInterfaces:!0,showModules:!0,showProperties:!0,showEvents:!0,showOperators:!0,showUnits:!0,showValues:!0,showConstants:!0,showEnums:!0,showEnumMembers:!0,showKeywords:!0,showWords:!0,showColors:!0,showFiles:!0,showReferences:!0,showFolders:!0,showTypeParameters:!0,showSnippets:!0,showUsers:!0,showIssues:!0};super(105,"suggest",e,{"editor.suggest.insertMode":{type:"string",enum:["insert","replace"],enumDescriptions:[i.N("suggest.insertMode.insert","Insert suggestion without overwriting text right of the cursor."),i.N("suggest.insertMode.replace","Insert suggestion and overwrite text right of the cursor.")],default:e.insertMode,description:i.N("suggest.insertMode","Controls whether words are overwritten when accepting completions. Note that this depends on extensions opting into this feature.")},"editor.suggest.filterGraceful":{type:"boolean",default:e.filterGraceful,description:i.N("suggest.filterGraceful","Controls whether filtering and sorting suggestions accounts for small typos.")},"editor.suggest.localityBonus":{type:"boolean",default:e.localityBonus,description:i.N("suggest.localityBonus","Controls whether sorting favors words that appear close to the cursor.")},"editor.suggest.shareSuggestSelections":{type:"boolean",default:e.shareSuggestSelections,markdownDescription:i.N("suggest.shareSuggestSelections","Controls whether remembered suggestion selections are shared between multiple workspaces and windows (needs `#editor.suggestSelection#`).")},"editor.suggest.snippetsPreventQuickSuggestions":{type:"boolean",default:e.snippetsPreventQuickSuggestions,description:i.N("suggest.snippetsPreventQuickSuggestions","Controls whether an active snippet prevents quick suggestions.")},"editor.suggest.showIcons":{type:"boolean",default:e.showIcons,description:i.N("suggest.showIcons","Controls whether to show or hide icons in suggestions.")},"editor.suggest.showStatusBar":{type:"boolean",default:e.showStatusBar,description:i.N("suggest.showStatusBar","Controls the visibility of the status bar at the bottom of the suggest widget.")},"editor.suggest.preview":{type:"boolean",default:e.preview,description:i.N("suggest.preview","Controls whether to preview the suggestion outcome in the editor.")},"editor.suggest.previewMode":{type:"string",enum:["prefix","subword","subwordSmart"],enumDescriptions:[i.N("suggest.previewMode.prefix","Only render a preview if the replace text is a prefix of the insert text."),i.N("suggest.previewMode.subword","Only render a preview if the replace text is a subword of the insert text."),i.N("suggest.previewMode.subwordSmart","Render a preview if the replace text is a subword of the insert text, or if it is a prefix of the insert text.")],default:e.previewMode,description:i.N("suggest.previewMode","Controls which mode to use for rendering the suggest preview.")},"editor.suggest.showInlineDetails":{type:"boolean",default:e.showInlineDetails,description:i.N("suggest.showInlineDetails","Controls whether suggest details show inline with the label or only in the details widget")},"editor.suggest.maxVisibleSuggestions":{type:"number",deprecationMessage:i.N("suggest.maxVisibleSuggestions.dep","This setting is deprecated. The suggest widget can now be resized.")},"editor.suggest.filteredTypes":{type:"object",deprecationMessage:i.N("deprecated","This setting is deprecated, please use separate settings like 'editor.suggest.showKeywords' or 'editor.suggest.showSnippets' instead.")},"editor.suggest.showMethods":{type:"boolean",default:!0,markdownDescription:i.N("editor.suggest.showMethods","When enabled IntelliSense shows `method`-suggestions.")},"editor.suggest.showFunctions":{type:"boolean",default:!0,markdownDescription:i.N("editor.suggest.showFunctions","When enabled IntelliSense shows `function`-suggestions.")},"editor.suggest.showConstructors":{type:"boolean",default:!0,markdownDescription:i.N("editor.suggest.showConstructors","When enabled IntelliSense shows `constructor`-suggestions.")},"editor.suggest.showDeprecated":{type:"boolean",default:!0,markdownDescription:i.N("editor.suggest.showDeprecated","When enabled IntelliSense shows `deprecated`-suggestions.")},"editor.suggest.showFields":{type:"boolean",default:!0,markdownDescription:i.N("editor.suggest.showFields","When enabled IntelliSense shows `field`-suggestions.")},"editor.suggest.showVariables":{type:"boolean",default:!0,markdownDescription:i.N("editor.suggest.showVariables","When enabled IntelliSense shows `variable`-suggestions.")},"editor.suggest.showClasses":{type:"boolean",default:!0,markdownDescription:i.N("editor.suggest.showClasss","When enabled IntelliSense shows `class`-suggestions.")},"editor.suggest.showStructs":{type:"boolean",default:!0,markdownDescription:i.N("editor.suggest.showStructs","When enabled IntelliSense shows `struct`-suggestions.")},"editor.suggest.showInterfaces":{type:"boolean",default:!0,markdownDescription:i.N("editor.suggest.showInterfaces","When enabled IntelliSense shows `interface`-suggestions.")},"editor.suggest.showModules":{type:"boolean",default:!0,markdownDescription:i.N("editor.suggest.showModules","When enabled IntelliSense shows `module`-suggestions.")},"editor.suggest.showProperties":{type:"boolean",default:!0,markdownDescription:i.N("editor.suggest.showPropertys","When enabled IntelliSense shows `property`-suggestions.")},"editor.suggest.showEvents":{type:"boolean",default:!0,markdownDescription:i.N("editor.suggest.showEvents","When enabled IntelliSense shows `event`-suggestions.")},"editor.suggest.showOperators":{type:"boolean",default:!0,markdownDescription:i.N("editor.suggest.showOperators","When enabled IntelliSense shows `operator`-suggestions.")},"editor.suggest.showUnits":{type:"boolean",default:!0,markdownDescription:i.N("editor.suggest.showUnits","When enabled IntelliSense shows `unit`-suggestions.")},"editor.suggest.showValues":{type:"boolean",default:!0,markdownDescription:i.N("editor.suggest.showValues","When enabled IntelliSense shows `value`-suggestions.")},"editor.suggest.showConstants":{type:"boolean",default:!0,markdownDescription:i.N("editor.suggest.showConstants","When enabled IntelliSense shows `constant`-suggestions.")},"editor.suggest.showEnums":{type:"boolean",default:!0,markdownDescription:i.N("editor.suggest.showEnums","When enabled IntelliSense shows `enum`-suggestions.")},"editor.suggest.showEnumMembers":{type:"boolean",default:!0,markdownDescription:i.N("editor.suggest.showEnumMembers","When enabled IntelliSense shows `enumMember`-suggestions.")},"editor.suggest.showKeywords":{type:"boolean",default:!0,markdownDescription:i.N("editor.suggest.showKeywords","When enabled IntelliSense shows `keyword`-suggestions.")},"editor.suggest.showWords":{type:"boolean",default:!0,markdownDescription:i.N("editor.suggest.showTexts","When enabled IntelliSense shows `text`-suggestions.")},"editor.suggest.showColors":{type:"boolean",default:!0,markdownDescription:i.N("editor.suggest.showColors","When enabled IntelliSense shows `color`-suggestions.")},"editor.suggest.showFiles":{type:"boolean",default:!0,markdownDescription:i.N("editor.suggest.showFiles","When enabled IntelliSense shows `file`-suggestions.")},"editor.suggest.showReferences":{type:"boolean",default:!0,markdownDescription:i.N("editor.suggest.showReferences","When enabled IntelliSense shows `reference`-suggestions.")},"editor.suggest.showCustomcolors":{type:"boolean",default:!0,markdownDescription:i.N("editor.suggest.showCustomcolors","When enabled IntelliSense shows `customcolor`-suggestions.")},"editor.suggest.showFolders":{type:"boolean",default:!0,markdownDescription:i.N("editor.suggest.showFolders","When enabled IntelliSense shows `folder`-suggestions.")},"editor.suggest.showTypeParameters":{type:"boolean",default:!0,markdownDescription:i.N("editor.suggest.showTypeParameters","When enabled IntelliSense shows `typeParameter`-suggestions.")},"editor.suggest.showSnippets":{type:"boolean",default:!0,markdownDescription:i.N("editor.suggest.showSnippets","When enabled IntelliSense shows `snippet`-suggestions.")},"editor.suggest.showUsers":{type:"boolean",default:!0,markdownDescription:i.N("editor.suggest.showUsers","When enabled IntelliSense shows `user`-suggestions.")},"editor.suggest.showIssues":{type:"boolean",default:!0,markdownDescription:i.N("editor.suggest.showIssues","When enabled IntelliSense shows `issues`-suggestions.")}})}validate(e){if(!e||"object"!=typeof e)return this.defaultValue;const t=e;return{insertMode:b(t.insertMode,this.defaultValue.insertMode,["insert","replace"]),filterGraceful:g(t.filterGraceful,this.defaultValue.filterGraceful),snippetsPreventQuickSuggestions:g(t.snippetsPreventQuickSuggestions,this.defaultValue.filterGraceful),localityBonus:g(t.localityBonus,this.defaultValue.localityBonus),shareSuggestSelections:g(t.shareSuggestSelections,this.defaultValue.shareSuggestSelections),showIcons:g(t.showIcons,this.defaultValue.showIcons),showStatusBar:g(t.showStatusBar,this.defaultValue.showStatusBar),preview:g(t.preview,this.defaultValue.preview),previewMode:b(t.previewMode,this.defaultValue.previewMode,["prefix","subword","subwordSmart"]),showInlineDetails:g(t.showInlineDetails,this.defaultValue.showInlineDetails),showMethods:g(t.showMethods,this.defaultValue.showMethods),showFunctions:g(t.showFunctions,this.defaultValue.showFunctions),showConstructors:g(t.showConstructors,this.defaultValue.showConstructors),showDeprecated:g(t.showDeprecated,this.defaultValue.showDeprecated),showFields:g(t.showFields,this.defaultValue.showFields),showVariables:g(t.showVariables,this.defaultValue.showVariables),showClasses:g(t.showClasses,this.defaultValue.showClasses),showStructs:g(t.showStructs,this.defaultValue.showStructs),showInterfaces:g(t.showInterfaces,this.defaultValue.showInterfaces),showModules:g(t.showModules,this.defaultValue.showModules),showProperties:g(t.showProperties,this.defaultValue.showProperties),showEvents:g(t.showEvents,this.defaultValue.showEvents),showOperators:g(t.showOperators,this.defaultValue.showOperators),showUnits:g(t.showUnits,this.defaultValue.showUnits),showValues:g(t.showValues,this.defaultValue.showValues),showConstants:g(t.showConstants,this.defaultValue.showConstants),showEnums:g(t.showEnums,this.defaultValue.showEnums),showEnumMembers:g(t.showEnumMembers,this.defaultValue.showEnumMembers),showKeywords:g(t.showKeywords,this.defaultValue.showKeywords),showWords:g(t.showWords,this.defaultValue.showWords),showColors:g(t.showColors,this.defaultValue.showColors),showFiles:g(t.showFiles,this.defaultValue.showFiles),showReferences:g(t.showReferences,this.defaultValue.showReferences),showFolders:g(t.showFolders,this.defaultValue.showFolders),showTypeParameters:g(t.showTypeParameters,this.defaultValue.showTypeParameters),showSnippets:g(t.showSnippets,this.defaultValue.showSnippets),showUsers:g(t.showUsers,this.defaultValue.showUsers),showIssues:g(t.showIssues,this.defaultValue.showIssues)}}}),inlineSuggest:D(new class extends c{constructor(){const e={enabled:!1,mode:"subwordSmart"};super(53,"inlineSuggest",e,{"editor.inlineSuggest.enabled":{type:"boolean",default:e.enabled,description:i.N("inlineSuggest.enabled","Controls whether to automatically show inline suggestions in the editor.")},"editor.inlineSuggest.mode":{type:"string",enum:["prefix","subword","subwordSmart"],enumDescriptions:[i.N("inlineSuggest.mode.prefix","Only render an inline suggestion if the replace text is a prefix of the insert text."),i.N("inlineSuggest.mode.subword","Only render an inline suggestion if the replace text is a subword of the insert text."),i.N("inlineSuggest.mode.subwordSmart","Only render an inline suggestion if the replace text is a subword of the insert text, but the subword must start after the cursor.")],default:e.mode,description:i.N("inlineSuggest.mode","Controls which mode to use for rendering inline suggestions.")}})}validate(e){if(!e||"object"!=typeof e)return this.defaultValue;const t=e;return{enabled:g(t.enabled,this.defaultValue.enabled),mode:b(t.mode,this.defaultValue.mode,["prefix","subword","subwordSmart"])}}}),suggestFontSize:D(new m(106,"suggestFontSize",0,0,1e3,{markdownDescription:i.N("suggestFontSize","Font size for the suggest widget. When set to `0`, the value of `#editor.fontSize#` is used.")})),suggestLineHeight:D(new m(107,"suggestLineHeight",0,0,1e3,{markdownDescription:i.N("suggestLineHeight","Line height for the suggest widget. When set to `0`, the value of `#editor.lineHeight#` is used. The minimum value is 8.")})),suggestOnTriggerCharacters:D(new p(108,"suggestOnTriggerCharacters",!0,{description:i.N("suggestOnTriggerCharacters","Controls whether suggestions should automatically show up when typing trigger characters.")})),suggestSelection:D(new C(109,"suggestSelection","recentlyUsed",["first","recentlyUsed","recentlyUsedByPrefix"],{markdownEnumDescriptions:[i.N("suggestSelection.first","Always select the first suggestion."),i.N("suggestSelection.recentlyUsed","Select recent suggestions unless further typing selects one, e.g. `console.| -> console.log` because `log` has been completed recently."),i.N("suggestSelection.recentlyUsedByPrefix","Select suggestions based on previous prefixes that have completed those suggestions, e.g. `co -> console` and `con -> const`.")],description:i.N("suggestSelection","Controls how suggestions are pre-selected when showing the suggest list.")})),tabCompletion:D(new C(110,"tabCompletion","off",["on","off","onlySnippets"],{enumDescriptions:[i.N("tabCompletion.on","Tab complete will insert the best matching suggestion when pressing tab."),i.N("tabCompletion.off","Disable tab completions."),i.N("tabCompletion.onlySnippets","Tab complete snippets when their prefix match. Works best when 'quickSuggestions' aren't enabled.")],description:i.N("tabCompletion","Enables tab completions.")})),tabIndex:D(new m(111,"tabIndex",0,-1,1073741824)),unusualLineTerminators:D(new C(112,"unusualLineTerminators","prompt",["auto","off","prompt"],{enumDescriptions:[i.N("unusualLineTerminators.auto","Unusual line terminators are automatically removed."),i.N("unusualLineTerminators.off","Unusual line terminators are ignored."),i.N("unusualLineTerminators.prompt","Unusual line terminators prompt to be removed.")],description:i.N("unusualLineTerminators","Remove unusual line terminators that might cause problems.")})),useShadowDOM:D(new p(113,"useShadowDOM",!0)),useTabStops:D(new p(114,"useTabStops",!0,{description:i.N("useTabStops","Inserting and deleting whitespace follows tab stops.")})),wordSeparators:D(new _(115,"wordSeparators",r.vu,{description:i.N("wordSeparators","Characters that will be used as word separators when doing word related navigations or operations.")})),wordWrap:D(new C(116,"wordWrap","off",["off","on","wordWrapColumn","bounded"],{markdownEnumDescriptions:[i.N("wordWrap.off","Lines will never wrap."),i.N("wordWrap.on","Lines will wrap at the viewport width."),i.N({key:"wordWrap.wordWrapColumn",comment:["- `editor.wordWrapColumn` refers to a different setting and should not be localized."]},"Lines will wrap at `#editor.wordWrapColumn#`."),i.N({key:"wordWrap.bounded",comment:["- viewport means the edge of the visible window size.","- `editor.wordWrapColumn` refers to a different setting and should not be localized."]},"Lines will wrap at the minimum of viewport and `#editor.wordWrapColumn#`.")],description:i.N({key:"wordWrap",comment:["- 'off', 'on', 'wordWrapColumn' and 'bounded' refer to values the setting can take and should not be localized.","- `editor.wordWrapColumn` refers to a different setting and should not be localized."]},"Controls how lines should wrap.")})),wordWrapBreakAfterCharacters:D(new _(117,"wordWrapBreakAfterCharacters"," \t})]?|/&.,;¢°′″‰℃、。。、¢,.:;?!%・・ゝゞヽヾーァィゥェォッャュョヮヵヶぁぃぅぇぉっゃゅょゎゕゖㇰㇱㇲㇳㇴㇵㇶㇷㇸㇹㇺㇻㇼㇽㇾㇿ々〻ァィゥェォャュョッー”〉》」』】〕)]}」")),wordWrapBreakBeforeCharacters:D(new _(118,"wordWrapBreakBeforeCharacters","([{‘“〈《「『【〔([{「£¥$£¥++")),wordWrapColumn:D(new m(119,"wordWrapColumn",80,1,1073741824,{markdownDescription:i.N({key:"wordWrapColumn",comment:["- `editor.wordWrap` refers to a different setting and should not be localized.","- 'wordWrapColumn' and 'bounded' refer to values the different setting can take and should not be localized."]},"Controls the wrapping column of the editor when `#editor.wordWrap#` is `wordWrapColumn` or `bounded`.")})),wordWrapOverride1:D(new C(120,"wordWrapOverride1","inherit",["off","on","inherit"])),wordWrapOverride2:D(new C(121,"wordWrapOverride2","inherit",["off","on","inherit"])),wrappingIndent:D(new v(122,"wrappingIndent",1,"same",["none","same","indent","deepIndent"],(function(e){switch(e){case"none":return 0;case"same":return 1;case"indent":return 2;case"deepIndent":return 3}}),{enumDescriptions:[i.N("wrappingIndent.none","No indentation. Wrapped lines begin at column 1."),i.N("wrappingIndent.same","Wrapped lines get the same indentation as the parent."),i.N("wrappingIndent.indent","Wrapped lines get +1 indentation toward the parent."),i.N("wrappingIndent.deepIndent","Wrapped lines get +2 indentation toward the parent.")],description:i.N("wrappingIndent","Controls the indentation of wrapped lines.")})),wrappingStrategy:D(new C(123,"wrappingStrategy","simple",["simple","advanced"],{enumDescriptions:[i.N("wrappingStrategy.simple","Assumes that all characters are of the same width. This is a fast algorithm that works correctly for monospace fonts and certain scripts (like Latin characters) where glyphs are of equal width."),i.N("wrappingStrategy.advanced","Delegates wrapping points computation to the browser. This is a slow algorithm, that might cause freezes for large files, but it works correctly in all cases.")],description:i.N("wrappingStrategy","Controls the algorithm that computes wrapping points.")})),editorClassName:D(new class extends h{constructor(){super(126,[64,31])}compute(e,t,n){const i=["monaco-editor"];return t.get(31)&&i.push(t.get(31)),e.extraEditorClassName&&i.push(e.extraEditorClassName),"default"===t.get(64)?i.push("mouse-default"):"copy"===t.get(64)&&i.push("mouse-copy"),t.get(99)&&i.push("showUnused"),t.get(124)&&i.push("showDeprecated"),i.join(" ")}}),pixelRatio:D(new class extends h{constructor(){super(127)}compute(e,t,n){return e.pixelRatio}}),tabFocusMode:D(new class extends h{constructor(){super(128,[79])}compute(e,t,n){return!!t.get(79)||e.tabFocusMode}}),layoutInfo:D(new S),wrappingInfo:D(new class extends h{constructor(){super(130,[129])}compute(e,t,n){const i=t.get(129);return{isDominatedByLongLines:e.isDominatedByLongLines,isWordWrapMinified:i.isWordWrapMinified,isViewportWrapping:i.isViewportWrapping,wrappingColumn:i.wrappingColumn}}})}},2334:(e,t,n)=>{"use strict";n.d(t,{C:()=>o});var i=n(4669);const o=new class{constructor(){this._zoomLevel=0,this._onDidChangeZoomLevel=new i.Q5,this.onDidChangeZoomLevel=this._onDidChangeZoomLevel.event}getZoomLevel(){return this._zoomLevel}setZoomLevel(e){e=Math.min(Math.max(-5,e),20),this._zoomLevel!==e&&(this._zoomLevel=e,this._onDidChangeZoomLevel.fire(this._zoomLevel))}}},7374:(e,t,n)=>{"use strict";n.d(t,{E4:()=>s,pR:()=>a});var i=n(1432),o=n(2334);const r=i.dz?1.5:1.35;class s{constructor(e){this._bareFontInfoBrand=void 0,this.zoomLevel=e.zoomLevel,this.pixelRatio=e.pixelRatio,this.fontFamily=String(e.fontFamily),this.fontWeight=String(e.fontWeight),this.fontSize=e.fontSize,this.fontFeatureSettings=e.fontFeatureSettings,this.lineHeight=0|e.lineHeight,this.letterSpacing=e.letterSpacing}static createFromValidatedSettings(e,t,n,i){const o=e.get(40),r=e.get(44),a=e.get(43),l=e.get(42),d=e.get(57),c=e.get(54);return s._create(o,r,a,l,d,c,t,n,i)}static _create(e,t,n,i,a,l,d,c,h){0===a?a=r*n:a<8&&(a*=n),(a=Math.round(a))<8&&(a=8);const u=1+(h?0:.1*o.C.getZoomLevel());return new s({zoomLevel:d,pixelRatio:c,fontFamily:e,fontWeight:t,fontSize:n*=u,fontFeatureSettings:i,lineHeight:a*=u,letterSpacing:l})}getId(){return this.zoomLevel+"-"+this.pixelRatio+"-"+this.fontFamily+"-"+this.fontWeight+"-"+this.fontSize+"-"+this.fontFeatureSettings+"-"+this.lineHeight+"-"+this.letterSpacing}getMassagedFontFamily(){return/[,"']/.test(this.fontFamily)?this.fontFamily:/[+ ]/.test(this.fontFamily)?`"${this.fontFamily}"`:this.fontFamily}}class a extends s{constructor(e,t){super(e),this._editorStylingBrand=void 0,this.version=1,this.isTrusted=t,this.isMonospace=e.isMonospace,this.typicalHalfwidthCharacterWidth=e.typicalHalfwidthCharacterWidth,this.typicalFullwidthCharacterWidth=e.typicalFullwidthCharacterWidth,this.canUseHalfwidthRightwardsArrow=e.canUseHalfwidthRightwardsArrow,this.spaceWidth=e.spaceWidth,this.middotWidth=e.middotWidth,this.wsmiddotWidth=e.wsmiddotWidth,this.maxDigitWidth=e.maxDigitWidth}equals(e){return this.fontFamily===e.fontFamily&&this.fontWeight===e.fontWeight&&this.fontSize===e.fontSize&&this.fontFeatureSettings===e.fontFeatureSettings&&this.lineHeight===e.lineHeight&&this.letterSpacing===e.letterSpacing&&this.typicalHalfwidthCharacterWidth===e.typicalHalfwidthCharacterWidth&&this.typicalFullwidthCharacterWidth===e.typicalFullwidthCharacterWidth&&this.canUseHalfwidthRightwardsArrow===e.canUseHalfwidthRightwardsArrow&&this.spaceWidth===e.spaceWidth&&this.middotWidth===e.middotWidth&&this.wsmiddotWidth===e.wsmiddotWidth&&this.maxDigitWidth===e.maxDigitWidth}}},3675:(e,t,n)=>{"use strict";n.d(t,{l:()=>o});var i=n(3181);class o{static whitespaceVisibleColumn(e,t,n){const o=e.length;let r=0,s=-1,a=-1;for(let l=0;l{"use strict";n.d(t,{LM:()=>g,rS:()=>p,zp:()=>m,Vi:()=>b,Tp:()=>C,io:()=>v,LN:()=>w});var i=n(7301),o=n(7295),r=n(187),s=n(4314),a=n(3860),l=n(3103),d=n(3831);const c=()=>!0,h=()=>!1,u=e=>" "===e||"\t"===e;class g{constructor(e,t,n){this._cursorMoveConfigurationBrand=void 0,this._languageIdentifier=e;const i=n.options,o=i.get(129);this.readOnly=i.get(79),this.tabSize=t.tabSize,this.indentSize=t.indentSize,this.insertSpaces=t.insertSpaces,this.stickyTabStops=i.get(103),this.lineHeight=i.get(57),this.pageSize=Math.max(1,Math.floor(o.height/this.lineHeight)-2),this.useTabStops=i.get(114),this.wordSeparators=i.get(115),this.emptySelectionClipboard=i.get(30),this.copyWithSyntaxHighlighting=i.get(19),this.multiCursorMergeOverlapping=i.get(67),this.multiCursorPaste=i.get(69),this.autoClosingBrackets=i.get(5),this.autoClosingQuotes=i.get(8),this.autoClosingDelete=i.get(6),this.autoClosingOvertype=i.get(7),this.autoSurround=i.get(11),this.autoIndent=i.get(9),this.surroundingPairs={},this._electricChars=null,this.shouldAutoCloseBefore={quote:g._getShouldAutoClose(e,this.autoClosingQuotes),bracket:g._getShouldAutoClose(e,this.autoClosingBrackets)},this.autoClosingPairs=d.zu.getAutoClosingPairs(e.id);let r=g._getSurroundingPairs(e);if(r)for(const e of r)this.surroundingPairs[e.open]=e.close}static shouldRecreate(e){return e.hasChanged(129)||e.hasChanged(115)||e.hasChanged(30)||e.hasChanged(67)||e.hasChanged(69)||e.hasChanged(5)||e.hasChanged(8)||e.hasChanged(6)||e.hasChanged(7)||e.hasChanged(11)||e.hasChanged(114)||e.hasChanged(57)||e.hasChanged(79)}get electricChars(){if(!this._electricChars){this._electricChars={};let e=g._getElectricCharacters(this._languageIdentifier);if(e)for(const t of e)this._electricChars[t]=!0}return this._electricChars}normalizeIndentation(e){return l.yO.normalizeIndentation(e,this.indentSize,this.insertSpaces)}static _getElectricCharacters(e){try{return d.zu.getElectricCharacters(e.id)}catch(e){return(0,i.dL)(e),null}}static _getShouldAutoClose(e,t){switch(t){case"beforeWhitespace":return u;case"languageDefined":return g._getLanguageDefinedShouldAutoClose(e);case"always":return c;case"never":return h}}static _getLanguageDefinedShouldAutoClose(e){try{const t=d.zu.getAutoCloseBeforeSet(e.id);return e=>-1!==t.indexOf(e)}catch(e){return(0,i.dL)(e),h}}static _getSurroundingPairs(e){try{return d.zu.getSurroundingPairs(e.id)}catch(e){return(0,i.dL)(e),null}}}class p{constructor(e,t,n,i){this._singleCursorStateBrand=void 0,this.selectionStart=e,this.selectionStartLeftoverVisibleColumns=t,this.position=n,this.leftoverVisibleColumns=i,this.selection=p._computeSelection(this.selectionStart,this.position)}equals(e){return this.selectionStartLeftoverVisibleColumns===e.selectionStartLeftoverVisibleColumns&&this.leftoverVisibleColumns===e.leftoverVisibleColumns&&this.position.equals(e.position)&&this.selectionStart.equalsRange(e.selectionStart)}hasSelection(){return!this.selection.isEmpty()||!this.selectionStart.isEmpty()}move(e,t,n,i){return e?new p(this.selectionStart,this.selectionStartLeftoverVisibleColumns,new r.L(t,n),i):new p(new s.e(t,n,t,n),i,new r.L(t,n),i)}static _computeSelection(e,t){let n,i,o,r;return e.isEmpty()?(n=e.startLineNumber,i=e.startColumn,o=t.lineNumber,r=t.column):t.isBeforeOrEqual(e.getStartPosition())?(n=e.endLineNumber,i=e.endColumn,o=t.lineNumber,r=t.column):(n=e.startLineNumber,i=e.startColumn,o=t.lineNumber,r=t.column),new a.Y(n,i,o,r)}}class m{constructor(e,t,n,i){this._cursorContextBrand=void 0,this.model=e,this.viewModel=t,this.coordinatesConverter=n,this.cursorConfig=i}}class f{constructor(e){this.modelState=e,this.viewState=null}}class _{constructor(e){this.modelState=null,this.viewState=e}}class b{constructor(e,t){this._cursorStateBrand=void 0,this.modelState=e,this.viewState=t}static fromModelState(e){return new f(e)}static fromViewState(e){return new _(e)}static fromModelSelection(e){const t=e.selectionStartLineNumber,n=e.selectionStartColumn,i=e.positionLineNumber,o=e.positionColumn,a=new p(new s.e(t,n,t,n),0,new r.L(i,o),0);return b.fromModelState(a)}static fromModelSelections(e){let t=[];for(let n=0,i=e.length;n=65536?2:1,9===t)s=v.nextRenderTabStop(s,n);else{let n=o.S6(t);for(;a=65536?2:1,n=i}o.K7(t)||o.C8(t)?s+=2:s+=1}}return s}static visibleColumnsByColumns(e,t){const n=e.length;let i=new Array;i.push(-1);let r=0,s=0;for(;s=65536?2:1,i.push(r),a>=65536&&i.push(r),9===a)r=v.nextRenderTabStop(r,t);else{let t=o.S6(a);for(;s=65536?2:1,i.push(r),a>=65536&&i.push(r),t=d}o.K7(a)||o.C8(a)?r+=2:r+=1}}return i.push(r),i}static visibleColumnFromColumn2(e,t,n){return this.visibleColumnFromColumn(t.getLineContent(n.lineNumber),n.column,e.tabSize)}static columnFromVisibleColumn(e,t,n){if(t<=0)return 1;const i=e.length;let r=0,s=1,a=0;for(;a=65536?2:1,9===l)d=v.nextRenderTabStop(r,n);else{let t=o.S6(l);for(;a=65536?2:1,t=r}d=o.K7(l)||o.C8(l)?r+2:r+1}const c=a+1;if(d>=t)return d-ts?s:o}static nextRenderTabStop(e,t){return e+t-e%t}static nextIndentTabStop(e,t){return e+t-e%t}static prevRenderTabStop(e,t){return Math.max(0,e-1-(e-1)%t)}static prevIndentTabStop(e,t){return Math.max(0,e-1-(e-1)%t)}}function w(e){return"'"===e||'"'===e||"`"===e}},1380:(e,t,n)=>{"use strict";n.d(t,{A:()=>d});var i=n(7295),o=n(1329),r=n(3181),s=n(8784),a=n(4314),l=n(187);class d{static deleteRight(e,t,n,i){let r=[],l=3!==e;for(let e=0,d=i.length;e=h.length+1)return!1;const u=h.charAt(c.column-2),g=i.get(u);if(!g)return!1;if((0,r.LN)(u)){if("never"===n)return!1}else if("never"===t)return!1;const p=h.charAt(c.column-1);let m=!1;for(const e of g)e.open===u&&e.close===p&&(m=!0);if(!m)return!1;if("auto"===e){let e=!1;for(let t=0,n=a.length;t1){const e=t.getLineContent(o.lineNumber),s=i.LC(e),l=-1===s?e.length+1:s+1;if(o.column<=l){const e=r.io.visibleColumnFromColumn2(n,t,o),i=r.io.prevIndentTabStop(e,n.indentSize),s=r.io.columnFromVisibleColumn2(n,t,o.lineNumber,i);return new a.e(o.lineNumber,s,o.lineNumber,o.column)}}return a.e.fromPositions(d.getPositionAfterDeleteLeft(o,t),o)}static getPositionAfterDeleteLeft(e,t){if(e.column>1){const n=i.oH(e.column-1,t.getLineContent(e.lineNumber));return e.with(void 0,n+1)}if(e.lineNumber>1){const n=e.lineNumber-1;return new l.L(n,t.getLineMaxColumn(n))}return e}static cut(e,t,n){let i=[];for(let r=0,s=n.length;r1?(e=c.lineNumber-1,n=t.getLineMaxColumn(c.lineNumber-1),l=c.lineNumber,d=t.getLineMaxColumn(c.lineNumber)):(e=c.lineNumber,n=1,l=c.lineNumber,d=t.getLineMaxColumn(c.lineNumber));let h=new a.e(e,n,l,d);h.isEmpty()?i[r]=null:i[r]=new o.T4(h,"")}else i[r]=null;else i[r]=new o.T4(s,"")}return new r.Tp(0,i,{shouldPushStackElementBefore:!0,shouldPushStackElementAfter:!0})}}},3814:(e,t,n)=>{"use strict";n.d(t,{P:()=>c,N:()=>i});var i,o=n(8401),r=n(3181),s=n(8784),a=n(5795),l=n(187),d=n(4314);class c{static addCursorDown(e,t,n){let i=[],o=0;for(let a=0,l=t.length;at&&(n=t,i=e.model.getLineMaxColumn(n)),r.Vi.fromModelState(new r.rS(new d.e(s.lineNumber,1,n,i),0,new l.L(n,i),0))}const c=t.modelState.selectionStart.getStartPosition().lineNumber;if(s.lineNumberc){const n=e.getLineCount();let i=a.lineNumber+1,o=1;return i>n&&(i=n,o=e.getLineMaxColumn(i)),r.Vi.fromViewState(t.viewState.move(t.modelState.hasSelection(),i,o,0))}{const e=t.modelState.selectionStart.getEndPosition();return r.Vi.fromModelState(t.modelState.move(t.modelState.hasSelection(),e.lineNumber,e.column,0))}}static word(e,t,n,i){const o=e.model.validatePosition(i);return r.Vi.fromModelState(a.w.word(e.cursorConfig,e.model,t.modelState,n,o))}static cancelSelection(e,t){if(!t.modelState.hasSelection())return new r.Vi(t.modelState,t.viewState);const n=t.viewState.position.lineNumber,i=t.viewState.position.column;return r.Vi.fromViewState(new r.rS(new d.e(n,i,n,i),0,new l.L(n,i),0))}static moveTo(e,t,n,i,o){const s=e.model.validatePosition(i),a=o?e.coordinatesConverter.validateViewPosition(new l.L(o.lineNumber,o.column),s):e.coordinatesConverter.convertModelPositionToViewPosition(s);return r.Vi.fromViewState(t.viewState.move(n,a.lineNumber,a.column,0))}static simpleMove(e,t,n,i,o,a){switch(n){case 0:return 4===a?this._moveHalfLineLeft(e,t,i):this._moveLeft(e,t,i,o);case 1:return 4===a?this._moveHalfLineRight(e,t,i):this._moveRight(e,t,i,o);case 2:return 2===a?this._moveUpByViewLines(e,t,i,o):this._moveUpByModelLines(e,t,i,o);case 3:return 2===a?this._moveDownByViewLines(e,t,i,o):this._moveDownByModelLines(e,t,i,o);case 4:return 2===a?t.map((t=>r.Vi.fromViewState(s.o.moveToPrevBlankLine(e.cursorConfig,e,t.viewState,i)))):t.map((t=>r.Vi.fromModelState(s.o.moveToPrevBlankLine(e.cursorConfig,e.model,t.modelState,i))));case 5:return 2===a?t.map((t=>r.Vi.fromViewState(s.o.moveToNextBlankLine(e.cursorConfig,e,t.viewState,i)))):t.map((t=>r.Vi.fromModelState(s.o.moveToNextBlankLine(e.cursorConfig,e.model,t.modelState,i))));case 6:return this._moveToViewMinColumn(e,t,i);case 7:return this._moveToViewFirstNonWhitespaceColumn(e,t,i);case 8:return this._moveToViewCenterColumn(e,t,i);case 9:return this._moveToViewMaxColumn(e,t,i);case 10:return this._moveToViewLastNonWhitespaceColumn(e,t,i);default:return null}}static viewportMove(e,t,n,i,o){const r=e.getCompletelyVisibleViewRange(),s=e.coordinatesConverter.convertViewRangeToModelRange(r);switch(n){case 11:{const n=this._firstLineNumberInRange(e.model,s,o),r=e.model.getLineFirstNonWhitespaceColumn(n);return[this._moveToModelPosition(e,t[0],i,n,r)]}case 13:{const n=this._lastLineNumberInRange(e.model,s,o),r=e.model.getLineFirstNonWhitespaceColumn(n);return[this._moveToModelPosition(e,t[0],i,n,r)]}case 12:{const n=Math.round((s.startLineNumber+s.endLineNumber)/2),o=e.model.getLineFirstNonWhitespaceColumn(n);return[this._moveToModelPosition(e,t[0],i,n,o)]}case 14:{let n=[];for(let o=0,s=t.length;on.endLineNumber-1&&(o=n.endLineNumber-1),or.Vi.fromViewState(s.o.moveLeft(e.cursorConfig,e,t.viewState,n,i))))}static _moveHalfLineLeft(e,t,n){let i=[];for(let o=0,a=t.length;or.Vi.fromViewState(s.o.moveRight(e.cursorConfig,e,t.viewState,n,i))))}static _moveHalfLineRight(e,t,n){let i=[];for(let o=0,a=t.length;o{"use strict";n.d(t,{o:()=>d});var i=n(3181),o=n(187),r=n(4314),s=n(7295),a=n(3675);class l{constructor(e,t,n){this._cursorPositionBrand=void 0,this.lineNumber=e,this.column=t,this.leftoverVisibleColumns=n}}class d{static leftPosition(e,t){if(t.column>e.getLineMinColumn(t.lineNumber))return t.delta(void 0,-s.HO(e.getLineContent(t.lineNumber),t.column-1));if(t.lineNumber>1){const n=t.lineNumber-1;return new o.L(n,e.getLineMaxColumn(n))}return t}static leftPositionAtomicSoftTabs(e,t,n){if(t.column<=e.getLineIndentColumn(t.lineNumber)){const i=e.getLineMinColumn(t.lineNumber),r=e.getLineContent(t.lineNumber),s=a.l.atomicPosition(r,t.column-1,n,0);if(-1!==s&&s+1>=i)return new o.L(t.lineNumber,s+1)}return this.leftPosition(e,t)}static left(e,t,n){const i=e.stickyTabStops?d.leftPositionAtomicSoftTabs(t,n,e.tabSize):d.leftPosition(t,n);return new l(i.lineNumber,i.column,0)}static moveLeft(e,t,n,i,o){let r,s;if(n.hasSelection()&&!i)r=n.selection.startLineNumber,s=n.selection.startColumn;else{const i=n.position.delta(void 0,-(o-1)),a=t.normalizePosition(d.clipPositionColumn(i,t),0),l=d.left(e,t,a);r=l.lineNumber,s=l.column}return n.move(i,r,s,0)}static clipPositionColumn(e,t){return new o.L(e.lineNumber,d.clipRange(e.column,t.getLineMinColumn(e.lineNumber),t.getLineMaxColumn(e.lineNumber)))}static clipRange(e,t,n){return en?n:e}static rightPosition(e,t,n){return nc?(n=c,o=a?t.getLineMaxColumn(n):Math.min(t.getLineMaxColumn(n),o)):o=i.io.columnFromVisibleColumn2(e,t,n,d),r=h?0:d-i.io.visibleColumnFromColumn(t.getLineContent(n),o,e.tabSize),new l(n,o,r)}static moveDown(e,t,n,i,o){let r,s;n.hasSelection()&&!i?(r=n.selection.endLineNumber,s=n.selection.endColumn):(r=n.position.lineNumber,s=n.position.column);let a=d.down(e,t,r,s,n.leftoverVisibleColumns,o,!0);return n.move(i,a.lineNumber,a.column,a.leftoverVisibleColumns)}static translateDown(e,t,n){let s=n.selection,a=d.down(e,t,s.selectionStartLineNumber,s.selectionStartColumn,n.selectionStartLeftoverVisibleColumns,1,!1),l=d.down(e,t,s.positionLineNumber,s.positionColumn,n.leftoverVisibleColumns,1,!1);return new i.rS(new r.e(a.lineNumber,a.column,a.lineNumber,a.column),a.leftoverVisibleColumns,new o.L(l.lineNumber,l.column),l.leftoverVisibleColumns)}static up(e,t,n,o,r,s,a){const d=i.io.visibleColumnFromColumn(t.getLineContent(n),o,e.tabSize)+r,c=1===n&&1===o;return(n-=s)<1?(n=1,o=a?t.getLineMinColumn(n):Math.min(t.getLineMaxColumn(n),o)):o=i.io.columnFromVisibleColumn2(e,t,n,d),r=c?0:d-i.io.visibleColumnFromColumn(t.getLineContent(n),o,e.tabSize),new l(n,o,r)}static moveUp(e,t,n,i,o){let r,s;n.hasSelection()&&!i?(r=n.selection.startLineNumber,s=n.selection.startColumn):(r=n.position.lineNumber,s=n.position.column);let a=d.up(e,t,r,s,n.leftoverVisibleColumns,o,!0);return n.move(i,a.lineNumber,a.column,a.leftoverVisibleColumns)}static translateUp(e,t,n){let s=n.selection,a=d.up(e,t,s.selectionStartLineNumber,s.selectionStartColumn,n.selectionStartLeftoverVisibleColumns,1,!1),l=d.up(e,t,s.positionLineNumber,s.positionColumn,n.leftoverVisibleColumns,1,!1);return new i.rS(new r.e(a.lineNumber,a.column,a.lineNumber,a.column),a.leftoverVisibleColumns,new o.L(l.lineNumber,l.column),l.leftoverVisibleColumns)}static _isBlankLine(e,t){return 0===e.getLineFirstNonWhitespaceColumn(t)}static moveToPrevBlankLine(e,t,n,i){let o=n.position.lineNumber;for(;o>1&&this._isBlankLine(t,o);)o--;for(;o>1&&!this._isBlankLine(t,o);)o--;return n.move(i,o,t.getLineMinColumn(o),0)}static moveToNextBlankLine(e,t,n,i){const o=t.getLineCount();let r=n.position.lineNumber;for(;r{"use strict";n.d(t,{u:()=>p,g:()=>m});var i=n(7301),o=n(7295),r=n(1329),s=n(291),a=n(4314),l=n(3860);class d{constructor(e,t,n){this._range=e,this._charBeforeSelection=t,this._charAfterSelection=n}getEditOperations(e,t){t.addTrackedEditOperation(new a.e(this._range.startLineNumber,this._range.startColumn,this._range.startLineNumber,this._range.startColumn),this._charBeforeSelection),t.addTrackedEditOperation(new a.e(this._range.endLineNumber,this._range.endColumn,this._range.endLineNumber,this._range.endColumn),this._charAfterSelection)}computeCursorState(e,t){let n=t.getInverseEditOperations(),i=n[0].range,o=n[1].range;return new l.Y(i.endLineNumber,i.endColumn,o.endLineNumber,o.endColumn-this._charAfterSelection.length)}}var c=n(3181),h=n(9410),u=n(7354),g=n(3831);class p{static indent(e,t,n){if(null===t||null===n)return[];let i=[];for(let t=0,o=n.length;t1){let i;for(i=n-1;i>=1;i--){const e=t.getLineContent(i);if(o.ow(e)>=0)break}if(i<1)return null;const s=t.getLineMaxColumn(i),l=g.zu.getEnterAction(e.autoIndent,t,new a.e(i,s,i,s));l&&(r=l.indentation+l.appendText)}return i&&(i===u.wU.Indent&&(r=p.shiftIndent(e,r)),i===u.wU.Outdent&&(r=p.unshiftIndent(e,r)),r=e.normalizeIndentation(r)),r||null}static _replaceJumpToNextIndent(e,t,n,i){let o="",s=n.getStartPosition();if(e.insertSpaces){let n=c.io.visibleColumnFromColumn2(e,t,s),i=e.indentSize,r=i-n%i;for(let e=0;ethis._compositionType(n,e,o,r,s,a)));return new c.Tp(4,l,{shouldPushStackElementBefore:_(e,4),shouldPushStackElementAfter:!1})}static _compositionType(e,t,n,i,o,s){if(!t.isEmpty())return null;const l=t.getPosition(),d=Math.max(1,l.column-i),c=Math.min(e.getLineMaxColumn(l.lineNumber),l.column+o),h=new a.e(l.lineNumber,d,l.lineNumber,c);return e.getValueInRange(h)===n&&0===s?null:new r.Uo(h,n,0,s)}static _typeCommand(e,t,n){return n?new r.Sj(e,t,!0):new r.T4(e,t,!0)}static _enter(e,t,n,i){if(0===e.autoIndent)return p._typeCommand(i,"\n",n);if(!t.isCheapToTokenize(i.getStartPosition().lineNumber)||1===e.autoIndent){let r=t.getLineContent(i.startLineNumber),s=o.V8(r).substring(0,i.startColumn-1);return p._typeCommand(i,"\n"+e.normalizeIndentation(s),n)}const s=g.zu.getEnterAction(e.autoIndent,t,i);if(s){if(s.indentAction===u.wU.None)return p._typeCommand(i,"\n"+e.normalizeIndentation(s.indentation+s.appendText),n);if(s.indentAction===u.wU.Indent)return p._typeCommand(i,"\n"+e.normalizeIndentation(s.indentation+s.appendText),n);if(s.indentAction===u.wU.IndentOutdent){const t=e.normalizeIndentation(s.indentation),o=e.normalizeIndentation(s.indentation+s.appendText),a="\n"+o+"\n"+t;return n?new r.Sj(i,a,!0):new r.Uo(i,a,-1,o.length-t.length,!0)}if(s.indentAction===u.wU.Outdent){const t=p.unshiftIndent(e,s.indentation);return p._typeCommand(i,"\n"+e.normalizeIndentation(t+s.appendText),n)}}const a=t.getLineContent(i.startLineNumber),l=o.V8(a).substring(0,i.startColumn-1);if(e.autoIndent>=4){const s=g.zu.getIndentForEnter(e.autoIndent,t,i,{unshiftIndent:t=>p.unshiftIndent(e,t),shiftIndent:t=>p.shiftIndent(e,t),normalizeIndentation:t=>e.normalizeIndentation(t)});if(s){let a=c.io.visibleColumnFromColumn2(e,t,i.getEndPosition());const l=i.endColumn,d=t.getLineContent(i.endLineNumber),h=o.LC(d);if(i=h>=0?i.setEndPosition(i.endLineNumber,Math.max(i.endColumn,h+1)):i.setEndPosition(i.endLineNumber,t.getLineMaxColumn(i.endLineNumber)),n)return new r.Sj(i,"\n"+e.normalizeIndentation(s.afterEnter),!0);{let t=0;return l<=h+1&&(e.insertSpaces||(a=Math.ceil(a/e.indentSize)),t=Math.min(a+1-e.normalizeIndentation(s.afterEnter).length-1,0)),new r.Uo(i,"\n"+e.normalizeIndentation(s.afterEnter),0,t,!0)}}}return p._typeCommand(i,"\n"+e.normalizeIndentation(l),n)}static _isAutoIndentType(e,t,n){if(e.autoIndent<4)return!1;for(let e=0,i=n.length;ep.shiftIndent(e,t),unshiftIndent:t=>p.unshiftIndent(e,t)});if(null===r)return null;if(r!==e.normalizeIndentation(o)){const o=t.getLineFirstNonWhitespaceColumn(n.startLineNumber);return 0===o?p._typeCommand(new a.e(n.startLineNumber,1,n.endLineNumber,n.endColumn),e.normalizeIndentation(r)+i,!1):p._typeCommand(new a.e(n.startLineNumber,1,n.endLineNumber,n.endColumn),e.normalizeIndentation(r)+t.getLineContent(n.startLineNumber).substring(o-1,n.startColumn-1)+i,!1)}return null}static _isAutoClosingOvertype(e,t,n,i,o){if("never"===e.autoClosingOvertype)return!1;if(!e.autoClosingPairs.autoClosingPairsCloseSingleChar.has(o))return!1;for(let r=0,s=n.length;r2?l.charCodeAt(a.column-2):0)&&d)return!1;if("auto"===e.autoClosingOvertype){let e=!1;for(let t=0,n=i.length;tt.startsWith(e.open))),s=o.some((e=>t.startsWith(e.close)));return!r&&s}static _findAutoClosingPairOpen(e,t,n,i){const o=e.autoClosingPairs.autoClosingPairsOpenByEnd.get(i);if(!o)return null;let r=null;for(const e of o)if(null===r||e.open.length>r.open.length){let o=!0;for(const r of n)if(t.getValueInRange(new a.e(r.lineNumber,r.column-e.open.length+1,r.lineNumber,r.column))+i!==e.open){o=!1;break}o&&(r=e)}return r}static _findSubAutoClosingPairClose(e,t){if(t.open.length<=1)return"";const n=t.close.charAt(t.close.length-1),i=e.autoClosingPairs.autoClosingPairsCloseByEnd.get(n)||[];let o=null;for(const e of i)e.open!==t.open&&t.open.includes(e.open)&&t.close.endsWith(e.close)&&(!o||e.open.length>o.open.length)&&(o=e);return o?o.close:""}static _getAutoClosingPairClose(e,t,n,o,r){const s=(0,c.LN)(o),a=s?e.autoClosingQuotes:e.autoClosingBrackets;if("never"===a)return null;const l=this._findAutoClosingPairOpen(e,t,n.map((e=>e.getPosition())),o);if(!l)return null;const d=this._findSubAutoClosingPairClose(e,l);let u=!0;const m=s?e.shouldAutoCloseBefore.quote:e.shouldAutoCloseBefore.bracket;for(let o=0,c=n.length;of.column-1){const t=_.charAt(f.column-1);if(!p._isBeforeClosingBrace(e,b)&&!m(t))return null}if(!t.isCheapToTokenize(f.lineNumber))return null;if(1===l.open.length&&s&&"always"!==a){const t=(0,h.u)(e.wordSeparators);if(r&&f.column>1&&0===t.get(_.charCodeAt(f.column-2)))return null;if(!r&&f.column>2&&0===t.get(_.charCodeAt(f.column-3)))return null}t.forceTokenization(f.lineNumber);const C=t.getLineTokens(f.lineNumber);let v=!1;try{v=g.zu.shouldAutoClosePair(l,C,r?f.column:f.column-1)}catch(e){(0,i.dL)(e)}if(!v)return null}return u?l.close.substring(0,l.close.length-d.length):l.close}static _runAutoClosingOpenCharType(e,t,n,i,o,r,s){let a=[];for(let e=0,t=i.length;enew r.T4(new a.e(e.positionLineNumber,e.positionColumn,e.positionLineNumber,e.positionColumn+1),"",!1)));return new c.Tp(4,e,{shouldPushStackElementBefore:!0,shouldPushStackElementAfter:!1})}const h=this._getAutoClosingPairClose(t,n,o,d,!1);return null!==h?this._runAutoClosingOpenCharType(e,t,n,o,d,!1,h):null}static typeWithInterceptors(e,t,n,i,o,s,a){if(!e&&"\n"===a){let e=[];for(let t=0,r=o.length;t{"use strict";n.d(t,{w:()=>d,L:()=>c});var i=n(7295),o=n(3181),r=n(1380),s=n(9410),a=n(187),l=n(4314);class d{static _createWord(e,t,n,i,o){return{start:i,end:o,wordType:t,nextCharClass:n}}static _findPreviousWordOnLine(e,t,n){let i=t.getLineContent(n.lineNumber);return this._doFindPreviousWordOnLine(i,e,n)}static _doFindPreviousWordOnLine(e,t,n){let i=0;for(let o=n.column-2;o>=0;o--){let n=e.charCodeAt(o),r=t.get(n);if(0===r){if(2===i)return this._createWord(e,i,r,o+1,this._findEndOfWord(e,t,i,o+1));i=1}else if(2===r){if(1===i)return this._createWord(e,i,r,o+1,this._findEndOfWord(e,t,i,o+1));i=2}else if(1===r&&0!==i)return this._createWord(e,i,r,o+1,this._findEndOfWord(e,t,i,o+1))}return 0!==i?this._createWord(e,i,1,0,this._findEndOfWord(e,t,i,0)):null}static _findEndOfWord(e,t,n,i){let o=e.length;for(let r=i;r=0;o--){let i=e.charCodeAt(o),r=t.get(i);if(1===r)return o+1;if(1===n&&2===r)return o+1;if(2===n&&0===r)return o+1}return 0}static moveWordLeft(e,t,n,i){let o=n.lineNumber,r=n.column;1===r&&o>1&&(o-=1,r=t.getLineMaxColumn(o));let s=d._findPreviousWordOnLine(e,t,new a.L(o,r));if(0===i)return new a.L(o,s?s.start+1:1);if(1===i)return s&&2===s.wordType&&s.end-s.start==1&&0===s.nextCharClass&&(s=d._findPreviousWordOnLine(e,t,new a.L(o,s.start+1))),new a.L(o,s?s.start+1:1);if(3===i){for(;s&&2===s.wordType;)s=d._findPreviousWordOnLine(e,t,new a.L(o,s.start+1));return new a.L(o,s?s.start+1:1)}return s&&r<=s.end+1&&(s=d._findPreviousWordOnLine(e,t,new a.L(o,s.start+1))),new a.L(o,s?s.end+1:1)}static _moveWordPartLeft(e,t){const n=t.lineNumber,o=e.getLineMaxColumn(n);if(1===t.column)return n>1?new a.L(n-1,e.getLineMaxColumn(n-1)):t;const r=e.getLineContent(n);for(let e=t.column-1;e>1;e--){const t=r.charCodeAt(e-2),s=r.charCodeAt(e-1);if(95===t&&95!==s)return new a.L(n,e);if(i.mK(t)&&i.df(s))return new a.L(n,e);if(i.df(t)&&i.df(s)&&e+1=l.start+1&&(l=d._findNextWordOnLine(e,t,new a.L(o,l.end+1))),r=l?l.start+1:t.getLineMaxColumn(o);return new a.L(o,r)}static _moveWordPartRight(e,t){const n=t.lineNumber,o=e.getLineMaxColumn(n);if(t.column===o)return n1?u=1:(h--,u=i.getLineMaxColumn(h)):(g&&u<=g.end+1&&(g=d._findPreviousWordOnLine(n,i,new a.L(h,g.start+1))),g?u=g.end+1:u>1?u=1:(h--,u=i.getLineMaxColumn(h))),new l.e(h,u,c.lineNumber,c.column)}static deleteInsideWord(e,t,n){if(!n.isEmpty())return n;const i=new a.L(n.positionLineNumber,n.positionColumn);return this._deleteInsideWordWhitespace(t,i)||this._deleteInsideWordDetermineDeleteRange(e,t,i)}static _charAtIsWhitespace(e,t){const n=e.charCodeAt(t);return 32===n||9===n}static _deleteInsideWordWhitespace(e,t){const n=e.getLineContent(t.lineNumber),i=n.length;if(0===i)return null;let o=Math.max(t.column-2,0);if(!this._charAtIsWhitespace(n,o))return null;let r=Math.min(t.column-1,i-1);if(!this._charAtIsWhitespace(n,r))return null;for(;o>0&&this._charAtIsWhitespace(n,o-1);)o--;for(;r+11?new l.e(n.lineNumber-1,t.getLineMaxColumn(n.lineNumber-1),n.lineNumber,1):n.lineNumbere.start+1<=n.column&&n.column<=e.end+1,s=(e,t)=>(e=Math.min(e,n.column),t=Math.max(t,n.column),new l.e(n.lineNumber,e,n.lineNumber,t)),a=e=>{let t=e.start+1,n=e.end+1,r=!1;for(;n-11&&this._charAtIsWhitespace(i,t-2);)t--;return s(t,n)},c=d._findPreviousWordOnLine(e,t,n);if(c&&r(c))return a(c);const h=d._findNextWordOnLine(e,t,n);return h&&r(h)?a(h):c&&h?s(c.end+1,h.start+1):c?s(c.start+1,c.end+1):h?s(h.start+1,h.end+1):s(1,o+1)}static _deleteWordPartLeft(e,t){if(!t.isEmpty())return t;const n=t.getPosition(),i=d._moveWordPartLeft(e,n);return new l.e(n.lineNumber,n.column,i.lineNumber,i.column)}static _findFirstNonWhitespaceChar(e,t){let n=e.length;for(let i=t;i=p.start+1&&(p=d._findNextWordOnLine(n,i,new a.L(c,p.end+1))),p?h=p.start+1:hBoolean(e)))}},9410:(e,t,n)=>{"use strict";n.d(t,{u:()=>r});var i=n(4906);class o extends i.N{constructor(e){super(0);for(let t=0,n=e.length;t(t.hasOwnProperty(e)||(t[e]=(e=>new o(e))(e)),t[e])}()},4906:(e,t,n)=>{"use strict";n.d(t,{N:()=>o,q:()=>r});var i=n(5427);class o{constructor(e){let t=(0,i.K)(e);this._defaultValue=t,this._asciiMap=o._createAsciiMap(t),this._map=new Map}static _createAsciiMap(e){let t=new Uint8Array(256);for(let n=0;n<256;n++)t[n]=e;return t}set(e,t){let n=(0,i.K)(t);e>=0&&e<256?this._asciiMap[e]=n:this._map.set(e,n)}get(e){return e>=0&&e<256?this._asciiMap[e]:this._map.get(e)||this._defaultValue}}class r{constructor(){this._actual=new o(0)}add(e){this._actual.set(e,1)}has(e){return 1===this._actual.get(e)}}},9386:(e,t,n)=>{"use strict";n.d(t,{h:()=>o});var i=n(4314);class o{static insert(e,t){return{range:new i.e(e.lineNumber,e.column,e.lineNumber,e.column),text:t,forceMoveMarkers:!0}}static delete(e){return{range:e,text:null}}static replace(e,t){return{range:e,text:t}}static replaceMove(e,t){return{range:e,text:t,forceMoveMarkers:!0}}}},8411:(e,t,n)=>{"use strict";n.d(t,{A:()=>o});var i=n(4101);class o{constructor(e,t){this._lineTokensBrand=void 0,this._tokens=e,this._tokensCount=this._tokens.length>>>1,this._text=t}static createEmpty(e){const t=o.defaultTokenMetadata,n=new Uint32Array(2);return n[0]=e.length,n[1]=t,new o(n,e)}equals(e){return e instanceof o&&this.slicedEquals(e,0,this._tokensCount)}slicedEquals(e,t,n){if(this._text!==e._text)return!1;if(this._tokensCount!==e._tokensCount)return!1;const i=t<<1,o=i+(n<<1);for(let t=i;t0?this._tokens[e-1<<1]:0}getMetadata(e){return this._tokens[1+(e<<1)]}getLanguageId(e){const t=this._tokens[1+(e<<1)];return i.NX.getLanguageId(t)}getStandardTokenType(e){const t=this._tokens[1+(e<<1)];return i.NX.getTokenType(t)}getForeground(e){const t=this._tokens[1+(e<<1)];return i.NX.getForeground(t)}getClassName(e){const t=this._tokens[1+(e<<1)];return i.NX.getClassNameFromMetadata(t)}getInlineStyle(e,t){const n=this._tokens[1+(e<<1)];return i.NX.getInlineStyleFromMetadata(n,t)}getEndOffset(e){return this._tokens[e<<1]}findTokenIndexAtOffset(e){return o.findIndexInTokensArray(this._tokens,e)}inflate(){return this}sliceAndInflate(e,t,n){return new r(this,e,t,n)}static convertToEndOffset(e,t){const n=(e.length>>>1)-1;for(let t=0;t>>1)-1;for(;nt&&(i=o)}return n}withInserted(e){if(0===e.length)return this;let t=0,n=0,i="";const r=new Array;let s=0;for(;;){let o=ts){i+=this._text.substring(s,a.offset);const e=this._tokens[1+(t<<1)];r.push(i.length,e),s=a.offset}i+=a.text,r.push(i.length,a.tokenMetadata),n++}}return new o(new Uint32Array(r),i)}}o.defaultTokenMetadata=16793600;class r{constructor(e,t,n,i){this._source=e,this._startOffset=t,this._endOffset=n,this._deltaOffset=i,this._firstTokenIndex=e.findTokenIndexAtOffset(t),this._tokensCount=0;for(let t=this._firstTokenIndex,i=e.getCount();t=n);t++)this._tokensCount++}equals(e){return e instanceof r&&this._startOffset===e._startOffset&&this._endOffset===e._endOffset&&this._deltaOffset===e._deltaOffset&&this._source.slicedEquals(e._source,this._firstTokenIndex,this._tokensCount)}getCount(){return this._tokensCount}getForeground(e){return this._source.getForeground(this._firstTokenIndex+e)}getEndOffset(e){const t=this._source.getEndOffset(this._firstTokenIndex+e);return Math.min(this._endOffset,t)-this._startOffset+this._deltaOffset}getClassName(e){return this._source.getClassName(this._firstTokenIndex+e)}getInlineStyle(e,t){return this._source.getInlineStyle(this._firstTokenIndex+e,t)}findTokenIndexAtOffset(e){return this._source.findTokenIndexAtOffset(e+this._startOffset-this._deltaOffset)-this._firstTokenIndex}}},187:(e,t,n)=>{"use strict";n.d(t,{L:()=>i});class i{constructor(e,t){this.lineNumber=e,this.column=t}with(e=this.lineNumber,t=this.column){return e===this.lineNumber&&t===this.column?this:new i(e,t)}delta(e=0,t=0){return this.with(this.lineNumber+e,this.column+t)}equals(e){return i.equals(this,e)}static equals(e,t){return!e&&!t||!!e&&!!t&&e.lineNumber===t.lineNumber&&e.column===t.column}isBefore(e){return i.isBefore(this,e)}static isBefore(e,t){return e.lineNumber{"use strict";n.d(t,{e:()=>o});var i=n(187);class o{constructor(e,t,n,i){e>n||e===n&&t>i?(this.startLineNumber=n,this.startColumn=i,this.endLineNumber=e,this.endColumn=t):(this.startLineNumber=e,this.startColumn=t,this.endLineNumber=n,this.endColumn=i)}isEmpty(){return o.isEmpty(this)}static isEmpty(e){return e.startLineNumber===e.endLineNumber&&e.startColumn===e.endColumn}containsPosition(e){return o.containsPosition(this,e)}static containsPosition(e,t){return!(t.lineNumbere.endLineNumber||t.lineNumber===e.startLineNumber&&t.columne.endColumn)}containsRange(e){return o.containsRange(this,e)}static containsRange(e,t){return!(t.startLineNumbere.endLineNumber||t.endLineNumber>e.endLineNumber||t.startLineNumber===e.startLineNumber&&t.startColumne.endColumn)}strictContainsRange(e){return o.strictContainsRange(this,e)}static strictContainsRange(e,t){return!(t.startLineNumbere.endLineNumber||t.endLineNumber>e.endLineNumber||t.startLineNumber===e.startLineNumber&&t.startColumn<=e.startColumn||t.endLineNumber===e.endLineNumber&&t.endColumn>=e.endColumn)}plusRange(e){return o.plusRange(this,e)}static plusRange(e,t){let n,i,r,s;return t.startLineNumbere.endLineNumber?(r=t.endLineNumber,s=t.endColumn):t.endLineNumber===e.endLineNumber?(r=t.endLineNumber,s=Math.max(t.endColumn,e.endColumn)):(r=e.endLineNumber,s=e.endColumn),new o(n,i,r,s)}intersectRanges(e){return o.intersectRanges(this,e)}static intersectRanges(e,t){let n=e.startLineNumber,i=e.startColumn,r=e.endLineNumber,s=e.endColumn,a=t.startLineNumber,l=t.startColumn,d=t.endLineNumber,c=t.endColumn;return nd?(r=d,s=c):r===d&&(s=Math.min(s,c)),n>r||n===r&&i>s?null:new o(n,i,r,s)}equalsRange(e){return o.equalsRange(this,e)}static equalsRange(e,t){return!!e&&!!t&&e.startLineNumber===t.startLineNumber&&e.startColumn===t.startColumn&&e.endLineNumber===t.endLineNumber&&e.endColumn===t.endColumn}getEndPosition(){return o.getEndPosition(this)}static getEndPosition(e){return new i.L(e.endLineNumber,e.endColumn)}getStartPosition(){return o.getStartPosition(this)}static getStartPosition(e){return new i.L(e.startLineNumber,e.startColumn)}toString(){return"["+this.startLineNumber+","+this.startColumn+" -> "+this.endLineNumber+","+this.endColumn+"]"}setEndPosition(e,t){return new o(this.startLineNumber,this.startColumn,e,t)}setStartPosition(e,t){return new o(e,t,this.endLineNumber,this.endColumn)}collapseToStart(){return o.collapseToStart(this)}static collapseToStart(e){return new o(e.startLineNumber,e.startColumn,e.startLineNumber,e.startColumn)}static fromPositions(e,t=e){return new o(e.lineNumber,e.column,t.lineNumber,t.column)}static lift(e){return e?new o(e.startLineNumber,e.startColumn,e.endLineNumber,e.endColumn):null}static isIRange(e){return e&&"number"==typeof e.startLineNumber&&"number"==typeof e.startColumn&&"number"==typeof e.endLineNumber&&"number"==typeof e.endColumn}static areIntersectingOrTouching(e,t){return!(e.endLineNumbere.startLineNumber}}},3860:(e,t,n)=>{"use strict";n.d(t,{Y:()=>r});var i=n(187),o=n(4314);class r extends o.e{constructor(e,t,n,i){super(e,t,n,i),this.selectionStartLineNumber=e,this.selectionStartColumn=t,this.positionLineNumber=n,this.positionColumn=i}toString(){return"["+this.selectionStartLineNumber+","+this.selectionStartColumn+" -> "+this.positionLineNumber+","+this.positionColumn+"]"}equalsSelection(e){return r.selectionsEqual(this,e)}static selectionsEqual(e,t){return e.selectionStartLineNumber===t.selectionStartLineNumber&&e.selectionStartColumn===t.selectionStartColumn&&e.positionLineNumber===t.positionLineNumber&&e.positionColumn===t.positionColumn}getDirection(){return this.selectionStartLineNumber===this.startLineNumber&&this.selectionStartColumn===this.startColumn?0:1}setEndPosition(e,t){return 0===this.getDirection()?new r(this.startLineNumber,this.startColumn,e,t):new r(e,t,this.startLineNumber,this.startColumn)}getPosition(){return new i.L(this.positionLineNumber,this.positionColumn)}setStartPosition(e,t){return 0===this.getDirection()?new r(e,t,this.endLineNumber,this.endColumn):new r(this.endLineNumber,this.endColumn,e,t)}static fromPositions(e,t=e){return new r(e.lineNumber,e.column,t.lineNumber,t.column)}static liftSelection(e){return new r(e.selectionStartLineNumber,e.selectionStartColumn,e.positionLineNumber,e.positionColumn)}static selectionsArrEqual(e,t){if(e&&!t||!e&&t)return!1;if(!e&&!t)return!0;if(e.length!==t.length)return!1;for(let n=0,i=e.length;n{"use strict";n.d(t,{oe:()=>c,lZ:()=>h,l$:()=>u,kH:()=>g});var i=n(7295),o=n(1432),r=n(3060);let s,a,l;function d(){return s||(s=new TextDecoder("UTF-16LE")),s}function c(){return l||(l=o.r()?d():(a||(a=new TextDecoder("UTF-16BE")),a)),l}const h="undefined"!=typeof TextDecoder;let u,g;function p(e,t,n){let i=[],o=0;for(let s=0;snew m(e),g=function(e,t,n){const i=new Uint16Array(e.buffer,t,n);return n>0&&(65279===i[0]||65534===i[0])?p(e,t,n):d().decode(i)}):(u=e=>new f,g=p);class m{constructor(e){this._capacity=0|e,this._buffer=new Uint16Array(this._capacity),this._completedStrings=null,this._bufferLength=0}reset(){this._completedStrings=null,this._bufferLength=0}build(){return null!==this._completedStrings?(this._flushBuffer(),this._completedStrings.join("")):this._buildBuffer()}_buildBuffer(){if(0===this._bufferLength)return"";const e=new Uint16Array(this._buffer.buffer,0,this._bufferLength);return c().decode(e)}_flushBuffer(){const e=this._buildBuffer();this._bufferLength=0,null===this._completedStrings?this._completedStrings=[e]:this._completedStrings[this._completedStrings.length]=e}write1(e){const t=this._capacity-this._bufferLength;t<=1&&(0===t||i.ZG(e))&&this._flushBuffer(),this._buffer[this._bufferLength++]=e}appendASCII(e){this._bufferLength===this._capacity&&this._flushBuffer(),this._buffer[this._bufferLength++]=e}appendASCIIString(e){const t=e.length;if(this._bufferLength+t>=this._capacity)return this._flushBuffer(),void(this._completedStrings[this._completedStrings.length]=e);for(let n=0;n{"use strict";n.d(t,{WU:()=>i,hG:()=>o,Hi:()=>r});class i{constructor(e,t,n){this._tokenBrand=void 0,this.offset=0|e,this.type=t,this.language=n}toString(){return"("+this.offset+", "+this.type+")"}}class o{constructor(e,t){this._tokenizationResultBrand=void 0,this.tokens=e,this.endState=t}}class r{constructor(e,t){this._tokenizationResult2Brand=void 0,this.tokens=e,this.endState=t}}},653:(e,t,n)=>{"use strict";n.d(t,{p:()=>i});class i{constructor(e,t,n,i,o,r){this.id=e,this.label=t,this.alias=n,this._precondition=i,this._run=o,this._contextKeyService=r}isSupported(){return this._contextKeyService.contextMatchesRules(this._precondition)}run(){return this.isSupported()?this._run():Promise.resolve(void 0)}}},6518:(e,t,n)=>{"use strict";function i(e){return e&&"string"==typeof e.id}n.d(t,{I:()=>i,g:()=>o});const o={ICodeEditor:"vs.editor.ICodeEditor",IDiffEditor:"vs.editor.IDiffEditor"}},9102:(e,t,n)=>{"use strict";n.d(t,{u:()=>i});var i,o=n(3580),r=n(8819);!function(e){e.editorSimpleInput=new r.uy("editorSimpleInput",!1,!0),e.editorTextFocus=new r.uy("editorTextFocus",!1,o.N("editorTextFocus","Whether the editor text has focus (cursor is blinking)")),e.focus=new r.uy("editorFocus",!1,o.N("editorFocus","Whether the editor or an editor widget has focus (e.g. focus is in the find widget)")),e.textInputFocus=new r.uy("textInputFocus",!1,o.N("textInputFocus","Whether an editor or a rich text input has focus (cursor is blinking)")),e.readOnly=new r.uy("editorReadonly",!1,o.N("editorReadonly","Whether the editor is read only")),e.inDiffEditor=new r.uy("inDiffEditor",!1,o.N("inDiffEditor","Whether the context is a diff editor")),e.columnSelection=new r.uy("editorColumnSelection",!1,o.N("editorColumnSelection","Whether `editor.columnSelection` is enabled")),e.writable=e.readOnly.toNegated(),e.hasNonEmptySelection=new r.uy("editorHasSelection",!1,o.N("editorHasSelection","Whether the editor has text selected")),e.hasOnlyEmptySelection=e.hasNonEmptySelection.toNegated(),e.hasMultipleSelections=new r.uy("editorHasMultipleSelections",!1,o.N("editorHasMultipleSelections","Whether the editor has multiple selections")),e.hasSingleSelection=e.hasMultipleSelections.toNegated(),e.tabMovesFocus=new r.uy("editorTabMovesFocus",!1,o.N("editorTabMovesFocus","Whether `Tab` will move focus out of the editor")),e.tabDoesNotMoveFocus=e.tabMovesFocus.toNegated(),e.isInWalkThroughSnippet=new r.uy("isInEmbeddedEditor",!1,!0),e.canUndo=new r.uy("canUndo",!1,!0),e.canRedo=new r.uy("canRedo",!1,!0),e.hoverVisible=new r.uy("editorHoverVisible",!1,o.N("editorHoverVisible","Whether the editor hover is visible")),e.inCompositeEditor=new r.uy("inCompositeEditor",void 0,o.N("inCompositeEditor","Whether the editor is part of a larger editor (e.g. notebooks)")),e.notInCompositeEditor=e.inCompositeEditor.toNegated(),e.languageId=new r.uy("editorLangId","",o.N("editorLangId","The language identifier of the editor")),e.hasCompletionItemProvider=new r.uy("editorHasCompletionItemProvider",!1,o.N("editorHasCompletionItemProvider","Whether the editor has a completion item provider")),e.hasCodeActionsProvider=new r.uy("editorHasCodeActionsProvider",!1,o.N("editorHasCodeActionsProvider","Whether the editor has a code actions provider")),e.hasCodeLensProvider=new r.uy("editorHasCodeLensProvider",!1,o.N("editorHasCodeLensProvider","Whether the editor has a code lens provider")),e.hasDefinitionProvider=new r.uy("editorHasDefinitionProvider",!1,o.N("editorHasDefinitionProvider","Whether the editor has a definition provider")),e.hasDeclarationProvider=new r.uy("editorHasDeclarationProvider",!1,o.N("editorHasDeclarationProvider","Whether the editor has a declaration provider")),e.hasImplementationProvider=new r.uy("editorHasImplementationProvider",!1,o.N("editorHasImplementationProvider","Whether the editor has an implementation provider")),e.hasTypeDefinitionProvider=new r.uy("editorHasTypeDefinitionProvider",!1,o.N("editorHasTypeDefinitionProvider","Whether the editor has a type definition provider")),e.hasHoverProvider=new r.uy("editorHasHoverProvider",!1,o.N("editorHasHoverProvider","Whether the editor has a hover provider")),e.hasDocumentHighlightProvider=new r.uy("editorHasDocumentHighlightProvider",!1,o.N("editorHasDocumentHighlightProvider","Whether the editor has a document highlight provider")),e.hasDocumentSymbolProvider=new r.uy("editorHasDocumentSymbolProvider",!1,o.N("editorHasDocumentSymbolProvider","Whether the editor has a document symbol provider")),e.hasReferenceProvider=new r.uy("editorHasReferenceProvider",!1,o.N("editorHasReferenceProvider","Whether the editor has a reference provider")),e.hasRenameProvider=new r.uy("editorHasRenameProvider",!1,o.N("editorHasRenameProvider","Whether the editor has a rename provider")),e.hasSignatureHelpProvider=new r.uy("editorHasSignatureHelpProvider",!1,o.N("editorHasSignatureHelpProvider","Whether the editor has a signature help provider")),e.hasInlayHintsProvider=new r.uy("editorHasInlayHintsProvider",!1,o.N("editorHasInlayHintsProvider","Whether the editor has an inline hints provider")),e.hasDocumentFormattingProvider=new r.uy("editorHasDocumentFormattingProvider",!1,o.N("editorHasDocumentFormattingProvider","Whether the editor has a document formatting provider")),e.hasDocumentSelectionFormattingProvider=new r.uy("editorHasDocumentSelectionFormattingProvider",!1,o.N("editorHasDocumentSelectionFormattingProvider","Whether the editor has a document selection formatting provider")),e.hasMultipleDocumentFormattingProvider=new r.uy("editorHasMultipleDocumentFormattingProvider",!1,o.N("editorHasMultipleDocumentFormattingProvider","Whether the editor has multiple document formatting providers")),e.hasMultipleDocumentSelectionFormattingProvider=new r.uy("editorHasMultipleDocumentSelectionFormattingProvider",!1,o.N("editorHasMultipleDocumentSelectionFormattingProvider","Whether the editor has multiple document selection formatting providers"))}(i||(i={}))},4973:(e,t,n)=>{"use strict";var i,o;n.d(t,{sh:()=>i,F5:()=>o,dJ:()=>r,tk:()=>s,Qi:()=>a,je:()=>l}),function(e){e[e.Left=1]="Left",e[e.Center=2]="Center",e[e.Right=4]="Right",e[e.Full=7]="Full"}(i||(i={})),function(e){e[e.Inline=1]="Inline",e[e.Gutter=2]="Gutter"}(o||(o={}));class r{constructor(e){this._textModelResolvedOptionsBrand=void 0,this.tabSize=Math.max(1,0|e.tabSize),this.indentSize=0|e.tabSize,this.insertSpaces=Boolean(e.insertSpaces),this.defaultEOL=0|e.defaultEOL,this.trimAutoWhitespace=Boolean(e.trimAutoWhitespace)}equals(e){return this.tabSize===e.tabSize&&this.indentSize===e.indentSize&&this.insertSpaces===e.insertSpaces&&this.defaultEOL===e.defaultEOL&&this.trimAutoWhitespace===e.trimAutoWhitespace}createChangeEvent(e){return{tabSize:this.tabSize!==e.tabSize,indentSize:this.indentSize!==e.indentSize,insertSpaces:this.insertSpaces!==e.insertSpaces,trimAutoWhitespace:this.trimAutoWhitespace!==e.trimAutoWhitespace}}}class s{constructor(e,t){this._findMatchBrand=void 0,this.range=e,this.matches=t}}class a{constructor(e,t,n,i,o,r){this.identifier=e,this.range=t,this.text=n,this.forceMoveMarkers=i,this.isAutoWhitespaceEdit=o,this._isTracked=r}}class l{constructor(e,t,n){this.reverseEdits=e,this.changes=t,this.trimAutoWhitespaceLineNumbers=n}}},5215:(e,t,n)=>{"use strict";n.d(t,{e9:()=>p,NL:()=>m});var i=n(3580),o=n(7301),r=n(3860),s=n(666),a=n(962),l=n(3060),d=n(5935);function c(e){return e.toString()}class h{constructor(e,t,n,i,o,r,s){this.beforeVersionId=e,this.afterVersionId=t,this.beforeEOL=n,this.afterEOL=i,this.beforeCursorState=o,this.afterCursorState=r,this.changes=s}static create(e,t){const n=e.getAlternativeVersionId(),i=g(e);return new h(n,n,i,i,t,t,[])}append(e,t,n,i,o){t.length>0&&(this.changes=(0,a.b)(this.changes,t)),this.afterEOL=n,this.afterVersionId=i,this.afterCursorState=o}static _writeSelectionsSize(e){return 4+16*(e?e.length:0)}static _writeSelections(e,t,n){if(l.T4(e,t?t.length:0,n),n+=4,t)for(const i of t)l.T4(e,i.selectionStartLineNumber,n),n+=4,l.T4(e,i.selectionStartColumn,n),n+=4,l.T4(e,i.positionLineNumber,n),n+=4,l.T4(e,i.positionColumn,n),n+=4;return n}static _readSelections(e,t,n){const i=l.Ag(e,t);t+=4;for(let o=0;oe.toString())).join(", ")}matchesResource(e){return(s.o.isUri(this.model)?this.model:this.model.uri).toString()===e.toString()}setModel(e){this.model=e}canAppend(e){return this.model===e&&this._data instanceof h}append(e,t,n,i,o){this._data instanceof h&&this._data.append(e,t,n,i,o)}close(){this._data instanceof h&&(this._data=this._data.serialize())}open(){this._data instanceof h||(this._data=h.deserialize(this._data))}undo(){if(s.o.isUri(this.model))throw new Error("Invalid SingleModelEditStackElement");this._data instanceof h&&(this._data=this._data.serialize());const e=h.deserialize(this._data);this.model._applyUndo(e.changes,e.beforeEOL,e.beforeVersionId,e.beforeCursorState)}redo(){if(s.o.isUri(this.model))throw new Error("Invalid SingleModelEditStackElement");this._data instanceof h&&(this._data=this._data.serialize());const e=h.deserialize(this._data);this.model._applyRedo(e.changes,e.afterEOL,e.afterVersionId,e.afterCursorState)}heapSize(){return this._data instanceof h&&(this._data=this._data.serialize()),this._data.byteLength+168}}function g(e){return"\n"===e.getEOL()?0:1}function p(e){return!!e&&(e instanceof u||e instanceof class{constructor(e,t){this.type=1,this.label=e,this._isOpen=!0,this._editStackElementsArr=t.slice(0),this._editStackElementsMap=new Map;for(const e of this._editStackElementsArr){const t=c(e.resource);this._editStackElementsMap.set(t,e)}this._delegate=null}get resources(){return this._editStackElementsArr.map((e=>e.resource))}prepareUndoRedo(){if(this._delegate)return this._delegate.prepareUndoRedo(this)}matchesResource(e){const t=c(e);return this._editStackElementsMap.has(t)}setModel(e){const t=c(s.o.isUri(e)?e:e.uri);this._editStackElementsMap.has(t)&&this._editStackElementsMap.get(t).setModel(e)}canAppend(e){if(!this._isOpen)return!1;const t=c(e.uri);return!!this._editStackElementsMap.has(t)&&this._editStackElementsMap.get(t).canAppend(e)}append(e,t,n,i,o){const r=c(e.uri);this._editStackElementsMap.get(r).append(e,t,n,i,o)}close(){this._isOpen=!1}open(){}undo(){this._isOpen=!1;for(const e of this._editStackElementsArr)e.undo()}redo(){for(const e of this._editStackElementsArr)e.redo()}heapSize(e){const t=c(e);return this._editStackElementsMap.has(t)?this._editStackElementsMap.get(t).heapSize():0}split(){return this._editStackElementsArr}toString(){let e=[];for(const t of this._editStackElementsArr)e.push(`${(0,d.EZ)(t.resource)}: ${t}`);return`{${e.join(", ")}}`}})}class m{constructor(e,t){this._model=e,this._undoRedoService=t}pushStackElement(){const e=this._undoRedoService.getLastElement(this._model.uri);p(e)&&e.close()}popStackElement(){const e=this._undoRedoService.getLastElement(this._model.uri);p(e)&&e.open()}clear(){this._undoRedoService.removeElements(this._model.uri)}_getOrCreateEditStackElement(e){const t=this._undoRedoService.getLastElement(this._model.uri);if(p(t)&&t.canAppend(this._model))return t;const n=new u(this._model,e);return this._undoRedoService.pushElement(n),n}pushEOL(e){const t=this._getOrCreateEditStackElement(null);this._model.setEOL(e),t.append(this._model,[],g(this._model),this._model.getAlternativeVersionId(),null)}pushEditOperation(e,t,n){const i=this._getOrCreateEditStackElement(e),o=this._model.applyEdits(t,!0),r=m._computeCursorState(n,o),s=o.map(((e,t)=>({index:t,textChange:e.textChange})));return s.sort(((e,t)=>e.textChange.oldPosition===t.textChange.oldPosition?e.index-t.index:e.textChange.oldPosition-t.textChange.oldPosition)),i.append(this._model,s.map((e=>e.textChange)),g(this._model),this._model.getAlternativeVersionId(),r),r}static _computeCursorState(e,t){try{return e?e(t):null}catch(e){return(0,o.dL)(e),null}}}},962:(e,t,n)=>{"use strict";n.d(t,{q:()=>s,b:()=>a});var i=n(3060),o=n(72);function r(e){return e.replace(/\n/g,"\\n").replace(/\r/g,"\\r")}class s{constructor(e,t,n,i){this.oldPosition=e,this.oldText=t,this.newPosition=n,this.newText=i}get oldLength(){return this.oldText.length}get oldEnd(){return this.oldPosition+this.oldText.length}get newLength(){return this.newText.length}get newEnd(){return this.newPosition+this.newText.length}toString(){return 0===this.oldText.length?`(insert@${this.oldPosition} "${r(this.newText)}")`:0===this.newText.length?`(delete@${this.oldPosition} "${r(this.oldText)}")`:`(replace@${this.oldPosition} "${r(this.oldText)}" with "${r(this.newText)}")`}static _writeStringSize(e){return 4+2*e.length}static _writeString(e,t,n){const o=t.length;i.T4(e,o,n),n+=4;for(let r=0;r{"use strict";n.d(t,{qx:()=>He,yO:()=>Te});var i=n(7301),o=n(4669),r=n(5976),s=n(7295),a=n(666),l=n(4141),d=n(187),c=n(4314),h=n(3860),u=n(4973),g=n(5215);class p{constructor(){this.spacesDiff=0,this.looksLikeAlignment=!1}}function m(e,t,n,i,o){let r;for(o.spacesDiff=0,o.looksLikeAlignment=!1,r=0;r0&&a>0)return;if(l>0&&d>0)return;let c=Math.abs(a-d),h=Math.abs(s-l);if(0===c)return o.spacesDiff=h,void(h>0&&0<=l-1&&l-10?o++:f>1&&r++,m(s,a,h,p,c),c.looksLikeAlignment&&(!n||t!==c.spacesDiff))continue;let b=c.spacesDiff;b<=8&&d[b]++,s=h,a=p}let h=n;o!==r&&(h=o{let n=d[t];n>e&&(e=n,u=t)})),4===u&&d[4]>0&&d[2]>0&&d[2]>=d[4]/2&&(u=2)}return{insertSpaces:h,tabSize:u}}function _(e){return(1&e.metadata)>>>0}function b(e,t){e.metadata=254&e.metadata|t<<0}function C(e){return(2&e.metadata)>>>1==1}function v(e,t){e.metadata=253&e.metadata|(t?1:0)<<1}function w(e){return(4&e.metadata)>>>2==1}function y(e,t){e.metadata=251&e.metadata|(t?1:0)<<2}function A(e,t){e.metadata=231&e.metadata|t<<3}function S(e,t){e.metadata=223&e.metadata|(t?1:0)<<5}class x{constructor(e,t,n){this.metadata=0,this.parent=this,this.left=this,this.right=this,b(this,1),this.start=t,this.end=n,this.delta=0,this.maxEnd=n,this.id=e,this.ownerId=0,this.options=null,y(this,!1),A(this,1),S(this,!1),this.cachedVersionId=0,this.cachedAbsoluteStart=t,this.cachedAbsoluteEnd=n,this.range=null,v(this,!1)}reset(e,t,n,i){this.start=t,this.end=n,this.maxEnd=n,this.cachedVersionId=e,this.cachedAbsoluteStart=t,this.cachedAbsoluteEnd=n,this.range=i}setOptions(e){this.options=e;let t=this.options.className;y(this,"squiggly-error"===t||"squiggly-warning"===t||"squiggly-info"===t),A(this,this.options.stickiness),S(this,this.options.collapseOnReplaceEdit)}setCachedOffsets(e,t,n){this.cachedVersionId!==n&&(this.range=null),this.cachedVersionId=n,this.cachedAbsoluteStart=e,this.cachedAbsoluteEnd=t}detach(){this.parent=null,this.left=null,this.right=null}}const k=new x(null,0,0);k.parent=k,k.left=k,k.right=k,b(k,0);class L{constructor(){this.root=k,this.requestNormalizeDelta=!1}intervalSearch(e,t,n,i,o){return this.root===k?[]:function(e,t,n,i,o,r){let s=e.root,a=0,l=0,d=0,c=0,h=[],u=0;for(;s!==k;)if(C(s))v(s.left,!1),v(s.right,!1),s===s.parent.right&&(a-=s.parent.delta),s=s.parent;else{if(!C(s.left)){if(l=a+s.maxEnd,ln)v(s,!0);else{if(c=a+s.end,c>=t){s.setCachedOffsets(d,c,r);let e=!0;i&&s.ownerId&&s.ownerId!==i&&(e=!1),o&&w(s)&&(e=!1),e&&(h[u++]=s)}v(s,!0),s.right===k||C(s.right)||(a+=s.delta,s=s.right)}}return v(e.root,!1),h}(this,e,t,n,i,o)}search(e,t,n){return this.root===k?[]:function(e,t,n,i){let o=e.root,r=0,s=0,a=0,l=[],d=0;for(;o!==k;){if(C(o)){v(o.left,!1),v(o.right,!1),o===o.parent.right&&(r-=o.parent.delta),o=o.parent;continue}if(o.left!==k&&!C(o.left)){o=o.left;continue}s=r+o.start,a=r+o.end,o.setCachedOffsets(s,a,i);let e=!0;t&&o.ownerId&&o.ownerId!==t&&(e=!1),n&&w(o)&&(e=!1),e&&(l[d++]=o),v(o,!0),o.right===k||C(o.right)||(r+=o.delta,o=o.right)}return v(e.root,!1),l}(this,e,t,n)}collectNodesFromOwner(e){return function(e,t){let n=e.root,i=[],o=0;for(;n!==k;)C(n)?(v(n.left,!1),v(n.right,!1),n=n.parent):n.left===k||C(n.left)?(n.ownerId===t&&(i[o++]=n),v(n,!0),n.right===k||C(n.right)||(n=n.right)):n=n.left;return v(e.root,!1),i}(this,e)}collectNodesPostOrder(){return function(e){let t=e.root,n=[],i=0;for(;t!==k;)C(t)?(v(t.left,!1),v(t.right,!1),t=t.parent):t.left===k||C(t.left)?t.right===k||C(t.right)?(n[i++]=t,v(t,!0)):t=t.right:t=t.left;return v(e.root,!1),n}(this)}insert(e){D(this,e),this._normalizeDeltaIfNecessary()}delete(e){I(this,e),this._normalizeDeltaIfNecessary()}resolveNode(e,t){const n=e;let i=0;for(;e!==this.root;)e===e.parent.right&&(i+=e.parent.delta),e=e.parent;const o=n.start+i,r=n.end+i;n.setCachedOffsets(o,r,t)}acceptReplace(e,t,n,i){const o=function(e,t,n){let i=e.root,o=0,r=0,s=0,a=0,l=[],d=0;for(;i!==k;)if(C(i))v(i.left,!1),v(i.right,!1),i===i.parent.right&&(o-=i.parent.delta),i=i.parent;else{if(!C(i.left)){if(r=o+i.maxEnd,rn?v(i,!0):(a=o+i.end,a>=t&&(i.setCachedOffsets(s,a,0),l[d++]=i),v(i,!0),i.right===k||C(i.right)||(o+=i.delta,i=i.right))}return v(e.root,!1),l}(this,e,e+t);for(let e=0,t=o.length;en?(o.start+=l,o.end+=l,o.delta+=l,(o.delta<-1073741824||o.delta>1073741824)&&(e.requestNormalizeDelta=!0),v(o,!0)):(v(o,!0),o.right===k||C(o.right)||(r+=o.delta,o=o.right))}v(e.root,!1)}(this,e,e+t,n),this._normalizeDeltaIfNecessary();for(let r=0,s=o.length;rn)&&1!==i&&(2===i||t)}function N(e,t,n,i,o){const r=function(e){return(24&e.metadata)>>>3}(e),s=0===r||2===r,a=1===r||2===r,l=n-t,d=i,c=Math.min(l,d),h=e.start;let u=!1;const g=e.end;let p=!1;t<=h&&g<=n&&function(e){return(32&e.metadata)>>>5==1}(e)&&(e.start=t,u=!0,e.end=t,p=!0);{const e=o?1:l>0?2:0;!u&&E(h,s,t,e)&&(u=!0),!p&&E(g,a,t,e)&&(p=!0)}if(c>0&&!o){const e=l>d?2:0;!u&&E(h,s,t+c,e)&&(u=!0),!p&&E(g,a,t+c,e)&&(p=!0)}{const i=o?1:0;!u&&E(h,s,n,i)&&(e.start=t+d,u=!0),!p&&E(g,a,n,i)&&(e.end=t+d,p=!0)}const m=d-l;u||(e.start=Math.max(0,h+m)),p||(e.end=Math.max(0,g+m)),e.start>e.end&&(e.end=e.start)}function D(e,t){if(e.root===k)return t.parent=k,t.left=k,t.right=k,b(t,0),e.root=t,e.root;!function(e,t){let n=0,i=e.root;const o=t.start,r=t.end;for(;;)if(s=o,a=r,l=i.start+n,d=i.end+n,(s===l?a-d:s-l)<0){if(i.left===k){t.start-=n,t.end-=n,t.maxEnd-=n,i.left=t;break}i=i.left}else{if(i.right===k){t.start-=n+i.delta,t.end-=n+i.delta,t.maxEnd-=n+i.delta,i.right=t;break}n+=i.delta,i=i.right}var s,a,l,d;t.parent=i,t.left=k,t.right=k,b(t,1)}(e,t),P(t.parent);let n=t;for(;n!==e.root&&1===_(n.parent);)if(n.parent===n.parent.parent.left){const t=n.parent.parent.right;1===_(t)?(b(n.parent,0),b(t,0),b(n.parent.parent,1),n=n.parent.parent):(n===n.parent.right&&(n=n.parent,T(e,n)),b(n.parent,0),b(n.parent.parent,1),R(e,n.parent.parent))}else{const t=n.parent.parent.left;1===_(t)?(b(n.parent,0),b(t,0),b(n.parent.parent,1),n=n.parent.parent):(n===n.parent.left&&(n=n.parent,R(e,n)),b(n.parent,0),b(n.parent.parent,1),T(e,n.parent.parent))}return b(e.root,0),t}function I(e,t){let n,i;if(t.left===k?(n=t.right,i=t,n.delta+=t.delta,(n.delta<-1073741824||n.delta>1073741824)&&(e.requestNormalizeDelta=!0),n.start+=t.delta,n.end+=t.delta):t.right===k?(n=t.left,i=t):(i=function(e){for(;e.left!==k;)e=e.left;return e}(t.right),n=i.right,n.start+=i.delta,n.end+=i.delta,n.delta+=i.delta,(n.delta<-1073741824||n.delta>1073741824)&&(e.requestNormalizeDelta=!0),i.start+=t.delta,i.end+=t.delta,i.delta=t.delta,(i.delta<-1073741824||i.delta>1073741824)&&(e.requestNormalizeDelta=!0)),i===e.root)return e.root=n,b(n,0),t.detach(),M(),B(n),void(e.root.parent=k);let o,r=1===_(i);if(i===i.parent.left?i.parent.left=n:i.parent.right=n,i===t?n.parent=i.parent:(i.parent===t?n.parent=i:n.parent=i.parent,i.left=t.left,i.right=t.right,i.parent=t.parent,b(i,_(t)),t===e.root?e.root=i:t===t.parent.left?t.parent.left=i:t.parent.right=i,i.left!==k&&(i.left.parent=i),i.right!==k&&(i.right.parent=i)),t.detach(),r)return P(n.parent),i!==t&&(P(i),P(i.parent)),void M();for(P(n),P(n.parent),i!==t&&(P(i),P(i.parent));n!==e.root&&0===_(n);)n===n.parent.left?(o=n.parent.right,1===_(o)&&(b(o,0),b(n.parent,1),T(e,n.parent),o=n.parent.right),0===_(o.left)&&0===_(o.right)?(b(o,1),n=n.parent):(0===_(o.right)&&(b(o.left,0),b(o,1),R(e,o),o=n.parent.right),b(o,_(n.parent)),b(n.parent,0),b(o.right,0),T(e,n.parent),n=e.root)):(o=n.parent.left,1===_(o)&&(b(o,0),b(n.parent,1),R(e,n.parent),o=n.parent.left),0===_(o.left)&&0===_(o.right)?(b(o,1),n=n.parent):(0===_(o.left)&&(b(o.right,0),b(o,1),T(e,o),o=n.parent.left),b(o,_(n.parent)),b(n.parent,0),b(o.left,0),R(e,n.parent),n=e.root));b(n,0),M()}function M(){k.parent=k,k.delta=0,k.start=0,k.end=0}function T(e,t){const n=t.right;n.delta+=t.delta,(n.delta<-1073741824||n.delta>1073741824)&&(e.requestNormalizeDelta=!0),n.start+=t.delta,n.end+=t.delta,t.right=n.left,n.left!==k&&(n.left.parent=t),n.parent=t.parent,t.parent===k?e.root=n:t===t.parent.left?t.parent.left=n:t.parent.right=n,n.left=t,t.parent=n,B(t),B(n)}function R(e,t){const n=t.left;t.delta-=n.delta,(t.delta<-1073741824||t.delta>1073741824)&&(e.requestNormalizeDelta=!0),t.start-=n.delta,t.end-=n.delta,t.left=n.right,n.right!==k&&(n.right.parent=t),n.parent=t.parent,t.parent===k?e.root=n:t===t.parent.right?t.parent.right=n:t.parent.left=n,n.right=t,t.parent=n,B(t),B(n)}function O(e){let t=e.end;if(e.left!==k){const n=e.left.maxEnd;n>t&&(t=n)}if(e.right!==k){const n=e.right.maxEnd+e.delta;n>t&&(t=n)}return t}function B(e){e.maxEnd=O(e)}function P(e){for(;e!==k;){const t=O(e);if(e.maxEnd===t)return;e.maxEnd=t,e=e.parent}}class F{constructor(e,t){this.piece=e,this.color=t,this.size_left=0,this.lf_left=0,this.parent=this,this.left=this,this.right=this}next(){if(this.right!==W)return z(this.right);let e=this;for(;e.parent!==W&&e.parent.left!==e;)e=e.parent;return e.parent===W?W:e.parent}prev(){if(this.left!==W)return V(this.left);let e=this;for(;e.parent!==W&&e.parent.right!==e;)e=e.parent;return e.parent===W?W:e.parent}detach(){this.parent=null,this.left=null,this.right=null}}const W=new F(null,0);function z(e){for(;e.left!==W;)e=e.left;return e}function V(e){for(;e.right!==W;)e=e.right;return e}function H(e){return e===W?0:e.size_left+e.piece.length+H(e.right)}function j(e){return e===W?0:e.lf_left+e.piece.lineFeedCnt+j(e.right)}function $(){W.parent=W}function U(e,t){let n=t.right;n.size_left+=t.size_left+(t.piece?t.piece.length:0),n.lf_left+=t.lf_left+(t.piece?t.piece.lineFeedCnt:0),t.right=n.left,n.left!==W&&(n.left.parent=t),n.parent=t.parent,t.parent===W?e.root=n:t.parent.left===t?t.parent.left=n:t.parent.right=n,n.left=t,t.parent=n}function Z(e,t){let n=t.left;t.left=n.right,n.right!==W&&(n.right.parent=t),n.parent=t.parent,t.size_left-=n.size_left+(n.piece?n.piece.length:0),t.lf_left-=n.lf_left+(n.piece?n.piece.lineFeedCnt:0),t.parent===W?e.root=n:t===t.parent.right?t.parent.right=n:t.parent.left=n,n.right=t,t.parent=n}function K(e,t){let n,i;if(t.left===W?(i=t,n=i.right):t.right===W?(i=t,n=i.left):(i=z(t.right),n=i.right),i===e.root)return e.root=n,n.color=0,t.detach(),$(),void(e.root.parent=W);let o,r=1===i.color;if(i===i.parent.left?i.parent.left=n:i.parent.right=n,i===t?(n.parent=i.parent,G(e,n)):(i.parent===t?n.parent=i:n.parent=i.parent,G(e,n),i.left=t.left,i.right=t.right,i.parent=t.parent,i.color=t.color,t===e.root?e.root=i:t===t.parent.left?t.parent.left=i:t.parent.right=i,i.left!==W&&(i.left.parent=i),i.right!==W&&(i.right.parent=i),i.size_left=t.size_left,i.lf_left=t.lf_left,G(e,i)),t.detach(),n.parent.left===n){let t=H(n),i=j(n);if(t!==n.parent.size_left||i!==n.parent.lf_left){let o=t-n.parent.size_left,r=i-n.parent.lf_left;n.parent.size_left=t,n.parent.lf_left=i,Y(e,n.parent,o,r)}}if(G(e,n.parent),r)$();else{for(;n!==e.root&&0===n.color;)n===n.parent.left?(o=n.parent.right,1===o.color&&(o.color=0,n.parent.color=1,U(e,n.parent),o=n.parent.right),0===o.left.color&&0===o.right.color?(o.color=1,n=n.parent):(0===o.right.color&&(o.left.color=0,o.color=1,Z(e,o),o=n.parent.right),o.color=n.parent.color,n.parent.color=0,o.right.color=0,U(e,n.parent),n=e.root)):(o=n.parent.left,1===o.color&&(o.color=0,n.parent.color=1,Z(e,n.parent),o=n.parent.left),0===o.left.color&&0===o.right.color?(o.color=1,n=n.parent):(0===o.left.color&&(o.right.color=0,o.color=1,U(e,o),o=n.parent.left),o.color=n.parent.color,n.parent.color=0,o.left.color=0,Z(e,n.parent),n=e.root));n.color=0,$()}}function q(e,t){for(G(e,t);t!==e.root&&1===t.parent.color;)if(t.parent===t.parent.parent.left){const n=t.parent.parent.right;1===n.color?(t.parent.color=0,n.color=0,t.parent.parent.color=1,t=t.parent.parent):(t===t.parent.right&&U(e,t=t.parent),t.parent.color=0,t.parent.parent.color=1,Z(e,t.parent.parent))}else{const n=t.parent.parent.left;1===n.color?(t.parent.color=0,n.color=0,t.parent.parent.color=1,t=t.parent.parent):(t===t.parent.left&&Z(e,t=t.parent),t.parent.color=0,t.parent.parent.color=1,U(e,t.parent.parent))}e.root.color=0}function Y(e,t,n,i){for(;t!==e.root&&t!==W;)t.parent.left===t&&(t.parent.size_left+=n,t.parent.lf_left+=i),t=t.parent}function G(e,t){let n=0,i=0;if(t!==e.root){if(0===n){for(;t!==e.root&&t===t.parent.right;)t=t.parent;if(t===e.root)return;n=H((t=t.parent).left)-t.size_left,i=j(t.left)-t.lf_left,t.size_left+=n,t.lf_left+=i}for(;t!==e.root&&(0!==n||0!==i);)t.parent.left===t&&(t.parent.size_left+=n,t.parent.lf_left+=i),t=t.parent}}W.parent=W,W.left=W,W.right=W,W.color=0;var Q=n(7277);const X=65535;function J(e){let t;return t=e[e.length-1]<65536?new Uint16Array(e.length):new Uint32Array(e.length),t.set(e,0),t}class ee{constructor(e,t,n,i,o){this.lineStarts=e,this.cr=t,this.lf=n,this.crlf=i,this.isBasicASCII=o}}function te(e,t=!0){let n=[0],i=1;for(let t=0,o=e.length;t(e!==W&&this._pieces.push(e.piece),!0)))}read(){return 0===this._pieces.length?0===this._index?(this._index++,this._BOM):null:this._index>this._pieces.length-1?null:0===this._index?this._BOM+this._tree.getPieceContent(this._pieces[this._index++]):this._tree.getPieceContent(this._pieces[this._index++])}}class re{constructor(e){this._limit=e,this._cache=[]}get(e){for(let t=this._cache.length-1;t>=0;t--){let n=this._cache[t];if(n.nodeStartOffset<=e&&n.nodeStartOffset+n.node.piece.length>=e)return n}return null}get2(e){for(let t=this._cache.length-1;t>=0;t--){let n=this._cache[t];if(n.nodeStartLineNumber&&n.nodeStartLineNumber=e)return n}return null}set(e){this._cache.length>=this._limit&&this._cache.shift(),this._cache.push(e)}validate(e){let t=!1,n=this._cache;for(let i=0;i=e)&&(n[i]=null,t=!0)}if(t){let e=[];for(const t of n)null!==t&&e.push(t);this._cache=e}}}class se{constructor(e,t,n){this.create(e,t,n)}create(e,t,n){this._buffers=[new ie("",[0])],this._lastChangeBufferPos={line:0,column:0},this.root=W,this._lineCnt=1,this._length=0,this._EOL=t,this._EOLLength=t.length,this._EOLNormalized=n;let i=null;for(let t=0,n=e.length;t0){e[t].lineStarts||(e[t].lineStarts=te(e[t].buffer));let n=new ne(t+1,{line:0,column:0},{line:e[t].lineStarts.length-1,column:e[t].buffer.length-e[t].lineStarts[e[t].lineStarts.length-1]},e[t].lineStarts.length-1,e[t].buffer.length);this._buffers.push(e[t]),i=this.rbInsertRight(i,n)}this._searchCache=new re(1),this._lastVisitedLine={lineNumber:0,value:""},this.computeBufferMetadata()}normalizeEOL(e){let t=65535-Math.floor(21845),n=2*t,i="",o=0,r=[];if(this.iterate(this.root,(s=>{let a=this.getNodeContent(s),l=a.length;if(o<=t||o+l0){let t=i.replace(/\r\n|\r|\n/g,e);r.push(new ie(t,te(t)))}this.create(r,e,!0)}getEOL(){return this._EOL}setEOL(e){this._EOL=e,this._EOLLength=this._EOL.length,this.normalizeEOL(e)}createSnapshot(e){return new oe(this,e)}getOffsetAt(e,t){let n=0,i=this.root;for(;i!==W;)if(i.left!==W&&i.lf_left+1>=e)i=i.left;else{if(i.lf_left+i.piece.lineFeedCnt+1>=e)return n+=i.size_left,n+(this.getAccumulatedValue(i,e-i.lf_left-2)+t-1);e-=i.lf_left+i.piece.lineFeedCnt,n+=i.size_left+i.piece.length,i=i.right}return n}getPositionAt(e){e=Math.floor(e),e=Math.max(0,e);let t=this.root,n=0,i=e;for(;t!==W;)if(0!==t.size_left&&t.size_left>=e)t=t.left;else{if(t.size_left+t.piece.length>=e){let o=this.getIndexOf(t,e-t.size_left);if(n+=t.lf_left+o.index,0===o.index){let e=i-this.getOffsetAt(n+1,1);return new d.L(n+1,e+1)}return new d.L(n+1,o.remainder+1)}if(e-=t.size_left+t.piece.length,n+=t.lf_left+t.piece.lineFeedCnt,t.right===W){let t=i-e-this.getOffsetAt(n+1,1);return new d.L(n+1,t+1)}t=t.right}return new d.L(1,1)}getValueInRange(e,t){if(e.startLineNumber===e.endLineNumber&&e.startColumn===e.endColumn)return"";let n=this.nodeAt2(e.startLineNumber,e.startColumn),i=this.nodeAt2(e.endLineNumber,e.endColumn),o=this.getValueInRange2(n,i);return t?t===this._EOL&&this._EOLNormalized&&t===this.getEOL()&&this._EOLNormalized?o:o.replace(/\r\n|\r|\n/g,t):o}getValueInRange2(e,t){if(e.node===t.node){let n=e.node,i=this._buffers[n.piece.bufferIndex].buffer,o=this.offsetInBuffer(n.piece.bufferIndex,n.piece.start);return i.substring(o+e.remainder,o+t.remainder)}let n=e.node,i=this._buffers[n.piece.bufferIndex].buffer,o=this.offsetInBuffer(n.piece.bufferIndex,n.piece.start),r=i.substring(o+e.remainder,o+n.piece.length);for(n=n.next();n!==W;){let e=this._buffers[n.piece.bufferIndex].buffer,i=this.offsetInBuffer(n.piece.bufferIndex,n.piece.start);if(n===t.node){r+=e.substring(i,i+t.remainder);break}r+=e.substr(i,n.piece.length),n=n.next()}return r}getLinesContent(){let e=[],t=0,n="",i=!1;return this.iterate(this.root,(o=>{if(o===W)return!0;const r=o.piece;let s=r.length;if(0===s)return!0;const a=this._buffers[r.bufferIndex].buffer,l=this._buffers[r.bufferIndex].lineStarts,d=r.start.line,c=r.end.line;let h=l[d]+r.start.column;if(i&&(10===a.charCodeAt(h)&&(h++,s--),e[t++]=n,n="",i=!1,0===s))return!0;if(d===c)return this._EOLNormalized||13!==a.charCodeAt(h+s-1)?n+=a.substr(h,s):(i=!0,n+=a.substr(h,s-1)),!0;n+=this._EOLNormalized?a.substring(h,Math.max(h,l[d+1]-this._EOLLength)):a.substring(h,l[d+1]).replace(/(\r\n|\r|\n)$/,""),e[t++]=n;for(let i=d+1;ie+_,t.reset(0)):(g=m.buffer,p=e=>e,t.reset(_));do{if(u=t.next(g),u){if(p(u.index)>=b)return d;this.positionInBuffer(e,p(u.index)-f,C);let t=this.getLineFeedCnt(e.piece.bufferIndex,o,C),r=C.line===o.line?C.column-o.column+i:C.column+1,s=r+u[0].length;if(h[d++]=(0,Q.iE)(new c.e(n+t,r,n+t,s),u,a),p(u.index)+u[0].length>=b)return d;if(d>=l)return d}}while(u);return d}findMatchesLineByLine(e,t,n,i){const o=[];let r=0;const s=new Q.sz(t.wordSeparators,t.regex);let a=this.nodeAt2(e.startLineNumber,e.startColumn);if(null===a)return[];let l=this.nodeAt2(e.endLineNumber,e.endColumn);if(null===l)return[];let d=this.positionInBuffer(a.node,a.remainder),c=this.positionInBuffer(l.node,l.remainder);if(a.node===l.node)return this.findMatchesInNode(a.node,s,e.startLineNumber,e.startColumn,d,c,t,n,i,r,o),o;let h=e.startLineNumber,u=a.node;for(;u!==l.node;){let l=this.getLineFeedCnt(u.piece.bufferIndex,d,u.piece.end);if(l>=1){let a=this._buffers[u.piece.bufferIndex].lineStarts,c=this.offsetInBuffer(u.piece.bufferIndex,u.piece.start),g=a[d.line+l],p=h===e.startLineNumber?e.startColumn:1;if(r=this.findMatchesInNode(u,s,h,p,d,this.positionInBuffer(u,g-c),t,n,i,r,o),r>=i)return o;h+=l}let c=h===e.startLineNumber?e.startColumn-1:0;if(h===e.endLineNumber){const a=this.getLineContent(h).substring(c,e.endColumn-1);return r=this._findMatchesInLine(t,s,a,e.endLineNumber,c,r,o,n,i),o}if(r=this._findMatchesInLine(t,s,this.getLineContent(h).substr(c),h,c,r,o,n,i),r>=i)return o;h++,a=this.nodeAt2(h,1),u=a.node,d=this.positionInBuffer(a.node,a.remainder)}if(h===e.endLineNumber){let a=h===e.startLineNumber?e.startColumn-1:0;const l=this.getLineContent(h).substring(a,e.endColumn-1);return r=this._findMatchesInLine(t,s,l,e.endLineNumber,a,r,o,n,i),o}let g=h===e.startLineNumber?e.startColumn:1;return r=this.findMatchesInNode(l.node,s,h,g,d,c,t,n,i,r,o),o}_findMatchesInLine(e,t,n,i,o,r,s,a,l){const d=e.wordSeparators;if(!a&&e.simpleSearch){const t=e.simpleSearch,a=t.length,h=n.length;let g=-a;for(;-1!==(g=n.indexOf(t,g+a));)if((!d||(0,Q.cM)(d,n,h,g,a))&&(s[r++]=new u.tk(new c.e(i,g+1+o,i,g+1+a+o),null),r>=l))return r;return r}let h;t.reset(0);do{if(h=t.next(n),h&&(s[r++]=(0,Q.iE)(new c.e(i,h.index+1+o,i,h.index+1+h[0].length+o),h,a),r>=l))return r}while(h);return r}insert(e,t,n=!1){if(this._EOLNormalized=this._EOLNormalized&&n,this._lastVisitedLine.lineNumber=0,this._lastVisitedLine.value="",this.root!==W){let{node:n,remainder:i,nodeStartOffset:o}=this.nodeAt(e),r=n.piece,s=r.bufferIndex,a=this.positionInBuffer(n,i);if(0===n.piece.bufferIndex&&r.end.line===this._lastChangeBufferPos.line&&r.end.column===this._lastChangeBufferPos.column&&o+r.length===e&&t.lengthe){let e=[],o=new ne(r.bufferIndex,a,r.end,this.getLineFeedCnt(r.bufferIndex,a,r.end),this.offsetInBuffer(s,r.end)-this.offsetInBuffer(s,a));if(this.shouldCheckCRLF()&&this.endWithCR(t)&&10===this.nodeCharCodeAt(n,i)){let e={line:o.start.line+1,column:0};o=new ne(o.bufferIndex,e,o.end,this.getLineFeedCnt(o.bufferIndex,e,o.end),o.length-1),t+="\n"}if(this.shouldCheckCRLF()&&this.startWithLF(t))if(13===this.nodeCharCodeAt(n,i-1)){let o=this.positionInBuffer(n,i-1);this.deleteNodeTail(n,o),t="\r"+t,0===n.piece.length&&e.push(n)}else this.deleteNodeTail(n,a);else this.deleteNodeTail(n,a);let l=this.createNewPieces(t);o.length>0&&this.rbInsertRight(n,o);let d=n;for(let e=0;e=0;e--)o=this.rbInsertLeft(o,i[e]);this.validateCRLFWithPrevNode(o),this.deleteNodes(n)}insertContentToNodeRight(e,t){this.adjustCarriageReturnFromNext(e,t)&&(e+="\n");let n=this.createNewPieces(e),i=this.rbInsertRight(t,n[0]),o=i;for(let e=1;e=c))break;a=d+1}return n?(n.line=d,n.column=s-h,null):{line:d,column:s-h}}getLineFeedCnt(e,t,n){if(0===n.column)return n.line-t.line;let i=this._buffers[e].lineStarts;if(n.line===i.length-1)return n.line-t.line;let o=i[n.line+1],r=i[n.line]+n.column;if(o>r+1)return n.line-t.line;let s=r-1;return 13===this._buffers[e].buffer.charCodeAt(s)?n.line-t.line+1:n.line-t.line}offsetInBuffer(e,t){return this._buffers[e].lineStarts[t.line]+t.column}deleteNodes(e){for(let t=0;tX){let t=[];for(;e.length>X;){const n=e.charCodeAt(65534);let i;13===n||n>=55296&&n<=56319?(i=e.substring(0,65534),e=e.substring(65534)):(i=e.substring(0,X),e=e.substring(X));let o=te(i);t.push(new ne(this._buffers.length,{line:0,column:0},{line:o.length-1,column:i.length-o[o.length-1]},o.length-1,i.length)),this._buffers.push(new ie(i,o))}let n=te(e);return t.push(new ne(this._buffers.length,{line:0,column:0},{line:n.length-1,column:e.length-n[n.length-1]},n.length-1,e.length)),this._buffers.push(new ie(e,n)),t}let t=this._buffers[0].buffer.length;const n=te(e,!1);let i=this._lastChangeBufferPos;if(this._buffers[0].lineStarts[this._buffers[0].lineStarts.length-1]===t&&0!==t&&this.startWithLF(e)&&this.endWithCR(this._buffers[0].buffer)){this._lastChangeBufferPos={line:this._lastChangeBufferPos.line,column:this._lastChangeBufferPos.column+1},i=this._lastChangeBufferPos;for(let e=0;e=e-1)n=n.left;else{if(n.lf_left+n.piece.lineFeedCnt>e-1){let i=this.getAccumulatedValue(n,e-n.lf_left-2),s=this.getAccumulatedValue(n,e-n.lf_left-1),a=this._buffers[n.piece.bufferIndex].buffer,l=this.offsetInBuffer(n.piece.bufferIndex,n.piece.start);return o+=n.size_left,this._searchCache.set({node:n,nodeStartOffset:o,nodeStartLineNumber:r-(e-1-n.lf_left)}),a.substring(l+i,l+s-t)}if(n.lf_left+n.piece.lineFeedCnt===e-1){let t=this.getAccumulatedValue(n,e-n.lf_left-2),o=this._buffers[n.piece.bufferIndex].buffer,r=this.offsetInBuffer(n.piece.bufferIndex,n.piece.start);i=o.substring(r+t,r+n.piece.length);break}e-=n.lf_left+n.piece.lineFeedCnt,o+=n.size_left+n.piece.length,n=n.right}}for(n=n.next();n!==W;){let e=this._buffers[n.piece.bufferIndex].buffer;if(n.piece.lineFeedCnt>0){let o=this.getAccumulatedValue(n,0),r=this.offsetInBuffer(n.piece.bufferIndex,n.piece.start);return i+=e.substring(r,r+o-t),i}{let t=this.offsetInBuffer(n.piece.bufferIndex,n.piece.start);i+=e.substr(t,n.piece.length)}n=n.next()}return i}computeBufferMetadata(){let e=this.root,t=1,n=0;for(;e!==W;)t+=e.lf_left+e.piece.lineFeedCnt,n+=e.size_left+e.piece.length,e=e.right;this._lineCnt=t,this._length=n,this._searchCache.validate(this._length)}getIndexOf(e,t){let n=e.piece,i=this.positionInBuffer(e,t),o=i.line-n.start.line;if(this.offsetInBuffer(n.bufferIndex,n.end)-this.offsetInBuffer(n.bufferIndex,n.start)===t){let t=this.getLineFeedCnt(e.piece.bufferIndex,n.start,i);if(t!==o)return{index:t,remainder:0}}return{index:o,remainder:i.column}}getAccumulatedValue(e,t){if(t<0)return 0;let n=e.piece,i=this._buffers[n.bufferIndex].lineStarts,o=n.start.line+t+1;return o>n.end.line?i[n.end.line]+n.end.column-i[n.start.line]-n.start.column:i[o]-i[n.start.line]-n.start.column}deleteNodeTail(e,t){const n=e.piece,i=n.lineFeedCnt,o=this.offsetInBuffer(n.bufferIndex,n.end),r=t,s=this.offsetInBuffer(n.bufferIndex,r),a=this.getLineFeedCnt(n.bufferIndex,n.start,r),l=a-i,d=s-o,c=n.length+d;e.piece=new ne(n.bufferIndex,n.start,r,a,c),Y(this,e,d,l)}deleteNodeHead(e,t){const n=e.piece,i=n.lineFeedCnt,o=this.offsetInBuffer(n.bufferIndex,n.start),r=t,s=this.getLineFeedCnt(n.bufferIndex,r,n.end),a=s-i,l=o-this.offsetInBuffer(n.bufferIndex,r),d=n.length+l;e.piece=new ne(n.bufferIndex,r,n.end,s,d),Y(this,e,l,a)}shrinkNode(e,t,n){const i=e.piece,o=i.start,r=i.end,s=i.length,a=i.lineFeedCnt,l=t,d=this.getLineFeedCnt(i.bufferIndex,i.start,l),c=this.offsetInBuffer(i.bufferIndex,t)-this.offsetInBuffer(i.bufferIndex,o);e.piece=new ne(i.bufferIndex,i.start,l,d,c),Y(this,e,c-s,d-a);let h=new ne(i.bufferIndex,n,r,this.getLineFeedCnt(i.bufferIndex,n,r),this.offsetInBuffer(i.bufferIndex,r)-this.offsetInBuffer(i.bufferIndex,n)),u=this.rbInsertRight(e,h);this.validateCRLFWithPrevNode(u)}appendToNode(e,t){this.adjustCarriageReturnFromNext(t,e)&&(t+="\n");const n=this.shouldCheckCRLF()&&this.startWithLF(t)&&this.endWithCR(e),i=this._buffers[0].buffer.length;this._buffers[0].buffer+=t;const o=te(t,!1);for(let e=0;ee)t=t.left;else{if(t.size_left+t.piece.length>=e){i+=t.size_left;let n={node:t,remainder:e-t.size_left,nodeStartOffset:i};return this._searchCache.set(n),n}e-=t.size_left+t.piece.length,i+=t.size_left+t.piece.length,t=t.right}return null}nodeAt2(e,t){let n=this.root,i=0;for(;n!==W;)if(n.left!==W&&n.lf_left>=e-1)n=n.left;else{if(n.lf_left+n.piece.lineFeedCnt>e-1){let o=this.getAccumulatedValue(n,e-n.lf_left-2),r=this.getAccumulatedValue(n,e-n.lf_left-1);return i+=n.size_left,{node:n,remainder:Math.min(o+t-1,r),nodeStartOffset:i}}if(n.lf_left+n.piece.lineFeedCnt===e-1){let o=this.getAccumulatedValue(n,e-n.lf_left-2);if(o+t-1<=n.piece.length)return{node:n,remainder:o+t-1,nodeStartOffset:i};t-=n.piece.length-o;break}e-=n.lf_left+n.piece.lineFeedCnt,i+=n.size_left+n.piece.length,n=n.right}for(n=n.next();n!==W;){if(n.piece.lineFeedCnt>0){let e=this.getAccumulatedValue(n,0),i=this.offsetOfNode(n);return{node:n,remainder:Math.min(t-1,e),nodeStartOffset:i}}if(n.piece.length>=t-1)return{node:n,remainder:t-1,nodeStartOffset:this.offsetOfNode(n)};t-=n.piece.length,n=n.next()}return null}nodeCharCodeAt(e,t){if(e.piece.lineFeedCnt<1)return-1;let n=this._buffers[e.piece.bufferIndex],i=this.offsetInBuffer(e.piece.bufferIndex,e.piece.start)+t;return n.buffer.charCodeAt(i)}offsetOfNode(e){if(!e)return 0;let t=e.size_left;for(;e!==this.root;)e.parent.right===e&&(t+=e.parent.size_left+e.parent.piece.length),e=e.parent;return t}shouldCheckCRLF(){return!(this._EOLNormalized&&"\n"===this._EOL)}startWithLF(e){if("string"==typeof e)return 10===e.charCodeAt(0);if(e===W||0===e.piece.lineFeedCnt)return!1;let t=e.piece,n=this._buffers[t.bufferIndex].lineStarts,i=t.start.line,o=n[i]+t.start.column;return i!==n.length-1&&!(n[i+1]>o+1)&&10===this._buffers[t.bufferIndex].buffer.charCodeAt(o)}endWithCR(e){return"string"==typeof e?13===e.charCodeAt(e.length-1):e!==W&&0!==e.piece.lineFeedCnt&&13===this.nodeCharCodeAt(e,e.piece.length-1)}validateCRLFWithPrevNode(e){if(this.shouldCheckCRLF()&&this.startWithLF(e)){let t=e.prev();this.endWithCR(t)&&this.fixCRLF(t,e)}}validateCRLFWithNextNode(e){if(this.shouldCheckCRLF()&&this.endWithCR(e)){let t=e.next();this.startWithLF(t)&&this.fixCRLF(e,t)}}fixCRLF(e,t){let n,i=[],o=this._buffers[e.piece.bufferIndex].lineStarts;n=0===e.piece.end.column?{line:e.piece.end.line-1,column:o[e.piece.end.line]-o[e.piece.end.line-1]-1}:{line:e.piece.end.line,column:e.piece.end.column-1};const r=e.piece.length-1,s=e.piece.lineFeedCnt-1;e.piece=new ne(e.piece.bufferIndex,e.piece.start,n,s,r),Y(this,e,-1,-1),0===e.piece.length&&i.push(e);let a={line:t.piece.start.line+1,column:0};const l=t.piece.length-1,d=this.getLineFeedCnt(t.piece.bufferIndex,a,t.piece.end);t.piece=new ne(t.piece.bufferIndex,a,t.piece.end,d,l),Y(this,t,-1,-1),0===t.piece.length&&i.push(t);let c=this.createNewPieces("\r\n");this.rbInsertRight(e,c[0]);for(let e=0;ee.sortIndex-t.sortIndex))}this._mightContainRTL=i,this._mightContainUnusualLineTerminators=o,this._mightContainNonBasicASCII=r;const p=this._doApplyEdits(l);let m=null;if(t&&h.length>0){h.sort(((e,t)=>t.lineNumber-e.lineNumber)),m=[];for(let e=0,t=h.length;e0&&h[e-1].lineNumber===t)continue;let n=h[e].oldContent,i=this.getLineContent(t);0!==i.length&&i!==n&&-1===s.LC(i)&&m.push(t)}}return this._onDidChangeContent.fire(),new u.je(g,p,m)}_reduceOperations(e){return e.length<1e3?e:[this._toSingleEditOperation(e)]}_toSingleEditOperation(e){let t=!1;const n=e[0].range,i=e[e.length-1].range,o=new c.e(n.startLineNumber,n.startColumn,i.endLineNumber,i.endColumn);let r=n.startLineNumber,s=n.startColumn;const a=[];for(let n=0,i=e.length;n0&&a.push(i.text),r=o.endLineNumber,s=o.endColumn}const l=a.join(""),[d,h,u]=(0,ae.QZ)(l);return{sortIndex:0,identifier:e[0].identifier,range:o,rangeOffset:this.getOffsetAt(o.startLineNumber,o.startColumn),rangeLength:this.getValueLengthInRange(o,0),text:l,eolCount:d,firstLineLength:h,lastLineLength:u,forceMoveMarkers:t,isAutoWhitespaceEdit:!1}}_doApplyEdits(e){e.sort(de._sortOpsDescending);let t=[];for(let n=0;n0){const e=d.eolCount+1;l=1===e?new c.e(s,a,s,a+d.firstLineLength):new c.e(s,a,s+e-1,d.lastLineLength+1)}else l=new c.e(s,a,s,a);n=l.endLineNumber,i=l.endColumn,t.push(l),o=d}return t}static _sortOpsAscending(e,t){let n=c.e.compareRangesUsingEnds(e.range,t.range);return 0===n?e.sortIndex-t.sortIndex:n}static _sortOpsDescending(e,t){let n=c.e.compareRangesUsingEnds(e.range,t.range);return 0===n?t.sortIndex-e.sortIndex:-n}}class ce{constructor(e,t,n,i,o,r,s,a,l){this._chunks=e,this._bom=t,this._cr=n,this._lf=i,this._crlf=o,this._containsRTL=r,this._containsUnusualLineTerminators=s,this._isBasicASCII=a,this._normalizeEOL=l}_getEOL(e){const t=this._cr+this._lf+this._crlf,n=this._cr+this._crlf;return 0===t?1===e?"\n":"\r\n":n>t/2?"\r\n":"\n"}create(e){const t=this._getEOL(e);let n=this._chunks;if(this._normalizeEOL&&("\r\n"===t&&(this._cr>0||this._lf>0)||"\n"===t&&(this._cr>0||this._crlf>0)))for(let e=0,i=n.length;e=55296&&t<=56319?(this._acceptChunk1(e.substr(0,e.length-1),!1),this._hasPreviousChar=!0,this._previousChar=t):(this._acceptChunk1(e,!1),this._hasPreviousChar=!1,this._previousChar=t)}_acceptChunk1(e,t){(t||0!==e.length)&&(this._hasPreviousChar?this._acceptChunk2(String.fromCharCode(this._previousChar)+e):this._acceptChunk2(e))}_acceptChunk2(e){const t=function(e,t){e.length=0,e[0]=0;let n=1,i=0,o=0,r=0,s=!0;for(let a=0,l=t.length;a126)&&(s=!1)}const a=new ee(J(e),i,o,r,s);return e.length=0,a}(this._tmpLineStarts,e);this.chunks.push(new ie(e,t.lineStarts)),this.cr+=t.cr,this.lf+=t.lf,this.crlf+=t.crlf,this.isBasicASCII&&(this.isBasicASCII=t.isBasicASCII),this.isBasicASCII||this.containsRTL||(this.containsRTL=s.Ut(e)),this.isBasicASCII||this.containsUnusualLineTerminators||(this.containsUnusualLineTerminators=s.ab(e))}finish(e=!0){return this._finish(),new ce(this.chunks,this.BOM,this.cr,this.lf,this.crlf,this.containsRTL,this.containsUnusualLineTerminators,this.isBasicASCII,e)}_finish(){if(0===this.chunks.length&&this._acceptChunk1("",!0),this._hasPreviousChar){this._hasPreviousChar=!1;let e=this.chunks[this.chunks.length-1];e.buffer+=String.fromCharCode(this._previousChar);let t=te(e.buffer);e.lineStarts=t,13===this._previousChar&&this.cr++}}}var ue=n(3256),ge=n(9488),pe=n(8411),me=n(4101),fe=n(8111),_e=n(4013),be=n(1432);class Ce{constructor(){this._beginState=[],this._valid=[],this._len=0,this._invalidLineStartIndex=0}_reset(e){this._beginState=[],this._valid=[],this._len=0,this._invalidLineStartIndex=0,e&&this._setBeginState(0,e)}flush(e){this._reset(e)}get invalidLineStartIndex(){return this._invalidLineStartIndex}_invalidateLine(e){e=this._len;)this._beginState[this._len]=null,this._valid[this._len]=!1,this._len++}_deleteLines(e,t){0!==t&&(e+t>this._len&&(t=this._len-e),this._beginState.splice(e,t),this._valid.splice(e,t),this._len-=t)}_insertLines(e,t){if(0===t)return;let n=[],i=[];for(let e=0;e=0;t--)this._invalidateLine(e.startLineNumber+t-1);this._acceptDeleteRange(e),this._acceptInsertText(new d.L(e.startLineNumber,e.startColumn),t)}_acceptDeleteRange(e){e.startLineNumber-1>=this._len||this._deleteLines(e.startLineNumber,e.endLineNumber-e.startLineNumber)}_acceptInsertText(e,t){e.lineNumber-1>=this._len||this._insertLines(e.lineNumber,t)}}class ve extends r.JT{constructor(e){super(),this._isDisposed=!1,this._textModel=e,this._tokenizationStateStore=new Ce,this._tokenizationSupport=null,this._register(me.RW.onDidChange((e=>{const t=this._textModel.getLanguageIdentifier();-1!==e.changedLanguages.indexOf(t.language)&&(this._resetTokenizationState(),this._textModel.clearTokens())}))),this._register(this._textModel.onDidChangeContentFast((e=>{if(e.isFlush)this._resetTokenizationState();else{for(let t=0,n=e.changes.length;t{this._beginBackgroundTokenization()}))),this._register(this._textModel.onDidChangeLanguage((()=>{this._resetTokenizationState(),this._textModel.clearTokens()}))),this._resetTokenizationState()}dispose(){this._isDisposed=!0,super.dispose()}_resetTokenizationState(){const[e,t]=function(e){const t=e.getLanguageIdentifier();let n=e.isTooLargeForTokenization()?null:me.RW.get(t.language),o=null;if(n)try{o=n.getInitialState()}catch(e){(0,i.dL)(e),n=null}return[n,o]}(this._textModel);this._tokenizationSupport=e,this._tokenizationStateStore.flush(t),this._beginBackgroundTokenization()}_beginBackgroundTokenization(){this._textModel.isAttachedToEditor()&&this._hasLinesToTokenize()&&be.xS((()=>{this._isDisposed||this._revalidateTokensNow()}))}_revalidateTokensNow(e=this._textModel.getLineCount()){const t=new ae.DA,n=_e.G.create(!1);for(;this._hasLinesToTokenize()&&!(n.elapsed()>1)&&!(this._tokenizeOneInvalidLine(t)>=e););this._beginBackgroundTokenization(),this._textModel.setTokens(t.tokens)}tokenizeViewport(e,t){const n=new ae.DA;this._tokenizeViewport(n,e,t),this._textModel.setTokens(n.tokens)}reset(){this._resetTokenizationState(),this._textModel.clearTokens()}forceTokenization(e){const t=new ae.DA;this._updateTokensUntilLine(t,e),this._textModel.setTokens(t.tokens)}isCheapToTokenize(e){if(!this._tokenizationSupport)return!0;const t=this._tokenizationStateStore.invalidLineStartIndex+1;return!(e>t)&&(e0&&e>=1;e--){let t=this._textModel.getLineFirstNonWhitespaceColumn(e);if(0!==t&&t=0;e--)a=we(s,this._tokenizationSupport,o[e],!1,a).endState;for(let i=t;i<=n;i++){let t=this._textModel.getLineContent(i),n=we(s,this._tokenizationSupport,t,!0,a);e.add(i,n.tokens),this._tokenizationStateStore.setFakeTokens(i-1),a=n.endState}}}function we(e,t,n,o,r){let s=null;if(t)try{s=t.tokenize2(n,o,r.clone(),0)}catch(e){(0,i.dL)(e)}return s||(s=(0,fe.mh)(e.id,n,r,0)),pe.A.convertToEndOffset(s.tokens,n.length),s}var ye=n(7461),Ae=n(3831),Se=n(764),xe=n(4227),ke=n(1264);function Le(e,t){return("string"==typeof e?function(e){const t=new he;return t.acceptChunk(e),t.finish()}(e):e).create(t)}let Ee=0;class Ne{constructor(e){this._source=e,this._eos=!1}read(){if(this._eos)return null;let e=[],t=0,n=0;for(;;){let i=this._source.read();if(null===i)return this._eos=!0,0===t?null:e.join("");if(i.length>0&&(e[t++]=i,n+=i.length),n>=65536)return e.join("")}}}const De=()=>{throw new Error("Invalid change accessor")};class Ie{constructor(){this._searchCanceledBrand=void 0}}function Me(e){return e instanceof Ie?null:e}Ie.INSTANCE=new Ie;class Te extends r.JT{constructor(e,t,n,i=null,r){super(),this._onWillDispose=this._register(new o.Q5),this.onWillDispose=this._onWillDispose.event,this._onDidChangeDecorations=this._register(new Ue((e=>this.handleBeforeFireDecorationsChangedEvent(e)))),this.onDidChangeDecorations=this._onDidChangeDecorations.event,this._onDidChangeLanguage=this._register(new o.Q5),this.onDidChangeLanguage=this._onDidChangeLanguage.event,this._onDidChangeLanguageConfiguration=this._register(new o.Q5),this.onDidChangeLanguageConfiguration=this._onDidChangeLanguageConfiguration.event,this._onDidChangeTokens=this._register(new o.Q5),this.onDidChangeTokens=this._onDidChangeTokens.event,this._onDidChangeOptions=this._register(new o.Q5),this.onDidChangeOptions=this._onDidChangeOptions.event,this._onDidChangeAttached=this._register(new o.Q5),this.onDidChangeAttached=this._onDidChangeAttached.event,this._onDidChangeContentOrInjectedText=this._register(new o.Q5),this.onDidChangeContentOrInjectedText=this._onDidChangeContentOrInjectedText.event,this._eventEmitter=this._register(new Ze),this._register(this._eventEmitter.fastEvent((e=>{this._onDidChangeContentOrInjectedText.fire(e.rawContentChangedEvent)}))),Ee++,this.id="$model"+Ee,this.isForSimpleWidget=t.isForSimpleWidget,this._associatedResource=null==i?a.o.parse("inmemory://model/"+Ee):i,this._undoRedoService=r,this._attachedEditorCount=0;const{textBuffer:l,disposable:d}=Le(e,t.defaultEOL);this._buffer=l,this._bufferDisposable=d,this._options=Te.resolveOptions(this._buffer,t);const h=this._buffer.getLineCount(),u=this._buffer.getValueLengthInRange(new c.e(1,1,h,this._buffer.getLineLength(h)+1),0);t.largeFileOptimizations?this._isTooLargeForTokenization=u>Te.LARGE_FILE_SIZE_THRESHOLD||h>Te.LARGE_FILE_LINE_COUNT_THRESHOLD:this._isTooLargeForTokenization=!1,this._isTooLargeForSyncing=u>Te.MODEL_SYNC_LIMIT,this._versionId=1,this._alternativeVersionId=1,this._initialUndoRedoSnapshot=null,this._isDisposed=!1,this._isDisposing=!1,this._languageIdentifier=n||fe.pA,this._languageRegistryListener=Ae.zu.onDidChange((e=>{e.languageIdentifier.id===this._languageIdentifier.id&&this._onDidChangeLanguageConfiguration.fire({})})),this._instanceId=s.PJ(Ee),this._lastDecorationId=0,this._decorations=Object.create(null),this._decorationsTree=new Be,this._commandManager=new g.NL(this,r),this._isUndoing=!1,this._isRedoing=!1,this._trimAutoWhitespaceLines=null,this._tokens=new ae.Rl,this._tokens2=new ae.cx,this._tokenization=new ve(this)}static resolveOptions(e,t){if(t.detectIndentation){const n=f(e,t.tabSize,t.insertSpaces);return new u.dJ({tabSize:n.tabSize,indentSize:n.tabSize,insertSpaces:n.insertSpaces,trimAutoWhitespace:t.trimAutoWhitespace,defaultEOL:t.defaultEOL})}return new u.dJ({tabSize:t.tabSize,indentSize:t.indentSize,insertSpaces:t.insertSpaces,trimAutoWhitespace:t.trimAutoWhitespace,defaultEOL:t.defaultEOL})}onDidChangeContentFast(e){return this._eventEmitter.fastEvent((t=>e(t.contentChangedEvent)))}onDidChangeContent(e){return this._eventEmitter.slowEvent((t=>e(t.contentChangedEvent)))}dispose(){this._isDisposing=!0,this._onWillDispose.fire(),this._languageRegistryListener.dispose(),this._tokenization.dispose(),this._isDisposed=!0,super.dispose(),this._bufferDisposable.dispose(),this._isDisposing=!1;const e=new de([],"","\n",!1,!1,!0,!0);e.dispose(),this._buffer=e}_assertNotDisposed(){if(this._isDisposed)throw new Error("Model is disposed!")}_emitContentChangedEvent(e,t){this._isDisposing||this._eventEmitter.fire(new ue.fV(e,t))}setValue(e){if(this._assertNotDisposed(),null===e)return;const{textBuffer:t,disposable:n}=Le(e,this._options.defaultEOL);this._setValueFromTextBuffer(t,n)}_createContentChanged2(e,t,n,i,o,r,s){return{changes:[{range:e,rangeOffset:t,rangeLength:n,text:i}],eol:this._buffer.getEOL(),versionId:this.getVersionId(),isUndoing:o,isRedoing:r,isFlush:s}}_setValueFromTextBuffer(e,t){this._assertNotDisposed();const n=this.getFullModelRange(),i=this.getValueLengthInRange(n),o=this.getLineCount(),r=this.getLineMaxColumn(o);this._buffer=e,this._bufferDisposable.dispose(),this._bufferDisposable=t,this._increaseVersionId(),this._tokens.flush(),this._tokens2.flush(),this._decorations=Object.create(null),this._decorationsTree=new Be,this._commandManager.clear(),this._trimAutoWhitespaceLines=null,this._emitContentChangedEvent(new ue.dQ([new ue.Jx],this._versionId,!1,!1),this._createContentChanged2(new c.e(1,1,o,r),0,i,this.getValue(),!1,!1,!0))}setEOL(e){this._assertNotDisposed();const t=1===e?"\r\n":"\n";if(this._buffer.getEOL()===t)return;const n=this.getFullModelRange(),i=this.getValueLengthInRange(n),o=this.getLineCount(),r=this.getLineMaxColumn(o);this._onBeforeEOLChange(),this._buffer.setEOL(t),this._increaseVersionId(),this._onAfterEOLChange(),this._emitContentChangedEvent(new ue.dQ([new ue.CZ],this._versionId,!1,!1),this._createContentChanged2(new c.e(1,1,o,r),0,i,this.getValue(),!1,!1,!1))}_onBeforeEOLChange(){this._decorationsTree.ensureAllNodesHaveRanges(this)}_onAfterEOLChange(){const e=this.getVersionId(),t=this._decorationsTree.collectNodesPostOrder();for(let n=0,i=t.length;n0}getAttachedEditorCount(){return this._attachedEditorCount}isTooLargeForSyncing(){return this._isTooLargeForSyncing}isTooLargeForTokenization(){return this._isTooLargeForTokenization}isDisposed(){return this._isDisposed}isDominatedByLongLines(){if(this._assertNotDisposed(),this.isTooLargeForTokenization())return!1;let e=0,t=0;const n=this._buffer.getLineCount();for(let i=1;i<=n;i++){const n=this._buffer.getLineLength(i);n>=1e4?t+=n:e+=n}return t>e}get uri(){return this._associatedResource}getOptions(){return this._assertNotDisposed(),this._options}getFormattingOptions(){return{tabSize:this._options.indentSize,insertSpaces:this._options.insertSpaces}}updateOptions(e){this._assertNotDisposed();let t=void 0!==e.tabSize?e.tabSize:this._options.tabSize,n=void 0!==e.indentSize?e.indentSize:this._options.indentSize,i=void 0!==e.insertSpaces?e.insertSpaces:this._options.insertSpaces,o=void 0!==e.trimAutoWhitespace?e.trimAutoWhitespace:this._options.trimAutoWhitespace,r=new u.dJ({tabSize:t,indentSize:n,insertSpaces:i,defaultEOL:this._options.defaultEOL,trimAutoWhitespace:o});if(this._options.equals(r))return;let s=this._options.createChangeEvent(r);this._options=r,this._onDidChangeOptions.fire(s)}detectIndentation(e,t){this._assertNotDisposed();let n=f(this._buffer,t,e);this.updateOptions({insertSpaces:n.insertSpaces,tabSize:n.tabSize,indentSize:n.tabSize})}static _normalizeIndentationFromWhitespace(e,t,n){let i=0;for(let n=0;n({range:e.range,text:null}))),(()=>null))}mightContainNonBasicASCII(){return this._buffer.mightContainNonBasicASCII()}getAlternativeVersionId(){return this._assertNotDisposed(),this._alternativeVersionId}getInitialUndoRedoSnapshot(){return this._assertNotDisposed(),this._initialUndoRedoSnapshot}getOffsetAt(e){this._assertNotDisposed();let t=this._validatePosition(e.lineNumber,e.column,0);return this._buffer.getOffsetAt(t.lineNumber,t.column)}getPositionAt(e){this._assertNotDisposed();let t=Math.min(this._buffer.getLength(),Math.max(0,e));return this._buffer.getPositionAt(t)}_increaseVersionId(){this._versionId=this._versionId+1,this._alternativeVersionId=this._versionId}_overwriteVersionId(e){this._versionId=e}_overwriteAlternativeVersionId(e){this._alternativeVersionId=e}_overwriteInitialUndoRedoSnapshot(e){this._initialUndoRedoSnapshot=e}getValue(e,t=!1){this._assertNotDisposed();const n=this.getFullModelRange(),i=this.getValueInRange(n,e);return t?this._buffer.getBOM()+i:i}createSnapshot(e=!1){return new Ne(this._buffer.createSnapshot(e))}getValueLength(e,t=!1){this._assertNotDisposed();const n=this.getFullModelRange(),i=this.getValueLengthInRange(n,e);return t?this._buffer.getBOM().length+i:i}getValueInRange(e,t=0){return this._assertNotDisposed(),this._buffer.getValueInRange(this.validateRange(e),t)}getValueLengthInRange(e,t=0){return this._assertNotDisposed(),this._buffer.getValueLengthInRange(this.validateRange(e),t)}getCharacterCountInRange(e,t=0){return this._assertNotDisposed(),this._buffer.getCharacterCountInRange(this.validateRange(e),t)}getLineCount(){return this._assertNotDisposed(),this._buffer.getLineCount()}getLineContent(e){if(this._assertNotDisposed(),e<1||e>this.getLineCount())throw new Error("Illegal value for lineNumber");return this._buffer.getLineContent(e)}getLineLength(e){if(this._assertNotDisposed(),e<1||e>this.getLineCount())throw new Error("Illegal value for lineNumber");return this._buffer.getLineLength(e)}getLinesContent(){return this._assertNotDisposed(),this._buffer.getLinesContent()}getEOL(){return this._assertNotDisposed(),this._buffer.getEOL()}getEndOfLineSequence(){return this._assertNotDisposed(),"\n"===this._buffer.getEOL()?0:1}getLineMinColumn(e){return this._assertNotDisposed(),1}getLineMaxColumn(e){if(this._assertNotDisposed(),e<1||e>this.getLineCount())throw new Error("Illegal value for lineNumber");return this._buffer.getLineLength(e)+1}getLineFirstNonWhitespaceColumn(e){if(this._assertNotDisposed(),e<1||e>this.getLineCount())throw new Error("Illegal value for lineNumber");return this._buffer.getLineFirstNonWhitespaceColumn(e)}getLineLastNonWhitespaceColumn(e){if(this._assertNotDisposed(),e<1||e>this.getLineCount())throw new Error("Illegal value for lineNumber");return this._buffer.getLineLastNonWhitespaceColumn(e)}_validateRangeRelaxedNoAllocations(e){const t=this._buffer.getLineCount(),n=e.startLineNumber,i=e.startColumn;let o=Math.floor("number"!=typeof n||isNaN(n)?1:n),r=Math.floor("number"!=typeof i||isNaN(i)?1:i);if(o<1)o=1,r=1;else if(o>t)o=t,r=this.getLineMaxColumn(o);else if(r<=1)r=1;else{const e=this.getLineMaxColumn(o);r>=e&&(r=e)}const s=e.endLineNumber,a=e.endColumn;let l=Math.floor("number"!=typeof s||isNaN(s)?1:s),d=Math.floor("number"!=typeof a||isNaN(a)?1:a);if(l<1)l=1,d=1;else if(l>t)l=t,d=this.getLineMaxColumn(l);else if(d<=1)d=1;else{const e=this.getLineMaxColumn(l);d>=e&&(d=e)}return n===o&&i===r&&s===l&&a===d&&e instanceof c.e&&!(e instanceof h.Y)?e:new c.e(o,r,l,d)}_isValidPosition(e,t,n){if("number"!=typeof e||"number"!=typeof t)return!1;if(isNaN(e)||isNaN(t))return!1;if(e<1||t<1)return!1;if((0|e)!==e||(0|t)!==t)return!1;if(e>this._buffer.getLineCount())return!1;if(1===t)return!0;if(t>this.getLineMaxColumn(e))return!1;if(1===n){const n=this._buffer.getLineCharCode(e,t-2);if(s.ZG(n))return!1}return!0}_validatePosition(e,t,n){const i=Math.floor("number"!=typeof e||isNaN(e)?1:e),o=Math.floor("number"!=typeof t||isNaN(t)?1:t),r=this._buffer.getLineCount();if(i<1)return new d.L(1,1);if(i>r)return new d.L(r,this.getLineMaxColumn(r));if(o<=1)return new d.L(i,1);const a=this.getLineMaxColumn(i);if(o>=a)return new d.L(i,a);if(1===n){const e=this._buffer.getLineCharCode(i,o-2);if(s.ZG(e))return new d.L(i,o-1)}return new d.L(i,o)}validatePosition(e){return this._assertNotDisposed(),e instanceof d.L&&this._isValidPosition(e.lineNumber,e.column,1)?e:this._validatePosition(e.lineNumber,e.column,1)}_isValidRange(e,t){const n=e.startLineNumber,i=e.startColumn,o=e.endLineNumber,r=e.endColumn;if(!this._isValidPosition(n,i,0))return!1;if(!this._isValidPosition(o,r,0))return!1;if(1===t){const e=i>1?this._buffer.getLineCharCode(n,i-2):0,t=r>1&&r<=this._buffer.getLineLength(o)?this._buffer.getLineCharCode(o,r-2):0,a=s.ZG(e),l=s.ZG(t);return!a&&!l}return!0}validateRange(e){if(this._assertNotDisposed(),e instanceof c.e&&!(e instanceof h.Y)&&this._isValidRange(e,1))return e;const t=this._validatePosition(e.startLineNumber,e.startColumn,0),n=this._validatePosition(e.endLineNumber,e.endColumn,0),i=t.lineNumber,o=t.column,r=n.lineNumber,a=n.column;{const e=o>1?this._buffer.getLineCharCode(i,o-2):0,t=a>1&&a<=this._buffer.getLineLength(r)?this._buffer.getLineCharCode(r,a-2):0,n=s.ZG(e),l=s.ZG(t);return n||l?i===r&&o===a?new c.e(i,o-1,r,a-1):n&&l?new c.e(i,o-1,r,a+1):n?new c.e(i,o-1,r,a):new c.e(i,o,r,a+1):new c.e(i,o,r,a)}}modifyPosition(e,t){this._assertNotDisposed();let n=this.getOffsetAt(e)+t;return this.getPositionAt(Math.min(this._buffer.getLength(),Math.max(0,n)))}getFullModelRange(){this._assertNotDisposed();const e=this.getLineCount();return new c.e(1,1,e,this.getLineMaxColumn(e))}findMatchesLineByLine(e,t,n,i){return this._buffer.findMatchesLineByLine(e,t,n,i)}findMatches(e,t,n,i,o,r,s=999){this._assertNotDisposed();let a=null;null!==t&&(Array.isArray(t)||(t=[t]),t.every((e=>c.e.isIRange(e)))&&(a=t.map((e=>this.validateRange(e))))),null===a&&(a=[this.getFullModelRange()]),a=a.sort(((e,t)=>e.startLineNumber-t.startLineNumber||e.startColumn-t.startColumn));const l=[];let d;if(l.push(a.reduce(((e,t)=>c.e.areIntersecting(e,t)?e.plusRange(t):(l.push(e),t)))),!n&&e.indexOf("\n")<0){const t=new Q.bc(e,n,i,o).parseSearchRequest();if(!t)return[];d=e=>this.findMatchesLineByLine(e,t,r,s)}else d=t=>Q.pM.findMatches(this,new Q.bc(e,n,i,o),t,r,s);return l.map(d).reduce(((e,t)=>e.concat(t)),[])}findNextMatch(e,t,n,i,o,r){this._assertNotDisposed();const s=this.validatePosition(t);if(!n&&e.indexOf("\n")<0){const t=new Q.bc(e,n,i,o).parseSearchRequest();if(!t)return null;const a=this.getLineCount();let l=new c.e(s.lineNumber,s.column,a,this.getLineMaxColumn(a)),d=this.findMatchesLineByLine(l,t,r,1);return Q.pM.findNextMatch(this,new Q.bc(e,n,i,o),s,r),d.length>0?d[0]:(l=new c.e(1,1,s.lineNumber,this.getLineMaxColumn(s.lineNumber)),d=this.findMatchesLineByLine(l,t,r,1),d.length>0?d[0]:null)}return Q.pM.findNextMatch(this,new Q.bc(e,n,i,o),s,r)}findPreviousMatch(e,t,n,i,o,r){this._assertNotDisposed();const s=this.validatePosition(t);return Q.pM.findPreviousMatch(this,new Q.bc(e,n,i,o),s,r)}pushStackElement(){this._commandManager.pushStackElement()}popStackElement(){this._commandManager.popStackElement()}pushEOL(e){if(("\n"===this.getEOL()?0:1)!==e)try{this._onDidChangeDecorations.beginDeferredEmit(),this._eventEmitter.beginDeferredEmit(),null===this._initialUndoRedoSnapshot&&(this._initialUndoRedoSnapshot=this._undoRedoService.createSnapshot(this.uri)),this._commandManager.pushEOL(e)}finally{this._eventEmitter.endDeferredEmit(),this._onDidChangeDecorations.endDeferredEmit()}}_validateEditOperation(e){return e instanceof u.Qi?e:new u.Qi(e.identifier||null,this.validateRange(e.range),e.text,e.forceMoveMarkers||!1,e.isAutoWhitespaceEdit||!1,e._isTracked||!1)}_validateEditOperations(e){const t=[];for(let n=0,i=e.length;n({range:this.validateRange(e.range),text:e.text}))),i=!0;if(e)for(let t=0,o=e.length;to.endLineNumber,s=o.startLineNumber>t.endLineNumber;if(!i&&!s){r=!0;break}}if(!r){i=!1;break}}if(i)for(let e=0,i=this._trimAutoWhitespaceLines.length;et.endLineNumber||i===t.startLineNumber&&t.startColumn===o&&t.isEmpty()&&s&&s.length>0&&"\n"===s.charAt(0)||i===t.startLineNumber&&1===t.startColumn&&t.isEmpty()&&s&&s.length>0&&"\n"===s.charAt(s.length-1))){r=!1;break}}if(r){const e=new c.e(i,1,i,o);t.push(new u.Qi(null,e,null,!1,!1,!1))}}this._trimAutoWhitespaceLines=null}return null===this._initialUndoRedoSnapshot&&(this._initialUndoRedoSnapshot=this._undoRedoService.createSnapshot(this.uri)),this._commandManager.pushEditOperation(e,t,n)}_applyUndo(e,t,n,i){const o=e.map((e=>{const t=this.getPositionAt(e.newPosition),n=this.getPositionAt(e.newEnd);return{range:new c.e(t.lineNumber,t.column,n.lineNumber,n.column),text:e.oldText}}));this._applyUndoRedoEdits(o,t,!0,!1,n,i)}_applyRedo(e,t,n,i){const o=e.map((e=>{const t=this.getPositionAt(e.oldPosition),n=this.getPositionAt(e.oldEnd);return{range:new c.e(t.lineNumber,t.column,n.lineNumber,n.column),text:e.newText}}));this._applyUndoRedoEdits(o,t,!1,!0,n,i)}_applyUndoRedoEdits(e,t,n,i,o,r){try{this._onDidChangeDecorations.beginDeferredEmit(),this._eventEmitter.beginDeferredEmit(),this._isUndoing=n,this._isRedoing=i,this.applyEdits(e,!1),this.setEOL(t),this._overwriteAlternativeVersionId(o)}finally{this._isUndoing=!1,this._isRedoing=!1,this._eventEmitter.endDeferredEmit(r),this._onDidChangeDecorations.endDeferredEmit()}}applyEdits(e,t=!1){try{this._onDidChangeDecorations.beginDeferredEmit(),this._eventEmitter.beginDeferredEmit();const n=this._validateEditOperations(e);return this._doApplyEdits(n,t)}finally{this._eventEmitter.endDeferredEmit(),this._onDidChangeDecorations.endDeferredEmit()}}_doApplyEdits(e,t){const n=this._buffer.getLineCount(),i=this._buffer.applyEdits(e,this._options.trimAutoWhitespace,t),o=this._buffer.getLineCount(),r=i.changes;if(this._trimAutoWhitespaceLines=i.trimAutoWhitespaceLineNumbers,0!==r.length){for(let e=0,t=r.length;e0?t.text.charCodeAt(0):0),this._decorationsTree.acceptReplace(t.rangeOffset,t.rangeLength,t.text.length,t.forceMoveMarkers)}let e=[];this._increaseVersionId();let t=n;for(let n=0,i=r.length;n=0;t--){const n=a+t,i=p+t;C.takeFromEndWhile((e=>e.lineNumber>i));const o=C.takeFromEndWhile((e=>e.lineNumber===i));e.push(new ue.rU(n,this.getLineContent(i),o))}if(ue.lineNumbere.lineNumber===t))}e.push(new ue.Tx(i+1,a+h,d,l))}t+=g}this._emitContentChangedEvent(new ue.dQ(e,this.getVersionId(),this._isUndoing,this._isRedoing),{changes:r,eol:this._buffer.getEOL(),versionId:this.getVersionId(),isUndoing:this._isUndoing,isRedoing:this._isRedoing,isFlush:!1})}return null===i.reverseEdits?void 0:i.reverseEdits}undo(){return this._undoRedoService.undo(this.uri)}canUndo(){return this._undoRedoService.canUndo(this.uri)}redo(){return this._undoRedoService.redo(this.uri)}canRedo(){return this._undoRedoService.canRedo(this.uri)}handleBeforeFireDecorationsChangedEvent(e){if(null===e||0===e.size)return;const t=[...e].map((e=>new ue.rU(e,this.getLineContent(e),this._getInjectedTextInLine(e))));this._onDidChangeContentOrInjectedText.fire(new ue.D8(t))}changeDecorations(e,t=0){this._assertNotDisposed();try{return this._onDidChangeDecorations.beginDeferredEmit(),this._changeDecorations(t,e)}finally{this._onDidChangeDecorations.endDeferredEmit()}}_changeDecorations(e,t){let n={addDecoration:(t,n)=>this._deltaDecorationsImpl(e,[],[{range:t,options:n}])[0],changeDecoration:(e,t)=>{this._changeDecorationImpl(e,t)},changeDecorationOptions:(e,t)=>{this._changeDecorationOptionsImpl(e,$e(t))},removeDecoration:t=>{this._deltaDecorationsImpl(e,[t],[])},deltaDecorations:(t,n)=>0===t.length&&0===n.length?[]:this._deltaDecorationsImpl(e,t,n)},o=null;try{o=t(n)}catch(e){(0,i.dL)(e)}return n.addDecoration=De,n.changeDecoration=De,n.changeDecorationOptions=De,n.removeDecoration=De,n.deltaDecorations=De,o}deltaDecorations(e,t,n=0){if(this._assertNotDisposed(),e||(e=[]),0===e.length&&0===t.length)return[];try{return this._onDidChangeDecorations.beginDeferredEmit(),this._deltaDecorationsImpl(n,e,t)}finally{this._onDidChangeDecorations.endDeferredEmit()}}_getTrackedRange(e){return this.getDecorationRange(e)}_setTrackedRange(e,t,n){const i=e?this._decorations[e]:null;if(!i)return t?this._deltaDecorationsImpl(0,[],[{range:t,options:je[n]}])[0]:null;if(!t)return this._decorationsTree.delete(i),delete this._decorations[i.id],null;const o=this._validateRangeRelaxedNoAllocations(t),r=this._buffer.getOffsetAt(o.startLineNumber,o.startColumn),s=this._buffer.getOffsetAt(o.endLineNumber,o.endColumn);return this._decorationsTree.delete(i),i.reset(this.getVersionId(),r,s,o),i.setOptions(je[n]),this._decorationsTree.insert(i),i.id}removeAllDecorationsWithOwnerId(e){if(this._isDisposed)return;const t=this._decorationsTree.collectNodesFromOwner(e);for(let e=0,n=t.length;ethis.getLineCount()?[]:this.getLinesDecorations(e,e,t,n)}getLinesDecorations(e,t,n=0,i=!1){let o=this.getLineCount(),r=Math.min(o,Math.max(1,e)),s=Math.min(o,Math.max(1,t)),a=this.getLineMaxColumn(s);return this._getDecorationsInRange(new c.e(r,1,s,a),n,i)}getDecorationsInRange(e,t=0,n=!1){let i=this.validateRange(e);return this._getDecorationsInRange(i,t,n)}getOverviewRulerDecorations(e=0,t=!1){return this._decorationsTree.getAll(this,e,t,!0)}getInjectedTextDecorations(e=0){return this._decorationsTree.getAllInjectedText(this,e)}_getInjectedTextInLine(e){const t=this._buffer.getOffsetAt(e,1),n=t+this._buffer.getLineLength(e),i=this._decorationsTree.getInjectedTextInInterval(this,t,n,0);return ue.gk.fromDecorations(i).filter((t=>t.lineNumber===e))}getAllDecorations(e=0,t=!1){return this._decorationsTree.getAll(this,e,t,!1)}_getDecorationsInRange(e,t,n){const i=this._buffer.getOffsetAt(e.startLineNumber,e.startColumn),o=this._buffer.getOffsetAt(e.endLineNumber,e.endColumn);return this._decorationsTree.getAllInInterval(this,i,o,t,n)}getRangeAt(e,t){return this._buffer.getRangeAt(e,t-e)}_changeDecorationImpl(e,t){const n=this._decorations[e];if(!n)return;if(n.options.after){const t=this.getDecorationRange(e);this._onDidChangeDecorations.recordLineAffectedByInjectedText(t.endLineNumber)}if(n.options.before){const t=this.getDecorationRange(e);this._onDidChangeDecorations.recordLineAffectedByInjectedText(t.startLineNumber)}const i=this._validateRangeRelaxedNoAllocations(t),o=this._buffer.getOffsetAt(i.startLineNumber,i.startColumn),r=this._buffer.getOffsetAt(i.endLineNumber,i.endColumn);this._decorationsTree.delete(n),n.reset(this.getVersionId(),o,r,i),this._decorationsTree.insert(n),this._onDidChangeDecorations.checkAffectedAndFire(n.options),n.options.after&&this._onDidChangeDecorations.recordLineAffectedByInjectedText(i.endLineNumber),n.options.before&&this._onDidChangeDecorations.recordLineAffectedByInjectedText(i.startLineNumber)}_changeDecorationOptionsImpl(e,t){const n=this._decorations[e];if(!n)return;const i=!(!n.options.overviewRuler||!n.options.overviewRuler.color),o=!(!t.overviewRuler||!t.overviewRuler.color);if(this._onDidChangeDecorations.checkAffectedAndFire(n.options),this._onDidChangeDecorations.checkAffectedAndFire(t),n.options.after||t.after){const e=this._decorationsTree.getNodeRange(this,n);this._onDidChangeDecorations.recordLineAffectedByInjectedText(e.endLineNumber)}if(n.options.before||t.before){const e=this._decorationsTree.getNodeRange(this,n);this._onDidChangeDecorations.recordLineAffectedByInjectedText(e.startLineNumber)}i!==o?(this._decorationsTree.delete(n),n.setOptions(t),this._decorationsTree.insert(n)):n.setOptions(t)}_deltaDecorationsImpl(e,t,n){const i=this.getVersionId(),o=t.length;let r=0;const s=n.length;let a=0,l=new Array(s);for(;r0&&this._emitModelTokensChangedEvent({tokenizationSupportChanged:!1,semanticTokensApplied:!1,ranges:t})}setSemanticTokens(e,t){this._tokens2.set(e,t),this._emitModelTokensChangedEvent({tokenizationSupportChanged:!1,semanticTokensApplied:null!==e,ranges:[{fromLineNumber:1,toLineNumber:this.getLineCount()}]})}hasCompleteSemanticTokens(){return this._tokens2.isComplete()}hasSomeSemanticTokens(){return!this._tokens2.isEmpty()}setPartialSemanticTokens(e,t){if(this.hasCompleteSemanticTokens())return;const n=this._tokens2.setPartial(e,t);this._emitModelTokensChangedEvent({tokenizationSupportChanged:!1,semanticTokensApplied:!0,ranges:[{fromLineNumber:n.startLineNumber,toLineNumber:n.endLineNumber}]})}tokenizeViewport(e,t){e=Math.max(1,e),t=Math.min(this._buffer.getLineCount(),t),this._tokenization.tokenizeViewport(e,t)}clearTokens(){this._tokens.flush(),this._emitModelTokensChangedEvent({tokenizationSupportChanged:!0,semanticTokensApplied:!1,ranges:[{fromLineNumber:1,toLineNumber:this._buffer.getLineCount()}]})}_emitModelTokensChangedEvent(e){this._isDisposing||this._onDidChangeTokens.fire(e)}resetTokenization(){this._tokenization.reset()}forceTokenization(e){if(e<1||e>this.getLineCount())throw new Error("Illegal value for lineNumber");this._tokenization.forceTokenization(e)}isCheapToTokenize(e){return this._tokenization.isCheapToTokenize(e)}tokenizeIfCheap(e){this.isCheapToTokenize(e)&&this.forceTokenization(e)}getLineTokens(e){if(e<1||e>this.getLineCount())throw new Error("Illegal value for lineNumber");return this._getLineTokens(e)}_getLineTokens(e){const t=this.getLineContent(e),n=this._tokens.getTokens(this._languageIdentifier.id,e-1,t);return this._tokens2.addSemanticTokens(e,n)}getLanguageIdentifier(){return this._languageIdentifier}getModeId(){return this._languageIdentifier.language}setMode(e){if(this._languageIdentifier.id===e.id)return;let t={oldLanguage:this._languageIdentifier.language,newLanguage:e.language};this._languageIdentifier=e,this._onDidChangeLanguage.fire(t),this._onDidChangeLanguageConfiguration.fire({})}getLanguageIdAtPosition(e,t){const n=this.validatePosition(new d.L(e,t)),i=this.getLineTokens(n.lineNumber);return i.getLanguageId(i.findTokenIndexAtOffset(n.column-1))}getWordAtPosition(e){this._assertNotDisposed();const t=this.validatePosition(e),n=this.getLineContent(t.lineNumber),i=this._getLineTokens(t.lineNumber),o=i.findTokenIndexAtOffset(t.column-1),[r,s]=Te._findLanguageBoundaries(i,o),a=(0,ye.t2)(t.column,Ae.zu.getWordDefinition(i.getLanguageId(o)),n.substring(r,s),r);if(a&&a.startColumn<=e.column&&e.column<=a.endColumn)return a;if(o>0&&r===t.column-1){const[r,s]=Te._findLanguageBoundaries(i,o-1),a=(0,ye.t2)(t.column,Ae.zu.getWordDefinition(i.getLanguageId(o-1)),n.substring(r,s),r);if(a&&a.startColumn<=e.column&&e.column<=a.endColumn)return a}return null}static _findLanguageBoundaries(e,t){const n=e.getLanguageId(t);let i=0;for(let o=t;o>=0&&e.getLanguageId(o)===n;o--)i=e.getStartOffset(o);let o=e.getLineContent().length;for(let i=t,r=e.getCount();i=0;e--){const n=t.getEndOffset(e);if(n<=s)break;if((0,Se.Bu)(t.getStandardTokenType(e))||t.getLanguageId(e)!==r){s=n;break}}let a=Math.min(t.getLineContent().length,e.column-1+n.maxBracketLength);for(let e=i+1;e=a)break;if((0,Se.Bu)(t.getStandardTokenType(e))||t.getLanguageId(e)!==r){a=n;break}}return{searchStartOffset:s,searchEndOffset:a}}_matchBracket(e){const t=e.lineNumber,n=this._getLineTokens(t),i=this._buffer.getLineContent(t),o=n.findTokenIndexAtOffset(e.column-1);if(o<0)return null;const r=Ae.zu.getBracketsSupport(n.getLanguageId(o));if(r&&!(0,Se.Bu)(n.getStandardTokenType(o))){let{searchStartOffset:s,searchEndOffset:a}=this._establishBracketSearchOffsets(e,n,r,o),l=null;for(;;){const n=xe.Vr.findNextBracketInRange(r.forwardRegex,t,i,s,a);if(!n)break;if(n.startColumn<=e.column&&e.column<=n.endColumn){const e=i.substring(n.startColumn-1,n.endColumn-1).toLowerCase(),t=this._matchFoundBracket(n,r.textIsBracket[e],r.textIsOpenBracket[e],null);if(t){if(t instanceof Ie)return null;l=t}}s=n.endColumn-1}if(l)return l}if(o>0&&n.getStartOffset(o)===e.column-1){const r=o-1,s=Ae.zu.getBracketsSupport(n.getLanguageId(r));if(s&&!(0,Se.Bu)(n.getStandardTokenType(r))){let{searchStartOffset:o,searchEndOffset:a}=this._establishBracketSearchOffsets(e,n,s,r);const l=xe.Vr.findPrevBracketInRange(s.reversedRegex,t,i,o,a);if(l&&l.startColumn<=e.column&&e.column<=l.endColumn){const e=i.substring(l.startColumn-1,l.endColumn-1).toLowerCase(),t=this._matchFoundBracket(l,s.textIsBracket[e],s.textIsOpenBracket[e],null);if(t)return t instanceof Ie?null:t}}}return null}_matchFoundBracket(e,t,n,i){if(!t)return null;const o=n?this._findMatchingBracketDown(t,e.getEndPosition(),i):this._findMatchingBracketUp(t,e.getStartPosition(),i);return o?o instanceof Ie?o:[e,o]:null}_findMatchingBracketUp(e,t,n){const i=e.languageIdentifier.id,o=e.reversedRegex;let r=-1,s=0;const a=(t,i,a,l)=>{for(;;){if(n&&++s%100==0&&!n())return Ie.INSTANCE;const d=xe.Vr.findPrevBracketInRange(o,t,i,a,l);if(!d)break;const c=i.substring(d.startColumn-1,d.endColumn-1).toLowerCase();if(e.isOpen(c)?r++:e.isClose(c)&&r--,0===r)return d;l=d.startColumn-1}return null};for(let e=t.lineNumber;e>=1;e--){const n=this._getLineTokens(e),o=n.getCount(),r=this._buffer.getLineContent(e);let s=o-1,l=r.length,d=r.length;e===t.lineNumber&&(s=n.findTokenIndexAtOffset(t.column-1),l=t.column-1,d=t.column-1);let c=!0;for(;s>=0;s--){const t=n.getLanguageId(s)===i&&!(0,Se.Bu)(n.getStandardTokenType(s));if(t)c?l=n.getStartOffset(s):(l=n.getStartOffset(s),d=n.getEndOffset(s));else if(c&&l!==d){const t=a(e,r,l,d);if(t)return t}c=t}if(c&&l!==d){const t=a(e,r,l,d);if(t)return t}}return null}_findMatchingBracketDown(e,t,n){const i=e.languageIdentifier.id,o=e.forwardRegex;let r=1,s=0;const a=(t,i,a,l)=>{for(;;){if(n&&++s%100==0&&!n())return Ie.INSTANCE;const d=xe.Vr.findNextBracketInRange(o,t,i,a,l);if(!d)break;const c=i.substring(d.startColumn-1,d.endColumn-1).toLowerCase();if(e.isOpen(c)?r++:e.isClose(c)&&r--,0===r)return d;a=d.endColumn-1}return null},l=this.getLineCount();for(let e=t.lineNumber;e<=l;e++){const n=this._getLineTokens(e),o=n.getCount(),r=this._buffer.getLineContent(e);let s=0,l=0,d=0;e===t.lineNumber&&(s=n.findTokenIndexAtOffset(t.column-1),l=t.column-1,d=t.column-1);let c=!0;for(;s=1;e--){const o=this._getLineTokens(e),r=o.getCount(),s=this._buffer.getLineContent(e);let a=r-1,l=s.length,d=s.length;if(e===t.lineNumber){a=o.findTokenIndexAtOffset(t.column-1),l=t.column-1,d=t.column-1;const e=o.getLanguageId(a);n!==e&&(n=e,i=Ae.zu.getBracketsSupport(n))}let c=!0;for(;a>=0;a--){const t=o.getLanguageId(a);if(n!==t){if(i&&c&&l!==d){const t=xe.Vr.findPrevBracketInRange(i.reversedRegex,e,s,l,d);if(t)return this._toFoundBracket(i,t);c=!1}n=t,i=Ae.zu.getBracketsSupport(n)}const r=!!i&&!(0,Se.Bu)(o.getStandardTokenType(a));if(r)c?l=o.getStartOffset(a):(l=o.getStartOffset(a),d=o.getEndOffset(a));else if(i&&c&&l!==d){const t=xe.Vr.findPrevBracketInRange(i.reversedRegex,e,s,l,d);if(t)return this._toFoundBracket(i,t)}c=r}if(i&&c&&l!==d){const t=xe.Vr.findPrevBracketInRange(i.reversedRegex,e,s,l,d);if(t)return this._toFoundBracket(i,t)}}return null}findNextBracket(e){const t=this.validatePosition(e),n=this.getLineCount();let i=-1,o=null;for(let e=t.lineNumber;e<=n;e++){const n=this._getLineTokens(e),r=n.getCount(),s=this._buffer.getLineContent(e);let a=0,l=0,d=0;if(e===t.lineNumber){a=n.findTokenIndexAtOffset(t.column-1),l=t.column-1,d=t.column-1;const e=n.getLanguageId(a);i!==e&&(i=e,o=Ae.zu.getBracketsSupport(i))}let c=!0;for(;aDate.now()-e<=t}const i=this.validatePosition(e),o=this.getLineCount(),r=new Map;let s=[];const a=(e,t)=>{if(!r.has(e)){let n=[];for(let e=0,i=t?t.brackets.length:0;e{for(;;){if(n&&++l%100==0&&!n())return Ie.INSTANCE;const a=xe.Vr.findNextBracketInRange(e.forwardRegex,t,i,o,r);if(!a)break;const d=i.substring(a.startColumn-1,a.endColumn-1).toLowerCase(),c=e.textIsBracket[d];if(c&&(c.isOpen(d)?s[c.index]++:c.isClose(d)&&s[c.index]--,-1===s[c.index]))return this._matchFoundBracket(a,c,!1,n);o=a.endColumn-1}return null};let c=-1,h=null;for(let e=i.lineNumber;e<=o;e++){const t=this._getLineTokens(e),n=t.getCount(),o=this._buffer.getLineContent(e);let r=0,s=0,l=0;if(e===i.lineNumber){r=t.findTokenIndexAtOffset(i.column-1),s=i.column-1,l=i.column-1;const e=t.getLanguageId(r);c!==e&&(c=e,h=Ae.zu.getBracketsSupport(c),a(c,h))}let u=!0;for(;ri)throw new Error("Illegal value for lineNumber");const o=Ae.zu.getFoldingRules(this._languageIdentifier.id),r=Boolean(o&&o.offSide);let s=-2,a=-1,l=-2,d=-1;const c=e=>{if(-1!==s&&(-2===s||s>e-1)){s=-1,a=-1;for(let t=e-2;t>=0;t--){let e=this._computeIndentLevel(t);if(e>=0){s=t,a=e;break}}}if(-2===l){l=-1,d=-1;for(let t=e;t=0){l=t,d=e;break}}}};let h=-2,u=-1,g=-2,p=-1;const m=e=>{if(-2===h){h=-1,u=-1;for(let t=e-2;t>=0;t--){let e=this._computeIndentLevel(t);if(e>=0){h=t,u=e;break}}}if(-1!==g&&(-2===g||g=0){g=t,p=e;break}}}};let f=0,_=!0,b=0,C=!0,v=0,w=0;for(let o=0;_||C;o++){const s=e-o,g=e+o;o>1&&(s<1||s1&&(g>i||g>n)&&(C=!1),o>5e4&&(_=!1,C=!1);let y=-1;if(_){const e=this._computeIndentLevel(s-1);e>=0?(l=s-1,d=e,y=Math.ceil(e/this._options.indentSize)):(c(s),y=this._getIndentLevelForWhitespaceLine(r,a,d))}let A=-1;if(C){const e=this._computeIndentLevel(g-1);e>=0?(h=g-1,u=e,A=Math.ceil(e/this._options.indentSize)):(m(g),A=this._getIndentLevelForWhitespaceLine(r,u,p))}if(0!==o){if(1===o){if(g<=i&&A>=0&&w+1===A){_=!1,f=g,b=g,v=A;continue}if(s>=1&&y>=0&&y-1===w){C=!1,f=s,b=s,v=y;continue}if(f=e,b=e,v=w,0===v)return{startLineNumber:f,endLineNumber:b,indent:v}}_&&(y>=v?f=s:_=!1),C&&(A>=v?b=g:C=!1)}else w=y}return{startLineNumber:f,endLineNumber:b,indent:v}}getLinesIndentGuides(e,t){this._assertNotDisposed();const n=this.getLineCount();if(e<1||e>n)throw new Error("Illegal value for startLineNumber");if(t<1||t>n)throw new Error("Illegal value for endLineNumber");const i=Ae.zu.getFoldingRules(this._languageIdentifier.id),o=Boolean(i&&i.offSide);let r=new Array(t-e+1),s=-2,a=-1,l=-2,d=-1;for(let i=e;i<=t;i++){let t=i-e;const c=this._computeIndentLevel(i-1);if(c>=0)s=i-1,a=c,r[t]=Math.ceil(c/this._options.indentSize);else{if(-2===s){s=-1,a=-1;for(let e=i-2;e>=0;e--){let t=this._computeIndentLevel(e);if(t>=0){s=e,a=t;break}}}if(-1!==l&&(-2===l||l=0){l=e,d=t;break}}}r[t]=this._getIndentLevelForWhitespaceLine(o,a,d)}}return r}_getIndentLevelForWhitespaceLine(e,t,n){return-1===t||-1===n?0:t0?this._deferredEvent?this._deferredEvent=this._deferredEvent.merge(e):this._deferredEvent=e:(this._fastEmitter.fire(e),this._slowEmitter.fire(e))}}},3256:(e,t,n)=>{"use strict";n.d(t,{Jx:()=>i,gk:()=>o,rU:()=>r,lN:()=>s,Tx:()=>a,CZ:()=>l,dQ:()=>d,D8:()=>c,fV:()=>h});class i{constructor(){this.changeType=1}}class o{constructor(e,t,n,i,o){this.ownerId=e,this.lineNumber=t,this.column=n,this.options=i,this.order=o}static applyInjectedText(e,t){if(!t||0===t.length)return e;let n="",i=0;for(const o of t)n+=e.substring(i,o.column-1),i=o.column-1,n+=o.options.content;return n+=e.substring(i),n}static fromDecorations(e){const t=[];for(const n of e)n.options.before&&n.options.before.content.length>0&&t.push(new o(n.ownerId,n.range.startLineNumber,n.range.startColumn,n.options.before,0)),n.options.after&&n.options.after.content.length>0&&t.push(new o(n.ownerId,n.range.endLineNumber,n.range.endColumn,n.options.after,1));return t.sort(((e,t)=>e.lineNumber===t.lineNumber?e.column===t.column?e.order-t.order:e.column-t.column:e.lineNumber-t.lineNumber)),t}}class r{constructor(e,t,n){this.changeType=2,this.lineNumber=e,this.detail=t,this.injectedText=n}}class s{constructor(e,t){this.changeType=3,this.fromLineNumber=e,this.toLineNumber=t}}class a{constructor(e,t,n,i){this.changeType=4,this.injectedTexts=i,this.fromLineNumber=e,this.toLineNumber=t,this.detail=n}}class l{constructor(){this.changeType=5}}class d{constructor(e,t,n,i){this.changes=e,this.versionId=t,this.isUndoing=n,this.isRedoing=i,this.resultingSelection=null}containsEvent(e){for(let t=0,n=this.changes.length;t{"use strict";n.d(t,{bc:()=>l,iE:()=>c,pM:()=>u,cM:()=>g,sz:()=>p});var i=n(7295),o=n(9410),r=n(187),s=n(4314),a=n(4973);class l{constructor(e,t,n,i){this.searchString=e,this.isRegex=t,this.matchCase=n,this.wordSeparators=i}parseSearchRequest(){if(""===this.searchString)return null;let e;e=this.isRegex?function(e){if(!e||0===e.length)return!1;for(let t=0,n=e.length;t=n)break;const i=e.charCodeAt(t);if(110===i||114===i||87===i||119===i)return!0}return!1}(this.searchString):this.searchString.indexOf("\n")>=0;let t=null;try{t=i.GF(this.searchString,this.isRegex,{matchCase:this.matchCase,wholeWord:!1,multiline:e,global:!0,unicode:!0})}catch(e){return null}if(!t)return null;let n=!this.isRegex&&!e;return n&&this.searchString.toLowerCase()!==this.searchString.toUpperCase()&&(n=this.matchCase),new d(t,this.wordSeparators?(0,o.u)(this.wordSeparators):null,n?this.searchString:null)}}class d{constructor(e,t,n){this.regex=e,this.wordSeparators=t,this.simpleSearch=n}}function c(e,t,n){if(!n)return new a.tk(e,null);let i=[];for(let e=0,n=t.length;e>0);t[o]>=e?i=o-1:t[o+1]>=e?(n=o,i=o):n=o+1}return n+1}}class u{static findMatches(e,t,n,i,o){const r=t.parseSearchRequest();return r?r.regex.multiline?this._doFindMatchesMultiline(e,n,new p(r.wordSeparators,r.regex),i,o):this._doFindMatchesLineByLine(e,n,r,i,o):[]}static _getMultilineMatchRange(e,t,n,i,o,r){let a,l,d=0;if(i?(d=i.findLineFeedCountBeforeOffset(o),a=t+o+d):a=t+o,i){let e=i.findLineFeedCountBeforeOffset(o+r.length)-d;l=a+r.length+e}else l=a+r.length;const c=e.getPositionAt(a),h=e.getPositionAt(l);return new s.e(c.lineNumber,c.column,h.lineNumber,h.column)}static _doFindMatchesMultiline(e,t,n,i,o){const r=e.getOffsetAt(t.getStartPosition()),s=e.getValueInRange(t,1),a="\r\n"===e.getEOL()?new h(s):null,l=[];let d,u=0;for(n.reset(0);d=n.next(s);)if(l[u++]=c(this._getMultilineMatchRange(e,r,s,a,d.index,d[0]),d,i),u>=o)return l;return l}static _doFindMatchesLineByLine(e,t,n,i,o){const r=[];let s=0;if(t.startLineNumber===t.endLineNumber){const a=e.getLineContent(t.startLineNumber).substring(t.startColumn-1,t.endColumn-1);return s=this._findMatchesInLine(n,a,t.startLineNumber,t.startColumn-1,s,r,i,o),r}const a=e.getLineContent(t.startLineNumber).substring(t.startColumn-1);s=this._findMatchesInLine(n,a,t.startLineNumber,t.startColumn-1,s,r,i,o);for(let a=t.startLineNumber+1;a=d))return o;return o}const u=new p(e.wordSeparators,e.regex);let m;u.reset(0);do{if(m=u.next(t),m&&(r[o++]=c(new s.e(n,m.index+1+i,n,m.index+1+m[0].length+i),m,l),o>=d))return o}while(m);return o}static findNextMatch(e,t,n,i){const o=t.parseSearchRequest();if(!o)return null;const r=new p(o.wordSeparators,o.regex);return o.regex.multiline?this._doFindNextMatchMultiline(e,n,r,i):this._doFindNextMatchLineByLine(e,n,r,i)}static _doFindNextMatchMultiline(e,t,n,i){const o=new r.L(t.lineNumber,1),a=e.getOffsetAt(o),l=e.getLineCount(),d=e.getValueInRange(new s.e(o.lineNumber,o.column,l,e.getLineMaxColumn(l)),1),u="\r\n"===e.getEOL()?new h(d):null;n.reset(t.column-1);let g=n.next(d);return g?c(this._getMultilineMatchRange(e,a,d,u,g.index,g[0]),g,i):1!==t.lineNumber||1!==t.column?this._doFindNextMatchMultiline(e,new r.L(1,1),n,i):null}static _doFindNextMatchLineByLine(e,t,n,i){const o=e.getLineCount(),r=t.lineNumber,s=e.getLineContent(r),a=this._findFirstMatchInLine(n,s,r,t.column,i);if(a)return a;for(let t=1;t<=o;t++){const s=(r+t-1)%o,a=e.getLineContent(s+1),l=this._findFirstMatchInLine(n,a,s+1,1,i);if(l)return l}return null}static _findFirstMatchInLine(e,t,n,i,o){e.reset(i-1);const r=e.next(t);return r?c(new s.e(n,r.index+1,n,r.index+1+r[0].length),r,o):null}static findPreviousMatch(e,t,n,i){const o=t.parseSearchRequest();if(!o)return null;const r=new p(o.wordSeparators,o.regex);return o.regex.multiline?this._doFindPreviousMatchMultiline(e,n,r,i):this._doFindPreviousMatchLineByLine(e,n,r,i)}static _doFindPreviousMatchMultiline(e,t,n,i){const o=this._doFindMatchesMultiline(e,new s.e(1,1,t.lineNumber,t.column),n,i,9990);if(o.length>0)return o[o.length-1];const a=e.getLineCount();return t.lineNumber!==a||t.column!==e.getLineMaxColumn(a)?this._doFindPreviousMatchMultiline(e,new r.L(a,e.getLineMaxColumn(a)),n,i):null}static _doFindPreviousMatchLineByLine(e,t,n,i){const o=e.getLineCount(),r=t.lineNumber,s=e.getLineContent(r).substring(0,t.column-1),a=this._findLastMatchInLine(n,s,r,i);if(a)return a;for(let t=1;t<=o;t++){const s=(o+r-t-1)%o,a=e.getLineContent(s+1),l=this._findLastMatchInLine(n,a,s+1,i);if(l)return l}return null}static _findLastMatchInLine(e,t,n,i){let o,r=null;for(e.reset(0);o=e.next(t);)r=c(new s.e(n,o.index+1,n,o.index+1+o[0].length),o,i);return r}}function g(e,t,n,i,o){return function(e,t,n,i,o){if(0===i)return!0;const r=t.charCodeAt(i-1);if(0!==e.get(r))return!0;if(13===r||10===r)return!0;if(o>0){const n=t.charCodeAt(i);if(0!==e.get(n))return!0}return!1}(e,t,0,i,o)&&function(e,t,n,i,o){if(i+o===n)return!0;const r=t.charCodeAt(i+o);if(0!==e.get(r))return!0;if(13===r||10===r)return!0;if(o>0){const n=t.charCodeAt(i+o-1);if(0!==e.get(n))return!0}return!1}(e,t,n,i,o)}class p{constructor(e,t){this._wordSeparators=e,this._searchRegex=t,this._prevMatchStartIndex=-1,this._prevMatchLength=0}reset(e){this._searchRegex.lastIndex=e,this._prevMatchStartIndex=-1,this._prevMatchLength=0}next(e){const t=e.length;let n;do{if(this._prevMatchStartIndex+this._prevMatchLength===t)return null;if(n=this._searchRegex.exec(e),!n)return null;const o=n.index,r=n[0].length;if(o===this._prevMatchStartIndex&&r===this._prevMatchLength){if(0===r){i.ZH(e,t,this._searchRegex.lastIndex)>65535?this._searchRegex.lastIndex+=2:this._searchRegex.lastIndex+=1;continue}return null}if(this._prevMatchStartIndex=o,this._prevMatchLength=r,!this._wordSeparators||g(this._wordSeparators,e,t,o,r))return n}while(n);return null}}},8409:(e,t,n)=>{"use strict";n.d(t,{QZ:()=>l,DA:()=>h,OU:()=>u,Wz:()=>p,cx:()=>_,Rl:()=>b});var i=n(9488),o=n(8411),r=n(187),s=n(4314),a=n(4101);function l(e){let t=0,n=0,i=0,o=0;for(let r=0,s=e.length;r>>0}const c=new Uint32Array(0).buffer;class h{constructor(){this.tokens=[]}add(e,t){if(this.tokens.length>0){const n=this.tokens[this.tokens.length-1];if(n.startLineNumber+n.tokens.length-1+1===e)return void n.tokens.push(t)}this.tokens.push(new m(e,[t]))}}class u{constructor(e){this._tokens=e,this._tokenCount=e.length/4}toString(e){let t=[];for(let n=0;ne)){let o=i;for(;o>t&&this._getDeltaLine(o-1)===e;)o--;let r=i;for(;re||c===e&&u>=t)&&(ce||h===e&&g>=t){if(ho?p-=o-n:p=n;else if(u===t&&g===n){if(!(u===i&&p>o)){d=!0;continue}p-=o-n}else if(uo)){d=!0;continue}u===t?(g=n,p=g+(p-o)):(g=0,p=g+(p-o))}else if(u>i){if(0===a&&!d){l=s;break}u-=a}else{if(!(u===i&&g>=o))throw new Error("Not possible!");e&&0===u&&(g+=e,p+=e),u-=a,g-=o-n,p-=o-n}const f=4*l;r[f]=u,r[f+1]=g,r[f+2]=p,r[f+3]=m,l++}this._tokenCount=l}acceptInsertText(e,t,n,i,o,r){const s=0===n&&1===i&&(r>=48&&r<=57||r>=65&&r<=90||r>=97&&r<=122),a=this._tokens,l=this._tokenCount;for(let r=0;r0?t.charCodeAt(0):0)}acceptEdit(e,t,n,i,o){this._acceptDeleteRange(e),this._acceptInsertText(new r.L(e.startLineNumber,e.startColumn),t,n,i,o),this._updateEndLineNumber()}_acceptDeleteRange(e){if(e.startLineNumber===e.endLineNumber&&e.startColumn===e.endColumn)return;const t=e.startLineNumber-this.startLineNumber,n=e.endLineNumber-this.startLineNumber;if(n<0){const e=n-t;return void(this.startLineNumber-=e)}const i=this.tokens.getMaxDeltaLine();if(!(t>=i+1)){if(t<0&&n>=i+1)return this.startLineNumber=0,void this.tokens.clear();if(t<0){const i=-t;this.startLineNumber-=i,this.tokens.acceptDeleteRange(e.startColumn-1,0,0,n,e.endColumn-1)}else this.tokens.acceptDeleteRange(0,t,e.startColumn-1,n,e.endColumn-1)}}_acceptInsertText(e,t,n,i,o){if(0===t&&0===n)return;const r=e.lineNumber-this.startLineNumber;r<0?this.startLineNumber+=t:r>=this.tokens.getMaxDeltaLine()+1||this.tokens.acceptInsertText(r,e.column-1,t,n,i,o)}}class m{constructor(e,t){this.startLineNumber=e,this.tokens=t}}function f(e){return e instanceof Uint32Array?e:new Uint32Array(e)}class _{constructor(){this._pieces=[],this._isComplete=!1}flush(){this._pieces=[],this._isComplete=!1}isEmpty(){return 0===this._pieces.length}set(e,t){this._pieces=e||[],this._isComplete=t}setPartial(e,t){let n=e;if(t.length>0){const i=t[0].getRange(),o=t[t.length-1].getRange();if(!i||!o)return e;n=e.plusRange(i).plusRange(o)}let o=null;for(let e=0,t=this._pieces.length;en.endLineNumber){o=o||{index:e};break}if(i.removeTokens(n),i.isEmpty()){this._pieces.splice(e,1),e--,t--;continue}if(i.endLineNumbern.endLineNumber){o=o||{index:e};continue}const[r,s]=i.split(n);r.isEmpty()?o=o||{index:e}:s.isEmpty()||(this._pieces.splice(e,1,r,s),e++,t++,o=o||{index:e})}return o=o||{index:this._pieces.length},t.length>0&&(this._pieces=i.Zv(this._pieces,o.index,t)),n}isComplete(){return this._isComplete}addSemanticTokens(e,t){const n=this._pieces;if(0===n.length)return t;const i=n[_._findFirstPieceWithLine(n,e)].getLineTokens(e);if(!i)return t;const r=t.getCount(),s=i.getCount();let a=0,l=[],d=0,c=0;const h=(e,t)=>{e!==c&&(c=e,l[d++]=e,l[d++]=t)};for(let e=0;e>>0,d=~l>>>0;for(;at)){for(;o>n&&e[o-1].startLineNumber<=t&&t<=e[o-1].endLineNumber;)o--;return o}i=o-1}}return n}acceptEdit(e,t,n,i,o){for(const r of this._pieces)r.acceptEdit(e,t,n,i,o)}}class b{constructor(){this._lineTokens=[],this._len=0}flush(){this._lineTokens=[],this._len=0}getTokens(e,t,n){let i=null;if(t1&&(t=a.NX.getLanguageId(i[1])!==e),!t)return c}if(!i||0===i.length){const n=new Uint32Array(2);return n[0]=t,n[1]=d(e),n.buffer}return i[i.length-2]=t,0===i.byteOffset&&i.byteLength===i.buffer.byteLength?i.buffer:i}_ensureLine(e){for(;e>=this._len;)this._lineTokens[this._len]=null,this._len++}_deleteLines(e,t){0!==t&&(e+t>this._len&&(t=this._len-e),this._lineTokens.splice(e,t),this._len-=t)}_insertLines(e,t){if(0===t)return;let n=[];for(let e=0;e=this._len)return;if(e.startLineNumber===e.endLineNumber){if(e.startColumn===e.endColumn)return;return void(this._lineTokens[t]=b._delete(this._lineTokens[t],e.startColumn-1,e.endColumn-1))}this._lineTokens[t]=b._deleteEnding(this._lineTokens[t],e.startColumn-1);const n=e.endLineNumber-1;let i=null;n=this._len||(0!==t?(this._lineTokens[i]=b._deleteEnding(this._lineTokens[i],e.column-1),this._lineTokens[i]=b._insert(this._lineTokens[i],e.column-1,n),this._insertLines(e.lineNumber,t)):this._lineTokens[i]=b._insert(this._lineTokens[i],e.column-1,n))}static _deleteBeginning(e,t){return null===e||e===c?e:b._delete(e,0,t)}static _deleteEnding(e,t){if(null===e||e===c)return e;const n=f(e),i=n[n.length-2];return b._delete(e,t,i)}static _delete(e,t,n){if(null===e||e===c||t===n)return e;const i=f(e),r=i.length>>>1;if(0===t&&i[i.length-2]===n)return c;const s=o.A.findIndexInTokensArray(i,t),a=s>0?i[s-1<<1]:0;if(nd&&(i[l++]=t,i[l++]=i[1+(e<<1)],d=t)}if(l===i.length)return e;let u=new Uint32Array(l);return u.set(i.subarray(0,l),0),u.buffer}static _append(e,t){if(t===c)return e;if(e===c)return t;if(null===e)return e;if(null===t)return null;const n=f(e),i=f(t),o=i.length>>>1;let r=new Uint32Array(n.length+i.length);r.set(n,0);let s=n.length;const a=n[n.length-2];for(let e=0;e>>1;let s=o.A.findIndexInTokensArray(i,t);s>0&&i[s-1<<1]===t&&s--;for(let e=s;e{"use strict";n.d(t,{vu:()=>i,Af:()=>o,eq:()=>r,t2:()=>a});const i="`~!@#$%^&*()-=+[{]}\\|;:'\",.<>/?",o=function(e=""){let t="(-?\\d*\\.\\d\\w*)|([^";for(const n of i)e.indexOf(n)>=0||(t+="\\"+n);return t+="\\s]+)",new RegExp(t,"g")}();function r(e){let t=o;if(e&&e instanceof RegExp)if(e.global)t=e;else{let n="g";e.ignoreCase&&(n+="i"),e.multiline&&(n+="m"),e.unicode&&(n+="u"),t=new RegExp(e.source,n)}return t.lastIndex=0,t}const s={maxLen:1e3,windowSize:15,timeBudget:150};function a(e,t,n,i,o=s){if(n.length>o.maxLen){let r=e-o.maxLen/2;return r<0?r=0:i+=r,a(e,t,n=n.substring(r,e+o.maxLen/2),i,o)}const r=Date.now(),d=e-1-i;let c=-1,h=null;for(let e=1;!(Date.now()-r>=o.timeBudget);e++){const i=d-o.windowSize*e;t.lastIndex=Math.max(0,i);const r=l(t,n,d,c);if(!r&&h)break;if(h=r,i<=0)break;c=i}if(h){let e={word:h[0],startColumn:i+1+h.index,endColumn:i+1+h.index+h[0].length};return t.lastIndex=0,e}return null}function l(e,t,n,i){let o;for(;o=e.exec(t);){const t=o.index||0;if(t<=n&&e.lastIndex>=n)return o;if(i>0&&t>i)return null}return null}},4101:(e,t,n)=>{"use strict";n.d(t,{H9:()=>O,He:()=>T,OH:()=>z,KZ:()=>y,RN:()=>D,Ct:()=>N,Az:()=>B,MY:()=>m,vH:()=>L,vN:()=>P,K7:()=>$,wT:()=>j,vJ:()=>k,AD:()=>C,aC:()=>H,xp:()=>x,vI:()=>I,mX:()=>R,bw:()=>g,zu:()=>A,rl:()=>d,pM:()=>W,id:()=>E,ln:()=>F,FL:()=>v,G0:()=>w,AC:()=>V,nD:()=>S,WW:()=>p,uZ:()=>f,NX:()=>c,RW:()=>U,tA:()=>M,jr:()=>u,Sy:()=>h,vx:()=>b});var i=n(666),o=n(4314),r=n(1036),s=n(4669),a=n(5976),l=n(3046);class d{constructor(e,t){this.language=e,this.id=t}}class c{static getLanguageId(e){return(255&e)>>>0}static getTokenType(e){return(1792&e)>>>8}static getFontStyle(e){return(14336&e)>>>11}static getForeground(e){return(8372224&e)>>>14}static getBackground(e){return(4286578688&e)>>>23}static getClassNameFromMetadata(e){let t="mtk"+this.getForeground(e),n=this.getFontStyle(e);return 1&n&&(t+=" mtki"),2&n&&(t+=" mtkb"),4&n&&(t+=" mtku"),t}static getInlineStyleFromMetadata(e,t){const n=this.getForeground(e),i=this.getFontStyle(e);let o=`color: ${t[n]};`;return 1&i&&(o+="font-style: italic;"),2&i&&(o+="font-weight: bold;"),4&i&&(o+="text-decoration: underline;"),o}}const h=function(){let e=Object.create(null);return e[0]="symbol-method",e[1]="symbol-function",e[2]="symbol-constructor",e[3]="symbol-field",e[4]="symbol-variable",e[5]="symbol-class",e[6]="symbol-struct",e[7]="symbol-interface",e[8]="symbol-module",e[9]="symbol-property",e[10]="symbol-event",e[11]="symbol-operator",e[12]="symbol-unit",e[13]="symbol-value",e[14]="symbol-constant",e[15]="symbol-enum",e[16]="symbol-enum-member",e[17]="symbol-keyword",e[27]="symbol-snippet",e[18]="symbol-text",e[19]="symbol-color",e[20]="symbol-file",e[21]="symbol-reference",e[22]="symbol-customcolor",e[23]="symbol-folder",e[24]="symbol-type-parameter",e[25]="account",e[26]="issues",function(t){const n=e[t];let i=n&&l.fK.get(n);return i||(console.info("No codicon found for CompletionItemKind "+t),i=l.lA.symbolProperty),i.classNames}}();let u=function(){let e=Object.create(null);return e.method=0,e.function=1,e.constructor=2,e.field=3,e.variable=4,e.class=5,e.struct=6,e.interface=7,e.module=8,e.property=9,e.event=10,e.operator=11,e.unit=12,e.value=13,e.constant=14,e.enum=15,e["enum-member"]=16,e.enumMember=16,e.keyword=17,e.snippet=27,e.text=18,e.color=19,e.file=20,e.reference=21,e.customcolor=22,e.folder=23,e["type-parameter"]=24,e.typeParameter=24,e.account=25,e.issue=26,function(t,n){let i=e[t];return void 0!==i||n||(i=9),i}}();var g,p,m,f,_;function b(e){return e&&i.o.isUri(e.uri)&&o.e.isIRange(e.range)&&(o.e.isIRange(e.originSelectionRange)||o.e.isIRange(e.targetSelectionRange))}!function(e){e[e.Automatic=0]="Automatic",e[e.Explicit=1]="Explicit"}(g||(g={})),function(e){e[e.Invoke=1]="Invoke",e[e.TriggerCharacter=2]="TriggerCharacter",e[e.ContentChange=3]="ContentChange"}(p||(p={})),function(e){e[e.Text=0]="Text",e[e.Read=1]="Read",e[e.Write=2]="Write"}(m||(m={})),function(e){const t=new Map;t.set("file",0),t.set("module",1),t.set("namespace",2),t.set("package",3),t.set("class",4),t.set("method",5),t.set("property",6),t.set("field",7),t.set("constructor",8),t.set("enum",9),t.set("interface",10),t.set("function",11),t.set("variable",12),t.set("constant",13),t.set("string",14),t.set("number",15),t.set("boolean",16),t.set("array",17),t.set("object",18),t.set("key",19),t.set("null",20),t.set("enum-member",21),t.set("struct",22),t.set("event",23),t.set("operator",24),t.set("type-parameter",25);const n=new Map;n.set(0,"file"),n.set(1,"module"),n.set(2,"namespace"),n.set(3,"package"),n.set(4,"class"),n.set(5,"method"),n.set(6,"property"),n.set(7,"field"),n.set(8,"constructor"),n.set(9,"enum"),n.set(10,"interface"),n.set(11,"function"),n.set(12,"variable"),n.set(13,"constant"),n.set(14,"string"),n.set(15,"number"),n.set(16,"boolean"),n.set(17,"array"),n.set(18,"object"),n.set(19,"key"),n.set(20,"null"),n.set(21,"enum-member"),n.set(22,"struct"),n.set(23,"event"),n.set(24,"operator"),n.set(25,"type-parameter"),e.fromString=function(e){return t.get(e)},e.toString=function(e){return n.get(e)},e.toCssClassName=function(e,t){const i=n.get(e);let o=i&&l.fK.get("symbol-"+i);return o||(console.info("No codicon found for SymbolKind "+e),o=l.lA.symbolProperty),`${t?"inline":"block"} ${o.classNames}`}}(f||(f={}));class C{constructor(e){this.value=e}}C.Comment=new C("comment"),C.Imports=new C("imports"),C.Region=new C("region"),function(e){e[e.Other=0]="Other",e[e.Type=1]="Type",e[e.Parameter=2]="Parameter"}(_||(_={}));const v=new r.c,w=new r.c,y=new r.c,A=new r.c,S=new r.c,x=new r.c,k=new r.c,L=new r.c,E=new r.c,N=new r.c,D=new r.c,I=new r.c,M=new r.c,T=new r.c,R=new r.c,O=new r.c,B=new r.c,P=new r.c,F=new r.c,W=new r.c,z=new r.c,V=new r.c,H=new r.c,j=new r.c,$=new r.c,U=new class{constructor(){this._map=new Map,this._promises=new Map,this._onDidChange=new s.Q5,this.onDidChange=this._onDidChange.event,this._colorMap=null}fire(e){this._onDidChange.fire({changedLanguages:e,changedColorMap:!1})}register(e,t){return this._map.set(e,t),this.fire([e]),(0,a.OF)((()=>{this._map.get(e)===t&&(this._map.delete(e),this.fire([e]))}))}registerPromise(e,t){let n=null,i=!1;return this._promises.set(e,t.then((t=>{this._promises.delete(e),!i&&t&&(n=this.register(e,t))}))),(0,a.OF)((()=>{i=!0,n&&n.dispose()}))}getPromise(e){const t=this.get(e);if(t)return Promise.resolve(t);const n=this._promises.get(e);return n?n.then((t=>this.get(e))):null}get(e){return this._map.get(e)||null}setColorMap(e){this._colorMap=e,this._onDidChange.fire({changedLanguages:Array.from(this._map.keys()),changedColorMap:!0})}getColorMap(){return this._colorMap}getDefaultBackground(){return this._colorMap&&this._colorMap.length>2?this._colorMap[2]:null}}},7354:(e,t,n)=>{"use strict";var i;n.d(t,{wU:()=>i,V6:()=>o,c$:()=>r}),function(e){e[e.None=0]="None",e[e.Indent=1]="Indent",e[e.IndentOutdent=2]="IndentOutdent",e[e.Outdent=3]="Outdent"}(i||(i={}));class o{constructor(e){if(this._standardAutoClosingPairConditionalBrand=void 0,this.open=e.open,this.close=e.close,this._standardTokenMask=0,Array.isArray(e.notIn))for(let t=0,n=e.notIn.length;t{"use strict";n.d(t,{zu:()=>v});var i=n(4669),o=n(5976),r=n(7295),s=n(7461),a=n(7354),l=n(764);class d{constructor(e){if(e.autoClosingPairs?this._autoClosingPairs=e.autoClosingPairs.map((e=>new a.V6(e))):e.brackets?this._autoClosingPairs=e.brackets.map((e=>new a.V6({open:e[0],close:e[1]}))):this._autoClosingPairs=[],e.__electricCharacterSupport&&e.__electricCharacterSupport.docComment){const t=e.__electricCharacterSupport.docComment;this._autoClosingPairs.push(new a.V6({open:t.open,close:t.close||""}))}this._autoCloseBefore="string"==typeof e.autoCloseBefore?e.autoCloseBefore:d.DEFAULT_AUTOCLOSE_BEFORE_LANGUAGE_DEFINED,this._surroundingPairs=e.surroundingPairs||this._autoClosingPairs}getAutoClosingPairs(){return this._autoClosingPairs}getAutoCloseBeforeSet(){return this._autoCloseBefore}static shouldAutoClosePair(e,t,n){if(0===t.getTokenCount())return!0;const i=t.findTokenIndexAtOffset(n-2),o=t.getStandardTokenType(i);return e.isOK(o)}getSurroundingPairs(){return this._surroundingPairs}}d.DEFAULT_AUTOCLOSE_BEFORE_LANGUAGE_DEFINED=";:.,=}])> \n\t";var c=n(4227);class h{constructor(e){this._richEditBrackets=e}getElectricCharacters(){let e=[];if(this._richEditBrackets)for(const t of this._richEditBrackets.brackets)for(const n of t.close){const t=n.charAt(n.length-1);e.push(t)}return e=e.filter(((e,t,n)=>n.indexOf(e)===t)),e}onElectricCharacter(e,t,n){if(!this._richEditBrackets||0===this._richEditBrackets.brackets.length)return null;const i=t.findTokenIndexAtOffset(n-1);if((0,l.Bu)(t.getStandardTokenType(i)))return null;const o=this._richEditBrackets.reversedRegex,r=t.getLineContent().substring(0,n-1)+e,s=c.Vr.findPrevBracketInRange(o,1,r,0,r.length);if(!s)return null;const a=r.substring(s.startColumn-1,s.endColumn-1).toLowerCase();if(this._richEditBrackets.textIsOpenBracket[a])return null;const d=t.getActualLineContentBefore(s.startColumn-1);return/^\s*$/.test(d)?{matchOpenBracket:a}:null}}function u(e){return e.global&&(e.lastIndex=0),!0}class g{constructor(e){this._indentationRules=e}shouldIncrease(e){return!!(this._indentationRules&&this._indentationRules.increaseIndentPattern&&u(this._indentationRules.increaseIndentPattern)&&this._indentationRules.increaseIndentPattern.test(e))}shouldDecrease(e){return!!(this._indentationRules&&this._indentationRules.decreaseIndentPattern&&u(this._indentationRules.decreaseIndentPattern)&&this._indentationRules.decreaseIndentPattern.test(e))}shouldIndentNextLine(e){return!!(this._indentationRules&&this._indentationRules.indentNextLinePattern&&u(this._indentationRules.indentNextLinePattern)&&this._indentationRules.indentNextLinePattern.test(e))}shouldIgnore(e){return!!(this._indentationRules&&this._indentationRules.unIndentedLinePattern&&u(this._indentationRules.unIndentedLinePattern)&&this._indentationRules.unIndentedLinePattern.test(e))}getIndentMetadata(e){let t=0;return this.shouldIncrease(e)&&(t+=1),this.shouldDecrease(e)&&(t+=2),this.shouldIndentNextLine(e)&&(t+=4),this.shouldIgnore(e)&&(t+=8),t}}var p=n(7301);class m{constructor(e){(e=e||{}).brackets=e.brackets||[["(",")"],["{","}"],["[","]"]],this._brackets=[],e.brackets.forEach((e=>{const t=m._createOpenBracketRegExp(e[0]),n=m._createCloseBracketRegExp(e[1]);t&&n&&this._brackets.push({open:e[0],openRegExp:t,close:e[1],closeRegExp:n})})),this._regExpRules=e.onEnterRules||[]}onEnter(e,t,n,i){if(e>=3)for(let e=0,o=this._regExpRules.length;e!e.reg||(e.reg.lastIndex=0,e.reg.test(e.text)))))return o.action}if(e>=2&&n.length>0&&i.length>0)for(let e=0,t=this._brackets.length;e=2&&n.length>0)for(let e=0,t=this._brackets.length;e{for(let e=0;e{r.dispose(),this._onDidChange.fire(new _(e))}))}_getRichEditSupport(e){const t=this._entries2.get(e);return t?t.getRichEditSupport():null}getIndentationRules(e){const t=this._getRichEditSupport(e);return t&&t.indentationRules||null}_getElectricCharacterSupport(e){let t=this._getRichEditSupport(e);return t&&t.electricCharacter||null}getElectricCharacters(e){let t=this._getElectricCharacterSupport(e);return t?t.getElectricCharacters():[]}onElectricCharacter(e,t,n){let i=(0,l.wH)(t,n-1),o=this._getElectricCharacterSupport(i.languageId);return o?o.onElectricCharacter(e,i,n-i.firstCharOffset):null}getComments(e){let t=this._getRichEditSupport(e);return t&&t.comments||null}_getCharacterPairSupport(e){let t=this._getRichEditSupport(e);return t&&t.characterPair||null}getAutoClosingPairs(e){const t=this._getCharacterPairSupport(e);return new a.c$(t?t.getAutoClosingPairs():[])}getAutoCloseBeforeSet(e){let t=this._getCharacterPairSupport(e);return t?t.getAutoCloseBeforeSet():d.DEFAULT_AUTOCLOSE_BEFORE_LANGUAGE_DEFINED}getSurroundingPairs(e){let t=this._getCharacterPairSupport(e);return t?t.getSurroundingPairs():[]}shouldAutoClosePair(e,t,n){const i=(0,l.wH)(t,n-1);return d.shouldAutoClosePair(e,i,n-i.firstCharOffset)}getWordDefinition(e){let t=this._getRichEditSupport(e);return t?(0,s.eq)(t.wordDefinition||null):(0,s.eq)(null)}getFoldingRules(e){let t=this._getRichEditSupport(e);return t?t.foldingRules:{}}getIndentRulesSupport(e){let t=this._getRichEditSupport(e);return t&&t.indentRulesSupport||null}getPrecedingValidLine(e,t,n){let i=e.getLanguageIdAtPosition(t,0);if(t>1){let o,r=-1;for(o=t-1;o>=1;o--){if(e.getLanguageIdAtPosition(o,0)!==i)return r;let t=e.getLineContent(o);if(!n.shouldIgnore(t)&&!/^\s+$/.test(t)&&""!==t)return o;r=o}}return-1}getInheritIndentForLine(e,t,n,i=!0){if(e<4)return null;const o=this.getIndentRulesSupport(t.getLanguageIdentifier().id);if(!o)return null;if(n<=1)return{indentation:"",action:null};const s=this.getPrecedingValidLine(t,n,o);if(s<0)return null;if(s<1)return{indentation:"",action:null};const l=t.getLineContent(s);if(o.shouldIncrease(l)||o.shouldIndentNextLine(l))return{indentation:r.V8(l),action:a.wU.Indent,line:s};if(o.shouldDecrease(l))return{indentation:r.V8(l),action:null,line:s};{if(1===s)return{indentation:r.V8(t.getLineContent(s)),action:null,line:s};const e=s-1,n=o.getIndentMetadata(t.getLineContent(e));if(!(3&n)&&4&n){let n=0;for(let i=e-1;i>0;i--)if(!o.shouldIndentNextLine(t.getLineContent(i))){n=i;break}return{indentation:r.V8(t.getLineContent(n+1)),action:null,line:n+1}}if(i)return{indentation:r.V8(t.getLineContent(s)),action:null,line:s};for(let e=s;e>0;e--){const n=t.getLineContent(e);if(o.shouldIncrease(n))return{indentation:r.V8(n),action:a.wU.Indent,line:e};if(o.shouldIndentNextLine(n)){let n=0;for(let i=e-1;i>0;i--)if(!o.shouldIndentNextLine(t.getLineContent(e))){n=i;break}return{indentation:r.V8(t.getLineContent(n+1)),action:null,line:n+1}}if(o.shouldDecrease(n))return{indentation:r.V8(n),action:null,line:e}}return{indentation:r.V8(t.getLineContent(1)),action:null,line:1}}}getGoodIndentForLine(e,t,n,i,o){if(e<4)return null;const s=this._getRichEditSupport(n);if(!s)return null;const l=this.getIndentRulesSupport(n);if(!l)return null;const d=this.getInheritIndentForLine(e,t,i),c=t.getLineContent(i);if(d){const n=d.line;if(void 0!==n){const i=s.onEnter(e,"",t.getLineContent(n),"");if(i){let e=r.V8(t.getLineContent(n));return i.removeText&&(e=e.substring(0,e.length-i.removeText)),i.indentAction===a.wU.Indent||i.indentAction===a.wU.IndentOutdent?e=o.shiftIndent(e):i.indentAction===a.wU.Outdent&&(e=o.unshiftIndent(e)),l.shouldDecrease(c)&&(e=o.unshiftIndent(e)),i.appendText&&(e+=i.appendText),r.V8(e)}}return l.shouldDecrease(c)?d.action===a.wU.Indent?d.indentation:o.unshiftIndent(d.indentation):d.action===a.wU.Indent?o.shiftIndent(d.indentation):d.indentation}return null}getIndentForEnter(e,t,n,i){if(e<4)return null;t.forceTokenization(n.startLineNumber);const o=t.getLineTokens(n.startLineNumber),s=(0,l.wH)(o,n.startColumn-1),d=s.getLineContent();let c,h,u=!1;s.firstCharOffset>0&&o.getLanguageId(0)!==s.languageId?(u=!0,c=d.substr(0,n.startColumn-1-s.firstCharOffset)):c=o.getLineContent().substring(0,n.startColumn-1),h=n.isEmpty()?d.substr(n.startColumn-1-s.firstCharOffset):this.getScopedLineTokens(t,n.endLineNumber,n.endColumn).getLineContent().substr(n.endColumn-1-s.firstCharOffset);const g=this.getIndentRulesSupport(s.languageId);if(!g)return null;const p=c,m=r.V8(c),f={getLineTokens:e=>t.getLineTokens(e),getLanguageIdentifier:()=>t.getLanguageIdentifier(),getLanguageIdAtPosition:(e,n)=>t.getLanguageIdAtPosition(e,n),getLineContent:e=>e===n.startLineNumber?p:t.getLineContent(e)},_=r.V8(o.getLineContent()),b=this.getInheritIndentForLine(e,f,n.startLineNumber+1);if(!b){const e=u?_:m;return{beforeEnter:e,afterEnter:e}}let C=u?_:b.indentation;return b.action===a.wU.Indent&&(C=i.shiftIndent(C)),g.shouldDecrease(h)&&(C=i.unshiftIndent(C)),{beforeEnter:u?_:m,afterEnter:C}}getIndentActionForType(e,t,n,i,o){if(e<4)return null;const r=this.getScopedLineTokens(t,n.startLineNumber,n.startColumn);if(r.firstCharOffset)return null;const s=this.getIndentRulesSupport(r.languageId);if(!s)return null;const l=r.getLineContent(),d=l.substr(0,n.startColumn-1-r.firstCharOffset);let c;if(c=n.isEmpty()?l.substr(n.startColumn-1-r.firstCharOffset):this.getScopedLineTokens(t,n.endLineNumber,n.endColumn).getLineContent().substr(n.endColumn-1-r.firstCharOffset),!s.shouldDecrease(d+c)&&s.shouldDecrease(d+i+c)){const i=this.getInheritIndentForLine(e,t,n.startLineNumber,!1);if(!i)return null;let r=i.indentation;return i.action!==a.wU.Indent&&(r=o.unshiftIndent(r)),r}return null}getIndentMetadata(e,t){const n=this.getIndentRulesSupport(e.getLanguageIdentifier().id);return n?t<1||t>e.getLineCount()?null:n.getIndentMetadata(e.getLineContent(t)):null}getEnterAction(e,t,n){const i=this.getScopedLineTokens(t,n.startLineNumber,n.startColumn),o=this._getRichEditSupport(i.languageId);if(!o)return null;const r=i.getLineContent(),s=r.substr(0,n.startColumn-1-i.firstCharOffset);let l;l=n.isEmpty()?r.substr(n.startColumn-1-i.firstCharOffset):this.getScopedLineTokens(t,n.endLineNumber,n.endColumn).getLineContent().substr(n.endColumn-1-i.firstCharOffset);let d="";if(n.startLineNumber>1&&0===i.firstCharOffset){const e=this.getScopedLineTokens(t,n.startLineNumber-1);e.languageId===i.languageId&&(d=e.getLineContent())}const c=o.onEnter(e,d,s,l);if(!c)return null;const h=c.indentAction;let u=c.appendText;const g=c.removeText||0;u?h===a.wU.Indent&&(u="\t"+u):u=h===a.wU.Indent||h===a.wU.IndentOutdent?"\t":"";let p=this.getIndentationAtPosition(t,n.startLineNumber,n.startColumn);return g&&(p=p.substring(0,p.length-g)),{indentAction:h,appendText:u,removeText:g,indentation:p}}getIndentationAtPosition(e,t,n){const i=e.getLineContent(t);let o=r.V8(i);return o.length>n-1&&(o=o.substring(0,n-1)),o}getScopedLineTokens(e,t,n){e.forceTokenization(t);const i=e.getLineTokens(t),o=void 0===n?e.getLineMaxColumn(t)-1:n-1;return(0,l.wH)(i,o)}getBracketsSupport(e){const t=this._getRichEditSupport(e);return t&&t.brackets||null}}},1036:(e,t,n)=>{"use strict";n.d(t,{c:()=>g,Y:()=>p});var i=n(4669),o=n(9954),r=n(5976),s=n(3702),a=n(9870),l=n(4118),d=n(8721);function c(e,t,n,i){if(Array.isArray(e)){let o=0;for(const r of e){const e=c(r,t,n,i);if(10===e)return e;e>o&&(o=e)}return o}if("string"==typeof e)return i?"*"===e?5:e===n?10:0:0;if(e){const{language:o,pattern:r,scheme:s,hasAccessToAllModels:a}=e;if(!i&&!a)return 0;let c=0;if(s)if(s===t.scheme)c=10;else{if("*"!==s)return 0;c=5}if(o)if(o===n)c=10;else{if("*"!==o)return 0;c=Math.max(c,5)}if(r){let e;if(e="string"==typeof r?r:Object.assign(Object.assign({},r),{base:(0,d.Fv)(r.base)}),e!==t.fsPath&&!(0,l.EQ)(e,t.fsPath))return 0;c=10}return c}return 0}var h=n(1200);function u(e){return"string"!=typeof e&&(Array.isArray(e)?e.every(u):!!e.exclusive)}class g{constructor(){this._clock=0,this._entries=[],this._onDidChange=new i.Q5}get onDidChange(){return this._onDidChange.event}register(e,t){let n={selector:e,provider:t,_score:-1,_time:this._clock++};return this._entries.push(n),this._lastCandidate=void 0,this._onDidChange.fire(this._entries.length),(0,r.OF)((()=>{if(n){let e=this._entries.indexOf(n);e>=0&&(this._entries.splice(e,1),this._lastCandidate=void 0,this._onDidChange.fire(this._entries.length),n=void 0)}}))}has(e){return this.all(e).length>0}all(e){if(!e)return[];this._updateScores(e);const t=[];for(let e of this._entries)e._score>0&&t.push(e.provider);return t}ordered(e){const t=[];return this._orderedForEach(e,(e=>t.push(e.provider))),t}orderedGroups(e){const t=[];let n,i;return this._orderedForEach(e,(e=>{n&&i===e._score?n.push(e.provider):(i=e._score,n=[e.provider],t.push(n))})),t}_orderedForEach(e,t){if(e){this._updateScores(e);for(const e of this._entries)e._score>0&&t(e)}}_updateScores(e){let t={uri:e.uri.toString(),language:e.getLanguageIdentifier().language};if(!this._lastCandidate||this._lastCandidate.language!==t.language||this._lastCandidate.uri!==t.uri){this._lastCandidate=t;for(let t of this._entries)if(t._score=c(t.selector,e.uri,e.getLanguageIdentifier().language,(0,h.p)(e)),u(t.selector)&&t._score>0){for(let e of this._entries)e._score=0;t._score=1e3;break}this._entries.sort(g._compareByScoreAndTime)}}static _compareByScoreAndTime(e,t){return e._scoret._score?-1:e._timet._time?-1:0}}class p{constructor(e,t,n=Number.MAX_SAFE_INTEGER){this._registry=e,this.min=t,this.max=n,this._cache=new s.z6(50,.7)}_key(e){return e.id+(0,o.vp)(this._registry.all(e))}_clamp(e){return void 0===e?this.min:Math.min(this.max,Math.max(this.min,Math.floor(1.3*e)))}get(e){const t=this._key(e),n=this._cache.get(t);return this._clamp(null==n?void 0:n.value)}update(e,t){const n=this._key(e);let i=this._cache.get(n);return i||(i=new a.n,this._cache.set(n,i)),i.update(t),this.get(e)}}},1144:(e,t,n)=>{"use strict";n.d(t,{dQ:()=>d,XT:()=>c,Tb:()=>h});var i=n(3580),o=n(4669),r=n(4101),s=n(3831),a=n(9872),l=n(1170);const d=new class{constructor(){this._onDidChangeLanguages=new o.Q5,this.onDidChangeLanguages=this._onDidChangeLanguages.event,this._languages=[],this._dynamicLanguages=[]}registerLanguage(e){return this._languages.push(e),this._onDidChangeLanguages.fire(void 0),{dispose:()=>{for(let t=0,n=this._languages.length;t"},{open:'"',close:'"'},{open:"'",close:"'"},{open:"`",close:"`"}],folding:{offSide:!0}},0)},8111:(e,t,n)=>{"use strict";n.d(t,{nO:()=>r,TG:()=>s,pA:()=>a,Ri:()=>l,mh:()=>d});var i=n(5600),o=n(4101);const r=new class{clone(){return this}equals(e){return this===e}},s="vs.editor.nullMode",a=new o.rl(s,0);function l(e,t,n,o){return new i.hG([new i.WU(o,"",e)],n)}function d(e,t,n,o){let s=new Uint32Array(2);return s[0]=o,s[1]=(16384|e<<0|2<<23)>>>0,new i.Hi(s,null===n?r:n)}},764:(e,t,n)=>{"use strict";function i(e,t){let n=e.getCount(),i=e.findTokenIndexAtOffset(t),r=e.getLanguageId(i),s=i;for(;s+10&&e.getLanguageId(a-1)===r;)a--;return new o(e,r,a,s+1,e.getStartOffset(a),e.getEndOffset(s))}n.d(t,{wH:()=>i,Bu:()=>r});class o{constructor(e,t,n,i,o,r){this._scopedLineTokensBrand=void 0,this._actual=e,this.languageId=t,this._firstTokenIndex=n,this._lastTokenIndex=i,this.firstCharOffset=o,this._lastCharOffset=r}getLineContent(){return this._actual.getLineContent().substring(this.firstCharOffset,this._lastCharOffset)}getActualLineContentBefore(e){return this._actual.getLineContent().substring(0,this.firstCharOffset+e)}getTokenCount(){return this._lastTokenIndex-this._firstTokenIndex}findTokenIndexAtOffset(e){return this._actual.findTokenIndexAtOffset(e+this.firstCharOffset)-this._firstTokenIndex}getStandardTokenType(e){return this._actual.getStandardTokenType(e+this._firstTokenIndex)}}function r(e){return 0!=(7&e)}},4227:(e,t,n)=>{"use strict";n.d(t,{EA:()=>a,Vr:()=>p});var i=n(7295),o=n(72),r=n(4314);class s{constructor(e,t,n,i,o,r){this._richEditBracketBrand=void 0,this.languageIdentifier=e,this.index=t,this.open=n,this.close=i,this.forwardRegex=o,this.reversedRegex=r,this._openSet=s._toSet(this.open),this._closeSet=s._toSet(this.close)}isOpen(e){return this._openSet.has(e)}isClose(e){return this._closeSet.has(e)}static _toSet(e){const t=new Set;for(const n of e)t.add(n);return t}}class a{constructor(e,t){this._richEditBracketsBrand=void 0;const n=function(e){const t=e.length;e=e.map((e=>[e[0].toLowerCase(),e[1].toLowerCase()]));const n=[];for(let e=0;e{const[n,i]=e,[o,r]=t;return n===o||n===r||i===o||i===r},o=(e,i)=>{const o=Math.min(e,i),r=Math.max(e,i);for(let e=0;e0&&r.push({open:o,close:s})}return r}(t);this.brackets=n.map(((t,i)=>new s(e,i,t.open,t.close,function(e,t,n,i){let o=[];o=o.concat(e),o=o.concat(t);for(let e=0,t=o.length;e=0&&i.push(t);for(const t of r.close)t.indexOf(e)>=0&&i.push(t)}}function d(e,t){return e.length-t.length}function c(e){if(e.length<=1)return e;const t=[],n=new Set;for(const i of e)n.has(i)||(t.push(i),n.add(i));return t}function h(e){const t=/^[\w ]+$/.test(e);return e=i.ec(e),t?`\\b${e}\\b`:e}function u(e){let t=`(${e.map(h).join(")|(")})`;return i.GF(t,!0)}const g=function(){let e=null,t=null;return function(n){return e!==n&&(e=n,t=function(e){if(o.lZ){const t=new Uint16Array(e.length);let n=0;for(let i=e.length-1;i>=0;i--)t[n++]=e.charCodeAt(i);return o.oe().decode(t)}{let t=[],n=0;for(let i=e.length-1;i>=0;i--)t[n++]=e.charAt(i);return t.join("")}}(e)),t}}();class p{static _findPrevBracketInText(e,t,n,i){let o=n.match(e);if(!o)return null;let s=n.length-(o.index||0),a=o[0].length,l=i+s;return new r.e(t,l-a+1,t,l+1)}static findPrevBracketInRange(e,t,n,i,o){const r=g(n).substring(n.length-o,n.length-i);return this._findPrevBracketInText(e,t,r,i)}static findNextBracketInText(e,t,n,i){let o=n.match(e);if(!o)return null;let s=o.index||0,a=o[0].length;if(0===a)return null;let l=i+s;return new r.e(t,l+1,t,l+1+a)}static findNextBracketInRange(e,t,n,i,o){const r=n.substring(i,o);return this.findNextBracketInText(e,t,r,i)}}},5713:(e,t,n)=>{"use strict";n.d(t,{C:()=>a,F:()=>l});var i=n(7295),o=n(8411),r=n(8111);const s={getInitialState:()=>r.nO,tokenize2:(e,t,n,i)=>(0,r.mh)(0,e,n,i)};function a(e,t=s){return function(e,t){let n='
    ',r=i.uq(e),s=t.getInitialState();for(let e=0,a=r.length;e0&&(n+="
    ");let l=t.tokenize2(a,!0,s,0);o.A.convertToEndOffset(l.tokens,a.length);let d=new o.A(l.tokens,a).inflate(),c=0;for(let e=0,t=d.getCount();e${i.YU(a.substring(c,o))}`,c=o}s=l.endState}return n+="
    ",n}(e,t||s)}function l(e,t,n,i,o,r,s){let a="
    ",l=i,d=0;for(let c=0,h=t.getCount();c0;)u+=s?" ":" ",e--;break;case 60:u+="<";break;case 62:u+=">";break;case 38:u+="&";break;case 0:u+="�";break;case 65279:case 8232:case 8233:case 133:u+="�";break;case 13:u+="​";break;case 32:u+=s?" ":" ";break;default:u+=String.fromCharCode(t)}}if(a+=`${u}`,h>o||l>=o)break}return a+="
    ",a}},469:(e,t,n)=>{"use strict";n.d(t,{p:()=>i});const i=(0,n(2065).yh)("editorWorkerService")},9510:(e,t,n)=>{"use strict";n.d(t,{St:()=>C,ML:()=>_,Vl:()=>m,Vj:()=>f});var i=n(1050),o=n(7301),r=n(666),s=n(4101),a=n(1200),l=n(4565),d=n(8401),c=n(3060),h=n(1432);function u(e){const t=new Uint32Array(function(e){let t=0;if(t+=2,"full"===e.type)t+=1+e.data.length;else{t+=1,t+=3*e.deltas.length;for(const n of e.deltas)n.data&&(t+=n.data.length)}return t}(e));let n=0;if(t[n++]=e.id,"full"===e.type)t[n++]=1,t[n++]=e.data.length,t.set(e.data,n),n+=e.data.length;else{t[n++]=2,t[n++]=e.deltas.length;for(const i of e.deltas)t[n++]=i.start,t[n++]=i.deleteCount,i.data?(t[n++]=i.data.length,t.set(i.data,n),n+=i.data.length):t[n++]=0}return function(e){const t=new Uint8Array(e.buffer,e.byteOffset,4*e.length);return h.r()||function(e){for(let t=0,n=e.length;t0?t[0]:null}function C(e){const t=s.K7.ordered(e);return t.length>0?t[0]:null}l.P.registerCommand("_provideDocumentSemanticTokensLegend",((e,...t)=>p(void 0,void 0,void 0,(function*(){const[n]=t;(0,d.p_)(n instanceof r.o);const i=e.get(a.q).getModel(n);if(!i)return;const o=b(i);return o?o.getLegend():e.get(l.H).executeCommand("_provideDocumentRangeSemanticTokensLegend",n)})))),l.P.registerCommand("_provideDocumentSemanticTokens",((e,...t)=>p(void 0,void 0,void 0,(function*(){const[n]=t;(0,d.p_)(n instanceof r.o);const s=e.get(a.q).getModel(n);if(!s)return;const c=_(s,null,i.T.None);if(!c)return e.get(l.H).executeCommand("_provideDocumentRangeSemanticTokens",n,s.getFullModelRange());const{provider:h,request:g}=c;let p;try{p=yield g}catch(e){return void(0,o.Cp)(e)}if(!p||!m(p))return;const f=u({id:0,type:"full",data:p.data});return p.resultId&&h.releaseDocumentSemanticTokens(p.resultId),f})))),l.P.registerCommand("_provideDocumentRangeSemanticTokensLegend",((e,...t)=>p(void 0,void 0,void 0,(function*(){const[n]=t;(0,d.p_)(n instanceof r.o);const i=e.get(a.q).getModel(n);if(!i)return;const o=C(i);return o?o.getLegend():void 0})))),l.P.registerCommand("_provideDocumentRangeSemanticTokens",((e,...t)=>p(void 0,void 0,void 0,(function*(){const[n,s]=t;(0,d.p_)(n instanceof r.o),(0,d.p_)(g.e.isIRange(s));const l=e.get(a.q).getModel(n);if(!l)return;const c=C(l);if(!c)return;let h;try{h=yield c.provideDocumentRangeSemanticTokens(l,g.e.lift(s),i.T.None)}catch(e){return void(0,o.Cp)(e)}return h&&m(h)?u({id:0,type:"full",data:h.data}):void 0}))))},6479:(e,t,n)=>{"use strict";n.d(t,{i:()=>i});const i=(0,n(2065).yh)("markerDecorationsService")},1531:(e,t,n)=>{"use strict";n.d(t,{h:()=>i});const i=(0,n(2065).yh)("modeService")},1200:(e,t,n)=>{"use strict";n.d(t,{q:()=>i,p:()=>o});const i=(0,n(2065).yh)("modelService");function o(e){return!e.isTooLargeForSyncing()&&!e.isForSimpleWidget}},7390:(e,t,n)=>{"use strict";n.d(t,{BR:()=>N,e3:()=>D,tw:()=>I});var i=n(4669),o=n(5976),r=n(1432),s=n(7301),a=n(4141),l=n(3103),d=n(4101),c=n(1144),h=n(3187),u=n(3108),g=n(5393),p=n(1050),m=n(7781),f=n(3557),_=n(4862),b=n(9954),C=n(5215),v=n(6663),w=n(5072),y=n(9510),A=function(e,t){return function(n,i){t(n,i,e)}};function S(e){return e.toString()}function x(e){const t=new b.yP,n=e.createSnapshot();let i;for(;i=n.read();)t.update(i);return t.digest()}class k{constructor(e,t,n){this._modelEventListeners=new o.SL,this.model=e,this._languageSelection=null,this._languageSelectionListener=null,this._modelEventListeners.add(e.onWillDispose((()=>t(e)))),this._modelEventListeners.add(e.onDidChangeLanguage((t=>n(e,t))))}_disposeLanguageSelection(){this._languageSelectionListener&&(this._languageSelectionListener.dispose(),this._languageSelectionListener=null)}dispose(){this._modelEventListeners.dispose(),this._disposeLanguageSelection()}setLanguage(e){this._disposeLanguageSelection(),this._languageSelection=e,this._languageSelectionListener=this._languageSelection.onDidChange((()=>this.model.setMode(e.languageIdentifier))),this.model.setMode(e.languageIdentifier)}}const L=r.IJ||r.dz?1:2;class E{constructor(e,t,n,i,o,r,s,a){this.uri=e,this.initialUndoRedoSnapshot=t,this.time=n,this.sharesUndoRedoStack=i,this.heapSize=o,this.sha1=r,this.versionId=s,this.alternativeVersionId=a}}let N=class e extends o.JT{constructor(e,t,n,o,r){super(),this._configurationService=e,this._resourcePropertiesService=t,this._themeService=n,this._logService=o,this._undoRedoService=r,this._onModelAdded=this._register(new i.Q5),this.onModelAdded=this._onModelAdded.event,this._onModelRemoved=this._register(new i.Q5),this.onModelRemoved=this._onModelRemoved.event,this._onModelModeChanged=this._register(new i.Q5),this.onModelModeChanged=this._onModelModeChanged.event,this._modelCreationOptionsByLanguageAndResource=Object.create(null),this._models={},this._disposedModels=new Map,this._disposedModelsHeapSize=0,this._semanticStyling=this._register(new T(this._themeService,this._logService)),this._register(this._configurationService.onDidChangeConfiguration((()=>this._updateModelOptions()))),this._updateModelOptions(),this._register(new M(this,this._themeService,this._configurationService,this._semanticStyling))}static _readModelOptions(e,t){let n=a.DB.tabSize;if(e.editor&&void 0!==e.editor.tabSize){const t=parseInt(e.editor.tabSize,10);isNaN(t)||(n=t),n<1&&(n=1)}let i=n;if(e.editor&&void 0!==e.editor.indentSize&&"tabSize"!==e.editor.indentSize){const t=parseInt(e.editor.indentSize,10);isNaN(t)||(i=t),i<1&&(i=1)}let o=a.DB.insertSpaces;e.editor&&void 0!==e.editor.insertSpaces&&(o="false"!==e.editor.insertSpaces&&Boolean(e.editor.insertSpaces));let r=L;const s=e.eol;"\r\n"===s?r=2:"\n"===s&&(r=1);let l=a.DB.trimAutoWhitespace;e.editor&&void 0!==e.editor.trimAutoWhitespace&&(l="false"!==e.editor.trimAutoWhitespace&&Boolean(e.editor.trimAutoWhitespace));let d=a.DB.detectIndentation;e.editor&&void 0!==e.editor.detectIndentation&&(d="false"!==e.editor.detectIndentation&&Boolean(e.editor.detectIndentation));let c=a.DB.largeFileOptimizations;return e.editor&&void 0!==e.editor.largeFileOptimizations&&(c="false"!==e.editor.largeFileOptimizations&&Boolean(e.editor.largeFileOptimizations)),{isForSimpleWidget:t,tabSize:n,indentSize:i,insertSpaces:o,detectIndentation:d,defaultEOL:r,trimAutoWhitespace:l,largeFileOptimizations:c}}_getEOL(e,t){if(e)return this._resourcePropertiesService.getEOL(e,t);const n=this._configurationService.getValue("files.eol",{overrideIdentifier:t});return n&&"string"==typeof n&&"auto"!==n?n:3===r.OS||2===r.OS?"\n":"\r\n"}_shouldRestoreUndoStack(){const e=this._configurationService.getValue("files.restoreUndoStack");return"boolean"!=typeof e||e}getCreationOptions(t,n,i){let o=this._modelCreationOptionsByLanguageAndResource[t+n];if(!o){const r=this._configurationService.getValue("editor",{overrideIdentifier:t,resource:n}),s=this._getEOL(n,t);o=e._readModelOptions({editor:r,eol:s},i),this._modelCreationOptionsByLanguageAndResource[t+n]=o}return o}_updateModelOptions(){const t=this._modelCreationOptionsByLanguageAndResource;this._modelCreationOptionsByLanguageAndResource=Object.create(null);const n=Object.keys(this._models);for(let i=0,o=n.length;ie){const t=[];for(this._disposedModels.forEach((e=>{e.sharesUndoRedoStack||t.push(e)})),t.sort(((e,t)=>e.time-t.time));t.length>0&&this._disposedModelsHeapSize>e;){const e=t.shift();this._removeDisposedModel(e.uri),null!==e.initialUndoRedoSnapshot&&this._undoRedoService.restoreSnapshot(e.initialUndoRedoSnapshot)}}}_createModelData(e,t,n,i){const o=this.getCreationOptions(t.language,n,i),r=new l.yO(e,o,t,n,this._undoRedoService);if(n&&this._disposedModels.has(S(n))){const e=this._removeDisposedModel(n),t=this._undoRedoService.getElements(n),i=x(r)===e.sha1;if(i||e.sharesUndoRedoStack){for(const e of t.past)(0,C.e9)(e)&&e.matchesResource(n)&&e.setModel(r);for(const e of t.future)(0,C.e9)(e)&&e.matchesResource(n)&&e.setModel(r);this._undoRedoService.setElementsValidFlag(n,!0,(e=>(0,C.e9)(e)&&e.matchesResource(n))),i&&(r._overwriteVersionId(e.versionId),r._overwriteAlternativeVersionId(e.alternativeVersionId),r._overwriteInitialUndoRedoSnapshot(e.initialUndoRedoSnapshot))}else null!==e.initialUndoRedoSnapshot&&this._undoRedoService.restoreSnapshot(e.initialUndoRedoSnapshot)}const s=S(r.uri);if(this._models[s])throw new Error("ModelService: Cannot add model because it already exists!");const a=new k(r,(e=>this._onWillDispose(e)),((e,t)=>this._onDidChangeLanguage(e,t)));return this._models[s]=a,a}createModel(e,t,n,i=!1){let o;return t?(o=this._createModelData(e,t.languageIdentifier,n,i),this.setMode(o.model,t)):o=this._createModelData(e,c.Tb,n,i),this._onModelAdded.fire(o.model),o.model}setMode(e,t){if(!t)return;const n=this._models[S(e.uri)];n&&n.setLanguage(t)}getModels(){const e=[],t=Object.keys(this._models);for(let n=0,i=t.length;n0||e.future.length>0){for(const n of e.past)(0,C.e9)(n)&&n.matchesResource(t.uri)&&(r=!0,s+=n.heapSize(t.uri),n.setModel(t.uri));for(const n of e.future)(0,C.e9)(n)&&n.matchesResource(t.uri)&&(r=!0,s+=n.heapSize(t.uri),n.setModel(t.uri))}}var a;const l=e.MAX_MEMORY_FOR_CLOSED_FILES_UNDO_STACK;if(r)if(!o&&s>l){const e=i.model.getInitialUndoRedoSnapshot();null!==e&&this._undoRedoService.restoreSnapshot(e)}else this._ensureDisposedModelsHeapSize(l-s),this._undoRedoService.setElementsValidFlag(t.uri,!1,(e=>(0,C.e9)(e)&&e.matchesResource(t.uri))),this._insertDisposedModel(new E(t.uri,i.model.getInitialUndoRedoSnapshot(),Date.now(),o,s,x(t),t.getVersionId(),t.getAlternativeVersionId()));else if(!o){const e=i.model.getInitialUndoRedoSnapshot();null!==e&&this._undoRedoService.restoreSnapshot(e)}delete this._models[n],i.dispose(),delete this._modelCreationOptionsByLanguageAndResource[t.getLanguageIdentifier().language+t.uri],this._onModelRemoved.fire(t)}_onDidChangeLanguage(t,n){const i=n.oldLanguage,o=t.getLanguageIdentifier().language,r=this.getCreationOptions(i,t.uri,t.isForSimpleWidget),s=this.getCreationOptions(o,t.uri,t.isForSimpleWidget);e._setModelOptionsForModel(t,s,r),this._onModelModeChanged.fire({model:t,oldModeId:i})}};N.MAX_MEMORY_FOR_CLOSED_FILES_UNDO_STACK=20971520,N=function(e,t,n,i){var o,r=arguments.length,s=r<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,i);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,n,s):o(t,n))||s);return r>3&&s&&Object.defineProperty(t,n,s),s}([A(0,u.Ui),A(1,h.y),A(2,m.XE),A(3,f.VZ),A(4,_.tJ)],N);const D="editor.semanticHighlighting";function I(e,t,n){var i;const o=null===(i=n.getValue(D,{overrideIdentifier:e.getLanguageIdentifier().language,resource:e.uri}))||void 0===i?void 0:i.enabled;return"boolean"==typeof o?o:t.getColorTheme().semanticHighlighting}class M extends o.JT{constructor(e,t,n,i){super(),this._watchers=Object.create(null),this._semanticStyling=i;const o=e=>{this._watchers[e.uri.toString()]=new O(e,t,this._semanticStyling)},r=(e,t)=>{t.dispose(),delete this._watchers[e.uri.toString()]},s=()=>{for(let i of e.getModels()){const e=this._watchers[i.uri.toString()];I(i,t,n)?e||o(i):e&&r(i,e)}};this._register(e.onModelAdded((e=>{I(e,t,n)&&o(e)}))),this._register(e.onModelRemoved((e=>{const t=this._watchers[e.uri.toString()];t&&r(e,t)}))),this._register(n.onDidChangeConfiguration((e=>{e.affectsConfiguration(D)&&s()}))),this._register(t.onDidColorThemeChange(s))}}class T extends o.JT{constructor(e,t){super(),this._themeService=e,this._logService=t,this._caches=new WeakMap,this._register(this._themeService.onDidColorThemeChange((()=>{this._caches=new WeakMap})))}get(e){return this._caches.has(e)||this._caches.set(e,new w.$(e.getLegend(),this._themeService,this._logService)),this._caches.get(e)}}class R{constructor(e,t,n){this._provider=e,this.resultId=t,this.data=n}dispose(){this._provider.releaseDocumentSemanticTokens(this.resultId)}}class O extends o.JT{constructor(e,t,n){super(),this._isDisposed=!1,this._model=e,this._semanticStyling=n,this._fetchDocumentSemanticTokens=this._register(new g.pY((()=>this._fetchDocumentSemanticTokensNow()),O.FETCH_DOCUMENT_SEMANTIC_TOKENS_DELAY)),this._currentDocumentResponse=null,this._currentDocumentRequestCancellationTokenSource=null,this._documentProvidersChangeListeners=[],this._register(this._model.onDidChangeContent((()=>{this._fetchDocumentSemanticTokens.isScheduled()||this._fetchDocumentSemanticTokens.schedule()}))),this._register(this._model.onDidChangeLanguage((()=>{this._currentDocumentResponse&&(this._currentDocumentResponse.dispose(),this._currentDocumentResponse=null),this._currentDocumentRequestCancellationTokenSource&&(this._currentDocumentRequestCancellationTokenSource.cancel(),this._currentDocumentRequestCancellationTokenSource=null),this._setDocumentSemanticTokens(null,null,null,[]),this._fetchDocumentSemanticTokens.schedule(0)})));const i=()=>{(0,o.B9)(this._documentProvidersChangeListeners),this._documentProvidersChangeListeners=[];for(const t of d.wT.all(e))"function"==typeof t.onDidChange&&this._documentProvidersChangeListeners.push(t.onDidChange((()=>this._fetchDocumentSemanticTokens.schedule(0))))};i(),this._register(d.wT.onDidChange((()=>{i(),this._fetchDocumentSemanticTokens.schedule()}))),this._register(t.onDidColorThemeChange((e=>{this._setDocumentSemanticTokens(null,null,null,[]),this._fetchDocumentSemanticTokens.schedule()}))),this._fetchDocumentSemanticTokens.schedule(0)}dispose(){this._currentDocumentResponse&&(this._currentDocumentResponse.dispose(),this._currentDocumentResponse=null),this._currentDocumentRequestCancellationTokenSource&&(this._currentDocumentRequestCancellationTokenSource.cancel(),this._currentDocumentRequestCancellationTokenSource=null),this._setDocumentSemanticTokens(null,null,null,[]),this._isDisposed=!0,super.dispose()}_fetchDocumentSemanticTokensNow(){if(this._currentDocumentRequestCancellationTokenSource)return;const e=new p.A,t=this._currentDocumentResponse&&this._currentDocumentResponse.resultId||null,n=(0,y.ML)(this._model,t,e.token);if(!n)return void(this._currentDocumentResponse&&this._model.setSemanticTokens(null,!1));const{provider:i,request:o}=n;this._currentDocumentRequestCancellationTokenSource=e;const r=[],a=this._model.onDidChangeContent((e=>{r.push(e)})),l=this._semanticStyling.get(i);o.then((e=>{this._currentDocumentRequestCancellationTokenSource=null,a.dispose(),this._setDocumentSemanticTokens(i,e||null,l,r)}),(e=>{e&&(s.VV(e)||"string"==typeof e.message&&-1!==e.message.indexOf("busy"))||s.dL(e),this._currentDocumentRequestCancellationTokenSource=null,a.dispose(),r.length>0&&(this._fetchDocumentSemanticTokens.isScheduled()||this._fetchDocumentSemanticTokens.schedule())}))}static _copy(e,t,n,i,o){for(let r=0;r{i.length>0&&!this._fetchDocumentSemanticTokens.isScheduled()&&this._fetchDocumentSemanticTokens.schedule()};if(this._currentDocumentResponse&&(this._currentDocumentResponse.dispose(),this._currentDocumentResponse=null),this._isDisposed)e&&t&&e.releaseDocumentSemanticTokens(t.resultId);else if(e&&n){if(!t)return this._model.setSemanticTokens(null,!0),void r();if((0,y.Vj)(t)){if(!o)return void this._model.setSemanticTokens(null,!0);if(0===t.edits.length)t={resultId:t.resultId,data:o.data};else{let e=0;for(const n of t.edits)e+=(n.data?n.data.length:0)-n.deleteCount;const n=o.data,i=new Uint32Array(n.length+e);let r=n.length,s=i.length;for(let e=t.edits.length-1;e>=0;e--){const o=t.edits[e],a=r-(o.start+o.deleteCount);a>0&&(O._copy(n,r-a,i,s-a,a),s-=a),o.data&&(O._copy(o.data,0,i,s-o.data.length,o.data.length),s-=o.data.length),r=o.start}r>0&&O._copy(n,0,i,0,r),t={resultId:t.resultId,data:i}}}if((0,y.Vl)(t)){this._currentDocumentResponse=new R(e,t.resultId,t.data);const o=(0,w.h)(t,n,this._model.getLanguageIdentifier());if(i.length>0)for(const e of i)for(const t of o)for(const n of e.changes)t.applyEdit(n.range,n.text);this._model.setSemanticTokens(o,!0)}else this._model.setSemanticTokens(null,!0);r()}else this._model.setSemanticTokens(null,!1)}}O.FETCH_DOCUMENT_SEMANTIC_TOKENS_DELAY=300},8216:(e,t,n)=>{"use strict";n.d(t,{S:()=>i});const i=(0,n(2065).yh)("textModelService")},5072:(e,t,n)=>{"use strict";n.d(t,{$:()=>s,h:()=>a});var i=n(4101),o=n(3557),r=n(8409);class s{constructor(e,t,n){this._legend=e,this._themeService=t,this._logService=n,this._hashTable=new d,this._hasWarnedOverlappingTokens=!1}getMetadata(e,t,n){const r=this._hashTable.get(e,t,n.id);let s;if(r)s=r.metadata,this._logService.getLevel()===o.in.Trace&&this._logService.trace(`SemanticTokensProviderStyling [CACHED] ${e} / ${t}: foreground ${i.NX.getForeground(s)}, fontStyle ${i.NX.getFontStyle(s).toString(2)}`);else{let r=this._legend.tokenTypes[e];const a=[];if(r){let e=t;for(let t=0;e>0&&t>=1;e>0&&this._logService.getLevel()===o.in.Trace&&(this._logService.trace(`SemanticTokensProviderStyling: unknown token modifier index: ${t.toString(2)} for legend: ${JSON.stringify(this._legend.tokenModifiers)}`),a.push("not-in-legend"));const i=this._themeService.getColorTheme().getTokenStyleMetadata(r,a,n.language);void 0===i?s=2147483647:(s=0,void 0!==i.italic&&(s|=1|(i.italic?1:0)<<11),void 0!==i.bold&&(s|=2|(i.bold?2:0)<<11),void 0!==i.underline&&(s|=4|(i.underline?4:0)<<11),i.foreground&&(s|=8|i.foreground<<14),0===s&&(s=2147483647))}else this._logService.getLevel()===o.in.Trace&&this._logService.trace(`SemanticTokensProviderStyling: unknown token type index: ${e} for legend: ${JSON.stringify(this._legend.tokenTypes)}`),s=2147483647,r="not-in-legend";this._hashTable.add(e,t,n.id,s),this._logService.getLevel()===o.in.Trace&&this._logService.trace(`SemanticTokensProviderStyling ${e} (${r}) / ${t} (${a.join(" ")}): foreground ${i.NX.getForeground(s)}, fontStyle ${i.NX.getFontStyle(s).toString(2)}`)}return s}warnOverlappingSemanticTokens(e,t){this._hasWarnedOverlappingTokens||(this._hasWarnedOverlappingTokens=!0,console.warn(`Overlapping semantic tokens detected at lineNumber ${e}, column ${t}`))}}function a(e,t,n){const i=e.data,o=e.data.length/5|0,s=Math.max(Math.ceil(o/1024),400),a=[];let l=0,d=1,c=0;for(;le&&0===i[5*t];)t--;if(t-1===e){let e=h;for(;e+1a&&(t.warnOverlappingSemanticTokens(s,a+1),f=this._growCount){const e=this._elements;this._currentLengthIndex++,this._currentLength=d._SIZES[this._currentLengthIndex],this._growCount=Math.round(this._currentLengthIndex+1{"use strict";n.d(t,{V:()=>o,y:()=>r});var i=n(2065);const o=(0,i.yh)("textResourceConfigurationService"),r=(0,i.yh)("textResourcePropertiesService")},913:(e,t,n)=>{"use strict";n.d(t,{Oe:()=>i,ug:()=>o,qq:()=>r,ld:()=>s,UX:()=>a,aq:()=>l,B8:()=>d,xi:()=>c,UL:()=>h});var i,o,r,s,a,l,d,c,h,u=n(3580);!function(e){e.noSelection=u.N("noSelection","No selection"),e.singleSelectionRange=u.N("singleSelectionRange","Line {0}, Column {1} ({2} selected)"),e.singleSelection=u.N("singleSelection","Line {0}, Column {1}"),e.multiSelectionRange=u.N("multiSelectionRange","{0} selections ({1} characters selected)"),e.multiSelection=u.N("multiSelection","{0} selections"),e.emergencyConfOn=u.N("emergencyConfOn","Now changing the setting `accessibilitySupport` to 'on'."),e.openingDocs=u.N("openingDocs","Now opening the Editor Accessibility documentation page."),e.readonlyDiffEditor=u.N("readonlyDiffEditor"," in a read-only pane of a diff editor."),e.editableDiffEditor=u.N("editableDiffEditor"," in a pane of a diff editor."),e.readonlyEditor=u.N("readonlyEditor"," in a read-only code editor"),e.editableEditor=u.N("editableEditor"," in a code editor"),e.changeConfigToOnMac=u.N("changeConfigToOnMac","To configure the editor to be optimized for usage with a Screen Reader press Command+E now."),e.changeConfigToOnWinLinux=u.N("changeConfigToOnWinLinux","To configure the editor to be optimized for usage with a Screen Reader press Control+E now."),e.auto_on=u.N("auto_on","The editor is configured to be optimized for usage with a Screen Reader."),e.auto_off=u.N("auto_off","The editor is configured to never be optimized for usage with a Screen Reader, which is not the case at this time."),e.tabFocusModeOnMsg=u.N("tabFocusModeOnMsg","Pressing Tab in the current editor will move focus to the next focusable element. Toggle this behavior by pressing {0}."),e.tabFocusModeOnMsgNoKb=u.N("tabFocusModeOnMsgNoKb","Pressing Tab in the current editor will move focus to the next focusable element. The command {0} is currently not triggerable by a keybinding."),e.tabFocusModeOffMsg=u.N("tabFocusModeOffMsg","Pressing Tab in the current editor will insert the tab character. Toggle this behavior by pressing {0}."),e.tabFocusModeOffMsgNoKb=u.N("tabFocusModeOffMsgNoKb","Pressing Tab in the current editor will insert the tab character. The command {0} is currently not triggerable by a keybinding."),e.openDocMac=u.N("openDocMac","Press Command+H now to open a browser window with more information related to editor accessibility."),e.openDocWinLinux=u.N("openDocWinLinux","Press Control+H now to open a browser window with more information related to editor accessibility."),e.outroMsg=u.N("outroMsg","You can dismiss this tooltip and return to the editor by pressing Escape or Shift+Escape."),e.showAccessibilityHelpAction=u.N("showAccessibilityHelpAction","Show Accessibility Help")}(i||(i={})),function(e){e.inspectTokensAction=u.N("inspectTokens","Developer: Inspect Tokens")}(o||(o={})),function(e){e.gotoLineActionLabel=u.N("gotoLineActionLabel","Go to Line/Column...")}(r||(r={})),function(e){e.helpQuickAccessActionLabel=u.N("helpQuickAccess","Show all Quick Access Providers")}(s||(s={})),function(e){e.quickCommandActionLabel=u.N("quickCommandActionLabel","Command Palette"),e.quickCommandHelp=u.N("quickCommandActionHelp","Show And Run Commands")}(a||(a={})),function(e){e.quickOutlineActionLabel=u.N("quickOutlineActionLabel","Go to Symbol..."),e.quickOutlineByCategoryActionLabel=u.N("quickOutlineByCategoryActionLabel","Go to Symbol by Category...")}(l||(l={})),function(e){e.editorViewAccessibleLabel=u.N("editorViewAccessibleLabel","Editor content"),e.accessibilityHelpMessage=u.N("accessibilityHelpMessage","Press Alt+F1 for Accessibility Options.")}(d||(d={})),function(e){e.toggleHighContrast=u.N("toggleHighContrast","Toggle High Contrast Theme")}(c||(c={})),function(e){e.bulkEditServiceSummary=u.N("bulkEditServiceSummary","Made {0} edits in {1} files")}(h||(h={}))},7869:(e,t,n)=>{"use strict";n.d(t,{Kh:()=>a,Mm:()=>l,n0:()=>g,fY:()=>p,tR:()=>f,Ym:()=>_,hw:()=>b,DD:()=>v,zk:()=>w,Yp:()=>y,TC:()=>A,Dl:()=>S,zw:()=>x,e_:()=>k,kp:()=>E,zu:()=>N,x3:()=>D,N5:()=>I,m9:()=>T,lK:()=>R,Re:()=>O,eS:()=>B});var i=n(3580),o=n(1264),r=n(3910),s=n(7781);const a=(0,r.P6)("editor.lineHighlightBackground",{dark:null,light:null,hc:null},i.N("lineHighlight","Background color for the highlight of line at the cursor position.")),l=(0,r.P6)("editor.lineHighlightBorder",{dark:"#282828",light:"#eeeeee",hc:"#f38518"},i.N("lineHighlightBorderBox","Background color for the border around the line at the cursor position.")),d=(0,r.P6)("editor.rangeHighlightBackground",{dark:"#ffffff0b",light:"#fdff0033",hc:null},i.N("rangeHighlight","Background color of highlighted ranges, like by quick open and find features. The color must not be opaque so as not to hide underlying decorations."),!0),c=(0,r.P6)("editor.rangeHighlightBorder",{dark:null,light:null,hc:r.xL},i.N("rangeHighlightBorder","Background color of the border around highlighted ranges."),!0),h=(0,r.P6)("editor.symbolHighlightBackground",{dark:r.MU,light:r.MU,hc:null},i.N("symbolHighlight","Background color of highlighted symbol, like for go to definition or go next/previous symbol. The color must not be opaque so as not to hide underlying decorations."),!0),u=(0,r.P6)("editor.symbolHighlightBorder",{dark:null,light:null,hc:r.xL},i.N("symbolHighlightBorder","Background color of the border around highlighted symbols."),!0),g=(0,r.P6)("editorCursor.foreground",{dark:"#AEAFAD",light:o.Il.black,hc:o.Il.white},i.N("caret","Color of the editor cursor.")),p=(0,r.P6)("editorCursor.background",null,i.N("editorCursorBackground","The background color of the editor cursor. Allows customizing the color of a character overlapped by a block cursor.")),m=(0,r.P6)("editorWhitespace.foreground",{dark:"#e3e4e229",light:"#33333333",hc:"#e3e4e229"},i.N("editorWhitespaces","Color of whitespace characters in the editor.")),f=(0,r.P6)("editorIndentGuide.background",{dark:m,light:m,hc:m},i.N("editorIndentGuides","Color of the editor indentation guides.")),_=(0,r.P6)("editorIndentGuide.activeBackground",{dark:m,light:m,hc:m},i.N("editorActiveIndentGuide","Color of the active editor indentation guides.")),b=(0,r.P6)("editorLineNumber.foreground",{dark:"#858585",light:"#237893",hc:o.Il.white},i.N("editorLineNumbers","Color of editor line numbers.")),C=(0,r.P6)("editorActiveLineNumber.foreground",{dark:"#c6c6c6",light:"#0B216F",hc:r.xL},i.N("editorActiveLineNumber","Color of editor active line number"),!1,i.N("deprecatedEditorActiveLineNumber","Id is deprecated. Use 'editorLineNumber.activeForeground' instead.")),v=(0,r.P6)("editorLineNumber.activeForeground",{dark:C,light:C,hc:C},i.N("editorActiveLineNumber","Color of editor active line number")),w=(0,r.P6)("editorRuler.foreground",{dark:"#5A5A5A",light:o.Il.lightgrey,hc:o.Il.white},i.N("editorRuler","Color of the editor rulers.")),y=(0,r.P6)("editorCodeLens.foreground",{dark:"#999999",light:"#919191",hc:"#999999"},i.N("editorCodeLensForeground","Foreground color of editor CodeLens")),A=(0,r.P6)("editorBracketMatch.background",{dark:"#0064001a",light:"#0064001a",hc:"#0064001a"},i.N("editorBracketMatchBackground","Background color behind matching brackets")),S=(0,r.P6)("editorBracketMatch.border",{dark:"#888",light:"#B9B9B9",hc:r.lR},i.N("editorBracketMatchBorder","Color for matching brackets boxes")),x=(0,r.P6)("editorOverviewRuler.border",{dark:"#7f7f7f4d",light:"#7f7f7f4d",hc:"#7f7f7f4d"},i.N("editorOverviewRulerBorder","Color of the overview ruler border.")),k=(0,r.P6)("editorOverviewRuler.background",null,i.N("editorOverviewRulerBackground","Background color of the editor overview ruler. Only used when the minimap is enabled and placed on the right side of the editor.")),L=(0,r.P6)("editorGutter.background",{dark:r.cv,light:r.cv,hc:r.cv},i.N("editorGutter","Background color of the editor gutter. The gutter contains the glyph margins and the line numbers.")),E=(0,r.P6)("editorUnnecessaryCode.border",{dark:null,light:null,hc:o.Il.fromHex("#fff").transparent(.8)},i.N("unnecessaryCodeBorder","Border color of unnecessary (unused) source code in the editor.")),N=(0,r.P6)("editorUnnecessaryCode.opacity",{dark:o.Il.fromHex("#000a"),light:o.Il.fromHex("#0007"),hc:null},i.N("unnecessaryCodeOpacity","Opacity of unnecessary (unused) source code in the editor. For example, \"#000000c0\" will render the code with 75% opacity. For high contrast themes, use the 'editorUnnecessaryCode.border' theme color to underline unnecessary code instead of fading it out.")),D=(0,r.P6)("editorGhostText.border",{dark:null,light:null,hc:o.Il.fromHex("#fff").transparent(.8)},i.N("editorGhostTextBorder","Border color of ghost text in the editor.")),I=(0,r.P6)("editorGhostText.foreground",{dark:o.Il.fromHex("#ffffff56"),light:o.Il.fromHex("#0007"),hc:null},i.N("editorGhostTextForeground","Foreground color of the ghost text in the editor.")),M=new o.Il(new o.VS(0,122,204,.6)),T=(0,r.P6)("editorOverviewRuler.rangeHighlightForeground",{dark:M,light:M,hc:M},i.N("overviewRulerRangeHighlight","Overview ruler marker color for range highlights. The color must not be opaque so as not to hide underlying decorations."),!0),R=(0,r.P6)("editorOverviewRuler.errorForeground",{dark:new o.Il(new o.VS(255,18,18,.7)),light:new o.Il(new o.VS(255,18,18,.7)),hc:new o.Il(new o.VS(255,50,50,1))},i.N("overviewRuleError","Overview ruler marker color for errors.")),O=(0,r.P6)("editorOverviewRuler.warningForeground",{dark:r.uo,light:r.uo,hc:r.pW},i.N("overviewRuleWarning","Overview ruler marker color for warnings.")),B=(0,r.P6)("editorOverviewRuler.infoForeground",{dark:r.c6,light:r.c6,hc:r.T8},i.N("overviewRuleInfo","Overview ruler marker color for infos."));(0,s.Ic)(((e,t)=>{const n=e.getColor(r.cv);n&&t.addRule(`.monaco-editor, .monaco-editor-background, .monaco-editor .inputarea.ime-input { background-color: ${n}; }`);const i=e.getColor(r.NO);i&&t.addRule(`.monaco-editor, .monaco-editor .inputarea.ime-input { color: ${i}; }`);const o=e.getColor(L);o&&t.addRule(`.monaco-editor .margin { background-color: ${o}; }`);const s=e.getColor(d);s&&t.addRule(`.monaco-editor .rangeHighlight { background-color: ${s}; }`);const a=e.getColor(c);a&&t.addRule(`.monaco-editor .rangeHighlight { border: 1px ${"hc"===e.type?"dotted":"solid"} ${a}; }`);const l=e.getColor(h);l&&t.addRule(`.monaco-editor .symbolHighlight { background-color: ${l}; }`);const g=e.getColor(u);g&&t.addRule(`.monaco-editor .symbolHighlight { border: 1px ${"hc"===e.type?"dotted":"solid"} ${g}; }`);const p=e.getColor(m);p&&(t.addRule(`.monaco-editor .mtkw { color: ${p} !important; }`),t.addRule(`.monaco-editor .mtkz { color: ${p} !important; }`))}))},2003:(e,t,n)=>{"use strict";n.d(t,{EY:()=>o,Tj:()=>r});class i{constructor(e,t,n){this._colorZoneBrand=void 0,this.from=0|e,this.to=0|t,this.colorId=0|n}static compare(e,t){return e.colorId===t.colorId?e.from===t.from?e.to-t.to:e.from-t.from:e.colorId-t.colorId}}class o{constructor(e,t,n){this._overviewRulerZoneBrand=void 0,this.startLineNumber=e,this.endLineNumber=t,this.color=n,this._colorZone=null}static compare(e,t){return e.color===t.color?e.startLineNumber===t.startLineNumber?e.endLineNumber-t.endLineNumber:e.startLineNumber-t.startLineNumber:e.colorn&&(h=n-u);const g=l.color;let p=this._color2Id[g];p||(p=++this._lastAssignedId,this._color2Id[g]=p,this._id2Color[p]=g);const m=new i(h-u,h+u,p);l.setColorZone(m),s.push(m)}return this._colorZonesInvalid=!1,s.sort(i.compare),s}}},2550:(e,t,n)=>{"use strict";n.d(t,{Kp:()=>o,k:()=>a});var i=n(7295);class o{constructor(e,t,n,i){this.startColumn=e,this.endColumn=t,this.className=n,this.type=i,this._lineDecorationBrand=void 0}static _equals(e,t){return e.startColumn===t.startColumn&&e.endColumn===t.endColumn&&e.className===t.className&&e.type===t.type}static equalsArr(e,t){const n=e.length;if(n!==t.length)return!1;for(let i=0;i=r||(a[l++]=new o(Math.max(1,t.startColumn-i+1),Math.min(s+1,t.endColumn-i+1),t.className,t.type));return a}static filter(e,t,n,i){if(0===e.length)return[];let r=[],s=0;for(let a=0,l=e.length;at)continue;if(d.isEmpty()&&(0===l.type||3===l.type))continue;const c=d.startLineNumber===t?d.startColumn:n,h=d.endLineNumber===t?d.endColumn:i;r[s++]=new o(c,h,l.inlineClassName,l.type)}return r}static _typeCompare(e,t){const n=[2,0,1,3];return n[e]-n[t]}static compare(e,t){if(e.startColumn!==t.startColumn)return e.startColumn-t.startColumn;if(e.endColumn!==t.endColumn)return e.endColumn-t.endColumn;const n=o._typeCompare(e.type,t.type);return 0!==n?n:e.className!==t.className?e.className0&&this.stopOffsets[0]0&&t=e){this.stopOffsets.splice(i,0,e),this.classNames.splice(i,0,t),this.metadata.splice(i,0,n);break}this.count++}}class a{static normalize(e,t){if(0===t.length)return[];let n=[];const o=new s;let r=0;for(let s=0,a=t.length;s1){const t=e.charCodeAt(l-2);i.ZG(t)&&l--}if(d>1){const t=e.charCodeAt(d-2);i.ZG(t)&&d--}const u=l-1,g=d-2;r=o.consumeLowerThan(u,r,n),0===o.count&&(r=u),o.insert(g,c,h)}return o.consumeLowerThan(1073741824,r,n),n}}},7736:(e,t,n)=>{"use strict";n.d(t,{zG:()=>a,IJ:()=>l,Nd:()=>d,d1:()=>u,tF:()=>p});var i=n(7295),o=n(72),r=n(2550);class s{constructor(e,t,n){this._linePartBrand=void 0,this.endIndex=e,this.type=t,this.metadata=n}isWhitespace(){return!!(1&this.metadata)}isPseudoAfter(){return!!(4&this.metadata)}}class a{constructor(e,t){this.startOffset=e,this.endOffset=t}equals(e){return this.startOffset===e.startOffset&&this.endOffset===e.endOffset}}class l{constructor(e,t,n,i,o,s,a,l,d,c,h,u,g,p,m,f,_,b,C){this.useMonospaceOptimizations=e,this.canUseHalfwidthRightwardsArrow=t,this.lineContent=n,this.continuesWithWrappedLine=i,this.isBasicASCII=o,this.containsRTL=s,this.fauxIndentLength=a,this.lineTokens=l,this.lineDecorations=d.sort(r.Kp.compare),this.tabSize=c,this.startVisibleColumn=h,this.spaceWidth=u,this.stopRenderingLineAfter=m,this.renderWhitespace="all"===f?4:"boundary"===f?1:"selection"===f?2:"trailing"===f?3:0,this.renderControlCharacters=_,this.fontLigatures=b,this.selectionsOnLine=C&&C.sort(((e,t)=>e.startOffset>>16}static getCharIndex(e){return(65535&e)>>>0}setColumnInfo(e,t,n,i){const o=(t<<16|n<<0)>>>0;this._data[e-1]=o,this._absoluteOffsets[e-1]=i+n}getAbsoluteOffset(e){return 0===this._absoluteOffsets.length?0:this._absoluteOffsets[e-1]}charOffsetToPartData(e){return 0===this.length?0:e<0?this._data[0]:e>=this.length?this._data[this.length-1]:this._data[e]}getDomPosition(e){const t=this.charOffsetToPartData(e-1),n=c.getPartIndex(t),i=c.getCharIndex(t);return new d(n,i)}getColumn(e,t){return this.partDataToCharOffset(e.partIndex,t,e.charIndex)+1}partDataToCharOffset(e,t,n){if(0===this.length)return 0;let i=(e<<16|n<<0)>>>0,o=0,r=this.length-1;for(;o+1>>1,t=this._data[e];if(t===i)return e;t>i?r=e:o=e}if(o===r)return o;let s=this._data[o],a=this._data[r];if(s===i)return o;if(a===i)return r;let l,d=c.getPartIndex(s),h=c.getCharIndex(s);return l=d!==c.getPartIndex(a)?t:c.getCharIndex(a),n-h<=l-n?o:r}}class h{constructor(e,t,n){this._renderLineOutputBrand=void 0,this.characterMapping=e,this.containsRTL=t,this.containsForeignElements=n}}function u(e,t){if(0===e.lineContent.length){if(e.lineDecorations.length>0){t.appendASCIIString("");let n=0,i=0,o=0;for(const r of e.lineDecorations)1!==r.type&&2!==r.type||(t.appendASCIIString(''),1===r.type&&(o|=1,n++),2===r.type&&(o|=2,i++));t.appendASCIIString("");const r=new c(1,n+i);return r.setColumnInfo(1,n,0,0),new h(r,!1,o)}return t.appendASCIIString(""),new h(new c(0,0),!1,0)}return function(e,t){const n=e.fontIsMonospace,o=e.canUseHalfwidthRightwardsArrow,r=e.containsForeignElements,s=e.lineContent,a=e.len,l=e.isOverflowing,d=e.parts,u=e.fauxIndentLength,g=e.tabSize,p=e.startVisibleColumn,m=e.containsRTL,f=e.spaceWidth,_=e.renderSpaceCharCode,b=e.renderWhitespace,C=e.renderControlCharacters,v=new c(a+1,d.length);let w=!1,y=0,A=p,S=0,x=0,k=0,L=0;m?t.appendASCIIString(''):t.appendASCIIString("");for(let e=0,l=d.length;e=u&&(t+=i)}}for(m&&(t.appendASCIIString(' style="width:'),t.appendASCIIString(String(f*n)),t.appendASCIIString('px"')),t.appendASCII(62);y1?t.write1(8594):t.write1(65515);for(let e=2;e<=n;e++)t.write1(160)}else n=1,t.write1(_);S+=n,y>=u&&(A+=n)}k=n}else{let n=0;for(t.appendASCII(62);y=u&&(A+=a)}k=n}E?x++:x=0,y>=a&&!w&&l.isPseudoAfter()&&(w=!0,v.setColumnInfo(y+1,e,S,L)),t.appendASCIIString("")}return w||v.setColumnInfo(a+1,d.length-1,S,L),l&&t.appendASCIIString(""),t.appendASCIIString(""),new h(v,m,r)}(function(e){const t=e.lineContent;let n,o;-1!==e.stopRenderingLineAfter&&e.stopRenderingLineAfter0&&(i[o++]=new s(t,"",0));for(let r=0,a=e.getCount();r=n){i[o++]=new s(n,l,0);break}i[o++]=new s(a,l,0)}return i}(e.lineTokens,e.fauxIndentLength,o);(4===e.renderWhitespace||1===e.renderWhitespace||2===e.renderWhitespace&&e.selectionsOnLine||3===e.renderWhitespace)&&(a=function(e,t,n,o){const r=e.continuesWithWrappedLine,a=e.fauxIndentLength,l=e.tabSize,d=e.startVisibleColumn,c=e.useMonospaceOptimizations,h=e.selectionsOnLine,u=1===e.renderWhitespace,g=3===e.renderWhitespace,p=e.renderSpaceWidth!==e.spaceWidth;let m=[],f=0,_=0,b=o[_].type,C=o[_].endIndex;const v=o.length;let w,y=!1,A=i.LC(t);-1===A?(y=!0,A=n,w=n):w=i.ow(t);let S=!1,x=0,k=h&&h[x],L=d%l;for(let e=a;e=k.endOffset&&(x++,k=h&&h[x]),ew)d=!0;else if(9===r)d=!0;else if(32===r)if(u)if(S)d=!0;else{const i=e+1e),d&&g&&(d=y||e>w),S){if(!d||!c&&L>=l){if(p)for(let t=(f>0?m[f-1].endIndex:a)+1;t<=e;t++)m[f++]=new s(t,"mtkw",1);else m[f++]=new s(e,"mtkw",1);L%=l}}else(e===C||d&&e>a)&&(m[f++]=new s(e,b,0),L%=l);for(9===r?L=l:i.K7(r)?L+=2:L++,S=d;e===C&&(_++,_0?t.charCodeAt(n-1):0,i=n>1?t.charCodeAt(n-2):0;32===e&&32!==i&&9!==i||(E=!0)}else E=!0;if(E)if(p)for(let e=(f>0?m[f-1].endIndex:a)+1;e<=n;e++)m[f++]=new s(e,"mtkw",1);else m[f++]=new s(n,"mtkw",1);else m[f++]=new s(n,b,0);return m}(e,t,o,a));let l=0;if(e.lineDecorations.length>0){for(let t=0,n=e.lineDecorations.length;th&&(h=e.startOffset,d[c++]=new s(h,r,u)),!(e.endOffset+1<=i)){h=i,d[c++]=new s(h,r+" "+e.className,u|e.metadata);break}h=e.endOffset+1,d[c++]=new s(h,r+" "+e.className,u|e.metadata),l++}i>h&&(h=i,d[c++]=new s(h,r,u))}const u=n[n.length-1].endIndex;if(l=50&&(o[r++]=new s(d+1,t,n),c=d+1,d=-1);c!==l&&(o[r++]=new s(l,t,n))}else o[r++]=a;i=l}else for(let e=0,n=t.length;e50){const e=n.type,t=n.metadata,d=Math.ceil(l/50);for(let n=1;n{"use strict";n.d(t,{T:()=>o,o:()=>r});var i=n(5427);class o{constructor(e,t){this._prefixSumIndexOfResultBrand=void 0,this.index=e,this.remainder=t}}class r{constructor(e){this.values=e,this.prefixSum=new Uint32Array(e.length),this.prefixSumValidIndex=new Int32Array(1),this.prefixSumValidIndex[0]=-1}insertValues(e,t){e=(0,i.A)(e);const n=this.values,o=this.prefixSum,r=t.length;return 0!==r&&(this.values=new Uint32Array(n.length+r),this.values.set(n.subarray(0,e),0),this.values.set(n.subarray(e),e+r),this.values.set(t,e),e-1=0&&this.prefixSum.set(o.subarray(0,this.prefixSumValidIndex[0]+1)),!0)}changeValue(e,t){return e=(0,i.A)(e),t=(0,i.A)(t),this.values[e]!==t&&(this.values[e]=t,e-1=n.length)return!1;let r=n.length-e;return t>=r&&(t=r),0!==t&&(this.values=new Uint32Array(n.length-t),this.values.set(n.subarray(0,e),0),this.values.set(n.subarray(e+t),e),this.prefixSum=new Uint32Array(this.values.length),e-1=0&&this.prefixSum.set(o.subarray(0,this.prefixSumValidIndex[0]+1)),!0)}getTotalSum(){return 0===this.values.length?0:this._getPrefixSum(this.values.length-1)}getPrefixSum(e){return e<0?0:(e=(0,i.A)(e),this._getPrefixSum(e))}_getPrefixSum(e){if(e<=this.prefixSumValidIndex[0])return this.prefixSum[e];let t=this.prefixSumValidIndex[0]+1;0===t&&(this.prefixSum[0]=this.values[0],t++),e>=this.values.length&&(e=this.values.length-1);for(let n=t;n<=e;n++)this.prefixSum[n]=this.prefixSum[n-1]+this.values[n];return this.prefixSumValidIndex[0]=Math.max(this.prefixSumValidIndex[0],e),this.prefixSum[e]}getIndexOf(e){e=Math.floor(e),this.getTotalSum();let t=0,n=this.values.length-1,i=0,r=0,s=0;for(;t<=n;)if(i=t+(n-t)/2|0,r=this.prefixSum[i],s=r-this.values[i],e=r))break;t=i+1}return new o(i,e-s)}}},3824:(e,t,n)=>{"use strict";n.d(t,{l_:()=>s,le:()=>l,ud:()=>d,IP:()=>c,wA:()=>h,$t:()=>u,Wx:()=>g,$l:()=>p});var i=n(7295),o=n(187),r=n(4314);class s{constructor(e,t,n,i){this._viewportBrand=void 0,this.top=0|e,this.left=0|t,this.width=0|n,this.height=0|i}}class a{constructor(e,t){this.outputLineIndex=e,this.outputOffset=t}toString(){return`${this.outputLineIndex}:${this.outputOffset}`}toPosition(e,t){const n=this.outputLineIndex>0?t:0;return new o.L(e+this.outputLineIndex,n+this.outputOffset+1)}}class l{constructor(e,t,n,i,o){this.breakOffsets=e,this.breakOffsetsVisibleColumn=t,this.wrappedTextIndentLength=n,this.injectionOffsets=i,this.injectionOptions=o}getInputOffsetOfOutputPosition(e,t){let n=0;if(n=0===e?t:this.breakOffsets[e-1]+t,null!==this.injectionOffsets)for(let e=0;ethis.injectionOffsets[e];e++)n0?this.breakOffsets[o-1]:0,0===t)if(e<=r)i=o-1;else{if(!(e>s))break;n=o+1}else if(e=s))break;n=o+1}}return new a(o,e-r)}outputPositionToOffsetInUnwrappedLine(e,t){let n=(e>0?this.breakOffsets[e-1]:0)+t;return e>0&&(n-=this.wrappedTextIndentLength),n}normalizeOffsetAroundInjections(e,t){const n=this.getInjectedTextAtOffset(e);if(!n)return e;if(2===t)return e===n.offsetInUnwrappedLine+n.length?n.offsetInUnwrappedLine+n.length:n.offsetInUnwrappedLine;if(1===t){let e=n.offsetInUnwrappedLine+n.length,t=n.injectedTextIndex;for(;t+1=0&&this.injectionOffsets[o-1]===this.injectionOffsets[o];)i-=this.injectionOptions[o-1].content.length,o++;return i}getInjectedText(e,t){const n=this.outputPositionToOffsetInUnwrappedLine(e,t),i=this.getInjectedTextAtOffset(n);return i?{options:this.injectionOptions[i.injectedTextIndex]}:null}getInjectedTextAtOffset(e){const t=this.injectionOffsets,n=this.injectionOptions;if(null!==t){let i=0;for(let o=0;oe)break;if(e<=a)return{injectedTextIndex:o,offsetInUnwrappedLine:s,length:r};i+=r}}}}class d{constructor(e,t){this.tabSize=e,this.data=t}}class c{constructor(e,t,n,i,o,r,s){this._viewLineDataBrand=void 0,this.content=e,this.continuesWithWrappedLine=t,this.minColumn=n,this.maxColumn=i,this.startVisibleColumn=o,this.tokens=r,this.inlineDecorations=s}}class h{constructor(e,t,n,i,o,r,s,a,l,d){this.minColumn=e,this.maxColumn=t,this.content=n,this.continuesWithWrappedLine=i,this.isBasicASCII=h.isBasicASCII(n,r),this.containsRTL=h.containsRTL(n,this.isBasicASCII,o),this.tokens=s,this.inlineDecorations=a,this.tabSize=l,this.startVisibleColumn=d}static isBasicASCII(e,t){return!t||i.$i(e)}static containsRTL(e,t,n){return!(t||!n)&&i.Ut(e)}}class u{constructor(e,t,n){this.range=e,this.inlineClassName=t,this.type=n}}class g{constructor(e,t,n,i){this.startOffset=e,this.endOffset=t,this.inlineClassName=n,this.inlineClassNameAffectsLetterSpacing=i}toInlineDecoration(e){return new u(new r.e(e,this.startOffset+1,e,this.endOffset+1),this.inlineClassName,this.inlineClassNameAffectsLetterSpacing?3:0)}}class p{constructor(e,t){this._viewModelDecorationBrand=void 0,this.range=e,this.options=t}}},4396:(e,t,n)=>{"use strict";n.r(t),n.d(t,{SelectionAnchorSet:()=>k});var i=n(3379),o=n.n(i),r=n(7795),s=n.n(r),a=n(569),l=n.n(a),d=n(3565),c=n.n(d),h=n(9216),u=n.n(h),g=n(4589),p=n.n(g),m=n(2671),f={};f.styleTagTransform=p(),f.setAttributes=c(),f.insert=l().bind(null,"head"),f.domAPI=s(),f.insertStyleElement=u(),o()(m.Z,f),m.Z&&m.Z.locals&&m.Z.locals;var _=n(6830),b=n(3580),C=n(9102),v=n(3860),w=n(2258),y=n(8819),A=n(9365),S=n(6346),x=function(e,t,n,i){return new(n||(n=Promise))((function(o,r){function s(e){try{l(i.next(e))}catch(e){r(e)}}function a(e){try{l(i.throw(e))}catch(e){r(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,a)}l((i=i.apply(e,t||[])).next())}))};const k=new y.uy("selectionAnchorSet",!1);let L=class e{constructor(e,t){this.editor=e,this.selectionAnchorSetContextKey=k.bindTo(t),this.modelChangeListener=e.onDidChangeModel((()=>this.selectionAnchorSetContextKey.reset()))}static get(t){return t.getContribution(e.ID)}setSelectionAnchor(){if(this.editor.hasModel()){const e=this.editor.getPosition(),t=this.decorationId?[this.decorationId]:[],n=this.editor.deltaDecorations(t,[{range:v.Y.fromPositions(e,e),options:{description:"selection-anchor",stickiness:1,hoverMessage:(new A.W5).appendText((0,b.N)("selectionAnchor","Selection Anchor")),className:"selection-anchor"}}]);this.decorationId=n[0],this.selectionAnchorSetContextKey.set(!!this.decorationId),(0,S.Z9)((0,b.N)("anchorSet","Anchor set at {0}:{1}",e.lineNumber,e.column))}}goToSelectionAnchor(){if(this.editor.hasModel()&&this.decorationId){const e=this.editor.getModel().getDecorationRange(this.decorationId);e&&this.editor.setPosition(e.getStartPosition())}}selectFromAnchorToCursor(){if(this.editor.hasModel()&&this.decorationId){const e=this.editor.getModel().getDecorationRange(this.decorationId);if(e){const t=this.editor.getPosition();this.editor.setSelection(v.Y.fromPositions(e.getStartPosition(),t)),this.cancelSelectionAnchor()}}}cancelSelectionAnchor(){this.decorationId&&(this.editor.deltaDecorations([this.decorationId],[]),this.decorationId=void 0,this.selectionAnchorSetContextKey.set(!1))}dispose(){this.cancelSelectionAnchor(),this.modelChangeListener.dispose()}};var E,N;L.ID="editor.contrib.selectionAnchorController",L=function(e,t,n,i){var o,r=arguments.length,s=r<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,i);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,n,s):o(t,n))||s);return r>3&&s&&Object.defineProperty(t,n,s),s}([(E=1,N=y.i6,function(e,t){N(e,t,E)})],L);class D extends _.R6{constructor(){super({id:"editor.action.setSelectionAnchor",label:(0,b.N)("setSelectionAnchor","Set Selection Anchor"),alias:"Set Selection Anchor",precondition:void 0,kbOpts:{kbExpr:C.u.editorTextFocus,primary:(0,w.gx)(2089,2080),weight:100}})}run(e,t){return x(this,void 0,void 0,(function*(){L.get(t).setSelectionAnchor()}))}}class I extends _.R6{constructor(){super({id:"editor.action.goToSelectionAnchor",label:(0,b.N)("goToSelectionAnchor","Go to Selection Anchor"),alias:"Go to Selection Anchor",precondition:k})}run(e,t){return x(this,void 0,void 0,(function*(){L.get(t).goToSelectionAnchor()}))}}class M extends _.R6{constructor(){super({id:"editor.action.selectFromAnchorToCursor",label:(0,b.N)("selectFromAnchorToCursor","Select from Anchor to Cursor"),alias:"Select from Anchor to Cursor",precondition:k,kbOpts:{kbExpr:C.u.editorTextFocus,primary:(0,w.gx)(2089,2089),weight:100}})}run(e,t){return x(this,void 0,void 0,(function*(){L.get(t).selectFromAnchorToCursor()}))}}class T extends _.R6{constructor(){super({id:"editor.action.cancelSelectionAnchor",label:(0,b.N)("cancelSelectionAnchor","Cancel Selection Anchor"),alias:"Cancel Selection Anchor",precondition:k,kbOpts:{kbExpr:C.u.editorTextFocus,primary:9,weight:100}})}run(e,t){return x(this,void 0,void 0,(function*(){L.get(t).cancelSelectionAnchor()}))}}(0,_._K)(L.ID,L),(0,_.Qr)(D),(0,_.Qr)(I),(0,_.Qr)(M),(0,_.Qr)(T)},6012:(e,t,n)=>{"use strict";n.r(t),n.d(t,{BracketMatchingController:()=>O});var i=n(3379),o=n.n(i),r=n(7795),s=n.n(r),a=n(569),l=n.n(a),d=n(3565),c=n.n(d),h=n(9216),u=n.n(h),g=n(4589),p=n.n(g),m=n(7667),f={};f.styleTagTransform=p(),f.setAttributes=c(),f.insert=l().bind(null,"head"),f.domAPI=s(),f.insertStyleElement=u(),o()(m.Z,f),m.Z&&m.Z.locals&&m.Z.locals;var _=n(3580),b=n(5393),C=n(5976),v=n(6830),w=n(187),y=n(4314),A=n(3860),S=n(9102),x=n(4973),k=n(3103),L=n(7869),E=n(3910),N=n(7781),D=n(4144);const I=(0,E.P6)("editorOverviewRuler.bracketMatchForeground",{dark:"#A0A0A0",light:"#A0A0A0",hc:"#A0A0A0"},_.N("overviewRulerBracketMatchForeground","Overview ruler marker color for matching brackets."));class M extends v.R6{constructor(){super({id:"editor.action.jumpToBracket",label:_.N("smartSelect.jumpBracket","Go to Bracket"),alias:"Go to Bracket",precondition:void 0,kbOpts:{kbExpr:S.u.editorTextFocus,primary:3160,weight:100}})}run(e,t){let n=O.get(t);n&&n.jumpToBracket()}}class T extends v.R6{constructor(){super({id:"editor.action.selectToBracket",label:_.N("smartSelect.selectToBracket","Select to Bracket"),alias:"Select to Bracket",precondition:void 0,description:{description:"Select to Bracket",args:[{name:"args",schema:{type:"object",properties:{selectBrackets:{type:"boolean",default:!0}}}}]}})}run(e,t,n){const i=O.get(t);if(!i)return;let o=!0;n&&!1===n.selectBrackets&&(o=!1),i.selectToBracket(o)}}class R{constructor(e,t,n){this.position=e,this.brackets=t,this.options=n}}class O extends C.JT{constructor(e){super(),this._editor=e,this._lastBracketsData=[],this._lastVersionId=0,this._decorations=[],this._updateBracketsSoon=this._register(new b.pY((()=>this._updateBrackets()),50)),this._matchBrackets=this._editor.getOption(62),this._updateBracketsSoon.schedule(),this._register(e.onDidChangeCursorPosition((e=>{"never"!==this._matchBrackets&&this._updateBracketsSoon.schedule()}))),this._register(e.onDidChangeModelContent((e=>{this._updateBracketsSoon.schedule()}))),this._register(e.onDidChangeModel((e=>{this._lastBracketsData=[],this._decorations=[],this._updateBracketsSoon.schedule()}))),this._register(e.onDidChangeModelLanguageConfiguration((e=>{this._lastBracketsData=[],this._updateBracketsSoon.schedule()}))),this._register(e.onDidChangeConfiguration((e=>{e.hasChanged(62)&&(this._matchBrackets=this._editor.getOption(62),this._decorations=this._editor.deltaDecorations(this._decorations,[]),this._lastBracketsData=[],this._lastVersionId=0,this._updateBracketsSoon.schedule())})))}static get(e){return e.getContribution(O.ID)}jumpToBracket(){if(!this._editor.hasModel())return;const e=this._editor.getModel(),t=this._editor.getSelections().map((t=>{const n=t.getStartPosition(),i=e.matchBracket(n);let o=null;if(i)i[0].containsPosition(n)?o=i[1].getStartPosition():i[1].containsPosition(n)&&(o=i[0].getStartPosition());else{const t=e.findEnclosingBrackets(n);if(t)o=t[0].getStartPosition();else{const t=e.findNextBracket(n);t&&t.range&&(o=t.range.getStartPosition())}}return o?new A.Y(o.lineNumber,o.column,o.lineNumber,o.column):new A.Y(n.lineNumber,n.column,n.lineNumber,n.column)}));this._editor.setSelections(t),this._editor.revealRange(t[0])}selectToBracket(e){if(!this._editor.hasModel())return;const t=this._editor.getModel(),n=[];this._editor.getSelections().forEach((i=>{const o=i.getStartPosition();let r=t.matchBracket(o);if(!r&&(r=t.findEnclosingBrackets(o),!r)){const e=t.findNextBracket(o);e&&e.range&&(r=t.matchBracket(e.range.getStartPosition()))}let s=null,a=null;if(r){r.sort(y.e.compareRangesUsingStarts);const[t,n]=r;s=e?t.getStartPosition():t.getEndPosition(),a=e?n.getEndPosition():n.getStartPosition()}s&&a&&n.push(new A.Y(s.lineNumber,s.column,a.lineNumber,a.column))})),n.length>0&&(this._editor.setSelections(n),this._editor.revealRange(n[0]))}_updateBrackets(){if("never"===this._matchBrackets)return;this._recomputeBrackets();let e=[],t=0;for(const n of this._lastBracketsData){let i=n.brackets;i&&(e[t++]={range:i[0],options:n.options},e[t++]={range:i[1],options:n.options})}this._decorations=this._editor.deltaDecorations(this._decorations,e)}_recomputeBrackets(){if(!this._editor.hasModel())return this._lastBracketsData=[],void(this._lastVersionId=0);const e=this._editor.getSelections();if(e.length>100)return this._lastBracketsData=[],void(this._lastVersionId=0);const t=this._editor.getModel(),n=t.getVersionId();let i=[];this._lastVersionId===n&&(i=this._lastBracketsData);let o=[],r=0;for(let t=0,n=e.length;t1&&o.sort(w.L.compare);let s=[],a=0,l=0,d=i.length;for(let e=0,n=o.length;e{const n=e.getColor(L.TC);n&&t.addRule(`.monaco-editor .bracket-match { background-color: ${n}; }`);const i=e.getColor(L.Dl);i&&t.addRule(`.monaco-editor .bracket-match { border: 1px solid ${i}; }`)})),D.BH.appendMenuItem(D.eH.MenubarGoMenu,{group:"5_infile_nav",command:{id:"editor.action.jumpToBracket",title:_.N({key:"miGoToBracket",comment:["&& denotes a mnemonic"]},"Go to &&Bracket")},order:2})},4594:(e,t,n)=>{"use strict";n.r(t);var i=n(3580),o=n(6830),r=n(9102),s=n(4314),a=n(3860);class l{constructor(e,t){this._selection=e,this._isMovingLeft=t}getEditOperations(e,t){if(this._selection.startLineNumber!==this._selection.endLineNumber||this._selection.isEmpty())return;const n=this._selection.startLineNumber,i=this._selection.startColumn,o=this._selection.endColumn;if((!this._isMovingLeft||1!==i)&&(this._isMovingLeft||o!==e.getLineMaxColumn(n)))if(this._isMovingLeft){const r=new s.e(n,i-1,n,i),a=e.getValueInRange(r);t.addEditOperation(r,null),t.addEditOperation(new s.e(n,o,n,o),a)}else{const r=new s.e(n,o,n,o+1),a=e.getValueInRange(r);t.addEditOperation(r,null),t.addEditOperation(new s.e(n,i,n,i),a)}}computeCursorState(e,t){return this._isMovingLeft?new a.Y(this._selection.startLineNumber,this._selection.startColumn-1,this._selection.endLineNumber,this._selection.endColumn-1):new a.Y(this._selection.startLineNumber,this._selection.startColumn+1,this._selection.endLineNumber,this._selection.endColumn+1)}}class d extends o.R6{constructor(e,t){super(t),this.left=e}run(e,t){if(!t.hasModel())return;let n=[],i=t.getSelections();for(const e of i)n.push(new l(e,this.left));t.pushUndoStop(),t.executeCommands(this.id,n),t.pushUndoStop()}}(0,o.Qr)(class extends d{constructor(){super(!0,{id:"editor.action.moveCarretLeftAction",label:i.N("caret.moveLeft","Move Selected Text Left"),alias:"Move Selected Text Left",precondition:r.u.writable})}}),(0,o.Qr)(class extends d{constructor(){super(!1,{id:"editor.action.moveCarretRightAction",label:i.N("caret.moveRight","Move Selected Text Right"),alias:"Move Selected Text Right",precondition:r.u.writable})}})},7847:(e,t,n)=>{"use strict";n.r(t);var i=n(3580),o=n(6830),r=n(1329),s=n(4314),a=n(9102),l=n(8784);class d extends o.R6{constructor(){super({id:"editor.action.transposeLetters",label:i.N("transposeLetters.label","Transpose Letters"),alias:"Transpose Letters",precondition:a.u.writable,kbOpts:{kbExpr:a.u.textInputFocus,primary:0,mac:{primary:306},weight:100}})}run(e,t){if(!t.hasModel())return;let n=t.getModel(),i=[],o=t.getSelections();for(let e of o){if(!e.isEmpty())continue;let t=e.startLineNumber,o=e.startColumn,a=n.getLineMaxColumn(t);if(1===t&&(1===o||2===o&&2===a))continue;let d=o===a?e.getPosition():l.o.rightPosition(n,e.getPosition().lineNumber,e.getPosition().column),c=l.o.leftPosition(n,d),h=l.o.leftPosition(n,c),u=n.getValueInRange(s.e.fromPositions(h,c)),g=n.getValueInRange(s.e.fromPositions(c,d)),p=s.e.fromPositions(h,d);i.push(new r.T4(p,g+u))}i.length>0&&(t.pushUndoStop(),t.executeCommands(this.id,i),t.pushUndoStop())}}(0,o.Qr)(d)},2015:(e,t,n)=>{"use strict";n.r(t),n.d(t,{CutAction:()=>_,CopyAction:()=>b,PasteAction:()=>C});var i=n(3580),o=n(6268),r=n(1432),s=n(5715),a=n(6830),l=n(1640),d=n(9102),c=n(4144),h=n(4972);const u="9_cutcopypaste",g=r.tY||document.queryCommandSupported("cut"),p=r.tY||document.queryCommandSupported("copy"),m=void 0!==navigator.clipboard&&!o.vU||document.queryCommandSupported("paste");function f(e){return e.register(),e}const _=g?f(new a.AJ({id:"editor.action.clipboardCutAction",precondition:void 0,kbOpts:r.tY?{primary:2102,win:{primary:2102,secondary:[1044]},weight:100}:void 0,menuOpts:[{menuId:c.eH.MenubarEditMenu,group:"2_ccp",title:i.N({key:"miCut",comment:["&& denotes a mnemonic"]},"Cu&&t"),order:1},{menuId:c.eH.EditorContext,group:u,title:i.N("actions.clipboard.cutLabel","Cut"),when:d.u.writable,order:1},{menuId:c.eH.CommandPalette,group:"",title:i.N("actions.clipboard.cutLabel","Cut"),order:1},{menuId:c.eH.SimpleEditorContext,group:u,title:i.N("actions.clipboard.cutLabel","Cut"),when:d.u.writable,order:1}]})):void 0,b=p?f(new a.AJ({id:"editor.action.clipboardCopyAction",precondition:void 0,kbOpts:r.tY?{primary:2081,win:{primary:2081,secondary:[2067]},weight:100}:void 0,menuOpts:[{menuId:c.eH.MenubarEditMenu,group:"2_ccp",title:i.N({key:"miCopy",comment:["&& denotes a mnemonic"]},"&&Copy"),order:2},{menuId:c.eH.EditorContext,group:u,title:i.N("actions.clipboard.copyLabel","Copy"),order:2},{menuId:c.eH.CommandPalette,group:"",title:i.N("actions.clipboard.copyLabel","Copy"),order:1},{menuId:c.eH.SimpleEditorContext,group:u,title:i.N("actions.clipboard.copyLabel","Copy"),order:2}]})):void 0;c.BH.appendMenuItem(c.eH.MenubarEditMenu,{submenu:c.eH.MenubarCopy,title:{value:i.N("copy as","Copy As"),original:"Copy As"},group:"2_ccp",order:3}),c.BH.appendMenuItem(c.eH.EditorContext,{submenu:c.eH.EditorContextCopy,title:{value:i.N("copy as","Copy As"),original:"Copy As"},group:u,order:3});const C=m?f(new a.AJ({id:"editor.action.clipboardPasteAction",precondition:void 0,kbOpts:r.tY?{primary:2100,win:{primary:2100,secondary:[1043]},linux:{primary:2100,secondary:[1043]},weight:100}:void 0,menuOpts:[{menuId:c.eH.MenubarEditMenu,group:"2_ccp",title:i.N({key:"miPaste",comment:["&& denotes a mnemonic"]},"&&Paste"),order:4},{menuId:c.eH.EditorContext,group:u,title:i.N("actions.clipboard.pasteLabel","Paste"),when:d.u.writable,order:4},{menuId:c.eH.CommandPalette,group:"",title:i.N("actions.clipboard.pasteLabel","Paste"),order:1},{menuId:c.eH.SimpleEditorContext,group:u,title:i.N("actions.clipboard.pasteLabel","Paste"),when:d.u.writable,order:4}]})):void 0;class v extends a.R6{constructor(){super({id:"editor.action.clipboardCopyWithSyntaxHighlightingAction",label:i.N("actions.clipboard.copyWithSyntaxHighlightingLabel","Copy With Syntax Highlighting"),alias:"Copy With Syntax Highlighting",precondition:void 0,kbOpts:{kbExpr:d.u.textInputFocus,primary:0,weight:100}})}run(e,t){t.hasModel()&&(!t.getOption(30)&&t.getSelection().isEmpty()||(s.RA.forceCopyWithSyntaxHighlighting=!0,t.focus(),document.execCommand("copy"),s.RA.forceCopyWithSyntaxHighlighting=!1))}}function w(e,t){e&&(e.addImplementation(1e4,"code-editor",((e,n)=>{const i=e.get(l.$).getFocusedCodeEditor();if(i&&i.hasTextFocus()){const e=i.getOption(30),n=i.getSelection();return n&&n.isEmpty()&&!e||document.execCommand(t),!0}return!1})),e.addImplementation(0,"generic-dom",((e,n)=>(document.execCommand(t),!0))))}w(_,"cut"),w(b,"copy"),C&&(C.addImplementation(1e4,"code-editor",((e,t)=>{const n=e.get(l.$),i=e.get(h.p),o=n.getFocusedCodeEditor();return!(!o||!o.hasTextFocus())&&!(!document.execCommand("paste")&&r.$L&&(a=void 0,d=void 0,c=void 0,u=function*(){const e=yield i.readText();if(""!==e){const t=s.Nl.INSTANCE.get(e);let n=!1,i=null,r=null;t&&(n=o.getOption(30)&&!!t.isFromEmptySelection,i=void 0!==t.multicursorText?t.multicursorText:null,r=t.mode),o.trigger("keyboard","paste",{text:e,pasteOnNewLine:n,multicursorText:i,mode:r})}},new(c||(c=Promise))((function(e,t){function n(e){try{o(u.next(e))}catch(e){t(e)}}function i(e){try{o(u.throw(e))}catch(e){t(e)}}function o(t){var o;t.done?e(t.value):(o=t.value,o instanceof c?o:new c((function(e){e(o)}))).then(n,i)}o((u=u.apply(a,d||[])).next())})),0));var a,d,c,u})),C.addImplementation(0,"generic-dom",((e,t)=>(document.execCommand("paste"),!0)))),p&&(0,a.Qr)(v)},1907:(e,t,n)=>{"use strict";n.d(t,{RB:()=>_,Bb:()=>b,MN:()=>C,uH:()=>v,TM:()=>w,bA:()=>y,aI:()=>x});var i=n(9488),o=n(1050),r=n(7301),s=n(5976),a=n(666),l=n(9925),d=n(4314),c=n(3860),h=n(4101),u=n(1200),g=n(9532),p=n(535),m=n(4565),f=function(e,t,n,i){return new(n||(n=Promise))((function(o,r){function s(e){try{l(i.next(e))}catch(e){r(e)}}function a(e){try{l(i.throw(e))}catch(e){r(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,a)}l((i=i.apply(e,t||[])).next())}))};const _="editor.action.codeAction",b="editor.action.refactor",C="editor.action.sourceAction",v="editor.action.organizeImports",w="editor.action.fixAll";class y{constructor(e,t){this.action=e,this.provider=t}resolve(e){var t;return f(this,void 0,void 0,(function*(){if((null===(t=this.provider)||void 0===t?void 0:t.resolveCodeAction)&&!this.action.edit){let t;try{t=yield this.provider.resolveCodeAction(this.action,e)}catch(e){(0,r.Cp)(e)}t&&(this.action.edit=t.edit)}return this}))}}class A extends s.JT{constructor(e,t,n){super(),this.documentation=t,this._register(n),this.allActions=[...e].sort(A.codeActionsComparator),this.validActions=this.allActions.filter((({action:e})=>!e.disabled))}static codeActionsComparator({action:e},{action:t}){return e.isPreferred&&!t.isPreferred?-1:!e.isPreferred&&t.isPreferred?1:(0,i.Of)(e.diagnostics)?(0,i.Of)(t.diagnostics)?e.diagnostics[0].message.localeCompare(t.diagnostics[0].message):-1:(0,i.Of)(t.diagnostics)?1:0}get hasAutoFix(){return this.validActions.some((({action:e})=>!!e.kind&&g.yN.QuickFix.contains(new g.yN(e.kind))&&!!e.isPreferred))}}const S={actions:[],documentation:void 0};function x(e,t,n,o,a){var d;const c=n.filter||{},u={only:null===(d=c.include)||void 0===d?void 0:d.value,trigger:n.type},p=new l.YQ(e,a),m=function(e,t){return h.H9.all(e).filter((e=>!e.providedCodeActionKinds||e.providedCodeActionKinds.some((e=>(0,g.EU)(t,new g.yN(e))))))}(e,c),_=new s.SL,b=m.map((n=>f(this,void 0,void 0,(function*(){try{o.report(n);const i=yield n.provideCodeActions(e,t,u,p.token);if(i&&_.add(i),p.token.isCancellationRequested)return S;const r=((null==i?void 0:i.actions)||[]).filter((e=>e&&(0,g.Yl)(c,e))),s=function(e,t,n){if(!e.documentation)return;const i=e.documentation.map((e=>({kind:new g.yN(e.kind),command:e.command})));if(n){let e;for(const t of i)t.kind.contains(n)&&(e?e.kind.contains(t.kind)&&(e=t):e=t);if(e)return null==e?void 0:e.command}for(const e of t)if(e.kind)for(const t of i)if(t.kind.contains(new g.yN(e.kind)))return t.command}(n,r,c.include);return{actions:r.map((e=>new y(e,n))),documentation:s}}catch(e){if((0,r.VV)(e))throw e;return(0,r.Cp)(e),S}})))),C=h.H9.onDidChange((()=>{const t=h.H9.all(e);(0,i.fS)(t,m)||p.cancel()}));return Promise.all(b).then((e=>{const t=(0,i.xH)(e.map((e=>e.actions))),n=(0,i.kX)(e.map((e=>e.documentation)));return new A(t,n,_)})).finally((()=>{C.dispose(),p.dispose()}))}m.P.registerCommand("_executeCodeActionProvider",(function(e,t,n,i,s){return f(this,void 0,void 0,(function*(){if(!(t instanceof a.o))throw(0,r.b1)();const l=e.get(u.q).getModel(t);if(!l)throw(0,r.b1)();const h=c.Y.isISelection(n)?c.Y.liftSelection(n):d.e.isIRange(n)?l.validateRange(n):void 0;if(!h)throw(0,r.b1)();const m="string"==typeof i?new g.yN(i):void 0,f=yield x(l,h,{type:1,filter:{includeSourceActions:!0,include:m}},p.E.None,o.T.None),_=[],b=Math.min(f.validActions.length,"number"==typeof s?s:0);for(let e=0;ee.action))}finally{setTimeout((()=>f.dispose()),100)}}))}))},787:(e,t,n)=>{"use strict";n.d(t,{S5:()=>Ne,dW:()=>Se,Hv:()=>Ee,o$:()=>Le,E7:()=>Ae,pY:()=>ve,Eb:()=>xe,VQ:()=>ke});var i=n(1050);class o{constructor(e){this.executor=e,this._didRun=!1}getValue(){if(!this._didRun)try{this._value=this.executor()}catch(e){this._error=e}finally{this._didRun=!0}if(this._error)throw this._error;return this._value}get rawValue(){return this._value}}var r=n(5976),s=n(7295),a=n(6830),l=n(6007),d=n(9102),c=n(1907),h=n(7301),u=n(845),g=n(2065),p=n(5321),m=n(4741),f=n(187),_=n(4101),b=n(9532),C=n(5606),v=n(1847),w=function(e,t){return function(n,i){t(n,i,e)}};class y extends m.aU{constructor(e,t){super(e.command?e.command.id:e.title,e.title.replace(/\r\n|\r|\n/g," "),void 0,!e.disabled,t),this.action=e}}let A=class extends r.JT{constructor(e,t,n,i){super(),this._editor=e,this._delegate=t,this._contextMenuService=n,this._visible=!1,this._showingActions=this._register(new r.XK),this._keybindingResolver=new S({getKeybindings:()=>i.getKeybindings()})}get isVisible(){return this._visible}show(e,t,n,i){return o=this,r=void 0,a=function*(){const o=i.includeDisabledActions?t.allActions:t.validActions;if(!o.length)return void(this._visible=!1);if(!this._editor.getDomNode())throw this._visible=!1,(0,h.F0)();this._visible=!0,this._showingActions.value=t;const r=this.getMenuActions(e,o,t.documentation),s=f.L.isIPosition(n)?this._toCoords(n):n||{x:0,y:0},a=this._keybindingResolver.getResolver(),l=this._editor.getOption(113);this._contextMenuService.showContextMenu({domForShadowRoot:l?this._editor.getDomNode():void 0,getAnchor:()=>s,getActions:()=>r,onHide:()=>{this._visible=!1,this._editor.focus()},autoSelectFirstItem:!0,getKeyBinding:e=>e instanceof y?a(e.action):void 0})},new((s=void 0)||(s=Promise))((function(e,t){function n(e){try{l(a.next(e))}catch(e){t(e)}}function i(e){try{l(a.throw(e))}catch(e){t(e)}}function l(t){var o;t.done?e(t.value):(o=t.value,o instanceof s?o:new s((function(e){e(o)}))).then(n,i)}l((a=a.apply(o,r||[])).next())}));var o,r,s,a}getMenuActions(e,t,n){var i,o;const r=e=>new y(e.action,(()=>this._delegate.onSelectCodeAction(e))),s=t.map(r),a=[...n],l=this._editor.getModel();if(l&&s.length)for(const n of _.H9.all(l))n._getAdditionalMenuItems&&a.push(...n._getAdditionalMenuItems({trigger:e.type,only:null===(o=null===(i=e.filter)||void 0===i?void 0:i.include)||void 0===o?void 0:o.value},t.map((e=>e.action))));return a.length&&s.push(new m.Z0,...a.map((e=>r(new c.bA({title:e.title,command:e},void 0))))),s}_toCoords(e){if(!this._editor.hasModel())return{x:0,y:0};this._editor.revealPosition(e,1),this._editor.render();const t=this._editor.getScrolledVisiblePosition(e),n=(0,p.i)(this._editor.getDomNode());return{x:n.left+t.left,y:n.top+t.top+t.height}}};A=function(e,t,n,i){var o,r=arguments.length,s=r<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,i);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,n,s):o(t,n))||s);return r>3&&s&&Object.defineProperty(t,n,s),s}([w(2,C.i),w(3,v.d)],A);class S{constructor(e){this._keybindingProvider=e}getResolver(){const e=new o((()=>this._keybindingProvider.getKeybindings().filter((e=>S.codeActionCommands.indexOf(e.command)>=0)).filter((e=>e.resolvedKeybinding)).map((e=>{let t=e.commandArgs;return e.command===c.uH?t={kind:b.yN.SourceOrganizeImports.value}:e.command===c.TM&&(t={kind:b.yN.SourceFixAll.value}),Object.assign({resolvedKeybinding:e.resolvedKeybinding},b.wZ.fromUser(t,{kind:b.yN.None,apply:"never"}))}))));return t=>{if(t.kind){const n=this.bestKeybindingForCodeAction(t,e.getValue());return null==n?void 0:n.resolvedKeybinding}}}bestKeybindingForCodeAction(e,t){if(!e.kind)return;const n=new b.yN(e.kind);return t.filter((e=>e.kind.contains(n))).filter((t=>!t.preferred||e.isPreferred)).reduceRight(((e,t)=>e?e.kind.contains(t.kind)?t:e:t),void 0)}}S.codeActionCommands=[c.Bb,c.RB,c.MN,c.uH,c.TM];var x=n(7974),k=n(4669),L=n(3379),E=n.n(L),N=n(7795),D=n.n(N),I=n(569),M=n.n(I),T=n(3565),R=n.n(T),O=n(9216),B=n.n(O),P=n(4589),F=n.n(P),W=n(4754),z={};z.styleTagTransform=F(),z.setAttributes=R(),z.insert=M().bind(null,"head"),z.domAPI=D(),z.insertStyleElement=B(),E()(W.Z,z),W.Z&&W.Z.locals&&W.Z.locals;var V,H=n(3103),j=n(3580),$=n(7781),U=n(3910),Z=n(553),K=n(3046);!function(e){e.Hidden={type:0},e.Showing=class{constructor(e,t,n,i){this.actions=e,this.trigger=t,this.editorPosition=n,this.widgetPosition=i,this.type=1}}}(V||(V={}));let q=class e extends r.JT{constructor(e,t,n,i){super(),this._editor=e,this._quickFixActionId=t,this._preferredFixActionId=n,this._keybindingService=i,this._onClick=this._register(new k.Q5),this.onClick=this._onClick.event,this._state=V.Hidden,this._domNode=document.createElement("div"),this._domNode.className=K.lA.lightBulb.classNames,this._editor.addContentWidget(this),this._register(this._editor.onDidChangeModelContent((e=>{const t=this._editor.getModel();(1!==this.state.type||!t||this.state.editorPosition.lineNumber>=t.getLineCount())&&this.hide()}))),Z.o.ignoreTarget(this._domNode),this._register(p.Gw(this._domNode,(e=>{if(1!==this.state.type)return;this._editor.focus(),e.preventDefault();const{top:t,height:n}=p.i(this._domNode),i=this._editor.getOption(57);let o=Math.floor(i/3);null!==this.state.widgetPosition.position&&this.state.widgetPosition.position.lineNumber{if(1!=(1&e.buttons))return;this.hide();const t=new x.Z;t.startMonitoring(e.target,e.buttons,x.e,(()=>{}),(()=>{t.dispose()}))}))),this._register(this._editor.onDidChangeConfiguration((e=>{e.hasChanged(55)&&!this._editor.getOption(55).enabled&&this.hide()}))),this._updateLightBulbTitleAndIcon(),this._register(this._keybindingService.onDidUpdateKeybindings(this._updateLightBulbTitleAndIcon,this))}dispose(){super.dispose(),this._editor.removeContentWidget(this)}getId(){return"LightBulbWidget"}getDomNode(){return this._domNode}getPosition(){return 1===this._state.type?this._state.widgetPosition:null}update(t,n,i){if(t.validActions.length<=0)return this.hide();const o=this._editor.getOptions();if(!o.get(55).enabled)return this.hide();const r=this._editor.getModel();if(!r)return this.hide();const{lineNumber:s,column:a}=r.validatePosition(i),l=r.getOptions().tabSize,d=o.get(41),c=r.getLineContent(s),h=H.yO.computeIndentLevel(c,l),u=e=>e>2&&this._editor.getTopForLineNumber(e)===this._editor.getTopForLineNumber(e-1);let g=s;if(!(d.spaceWidth*h>22))if(s>1&&!u(s-1))g-=1;else if(u(s+1)){if(a*d.spaceWidth<22)return this.hide()}else g+=1;this.state=new V.Showing(t,n,i,{position:{lineNumber:g,column:1},preference:e._posPref}),this._editor.layoutContentWidget(this)}hide(){this.state=V.Hidden,this._editor.layoutContentWidget(this)}get state(){return this._state}set state(e){this._state=e,this._updateLightBulbTitleAndIcon()}_updateLightBulbTitleAndIcon(){if(1===this.state.type&&this.state.actions.hasAutoFix){this._domNode.classList.remove(...K.lA.lightBulb.classNamesArray),this._domNode.classList.add(...K.lA.lightbulbAutofix.classNamesArray);const e=this._keybindingService.lookupKeybinding(this._preferredFixActionId);if(e)return void(this.title=j.N("prefferedQuickFixWithKb","Show Fixes. Preferred Fix Available ({0})",e.getLabel()))}this._domNode.classList.remove(...K.lA.lightbulbAutofix.classNamesArray),this._domNode.classList.add(...K.lA.lightBulb.classNamesArray);const e=this._keybindingService.lookupKeybinding(this._quickFixActionId);this.title=e?j.N("quickFixWithKb","Show Fixes ({0})",e.getLabel()):j.N("quickFix","Show Fixes")}set title(e){this._domNode.title=e}};var Y,G;q._posPref=[0],q=function(e,t,n,i){var o,r=arguments.length,s=r<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,i);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,n,s):o(t,n))||s);return r>3&&s&&Object.defineProperty(t,n,s),s}([(Y=3,G=v.d,function(e,t){G(e,t,Y)})],q),(0,$.Ic)(((e,t)=>{var n;const i=null===(n=e.getColor(U.cv))||void 0===n?void 0:n.transparent(.7),o=e.getColor(U.Fu);o&&t.addRule(`\n\t\t.monaco-editor .contentWidgets ${K.lA.lightBulb.cssSelector} {\n\t\t\tcolor: ${o};\n\t\t\tbackground-color: ${i};\n\t\t}`);const r=e.getColor(U.sK);r&&t.addRule(`\n\t\t.monaco-editor .contentWidgets ${K.lA.lightbulbAutofix.cssSelector} {\n\t\t\tcolor: ${r};\n\t\t\tbackground-color: ${i};\n\t\t}`)}));var Q,X=function(e,t,n,i){return new(n||(n=Promise))((function(o,r){function s(e){try{l(i.next(e))}catch(e){r(e)}}function a(e){try{l(i.throw(e))}catch(e){r(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,a)}l((i=i.apply(e,t||[])).next())}))};let J=class extends r.JT{constructor(e,t,n,i,s){super(),this._editor=e,this.delegate=i,this._activeCodeActions=this._register(new r.XK),Q.set(this,!1),this._codeActionWidget=new o((()=>this._register(s.createInstance(A,this._editor,{onSelectCodeAction:e=>X(this,void 0,void 0,(function*(){this.delegate.applyCodeAction(e,!0)}))})))),this._lightBulbWidget=new o((()=>{const e=this._register(s.createInstance(q,this._editor,t,n));return this._register(e.onClick((e=>this.showCodeActionList(e.trigger,e.actions,e,{includeDisabledActions:!1})))),e}))}dispose(){(function(e,t,n,i,o){if("m"===i)throw new TypeError("Private method is not writable");if("a"===i&&!o)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!o:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");"a"===i?o.call(e,n):o?o.value=n:t.set(e,n)})(this,Q,!0,"f"),super.dispose()}update(e){var t,n,i;return X(this,void 0,void 0,(function*(){if(1!==e.type)return void(null===(t=this._lightBulbWidget.rawValue)||void 0===t||t.hide());let o;try{o=yield e.actions}catch(e){return void(0,h.dL)(e)}if(!function(e,t,n,i){if("a"===n&&!i)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!i:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?i:"a"===n?i.call(e):i?i.value:t.get(e)}(this,Q,"f"))if(this._lightBulbWidget.getValue().update(o,e.trigger,e.position),1===e.trigger.type){if(null===(n=e.trigger.filter)||void 0===n?void 0:n.include){const t=this.tryGetValidActionToApply(e.trigger,o);if(t){try{yield this.delegate.applyCodeAction(t,!1)}finally{o.dispose()}return}if(e.trigger.context){const t=this.getInvalidActionThatWouldHaveBeenApplied(e.trigger,o);if(t&&t.action.disabled)return u.O.get(this._editor).showMessage(t.action.disabled,e.trigger.context.position),void o.dispose()}}const t=!!(null===(i=e.trigger.filter)||void 0===i?void 0:i.include);if(e.trigger.context&&(!o.allActions.length||!t&&!o.validActions.length))return u.O.get(this._editor).showMessage(e.trigger.context.notAvailableMessage,e.trigger.context.position),this._activeCodeActions.value=o,void o.dispose();this._activeCodeActions.value=o,this._codeActionWidget.getValue().show(e.trigger,o,e.position,{includeDisabledActions:t})}else this._codeActionWidget.getValue().isVisible?o.dispose():this._activeCodeActions.value=o}))}getInvalidActionThatWouldHaveBeenApplied(e,t){if(t.allActions.length)return"first"===e.autoApply&&0===t.validActions.length||"ifSingle"===e.autoApply&&1===t.allActions.length?t.allActions.find((({action:e})=>e.disabled)):void 0}tryGetValidActionToApply(e,t){if(t.validActions.length)return"first"===e.autoApply&&t.validActions.length>0||"ifSingle"===e.autoApply&&1===t.validActions.length?t.validActions[0]:void 0}showCodeActionList(e,t,n,i){return X(this,void 0,void 0,(function*(){this._codeActionWidget.getValue().show(e,t,n,i)}))}};Q=new WeakMap,J=function(e,t,n,i){var o,r=arguments.length,s=r<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,i);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,n,s):o(t,n))||s);return r>3&&s&&Object.defineProperty(t,n,s),s}([function(e,t){return function(n,i){t(n,i,e)}}(4,g.TG)],J);var ee,te=n(4565),ne=n(8819),ie=n(8674),oe=n(9422),re=n(535),se=n(829),ae=n(5393),le=n(5935),de=n(4314),ce=function(e,t,n,i){if("a"===n&&!i)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!i:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?i:"a"===n?i.call(e):i?i.value:t.get(e)};const he=new ne.uy("supportedCodeAction","");class ue extends r.JT{constructor(e,t,n,i=250){super(),this._editor=e,this._markerService=t,this._signalChange=n,this._delay=i,this._autoTriggerTimer=this._register(new ae._F),this._register(this._markerService.onMarkerChanged((e=>this._onMarkerChanges(e)))),this._register(this._editor.onDidChangeCursorPosition((()=>this._onCursorChange())))}trigger(e){const t=this._getRangeOfSelectionUnlessWhitespaceEnclosed(e);return this._createEventAndSignalChange(e,t)}_onMarkerChanges(e){const t=this._editor.getModel();t&&e.some((e=>(0,le.Xy)(e,t.uri)))&&this._autoTriggerTimer.cancelAndSet((()=>{this.trigger({type:2})}),this._delay)}_onCursorChange(){this._autoTriggerTimer.cancelAndSet((()=>{this.trigger({type:2})}),this._delay)}_getRangeOfMarker(e){const t=this._editor.getModel();if(t)for(const n of this._markerService.read({resource:t.uri})){const i=t.validateRange(n);if(de.e.intersectRanges(i,e))return de.e.lift(i)}}_getRangeOfSelectionUnlessWhitespaceEnclosed(e){if(!this._editor.hasModel())return;const t=this._editor.getModel(),n=this._editor.getSelection();if(n.isEmpty()&&2===e.type){const{lineNumber:e,column:i}=n.getPosition(),o=t.getLineContent(e);if(0===o.length)return;if(1===i){if(/\s/.test(o[0]))return}else if(i===t.getLineMaxColumn(e)){if(/\s/.test(o[o.length-1]))return}else if(/\s/.test(o[i-2])&&/\s/.test(o[i-1]))return}return n}_createEventAndSignalChange(e,t){const n=this._editor.getModel();if(!t||!n)return void this._signalChange(void 0);const i=this._getRangeOfMarker(t),o=i?i.getStartPosition():t.getStartPosition(),r={trigger:e,selection:t,position:o};return this._signalChange(r),r}}var ge;!function(e){e.Empty={type:0},e.Triggered=class{constructor(e,t,n,i){this.trigger=e,this.rangeOrSelection=t,this.position=n,this._cancellablePromise=i,this.type=1,this.actions=i.catch((e=>{if((0,h.VV)(e))return pe;throw e}))}cancel(){this._cancellablePromise.cancel()}}}(ge||(ge={}));const pe={allActions:[],validActions:[],dispose:()=>{},documentation:[],hasAutoFix:!1};class me extends r.JT{constructor(e,t,n,i){super(),this._editor=e,this._markerService=t,this._progressService=i,this._codeActionOracle=this._register(new r.XK),this._state=ge.Empty,this._onDidChangeState=this._register(new k.Q5),this.onDidChangeState=this._onDidChangeState.event,ee.set(this,!1),this._supportedCodeActions=he.bindTo(n),this._register(this._editor.onDidChangeModel((()=>this._update()))),this._register(this._editor.onDidChangeModelLanguage((()=>this._update()))),this._register(_.H9.onDidChange((()=>this._update()))),this._update()}dispose(){ce(this,ee,"f")||(function(e,t,n,i,o){if("m"===i)throw new TypeError("Private method is not writable");if("a"===i&&!o)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!o:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");"a"===i?o.call(e,n):o?o.value=n:t.set(e,n)}(this,ee,!0,"f"),super.dispose(),this.setState(ge.Empty,!0))}_update(){if(ce(this,ee,"f"))return;this._codeActionOracle.value=void 0,this.setState(ge.Empty);const e=this._editor.getModel();if(e&&_.H9.has(e)&&!this._editor.getOption(79)){const t=[];for(const n of _.H9.all(e))Array.isArray(n.providedCodeActionKinds)&&t.push(...n.providedCodeActionKinds);this._supportedCodeActions.set(t.join(" ")),this._codeActionOracle.value=new ue(this._editor,this._markerService,(t=>{var n;if(!t)return void this.setState(ge.Empty);const i=(0,ae.PG)((n=>(0,c.aI)(e,t.selection,t.trigger,re.E.None,n)));1===t.trigger.type&&(null===(n=this._progressService)||void 0===n||n.showWhile(i,250)),this.setState(new ge.Triggered(t.trigger,t.selection,t.position,i))}),void 0),this._codeActionOracle.value.trigger({type:2})}else this._supportedCodeActions.reset()}trigger(e){this._codeActionOracle.value&&this._codeActionOracle.value.trigger(e)}setState(e,t){e!==this._state&&(1===this._state.type&&this._state.cancel(),this._state=e,t||ce(this,ee,"f")||this._onDidChangeState.fire(e))}}ee=new WeakMap;var fe=function(e,t){return function(n,i){t(n,i,e)}},_e=function(e,t,n,i){return new(n||(n=Promise))((function(o,r){function s(e){try{l(i.next(e))}catch(e){r(e)}}function a(e){try{l(i.throw(e))}catch(e){r(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,a)}l((i=i.apply(e,t||[])).next())}))};function be(e){return ne.Ao.regex(he.keys()[0],new RegExp("(\\s|^)"+(0,s.ec)(e.value)+"\\b"))}const Ce={type:"object",defaultSnippets:[{body:{kind:""}}],properties:{kind:{type:"string",description:j.N("args.schema.kind","Kind of the code action to run.")},apply:{type:"string",description:j.N("args.schema.apply","Controls when the returned actions are applied."),default:"ifSingle",enum:["first","ifSingle","never"],enumDescriptions:[j.N("args.schema.apply.first","Always apply the first returned code action."),j.N("args.schema.apply.ifSingle","Apply the first returned code action if it is the only one."),j.N("args.schema.apply.never","Do not apply the returned code actions.")]},preferred:{type:"boolean",default:!1,description:j.N("args.schema.preferred","Controls if only preferred code actions should be returned.")}}};let ve=class e extends r.JT{constructor(e,t,n,i,r){super(),this._instantiationService=r,this._editor=e,this._model=this._register(new me(this._editor,t,n,i)),this._register(this._model.onDidChangeState((e=>this.update(e)))),this._ui=new o((()=>this._register(new J(e,Ae.Id,Ne.Id,{applyCodeAction:(e,t)=>_e(this,void 0,void 0,(function*(){try{yield this._applyCodeAction(e)}finally{t&&this._trigger({type:2,filter:{}})}}))},this._instantiationService))))}static get(t){return t.getContribution(e.ID)}update(e){this._ui.getValue().update(e)}showCodeActions(e,t,n){return this._ui.getValue().showCodeActionList(e,t,n,{includeDisabledActions:!1})}manualTriggerAtCurrentPosition(e,t,n){if(!this._editor.hasModel())return;u.O.get(this._editor).closeMessage();const i=this._editor.getPosition();this._trigger({type:1,filter:t,autoApply:n,context:{notAvailableMessage:e,position:i}})}_trigger(e){return this._model.trigger(e)}_applyCodeAction(e){return this._instantiationService.invokeFunction(we,e,this._editor)}};function we(e,t,n){return _e(this,void 0,void 0,(function*(){const o=e.get(l.vu),r=e.get(te.H),s=e.get(se.b),a=e.get(oe.lT);if(s.publicLog2("codeAction.applyCodeAction",{codeActionTitle:t.action.title,codeActionKind:t.action.kind,codeActionIsPreferred:!!t.action.isPreferred}),yield t.resolve(i.T.None),t.action.edit&&(yield o.apply(l.fo.convert(t.action.edit),{editor:n,label:t.action.title})),t.action.command)try{yield r.executeCommand(t.action.command.id,...t.action.command.arguments||[])}catch(e){const t=function(e){return"string"==typeof e?e:e instanceof Error&&"string"==typeof e.message?e.message:void 0}(e);a.error("string"==typeof t?t:j.N("applyCodeActionFailed","An unknown error occurred while applying the code action"))}}))}function ye(e,t,n,i){if(e.hasModel()){const o=ve.get(e);o&&o.manualTriggerAtCurrentPosition(t,n,i)}}ve.ID="editor.contrib.quickFixController",ve=function(e,t,n,i){var o,r=arguments.length,s=r<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,i);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,n,s):o(t,n))||s);return r>3&&s&&Object.defineProperty(t,n,s),s}([fe(1,ie.lT),fe(2,ne.i6),fe(3,re.e),fe(4,g.TG)],ve);class Ae extends a.R6{constructor(){super({id:Ae.Id,label:j.N("quickfix.trigger.label","Quick Fix..."),alias:"Quick Fix...",precondition:ne.Ao.and(d.u.writable,d.u.hasCodeActionsProvider),kbOpts:{kbExpr:d.u.editorTextFocus,primary:2132,weight:100}})}run(e,t){return ye(t,j.N("editor.action.quickFix.noneMessage","No code actions available"),void 0,void 0)}}Ae.Id="editor.action.quickFix";class Se extends a._l{constructor(){super({id:c.RB,precondition:ne.Ao.and(d.u.writable,d.u.hasCodeActionsProvider),description:{description:"Trigger a code action",args:[{name:"args",schema:Ce}]}})}runEditorCommand(e,t,n){const i=b.wZ.fromUser(n,{kind:b.yN.Empty,apply:"ifSingle"});return ye(t,"string"==typeof(null==n?void 0:n.kind)?i.preferred?j.N("editor.action.codeAction.noneMessage.preferred.kind","No preferred code actions for '{0}' available",n.kind):j.N("editor.action.codeAction.noneMessage.kind","No code actions for '{0}' available",n.kind):i.preferred?j.N("editor.action.codeAction.noneMessage.preferred","No preferred code actions available"):j.N("editor.action.codeAction.noneMessage","No code actions available"),{include:i.kind,includeSourceActions:!0,onlyIncludePreferredActions:i.preferred},i.apply)}}class xe extends a.R6{constructor(){super({id:c.Bb,label:j.N("refactor.label","Refactor..."),alias:"Refactor...",precondition:ne.Ao.and(d.u.writable,d.u.hasCodeActionsProvider),kbOpts:{kbExpr:d.u.editorTextFocus,primary:3120,mac:{primary:1328},weight:100},contextMenuOpts:{group:"1_modification",order:2,when:ne.Ao.and(d.u.writable,be(b.yN.Refactor))},description:{description:"Refactor...",args:[{name:"args",schema:Ce}]}})}run(e,t,n){const i=b.wZ.fromUser(n,{kind:b.yN.Refactor,apply:"never"});return ye(t,"string"==typeof(null==n?void 0:n.kind)?i.preferred?j.N("editor.action.refactor.noneMessage.preferred.kind","No preferred refactorings for '{0}' available",n.kind):j.N("editor.action.refactor.noneMessage.kind","No refactorings for '{0}' available",n.kind):i.preferred?j.N("editor.action.refactor.noneMessage.preferred","No preferred refactorings available"):j.N("editor.action.refactor.noneMessage","No refactorings available"),{include:b.yN.Refactor.contains(i.kind)?i.kind:b.yN.None,onlyIncludePreferredActions:i.preferred},i.apply)}}class ke extends a.R6{constructor(){super({id:c.MN,label:j.N("source.label","Source Action..."),alias:"Source Action...",precondition:ne.Ao.and(d.u.writable,d.u.hasCodeActionsProvider),contextMenuOpts:{group:"1_modification",order:2.1,when:ne.Ao.and(d.u.writable,be(b.yN.Source))},description:{description:"Source Action...",args:[{name:"args",schema:Ce}]}})}run(e,t,n){const i=b.wZ.fromUser(n,{kind:b.yN.Source,apply:"never"});return ye(t,"string"==typeof(null==n?void 0:n.kind)?i.preferred?j.N("editor.action.source.noneMessage.preferred.kind","No preferred source actions for '{0}' available",n.kind):j.N("editor.action.source.noneMessage.kind","No source actions for '{0}' available",n.kind):i.preferred?j.N("editor.action.source.noneMessage.preferred","No preferred source actions available"):j.N("editor.action.source.noneMessage","No source actions available"),{include:b.yN.Source.contains(i.kind)?i.kind:b.yN.None,includeSourceActions:!0,onlyIncludePreferredActions:i.preferred},i.apply)}}class Le extends a.R6{constructor(){super({id:c.uH,label:j.N("organizeImports.label","Organize Imports"),alias:"Organize Imports",precondition:ne.Ao.and(d.u.writable,be(b.yN.SourceOrganizeImports)),kbOpts:{kbExpr:d.u.editorTextFocus,primary:1581,weight:100}})}run(e,t){return ye(t,j.N("editor.action.organize.noneMessage","No organize imports action available"),{include:b.yN.SourceOrganizeImports,includeSourceActions:!0},"ifSingle")}}class Ee extends a.R6{constructor(){super({id:c.TM,label:j.N("fixAll.label","Fix All"),alias:"Fix All",precondition:ne.Ao.and(d.u.writable,be(b.yN.SourceFixAll))})}run(e,t){return ye(t,j.N("fixAll.noneMessage","No fix all action available"),{include:b.yN.SourceFixAll,includeSourceActions:!0},"ifSingle")}}class Ne extends a.R6{constructor(){super({id:Ne.Id,label:j.N("autoFix.label","Auto Fix..."),alias:"Auto Fix...",precondition:ne.Ao.and(d.u.writable,be(b.yN.QuickFix)),kbOpts:{kbExpr:d.u.editorTextFocus,primary:1620,mac:{primary:2644},weight:100}})}run(e,t){return ye(t,j.N("editor.action.autoFix.noneMessage","No auto fixes available"),{include:b.yN.QuickFix,onlyIncludePreferredActions:!0},"ifSingle")}}Ne.Id="editor.action.autoFix"},9093:(e,t,n)=>{"use strict";n.r(t);var i=n(6830),o=n(787);(0,i._K)(o.pY.ID,o.pY),(0,i.Qr)(o.E7),(0,i.Qr)(o.Eb),(0,i.Qr)(o.VQ),(0,i.Qr)(o.o$),(0,i.Qr)(o.S5),(0,i.Qr)(o.Hv),(0,i.fK)(new o.dW)},9532:(e,t,n)=>{"use strict";n.d(t,{yN:()=>i,EU:()=>o,Yl:()=>r,wZ:()=>a});class i{constructor(e){this.value=e}equals(e){return this.value===e.value}contains(e){return this.equals(e)||""===this.value||e.value.startsWith(this.value+i.sep)}intersects(e){return this.contains(e)||e.contains(this)}append(e){return new i(this.value+i.sep+e)}}function o(e,t){return!(e.include&&!e.include.intersects(t)||e.excludes&&e.excludes.some((n=>s(t,n,e.include)))||!e.includeSourceActions&&i.Source.contains(t))}function r(e,t){const n=t.kind?new i(t.kind):void 0;return!(!(!e.include||n&&e.include.contains(n))||e.excludes&&n&&e.excludes.some((t=>s(n,t,e.include)))||!e.includeSourceActions&&n&&i.Source.contains(n)||e.onlyIncludePreferredActions&&!t.isPreferred)}function s(e,t,n){return!(!t.contains(e)||n&&t.contains(n))}i.sep=".",i.None=new i("@@none@@"),i.Empty=new i(""),i.QuickFix=new i("quickfix"),i.Refactor=new i("refactor"),i.Source=new i("source"),i.SourceOrganizeImports=i.Source.append("organizeImports"),i.SourceFixAll=i.Source.append("fixAll");class a{constructor(e,t,n){this.kind=e,this.apply=t,this.preferred=n}static fromUser(e,t){return e&&"object"==typeof e?new a(a.getKindFromUser(e,t.kind),a.getApplyFromUser(e,t.apply),a.getPreferredUser(e)):new a(t.kind,t.apply,!1)}static getApplyFromUser(e,t){switch("string"==typeof e.apply?e.apply.toLowerCase():""){case"first":return"first";case"never":return"never";case"ifsingle":return"ifSingle";default:return t}}static getKindFromUser(e,t){return"string"==typeof e.kind?new i(e.kind):t}static getPreferredUser(e){return"boolean"==typeof e.preferred&&e.preferred}}},8191:(e,t,n)=>{"use strict";n.r(t),n.d(t,{CodeLensContribution:()=>re});var i=n(5393),o=n(7301),r=n(5976),s=n(9925),a=n(6830),l=n(4101),d=n(1050),c=n(666),h=n(1200),u=n(4565),g=n(8401),p=function(e,t,n,i){return new(n||(n=Promise))((function(o,r){function s(e){try{l(i.next(e))}catch(e){r(e)}}function a(e){try{l(i.throw(e))}catch(e){r(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,a)}l((i=i.apply(e,t||[])).next())}))};class m{constructor(){this.lenses=[],this._disposables=new r.SL}dispose(){this._disposables.dispose()}add(e,t){this._disposables.add(e);for(const n of e.lenses)this.lenses.push({symbol:n,provider:t})}}function f(e,t){return p(this,void 0,void 0,(function*(){const n=l.He.ordered(e),i=new Map,r=new m,s=n.map(((n,s)=>p(this,void 0,void 0,(function*(){i.set(n,s);try{const i=yield Promise.resolve(n.provideCodeLenses(e,t));i&&r.add(i,n)}catch(e){(0,o.Cp)(e)}}))));return yield Promise.all(s),r.lenses=r.lenses.sort(((e,t)=>e.symbol.range.startLineNumbert.symbol.range.startLineNumber?1:i.get(e.provider)i.get(t.provider)?1:e.symbol.range.startColumnt.symbol.range.startColumn?1:0)),r}))}u.P.registerCommand("_executeCodeLensProvider",(function(e,...t){let[n,i]=t;(0,g.p_)(c.o.isUri(n)),(0,g.p_)("number"==typeof i||!i);const s=e.get(h.q).getModel(n);if(!s)throw(0,o.b1)();const a=[],l=new r.SL;return f(s,d.T.None).then((e=>{l.add(e);let t=[];for(const n of e.lenses)null==i||Boolean(n.symbol.command)?a.push(n.symbol):i-- >0&&n.provider.resolveCodeLens&&t.push(Promise.resolve(n.provider.resolveCodeLens(s,n.symbol,d.T.None)).then((e=>a.push(e||n.symbol))));return Promise.all(t)})).then((()=>a)).finally((()=>{setTimeout((()=>l.dispose()),100)}))}));var _=n(3379),b=n.n(_),C=n(7795),v=n.n(C),w=n(569),y=n.n(w),A=n(3565),S=n.n(A),x=n(9216),k=n.n(x),L=n(4589),E=n.n(L),N=n(5674),D={};D.styleTagTransform=E(),D.setAttributes=S(),D.insert=y().bind(null,"head"),D.domAPI=v(),D.insertStyleElement=k(),b()(N.Z,D),N.Z&&N.Z.locals&&N.Z.locals;var I=n(5321),M=n(4314),T=n(3103),R=n(7869),O=n(3910),B=n(7781),P=n(6811);class F{constructor(e,t,n){this.afterLineNumber=e,this.heightInPx=t,this._onHeight=n,this.suppressMouseDown=!0,this.domNode=document.createElement("div")}onComputedHeight(e){void 0===this._lastHeight?this._lastHeight=e:this._lastHeight!==e&&(this._lastHeight=e,this._onHeight())}}class W{constructor(e,t,n){this.allowEditorOverflow=!1,this.suppressMouseDown=!0,this._commands=new Map,this._isEmpty=!0,this._editor=e,this._id="codelens.widget-"+W._idPool++,this.updatePosition(n),this._domNode=document.createElement("span"),this._domNode.className=`codelens-decoration ${t}`}withCommands(e,t){this._commands.clear();let n=[],i=!1;for(let t=0;t{e.symbol.command&&l.push(e.symbol),i.addDecoration({range:e.symbol.range,options:T.qx.EMPTY},(e=>this._decorationIds[t]=e)),a=a?M.e.plusRange(a,e.symbol.range):M.e.lift(e.symbol.range)})),this._viewZone=new F(a.startLineNumber-1,r,s),this._viewZoneId=o.addZone(this._viewZone),l.length>0&&(this._createContentWidgetIfNecessary(),this._contentWidget.withCommands(l,!1))}_createContentWidgetIfNecessary(){this._contentWidget?this._editor.layoutContentWidget(this._contentWidget):(this._contentWidget=new W(this._editor,this._className,this._viewZone.afterLineNumber+1),this._editor.addContentWidget(this._contentWidget))}dispose(e,t){this._decorationIds.forEach(e.removeDecoration,e),this._decorationIds=[],t&&t.removeZone(this._viewZoneId),this._contentWidget&&(this._editor.removeContentWidget(this._contentWidget),this._contentWidget=void 0),this._isDisposed=!0}isDisposed(){return this._isDisposed}isValid(){return this._decorationIds.some(((e,t)=>{const n=this._editor.getModel().getDecorationRange(e),i=this._data[t].symbol;return!(!n||M.e.isEmpty(i.range)!==n.isEmpty())}))}updateCodeLensSymbols(e,t){this._decorationIds.forEach(t.removeDecoration,t),this._decorationIds=[],this._data=e,this._data.forEach(((e,n)=>{t.addDecoration({range:e.symbol.range,options:T.qx.EMPTY},(e=>this._decorationIds[n]=e))}))}updateHeight(e,t){this._viewZone.heightInPx=e,t.layoutZone(this._viewZoneId),this._contentWidget&&this._editor.layoutContentWidget(this._contentWidget)}computeIfNecessary(e){if(!this._viewZone.domNode.hasAttribute("monaco-visible-view-zone"))return null;for(let t=0;t{const n=e.getColor(R.Yp);n&&(t.addRule(`.monaco-editor .codelens-decoration { color: ${n}; }`),t.addRule(`.monaco-editor .codelens-decoration .codicon { color: ${n}; }`));const i=e.getColor(O._Y);i&&(t.addRule(`.monaco-editor .codelens-decoration > a:hover { color: ${i} !important; }`),t.addRule(`.monaco-editor .codelens-decoration > a:hover .codicon { color: ${i} !important; }`))}));var H=n(9422),j=n(2065),$=n(5026),U=n(3702),Z=n(6904),K=n(8289);const q=(0,j.yh)("ICodeLensCache");class Y{constructor(e,t){this.lineCount=e,this.data=t}}let G=class{constructor(e){this._fakeProvider=new class{provideCodeLenses(){throw new Error("not supported")}},this._cache=new U.z6(20,.75),(0,i.To)((()=>e.remove("codelens/cache",1)));const t="codelens/cache2",n=e.get(t,1,"{}");this._deserialize(n),(0,K.I)(e.onWillSaveState)((n=>{n.reason===Z.fk.SHUTDOWN&&e.store(t,this._serialize(),1,1)}))}put(e,t){const n=t.lenses.map((e=>{var t;return{range:e.symbol.range,command:e.symbol.command&&{id:"",title:null===(t=e.symbol.command)||void 0===t?void 0:t.title}}})),i=new m;i.add({lenses:n,dispose:()=>{}},this._fakeProvider);const o=new Y(e.getLineCount(),i);this._cache.set(e.uri.toString(),o)}get(e){const t=this._cache.get(e.uri.toString());return t&&t.lineCount===e.getLineCount()?t.data:void 0}delete(e){this._cache.delete(e.uri.toString())}_serialize(){const e=Object.create(null);for(const[t,n]of this._cache){const i=new Set;for(const e of n.data.lenses)i.add(e.symbol.range.startLineNumber);e[t]={lineCount:n.lineCount,lines:[...i.values()]}}return JSON.stringify(e)}_deserialize(e){try{const t=JSON.parse(e);for(const e in t){const n=t[e],i=[];for(const e of n.lines)i.push({range:new M.e(e,1,e,11)});const o=new m;o.add({lenses:i,dispose(){}},this._fakeProvider),this._cache.set(e,new Y(n.lineCount,o))}}catch(e){}}};var Q,X;G=function(e,t,n,i){var o,r=arguments.length,s=r<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,i);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,n,s):o(t,n))||s);return r>3&&s&&Object.defineProperty(t,n,s),s}([(Q=0,X=Z.Uy,function(e,t){X(e,t,Q)})],G),(0,$.z)(q,G);var J=n(9954),ee=n(1157),te=n(3580),ne=n(9102),ie=n(1036),oe=function(e,t){return function(n,i){t(n,i,e)}};let re=class{constructor(e,t,n,o){this._editor=e,this._commandService=t,this._notificationService=n,this._codeLensCache=o,this._disposables=new r.SL,this._localToDispose=new r.SL,this._lenses=[],this._getCodeLensModelDelays=new ie.Y(l.He,250,2500),this._oldCodeLensModels=new r.SL,this._resolveCodeLensesDelays=new ie.Y(l.He,250,2500),this._resolveCodeLensesScheduler=new i.pY((()=>this._resolveCodeLensesInViewport()),this._resolveCodeLensesDelays.min),this._disposables.add(this._editor.onDidChangeModel((()=>this._onModelChange()))),this._disposables.add(this._editor.onDidChangeModelLanguage((()=>this._onModelChange()))),this._disposables.add(this._editor.onDidChangeConfiguration((e=>{(e.hasChanged(41)||e.hasChanged(14)||e.hasChanged(13))&&this._updateLensStyle(),e.hasChanged(12)&&this._onModelChange()}))),this._disposables.add(l.He.onDidChange(this._onModelChange,this)),this._onModelChange(),this._styleClassName="_"+(0,J.vp)(this._editor.getId()).toString(16),this._styleElement=I.dS(I.OO(this._editor.getContainerDomNode())?this._editor.getContainerDomNode():void 0),this._updateLensStyle()}dispose(){var e;this._localDispose(),this._disposables.dispose(),this._oldCodeLensModels.dispose(),null===(e=this._currentCodeLensModel)||void 0===e||e.dispose(),this._styleElement.remove()}_getLayoutInfo(){let e,t=this._editor.getOption(14);return!t||t<5?(t=.9*this._editor.getOption(43)|0,e=this._editor.getOption(57)):e=t*Math.max(1.3,this._editor.getOption(57)/this._editor.getOption(43))|0,{codeLensHeight:e,fontSize:t}}_updateLensStyle(){const{codeLensHeight:e,fontSize:t}=this._getLayoutInfo(),n=this._editor.getOption(13),i=this._editor.getOption(41),o=`--codelens-font-family${this._styleClassName}`,r=`--codelens-font-features${this._styleClassName}`;let s=`\n\t\t.monaco-editor .codelens-decoration.${this._styleClassName} { line-height: ${e}px; font-size: ${t}px; padding-right: ${Math.round(.5*t)}px; font-feature-settings: var(${r}) }\n\t\t.monaco-editor .codelens-decoration.${this._styleClassName} span.codicon { line-height: ${e}px; font-size: ${t}px; }\n\t\t`;n&&(s+=`.monaco-editor .codelens-decoration.${this._styleClassName} { font-family: var(${o})}`),this._styleElement.textContent=s,this._editor.getContainerDomNode().style.setProperty(o,null!=n?n:"inherit"),this._editor.getContainerDomNode().style.setProperty(r,i.fontFeatureSettings),this._editor.changeViewZones((t=>{for(let n of this._lenses)n.updateHeight(e,t)}))}_localDispose(){var e,t,n;null===(e=this._getCodeLensModelPromise)||void 0===e||e.cancel(),this._getCodeLensModelPromise=void 0,null===(t=this._resolveCodeLensesPromise)||void 0===t||t.cancel(),this._resolveCodeLensesPromise=void 0,this._localToDispose.clear(),this._oldCodeLensModels.clear(),null===(n=this._currentCodeLensModel)||void 0===n||n.dispose()}_onModelChange(){this._localDispose();const e=this._editor.getModel();if(!e)return;if(!this._editor.getOption(12))return;const t=this._codeLensCache.get(e);if(t&&this._renderCodeLensSymbols(t),!l.He.has(e))return void(t&&this._localToDispose.add((0,i.Vg)((()=>{const n=this._codeLensCache.get(e);t===n&&(this._codeLensCache.delete(e),this._onModelChange())}),3e4)));for(const t of l.He.all(e))if("function"==typeof t.onDidChange){let e=t.onDidChange((()=>n.schedule()));this._localToDispose.add(e)}const n=new i.pY((()=>{var t;const r=Date.now();null===(t=this._getCodeLensModelPromise)||void 0===t||t.cancel(),this._getCodeLensModelPromise=(0,i.PG)((t=>f(e,t))),this._getCodeLensModelPromise.then((t=>{this._currentCodeLensModel&&this._oldCodeLensModels.add(this._currentCodeLensModel),this._currentCodeLensModel=t,this._codeLensCache.put(e,t);const i=this._getCodeLensModelDelays.update(e,Date.now()-r);n.delay=i,this._renderCodeLensSymbols(t),this._resolveCodeLensesInViewport()}),o.dL)}),this._getCodeLensModelDelays.get(e));this._localToDispose.add(n),this._localToDispose.add((0,r.OF)((()=>this._resolveCodeLensesScheduler.cancel()))),this._localToDispose.add(this._editor.onDidChangeModelContent((()=>{this._editor.changeDecorations((e=>{this._editor.changeViewZones((t=>{let n=[],i=-1;this._lenses.forEach((e=>{e.isValid()&&i!==e.getLineNumber()?(e.update(t),i=e.getLineNumber()):n.push(e)}));let o=new z;n.forEach((e=>{e.dispose(o,t),this._lenses.splice(this._lenses.indexOf(e),1)})),o.commit(e)}))})),n.schedule()}))),this._localToDispose.add(this._editor.onDidFocusEditorWidget((()=>{n.schedule()}))),this._localToDispose.add(this._editor.onDidScrollChange((e=>{e.scrollTopChanged&&this._lenses.length>0&&this._resolveCodeLensesInViewportSoon()}))),this._localToDispose.add(this._editor.onDidLayoutChange((()=>{this._resolveCodeLensesInViewportSoon()}))),this._localToDispose.add((0,r.OF)((()=>{if(this._editor.getModel()){const e=s.ZF.capture(this._editor);this._editor.changeDecorations((e=>{this._editor.changeViewZones((t=>{this._disposeAllLenses(e,t)}))})),e.restore(this._editor)}else this._disposeAllLenses(void 0,void 0)}))),this._localToDispose.add(this._editor.onMouseDown((e=>{if(9!==e.target.type)return;let t=e.target.element;if("SPAN"===(null==t?void 0:t.tagName)&&(t=t.parentElement),"A"===(null==t?void 0:t.tagName))for(const e of this._lenses){let n=e.getCommand(t);if(n){this._commandService.executeCommand(n.id,...n.arguments||[]).catch((e=>this._notificationService.error(e)));break}}}))),n.schedule()}_disposeAllLenses(e,t){const n=new z;for(const e of this._lenses)e.dispose(n,t);e&&n.commit(e),this._lenses.length=0}_renderCodeLensSymbols(e){if(!this._editor.hasModel())return;let t,n=this._editor.getModel().getLineCount(),i=[];for(let o of e.lenses){let e=o.symbol.range.startLineNumber;e<1||e>n||(t&&t[t.length-1].symbol.range.startLineNumber===e?t.push(o):(t=[o],i.push(t)))}const o=s.ZF.capture(this._editor),r=this._getLayoutInfo();this._editor.changeDecorations((e=>{this._editor.changeViewZones((t=>{const n=new z;let o=0,s=0;for(;sthis._resolveCodeLensesInViewportSoon()))),o++,s++)}for(;othis._resolveCodeLensesInViewportSoon()))),s++;n.commit(e)}))})),o.restore(this._editor)}_resolveCodeLensesInViewportSoon(){this._editor.getModel()&&this._resolveCodeLensesScheduler.schedule()}_resolveCodeLensesInViewport(){var e;null===(e=this._resolveCodeLensesPromise)||void 0===e||e.cancel(),this._resolveCodeLensesPromise=void 0;const t=this._editor.getModel();if(!t)return;const n=[],r=[];if(this._lenses.forEach((e=>{const i=e.computeIfNecessary(t);i&&(n.push(i),r.push(e))})),0===n.length)return;const s=Date.now(),a=(0,i.PG)((e=>{const i=n.map(((n,i)=>{const s=new Array(n.length),a=n.map(((n,i)=>n.symbol.command||"function"!=typeof n.provider.resolveCodeLens?(s[i]=n.symbol,Promise.resolve(void 0)):Promise.resolve(n.provider.resolveCodeLens(t,n.symbol,e)).then((e=>{s[i]=e}),o.Cp)));return Promise.all(a).then((()=>{e.isCancellationRequested||r[i].isDisposed()||r[i].updateCommands(s)}))}));return Promise.all(i)}));this._resolveCodeLensesPromise=a,this._resolveCodeLensesPromise.then((()=>{const e=this._resolveCodeLensesDelays.update(t,Date.now()-s);this._resolveCodeLensesScheduler.delay=e,this._currentCodeLensModel&&this._codeLensCache.put(t,this._currentCodeLensModel),this._oldCodeLensModels.clear(),a===this._resolveCodeLensesPromise&&(this._resolveCodeLensesPromise=void 0)}),(e=>{(0,o.dL)(e),a===this._resolveCodeLensesPromise&&(this._resolveCodeLensesPromise=void 0)}))}getLenses(){return this._lenses}};re.ID="css.editor.codeLens",re=function(e,t,n,i){var o,r=arguments.length,s=r<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,i);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,n,s):o(t,n))||s);return r>3&&s&&Object.defineProperty(t,n,s),s}([oe(1,u.H),oe(2,H.lT),oe(3,q)],re),(0,a._K)(re.ID,re),(0,a.Qr)(class extends a.R6{constructor(){super({id:"codelens.showLensesInCurrentLine",precondition:ne.u.hasCodeLensProvider,label:(0,te.N)("showLensOnLine","Show CodeLens Commands For Current Line"),alias:"Show CodeLens Commands For Current Line"})}run(e,t){return n=this,i=void 0,r=function*(){if(!t.hasModel())return;const n=e.get(ee.eJ),i=e.get(u.H),o=e.get(H.lT),r=t.getSelection().positionLineNumber,s=t.getContribution(re.ID),a=[];for(let e of s.getLenses())if(e.getLineNumber()===r)for(let t of e.getItems()){const{command:e}=t.symbol;e&&a.push({label:e.title,command:e})}if(0===a.length)return;const l=yield n.pick(a,{canPickMany:!1});if(l)try{yield i.executeCommand(l.command.id,...l.command.arguments||[])}catch(e){o.error(e)}},new((o=void 0)||(o=Promise))((function(e,t){function s(e){try{l(r.next(e))}catch(e){t(e)}}function a(e){try{l(r.throw(e))}catch(e){t(e)}}function l(t){var n;t.done?e(t.value):(n=t.value,n instanceof o?n:new o((function(e){e(n)}))).then(s,a)}l((r=r.apply(n,i||[])).next())}));var n,i,o,r}})},3308:(e,t,n)=>{"use strict";n.d(t,{E:()=>c,R:()=>h});var i=n(1050),o=n(7301),r=n(666),s=n(4314),a=n(4101),l=n(1200),d=n(4565);function c(e,t){const n=[],i=a.OH.ordered(e).reverse().map((i=>Promise.resolve(i.provideDocumentColors(e,t)).then((e=>{if(Array.isArray(e))for(let t of e)n.push({colorInfo:t,provider:i})}))));return Promise.all(i).then((()=>n))}function h(e,t,n,i){return Promise.resolve(n.provideColorPresentations(e,t,i))}d.P.registerCommand("_executeDocumentColorProvider",(function(e,...t){const[n]=t;if(!(n instanceof r.o))throw(0,o.b1)();const s=e.get(l.q).getModel(n);if(!s)throw(0,o.b1)();const d=[],c=a.OH.ordered(s).reverse().map((e=>Promise.resolve(e.provideDocumentColors(s,i.T.None)).then((e=>{if(Array.isArray(e))for(let t of e)d.push({range:t.range,color:[t.color.red,t.color.green,t.color.blue,t.color.alpha]})}))));return Promise.all(c).then((()=>d))})),d.P.registerCommand("_executeColorPresentationProvider",(function(e,...t){const[n,d]=t,{uri:c,range:h}=d;if(!(c instanceof r.o&&Array.isArray(n)&&4===n.length&&s.e.isIRange(h)))throw(0,o.b1)();const[u,g,p,m]=n,f=e.get(l.q).getModel(c);if(!f)throw(0,o.b1)();const _={range:h,color:{red:u,green:g,blue:p,alpha:m}},b=[],C=a.OH.ordered(f).reverse().map((e=>Promise.resolve(e.provideColorPresentations(f,_,i.T.None)).then((e=>{Array.isArray(e)&&b.push(...e)}))));return Promise.all(C).then((()=>b))}))},7956:(e,t,n)=>{"use strict";n.r(t),n.d(t,{ColorContribution:()=>a}),n(4494);var i=n(5976),o=n(6830),r=n(3285),s=n(4314);class a extends i.JT{constructor(e){super(),this._editor=e,this._register(e.onMouseDown((e=>this.onMouseDown(e))))}dispose(){super.dispose()}onMouseDown(e){var t;if(6!==e.target.type)return;if(![...(null===(t=e.target.element)||void 0===t?void 0:t.classList.values())||[]].find((e=>e.startsWith("ced-colorBox"))))return;if(!e.target.range)return;const n=this._editor.getContribution(r.ModesHoverController.ID);if(!n.isColorPickerVisible()){const t=new s.e(e.target.range.startLineNumber,e.target.range.startColumn+1,e.target.range.endLineNumber,e.target.range.endColumn+1);n.showContentHover(t,0,!1)}}}a.ID="editor.contrib.colorContribution",(0,o._K)(a.ID,a)},4494:(e,t,n)=>{"use strict";n.d(t,{i:()=>f});var i=n(5393),o=n(1264),r=n(7301),s=n(9954),a=n(5976),l=n(6830),d=n(1640),c=n(4314),h=n(3103),u=n(4101),g=n(3308),p=n(3108),m=function(e,t){return function(n,i){t(n,i,e)}};let f=class e extends a.JT{constructor(e,t,n){super(),this._editor=e,this._codeEditorService=t,this._configurationService=n,this._localToDispose=this._register(new a.SL),this._decorationsIds=[],this._colorDatas=new Map,this._colorDecoratorIds=[],this._decorationsTypes=new Set,this._register(e.onDidChangeModel((()=>{this._isEnabled=this.isEnabled(),this.onModelChanged()}))),this._register(e.onDidChangeModelLanguage((()=>this.onModelChanged()))),this._register(u.OH.onDidChange((()=>this.onModelChanged()))),this._register(e.onDidChangeConfiguration((()=>{let e=this._isEnabled;this._isEnabled=this.isEnabled(),e!==this._isEnabled&&(this._isEnabled?this.onModelChanged():this.removeAllDecorations())}))),this._timeoutTimer=null,this._computePromise=null,this._isEnabled=this.isEnabled(),this.onModelChanged()}isEnabled(){const e=this._editor.getModel();if(!e)return!1;const t=e.getLanguageIdentifier(),n=this._configurationService.getValue(t.language);if(n&&"object"==typeof n){const e=n.colorDecorators;if(e&&void 0!==e.enable&&!e.enable)return e.enable}return this._editor.getOption(15)}static get(e){return e.getContribution(this.ID)}dispose(){this.stop(),this.removeAllDecorations(),super.dispose()}onModelChanged(){if(this.stop(),!this._isEnabled)return;const t=this._editor.getModel();t&&u.OH.has(t)&&(this._localToDispose.add(this._editor.onDidChangeModelContent((()=>{this._timeoutTimer||(this._timeoutTimer=new i._F,this._timeoutTimer.cancelAndSet((()=>{this._timeoutTimer=null,this.beginCompute()}),e.RECOMPUTE_TIME))}))),this.beginCompute())}beginCompute(){this._computePromise=(0,i.PG)((e=>{const t=this._editor.getModel();return t?(0,g.E)(t,e):Promise.resolve([])})),this._computePromise.then((e=>{this.updateDecorations(e),this.updateColorDecorators(e),this._computePromise=null}),r.dL)}stop(){this._timeoutTimer&&(this._timeoutTimer.cancel(),this._timeoutTimer=null),this._computePromise&&(this._computePromise.cancel(),this._computePromise=null),this._localToDispose.clear()}updateDecorations(e){const t=e.map((e=>({range:{startLineNumber:e.colorInfo.range.startLineNumber,startColumn:e.colorInfo.range.startColumn,endLineNumber:e.colorInfo.range.endLineNumber,endColumn:e.colorInfo.range.endColumn},options:h.qx.EMPTY})));this._decorationsIds=this._editor.deltaDecorations(this._decorationsIds,t),this._colorDatas=new Map,this._decorationsIds.forEach(((t,n)=>this._colorDatas.set(t,e[n])))}updateColorDecorators(e){let t=[],n={};for(let i=0;i{n[e]||this._codeEditorService.removeDecorationType(e)})),this._colorDecoratorIds=this._editor.deltaDecorations(this._colorDecoratorIds,t)}removeAllDecorations(){this._decorationsIds=this._editor.deltaDecorations(this._decorationsIds,[]),this._colorDecoratorIds=this._editor.deltaDecorations(this._colorDecoratorIds,[]),this._decorationsTypes.forEach((e=>{this._codeEditorService.removeDecorationType(e)}))}getColorData(e){const t=this._editor.getModel();if(!t)return null;const n=t.getDecorationsInRange(c.e.fromPositions(e,e)).filter((e=>this._colorDatas.has(e.id)));return 0===n.length?null:this._colorDatas.get(n[0].id)}};f.ID="editor.contrib.colorDetector",f.RECOMPUTE_TIME=1e3,f=function(e,t,n,i){var o,r=arguments.length,s=r<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,i);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,n,s):o(t,n))||s);return r>3&&s&&Object.defineProperty(t,n,s),s}([m(1,d.$),m(2,p.Ui)],f),(0,l._K)(f.ID,f)},9098:(e,t,n)=>{"use strict";n.r(t);var i=n(3580),o=n(2258),r=n(6830),s=n(4314),a=n(9102),l=n(9386),d=n(187),c=n(3860),h=n(3831);class u{constructor(e,t){this._selection=e,this._insertSpace=t,this._usedEndToken=null}static _haystackHasNeedleAtOffset(e,t,n){if(n<0)return!1;const i=t.length;if(n+i>e.length)return!1;for(let o=0;o=65&&i<=90&&i+32===r||r>=65&&r<=90&&r+32===i))return!1}return!0}_createOperationsForBlockComment(e,t,n,i,o,r){const a=e.startLineNumber,l=e.startColumn,d=e.endLineNumber,c=e.endColumn,h=o.getLineContent(a),g=o.getLineContent(d);let p,m=h.lastIndexOf(t,l-1+t.length),f=g.indexOf(n,c-1-n.length);if(-1!==m&&-1!==f)if(a===d)h.substring(m+t.length,f).indexOf(n)>=0&&(m=-1,f=-1);else{const e=h.substring(m+t.length),i=g.substring(0,f);(e.indexOf(n)>=0||i.indexOf(n)>=0)&&(m=-1,f=-1)}-1!==m&&-1!==f?(i&&m+t.length0&&32===g.charCodeAt(f-1)&&(n=" "+n,f-=1),p=u._createRemoveBlockCommentOperations(new s.e(a,m+t.length+1,d,f+1),t,n)):(p=u._createAddBlockCommentOperations(e,t,n,this._insertSpace),this._usedEndToken=1===p.length?n:null);for(const e of p)r.addTrackedEditOperation(e.range,e.text)}static _createRemoveBlockCommentOperations(e,t,n){let i=[];return s.e.isEmpty(e)?i.push(l.h.delete(new s.e(e.startLineNumber,e.startColumn-t.length,e.endLineNumber,e.endColumn+n.length))):(i.push(l.h.delete(new s.e(e.startLineNumber,e.startColumn-t.length,e.startLineNumber,e.startColumn))),i.push(l.h.delete(new s.e(e.endLineNumber,e.endColumn,e.endLineNumber,e.endColumn+n.length)))),i}static _createAddBlockCommentOperations(e,t,n,i){let o=[];return s.e.isEmpty(e)?o.push(l.h.replace(new s.e(e.startLineNumber,e.startColumn,e.endLineNumber,e.endColumn),t+" "+n)):(o.push(l.h.insert(new d.L(e.startLineNumber,e.startColumn),t+(i?" ":""))),o.push(l.h.insert(new d.L(e.endLineNumber,e.endColumn),(i?" ":"")+n))),o}getEditOperations(e,t){const n=this._selection.startLineNumber,i=this._selection.startColumn;e.tokenizeIfCheap(n);const o=e.getLanguageIdAtPosition(n,i),r=h.zu.getComments(o);r&&r.blockCommentStartToken&&r.blockCommentEndToken&&this._createOperationsForBlockComment(this._selection,r.blockCommentStartToken,r.blockCommentEndToken,this._insertSpace,e,t)}computeCursorState(e,t){const n=t.getInverseEditOperations();if(2===n.length){const e=n[0],t=n[1];return new c.Y(e.range.endLineNumber,e.range.endColumn,t.range.startLineNumber,t.range.startColumn)}{const e=n[0].range,t=this._usedEndToken?-this._usedEndToken.length-1:0;return new c.Y(e.endLineNumber,e.endColumn+t,e.endLineNumber,e.endColumn+t)}}}var g=n(7295);class p{constructor(e,t,n,i,o,r){this._selection=e,this._tabSize=t,this._type=n,this._insertSpace=i,this._selectionId=null,this._deltaColumn=0,this._moveEndPositionDown=!1,this._ignoreEmptyLines=o,this._ignoreFirstLine=r||!1}static _gatherPreflightCommentStrings(e,t,n){e.tokenizeIfCheap(t);const i=e.getLanguageIdAtPosition(t,1),o=h.zu.getComments(i),r=o?o.lineCommentToken:null;if(!r)return null;let s=[];for(let e=0,i=n-t+1;es?o-1:o}}}var m=n(4144);class f extends r.R6{constructor(e,t){super(t),this._type=e}run(e,t){if(!t.hasModel())return;const n=[],i=t.getModel().getOptions(),o=t.getOption(17),r=t.getSelections().map(((e,t)=>({selection:e,index:t,ignoreFirstLine:!1})));r.sort(((e,t)=>s.e.compareRangesUsingStarts(e.selection,t.selection)));let a=r[0];for(let e=1;e{"use strict";n.r(t),n.d(t,{ContextMenuController:()=>f});var i=n(3580),o=n(5321),r=n(4741),s=n(5976),a=n(6830),l=n(9102),d=n(4144),c=n(8819),h=n(5606),u=n(1847),g=n(6033),p=n(1432),m=function(e,t){return function(n,i){t(n,i,e)}};let f=class e{constructor(e,t,n,i,r,a){this._contextMenuService=t,this._contextViewService=n,this._contextKeyService=i,this._keybindingService=r,this._menuService=a,this._toDispose=new s.SL,this._contextMenuIsBeingShownCount=0,this._editor=e,this._toDispose.add(this._editor.onContextMenu((e=>this._onContextMenu(e)))),this._toDispose.add(this._editor.onMouseWheel((e=>{if(this._contextMenuIsBeingShownCount>0){const t=this._contextViewService.getContextViewElement(),n=e.srcElement;n.shadowRoot&&o.Ay(t)===n.shadowRoot||this._contextViewService.hideContextView()}}))),this._toDispose.add(this._editor.onKeyDown((e=>{58===e.keyCode&&(e.preventDefault(),e.stopPropagation(),this.showContextMenu())})))}static get(t){return t.getContribution(e.ID)}_onContextMenu(e){if(!this._editor.hasModel())return;if(!this._editor.getOption(18))return this._editor.focus(),void(e.target.position&&!this._editor.getSelection().containsPosition(e.target.position)&&this._editor.setPosition(e.target.position));if(12===e.target.type)return;if(e.event.preventDefault(),6!==e.target.type&&7!==e.target.type&&1!==e.target.type)return;if(this._editor.focus(),e.target.position){let t=!1;for(const n of this._editor.getSelections())if(n.containsPosition(e.target.position)){t=!0;break}t||this._editor.setPosition(e.target.position)}let t=null;1!==e.target.type&&(t={x:e.event.posx-1,width:2,y:e.event.posy-1,height:2}),this.showContextMenu(t)}showContextMenu(e){if(!this._editor.getOption(18))return;if(!this._editor.hasModel())return;if(!this._contextMenuService)return void this._editor.focus();const t=this._getMenuActions(this._editor.getModel(),this._editor.isSimpleWidget?d.eH.SimpleEditorContext:d.eH.EditorContext);t.length>0&&this._doShowContextMenu(t,e)}_getMenuActions(e,t){const n=[],i=this._menuService.createMenu(t,this._contextKeyService),o=i.getActions({arg:e.uri});i.dispose();for(let t of o){const[,i]=t;let o=0;for(const t of i)if(t instanceof d.NZ){const i=this._getMenuActions(e,t.item.submenu);i.length>0&&(n.push(new r.wY(t.id,t.label,i)),o++)}else n.push(t),o++;o&&n.push(new r.Z0)}return n.length&&n.pop(),n}_doShowContextMenu(e,t=null){if(!this._editor.hasModel())return;const n=this._editor.getOption(51);if(this._editor.updateOptions({hover:{enabled:!1}}),!t){this._editor.revealPosition(this._editor.getPosition(),1),this._editor.render();const e=this._editor.getScrolledVisiblePosition(this._editor.getPosition()),n=o.i(this._editor.getDomNode()),i=n.left+e.left,r=n.top+e.top+e.height;t={x:i,y:r}}const i=this._editor.getOption(113)&&!p.gn;this._contextMenuIsBeingShownCount++,this._contextMenuService.showContextMenu({domForShadowRoot:i?this._editor.getDomNode():void 0,getAnchor:()=>t,getActions:()=>e,getActionViewItem:e=>{const t=this._keybindingFor(e);if(t)return new g.g(e,e,{label:!0,keybinding:t.getLabel(),isMenu:!0});const n=e;return"function"==typeof n.getActionViewItem?n.getActionViewItem():new g.g(e,e,{icon:!0,label:!0,isMenu:!0})},getKeyBinding:e=>this._keybindingFor(e),onHide:e=>{this._contextMenuIsBeingShownCount--,this._editor.focus(),this._editor.updateOptions({hover:n})}})}_keybindingFor(e){return this._keybindingService.lookupKeybinding(e.id)}dispose(){this._contextMenuIsBeingShownCount>0&&this._contextViewService.hideContextView(),this._toDispose.dispose()}};f.ID="editor.contrib.contextmenu",f=function(e,t,n,i){var o,r=arguments.length,s=r<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,i);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,n,s):o(t,n))||s);return r>3&&s&&Object.defineProperty(t,n,s),s}([m(1,h.i),m(2,h.u),m(3,c.i6),m(4,u.d),m(5,d.co)],f);class _ extends a.R6{constructor(){super({id:"editor.action.showContextMenu",label:i.N("action.showContextMenu.label","Show Editor Context Menu"),alias:"Show Editor Context Menu",precondition:void 0,kbOpts:{kbExpr:l.u.textInputFocus,primary:1092,weight:100}})}run(e,t){f.get(t).showContextMenu()}}(0,a._K)(f.ID,f),(0,a.Qr)(_)},2834:(e,t,n)=>{"use strict";n.r(t),n.d(t,{CursorUndoRedoController:()=>d,CursorUndo:()=>c,CursorRedo:()=>h});var i=n(3580),o=n(5976),r=n(6830),s=n(9102);class a{constructor(e){this.selections=e}equals(e){const t=this.selections.length;if(t!==e.selections.length)return!1;for(let n=0;n{this._undoStack=[],this._redoStack=[]}))),this._register(e.onDidChangeModelContent((e=>{this._undoStack=[],this._redoStack=[]}))),this._register(e.onDidChangeCursorSelection((t=>{if(this._isCursorUndoRedo)return;if(!t.oldSelections)return;if(t.oldModelVersionId!==t.modelVersionId)return;const n=new a(t.oldSelections);this._undoStack.length>0&&this._undoStack[this._undoStack.length-1].cursorState.equals(n)||(this._undoStack.push(new l(n,e.getScrollTop(),e.getScrollLeft())),this._redoStack=[],this._undoStack.length>50&&this._undoStack.shift())})))}static get(e){return e.getContribution(d.ID)}cursorUndo(){this._editor.hasModel()&&0!==this._undoStack.length&&(this._redoStack.push(new l(new a(this._editor.getSelections()),this._editor.getScrollTop(),this._editor.getScrollLeft())),this._applyState(this._undoStack.pop()))}cursorRedo(){this._editor.hasModel()&&0!==this._redoStack.length&&(this._undoStack.push(new l(new a(this._editor.getSelections()),this._editor.getScrollTop(),this._editor.getScrollLeft())),this._applyState(this._redoStack.pop()))}_applyState(e){this._isCursorUndoRedo=!0,this._editor.setSelections(e.cursorState.selections),this._editor.setScrollPosition({scrollTop:e.scrollTop,scrollLeft:e.scrollLeft}),this._isCursorUndoRedo=!1}}d.ID="editor.contrib.cursorUndoRedoController";class c extends r.R6{constructor(){super({id:"cursorUndo",label:i.N("cursor.undo","Cursor Undo"),alias:"Cursor Undo",precondition:void 0,kbOpts:{kbExpr:s.u.textInputFocus,primary:2099,weight:100}})}run(e,t,n){d.get(t).cursorUndo()}}class h extends r.R6{constructor(){super({id:"cursorRedo",label:i.N("cursor.redo","Cursor Redo"),alias:"Cursor Redo",precondition:void 0})}run(e,t,n){d.get(t).cursorRedo()}}(0,r._K)(d.ID,d),(0,r.Qr)(c),(0,r.Qr)(h)},6961:(e,t,n)=>{"use strict";n.r(t),n.d(t,{DragAndDropController:()=>k});var i=n(3379),o=n.n(i),r=n(7795),s=n.n(r),a=n(569),l=n.n(a),d=n(3565),c=n.n(d),h=n(9216),u=n.n(h),g=n(4589),p=n.n(g),m=n(9100),f={};f.styleTagTransform=p(),f.setAttributes=c(),f.insert=l().bind(null,"head"),f.domAPI=s(),f.insertStyleElement=u(),o()(m.Z,f),m.Z&&m.Z.locals&&m.Z.locals;var _=n(5976),b=n(1432),C=n(6830),v=n(187),w=n(4314),y=n(3860);class A{constructor(e,t,n){this.selection=e,this.targetPosition=t,this.copy=n,this.targetSelection=null}getEditOperations(e,t){let n=e.getValueInRange(this.selection);this.copy||t.addEditOperation(this.selection,null),t.addEditOperation(new w.e(this.targetPosition.lineNumber,this.targetPosition.column,this.targetPosition.lineNumber,this.targetPosition.column),n),!this.selection.containsPosition(this.targetPosition)||this.copy&&(this.selection.getEndPosition().equals(this.targetPosition)||this.selection.getStartPosition().equals(this.targetPosition))?this.copy?this.targetSelection=new y.Y(this.targetPosition.lineNumber,this.targetPosition.column,this.selection.endLineNumber-this.selection.startLineNumber+this.targetPosition.lineNumber,this.selection.startLineNumber===this.selection.endLineNumber?this.targetPosition.column+this.selection.endColumn-this.selection.startColumn:this.selection.endColumn):this.targetPosition.lineNumber>this.selection.endLineNumber?this.targetSelection=new y.Y(this.targetPosition.lineNumber-this.selection.endLineNumber+this.selection.startLineNumber,this.targetPosition.column,this.targetPosition.lineNumber,this.selection.startLineNumber===this.selection.endLineNumber?this.targetPosition.column+this.selection.endColumn-this.selection.startColumn:this.selection.endColumn):this.targetPosition.lineNumberthis._onEditorMouseDown(e)))),this._register(this._editor.onMouseUp((e=>this._onEditorMouseUp(e)))),this._register(this._editor.onMouseDrag((e=>this._onEditorMouseDrag(e)))),this._register(this._editor.onMouseDrop((e=>this._onEditorMouseDrop(e)))),this._register(this._editor.onMouseDropCanceled((()=>this._onEditorMouseDropCanceled()))),this._register(this._editor.onKeyDown((e=>this.onEditorKeyDown(e)))),this._register(this._editor.onKeyUp((e=>this.onEditorKeyUp(e)))),this._register(this._editor.onDidBlurEditorWidget((()=>this.onEditorBlur()))),this._register(this._editor.onDidBlurEditorText((()=>this.onEditorBlur()))),this._dndDecorationIds=[],this._mouseDown=!1,this._modifierPressed=!1,this._dragSelection=null}onEditorBlur(){this._removeDecoration(),this._dragSelection=null,this._mouseDown=!1,this._modifierPressed=!1}onEditorKeyDown(e){this._editor.getOption(29)&&!this._editor.getOption(16)&&(x(e)&&(this._modifierPressed=!0),this._mouseDown&&x(e)&&this._editor.updateOptions({mouseStyle:"copy"}))}onEditorKeyUp(e){this._editor.getOption(29)&&!this._editor.getOption(16)&&(x(e)&&(this._modifierPressed=!1),this._mouseDown&&e.keyCode===k.TRIGGER_KEY_VALUE&&this._editor.updateOptions({mouseStyle:"default"}))}_onEditorMouseDown(e){this._mouseDown=!0}_onEditorMouseUp(e){this._mouseDown=!1,this._editor.updateOptions({mouseStyle:"text"})}_onEditorMouseDrag(e){let t=e.target;if(null===this._dragSelection){let e=(this._editor.getSelections()||[]).filter((e=>t.position&&e.containsPosition(t.position)));if(1!==e.length)return;this._dragSelection=e[0]}x(e.event)?this._editor.updateOptions({mouseStyle:"copy"}):this._editor.updateOptions({mouseStyle:"default"}),t.position&&(this._dragSelection.containsPosition(t.position)?this._removeDecoration():this.showAt(t.position))}_onEditorMouseDropCanceled(){this._editor.updateOptions({mouseStyle:"text"}),this._removeDecoration(),this._dragSelection=null,this._mouseDown=!1}_onEditorMouseDrop(e){if(e.target&&(this._hitContent(e.target)||this._hitMargin(e.target))&&e.target.position){let t=new v.L(e.target.position.lineNumber,e.target.position.column);if(null===this._dragSelection){let n=null;if(e.event.shiftKey){let e=this._editor.getSelection();if(e){const{selectionStartLineNumber:i,selectionStartColumn:o}=e;n=[new y.Y(i,o,t.lineNumber,t.column)]}}else n=(this._editor.getSelections()||[]).map((e=>e.containsPosition(t)?new y.Y(t.lineNumber,t.column,t.lineNumber,t.column):e));this._editor.setSelections(n||[],"mouse",3)}else(!this._dragSelection.containsPosition(t)||(x(e.event)||this._modifierPressed)&&(this._dragSelection.getEndPosition().equals(t)||this._dragSelection.getStartPosition().equals(t)))&&(this._editor.pushUndoStop(),this._editor.executeCommand(k.ID,new A(this._dragSelection,t,x(e.event)||this._modifierPressed)),this._editor.pushUndoStop())}this._editor.updateOptions({mouseStyle:"text"}),this._removeDecoration(),this._dragSelection=null,this._mouseDown=!1}showAt(e){let t=[{range:new w.e(e.lineNumber,e.column,e.lineNumber,e.column),options:k._DECORATION_OPTIONS}];this._dndDecorationIds=this._editor.deltaDecorations(this._dndDecorationIds,t),this._editor.revealPosition(e,1)}_removeDecoration(){this._dndDecorationIds=this._editor.deltaDecorations(this._dndDecorationIds,[])}_hitContent(e){return 6===e.type||7===e.type}_hitMargin(e){return 2===e.type||3===e.type||4===e.type}dispose(){this._removeDecoration(),this._dragSelection=null,this._mouseDown=!1,this._modifierPressed=!1,super.dispose()}}k.ID="editor.contrib.dragAndDrop",k.TRIGGER_KEY_VALUE=b.dz?6:5,k._DECORATION_OPTIONS=S.qx.register({description:"dnd-target",className:"dnd-target"}),(0,C._K)(k.ID,k)},1372:(e,t,n)=>{"use strict";n.r(t),n.d(t,{getDocumentSymbols:()=>h});var i=n(666),o=n(1200),r=n(1050),s=n(8216),a=n(6895),l=n(4565),d=n(8401),c=function(e,t,n,i){return new(n||(n=Promise))((function(o,r){function s(e){try{l(i.next(e))}catch(e){r(e)}}function a(e){try{l(i.throw(e))}catch(e){r(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,a)}l((i=i.apply(e,t||[])).next())}))};function h(e,t,n){return c(this,void 0,void 0,(function*(){const i=yield a.C3.create(e,n);return t?i.asListOfDocumentSymbols():i.getTopLevelSymbols()}))}l.P.registerCommand("_executeDocumentSymbolProvider",(function(e,...t){return c(this,void 0,void 0,(function*(){const[n]=t;(0,d.p_)(i.o.isUri(n));const a=e.get(o.q).getModel(n);if(a)return h(a,!1,r.T.None);const l=yield e.get(s.S).createModelReference(n);try{return yield h(l.object.textEditorModel,!1,r.T.None)}finally{l.dispose()}}))}))},6895:(e,t,n)=>{"use strict";n.d(t,{C3:()=>p});var i=n(9488),o=n(1050),r=n(7301),s=n(3702),a=n(4314),l=n(4101),d=n(3725),c=n(1036);class h{remove(){this.parent&&this.parent.children.delete(this.id)}static findId(e,t){let n;"string"==typeof e?n=`${t.id}/${e}`:(n=`${t.id}/${e.name}`,void 0!==t.children.get(n)&&(n=`${t.id}/${e.name}_${e.range.startLineNumber}_${e.range.startColumn}`));let i=n;for(let e=0;void 0!==t.children.get(i);e++)i=`${n}_${e}`;return i}static empty(e){return 0===e.children.size}}class u extends h{constructor(e,t,n){super(),this.id=e,this.parent=t,this.symbol=n,this.children=new Map}}class g extends h{constructor(e,t,n,i){super(),this.id=e,this.parent=t,this.label=n,this.order=i,this.children=new Map}}class p extends h{constructor(e){super(),this.uri=e,this.id="root",this.parent=void 0,this._groups=new Map,this.children=new Map,this.id="root",this.parent=void 0}static create(e,t){let n=this._keys.for(e,!0),i=p._requests.get(n);if(!i){let t=new o.A;i={promiseCnt:0,source:t,promise:p._create(e,t.token),model:void 0},p._requests.set(n,i);const r=Date.now();i.promise.then((()=>{this._requestDurations.update(e,Date.now()-r)}))}return i.model?Promise.resolve(i.model):(i.promiseCnt+=1,t.onCancellationRequested((()=>{0==--i.promiseCnt&&(i.source.cancel(),p._requests.delete(n))})),new Promise(((e,t)=>{i.promise.then((t=>{i.model=t,e(t)}),(e=>{p._requests.delete(n),t(e)}))})))}static _create(e,t){const n=new o.A(t),s=new p(e.uri),a=l.vJ.ordered(e),d=a.map(((t,i)=>{var o;let a=h.findId(`provider_${i}`,s),l=new g(a,s,null!==(o=t.displayName)&&void 0!==o?o:"Unknown Outline Provider",i);return Promise.resolve(t.provideDocumentSymbols(e,n.token)).then((e=>{for(const t of e||[])p._makeOutlineElement(t,l);return l}),(e=>((0,r.Cp)(e),l))).then((e=>{h.empty(e)?e.remove():s._groups.set(a,e)}))})),c=l.vJ.onDidChange((()=>{const t=l.vJ.ordered(e);(0,i.fS)(t,a)||n.cancel()}));return Promise.all(d).then((()=>n.token.isCancellationRequested&&!t.isCancellationRequested?p._create(e,t):s._compact())).finally((()=>{c.dispose()}))}static _makeOutlineElement(e,t){let n=h.findId(e,t),i=new u(n,t,e);if(e.children)for(const t of e.children)p._makeOutlineElement(t,i);t.children.set(i.id,i)}_compact(){let e=0;for(const[t,n]of this._groups)0===n.children.size?this._groups.delete(t):e+=1;if(1!==e)this.children=this._groups;else{let e=d.$.first(this._groups.values());for(let[,t]of e.children)t.parent=this,this.children.set(t.id,t)}return this}getTopLevelSymbols(){const e=[];for(const t of this.children.values())t instanceof u?e.push(t.symbol):e.push(...d.$.map(t.children.values(),(e=>e.symbol)));return e.sort(((e,t)=>a.e.compareRangesUsingStarts(e.range,t.range)))}asListOfDocumentSymbols(){const e=this.getTopLevelSymbols(),t=[];return p._flattenDocumentSymbols(t,e,""),t.sort(((e,t)=>a.e.compareRangesUsingStarts(e.range,t.range)))}static _flattenDocumentSymbols(e,t,n){for(const i of t)e.push({kind:i.kind,tags:i.tags,name:i.name,detail:i.detail,containerName:i.containerName||n,range:i.range,selectionRange:i.selectionRange,children:void 0}),i.children&&p._flattenDocumentSymbols(e,i.children,i.name)}}p._requestDurations=new c.Y(l.vJ,350),p._requests=new s.z6(9,.75),p._keys=new class{constructor(){this._counter=1,this._data=new WeakMap}for(e,t){return`${e.id}/${t?e.getVersionId():""}/${this._hash(l.vJ.all(e))}`}_hash(e){let t="";for(const n of e){let e=this._data.get(n);void 0===e&&(e=this._counter++,this._data.set(n,e)),t+=e}return t}}},255:(e,t,n)=>{"use strict";n.r(t),n.d(t,{CommonFindController:()=>Pt,FindController:()=>Ft,MatchFindAction:()=>Vt,NextMatchFindAction:()=>Ht,NextSelectionMatchFindAction:()=>Ut,PreviousMatchFindAction:()=>jt,PreviousSelectionMatchFindAction:()=>Zt,SelectionMatchFindAction:()=>$t,StartFindAction:()=>Wt,StartFindReplaceAction:()=>Kt,StartFindWithSelectionAction:()=>zt,getSelectionSearchString:()=>Bt});var i=n(3580),o=n(5393),r=n(5976),s=n(7295),a=n(6830),l=n(9102),d=n(1329),c=n(187),h=n(4314),u=n(3860),g=n(7277),p=n(4973),m=n(3103),f=n(3910),_=n(7781);class b{constructor(e){this._editor=e,this._decorations=[],this._overviewRulerApproximateDecorations=[],this._findScopeDecorationIds=[],this._rangeHighlightDecorationId=null,this._highlightedDecorationId=null,this._startPosition=this._editor.getPosition()}dispose(){this._editor.deltaDecorations(this._allDecorations(),[]),this._decorations=[],this._overviewRulerApproximateDecorations=[],this._findScopeDecorationIds=[],this._rangeHighlightDecorationId=null,this._highlightedDecorationId=null}reset(){this._decorations=[],this._overviewRulerApproximateDecorations=[],this._findScopeDecorationIds=[],this._rangeHighlightDecorationId=null,this._highlightedDecorationId=null}getCount(){return this._decorations.length}getFindScope(){return this._findScopeDecorationIds[0]?this._editor.getModel().getDecorationRange(this._findScopeDecorationIds[0]):null}getFindScopes(){if(this._findScopeDecorationIds.length){const e=this._findScopeDecorationIds.map((e=>this._editor.getModel().getDecorationRange(e))).filter((e=>!!e));if(e.length)return e}return null}getStartPosition(){return this._startPosition}setStartPosition(e){this._startPosition=e,this.setCurrentFindMatch(null)}_getDecorationIndex(e){const t=this._decorations.indexOf(e);return t>=0?t+1:1}getCurrentMatchesPosition(e){let t=this._editor.getModel().getDecorationsInRange(e);for(const e of t){const t=e.options;if(t===b._FIND_MATCH_DECORATION||t===b._CURRENT_FIND_MATCH_DECORATION)return this._getDecorationIndex(e.id)}return 0}setCurrentFindMatch(e){let t=null,n=0;if(e)for(let i=0,o=this._decorations.length;i{if(null!==this._highlightedDecorationId&&(e.changeDecorationOptions(this._highlightedDecorationId,b._FIND_MATCH_DECORATION),this._highlightedDecorationId=null),null!==t&&(this._highlightedDecorationId=t,e.changeDecorationOptions(this._highlightedDecorationId,b._CURRENT_FIND_MATCH_DECORATION)),null!==this._rangeHighlightDecorationId&&(e.removeDecoration(this._rangeHighlightDecorationId),this._rangeHighlightDecorationId=null),null!==t){let n=this._editor.getModel().getDecorationRange(t);if(n.startLineNumber!==n.endLineNumber&&1===n.endColumn){let e=n.endLineNumber-1,t=this._editor.getModel().getLineMaxColumn(e);n=new h.e(n.startLineNumber,n.startColumn,e,t)}this._rangeHighlightDecorationId=e.addDecoration(n,b._RANGE_HIGHLIGHT_DECORATION)}})),n}set(e,t){this._editor.changeDecorations((n=>{let i=b._FIND_MATCH_DECORATION,o=[];if(e.length>1e3){i=b._FIND_MATCH_NO_OVERVIEW_DECORATION;const t=this._editor.getModel().getLineCount(),n=this._editor.getLayoutInfo().height/t,r=Math.max(2,Math.ceil(3/n));let s=e[0].range.startLineNumber,a=e[0].range.endLineNumber;for(let t=1,n=e.length;t=n.startLineNumber?n.endLineNumber>a&&(a=n.endLineNumber):(o.push({range:new h.e(s,1,a,1),options:b._FIND_MATCH_ONLY_OVERVIEW_DECORATION}),s=n.startLineNumber,a=n.endLineNumber)}o.push({range:new h.e(s,1,a,1),options:b._FIND_MATCH_ONLY_OVERVIEW_DECORATION})}let r=new Array(e.length);for(let t=0,n=e.length;tn.removeDecoration(e))),this._findScopeDecorationIds=[]),(null==t?void 0:t.length)&&(this._findScopeDecorationIds=t.map((e=>n.addDecoration(e,b._FIND_SCOPE_DECORATION))))}))}matchBeforePosition(e){if(0===this._decorations.length)return null;for(let t=this._decorations.length-1;t>=0;t--){let n=this._decorations[t],i=this._editor.getModel().getDecorationRange(n);if(i&&!(i.endLineNumber>e.lineNumber)){if(i.endLineNumbere.column))return i}}return this._editor.getModel().getDecorationRange(this._decorations[this._decorations.length-1])}matchAfterPosition(e){if(0===this._decorations.length)return null;for(let t=0,n=this._decorations.length;te.lineNumber)return i;if(!(i.startColumn0){let e=[];for(let t=0;th.e.compareRangesUsingStarts(e.range,t.range)));let n=[],i=e[0];for(let t=1;t0?t[0].toUpperCase()+t.substr(1):e[0][0].toUpperCase()!==e[0][0]&&t.length>0?t[0].toLowerCase()+t.substr(1):t}return t}function w(e,t,n){return-1!==e[0].indexOf(n)&&-1!==t.indexOf(n)&&e[0].split(n).length===t.split(n).length}function y(e,t,n){const i=t.split(n),o=e[0].split(n);let r="";return i.forEach(((e,t)=>{r+=v([o[t]],e)+n})),r.slice(0,-1)}class A{constructor(e){this.staticValue=e,this.kind=0}}class S{constructor(e){this.pieces=e,this.kind=1}}class x{constructor(e){e&&0!==e.length?1===e.length&&null!==e[0].staticValue?this._state=new A(e[0].staticValue):this._state=new S(e):this._state=new A("")}static fromStaticValue(e){return new x([k.staticValue(e)])}get hasReplacementPatterns(){return 1===this._state.kind}buildReplaceString(e,t){if(0===this._state.kind)return t?v(e,this._state.staticValue):this._state.staticValue;let n="";for(let t=0,i=this._state.pieces.length;t0){let e=[],t=i.caseOps.length,n=0;for(let r=0,s=o.length;r=t){e.push(o.slice(r));break}switch(i.caseOps[n]){case"U":e.push(o[r].toUpperCase());break;case"u":e.push(o[r].toUpperCase()),n++;break;case"L":e.push(o[r].toLowerCase());break;case"l":e.push(o[r].toLowerCase()),n++;break;default:e.push(o[r])}}o=e.join("")}n+=o}return n}static _substitute(e,t){if(null===t)return"";if(0===e)return t[0];let n="";for(;e>0;){if(ethis.research(!1)),100),this._toDispose.add(this._updateDecorationsScheduler),this._toDispose.add(this._editor.onDidChangeCursorPosition((e=>{3!==e.reason&&5!==e.reason&&6!==e.reason||this._decorations.setStartPosition(this._editor.getPosition())}))),this._ignoreModelContentChanged=!1,this._toDispose.add(this._editor.onDidChangeModelContent((e=>{this._ignoreModelContentChanged||(e.isFlush&&this._decorations.reset(),this._decorations.setStartPosition(this._editor.getPosition()),this._updateDecorationsScheduler.schedule())}))),this._toDispose.add(this._state.onFindReplaceStateChange((e=>this._onStateChanged(e)))),this.research(!1,this._state.searchScope)}dispose(){this._isDisposed=!0,(0,r.B9)(this._startSearchingTimer),this._toDispose.dispose()}_onStateChanged(e){!this._isDisposed&&this._editor.hasModel()&&(e.searchString||e.isReplaceRevealed||e.isRegex||e.wholeWord||e.matchCase||e.searchScope)&&(this._editor.getModel().isTooLargeForSyncing()?(this._startSearchingTimer.cancel(),this._startSearchingTimer.setIfNotSet((()=>{e.searchScope?this.research(e.moveCursor,this._state.searchScope):this.research(e.moveCursor)}),240)):e.searchScope?this.research(e.moveCursor,this._state.searchScope):this.research(e.moveCursor))}static _getSearchRange(e,t){return t||e.getFullModelRange()}research(e,t){let n=null;void 0!==t?null!==t&&(n=Array.isArray(t)?t:[t]):n=this._decorations.getFindScopes(),null!==n&&(n=n.map((e=>{if(e.startLineNumber!==e.endLineNumber){let t=e.endLineNumber;return 1===e.endColumn&&(t-=1),new h.e(e.startLineNumber,1,t,this._editor.getModel().getLineMaxColumn(t))}return e})));let i=this._findMatches(n,!1,q);this._decorations.set(i,n);const o=this._editor.getSelection();let r=this._decorations.getCurrentMatchesPosition(o);if(0===r&&i.length>0){const e=(0,N.lG)(i.map((e=>e.range)),(e=>h.e.compareRangesUsingStarts(e,o)>=0));r=e>0?e-1+1:r}this._state.changeMatchInfo(r,this._decorations.getCount(),void 0),e&&this._editor.getOption(33).cursorMoveOnType&&this._moveToNextMatch(this._decorations.getStartPosition())}_hasMatches(){return this._state.matchesCount>0}_cannotFind(){if(!this._hasMatches()){let e=this._decorations.getFindScope();return e&&this._editor.revealRangeInCenterIfOutsideViewport(e,0),!0}return!1}_setCurrentFindMatch(e){let t=this._decorations.setCurrentFindMatch(e);this._state.changeMatchInfo(t,this._decorations.getCount(),e),this._editor.setSelection(e),this._editor.revealRangeInCenterIfOutsideViewport(e,0)}_prevSearchPosition(e){let t=this._state.isRegex&&(this._state.searchString.indexOf("^")>=0||this._state.searchString.indexOf("$")>=0),{lineNumber:n,column:i}=e,o=this._editor.getModel();return t||1===i?(1===n?n=o.getLineCount():n--,i=o.getLineMaxColumn(n)):i--,new c.L(n,i)}_moveToPrevMatch(e,t=!1){if(!this._state.canNavigateBack()){const t=this._decorations.matchAfterPosition(e);return void(t&&this._setCurrentFindMatch(t))}if(this._decorations.getCount()=0||this._state.searchString.indexOf("$")>=0),{lineNumber:n,column:i}=e,o=this._editor.getModel();return t||i===o.getLineMaxColumn(n)?(n===o.getLineCount()?n=1:n++,i=1):i++,new c.L(n,i)}_moveToNextMatch(e){if(!this._state.canNavigateForward()){const t=this._decorations.matchBeforePosition(e);return void(t&&this._setCurrentFindMatch(t))}if(this._decorations.getCount()=o)break;let r=e.charCodeAt(i);if(36===r){n.emitUnchanged(i-1),n.emitStatic("$",i+1);continue}if(48===r||38===r){n.emitUnchanged(i-1),n.emitMatchIndex(0,i+1,t),t.length=0;continue}if(49<=r&&r<=57){let s=r-48;if(i+1=o)break;let r=e.charCodeAt(i);switch(r){case 92:n.emitUnchanged(i-1),n.emitStatic("\\",i+1);break;case 110:n.emitUnchanged(i-1),n.emitStatic("\n",i+1);break;case 116:n.emitUnchanged(i-1),n.emitStatic("\t",i+1);break;case 117:case 85:case 108:case 76:n.emitUnchanged(i-1),n.emitStatic("",i+1),t.push(String.fromCharCode(r))}}}return n.finalize()}(this._state.replaceString):x.fromStaticValue(this._state.replaceString)}replace(){if(!this._hasMatches())return;let e=this._getReplacePattern(),t=this._editor.getSelection(),n=this._getNextMatch(t.getStartPosition(),!0,!1);if(n)if(t.equalsRange(n.range)){let i=e.buildReplaceString(n.matches,this._state.preserveCase),o=new d.T4(t,i);this._executeEditorCommand("replace",o),this._decorations.setStartPosition(new c.L(t.startLineNumber,t.startColumn+i.length)),this.research(!0)}else this._decorations.setStartPosition(this._editor.getPosition()),this._setCurrentFindMatch(n.range)}_findMatches(e,t,n){const i=(e||[null]).map((e=>Y._getSearchRange(this._editor.getModel(),e)));return this._editor.getModel().findMatches(this._state.searchString,i,this._state.isRegex,this._state.matchCase,this._state.wholeWord?this._editor.getOption(115):null,t,n)}replaceAll(){if(!this._hasMatches())return;const e=this._decorations.getFindScopes();null===e&&this._state.matchesCount>=q?this._largeReplaceAll():this._regularReplaceAll(e),this.research(!1)}_largeReplaceAll(){const e=new g.bc(this._state.searchString,this._state.isRegex,this._state.matchCase,this._state.wholeWord?this._editor.getOption(115):null).parseSearchRequest();if(!e)return;let t=e.regex;if(!t.multiline){let e="mu";t.ignoreCase&&(e+="i"),t.global&&(e+="g"),t=new RegExp(t.source,e)}const n=this._editor.getModel(),i=n.getValue(1),o=n.getFullModelRange(),r=this._getReplacePattern();let s;const a=this._state.preserveCase;s=r.hasReplacementPatterns||a?i.replace(t,(function(){return r.buildReplaceString(arguments,a)})):i.replace(t,r.buildReplaceString(null,a));let l=new d.hP(o,s,this._editor.getSelection());this._executeEditorCommand("replaceAll",l)}_regularReplaceAll(e){const t=this._getReplacePattern();let n=this._findMatches(e,t.hasReplacementPatterns||this._state.preserveCase,1073741824),i=[];for(let e=0,o=n.length;ee.range)),i);this._executeEditorCommand("replaceAll",o)}selectAllMatches(){if(!this._hasMatches())return;let e=this._decorations.getFindScopes(),t=this._findMatches(e,!1,1073741824).map((e=>new u.Y(e.range.startLineNumber,e.range.startColumn,e.range.endLineNumber,e.range.endColumn))),n=this._editor.getSelection();for(let e=0,i=t.length;e{this.checked=!this._checked,this._onChange.fire(!1),e.preventDefault()})),this.ignoreGesture(this.domNode),this.onkeydown(this.domNode,(e=>{if(10===e.keyCode||3===e.keyCode)return this.checked=!this._checked,this._onChange.fire(!0),void e.preventDefault();this._onKeyDown.fire(e)}))}get enabled(){return"true"!==this.domNode.getAttribute("aria-disabled")}focus(){this.domNode.focus()}get checked(){return this._checked}set checked(e){this._checked=e,this.domNode.setAttribute("aria-checked",String(this._checked)),this.domNode.classList.toggle("checked",this._checked),this.applyStyles()}width(){return 22}style(e){e.inputActiveOptionBorder&&(this._opts.inputActiveOptionBorder=e.inputActiveOptionBorder),e.inputActiveOptionForeground&&(this._opts.inputActiveOptionForeground=e.inputActiveOptionForeground),e.inputActiveOptionBackground&&(this._opts.inputActiveOptionBackground=e.inputActiveOptionBackground),this.applyStyles()}applyStyles(){this.domNode&&(this.domNode.style.borderColor=this._checked&&this._opts.inputActiveOptionBorder?this._opts.inputActiveOptionBorder.toString():"transparent",this.domNode.style.color=this._checked&&this._opts.inputActiveOptionForeground?this._opts.inputActiveOptionForeground.toString():"inherit",this.domNode.style.backgroundColor=this._checked&&this._opts.inputActiveOptionBackground?this._opts.inputActiveOptionBackground.toString():"transparent")}enable(){this.domNode.setAttribute("aria-disabled",String(!1))}disable(){this.domNode.setAttribute("aria-disabled",String(!0))}}const _e=i.N("caseDescription","Match Case"),be=i.N("wordsDescription","Match Whole Word"),Ce=i.N("regexDescription","Use Regular Expression");class ve extends fe{constructor(e){super({icon:pe.lA.caseSensitive,title:_e+e.appendTitle,isChecked:e.isChecked,inputActiveOptionBorder:e.inputActiveOptionBorder,inputActiveOptionForeground:e.inputActiveOptionForeground,inputActiveOptionBackground:e.inputActiveOptionBackground})}}class we extends fe{constructor(e){super({icon:pe.lA.wholeWord,title:be+e.appendTitle,isChecked:e.isChecked,inputActiveOptionBorder:e.inputActiveOptionBorder,inputActiveOptionForeground:e.inputActiveOptionForeground,inputActiveOptionBackground:e.inputActiveOptionBackground})}}class ye extends fe{constructor(e){super({icon:pe.lA.regex,title:Ce+e.appendTitle,isChecked:e.isChecked,inputActiveOptionBorder:e.inputActiveOptionBorder,inputActiveOptionForeground:e.inputActiveOptionForeground,inputActiveOptionBackground:e.inputActiveOptionBackground})}}class Ae extends he.${constructor(e,t,n,i){super(),this._hideSoon=this._register(new o.pY((()=>this._hide()),2e3)),this._isVisible=!1,this._editor=e,this._state=t,this._keybindingService=n,this._domNode=document.createElement("div"),this._domNode.className="findOptionsWidget",this._domNode.style.display="none",this._domNode.style.top="10px",this._domNode.setAttribute("role","presentation"),this._domNode.setAttribute("aria-hidden","true");const r=i.getColorTheme().getColor(f.PR),s=i.getColorTheme().getColor(f.Pv),a=i.getColorTheme().getColor(f.XE);this.caseSensitive=this._register(new ve({appendTitle:this._keybindingLabelFor(V),isChecked:this._state.matchCase,inputActiveOptionBorder:r,inputActiveOptionForeground:s,inputActiveOptionBackground:a})),this._domNode.appendChild(this.caseSensitive.domNode),this._register(this.caseSensitive.onChange((()=>{this._state.change({matchCase:this.caseSensitive.checked},!1)}))),this.wholeWords=this._register(new we({appendTitle:this._keybindingLabelFor(H),isChecked:this._state.wholeWord,inputActiveOptionBorder:r,inputActiveOptionForeground:s,inputActiveOptionBackground:a})),this._domNode.appendChild(this.wholeWords.domNode),this._register(this.wholeWords.onChange((()=>{this._state.change({wholeWord:this.wholeWords.checked},!1)}))),this.regex=this._register(new ye({appendTitle:this._keybindingLabelFor(j),isChecked:this._state.isRegex,inputActiveOptionBorder:r,inputActiveOptionForeground:s,inputActiveOptionBackground:a})),this._domNode.appendChild(this.regex.domNode),this._register(this.regex.onChange((()=>{this._state.change({isRegex:this.regex.checked},!1)}))),this._editor.addOverlayWidget(this),this._register(this._state.onFindReplaceStateChange((e=>{let t=!1;e.isRegex&&(this.regex.checked=this._state.isRegex,t=!0),e.wholeWord&&(this.wholeWords.checked=this._state.wholeWord,t=!0),e.matchCase&&(this.caseSensitive.checked=this._state.matchCase,t=!0),!this._state.isRevealed&&t&&this._revealTemporarily()}))),this._register(G.j_(this._domNode,(e=>this._onMouseOut()))),this._register(G.nm(this._domNode,"mouseover",(e=>this._onMouseOver()))),this._applyTheme(i.getColorTheme()),this._register(i.onDidColorThemeChange(this._applyTheme.bind(this)))}_keybindingLabelFor(e){let t=this._keybindingService.lookupKeybinding(e);return t?` (${t.getLabel()})`:""}dispose(){this._editor.removeOverlayWidget(this),super.dispose()}getId(){return Ae.ID}getDomNode(){return this._domNode}getPosition(){return{preference:0}}highlightFindOptions(){this._revealTemporarily()}_revealTemporarily(){this._show(),this._hideSoon.schedule()}_onMouseOut(){this._hideSoon.schedule()}_onMouseOver(){this._hideSoon.cancel()}_show(){this._isVisible||(this._isVisible=!0,this._domNode.style.display="block")}_hide(){this._isVisible&&(this._isVisible=!1,this._domNode.style.display="none")}_applyTheme(e){let t={inputActiveOptionBorder:e.getColor(f.PR),inputActiveOptionForeground:e.getColor(f.Pv),inputActiveOptionBackground:e.getColor(f.XE)};this.caseSensitive.style(t),this.wholeWords.style(t),this.regex.style(t)}}function Se(e,t){return 1===e||2!==e&&t}Ae.ID="editor.contrib.findOptionsWidget",(0,_.Ic)(((e,t)=>{const n=e.getColor(f.D0);n&&t.addRule(`.monaco-editor .findOptionsWidget { background-color: ${n}; }`);const i=e.getColor(f.Hf);i&&t.addRule(`.monaco-editor .findOptionsWidget { color: ${i}; }`);const o=e.getColor(f.rh);o&&t.addRule(`.monaco-editor .findOptionsWidget { box-shadow: 0 0 8px 2px ${o}; }`);const r=e.getColor(f.lR);r&&t.addRule(`.monaco-editor .findOptionsWidget { border: 2px solid ${r}; }`)}));class xe extends r.JT{constructor(){super(),this._onFindReplaceStateChange=this._register(new ge.Q5),this.onFindReplaceStateChange=this._onFindReplaceStateChange.event,this._searchString="",this._replaceString="",this._isRevealed=!1,this._isReplaceRevealed=!1,this._isRegex=!1,this._isRegexOverride=0,this._wholeWord=!1,this._wholeWordOverride=0,this._matchCase=!1,this._matchCaseOverride=0,this._preserveCase=!1,this._preserveCaseOverride=0,this._searchScope=null,this._matchesPosition=0,this._matchesCount=0,this._currentMatch=null,this._loop=!0}get searchString(){return this._searchString}get replaceString(){return this._replaceString}get isRevealed(){return this._isRevealed}get isReplaceRevealed(){return this._isReplaceRevealed}get isRegex(){return Se(this._isRegexOverride,this._isRegex)}get wholeWord(){return Se(this._wholeWordOverride,this._wholeWord)}get matchCase(){return Se(this._matchCaseOverride,this._matchCase)}get preserveCase(){return Se(this._preserveCaseOverride,this._preserveCase)}get actualIsRegex(){return this._isRegex}get actualWholeWord(){return this._wholeWord}get actualMatchCase(){return this._matchCase}get actualPreserveCase(){return this._preserveCase}get searchScope(){return this._searchScope}get matchesPosition(){return this._matchesPosition}get matchesCount(){return this._matchesCount}get currentMatch(){return this._currentMatch}changeMatchInfo(e,t,n){let i={moveCursor:!1,updateHistory:!1,searchString:!1,replaceString:!1,isRevealed:!1,isReplaceRevealed:!1,isRegex:!1,wholeWord:!1,matchCase:!1,preserveCase:!1,searchScope:!1,matchesPosition:!1,matchesCount:!1,currentMatch:!1,loop:!1},o=!1;0===t&&(e=0),e>t&&(e=t),this._matchesPosition!==e&&(this._matchesPosition=e,i.matchesPosition=!0,o=!0),this._matchesCount!==t&&(this._matchesCount=t,i.matchesCount=!0,o=!0),void 0!==n&&(h.e.equalsRange(this._currentMatch,n)||(this._currentMatch=n,i.currentMatch=!0,o=!0)),o&&this._onFindReplaceStateChange.fire(i)}change(e,t,n=!0){var i;let o={moveCursor:t,updateHistory:n,searchString:!1,replaceString:!1,isRevealed:!1,isReplaceRevealed:!1,isRegex:!1,wholeWord:!1,matchCase:!1,preserveCase:!1,searchScope:!1,matchesPosition:!1,matchesCount:!1,currentMatch:!1,loop:!1},r=!1;const s=this.isRegex,a=this.wholeWord,l=this.matchCase,d=this.preserveCase;void 0!==e.searchString&&this._searchString!==e.searchString&&(this._searchString=e.searchString,o.searchString=!0,r=!0),void 0!==e.replaceString&&this._replaceString!==e.replaceString&&(this._replaceString=e.replaceString,o.replaceString=!0,r=!0),void 0!==e.isRevealed&&this._isRevealed!==e.isRevealed&&(this._isRevealed=e.isRevealed,o.isRevealed=!0,r=!0),void 0!==e.isReplaceRevealed&&this._isReplaceRevealed!==e.isReplaceRevealed&&(this._isReplaceRevealed=e.isReplaceRevealed,o.isReplaceRevealed=!0,r=!0),void 0!==e.isRegex&&(this._isRegex=e.isRegex),void 0!==e.wholeWord&&(this._wholeWord=e.wholeWord),void 0!==e.matchCase&&(this._matchCase=e.matchCase),void 0!==e.preserveCase&&(this._preserveCase=e.preserveCase),void 0!==e.searchScope&&((null===(i=e.searchScope)||void 0===i?void 0:i.every((e=>{var t;return null===(t=this._searchScope)||void 0===t?void 0:t.some((t=>!h.e.equalsRange(t,e)))})))||(this._searchScope=e.searchScope,o.searchScope=!0,r=!0)),void 0!==e.loop&&this._loop!==e.loop&&(this._loop=e.loop,o.loop=!0,r=!0),this._isRegexOverride=void 0!==e.isRegexOverride?e.isRegexOverride:0,this._wholeWordOverride=void 0!==e.wholeWordOverride?e.wholeWordOverride:0,this._matchCaseOverride=void 0!==e.matchCaseOverride?e.matchCaseOverride:0,this._preserveCaseOverride=void 0!==e.preserveCaseOverride?e.preserveCaseOverride:0,s!==this.isRegex&&(r=!0,o.isRegex=!0),a!==this.wholeWord&&(r=!0,o.wholeWord=!0),l!==this.matchCase&&(r=!0,o.matchCase=!0),d!==this.preserveCase&&(r=!0,o.preserveCase=!0),r&&this._onFindReplaceStateChange.fire(o)}canNavigateBack(){return this.canNavigateInLoop()||1!==this.matchesPosition}canNavigateForward(){return this.canNavigateInLoop()||this.matchesPosition=q}}var ke=n(5160),Le={};Le.styleTagTransform=le(),Le.setAttributes=oe(),Le.insert=ne().bind(null,"head"),Le.domAPI=ee(),Le.insertStyleElement=se(),X()(ke.Z,Le),ke.Z&&ke.Z.locals&&ke.Z.locals;var Ee=n(6346),Ne=n(3841),De=n(7301),Ie=n(1432),Me=n(6266),Te={};Te.styleTagTransform=le(),Te.setAttributes=oe(),Te.insert=ne().bind(null,"head"),Te.domAPI=ee(),Te.insertStyleElement=se(),X()(Me.Z,Te),Me.Z&&Me.Z.locals&&Me.Z.locals;var Re=n(4299);const Oe=i.N("defaultLabel","input");class Be extends he.${constructor(e,t,n,i){super(),this._showOptionButtons=n,this.fixFocusOnOptionClickEnabled=!0,this.imeSessionInProgress=!1,this._onDidOptionChange=this._register(new ge.Q5),this.onDidOptionChange=this._onDidOptionChange.event,this._onKeyDown=this._register(new ge.Q5),this.onKeyDown=this._onKeyDown.event,this._onMouseDown=this._register(new ge.Q5),this.onMouseDown=this._onMouseDown.event,this._onInput=this._register(new ge.Q5),this._onKeyUp=this._register(new ge.Q5),this._onCaseSensitiveKeyDown=this._register(new ge.Q5),this.onCaseSensitiveKeyDown=this._onCaseSensitiveKeyDown.event,this._onRegexKeyDown=this._register(new ge.Q5),this.onRegexKeyDown=this._onRegexKeyDown.event,this._lastHighlightFindOptions=0,this.contextViewProvider=t,this.placeholder=i.placeholder||"",this.validation=i.validation,this.label=i.label||Oe,this.inputActiveOptionBorder=i.inputActiveOptionBorder,this.inputActiveOptionForeground=i.inputActiveOptionForeground,this.inputActiveOptionBackground=i.inputActiveOptionBackground,this.inputBackground=i.inputBackground,this.inputForeground=i.inputForeground,this.inputBorder=i.inputBorder,this.inputValidationInfoBorder=i.inputValidationInfoBorder,this.inputValidationInfoBackground=i.inputValidationInfoBackground,this.inputValidationInfoForeground=i.inputValidationInfoForeground,this.inputValidationWarningBorder=i.inputValidationWarningBorder,this.inputValidationWarningBackground=i.inputValidationWarningBackground,this.inputValidationWarningForeground=i.inputValidationWarningForeground,this.inputValidationErrorBorder=i.inputValidationErrorBorder,this.inputValidationErrorBackground=i.inputValidationErrorBackground,this.inputValidationErrorForeground=i.inputValidationErrorForeground;const o=i.appendCaseSensitiveLabel||"",r=i.appendWholeWordsLabel||"",s=i.appendRegexLabel||"",a=i.history||[],l=!!i.flexibleHeight,d=!!i.flexibleWidth,c=i.flexibleMaxHeight;this.domNode=document.createElement("div"),this.domNode.classList.add("monaco-findInput"),this.inputBox=this._register(new Re.p(this.domNode,this.contextViewProvider,{placeholder:this.placeholder||"",ariaLabel:this.label||"",validationOptions:{validation:this.validation},inputBackground:this.inputBackground,inputForeground:this.inputForeground,inputBorder:this.inputBorder,inputValidationInfoBackground:this.inputValidationInfoBackground,inputValidationInfoForeground:this.inputValidationInfoForeground,inputValidationInfoBorder:this.inputValidationInfoBorder,inputValidationWarningBackground:this.inputValidationWarningBackground,inputValidationWarningForeground:this.inputValidationWarningForeground,inputValidationWarningBorder:this.inputValidationWarningBorder,inputValidationErrorBackground:this.inputValidationErrorBackground,inputValidationErrorForeground:this.inputValidationErrorForeground,inputValidationErrorBorder:this.inputValidationErrorBorder,history:a,flexibleHeight:l,flexibleWidth:d,flexibleMaxHeight:c})),this.regex=this._register(new ye({appendTitle:s,isChecked:!1,inputActiveOptionBorder:this.inputActiveOptionBorder,inputActiveOptionForeground:this.inputActiveOptionForeground,inputActiveOptionBackground:this.inputActiveOptionBackground})),this._register(this.regex.onChange((e=>{this._onDidOptionChange.fire(e),!e&&this.fixFocusOnOptionClickEnabled&&this.inputBox.focus(),this.validate()}))),this._register(this.regex.onKeyDown((e=>{this._onRegexKeyDown.fire(e)}))),this.wholeWords=this._register(new we({appendTitle:r,isChecked:!1,inputActiveOptionBorder:this.inputActiveOptionBorder,inputActiveOptionForeground:this.inputActiveOptionForeground,inputActiveOptionBackground:this.inputActiveOptionBackground})),this._register(this.wholeWords.onChange((e=>{this._onDidOptionChange.fire(e),!e&&this.fixFocusOnOptionClickEnabled&&this.inputBox.focus(),this.validate()}))),this.caseSensitive=this._register(new ve({appendTitle:o,isChecked:!1,inputActiveOptionBorder:this.inputActiveOptionBorder,inputActiveOptionForeground:this.inputActiveOptionForeground,inputActiveOptionBackground:this.inputActiveOptionBackground})),this._register(this.caseSensitive.onChange((e=>{this._onDidOptionChange.fire(e),!e&&this.fixFocusOnOptionClickEnabled&&this.inputBox.focus(),this.validate()}))),this._register(this.caseSensitive.onKeyDown((e=>{this._onCaseSensitiveKeyDown.fire(e)}))),this._showOptionButtons&&(this.inputBox.paddingRight=this.caseSensitive.width()+this.wholeWords.width()+this.regex.width());let h=[this.caseSensitive.domNode,this.wholeWords.domNode,this.regex.domNode];this.onkeydown(this.domNode,(e=>{if(e.equals(15)||e.equals(17)||e.equals(9)){let t=h.indexOf(document.activeElement);if(t>=0){let n=-1;e.equals(17)?n=(t+1)%h.length:e.equals(15)&&(n=0===t?h.length-1:t-1),e.equals(9)?(h[t].blur(),this.inputBox.focus()):n>=0&&h[n].focus(),G.zB.stop(e,!0)}}}));let u=document.createElement("div");u.className="controls",u.style.display=this._showOptionButtons?"block":"none",u.appendChild(this.caseSensitive.domNode),u.appendChild(this.wholeWords.domNode),u.appendChild(this.regex.domNode),this.domNode.appendChild(u),e&&e.appendChild(this.domNode),this._register(G.nm(this.inputBox.inputElement,"compositionstart",(e=>{this.imeSessionInProgress=!0}))),this._register(G.nm(this.inputBox.inputElement,"compositionend",(e=>{this.imeSessionInProgress=!1,this._onInput.fire()}))),this.onkeydown(this.inputBox.inputElement,(e=>this._onKeyDown.fire(e))),this.onkeyup(this.inputBox.inputElement,(e=>this._onKeyUp.fire(e))),this.oninput(this.inputBox.inputElement,(e=>this._onInput.fire())),this.onmousedown(this.inputBox.inputElement,(e=>this._onMouseDown.fire(e)))}enable(){this.domNode.classList.remove("disabled"),this.inputBox.enable(),this.regex.enable(),this.wholeWords.enable(),this.caseSensitive.enable()}disable(){this.domNode.classList.add("disabled"),this.inputBox.disable(),this.regex.disable(),this.wholeWords.disable(),this.caseSensitive.disable()}setFocusInputOnOptionClick(e){this.fixFocusOnOptionClickEnabled=e}setEnabled(e){e?this.enable():this.disable()}getValue(){return this.inputBox.value}setValue(e){this.inputBox.value!==e&&(this.inputBox.value=e)}style(e){this.inputActiveOptionBorder=e.inputActiveOptionBorder,this.inputActiveOptionForeground=e.inputActiveOptionForeground,this.inputActiveOptionBackground=e.inputActiveOptionBackground,this.inputBackground=e.inputBackground,this.inputForeground=e.inputForeground,this.inputBorder=e.inputBorder,this.inputValidationInfoBackground=e.inputValidationInfoBackground,this.inputValidationInfoForeground=e.inputValidationInfoForeground,this.inputValidationInfoBorder=e.inputValidationInfoBorder,this.inputValidationWarningBackground=e.inputValidationWarningBackground,this.inputValidationWarningForeground=e.inputValidationWarningForeground,this.inputValidationWarningBorder=e.inputValidationWarningBorder,this.inputValidationErrorBackground=e.inputValidationErrorBackground,this.inputValidationErrorForeground=e.inputValidationErrorForeground,this.inputValidationErrorBorder=e.inputValidationErrorBorder,this.applyStyles()}applyStyles(){if(this.domNode){const e={inputActiveOptionBorder:this.inputActiveOptionBorder,inputActiveOptionForeground:this.inputActiveOptionForeground,inputActiveOptionBackground:this.inputActiveOptionBackground};this.regex.style(e),this.wholeWords.style(e),this.caseSensitive.style(e);const t={inputBackground:this.inputBackground,inputForeground:this.inputForeground,inputBorder:this.inputBorder,inputValidationInfoBackground:this.inputValidationInfoBackground,inputValidationInfoForeground:this.inputValidationInfoForeground,inputValidationInfoBorder:this.inputValidationInfoBorder,inputValidationWarningBackground:this.inputValidationWarningBackground,inputValidationWarningForeground:this.inputValidationWarningForeground,inputValidationWarningBorder:this.inputValidationWarningBorder,inputValidationErrorBackground:this.inputValidationErrorBackground,inputValidationErrorForeground:this.inputValidationErrorForeground,inputValidationErrorBorder:this.inputValidationErrorBorder};this.inputBox.style(t)}}select(){this.inputBox.select()}focus(){this.inputBox.focus()}getCaseSensitive(){return this.caseSensitive.checked}setCaseSensitive(e){this.caseSensitive.checked=e}getWholeWords(){return this.wholeWords.checked}setWholeWords(e){this.wholeWords.checked=e}getRegex(){return this.regex.checked}setRegex(e){this.regex.checked=e,this.validate()}focusOnCaseSensitive(){this.caseSensitive.focus()}highlightFindOptions(){this.domNode.classList.remove("highlight-"+this._lastHighlightFindOptions),this._lastHighlightFindOptions=1-this._lastHighlightFindOptions,this.domNode.classList.add("highlight-"+this._lastHighlightFindOptions)}validate(){this.inputBox.validate()}clearMessage(){this.inputBox.hideMessage()}}var Pe=n(9989);const Fe=i.N("defaultLabel","input"),We=i.N("label.preserveCaseCheckbox","Preserve Case");class ze extends fe{constructor(e){super({icon:pe.lA.preserveCase,title:We+e.appendTitle,isChecked:e.isChecked,inputActiveOptionBorder:e.inputActiveOptionBorder,inputActiveOptionForeground:e.inputActiveOptionForeground,inputActiveOptionBackground:e.inputActiveOptionBackground})}}class Ve extends he.${constructor(e,t,n,i){super(),this._showOptionButtons=n,this.fixFocusOnOptionClickEnabled=!0,this.cachedOptionsWidth=0,this._onDidOptionChange=this._register(new ge.Q5),this.onDidOptionChange=this._onDidOptionChange.event,this._onKeyDown=this._register(new ge.Q5),this.onKeyDown=this._onKeyDown.event,this._onMouseDown=this._register(new ge.Q5),this._onInput=this._register(new ge.Q5),this._onKeyUp=this._register(new ge.Q5),this._onPreserveCaseKeyDown=this._register(new ge.Q5),this.onPreserveCaseKeyDown=this._onPreserveCaseKeyDown.event,this.contextViewProvider=t,this.placeholder=i.placeholder||"",this.validation=i.validation,this.label=i.label||Fe,this.inputActiveOptionBorder=i.inputActiveOptionBorder,this.inputActiveOptionForeground=i.inputActiveOptionForeground,this.inputActiveOptionBackground=i.inputActiveOptionBackground,this.inputBackground=i.inputBackground,this.inputForeground=i.inputForeground,this.inputBorder=i.inputBorder,this.inputValidationInfoBorder=i.inputValidationInfoBorder,this.inputValidationInfoBackground=i.inputValidationInfoBackground,this.inputValidationInfoForeground=i.inputValidationInfoForeground,this.inputValidationWarningBorder=i.inputValidationWarningBorder,this.inputValidationWarningBackground=i.inputValidationWarningBackground,this.inputValidationWarningForeground=i.inputValidationWarningForeground,this.inputValidationErrorBorder=i.inputValidationErrorBorder,this.inputValidationErrorBackground=i.inputValidationErrorBackground,this.inputValidationErrorForeground=i.inputValidationErrorForeground;const o=i.appendPreserveCaseLabel||"",r=i.history||[],s=!!i.flexibleHeight,a=!!i.flexibleWidth,l=i.flexibleMaxHeight;this.domNode=document.createElement("div"),this.domNode.classList.add("monaco-findInput"),this.inputBox=this._register(new Re.p(this.domNode,this.contextViewProvider,{ariaLabel:this.label||"",placeholder:this.placeholder||"",validationOptions:{validation:this.validation},inputBackground:this.inputBackground,inputForeground:this.inputForeground,inputBorder:this.inputBorder,inputValidationInfoBackground:this.inputValidationInfoBackground,inputValidationInfoForeground:this.inputValidationInfoForeground,inputValidationInfoBorder:this.inputValidationInfoBorder,inputValidationWarningBackground:this.inputValidationWarningBackground,inputValidationWarningForeground:this.inputValidationWarningForeground,inputValidationWarningBorder:this.inputValidationWarningBorder,inputValidationErrorBackground:this.inputValidationErrorBackground,inputValidationErrorForeground:this.inputValidationErrorForeground,inputValidationErrorBorder:this.inputValidationErrorBorder,history:r,flexibleHeight:s,flexibleWidth:a,flexibleMaxHeight:l})),this.preserveCase=this._register(new ze({appendTitle:o,isChecked:!1,inputActiveOptionBorder:this.inputActiveOptionBorder,inputActiveOptionForeground:this.inputActiveOptionForeground,inputActiveOptionBackground:this.inputActiveOptionBackground})),this._register(this.preserveCase.onChange((e=>{this._onDidOptionChange.fire(e),!e&&this.fixFocusOnOptionClickEnabled&&this.inputBox.focus(),this.validate()}))),this._register(this.preserveCase.onKeyDown((e=>{this._onPreserveCaseKeyDown.fire(e)}))),this._showOptionButtons?this.cachedOptionsWidth=this.preserveCase.width():this.cachedOptionsWidth=0;let d=[this.preserveCase.domNode];this.onkeydown(this.domNode,(e=>{if(e.equals(15)||e.equals(17)||e.equals(9)){let t=d.indexOf(document.activeElement);if(t>=0){let n=-1;e.equals(17)?n=(t+1)%d.length:e.equals(15)&&(n=0===t?d.length-1:t-1),e.equals(9)?(d[t].blur(),this.inputBox.focus()):n>=0&&d[n].focus(),G.zB.stop(e,!0)}}}));let c=document.createElement("div");c.className="controls",c.style.display=this._showOptionButtons?"block":"none",c.appendChild(this.preserveCase.domNode),this.domNode.appendChild(c),e&&e.appendChild(this.domNode),this.onkeydown(this.inputBox.inputElement,(e=>this._onKeyDown.fire(e))),this.onkeyup(this.inputBox.inputElement,(e=>this._onKeyUp.fire(e))),this.oninput(this.inputBox.inputElement,(e=>this._onInput.fire())),this.onmousedown(this.inputBox.inputElement,(e=>this._onMouseDown.fire(e)))}enable(){this.domNode.classList.remove("disabled"),this.inputBox.enable(),this.preserveCase.enable()}disable(){this.domNode.classList.add("disabled"),this.inputBox.disable(),this.preserveCase.disable()}setEnabled(e){e?this.enable():this.disable()}style(e){this.inputActiveOptionBorder=e.inputActiveOptionBorder,this.inputActiveOptionForeground=e.inputActiveOptionForeground,this.inputActiveOptionBackground=e.inputActiveOptionBackground,this.inputBackground=e.inputBackground,this.inputForeground=e.inputForeground,this.inputBorder=e.inputBorder,this.inputValidationInfoBackground=e.inputValidationInfoBackground,this.inputValidationInfoForeground=e.inputValidationInfoForeground,this.inputValidationInfoBorder=e.inputValidationInfoBorder,this.inputValidationWarningBackground=e.inputValidationWarningBackground,this.inputValidationWarningForeground=e.inputValidationWarningForeground,this.inputValidationWarningBorder=e.inputValidationWarningBorder,this.inputValidationErrorBackground=e.inputValidationErrorBackground,this.inputValidationErrorForeground=e.inputValidationErrorForeground,this.inputValidationErrorBorder=e.inputValidationErrorBorder,this.applyStyles()}applyStyles(){if(this.domNode){const e={inputActiveOptionBorder:this.inputActiveOptionBorder,inputActiveOptionForeground:this.inputActiveOptionForeground,inputActiveOptionBackground:this.inputActiveOptionBackground};this.preserveCase.style(e);const t={inputBackground:this.inputBackground,inputForeground:this.inputForeground,inputBorder:this.inputBorder,inputValidationInfoBackground:this.inputValidationInfoBackground,inputValidationInfoForeground:this.inputValidationInfoForeground,inputValidationInfoBorder:this.inputValidationInfoBorder,inputValidationWarningBackground:this.inputValidationWarningBackground,inputValidationWarningForeground:this.inputValidationWarningForeground,inputValidationWarningBorder:this.inputValidationWarningBorder,inputValidationErrorBackground:this.inputValidationErrorBackground,inputValidationErrorForeground:this.inputValidationErrorForeground,inputValidationErrorBorder:this.inputValidationErrorBorder};this.inputBox.style(t)}}select(){this.inputBox.select()}focus(){this.inputBox.focus()}getPreserveCase(){return this.preserveCase.checked}setPreserveCase(e){this.preserveCase.checked=e}focusOnPreserve(){this.preserveCase.focus()}validate(){this.inputBox&&this.inputBox.validate()}set width(e){this.inputBox.paddingRight=this.cachedOptionsWidth,this.inputBox.width=e,this.domNode.style.width=e+"px"}dispose(){super.dispose()}}var He=function(e,t,n,i){var o,r=arguments.length,s=r<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,i);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,n,s):o(t,n))||s);return r>3&&s&&Object.defineProperty(t,n,s),s},je=function(e,t){return function(n,i){t(n,i,e)}};const $e="historyNavigationWidget",Ue="historyNavigationEnabled";function Ze(e,t){return e.getContext(document.activeElement).getValue(t)}function Ke(e,t){const n=function(e,t){return e.createScoped(t.target)}(e,t);return function(e,t,n){new E.uy("historyNavigationWidget",t).bindTo(e)}(n,t),{scopedContextKeyService:n,historyNavigationEnablement:new E.uy(Ue,!0).bindTo(n)}}let qe=class extends Be{constructor(e,t,n,i,o=!1){super(e,t,o,n),this._register(Ke(i,{target:this.inputBox.element,historyNavigator:this.inputBox}).scopedContextKeyService)}};qe=He([je(3,E.i6)],qe);let Ye=class extends Ve{constructor(e,t,n,i,o=!1){super(e,t,o,n),this._register(Ke(i,{target:this.inputBox.element,historyNavigator:this.inputBox}).scopedContextKeyService)}};Ye=He([je(3,E.i6)],Ye),Pe.W.registerCommandAndKeybindingRule({id:"history.showPrevious",weight:200,when:E.Ao.and(E.Ao.has($e),E.Ao.equals(Ue,!0)),primary:16,secondary:[528],handler:(e,t)=>{const n=Ze(e.get(E.i6),$e);n&&n.historyNavigator.showPreviousValue()}}),Pe.W.registerCommandAndKeybindingRule({id:"history.showNext",weight:200,when:E.Ao.and(E.Ao.has($e),E.Ao.equals(Ue,!0)),primary:18,secondary:[530],handler:(e,t)=>{const n=Ze(e.get(E.i6),$e);n&&n.historyNavigator.showNextValue()}});var Ge=n(9554);const Qe=(0,Ge.q5)("find-selection",pe.lA.selection,i.N("findSelectionIcon","Icon for 'Find in Selection' in the editor find widget.")),Xe=(0,Ge.q5)("find-collapsed",pe.lA.chevronRight,i.N("findCollapsedIcon","Icon to indicate that the editor find widget is collapsed.")),Je=(0,Ge.q5)("find-expanded",pe.lA.chevronDown,i.N("findExpandedIcon","Icon to indicate that the editor find widget is expanded.")),et=(0,Ge.q5)("find-replace",pe.lA.replace,i.N("findReplaceIcon","Icon for 'Replace' in the editor find widget.")),tt=(0,Ge.q5)("find-replace-all",pe.lA.replaceAll,i.N("findReplaceAllIcon","Icon for 'Replace All' in the editor find widget.")),nt=(0,Ge.q5)("find-previous-match",pe.lA.arrowUp,i.N("findPreviousMatchIcon","Icon for 'Find Previous' in the editor find widget.")),it=(0,Ge.q5)("find-next-match",pe.lA.arrowDown,i.N("findNextMatchIcon","Icon for 'Find Next' in the editor find widget.")),ot=i.N("label.find","Find"),rt=i.N("placeholder.find","Find"),st=i.N("label.previousMatchButton","Previous Match"),at=i.N("label.nextMatchButton","Next Match"),lt=i.N("label.toggleSelectionFind","Find in Selection"),dt=i.N("label.closeButton","Close"),ct=i.N("label.replace","Replace"),ht=i.N("placeholder.replace","Replace"),ut=i.N("label.replaceButton","Replace"),gt=i.N("label.replaceAllButton","Replace All"),pt=i.N("label.toggleReplaceButton","Toggle Replace"),mt=i.N("title.matchesCountLimit","Only the first {0} results are highlighted, but all find operations work on the entire text.",q),ft=i.N("label.matchesLocation","{0} of {1}"),_t=i.N("label.noResults","No results"),bt=419;let Ct=69;const vt="ctrlEnterReplaceAll.windows.donotask",wt=Ie.dz?256:2048;class yt{constructor(e){this.afterLineNumber=e,this.heightInPx=33,this.suppressMouseDown=!1,this.domNode=document.createElement("div"),this.domNode.className="dock-find-viewzone"}}function At(e,t,n){const i=!!t.match(/\n/);n&&i&&n.selectionStart>0&&e.stopPropagation()}function St(e,t,n){const i=!!t.match(/\n/);n&&i&&n.selectionEndthis._updateHistoryDelayer.cancel()))),this._register(this._state.onFindReplaceStateChange((e=>this._onStateChanged(e)))),this._buildDomNode(),this._updateButtons(),this._tryUpdateWidgetWidth(),this._findInput.inputBox.layout(),this._register(this._codeEditor.onDidChangeConfiguration((e=>{if(e.hasChanged(79)&&(this._codeEditor.getOption(79)&&this._state.change({isReplaceRevealed:!1},!1),this._updateButtons()),e.hasChanged(129)&&this._tryUpdateWidgetWidth(),e.hasChanged(2)&&this.updateAccessibilitySupport(),e.hasChanged(33)){const e=this._codeEditor.getOption(33).addExtraSpaceOnTop;e&&!this._viewZone&&(this._viewZone=new yt(0),this._showViewZone()),!e&&this._viewZone&&this._removeViewZone()}}))),this.updateAccessibilitySupport(),this._register(this._codeEditor.onDidChangeCursorSelection((()=>{this._isVisible&&this._updateToggleSelectionFindButton()}))),this._register(this._codeEditor.onDidFocusEditorWidget((()=>{return e=this,t=void 0,i=function*(){if(this._isVisible){let e=yield this._controller.getGlobalBufferTerm();e&&e!==this._state.searchString&&(this._state.change({searchString:e},!1),this._findInput.select())}},new((n=void 0)||(n=Promise))((function(o,r){function s(e){try{l(i.next(e))}catch(e){r(e)}}function a(e){try{l(i.throw(e))}catch(e){r(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,a)}l((i=i.apply(e,t||[])).next())}));var e,t,n,i}))),this._findInputFocused=I.bindTo(a),this._findFocusTracker=this._register(G.go(this._findInput.inputBox.inputElement)),this._register(this._findFocusTracker.onDidFocus((()=>{this._findInputFocused.set(!0),this._updateSearchScope()}))),this._register(this._findFocusTracker.onDidBlur((()=>{this._findInputFocused.set(!1)}))),this._replaceInputFocused=M.bindTo(a),this._replaceFocusTracker=this._register(G.go(this._replaceInput.inputBox.inputElement)),this._register(this._replaceFocusTracker.onDidFocus((()=>{this._replaceInputFocused.set(!0),this._updateSearchScope()}))),this._register(this._replaceFocusTracker.onDidBlur((()=>{this._replaceInputFocused.set(!1)}))),this._codeEditor.addOverlayWidget(this),this._codeEditor.getOption(33).addExtraSpaceOnTop&&(this._viewZone=new yt(0)),this._applyTheme(l.getColorTheme()),this._register(l.onDidColorThemeChange(this._applyTheme.bind(this))),this._register(this._codeEditor.onDidChangeModel((()=>{this._isVisible&&(this._viewZoneId=void 0)}))),this._register(this._codeEditor.onDidScrollChange((e=>{e.scrollTopChanged?this._layoutViewZone():setTimeout((()=>{this._layoutViewZone()}),0)})))}getId(){return xt.ID}getDomNode(){return this._domNode}getPosition(){return this._isVisible?{preference:0}:null}_onStateChanged(e){if(e.searchString){try{this._ignoreChangeEvent=!0,this._findInput.setValue(this._state.searchString)}finally{this._ignoreChangeEvent=!1}this._updateButtons()}if(e.replaceString&&(this._replaceInput.inputBox.value=this._state.replaceString),e.isRevealed&&(this._state.isRevealed?this._reveal():this._hide(!0)),e.isReplaceRevealed&&(this._state.isReplaceRevealed?this._codeEditor.getOption(79)||this._isReplaceVisible||(this._isReplaceVisible=!0,this._replaceInput.width=G.w(this._findInput.domNode),this._updateButtons(),this._replaceInput.inputBox.layout()):this._isReplaceVisible&&(this._isReplaceVisible=!1,this._updateButtons())),(e.isRevealed||e.isReplaceRevealed)&&(this._state.isRevealed||this._state.isReplaceRevealed)&&this._tryUpdateHeight()&&this._showViewZone(),e.isRegex&&this._findInput.setRegex(this._state.isRegex),e.wholeWord&&this._findInput.setWholeWords(this._state.wholeWord),e.matchCase&&this._findInput.setCaseSensitive(this._state.matchCase),e.preserveCase&&this._replaceInput.setPreserveCase(this._state.preserveCase),e.searchScope&&(this._state.searchScope?this._toggleSelectionFind.checked=!0:this._toggleSelectionFind.checked=!1,this._updateToggleSelectionFindButton()),e.searchString||e.matchesCount||e.matchesPosition){let e=this._state.searchString.length>0&&0===this._state.matchesCount;this._domNode.classList.toggle("no-results",e),this._updateMatchesCount(),this._updateButtons()}(e.searchString||e.currentMatch)&&this._layoutViewZone(),e.updateHistory&&this._delayedUpdateHistory(),e.loop&&this._updateButtons()}_delayedUpdateHistory(){this._updateHistoryDelayer.trigger(this._updateHistory.bind(this)).then(void 0,De.dL)}_updateHistory(){this._state.searchString&&this._findInput.inputBox.addToHistory(),this._state.replaceString&&this._replaceInput.inputBox.addToHistory()}_updateMatchesCount(){let e;if(this._matchesCount.style.minWidth=Ct+"px",this._state.matchesCount>=q?this._matchesCount.title=mt:this._matchesCount.title="",this._matchesCount.firstChild&&this._matchesCount.removeChild(this._matchesCount.firstChild),this._state.matchesCount>0){let t=String(this._state.matchesCount);this._state.matchesCount>=q&&(t+="+");let n=String(this._state.matchesPosition);"0"===n&&(n="?"),e=s.WU(ft,n,t)}else e=_t;this._matchesCount.appendChild(document.createTextNode(e)),(0,Ee.Z9)(this._getAriaLabel(e,this._state.currentMatch,this._state.searchString)),Ct=Math.max(Ct,this._matchesCount.clientWidth)}_getAriaLabel(e,t,n){if(e===_t)return""===n?i.N("ariaSearchNoResultEmpty","{0} found",e):i.N("ariaSearchNoResult","{0} found for '{1}'",e,n);if(t){const o=i.N("ariaSearchNoResultWithLineNum","{0} found for '{1}', at {2}",e,n,t.startLineNumber+":"+t.startColumn),r=this._codeEditor.getModel();return r&&t.startLineNumber<=r.getLineCount()&&t.startLineNumber>=1?`${r.getLineContent(t.startLineNumber)}, ${o}`:o}return i.N("ariaSearchNoResultWithLineNumNoCurrentMatch","{0} found for '{1}'",e,n)}_updateToggleSelectionFindButton(){let e=this._codeEditor.getSelection(),t=!!e&&(e.startLineNumber!==e.endLineNumber||e.startColumn!==e.endColumn),n=this._toggleSelectionFind.checked;this._isVisible&&(n||t)?this._toggleSelectionFind.enable():this._toggleSelectionFind.disable()}_updateButtons(){this._findInput.setEnabled(this._isVisible),this._replaceInput.setEnabled(this._isVisible&&this._isReplaceVisible),this._updateToggleSelectionFindButton(),this._closeBtn.setEnabled(this._isVisible);let e=this._state.searchString.length>0,t=!!this._state.matchesCount;this._prevBtn.setEnabled(this._isVisible&&e&&t&&this._state.canNavigateBack()),this._nextBtn.setEnabled(this._isVisible&&e&&t&&this._state.canNavigateForward()),this._replaceBtn.setEnabled(this._isVisible&&this._isReplaceVisible&&e),this._replaceAllBtn.setEnabled(this._isVisible&&this._isReplaceVisible&&e),this._domNode.classList.toggle("replaceToggled",this._isReplaceVisible),this._toggleReplaceBtn.setExpanded(this._isReplaceVisible);let n=!this._codeEditor.getOption(79);this._toggleReplaceBtn.setEnabled(this._isVisible&&n)}_reveal(){if(this._revealTimeouts.forEach((e=>{clearTimeout(e)})),this._revealTimeouts=[],!this._isVisible){this._isVisible=!0;const e=this._codeEditor.getSelection();switch(this._codeEditor.getOption(33).autoFindInSelection){case"always":this._toggleSelectionFind.checked=!0;break;case"never":this._toggleSelectionFind.checked=!1;break;case"multiline":const t=!!e&&e.startLineNumber!==e.endLineNumber;this._toggleSelectionFind.checked=t}this._tryUpdateWidgetWidth(),this._updateButtons(),this._revealTimeouts.push(setTimeout((()=>{this._domNode.classList.add("visible"),this._domNode.setAttribute("aria-hidden","false")}),0)),this._revealTimeouts.push(setTimeout((()=>{this._findInput.validate()}),200)),this._codeEditor.layoutOverlayWidget(this);let t=!0;if(this._codeEditor.getOption(33).seedSearchStringFromSelection&&e){const n=this._codeEditor.getDomNode();if(n){const i=G.i(n),o=this._codeEditor.getScrolledVisiblePosition(e.getStartPosition()),r=i.left+(o?o.left:0),s=o?o.top:0;if(this._viewZone&&se.startLineNumber&&(t=!1);const n=G.xQ(this._domNode).left;r>n&&(t=!1);const o=this._codeEditor.getScrolledVisiblePosition(e.getEndPosition());i.left+(o?o.left:0)>n&&(t=!1)}}}this._showViewZone(t)}}_hide(e){this._revealTimeouts.forEach((e=>{clearTimeout(e)})),this._revealTimeouts=[],this._isVisible&&(this._isVisible=!1,this._updateButtons(),this._domNode.classList.remove("visible"),this._domNode.setAttribute("aria-hidden","true"),this._findInput.clearMessage(),e&&this._codeEditor.focus(),this._codeEditor.layoutOverlayWidget(this),this._removeViewZone())}_layoutViewZone(e){if(!this._codeEditor.getOption(33).addExtraSpaceOnTop)return void this._removeViewZone();if(!this._isVisible)return;const t=this._viewZone;void 0===this._viewZoneId&&t&&this._codeEditor.changeViewZones((n=>{t.heightInPx=this._getHeight(),this._viewZoneId=n.addZone(t),this._codeEditor.setScrollTop(e||this._codeEditor.getScrollTop()+t.heightInPx)}))}_showViewZone(e=!0){if(!this._isVisible)return;if(!this._codeEditor.getOption(33).addExtraSpaceOnTop)return;void 0===this._viewZone&&(this._viewZone=new yt(0));const t=this._viewZone;this._codeEditor.changeViewZones((n=>{if(void 0!==this._viewZoneId){const i=this._getHeight();if(i===t.heightInPx)return;let o=i-t.heightInPx;return t.heightInPx=i,n.layoutZone(this._viewZoneId),void(e&&this._codeEditor.setScrollTop(this._codeEditor.getScrollTop()+o))}{let i=this._getHeight();if(i-=this._codeEditor.getOption(73).top,i<=0)return;t.heightInPx=i,this._viewZoneId=n.addZone(t),e&&this._codeEditor.setScrollTop(this._codeEditor.getScrollTop()+i)}}))}_removeViewZone(){this._codeEditor.changeViewZones((e=>{void 0!==this._viewZoneId&&(e.removeZone(this._viewZoneId),this._viewZoneId=void 0,this._viewZone&&(this._codeEditor.setScrollTop(this._codeEditor.getScrollTop()-this._viewZone.heightInPx),this._viewZone=void 0))}))}_applyTheme(e){let t={inputActiveOptionBorder:e.getColor(f.PR),inputActiveOptionBackground:e.getColor(f.XE),inputActiveOptionForeground:e.getColor(f.Pv),inputBackground:e.getColor(f.sE),inputForeground:e.getColor(f.zJ),inputBorder:e.getColor(f.dt),inputValidationInfoBackground:e.getColor(f._l),inputValidationInfoForeground:e.getColor(f.YI),inputValidationInfoBorder:e.getColor(f.EP),inputValidationWarningBackground:e.getColor(f.RV),inputValidationWarningForeground:e.getColor(f.SU),inputValidationWarningBorder:e.getColor(f.C3),inputValidationErrorBackground:e.getColor(f.p),inputValidationErrorForeground:e.getColor(f._t),inputValidationErrorBorder:e.getColor(f.OZ)};this._findInput.style(t),this._replaceInput.style(t),this._toggleSelectionFind.style(t)}_tryUpdateWidgetWidth(){if(!this._isVisible)return;if(!G.Uw(this._domNode))return;const e=this._codeEditor.getLayoutInfo();if(e.contentWidth<=0)return void this._domNode.classList.add("hiddenEditor");this._domNode.classList.contains("hiddenEditor")&&this._domNode.classList.remove("hiddenEditor");const t=e.width,n=e.minimap.minimapWidth;let i=!1,o=!1,r=!1;if(this._resized&&G.w(this._domNode)>bt)return this._domNode.style.maxWidth=t-28-n-15+"px",void(this._replaceInput.width=G.w(this._findInput.domNode));if(447+n>=t&&(o=!0),447+n-Ct>=t&&(r=!0),447+n-Ct>=t+50&&(i=!0),this._domNode.classList.toggle("collapsed-find-widget",i),this._domNode.classList.toggle("narrow-find-widget",r),this._domNode.classList.toggle("reduced-find-widget",o),r||i||(this._domNode.style.maxWidth=t-28-n-15+"px"),this._resized){this._findInput.inputBox.layout();let e=this._findInput.inputBox.element.clientWidth;e>0&&(this._replaceInput.width=e)}else this._isReplaceVisible&&(this._replaceInput.width=G.w(this._findInput.domNode))}_getHeight(){let e=0;return e+=4,e+=this._findInput.inputBox.height+2,this._isReplaceVisible&&(e+=4,e+=this._replaceInput.inputBox.height+2),e+=4,e}_tryUpdateHeight(){const e=this._getHeight();return(null===this._cachedHeight||this._cachedHeight!==e)&&(this._cachedHeight=e,this._domNode.style.height=`${e}px`,!0)}focusFindInput(){this._findInput.select(),this._findInput.focus()}focusReplaceInput(){this._replaceInput.select(),this._replaceInput.focus()}highlightFindOptions(){this._findInput.highlightFindOptions()}_updateSearchScope(){if(this._codeEditor.hasModel()&&this._toggleSelectionFind.checked){let e=this._codeEditor.getSelections();e.map((e=>{1===e.endColumn&&e.endLineNumber>e.startLineNumber&&(e=e.setEndPosition(e.endLineNumber-1,this._codeEditor.getModel().getLineMaxColumn(e.endLineNumber-1)));const t=this._state.currentMatch;return e.startLineNumber===e.endLineNumber||h.e.equalsRange(e,t)?null:e})).filter((e=>!!e)),e.length&&this._state.change({searchScope:e},!0)}}_onFindInputMouseDown(e){e.middleButton&&e.stopPropagation()}_onFindInputKeyDown(e){return e.equals(3|wt)?(this._findInput.inputBox.insertAtCursor("\n"),void e.preventDefault()):e.equals(2)?(this._isReplaceVisible?this._replaceInput.focus():this._findInput.focusOnCaseSensitive(),void e.preventDefault()):e.equals(2066)?(this._codeEditor.focus(),void e.preventDefault()):e.equals(16)?At(e,this._findInput.getValue(),this._findInput.domNode.querySelector("textarea")):e.equals(18)?St(e,this._findInput.getValue(),this._findInput.domNode.querySelector("textarea")):void 0}_onReplaceInputKeyDown(e){return e.equals(3|wt)?(Ie.ED&&Ie.tY&&!this._ctrlEnterReplaceAllWarningPrompted&&(this._notificationService.info(i.N("ctrlEnter.keybindingChanged","Ctrl+Enter now inserts line break instead of replacing all. You can modify the keybinding for editor.action.replaceAll to override this behavior.")),this._ctrlEnterReplaceAllWarningPrompted=!0,this._storageService.store(vt,!0,0,0)),this._replaceInput.inputBox.insertAtCursor("\n"),void e.preventDefault()):e.equals(2)?(this._findInput.focusOnCaseSensitive(),void e.preventDefault()):e.equals(1026)?(this._findInput.focus(),void e.preventDefault()):e.equals(2066)?(this._codeEditor.focus(),void e.preventDefault()):e.equals(16)?At(e,this._replaceInput.inputBox.value,this._replaceInput.inputBox.element.querySelector("textarea")):e.equals(18)?St(e,this._replaceInput.inputBox.value,this._replaceInput.inputBox.element.querySelector("textarea")):void 0}getVerticalSashLeft(e){return 0}_keybindingLabelFor(e){let t=this._keybindingService.lookupKeybinding(e);return t?` (${t.getLabel()})`:""}_buildDomNode(){this._findInput=this._register(new qe(null,this._contextViewProvider,{width:221,label:ot,placeholder:rt,appendCaseSensitiveLabel:this._keybindingLabelFor(V),appendWholeWordsLabel:this._keybindingLabelFor(H),appendRegexLabel:this._keybindingLabelFor(j),validation:e=>{if(0===e.length||!this._findInput.getRegex())return null;try{return new RegExp(e,"gu"),null}catch(e){return{content:e.message}}},flexibleHeight:!0,flexibleWidth:!0,flexibleMaxHeight:118},this._contextKeyService,!0)),this._findInput.setRegex(!!this._state.isRegex),this._findInput.setCaseSensitive(!!this._state.matchCase),this._findInput.setWholeWords(!!this._state.wholeWord),this._register(this._findInput.onKeyDown((e=>this._onFindInputKeyDown(e)))),this._register(this._findInput.inputBox.onDidChange((()=>{this._ignoreChangeEvent||this._state.change({searchString:this._findInput.getValue()},!0)}))),this._register(this._findInput.onDidOptionChange((()=>{this._state.change({isRegex:this._findInput.getRegex(),wholeWord:this._findInput.getWholeWords(),matchCase:this._findInput.getCaseSensitive()},!0)}))),this._register(this._findInput.onCaseSensitiveKeyDown((e=>{e.equals(1026)&&this._isReplaceVisible&&(this._replaceInput.focus(),e.preventDefault())}))),this._register(this._findInput.onRegexKeyDown((e=>{e.equals(2)&&this._isReplaceVisible&&(this._replaceInput.focusOnPreserve(),e.preventDefault())}))),this._register(this._findInput.inputBox.onDidHeightChange((e=>{this._tryUpdateHeight()&&this._showViewZone()}))),Ie.IJ&&this._register(this._findInput.onMouseDown((e=>this._onFindInputMouseDown(e)))),this._matchesCount=document.createElement("div"),this._matchesCount.className="matchesCount",this._updateMatchesCount(),this._prevBtn=this._register(new kt({label:st+this._keybindingLabelFor(W),icon:nt,onTrigger:()=>{this._codeEditor.getAction(W).run().then(void 0,De.dL)}})),this._nextBtn=this._register(new kt({label:at+this._keybindingLabelFor(F),icon:it,onTrigger:()=>{this._codeEditor.getAction(F).run().then(void 0,De.dL)}}));let e=document.createElement("div");e.className="find-part",e.appendChild(this._findInput.domNode);const t=document.createElement("div");t.className="find-actions",e.appendChild(t),t.appendChild(this._matchesCount),t.appendChild(this._prevBtn.domNode),t.appendChild(this._nextBtn.domNode),this._toggleSelectionFind=this._register(new fe({icon:Qe,title:lt+this._keybindingLabelFor($),isChecked:!1})),this._register(this._toggleSelectionFind.onChange((()=>{if(this._toggleSelectionFind.checked){if(this._codeEditor.hasModel()){let e=this._codeEditor.getSelections();e.map((e=>(1===e.endColumn&&e.endLineNumber>e.startLineNumber&&(e=e.setEndPosition(e.endLineNumber-1,this._codeEditor.getModel().getLineMaxColumn(e.endLineNumber-1))),e.isEmpty()?null:e))).filter((e=>!!e)),e.length&&this._state.change({searchScope:e},!0)}}else this._state.change({searchScope:null},!0)}))),t.appendChild(this._toggleSelectionFind.domNode),this._closeBtn=this._register(new kt({label:dt+this._keybindingLabelFor(z),icon:Ge.s_,onTrigger:()=>{this._state.change({isRevealed:!1,searchScope:null},!1)},onKeyDown:e=>{e.equals(2)&&this._isReplaceVisible&&(this._replaceBtn.isEnabled()?this._replaceBtn.focus():this._codeEditor.focus(),e.preventDefault())}})),t.appendChild(this._closeBtn.domNode),this._replaceInput=this._register(new Ye(null,void 0,{label:ct,placeholder:ht,appendPreserveCaseLabel:this._keybindingLabelFor(U),history:[],flexibleHeight:!0,flexibleWidth:!0,flexibleMaxHeight:118},this._contextKeyService,!0)),this._replaceInput.setPreserveCase(!!this._state.preserveCase),this._register(this._replaceInput.onKeyDown((e=>this._onReplaceInputKeyDown(e)))),this._register(this._replaceInput.inputBox.onDidChange((()=>{this._state.change({replaceString:this._replaceInput.inputBox.value},!1)}))),this._register(this._replaceInput.inputBox.onDidHeightChange((e=>{this._isReplaceVisible&&this._tryUpdateHeight()&&this._showViewZone()}))),this._register(this._replaceInput.onDidOptionChange((()=>{this._state.change({preserveCase:this._replaceInput.getPreserveCase()},!0)}))),this._register(this._replaceInput.onPreserveCaseKeyDown((e=>{e.equals(2)&&(this._prevBtn.isEnabled()?this._prevBtn.focus():this._nextBtn.isEnabled()?this._nextBtn.focus():this._toggleSelectionFind.enabled?this._toggleSelectionFind.focus():this._closeBtn.isEnabled()&&this._closeBtn.focus(),e.preventDefault())}))),this._replaceBtn=this._register(new kt({label:ut+this._keybindingLabelFor(Z),icon:et,onTrigger:()=>{this._controller.replace()},onKeyDown:e=>{e.equals(1026)&&(this._closeBtn.focus(),e.preventDefault())}})),this._replaceAllBtn=this._register(new kt({label:gt+this._keybindingLabelFor(K),icon:tt,onTrigger:()=>{this._controller.replaceAll()}}));let n=document.createElement("div");n.className="replace-part",n.appendChild(this._replaceInput.domNode);const i=document.createElement("div");i.className="replace-actions",n.appendChild(i),i.appendChild(this._replaceBtn.domNode),i.appendChild(this._replaceAllBtn.domNode),this._toggleReplaceBtn=this._register(new kt({label:pt,className:"codicon toggle left",onTrigger:()=>{this._state.change({isReplaceRevealed:!this._isReplaceVisible},!1),this._isReplaceVisible&&(this._replaceInput.width=G.w(this._findInput.domNode),this._replaceInput.inputBox.layout()),this._showViewZone()}})),this._toggleReplaceBtn.setExpanded(this._isReplaceVisible),this._domNode=document.createElement("div"),this._domNode.className="editor-widget find-widget",this._domNode.setAttribute("aria-hidden","true"),this._domNode.style.width="419px",this._domNode.appendChild(this._toggleReplaceBtn.domNode),this._domNode.appendChild(e),this._domNode.appendChild(n),this._resizeSash=new Ne.g(this._domNode,this,{orientation:0,size:2}),this._resized=!1;let o=bt;this._register(this._resizeSash.onDidStart((()=>{o=G.w(this._domNode)}))),this._register(this._resizeSash.onDidChange((e=>{this._resized=!0;let t=o+e.startX-e.currentX;t(parseFloat(G.Dx(this._domNode).maxWidth)||0)||(this._domNode.style.width=`${t}px`,this._isReplaceVisible&&(this._replaceInput.width=G.w(this._findInput.domNode)),this._findInput.inputBox.layout(),this._tryUpdateHeight())}))),this._register(this._resizeSash.onDidReset((()=>{const e=G.w(this._domNode);if(e{this._opts.onTrigger(),e.preventDefault()})),this.onkeydown(this._domNode,(e=>{if(e.equals(10)||e.equals(3))return this._opts.onTrigger(),void e.preventDefault();this._opts.onKeyDown&&this._opts.onKeyDown(e)}))}get domNode(){return this._domNode}isEnabled(){return this._domNode.tabIndex>=0}focus(){this._domNode.focus()}setEnabled(e){this._domNode.classList.toggle("disabled",!e),this._domNode.setAttribute("aria-disabled",String(!e)),this._domNode.tabIndex=e?0:-1}setExpanded(e){this._domNode.setAttribute("aria-expanded",String(!!e)),e?(this._domNode.classList.remove(..._.kS.asClassNameArray(Xe)),this._domNode.classList.add(..._.kS.asClassNameArray(Je))):(this._domNode.classList.remove(..._.kS.asClassNameArray(Je)),this._domNode.classList.add(..._.kS.asClassNameArray(Xe)))}}(0,_.Ic)(((e,t)=>{const n=(e,n)=>{n&&t.addRule(`.monaco-editor ${e} { background-color: ${n}; }`)};n(".findMatch",e.getColor(f.MU)),n(".currentFindMatch",e.getColor(f.ny)),n(".findScope",e.getColor(f.jU)),n(".find-widget",e.getColor(f.D0));const i=e.getColor(f.rh);i&&t.addRule(`.monaco-editor .find-widget { box-shadow: 0 0 8px 2px ${i}; }`);const o=e.getColor(f.Ei);o&&t.addRule(`.monaco-editor .findMatch { border: 1px ${"hc"===e.type?"dotted":"solid"} ${o}; box-sizing: border-box; }`);const r=e.getColor(f.pn);r&&t.addRule(`.monaco-editor .currentFindMatch { border: 2px solid ${r}; padding: 1px; box-sizing: border-box; }`);const s=e.getColor(f.gk);s&&t.addRule(`.monaco-editor .findScope { border: 1px ${"hc"===e.type?"dashed":"solid"} ${s}; }`);const a=e.getColor(f.lR);a&&t.addRule(`.monaco-editor .find-widget { border: 1px solid ${a}; }`);const l=e.getColor(f.Hf);l&&t.addRule(`.monaco-editor .find-widget { color: ${l}; }`);const d=e.getColor(f.Id);d&&t.addRule(`.monaco-editor .find-widget.no-results .matchesCount { color: ${d}; }`);const c=e.getColor(f.Ng);if(c)t.addRule(`.monaco-editor .find-widget .monaco-sash { background-color: ${c}; }`);else{const n=e.getColor(f.D1);n&&t.addRule(`.monaco-editor .find-widget .monaco-sash { background-color: ${n}; }`)}const h=e.getColor(f.R8);h&&t.addRule(`.monaco-editor .find-widget .monaco-inputbox.synthetic-focus { outline-color: ${h}; }`)}));var Lt=n(4144),Et=n(4972),Nt=n(5606),Dt=n(1847),It=n(6904),Mt=n(9422),Tt=function(e,t,n,i){var o,r=arguments.length,s=r<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,i);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,n,s):o(t,n))||s);return r>3&&s&&Object.defineProperty(t,n,s),s},Rt=function(e,t){return function(n,i){t(n,i,e)}},Ot=function(e,t,n,i){return new(n||(n=Promise))((function(o,r){function s(e){try{l(i.next(e))}catch(e){r(e)}}function a(e){try{l(i.throw(e))}catch(e){r(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,a)}l((i=i.apply(e,t||[])).next())}))};function Bt(e,t="single",n=!1){if(!e.hasModel())return null;const i=e.getSelection();if("single"===t&&i.startLineNumber===i.endLineNumber||"multiple"===t)if(i.isEmpty()){const t=e.getConfiguredWordAtPosition(i.getStartPosition());if(t&&!1===n)return t.word}else if(e.getModel().getValueLengthInRange(i)<524288)return e.getModel().getValueInRange(i);return null}let Pt=class e extends r.JT{constructor(e,t,n,i){super(),this._editor=e,this._findWidgetVisible=D.bindTo(t),this._contextKeyService=t,this._storageService=n,this._clipboardService=i,this._updateHistoryDelayer=new o.vp(500),this._state=this._register(new xe),this.loadQueryState(),this._register(this._state.onFindReplaceStateChange((e=>this._onStateChanged(e)))),this._model=null,this._register(this._editor.onDidChangeModel((()=>{let e=this._editor.getModel()&&this._state.isRevealed;this.disposeModel(),this._state.change({searchScope:null,matchCase:this._storageService.getBoolean("editor.matchCase",1,!1),wholeWord:this._storageService.getBoolean("editor.wholeWord",1,!1),isRegex:this._storageService.getBoolean("editor.isRegex",1,!1),preserveCase:this._storageService.getBoolean("editor.preserveCase",1,!1)},!1),e&&this._start({forceRevealReplace:!1,seedSearchStringFromSelection:"none",seedSearchStringFromNonEmptySelection:!1,seedSearchStringFromGlobalClipboard:!1,shouldFocus:0,shouldAnimate:!1,updateSearchScope:!1,loop:this._editor.getOption(33).loop})})))}get editor(){return this._editor}static get(t){return t.getContribution(e.ID)}dispose(){this.disposeModel(),super.dispose()}disposeModel(){this._model&&(this._model.dispose(),this._model=null)}_onStateChanged(e){this.saveQueryState(e),e.isRevealed&&(this._state.isRevealed?this._findWidgetVisible.set(!0):(this._findWidgetVisible.reset(),this.disposeModel())),e.searchString&&this.setGlobalBufferTerm(this._state.searchString)}saveQueryState(e){e.isRegex&&this._storageService.store("editor.isRegex",this._state.actualIsRegex,1,0),e.wholeWord&&this._storageService.store("editor.wholeWord",this._state.actualWholeWord,1,0),e.matchCase&&this._storageService.store("editor.matchCase",this._state.actualMatchCase,1,0),e.preserveCase&&this._storageService.store("editor.preserveCase",this._state.actualPreserveCase,1,0)}loadQueryState(){this._state.change({matchCase:this._storageService.getBoolean("editor.matchCase",1,this._state.matchCase),wholeWord:this._storageService.getBoolean("editor.wholeWord",1,this._state.wholeWord),isRegex:this._storageService.getBoolean("editor.isRegex",1,this._state.isRegex),preserveCase:this._storageService.getBoolean("editor.preserveCase",1,this._state.preserveCase)},!1)}isFindInputFocused(){return!!I.getValue(this._contextKeyService)}getState(){return this._state}closeFindWidget(){this._state.change({isRevealed:!1,searchScope:null},!1),this._editor.focus()}toggleCaseSensitive(){this._state.change({matchCase:!this._state.matchCase},!1),this._state.isRevealed||this.highlightFindOptions()}toggleWholeWords(){this._state.change({wholeWord:!this._state.wholeWord},!1),this._state.isRevealed||this.highlightFindOptions()}toggleRegex(){this._state.change({isRegex:!this._state.isRegex},!1),this._state.isRevealed||this.highlightFindOptions()}togglePreserveCase(){this._state.change({preserveCase:!this._state.preserveCase},!1),this._state.isRevealed||this.highlightFindOptions()}toggleSearchScope(){if(this._state.searchScope)this._state.change({searchScope:null},!0);else if(this._editor.hasModel()){let e=this._editor.getSelections();e.map((e=>(1===e.endColumn&&e.endLineNumber>e.startLineNumber&&(e=e.setEndPosition(e.endLineNumber-1,this._editor.getModel().getLineMaxColumn(e.endLineNumber-1))),e.isEmpty()?null:e))).filter((e=>!!e)),e.length&&this._state.change({searchScope:e},!0)}}setSearchString(e){this._state.isRegex&&(e=s.ec(e)),this._state.change({searchString:e},!1)}highlightFindOptions(e=!1){}_start(e){return Ot(this,void 0,void 0,(function*(){if(this.disposeModel(),!this._editor.hasModel())return;let t={isRevealed:!0};if("single"===e.seedSearchStringFromSelection){let n=Bt(this._editor,e.seedSearchStringFromSelection,e.seedSearchStringFromNonEmptySelection);n&&(this._state.isRegex?t.searchString=s.ec(n):t.searchString=n)}else if("multiple"===e.seedSearchStringFromSelection&&!e.updateSearchScope){let n=Bt(this._editor,e.seedSearchStringFromSelection);n&&(t.searchString=n)}if(!t.searchString&&e.seedSearchStringFromGlobalClipboard){let e=yield this.getGlobalBufferTerm();if(!this._editor.hasModel())return;e&&(t.searchString=e)}if(e.forceRevealReplace?t.isReplaceRevealed=!0:this._findWidgetVisible.get()||(t.isReplaceRevealed=!1),e.updateSearchScope){let e=this._editor.getSelections();e.some((e=>!e.isEmpty()))&&(t.searchScope=e)}t.loop=e.loop,this._state.change(t,!1),this._model||(this._model=new Y(this._editor,this._state))}))}start(e){return this._start(e)}moveToNextMatch(){return!!this._model&&(this._model.moveToNextMatch(),!0)}moveToPrevMatch(){return!!this._model&&(this._model.moveToPrevMatch(),!0)}replace(){return!!this._model&&(this._model.replace(),!0)}replaceAll(){return!!this._model&&(this._model.replaceAll(),!0)}selectAllMatches(){return!!this._model&&(this._model.selectAllMatches(),this._editor.focus(),!0)}getGlobalBufferTerm(){return Ot(this,void 0,void 0,(function*(){return this._editor.getOption(33).globalFindClipboard&&this._editor.hasModel()&&!this._editor.getModel().isTooLargeForSyncing()?this._clipboardService.readFindText():""}))}setGlobalBufferTerm(e){this._editor.getOption(33).globalFindClipboard&&this._editor.hasModel()&&!this._editor.getModel().isTooLargeForSyncing()&&this._clipboardService.writeFindText(e)}};Pt.ID="editor.contrib.findController",Pt=Tt([Rt(1,E.i6),Rt(2,It.Uy),Rt(3,Et.p)],Pt);let Ft=class extends Pt{constructor(e,t,n,i,o,r,s,a){super(e,n,s,a),this._contextViewService=t,this._keybindingService=i,this._themeService=o,this._notificationService=r,this._widget=null,this._findOptionsWidget=null}_start(e){const t=Object.create(null,{_start:{get:()=>super._start}});return Ot(this,void 0,void 0,(function*(){this._widget||this._createFindWidget();const n=this._editor.getSelection();let i=!1;switch(this._editor.getOption(33).autoFindInSelection){case"always":i=!0;break;case"never":i=!1;break;case"multiline":i=!!n&&n.startLineNumber!==n.endLineNumber}e.updateSearchScope=i,yield t._start.call(this,e),this._widget&&(2===e.shouldFocus?this._widget.focusReplaceInput():1===e.shouldFocus&&this._widget.focusFindInput())}))}highlightFindOptions(e=!1){this._widget||this._createFindWidget(),this._state.isRevealed&&!e?this._widget.highlightFindOptions():this._findOptionsWidget.highlightFindOptions()}_createFindWidget(){this._widget=this._register(new xt(this._editor,this,this._state,this._contextViewService,this._keybindingService,this._contextKeyService,this._themeService,this._storageService,this._notificationService)),this._findOptionsWidget=this._register(new Ae(this._editor,this._state,this._keybindingService,this._themeService))}};Ft=Tt([Rt(1,Nt.u),Rt(2,E.i6),Rt(3,Dt.d),Rt(4,_.XE),Rt(5,Mt.lT),Rt(6,It.Uy),Rt(7,Et.p)],Ft);const Wt=(0,a.rn)(new a.jY({id:"actions.find",label:i.N("startFindAction","Find"),alias:"Find",precondition:E.Ao.or(l.u.focus,E.Ao.has("editorIsOpen")),kbOpts:{kbExpr:null,primary:2084,weight:100},menuOpts:{menuId:Lt.eH.MenubarEditMenu,group:"3_find",title:i.N({key:"miFind",comment:["&& denotes a mnemonic"]},"&&Find"),order:1}}));Wt.addImplementation(0,((e,t,n)=>{const i=Pt.get(t);return!!i&&i.start({forceRevealReplace:!1,seedSearchStringFromSelection:"never"!==t.getOption(33).seedSearchStringFromSelection?"single":"none",seedSearchStringFromNonEmptySelection:"selection"===t.getOption(33).seedSearchStringFromSelection,seedSearchStringFromGlobalClipboard:t.getOption(33).globalFindClipboard,shouldFocus:1,shouldAnimate:!0,updateSearchScope:!1,loop:t.getOption(33).loop})}));class zt extends a.R6{constructor(){super({id:"actions.findWithSelection",label:i.N("startFindWithSelectionAction","Find With Selection"),alias:"Find With Selection",precondition:void 0,kbOpts:{kbExpr:null,primary:0,mac:{primary:2083},weight:100}})}run(e,t){return Ot(this,void 0,void 0,(function*(){let e=Pt.get(t);e&&(yield e.start({forceRevealReplace:!1,seedSearchStringFromSelection:"multiple",seedSearchStringFromNonEmptySelection:!1,seedSearchStringFromGlobalClipboard:!1,shouldFocus:0,shouldAnimate:!0,updateSearchScope:!1,loop:t.getOption(33).loop}),e.setGlobalBufferTerm(e.getState().searchString))}))}}class Vt extends a.R6{run(e,t){return Ot(this,void 0,void 0,(function*(){let e=Pt.get(t);e&&!this._run(e)&&(yield e.start({forceRevealReplace:!1,seedSearchStringFromSelection:0===e.getState().searchString.length&&"never"!==t.getOption(33).seedSearchStringFromSelection?"single":"none",seedSearchStringFromNonEmptySelection:"selection"===t.getOption(33).seedSearchStringFromSelection,seedSearchStringFromGlobalClipboard:!0,shouldFocus:0,shouldAnimate:!0,updateSearchScope:!1,loop:t.getOption(33).loop}),this._run(e))}))}}class Ht extends Vt{constructor(){super({id:F,label:i.N("findNextMatchAction","Find Next"),alias:"Find Next",precondition:void 0,kbOpts:[{kbExpr:l.u.focus,primary:61,mac:{primary:2085,secondary:[61]},weight:100},{kbExpr:E.Ao.and(l.u.focus,I),primary:3,weight:100}]})}_run(e){return!!e.moveToNextMatch()&&(e.editor.pushUndoStop(),!0)}}class jt extends Vt{constructor(){super({id:W,label:i.N("findPreviousMatchAction","Find Previous"),alias:"Find Previous",precondition:void 0,kbOpts:[{kbExpr:l.u.focus,primary:1085,mac:{primary:3109,secondary:[1085]},weight:100},{kbExpr:E.Ao.and(l.u.focus,I),primary:1027,weight:100}]})}_run(e){return e.moveToPrevMatch()}}class $t extends a.R6{run(e,t){return Ot(this,void 0,void 0,(function*(){let e=Pt.get(t);if(!e)return;const n="selection"===t.getOption(33).seedSearchStringFromSelection;let i=null;"never"!==t.getOption(33).seedSearchStringFromSelection&&(i=Bt(t,"single",n)),i&&e.setSearchString(i),this._run(e)||(yield e.start({forceRevealReplace:!1,seedSearchStringFromSelection:"never"!==t.getOption(33).seedSearchStringFromSelection?"single":"none",seedSearchStringFromNonEmptySelection:n,seedSearchStringFromGlobalClipboard:!1,shouldFocus:0,shouldAnimate:!0,updateSearchScope:!1,loop:t.getOption(33).loop}),this._run(e))}))}}class Ut extends $t{constructor(){super({id:"editor.action.nextSelectionMatchFindAction",label:i.N("nextSelectionMatchFindAction","Find Next Selection"),alias:"Find Next Selection",precondition:void 0,kbOpts:{kbExpr:l.u.focus,primary:2109,weight:100}})}_run(e){return e.moveToNextMatch()}}class Zt extends $t{constructor(){super({id:"editor.action.previousSelectionMatchFindAction",label:i.N("previousSelectionMatchFindAction","Find Previous Selection"),alias:"Find Previous Selection",precondition:void 0,kbOpts:{kbExpr:l.u.focus,primary:3133,weight:100}})}_run(e){return e.moveToPrevMatch()}}const Kt=(0,a.rn)(new a.jY({id:"editor.action.startFindReplaceAction",label:i.N("startReplace","Replace"),alias:"Replace",precondition:E.Ao.or(l.u.focus,E.Ao.has("editorIsOpen")),kbOpts:{kbExpr:null,primary:2086,mac:{primary:2596},weight:100},menuOpts:{menuId:Lt.eH.MenubarEditMenu,group:"3_find",title:i.N({key:"miReplace",comment:["&& denotes a mnemonic"]},"&&Replace"),order:2}}));Kt.addImplementation(0,((e,t,n)=>{if(!t.hasModel()||t.getOption(79))return!1;const i=Pt.get(t);if(!i)return!1;const o=t.getSelection(),r=i.isFindInputFocused(),s=!o.isEmpty()&&o.startLineNumber===o.endLineNumber&&"never"!==t.getOption(33).seedSearchStringFromSelection&&!r,a=r||s?2:1;return i.start({forceRevealReplace:!0,seedSearchStringFromSelection:s?"single":"none",seedSearchStringFromNonEmptySelection:"selection"===t.getOption(33).seedSearchStringFromSelection,seedSearchStringFromGlobalClipboard:"never"!==t.getOption(33).seedSearchStringFromSelection,shouldFocus:a,shouldAnimate:!0,updateSearchScope:!1,loop:t.getOption(33).loop})})),(0,a._K)(Pt.ID,Ft),(0,a.Qr)(zt),(0,a.Qr)(Ht),(0,a.Qr)(jt),(0,a.Qr)(Ut),(0,a.Qr)(Zt);const qt=a._l.bindToContribution(Pt.get);(0,a.fK)(new qt({id:z,precondition:D,handler:e=>e.closeFindWidget(),kbOpts:{weight:105,kbExpr:E.Ao.and(l.u.focus,E.Ao.not("isComposing")),primary:9,secondary:[1033]}})),(0,a.fK)(new qt({id:V,precondition:void 0,handler:e=>e.toggleCaseSensitive(),kbOpts:{weight:105,kbExpr:l.u.focus,primary:T.primary,mac:T.mac,win:T.win,linux:T.linux}})),(0,a.fK)(new qt({id:H,precondition:void 0,handler:e=>e.toggleWholeWords(),kbOpts:{weight:105,kbExpr:l.u.focus,primary:R.primary,mac:R.mac,win:R.win,linux:R.linux}})),(0,a.fK)(new qt({id:j,precondition:void 0,handler:e=>e.toggleRegex(),kbOpts:{weight:105,kbExpr:l.u.focus,primary:O.primary,mac:O.mac,win:O.win,linux:O.linux}})),(0,a.fK)(new qt({id:$,precondition:void 0,handler:e=>e.toggleSearchScope(),kbOpts:{weight:105,kbExpr:l.u.focus,primary:B.primary,mac:B.mac,win:B.win,linux:B.linux}})),(0,a.fK)(new qt({id:U,precondition:void 0,handler:e=>e.togglePreserveCase(),kbOpts:{weight:105,kbExpr:l.u.focus,primary:P.primary,mac:P.mac,win:P.win,linux:P.linux}})),(0,a.fK)(new qt({id:Z,precondition:D,handler:e=>e.replace(),kbOpts:{weight:105,kbExpr:l.u.focus,primary:3094}})),(0,a.fK)(new qt({id:Z,precondition:D,handler:e=>e.replace(),kbOpts:{weight:105,kbExpr:E.Ao.and(l.u.focus,M),primary:3}})),(0,a.fK)(new qt({id:K,precondition:D,handler:e=>e.replaceAll(),kbOpts:{weight:105,kbExpr:l.u.focus,primary:2563}})),(0,a.fK)(new qt({id:K,precondition:D,handler:e=>e.replaceAll(),kbOpts:{weight:105,kbExpr:E.Ao.and(l.u.focus,M),primary:void 0,mac:{primary:2051}}})),(0,a.fK)(new qt({id:"editor.action.selectAllMatches",precondition:D,handler:e=>e.selectAllMatches(),kbOpts:{weight:105,kbExpr:l.u.focus,primary:515}}))},3190:(e,t,n)=>{"use strict";n.r(t),n.d(t,{FoldingController:()=>de,editorFoldForeground:()=>fe,foldBackgroundBackground:()=>me});var i=n(3379),o=n.n(i),r=n(7795),s=n.n(r),a=n(569),l=n.n(a),d=n(3565),c=n.n(d),h=n(9216),u=n.n(h),g=n(4589),p=n.n(g),m=n(6977),f={};f.styleTagTransform=p(),f.setAttributes=c(),f.insert=l().bind(null,"head"),f.domAPI=s(),f.insertStyleElement=u(),o()(m.Z,f),m.Z&&m.Z.locals&&m.Z.locals;var _=n(3580),b=n(8401),C=n(7295),v=n(5393),w=n(2258),y=n(5976),A=n(6830),S=n(4669);const x=16777215,k=4278190080;class L{constructor(e,t,n){if(e.length!==t.length||e.length>65535)throw new Error("invalid startIndexes or endIndexes size");this._startIndexes=e,this._endIndexes=t,this._collapseStates=new Uint32Array(Math.ceil(e.length/32)),this._types=n,this._parentsComputed=!1}ensureParentIndices(){if(!this._parentsComputed){this._parentsComputed=!0;let e=[],t=(t,n)=>{let i=e[e.length-1];return this.getStartLineNumber(i)<=t&&this.getEndLineNumber(i)>=n};for(let n=0,i=this._startIndexes.length;nx||o>x)throw new Error("startLineNumber or endLineNumber must not exceed 16777215");for(;e.length>0&&!t(i,o);)e.pop();let r=e.length>0?e[e.length-1]:-1;e.push(n),this._startIndexes[n]=i+((255&r)<<24),this._endIndexes[n]=o+((65280&r)<<16)}}}get length(){return this._startIndexes.length}getStartLineNumber(e){return this._startIndexes[e]&x}getEndLineNumber(e){return this._endIndexes[e]&x}getType(e){return this._types?this._types[e]:void 0}hasTypes(){return!!this._types}isCollapsed(e){let t=e/32|0,n=e%32;return 0!=(this._collapseStates[t]&1<>>24)+((this._endIndexes[e]&k)>>>16);return 65535===t?-1:t}contains(e,t){return this.getStartLineNumber(e)<=t&&this.getEndLineNumber(e)>=t}findIndex(e){let t=0,n=this._startIndexes.length;if(0===n)return-1;for(;t=0){if(this.getEndLineNumber(t)>=e)return t;for(t=this.getParentIndex(t);-1!==t;){if(this.contains(t,e))return t;t=this.getParentIndex(t)}}return-1}toString(){let e=[];for(let t=0;t=this.endLineNumber}containsLine(e){return this.startLineNumber<=e&&e<=this.endLineNumber}}class N{constructor(e,t){this._updateEventEmitter=new S.Q5,this.onDidChange=this._updateEventEmitter.event,this._textModel=e,this._decorationProvider=t,this._regions=new L(new Uint32Array(0),new Uint32Array(0)),this._editorDecorationIds=[],this._isInitialized=!1}get regions(){return this._regions}get textModel(){return this._textModel}get isInitialized(){return this._isInitialized}toggleCollapseState(e){if(!e.length)return;e=e.sort(((e,t)=>e.regionIndex-t.regionIndex));const t={};this._decorationProvider.changeDecorations((n=>{let i=0,o=-1,r=-1;const s=e=>{for(;ir&&(r=e),i++}};for(let n of e){let e=n.regionIndex,i=this._editorDecorationIds[e];if(i&&!t[i]){t[i]=!0,s(e);let n=!this._regions.isCollapsed(e);this._regions.setCollapsed(e,n),o=Math.max(o,this._regions.getEndLineNumber(e))}}s(this._regions.length)})),this._updateEventEmitter.fire({model:this,collapseStateChanged:e})}update(e,t=[]){let n=[],i=-1,o=(o,r)=>{const s=e.getStartLineNumber(o),a=e.getEndLineNumber(o);r||(r=e.isCollapsed(o)),r&&((e,n)=>{for(let i of t)if(ei&&(i=a)},r=0,s=()=>{for(;r=t))break;o(a,n===t),a++}}l=s()}for(;a0)return e}applyMemento(e){if(!Array.isArray(e))return;let t=[];for(let n of e){let e=this.getRegionAtLine(n.startLineNumber);e&&!e.isCollapsed&&t.push(e)}this.toggleCollapseState(t)}dispose(){this._decorationProvider.deltaDecorations(this._editorDecorationIds,[])}getAllRegionsAtLine(e,t){let n=[];if(this._regions){let i=this._regions.findRange(e),o=1;for(;i>=0;){let e=this._regions.toRegion(i);t&&!t(e,o)||n.push(e),o++,i=e.parentIndex}}return n}getRegionAtLine(e){if(this._regions){let t=this._regions.findRange(e);if(t>=0)return this._regions.toRegion(t)}return null}getRegionsInside(e,t){let n=[],i=e?e.regionIndex+1:0,o=e?e.endLineNumber:Number.MAX_VALUE;if(t&&2===t.length){const e=[];for(let r=i,s=this._regions.length;r0&&!i.containedBy(e[e.length-1]);)e.pop();e.push(i),t(i,e.length)&&n.push(i)}}else for(let e=i,r=this._regions.length;e0)for(let r of i){let i=e.getRegionAtLine(r);if(i&&(i.isCollapsed!==t&&o.push(i),n>1)){let r=e.getRegionsInside(i,((e,i)=>e.isCollapsed!==t&&ie.isCollapsed!==t&&ie.isCollapsed!==t&&i<=n));o.push(...i)}e.toggleCollapseState(o)}function M(e,t,n){let i=[];for(let t of n)i.push(e.getAllRegionsAtLine(t,void 0)[0]);let o=e.getRegionsInside(null,(e=>i.every((t=>!t.containedBy(e)&&!e.containedBy(t)))&&e.isCollapsed!==t));e.toggleCollapseState(o)}function T(e,t,n){let i=e.textModel,o=e.regions,r=[];for(let e=o.length-1;e>=0;e--)if(n!==o.isCollapsed(e)){let n=o.getStartLineNumber(e);t.test(i.getLineContent(n))&&r.push(o.toRegion(e))}e.toggleCollapseState(r)}function R(e,t,n){let i=e.regions,o=[];for(let e=i.length-1;e>=0;e--)n!==i.isCollapsed(e)&&t===i.getType(e)&&o.push(i.toRegion(e));e.toggleCollapseState(o)}var O=n(3103),B=n(3046),P=n(9554),F=n(7781);const W=(0,P.q5)("folding-expanded",B.lA.chevronDown,(0,_.N)("foldingExpandedIcon","Icon for expanded ranges in the editor glyph margin.")),z=(0,P.q5)("folding-collapsed",B.lA.chevronRight,(0,_.N)("foldingCollapsedIcon","Icon for collapsed ranges in the editor glyph margin."));class V{constructor(e){this.editor=e,this.autoHideFoldingControls=!0,this.showFoldingHighlights=!0}getDecorationOption(e,t){return t?V.HIDDEN_RANGE_DECORATION:e?this.showFoldingHighlights?V.COLLAPSED_HIGHLIGHTED_VISUAL_DECORATION:V.COLLAPSED_VISUAL_DECORATION:this.autoHideFoldingControls?V.EXPANDED_AUTO_HIDE_VISUAL_DECORATION:V.EXPANDED_VISUAL_DECORATION}deltaDecorations(e,t){return this.editor.deltaDecorations(e,t)}changeDecorations(e){return this.editor.changeDecorations(e)}}V.COLLAPSED_VISUAL_DECORATION=O.qx.register({description:"folding-collapsed-visual-decoration",stickiness:1,afterContentClassName:"inline-folded",isWholeLine:!0,firstLineDecorationClassName:F.kS.asClassName(z)}),V.COLLAPSED_HIGHLIGHTED_VISUAL_DECORATION=O.qx.register({description:"folding-collapsed-highlighted-visual-decoration",stickiness:1,afterContentClassName:"inline-folded",className:"folded-background",isWholeLine:!0,firstLineDecorationClassName:F.kS.asClassName(z)}),V.EXPANDED_AUTO_HIDE_VISUAL_DECORATION=O.qx.register({description:"folding-expanded-auto-hide-visual-decoration",stickiness:1,isWholeLine:!0,firstLineDecorationClassName:F.kS.asClassName(W)}),V.EXPANDED_VISUAL_DECORATION=O.qx.register({description:"folding-expanded-visual-decoration",stickiness:1,isWholeLine:!0,firstLineDecorationClassName:"alwaysShowFoldIcons "+F.kS.asClassName(W)}),V.HIDDEN_RANGE_DECORATION=O.qx.register({description:"folding-hidden-range-decoration",stickiness:1});var H=n(9102),j=n(4314),$=n(9488);class U{constructor(e){this._updateEventEmitter=new S.Q5,this._foldingModel=e,this._foldingModelListener=e.onDidChange((e=>this.updateHiddenRanges())),this._hiddenRanges=[],e.regions.length&&this.updateHiddenRanges()}get onDidChange(){return this._updateEventEmitter.event}get hiddenRanges(){return this._hiddenRanges}updateHiddenRanges(){let e=!1,t=[],n=0,i=0,o=Number.MAX_VALUE,r=-1,s=this._foldingModel.regions;for(;n({startLineNumber:e.startLineNumber-1,endLineNumber:e.endLineNumber})))}applyHiddenRanges(e){this._hiddenRanges=e,this._updateEventEmitter.fire(e)}hasRanges(){return this._hiddenRanges.length>0}isHidden(e){return null!==Z(this._hiddenRanges,e)}adjustSelections(e){let t=!1,n=this._foldingModel.textModel,i=null,o=e=>(i&&function(e,t){return e>=t.startLineNumber&&e<=t.endLineNumber}(e,i)||(i=Z(this._hiddenRanges,e)),i?i.startLineNumber-1:null);for(let i=0,r=e.length;i0&&(this._hiddenRanges=[],this._updateEventEmitter.fire(this._hiddenRanges)),this._foldingModelListener&&(this._foldingModelListener.dispose(),this._foldingModelListener=null)}}function Z(e,t){let n=(0,$.lG)(e,(e=>t=0&&e[n].endLineNumber>=t?e[n]:null}var K=n(3831);class q{constructor(e){this.editorModel=e,this.id="indent"}dispose(){}compute(e){let t=K.zu.getFoldingRules(this.editorModel.getLanguageIdentifier().id),n=t&&!!t.offSide,i=t&&t.markers;return Promise.resolve(function(e,t,n,i=5e3){const o=e.getOptions().tabSize;let r,s=new Y(i);n&&(r=new RegExp(`(${n.start.source})|(?:${n.end.source})`));let a=[],l=e.getLineCount()+1;a.push({indent:-1,endAbove:l,line:l});for(let n=e.getLineCount();n>0;n--){let i,l=e.getLineContent(n),d=O.yO.computeIndentLevel(l,o),c=a[a.length-1];if(-1!==d){if(r&&(i=l.match(r))){if(!i[1]){a.push({indent:-2,endAbove:n,line:n});continue}{let e=a.length-1;for(;e>0&&-2!==a[e].indent;)e--;if(e>0){a.length=e+1,c=a[e],s.insertFirst(n,c.line,d),c.line=n,c.indent=d,c.endAbove=n;continue}}}if(c.indent>d){do{a.pop(),c=a[a.length-1]}while(c.indent>d);let e=c.endAbove-1;e-n>=1&&s.insertFirst(n,e,d)}c.indent===d?c.endAbove=n:a.push({indent:d,endAbove:n,line:n})}else t&&(c.endAbove=n)}return s.toIndentRanges(e)}(this.editorModel,n,i))}}class Y{constructor(e){this._startIndexes=[],this._endIndexes=[],this._indentOccurrences=[],this._length=0,this._foldingRangesLimit=e}insertFirst(e,t,n){if(e>x||t>x)return;let i=this._length;this._startIndexes[i]=e,this._endIndexes[i]=t,this._length++,n<1e3&&(this._indentOccurrences[n]=(this._indentOccurrences[n]||0)+1)}toIndentRanges(e){if(this._length<=this._foldingRangesLimit){let e=new Uint32Array(this._length),t=new Uint32Array(this._length);for(let n=this._length-1,i=0;n>=0;n--,i++)e[i]=this._startIndexes[n],t[i]=this._endIndexes[n];return new L(e,t)}{let t=0,n=this._indentOccurrences.length;for(let e=0;ethis._foldingRangesLimit){n=e;break}t+=i}}const i=e.getOptions().tabSize;let o=new Uint32Array(this._foldingRangesLimit),r=new Uint32Array(this._foldingRangesLimit);for(let s=this._length-1,a=0;s>=0;s--){let l=this._startIndexes[s],d=e.getLineContent(l),c=O.yO.computeIndentLevel(d,i);(cPromise.resolve(e.provideFoldingRanges(t,X,n)).then((e=>{if(!n.isCancellationRequested&&Array.isArray(e)){Array.isArray(i)||(i=[]);let n=t.getLineCount();for(let t of e)t.start>0&&t.end>t.start&&t.end<=n&&i.push({start:t.start,end:t.end,rank:o,kind:t.kind})}}),Q.Cp)));return Promise.all(o).then((e=>i))}(this.providers,this.editorModel,e).then((e=>e?ne(e,this.limit):null))}dispose(){var e;null===(e=this.disposables)||void 0===e||e.dispose()}}class te{constructor(e){this._startIndexes=[],this._endIndexes=[],this._nestingLevels=[],this._nestingLevelCounts=[],this._types=[],this._length=0,this._foldingRangesLimit=e}add(e,t,n,i){if(e>x||t>x)return;let o=this._length;this._startIndexes[o]=e,this._endIndexes[o]=t,this._nestingLevels[o]=i,this._types[o]=n,this._length++,i<30&&(this._nestingLevelCounts[i]=(this._nestingLevelCounts[i]||0)+1)}toIndentRanges(){if(this._length<=this._foldingRangesLimit){let e=new Uint32Array(this._length),t=new Uint32Array(this._length);for(let n=0;nthis._foldingRangesLimit){t=n;break}e+=i}}let n=new Uint32Array(this._foldingRangesLimit),i=new Uint32Array(this._foldingRangesLimit),o=[];for(let r=0,s=0;r{let n=e.start-t.start;return 0===n&&(n=e.rank-t.rank),n})),o=new te(t),r=[];for(let e of i)if(n){if(e.start>n.start)if(e.end<=n.end)r.push(n),n=e,o.add(e.start,e.end,e.kind&&e.kind.value,r.length);else{if(e.start>n.end){do{n=r.pop()}while(n&&e.start>n.end);n&&r.push(n),n=e}o.add(e.start,e.end,e.kind&&e.kind.value,r.length)}}else n=e,o.add(e.start,e.end,e.kind&&e.kind.value,r.length);return o.toIndentRanges()}const ie="init";class oe{constructor(e,t,n,i){if(this.editorModel=e,this.id=ie,t.length){let o=t=>({range:{startLineNumber:t.startLineNumber,startColumn:0,endLineNumber:t.endLineNumber,endColumn:e.getLineLength(t.endLineNumber)},options:{description:"folding-initializing-range-provider",stickiness:1}});this.decorationIds=e.deltaDecorations([],t.map(o)),this.timeout=setTimeout(n,i)}}dispose(){this.decorationIds&&(this.editorModel.deltaDecorations(this.decorationIds,[]),this.decorationIds=void 0),"number"==typeof this.timeout&&(clearTimeout(this.timeout),this.timeout=void 0)}compute(e){let t=[];if(this.decorationIds)for(let e of this.decorationIds){let n=this.editorModel.getDecorationRange(e);n&&t.push({start:n.startLineNumber,end:n.endLineNumber,rank:1})}return Promise.resolve(ne(t,Number.MAX_VALUE))}}var re=n(8819),se=n(3910),ae=n(9925);const le=new re.uy("foldingEnabled",!1);let de=class e extends y.JT{constructor(e,t){super(),this.contextKeyService=t,this.localToDispose=this._register(new y.SL),this.editor=e;const n=this.editor.getOptions();this._isEnabled=n.get(35),this._useFoldingProviders="indentation"!==n.get(36),this._unfoldOnClickAfterEndOfLine=n.get(39),this._restoringViewState=!1,this._currentModelHasFoldedImports=!1,this._foldingImportsByDefault=n.get(38),this.foldingModel=null,this.hiddenRangeModel=null,this.rangeProvider=null,this.foldingRegionPromise=null,this.foldingStateMemento=null,this.foldingModelPromise=null,this.updateScheduler=null,this.cursorChangedScheduler=null,this.mouseDownInfo=null,this.foldingDecorationProvider=new V(e),this.foldingDecorationProvider.autoHideFoldingControls="mouseover"===n.get(98),this.foldingDecorationProvider.showFoldingHighlights=n.get(37),this.foldingEnabled=le.bindTo(this.contextKeyService),this.foldingEnabled.set(this._isEnabled),this._register(this.editor.onDidChangeModel((()=>this.onModelChanged()))),this._register(this.editor.onDidChangeConfiguration((e=>{if(e.hasChanged(35)&&(this._isEnabled=this.editor.getOptions().get(35),this.foldingEnabled.set(this._isEnabled),this.onModelChanged()),e.hasChanged(98)||e.hasChanged(37)){const e=this.editor.getOptions();this.foldingDecorationProvider.autoHideFoldingControls="mouseover"===e.get(98),this.foldingDecorationProvider.showFoldingHighlights=e.get(37),this.onModelContentChanged()}e.hasChanged(36)&&(this._useFoldingProviders="indentation"!==this.editor.getOptions().get(36),this.onFoldingStrategyChanged()),e.hasChanged(39)&&(this._unfoldOnClickAfterEndOfLine=this.editor.getOptions().get(39)),e.hasChanged(38)&&(this._foldingImportsByDefault=this.editor.getOptions().get(38))}))),this.onModelChanged()}static get(t){return t.getContribution(e.ID)}saveViewState(){let e=this.editor.getModel();if(!e||!this._isEnabled||e.isTooLargeForTokenization())return{};if(this.foldingModel){let t=this.foldingModel.isInitialized?this.foldingModel.getMemento():this.hiddenRangeModel.getMemento(),n=this.rangeProvider?this.rangeProvider.id:void 0;return{collapsedRegions:t,lineCount:e.getLineCount(),provider:n,foldedImports:this._currentModelHasFoldedImports}}}restoreViewState(e){let t=this.editor.getModel();if(!t||!this._isEnabled||t.isTooLargeForTokenization()||!this.hiddenRangeModel)return;if(!e||e.lineCount!==t.getLineCount())return;if(this._currentModelHasFoldedImports=!!e.foldedImports,!e.collapsedRegions)return;e.provider!==J&&e.provider!==ie||(this.foldingStateMemento=e);const n=e.collapsedRegions;if(this.hiddenRangeModel.applyMemento(n)){const e=this.getFoldingModel();e&&e.then((e=>{if(e){this._restoringViewState=!0;try{e.applyMemento(n)}finally{this._restoringViewState=!1}}})).then(void 0,Q.dL)}}onModelChanged(){this.localToDispose.clear();let e=this.editor.getModel();this._isEnabled&&e&&!e.isTooLargeForTokenization()&&(this._currentModelHasFoldedImports=!1,this.foldingModel=new N(e,this.foldingDecorationProvider),this.localToDispose.add(this.foldingModel),this.hiddenRangeModel=new U(this.foldingModel),this.localToDispose.add(this.hiddenRangeModel),this.localToDispose.add(this.hiddenRangeModel.onDidChange((e=>this.onHiddenRangesChanges(e)))),this.updateScheduler=new v.vp(200),this.cursorChangedScheduler=new v.pY((()=>this.revealCursor()),200),this.localToDispose.add(this.cursorChangedScheduler),this.localToDispose.add(G.aC.onDidChange((()=>this.onFoldingStrategyChanged()))),this.localToDispose.add(this.editor.onDidChangeModelLanguageConfiguration((()=>this.onFoldingStrategyChanged()))),this.localToDispose.add(this.editor.onDidChangeModelContent((()=>this.onModelContentChanged()))),this.localToDispose.add(this.editor.onDidChangeCursorPosition((()=>this.onCursorPositionChanged()))),this.localToDispose.add(this.editor.onMouseDown((e=>this.onEditorMouseDown(e)))),this.localToDispose.add(this.editor.onMouseUp((e=>this.onEditorMouseUp(e)))),this.localToDispose.add({dispose:()=>{this.foldingRegionPromise&&(this.foldingRegionPromise.cancel(),this.foldingRegionPromise=null),this.updateScheduler&&this.updateScheduler.cancel(),this.updateScheduler=null,this.foldingModel=null,this.foldingModelPromise=null,this.hiddenRangeModel=null,this.cursorChangedScheduler=null,this.foldingStateMemento=null,this.rangeProvider&&this.rangeProvider.dispose(),this.rangeProvider=null}}),this.onModelContentChanged())}onFoldingStrategyChanged(){this.rangeProvider&&this.rangeProvider.dispose(),this.rangeProvider=null,this.onModelContentChanged()}getRangeProvider(e){if(this.rangeProvider)return this.rangeProvider;if(this.rangeProvider=new q(e),this._useFoldingProviders&&this.foldingModel){let t=G.aC.ordered(this.foldingModel.textModel);if(0===t.length&&this.foldingStateMemento&&this.foldingStateMemento.collapsedRegions)return this.rangeProvider=new oe(e,this.foldingStateMemento.collapsedRegions,(()=>{this.foldingStateMemento=null,this.onFoldingStrategyChanged()}),3e4);t.length>0&&(this.rangeProvider=new ee(e,t,(()=>this.onModelContentChanged())))}return this.foldingStateMemento=null,this.rangeProvider}getFoldingModel(){return this.foldingModelPromise}onModelContentChanged(){this.updateScheduler&&(this.foldingRegionPromise&&(this.foldingRegionPromise.cancel(),this.foldingRegionPromise=null),this.foldingModelPromise=this.updateScheduler.trigger((()=>{const e=this.foldingModel;if(!e)return null;const t=this.getRangeProvider(e.textModel);let n=this.foldingRegionPromise=(0,v.PG)((e=>t.compute(e)));return n.then((t=>{if(t&&n===this.foldingRegionPromise){let n;if(this._foldingImportsByDefault&&!this._currentModelHasFoldedImports){const e=t.setCollapsedAllOfType(G.AD.Imports.value,!0);e&&(n=ae.ZF.capture(this.editor),this._currentModelHasFoldedImports=e)}let i=this.editor.getSelections(),o=i?i.map((e=>e.startLineNumber)):[];e.update(t,o),n&&n.restore(this.editor)}return e}))})).then(void 0,(e=>((0,Q.dL)(e),null))))}onHiddenRangesChanges(e){if(this.hiddenRangeModel&&e.length&&!this._restoringViewState){let e=this.editor.getSelections();e&&this.hiddenRangeModel.adjustSelections(e)&&this.editor.setSelections(e)}this.editor.setHiddenAreas(e)}onCursorPositionChanged(){this.hiddenRangeModel&&this.hiddenRangeModel.hasRanges()&&this.cursorChangedScheduler.schedule()}revealCursor(){const e=this.getFoldingModel();e&&e.then((e=>{if(e){let t=this.editor.getSelections();if(t&&t.length>0){let n=[];for(let i of t){let t=i.selectionStartLineNumber;this.hiddenRangeModel&&this.hiddenRangeModel.isHidden(t)&&n.push(...e.getAllRegionsAtLine(t,(e=>e.isCollapsed&&t>e.startLineNumber)))}n.length&&(e.toggleCollapseState(n),this.reveal(t[0].getPosition()))}}})).then(void 0,Q.dL)}onEditorMouseDown(e){if(this.mouseDownInfo=null,!this.hiddenRangeModel||!e.target||!e.target.range)return;if(!e.event.leftButton&&!e.event.middleButton)return;const t=e.target.range;let n=!1;switch(e.target.type){case 4:const i=e.target.detail,o=e.target.element.offsetLeft;if(i.offsetX-o<5)return;n=!0;break;case 7:if(this._unfoldOnClickAfterEndOfLine&&this.hiddenRangeModel.hasRanges()&&!e.target.detail.isAfterLines)break;return;case 6:if(this.hiddenRangeModel.hasRanges()){let e=this.editor.getModel();if(e&&t.startColumn===e.getLineMaxColumn(t.startLineNumber))break}return;default:return}this.mouseDownInfo={lineNumber:t.startLineNumber,iconClicked:n}}onEditorMouseUp(e){const t=this.getFoldingModel();if(!t||!this.mouseDownInfo||!e.target)return;let n=this.mouseDownInfo.lineNumber,i=this.mouseDownInfo.iconClicked,o=e.target.range;if(o&&o.startLineNumber===n){if(i){if(4!==e.target.type)return}else{let e=this.editor.getModel();if(!e||o.startColumn!==e.getLineMaxColumn(n))return}t.then((t=>{if(t){let o=t.getRegionAtLine(n);if(o&&o.startLineNumber===n){let r=o.isCollapsed;if(i||r){let i=[];if(e.event.altKey){let e=e=>!e.containedBy(o)&&!o.containedBy(e),n=t.getRegionsInside(null,e);for(const e of n)e.isCollapsed&&i.push(e);0===i.length&&(i=n)}else{let n=e.event.middleButton||e.event.shiftKey;if(n)for(const e of t.getRegionsInside(o))e.isCollapsed===r&&i.push(e);!r&&n&&0!==i.length||i.push(o)}t.toggleCollapseState(i),this.reveal({lineNumber:n,column:1})}}}})).then(void 0,Q.dL)}}reveal(e){this.editor.revealPositionInCenterIfOutsideViewport(e,0)}};var ce,he;de.ID="editor.contrib.folding",de=function(e,t,n,i){var o,r=arguments.length,s=r<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,i);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,n,s):o(t,n))||s);return r>3&&s&&Object.defineProperty(t,n,s),s}([(ce=1,he=re.i6,function(e,t){he(e,t,ce)})],de);class ue extends A.R6{runEditorCommand(e,t,n){let i=de.get(t);if(!i)return;let o=i.getFoldingModel();return o?(this.reportTelemetry(e,t),o.then((e=>{if(e){this.invoke(i,e,t,n);const o=t.getSelection();o&&i.reveal(o.getStartPosition())}}))):void 0}getSelectedLines(e){let t=e.getSelections();return t?t.map((e=>e.startLineNumber)):[]}getLineNumbers(e,t){return e&&e.selectionLines?e.selectionLines.map((e=>e+1)):this.getSelectedLines(t)}run(e,t){}}function ge(e){if(!b.o8(e)){if(!b.Kn(e))return!1;const t=e;if(!b.o8(t.levels)&&!b.hj(t.levels))return!1;if(!b.o8(t.direction)&&!b.HD(t.direction))return!1;if(!(b.o8(t.selectionLines)||b.kJ(t.selectionLines)&&t.selectionLines.every(b.hj)))return!1}return!0}class pe extends ue{getFoldingLevel(){return parseInt(this.id.substr(pe.ID_PREFIX.length))}invoke(e,t,n){!function(e,t,n,i){let o=e.getRegionsInside(null,((e,n)=>n===t&&true!==e.isCollapsed&&!i.some((t=>e.containsLine(t)))));e.toggleCollapseState(o)}(t,this.getFoldingLevel(),0,this.getSelectedLines(n))}}pe.ID_PREFIX="editor.foldLevel",pe.ID=e=>pe.ID_PREFIX+e,(0,A._K)(de.ID,de),(0,A.Qr)(class extends ue{constructor(){super({id:"editor.unfold",label:_.N("unfoldAction.label","Unfold"),alias:"Unfold",precondition:le,kbOpts:{kbExpr:H.u.editorTextFocus,primary:3161,mac:{primary:2649},weight:100},description:{description:"Unfold the content in the editor",args:[{name:"Unfold editor argument",description:"Property-value pairs that can be passed through this argument:\n\t\t\t\t\t\t* 'levels': Number of levels to unfold. If not set, defaults to 1.\n\t\t\t\t\t\t* 'direction': If 'up', unfold given number of levels up otherwise unfolds down.\n\t\t\t\t\t\t* 'selectionLines': The start lines (0-based) of the editor selections to apply the unfold action to. If not set, the active selection(s) will be used.\n\t\t\t\t\t\t",constraint:ge,schema:{type:"object",properties:{levels:{type:"number",default:1},direction:{type:"string",enum:["up","down"],default:"down"},selectionLines:{type:"array",items:{type:"number"}}}}}]}})}invoke(e,t,n,i){let o=i&&i.levels||1,r=this.getLineNumbers(i,n);i&&"up"===i.direction?I(t,!1,o,r):D(t,!1,o,r)}}),(0,A.Qr)(class extends ue{constructor(){super({id:"editor.unfoldRecursively",label:_.N("unFoldRecursivelyAction.label","Unfold Recursively"),alias:"Unfold Recursively",precondition:le,kbOpts:{kbExpr:H.u.editorTextFocus,primary:(0,w.gx)(2089,2137),weight:100}})}invoke(e,t,n,i){D(t,!1,Number.MAX_VALUE,this.getSelectedLines(n))}}),(0,A.Qr)(class extends ue{constructor(){super({id:"editor.fold",label:_.N("foldAction.label","Fold"),alias:"Fold",precondition:le,kbOpts:{kbExpr:H.u.editorTextFocus,primary:3159,mac:{primary:2647},weight:100},description:{description:"Fold the content in the editor",args:[{name:"Fold editor argument",description:"Property-value pairs that can be passed through this argument:\n\t\t\t\t\t\t\t* 'levels': Number of levels to fold.\n\t\t\t\t\t\t\t* 'direction': If 'up', folds given number of levels up otherwise folds down.\n\t\t\t\t\t\t\t* 'selectionLines': The start lines (0-based) of the editor selections to apply the fold action to. If not set, the active selection(s) will be used.\n\t\t\t\t\t\t\tIf no levels or direction is set, folds the region at the locations or if already collapsed, the first uncollapsed parent instead.\n\t\t\t\t\t\t",constraint:ge,schema:{type:"object",properties:{levels:{type:"number"},direction:{type:"string",enum:["up","down"]},selectionLines:{type:"array",items:{type:"number"}}}}}]}})}invoke(e,t,n,i){let o=this.getLineNumbers(i,n);const r=i&&i.levels,s=i&&i.direction;"number"!=typeof r&&"string"!=typeof s?function(e,t,n){let i=[];for(let t of n){let n=e.getAllRegionsAtLine(t,(e=>true!==e.isCollapsed));n.length>0&&i.push(n[0])}e.toggleCollapseState(i)}(t,0,o):"up"===s?I(t,!0,r||1,o):D(t,!0,r||1,o)}}),(0,A.Qr)(class extends ue{constructor(){super({id:"editor.foldRecursively",label:_.N("foldRecursivelyAction.label","Fold Recursively"),alias:"Fold Recursively",precondition:le,kbOpts:{kbExpr:H.u.editorTextFocus,primary:(0,w.gx)(2089,2135),weight:100}})}invoke(e,t,n){let i=this.getSelectedLines(n);D(t,!0,Number.MAX_VALUE,i)}}),(0,A.Qr)(class extends ue{constructor(){super({id:"editor.foldAll",label:_.N("foldAllAction.label","Fold All"),alias:"Fold All",precondition:le,kbOpts:{kbExpr:H.u.editorTextFocus,primary:(0,w.gx)(2089,2069),weight:100}})}invoke(e,t,n){D(t,!0)}}),(0,A.Qr)(class extends ue{constructor(){super({id:"editor.unfoldAll",label:_.N("unfoldAllAction.label","Unfold All"),alias:"Unfold All",precondition:le,kbOpts:{kbExpr:H.u.editorTextFocus,primary:(0,w.gx)(2089,2088),weight:100}})}invoke(e,t,n){D(t,!1)}}),(0,A.Qr)(class extends ue{constructor(){super({id:"editor.foldAllBlockComments",label:_.N("foldAllBlockComments.label","Fold All Block Comments"),alias:"Fold All Block Comments",precondition:le,kbOpts:{kbExpr:H.u.editorTextFocus,primary:(0,w.gx)(2089,2133),weight:100}})}invoke(e,t,n){if(t.regions.hasTypes())R(t,G.AD.Comment.value,!0);else{const e=n.getModel();if(!e)return;let i=K.zu.getComments(e.getLanguageIdentifier().id);i&&i.blockCommentStartToken&&T(t,new RegExp("^\\s*"+(0,C.ec)(i.blockCommentStartToken)),!0)}}}),(0,A.Qr)(class extends ue{constructor(){super({id:"editor.foldAllMarkerRegions",label:_.N("foldAllMarkerRegions.label","Fold All Regions"),alias:"Fold All Regions",precondition:le,kbOpts:{kbExpr:H.u.editorTextFocus,primary:(0,w.gx)(2089,2077),weight:100}})}invoke(e,t,n){if(t.regions.hasTypes())R(t,G.AD.Region.value,!0);else{const e=n.getModel();if(!e)return;let i=K.zu.getFoldingRules(e.getLanguageIdentifier().id);i&&i.markers&&i.markers.start&&T(t,new RegExp(i.markers.start),!0)}}}),(0,A.Qr)(class extends ue{constructor(){super({id:"editor.unfoldAllMarkerRegions",label:_.N("unfoldAllMarkerRegions.label","Unfold All Regions"),alias:"Unfold All Regions",precondition:le,kbOpts:{kbExpr:H.u.editorTextFocus,primary:(0,w.gx)(2089,2078),weight:100}})}invoke(e,t,n){if(t.regions.hasTypes())R(t,G.AD.Region.value,!1);else{const e=n.getModel();if(!e)return;let i=K.zu.getFoldingRules(e.getLanguageIdentifier().id);i&&i.markers&&i.markers.start&&T(t,new RegExp(i.markers.start),!1)}}}),(0,A.Qr)(class extends ue{constructor(){super({id:"editor.foldAllExcept",label:_.N("foldAllExcept.label","Fold All Regions Except Selected"),alias:"Fold All Regions Except Selected",precondition:le,kbOpts:{kbExpr:H.u.editorTextFocus,primary:(0,w.gx)(2089,2131),weight:100}})}invoke(e,t,n){M(t,!0,this.getSelectedLines(n))}}),(0,A.Qr)(class extends ue{constructor(){super({id:"editor.unfoldAllExcept",label:_.N("unfoldAllExcept.label","Unfold All Regions Except Selected"),alias:"Unfold All Regions Except Selected",precondition:le,kbOpts:{kbExpr:H.u.editorTextFocus,primary:(0,w.gx)(2089,2129),weight:100}})}invoke(e,t,n){M(t,!1,this.getSelectedLines(n))}}),(0,A.Qr)(class extends ue{constructor(){super({id:"editor.toggleFold",label:_.N("toggleFoldAction.label","Toggle Fold"),alias:"Toggle Fold",precondition:le,kbOpts:{kbExpr:H.u.editorTextFocus,primary:(0,w.gx)(2089,2090),weight:100}})}invoke(e,t,n){!function(e,t,n){let i=[];for(let t of n){let n=e.getRegionAtLine(t);if(n){n.isCollapsed;i.push(n),0}}e.toggleCollapseState(i)}(t,0,this.getSelectedLines(n))}}),(0,A.Qr)(class extends ue{constructor(){super({id:"editor.gotoParentFold",label:_.N("gotoParentFold.label","Go to Parent Fold"),alias:"Go to Parent Fold",precondition:le,kbOpts:{kbExpr:H.u.editorTextFocus,weight:100}})}invoke(e,t,n){let i=this.getSelectedLines(n);if(i.length>0){let e=function(e,t){let n=null,i=t.getRegionAtLine(e);if(null!==i&&(n=i.startLineNumber,e===n)){let e=i.parentIndex;n=-1!==e?t.regions.getStartLineNumber(e):null}return n}(i[0],t);null!==e&&n.setSelection({startLineNumber:e,startColumn:1,endLineNumber:e,endColumn:1})}}}),(0,A.Qr)(class extends ue{constructor(){super({id:"editor.gotoPreviousFold",label:_.N("gotoPreviousFold.label","Go to Previous Fold"),alias:"Go to Previous Fold",precondition:le,kbOpts:{kbExpr:H.u.editorTextFocus,weight:100}})}invoke(e,t,n){let i=this.getSelectedLines(n);if(i.length>0){let e=function(e,t){let n=t.getRegionAtLine(e);if(null!==n){if(e!==n.startLineNumber)return n.startLineNumber;{let e=n.parentIndex;if(-1===e)return null;let i=t.regions.getStartLineNumber(n.parentIndex);for(;null!==n;){if(!(n.regionIndex>0))return null;if(n=t.regions.toRegion(n.regionIndex-1),n.startLineNumber<=i)return null;if(n.parentIndex===e)return n.startLineNumber}}}return null}(i[0],t);null!==e&&n.setSelection({startLineNumber:e,startColumn:1,endLineNumber:e,endColumn:1})}}}),(0,A.Qr)(class extends ue{constructor(){super({id:"editor.gotoNextFold",label:_.N("gotoNextFold.label","Go to Next Fold"),alias:"Go to Next Fold",precondition:le,kbOpts:{kbExpr:H.u.editorTextFocus,weight:100}})}invoke(e,t,n){let i=this.getSelectedLines(n);if(i.length>0){let e=function(e,t){let n=t.getRegionAtLine(e);if(null!==n){let e=n.parentIndex;if(-1===e)return null;let i=t.regions.getEndLineNumber(n.parentIndex);for(;null!==n;){if(!(n.regionIndex=i)return null;if(n.parentIndex===e)return n.startLineNumber}}return null}(i[0],t);null!==e&&n.setSelection({startLineNumber:e,startColumn:1,endLineNumber:e,endColumn:1})}}});for(let e=1;e<=7;e++)(0,A.QG)(new pe({id:pe.ID(e),label:_.N("foldLevelAction.label","Fold Level {0}",e),alias:`Fold Level ${e}`,precondition:le,kbOpts:{kbExpr:H.u.editorTextFocus,primary:(0,w.gx)(2089,2048|21+e),weight:100}}));const me=(0,se.P6)("editor.foldBackground",{light:(0,se.Zn)(se.hE,.3),dark:(0,se.Zn)(se.hE,.3),hc:null},_.N("foldBackgroundBackground","Background color behind folded ranges. The color must not be opaque so as not to hide underlying decorations."),!0),fe=(0,se.P6)("editorGutter.foldingControlForeground",{dark:se.XZ,light:se.XZ,hc:se.XZ},_.N("editorGutter.foldingControlForeground","Color of the folding control in the editor gutter."));(0,F.Ic)(((e,t)=>{const n=e.getColor(me);n&&t.addRule(`.monaco-editor .folded-background { background-color: ${n}; }`);const i=e.getColor(fe);i&&t.addRule(`\n\t\t.monaco-editor .cldr${F.kS.asCSSSelector(W)},\n\t\t.monaco-editor .cldr${F.kS.asCSSSelector(z)} {\n\t\t\tcolor: ${i} !important;\n\t\t}\n\t\t`)}))},3111:(e,t,n)=>{"use strict";n.r(t);var i=n(3580),o=n(6830),r=n(2334);class s extends o.R6{constructor(){super({id:"editor.action.fontZoomIn",label:i.N("EditorFontZoomIn.label","Editor Font Zoom In"),alias:"Editor Font Zoom In",precondition:void 0})}run(e,t){r.C.setZoomLevel(r.C.getZoomLevel()+1)}}class a extends o.R6{constructor(){super({id:"editor.action.fontZoomOut",label:i.N("EditorFontZoomOut.label","Editor Font Zoom Out"),alias:"Editor Font Zoom Out",precondition:void 0})}run(e,t){r.C.setZoomLevel(r.C.getZoomLevel()-1)}}class l extends o.R6{constructor(){super({id:"editor.action.fontZoomReset",label:i.N("EditorFontZoomReset.label","Editor Font Zoom Reset"),alias:"Editor Font Zoom Reset",precondition:void 0})}run(e,t){r.C.setZoomLevel(0)}}(0,o.Qr)(s),(0,o.Qr)(a),(0,o.Qr)(l)},3606:(e,t,n)=>{"use strict";n.d(t,{xC:()=>L,Zg:()=>x,x$:()=>E,Qq:()=>D,Qs:()=>M});var i=n(6346),o=n(9488),r=n(1050),s=n(7301),a=n(666),l=n(9925),d=n(5520),c=n(187),h=n(4314),u=n(3860),g=n(4101),p=n(469),m=n(1200),f=n(9939),_=n(3580);class b{constructor(e){this.value=e,this._lower=e.toLowerCase()}static toKey(e){return"string"==typeof e?e.toLowerCase():e._lower}}var C=n(2065),v=n(1741),w=n(4565),y=n(8401),A=n(3725),S=function(e,t,n,i){return new(n||(n=Promise))((function(o,r){function s(e){try{l(i.next(e))}catch(e){r(e)}}function a(e){try{l(i.throw(e))}catch(e){r(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,a)}l((i=i.apply(e,t||[])).next())}))};function x(e){if(!(e=e.filter((e=>e.range))).length)return;let{range:t}=e[0];for(let n=1;ne.provideDocumentRangeFormattingEdits(t,t.getFullModelRange(),n,i)})}return t}class L{static setFormatterSelector(e){return{dispose:L._selectors.unshift(e)}}static select(e,t,n){return S(this,void 0,void 0,(function*(){if(0===e.length)return;const i=A.$.first(L._selectors);return i?yield i(e,t,n):void 0}))}}function E(e,t,n,i,o,r){return S(this,void 0,void 0,(function*(){const s=e.get(C.TG),a=(0,d.CL)(t)?t.getModel():t,l=g.vN.ordered(a),c=yield L.select(l,a,i);c&&(o.report(c),yield s.invokeFunction(N,c,t,n,r))}))}function N(e,t,n,i,r){return S(this,void 0,void 0,(function*(){const s=e.get(p.p);let a,c;(0,d.CL)(n)?(a=n.getModel(),c=new l.Dl(n,5,void 0,r)):(a=n,c=new l.YQ(n,r));let g=[],m=0;for(let e of(0,o._2)(i).sort(h.e.compareRangesUsingStarts))m>0&&h.e.areIntersectingOrTouching(g[m-1],e)?g[m-1]=h.e.fromPositions(g[m-1].getStartPosition(),e.getEndPosition()):m=g.push(e);const _=e=>S(this,void 0,void 0,(function*(){return(yield t.provideDocumentRangeFormattingEdits(a,e,a.getFormattingOptions(),c.token))||[]})),b=(e,t)=>{if(!e.length||!t.length)return!1;const n=e.reduce(((e,t)=>h.e.plusRange(e,t.range)),e[0].range);if(!t.some((e=>h.e.intersectRanges(n,e.range))))return!1;for(let n of e)for(let e of t)if(h.e.intersectRanges(n.range,e.range))return!0;return!1},C=[],v=[];try{for(let e of g){if(c.token.isCancellationRequested)return!0;v.push(yield _(e))}for(let e=0;e({text:e.text,range:h.e.lift(e.range),forceMoveMarkers:!0}))),(e=>{for(const{range:n}of e)if(h.e.areIntersectingOrTouching(n,t))return[new u.Y(n.startLineNumber,n.startColumn,n.endLineNumber,n.endColumn)];return null}))}return!0}))}function D(e,t,n,i,o){return S(this,void 0,void 0,(function*(){const r=e.get(C.TG),s=(0,d.CL)(t)?t.getModel():t,a=k(s),l=yield L.select(a,s,n);l&&(i.report(l),yield r.invokeFunction(I,l,t,n,o))}))}function I(e,t,n,i,o){return S(this,void 0,void 0,(function*(){const r=e.get(p.p);let s,a,c;(0,d.CL)(n)?(s=n.getModel(),a=new l.Dl(n,5,void 0,o)):(s=n,a=new l.YQ(n,o));try{const e=yield t.provideDocumentFormattingEdits(s,s.getFormattingOptions(),a.token);if(c=yield r.computeMoreMinimalEdits(s.uri,e),a.token.isCancellationRequested)return!0}finally{a.dispose()}if(!c||0===c.length)return!1;if((0,d.CL)(n))f.V.execute(n,c,2!==i),2!==i&&(x(c),n.revealPositionInCenterIfOutsideViewport(n.getPosition(),1));else{const[{range:e}]=c,t=new u.Y(e.startLineNumber,e.startColumn,e.endLineNumber,e.endColumn);s.pushEditOperations([t],c.map((e=>({text:e.text,range:h.e.lift(e.range),forceMoveMarkers:!0}))),(e=>{for(const{range:n}of e)if(h.e.areIntersectingOrTouching(n,t))return[new u.Y(n.startLineNumber,n.startColumn,n.endLineNumber,n.endColumn)];return null}))}return!0}))}function M(e,t,n,i,o){const a=g.ln.ordered(t);return 0===a.length||a[0].autoFormatTriggerCharacters.indexOf(i)<0?Promise.resolve(void 0):Promise.resolve(a[0].provideOnTypeFormattingEdits(t,n,i,o,r.T.None)).catch(s.Cp).then((n=>e.computeMoreMinimalEdits(t.uri,n)))}L._selectors=new v.S,w.P.registerCommand("_executeFormatRangeProvider",(function(e,...t){const[n,i,l]=t;(0,y.p_)(a.o.isUri(n)),(0,y.p_)(h.e.isIRange(i));const d=e.get(m.q).getModel(n);if(!d)throw(0,s.b1)("resource");return function(e,t,n,i,r){return S(this,void 0,void 0,(function*(){const a=g.vN.ordered(t);for(const l of a){let a=yield Promise.resolve(l.provideDocumentRangeFormattingEdits(t,n,i,r)).catch(s.Cp);if((0,o.Of)(a))return yield e.computeMoreMinimalEdits(t.uri,a)}}))}(e.get(p.p),d,h.e.lift(i),l,r.T.None)})),w.P.registerCommand("_executeFormatDocumentProvider",(function(e,...t){const[n,i]=t;(0,y.p_)(a.o.isUri(n));const l=e.get(m.q).getModel(n);if(!l)throw(0,s.b1)("resource");return function(e,t,n,i){return S(this,void 0,void 0,(function*(){const r=k(t);for(const a of r){let r=yield Promise.resolve(a.provideDocumentFormattingEdits(t,n,i)).catch(s.Cp);if((0,o.Of)(r))return yield e.computeMoreMinimalEdits(t.uri,r)}}))}(e.get(p.p),l,i,r.T.None)})),w.P.registerCommand("_executeFormatOnTypeProvider",(function(e,...t){const[n,i,o,r]=t;(0,y.p_)(a.o.isUri(n)),(0,y.p_)(c.L.isIPosition(i)),(0,y.p_)("string"==typeof o);const l=e.get(m.q).getModel(n);if(!l)throw(0,s.b1)("resource");return M(e.get(p.p),l,c.L.lift(i),o,r)}))},4818:(e,t,n)=>{"use strict";n.r(t);var i=n(9488),o=n(1050),r=n(2258),s=n(5976),a=n(6830),l=n(1640),d=n(4906),c=n(4314),h=n(9102),u=n(4101),g=n(469),p=n(3606),m=n(9939),f=n(3580),_=n(4565),b=n(8819),C=n(2065),v=n(7301),w=n(535),y=function(e,t,n,i){var o,r=arguments.length,s=r<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,i);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,n,s):o(t,n))||s);return r>3&&s&&Object.defineProperty(t,n,s),s},A=function(e,t){return function(n,i){t(n,i,e)}},S=function(e,t,n,i){return new(n||(n=Promise))((function(o,r){function s(e){try{l(i.next(e))}catch(e){r(e)}}function a(e){try{l(i.throw(e))}catch(e){r(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,a)}l((i=i.apply(e,t||[])).next())}))};let x=class{constructor(e,t){this._workerService=t,this._callOnDispose=new s.SL,this._callOnModel=new s.SL,this._editor=e,this._callOnDispose.add(e.onDidChangeConfiguration((()=>this._update()))),this._callOnDispose.add(e.onDidChangeModel((()=>this._update()))),this._callOnDispose.add(e.onDidChangeModelLanguage((()=>this._update()))),this._callOnDispose.add(u.ln.onDidChange(this._update,this))}dispose(){this._callOnDispose.dispose(),this._callOnModel.dispose()}_update(){if(this._callOnModel.clear(),!this._editor.getOption(46))return;if(!this._editor.hasModel())return;const e=this._editor.getModel(),[t]=u.ln.ordered(e);if(!t||!t.autoFormatTriggerCharacters)return;let n=new d.q;for(let e of t.autoFormatTriggerCharacters)n.add(e.charCodeAt(0));this._callOnModel.add(this._editor.onDidType((e=>{let t=e.charCodeAt(e.length-1);n.has(t)&&this._trigger(String.fromCharCode(t))})))}_trigger(e){if(!this._editor.hasModel())return;if(this._editor.getSelections().length>1)return;const t=this._editor.getModel(),n=this._editor.getPosition();let o=!1;const r=this._editor.onDidChangeModelContent((e=>{if(e.isFlush)return o=!0,void r.dispose();for(let t=0,i=e.changes.length;t{r.dispose(),o||(0,i.Of)(e)&&(m.V.execute(this._editor,e,!0),(0,p.Zg)(e))}),(e=>{throw r.dispose(),e}))}};x.ID="editor.contrib.autoFormat",x=y([A(1,g.p)],x);let k=class{constructor(e,t){this.editor=e,this._instantiationService=t,this._callOnDispose=new s.SL,this._callOnModel=new s.SL,this._callOnDispose.add(e.onDidChangeConfiguration((()=>this._update()))),this._callOnDispose.add(e.onDidChangeModel((()=>this._update()))),this._callOnDispose.add(e.onDidChangeModelLanguage((()=>this._update()))),this._callOnDispose.add(u.vN.onDidChange(this._update,this))}dispose(){this._callOnDispose.dispose(),this._callOnModel.dispose()}_update(){this._callOnModel.clear(),this.editor.getOption(45)&&this.editor.hasModel()&&u.vN.has(this.editor.getModel())&&this._callOnModel.add(this.editor.onDidPaste((({range:e})=>this._trigger(e))))}_trigger(e){this.editor.hasModel()&&(this.editor.getSelections().length>1||this._instantiationService.invokeFunction(p.x$,this.editor,e,2,w.E.None,o.T.None).catch(v.dL))}};k.ID="editor.contrib.formatOnPaste",k=y([A(1,C.TG)],k);class L extends a.R6{constructor(){super({id:"editor.action.formatDocument",label:f.N("formatDocument.label","Format Document"),alias:"Format Document",precondition:b.Ao.and(h.u.notInCompositeEditor,h.u.writable,h.u.hasDocumentFormattingProvider),kbOpts:{kbExpr:h.u.editorTextFocus,primary:1572,linux:{primary:3111},weight:100},contextMenuOpts:{group:"1_modification",order:1.3}})}run(e,t){return S(this,void 0,void 0,(function*(){if(t.hasModel()){const n=e.get(C.TG),i=e.get(w.e);yield i.showWhile(n.invokeFunction(p.Qq,t,1,w.E.None,o.T.None),250)}}))}}class E extends a.R6{constructor(){super({id:"editor.action.formatSelection",label:f.N("formatSelection.label","Format Selection"),alias:"Format Selection",precondition:b.Ao.and(h.u.writable,h.u.hasDocumentSelectionFormattingProvider),kbOpts:{kbExpr:h.u.editorTextFocus,primary:(0,r.gx)(2089,2084),weight:100},contextMenuOpts:{when:h.u.hasNonEmptySelection,group:"1_modification",order:1.31}})}run(e,t){return S(this,void 0,void 0,(function*(){if(!t.hasModel())return;const n=e.get(C.TG),i=t.getModel(),r=t.getSelections().map((e=>e.isEmpty()?new c.e(e.startLineNumber,1,e.startLineNumber,i.getLineMaxColumn(e.startLineNumber)):e)),s=e.get(w.e);yield s.showWhile(n.invokeFunction(p.x$,t,r,1,w.E.None,o.T.None),250)}))}}(0,a._K)(x.ID,x),(0,a._K)(k.ID,k),(0,a.Qr)(L),(0,a.Qr)(E),_.P.registerCommand("editor.action.format",(e=>S(void 0,void 0,void 0,(function*(){const t=e.get(l.$).getFocusedCodeEditor();if(!t||!t.hasModel())return;const n=e.get(_.H);t.getSelection().isEmpty()?yield n.executeCommand("editor.action.formatDocument"):yield n.executeCommand("editor.action.formatSelection")}))))},9939:(e,t,n)=>{"use strict";n.d(t,{V:()=>r});var i=n(9386),o=n(4314);class r{static _handleEolEdits(e,t){let n,i=[];for(let e of t)"number"==typeof e.eol&&(n=e.eol),e.range&&"string"==typeof e.text&&i.push(e);return"number"==typeof n&&e.hasModel()&&e.getModel().pushEOL(n),i}static _isFullModelReplaceEdit(e,t){if(!e.hasModel())return!1;const n=e.getModel(),i=n.validateRange(t.range);return n.getFullModelRange().equalsRange(i)}static execute(e,t,n){n&&e.pushUndoStop();const s=r._handleEolEdits(e,t);1===s.length&&r._isFullModelReplaceEdit(e,s[0])?e.executeEdits("formatEditsCommand",s.map((e=>i.h.replace(o.e.lift(e.range),e.text)))):e.executeEdits("formatEditsCommand",s.map((e=>i.h.replaceMove(o.e.lift(e.range),e.text)))),n&&e.pushUndoStop()}}},5091:(e,t,n)=>{"use strict";n.r(t),n.d(t,{MarkerController:()=>ge,NextMarkerAction:()=>me});var i=n(3580),o=n(5976),r=n(8819),s=n(187),a=n(4314),l=n(6830),d=n(9102),c=n(3379),h=n.n(c),u=n(7795),g=n.n(u),p=n(569),m=n.n(p),f=n(3565),_=n.n(f),b=n(9216),C=n.n(b),v=n(4589),w=n.n(v),y=n(8994),A={};A.styleTagTransform=w(),A.setAttributes=_(),A.insert=m().bind(null,"head"),A.domAPI=g(),A.insertStyleElement=C(),h()(y.Z,A),y.Z&&y.Z.locals&&y.Z.locals;var S,x=n(5321),k=n(8674),L=n(3910),E=n(7781),N=n(1264),D=n(6781),I=n(8843),M=n(9488),T=n(4669),R=n(1884),O=n(5935),B=n(4603),P=n(3046);!function(e){e.className=function(e){switch(e){case B.Z.Ignore:return"severity-ignore "+P.lA.info.classNames;case B.Z.Info:return P.lA.info.classNames;case B.Z.Warning:return P.lA.warning.classNames;case B.Z.Error:return P.lA.error.classNames;default:return""}}}(S||(S={})),(0,E.Ic)(((e,t)=>{const n=e.getColor(L.Jp);if(n){const e=P.lA.error.cssSelector;t.addRule(`\n\t\t\t.monaco-editor .zone-widget ${e},\n\t\t\t.markers-panel .marker-icon${e},\n\t\t\t.text-search-provider-messages .providerMessage ${e},\n\t\t\t.extensions-viewlet > .extensions ${e} {\n\t\t\t\tcolor: ${n};\n\t\t\t}\n\t\t`)}const i=e.getColor(L.BO);if(i){const e=P.lA.warning.cssSelector;t.addRule(`\n\t\t\t.monaco-editor .zone-widget ${e},\n\t\t\t.markers-panel .marker-icon${e},\n\t\t\t.extensions-viewlet > .extensions ${e},\n\t\t\t.extension-editor ${e},\n\t\t\t.text-search-provider-messages .providerMessage ${e},\n\t\t\t.preferences-editor ${e} {\n\t\t\t\tcolor: ${i};\n\t\t\t}\n\t\t`)}const o=e.getColor(L.OL);if(o){const e=P.lA.info.cssSelector;t.addRule(`\n\t\t\t.monaco-editor .zone-widget ${e},\n\t\t\t.markers-panel .marker-icon${e},\n\t\t\t.extensions-viewlet > .extensions ${e},\n\t\t\t.text-search-provider-messages .providerMessage ${e},\n\t\t\t.extension-editor ${e} {\n\t\t\t\tcolor: ${o};\n\t\t\t}\n\t\t`)}}));var F=n(988),W=n(4144),z=n(1133),V=n(2065),H=n(7295),j=n(4349),$=function(e,t){return function(n,i){t(n,i,e)}};class U{constructor(e,t,n,i,r){this._openerService=i,this._labelService=r,this._lines=0,this._longestLineLength=0,this._relatedDiagnostics=new WeakMap,this._disposables=new o.SL,this._editor=t;const s=document.createElement("div");s.className="descriptioncontainer",this._messageBlock=document.createElement("div"),this._messageBlock.classList.add("message"),this._messageBlock.setAttribute("aria-live","assertive"),this._messageBlock.setAttribute("role","alert"),s.appendChild(this._messageBlock),this._relatedBlock=document.createElement("div"),s.appendChild(this._relatedBlock),this._disposables.add(x.mu(this._relatedBlock,"click",(e=>{e.preventDefault();const t=this._relatedDiagnostics.get(e.target);t&&n(t)}))),this._scrollable=new D.NB(s,{horizontal:1,vertical:1,useShadows:!1,horizontalScrollbarSize:3,verticalScrollbarSize:3}),e.appendChild(this._scrollable.getDomNode()),this._disposables.add(this._scrollable.onScroll((e=>{s.style.left=`-${e.scrollLeft}px`,s.style.top=`-${e.scrollTop}px`}))),this._disposables.add(this._scrollable)}dispose(){(0,o.B9)(this._disposables)}update(e){const{source:t,message:n,relatedInformation:i,code:o}=e;let r=((null==t?void 0:t.length)||0)+"()".length;o&&(r+="string"==typeof o?o.length:o.value.length);const s=(0,H.uq)(n);this._lines=s.length,this._longestLineLength=0;for(const e of s)this._longestLineLength=Math.max(e.length+r,this._longestLineLength);x.PO(this._messageBlock),this._messageBlock.setAttribute("aria-label",this.getAriaLabel(e)),this._editor.applyFontInfo(this._messageBlock);let a=this._messageBlock;for(const e of s)a=document.createElement("div"),a.innerText=e,""===e&&(a.style.height=this._messageBlock.style.lineHeight),this._messageBlock.appendChild(a);if(t||o){const e=document.createElement("span");if(e.classList.add("details"),a.appendChild(e),t){const n=document.createElement("span");n.innerText=t,n.classList.add("source"),e.appendChild(n)}if(o)if("string"==typeof o){const t=document.createElement("span");t.innerText=`(${o})`,t.classList.add("code"),e.appendChild(t)}else this._codeLink=x.$("a.code-link"),this._codeLink.setAttribute("href",`${o.target.toString()}`),this._codeLink.onclick=e=>{this._openerService.open(o.target,{allowCommands:!0}),e.preventDefault(),e.stopPropagation()},x.R3(this._codeLink,x.$("span")).innerText=o.value,e.appendChild(this._codeLink)}if(x.PO(this._relatedBlock),this._editor.applyFontInfo(this._relatedBlock),(0,M.Of)(i)){const e=this._relatedBlock.appendChild(document.createElement("div"));e.style.paddingTop=`${Math.floor(.66*this._editor.getOption(57))}px`,this._lines+=1;for(const t of i){let n=document.createElement("div"),i=document.createElement("a");i.classList.add("filename"),i.innerText=`${(0,I.p)(t.resource)}(${t.startLineNumber}, ${t.startColumn}): `,i.title=this._labelService.getUriLabel(t.resource),this._relatedDiagnostics.set(i,t);let o=document.createElement("span");o.innerText=t.message,n.appendChild(i),n.appendChild(o),this._lines+=1,e.appendChild(n)}}const l=this._editor.getOption(41),d=Math.ceil(l.typicalFullwidthCharacterWidth*this._longestLineLength*.75),c=l.lineHeight*this._lines;this._scrollable.setScrollDimensions({scrollWidth:d,scrollHeight:c})}layout(e,t){this._scrollable.getDomNode().style.height=`${e}px`,this._scrollable.getDomNode().style.width=`${t}px`,this._scrollable.setScrollDimensions({width:t,height:e})}getHeightInLines(){return Math.min(17,this._lines)}getAriaLabel(e){let t="";switch(e.severity){case k.ZL.Error:t=i.N("Error","Error");break;case k.ZL.Warning:t=i.N("Warning","Warning");break;case k.ZL.Info:t=i.N("Info","Info");break;case k.ZL.Hint:t=i.N("Hint","Hint")}let n=i.N("marker aria","{0} at {1}. ",t,e.startLineNumber+":"+e.startColumn);const o=this._editor.getModel();return o&&e.startLineNumber<=o.getLineCount()&&e.startLineNumber>=1&&(n=`${o.getLineContent(e.startLineNumber)}, ${n}`),n}}let Z=class e extends R.vk{constructor(e,t,n,i,r,s,a){super(e,{showArrow:!0,showFrame:!0,isAccessible:!0},r),this._themeService=t,this._openerService=n,this._menuService=i,this._contextKeyService=s,this._labelService=a,this._callOnDispose=new o.SL,this._onDidSelectRelatedInformation=new T.Q5,this.onDidSelectRelatedInformation=this._onDidSelectRelatedInformation.event,this._severity=k.ZL.Warning,this._backgroundColor=N.Il.white,this._applyTheme(t.getColorTheme()),this._callOnDispose.add(t.onDidColorThemeChange(this._applyTheme.bind(this))),this.create()}_applyTheme(e){this._backgroundColor=e.getColor(J);let t=G;this._severity===k.ZL.Warning?t=Q:this._severity===k.ZL.Info&&(t=X);const n=e.getColor(t);this.style({arrowColor:n,frameColor:n,headerBackgroundColor:this._backgroundColor,primaryHeadingColor:e.getColor(R.IH),secondaryHeadingColor:e.getColor(R.R7)})}_applyStyles(){this._parentContainer&&(this._parentContainer.style.backgroundColor=this._backgroundColor?this._backgroundColor.toString():""),super._applyStyles()}dispose(){this._callOnDispose.dispose(),super.dispose()}_fillHead(t){super._fillHead(t),this._disposables.add(this._actionbarWidget.actionRunner.onBeforeRun((e=>this.editor.focus())));const n=[],i=this._menuService.createMenu(e.TitleMenu,this._contextKeyService);(0,z.vr)(i,void 0,n),this._actionbarWidget.push(n,{label:!1,icon:!0,index:0}),i.dispose()}_fillTitleIcon(e){this._icon=x.R3(e,x.$(""))}_fillBody(e){this._parentContainer=e,e.classList.add("marker-widget"),this._parentContainer.tabIndex=0,this._parentContainer.setAttribute("role","tooltip"),this._container=document.createElement("div"),e.appendChild(this._container),this._message=new U(this._container,this.editor,(e=>this._onDidSelectRelatedInformation.fire(e)),this._openerService,this._labelService),this._disposables.add(this._message)}show(){throw new Error("call showAtMarker")}showAtMarker(e,t,n){this._container.classList.remove("stale"),this._message.update(e),this._severity=e.severity,this._applyTheme(this._themeService.getColorTheme());let o=a.e.lift(e);const r=this.editor.getPosition();let s=r&&o.containsPosition(r)?r:o.getStartPosition();super.show(s,this.computeRequiredHeight());const l=this.editor.getModel();if(l){const e=n>1?i.N("problems","{0} of {1} problems",t,n):i.N("change","{0} of {1} problem",t,n);this.setTitle((0,O.EZ)(l.uri),e)}this._icon.className=`codicon ${S.className(k.ZL.toSeverity(this._severity))}`,this.editor.revealPositionNearTop(s,0),this.editor.focus()}updateMarker(e){this._container.classList.remove("stale"),this._message.update(e)}showStale(){this._container.classList.add("stale"),this._relayout()}_doLayoutBody(e,t){super._doLayoutBody(e,t),this._heightInPixel=e,this._message.layout(e,t),this._container.style.height=`${e}px`}_onWidth(e){this._message.layout(this._heightInPixel,e)}_relayout(){super._relayout(this.computeRequiredHeight())}computeRequiredHeight(){return 3+this._message.getHeightInLines()}};Z.TitleMenu=new W.eH("gotoErrorTitleMenu"),Z=function(e,t,n,i){var o,r=arguments.length,s=r<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,i);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,n,s):o(t,n))||s);return r>3&&s&&Object.defineProperty(t,n,s),s}([$(1,E.XE),$(2,F.v4),$(3,W.co),$(4,V.TG),$(5,r.i6),$(6,j.e)],Z);let K=(0,L.kw)(L.lX,L.b6),q=(0,L.kw)(L.uo,L.pW),Y=(0,L.kw)(L.c6,L.T8);const G=(0,L.P6)("editorMarkerNavigationError.background",{dark:K,light:K,hc:K},i.N("editorMarkerNavigationError","Editor marker navigation widget error color.")),Q=(0,L.P6)("editorMarkerNavigationWarning.background",{dark:q,light:q,hc:q},i.N("editorMarkerNavigationWarning","Editor marker navigation widget warning color.")),X=(0,L.P6)("editorMarkerNavigationInfo.background",{dark:Y,light:Y,hc:Y},i.N("editorMarkerNavigationInfo","Editor marker navigation widget info color.")),J=(0,L.P6)("editorMarkerNavigation.background",{dark:"#2D2D30",light:N.Il.white,hc:"#0C141F"},i.N("editorMarkerNavigationBackground","Editor marker navigation widget background."));(0,E.Ic)(((e,t)=>{const n=e.getColor(L.ur);n&&t.addRule(`.monaco-editor .marker-widget a.code-link span { color: ${n}; }`);const i=e.getColor(L.sg);i&&t.addRule(`.monaco-editor .marker-widget a.code-link span:hover { color: ${i}; }`)}));var ee=n(1640),te=n(666),ne=n(5026),ie=n(1741),oe=function(e,t,n,i){var o,r=arguments.length,s=r<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,i);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,n,s):o(t,n))||s);return r>3&&s&&Object.defineProperty(t,n,s),s},re=function(e,t){return function(n,i){t(n,i,e)}};class se{constructor(e,t,n){this.marker=e,this.index=t,this.total=n}}let ae=class e{constructor(t,n){this._markerService=n,this._onDidChange=new T.Q5,this.onDidChange=this._onDidChange.event,this._dispoables=new o.SL,this._markers=[],this._nextIdx=-1,te.o.isUri(t)?this._resourceFilter=e=>e.toString()===t.toString():t&&(this._resourceFilter=t);const i=()=>{this._markers=this._markerService.read({resource:te.o.isUri(t)?t:void 0,severities:k.ZL.Error|k.ZL.Warning|k.ZL.Info}),"function"==typeof t&&(this._markers=this._markers.filter((e=>this._resourceFilter(e.resource)))),this._markers.sort(e._compareMarker)};i(),this._dispoables.add(n.onMarkerChanged((e=>{this._resourceFilter&&!e.some((e=>this._resourceFilter(e)))||(i(),this._nextIdx=-1,this._onDidChange.fire())})))}dispose(){this._dispoables.dispose(),this._onDidChange.dispose()}matches(e){return!this._resourceFilter&&!e||!(!this._resourceFilter||!e)&&this._resourceFilter(e)}get selected(){const e=this._markers[this._nextIdx];return e&&new se(e,this._nextIdx+1,this._markers.length)}_initIdx(e,t,n){let i=!1,o=this._markers.findIndex((t=>t.resource.toString()===e.uri.toString()));o<0&&(o=(0,M.ry)(this._markers,{resource:e.uri},((e,t)=>(0,H.qu)(e.resource.toString(),t.resource.toString()))),o<0&&(o=~o));for(let n=o;nt.resource.toString()===e.toString()));if(!(n<0))for(;nthis.close()),this,this._sessionDispoables),this._widgetVisible.set(!0),this._sessionDispoables.add(this._model),this._sessionDispoables.add(this._widget),this._sessionDispoables.add(this._editor.onDidChangeCursorPosition((e=>{var t,n,i;(null===(t=this._model)||void 0===t?void 0:t.selected)&&a.e.containsPosition(null===(n=this._model)||void 0===n?void 0:n.selected.marker,e.position)||null===(i=this._model)||void 0===i||i.resetIndex()}))),this._sessionDispoables.add(this._model.onDidChange((()=>{if(!this._widget||!this._widget.position||!this._model)return;const e=this._model.find(this._editor.getModel().uri,this._widget.position);e?this._widget.updateMarker(e.marker):this._widget.showStale()}))),this._sessionDispoables.add(this._widget.onDidSelectRelatedInformation((e=>{this._editorService.openCodeEditor({resource:e.resource,options:{pinned:!0,revealIfOpened:!0,selection:a.e.lift(e).collapseToStart()}},this._editor),this.close(!1)}))),this._sessionDispoables.add(this._editor.onDidChangeModel((()=>this._cleanUp()))),this._model}close(e=!0){this._cleanUp(),e&&this._editor.focus()}showAtMarker(e){if(this._editor.hasModel()){const t=this._getOrCreateModel(this._editor.getModel().uri);t.resetIndex(),t.move(!0,this._editor.getModel(),new s.L(e.startLineNumber,e.startColumn)),t.selected&&this._widget.showAtMarker(t.selected.marker,t.selected.index,t.selected.total)}}nagivate(t,n){return ue(this,void 0,void 0,(function*(){if(this._editor.hasModel()){const i=this._getOrCreateModel(n?void 0:this._editor.getModel().uri);if(i.move(t,this._editor.getModel(),this._editor.getPosition()),!i.selected)return;if(i.selected.marker.resource.toString()!==this._editor.getModel().uri.toString()){this._cleanUp();const o=yield this._editorService.openCodeEditor({resource:i.selected.marker.resource,options:{pinned:!1,revealIfOpened:!0,selectionRevealType:2,selection:i.selected.marker}},this._editor);o&&(e.get(o).close(),e.get(o).nagivate(t,n))}else this._widget.showAtMarker(i.selected.marker,i.selected.index,i.selected.total)}}))}};ge.ID="editor.contrib.markerController",ge=function(e,t,n,i){var o,r=arguments.length,s=r<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,i);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,n,s):o(t,n))||s);return r>3&&s&&Object.defineProperty(t,n,s),s}([he(1,le),he(2,r.i6),he(3,ee.$),he(4,V.TG)],ge);class pe extends l.R6{constructor(e,t,n){super(n),this._next=e,this._multiFile=t}run(e,t){return ue(this,void 0,void 0,(function*(){t.hasModel()&&ge.get(t).nagivate(this._next,this._multiFile)}))}}class me extends pe{constructor(){super(!0,!1,{id:me.ID,label:me.LABEL,alias:"Go to Next Problem (Error, Warning, Info)",precondition:void 0,kbOpts:{kbExpr:d.u.focus,primary:578,weight:100},menuOpts:{menuId:Z.TitleMenu,title:me.LABEL,icon:(0,ce.q5)("marker-navigation-next",P.lA.chevronDown,i.N("nextMarkerIcon","Icon for goto next marker.")),group:"navigation",order:1}})}}me.ID="editor.action.marker.next",me.LABEL=i.N("markerAction.next.label","Go to Next Problem (Error, Warning, Info)");class fe extends pe{constructor(){super(!1,!1,{id:fe.ID,label:fe.LABEL,alias:"Go to Previous Problem (Error, Warning, Info)",precondition:void 0,kbOpts:{kbExpr:d.u.focus,primary:1602,weight:100},menuOpts:{menuId:Z.TitleMenu,title:me.LABEL,icon:(0,ce.q5)("marker-navigation-previous",P.lA.chevronUp,i.N("previousMarkerIcon","Icon for goto previous marker.")),group:"navigation",order:2}})}}fe.ID="editor.action.marker.prev",fe.LABEL=i.N("markerAction.previous.label","Go to Previous Problem (Error, Warning, Info)"),(0,l._K)(ge.ID,ge),(0,l.Qr)(me),(0,l.Qr)(fe),(0,l.Qr)(class extends pe{constructor(){super(!0,!0,{id:"editor.action.marker.nextInFiles",label:i.N("markerAction.nextInFiles.label","Go to Next Problem in Files (Error, Warning, Info)"),alias:"Go to Next Problem in Files (Error, Warning, Info)",precondition:void 0,kbOpts:{kbExpr:d.u.focus,primary:66,weight:100},menuOpts:{menuId:W.eH.MenubarGoMenu,title:i.N({key:"miGotoNextProblem",comment:["&& denotes a mnemonic"]},"Next &&Problem"),group:"6_problem_nav",order:1}})}}),(0,l.Qr)(class extends pe{constructor(){super(!1,!0,{id:"editor.action.marker.prevInFiles",label:i.N("markerAction.previousInFiles.label","Go to Previous Problem in Files (Error, Warning, Info)"),alias:"Go to Previous Problem in Files (Error, Warning, Info)",precondition:void 0,kbOpts:{kbExpr:d.u.focus,primary:1090,weight:100},menuOpts:{menuId:W.eH.MenubarGoMenu,title:i.N({key:"miGotoPreviousProblem",comment:["&& denotes a mnemonic"]},"Previous &&Problem"),group:"6_problem_nav",order:2}})}});const _e=new r.uy("markersNavigationVisible",!1),be=l._l.bindToContribution(ge.get);(0,l.fK)(new be({id:"closeMarkersNavigation",precondition:_e,handler:e=>e.close(),kbOpts:{weight:150,kbExpr:d.u.focus,primary:9,secondary:[1033]}}))},2729:(e,t,n)=>{"use strict";n.r(t),n.d(t,{DefinitionAction:()=>te});var i=n(6346),o=n(5393),r=n(2258),s=n(1432),a=n(5520),l=n(6830),d=n(1640),c=n(187),h=n(4314),u=n(9102),g=n(4101),p=n(845),m=n(1884),f=n(2406),_=n(1455),b=n(3580),C=n(4144),v=n(8819),w=n(9422),y=n(535),A=n(1691),S=n(4565),x=n(9925),k=n(2065),L=n(5026),E=n(9989),N=n(5976),D=n(4669),I=n(1847),M=n(5935),T=function(e,t,n,i){var o,r=arguments.length,s=r<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,i);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,n,s):o(t,n))||s);return r>3&&s&&Object.defineProperty(t,n,s),s},R=function(e,t){return function(n,i){t(n,i,e)}};const O=new v.uy("hasSymbols",!1,(0,b.N)("hasSymbols","Whether there are symbol locations that can be navigated via keyboard-only.")),B=(0,k.yh)("ISymbolNavigationService");let P=class{constructor(e,t,n,i){this._editorService=t,this._notificationService=n,this._keybindingService=i,this._currentModel=void 0,this._currentIdx=-1,this._ignoreEditorChange=!1,this._ctxHasSymbols=O.bindTo(e)}reset(){var e,t;this._ctxHasSymbols.reset(),null===(e=this._currentState)||void 0===e||e.dispose(),null===(t=this._currentMessage)||void 0===t||t.dispose(),this._currentModel=void 0,this._currentIdx=-1}put(e){const t=e.parent.parent;if(t.references.length<=1)return void this.reset();this._currentModel=t,this._currentIdx=t.references.indexOf(e),this._ctxHasSymbols.set(!0),this._showMessage();const n=new F(this._editorService),i=n.onDidChange((e=>{if(this._ignoreEditorChange)return;const n=this._editorService.getActiveCodeEditor();if(!n)return;const i=n.getModel(),o=n.getPosition();if(!i||!o)return;let r=!1,s=!1;for(const e of t.references)if((0,M.Xy)(e.uri,i.uri))r=!0,s=s||h.e.containsPosition(e.range,o);else if(r)break;r&&s||this.reset()}));this._currentState=(0,N.F8)(n,i)}revealNext(e){if(!this._currentModel)return Promise.resolve();this._currentIdx+=1,this._currentIdx%=this._currentModel.references.length;const t=this._currentModel.references[this._currentIdx];return this._showMessage(),this._ignoreEditorChange=!0,this._editorService.openCodeEditor({resource:t.uri,options:{selection:h.e.collapseToStart(t.range),selectionRevealType:3}},e).finally((()=>{this._ignoreEditorChange=!1}))}_showMessage(){var e;null===(e=this._currentMessage)||void 0===e||e.dispose();const t=this._keybindingService.lookupKeybinding("editor.gotoNextSymbolFromResult"),n=t?(0,b.N)("location.kb","Symbol {0} of {1}, {2} for next",this._currentIdx+1,this._currentModel.references.length,t.getLabel()):(0,b.N)("location","Symbol {0} of {1}",this._currentIdx+1,this._currentModel.references.length);this._currentMessage=this._notificationService.status(n)}};P=T([R(0,v.i6),R(1,d.$),R(2,w.lT),R(3,I.d)],P),(0,L.z)(B,P,!0),(0,l.fK)(new class extends l._l{constructor(){super({id:"editor.gotoNextSymbolFromResult",precondition:O,kbOpts:{weight:100,primary:70}})}runEditorCommand(e,t){return e.get(B).revealNext(t)}}),E.W.registerCommandAndKeybindingRule({id:"editor.gotoNextSymbolFromResult.cancel",weight:100,when:O,primary:9,handler(e){e.get(B).reset()}});let F=class{constructor(e){this._listener=new Map,this._disposables=new N.SL,this._onDidChange=new D.Q5,this.onDidChange=this._onDidChange.event,this._disposables.add(e.onCodeEditorRemove(this._onDidRemoveEditor,this)),this._disposables.add(e.onCodeEditorAdd(this._onDidAddEditor,this)),e.listCodeEditors().forEach(this._onDidAddEditor,this)}dispose(){this._disposables.dispose(),this._onDidChange.dispose(),(0,N.B9)(this._listener.values())}_onDidAddEditor(e){this._listener.set(e,(0,N.F8)(e.onDidChangeCursorPosition((t=>this._onDidChange.fire({editor:e}))),e.onDidChangeModelContent((t=>this._onDidChange.fire({editor:e})))))}_onDidRemoveEditor(e){var t;null===(t=this._listener.get(e))||void 0===t||t.dispose(),this._listener.delete(e)}};F=T([R(0,d.$)],F);var W,z,V,H,j,$,U,Z,K=n(6268),q=n(666),Y=n(8401),G=n(4527),Q=function(e,t,n,i){return new(n||(n=Promise))((function(o,r){function s(e){try{l(i.next(e))}catch(e){r(e)}}function a(e){try{l(i.throw(e))}catch(e){r(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,a)}l((i=i.apply(e,t||[])).next())}))};C.BH.appendMenuItem(C.eH.EditorContext,{submenu:C.eH.EditorContextPeek,title:b.N("peek.submenu","Peek"),group:"navigation",order:100});const X=new Set;function J(e){const t=new e;return(0,l.QG)(t),X.add(t.id),t}class ee extends l.R6{constructor(e,t){super(t),this._configuration=e}run(e,t){if(!t.hasModel())return Promise.resolve(void 0);const n=e.get(w.lT),r=e.get(d.$),s=e.get(y.e),a=e.get(B),l=t.getModel(),c=t.getPosition(),h=new x.Dl(t,5),u=(0,o.eP)(this._getLocationModel(l,c,h.token),h.token).then((e=>Q(this,void 0,void 0,(function*(){if(!e||h.token.isCancellationRequested)return;let n;if((0,i.Z9)(e.ariaMessage),e.referenceAt(l.uri,c)){const e=this._getAlternativeCommand(t);e!==this.id&&X.has(e)&&(n=t.getAction(e))}const o=e.references.length;if(0===o){if(!this._configuration.muteMessage){const e=l.getWordAtPosition(c);p.O.get(t).showMessage(this._getNoResultFoundMessage(e),c)}}else{if(1!==o||!n)return this._onResult(r,a,t,e);n.run()}}))),(e=>{n.error(e)})).finally((()=>{h.dispose()}));return s.showWhile(u,250),u}_onResult(e,t,n,i){return Q(this,void 0,void 0,(function*(){const o=this._getGoToPreference(n);if(n instanceof G.H||!(this._configuration.openInPeek||"peek"===o&&i.references.length>1)){const r=i.firstReference(),s=i.references.length>1&&"gotoAndPeek"===o,a=yield this._openReference(n,e,r,this._configuration.openToSide,!s);s&&a?this._openInPeek(a,i):i.dispose(),"goto"===o&&t.put(r)}else this._openInPeek(n,i)}))}_openReference(e,t,n,i,o){return Q(this,void 0,void 0,(function*(){let r;if((0,g.vx)(n)&&(r=n.targetSelectionRange),r||(r=n.range),!r)return;const s=yield t.openCodeEditor({resource:n.uri,options:{selection:h.e.collapseToStart(r),selectionRevealType:3}},e,i);if(s){if(o){const e=s.getModel(),t=s.deltaDecorations([],[{range:r,options:{description:"symbol-navigate-action-highlight",className:"symbolHighlight"}}]);setTimeout((()=>{s.getModel()===e&&s.deltaDecorations(t,[])}),350)}return s}}))}_openInPeek(e,t){let n=f.J.get(e);n&&e.hasModel()?n.toggleWidget(e.getSelection(),(0,o.PG)((e=>Promise.resolve(t))),this._configuration.openInPeek):t.dispose()}}class te extends ee{_getLocationModel(e,t,n){return Q(this,void 0,void 0,(function*(){return new _.oQ(yield(0,A.nD)(e,t,n),b.N("def.title","Definitions"))}))}_getNoResultFoundMessage(e){return e&&e.word?b.N("noResultWord","No definition found for '{0}'",e.word):b.N("generic.noResults","No definition found")}_getAlternativeCommand(e){return e.getOption(48).alternativeDefinitionCommand}_getGoToPreference(e){return e.getOption(48).multipleDefinitions}}const ne=s.$L&&!K.$W?2118:70;J(((W=class e extends te{constructor(){super({openToSide:!1,openInPeek:!1,muteMessage:!1},{id:e.id,label:b.N("actions.goToDecl.label","Go to Definition"),alias:"Go to Definition",precondition:v.Ao.and(u.u.hasDefinitionProvider,u.u.isInWalkThroughSnippet.toNegated()),kbOpts:{kbExpr:u.u.editorTextFocus,primary:ne,weight:100},contextMenuOpts:{group:"navigation",order:1.1},menuOpts:{menuId:C.eH.MenubarGoMenu,group:"4_symbol_nav",order:2,title:b.N({key:"miGotoDefinition",comment:["&& denotes a mnemonic"]},"Go to &&Definition")}}),S.P.registerCommandAlias("editor.action.goToDeclaration",e.id)}}).id="editor.action.revealDefinition",W)),J(((z=class e extends te{constructor(){super({openToSide:!0,openInPeek:!1,muteMessage:!1},{id:e.id,label:b.N("actions.goToDeclToSide.label","Open Definition to the Side"),alias:"Open Definition to the Side",precondition:v.Ao.and(u.u.hasDefinitionProvider,u.u.isInWalkThroughSnippet.toNegated()),kbOpts:{kbExpr:u.u.editorTextFocus,primary:(0,r.gx)(2089,ne),weight:100}}),S.P.registerCommandAlias("editor.action.openDeclarationToTheSide",e.id)}}).id="editor.action.revealDefinitionAside",z)),J(((V=class e extends te{constructor(){super({openToSide:!1,openInPeek:!0,muteMessage:!1},{id:e.id,label:b.N("actions.previewDecl.label","Peek Definition"),alias:"Peek Definition",precondition:v.Ao.and(u.u.hasDefinitionProvider,m.Jy.notInPeekEditor,u.u.isInWalkThroughSnippet.toNegated()),kbOpts:{kbExpr:u.u.editorTextFocus,primary:582,linux:{primary:3140},weight:100},contextMenuOpts:{menuId:C.eH.EditorContextPeek,group:"peek",order:2}}),S.P.registerCommandAlias("editor.action.previewDeclaration",e.id)}}).id="editor.action.peekDefinition",V));class ie extends ee{_getLocationModel(e,t,n){return Q(this,void 0,void 0,(function*(){return new _.oQ(yield(0,A.zq)(e,t,n),b.N("decl.title","Declarations"))}))}_getNoResultFoundMessage(e){return e&&e.word?b.N("decl.noResultWord","No declaration found for '{0}'",e.word):b.N("decl.generic.noResults","No declaration found")}_getAlternativeCommand(e){return e.getOption(48).alternativeDeclarationCommand}_getGoToPreference(e){return e.getOption(48).multipleDeclarations}}J(((H=class e extends ie{constructor(){super({openToSide:!1,openInPeek:!1,muteMessage:!1},{id:e.id,label:b.N("actions.goToDeclaration.label","Go to Declaration"),alias:"Go to Declaration",precondition:v.Ao.and(u.u.hasDeclarationProvider,u.u.isInWalkThroughSnippet.toNegated()),contextMenuOpts:{group:"navigation",order:1.3},menuOpts:{menuId:C.eH.MenubarGoMenu,group:"4_symbol_nav",order:3,title:b.N({key:"miGotoDeclaration",comment:["&& denotes a mnemonic"]},"Go to &&Declaration")}})}_getNoResultFoundMessage(e){return e&&e.word?b.N("decl.noResultWord","No declaration found for '{0}'",e.word):b.N("decl.generic.noResults","No declaration found")}}).id="editor.action.revealDeclaration",H)),J(class extends ie{constructor(){super({openToSide:!1,openInPeek:!0,muteMessage:!1},{id:"editor.action.peekDeclaration",label:b.N("actions.peekDecl.label","Peek Declaration"),alias:"Peek Declaration",precondition:v.Ao.and(u.u.hasDeclarationProvider,m.Jy.notInPeekEditor,u.u.isInWalkThroughSnippet.toNegated()),contextMenuOpts:{menuId:C.eH.EditorContextPeek,group:"peek",order:3}})}});class oe extends ee{_getLocationModel(e,t,n){return Q(this,void 0,void 0,(function*(){return new _.oQ(yield(0,A.L3)(e,t,n),b.N("typedef.title","Type Definitions"))}))}_getNoResultFoundMessage(e){return e&&e.word?b.N("goToTypeDefinition.noResultWord","No type definition found for '{0}'",e.word):b.N("goToTypeDefinition.generic.noResults","No type definition found")}_getAlternativeCommand(e){return e.getOption(48).alternativeTypeDefinitionCommand}_getGoToPreference(e){return e.getOption(48).multipleTypeDefinitions}}J(((j=class e extends oe{constructor(){super({openToSide:!1,openInPeek:!1,muteMessage:!1},{id:e.ID,label:b.N("actions.goToTypeDefinition.label","Go to Type Definition"),alias:"Go to Type Definition",precondition:v.Ao.and(u.u.hasTypeDefinitionProvider,u.u.isInWalkThroughSnippet.toNegated()),kbOpts:{kbExpr:u.u.editorTextFocus,primary:0,weight:100},contextMenuOpts:{group:"navigation",order:1.4},menuOpts:{menuId:C.eH.MenubarGoMenu,group:"4_symbol_nav",order:3,title:b.N({key:"miGotoTypeDefinition",comment:["&& denotes a mnemonic"]},"Go to &&Type Definition")}})}}).ID="editor.action.goToTypeDefinition",j)),J((($=class e extends oe{constructor(){super({openToSide:!1,openInPeek:!0,muteMessage:!1},{id:e.ID,label:b.N("actions.peekTypeDefinition.label","Peek Type Definition"),alias:"Peek Type Definition",precondition:v.Ao.and(u.u.hasTypeDefinitionProvider,m.Jy.notInPeekEditor,u.u.isInWalkThroughSnippet.toNegated()),contextMenuOpts:{menuId:C.eH.EditorContextPeek,group:"peek",order:4}})}}).ID="editor.action.peekTypeDefinition",$));class re extends ee{_getLocationModel(e,t,n){return Q(this,void 0,void 0,(function*(){return new _.oQ(yield(0,A.f4)(e,t,n),b.N("impl.title","Implementations"))}))}_getNoResultFoundMessage(e){return e&&e.word?b.N("goToImplementation.noResultWord","No implementation found for '{0}'",e.word):b.N("goToImplementation.generic.noResults","No implementation found")}_getAlternativeCommand(e){return e.getOption(48).alternativeImplementationCommand}_getGoToPreference(e){return e.getOption(48).multipleImplementations}}J(((U=class e extends re{constructor(){super({openToSide:!1,openInPeek:!1,muteMessage:!1},{id:e.ID,label:b.N("actions.goToImplementation.label","Go to Implementations"),alias:"Go to Implementations",precondition:v.Ao.and(u.u.hasImplementationProvider,u.u.isInWalkThroughSnippet.toNegated()),kbOpts:{kbExpr:u.u.editorTextFocus,primary:2118,weight:100},menuOpts:{menuId:C.eH.MenubarGoMenu,group:"4_symbol_nav",order:4,title:b.N({key:"miGotoImplementation",comment:["&& denotes a mnemonic"]},"Go to &&Implementations")},contextMenuOpts:{group:"navigation",order:1.45}})}}).ID="editor.action.goToImplementation",U)),J(((Z=class e extends re{constructor(){super({openToSide:!1,openInPeek:!0,muteMessage:!1},{id:e.ID,label:b.N("actions.peekImplementation.label","Peek Implementations"),alias:"Peek Implementations",precondition:v.Ao.and(u.u.hasImplementationProvider,m.Jy.notInPeekEditor,u.u.isInWalkThroughSnippet.toNegated()),kbOpts:{kbExpr:u.u.editorTextFocus,primary:3142,weight:100},contextMenuOpts:{menuId:C.eH.EditorContextPeek,group:"peek",order:5}})}}).ID="editor.action.peekImplementation",Z));class se extends ee{_getNoResultFoundMessage(e){return e?b.N("references.no","No references found for '{0}'",e.word):b.N("references.noGeneric","No references found")}_getAlternativeCommand(e){return e.getOption(48).alternativeReferenceCommand}_getGoToPreference(e){return e.getOption(48).multipleReferences}}J(class extends se{constructor(){super({openToSide:!1,openInPeek:!1,muteMessage:!1},{id:"editor.action.goToReferences",label:b.N("goToReferences.label","Go to References"),alias:"Go to References",precondition:v.Ao.and(u.u.hasReferenceProvider,m.Jy.notInPeekEditor,u.u.isInWalkThroughSnippet.toNegated()),kbOpts:{kbExpr:u.u.editorTextFocus,primary:1094,weight:100},contextMenuOpts:{group:"navigation",order:1.45},menuOpts:{menuId:C.eH.MenubarGoMenu,group:"4_symbol_nav",order:5,title:b.N({key:"miGotoReference",comment:["&& denotes a mnemonic"]},"Go to &&References")}})}_getLocationModel(e,t,n){return Q(this,void 0,void 0,(function*(){return new _.oQ(yield(0,A.aA)(e,t,!0,n),b.N("ref.title","References"))}))}}),J(class extends se{constructor(){super({openToSide:!1,openInPeek:!0,muteMessage:!1},{id:"editor.action.referenceSearch.trigger",label:b.N("references.action.label","Peek References"),alias:"Peek References",precondition:v.Ao.and(u.u.hasReferenceProvider,m.Jy.notInPeekEditor,u.u.isInWalkThroughSnippet.toNegated()),contextMenuOpts:{menuId:C.eH.EditorContextPeek,group:"peek",order:6}})}_getLocationModel(e,t,n){return Q(this,void 0,void 0,(function*(){return new _.oQ(yield(0,A.aA)(e,t,!1,n),b.N("ref.title","References"))}))}});class ae extends ee{constructor(e,t,n){super(e,{id:"editor.action.goToLocation",label:b.N("label.generic","Go To Any Symbol"),alias:"Go To Any Symbol",precondition:v.Ao.and(m.Jy.notInPeekEditor,u.u.isInWalkThroughSnippet.toNegated())}),this._references=t,this._gotoMultipleBehaviour=n}_getLocationModel(e,t,n){return Q(this,void 0,void 0,(function*(){return new _.oQ(this._references,b.N("generic.title","Locations"))}))}_getNoResultFoundMessage(e){return e&&b.N("generic.noResult","No results for '{0}'",e.word)||""}_getGoToPreference(e){var t;return null!==(t=this._gotoMultipleBehaviour)&&void 0!==t?t:e.getOption(48).multipleReferences}_getAlternativeCommand(){return""}}S.P.registerCommand({id:"editor.action.goToLocations",description:{description:"Go to locations from a position in a file",args:[{name:"uri",description:"The text document in which to start",constraint:q.o},{name:"position",description:"The position at which to start",constraint:c.L.isIPosition},{name:"locations",description:"An array of locations.",constraint:Array},{name:"multiple",description:"Define what to do when having multiple results, either `peek`, `gotoAndPeek`, or `goto"},{name:"noResultsMessage",description:"Human readable message that shows when locations is empty."}]},handler:(e,t,n,i,o,r,s)=>Q(void 0,void 0,void 0,(function*(){(0,Y.p_)(q.o.isUri(t)),(0,Y.p_)(c.L.isIPosition(n)),(0,Y.p_)(Array.isArray(i)),(0,Y.p_)(void 0===o||"string"==typeof o),(0,Y.p_)(void 0===s||"boolean"==typeof s);const l=e.get(d.$),h=yield l.openCodeEditor({resource:t},l.getFocusedCodeEditor());if((0,a.CL)(h))return h.setPosition(n),h.revealPositionInCenterIfOutsideViewport(n,0),h.invokeWithinContext((e=>{const t=new class extends ae{_getNoResultFoundMessage(e){return r||super._getNoResultFoundMessage(e)}}({muteMessage:!Boolean(r),openInPeek:Boolean(s),openToSide:!1},i,o);e.get(k.TG).invokeFunction(t.run.bind(t),h)}))}))}),S.P.registerCommand({id:"editor.action.peekLocations",description:{description:"Peek locations from a position in a file",args:[{name:"uri",description:"The text document in which to start",constraint:q.o},{name:"position",description:"The position at which to start",constraint:c.L.isIPosition},{name:"locations",description:"An array of locations.",constraint:Array},{name:"multiple",description:"Define what to do when having multiple results, either `peek`, `gotoAndPeek`, or `goto"}]},handler:(e,t,n,i,o)=>Q(void 0,void 0,void 0,(function*(){e.get(S.H).executeCommand("editor.action.goToLocations",t,n,i,o,void 0,!0)}))}),S.P.registerCommand({id:"editor.action.findReferences",handler:(e,t,n)=>{(0,Y.p_)(q.o.isUri(t)),(0,Y.p_)(c.L.isIPosition(n));const i=e.get(d.$);return i.openCodeEditor({resource:t},i.getFocusedCodeEditor()).then((e=>{if(!(0,a.CL)(e)||!e.hasModel())return;const t=f.J.get(e);if(!t)return;const i=(0,o.PG)((t=>(0,A.aA)(e.getModel(),c.L.lift(n),!1,t).then((e=>new _.oQ(e,b.N("ref.title","References")))))),r=new h.e(n.lineNumber,n.column,n.lineNumber,n.column);return Promise.resolve(t.toggleWidget(r,i,!1))}))}}),S.P.registerCommandAlias("editor.action.showReferences","editor.action.peekLocations")},1691:(e,t,n)=>{"use strict";n.d(t,{nD:()=>c,zq:()=>h,f4:()=>u,L3:()=>g,aA:()=>p});var i=n(1050),o=n(7301),r=n(6830),s=n(4101),a=n(1455),l=function(e,t,n,i){return new(n||(n=Promise))((function(o,r){function s(e){try{l(i.next(e))}catch(e){r(e)}}function a(e){try{l(i.throw(e))}catch(e){r(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,a)}l((i=i.apply(e,t||[])).next())}))};function d(e,t,n,i){const r=n.ordered(e).map((n=>Promise.resolve(i(n,e,t)).then(void 0,(e=>{(0,o.Cp)(e)}))));return Promise.all(r).then((e=>{const t=[];for(let n of e)Array.isArray(n)?t.push(...n):n&&t.push(n);return t}))}function c(e,t,n){return d(e,t,s.Ct,((e,t,i)=>e.provideDefinition(t,i,n)))}function h(e,t,n){return d(e,t,s.RN,((e,t,i)=>e.provideDeclaration(t,i,n)))}function u(e,t,n){return d(e,t,s.vI,((e,t,i)=>e.provideImplementation(t,i,n)))}function g(e,t,n){return d(e,t,s.tA,((e,t,i)=>e.provideTypeDefinition(t,i,n)))}function p(e,t,n,i){return d(e,t,s.FL,((e,t,o)=>l(this,void 0,void 0,(function*(){const r=yield e.provideReferences(t,o,{includeDeclaration:!0},i);if(!n||!r||2!==r.length)return r;const s=yield e.provideReferences(t,o,{includeDeclaration:!1},i);return s&&1===s.length?s:r}))))}function m(e){return l(this,void 0,void 0,(function*(){const t=yield e(),n=new a.oQ(t,""),i=n.references.map((e=>e.link));return n.dispose(),i}))}(0,r.sb)("_executeDefinitionProvider",((e,t)=>m((()=>c(e,t,i.T.None))))),(0,r.sb)("_executeDeclarationProvider",((e,t)=>m((()=>h(e,t,i.T.None))))),(0,r.sb)("_executeImplementationProvider",((e,t)=>m((()=>u(e,t,i.T.None))))),(0,r.sb)("_executeTypeDefinitionProvider",((e,t)=>m((()=>g(e,t,i.T.None))))),(0,r.sb)("_executeReferenceProvider",((e,t)=>m((()=>p(e,t,!1,i.T.None)))))},9241:(e,t,n)=>{"use strict";n.d(t,{yN:()=>h});var i=n(5976),o=n(4669),r=n(1432);function s(e,t){return!!e[t]}class a{constructor(e,t){this.target=e.target,this.hasTriggerModifier=s(e.event,t.triggerModifier),this.hasSideBySideModifier=s(e.event,t.triggerSideBySideModifier),this.isNoneOrSingleMouseDown=e.event.detail<=1}}class l{constructor(e,t){this.keyCodeIsTriggerKey=e.keyCode===t.triggerKey,this.keyCodeIsSideBySideKey=e.keyCode===t.triggerSideBySideKey,this.hasTriggerModifier=s(e,t.triggerModifier)}}class d{constructor(e,t,n,i){this.triggerKey=e,this.triggerModifier=t,this.triggerSideBySideKey=n,this.triggerSideBySideModifier=i}equals(e){return this.triggerKey===e.triggerKey&&this.triggerModifier===e.triggerModifier&&this.triggerSideBySideKey===e.triggerSideBySideKey&&this.triggerSideBySideModifier===e.triggerSideBySideModifier}}function c(e){return"altKey"===e?r.dz?new d(57,"metaKey",6,"altKey"):new d(5,"ctrlKey",6,"altKey"):r.dz?new d(6,"altKey",57,"metaKey"):new d(6,"altKey",5,"ctrlKey")}class h extends i.JT{constructor(e){super(),this._onMouseMoveOrRelevantKeyDown=this._register(new o.Q5),this.onMouseMoveOrRelevantKeyDown=this._onMouseMoveOrRelevantKeyDown.event,this._onExecute=this._register(new o.Q5),this.onExecute=this._onExecute.event,this._onCancel=this._register(new o.Q5),this.onCancel=this._onCancel.event,this._editor=e,this._opts=c(this._editor.getOption(68)),this._lastMouseMoveEvent=null,this._hasTriggerKeyOnMouseDown=!1,this._lineNumberOnMouseDown=0,this._register(this._editor.onDidChangeConfiguration((e=>{if(e.hasChanged(68)){const e=c(this._editor.getOption(68));if(this._opts.equals(e))return;this._opts=e,this._lastMouseMoveEvent=null,this._hasTriggerKeyOnMouseDown=!1,this._lineNumberOnMouseDown=0,this._onCancel.fire()}}))),this._register(this._editor.onMouseMove((e=>this._onEditorMouseMove(new a(e,this._opts))))),this._register(this._editor.onMouseDown((e=>this._onEditorMouseDown(new a(e,this._opts))))),this._register(this._editor.onMouseUp((e=>this._onEditorMouseUp(new a(e,this._opts))))),this._register(this._editor.onKeyDown((e=>this._onEditorKeyDown(new l(e,this._opts))))),this._register(this._editor.onKeyUp((e=>this._onEditorKeyUp(new l(e,this._opts))))),this._register(this._editor.onMouseDrag((()=>this._resetHandler()))),this._register(this._editor.onDidChangeCursorSelection((e=>this._onDidChangeCursorSelection(e)))),this._register(this._editor.onDidChangeModel((e=>this._resetHandler()))),this._register(this._editor.onDidChangeModelContent((()=>this._resetHandler()))),this._register(this._editor.onDidScrollChange((e=>{(e.scrollTopChanged||e.scrollLeftChanged)&&this._resetHandler()})))}_onDidChangeCursorSelection(e){e.selection&&e.selection.startColumn!==e.selection.endColumn&&this._resetHandler()}_onEditorMouseMove(e){this._lastMouseMoveEvent=e,this._onMouseMoveOrRelevantKeyDown.fire([e,null])}_onEditorMouseDown(e){this._hasTriggerKeyOnMouseDown=e.hasTriggerModifier,this._lineNumberOnMouseDown=e.target.position?e.target.position.lineNumber:0}_onEditorMouseUp(e){const t=e.target.position?e.target.position.lineNumber:0;this._hasTriggerKeyOnMouseDown&&this._lineNumberOnMouseDown&&this._lineNumberOnMouseDown===t&&this._onExecute.fire(e)}_onEditorKeyDown(e){this._lastMouseMoveEvent&&(e.keyCodeIsTriggerKey||e.keyCodeIsSideBySideKey&&e.hasTriggerModifier)?this._onMouseMoveOrRelevantKeyDown.fire([this._lastMouseMoveEvent,e]):e.hasTriggerModifier&&this._onCancel.fire()}_onEditorKeyUp(e){e.keyCodeIsTriggerKey&&this._onCancel.fire()}_resetHandler(){this._lastMouseMoveEvent=null,this._hasTriggerKeyOnMouseDown=!1,this._onCancel.fire()}}},5389:(e,t,n)=>{"use strict";n.r(t),n.d(t,{GotoDefinitionAtPositionEditorContribution:()=>F});var i=n(3379),o=n.n(i),r=n(7795),s=n.n(r),a=n(569),l=n.n(a),d=n(3565),c=n.n(d),h=n(9216),u=n.n(h),g=n(4589),p=n.n(g),m=n(2760),f={};f.styleTagTransform=p(),f.setAttributes=c(),f.insert=l().bind(null,"head"),f.domAPI=s(),f.insertStyleElement=u(),o()(m.Z,f),m.Z&&m.Z.locals&&m.Z.locals;var _=n(3580),b=n(5393),C=n(7301),v=n(9365),w=n(1531),y=n(4314),A=n(4101),S=n(6830),x=n(1691),k=n(5976),L=n(8216),E=n(7781),N=n(3910),D=n(9925),I=n(2729),M=n(9241),T=n(187),R=n(8401),O=n(1884),B=n(8819),P=function(e,t){return function(n,i){t(n,i,e)}};let F=class e{constructor(e,t,n){this.textModelResolverService=t,this.modeService=n,this.toUnhook=new k.SL,this.toUnhookForKeyboard=new k.SL,this.linkDecorations=[],this.currentWordAtPosition=null,this.previousPromise=null,this.editor=e;let i=new M.yN(e);this.toUnhook.add(i),this.toUnhook.add(i.onMouseMoveOrRelevantKeyDown((([e,t])=>{this.startFindDefinitionFromMouse(e,(0,R.f6)(t))}))),this.toUnhook.add(i.onExecute((e=>{this.isEnabled(e)&&this.gotoDefinition(e.target.position,e.hasSideBySideModifier).then((()=>{this.removeLinkDecorations()}),(e=>{this.removeLinkDecorations(),(0,C.dL)(e)}))}))),this.toUnhook.add(i.onCancel((()=>{this.removeLinkDecorations(),this.currentWordAtPosition=null})))}static get(t){return t.getContribution(e.ID)}startFindDefinitionFromCursor(e){return this.startFindDefinition(e).then((()=>{this.toUnhookForKeyboard.add(this.editor.onDidChangeCursorPosition((()=>{this.currentWordAtPosition=null,this.removeLinkDecorations(),this.toUnhookForKeyboard.clear()}))),this.toUnhookForKeyboard.add(this.editor.onKeyDown((e=>{e&&(this.currentWordAtPosition=null,this.removeLinkDecorations(),this.toUnhookForKeyboard.clear())})))}))}startFindDefinitionFromMouse(e,t){if(9===e.target.type&&this.linkDecorations.length>0)return;if(!this.editor.hasModel()||!this.isEnabled(e,t))return this.currentWordAtPosition=null,void this.removeLinkDecorations();const n=e.target.position;this.startFindDefinition(n)}startFindDefinition(e){var t;this.toUnhookForKeyboard.clear();const n=e?null===(t=this.editor.getModel())||void 0===t?void 0:t.getWordAtPosition(e):null;if(!n)return this.currentWordAtPosition=null,this.removeLinkDecorations(),Promise.resolve(0);if(this.currentWordAtPosition&&this.currentWordAtPosition.startColumn===n.startColumn&&this.currentWordAtPosition.endColumn===n.endColumn&&this.currentWordAtPosition.word===n.word)return Promise.resolve(0);this.currentWordAtPosition=n;let i=new D.yy(this.editor,15);return this.previousPromise&&(this.previousPromise.cancel(),this.previousPromise=null),this.previousPromise=(0,b.PG)((t=>this.findDefinition(e,t))),this.previousPromise.then((t=>{if(t&&t.length&&i.validate(this.editor))if(t.length>1)this.addDecoration(new y.e(e.lineNumber,n.startColumn,e.lineNumber,n.endColumn),(new v.W5).appendText(_.N("multipleResults","Click to show {0} definitions.",t.length)));else{let i=t[0];if(!i.uri)return;this.textModelResolverService.createModelReference(i.uri).then((t=>{if(!t.object||!t.object.textEditorModel)return void t.dispose();const{object:{textEditorModel:o}}=t,{startLineNumber:r}=i.range;if(r<1||r>o.getLineCount())return void t.dispose();const s=this.getPreviewValue(o,r,i);let a;a=i.originSelectionRange?y.e.lift(i.originSelectionRange):new y.e(e.lineNumber,n.startColumn,e.lineNumber,n.endColumn);const l=this.modeService.getModeIdByFilepathOrFirstLine(o.uri);this.addDecoration(a,(new v.W5).appendCodeblock(l||"",s)),t.dispose()}))}else this.removeLinkDecorations()})).then(void 0,C.dL)}getPreviewValue(t,n,i){let o=i.targetSelectionRange?i.range:this.getPreviewRangeBasedOnBrackets(t,n);return o.endLineNumber-o.startLineNumber>=e.MAX_SOURCE_PREVIEW_LINES&&(o=this.getPreviewRangeBasedOnIndentation(t,n)),this.stripIndentationFromPreviewRange(t,n,o)}stripIndentationFromPreviewRange(e,t,n){let i=e.getLineFirstNonWhitespaceColumn(t);for(let o=t+1;oi)return new y.e(n,1,i+1,1);s=t.findNextBracket(new T.L(a,l))}return new y.e(n,1,i+1,1)}addDecoration(e,t){const n={range:e,options:{description:"goto-definition-link",inlineClassName:"goto-definition-link",hoverMessage:t}};this.linkDecorations=this.editor.deltaDecorations(this.linkDecorations,[n])}removeLinkDecorations(){this.linkDecorations.length>0&&(this.linkDecorations=this.editor.deltaDecorations(this.linkDecorations,[]))}isEnabled(e,t){return this.editor.hasModel()&&e.isNoneOrSingleMouseDown&&6===e.target.type&&(e.hasTriggerModifier||!!t&&t.keyCodeIsTriggerKey)&&A.Ct.has(this.editor.getModel())}findDefinition(e,t){const n=this.editor.getModel();return n?(0,x.nD)(n,e,t):Promise.resolve(null)}gotoDefinition(e,t){return this.editor.setPosition(e),this.editor.invokeWithinContext((e=>{const n=!t&&this.editor.getOption(76)&&!this.isInPeekEditor(e);return new I.DefinitionAction({openToSide:t,openInPeek:n,muteMessage:!0},{alias:"",label:"",id:"",precondition:void 0}).run(e,this.editor)}))}isInPeekEditor(e){const t=e.get(B.i6);return O.Jy.inPeekEditor.getValue(t)}dispose(){this.toUnhook.dispose()}};F.ID="editor.contrib.gotodefinitionatposition",F.MAX_SOURCE_PREVIEW_LINES=8,F=function(e,t,n,i){var o,r=arguments.length,s=r<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,i);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,n,s):o(t,n))||s);return r>3&&s&&Object.defineProperty(t,n,s),s}([P(1,L.S),P(2,w.h)],F),(0,S._K)(F.ID,F),(0,E.Ic)(((e,t)=>{const n=e.getColor(N._Y);n&&t.addRule(`.monaco-editor .goto-definition-link { color: ${n} !important; }`)}))},2406:(e,t,n)=>{"use strict";n.d(t,{J:()=>ve});var i=n(3580),o=n(7301),r=n(5976),s=n(1640),a=n(2065),l=n(8819),d=n(3108),c=n(6904),h=n(1455),u=n(3379),g=n.n(u),p=n(7795),m=n.n(p),f=n(569),_=n.n(f),b=n(3565),C=n.n(b),v=n(9216),w=n.n(v),y=n(4589),A=n.n(y),S=n(9669),x={};x.styleTagTransform=A(),x.setAttributes=C(),x.insert=_().bind(null,"head"),x.domAPI=m(),x.insertStyleElement=w(),g()(S.Z,x),S.Z&&S.Z.locals&&S.Z.locals;var k=n(5321),L=n(1264),E=n(4669),N=n(6663),D=n(5935),I=n(4527),M=n(4314),T=n(3103),R=n(8216),O=n(3326),B=n(9162),P=n(4349),F=n(7781),W=n(8810),z=n(8843),V=n(1847),H=n(5392),j=n(4650),$=function(e,t,n,i){var o,r=arguments.length,s=r<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,i);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,n,s):o(t,n))||s);return r>3&&s&&Object.defineProperty(t,n,s),s},U=function(e,t){return function(n,i){t(n,i,e)}};let Z=class{constructor(e){this._resolverService=e}hasChildren(e){return e instanceof h.oQ||e instanceof h.F2}getChildren(e){if(e instanceof h.oQ)return e.groups;if(e instanceof h.F2)return e.resolve(this._resolverService).then((e=>e.children));throw new Error("bad tree")}};Z=$([U(0,R.S)],Z);class K{getHeight(){return 23}getTemplateId(e){return e instanceof h.F2?Q.id:J.id}}let q=class{constructor(e){this._keybindingService=e}getKeyboardNavigationLabel(e){var t;if(e instanceof h.WX){const n=null===(t=e.parent.getPreview(e))||void 0===t?void 0:t.preview(e.range);if(n)return n.value}return(0,D.EZ)(e.uri)}};q=$([U(0,V.d)],q);class Y{getId(e){return e instanceof h.WX?e.id:e.uri}}let G=class extends r.JT{constructor(e,t,n){super(),this._uriLabel=t;const i=document.createElement("div");i.classList.add("reference-file"),this.file=this._register(new O.g(i,{supportHighlights:!0})),this.badge=new B.Z(k.R3(i,k.$(".count"))),this._register((0,W.WZ)(this.badge,n)),e.appendChild(i)}set(e,t){let n=(0,D.XX)(e.uri);this.file.setLabel((0,z.p)(e.uri),this._uriLabel.getUriLabel(n,{relative:!0}),{title:this._uriLabel.getUriLabel(e.uri),matches:t});const o=e.children.length;this.badge.setCount(o),o>1?this.badge.setTitleFormat((0,i.N)("referencesCount","{0} references",o)):this.badge.setTitleFormat((0,i.N)("referenceCount","{0} reference",o))}};G=$([U(1,P.e),U(2,F.XE)],G);let Q=class e{constructor(t){this._instantiationService=t,this.templateId=e.id}renderTemplate(e){return this._instantiationService.createInstance(G,e)}renderElement(e,t,n){n.set(e.element,(0,H.mB)(e.filterData))}disposeTemplate(e){e.dispose()}};Q.id="FileReferencesRenderer",Q=$([U(0,a.TG)],Q);class X{constructor(e){this.label=new j.q(e,!1)}set(e,t){var n;const i=null===(n=e.parent.getPreview(e))||void 0===n?void 0:n.preview(e.range);if(i&&i.value){const{value:e,highlight:n}=i;t&&!H.CL.isDefault(t)?(this.label.element.classList.toggle("referenceMatch",!1),this.label.set(e,(0,H.mB)(t))):(this.label.element.classList.toggle("referenceMatch",!0),this.label.set(e,[n]))}else this.label.set(`${(0,D.EZ)(e.uri)}:${e.range.startLineNumber+1}:${e.range.startColumn+1}`)}}class J{constructor(){this.templateId=J.id}renderTemplate(e){return new X(e)}renderElement(e,t,n){n.set(e.element,e.filterData)}disposeTemplate(){}}J.id="OneReferenceRenderer";class ee{getWidgetAriaLabel(){return(0,i.N)("treeAriaLabel","References")}getAriaLabel(e){return e.ariaMessage}}var te=n(3738),ne=n(3910),ie=n(1884),oe=n(9782),re=n(4862),se=function(e,t){return function(n,i){t(n,i,e)}},ae=function(e,t,n,i){return new(n||(n=Promise))((function(o,r){function s(e){try{l(i.next(e))}catch(e){r(e)}}function a(e){try{l(i.throw(e))}catch(e){r(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,a)}l((i=i.apply(e,t||[])).next())}))};class le{constructor(e,t){this._editor=e,this._model=t,this._decorations=new Map,this._decorationIgnoreSet=new Set,this._callOnDispose=new r.SL,this._callOnModelChange=new r.SL,this._callOnDispose.add(this._editor.onDidChangeModel((()=>this._onModelChanged()))),this._onModelChanged()}dispose(){this._callOnModelChange.dispose(),this._callOnDispose.dispose(),this.removeDecorations()}_onModelChanged(){this._callOnModelChange.clear();const e=this._editor.getModel();if(e)for(let t of this._model.references)if(t.uri.toString()===e.uri.toString())return void this._addDecorations(t.parent)}_addDecorations(e){if(!this._editor.hasModel())return;this._callOnModelChange.add(this._editor.getModel().onDidChangeDecorations((()=>this._onDecorationChanged())));const t=[],n=[];for(let i=0,o=e.children.length;i{e.equals(9)&&(this._keybindingService.dispatchEvent(e,e.target),e.stopPropagation())}),!0)),this._tree=this._instantiationService.createInstance(de,"ReferencesWidget",this._treeContainer,new K,[this._instantiationService.createInstance(Q),this._instantiationService.createInstance(J)],this._instantiationService.createInstance(Z),t),this._splitView.addView({onDidChange:E.ju.None,element:this._previewContainer,minimumSize:200,maximumSize:Number.MAX_VALUE,layout:e=>{this._preview.layout({height:this._dim.height,width:e})}},oe.M.Distribute),this._splitView.addView({onDidChange:E.ju.None,element:this._treeContainer,minimumSize:100,maximumSize:Number.MAX_VALUE,layout:e=>{this._treeContainer.style.height=`${this._dim.height}px`,this._treeContainer.style.width=`${e}px`,this._tree.layout(this._dim.height,e)}},oe.M.Distribute),this._disposables.add(this._splitView.onDidSashChange((()=>{this._dim.width&&(this.layoutData.ratio=this._splitView.getViewSize(0)/this._dim.width)}),void 0));let n=(e,t)=>{e instanceof h.WX&&("show"===t&&this._revealReference(e,!1),this._onDidSelectReference.fire({element:e,kind:t,source:"tree"}))};this._tree.onDidOpen((e=>{e.sideBySide?n(e.element,"side"):e.editorOptions.pinned?n(e.element,"goto"):n(e.element,"show")})),k.Cp(this._treeContainer)}_onWidth(e){this._dim&&this._doLayoutBody(this._dim.height,e)}_doLayoutBody(e,t){super._doLayoutBody(e,t),this._dim=new k.Ro(t,e),this.layoutData.heightInLines=this._viewZone?this._viewZone.heightInLines:this.layoutData.heightInLines,this._splitView.layout(t),this._splitView.resizeView(0,t*this.layoutData.ratio)}setSelection(e){return this._revealReference(e,!0).then((()=>{this._model&&(this._tree.setSelection([e]),this._tree.setFocus([e]))}))}setModel(e){return this._disposeOnNewModel.clear(),this._model=e,this._model?this._onNewModel():Promise.resolve()}_onNewModel(){return this._model?this._model.isEmpty?(this.setTitle(""),this._messageContainer.innerText=i.N("noResults","No results"),k.$Z(this._messageContainer),Promise.resolve(void 0)):(k.Cp(this._messageContainer),this._decorationsManager=new le(this._preview,this._model),this._disposeOnNewModel.add(this._decorationsManager),this._disposeOnNewModel.add(this._model.onDidChangeReferenceRange((e=>this._tree.rerender(e)))),this._disposeOnNewModel.add(this._preview.onMouseDown((e=>{const{event:t,target:n}=e;if(2!==t.detail)return;const i=this._getFocusedReference();i&&this._onDidSelectReference.fire({element:{uri:i.uri,range:n.range},kind:t.ctrlKey||t.metaKey||t.altKey?"side":"open",source:"editor"})}))),this.container.classList.add("results-loaded"),k.$Z(this._treeContainer),k.$Z(this._previewContainer),this._splitView.layout(this._dim.width),this.focusOnReferenceTree(),this._tree.setInput(1===this._model.groups.length?this._model.groups[0]:this._model)):Promise.resolve(void 0)}_getFocusedReference(){const[e]=this._tree.getFocus();return e instanceof h.WX?e:e instanceof h.F2&&e.children.length>0?e.children[0]:void 0}revealReference(e){return ae(this,void 0,void 0,(function*(){yield this._revealReference(e,!1),this._onDidSelectReference.fire({element:e,kind:"goto",source:"tree"})}))}_revealReference(e,t){return ae(this,void 0,void 0,(function*(){if(this._revealedReference===e)return;this._revealedReference=e,e.uri.scheme!==N.lg.inMemory?this.setTitle((0,D.Hx)(e.uri),this._uriLabel.getUriLabel((0,D.XX)(e.uri))):this.setTitle(i.N("peekView.alternateTitle","References"));const n=this._textModelResolverService.createModelReference(e.uri);this._tree.getInput()===e.parent||(t&&this._tree.reveal(e.parent),yield this._tree.expand(e.parent)),this._tree.reveal(e);const o=yield n;if(!this._model)return void o.dispose();(0,r.B9)(this._previewModelReference);const s=o.object;if(s){const t=this._preview.getModel()===s.textEditorModel?0:1,n=M.e.lift(e.range).collapseToStart();this._previewModelReference=o,this._preview.setModel(s.textEditorModel),this._preview.setSelection(n),this._preview.revealRangeInCenter(n,t)}else this._preview.setModel(this._previewNotAvailableMessage),o.dispose()}))}};ce=function(e,t,n,i){var o,r=arguments.length,s=r<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,i);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,n,s):o(t,n))||s);return r>3&&s&&Object.defineProperty(t,n,s),s}([se(3,F.XE),se(4,R.S),se(5,a.TG),se(6,ie.Fw),se(7,P.e),se(8,re.tJ),se(9,V.d)],ce),(0,F.Ic)(((e,t)=>{const n=e.getColor(ie.F8);n&&t.addRule(`.monaco-editor .reference-zone-widget .ref-tree .referenceMatch .highlight { background-color: ${n}; }`);const i=e.getColor(ie.WL);i&&t.addRule(`.monaco-editor .reference-zone-widget .preview .reference-decoration { background-color: ${i}; }`);const o=e.getColor(ie.xH);o&&t.addRule(`.monaco-editor .reference-zone-widget .preview .reference-decoration { border: 2px solid ${o}; box-sizing: border-box; }`);const r=e.getColor(ne.xL);r&&t.addRule(`.monaco-editor .reference-zone-widget .ref-tree .referenceMatch .highlight { border: 1px dotted ${r}; box-sizing: border-box; }`);const s=e.getColor(ie.M8);s&&t.addRule(`.monaco-editor .reference-zone-widget .ref-tree { background-color: ${s}; }`);const a=e.getColor(ie.xk);a&&t.addRule(`.monaco-editor .reference-zone-widget .ref-tree { color: ${a}; }`);const l=e.getColor(ie.a7);l&&t.addRule(`.monaco-editor .reference-zone-widget .ref-tree .reference-file { color: ${l}; }`);const d=e.getColor(ie.Zj);d&&t.addRule(`.monaco-editor .reference-zone-widget .ref-tree .monaco-list:focus .monaco-list-rows > .monaco-list-row.selected:not(.highlighted) { background-color: ${d}; }`);const c=e.getColor(ie.IY);c&&t.addRule(`.monaco-editor .reference-zone-widget .ref-tree .monaco-list:focus .monaco-list-rows > .monaco-list-row.selected:not(.highlighted) { color: ${c} !important; }`);const h=e.getColor(ie.RX);h&&t.addRule(`.monaco-editor .reference-zone-widget .preview .monaco-editor .monaco-editor-background,.monaco-editor .reference-zone-widget .preview .monaco-editor .inputarea.ime-input {\tbackground-color: ${h};}`);const u=e.getColor(ie.sH);u&&t.addRule(`.monaco-editor .reference-zone-widget .preview .monaco-editor .margin {\tbackground-color: ${u};}`)}));var he=n(187),ue=n(9422),ge=n(5393),pe=n(9989),me=n(2258),fe=n(4565),_e=function(e,t){return function(n,i){t(n,i,e)}},be=function(e,t,n,i){return new(n||(n=Promise))((function(o,r){function s(e){try{l(i.next(e))}catch(e){r(e)}}function a(e){try{l(i.throw(e))}catch(e){r(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,a)}l((i=i.apply(e,t||[])).next())}))};const Ce=new l.uy("referenceSearchVisible",!1,i.N("referenceSearchVisible","Whether reference peek is visible, like 'Peek References' or 'Peek Definition'"));let ve=class e{constructor(e,t,n,i,o,s,a,l){this._defaultTreeKeyboardSupport=e,this._editor=t,this._editorService=i,this._notificationService=o,this._instantiationService=s,this._storageService=a,this._configurationService=l,this._disposables=new r.SL,this._requestIdPool=0,this._ignoreModelChangeEvent=!1,this._referenceSearchVisible=Ce.bindTo(n)}static get(t){return t.getContribution(e.ID)}dispose(){var e,t;this._referenceSearchVisible.reset(),this._disposables.dispose(),null===(e=this._widget)||void 0===e||e.dispose(),null===(t=this._model)||void 0===t||t.dispose(),this._widget=void 0,this._model=void 0}toggleWidget(e,t,n){let o;if(this._widget&&(o=this._widget.position),this.closeWidget(),o&&e.containsPosition(o))return;this._peekMode=n,this._referenceSearchVisible.set(!0),this._disposables.add(this._editor.onDidChangeModelLanguage((()=>{this.closeWidget()}))),this._disposables.add(this._editor.onDidChangeModel((()=>{this._ignoreModelChangeEvent||this.closeWidget()})));const r="peekViewLayout",s=class{constructor(){this.ratio=.7,this.heightInLines=18}static fromJSON(e){let t,n;try{const i=JSON.parse(e);t=i.ratio,n=i.heightInLines}catch(e){}return{ratio:t||.7,heightInLines:n||18}}}.fromJSON(this._storageService.get(r,0,"{}"));this._widget=this._instantiationService.createInstance(ce,this._editor,this._defaultTreeKeyboardSupport,s),this._widget.setTitle(i.N("labelLoading","Loading...")),this._widget.show(e),this._disposables.add(this._widget.onDidClose((()=>{t.cancel(),this._widget&&(this._storageService.store(r,JSON.stringify(this._widget.layoutData),0,1),this._widget=void 0),this.closeWidget()}))),this._disposables.add(this._widget.onDidSelectReference((e=>{let{element:t,kind:i}=e;if(t)switch(i){case"open":"editor"===e.source&&this._configurationService.getValue("editor.stablePeek")||this.openReference(t,!1,!1);break;case"side":this.openReference(t,!0,!1);break;case"goto":n?this._gotoReference(t):this.openReference(t,!1,!0)}})));const a=++this._requestIdPool;t.then((t=>{var n;if(a===this._requestIdPool&&this._widget)return null===(n=this._model)||void 0===n||n.dispose(),this._model=t,this._widget.setModel(this._model).then((()=>{if(this._widget&&this._model&&this._editor.hasModel()){this._model.isEmpty?this._widget.setMetaTitle(""):this._widget.setMetaTitle(i.N("metaTitle.N","{0} ({1})",this._model.title,this._model.references.length));let t=this._editor.getModel().uri,n=new he.L(e.startLineNumber,e.startColumn),o=this._model.nearestReference(t,n);if(o)return this._widget.setSelection(o).then((()=>{this._widget&&"editor"===this._editor.getOption(75)&&this._widget.focusOnPreviewEditor()}))}}));t.dispose()}),(e=>{this._notificationService.error(e)}))}changeFocusBetweenPreviewAndReferences(){this._widget&&(this._widget.isPreviewEditorFocused()?this._widget.focusOnReferenceTree():this._widget.focusOnPreviewEditor())}goToNextOrPreviousReference(e){return be(this,void 0,void 0,(function*(){if(!this._editor.hasModel()||!this._model||!this._widget)return;const t=this._widget.position;if(!t)return;const n=this._model.nearestReference(this._editor.getModel().uri,t);if(!n)return;const i=this._model.nextOrPreviousReference(n,e),o=this._editor.hasTextFocus(),r=this._widget.isPreviewEditorFocused();yield this._widget.setSelection(i),yield this._gotoReference(i),o?this._editor.focus():this._widget&&r&&this._widget.focusOnPreviewEditor()}))}revealReference(e){return be(this,void 0,void 0,(function*(){this._editor.hasModel()&&this._model&&this._widget&&(yield this._widget.revealReference(e))}))}closeWidget(e=!0){var t,n;null===(t=this._widget)||void 0===t||t.dispose(),null===(n=this._model)||void 0===n||n.dispose(),this._referenceSearchVisible.reset(),this._disposables.clear(),this._widget=void 0,this._model=void 0,e&&this._editor.focus(),this._requestIdPool+=1}_gotoReference(t){this._widget&&this._widget.hide(),this._ignoreModelChangeEvent=!0;const n=M.e.lift(t.range).collapseToStart();return this._editorService.openCodeEditor({resource:t.uri,options:{selection:n}},this._editor).then((t=>{var i;if(this._ignoreModelChangeEvent=!1,t&&this._widget)if(this._editor===t)this._widget.show(n),this._widget.focusOnReferenceTree();else{const o=e.get(t),r=this._model.clone();this.closeWidget(),t.focus(),o.toggleWidget(n,(0,ge.PG)((e=>Promise.resolve(r))),null!==(i=this._peekMode)&&void 0!==i&&i)}else this.closeWidget()}),(e=>{this._ignoreModelChangeEvent=!1,(0,o.dL)(e)}))}openReference(e,t,n){t||this.closeWidget();const{uri:i,range:o}=e;this._editorService.openCodeEditor({resource:i,options:{selection:o,pinned:n}},this._editor,t)}};function we(e,t){const n=(0,ie.rc)(e);if(!n)return;let i=ve.get(n);i&&t(i)}ve.ID="editor.contrib.referencesController",ve=function(e,t,n,i){var o,r=arguments.length,s=r<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,i);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,n,s):o(t,n))||s);return r>3&&s&&Object.defineProperty(t,n,s),s}([_e(2,l.i6),_e(3,s.$),_e(4,ue.lT),_e(5,a.TG),_e(6,c.Uy),_e(7,d.Ui)],ve),pe.W.registerCommandAndKeybindingRule({id:"togglePeekWidgetFocus",weight:100,primary:(0,me.gx)(2089,60),when:l.Ao.or(Ce,ie.Jy.inPeekEditor),handler(e){we(e,(e=>{e.changeFocusBetweenPreviewAndReferences()}))}}),pe.W.registerCommandAndKeybindingRule({id:"goToNextReference",weight:90,primary:62,secondary:[70],when:l.Ao.or(Ce,ie.Jy.inPeekEditor),handler(e){we(e,(e=>{e.goToNextOrPreviousReference(!0)}))}}),pe.W.registerCommandAndKeybindingRule({id:"goToPreviousReference",weight:90,primary:1086,secondary:[1094],when:l.Ao.or(Ce,ie.Jy.inPeekEditor),handler(e){we(e,(e=>{e.goToNextOrPreviousReference(!1)}))}}),fe.P.registerCommandAlias("goToNextReferenceFromEmbeddedEditor","goToNextReference"),fe.P.registerCommandAlias("goToPreviousReferenceFromEmbeddedEditor","goToPreviousReference"),fe.P.registerCommandAlias("closeReferenceSearchEditor","closeReferenceSearch"),fe.P.registerCommand("closeReferenceSearch",(e=>we(e,(e=>e.closeWidget())))),pe.W.registerKeybindingRule({id:"closeReferenceSearch",weight:-1,primary:9,secondary:[1033],when:l.Ao.and(ie.Jy.inPeekEditor,l.Ao.not("config.editor.stablePeek"))}),pe.W.registerKeybindingRule({id:"closeReferenceSearch",weight:250,primary:9,secondary:[1033],when:l.Ao.and(Ce,l.Ao.not("config.editor.stablePeek"))}),pe.W.registerCommandAndKeybindingRule({id:"revealReference",weight:200,primary:3,mac:{primary:3,secondary:[2066]},when:l.Ao.and(Ce,te.CQ),handler(e){var t;const n=null===(t=e.get(te.Lw).lastFocusedList)||void 0===t?void 0:t.getFocus();Array.isArray(n)&&n[0]instanceof h.WX&&we(e,(e=>e.revealReference(n[0])))}}),pe.W.registerCommandAndKeybindingRule({id:"openReferenceToSide",weight:100,primary:2051,mac:{primary:259},when:l.Ao.and(Ce,te.CQ),handler(e){var t;const n=null===(t=e.get(te.Lw).lastFocusedList)||void 0===t?void 0:t.getFocus();Array.isArray(n)&&n[0]instanceof h.WX&&we(e,(e=>e.openReference(n[0],!0,!0)))}}),fe.P.registerCommand("openReference",(e=>{var t;const n=null===(t=e.get(te.Lw).lastFocusedList)||void 0===t?void 0:t.getFocus();Array.isArray(n)&&n[0]instanceof h.WX&&we(e,(e=>e.openReference(n[0],!1,!0)))}))},1455:(e,t,n)=>{"use strict";n.d(t,{WX:()=>u,F2:()=>p,oQ:()=>m});var i=n(3580),o=n(4669),r=n(5935),s=n(5976),a=n(7295),l=n(4742),d=n(4314),c=n(3702),h=n(7301);class u{constructor(e,t,n,i){this.isProviderFirst=e,this.parent=t,this.link=n,this._rangeCallback=i,this.id=l.a.nextId()}get uri(){return this.link.uri}get range(){var e,t;return null!==(t=null!==(e=this._range)&&void 0!==e?e:this.link.targetSelectionRange)&&void 0!==t?t:this.link.range}set range(e){this._range=e,this._rangeCallback(this)}get ariaMessage(){var e;const t=null===(e=this.parent.getPreview(this))||void 0===e?void 0:e.preview(this.range);return t?(0,i.N)({key:"aria.oneReference.preview",comment:["Placeholders are: 0: filename, 1:line number, 2: column number, 3: preview snippet of source code"]},"symbol in {0} on line {1} at column {2}, {3}",(0,r.EZ)(this.uri),this.range.startLineNumber,this.range.startColumn,t.value):(0,i.N)("aria.oneReference","symbol in {0} on line {1} at column {2}",(0,r.EZ)(this.uri),this.range.startLineNumber,this.range.startColumn)}}class g{constructor(e){this._modelReference=e}dispose(){this._modelReference.dispose()}preview(e,t=8){const n=this._modelReference.object.textEditorModel;if(!n)return;const{startLineNumber:i,startColumn:o,endLineNumber:r,endColumn:s}=e,a=n.getWordUntilPosition({lineNumber:i,column:o-t}),l=new d.e(i,a.startColumn,i,o),c=new d.e(r,s,r,1073741824),h=n.getValueInRange(l).replace(/^\s+/,""),u=n.getValueInRange(e);return{value:h+u+n.getValueInRange(c).replace(/\s+$/,""),highlight:{start:h.length,end:h.length+u.length}}}}class p{constructor(e,t){this.parent=e,this.uri=t,this.children=[],this._previews=new c.Y9}dispose(){(0,s.B9)(this._previews.values()),this._previews.clear()}getPreview(e){return this._previews.get(e.uri)}get ariaMessage(){const e=this.children.length;return 1===e?(0,i.N)("aria.fileReferences.1","1 symbol in {0}, full path {1}",(0,r.EZ)(this.uri),this.uri.fsPath):(0,i.N)("aria.fileReferences.N","{0} symbols in {1}, full path {2}",e,(0,r.EZ)(this.uri),this.uri.fsPath)}resolve(e){return t=this,n=void 0,o=function*(){if(0!==this._previews.size)return this;for(let t of this.children)if(!this._previews.has(t.uri))try{const n=yield e.createModelReference(t.uri);this._previews.set(t.uri,new g(n))}catch(e){(0,h.dL)(e)}return this},new((i=void 0)||(i=Promise))((function(e,r){function s(e){try{l(o.next(e))}catch(e){r(e)}}function a(e){try{l(o.throw(e))}catch(e){r(e)}}function l(t){var n;t.done?e(t.value):(n=t.value,n instanceof i?n:new i((function(e){e(n)}))).then(s,a)}l((o=o.apply(t,n||[])).next())}));var t,n,i,o}}class m{constructor(e,t){this.groups=[],this.references=[],this._onDidChangeReferenceRange=new o.Q5,this.onDidChangeReferenceRange=this._onDidChangeReferenceRange.event,this._links=e,this._title=t;const[n]=e;let i;e.sort(m._compareReferences);for(let t of e)if(i&&r.SF.isEqual(i.uri,t.uri,!0)||(i=new p(this,t.uri),this.groups.push(i)),0===i.children.length||0!==m._compareReferences(t,i.children[i.children.length-1])){const e=new u(n===t,i,t,(e=>this._onDidChangeReferenceRange.fire(e)));this.references.push(e),i.children.push(e)}}dispose(){(0,s.B9)(this.groups),this._onDidChangeReferenceRange.dispose(),this.groups.length=0}clone(){return new m(this._links,this._title)}get title(){return this._title}get isEmpty(){return 0===this.groups.length}get ariaMessage(){return this.isEmpty?(0,i.N)("aria.result.0","No results found"):1===this.references.length?(0,i.N)("aria.result.1","Found 1 symbol in {0}",this.references[0].uri.fsPath):1===this.groups.length?(0,i.N)("aria.result.n1","Found {0} symbols in {1}",this.references.length,this.groups[0].uri.fsPath):(0,i.N)("aria.result.nm","Found {0} symbols in {1} files",this.references.length,this.groups.length)}nextOrPreviousReference(e,t){let{parent:n}=e,i=n.children.indexOf(e),o=n.children.length,r=n.parent.groups.length;return 1===r||t&&i+10?(i=t?(i+1)%o:(i+o-1)%o,n.children[i]):(i=n.parent.groups.indexOf(n),t?(i=(i+1)%r,n.parent.groups[i].children[0]):(i=(i+r-1)%r,n.parent.groups[i].children[n.parent.groups[i].children.length-1]))}nearestReference(e,t){const n=this.references.map(((n,i)=>({idx:i,prefixLen:a.Mh(n.uri.toString(),e.toString()),offsetDist:100*Math.abs(n.range.startLineNumber-t.lineNumber)+Math.abs(n.range.startColumn-t.column)}))).sort(((e,t)=>e.prefixLen>t.prefixLen?-1:e.prefixLent.offsetDist?1:0))[0];if(n)return this.references[n.idx]}referenceAt(e,t){for(const n of this.references)if(n.uri.toString()===e.toString()&&d.e.containsPosition(n.range,t))return n}firstReference(){for(const e of this.references)if(e.isProviderFirst)return e;return this.references[0]}static _compareReferences(e,t){return r.SF.compare(e.uri,t.uri)||d.e.compareRangesUsingStarts(e.range,t.range)}}},3285:(e,t,n)=>{"use strict";n.r(t),n.d(t,{ModesHoverController:()=>Je});var i=n(3580),o=n(2258),r=n(5976),s=n(6830),a=n(4314),l=n(9102),d=n(1531),c=n(5321),h=n(187),u=n(3103),g=n(4101),p=n(5393),m=n(7301);class f{constructor(e,t,n,i,o){this._computer=e,this._state=0,this._hoverTime=o,this._firstWaitScheduler=new p.pY((()=>this._triggerAsyncComputation()),0),this._secondWaitScheduler=new p.pY((()=>this._triggerSyncComputation()),0),this._loadingMessageScheduler=new p.pY((()=>this._showLoadingMessage()),0),this._asyncComputationPromise=null,this._asyncComputationPromiseDone=!1,this._completeCallback=t,this._errorCallback=n,this._progressCallback=i}setHoverTime(e){this._hoverTime=e}_firstWaitTime(){return this._hoverTime/2}_secondWaitTime(){return this._hoverTime/2}_loadingMessageTime(){return 3*this._hoverTime}_triggerAsyncComputation(){this._state=2,this._secondWaitScheduler.schedule(this._secondWaitTime()),this._computer.computeAsync?(this._asyncComputationPromiseDone=!1,this._asyncComputationPromise=(0,p.PG)((e=>this._computer.computeAsync(e))),this._asyncComputationPromise.then((e=>{this._asyncComputationPromiseDone=!0,this._withAsyncResult(e)}),(e=>this._onError(e)))):this._asyncComputationPromiseDone=!0}_triggerSyncComputation(){this._computer.computeSync&&this._computer.onResult(this._computer.computeSync(),!0),this._asyncComputationPromiseDone?(this._state=0,this._onComplete(this._computer.getResult())):(this._state=3,this._onProgress(this._computer.getResult()))}_showLoadingMessage(){3===this._state&&this._onProgress(this._computer.getResultWithLoadingMessage())}_withAsyncResult(e){e&&this._computer.onResult(e,!1),3===this._state&&(this._state=0,this._onComplete(this._computer.getResult()))}_onComplete(e){this._completeCallback(e)}_onError(e){this._errorCallback?this._errorCallback(e):(0,m.dL)(e)}_onProgress(e){this._progressCallback(e)}start(e){if(0===e)0===this._state&&(this._state=1,this._firstWaitScheduler.schedule(this._firstWaitTime()),this._loadingMessageScheduler.schedule(this._loadingMessageTime()));else switch(this._state){case 0:this._triggerAsyncComputation(),this._secondWaitScheduler.cancel(),this._triggerSyncComputation();break;case 2:this._secondWaitScheduler.cancel(),this._triggerSyncComputation()}}cancel(){this._loadingMessageScheduler.cancel(),1===this._state&&this._firstWaitScheduler.cancel(),2===this._state&&(this._secondWaitScheduler.cancel(),this._asyncComputationPromise&&(this._asyncComputationPromise.cancel(),this._asyncComputationPromise=null)),3===this._state&&this._asyncComputationPromise&&(this._asyncComputationPromise.cancel(),this._asyncComputationPromise=null),this._state=0}}var _=n(9488),b=n(3794),C=n(3379),v=n.n(C),w=n(7795),y=n.n(w),A=n(569),S=n.n(A),x=n(3565),k=n.n(x),L=n(9216),E=n.n(L),N=n(4589),D=n.n(N),I=n(3039),M={};M.styleTagTransform=D(),M.setAttributes=k(),M.insert=S().bind(null,"head"),M.domAPI=y(),M.insertStyleElement=E(),v()(I.Z,M),I.Z&&I.Z.locals&&I.Z.locals;var T=n(6781);const R=c.$;class O extends r.JT{constructor(){super(),this.containerDomNode=document.createElement("div"),this.containerDomNode.className="monaco-hover",this.containerDomNode.tabIndex=0,this.containerDomNode.setAttribute("role","tooltip"),this.contentsDomNode=document.createElement("div"),this.contentsDomNode.className="monaco-hover-content",this._scrollbar=this._register(new T.s$(this.contentsDomNode,{consumeMouseWheelIfScrollbarIsNeeded:!0})),this.containerDomNode.appendChild(this._scrollbar.getDomNode())}onContentsChanged(){this._scrollbar.scanDomNode()}}class B extends r.JT{constructor(e,t,n){super(),this.actionContainer=c.R3(e,R("div.action-container")),this.action=c.R3(this.actionContainer,R("a.action")),this.action.setAttribute("href","#"),this.action.setAttribute("role","button"),t.iconClass&&c.R3(this.action,R(`span.icon.${t.iconClass}`)),c.R3(this.action,R("span")).textContent=n?`${t.label} (${n})`:t.label,this._register(c.nm(this.actionContainer,c.tw.CLICK,(e=>{e.stopPropagation(),e.preventDefault(),t.run(this.actionContainer)}))),this.setEnabled(!0)}static render(e,t,n){return new B(e,t,n)}setEnabled(e){e?(this.actionContainer.classList.remove("disabled"),this.actionContainer.removeAttribute("aria-disabled")):(this.actionContainer.classList.add("disabled"),this.actionContainer.setAttribute("aria-disabled","true"))}}var P=n(8674),F=n(5935),W=n(6479),z=n(988),V=n(5091),H=n(1907),j=n(787),$=n(9532),U=n(535),Z=n(7781),K=n(3910),q=function(e,t){return function(n,i){t(n,i,e)}};const Y=c.$;class G{constructor(e,t,n){this.owner=e,this.range=t,this.marker=n}isValidForHoverAnchor(e){return 1===e.type&&this.range.startColumn<=e.range.startColumn&&this.range.endColumn>=e.range.endColumn}}const Q={type:1,filter:{include:$.yN.QuickFix}};let X=class{constructor(e,t,n,i){this._editor=e,this._hover=t,this._markerDecorationsService=n,this._openerService=i,this.recentMarkerCodeActionsInfo=void 0}computeSync(e,t){if(!this._editor.hasModel()||1!==e.type)return[];const n=this._editor.getModel(),i=e.range.startLineNumber,o=n.getLineMaxColumn(i),r=[];for(const s of t){const t=s.range.startLineNumber===i?s.range.startColumn:1,l=s.range.endLineNumber===i?s.range.endColumn:o,d=this._markerDecorationsService.getMarker(n.uri,s);if(!d)continue;const c=new a.e(e.range.startLineNumber,t,e.range.startLineNumber,l);r.push(new G(this,c,d))}return r}renderHoverParts(e,t,n){if(!e.length)return r.JT.None;const i=new r.SL;e.forEach((e=>t.appendChild(this.renderMarkerHover(e,i))));const o=1===e.length?e[0]:e.sort(((e,t)=>P.ZL.compare(e.marker.severity,t.marker.severity)))[0];return this.renderMarkerStatusbar(o,n,i),i}renderMarkerHover(e,t){const n=Y("div.hover-row"),i=c.R3(n,Y("div.marker.hover-contents")),{source:o,message:r,code:s,relatedInformation:a}=e.marker;this._editor.applyFontInfo(i);const l=c.R3(i,Y("span"));if(l.style.whiteSpace="pre-wrap",l.innerText=r,o||s)if(s&&"string"!=typeof s){const e=Y("span");o&&(c.R3(e,Y("span")).innerText=o);const n=c.R3(e,Y("a.code-link"));n.setAttribute("href",s.target.toString()),t.add(c.nm(n,"click",(e=>{this._openerService.open(s.target,{allowCommands:!0}),e.preventDefault(),e.stopPropagation()}))),c.R3(n,Y("span")).innerText=s.value;const r=c.R3(i,e);r.style.opacity="0.6",r.style.paddingLeft="6px"}else{const e=c.R3(i,Y("span"));e.style.opacity="0.6",e.style.paddingLeft="6px",e.innerText=o&&s?`${o}(${s})`:o||`(${s})`}if((0,_.Of)(a))for(const{message:e,resource:n,startLineNumber:o,startColumn:r}of a){const s=c.R3(i,Y("div"));s.style.marginTop="8px";const a=c.R3(s,Y("a"));a.innerText=`${(0,F.EZ)(n)}(${o}, ${r}): `,a.style.cursor="pointer",t.add(c.nm(a,"click",(e=>{e.stopPropagation(),e.preventDefault(),this._openerService&&this._openerService.open(n,{fromUserGesture:!0,editorOptions:{selection:{startLineNumber:o,startColumn:r}}}).catch(m.dL)})));const l=c.R3(s,Y("span"));l.innerText=e,this._editor.applyFontInfo(l)}return n}renderMarkerStatusbar(e,t,n){if(e.marker.severity!==P.ZL.Error&&e.marker.severity!==P.ZL.Warning&&e.marker.severity!==P.ZL.Info||t.addAction({label:i.N("view problem","View Problem"),commandId:V.NextMarkerAction.ID,run:()=>{this._hover.hide(),V.MarkerController.get(this._editor).showAtMarker(e.marker),this._editor.focus()}}),!this._editor.getOption(79)){const o=t.append(Y("div"));this.recentMarkerCodeActionsInfo&&(P.H0.makeKey(this.recentMarkerCodeActionsInfo.marker)===P.H0.makeKey(e.marker)?this.recentMarkerCodeActionsInfo.hasCodeActions||(o.textContent=i.N("noQuickFixes","No quick fixes available")):this.recentMarkerCodeActionsInfo=void 0);const s=this.recentMarkerCodeActionsInfo&&!this.recentMarkerCodeActionsInfo.hasCodeActions?r.JT.None:n.add((0,p.Vg)((()=>o.textContent=i.N("checkingForQuickFixes","Checking for quick fixes...")),200));o.textContent||(o.textContent=String.fromCharCode(160));const a=this.getCodeActions(e.marker);n.add((0,r.OF)((()=>a.cancel()))),a.then((a=>{if(s.dispose(),this.recentMarkerCodeActionsInfo={marker:e.marker,hasCodeActions:a.validActions.length>0},!this.recentMarkerCodeActionsInfo.hasCodeActions)return a.dispose(),void(o.textContent=i.N("noQuickFixes","No quick fixes available"));o.style.display="none";let l=!1;n.add((0,r.OF)((()=>{l||a.dispose()}))),t.addAction({label:i.N("quick fixes","Quick Fix..."),commandId:j.E7.Id,run:e=>{l=!0;const t=j.pY.get(this._editor),n=c.i(e);this._hover.hide(),t.showCodeActions(Q,a,{x:n.left+6,y:n.top+n.height+6})}})}))}}getCodeActions(e){return(0,p.PG)((t=>(0,H.aI)(this._editor.getModel(),new a.e(e.startLineNumber,e.startColumn,e.endLineNumber,e.endColumn),Q,U.E.None,t)))}};X=function(e,t,n,i){var o,r=arguments.length,s=r<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,i);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,n,s):o(t,n))||s);return r>3&&s&&Object.defineProperty(t,n,s),s}([q(2,W.i),q(3,z.v4)],X),(0,Z.Ic)(((e,t)=>{const n=e.getColor(K.ur);n&&t.addRule(`.monaco-hover .hover-contents a.code-link span { color: ${n}; }`);const i=e.getColor(K.sg);i&&t.addRule(`.monaco-hover .hover-contents a.code-link span:hover { color: ${i}; }`)}));var J=n(2065),ee=n(9365),te=n(3947),ne=n(1050);function ie(e,t,n){const i=g.xp.ordered(e).map((i=>Promise.resolve(i.provideHover(e,t,n)).then((e=>e&&function(e){const t=void 0!==e.range,n=void 0!==e.contents&&e.contents&&e.contents.length>0;return t&&n}(e)?e:void 0),(e=>{(0,m.Cp)(e)}))));return Promise.all(i).then(_.kX)}(0,s.sb)("_executeHoverProvider",((e,t)=>ie(e,t,ne.T.None)));var oe=n(3108),re=function(e,t){return function(n,i){t(n,i,e)}};const se=c.$;class ae{constructor(e,t,n){this.owner=e,this.range=t,this.contents=n}isValidForHoverAnchor(e){return 1===e.type&&this.range.startColumn<=e.range.startColumn&&this.range.endColumn>=e.range.endColumn}}let le=class{constructor(e,t,n,i,o){this._editor=e,this._hover=t,this._modeService=n,this._openerService=i,this._configurationService=o}createLoadingMessage(e){return new ae(this,e.range,[(new ee.W5).appendText(i.N("modesContentHover.loading","Loading..."))])}computeSync(e,t){if(!this._editor.hasModel()||1!==e.type)return[];const n=this._editor.getModel(),o=e.range.startLineNumber,r=n.getLineMaxColumn(o),s=[];for(const n of t){const t=n.range.startLineNumber===o?n.range.startColumn:1,i=n.range.endLineNumber===o?n.range.endColumn:r,l=n.options.hoverMessage;if(!l||(0,ee.CP)(l))continue;const d=new a.e(e.range.startLineNumber,t,e.range.startLineNumber,i);s.push(new ae(this,d,(0,_._2)(l)))}const l=this._editor.getModel().getLineLength(o),d=this._configurationService.getValue("editor.maxTokenizationLineLength");return"number"==typeof d&&l>=d&&s.push(new ae(this,new a.e(o,1,o,l+1),[{value:i.N("too many characters","Tokenization is skipped for long lines for performance reasons. This can be configured via `editor.maxTokenizationLineLength`.")}])),s}computeAsync(e,t,n){return i=this,o=void 0,s=function*(){if(!this._editor.hasModel()||1!==e.type)return Promise.resolve([]);const t=this._editor.getModel();if(!g.xp.has(t))return Promise.resolve([]);const i=yield ie(t,new h.L(e.range.startLineNumber,e.range.startColumn),n),o=[];for(const t of i){if((0,ee.CP)(t.contents))continue;const n=t.range?a.e.lift(t.range):e.range;o.push(new ae(this,n,t.contents))}return o},new((r=void 0)||(r=Promise))((function(e,t){function n(e){try{l(s.next(e))}catch(e){t(e)}}function a(e){try{l(s.throw(e))}catch(e){t(e)}}function l(t){var i;t.done?e(t.value):(i=t.value,i instanceof r?i:new r((function(e){e(i)}))).then(n,a)}l((s=s.apply(i,o||[])).next())}));var i,o,r,s}renderHoverParts(e,t,n){const i=new r.SL;for(const n of e)for(const e of n.contents){if((0,ee.CP)(e))continue;const n=se("div.hover-row.markdown-hover"),o=c.R3(n,se("div.hover-contents")),r=i.add(new te.$({editor:this._editor},this._modeService,this._openerService));i.add(r.onDidRenderAsync((()=>{o.className="hover-contents code-hover-contents",this._hover.onContentsChanged()})));const s=i.add(r.render(e));o.appendChild(s.element),t.appendChild(n)}return i}};le=function(e,t,n,i){var o,r=arguments.length,s=r<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,i);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,n,s):o(t,n))||s);return r>3&&s&&Object.defineProperty(t,n,s),s}([re(2,d.h),re(3,z.v4),re(4,oe.Ui)],le);class de{constructor(e,t){this.priority=e,this.range=t,this.type=1}equals(e){return 1===e.type&&this.range.equalsRange(e.range)}canAdoptVisibleHover(e,t){return 1===e.type&&t.lineNumber===this.range.startLineNumber}}class ce{constructor(e,t,n){this.priority=e,this.owner=t,this.range=n,this.type=2}equals(e){return 2===e.type&&this.owner===e.owner}canAdoptVisibleHover(e,t){return 2===e.type&&this.owner===e.owner}}var he=n(3793),ue=n(4565),ge=n(4144),pe=n(8819),me=function(e,t){return function(n,i){t(n,i,e)}};class fe{constructor(e,t,n){this.owner=e,this.range=t,this.controller=n}isValidForHoverAnchor(e){return 1===e.type&&this.range.startColumn<=e.range.startColumn&&this.range.endColumn>=e.range.endColumn}hasMultipleSuggestions(){return this.controller.hasMultipleInlineCompletions()}}let _e=class{constructor(e,t,n,i,o){this._editor=e,this._commandService=n,this._menuService=i,this._contextKeyService=o}suggestHoverAnchor(e){const t=he.GhostTextController.get(this._editor);if(!t)return null;if(8===e.target.type){const n=e.target.detail;if(t.shouldShowHoverAtViewZone(n.viewZoneId))return new ce(1e3,this,a.e.fromPositions(n.positionBefore||n.position,n.positionBefore||n.position))}return 7===e.target.type&&e.target.range&&t.shouldShowHoverAt(e.target.range)||6===e.target.type&&e.target.range&&e.target.detail&&e.target.detail.mightBeForeignElement&&t.shouldShowHoverAt(e.target.range)?new ce(1e3,this,e.target.range):null}computeSync(e,t){const n=he.GhostTextController.get(this._editor);return n&&n.shouldShowHoverAt(e.range)?[new fe(this,e.range,n)]:[]}renderHoverParts(e,t,n){const o=new r.SL,s=o.add(this._menuService.createMenu(ge.eH.InlineCompletionsActions,this._contextKeyService)),a=n.addAction({label:i.N("showNextInlineSuggestion","Next"),commandId:he.ShowNextInlineSuggestionAction.ID,run:()=>this._commandService.executeCommand(he.ShowNextInlineSuggestionAction.ID)}),l=n.addAction({label:i.N("showPreviousInlineSuggestion","Previous"),commandId:he.ShowPreviousInlineSuggestionAction.ID,run:()=>this._commandService.executeCommand(he.ShowPreviousInlineSuggestionAction.ID)});n.addAction({label:i.N("acceptInlineSuggestion","Accept"),commandId:he.commitInlineSuggestionAction.id,run:()=>this._commandService.executeCommand(he.commitInlineSuggestionAction.id)});const d=[a,l];for(const e of d)e.setEnabled(!1);e[0].hasMultipleSuggestions().then((e=>{for(const t of d)t.setEnabled(e)}));for(const[e,t]of s.getActions())for(const e of t)e instanceof ge.U8&&n.addAction({label:e.label,commandId:e.item.id,run:()=>this._commandService.executeCommand(e.item.id)});return o}};_e=function(e,t,n,i){var o,r=arguments.length,s=r<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,i);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,n,s):o(t,n))||s);return r>3&&s&&Object.defineProperty(t,n,s),s}([me(2,ue.H),me(3,ge.co),me(4,pe.i6)],_e);var be=n(3308),Ce=n(4494),ve=n(1264),we=n(4669);class ye{constructor(e,t,n){this.presentationIndex=n,this._onColorFlushed=new we.Q5,this.onColorFlushed=this._onColorFlushed.event,this._onDidChangeColor=new we.Q5,this.onDidChangeColor=this._onDidChangeColor.event,this._onDidChangePresentation=new we.Q5,this.onDidChangePresentation=this._onDidChangePresentation.event,this.originalColor=e,this._color=e,this._colorPresentations=t}get color(){return this._color}set color(e){this._color.equals(e)||(this._color=e,this._onDidChangeColor.fire(e))}get presentation(){return this.colorPresentations[this.presentationIndex]}get colorPresentations(){return this._colorPresentations}set colorPresentations(e){this._colorPresentations=e,this.presentationIndex>e.length-1&&(this.presentationIndex=0),this._onDidChangePresentation.fire(this.presentation)}selectNextColorPresentation(){this.presentationIndex=(this.presentationIndex+1)%this.colorPresentations.length,this.flushColor(),this._onDidChangePresentation.fire(this.presentation)}guessColorPresentation(e,t){for(let e=0;e{this.backgroundColor=e.getColor(K.yJ)||ve.Il.white}))),this._register(c.nm(this.pickedColorNode,c.tw.CLICK,(()=>this.model.selectNextColorPresentation()))),this._register(c.nm(i,c.tw.CLICK,(()=>{this.model.color=this.model.originalColor,this.model.flushColor()}))),this._register(t.onDidChangeColor(this.onDidChangeColor,this)),this._register(t.onDidChangePresentation(this.onDidChangePresentation,this)),this.pickedColorNode.style.backgroundColor=ve.Il.Format.CSS.format(t.color)||"",this.pickedColorNode.classList.toggle("light",t.color.rgba.a<.5?this.backgroundColor.isLighter():t.color.isLighter())}onDidChangeColor(e){this.pickedColorNode.style.backgroundColor=ve.Il.Format.CSS.format(e)||"",this.pickedColorNode.classList.toggle("light",e.rgba.a<.5?this.backgroundColor.isLighter():e.isLighter()),this.onDidChangePresentation()}onDidChangePresentation(){this.pickedColorNode.textContent=this.model.presentation?this.model.presentation.label:""}}class Ne extends r.JT{constructor(e,t,n){super(),this.model=t,this.pixelRatio=n,this.domNode=Le(".colorpicker-body"),c.R3(e,this.domNode),this.saturationBox=new De(this.domNode,this.model,this.pixelRatio),this._register(this.saturationBox),this._register(this.saturationBox.onDidChange(this.onDidSaturationValueChange,this)),this._register(this.saturationBox.onColorFlushed(this.flushColor,this)),this.opacityStrip=new Me(this.domNode,this.model),this._register(this.opacityStrip),this._register(this.opacityStrip.onDidChange(this.onDidOpacityChange,this)),this._register(this.opacityStrip.onColorFlushed(this.flushColor,this)),this.hueStrip=new Te(this.domNode,this.model),this._register(this.hueStrip),this._register(this.hueStrip.onDidChange(this.onDidHueChange,this)),this._register(this.hueStrip.onColorFlushed(this.flushColor,this))}flushColor(){this.model.flushColor()}onDidSaturationValueChange({s:e,v:t}){const n=this.model.color.hsva;this.model.color=new ve.Il(new ve.tx(n.h,e,t,n.a))}onDidOpacityChange(e){const t=this.model.color.hsva;this.model.color=new ve.Il(new ve.tx(t.h,t.s,t.v,e))}onDidHueChange(e){const t=this.model.color.hsva,n=360*(1-e);this.model.color=new ve.Il(new ve.tx(360===n?0:n,t.s,t.v,t.a))}layout(){this.saturationBox.layout(),this.opacityStrip.layout(),this.hueStrip.layout()}}class De extends r.JT{constructor(e,t,n){super(),this.model=t,this.pixelRatio=n,this._onDidChange=new we.Q5,this.onDidChange=this._onDidChange.event,this._onColorFlushed=new we.Q5,this.onColorFlushed=this._onColorFlushed.event,this.domNode=Le(".saturation-wrap"),c.R3(e,this.domNode),this.canvas=document.createElement("canvas"),this.canvas.className="saturation-box",c.R3(this.domNode,this.canvas),this.selection=Le(".saturation-selection"),c.R3(this.domNode,this.selection),this.layout(),this._register(c.Lo(this.domNode,(e=>this.onMouseDown(e)))),this._register(this.model.onDidChangeColor(this.onDidChangeColor,this)),this.monitor=null}onMouseDown(e){this.monitor=this._register(new ke.Z);const t=c.i(this.domNode);e.target!==this.selection&&this.onDidChangePosition(e.offsetX,e.offsetY),this.monitor.startMonitoring(e.target,e.buttons,ke.e,(e=>this.onDidChangePosition(e.posx-t.left,e.posy-t.top)),(()=>null));const n=c.qV(document,(()=>{this._onColorFlushed.fire(),n.dispose(),this.monitor&&(this.monitor.stopMonitoring(!0),this.monitor=null)}),!0)}onDidChangePosition(e,t){const n=Math.max(0,Math.min(1,e/this.width)),i=Math.max(0,Math.min(1,1-t/this.height));this.paintSelection(n,i),this._onDidChange.fire({s:n,v:i})}layout(){this.width=this.domNode.offsetWidth,this.height=this.domNode.offsetHeight,this.canvas.width=this.width*this.pixelRatio,this.canvas.height=this.height*this.pixelRatio,this.paint();const e=this.model.color.hsva;this.paintSelection(e.s,e.v)}paint(){const e=this.model.color.hsva,t=new ve.Il(new ve.tx(e.h,1,1,1)),n=this.canvas.getContext("2d"),i=n.createLinearGradient(0,0,this.canvas.width,0);i.addColorStop(0,"rgba(255, 255, 255, 1)"),i.addColorStop(.5,"rgba(255, 255, 255, 0.5)"),i.addColorStop(1,"rgba(255, 255, 255, 0)");const o=n.createLinearGradient(0,0,0,this.canvas.height);o.addColorStop(0,"rgba(0, 0, 0, 0)"),o.addColorStop(1,"rgba(0, 0, 0, 1)"),n.rect(0,0,this.canvas.width,this.canvas.height),n.fillStyle=ve.Il.Format.CSS.format(t),n.fill(),n.fillStyle=i,n.fill(),n.fillStyle=o,n.fill()}paintSelection(e,t){this.selection.style.left=e*this.width+"px",this.selection.style.top=this.height-t*this.height+"px"}onDidChangeColor(){this.monitor&&this.monitor.isMonitoring()||this.paint()}}class Ie extends r.JT{constructor(e,t){super(),this.model=t,this._onDidChange=new we.Q5,this.onDidChange=this._onDidChange.event,this._onColorFlushed=new we.Q5,this.onColorFlushed=this._onColorFlushed.event,this.domNode=c.R3(e,Le(".strip")),this.overlay=c.R3(this.domNode,Le(".overlay")),this.slider=c.R3(this.domNode,Le(".slider")),this.slider.style.top="0px",this._register(c.Lo(this.domNode,(e=>this.onMouseDown(e)))),this.layout()}layout(){this.height=this.domNode.offsetHeight-this.slider.offsetHeight;const e=this.getValue(this.model.color);this.updateSliderPosition(e)}onMouseDown(e){const t=this._register(new ke.Z),n=c.i(this.domNode);this.domNode.classList.add("grabbing"),e.target!==this.slider&&this.onDidChangeTop(e.offsetY),t.startMonitoring(e.target,e.buttons,ke.e,(e=>this.onDidChangeTop(e.posy-n.top)),(()=>null));const i=c.qV(document,(()=>{this._onColorFlushed.fire(),i.dispose(),t.stopMonitoring(!0),this.domNode.classList.remove("grabbing")}),!0)}onDidChangeTop(e){const t=Math.max(0,Math.min(1,1-e/this.height));this.updateSliderPosition(t),this._onDidChange.fire(t)}updateSliderPosition(e){this.slider.style.top=(1-e)*this.height+"px"}}class Me extends Ie{constructor(e,t){super(e,t),this.domNode.classList.add("opacity-strip"),this._register(t.onDidChangeColor(this.onDidChangeColor,this)),this.onDidChangeColor(this.model.color)}onDidChangeColor(e){const{r:t,g:n,b:i}=e.rgba,o=new ve.Il(new ve.VS(t,n,i,1)),r=new ve.Il(new ve.VS(t,n,i,0));this.overlay.style.background=`linear-gradient(to bottom, ${o} 0%, ${r} 100%)`}getValue(e){return e.hsva.a}}class Te extends Ie{constructor(e,t){super(e,t),this.domNode.classList.add("hue-strip")}getValue(e){return 1-e.hsva.h/360}}class Re extends b.${constructor(e,t,n,i){super(),this.model=t,this.pixelRatio=n,this._register((0,xe.fX)((()=>this.layout())));const o=Le(".colorpicker-widget");e.appendChild(o);const r=new Ee(o,this.model,i);this.body=new Ne(o,this.model,this.pixelRatio),this._register(r),this._register(this.body)}layout(){this.body.layout()}}var Oe=function(e,t,n,i){return new(n||(n=Promise))((function(o,r){function s(e){try{l(i.next(e))}catch(e){r(e)}}function a(e){try{l(i.throw(e))}catch(e){r(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,a)}l((i=i.apply(e,t||[])).next())}))};class Be{constructor(e,t,n,i){this.owner=e,this.range=t,this.model=n,this.provider=i,this.forceShowAtRange=!0}isValidForHoverAnchor(e){return 1===e.type&&this.range.startColumn<=e.range.startColumn&&this.range.endColumn>=e.range.endColumn}}let Pe=class{constructor(e,t,n){this._editor=e,this._hover=t,this._themeService=n}computeSync(e,t){return[]}computeAsync(e,t,n){return Oe(this,void 0,void 0,(function*(){if(!this._editor.hasModel())return[];const e=Ce.i.get(this._editor);for(const n of t){const t=e.getColorData(n.range.getStartPosition());if(t)return[yield this._createColorHover(this._editor.getModel(),t.colorInfo,t.provider)]}return[]}))}_createColorHover(e,t,n){return Oe(this,void 0,void 0,(function*(){const i=e.getValueInRange(t.range),{red:o,green:r,blue:s,alpha:l}=t.color,d=new ve.VS(Math.round(255*o),Math.round(255*r),Math.round(255*s),l),c=new ve.Il(d),h=yield(0,be.R)(e,t,n,ne.T.None),u=new ye(c,[],0);return u.colorPresentations=h||[],u.guessColorPresentation(c,i),new Be(this,a.e.lift(t.range),u,n)}))}renderHoverParts(e,t,n){if(0===e.length||!this._editor.hasModel())return r.JT.None;const i=new r.SL,o=e[0],s=this._editor.getModel(),l=o.model,d=i.add(new Re(t,l,this._editor.getOption(127),this._themeService));let c=new a.e(o.range.startLineNumber,o.range.startColumn,o.range.endLineNumber,o.range.endColumn);const h=()=>{let e,t;if(l.presentation.textEdit){e=[l.presentation.textEdit],t=new a.e(l.presentation.textEdit.range.startLineNumber,l.presentation.textEdit.range.startColumn,l.presentation.textEdit.range.endLineNumber,l.presentation.textEdit.range.endColumn);const n=this._editor.getModel()._setTrackedRange(null,t,3);this._editor.pushUndoStop(),this._editor.executeEdits("colorpicker",e),t=this._editor.getModel()._getTrackedRange(n)||t}else e=[{identifier:null,range:c,text:l.presentation.label,forceMoveMarkers:!1}],t=c.setEndPosition(c.endLineNumber,c.startColumn+l.presentation.label.length),this._editor.pushUndoStop(),this._editor.executeEdits("colorpicker",e);l.presentation.additionalTextEdits&&(e=[...l.presentation.additionalTextEdits],this._editor.executeEdits("colorpicker",e),this._hover.hide()),this._editor.pushUndoStop(),c=t},u=e=>(0,be.R)(s,{range:c,color:{red:e.rgba.r/255,green:e.rgba.g/255,blue:e.rgba.b/255,alpha:e.rgba.a}},o.provider,ne.T.None).then((e=>{l.colorPresentations=e||[]}));return i.add(l.onColorFlushed((e=>{u(e).then(h)}))),i.add(l.onDidChangeColor(u)),this._hover.setColorPicker(d),i}};var Fe,We;Pe=function(e,t,n,i){var o,r=arguments.length,s=r<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,i);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,n,s):o(t,n))||s);return r>3&&s&&Object.defineProperty(t,n,s),s}([(Fe=2,We=Z.XE,function(e,t){We(e,t,Fe)})],Pe);var ze=n(1847),Ve=function(e,t,n,i){var o,r=arguments.length,s=r<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,i);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,n,s):o(t,n))||s);return r>3&&s&&Object.defineProperty(t,n,s),s},He=function(e,t){return function(n,i){t(n,i,e)}},je=function(e,t,n,i){return new(n||(n=Promise))((function(o,r){function s(e){try{l(i.next(e))}catch(e){r(e)}}function a(e){try{l(i.throw(e))}catch(e){r(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,a)}l((i=i.apply(e,t||[])).next())}))};const $e=c.$;let Ue=class extends r.JT{constructor(e){super(),this._keybindingService=e,this._hasContent=!1,this.hoverElement=$e("div.hover-row.status-bar"),this.actionsElement=c.R3(this.hoverElement,$e("div.actions"))}get hasContent(){return this._hasContent}addAction(e){const t=this._keybindingService.lookupKeybinding(e.commandId),n=t?t.getLabel():null;return this._hasContent=!0,this._register(B.render(this.actionsElement,e,n))}append(e){const t=c.R3(this.actionsElement,e);return this._hasContent=!0,t}};Ue=Ve([He(0,ze.d)],Ue);class Ze{constructor(e,t){this._participants=t,this._editor=e,this._result=[],this._anchor=null}setAnchor(e){this._anchor=e,this._result=[]}clearResult(){this._result=[]}static _getLineDecorations(e,t){if(1!==t.type)return[];const n=e.getModel(),i=t.range.startLineNumber,o=n.getLineMaxColumn(i);return e.getLineDecorations(i).filter((e=>{if(e.options.isWholeLine)return!0;const n=e.range.startLineNumber===i?e.range.startColumn:1,r=e.range.endLineNumber===i?e.range.endColumn:o;return!(n>t.range.startColumn||t.range.endColumn>r)}))}computeAsync(e){return je(this,void 0,void 0,(function*(){const t=this._anchor;if(!this._editor.hasModel()||!t)return Promise.resolve([]);const n=Ze._getLineDecorations(this._editor,t),i=yield Promise.all(this._participants.map((i=>this._computeAsync(i,n,t,e))));return(0,_.xH)(i)}))}_computeAsync(e,t,n,i){return je(this,void 0,void 0,(function*(){return e.computeAsync?e.computeAsync(n,t,i):[]}))}computeSync(){if(!this._editor.hasModel()||!this._anchor)return[];const e=Ze._getLineDecorations(this._editor,this._anchor);let t=[];for(const n of this._participants)t=t.concat(n.computeSync(this._anchor,e));return(0,_.kX)(t)}onResult(e,t){this._result=t?e.concat(this._result):this._result.concat(e)}getResult(){return this._result.slice(0)}getResultWithLoadingMessage(){if(this._anchor)for(const e of this._participants)if(e.createLoadingMessage){const t=e.createLoadingMessage(this._anchor);if(t)return this._result.slice(0).concat([t])}return this._result.slice(0)}}let Ke=class e extends b.${constructor(t,n,i,o){super(),this._hoverVisibleKey=n,this._keybindingService=o,this.allowEditorOverflow=!0,this._participants=[i.createInstance(Pe,t,this),i.createInstance(le,t,this),i.createInstance(_e,t,this),i.createInstance(X,t,this)],this._hover=this._register(new O),this._id=e.ID,this._editor=t,this._isVisible=!1,this._stoleFocus=!1,this._renderDisposable=null,this.onkeydown(this._hover.containerDomNode,(e=>{e.equals(9)&&this.hide()})),this._register(this._editor.onDidChangeConfiguration((e=>{e.hasChanged(41)&&this._updateFont()}))),this._editor.onDidLayoutChange((()=>this.layout())),this.layout(),this._editor.addContentWidget(this),this._showAtPosition=null,this._showAtRange=null,this._stoleFocus=!1,this._messages=[],this._lastAnchor=null,this._computer=new Ze(this._editor,this._participants),this._highlightDecorations=[],this._isChangingDecorations=!1,this._shouldFocus=!1,this._colorPicker=null,this._hoverOperation=new f(this._computer,(e=>this._withResult(e,!0)),null,(e=>this._withResult(e,!1)),this._editor.getOption(51).delay),this._register(c.mu(this.getDomNode(),c.tw.FOCUS,(()=>{this._colorPicker&&this.getDomNode().classList.add("colorpicker-hover")}))),this._register(c.mu(this.getDomNode(),c.tw.BLUR,(()=>{this.getDomNode().classList.remove("colorpicker-hover")}))),this._register(t.onDidChangeConfiguration((()=>{this._hoverOperation.setHoverTime(this._editor.getOption(51).delay)}))),this._register(g.RW.onDidChange((()=>{this._isVisible&&this._lastAnchor&&this._messages.length>0&&(this._hover.contentsDomNode.textContent="",this._renderMessages(this._lastAnchor,this._messages))})))}dispose(){this._hoverOperation.cancel(),this._editor.removeContentWidget(this),super.dispose()}getId(){return this._id}getDomNode(){return this._hover.containerDomNode}_shouldShowAt(e){const t=e.target.type;if(6===t)return!0;if(7===t){const t=this._editor.getOption(41).typicalHalfwidthCharacterWidth/2,n=e.target.detail;if(n&&!n.isAfterLines&&"number"==typeof n.horizontalDistanceToText&&n.horizontalDistanceToTexte.startsWith("ced-colorBox")))&&e.target.range.endColumn-e.target.range.startColumn==1?new a.e(e.target.range.startLineNumber,e.target.range.startColumn+1,e.target.range.endLineNumber,e.target.range.endColumn+1):e.target.range;n.push(new de(0,i))}return 0!==n.length&&(n.sort(((e,t)=>t.priority-e.priority)),this._startShowingAt(n[0],0,!1),!0)}_showAt(e,t,n){this._showAtPosition=e,this._showAtRange=t,this._hoverVisibleKey.set(!0),this._isVisible=!0,this._hover.containerDomNode.classList.toggle("hidden",!this._isVisible),this._editor.layoutContentWidget(this),this._editor.render(),this._stoleFocus=n,n&&this._hover.containerDomNode.focus()}getPosition(){return this._isVisible?{position:this._showAtPosition,range:this._showAtRange,preference:[1,2]}:null}_updateFont(){Array.prototype.slice.call(this._hover.contentsDomNode.getElementsByClassName("code")).forEach((e=>this._editor.applyFontInfo(e)))}_updateContents(e){this._hover.contentsDomNode.textContent="",this._hover.contentsDomNode.appendChild(e),this._updateFont(),this._editor.layoutContentWidget(this),this._hover.onContentsChanged()}layout(){const e=Math.max(this._editor.getLayoutInfo().height/4,250),{fontSize:t,lineHeight:n}=this._editor.getOption(41);this._hover.contentsDomNode.style.fontSize=`${t}px`,this._hover.contentsDomNode.style.lineHeight=`${n}px`,this._hover.contentsDomNode.style.maxHeight=`${e}px`,this._hover.contentsDomNode.style.maxWidth=`${Math.max(.66*this._editor.getLayoutInfo().width,500)}px`}onModelDecorationsChanged(){this._isChangingDecorations||this._isVisible&&(this._hoverOperation.cancel(),this._computer.clearResult(),this._colorPicker||this._hoverOperation.start(0))}startShowingAtRange(e,t,n){this._startShowingAt(new de(0,e),t,n)}_startShowingAt(e,t,n){if(!this._lastAnchor||!this._lastAnchor.equals(e)){if(this._hoverOperation.cancel(),this._isVisible)if(this._showAtPosition&&this._lastAnchor&&e.canAdoptVisibleHover(this._lastAnchor,this._showAtPosition)){const t=this._messages.filter((t=>t.isValidForHoverAnchor(e)));if(0===t.length)this.hide();else{if(t.length===this._messages.length)return;this._renderMessages(e,t)}}else this.hide();this._lastAnchor=e,this._computer.setAnchor(e),this._shouldFocus=n,this._hoverOperation.start(t)}}hide(){this._lastAnchor=null,this._hoverOperation.cancel(),this._isVisible&&(setTimeout((()=>{this._isVisible||this._hoverVisibleKey.set(!1)}),0),this._isVisible=!1,this._hover.containerDomNode.classList.toggle("hidden",!this._isVisible),this._editor.layoutContentWidget(this),this._stoleFocus&&this._editor.focus()),this._isChangingDecorations=!0,this._highlightDecorations=this._editor.deltaDecorations(this._highlightDecorations,[]),this._isChangingDecorations=!1,this._renderDisposable&&(this._renderDisposable.dispose(),this._renderDisposable=null),this._colorPicker=null}isColorPickerVisible(){return!!this._colorPicker}setColorPicker(e){this._colorPicker=e}onContentsChanged(){this._hover.onContentsChanged()}_withResult(e,t){this._messages=e,this._lastAnchor&&this._messages.length>0?this._renderMessages(this._lastAnchor,this._messages):t&&this.hide()}_renderMessages(t,n){this._renderDisposable&&(this._renderDisposable.dispose(),this._renderDisposable=null),this._colorPicker=null;let i=1073741824,o=n[0].range,s=null,l=document.createDocumentFragment();const d=new r.SL,c=new Map;for(const e of n)i=Math.min(i,e.range.startColumn),o=a.e.plusRange(o,e.range),e.forceShowAtRange&&(s=e.range),c.has(e.owner)||c.set(e.owner,[]),c.get(e.owner).push(e);const u=d.add(new Ue(this._keybindingService));for(const[e,t]of c)d.add(e.renderHoverParts(t,l,u));u.hasContent&&l.appendChild(u.hoverElement),this._renderDisposable=d,l.hasChildNodes()&&(s?this._showAt(s.getStartPosition(),s,this._shouldFocus):this._showAt(new h.L(t.range.startLineNumber,i),o,this._shouldFocus),this._updateContents(l)),this._colorPicker&&this._colorPicker.layout(),this._isChangingDecorations=!0,this._highlightDecorations=this._editor.deltaDecorations(this._highlightDecorations,o?[{range:o,options:e._DECORATION_OPTIONS}]:[]),this._isChangingDecorations=!1}};Ke.ID="editor.contrib.modesContentHoverWidget",Ke._DECORATION_OPTIONS=u.qx.register({description:"content-hover-highlight",className:"hoverHighlight"}),Ke=Ve([He(2,J.TG),He(3,ze.d)],Ke);class qe extends b.${constructor(e,t){super(),this._id=e,this._editor=t,this._isVisible=!1,this._domNode=document.createElement("div"),this._domNode.className="monaco-hover hidden",this._domNode.setAttribute("aria-hidden","true"),this._domNode.setAttribute("role","tooltip"),this._showAtLineNumber=-1,this._register(this._editor.onDidChangeConfiguration((e=>{e.hasChanged(41)&&this.updateFont()}))),this._editor.addOverlayWidget(this)}get isVisible(){return this._isVisible}set isVisible(e){this._isVisible=e,this._domNode.classList.toggle("hidden",!this._isVisible)}getId(){return this._id}getDomNode(){return this._domNode}showAt(e){this._showAtLineNumber=e,this.isVisible||(this.isVisible=!0);const t=this._editor.getLayoutInfo(),n=this._editor.getTopForLineNumber(this._showAtLineNumber),i=this._editor.getScrollTop(),o=this._editor.getOption(57),r=n-i-(this._domNode.clientHeight-o)/2;this._domNode.style.left=`${t.glyphMarginLeft+t.glyphMarginWidth}px`,this._domNode.style.top=`${Math.max(Math.round(r),0)}px`}hide(){this.isVisible&&(this.isVisible=!1)}getPosition(){return null}dispose(){this._editor.removeOverlayWidget(this),super.dispose()}updateFont(){[...Array.prototype.slice.call(this._domNode.getElementsByTagName("code")),...Array.prototype.slice.call(this._domNode.getElementsByClassName("code"))].forEach((e=>this._editor.applyFontInfo(e)))}updateContents(e){this._domNode.textContent="",this._domNode.appendChild(e),this.updateFont()}}class Ye{constructor(e){this._editor=e,this._lineNumber=-1,this._result=[]}setLineNumber(e){this._lineNumber=e,this._result=[]}clearResult(){this._result=[]}computeSync(){const e=e=>({value:e}),t=this._editor.getLineDecorations(this._lineNumber),n=[];if(!t)return n;for(const i of t){if(!i.options.glyphMarginClassName)continue;const t=i.options.glyphMarginHoverMessage;t&&!(0,ee.CP)(t)&&n.push(...(0,_._2)(t).map(e))}return n}onResult(e,t){this._result=this._result.concat(e)}getResult(){return this._result}getResultWithLoadingMessage(){return this.getResult()}}class Ge extends qe{constructor(e,t,n=z.SW){super(Ge.ID,e),this._renderDisposeables=this._register(new r.SL),this._messages=[],this._lastLineNumber=-1,this._markdownRenderer=this._register(new te.$({editor:this._editor},t,n)),this._computer=new Ye(this._editor),this._hoverOperation=new f(this._computer,(e=>this._withResult(e)),void 0,(e=>this._withResult(e)),300)}dispose(){this._hoverOperation.cancel(),super.dispose()}onModelDecorationsChanged(){this.isVisible&&(this._hoverOperation.cancel(),this._computer.clearResult(),this._hoverOperation.start(0))}startShowingAt(e){this._lastLineNumber!==e&&(this._hoverOperation.cancel(),this.hide(),this._lastLineNumber=e,this._computer.setLineNumber(e),this._hoverOperation.start(0))}hide(){this._lastLineNumber=-1,this._hoverOperation.cancel(),super.hide()}_withResult(e){this._messages=e,this._messages.length>0?this._renderMessages(this._lastLineNumber,this._messages):this.hide()}_renderMessages(e,t){this._renderDisposeables.clear();const n=document.createDocumentFragment();for(const e of t){const t=this._markdownRenderer.render(e.value);this._renderDisposeables.add(t),n.appendChild((0,c.$)("div.hover-row",void 0,t.element))}this.updateContents(n),this.showAt(e)}}Ge.ID="editor.contrib.modesGlyphHoverWidget";var Qe=n(5389),Xe=function(e,t){return function(n,i){t(n,i,e)}};let Je=class e{constructor(e,t,n,i,o){this._editor=e,this._instantiationService=t,this._openerService=n,this._modeService=i,this._toUnhook=new r.SL,this._isMouseDown=!1,this._hoverClicked=!1,this._contentWidget=null,this._glyphWidget=null,this._hookEvents(),this._didChangeConfigurationHandler=this._editor.onDidChangeConfiguration((e=>{e.hasChanged(51)&&(this._unhookEvents(),this._hookEvents())})),this._hoverVisibleKey=l.u.hoverVisible.bindTo(o)}static get(t){return t.getContribution(e.ID)}_hookEvents(){const e=()=>this._hideWidgets(),t=this._editor.getOption(51);this._isHoverEnabled=t.enabled,this._isHoverSticky=t.sticky,this._isHoverEnabled?(this._toUnhook.add(this._editor.onMouseDown((e=>this._onEditorMouseDown(e)))),this._toUnhook.add(this._editor.onMouseUp((e=>this._onEditorMouseUp(e)))),this._toUnhook.add(this._editor.onMouseMove((e=>this._onEditorMouseMove(e)))),this._toUnhook.add(this._editor.onKeyDown((e=>this._onKeyDown(e)))),this._toUnhook.add(this._editor.onDidChangeModelDecorations((()=>this._onModelDecorationsChanged())))):(this._toUnhook.add(this._editor.onMouseMove((e=>this._onEditorMouseMove(e)))),this._toUnhook.add(this._editor.onKeyDown((e=>this._onKeyDown(e))))),this._toUnhook.add(this._editor.onMouseLeave(e)),this._toUnhook.add(this._editor.onDidChangeModel(e)),this._toUnhook.add(this._editor.onDidScrollChange((e=>this._onEditorScrollChanged(e))))}_unhookEvents(){this._toUnhook.clear()}_onModelDecorationsChanged(){var e,t;null===(e=this._contentWidget)||void 0===e||e.onModelDecorationsChanged(),null===(t=this._glyphWidget)||void 0===t||t.onModelDecorationsChanged()}_onEditorScrollChanged(e){(e.scrollTopChanged||e.scrollLeftChanged)&&this._hideWidgets()}_onEditorMouseDown(e){this._isMouseDown=!0;const t=e.target.type;9!==t||e.target.detail!==Ke.ID?12===t&&e.target.detail===Ge.ID||(12!==t&&e.target.detail!==Ge.ID&&(this._hoverClicked=!1),this._hideWidgets()):this._hoverClicked=!0}_onEditorMouseUp(e){this._isMouseDown=!1}_onEditorMouseMove(e){var t,n,i,o,r;let s=e.target.type;if((!this._isMouseDown||!this._hoverClicked)&&(!this._isHoverSticky||9!==s||e.target.detail!==Ke.ID)&&(!this._isHoverSticky||(null===(n=null===(t=e.event.browserEvent.view)||void 0===t?void 0:t.getSelection())||void 0===n?void 0:n.isCollapsed))&&(this._isHoverSticky||9!==s||e.target.detail!==Ke.ID||!(null===(i=this._contentWidget)||void 0===i?void 0:i.isColorPickerVisible()))&&(!this._isHoverSticky||12!==s||e.target.detail!==Ge.ID)){if(this._isHoverEnabled)return this._getOrCreateContentWidget().maybeShowAt(e)?void(null===(o=this._glyphWidget)||void 0===o||o.hide()):2===s&&e.target.position?(null===(r=this._contentWidget)||void 0===r||r.hide(),this._glyphWidget||(this._glyphWidget=new Ge(this._editor,this._modeService,this._openerService)),void this._glyphWidget.startShowingAt(e.target.position.lineNumber)):void this._hideWidgets();this._hideWidgets()}}_onKeyDown(e){5!==e.keyCode&&6!==e.keyCode&&57!==e.keyCode&&4!==e.keyCode&&this._hideWidgets()}_hideWidgets(){var e,t,n;this._isMouseDown&&this._hoverClicked&&(null===(e=this._contentWidget)||void 0===e?void 0:e.isColorPickerVisible())||(this._hoverClicked=!1,null===(t=this._glyphWidget)||void 0===t||t.hide(),null===(n=this._contentWidget)||void 0===n||n.hide())}_getOrCreateContentWidget(){return this._contentWidget||(this._contentWidget=this._instantiationService.createInstance(Ke,this._editor,this._hoverVisibleKey)),this._contentWidget}isColorPickerVisible(){var e;return(null===(e=this._contentWidget)||void 0===e?void 0:e.isColorPickerVisible())||!1}showContentHover(e,t,n){this._getOrCreateContentWidget().startShowingAtRange(e,t,n)}dispose(){var e,t;this._unhookEvents(),this._toUnhook.dispose(),this._didChangeConfigurationHandler.dispose(),null===(e=this._glyphWidget)||void 0===e||e.dispose(),null===(t=this._contentWidget)||void 0===t||t.dispose()}};Je.ID="editor.contrib.hover",Je=function(e,t,n,i){var o,r=arguments.length,s=r<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,i);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,n,s):o(t,n))||s);return r>3&&s&&Object.defineProperty(t,n,s),s}([Xe(1,J.TG),Xe(2,z.v4),Xe(3,d.h),Xe(4,pe.i6)],Je);class et extends s.R6{constructor(){super({id:"editor.action.showHover",label:i.N({key:"showHover",comment:["Label for action that will trigger the showing of a hover in the editor.","This allows for users to show the hover without using the mouse."]},"Show Hover"),alias:"Show Hover",precondition:void 0,kbOpts:{kbExpr:l.u.editorTextFocus,primary:(0,o.gx)(2089,2087),weight:100}})}run(e,t){if(!t.hasModel())return;let n=Je.get(t);if(!n)return;const i=t.getPosition(),o=new a.e(i.lineNumber,i.column,i.lineNumber,i.column),r=2===t.getOption(2);n.showContentHover(o,1,r)}}class tt extends s.R6{constructor(){super({id:"editor.action.showDefinitionPreviewHover",label:i.N({key:"showDefinitionPreviewHover",comment:["Label for action that will trigger the showing of definition preview hover in the editor.","This allows for users to show the definition preview hover without using the mouse."]},"Show Definition Preview Hover"),alias:"Show Definition Preview Hover",precondition:void 0})}run(e,t){let n=Je.get(t);if(!n)return;const i=t.getPosition();if(!i)return;const o=new a.e(i.lineNumber,i.column,i.lineNumber,i.column);Qe.GotoDefinitionAtPositionEditorContribution.get(t).startFindDefinitionFromCursor(i).then((()=>{n.showContentHover(o,1,!0)}))}}(0,s._K)(Je.ID,Je),(0,s.Qr)(et),(0,s.Qr)(tt),(0,Z.Ic)(((e,t)=>{const n=e.getColor(K.pt);n&&t.addRule(`.monaco-editor .hoverHighlight { background-color: ${n}; }`);const i=e.getColor(K.yJ);i&&t.addRule(`.monaco-editor .monaco-hover { background-color: ${i}; }`);const o=e.getColor(K.CN);o&&(t.addRule(`.monaco-editor .monaco-hover { border: 1px solid ${o}; }`),t.addRule(`.monaco-editor .monaco-hover .hover-row:not(:first-child):not(:empty) { border-top: 1px solid ${o.transparent(.5)}; }`),t.addRule(`.monaco-editor .monaco-hover hr { border-top: 1px solid ${o.transparent(.5)}; }`),t.addRule(`.monaco-editor .monaco-hover hr { border-bottom: 0px solid ${o.transparent(.5)}; }`));const r=e.getColor(K.ur);r&&t.addRule(`.monaco-editor .monaco-hover a { color: ${r}; }`);const s=e.getColor(K.sg);s&&t.addRule(`.monaco-editor .monaco-hover a:hover { color: ${s}; }`);const a=e.getColor(K.Sb);a&&t.addRule(`.monaco-editor .monaco-hover { color: ${a}; }`);const l=e.getColor(K.Lo);l&&t.addRule(`.monaco-editor .monaco-hover .hover-row .actions { background-color: ${l}; }`);const d=e.getColor(K.Sw);d&&t.addRule(`.monaco-editor .monaco-hover code { background-color: ${d}; }`)}))},3554:(e,t,n)=>{"use strict";n.r(t);var i=n(3580),o=n(4314),r=n(3860),s=n(9102),a=n(6830),l=n(469);class d{constructor(e,t,n){this._editRange=e,this._originalSelection=t,this._text=n}getEditOperations(e,t){t.addTrackedEditOperation(this._editRange,this._text)}computeCursorState(e,t){const n=t.getInverseEditOperations()[0].range;return this._originalSelection.isEmpty()?new r.Y(n.endLineNumber,Math.min(this._originalSelection.positionColumn,n.endColumn),n.endLineNumber,Math.min(this._originalSelection.positionColumn,n.endColumn)):new r.Y(n.endLineNumber,n.endColumn-this._text.length,n.endLineNumber,n.endColumn)}}var c=n(9925),h=n(7781),u=n(7869),g=n(3103),p=n(5393),m=n(7301);let f=class e{constructor(e,t){this.decorationIds=[],this.editor=e,this.editorWorkerService=t}static get(t){return t.getContribution(e.ID)}dispose(){}run(t,n){this.currentRequest&&this.currentRequest.cancel();const i=this.editor.getSelection(),s=this.editor.getModel();if(!s||!i)return;let a=i;if(a.startLineNumber!==a.endLineNumber)return;const l=new c.yy(this.editor,5),h=s.uri;return this.editorWorkerService.canNavigateValueSet(h)?(this.currentRequest=(0,p.PG)((e=>this.editorWorkerService.navigateValueSet(h,a,n))),this.currentRequest.then((n=>{if(!n||!n.range||!n.value)return;if(!l.validate(this.editor))return;let i=o.e.lift(n.range),s=n.range,c=n.value.length-(a.endColumn-a.startColumn);s={startLineNumber:s.startLineNumber,startColumn:s.startColumn,endLineNumber:s.endLineNumber,endColumn:s.startColumn+n.value.length},c>1&&(a=new r.Y(a.startLineNumber,a.startColumn,a.endLineNumber,a.endColumn+c-1));const h=new d(i,a,n.value);this.editor.pushUndoStop(),this.editor.executeCommand(t,h),this.editor.pushUndoStop(),this.decorationIds=this.editor.deltaDecorations(this.decorationIds,[{range:s,options:e.DECORATION}]),this.decorationRemover&&this.decorationRemover.cancel(),this.decorationRemover=(0,p.Vs)(350),this.decorationRemover.then((()=>this.decorationIds=this.editor.deltaDecorations(this.decorationIds,[]))).catch(m.dL)})).catch(m.dL)):Promise.resolve(void 0)}};var _,b;f.ID="editor.contrib.inPlaceReplaceController",f.DECORATION=g.qx.register({description:"in-place-replace",className:"valueSetReplacement"}),f=function(e,t,n,i){var o,r=arguments.length,s=r<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,i);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,n,s):o(t,n))||s);return r>3&&s&&Object.defineProperty(t,n,s),s}([(_=1,b=l.p,function(e,t){b(e,t,_)})],f);class C extends a.R6{constructor(){super({id:"editor.action.inPlaceReplace.up",label:i.N("InPlaceReplaceAction.previous.label","Replace with Previous Value"),alias:"Replace with Previous Value",precondition:s.u.writable,kbOpts:{kbExpr:s.u.editorTextFocus,primary:3154,weight:100}})}run(e,t){const n=f.get(t);return n?n.run(this.id,!0):Promise.resolve(void 0)}}class v extends a.R6{constructor(){super({id:"editor.action.inPlaceReplace.down",label:i.N("InPlaceReplaceAction.next.label","Replace with Next Value"),alias:"Replace with Next Value",precondition:s.u.writable,kbOpts:{kbExpr:s.u.editorTextFocus,primary:3156,weight:100}})}run(e,t){const n=f.get(t);return n?n.run(this.id,!1):Promise.resolve(void 0)}}(0,a._K)(f.ID,f),(0,a.Qr)(C),(0,a.Qr)(v),(0,h.Ic)(((e,t)=>{const n=e.getColor(u.Dl);n&&t.addRule(`.monaco-editor.vs .valueSetReplacement { outline: solid 2px ${n}; }`)}))},1491:(e,t,n)=>{"use strict";function i(e,t){let n=0;for(let i=0;ii,J:()=>o})},638:(e,t,n)=>{"use strict";n.r(t),n.d(t,{getReindentEditOperations:()=>_,IndentationToSpacesAction:()=>b,IndentationToTabsAction:()=>C,ChangeIndentationSizeAction:()=>v,IndentUsingTabs:()=>w,IndentUsingSpaces:()=>y,DetectIndentation:()=>A,ReindentLinesAction:()=>S,ReindentSelectedLinesAction:()=>x,AutoIndentOnPasteCommand:()=>k,AutoIndentOnPaste:()=>L,IndentationToSpacesCommand:()=>N,IndentationToTabsCommand:()=>D});var i=n(3580),o=n(5976),r=n(7295),s=n(6830),a=n(291),l=n(9386),d=n(4314),c=n(3860),h=n(9102),u=n(3103),g=n(3831),p=n(1200),m=n(1491),f=n(1157);function _(e,t,n,i){if(1===e.getLineCount()&&1===e.getLineMaxColumn(1))return[];let o=g.zu.getIndentationRules(e.getLanguageIdentifier().id);if(!o)return[];for(n=Math.min(n,e.getLineCount());t<=n&&o.unIndentedLinePattern;){let n=e.getLineContent(t);if(!o.unIndentedLinePattern.test(n))break;t++}if(t>n-1)return[];const{tabSize:s,indentSize:d,insertSpaces:h}=e.getOptions(),p=(e,t)=>(t=t||1,a.U.shiftIndent(e,e.length+t,s,d,h)),m=(e,t)=>(t=t||1,a.U.unshiftIndent(e,e.length+t,s,d,h));let f,_=[],b=e.getLineContent(t),C=b;if(null!=i){f=i;let e=r.V8(b);C=f+b.substring(e.length),o.decreaseIndentPattern&&o.decreaseIndentPattern.test(C)&&(f=m(f),C=f+b.substring(e.length)),b!==C&&_.push(l.h.replaceMove(new c.Y(t,1,t,e.length+1),u.yO.normalizeIndentation(f,d,h)))}else f=r.V8(b);let v=f;o.increaseIndentPattern&&o.increaseIndentPattern.test(C)?(v=p(v),f=p(f)):o.indentNextLinePattern&&o.indentNextLinePattern.test(C)&&(v=p(v));for(let i=++t;i<=n;i++){let t=e.getLineContent(i),n=r.V8(t),s=v+t.substring(n.length);o.decreaseIndentPattern&&o.decreaseIndentPattern.test(s)&&(v=m(v),f=m(f)),n!==v&&_.push(l.h.replaceMove(new c.Y(i,1,i,n.length+1),u.yO.normalizeIndentation(v,d,h))),o.unIndentedLinePattern&&o.unIndentedLinePattern.test(t)||(o.increaseIndentPattern&&o.increaseIndentPattern.test(s)?(f=p(f),v=f):v=o.indentNextLinePattern&&o.indentNextLinePattern.test(s)?p(v):f)}return _}class b extends s.R6{constructor(){super({id:b.ID,label:i.N("indentationToSpaces","Convert Indentation to Spaces"),alias:"Convert Indentation to Spaces",precondition:h.u.writable})}run(e,t){let n=t.getModel();if(!n)return;let i=n.getOptions(),o=t.getSelection();if(!o)return;const r=new N(o,i.tabSize);t.pushUndoStop(),t.executeCommands(this.id,[r]),t.pushUndoStop(),n.updateOptions({insertSpaces:!0})}}b.ID="editor.action.indentationToSpaces";class C extends s.R6{constructor(){super({id:C.ID,label:i.N("indentationToTabs","Convert Indentation to Tabs"),alias:"Convert Indentation to Tabs",precondition:h.u.writable})}run(e,t){let n=t.getModel();if(!n)return;let i=n.getOptions(),o=t.getSelection();if(!o)return;const r=new D(o,i.tabSize);t.pushUndoStop(),t.executeCommands(this.id,[r]),t.pushUndoStop(),n.updateOptions({insertSpaces:!1})}}C.ID="editor.action.indentationToTabs";class v extends s.R6{constructor(e,t){super(t),this.insertSpaces=e}run(e,t){const n=e.get(f.eJ),o=e.get(p.q);let r=t.getModel();if(!r)return;let s=o.getCreationOptions(r.getLanguageIdentifier().language,r.uri,r.isForSimpleWidget);const a=[1,2,3,4,5,6,7,8].map((e=>({id:e.toString(),label:e.toString(),description:e===s.tabSize?i.N("configuredTabSize","Configured Tab Size"):void 0}))),l=Math.min(r.getOptions().tabSize-1,7);setTimeout((()=>{n.pick(a,{placeHolder:i.N({key:"selectTabWidth",comment:["Tab corresponds to the tab key"]},"Select Tab Size for Current File"),activeItem:a[l]}).then((e=>{e&&r&&!r.isDisposed()&&r.updateOptions({tabSize:parseInt(e.label,10),insertSpaces:this.insertSpaces})}))}),50)}}class w extends v{constructor(){super(!1,{id:w.ID,label:i.N("indentUsingTabs","Indent Using Tabs"),alias:"Indent Using Tabs",precondition:void 0})}}w.ID="editor.action.indentUsingTabs";class y extends v{constructor(){super(!0,{id:y.ID,label:i.N("indentUsingSpaces","Indent Using Spaces"),alias:"Indent Using Spaces",precondition:void 0})}}y.ID="editor.action.indentUsingSpaces";class A extends s.R6{constructor(){super({id:A.ID,label:i.N("detectIndentation","Detect Indentation from Content"),alias:"Detect Indentation from Content",precondition:void 0})}run(e,t){const n=e.get(p.q);let i=t.getModel();if(!i)return;let o=n.getCreationOptions(i.getLanguageIdentifier().language,i.uri,i.isForSimpleWidget);i.detectIndentation(o.insertSpaces,o.tabSize)}}A.ID="editor.action.detectIndentation";class S extends s.R6{constructor(){super({id:"editor.action.reindentlines",label:i.N("editor.reindentlines","Reindent Lines"),alias:"Reindent Lines",precondition:h.u.writable})}run(e,t){let n=t.getModel();if(!n)return;let i=_(n,1,n.getLineCount());i.length>0&&(t.pushUndoStop(),t.executeEdits(this.id,i),t.pushUndoStop())}}class x extends s.R6{constructor(){super({id:"editor.action.reindentselectedlines",label:i.N("editor.reindentselectedlines","Reindent Selected Lines"),alias:"Reindent Selected Lines",precondition:h.u.writable})}run(e,t){let n=t.getModel();if(!n)return;let i=t.getSelections();if(null===i)return;let o=[];for(let e of i){let t=e.startLineNumber,i=e.endLineNumber;if(t!==i&&1===e.endColumn&&i--,1===t){if(t===i)continue}else t--;let r=_(n,t,i);o.push(...r)}o.length>0&&(t.pushUndoStop(),t.executeEdits(this.id,o),t.pushUndoStop())}}class k{constructor(e,t){this._initialSelection=t,this._edits=[],this._selectionId=null;for(let t of e)t.range&&"string"==typeof t.text&&this._edits.push(t)}getEditOperations(e,t){for(let e of this._edits)t.addEditOperation(d.e.lift(e.range),e.text);let n=!1;Array.isArray(this._edits)&&1===this._edits.length&&this._initialSelection.isEmpty()&&(this._edits[0].range.startColumn===this._initialSelection.endColumn&&this._edits[0].range.startLineNumber===this._initialSelection.endLineNumber?(n=!0,this._selectionId=t.trackSelection(this._initialSelection,!0)):this._edits[0].range.endColumn===this._initialSelection.startColumn&&this._edits[0].range.endLineNumber===this._initialSelection.startLineNumber&&(n=!0,this._selectionId=t.trackSelection(this._initialSelection,!1))),n||(this._selectionId=t.trackSelection(this._initialSelection))}computeCursorState(e,t){return t.getTrackedSelection(this._selectionId)}}class L{constructor(e){this.callOnDispose=new o.SL,this.callOnModel=new o.SL,this.editor=e,this.callOnDispose.add(e.onDidChangeConfiguration((()=>this.update()))),this.callOnDispose.add(e.onDidChangeModel((()=>this.update()))),this.callOnDispose.add(e.onDidChangeModelLanguage((()=>this.update())))}update(){this.callOnModel.clear(),this.editor.getOption(9)<4||this.editor.getOption(45)||this.editor.hasModel()&&this.callOnModel.add(this.editor.onDidPaste((({range:e})=>{this.trigger(e)})))}trigger(e){let t=this.editor.getSelections();if(null===t||t.length>1)return;const n=this.editor.getModel();if(!n)return;if(!n.isCheapToTokenize(e.getStartPosition().lineNumber))return;const i=this.editor.getOption(9),{tabSize:o,indentSize:s,insertSpaces:l}=n.getOptions();let c=[],h={shiftIndent:e=>a.U.shiftIndent(e,e.length+1,o,s,l),unshiftIndent:e=>a.U.unshiftIndent(e,e.length+1,o,s,l)},u=e.startLineNumber;for(;u<=e.endLineNumber&&this.shouldIgnoreLine(n,u);)u++;if(u>e.endLineNumber)return;let p=n.getLineContent(u);if(!/\S/.test(p.substring(0,e.startColumn-1))){let e=g.zu.getGoodIndentForLine(i,n,n.getLanguageIdentifier().id,u,h);if(null!==e){let t=r.V8(p),i=m.Y(e,o);if(i!==m.Y(t,o)){let e=m.J(i,o,l);c.push({range:new d.e(u,1,u,t.length+1),text:e}),p=e+p.substr(t.length)}else{let e=g.zu.getIndentMetadata(n,u);if(0===e||8===e)return}}}const f=u;for(;un.getLineTokens(e),getLanguageIdentifier:()=>n.getLanguageIdentifier(),getLanguageIdAtPosition:(e,t)=>n.getLanguageIdAtPosition(e,t),getLineContent:e=>e===f?p:n.getLineContent(e)},s=g.zu.getGoodIndentForLine(i,t,n.getLanguageIdentifier().id,u+1,h);if(null!==s){let t=m.Y(s,o),i=m.Y(r.V8(n.getLineContent(u+1)),o);if(t!==i){let s=t-i;for(let t=u+1;t<=e.endLineNumber;t++){let e=n.getLineContent(t),i=r.V8(e),a=m.Y(i,o)+s,h=m.J(a,o,l);h!==i&&c.push({range:new d.e(t,1,t,i.length+1),text:h})}}}}if(c.length>0){this.editor.pushUndoStop();let e=new k(c,this.editor.getSelection());this.editor.executeCommand("autoIndentOnPaste",e),this.editor.pushUndoStop()}}shouldIgnoreLine(e,t){e.forceTokenization(t);let n=e.getLineFirstNonWhitespaceColumn(t);if(0===n)return!0;let i=e.getLineTokens(t);if(i.getCount()>0){let e=i.findTokenIndexAtOffset(n);if(e>=0&&1===i.getStandardTokenType(e))return!0}return!1}dispose(){this.callOnDispose.dispose(),this.callOnModel.dispose()}}function E(e,t,n,i){if(1===e.getLineCount()&&1===e.getLineMaxColumn(1))return;let o="";for(let e=0;e{"use strict";n.r(t),n.d(t,{getInlayHints:()=>S,InlayHintsController:()=>x});var i=n(5393),o=n(7301),r=n(9954),s=n(5976),a=n(6830),l=n(1640),d=n(4101),c=n(9488),h=n(3910),u=n(1050),g=n(7781),p=n(4314),m=n(1036),f=n(4565),_=n(666),b=n(8401),C=n(8216),v=n(187),w=n(3108),y=function(e,t){return function(n,i){t(n,i,e)}},A=function(e,t,n,i){return new(n||(n=Promise))((function(o,r){function s(e){try{l(i.next(e))}catch(e){r(e)}}function a(e){try{l(i.throw(e))}catch(e){r(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,a)}l((i=i.apply(e,t||[])).next())}))};function S(e,t,n){return A(this,void 0,void 0,(function*(){const i=[],r=d.mX.ordered(e).reverse(),s=(0,c.xH)(r.map((r=>t.map((t=>Promise.resolve(r.provideInlayHints(e,t,n)).then((e=>{e&&i.push({list:e,provider:r})}),(e=>{(0,o.Cp)(e)})))))));return yield Promise.all(s),i}))}let x=class{constructor(e,t,n,i){this._editor=e,this._codeEditorService=t,this._themeService=n,this._configurationService=i,this._disposables=new s.SL,this._sessionDisposables=new s.SL,this._getInlayHintsDelays=new m.Y(d.mX,25,2500),this._decorationsTypeIds=[],this._decorationIds=[],this._disposables.add(d.mX.onDidChange((()=>this._update()))),this._disposables.add(n.onDidColorThemeChange((()=>this._update()))),this._disposables.add(e.onDidChangeModel((()=>this._update()))),this._disposables.add(e.onDidChangeModelLanguage((()=>this._update()))),this._disposables.add(e.onDidChangeConfiguration((e=>{e.hasChanged(125)&&this._update()}))),this._update()}dispose(){this._sessionDisposables.dispose(),this._removeAllDecorations(),this._disposables.dispose()}_update(){if(this._sessionDisposables.clear(),!this._editor.getOption(125).enabled)return void this._removeAllDecorations();const e=this._editor.getModel();if(!e||!d.mX.has(e))return void this._removeAllDecorations();const t=new i.pY((()=>A(this,void 0,void 0,(function*(){const n=Date.now(),i=new u.A;this._sessionDisposables.add((0,s.OF)((()=>i.dispose(!0))));const o=this._editor.getVisibleRangesPlusViewportAboveBelow(),r=yield S(e,o,i.token),a=this._getInlayHintsDelays.update(e,Date.now()-n);t.delay=a,this._updateHintsDecorators(r)}))),this._getInlayHintsDelays.get(e));this._sessionDisposables.add(t),this._sessionDisposables.add(this._editor.onDidChangeModelContent((()=>t.schedule()))),this._disposables.add(this._editor.onDidScrollChange((()=>t.schedule()))),t.schedule();const n=new s.SL;this._sessionDisposables.add(n);for(const i of d.mX.all(e))"function"==typeof i.onDidChangeInlayHints&&n.add(i.onDidChangeInlayHints((()=>t.schedule())))}_updateHintsDecorators(e){const{fontSize:t,fontFamily:n}=this._getLayoutInfo(),i=this._themeService.getColorTheme().getColor(h.Pp),o=this._themeService.getColorTheme().getColor(h.VV),s=[],a=[],l="--inlayHintsFontFamily";this._editor.getContainerDomNode().style.setProperty(l,n);const d=this._configurationService.getValue("editor.useInjectedText"),c=void 0===d||!!d;for(const{list:n}of e)for(let e=0;et)&&(n=.9*t|0),{fontSize:n,fontFamily:e.fontFamily||this._editor.getOption(40)}}_removeAllDecorations(){this._decorationIds=this._editor.deltaDecorations(this._decorationIds,[]),this._decorationsTypeIds.forEach(this._codeEditorService.removeDecorationType,this._codeEditorService),this._decorationsTypeIds=[]}};x.ID="editor.contrib.InlayHints",x=function(e,t,n,i){var o,r=arguments.length,s=r<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,i);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,n,s):o(t,n))||s);return r>3&&s&&Object.defineProperty(t,n,s),s}([y(1,l.$),y(2,g.XE),y(3,w.Ui)],x),(0,a._K)(x.ID,x),f.P.registerCommand("_executeInlayHintProvider",((e,...t)=>A(void 0,void 0,void 0,(function*(){const[n,i]=t;(0,b.p_)(_.o.isUri(n)),(0,b.p_)(p.e.isIRange(i));const o=yield e.get(C.S).createModelReference(n);try{const e=yield S(o.object.textEditorModel,[p.e.lift(i)],u.T.None);return(0,c.xH)(e.map((e=>e.list))).sort(((e,t)=>v.L.compare(e.position,t.position)))}finally{o.dispose()}}))))},3793:(e,t,n)=>{"use strict";n.r(t),n.d(t,{ActiveGhostTextController:()=>Le,GhostTextController:()=>xe,ShowNextInlineSuggestionAction:()=>De,ShowPreviousInlineSuggestionAction:()=>Ie,TriggerInlineSuggestionAction:()=>Me,commitInlineSuggestionAction:()=>Ne});var i=n(5976),o=n(6830),r=n(9102),s=n(3379),a=n.n(s),l=n(7795),d=n.n(l),c=n(569),h=n.n(c),u=n(3565),g=n.n(u),p=n(9216),m=n.n(p),f=n(4589),_=n.n(f),b=n(3975),C={};C.styleTagTransform=_(),C.setAttributes=g(),C.insert=h().bind(null,"head"),C.domAPI=d(),C.insertStyleElement=m(),a()(b.Z,C),b.Z&&b.Z.locals&&b.Z.locals;var v,w=n(5321),y=n(4314),A=n(1640),S=n(7295),x=n(7736),k=n(4141),L=n(72),E=n(9052),N=n(8411),D=n(187),I=n(7781),M=n(7869),T=n(1264),R=n(3181),O=n(2550),B=n(8819),P=n(2065),F=function(e,t,n,i){var o,r=arguments.length,s=r<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,i);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,n,s):o(t,n))||s);return r>3&&s&&Object.defineProperty(t,n,s),s},W=function(e,t){return function(n,i){t(n,i,e)}};const z=null===(v=window.trustedTypes)||void 0===v?void 0:v.createPolicy("editorGhostText",{createHTML:e=>e});let V=class extends i.JT{constructor(e,t,n){super(),this.editor=e,this.model=t,this.instantiationService=n,this.disposed=!1,this.partsWidget=this._register(this.instantiationService.createInstance(H,this.editor)),this.additionalLinesWidget=this._register(new $(this.editor)),this.viewMoreContentWidget=void 0,this._register(this.editor.onDidChangeConfiguration((e=>{(e.hasChanged(27)||e.hasChanged(104)||e.hasChanged(87)||e.hasChanged(81)||e.hasChanged(42)||e.hasChanged(41)||e.hasChanged(57))&&this.update()}))),this._register((0,i.OF)((()=>{var e;this.disposed=!0,this.update(),null===(e=this.viewMoreContentWidget)||void 0===e||e.dispose(),this.viewMoreContentWidget=void 0}))),this._register(t.onDidChange((()=>{this.update()}))),this.update()}shouldShowHoverAtViewZone(e){return this.additionalLinesWidget.viewZoneId===e}update(){var e;const t=this.model.ghostText;if(!this.editor.hasModel()||!t||this.disposed)return this.partsWidget.clear(),void this.additionalLinesWidget.clear();const n=new Array,i=new Array;function o(e,t){if(i.length>0){const n=i[i.length-1];t&&n.decorations.push(new O.Kp(n.content.length+1,n.content.length+1+e[0].length,t,0)),n.content+=e[0],e=e.slice(1)}for(const n of e)i.push({content:n,decorations:t?[new O.Kp(1,n.length+1,t,0)]:[]})}const r=this.editor.getModel().getLineContent(t.lineNumber);let s;this.editor.getModel().getLineTokens(t.lineNumber);let a=0;for(const e of t.parts){let t=e.lines;void 0===s?(n.push({column:e.column,text:t[0]}),t=t.slice(1)):o([r.substring(a,e.column-1)],void 0),t.length>0&&(o(t,"ghost-text"),void 0===s&&e.column<=r.length&&(s=e.column)),a=e.column-1}void 0!==s&&o([r.substring(a)],void 0),this.partsWidget.setParts(t.lineNumber,n,void 0!==s?{column:s,length:r.length+1-s}:void 0),this.additionalLinesWidget.updateLines(t.lineNumber,i,t.additionalReservedLineCount),t.parts.some((e=>e.lines.length<0))?this.viewMoreContentWidget=this.renderViewMoreLines(new D.L(t.lineNumber,this.editor.getModel().getLineMaxColumn(t.lineNumber)),"",0):(null===(e=this.viewMoreContentWidget)||void 0===e||e.dispose(),this.viewMoreContentWidget=void 0)}renderViewMoreLines(e,t,n){const o=this.editor.getOption(41),r=document.createElement("div");r.className="suggest-preview-additional-widget",E.V.applyFontInfoSlow(r,o);const s=document.createElement("span");s.className="content-spacer",s.append(t),r.append(s);const a=document.createElement("span");a.className="content-newline suggest-preview-text",a.append("⏎ "),r.append(a);const l=new i.SL,d=document.createElement("div");return d.className="button suggest-preview-text",d.append(`+${n} lines…`),l.add(w.mu(d,"mousedown",(e=>{var t;null===(t=this.model)||void 0===t||t.setExpanded(!0),e.preventDefault(),this.editor.focus()}))),r.append(d),new Z(this.editor,e,r,l)}};V=F([W(2,P.TG)],V);let H=class{constructor(e,t,n,o){this.editor=e,this.codeEditorService=t,this.themeService=n,this.contextKeyService=o,this.decorationIds=[],this.disposableStore=new i.SL}dispose(){this.clear(),this.disposableStore.dispose()}clear(){this.editor.deltaDecorations(this.decorationIds,[]),this.disposableStore.clear()}setParts(e,t,n){this.disposableStore.clear();const i=this.themeService.getColorTheme(),o=i.getColor(M.N5);let r,s;o&&(r=String(o.rgba.a),s=T.Il.Format.CSS.format(j(o)));const a=i.getColor(M.x3);let l;a&&(l=`2px dashed ${a}`);const d=this.editor.getModel();if(!d)return;const{tabSize:c}=d.getOptions(),h=d.getLineContent(e)||"";let u=0,g="";const p=new Array;n&&p.push({range:y.e.fromPositions(new D.L(e,n.column),new D.L(e,n.column+n.length)),options:{inlineClassName:"ghost-text-hidden",description:"ghost-text-hidden"}});const m=this.contextKeyService.getContextKeyValue("config.editor.useInjectedText"),f=void 0===m||!!m;this.decorationIds=this.editor.deltaDecorations(this.decorationIds,t.map((t=>{g+=h.substring(u,t.column-1),u=t.column-1;const n=f?t.text:this.renderSingleLineText(t.text,g,c,!1),i=this.disposableStore.add(function(e,t,n,i){const o="0-ghost-text-"+U++;return e.registerDecorationType("ghost-text",o,i),{dispose(){e.removeDecorationType(o)},resolve:()=>e.resolveDecorationOptions(o,!0)}}(this.codeEditorService,0,0,{after:{contentText:n,opacity:r,color:s,border:l}}));return{range:y.e.fromPositions(new D.L(e,t.column)),options:f?{description:"ghost-text",after:{content:n,inlineClassName:"ghost-text-decoration"}}:Object.assign({},i.resolve())}})).concat(p))}renderSingleLineText(e,t,n,i){const o=t+e,r=R.io.visibleColumnsByColumns(o,n);let s="",a=t.length+1;for(const t of e){if("\t"===t){const e=r[a+1]-r[a];if(i){s+="→";for(let t=1;t{this._viewZoneId&&(e.removeZone(this._viewZoneId),this._viewZoneId=void 0)}))}updateLines(e,t,n){const i=this.editor.getModel();if(!i)return;const{tabSize:o}=i.getOptions();this.editor.changeViewZones((i=>{this._viewZoneId&&(i.removeZone(this._viewZoneId),this._viewZoneId=void 0);const r=Math.max(t.length,n);if(r>0){const n=document.createElement("div");!function(e,t,n,i){const o=i.get(27),r=i.get(104),s=i.get(81),a=i.get(42),l=i.get(41),d=i.get(57),c=(0,L.l$)(1e4);c.appendASCIIString('
    ');for(let e=0,i=n.length;e');const u=S.$i(h),g=S.Ut(h),p=N.A.createEmpty(h);(0,x.d1)(new x.IJ(l.isMonospace&&!o,l.canUseHalfwidthRightwardsArrow,h,!1,u,g,0,p,i.decorations,t,0,l.spaceWidth,l.middotWidth,l.wsmiddotWidth,r,"none",s,a!==k.n0.OFF,null),c),c.appendASCIIString("
    ")}c.appendASCIIString(""),E.V.applyFontInfoSlow(e,l);const h=c.build(),u=z?z.createHTML(h):h;e.innerHTML=u}(n,o,t,this.editor.getOptions()),this._viewZoneId=i.addZone({afterLineNumber:e,heightInLines:r,domNode:n})}}))}}let U=0;class Z extends i.JT{constructor(e,t,n,o){super(),this.editor=e,this.position=t,this.domNode=n,this.allowEditorOverflow=!1,this.suppressMouseDown=!1,this._register(o),this._register((0,i.OF)((()=>{this.editor.removeContentWidget(this)}))),this.editor.addContentWidget(this)}getId(){return"editor.widget.viewMoreLinesWidget"}getDomNode(){return this.domNode}getPosition(){return{position:this.position,preference:[0]}}}(0,I.Ic)(((e,t)=>{const n=e.getColor(M.N5);if(n){const e=String(n.rgba.a),i=T.Il.Format.CSS.format(j(n));t.addRule(`.monaco-editor .ghost-text-decoration { opacity: ${e}; color: ${i}; }`),t.addRule(`.monaco-editor .suggest-preview-text .ghost-text { opacity: ${e}; color: ${i}; }`)}const i=e.getColor(M.x3);i&&t.addRule(`.monaco-editor .suggest-preview-text .ghost-text { border: 2px dashed ${i}; }`)}));var K=n(3580),q=n(5393),Y=n(1050),G=n(7301),Q=n(4669),X=n(4101),J=n(9386),ee=n(4565),te=n(8728),ne=n(2484);class ie{constructor(e,t,n=0){this.lineNumber=e,this.parts=t,this.additionalReservedLineCount=n}static equals(e,t){return e===t||!!e&&!!t&&e.equals(t)}equals(e){return this.lineNumber===e.lineNumber&&this.parts.length===e.parts.length&&this.parts.every(((t,n)=>t.equals(e.parts[n])))}}class oe{constructor(e,t){this.column=e,this.lines=t}equals(e){return this.column===e.column&&this.lines.length===e.lines.length&&this.lines.every(((t,n)=>t===e.lines[n]))}}class re extends i.JT{constructor(e){super(),this.editor=e,this._expanded=void 0,this.onDidChangeEmitter=new Q.Q5,this.onDidChange=this.onDidChangeEmitter.event,this._register(e.onDidChangeConfiguration((e=>{e.hasChanged(105)&&void 0===this._expanded&&this.onDidChangeEmitter.fire()})))}get expanded(){return void 0===this._expanded||this._expanded}setExpanded(e){this._expanded=!0,this.onDidChangeEmitter.fire()}}var se=function(e,t,n,i){return new(n||(n=Promise))((function(o,r){function s(e){try{l(i.next(e))}catch(e){r(e)}}function a(e){try{l(i.throw(e))}catch(e){r(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,a)}l((i=i.apply(e,t||[])).next())}))};let ae,le=class extends i.JT{constructor(e,t){super(),this.editor=e,this.commandService=t,this.onDidChangeEmitter=new Q.Q5,this.onDidChange=this.onDidChangeEmitter.event,this.completionSession=this._register(new i.XK),this.active=!1,this._register(t.onDidExecuteCommand((t=>{new Set([o.n_.id,o.kz.id,te.CoreEditingCommands.Tab.id,te.CoreEditingCommands.DeleteLeft.id,te.CoreEditingCommands.DeleteRight.id]).has(t.commandId)&&e.hasTextFocus()&&this.handleUserInput()}))),this._register(this.editor.onDidType((e=>{this.handleUserInput()}))),this._register(this.editor.onDidChangeCursorPosition((e=>{this.session&&!this.session.isValid&&this.hide()})))}handleUserInput(){this.session&&!this.session.isValid&&this.hide(),setTimeout((()=>{this.startSessionIfTriggered()}),0)}get session(){return this.completionSession.value}get ghostText(){var e;return null===(e=this.session)||void 0===e?void 0:e.ghostText}get minReservedLineCount(){return this.session?this.session.minReservedLineCount:0}get expanded(){return!!this.session&&this.session.expanded}setExpanded(e){var t;null===(t=this.session)||void 0===t||t.setExpanded(e)}setActive(e){var t;this.active=e,e&&(null===(t=this.session)||void 0===t||t.scheduleAutomaticUpdate())}startSessionIfTriggered(){this.editor.getOption(53).enabled&&(this.session&&this.session.isValid||this.trigger())}trigger(){this.completionSession.value||(this.completionSession.value=new he(this.editor,this.editor.getPosition(),(()=>this.active),this.commandService),this.completionSession.value.takeOwnership(this.completionSession.value.onDidChange((()=>{this.onDidChangeEmitter.fire()}))))}hide(){this.completionSession.clear(),this.onDidChangeEmitter.fire()}commitCurrentSuggestion(){var e;null===(e=this.session)||void 0===e||e.commitCurrentCompletion()}showNext(){var e;null===(e=this.session)||void 0===e||e.showNextInlineCompletion()}showPrevious(){var e;null===(e=this.session)||void 0===e||e.showPreviousInlineCompletion()}hasMultipleInlineCompletions(){var e;return se(this,void 0,void 0,(function*(){const t=yield null===(e=this.session)||void 0===e?void 0:e.hasMultipleInlineCompletions();return void 0!==t&&t}))}};var de,ce;le=function(e,t,n,i){var o,r=arguments.length,s=r<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,i);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,n,s):o(t,n))||s);return r>3&&s&&Object.defineProperty(t,n,s),s}([(de=1,ce=ee.H,function(e,t){ce(e,t,de)})],le);class he extends re{constructor(e,t,n,o){let r;super(e),this.triggerPosition=t,this.shouldUpdate=n,this.commandService=o,this.minReservedLineCount=0,this.updateOperation=this._register(new i.XK),this.cache=this._register(new i.XK),this.updateSoon=this._register(new q.pY((()=>this.update(X.bw.Automatic)),50)),this.textModel=this.editor.getModel(),this.currentlySelectedCompletionId=void 0,this._register(this.onDidChange((()=>{const e=this.currentCompletion;if(e&&e.sourceInlineCompletion!==r){r=e.sourceInlineCompletion;const t=e.sourceProvider;t.handleItemDidShow&&t.handleItemDidShow(e.sourceInlineCompletions,r)}}))),this._register(this.editor.onDidChangeCursorPosition((e=>{this.cache.value&&this.onDidChangeEmitter.fire()}))),this._register(this.editor.onDidChangeModelContent((e=>{if(this.cache.value){let e=!1;for(const t of this.cache.value.completions){const n=this.textModel.getDecorationRange(t.decorationId);n?t.synchronizedRange.equalsRange(n)||(e=!0,t.synchronizedRange=n):(0,G.dL)(new Error("Decoration has no range"))}e&&this.onDidChangeEmitter.fire()}this.scheduleAutomaticUpdate()}))),this._register(X.zu.onDidChange((()=>{this.updateSoon.schedule()}))),this.scheduleAutomaticUpdate()}fixAndGetIndexOfCurrentSelection(){if(!this.currentlySelectedCompletionId||!this.cache.value)return 0;if(0===this.cache.value.completions.length)return 0;const e=this.cache.value.completions.findIndex((e=>e.semanticId===this.currentlySelectedCompletionId));return-1===e?(this.currentlySelectedCompletionId=void 0,0):e}get currentCachedCompletion(){if(this.cache.value)return this.cache.value.completions[this.fixAndGetIndexOfCurrentSelection()]}showNextInlineCompletion(){var e;return se(this,void 0,void 0,(function*(){yield this.ensureUpdateWithExplicitContext();const t=(null===(e=this.cache.value)||void 0===e?void 0:e.completions)||[];if(t.length>0){const e=(this.fixAndGetIndexOfCurrentSelection()+1)%t.length;this.currentlySelectedCompletionId=t[e].semanticId}else this.currentlySelectedCompletionId=void 0;this.onDidChangeEmitter.fire()}))}showPreviousInlineCompletion(){var e;return se(this,void 0,void 0,(function*(){yield this.ensureUpdateWithExplicitContext();const t=(null===(e=this.cache.value)||void 0===e?void 0:e.completions)||[];if(t.length>0){const e=(this.fixAndGetIndexOfCurrentSelection()+t.length-1)%t.length;this.currentlySelectedCompletionId=t[e].semanticId}else this.currentlySelectedCompletionId=void 0;this.onDidChangeEmitter.fire()}))}ensureUpdateWithExplicitContext(){var e;return se(this,void 0,void 0,(function*(){this.updateOperation.value?this.updateOperation.value.triggerKind===X.bw.Explicit?yield this.updateOperation.value.promise:yield this.update(X.bw.Explicit):(null===(e=this.cache.value)||void 0===e?void 0:e.triggerKind)!==X.bw.Explicit&&(yield this.update(X.bw.Explicit))}))}hasMultipleInlineCompletions(){var e;return se(this,void 0,void 0,(function*(){return yield this.ensureUpdateWithExplicitContext(),((null===(e=this.cache.value)||void 0===e?void 0:e.completions.length)||0)>1}))}get ghostText(){const e=this.currentCompletion,t=this.editor.getOptions().get(53).mode;return e?me(e,this.editor.getModel(),t,this.editor.getPosition()):void 0}get currentCompletion(){const e=this.currentCachedCompletion;if(e)return{text:e.inlineCompletion.text,range:e.synchronizedRange,command:e.inlineCompletion.command,sourceProvider:e.inlineCompletion.sourceProvider,sourceInlineCompletions:e.inlineCompletion.sourceInlineCompletions,sourceInlineCompletion:e.inlineCompletion.sourceInlineCompletion}}get isValid(){return this.editor.getPosition().lineNumber===this.triggerPosition.lineNumber}scheduleAutomaticUpdate(){this.updateOperation.clear(),this.updateSoon.schedule()}update(e){return se(this,void 0,void 0,(function*(){if(!this.shouldUpdate())return;const t=this.editor.getPosition(),n=(0,q.PG)((n=>se(this,void 0,void 0,(function*(){let i;try{i=yield function(e,t,n,i=Y.T.None){return se(this,void 0,void 0,(function*(){const o=function(e,t){const n=t.getWordAtPosition(e),i=t.getLineMaxColumn(e.lineNumber);return n?new y.e(e.lineNumber,n.startColumn,e.lineNumber,i):y.e.fromPositions(e,e.with(void 0,i))}(e,t),r=X.zu.all(t),s=yield Promise.all(r.map((o=>se(this,void 0,void 0,(function*(){const r=yield o.provideInlineCompletions(t,e,n,i);return{completions:r,provider:o,dispose:()=>{r&&o.freeInlineCompletions(r)}}}))))),a=new Map;for(const e of s){const t=e.completions;if(t)for(const n of t.items.map((n=>({text:n.text,range:n.range?y.e.lift(n.range):o,command:n.command,sourceProvider:e.provider,sourceInlineCompletions:t,sourceInlineCompletion:n}))))n.range.startLineNumber===n.range.endLineNumber&&a.set(JSON.stringify({text:n.text,range:n.range}),n)}return{items:[...a.values()],dispose:()=>{for(const e of s)e.dispose()}}}))}(t,this.editor.getModel(),{triggerKind:e},n)}catch(e){return void(0,G.dL)(e)}n.isCancellationRequested||(this.cache.value=new ge(this.editor,i,(()=>this.onDidChangeEmitter.fire()),e),this.onDidChangeEmitter.fire())})))),i=new ue(n,e);this.updateOperation.value=i,yield n,this.updateOperation.value===i&&this.updateOperation.clear()}))}takeOwnership(e){this._register(e)}commitCurrentCompletion(){if(!this.ghostText)return;const e=this.currentCompletion;e&&this.commit(e)}commit(e){const t=this.cache.clearAndLeak();this.editor.executeEdits("inlineSuggestion.accept",[J.h.replaceMove(e.range,e.text)]),e.command?this.commandService.executeCommand(e.command.id,...e.command.arguments||[]).finally((()=>{null==t||t.dispose()})).then(void 0,G.Cp):null==t||t.dispose(),this.onDidChangeEmitter.fire()}}class ue{constructor(e,t){this.promise=e,this.triggerKind=t}dispose(){this.promise.cancel()}}class ge extends i.JT{constructor(e,t,n,o){super(),this.triggerKind=o;const r=e.deltaDecorations([],t.items.map((e=>({range:e.range,options:{description:"inline-completion-tracking-range"}}))));this._register((0,i.OF)((()=>{e.deltaDecorations(r,[])}))),this.completions=t.items.map(((e,t)=>new pe(e,r[t]))),this._register(e.onDidChangeModelContent((()=>{let t=!1;const i=e.getModel();for(const e of this.completions){const n=i.getDecorationRange(e.decorationId);n?e.synchronizedRange.equalsRange(n)||(t=!0,e.synchronizedRange=n):(0,G.dL)(new Error("Decoration has no range"))}t&&n()}))),this._register(t)}}class pe{constructor(e,t){this.inlineCompletion=e,this.decorationId=t,this.semanticId=JSON.stringify({text:this.inlineCompletion.text,startLine:this.inlineCompletion.range.startLineNumber,startColumn:this.inlineCompletion.range.startColumn,command:this.inlineCompletion.command}),this.synchronizedRange=e.range}}function me(e,t,n,i){if(e.range.startLineNumber!==e.range.endLineNumber)return;const o=t.getValueInRange(e.range),r=function(e,t){if((null==ae?void 0:ae.originalValue)===e&&(null==ae?void 0:ae.newValue)===t)return null==ae?void 0:ae.changes;{const n=function(e,t){function n(e){let t=0;for(let n=0,i=e.length;nt&&(t=i)}return t}const i=Math.max(n(e),n(t));function o(e){if(e<0)throw new Error("unexpected");return i+e+1}function r(e){let t=0,n=0;const i=new Int32Array(e.length);for(let r=0,s=e.length;rs},{getElements:()=>a}).ComputeDiff(!1).changes}(e,t);return ae={originalValue:e,newValue:t,changes:n},n}}(o,e.text),s=e.range.startLineNumber,a=new Array;if("prefix"===n){const e=r.filter((e=>0===e.originalLength));if(e.length>1||1===e.length&&e[0].originalStart!==o.length)return}for(const l of r){const r=e.range.startColumn+l.originalStart+l.originalLength;if("subwordSmart"===n&&i&&i.lineNumber===e.range.startLineNumber&&r0){const e=o.substr(l.originalStart,l.originalLength),n=t.getLineFirstNonWhitespaceColumn(s);if(!/^(\t| )*$/.test(e)||!(0===n||r<=n))return}if(0===l.modifiedLength)continue;const d=e.text.substr(l.modifiedStart,l.modifiedLength),c=S.uq(d);a.push(new oe(r,c))}return new ie(s,a,0)}var fe=n(3472),_e=n(781),be=n(9830);class Ce extends re{constructor(e){super(e),this.isSuggestWidgetVisible=!1,this.currentGhostText=void 0,this._isActive=!1,this.isShiftKeyPressed=!1,this.minReservedLineCount=0,this.setInactiveDelayed=this._register(new q.pY((()=>{this.isSuggestWidgetVisible||this.isActive&&(this._isActive=!1,this.onDidChangeEmitter.fire())}),100));const t=be.SuggestController.get(this.editor);if(t){let e=!1;const n=()=>{e||(e=!0,this._register(t.widget.value.onDidShow((()=>{this.isSuggestWidgetVisible=!0,this._isActive=!0,this.updateFromSuggestion()}))),this._register(t.widget.value.onDidHide((()=>{this.isSuggestWidgetVisible=!1,this.setInactiveDelayed.schedule(),this.minReservedLineCount=0,this.updateFromSuggestion()}))),this._register(t.widget.value.onDidFocus((()=>{this.isSuggestWidgetVisible=!0,this._isActive=!0,this.updateFromSuggestion()}))))};this._register(Q.ju.once(t.model.onDidTrigger)((e=>{n()})))}this.updateFromSuggestion(),this._register(this.editor.onDidChangeCursorPosition((e=>{this.isSuggestionPreviewEnabled()&&this.update()}))),this._register((0,i.OF)((()=>{const e=be.SuggestController.get(this.editor);e&&e.stopForceRenderingAbove()}))),this._register(e.onKeyDown((e=>{e.shiftKey&&!this.isShiftKeyPressed&&(this.isShiftKeyPressed=!0,this.updateFromSuggestion())}))),this._register(e.onKeyUp((e=>{e.shiftKey&&this.isShiftKeyPressed&&(this.isShiftKeyPressed=!1,this.updateFromSuggestion())})))}get isActive(){return this._isActive}setExpanded(e){super.setExpanded(e),this.updateFromSuggestion()}isSuggestionPreviewEnabled(){return this.editor.getOption(105).preview}updateFromSuggestion(){const e=be.SuggestController.get(this.editor);if(!e)return void this.setCurrentInlineCompletion(void 0);if(!this.isSuggestWidgetVisible)return void this.setCurrentInlineCompletion(void 0);const t=e.widget.value.getFocusedItem();t?this.setCurrentInlineCompletion(function(e,t,n,i){const o=n.item;if(Array.isArray(o.completion.additionalTextEdits))return{text:"",range:y.e.fromPositions(t,t)};let{insertText:r}=o.completion;if(4&o.completion.insertTextRules){const n=(new fe.Yj).parse(r),i=e.editor.getModel();_e.l.adjustWhitespace(i,t,n,!0,!0),r=n.toString()}const s=e.getOverwriteInfo(o,i);return{text:r,range:y.e.fromPositions(t.delta(0,-s.overwriteBefore),t.delta(0,Math.max(s.overwriteAfter,0)))}}(e,this.editor.getPosition(),t,this.isShiftKeyPressed)):this.setCurrentInlineCompletion(void 0)}setCurrentInlineCompletion(e){this.currentCompletion=e,this.update()}update(){const e=this.currentCompletion,t=this.editor.getOptions().get(105).previewMode;this.setGhostText(e?me(e,this.editor.getModel(),t,this.editor.getPosition())||new ie(e.range.endLineNumber,[],this.minReservedLineCount):void 0)}setGhostText(e){if(ie.equals(this.currentGhostText,e))return;this.currentGhostText=e,this.currentGhostText&&this.expanded&&(this.minReservedLineCount=Math.max(this.minReservedLineCount,...this.currentGhostText.parts.map((e=>e.lines.length-1))));const t=be.SuggestController.get(this.editor);t&&(this.minReservedLineCount>=1&&this.isSuggestionPreviewEnabled()?t.forceRenderingAbove():t.stopForceRenderingAbove()),this.onDidChangeEmitter.fire()}get ghostText(){return this.isSuggestionPreviewEnabled()?this.currentGhostText:void 0}}class ve extends i.JT{constructor(){super(...arguments),this.onDidChangeEmitter=new Q.Q5,this.onDidChange=this.onDidChangeEmitter.event,this.hasCachedGhostText=!1,this.currentModelRef=this._register(new i.XK)}get targetModel(){var e;return null===(e=this.currentModelRef.value)||void 0===e?void 0:e.object}setTargetModel(e){var t,n,i;(null===(t=this.currentModelRef.value)||void 0===t?void 0:t.object)!==e&&(this.currentModelRef.clear(),this.currentModelRef.value=e?(n=e,i=e.onDidChange((()=>{this.hasCachedGhostText=!1,this.onDidChangeEmitter.fire()})),{object:n,dispose:()=>null==i?void 0:i.dispose()}):void 0,this.hasCachedGhostText=!1,this.onDidChangeEmitter.fire())}get ghostText(){var e,t;return this.hasCachedGhostText||(this.cachedGhostText=null===(t=null===(e=this.currentModelRef.value)||void 0===e?void 0:e.object)||void 0===t?void 0:t.ghostText,this.hasCachedGhostText=!0),this.cachedGhostText}setExpanded(e){var t;null===(t=this.targetModel)||void 0===t||t.setExpanded(e)}get expanded(){return!!this.targetModel&&this.targetModel.expanded}get minReservedLineCount(){return this.targetModel?this.targetModel.minReservedLineCount:0}}let we=class extends ve{constructor(e,t){super(),this.editor=e,this.commandService=t,this.suggestWidgetAdapterModel=this._register(new Ce(this.editor)),this.inlineCompletionsModel=this._register(new le(this.editor,this.commandService)),this._register(this.suggestWidgetAdapterModel.onDidChange((()=>{this.updateModel()}))),this.updateModel()}get activeInlineCompletionsModel(){if(this.targetModel===this.inlineCompletionsModel)return this.inlineCompletionsModel}updateModel(){this.setTargetModel(this.suggestWidgetAdapterModel.isActive?this.suggestWidgetAdapterModel:this.inlineCompletionsModel),this.inlineCompletionsModel.setActive(this.targetModel===this.inlineCompletionsModel)}shouldShowHoverAt(e){var t;const n=null===(t=this.activeInlineCompletionsModel)||void 0===t?void 0:t.ghostText;return!!n&&n.parts.some((t=>e.containsPosition(new D.L(n.lineNumber,t.column))))}triggerInlineCompletion(){var e;null===(e=this.activeInlineCompletionsModel)||void 0===e||e.trigger()}commitInlineCompletion(){var e;null===(e=this.activeInlineCompletionsModel)||void 0===e||e.commitCurrentSuggestion()}hideInlineCompletion(){var e;null===(e=this.activeInlineCompletionsModel)||void 0===e||e.hide()}showNextInlineCompletion(){var e;null===(e=this.activeInlineCompletionsModel)||void 0===e||e.showNext()}showPreviousInlineCompletion(){var e;null===(e=this.activeInlineCompletionsModel)||void 0===e||e.showPrevious()}hasMultipleInlineCompletions(){var e,t,n,i,o;return t=this,n=void 0,o=function*(){const t=yield null===(e=this.activeInlineCompletionsModel)||void 0===e?void 0:e.hasMultipleInlineCompletions();return void 0!==t&&t},new((i=void 0)||(i=Promise))((function(e,r){function s(e){try{l(o.next(e))}catch(e){r(e)}}function a(e){try{l(o.throw(e))}catch(e){r(e)}}function l(t){var n;t.done?e(t.value):(n=t.value,n instanceof i?n:new i((function(e){e(n)}))).then(s,a)}l((o=o.apply(t,n||[])).next())}))}};we=function(e,t,n,i){var o,r=arguments.length,s=r<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,i);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,n,s):o(t,n))||s);return r>3&&s&&Object.defineProperty(t,n,s),s}([function(e,t){return function(n,i){t(n,i,e)}}(1,ee.H)],we);var ye=function(e,t,n,i){var o,r=arguments.length,s=r<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,i);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,n,s):o(t,n))||s);return r>3&&s&&Object.defineProperty(t,n,s),s},Ae=function(e,t){return function(n,i){t(n,i,e)}},Se=function(e,t,n,i){return new(n||(n=Promise))((function(o,r){function s(e){try{l(i.next(e))}catch(e){r(e)}}function a(e){try{l(i.throw(e))}catch(e){r(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,a)}l((i=i.apply(e,t||[])).next())}))};let xe=class e extends i.JT{constructor(e,t){super(),this.editor=e,this.instantiationService=t,this.triggeredExplicitly=!1,this.activeController=this._register(new i.XK),this._register(this.editor.onDidChangeModel((()=>{this.updateModelController()}))),this._register(this.editor.onDidChangeConfiguration((e=>{e.hasChanged(105)&&this.updateModelController(),e.hasChanged(53)&&this.updateModelController()}))),this.updateModelController()}static get(t){return t.getContribution(e.ID)}get activeModel(){var e;return null===(e=this.activeController.value)||void 0===e?void 0:e.model}updateModelController(){const e=this.editor.getOption(105),t=this.editor.getOption(53);this.activeController.value=void 0,this.activeController.value=this.editor.hasModel()&&(e.preview||t.enabled||this.triggeredExplicitly)?this.instantiationService.createInstance(Le,this.editor):void 0}shouldShowHoverAt(e){var t;return(null===(t=this.activeModel)||void 0===t?void 0:t.shouldShowHoverAt(e))||!1}shouldShowHoverAtViewZone(e){var t,n;return(null===(n=null===(t=this.activeController.value)||void 0===t?void 0:t.widget)||void 0===n?void 0:n.shouldShowHoverAtViewZone(e))||!1}trigger(){var e;this.triggeredExplicitly=!0,this.activeController.value||this.updateModelController(),null===(e=this.activeModel)||void 0===e||e.triggerInlineCompletion()}commit(){var e;null===(e=this.activeModel)||void 0===e||e.commitInlineCompletion()}hide(){var e;null===(e=this.activeModel)||void 0===e||e.hideInlineCompletion()}showNextInlineCompletion(){var e;null===(e=this.activeModel)||void 0===e||e.showNextInlineCompletion()}showPreviousInlineCompletion(){var e;null===(e=this.activeModel)||void 0===e||e.showPreviousInlineCompletion()}hasMultipleInlineCompletions(){var e;return Se(this,void 0,void 0,(function*(){const t=yield null===(e=this.activeModel)||void 0===e?void 0:e.hasMultipleInlineCompletions();return void 0!==t&&t}))}};xe.inlineSuggestionVisible=new B.uy("inlineSuggestionVisible",!1,K.N("inlineSuggestionVisible","Whether an inline suggestion is visible")),xe.inlineSuggestionHasIndentation=new B.uy("inlineSuggestionHasIndentation",!1,K.N("inlineSuggestionHasIndentation","Whether the inline suggestion starts with whitespace")),xe.ID="editor.contrib.ghostTextController",xe=ye([Ae(1,P.TG)],xe);class ke{constructor(e){this.contextKeyService=e,this.inlineCompletionVisible=xe.inlineSuggestionVisible.bindTo(this.contextKeyService),this.inlineCompletionSuggestsIndentation=xe.inlineSuggestionHasIndentation.bindTo(this.contextKeyService)}}let Le=class extends i.JT{constructor(e,t,n){super(),this.editor=e,this.instantiationService=t,this.contextKeyService=n,this.contextKeys=new ke(this.contextKeyService),this.model=this._register(this.instantiationService.createInstance(we,this.editor)),this.widget=this._register(this.instantiationService.createInstance(V,this.editor,this.model)),this._register((0,i.OF)((()=>{this.contextKeys.inlineCompletionVisible.set(!1),this.contextKeys.inlineCompletionSuggestsIndentation.set(!1)}))),this._register(this.model.onDidChange((()=>{this.updateContextKeys()}))),this.updateContextKeys()}updateContextKeys(){var e;this.contextKeys.inlineCompletionVisible.set(void 0!==(null===(e=this.model.activeInlineCompletionsModel)||void 0===e?void 0:e.ghostText));const t=this.model.inlineCompletionsModel.ghostText;if(t&&t.parts.length>0){const{column:e,lines:n}=t.parts[0],i=n[0].startsWith(" ")||n[0].startsWith("\t"),o=e<=this.editor.getModel().getLineIndentColumn(t.lineNumber);this.contextKeys.inlineCompletionSuggestsIndentation.set(!!this.model.activeInlineCompletionsModel&&i&&o)}else this.contextKeys.inlineCompletionSuggestsIndentation.set(!1)}};Le=ye([Ae(1,P.TG),Ae(2,B.i6)],Le);const Ee=o._l.bindToContribution(xe.get),Ne=new Ee({id:"editor.action.inlineSuggest.commit",precondition:B.Ao.and(xe.inlineSuggestionVisible,xe.inlineSuggestionHasIndentation.toNegated(),r.u.tabMovesFocus.toNegated()),kbOpts:{weight:200,primary:2},handler(e){e.commit(),e.editor.focus()}});(0,o.fK)(Ne),(0,o.fK)(new Ee({id:"editor.action.inlineSuggest.hide",precondition:xe.inlineSuggestionVisible,kbOpts:{weight:100,primary:9},handler(e){e.hide()}}));class De extends o.R6{constructor(){super({id:De.ID,label:K.N("action.inlineSuggest.showNext","Show Next Inline Suggestion"),alias:"Show Next Inline Suggestion",precondition:B.Ao.and(r.u.writable,xe.inlineSuggestionVisible),kbOpts:{weight:100,primary:601}})}run(e,t){return Se(this,void 0,void 0,(function*(){const e=xe.get(t);e&&(e.showNextInlineCompletion(),t.focus())}))}}De.ID="editor.action.inlineSuggest.showNext";class Ie extends o.R6{constructor(){super({id:Ie.ID,label:K.N("action.inlineSuggest.showPrevious","Show Previous Inline Suggestion"),alias:"Show Previous Inline Suggestion",precondition:B.Ao.and(r.u.writable,xe.inlineSuggestionVisible),kbOpts:{weight:100,primary:599}})}run(e,t){return Se(this,void 0,void 0,(function*(){const e=xe.get(t);e&&(e.showPreviousInlineCompletion(),t.focus())}))}}Ie.ID="editor.action.inlineSuggest.showPrevious";class Me extends o.R6{constructor(){super({id:"editor.action.inlineSuggest.trigger",label:K.N("action.inlineSuggest.trigger","Trigger Inline Suggestion"),alias:"Trigger Inline Suggestion",precondition:r.u.writable})}run(e,t){return Se(this,void 0,void 0,(function*(){const e=xe.get(t);e&&e.trigger()}))}}(0,o._K)(xe.ID,xe),(0,o.Qr)(Me),(0,o.Qr)(De),(0,o.Qr)(Ie)},6307:(e,t,n)=>{"use strict";n.r(t),n.d(t,{AbstractCaseAction:()=>H,AbstractDeleteAllToBoundaryAction:()=>P,AbstractSortLinesAction:()=>E,DeleteAllLeftAction:()=>F,DeleteAllRightAction:()=>W,DeleteLinesAction:()=>M,DuplicateSelectionAction:()=>k,IndentLinesAction:()=>T,InsertLineAfterAction:()=>B,InsertLineBeforeAction:()=>O,JoinLinesAction:()=>z,LowerCaseAction:()=>$,SnakeCaseAction:()=>K,SortLinesAscendingAction:()=>N,SortLinesDescendingAction:()=>D,TitleCaseAction:()=>U,TransposeAction:()=>V,TrimTrailingWhitespaceAction:()=>I,UpperCaseAction:()=>j});var i=n(3580),o=n(2258),r=n(8728),s=n(6830),a=n(1329),l=n(7295),d=n(9386),c=n(4314);class h{constructor(e,t){this._selection=e,this._cursors=t,this._selectionId=null}getEditOperations(e,t){let n=function(e,t){t.sort(((e,t)=>e.lineNumber===t.lineNumber?e.column-t.column:e.lineNumber-t.lineNumber));for(let e=t.length-2;e>=0;e--)t[e].lineNumber===t[e+1].lineNumber&&t.splice(e,1);let n=[],i=0,o=0,r=t.length;for(let s=1,a=e.getLineCount();s<=a;s++){let a=e.getLineContent(s),h=a.length+1,u=0;if(oe.getLineTokens(t),getLanguageIdentifier:()=>e.getLanguageIdentifier(),getLanguageIdAtPosition:(t,n)=>e.getLanguageIdAtPosition(t,n),getLineContent:null};if(i.startLineNumber===i.endLineNumber&&1===e.getLineMaxColumn(i.startLineNumber)){let n=i.startLineNumber,o=this._isMovingDown?n+1:n-1;1===e.getLineMaxColumn(o)?t.addEditOperation(new c.e(1,1,1,1),null):(t.addEditOperation(new c.e(n,1,n,1),e.getLineContent(o)),t.addEditOperation(new c.e(o,1,o,e.getLineMaxColumn(o)),null)),i=new p.Y(o,1,o,1)}else{let n,r;if(this._isMovingDown){n=i.endLineNumber+1,r=e.getLineContent(n),t.addEditOperation(new c.e(n-1,e.getLineMaxColumn(n-1),n,e.getLineMaxColumn(n)),null);let h=r;if(this.shouldAutoIndent(e,i)){let u=this.matchEnterRule(e,a,o,n,i.startLineNumber-1);if(null!==u){let t=l.V8(e.getLineContent(n)),i=u+v.Y(t,o),a=v.J(i,o,s);h=a+this.trimLeft(r)}else{d.getLineContent=t=>t===i.startLineNumber?e.getLineContent(n):e.getLineContent(t);let t=C.zu.getGoodIndentForLine(this._autoIndent,d,e.getLanguageIdAtPosition(n,1),i.startLineNumber,a);if(null!==t){let i=l.V8(e.getLineContent(n)),a=v.Y(t,o);if(a!==v.Y(i,o)){let e=v.J(a,o,s);h=e+this.trimLeft(r)}}}t.addEditOperation(new c.e(i.startLineNumber,1,i.startLineNumber,1),h+"\n");let g=this.matchEnterRuleMovingDown(e,a,o,i.startLineNumber,n,h);if(null!==g)0!==g&&this.getIndentEditsOfMovingBlock(e,t,i,o,s,g);else{d.getLineContent=t=>t===i.startLineNumber?h:t>=i.startLineNumber+1&&t<=i.endLineNumber+1?e.getLineContent(t-1):e.getLineContent(t);let r=C.zu.getGoodIndentForLine(this._autoIndent,d,e.getLanguageIdAtPosition(n,1),i.startLineNumber+1,a);if(null!==r){const n=l.V8(e.getLineContent(i.startLineNumber)),a=v.Y(r,o),d=v.Y(n,o);if(a!==d){const n=a-d;this.getIndentEditsOfMovingBlock(e,t,i,o,s,n)}}}}else t.addEditOperation(new c.e(i.startLineNumber,1,i.startLineNumber,1),h+"\n")}else if(n=i.startLineNumber-1,r=e.getLineContent(n),t.addEditOperation(new c.e(n,1,n+1,1),null),t.addEditOperation(new c.e(i.endLineNumber,e.getLineMaxColumn(i.endLineNumber),i.endLineNumber,e.getLineMaxColumn(i.endLineNumber)),"\n"+r),this.shouldAutoIndent(e,i)){d.getLineContent=t=>t===n?e.getLineContent(i.startLineNumber):e.getLineContent(t);let r=this.matchEnterRule(e,a,o,i.startLineNumber,i.startLineNumber-2);if(null!==r)0!==r&&this.getIndentEditsOfMovingBlock(e,t,i,o,s,r);else{let r=C.zu.getGoodIndentForLine(this._autoIndent,d,e.getLanguageIdAtPosition(i.startLineNumber,1),n,a);if(null!==r){let n=l.V8(e.getLineContent(i.startLineNumber)),a=v.Y(r,o),d=v.Y(n,o);if(a!==d){let n=a-d;this.getIndentEditsOfMovingBlock(e,t,i,o,s,n)}}}}}this._selectionId=t.trackSelection(i)}buildIndentConverter(e,t,n){return{shiftIndent:i=>_.U.shiftIndent(i,i.length+1,e,t,n),unshiftIndent:i=>_.U.unshiftIndent(i,i.length+1,e,t,n)}}parseEnterResult(e,t,n,i,o){if(o){let r=o.indentation;o.indentAction===b.wU.None||o.indentAction===b.wU.Indent?r=o.indentation+o.appendText:o.indentAction===b.wU.IndentOutdent?r=o.indentation:o.indentAction===b.wU.Outdent&&(r=t.unshiftIndent(o.indentation)+o.appendText);let s=e.getLineContent(i);if(this.trimLeft(s).indexOf(this.trimLeft(r))>=0){let o=l.V8(e.getLineContent(i)),s=l.V8(r),a=C.zu.getIndentMetadata(e,i);return null!==a&&2&a&&(s=t.unshiftIndent(s)),v.Y(s,n)-v.Y(o,n)}}return null}matchEnterRuleMovingDown(e,t,n,i,o,r){if(l.ow(r)>=0){let r=e.getLineMaxColumn(o),s=C.zu.getEnterAction(this._autoIndent,e,new c.e(o,r,o,r));return this.parseEnterResult(e,t,n,i,s)}{let o=i-1;for(;o>=1;){let t=e.getLineContent(o);if(l.ow(t)>=0)break;o--}if(o<1||i>e.getLineCount())return null;let r=e.getLineMaxColumn(o),s=C.zu.getEnterAction(this._autoIndent,e,new c.e(o,r,o,r));return this.parseEnterResult(e,t,n,i,s)}}matchEnterRule(e,t,n,i,o,r){let s=o;for(;s>=1;){let t;if(t=s===o&&void 0!==r?r:e.getLineContent(s),l.ow(t)>=0)break;s--}if(s<1||i>e.getLineCount())return null;let a=e.getLineMaxColumn(s),d=C.zu.getEnterAction(this._autoIndent,e,new c.e(s,a,s,a));return this.parseEnterResult(e,t,n,i,d)}trimLeft(e){return e.replace(/^\s+/,"")}shouldAutoIndent(e,t){if(this._autoIndent<4)return!1;if(!e.isCheapToTokenize(t.startLineNumber))return!1;let n=e.getLanguageIdAtPosition(t.startLineNumber,1);return n===e.getLanguageIdAtPosition(t.endLineNumber,1)&&null!==C.zu.getIndentRulesSupport(n)}getIndentEditsOfMovingBlock(e,t,n,i,o,r){for(let s=n.startLineNumber;s<=n.endLineNumber;s++){let a=e.getLineContent(s),d=l.V8(a),h=v.Y(d,i)+r,u=v.J(h,i,o);u!==d&&(t.addEditOperation(new c.e(s,1,s,d.length+1),u),s===n.endLineNumber&&n.endColumn<=d.length+1&&""===u&&(this._moveEndLineSelectionShrink=!0))}}computeCursorState(e,t){let n=t.getTrackedSelection(this._selectionId);return this._moveEndPositionDown&&(n=n.setEndPosition(n.endLineNumber+1,1)),this._moveEndLineSelectionShrink&&n.startLineNumber=o)return null;let r=[];for(let t=i;t<=o;t++)r.push(e.getLineContent(t));let s=r.slice(0);return s.sort(y.getCollator().compare),!0===n&&(s=s.reverse()),{startLineNumber:i,endLineNumber:o,before:r,after:s}}y._COLLATOR=null;var S=n(4144);class x extends s.R6{constructor(e,t){super(t),this.down=e}run(e,t){if(!t.hasModel())return;const n=t.getSelections().map(((e,t)=>({selection:e,index:t,ignore:!1})));n.sort(((e,t)=>c.e.compareRangesUsingStarts(e.selection,t.selection)));let i=n[0];for(let e=1;enew g.L(e.positionLineNumber,e.positionColumn))));let o=t.getSelection();if(null===o)return;let r=new h(o,i);t.pushUndoStop(),t.executeCommands(this.id,[r]),t.pushUndoStop()}}I.ID="editor.action.trimTrailingWhitespace";class M extends s.R6{constructor(){super({id:"editor.action.deleteLines",label:i.N("lines.delete","Delete Line"),alias:"Delete Line",precondition:m.u.writable,kbOpts:{kbExpr:m.u.textInputFocus,primary:3113,weight:100}})}run(e,t){if(!t.hasModel())return;let n=this._getLinesToRemove(t),i=t.getModel();if(1===i.getLineCount()&&1===i.getLineMaxColumn(1))return;let o=0,r=[],s=[];for(let e=0,t=n.length;e1&&(a-=1,c=i.getLineMaxColumn(a)),r.push(d.h.replace(new p.Y(a,c,l,h),"")),s.push(new p.Y(a-o,t.positionColumn,a-o,t.positionColumn)),o+=t.endLineNumber-t.startLineNumber+1}t.pushUndoStop(),t.executeEdits(this.id,r,s),t.pushUndoStop()}_getLinesToRemove(e){let t=e.getSelections().map((e=>{let t=e.endLineNumber;return e.startLineNumbere.startLineNumber===t.startLineNumber?e.endLineNumber-t.endLineNumber:e.startLineNumber-t.startLineNumber));let n=[],i=t[0];for(let e=1;e=t[e].startLineNumber?i.endLineNumber=t[e].endLineNumber:(n.push(i),i=t[e]);return n.push(i),n}}class T extends s.R6{constructor(){super({id:"editor.action.indentLines",label:i.N("lines.indent","Indent Line"),alias:"Indent Line",precondition:m.u.writable,kbOpts:{kbExpr:m.u.editorTextFocus,primary:2137,weight:100}})}run(e,t){const n=t._getViewModel();n&&(t.pushUndoStop(),t.executeCommands(this.id,u.u.indent(n.cursorConfig,t.getModel(),t.getSelections())),t.pushUndoStop())}}class R extends s.R6{constructor(){super({id:"editor.action.outdentLines",label:i.N("lines.outdent","Outdent Line"),alias:"Outdent Line",precondition:m.u.writable,kbOpts:{kbExpr:m.u.editorTextFocus,primary:2135,weight:100}})}run(e,t){r.CoreEditingCommands.Outdent.runEditorCommand(e,t,null)}}class O extends s.R6{constructor(){super({id:"editor.action.insertLineBefore",label:i.N("lines.insertBefore","Insert Line Above"),alias:"Insert Line Above",precondition:m.u.writable,kbOpts:{kbExpr:m.u.editorTextFocus,primary:3075,weight:100}})}run(e,t){const n=t._getViewModel();n&&(t.pushUndoStop(),t.executeCommands(this.id,u.u.lineInsertBefore(n.cursorConfig,t.getModel(),t.getSelections())))}}class B extends s.R6{constructor(){super({id:"editor.action.insertLineAfter",label:i.N("lines.insertAfter","Insert Line Below"),alias:"Insert Line Below",precondition:m.u.writable,kbOpts:{kbExpr:m.u.editorTextFocus,primary:2051,weight:100}})}run(e,t){const n=t._getViewModel();n&&(t.pushUndoStop(),t.executeCommands(this.id,u.u.lineInsertAfter(n.cursorConfig,t.getModel(),t.getSelections())))}}class P extends s.R6{run(e,t){if(!t.hasModel())return;const n=t.getSelection();let i=this._getRangesToDelete(t),o=[];for(let e=0,t=i.length-1;ed.h.replace(e,"")));t.pushUndoStop(),t.executeEdits(this.id,s,r),t.pushUndoStop()}}class F extends P{constructor(){super({id:"deleteAllLeft",label:i.N("lines.deleteAllLeft","Delete All Left"),alias:"Delete All Left",precondition:m.u.writable,kbOpts:{kbExpr:m.u.textInputFocus,primary:0,mac:{primary:2049},weight:100}})}_getEndCursorState(e,t){let n=null,i=[],o=0;return t.forEach((t=>{let r;if(1===t.endColumn&&o>0){let e=t.startLineNumber-o;r=new p.Y(e,t.startColumn,e,t.startColumn)}else r=new p.Y(t.startLineNumber,t.startColumn,t.startLineNumber,t.startColumn);o+=t.endLineNumber-t.startLineNumber,t.intersectRanges(e)?n=r:i.push(r)})),n&&i.unshift(n),i}_getRangesToDelete(e){let t=e.getSelections();if(null===t)return[];let n=t,i=e.getModel();return null===i?[]:(n.sort(c.e.compareRangesUsingStarts),n=n.map((e=>{if(e.isEmpty()){if(1===e.startColumn){let t=Math.max(1,e.startLineNumber-1),n=1===e.startLineNumber?1:i.getLineContent(t).length+1;return new c.e(t,n,e.startLineNumber,1)}return new c.e(e.startLineNumber,1,e.startLineNumber,e.startColumn)}return new c.e(e.startLineNumber,1,e.endLineNumber,e.endColumn)})),n)}}class W extends P{constructor(){super({id:"deleteAllRight",label:i.N("lines.deleteAllRight","Delete All Right"),alias:"Delete All Right",precondition:m.u.writable,kbOpts:{kbExpr:m.u.textInputFocus,primary:0,mac:{primary:297,secondary:[2068]},weight:100}})}_getEndCursorState(e,t){let n=null,i=[];for(let o=0,r=t.length,s=0;o{if(e.isEmpty()){const n=t.getLineMaxColumn(e.startLineNumber);return e.startColumn===n?new c.e(e.startLineNumber,e.startColumn,e.startLineNumber+1,1):new c.e(e.startLineNumber,e.startColumn,e.startLineNumber,n)}return e}));return i.sort(c.e.compareRangesUsingStarts),i}}class z extends s.R6{constructor(){super({id:"editor.action.joinLines",label:i.N("lines.joinLines","Join Lines"),alias:"Join Lines",precondition:m.u.writable,kbOpts:{kbExpr:m.u.editorTextFocus,primary:0,mac:{primary:296},weight:100}})}run(e,t){let n=t.getSelections();if(null===n)return;let i=t.getSelection();if(null===i)return;n.sort(c.e.compareRangesUsingStarts);let o=[],r=n.reduce(((e,t)=>e.isEmpty()?e.endLineNumber===t.startLineNumber?(i.equalsSelection(e)&&(i=t),t):t.startLineNumber>e.endLineNumber+1?(o.push(e),t):new p.Y(e.startLineNumber,e.startColumn,t.endLineNumber,t.endColumn):t.startLineNumber>e.endLineNumber?(o.push(e),t):new p.Y(e.startLineNumber,e.startColumn,t.endLineNumber,t.endColumn)));o.push(r);let s=t.getModel();if(null===s)return;let a=[],l=[],h=i,u=0;for(let e=0,t=o.length;e=1){let e=!0;""===b&&(e=!1),!e||" "!==b.charAt(b.length-1)&&"\t"!==b.charAt(b.length-1)||(e=!1,b=b.replace(/[\s\uFEFF\xA0]+$/g," "));let i=t.substr(n-1);b+=(e?" ":"")+i,f=e?i.length+1:i.length}else f=0}let C=new c.e(g,m,t,n);if(!C.isEmpty()){let e;r.isEmpty()?(a.push(d.h.replace(C,b)),e=new p.Y(C.startLineNumber-u,b.length-f+1,g-u,b.length-f+1)):r.startLineNumber===r.endLineNumber?(a.push(d.h.replace(C,b)),e=new p.Y(r.startLineNumber-u,r.startColumn,r.endLineNumber-u,r.endColumn)):(a.push(d.h.replace(C,b)),e=new p.Y(r.startLineNumber-u,r.startColumn,r.startLineNumber-u,b.length-_)),null!==c.e.intersectRanges(C,i)?h=e:l.push(e)}u+=C.endLineNumber-C.startLineNumber}l.unshift(h),t.pushUndoStop(),t.executeEdits(this.id,a,l),t.pushUndoStop()}}class V extends s.R6{constructor(){super({id:"editor.action.transpose",label:i.N("editor.transpose","Transpose characters around the cursor"),alias:"Transpose characters around the cursor",precondition:m.u.writable})}run(e,t){let n=t.getSelections();if(null===n)return;let i=t.getModel();if(null===i)return;let o=[];for(let e=0,t=n.length;e=s){if(r.lineNumber===i.getLineCount())continue;let e=new c.e(r.lineNumber,Math.max(1,r.column-1),r.lineNumber+1,1),t=i.getValueInRange(e).split("").reverse().join("");o.push(new a.T4(new p.Y(r.lineNumber,Math.max(1,r.column-1),r.lineNumber+1,1),t))}else{let e=new c.e(r.lineNumber,Math.max(1,r.column-1),r.lineNumber,r.column+1),t=i.getValueInRange(e).split("").reverse().join("");o.push(new a.hP(e,t,new p.Y(r.lineNumber,r.column+1,r.lineNumber,r.column+1)))}}t.pushUndoStop(),t.executeCommands(this.id,o),t.pushUndoStop()}}class H extends s.R6{run(e,t){const n=t.getSelections();if(null===n)return;const i=t.getModel();if(null===i)return;const o=t.getOption(115),r=[];for(const e of n)if(e.isEmpty()){const n=e.getStartPosition(),s=t.getConfiguredWordAtPosition(n);if(!s)continue;const a=new c.e(n.lineNumber,s.startColumn,n.lineNumber,s.endColumn),l=i.getValueInRange(a);r.push(d.h.replace(a,this._modifyText(l,o)))}else{const t=i.getValueInRange(e);r.push(d.h.replace(e,this._modifyText(t,o)))}t.pushUndoStop(),t.executeEdits(this.id,r),t.pushUndoStop()}}class j extends H{constructor(){super({id:"editor.action.transformToUppercase",label:i.N("editor.transformToUppercase","Transform to Uppercase"),alias:"Transform to Uppercase",precondition:m.u.writable})}_modifyText(e,t){return e.toLocaleUpperCase()}}class $ extends H{constructor(){super({id:"editor.action.transformToLowercase",label:i.N("editor.transformToLowercase","Transform to Lowercase"),alias:"Transform to Lowercase",precondition:m.u.writable})}_modifyText(e,t){return e.toLocaleLowerCase()}}class U extends H{constructor(){super({id:"editor.action.transformToTitlecase",label:i.N("editor.transformToTitlecase","Transform to Title Case"),alias:"Transform to Title Case",precondition:m.u.writable})}_modifyText(e,t){const n=("\r\n\t "+t).split("");let i="",o=!0;for(let t=0;t=0?(o=!0,i+=r):o?(o=!1,i+=r.toLocaleUpperCase()):i+=r.toLocaleLowerCase()}return i}}class Z{constructor(e,t){this._pattern=e,this._flags=t,this._actual=null,this._evaluated=!1}get(){if(!this._evaluated){this._evaluated=!0;try{this._actual=new RegExp(this._pattern,this._flags)}catch(e){}}return this._actual}isSupported(){return null!==this.get()}}class K extends H{constructor(){super({id:"editor.action.transformToSnakecase",label:i.N("editor.transformToSnakecase","Transform to Snake Case"),alias:"Transform to Snake Case",precondition:m.u.writable})}_modifyText(e,t){const n=K.regExp1.get(),i=K.regExp2.get();return n&&i?e.replace(n,"$1_$2").replace(i,"$1_$2$3").toLocaleLowerCase():e}}K.regExp1=new Z("(\\p{Ll})(\\p{Lu})","gmu"),K.regExp2=new Z("(\\p{Lu}|\\p{N})(\\p{Lu})(\\p{Ll})","gmu"),(0,s.Qr)(class extends x{constructor(){super(!1,{id:"editor.action.copyLinesUpAction",label:i.N("lines.copyUp","Copy Line Up"),alias:"Copy Line Up",precondition:m.u.writable,kbOpts:{kbExpr:m.u.editorTextFocus,primary:1552,linux:{primary:3600},weight:100},menuOpts:{menuId:S.eH.MenubarSelectionMenu,group:"2_line",title:i.N({key:"miCopyLinesUp",comment:["&& denotes a mnemonic"]},"&&Copy Line Up"),order:1}})}}),(0,s.Qr)(class extends x{constructor(){super(!0,{id:"editor.action.copyLinesDownAction",label:i.N("lines.copyDown","Copy Line Down"),alias:"Copy Line Down",precondition:m.u.writable,kbOpts:{kbExpr:m.u.editorTextFocus,primary:1554,linux:{primary:3602},weight:100},menuOpts:{menuId:S.eH.MenubarSelectionMenu,group:"2_line",title:i.N({key:"miCopyLinesDown",comment:["&& denotes a mnemonic"]},"Co&&py Line Down"),order:2}})}}),(0,s.Qr)(k),(0,s.Qr)(class extends L{constructor(){super(!1,{id:"editor.action.moveLinesUpAction",label:i.N("lines.moveUp","Move Line Up"),alias:"Move Line Up",precondition:m.u.writable,kbOpts:{kbExpr:m.u.editorTextFocus,primary:528,linux:{primary:528},weight:100},menuOpts:{menuId:S.eH.MenubarSelectionMenu,group:"2_line",title:i.N({key:"miMoveLinesUp",comment:["&& denotes a mnemonic"]},"Mo&&ve Line Up"),order:3}})}}),(0,s.Qr)(class extends L{constructor(){super(!0,{id:"editor.action.moveLinesDownAction",label:i.N("lines.moveDown","Move Line Down"),alias:"Move Line Down",precondition:m.u.writable,kbOpts:{kbExpr:m.u.editorTextFocus,primary:530,linux:{primary:530},weight:100},menuOpts:{menuId:S.eH.MenubarSelectionMenu,group:"2_line",title:i.N({key:"miMoveLinesDown",comment:["&& denotes a mnemonic"]},"Move &&Line Down"),order:4}})}}),(0,s.Qr)(N),(0,s.Qr)(D),(0,s.Qr)(I),(0,s.Qr)(M),(0,s.Qr)(T),(0,s.Qr)(R),(0,s.Qr)(O),(0,s.Qr)(B),(0,s.Qr)(F),(0,s.Qr)(W),(0,s.Qr)(z),(0,s.Qr)(V),(0,s.Qr)(j),(0,s.Qr)($),(0,s.Qr)(U),K.regExp1.isSupported()&&K.regExp2.isSupported()&&(0,s.Qr)(K)},674:(e,t,n)=>{"use strict";n.r(t),n.d(t,{CONTEXT_ONTYPE_RENAME_INPUT_VISIBLE:()=>S,LinkedEditingContribution:()=>k,LinkedEditingAction:()=>N,editorLinkedEditingBackground:()=>M});var i=n(3580),o=n(6830),r=n(9488),s=n(5976),a=n(187),l=n(1050),d=n(4314),c=n(4101),h=n(5393),u=n(3103),g=n(8819),p=n(9102),m=n(666),f=n(1640),_=n(7301),b=n(7295),C=n(3910),v=n(7781),w=n(1264),y=n(3831),A=function(e,t,n,i){return new(n||(n=Promise))((function(o,r){function s(e){try{l(i.next(e))}catch(e){r(e)}}function a(e){try{l(i.throw(e))}catch(e){r(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,a)}l((i=i.apply(e,t||[])).next())}))};const S=new g.uy("LinkedEditingInputVisible",!1),x="linked-editing-decoration";let k=class e extends s.JT{constructor(e,t){super(),this._debounceDuration=200,this._localToDispose=this._register(new s.SL),this._editor=e,this._enabled=!1,this._visibleContextKey=S.bindTo(t),this._currentDecorations=[],this._languageWordPattern=null,this._currentWordPattern=null,this._ignoreChangeEvent=!1,this._localToDispose=this._register(new s.SL),this._rangeUpdateTriggerPromise=null,this._rangeSyncTriggerPromise=null,this._currentRequest=null,this._currentRequestPosition=null,this._currentRequestModelVersion=null,this._register(this._editor.onDidChangeModel((()=>this.reinitialize(!0)))),this._register(this._editor.onDidChangeConfiguration((e=>{(e.hasChanged(60)||e.hasChanged(80))&&this.reinitialize(!1)}))),this._register(c.id.onDidChange((()=>this.reinitialize(!1)))),this._register(this._editor.onDidChangeModelLanguage((()=>this.reinitialize(!0)))),this.reinitialize(!0)}static get(t){return t.getContribution(e.ID)}reinitialize(e){const t=this._editor.getModel(),n=null!==t&&(this._editor.getOption(60)||this._editor.getOption(80))&&c.id.has(t);if(n===this._enabled&&!e)return;if(this._enabled=n,this.clearRanges(),this._localToDispose.clear(),!n||null===t)return;this._languageWordPattern=y.zu.getWordDefinition(t.getLanguageIdentifier().id),this._localToDispose.add(t.onDidChangeLanguageConfiguration((()=>{this._languageWordPattern=y.zu.getWordDefinition(t.getLanguageIdentifier().id)})));const i=new h.vp(this._debounceDuration),o=()=>{this._rangeUpdateTriggerPromise=i.trigger((()=>this.updateRanges()),this._debounceDuration)},r=new h.vp(0),s=e=>{this._rangeSyncTriggerPromise=r.trigger((()=>this._syncRanges(e)))};this._localToDispose.add(this._editor.onDidChangeCursorPosition((()=>{o()}))),this._localToDispose.add(this._editor.onDidChangeModelContent((e=>{if(!this._ignoreChangeEvent&&this._currentDecorations.length>0){const n=t.getDecorationRange(this._currentDecorations[0]);if(n&&e.changes.every((e=>n.intersectRanges(e.range))))return void s(this._currentDecorations)}o()}))),this._localToDispose.add({dispose:()=>{i.cancel(),r.cancel()}}),this.updateRanges()}_syncRanges(e){if(!this._editor.hasModel()||e!==this._currentDecorations||0===e.length)return;const t=this._editor.getModel(),n=t.getDecorationRange(e[0]);if(!n||n.startLineNumber!==n.endLineNumber)return this.clearRanges();const i=t.getValueInRange(n);if(this._currentWordPattern){const e=i.match(this._currentWordPattern);if((e?e[0].length:0)!==i.length)return this.clearRanges()}let o=[];for(let n=1,r=e.length;n1)return void this.clearRanges();const i=this._editor.getModel(),o=i.getVersionId();if(this._currentRequestPosition&&this._currentRequestModelVersion===o){if(n.equals(this._currentRequestPosition))return;if(this._currentDecorations&&this._currentDecorations.length>0){const e=i.getDecorationRange(this._currentDecorations[0]);if(e&&e.containsPosition(n))return}}this._currentRequestPosition=n,this._currentRequestModelVersion=o;const r=(0,h.PG)((t=>A(this,void 0,void 0,(function*(){try{const s=yield I(i,n,t);if(r!==this._currentRequest)return;if(this._currentRequest=null,o!==i.getVersionId())return;let a=[];(null==s?void 0:s.ranges)&&(a=s.ranges),this._currentWordPattern=(null==s?void 0:s.wordPattern)||this._languageWordPattern;let l=!1;for(let e=0,t=a.length;e({range:t,options:e.DECORATION})));this._visibleContextKey.set(!0),this._currentDecorations=this._editor.deltaDecorations(this._currentDecorations,c)}catch(e){(0,_.VV)(e)||(0,_.dL)(e),this._currentRequest!==r&&this._currentRequest||this.clearRanges()}}))));return this._currentRequest=r,r}))}};var L,E;k.ID="editor.contrib.linkedEditing",k.DECORATION=u.qx.register({description:"linked-editing",stickiness:0,className:x}),k=function(e,t,n,i){var o,r=arguments.length,s=r<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,i);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,n,s):o(t,n))||s);return r>3&&s&&Object.defineProperty(t,n,s),s}([(L=1,E=g.i6,function(e,t){E(e,t,L)})],k);class N extends o.R6{constructor(){super({id:"editor.action.linkedEditing",label:i.N("linkedEditing.label","Start Linked Editing"),alias:"Start Linked Editing",precondition:g.Ao.and(p.u.writable,p.u.hasRenameProvider),kbOpts:{kbExpr:p.u.editorTextFocus,primary:3132,weight:100}})}runCommand(e,t){const n=e.get(f.$),[i,o]=Array.isArray(t)&&t||[void 0,void 0];return m.o.isUri(i)&&a.L.isIPosition(o)?n.openCodeEditor({resource:i},n.getActiveCodeEditor()).then((e=>{e&&(e.setPosition(o),e.invokeWithinContext((t=>(this.reportTelemetry(t,e),this.run(t,e)))))}),_.dL):super.runCommand(e,t)}run(e,t){const n=k.get(t);return n?Promise.resolve(n.updateRanges(!0)):Promise.resolve()}}const D=o._l.bindToContribution(k.get);function I(e,t,n){const i=c.id.ordered(e);return(0,h.Ps)(i.map((i=>()=>A(this,void 0,void 0,(function*(){try{return yield i.provideLinkedEditingRanges(e,t,n)}catch(e){return void(0,_.Cp)(e)}})))),(e=>!!e&&r.Of(null==e?void 0:e.ranges)))}(0,o.fK)(new D({id:"cancelLinkedEditingInput",precondition:S,handler:e=>e.clearRanges(),kbOpts:{kbExpr:p.u.editorTextFocus,weight:199,primary:9,secondary:[1033]}}));const M=(0,C.P6)("editor.linkedEditingBackground",{dark:w.Il.fromHex("#f00").transparent(.3),light:w.Il.fromHex("#f00").transparent(.3),hc:w.Il.fromHex("#f00").transparent(.3)},i.N("editorLinkedEditingBackground","Background color when the editor auto renames on type."));(0,v.Ic)(((e,t)=>{const n=e.getColor(M);n&&t.addRule(`.monaco-editor .${x} { background: ${n}; border-left-color: ${n}; }`)})),(0,o.sb)("_executeLinkedEditingProvider",((e,t)=>I(e,t,l.T.None))),(0,o._K)(k.ID,k),(0,o.Qr)(N)},370:(e,t,n)=>{"use strict";n.r(t),n.d(t,{LinkDetector:()=>K});var i=n(3379),o=n.n(i),r=n(7795),s=n.n(r),a=n(569),l=n.n(a),d=n(3565),c=n.n(d),h=n(9216),u=n.n(h),g=n(4589),p=n.n(g),m=n(7854),f={};f.styleTagTransform=p(),f.setAttributes=c(),f.insert=l().bind(null,"head"),f.domAPI=s(),f.insertStyleElement=u(),o()(m.Z,f),m.Z&&m.Z.locals&&m.Z.locals;var _=n(3580),b=n(5393),C=n(1050),v=n(7301),w=n(9365),y=n(5976),A=n(1432),S=n(6830),x=n(3103),k=n(4101),L=n(9241),E=n(666),N=n(4314),D=n(1200),I=n(4565),M=n(9488),T=n(8401),R=function(e,t,n,i){return new(n||(n=Promise))((function(o,r){function s(e){try{l(i.next(e))}catch(e){r(e)}}function a(e){try{l(i.throw(e))}catch(e){r(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,a)}l((i=i.apply(e,t||[])).next())}))};class O{constructor(e,t){this._link=e,this._provider=t}toJSON(){return{range:this.range,url:this.url,tooltip:this.tooltip}}get range(){return this._link.range}get url(){return this._link.url}get tooltip(){return this._link.tooltip}resolve(e){return R(this,void 0,void 0,(function*(){return this._link.url?this._link.url:"function"==typeof this._provider.resolveLink?Promise.resolve(this._provider.resolveLink(this._link,e)).then((t=>(this._link=t||this._link,this._link.url?this.resolve(e):Promise.reject(new Error("missing"))))):Promise.reject(new Error("missing"))}))}}class B{constructor(e){this._disposables=new y.SL;let t=[];for(const[n,i]of e){const e=n.links.map((e=>new O(e,i)));t=B._union(t,e),(0,y.Wf)(n)&&this._disposables.add(n)}this.links=t}dispose(){this._disposables.dispose(),this.links.length=0}static _union(e,t){let n,i,o,r,s=[];for(n=0,o=0,i=e.length,r=t.length;nPromise.resolve(i.provideLinks(e,t)).then((e=>{e&&(n[o]=[e,i])}),v.Cp)));return Promise.all(i).then((()=>{const e=new B((0,M.kX)(n));return t.isCancellationRequested?(e.dispose(),new B([])):e}))}I.P.registerCommand("_executeLinkProvider",((e,...t)=>R(void 0,void 0,void 0,(function*(){let[n,i]=t;(0,T.p_)(n instanceof E.o),"number"!=typeof i&&(i=0);const o=e.get(D.q).getModel(n);if(!o)return[];const r=yield P(o,C.T.None);if(!r)return[];for(let e=0;e{this._onEditorMouseMove(e,t)}))),this.listenersToRemove.add(i.onExecute((e=>{this.onEditorMouseUp(e)}))),this.listenersToRemove.add(i.onCancel((e=>{this.cleanUpActiveLinkDecoration()}))),this.enabled=e.getOption(61),this.listenersToRemove.add(e.onDidChangeConfiguration((t=>{const n=e.getOption(61);this.enabled!==n&&(this.enabled=n,this.updateDecorations([]),this.stop(),this.beginCompute())}))),this.listenersToRemove.add(e.onDidChangeModelContent((e=>this.onChange()))),this.listenersToRemove.add(e.onDidChangeModel((e=>this.onModelChanged()))),this.listenersToRemove.add(e.onDidChangeModelLanguage((e=>this.onModelModeChanged()))),this.listenersToRemove.add(k.pM.onDidChange((e=>this.onModelModeChanged()))),this.timeout=new b._F,this.computePromise=null,this.activeLinksList=null,this.currentOccurrences={},this.activeLinkDecorationId=null,this.beginCompute()}static get(t){return t.getContribution(e.ID)}onModelChanged(){this.currentOccurrences={},this.activeLinkDecorationId=null,this.stop(),this.beginCompute()}onModelModeChanged(){this.stop(),this.beginCompute()}onChange(){this.timeout.setIfNotSet((()=>this.beginCompute()),e.RECOMPUTE_TIME)}beginCompute(){return e=this,t=void 0,i=function*(){if(!this.editor.hasModel()||!this.enabled)return;const e=this.editor.getModel();if(k.pM.has(e)){this.activeLinksList&&(this.activeLinksList.dispose(),this.activeLinksList=null),this.computePromise=b.PG((t=>P(e,t)));try{this.activeLinksList=yield this.computePromise,this.updateDecorations(this.activeLinksList.links)}catch(e){(0,v.dL)(e)}finally{this.computePromise=null}}},new((n=void 0)||(n=Promise))((function(o,r){function s(e){try{l(i.next(e))}catch(e){r(e)}}function a(e){try{l(i.throw(e))}catch(e){r(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,a)}l((i=i.apply(e,t||[])).next())}));var e,t,n,i}updateDecorations(e){const t="altKey"===this.editor.getOption(68);let n=[],i=Object.keys(this.currentOccurrences);for(let e=0,t=i.length;e{t.activate(e,n),this.activeLinkDecorationId=t.decorationId}))}else this.cleanUpActiveLinkDecoration()}cleanUpActiveLinkDecoration(){const e="altKey"===this.editor.getOption(68);if(this.activeLinkDecorationId){const t=this.currentOccurrences[this.activeLinkDecorationId];t&&this.editor.changeDecorations((n=>{t.deactivate(n,e)})),this.activeLinkDecorationId=null}}onEditorMouseUp(e){if(!this.isEnabled(e))return;const t=this.getLinkOccurrence(e.target.position);t&&this.openLinkOccurrence(t,e.hasSideBySideModifier,!0)}openLinkOccurrence(e,t,n=!1){if(!this.openerService)return;const{link:i}=e;i.resolve(C.T.None).then((e=>{if("string"==typeof e&&this.editor.hasModel()){const t=this.editor.getModel().uri;if(t.scheme===H.lg.file&&e.startsWith(`${H.lg.file}:`)){const n=E.o.parse(e);if(n.scheme===H.lg.file){const i=j.z_(n);let o=null;i.startsWith("/./")?o=`.${i.substr(1)}`:i.startsWith("//./")&&(o=`.${i.substr(2)}`),o&&(e=j.Vo(t,o))}}}return this.openerService.open(e,{openToSide:t,fromUserGesture:n,allowContributedOpeners:!0,allowCommands:!0})}),(e=>{const t=e instanceof Error?e.message:e;"invalid"===t?this.notificationService.warn(_.N("invalid.url","Failed to open this link because it is not well-formed: {0}",i.url.toString())):"missing"===t?this.notificationService.warn(_.N("missing.url","Failed to open this link because its target is missing.")):(0,v.dL)(e)}))}getLinkOccurrence(e){if(!this.editor.hasModel()||!e)return null;const t=this.editor.getModel().getDecorationsInRange({startLineNumber:e.lineNumber,startColumn:e.column,endLineNumber:e.lineNumber,endColumn:e.column},0,!0);for(const e of t){const t=this.currentOccurrences[e.id];if(t)return t}return null}isEnabled(e,t){return Boolean(6===e.target.type&&(e.hasTriggerModifier||t&&t.keyCodeIsTriggerKey))}stop(){var e;this.timeout.cancel(),this.activeLinksList&&(null===(e=this.activeLinksList)||void 0===e||e.dispose(),this.activeLinksList=null),this.computePromise&&(this.computePromise.cancel(),this.computePromise=null)}dispose(){this.listenersToRemove.dispose(),this.stop(),this.timeout.dispose()}};K.ID="editor.linkDetector",K.RECOMPUTE_TIME=1e3,K=function(e,t,n,i){var o,r=arguments.length,s=r<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,i);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,n,s):o(t,n))||s);return r>3&&s&&Object.defineProperty(t,n,s),s}([$(1,W.v4),$(2,F.lT)],K);class q extends S.R6{constructor(){super({id:"editor.action.openLink",label:_.N("label","Open Link"),alias:"Open Link",precondition:void 0})}run(e,t){let n=K.get(t);if(!n)return;if(!t.hasModel())return;let i=t.getSelections();for(let e of i){let t=n.getLinkOccurrence(e.getEndPosition());t&&n.openLinkOccurrence(t,!1)}}}(0,S._K)(K.ID,K),(0,S.Qr)(q),(0,V.Ic)(((e,t)=>{const n=e.getColor(z._Y);n&&t.addRule(`.monaco-editor .detected-link-active { color: ${n} !important; }`)}))},845:(e,t,n)=>{"use strict";n.d(t,{O:()=>L});var i=n(3379),o=n.n(i),r=n(7795),s=n.n(r),a=n(569),l=n.n(a),d=n(3565),c=n.n(d),h=n(9216),u=n.n(h),g=n(4589),p=n.n(g),m=n(1356),f={};f.styleTagTransform=p(),f.setAttributes=c(),f.insert=l().bind(null,"head"),f.domAPI=s(),f.insertStyleElement=u(),o()(m.Z,f),m.Z&&m.Z.locals&&m.Z.locals;var _=n(3580),b=n(5393),C=n(5976),v=n(6346),w=n(4314),y=n(6830),A=n(8819),S=n(7781),x=n(3910),k=n(2321);let L=class e{constructor(t,n){this._messageWidget=new C.XK,this._messageListeners=new C.SL,this._editor=t,this._visible=e.MESSAGE_VISIBLE.bindTo(n),this._editorListener=this._editor.onDidAttemptReadOnlyEdit((()=>this._onDidAttemptReadOnlyEdit()))}static get(t){return t.getContribution(e.ID)}dispose(){this._editorListener.dispose(),this._messageListeners.dispose(),this._messageWidget.dispose(),this._visible.reset()}showMessage(e,t){let n;(0,v.Z9)(e),this._visible.set(!0),this._messageWidget.clear(),this._messageListeners.clear(),this._messageWidget.value=new I(this._editor,t,e),this._messageListeners.add(this._editor.onDidBlurEditorText((()=>this.closeMessage()))),this._messageListeners.add(this._editor.onDidChangeCursorPosition((()=>this.closeMessage()))),this._messageListeners.add(this._editor.onDidDispose((()=>this.closeMessage()))),this._messageListeners.add(this._editor.onDidChangeModel((()=>this.closeMessage()))),this._messageListeners.add(new b._F((()=>this.closeMessage()),3e3)),this._messageListeners.add(this._editor.onMouseMove((e=>{e.target.position&&(n?n.containsPosition(e.target.position)||this.closeMessage():n=new w.e(t.lineNumber-3,1,e.target.position.lineNumber+3,1))})))}closeMessage(){this._visible.reset(),this._messageListeners.clear(),this._messageWidget.value&&this._messageListeners.add(I.fadeOut(this._messageWidget.value))}_onDidAttemptReadOnlyEdit(){this._editor.hasModel()&&this.showMessage(_.N("editor.readonly","Cannot edit in read-only editor"),this._editor.getPosition())}};var E,N;L.ID="editor.contrib.messageController",L.MESSAGE_VISIBLE=new A.uy("messageVisible",!1,_.N("messageVisible","Whether the editor is currently showing an inline message")),L=function(e,t,n,i){var o,r=arguments.length,s=r<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,i);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,n,s):o(t,n))||s);return r>3&&s&&Object.defineProperty(t,n,s),s}([(E=1,N=A.i6,function(e,t){N(e,t,E)})],L);const D=y._l.bindToContribution(L.get);(0,y.fK)(new D({id:"leaveEditorMessage",precondition:L.MESSAGE_VISIBLE,handler:e=>e.closeMessage(),kbOpts:{weight:130,primary:9}}));class I{constructor(e,{lineNumber:t,column:n},i){this.allowEditorOverflow=!0,this.suppressMouseDown=!1,this._editor=e,this._editor.revealLinesInCenterIfOutsideViewport(t,t,0),this._position={lineNumber:t,column:n-1},this._domNode=document.createElement("div"),this._domNode.classList.add("monaco-editor-overlaymessage");const o=document.createElement("div");o.classList.add("anchor","top"),this._domNode.appendChild(o);const r=document.createElement("div");r.classList.add("message"),r.textContent=i,this._domNode.appendChild(r);const s=document.createElement("div");s.classList.add("anchor","below"),this._domNode.appendChild(s),this._editor.addContentWidget(this),this._domNode.classList.add("fadeIn")}static fadeOut(e){let t;const n=()=>{e.dispose(),clearTimeout(t),e.getDomNode().removeEventListener("animationend",n)};return t=setTimeout(n,110),e.getDomNode().addEventListener("animationend",n),e.getDomNode().classList.add("fadeOut"),{dispose:n}}dispose(){this._editor.removeContentWidget(this)}getId(){return"messageoverlay"}getDomNode(){return this._domNode}getPosition(){return{position:this._position,preference:[1,2]}}afterRender(e){this._domNode.classList.toggle("below",2===e)}}(0,y._K)(L.ID,L),(0,S.Ic)(((e,t)=>{const n=e.getColor(x.EP);if(n){let i=e.type===k.e.HIGH_CONTRAST?2:1;t.addRule(`.monaco-editor .monaco-editor-overlaymessage .anchor.below { border-top-color: ${n}; }`),t.addRule(`.monaco-editor .monaco-editor-overlaymessage .anchor.top { border-bottom-color: ${n}; }`),t.addRule(`.monaco-editor .monaco-editor-overlaymessage .message { border: ${i}px solid ${n}; }`)}const i=e.getColor(x._l);i&&t.addRule(`.monaco-editor .monaco-editor-overlaymessage .message { background-color: ${i}; }`);const o=e.getColor(x.YI);o&&t.addRule(`.monaco-editor .monaco-editor-overlaymessage .message { color: ${o}; }`)}))},8486:(e,t,n)=>{"use strict";n.r(t),n.d(t,{InsertCursorAbove:()=>y,InsertCursorBelow:()=>A,MultiCursorSessionResult:()=>L,MultiCursorSession:()=>E,MultiCursorSelectionController:()=>N,MultiCursorSelectionControllerAction:()=>D,AddSelectionToNextFindMatchAction:()=>I,AddSelectionToPreviousFindMatchAction:()=>M,MoveSelectionToNextFindMatchAction:()=>T,MoveSelectionToPreviousFindMatchAction:()=>R,SelectHighlightsAction:()=>O,CompatChangeAll:()=>B,SelectionHighlighter:()=>F});var i=n(3580),o=n(5393),r=n(2258),s=n(5976),a=n(6346),l=n(6830),d=n(3814),c=n(4314),h=n(3860),u=n(9102),g=n(4973),p=n(3103),m=n(4101),f=n(255),_=n(4144),b=n(3910),C=n(7781),v=n(8819);function w(e,t){const n=t.filter((t=>!e.find((e=>e.equals(t)))));if(n.length>=1){const e=n.map((e=>`line ${e.viewState.position.lineNumber} column ${e.viewState.position.column}`)).join(", "),t=1===n.length?i.N("cursorAdded","Cursor added: {0}",e):i.N("cursorsAdded","Cursors added: {0}",e);(0,a.i7)(t)}}class y extends l.R6{constructor(){super({id:"editor.action.insertCursorAbove",label:i.N("mutlicursor.insertAbove","Add Cursor Above"),alias:"Add Cursor Above",precondition:void 0,kbOpts:{kbExpr:u.u.editorTextFocus,primary:2576,linux:{primary:1552,secondary:[3088]},weight:100},menuOpts:{menuId:_.eH.MenubarSelectionMenu,group:"3_multi",title:i.N({key:"miInsertCursorAbove",comment:["&& denotes a mnemonic"]},"&&Add Cursor Above"),order:2}})}run(e,t,n){if(!t.hasModel())return;const i=n&&!0===n.logicalLine,o=t._getViewModel();if(o.cursorConfig.readOnly)return;o.pushStackElement();const r=o.getCursorStates();o.setCursorStates(n.source,3,d.P.addCursorUp(o,r,i)),o.revealTopMostCursor(n.source),w(r,o.getCursorStates())}}class A extends l.R6{constructor(){super({id:"editor.action.insertCursorBelow",label:i.N("mutlicursor.insertBelow","Add Cursor Below"),alias:"Add Cursor Below",precondition:void 0,kbOpts:{kbExpr:u.u.editorTextFocus,primary:2578,linux:{primary:1554,secondary:[3090]},weight:100},menuOpts:{menuId:_.eH.MenubarSelectionMenu,group:"3_multi",title:i.N({key:"miInsertCursorBelow",comment:["&& denotes a mnemonic"]},"A&&dd Cursor Below"),order:3}})}run(e,t,n){if(!t.hasModel())return;const i=n&&!0===n.logicalLine,o=t._getViewModel();if(o.cursorConfig.readOnly)return;o.pushStackElement();const r=o.getCursorStates();o.setCursorStates(n.source,3,d.P.addCursorDown(o,r,i)),o.revealBottomMostCursor(n.source),w(r,o.getCursorStates())}}class S extends l.R6{constructor(){super({id:"editor.action.insertCursorAtEndOfEachLineSelected",label:i.N("mutlicursor.insertAtEndOfEachLineSelected","Add Cursors to Line Ends"),alias:"Add Cursors to Line Ends",precondition:void 0,kbOpts:{kbExpr:u.u.editorTextFocus,primary:1575,weight:100},menuOpts:{menuId:_.eH.MenubarSelectionMenu,group:"3_multi",title:i.N({key:"miInsertCursorAtEndOfEachLineSelected",comment:["&& denotes a mnemonic"]},"Add C&&ursors to Line Ends"),order:4}})}getCursorsForSelection(e,t,n){if(!e.isEmpty()){for(let i=e.startLineNumber;i1&&n.push(new h.Y(e.endLineNumber,e.endColumn,e.endLineNumber,e.endColumn))}}run(e,t){if(!t.hasModel())return;const n=t.getModel(),i=t.getSelections(),o=t._getViewModel(),r=o.getCursorStates();let s=[];i.forEach((e=>this.getCursorsForSelection(e,n,s))),s.length>0&&t.setSelections(s),w(r,o.getCursorStates())}}class x extends l.R6{constructor(){super({id:"editor.action.addCursorsToBottom",label:i.N("mutlicursor.addCursorsToBottom","Add Cursors To Bottom"),alias:"Add Cursors To Bottom",precondition:void 0})}run(e,t){if(!t.hasModel())return;const n=t.getSelections(),i=t.getModel().getLineCount();let o=[];for(let e=n[0].startLineNumber;e<=i;e++)o.push(new h.Y(e,n[0].startColumn,e,n[0].endColumn));const r=t._getViewModel(),s=r.getCursorStates();o.length>0&&t.setSelections(o),w(s,r.getCursorStates())}}class k extends l.R6{constructor(){super({id:"editor.action.addCursorsToTop",label:i.N("mutlicursor.addCursorsToTop","Add Cursors To Top"),alias:"Add Cursors To Top",precondition:void 0})}run(e,t){if(!t.hasModel())return;const n=t.getSelections();let i=[];for(let e=n[0].startLineNumber;e>=1;e--)i.push(new h.Y(e,n[0].startColumn,e,n[0].endColumn));const o=t._getViewModel(),r=o.getCursorStates();i.length>0&&t.setSelections(i),w(r,o.getCursorStates())}}class L{constructor(e,t,n){this.selections=e,this.revealRange=t,this.revealScrollType=n}}class E{constructor(e,t,n,i,o,r,s){this._editor=e,this.findController=t,this.isDisconnectedFromFindController=n,this.searchText=i,this.wholeWord=o,this.matchCase=r,this.currentMatch=s}static create(e,t){if(!e.hasModel())return null;const n=t.getState();if(!e.hasTextFocus()&&n.isRevealed&&n.searchString.length>0)return new E(e,t,!1,n.searchString,n.wholeWord,n.matchCase,null);let i,o,r=!1;const s=e.getSelections();1===s.length&&s[0].isEmpty()?(r=!0,i=!0,o=!0):(i=n.wholeWord,o=n.matchCase);const a=e.getSelection();let l,d=null;if(a.isEmpty()){const t=e.getConfiguredWordAtPosition(a.getStartPosition());if(!t)return null;l=t.word,d=new h.Y(a.startLineNumber,t.startColumn,a.startLineNumber,t.endColumn)}else l=e.getModel().getValueInRange(a).replace(/\r\n/g,"\n");return new E(e,t,r,l,i,o,d)}addSelectionToNextFindMatch(){if(!this._editor.hasModel())return null;const e=this._getNextMatch();if(!e)return null;const t=this._editor.getSelections();return new L(t.concat(e),e,0)}moveSelectionToNextFindMatch(){if(!this._editor.hasModel())return null;const e=this._getNextMatch();if(!e)return null;const t=this._editor.getSelections();return new L(t.slice(0,t.length-1).concat(e),e,0)}_getNextMatch(){if(!this._editor.hasModel())return null;if(this.currentMatch){const e=this.currentMatch;return this.currentMatch=null,e}this.findController.highlightFindOptions();const e=this._editor.getSelections(),t=e[e.length-1],n=this._editor.getModel().findNextMatch(this.searchText,t.getEndPosition(),!1,this.matchCase,this.wholeWord?this._editor.getOption(115):null,!1);return n?new h.Y(n.range.startLineNumber,n.range.startColumn,n.range.endLineNumber,n.range.endColumn):null}addSelectionToPreviousFindMatch(){if(!this._editor.hasModel())return null;const e=this._getPreviousMatch();if(!e)return null;const t=this._editor.getSelections();return new L(t.concat(e),e,0)}moveSelectionToPreviousFindMatch(){if(!this._editor.hasModel())return null;const e=this._getPreviousMatch();if(!e)return null;const t=this._editor.getSelections();return new L(t.slice(0,t.length-1).concat(e),e,0)}_getPreviousMatch(){if(!this._editor.hasModel())return null;if(this.currentMatch){const e=this.currentMatch;return this.currentMatch=null,e}this.findController.highlightFindOptions();const e=this._editor.getSelections(),t=e[e.length-1],n=this._editor.getModel().findPreviousMatch(this.searchText,t.getStartPosition(),!1,this.matchCase,this.wholeWord?this._editor.getOption(115):null,!1);return n?new h.Y(n.range.startLineNumber,n.range.startColumn,n.range.endLineNumber,n.range.endColumn):null}selectAll(){return this._editor.hasModel()?(this.findController.highlightFindOptions(),this._editor.getModel().findMatches(this.searchText,!0,!1,this.matchCase,this.wholeWord?this._editor.getOption(115):null,!1,1073741824)):[]}}class N extends s.JT{constructor(e){super(),this._sessionDispose=this._register(new s.SL),this._editor=e,this._ignoreSelectionChange=!1,this._session=null}static get(e){return e.getContribution(N.ID)}dispose(){this._endSession(),super.dispose()}_beginSessionIfNeeded(e){if(!this._session){const t=E.create(this._editor,e);if(!t)return;this._session=t;const n={searchString:this._session.searchText};this._session.isDisconnectedFromFindController&&(n.wholeWordOverride=1,n.matchCaseOverride=1,n.isRegexOverride=2),e.getState().change(n,!1),this._sessionDispose.add(this._editor.onDidChangeCursorSelection((e=>{this._ignoreSelectionChange||this._endSession()}))),this._sessionDispose.add(this._editor.onDidBlurEditorText((()=>{this._endSession()}))),this._sessionDispose.add(e.getState().onFindReplaceStateChange((e=>{(e.matchCase||e.wholeWord)&&this._endSession()})))}}_endSession(){if(this._sessionDispose.clear(),this._session&&this._session.isDisconnectedFromFindController){const e={wholeWordOverride:0,matchCaseOverride:0,isRegexOverride:0};this._session.findController.getState().change(e,!1)}this._session=null}_setSelections(e){this._ignoreSelectionChange=!0,this._editor.setSelections(e),this._ignoreSelectionChange=!1}_expandEmptyToWord(e,t){if(!t.isEmpty())return t;const n=this._editor.getConfiguredWordAtPosition(t.getStartPosition());return n?new h.Y(t.startLineNumber,n.startColumn,t.startLineNumber,n.endColumn):t}_applySessionResult(e){e&&(this._setSelections(e.selections),e.revealRange&&this._editor.revealRangeInCenterIfOutsideViewport(e.revealRange,e.revealScrollType))}getSession(e){return this._session}addSelectionToNextFindMatch(e){if(this._editor.hasModel()){if(!this._session){const t=this._editor.getSelections();if(t.length>1){const n=e.getState().matchCase;if(!W(this._editor.getModel(),t,n)){const e=this._editor.getModel();let n=[];for(let i=0,o=t.length;i0&&n.isRegex)t=this._editor.getModel().findMatches(n.searchString,!0,n.isRegex,n.matchCase,n.wholeWord?this._editor.getOption(115):null,!1,1073741824);else{if(this._beginSessionIfNeeded(e),!this._session)return;t=this._session.selectAll()}if(n.searchScope){const e=n.searchScope;let i=[];t.forEach((t=>{e.forEach((e=>{t.range.endLineNumber<=e.endLineNumber&&t.range.startLineNumber>=e.startLineNumber&&i.push(t)}))})),t=i}if(t.length>0){const e=this._editor.getSelection();for(let n=0,i=t.length;nnew h.Y(e.range.startLineNumber,e.range.startColumn,e.range.endLineNumber,e.range.endColumn))))}}}N.ID="editor.contrib.multiCursorController";class D extends l.R6{run(e,t){const n=N.get(t);if(!n)return;const i=f.CommonFindController.get(t);if(!i)return;const o=t._getViewModel();if(o){const e=o.getCursorStates();this._run(n,i),w(e,o.getCursorStates())}}}class I extends D{constructor(){super({id:"editor.action.addSelectionToNextFindMatch",label:i.N("addSelectionToNextFindMatch","Add Selection To Next Find Match"),alias:"Add Selection To Next Find Match",precondition:void 0,kbOpts:{kbExpr:u.u.focus,primary:2082,weight:100},menuOpts:{menuId:_.eH.MenubarSelectionMenu,group:"3_multi",title:i.N({key:"miAddSelectionToNextFindMatch",comment:["&& denotes a mnemonic"]},"Add &&Next Occurrence"),order:5}})}_run(e,t){e.addSelectionToNextFindMatch(t)}}class M extends D{constructor(){super({id:"editor.action.addSelectionToPreviousFindMatch",label:i.N("addSelectionToPreviousFindMatch","Add Selection To Previous Find Match"),alias:"Add Selection To Previous Find Match",precondition:void 0,menuOpts:{menuId:_.eH.MenubarSelectionMenu,group:"3_multi",title:i.N({key:"miAddSelectionToPreviousFindMatch",comment:["&& denotes a mnemonic"]},"Add P&&revious Occurrence"),order:6}})}_run(e,t){e.addSelectionToPreviousFindMatch(t)}}class T extends D{constructor(){super({id:"editor.action.moveSelectionToNextFindMatch",label:i.N("moveSelectionToNextFindMatch","Move Last Selection To Next Find Match"),alias:"Move Last Selection To Next Find Match",precondition:void 0,kbOpts:{kbExpr:u.u.focus,primary:(0,r.gx)(2089,2082),weight:100}})}_run(e,t){e.moveSelectionToNextFindMatch(t)}}class R extends D{constructor(){super({id:"editor.action.moveSelectionToPreviousFindMatch",label:i.N("moveSelectionToPreviousFindMatch","Move Last Selection To Previous Find Match"),alias:"Move Last Selection To Previous Find Match",precondition:void 0})}_run(e,t){e.moveSelectionToPreviousFindMatch(t)}}class O extends D{constructor(){super({id:"editor.action.selectHighlights",label:i.N("selectAllOccurrencesOfFindMatch","Select All Occurrences of Find Match"),alias:"Select All Occurrences of Find Match",precondition:void 0,kbOpts:{kbExpr:u.u.focus,primary:3114,weight:100},menuOpts:{menuId:_.eH.MenubarSelectionMenu,group:"3_multi",title:i.N({key:"miSelectHighlights",comment:["&& denotes a mnemonic"]},"Select All &&Occurrences"),order:7}})}_run(e,t){e.selectAll(t)}}class B extends D{constructor(){super({id:"editor.action.changeAll",label:i.N("changeAll.label","Change All Occurrences"),alias:"Change All Occurrences",precondition:v.Ao.and(u.u.writable,u.u.editorTextFocus),kbOpts:{kbExpr:u.u.editorTextFocus,primary:2108,weight:100},contextMenuOpts:{group:"1_modification",order:1.2}})}_run(e,t){e.selectAll(t)}}class P{constructor(e,t,n,i){this.searchText=e,this.matchCase=t,this.wordSeparators=n,this.modelVersionId=i}static softEquals(e,t){return!e&&!t||!(!e||!t)&&e.searchText===t.searchText&&e.matchCase===t.matchCase&&e.wordSeparators===t.wordSeparators&&e.modelVersionId===t.modelVersionId}}class F extends s.JT{constructor(e){super(),this.editor=e,this._isEnabled=e.getOption(96),this.decorations=[],this.updateSoon=this._register(new o.pY((()=>this._update()),300)),this.state=null,this._register(e.onDidChangeConfiguration((t=>{this._isEnabled=e.getOption(96)}))),this._register(e.onDidChangeCursorSelection((e=>{this._isEnabled&&(e.selection.isEmpty()?3===e.reason?(this.state&&this._setState(null),this.updateSoon.schedule()):this._setState(null):this._update())}))),this._register(e.onDidChangeModel((e=>{this._setState(null)}))),this._register(e.onDidChangeModelContent((e=>{this._isEnabled&&this.updateSoon.schedule()}))),this._register(f.CommonFindController.get(e).getState().onFindReplaceStateChange((e=>{this._update()})))}_update(){this._setState(F._createState(this._isEnabled,this.editor))}static _createState(e,t){if(!e)return null;if(!t.hasModel())return null;const n=t.getSelection();if(n.startLineNumber!==n.endLineNumber)return null;const i=N.get(t);if(!i)return null;const o=f.CommonFindController.get(t);if(!o)return null;let r=i.getSession(o);if(!r){const e=t.getSelections();if(e.length>1){const n=o.getState().matchCase;if(!W(t.getModel(),e,n))return null}r=E.create(t,o)}if(!r)return null;if(r.currentMatch)return null;if(/^[ \t]+$/.test(r.searchText))return null;if(r.searchText.length>200)return null;const s=o.getState(),a=s.matchCase;if(s.isRevealed){let e=s.searchString;a||(e=e.toLowerCase());let t=r.searchText;if(a||(t=t.toLowerCase()),e===t&&r.matchCase===s.matchCase&&r.wholeWord===s.wholeWord&&!s.isRegex)return null}return new P(r.searchText,r.matchCase,r.wholeWord?t.getOption(115):null,t.getModel().getVersionId())}_setState(e){if(P.softEquals(this.state,e))return void(this.state=e);if(this.state=e,!this.state)return void(this.decorations=this.editor.deltaDecorations(this.decorations,[]));if(!this.editor.hasModel())return;const t=this.editor.getModel();if(t.isTooLargeForTokenization())return;const n=m.vH.has(t)&&this.editor.getOption(70);let i=t.findMatches(this.state.searchText,!0,!1,this.state.matchCase,this.state.wordSeparators,!1).map((e=>e.range));i.sort(c.e.compareRangesUsingStarts);let o=this.editor.getSelections();o.sort(c.e.compareRangesUsingStarts);let r=[];for(let e=0,t=0,n=i.length,s=o.length;e=s)r.push(n),e++;else{const i=c.e.compareRangesUsingStarts(n,o[t]);i<0?(!o[t].isEmpty()&&c.e.areIntersecting(n,o[t])||r.push(n),e++):(i>0||e++,t++)}}const s=r.map((e=>({range:e,options:n?F._SELECTION_HIGHLIGHT:F._SELECTION_HIGHLIGHT_OVERVIEW})));this.decorations=this.editor.deltaDecorations(this.decorations,s)}dispose(){this._setState(null),super.dispose()}}function W(e,t,n){const i=z(e,t[0],!n);for(let o=1,r=t.length;o{"use strict";n.r(t),n.d(t,{TriggerParameterHintsAction:()=>se});var i=n(3580),o=n(5976),r=n(2065),s=n(9102),a=n(8819),l=n(6830),d=n(5321),c=n(6346),h=n(6781),u=n(4669),g=n(3379),p=n.n(g),m=n(7795),f=n.n(m),_=n(569),b=n.n(_),C=n(3565),v=n.n(C),w=n(9216),y=n.n(w),A=n(4589),S=n.n(A),x=n(2265),k={};k.styleTagTransform=S(),k.setAttributes=v(),k.insert=b().bind(null,"head"),k.domAPI=f(),k.insertStyleElement=y(),p()(x.Z,k),x.Z&&x.Z.locals&&x.Z.locals;var L=n(1531),E=n(3947),N=n(7301),D=n(187),I=n(4101),M=n(1050),T=n(4565),R=n(666),O=n(8401),B=n(8216),P=function(e,t,n,i){return new(n||(n=Promise))((function(o,r){function s(e){try{l(i.next(e))}catch(e){r(e)}}function a(e){try{l(i.throw(e))}catch(e){r(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,a)}l((i=i.apply(e,t||[])).next())}))};const F={Visible:new a.uy("parameterHintsVisible",!1),MultipleSignatures:new a.uy("parameterHintsMultipleSignatures",!1)};function W(e,t,n,i){return P(this,void 0,void 0,(function*(){const o=I.nD.ordered(e);for(const r of o)try{const o=yield r.provideSignatureHelp(e,t,i,n);if(o)return o}catch(e){(0,N.Cp)(e)}}))}T.P.registerCommand("_executeSignatureHelpProvider",((e,...t)=>P(void 0,void 0,void 0,(function*(){const[n,i,o]=t;(0,O.p_)(R.o.isUri(n)),(0,O.p_)(D.L.isIPosition(i)),(0,O.p_)("string"==typeof o||!o);const r=yield e.get(B.S).createModelReference(n);try{const e=yield W(r.object.textEditorModel,D.L.lift(i),{triggerKind:I.WW.Invoke,isRetrigger:!1,triggerCharacter:o},M.T.None);if(!e)return;return setTimeout((()=>e.dispose()),0),e.value}finally{r.dispose()}}))));var z,V=n(988),H=n(3910),j=n(7781),$=n(5393),U=n(4906);!function(e){e.Default={type:0},e.Pending=class{constructor(e,t){this.request=e,this.previouslyActiveHints=t,this.type=2}},e.Active=class{constructor(e){this.hints=e,this.type=1}}}(z||(z={}));class Z extends o.JT{constructor(e,t=Z.DEFAULT_DELAY){super(),this._onChangedHints=this._register(new u.Q5),this.onChangedHints=this._onChangedHints.event,this.triggerOnType=!1,this._state=z.Default,this._pendingTriggers=[],this._lastSignatureHelpResult=this._register(new o.XK),this.triggerChars=new U.q,this.retriggerChars=new U.q,this.triggerId=0,this.editor=e,this.throttledDelayer=new $.vp(t),this._register(this.editor.onDidBlurEditorWidget((()=>this.cancel()))),this._register(this.editor.onDidChangeConfiguration((()=>this.onEditorConfigurationChange()))),this._register(this.editor.onDidChangeModel((e=>this.onModelChanged()))),this._register(this.editor.onDidChangeModelLanguage((e=>this.onModelChanged()))),this._register(this.editor.onDidChangeCursorSelection((e=>this.onCursorChange(e)))),this._register(this.editor.onDidChangeModelContent((e=>this.onModelContentChange()))),this._register(I.nD.onDidChange(this.onModelChanged,this)),this._register(this.editor.onDidType((e=>this.onDidType(e)))),this.onEditorConfigurationChange(),this.onModelChanged()}get state(){return this._state}set state(e){2===this._state.type&&this._state.request.cancel(),this._state=e}cancel(e=!1){this.state=z.Default,this.throttledDelayer.cancel(),e||this._onChangedHints.fire(void 0)}trigger(e,t){const n=this.editor.getModel();if(!n||!I.nD.has(n))return;const i=++this.triggerId;this._pendingTriggers.push(e),this.throttledDelayer.trigger((()=>this.doTrigger(i)),t).catch(N.dL)}next(){if(1!==this.state.type)return;const e=this.state.hints.signatures.length,t=this.state.hints.activeSignature,n=t%e==e-1,i=this.editor.getOption(74).cycle;!(e<2||n)||i?this.updateActiveSignature(n&&i?0:t+1):this.cancel()}previous(){if(1!==this.state.type)return;const e=this.state.hints.signatures.length,t=this.state.hints.activeSignature,n=0===t,i=this.editor.getOption(74).cycle;!(e<2||n)||i?this.updateActiveSignature(n&&i?e-1:t-1):this.cancel()}updateActiveSignature(e){1===this.state.type&&(this.state=new z.Active(Object.assign(Object.assign({},this.state.hints),{activeSignature:e})),this._onChangedHints.fire(this.state.hints))}doTrigger(e){return t=this,n=void 0,o=function*(){const t=1===this.state.type||2===this.state.type,n=this.getLastActiveHints();if(this.cancel(!0),0===this._pendingTriggers.length)return!1;const i=this._pendingTriggers.reduce(K);this._pendingTriggers=[];const o={triggerKind:i.triggerKind,triggerCharacter:i.triggerCharacter,isRetrigger:t,activeSignatureHelp:n};if(!this.editor.hasModel())return!1;const r=this.editor.getModel(),s=this.editor.getPosition();this.state=new z.Pending((0,$.PG)((e=>W(r,s,o,e))),n);try{const t=yield this.state.request;return e!==this.triggerId?(null==t||t.dispose(),!1):t&&t.value.signatures&&0!==t.value.signatures.length?(this.state=new z.Active(t.value),this._lastSignatureHelpResult.value=t,this._onChangedHints.fire(this.state.hints),!0):(null==t||t.dispose(),this._lastSignatureHelpResult.clear(),this.cancel(),!1)}catch(t){return e===this.triggerId&&(this.state=z.Default),(0,N.dL)(t),!1}},new((i=void 0)||(i=Promise))((function(e,r){function s(e){try{l(o.next(e))}catch(e){r(e)}}function a(e){try{l(o.throw(e))}catch(e){r(e)}}function l(t){var n;t.done?e(t.value):(n=t.value,n instanceof i?n:new i((function(e){e(n)}))).then(s,a)}l((o=o.apply(t,n||[])).next())}));var t,n,i,o}getLastActiveHints(){switch(this.state.type){case 1:return this.state.hints;case 2:return this.state.previouslyActiveHints;default:return}}get isTriggered(){return 1===this.state.type||2===this.state.type||this.throttledDelayer.isTriggered()}onModelChanged(){this.cancel(),this.triggerChars=new U.q,this.retriggerChars=new U.q;const e=this.editor.getModel();if(e)for(const t of I.nD.ordered(e)){for(const e of t.signatureHelpTriggerCharacters||[])this.triggerChars.add(e.charCodeAt(0)),this.retriggerChars.add(e.charCodeAt(0));for(const e of t.signatureHelpRetriggerCharacters||[])this.retriggerChars.add(e.charCodeAt(0))}}onDidType(e){if(!this.triggerOnType)return;const t=e.length-1,n=e.charCodeAt(t);(this.triggerChars.has(n)||this.isTriggered&&this.retriggerChars.has(n))&&this.trigger({triggerKind:I.WW.TriggerCharacter,triggerCharacter:e.charAt(t)})}onCursorChange(e){"mouse"===e.source?this.cancel():this.isTriggered&&this.trigger({triggerKind:I.WW.ContentChange})}onModelContentChange(){this.isTriggered&&this.trigger({triggerKind:I.WW.ContentChange})}onEditorConfigurationChange(){this.triggerOnType=this.editor.getOption(74).enabled,this.triggerOnType||this.cancel()}dispose(){this.cancel(!0),super.dispose()}}function K(e,t){switch(t.triggerKind){case I.WW.Invoke:return t;case I.WW.ContentChange:return e;case I.WW.TriggerCharacter:default:return t}}Z.DEFAULT_DELAY=120;var q=n(7295),Y=n(3046),G=n(2321),Q=n(9554),X=function(e,t){return function(n,i){t(n,i,e)}};const J=d.$,ee=(0,Q.q5)("parameter-hints-next",Y.lA.chevronDown,i.N("parameterHintsNextIcon","Icon for show next parameter hint.")),te=(0,Q.q5)("parameter-hints-previous",Y.lA.chevronUp,i.N("parameterHintsPreviousIcon","Icon for show previous parameter hint."));let ne=class e extends o.JT{constructor(e,t,n,i){super(),this.editor=e,this.renderDisposeables=this._register(new o.SL),this.visible=!1,this.announcedLabel=null,this.allowEditorOverflow=!0,this.markdownRenderer=this._register(new E.$({editor:e},i,n)),this.model=this._register(new Z(e)),this.keyVisible=F.Visible.bindTo(t),this.keyMultipleSignatures=F.MultipleSignatures.bindTo(t),this._register(this.model.onChangedHints((e=>{e?(this.show(),this.render(e)):this.hide()})))}createParameterHintDOMNodes(){const e=J(".editor-widget.parameter-hints-widget"),t=d.R3(e,J(".phwrapper"));t.tabIndex=-1;const n=d.R3(t,J(".controls")),i=d.R3(n,J(".button"+j.kS.asCSSSelector(te))),o=d.R3(n,J(".overloads")),r=d.R3(n,J(".button"+j.kS.asCSSSelector(ee)));this._register(d.nm(i,"click",(e=>{d.zB.stop(e),this.previous()}))),this._register(d.nm(r,"click",(e=>{d.zB.stop(e),this.next()})));const s=J(".body"),a=new h.s$(s,{});this._register(a),t.appendChild(a.getDomNode());const l=d.R3(s,J(".signature")),c=d.R3(s,J(".docs"));e.style.userSelect="text",this.domNodes={element:e,signature:l,overloads:o,docs:c,scrollbar:a},this.editor.addContentWidget(this),this.hide(),this._register(this.editor.onDidChangeCursorSelection((e=>{this.visible&&this.editor.layoutContentWidget(this)})));const g=()=>{if(!this.domNodes)return;const e=this.editor.getOption(41);this.domNodes.element.style.fontSize=`${e.fontSize}px`};g(),this._register(u.ju.chain(this.editor.onDidChangeConfiguration.bind(this.editor)).filter((e=>e.hasChanged(41))).on(g,null)),this._register(this.editor.onDidLayoutChange((e=>this.updateMaxHeight()))),this.updateMaxHeight()}show(){this.visible||(this.domNodes||this.createParameterHintDOMNodes(),this.keyVisible.set(!0),this.visible=!0,setTimeout((()=>{this.domNodes&&this.domNodes.element.classList.add("visible")}),100),this.editor.layoutContentWidget(this))}hide(){this.renderDisposeables.clear(),this.visible&&(this.keyVisible.reset(),this.visible=!1,this.announcedLabel=null,this.domNodes&&this.domNodes.element.classList.remove("visible"),this.editor.layoutContentWidget(this))}getPosition(){return this.visible?{position:this.editor.getPosition(),preference:[1,2]}:null}render(e){var t;if(this.renderDisposeables.clear(),!this.domNodes)return;const n=e.signatures.length>1;this.domNodes.element.classList.toggle("multiple",n),this.keyMultipleSignatures.set(n),this.domNodes.signature.innerText="",this.domNodes.docs.innerText="";const o=e.signatures[e.activeSignature];if(!o)return;const r=d.R3(this.domNodes.signature,J(".code")),s=this.editor.getOption(41);r.style.fontSize=`${s.fontSize}px`,r.style.fontFamily=s.fontFamily;const a=o.parameters.length>0,l=null!==(t=o.activeParameter)&&void 0!==t?t:e.activeParameter;a?this.renderParameters(r,o,l):d.R3(r,J("span")).textContent=o.label;const h=o.parameters[l];if(null==h?void 0:h.documentation){const e=J("span.documentation");if("string"==typeof h.documentation)e.textContent=h.documentation;else{const t=this.renderMarkdownDocs(h.documentation);e.appendChild(t.element)}d.R3(this.domNodes.docs,J("p",{},e))}if(void 0===o.documentation);else if("string"==typeof o.documentation)d.R3(this.domNodes.docs,J("p",{},o.documentation));else{const e=this.renderMarkdownDocs(o.documentation);d.R3(this.domNodes.docs,e.element)}const u=this.hasDocs(o,h);if(this.domNodes.signature.classList.toggle("has-docs",u),this.domNodes.docs.classList.toggle("empty",!u),this.domNodes.overloads.textContent=String(e.activeSignature+1).padStart(e.signatures.length.toString().length,"0")+"/"+e.signatures.length,h){const e=this.getParameterLabel(o,l);this.announcedLabel!==e&&(c.Z9(i.N("hint","{0}, hint",e)),this.announcedLabel=e)}this.editor.layoutContentWidget(this),this.domNodes.scrollbar.scanDomNode()}renderMarkdownDocs(e){const t=this.renderDisposeables.add(this.markdownRenderer.render(e,{asyncRenderCallback:()=>{var e;null===(e=this.domNodes)||void 0===e||e.scrollbar.scanDomNode()}}));return t.element.classList.add("markdown-docs"),t}hasDocs(e,t){return!!(t&&"string"==typeof t.documentation&&(0,O.cW)(t.documentation).length>0||t&&"object"==typeof t.documentation&&(0,O.cW)(t.documentation).value.length>0||e.documentation&&"string"==typeof e.documentation&&(0,O.cW)(e.documentation).length>0||e.documentation&&"object"==typeof e.documentation&&(0,O.cW)(e.documentation.value).length>0)}renderParameters(e,t,n){const[i,o]=this.getParameterLabelOffsets(t,n),r=document.createElement("span");r.textContent=t.label.substring(0,i);const s=document.createElement("span");s.textContent=t.label.substring(i,o),s.className="parameter active";const a=document.createElement("span");a.textContent=t.label.substring(o),d.R3(e,r,s,a)}getParameterLabel(e,t){const n=e.parameters[t];return Array.isArray(n.label)?e.label.substring(n.label[0],n.label[1]):n.label}getParameterLabelOffsets(e,t){const n=e.parameters[t];if(n){if(Array.isArray(n.label))return n.label;if(n.label.length){const t=new RegExp(`(\\W|^)${(0,q.ec)(n.label)}(?=\\W|$)`,"g");t.test(e.label);const i=t.lastIndex-n.label.length;return i>=0?[i,t.lastIndex]:[0,0]}return[0,0]}return[0,0]}next(){this.editor.focus(),this.model.next()}previous(){this.editor.focus(),this.model.previous()}cancel(){this.model.cancel()}getDomNode(){return this.domNodes||this.createParameterHintDOMNodes(),this.domNodes.element}getId(){return e.ID}trigger(e){this.model.trigger(e,0)}updateMaxHeight(){if(!this.domNodes)return;const e=`${Math.max(this.editor.getLayoutInfo().height/4,250)}px`;this.domNodes.element.style.maxHeight=e;const t=this.domNodes.element.getElementsByClassName("phwrapper");t.length&&(t[0].style.maxHeight=e)}};ne.ID="editor.widget.parameterHintsWidget",ne=function(e,t,n,i){var o,r=arguments.length,s=r<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,i);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,n,s):o(t,n))||s);return r>3&&s&&Object.defineProperty(t,n,s),s}([X(1,a.i6),X(2,V.v4),X(3,L.h)],ne),(0,j.Ic)(((e,t)=>{const n=e.getColor(H.CN);if(n){const i=e.type===G.e.HIGH_CONTRAST?2:1;t.addRule(`.monaco-editor .parameter-hints-widget { border: ${i}px solid ${n}; }`),t.addRule(`.monaco-editor .parameter-hints-widget.multiple .body { border-left: 1px solid ${n.transparent(.5)}; }`),t.addRule(`.monaco-editor .parameter-hints-widget .signature.has-docs { border-bottom: 1px solid ${n.transparent(.5)}; }`)}const i=e.getColor(H.yJ);i&&t.addRule(`.monaco-editor .parameter-hints-widget { background-color: ${i}; }`);const o=e.getColor(H.ur);o&&t.addRule(`.monaco-editor .parameter-hints-widget a { color: ${o}; }`);const r=e.getColor(H.Sb);r&&t.addRule(`.monaco-editor .parameter-hints-widget { color: ${r}; }`);const s=e.getColor(H.Sw);s&&t.addRule(`.monaco-editor .parameter-hints-widget code { background-color: ${s}; }`)}));let ie=class e extends o.JT{constructor(e,t){super(),this.editor=e,this.widget=this._register(t.createInstance(ne,this.editor))}static get(t){return t.getContribution(e.ID)}cancel(){this.widget.cancel()}previous(){this.widget.previous()}next(){this.widget.next()}trigger(e){this.widget.trigger(e)}};var oe,re;ie.ID="editor.controller.parameterHints",ie=function(e,t,n,i){var o,r=arguments.length,s=r<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,i);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,n,s):o(t,n))||s);return r>3&&s&&Object.defineProperty(t,n,s),s}([(oe=1,re=r.TG,function(e,t){re(e,t,oe)})],ie);class se extends l.R6{constructor(){super({id:"editor.action.triggerParameterHints",label:i.N("parameterHints.trigger.label","Trigger Parameter Hints"),alias:"Trigger Parameter Hints",precondition:s.u.hasSignatureHelpProvider,kbOpts:{kbExpr:s.u.editorTextFocus,primary:3082,weight:100}})}run(e,t){const n=ie.get(t);n&&n.trigger({triggerKind:I.WW.Invoke})}}(0,l._K)(ie.ID,ie),(0,l.Qr)(se);const ae=l._l.bindToContribution(ie.get);(0,l.fK)(new ae({id:"closeParameterHints",precondition:F.Visible,handler:e=>e.cancel(),kbOpts:{weight:175,kbExpr:s.u.focus,primary:9,secondary:[1033]}})),(0,l.fK)(new ae({id:"showPrevParameterHint",precondition:a.Ao.and(F.Visible,F.MultipleSignatures),handler:e=>e.previous(),kbOpts:{weight:175,kbExpr:s.u.focus,primary:16,secondary:[528],mac:{primary:16,secondary:[528,302]}}})),(0,l.fK)(new ae({id:"showNextParameterHint",precondition:a.Ao.and(F.Visible,F.MultipleSignatures),handler:e=>e.next(),kbOpts:{weight:175,kbExpr:s.u.focus,primary:18,secondary:[530],mac:{primary:18,secondary:[530,300]}}}))},1884:(e,t,n)=>{"use strict";n.d(t,{Fw:()=>K,Jy:()=>q,vk:()=>X,rc:()=>G,SC:()=>ne,RX:()=>le,sH:()=>de,WL:()=>he,xH:()=>ue,M8:()=>ie,a7:()=>re,xk:()=>oe,F8:()=>ce,Zj:()=>se,IY:()=>ae,KY:()=>J,IH:()=>ee,R7:()=>te});var i=n(3379),o=n.n(i),r=n(7795),s=n.n(r),a=n(569),l=n.n(a),d=n(3565),c=n.n(d),h=n(9216),u=n.n(h),g=n(4589),p=n.n(g),m=n(1283),f={};f.styleTagTransform=p(),f.setAttributes=c(),f.insert=l().bind(null,"head"),f.domAPI=s(),f.insertStyleElement=u(),o()(m.Z,f),m.Z&&m.Z.locals&&m.Z.locals;var _=n(5321),b=n(317),C=n(4741),v=n(1264),w=n(4669),y=n(6248),A=n(1640),S=n(4527),x=n(6458),k={};k.styleTagTransform=p(),k.setAttributes=c(),k.insert=l().bind(null,"head"),k.domAPI=s(),k.insertStyleElement=u(),o()(x.Z,k),x.Z&&x.Z.locals&&x.Z.locals;var L=n(3841),E=n(4742),N=n(5976),D=n(4314),I=n(3103);const M=new v.Il(new v.VS(0,122,204)),T={showArrow:!0,showFrame:!0,className:"",frameColor:M,arrowColor:M,keepEditorSelection:!1};class R{constructor(e,t,n,i,o,r){this.id="",this.domNode=e,this.afterLineNumber=t,this.afterColumn=n,this.heightInLines=i,this._onDomNodeTop=o,this._onComputedHeight=r}onDomNodeTop(e){this._onDomNodeTop(e)}onComputedHeight(e){this._onComputedHeight(e)}}class O{constructor(e,t){this._id=e,this._domNode=t}getId(){return this._id}getDomNode(){return this._domNode}getPosition(){return null}}class B{constructor(e){this._editor=e,this._ruleName=B._IdGenerator.nextId(),this._decorations=[],this._color=null,this._height=-1}dispose(){this.hide(),_.uN(this._ruleName)}set color(e){this._color!==e&&(this._color=e,this._updateStyle())}set height(e){this._height!==e&&(this._height=e,this._updateStyle())}_updateStyle(){_.uN(this._ruleName),_.fk(`.monaco-editor ${this._ruleName}`,`border-style: solid; border-color: transparent; border-bottom-color: ${this._color}; border-width: ${this._height}px; bottom: -${this._height}px; margin-left: -${this._height}px; `)}show(e){this._decorations=this._editor.deltaDecorations(this._decorations,[{range:D.e.fromPositions(e),options:{description:"zone-widget-arrow",className:this._ruleName,stickiness:1}}])}hide(){this._editor.deltaDecorations(this._decorations,[])}}B._IdGenerator=new E.R(".arrow-decoration-");var P=n(3580),F=n(8819),W=n(2065),z=n(5026),V=n(6830),H=n(3910),j=n(3046),$=n(1133),U=function(e,t,n,i){var o,r=arguments.length,s=r<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,i);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,n,s):o(t,n))||s);return r>3&&s&&Object.defineProperty(t,n,s),s},Z=function(e,t){return function(n,i){t(n,i,e)}};const K=(0,W.yh)("IPeekViewService");var q;(0,z.z)(K,class{constructor(){this._widgets=new Map}addExclusiveWidget(e,t){const n=this._widgets.get(e);n&&(n.listener.dispose(),n.widget.dispose()),this._widgets.set(e,{widget:t,listener:t.onDidClose((()=>{const n=this._widgets.get(e);n&&n.widget===t&&(n.listener.dispose(),this._widgets.delete(e))}))})}}),function(e){e.inPeekEditor=new F.uy("inReferenceSearchEditor",!0,P.N("inReferenceSearchEditor","Whether the current code editor is embedded inside peek")),e.notInPeekEditor=e.inPeekEditor.toNegated()}(q||(q={}));let Y=class{constructor(e,t){e instanceof S.H&&q.inPeekEditor.bindTo(t)}dispose(){}};function G(e){let t=e.get(A.$).getFocusedCodeEditor();return t instanceof S.H?t.getParentEditor():t}Y.ID="editor.contrib.referenceController",Y=U([Z(1,F.i6)],Y),(0,V._K)(Y.ID,Y);const Q={headerBackgroundColor:v.Il.white,primaryHeadingColor:v.Il.fromHex("#333333"),secondaryHeadingColor:v.Il.fromHex("#6c6c6cb3")};let X=class extends class{constructor(e,t={}){this._arrow=null,this._overlayWidget=null,this._resizeSash=null,this._positionMarkerId=[],this._viewZone=null,this._disposables=new N.SL,this.container=null,this._isShowing=!1,this.editor=e,this.options=y.I8(t),y.jB(this.options,T,!1),this.domNode=document.createElement("div"),this.options.isAccessible||(this.domNode.setAttribute("aria-hidden","true"),this.domNode.setAttribute("role","presentation")),this._disposables.add(this.editor.onDidLayoutChange((e=>{const t=this._getWidth(e);this.domNode.style.width=t+"px",this.domNode.style.left=this._getLeft(e)+"px",this._onWidth(t)})))}dispose(){this._overlayWidget&&(this.editor.removeOverlayWidget(this._overlayWidget),this._overlayWidget=null),this._viewZone&&this.editor.changeViewZones((e=>{this._viewZone&&e.removeZone(this._viewZone.id),this._viewZone=null})),this.editor.deltaDecorations(this._positionMarkerId,[]),this._positionMarkerId=[],this._disposables.dispose()}create(){this.domNode.classList.add("zone-widget"),this.options.className&&this.domNode.classList.add(this.options.className),this.container=document.createElement("div"),this.container.classList.add("zone-widget-container"),this.domNode.appendChild(this.container),this.options.showArrow&&(this._arrow=new B(this.editor),this._disposables.add(this._arrow)),this._fillContainer(this.container),this._initSash(),this._applyStyles()}style(e){e.frameColor&&(this.options.frameColor=e.frameColor),e.arrowColor&&(this.options.arrowColor=e.arrowColor),this._applyStyles()}_applyStyles(){if(this.container&&this.options.frameColor){let e=this.options.frameColor.toString();this.container.style.borderTopColor=e,this.container.style.borderBottomColor=e}if(this._arrow&&this.options.arrowColor){let e=this.options.arrowColor.toString();this._arrow.color=e}}_getWidth(e){return e.width-e.minimap.minimapWidth-e.verticalScrollbarWidth}_getLeft(e){return e.minimap.minimapWidth>0&&0===e.minimap.minimapLeft?e.minimap.minimapWidth:0}_onViewZoneTop(e){this.domNode.style.top=e+"px"}_onViewZoneHeight(e){if(this.domNode.style.height=`${e}px`,this.container){let t=e-this._decoratingElementsHeight();this.container.style.height=`${t}px`;const n=this.editor.getLayoutInfo();this._doLayout(t,this._getWidth(n))}this._resizeSash&&this._resizeSash.layout()}get position(){const[e]=this._positionMarkerId;if(!e)return;const t=this.editor.getModel();if(!t)return;const n=t.getDecorationRange(e);return n?n.getStartPosition():void 0}show(e,t){const n=D.e.isIRange(e)?D.e.lift(e):D.e.fromPositions(e);this._isShowing=!0,this._showImpl(n,t),this._isShowing=!1,this._positionMarkerId=this.editor.deltaDecorations(this._positionMarkerId,[{range:n,options:I.qx.EMPTY}])}hide(){this._viewZone&&(this.editor.changeViewZones((e=>{this._viewZone&&e.removeZone(this._viewZone.id)})),this._viewZone=null),this._overlayWidget&&(this.editor.removeOverlayWidget(this._overlayWidget),this._overlayWidget=null),this._arrow&&this._arrow.hide()}_decoratingElementsHeight(){let e=this.editor.getOption(57),t=0;return this.options.showArrow&&(t+=2*Math.round(e/3)),this.options.showFrame&&(t+=2*Math.round(e/9)),t}_showImpl(e,t){const n=e.getStartPosition(),i=this.editor.getLayoutInfo(),o=this._getWidth(i);this.domNode.style.width=`${o}px`,this.domNode.style.left=this._getLeft(i)+"px";const r=document.createElement("div");r.style.overflow="hidden";const s=this.editor.getOption(57),a=Math.max(12,this.editor.getLayoutInfo().height/s*.8);t=Math.min(t,a);let l=0,d=0;if(this._arrow&&this.options.showArrow&&(l=Math.round(s/3),this._arrow.height=l,this._arrow.show(n)),this.options.showFrame&&(d=Math.round(s/9)),this.editor.changeViewZones((e=>{this._viewZone&&e.removeZone(this._viewZone.id),this._overlayWidget&&(this.editor.removeOverlayWidget(this._overlayWidget),this._overlayWidget=null),this.domNode.style.top="-1000px",this._viewZone=new R(r,n.lineNumber,n.column,t,(e=>this._onViewZoneTop(e)),(e=>this._onViewZoneHeight(e))),this._viewZone.id=e.addZone(this._viewZone),this._overlayWidget=new O("vs.editor.contrib.zoneWidget"+this._viewZone.id,this.domNode),this.editor.addOverlayWidget(this._overlayWidget)})),this.container&&this.options.showFrame){const e=this.options.frameWidth?this.options.frameWidth:d;this.container.style.borderTopWidth=e+"px",this.container.style.borderBottomWidth=e+"px"}let c=t*s-this._decoratingElementsHeight();this.container&&(this.container.style.top=l+"px",this.container.style.height=c+"px",this.container.style.overflow="hidden"),this._doLayout(c,o),this.options.keepEditorSelection||this.editor.setSelection(e);const h=this.editor.getModel();if(h){const t=e.endLineNumber+1;t<=h.getLineCount()?this.revealLine(t,!1):this.revealLine(h.getLineCount(),!0)}}revealLine(e,t){t?this.editor.revealLineInCenter(e,0):this.editor.revealLine(e,0)}setCssClass(e,t){this.container&&(t&&this.container.classList.remove(t),this.container.classList.add(e))}_onWidth(e){}_doLayout(e,t){}_relayout(e){this._viewZone&&this._viewZone.heightInLines!==e&&this.editor.changeViewZones((t=>{this._viewZone&&(this._viewZone.heightInLines=e,t.layoutZone(this._viewZone.id))}))}_initSash(){if(this._resizeSash)return;let e;this._resizeSash=this._disposables.add(new L.g(this.domNode,this,{orientation:1})),this.options.isResizeable||(this._resizeSash.hide(),this._resizeSash.state=0),this._disposables.add(this._resizeSash.onDidStart((t=>{this._viewZone&&(e={startY:t.startY,heightInLines:this._viewZone.heightInLines})}))),this._disposables.add(this._resizeSash.onDidEnd((()=>{e=void 0}))),this._disposables.add(this._resizeSash.onDidChange((t=>{if(e){let n=(t.currentY-e.startY)/this.editor.getOption(57),i=n<0?Math.ceil(n):Math.floor(n),o=e.heightInLines+i;o>5&&o<35&&this._relayout(o)}})))}getHorizontalSashLeft(){return 0}getHorizontalSashTop(){return(null===this.domNode.style.height?0:parseInt(this.domNode.style.height))-this._decoratingElementsHeight()/2}getHorizontalSashWidth(){const e=this.editor.getLayoutInfo();return e.width-e.minimap.minimapWidth}}{constructor(e,t,n){super(e,t),this.instantiationService=n,this._onDidClose=new w.Q5,this.onDidClose=this._onDidClose.event,y.jB(this.options,Q,!1)}dispose(){this.disposed||(this.disposed=!0,super.dispose(),this._onDidClose.fire(this))}style(e){let t=this.options;e.headerBackgroundColor&&(t.headerBackgroundColor=e.headerBackgroundColor),e.primaryHeadingColor&&(t.primaryHeadingColor=e.primaryHeadingColor),e.secondaryHeadingColor&&(t.secondaryHeadingColor=e.secondaryHeadingColor),super.style(e)}_applyStyles(){super._applyStyles();let e=this.options;this._headElement&&e.headerBackgroundColor&&(this._headElement.style.backgroundColor=e.headerBackgroundColor.toString()),this._primaryHeading&&e.primaryHeadingColor&&(this._primaryHeading.style.color=e.primaryHeadingColor.toString()),this._secondaryHeading&&e.secondaryHeadingColor&&(this._secondaryHeading.style.color=e.secondaryHeadingColor.toString()),this._bodyElement&&e.frameColor&&(this._bodyElement.style.borderColor=e.frameColor.toString())}_fillContainer(e){this.setCssClass("peekview-widget"),this._headElement=_.$(".head"),this._bodyElement=_.$(".body"),this._fillHead(this._headElement),this._fillBody(this._bodyElement),e.appendChild(this._headElement),e.appendChild(this._bodyElement)}_fillHead(e,t){const n=_.$(".peekview-title");_.R3(this._headElement,n),_.mu(n,"click",(e=>this._onTitleClick(e))),this._fillTitleIcon(n),this._primaryHeading=_.$("span.filename"),this._secondaryHeading=_.$("span.dirname"),this._metaHeading=_.$("span.meta"),_.R3(n,this._primaryHeading,this._secondaryHeading,this._metaHeading);const i=_.$(".peekview-actions");_.R3(this._headElement,i);const o=this._getActionBarOptions();this._actionbarWidget=new b.o(i,o),this._disposables.add(this._actionbarWidget),t||this._actionbarWidget.push(new C.aU("peekview.close",P.N("label.close","Close"),j.lA.close.classNames,!0,(()=>(this.dispose(),Promise.resolve()))),{label:!1,icon:!0})}_fillTitleIcon(e){}_getActionBarOptions(){return{actionViewItemProvider:$.Id.bind(void 0,this.instantiationService),orientation:0}}_onTitleClick(e){}setTitle(e,t){this._primaryHeading&&this._secondaryHeading&&(this._primaryHeading.innerText=e,this._primaryHeading.setAttribute("title",e),t?this._secondaryHeading.innerText=t:_.PO(this._secondaryHeading))}setMetaTitle(e){this._metaHeading&&(e?(this._metaHeading.innerText=e,_.$Z(this._metaHeading)):_.Cp(this._metaHeading))}_doLayout(e,t){if(!this._isShowing&&e<0)return void this.dispose();const n=Math.ceil(1.2*this.editor.getOption(57)),i=Math.round(e-(n+2));this._doLayoutHead(n,t),this._doLayoutBody(i,t)}_doLayoutHead(e,t){this._headElement&&(this._headElement.style.height=`${e}px`,this._headElement.style.lineHeight=this._headElement.style.height)}_doLayoutBody(e,t){this._bodyElement&&(this._bodyElement.style.height=`${e}px`)}};X=U([Z(2,W.TG)],X);const J=(0,H.P6)("peekViewTitle.background",{dark:"#1E1E1E",light:"#FFFFFF",hc:"#0C141F"},P.N("peekViewTitleBackground","Background color of the peek view title area.")),ee=(0,H.P6)("peekViewTitleLabel.foreground",{dark:"#FFFFFF",light:"#333333",hc:"#FFFFFF"},P.N("peekViewTitleForeground","Color of the peek view title.")),te=(0,H.P6)("peekViewTitleDescription.foreground",{dark:"#ccccccb3",light:"#616161e6",hc:"#FFFFFF99"},P.N("peekViewTitleInfoForeground","Color of the peek view title info.")),ne=(0,H.P6)("peekView.border",{dark:"#007acc",light:"#007acc",hc:H.lR},P.N("peekViewBorder","Color of the peek view borders and arrow.")),ie=(0,H.P6)("peekViewResult.background",{dark:"#252526",light:"#F3F3F3",hc:v.Il.black},P.N("peekViewResultsBackground","Background color of the peek view result list.")),oe=(0,H.P6)("peekViewResult.lineForeground",{dark:"#bbbbbb",light:"#646465",hc:v.Il.white},P.N("peekViewResultsMatchForeground","Foreground color for line nodes in the peek view result list.")),re=(0,H.P6)("peekViewResult.fileForeground",{dark:v.Il.white,light:"#1E1E1E",hc:v.Il.white},P.N("peekViewResultsFileForeground","Foreground color for file nodes in the peek view result list.")),se=(0,H.P6)("peekViewResult.selectionBackground",{dark:"#3399ff33",light:"#3399ff33",hc:null},P.N("peekViewResultsSelectionBackground","Background color of the selected entry in the peek view result list.")),ae=(0,H.P6)("peekViewResult.selectionForeground",{dark:v.Il.white,light:"#6C6C6C",hc:v.Il.white},P.N("peekViewResultsSelectionForeground","Foreground color of the selected entry in the peek view result list.")),le=(0,H.P6)("peekViewEditor.background",{dark:"#001F33",light:"#F2F8FC",hc:v.Il.black},P.N("peekViewEditorBackground","Background color of the peek view editor.")),de=(0,H.P6)("peekViewEditorGutter.background",{dark:le,light:le,hc:le},P.N("peekViewEditorGutterBackground","Background color of the gutter in the peek view editor.")),ce=(0,H.P6)("peekViewResult.matchHighlightBackground",{dark:"#ea5c004d",light:"#ea5c004d",hc:null},P.N("peekViewResultsMatchHighlight","Match highlight color in the peek view result list.")),he=(0,H.P6)("peekViewEditor.matchHighlightBackground",{dark:"#ff8f0099",light:"#f5d802de",hc:null},P.N("peekViewEditorMatchHighlight","Match highlight color in the peek view editor.")),ue=(0,H.P6)("peekViewEditor.matchHighlightBorder",{dark:null,light:null,hc:H.xL},P.N("peekViewEditorMatchHighlightBorder","Match highlight border in the peek view editor."))},8275:(e,t,n)=>{"use strict";n.d(t,{X:()=>c});var i=n(4973),o=n(7781),r=n(7869),s=n(5976),a=n(5520),l=n(8401),d=n(8289);class c{constructor(e){this.options=e,this.rangeHighlightDecorationId=void 0}provide(e,t){var n;const i=new s.SL;e.canAcceptInBackground=!!(null===(n=this.options)||void 0===n?void 0:n.canAcceptInBackground),e.matchOnLabel=e.matchOnDescription=e.matchOnDetail=e.sortByLabel=!1;const o=i.add(new s.XK);return o.value=this.doProvide(e,t),i.add(this.onDidActiveTextEditorControlChange((()=>{o.value=void 0,o.value=this.doProvide(e,t)}))),i}doProvide(e,t){const n=new s.SL,i=this.activeTextEditorControl;if(i&&this.canProvideWithTextEditor(i)){const o={editor:i},r=(0,a.Pi)(i);if(r){let e=(0,l.f6)(i.saveViewState());n.add(r.onDidChangeCursorPosition((()=>{e=(0,l.f6)(i.saveViewState())}))),o.restoreViewState=()=>{e&&i===this.activeTextEditorControl&&i.restoreViewState(e)},n.add((0,d.I)(t.onCancellationRequested)((()=>{var e;return null===(e=o.restoreViewState)||void 0===e?void 0:e.call(o)})))}n.add((0,s.OF)((()=>this.clearDecorations(i)))),n.add(this.provideWithTextEditor(o,e,t))}else n.add(this.provideWithoutTextEditor(e,t));return n}canProvideWithTextEditor(e){return!0}gotoLocation({editor:e},t){e.setSelection(t.range),e.revealRangeInCenter(t.range,0),t.preserveFocus||e.focus()}getModel(e){var t;return(0,a.QI)(e)?null===(t=e.getModel())||void 0===t?void 0:t.modified:e.getModel()}addDecorations(e,t){e.changeDecorations((e=>{const n=[];this.rangeHighlightDecorationId&&(n.push(this.rangeHighlightDecorationId.overviewRulerDecorationId),n.push(this.rangeHighlightDecorationId.rangeHighlightId),this.rangeHighlightDecorationId=void 0);const s=[{range:t,options:{description:"quick-access-range-highlight",className:"rangeHighlight",isWholeLine:!0}},{range:t,options:{description:"quick-access-range-highlight-overview",overviewRuler:{color:(0,o.EN)(r.m9),position:i.sh.Full}}}],[a,l]=e.deltaDecorations(n,s);this.rangeHighlightDecorationId={rangeHighlightId:a,overviewRulerDecorationId:l}}))}clearDecorations(e){const t=this.rangeHighlightDecorationId;t&&(e.changeDecorations((e=>{e.deltaDecorations([t.overviewRulerDecorationId,t.rangeHighlightId],[])})),this.rangeHighlightDecorationId=void 0)}}},7290:(e,t,n)=>{"use strict";n.r(t),n.d(t,{RenameAction:()=>J,rename:()=>Q});var i=n(3580),o=n(7301),r=n(8819),s=n(535),a=n(6830),l=n(9102),d=n(3379),c=n.n(d),h=n(7795),u=n.n(h),g=n(569),p=n.n(g),m=n(3565),f=n.n(m),_=n(9216),b=n.n(_),C=n(4589),v=n.n(C),w=n(7113),y={};y.styleTagTransform=v(),y.setAttributes=f(),y.insert=p().bind(null,"head"),y.domAPI=u(),y.insertStyleElement=b(),c()(w.Z,y),w.Z&&w.Z.locals&&w.Z.locals;var A=n(5976),S=n(187),x=n(3910),k=n(7781),L=n(1847),E=function(e,t){return function(n,i){t(n,i,e)}};const N=new r.uy("renameInputVisible",!1,(0,i.N)("renameInputVisible","Whether the rename input widget is visible"));let D=class{constructor(e,t,n,i,o){this._editor=e,this._acceptKeybindings=t,this._themeService=n,this._keybindingService=i,this._disposables=new A.SL,this.allowEditorOverflow=!0,this._visibleContextKey=N.bindTo(o),this._editor.addContentWidget(this),this._disposables.add(this._editor.onDidChangeConfiguration((e=>{e.hasChanged(41)&&this._updateFont()}))),this._disposables.add(n.onDidColorThemeChange(this._updateStyles,this))}dispose(){this._disposables.dispose(),this._editor.removeContentWidget(this)}getId(){return"__renameInputWidget"}getDomNode(){if(!this._domNode){this._domNode=document.createElement("div"),this._domNode.className="monaco-editor rename-box",this._input=document.createElement("input"),this._input.className="rename-input",this._input.type="text",this._input.setAttribute("aria-label",(0,i.N)("renameAriaLabel","Rename input. Type new name and press Enter to commit.")),this._domNode.appendChild(this._input),this._label=document.createElement("div"),this._label.className="rename-label",this._domNode.appendChild(this._label);const e=()=>{var e,t;const[n,o]=this._acceptKeybindings;this._keybindingService.lookupKeybinding(n),this._label.innerText=(0,i.N)({key:"label",comment:['placeholders are keybindings, e.g "F2 to Rename, Shift+F2 to Preview"']},"{0} to Rename, {1} to Preview",null===(e=this._keybindingService.lookupKeybinding(n))||void 0===e?void 0:e.getLabel(),null===(t=this._keybindingService.lookupKeybinding(o))||void 0===t?void 0:t.getLabel())};e(),this._disposables.add(this._keybindingService.onDidUpdateKeybindings(e)),this._updateFont(),this._updateStyles(this._themeService.getColorTheme())}return this._domNode}_updateStyles(e){var t,n,i,o;if(!this._input||!this._domNode)return;const r=e.getColor(x.rh);this._domNode.style.backgroundColor=String(null!==(t=e.getColor(x.D0))&&void 0!==t?t:""),this._domNode.style.boxShadow=r?` 0 0 8px 2px ${r}`:"",this._domNode.style.color=String(null!==(n=e.getColor(x.zJ))&&void 0!==n?n:""),this._input.style.backgroundColor=String(null!==(i=e.getColor(x.sE))&&void 0!==i?i:"");const s=e.getColor(x.dt);this._input.style.borderWidth=s?"1px":"0px",this._input.style.borderStyle=s?"solid":"none",this._input.style.borderColor=null!==(o=null==s?void 0:s.toString())&&void 0!==o?o:"none"}_updateFont(){if(!this._input||!this._label)return;const e=this._editor.getOption(41);this._input.style.fontFamily=e.fontFamily,this._input.style.fontWeight=e.fontWeight,this._input.style.fontSize=`${e.fontSize}px`,this._label.style.fontSize=.8*e.fontSize+"px"}getPosition(){return this._visible?{position:this._position,preference:[2,1]}:null}afterRender(e){e||this.cancelInput(!0)}acceptInput(e){this._currentAcceptInput&&this._currentAcceptInput(e)}cancelInput(e){this._currentCancelInput&&this._currentCancelInput(e)}getInput(e,t,n,i,o,r){this._domNode.classList.toggle("preview",o),this._position=new S.L(e.startLineNumber,e.startColumn),this._input.value=t,this._input.setAttribute("selectionStart",n.toString()),this._input.setAttribute("selectionEnd",i.toString()),this._input.size=Math.max(1.1*(e.endColumn-e.startColumn),20);const s=new A.SL;return new Promise((e=>{this._currentCancelInput=t=>(this._currentAcceptInput=void 0,this._currentCancelInput=void 0,e(t),!0),this._currentAcceptInput=n=>{0!==this._input.value.trim().length&&this._input.value!==t?(this._currentAcceptInput=void 0,this._currentCancelInput=void 0,e({newName:this._input.value,wantsPreview:o&&n})):this.cancelInput(!0)},r.onCancellationRequested((()=>this.cancelInput(!0))),s.add(this._editor.onDidBlurEditorWidget((()=>this.cancelInput(!1)))),this._show()})).finally((()=>{s.dispose(),this._hide()}))}_show(){this._editor.revealLineInCenterIfOutsideViewport(this._position.lineNumber,0),this._visible=!0,this._visibleContextKey.set(!0),this._editor.layoutContentWidget(this),setTimeout((()=>{this._input.focus(),this._input.setSelectionRange(parseInt(this._input.getAttribute("selectionStart")),parseInt(this._input.getAttribute("selectionEnd")))}),100)}_hide(){this._visible=!1,this._visibleContextKey.reset(),this._editor.layoutContentWidget(this)}};D=function(e,t,n,i){var o,r=arguments.length,s=r<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,i);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,n,s):o(t,n))||s);return r>3&&s&&Object.defineProperty(t,n,s),s}([E(2,k.XE),E(3,L.d),E(4,r.i6)],D);var I=n(4101),M=n(6346),T=n(4314),R=n(845),O=n(9925),B=n(9422),P=n(6007),F=n(666),W=n(1640),z=n(1050),V=n(5393),H=n(3557),j=n(2065),$=n(9872),U=n(3193),Z=n(3187),K=n(8401),q=function(e,t){return function(n,i){t(n,i,e)}},Y=function(e,t,n,i){return new(n||(n=Promise))((function(o,r){function s(e){try{l(i.next(e))}catch(e){r(e)}}function a(e){try{l(i.throw(e))}catch(e){r(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,a)}l((i=i.apply(e,t||[])).next())}))};class G{constructor(e,t){this.model=e,this.position=t,this._providerRenameIdx=0,this._providers=I.G0.ordered(e)}hasProvider(){return this._providers.length>0}resolveRenameLocation(e){return Y(this,void 0,void 0,(function*(){const t=[];for(this._providerRenameIdx=0;this._providerRenameIdx0?t.join("\n"):void 0}:{range:T.e.fromPositions(this.position),text:"",rejectReason:t.length>0?t.join("\n"):void 0}}))}provideRenameEdits(e,t){return Y(this,void 0,void 0,(function*(){return this._provideRenameEdits(e,this._providerRenameIdx,[],t)}))}_provideRenameEdits(e,t,n,o){return Y(this,void 0,void 0,(function*(){const r=this._providers[t];if(!r)return{edits:[],rejectReason:n.join("\n")};const s=yield r.provideRenameEdits(this.model,this.position,e,o);return s?s.rejectReason?this._provideRenameEdits(e,t+1,n.concat(s.rejectReason),o):s:this._provideRenameEdits(e,t+1,n.concat(i.N("no result","No result.")),o)}))}}function Q(e,t,n){return Y(this,void 0,void 0,(function*(){const i=new G(e,t),o=yield i.resolveRenameLocation(z.T.None);return(null==o?void 0:o.rejectReason)?{edits:[],rejectReason:o.rejectReason}:i.provideRenameEdits(n,z.T.None)}))}let X=class e{constructor(e,t,n,i,o,r,s){this.editor=e,this._instaService=t,this._notificationService=n,this._bulkEditService=i,this._progressService=o,this._logService=r,this._configService=s,this._dispoableStore=new A.SL,this._cts=new z.A,this._renameInputField=this._dispoableStore.add(new V.Ue((()=>this._dispoableStore.add(this._instaService.createInstance(D,this.editor,["acceptRenameInput","acceptRenameInputWithPreview"])))))}static get(t){return t.getContribution(e.ID)}dispose(){this._dispoableStore.dispose(),this._cts.dispose(!0)}run(){return Y(this,void 0,void 0,(function*(){if(this._cts.dispose(!0),!this.editor.hasModel())return;const e=this.editor.getPosition(),t=new G(this.editor.getModel(),e);if(!t.hasProvider())return;let n;this._cts=new O.Dl(this.editor,5);try{const e=t.resolveRenameLocation(this._cts.token);this._progressService.showWhile(e,250),n=yield e}catch(t){return void R.O.get(this.editor).showMessage(t||i.N("resolveRenameLocationFailed","An unknown error occurred while resolving rename location"),e)}if(!n)return;if(n.rejectReason)return void R.O.get(this.editor).showMessage(n.rejectReason,e);if(this._cts.token.isCancellationRequested)return;this._cts.dispose(),this._cts=new O.Dl(this.editor,5,n.range);let o=this.editor.getSelection(),r=0,s=n.text.length;T.e.isEmpty(o)||T.e.spansMultipleLines(o)||!T.e.containsRange(n.range,o)||(r=Math.max(0,o.startColumn-n.range.startColumn),s=Math.min(n.range.endColumn,o.endColumn)-n.range.startColumn);const a=this._bulkEditService.hasPreviewHandler()&&this._configService.getValue(this.editor.getModel().uri,"editor.rename.enablePreview"),l=yield this._renameInputField.value.getInput(n.range,n.text,r,s,a,this._cts.token);if("boolean"==typeof l)return void(l&&this.editor.focus());this.editor.focus();const d=(0,V.eP)(t.provideRenameEdits(l.newName,this._cts.token),this._cts.token).then((e=>Y(this,void 0,void 0,(function*(){e&&this.editor.hasModel()&&(e.rejectReason?this._notificationService.info(e.rejectReason):this._bulkEditService.apply(P.fo.convert(e),{editor:this.editor,showPreview:l.wantsPreview,label:i.N("label","Renaming '{0}'",null==n?void 0:n.text),quotableLabel:i.N("quotableLabel","Renaming {0}",null==n?void 0:n.text)}).then((e=>{e.ariaSummary&&(0,M.Z9)(i.N("aria","Successfully renamed '{0}' to '{1}'. Summary: {2}",n.text,l.newName,e.ariaSummary))})).catch((e=>{this._notificationService.error(i.N("rename.failedApply","Rename failed to apply edits")),this._logService.error(e)})))}))),(e=>{this._notificationService.error(i.N("rename.failed","Rename failed to compute edits")),this._logService.error(e)}));return this._progressService.showWhile(d,250),d}))}acceptRenameInput(e){this._renameInputField.value.acceptInput(e)}cancelRenameInput(){this._renameInputField.value.cancelInput(!0)}};X.ID="editor.contrib.renameController",X=function(e,t,n,i){var o,r=arguments.length,s=r<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,i);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,n,s):o(t,n))||s);return r>3&&s&&Object.defineProperty(t,n,s),s}([q(1,j.TG),q(2,B.lT),q(3,P.vu),q(4,s.e),q(5,H.VZ),q(6,Z.V)],X);class J extends a.R6{constructor(){super({id:"editor.action.rename",label:i.N("rename.label","Rename Symbol"),alias:"Rename Symbol",precondition:r.Ao.and(l.u.writable,l.u.hasRenameProvider),kbOpts:{kbExpr:l.u.editorTextFocus,primary:60,weight:100},contextMenuOpts:{group:"1_modification",order:1.1}})}runCommand(e,t){const n=e.get(W.$),[i,r]=Array.isArray(t)&&t||[void 0,void 0];return F.o.isUri(i)&&S.L.isIPosition(r)?n.openCodeEditor({resource:i},n.getActiveCodeEditor()).then((e=>{e&&(e.setPosition(r),e.invokeWithinContext((t=>(this.reportTelemetry(t,e),this.run(t,e)))))}),o.dL):super.runCommand(e,t)}run(e,t){const n=X.get(t);return n?n.run():Promise.resolve()}}(0,a._K)(X.ID,X),(0,a.Qr)(J);const ee=a._l.bindToContribution(X.get);(0,a.fK)(new ee({id:"acceptRenameInput",precondition:N,handler:e=>e.acceptRenameInput(!1),kbOpts:{weight:199,kbExpr:l.u.focus,primary:3}})),(0,a.fK)(new ee({id:"acceptRenameInputWithPreview",precondition:r.Ao.and(N,r.Ao.has("config.editor.rename.enablePreview")),handler:e=>e.acceptRenameInput(!0),kbOpts:{weight:199,kbExpr:l.u.focus,primary:1027}})),(0,a.fK)(new ee({id:"cancelRenameInput",precondition:N,handler:e=>e.cancelRenameInput(),kbOpts:{weight:199,kbExpr:l.u.focus,primary:9,secondary:[1033]}})),(0,a.sb)("_executeDocumentRenameProvider",(function(e,t,...n){const[i]=n;return(0,K.p_)("string"==typeof i),Q(e,t,i)})),$.B.as(U.IP.Configuration).registerConfiguration({id:"editor",properties:{"editor.rename.enablePreview":{scope:5,description:i.N("enablePreview","Enable/disable the ability to preview changes before renaming"),default:!0,type:"boolean"}}})},689:(e,t,n)=>{"use strict";n.d(t,{x:()=>s});var i=n(187),o=n(4314),r=n(1741);class s{provideSelectionRanges(e,t){return n=this,i=void 0,r=function*(){const n=[];for(const i of t){const t=[];n.push(t);const o=new Map;yield new Promise((t=>s._bracketsRightYield(t,0,e,i,o))),yield new Promise((n=>s._bracketsLeftYield(n,0,e,i,o,t)))}return n},new((o=void 0)||(o=Promise))((function(e,t){function s(e){try{l(r.next(e))}catch(e){t(e)}}function a(e){try{l(r.throw(e))}catch(e){t(e)}}function l(t){var n;t.done?e(t.value):(n=t.value,n instanceof o?n:new o((function(e){e(n)}))).then(s,a)}l((r=r.apply(n,i||[])).next())}));var n,i,o,r}static _bracketsRightYield(e,t,n,i,o){const a=new Map,l=Date.now();for(;;){if(t>=s._maxRounds){e();break}if(!i){e();break}let d=n.findNextBracket(i);if(!d){e();break}if(Date.now()-l>s._maxDuration){setTimeout((()=>s._bracketsRightYield(e,t+1,n,i,o)));break}const c=d.close[0];if(d.isOpen){let e=a.has(c)?a.get(c):0;a.set(c,e+1)}else{let e=a.has(c)?a.get(c):0;if(e-=1,a.set(c,Math.max(0,e)),e<0){let e=o.get(c);e||(e=new r.S,o.set(c,e)),e.push(d.range)}}i=d.range.getEndPosition()}}static _bracketsLeftYield(e,t,n,i,r,a){const l=new Map,d=Date.now();for(;;){if(t>=s._maxRounds&&0===r.size){e();break}if(!i){e();break}let c=n.findPrevBracket(i);if(!c){e();break}if(Date.now()-d>s._maxDuration){setTimeout((()=>s._bracketsLeftYield(e,t+1,n,i,r,a)));break}const h=c.close[0];if(c.isOpen){let e=l.has(h)?l.get(h):0;if(e-=1,l.set(h,Math.max(0,e)),e<0){let e=r.get(h);if(e){let t=e.shift();0===e.size&&r.delete(h);const i=o.e.fromPositions(c.range.getEndPosition(),t.getStartPosition()),l=o.e.fromPositions(c.range.getStartPosition(),t.getEndPosition());a.push({range:i}),a.push({range:l}),s._addBracketLeading(n,l,a)}}}else{let e=l.has(h)?l.get(h):0;l.set(h,e+1)}i=c.range.getStartPosition()}}static _addBracketLeading(e,t,n){if(t.startLineNumber===t.endLineNumber)return;const r=t.startLineNumber,s=e.getLineFirstNonWhitespaceColumn(r);0!==s&&s!==t.startColumn&&(n.push({range:o.e.fromPositions(new i.L(r,s),t.getEndPosition())}),n.push({range:o.e.fromPositions(new i.L(r,1),t.getEndPosition())}));const a=r-1;if(a>0){const r=e.getLineFirstNonWhitespaceColumn(a);r===t.startColumn&&r!==e.getLineLastNonWhitespaceColumn(a)&&(n.push({range:o.e.fromPositions(new i.L(a,r),t.getEndPosition())}),n.push({range:o.e.fromPositions(new i.L(a,1),t.getEndPosition())}))}}}s._maxDuration=30,s._maxRounds=2},1955:(e,t,n)=>{"use strict";n.r(t),n.d(t,{provideSelectionRanges:()=>w});var i=n(9488),o=n(1050),r=n(6830),s=n(187),a=n(4314),l=n(3860),d=n(9102),c=n(4101),h=n(3580),u=n(4144),g=n(7295),p=n(689),m=n(4565),f=n(7301),_=function(e,t,n,i){return new(n||(n=Promise))((function(o,r){function s(e){try{l(i.next(e))}catch(e){r(e)}}function a(e){try{l(i.throw(e))}catch(e){r(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,a)}l((i=i.apply(e,t||[])).next())}))};class b{constructor(e,t){this.index=e,this.ranges=t}mov(e){let t=this.index+(e?1:-1);if(t<0||t>=this.ranges.length)return this;const n=new b(t,this.ranges);return n.ranges[t].equalsRange(this.ranges[this.index])?n.mov(e):n}}class C{constructor(e){this._editor=e,this._ignoreSelection=!1}static get(e){return e.getContribution(C.ID)}dispose(){var e;null===(e=this._selectionListener)||void 0===e||e.dispose()}run(e){return _(this,void 0,void 0,(function*(){if(!this._editor.hasModel())return;const t=this._editor.getSelections(),n=this._editor.getModel();if(!c.AC.has(n))return;if(this._state||(yield w(n,t.map((e=>e.getPosition())),this._editor.getOption(101),o.T.None).then((e=>{var n;if(i.Of(e)&&e.length===t.length&&this._editor.hasModel()&&i.fS(this._editor.getSelections(),t,((e,t)=>e.equalsSelection(t)))){for(let n=0;ne.containsPosition(t[n].getStartPosition())&&e.containsPosition(t[n].getEndPosition()))),e[n].unshift(t[n]);this._state=e.map((e=>new b(0,e))),null===(n=this._selectionListener)||void 0===n||n.dispose(),this._selectionListener=this._editor.onDidChangeCursorPosition((()=>{var e;this._ignoreSelection||(null===(e=this._selectionListener)||void 0===e||e.dispose(),this._state=void 0)}))}}))),!this._state)return;this._state=this._state.map((t=>t.mov(e)));const r=this._state.map((e=>l.Y.fromPositions(e.ranges[e.index].getStartPosition(),e.ranges[e.index].getEndPosition())));this._ignoreSelection=!0;try{this._editor.setSelections(r)}finally{this._ignoreSelection=!1}}))}}C.ID="editor.contrib.smartSelectController";class v extends r.R6{constructor(e,t){super(t),this._forward=e}run(e,t){return _(this,void 0,void 0,(function*(){let e=C.get(t);e&&(yield e.run(this._forward))}))}}function w(e,t,n,o){return _(this,void 0,void 0,(function*(){const r=c.AC.all(e);1===r.length&&r.unshift(new p.x);let l=[],d=[];for(const n of r)l.push(Promise.resolve(n.provideSelectionRanges(e,t,o)).then((e=>{if(i.Of(e)&&e.length===t.length)for(let n=0;n{if(0===t.length)return[];t.sort(((e,t)=>s.L.isBefore(e.getStartPosition(),t.getStartPosition())?1:s.L.isBefore(t.getStartPosition(),e.getStartPosition())||s.L.isBefore(e.getEndPosition(),t.getEndPosition())?-1:s.L.isBefore(t.getEndPosition(),e.getEndPosition())?1:0));let i,o=[];for(const e of t)(!i||a.e.containsRange(e,i)&&!a.e.equalsRange(e,i))&&(o.push(e),i=e);if(!n.selectLeadingAndTrailingWhitespace)return o;let r=[o[0]];for(let t=1;t=0;l--){let e=o.charCodeAt(l);if(l!==s&&(95===e||45===e))break;if((0,g.mK)(e)&&(0,g.df)(c))break;c=e}for(l+=1;d0&&0===t.getLineFirstNonWhitespaceColumn(n.lineNumber)&&0===t.getLineLastNonWhitespaceColumn(n.lineNumber)&&e.push({range:new a.e(n.lineNumber,1,n.lineNumber,t.getLineMaxColumn(n.lineNumber))})}}),(0,r.f)("_executeSelectionRangeProvider",(function(e,...t){const[n]=t;return w(e,n,{selectLeadingAndTrailingWhitespace:!0},o.T.None)}))},2860:(e,t,n)=>{"use strict";n.r(t),n.d(t,{SnippetController2:()=>m});var i=n(5976),o=n(6830),r=n(4314),s=n(3860),a=n(9102),l=n(9599),d=n(8819),c=n(3557),h=n(781),u=n(3580),g=function(e,t){return function(n,i){t(n,i,e)}};const p={overwriteBefore:0,overwriteAfter:0,undoStopBefore:!0,undoStopAfter:!0,adjustWhitespace:!0,clipboardText:void 0,overtypingCapturer:void 0};let m=class e{constructor(t,n,o){this._editor=t,this._logService=n,this._snippetListener=new i.SL,this._modelVersionId=-1,this._inSnippet=e.InSnippetMode.bindTo(o),this._hasNextTabstop=e.HasNextTabstop.bindTo(o),this._hasPrevTabstop=e.HasPrevTabstop.bindTo(o)}static get(t){return t.getContribution(e.ID)}dispose(){var e;this._inSnippet.reset(),this._hasPrevTabstop.reset(),this._hasNextTabstop.reset(),null===(e=this._session)||void 0===e||e.dispose(),this._snippetListener.dispose()}insert(e,t){try{this._doInsert(e,void 0===t?p:Object.assign(Object.assign({},p),t))}catch(t){this.cancel(),this._logService.error(t),this._logService.error("snippet_error"),this._logService.error("insert_template=",e),this._logService.error("existing_template=",this._session?this._session._logInfo():"")}}_doInsert(e,t){this._editor.hasModel()&&(this._snippetListener.clear(),t.undoStopBefore&&this._editor.getModel().pushStackElement(),this._session?this._session.merge(e,t):(this._modelVersionId=this._editor.getModel().getAlternativeVersionId(),this._session=new h.l(this._editor,e,t),this._session.insert()),t.undoStopAfter&&this._editor.getModel().pushStackElement(),this._updateState(),this._snippetListener.add(this._editor.onDidChangeModelContent((e=>e.isFlush&&this.cancel()))),this._snippetListener.add(this._editor.onDidChangeModel((()=>this.cancel()))),this._snippetListener.add(this._editor.onDidChangeCursorSelection((()=>this._updateState()))))}_updateState(){if(this._session&&this._editor.hasModel()){if(this._modelVersionId===this._editor.getModel().getAlternativeVersionId())return this.cancel();if(!this._session.hasPlaceholder)return this.cancel();if(this._session.isAtLastPlaceholder||!this._session.isSelectionWithinPlaceholders())return this.cancel();this._inSnippet.set(!0),this._hasPrevTabstop.set(!this._session.isAtFirstPlaceholder),this._hasNextTabstop.set(!this._session.isAtLastPlaceholder),this._handleChoice()}}_handleChoice(){if(!this._session||!this._editor.hasModel())return void(this._currentChoice=void 0);const{choice:e}=this._session;if(e){if(this._currentChoice!==e){this._currentChoice=e,this._editor.setSelections(this._editor.getSelections().map((e=>s.Y.fromPositions(e.getStartPosition()))));const[t]=e.options;(0,l.i5)(this._editor,e.options.map(((e,n)=>({kind:13,label:e.value,insertText:e.value,sortText:"a".repeat(n+1),range:r.e.fromPositions(this._editor.getPosition(),this._editor.getPosition().delta(0,t.value.length))}))))}}else this._currentChoice=void 0}finish(){for(;this._inSnippet.get();)this.next()}cancel(e=!1){var t;this._inSnippet.reset(),this._hasPrevTabstop.reset(),this._hasNextTabstop.reset(),this._snippetListener.clear(),null===(t=this._session)||void 0===t||t.dispose(),this._session=void 0,this._modelVersionId=-1,e&&this._editor.setSelections([this._editor.getSelection()])}prev(){this._session&&this._session.prev(),this._updateState()}next(){this._session&&this._session.next(),this._updateState()}isInSnippet(){return Boolean(this._inSnippet.get())}};m.ID="snippetController2",m.InSnippetMode=new d.uy("inSnippetMode",!1,(0,u.N)("inSnippetMode","Whether the editor in current in snippet mode")),m.HasNextTabstop=new d.uy("hasNextTabstop",!1,(0,u.N)("hasNextTabstop","Whether there is a next tab stop when in snippet mode")),m.HasPrevTabstop=new d.uy("hasPrevTabstop",!1,(0,u.N)("hasPrevTabstop","Whether there is a previous tab stop when in snippet mode")),m=function(e,t,n,i){var o,r=arguments.length,s=r<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,i);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,n,s):o(t,n))||s);return r>3&&s&&Object.defineProperty(t,n,s),s}([g(1,c.VZ),g(2,d.i6)],m),(0,o._K)(m.ID,m);const f=o._l.bindToContribution(m.get);(0,o.fK)(new f({id:"jumpToNextSnippetPlaceholder",precondition:d.Ao.and(m.InSnippetMode,m.HasNextTabstop),handler:e=>e.next(),kbOpts:{weight:130,kbExpr:a.u.editorTextFocus,primary:2}})),(0,o.fK)(new f({id:"jumpToPrevSnippetPlaceholder",precondition:d.Ao.and(m.InSnippetMode,m.HasPrevTabstop),handler:e=>e.prev(),kbOpts:{weight:130,kbExpr:a.u.editorTextFocus,primary:1026}})),(0,o.fK)(new f({id:"leaveSnippet",precondition:m.InSnippetMode,handler:e=>e.cancel(!0),kbOpts:{weight:130,kbExpr:a.u.editorTextFocus,primary:9,secondary:[1033]}})),(0,o.fK)(new f({id:"acceptSnippet",precondition:m.InSnippetMode,handler:e=>e.finish()}))},3472:(e,t,n)=>{"use strict";n.d(t,{xv:()=>r,Vm:()=>a,Lv:()=>l,Yj:()=>p});class i{constructor(){this.value="",this.pos=0}static isDigitCharacter(e){return e>=48&&e<=57}static isVariableCharacter(e){return 95===e||e>=97&&e<=122||e>=65&&e<=90}text(e){this.value=e,this.pos=0}tokenText(e){return this.value.substr(e.pos,e.len)}next(){if(this.pos>=this.value.length)return{type:14,pos:this.pos,len:0};let e,t=this.pos,n=0,o=this.value.charCodeAt(t);if(e=i._table[o],"number"==typeof e)return this.pos+=1,{type:e,pos:t,len:1};if(i.isDigitCharacter(o)){e=8;do{n+=1,o=this.value.charCodeAt(t+n)}while(i.isDigitCharacter(o));return this.pos+=n,{type:e,pos:t,len:n}}if(i.isVariableCharacter(o)){e=9;do{o=this.value.charCodeAt(t+ ++n)}while(i.isVariableCharacter(o)||i.isDigitCharacter(o));return this.pos+=n,{type:e,pos:t,len:n}}e=10;do{n+=1,o=this.value.charCodeAt(t+n)}while(!isNaN(o)&&void 0===i._table[o]&&!i.isDigitCharacter(o)&&!i.isVariableCharacter(o));return this.pos+=n,{type:e,pos:t,len:n}}}i._table={36:0,58:1,44:2,123:3,125:4,92:5,47:6,124:7,43:11,45:12,63:13};class o{constructor(){this._children=[]}appendChild(e){return e instanceof r&&this._children[this._children.length-1]instanceof r?this._children[this._children.length-1].value+=e.value:(e.parent=this,this._children.push(e)),this}replace(e,t){const{parent:n}=e,i=n.children.indexOf(e),o=n.children.slice(0);o.splice(i,1,...t),n._children=o,function e(t,n){for(const i of t)i.parent=n,e(i.children,i)}(t,n)}get children(){return this._children}get snippet(){let e=this;for(;;){if(!e)return;if(e instanceof g)return e;e=e.parent}}toString(){return this.children.reduce(((e,t)=>e+t.toString()),"")}len(){return 0}}class r extends o{constructor(e){super(),this.value=e}toString(){return this.value}len(){return this.value.length}clone(){return new r(this.value)}}class s extends o{}class a extends s{constructor(e){super(),this.index=e}static compareByIndex(e,t){return e.index===t.index?0:e.isFinalTabstop?1:t.isFinalTabstop||e.indext.index?1:0}get isFinalTabstop(){return 0===this.index}get choice(){return 1===this._children.length&&this._children[0]instanceof l?this._children[0]:void 0}clone(){let e=new a(this.index);return this.transform&&(e.transform=this.transform.clone()),e._children=this.children.map((e=>e.clone())),e}}class l extends o{constructor(){super(...arguments),this.options=[]}appendChild(e){return e instanceof r&&(e.parent=this,this.options.push(e)),this}toString(){return this.options[0].value}len(){return this.options[0].len()}clone(){let e=new l;return this.options.forEach(e.appendChild,e),e}}class d extends o{constructor(){super(...arguments),this.regexp=new RegExp("")}resolve(e){const t=this;let n=!1,i=e.replace(this.regexp,(function(){return n=!0,t._replace(Array.prototype.slice.call(arguments,0,-2))}));return!n&&this._children.some((e=>e instanceof c&&Boolean(e.elseValue)))&&(i=this._replace([])),i}_replace(e){let t="";for(const n of this._children)if(n instanceof c){let i=e[n.index]||"";i=n.resolve(i),t+=i}else t+=n.toString();return t}toString(){return""}clone(){let e=new d;return e.regexp=new RegExp(this.regexp.source,(this.regexp.ignoreCase?"i":"")+(this.regexp.global?"g":"")),e._children=this.children.map((e=>e.clone())),e}}class c extends o{constructor(e,t,n,i){super(),this.index=e,this.shorthandName=t,this.ifValue=n,this.elseValue=i}resolve(e){return"upcase"===this.shorthandName?e?e.toLocaleUpperCase():"":"downcase"===this.shorthandName?e?e.toLocaleLowerCase():"":"capitalize"===this.shorthandName?e?e[0].toLocaleUpperCase()+e.substr(1):"":"pascalcase"===this.shorthandName?e?this._toPascalCase(e):"":"camelcase"===this.shorthandName?e?this._toCamelCase(e):"":Boolean(e)&&"string"==typeof this.ifValue?this.ifValue:Boolean(e)||"string"!=typeof this.elseValue?e||"":this.elseValue}_toPascalCase(e){const t=e.match(/[a-z0-9]+/gi);return t?t.map((e=>e.charAt(0).toUpperCase()+e.substr(1).toLowerCase())).join(""):e}_toCamelCase(e){const t=e.match(/[a-z0-9]+/gi);return t?t.map(((e,t)=>0===t?e.toLowerCase():e.charAt(0).toUpperCase()+e.substr(1).toLowerCase())).join(""):e}clone(){return new c(this.index,this.shorthandName,this.ifValue,this.elseValue)}}class h extends s{constructor(e){super(),this.name=e}resolve(e){let t=e.resolve(this);return this.transform&&(t=this.transform.resolve(t||"")),void 0!==t&&(this._children=[new r(t)],!0)}clone(){const e=new h(this.name);return this.transform&&(e.transform=this.transform.clone()),e._children=this.children.map((e=>e.clone())),e}}function u(e,t){const n=[...e];for(;n.length>0;){const e=n.shift();if(!t(e))break;n.unshift(...e.children)}}class g extends o{get placeholderInfo(){if(!this._placeholders){let e,t=[];this.walk((function(n){return n instanceof a&&(t.push(n),e=!e||e.indexi===e?(n=!0,!1):(t+=i.len(),!0))),n?t:-1}fullLen(e){let t=0;return u([e],(e=>(t+=e.len(),!0))),t}enclosingPlaceholders(e){let t=[],{parent:n}=e;for(;n;)n instanceof a&&t.push(n),n=n.parent;return t}resolveVariables(e){return this.walk((t=>(t instanceof h&&t.resolve(e)&&(this._placeholders=void 0),!0))),this}appendChild(e){return this._placeholders=void 0,super.appendChild(e)}replace(e,t){return this._placeholders=void 0,super.replace(e,t)}clone(){let e=new g;return this._children=this.children.map((e=>e.clone())),e}walk(e){u(this.children,e)}}class p{constructor(){this._scanner=new i,this._token={type:14,pos:0,len:0}}static escape(e){return e.replace(/\$|}|\\/g,"\\$&")}static guessNeedsClipboard(e){return/\${?CLIPBOARD/.test(e)}parse(e,t,n){this._scanner.text(e),this._token=this._scanner.next();const i=new g;for(;this._parse(i););const o=new Map,r=[];let s=0;i.walk((e=>(e instanceof a&&(s+=1,e.isFinalTabstop?o.set(0,void 0):!o.has(e.index)&&e.children.length>0?o.set(e.index,e.children):r.push(e)),!0)));for(const e of r){const t=o.get(e.index);if(t){const n=new a(e.index);n.transform=e.transform;for(const e of t)n.appendChild(e.clone());i.replace(e,[n])}}return n||(n=s>0&&t),!o.has(0)&&n&&i.appendChild(new a(0)),i}_accept(e,t){if(void 0===e||this._token.type===e){let e=!t||this._scanner.tokenText(this._token);return this._token=this._scanner.next(),e}return!1}_backTo(e){return this._scanner.pos=e.pos+e.len,this._token=e,!1}_until(e){const t=this._token;for(;this._token.type!==e;){if(14===this._token.type)return!1;if(5===this._token.type){const e=this._scanner.next();if(0!==e.type&&4!==e.type&&5!==e.type)return!1}this._token=this._scanner.next()}const n=this._scanner.value.substring(t.pos,this._token.pos).replace(/\\(\$|}|\\)/g,"$1");return this._token=this._scanner.next(),n}_parse(e){return this._parseEscaped(e)||this._parseTabstopOrVariableName(e)||this._parseComplexPlaceholder(e)||this._parseComplexVariable(e)||this._parseAnything(e)}_parseEscaped(e){let t;return!!(t=this._accept(5,!0))&&(t=this._accept(0,!0)||this._accept(4,!0)||this._accept(5,!0)||t,e.appendChild(new r(t)),!0)}_parseTabstopOrVariableName(e){let t;const n=this._token;return this._accept(0)&&(t=this._accept(9,!0)||this._accept(8,!0))?(e.appendChild(/^\d+$/.test(t)?new a(Number(t)):new h(t)),!0):this._backTo(n)}_parseComplexPlaceholder(e){let t;const n=this._token;if(!(this._accept(0)&&this._accept(3)&&(t=this._accept(8,!0))))return this._backTo(n);const i=new a(Number(t));if(this._accept(1))for(;;){if(this._accept(4))return e.appendChild(i),!0;if(!this._parse(i))return e.appendChild(new r("${"+t+":")),i.children.forEach(e.appendChild,e),!0}else{if(!(i.index>0&&this._accept(7)))return this._accept(6)?this._parseTransform(i)?(e.appendChild(i),!0):(this._backTo(n),!1):this._accept(4)?(e.appendChild(i),!0):this._backTo(n);{const t=new l;for(;;){if(this._parseChoiceElement(t)){if(this._accept(2))continue;if(this._accept(7)&&(i.appendChild(t),this._accept(4)))return e.appendChild(i),!0}return this._backTo(n),!1}}}}_parseChoiceElement(e){const t=this._token,n=[];for(;2!==this._token.type&&7!==this._token.type;){let e;if(e=(e=this._accept(5,!0))?this._accept(2,!0)||this._accept(7,!0)||this._accept(5,!0)||e:this._accept(void 0,!0),!e)return this._backTo(t),!1;n.push(e)}return 0===n.length?(this._backTo(t),!1):(e.appendChild(new r(n.join(""))),!0)}_parseComplexVariable(e){let t;const n=this._token;if(!(this._accept(0)&&this._accept(3)&&(t=this._accept(9,!0))))return this._backTo(n);const i=new h(t);if(!this._accept(1))return this._accept(6)?this._parseTransform(i)?(e.appendChild(i),!0):(this._backTo(n),!1):this._accept(4)?(e.appendChild(i),!0):this._backTo(n);for(;;){if(this._accept(4))return e.appendChild(i),!0;if(!this._parse(i))return e.appendChild(new r("${"+t+":")),i.children.forEach(e.appendChild,e),!0}}_parseTransform(e){let t=new d,n="",i="";for(;!this._accept(6);){let e;if(e=this._accept(5,!0))e=this._accept(6,!0)||e,n+=e;else{if(14===this._token.type)return!1;n+=this._accept(void 0,!0)}}for(;!this._accept(6);){let e;if(e=this._accept(5,!0))e=this._accept(5,!0)||this._accept(6,!0)||e,t.appendChild(new r(e));else if(!this._parseFormatString(t)&&!this._parseAnything(t))return!1}for(;!this._accept(4);){if(14===this._token.type)return!1;i+=this._accept(void 0,!0)}try{t.regexp=new RegExp(n,i)}catch(e){return!1}return e.transform=t,!0}_parseFormatString(e){const t=this._token;if(!this._accept(0))return!1;let n=!1;this._accept(3)&&(n=!0);let i=this._accept(8,!0);if(!i)return this._backTo(t),!1;if(!n)return e.appendChild(new c(Number(i))),!0;if(this._accept(4))return e.appendChild(new c(Number(i))),!0;if(!this._accept(1))return this._backTo(t),!1;if(this._accept(6)){let n=this._accept(9,!0);return n&&this._accept(4)?(e.appendChild(new c(Number(i),n)),!0):(this._backTo(t),!1)}if(this._accept(11)){let t=this._until(4);if(t)return e.appendChild(new c(Number(i),void 0,t,void 0)),!0}else if(this._accept(12)){let t=this._until(4);if(t)return e.appendChild(new c(Number(i),void 0,void 0,t)),!0}else if(this._accept(13)){let t=this._until(1);if(t){let n=this._until(4);if(n)return e.appendChild(new c(Number(i),void 0,t,n)),!0}}else{let t=this._until(4);if(t)return e.appendChild(new c(Number(i),void 0,void 0,t)),!0}return this._backTo(t),!1}_parseAnything(e){return 14!==this._token.type&&(e.appendChild(new r(this._scanner.tokenText(this._token))),this._accept(void 0),!0)}}},781:(e,t,n)=>{"use strict";n.d(t,{l:()=>Q});var i=n(9488),o=n(5976),r=n(7295),s=n(3379),a=n.n(s),l=n(7795),d=n.n(l),c=n(569),h=n.n(c),u=n(3565),g=n.n(u),p=n(9216),m=n.n(p),f=n(4589),_=n.n(f),b=n(8894),C={};C.styleTagTransform=_(),C.setAttributes=g(),C.insert=h().bind(null,"head"),C.domAPI=d(),C.insertStyleElement=m(),a()(b.Z,C),b.Z&&b.Z.locals&&b.Z.locals;var v=n(9386),w=n(4314),y=n(3860),A=n(3103),S=n(382),x=n(2065),k=n(3472),L=n(3580),E=n(8721),N=n(5935),D=n(3831),I=n(666);const M="code-workspace";function T(e){const t=e;return"string"==typeof(null==t?void 0:t.id)&&I.o.isUri(t.uri)}var R=n(8843);const O=new Uint8Array(16),B=[];for(let e=0;e<256;e++)B.push(e.toString(16).padStart(2,"0"));let P;P="object"==typeof crypto&&"function"==typeof crypto.getRandomValues?crypto.getRandomValues.bind(crypto):function(e){for(let t=0;tt!==e&&(t instanceof k.xv&&(o=(0,r.V8)((0,r.uq)(t.value).pop())),!0)));const s=(0,r.Mh)(o,i);t=t.replace(/(\r\n|\r|\n)(.*)/g,((e,t,n)=>`${t}${o.substr(s)}${n}`))}return t}if("TM_CURRENT_LINE"===t)return this._model.getLineContent(this._selection.positionLineNumber);if("TM_CURRENT_WORD"===t){const e=this._model.getWordAtPosition({lineNumber:this._selection.positionLineNumber,column:this._selection.positionColumn});return e&&e.word||void 0}return"TM_LINE_INDEX"===t?String(this._selection.positionLineNumber-1):"TM_LINE_NUMBER"===t?String(this._selection.positionLineNumber):void 0}}class z{constructor(e,t){this._labelService=e,this._model=t}resolve(e){const{name:t}=e;if("TM_FILENAME"===t)return E.EZ(this._model.uri.fsPath);if("TM_FILENAME_BASE"===t){const e=E.EZ(this._model.uri.fsPath),t=e.lastIndexOf(".");return t<=0?e:e.slice(0,t)}return"TM_DIRECTORY"===t&&this._labelService?"."===E.XX(this._model.uri.fsPath)?"":this._labelService.getUriLabel((0,N.XX)(this._model.uri)):"TM_FILEPATH"===t&&this._labelService?this._labelService.getUriLabel(this._model.uri):"RELATIVE_FILEPATH"===t&&this._labelService?this._labelService.getUriLabel(this._model.uri,{relative:!0,noPrefix:!0}):void 0}}class V{constructor(e,t,n,i){this._readClipboardText=e,this._selectionIdx=t,this._selectionCount=n,this._spread=i}resolve(e){if("CLIPBOARD"!==e.name)return;const t=this._readClipboardText();if(t){if(this._spread){const e=t.split(/\r\n|\n|\r/).filter((e=>!(0,r.m5)(e)));if(e.length===this._selectionCount)return e[this._selectionIdx]}return t}}}class H{constructor(e,t){this._model=e,this._selection=t}resolve(e){const{name:t}=e,n=this._model.getLanguageIdAtPosition(this._selection.selectionStartLineNumber,this._selection.selectionStartColumn),i=D.zu.getComments(n);if(i)return"LINE_COMMENT"===t?i.lineCommentToken||void 0:"BLOCK_COMMENT_START"===t?i.blockCommentStartToken||void 0:"BLOCK_COMMENT_END"===t&&i.blockCommentEndToken||void 0}}class j{constructor(){this._date=new Date}resolve(e){const{name:t}=e;return"CURRENT_YEAR"===t?String(this._date.getFullYear()):"CURRENT_YEAR_SHORT"===t?String(this._date.getFullYear()).slice(-2):"CURRENT_MONTH"===t?String(this._date.getMonth().valueOf()+1).padStart(2,"0"):"CURRENT_DATE"===t?String(this._date.getDate().valueOf()).padStart(2,"0"):"CURRENT_HOUR"===t?String(this._date.getHours().valueOf()).padStart(2,"0"):"CURRENT_MINUTE"===t?String(this._date.getMinutes().valueOf()).padStart(2,"0"):"CURRENT_SECOND"===t?String(this._date.getSeconds().valueOf()).padStart(2,"0"):"CURRENT_DAY_NAME"===t?j.dayNames[this._date.getDay()]:"CURRENT_DAY_NAME_SHORT"===t?j.dayNamesShort[this._date.getDay()]:"CURRENT_MONTH_NAME"===t?j.monthNames[this._date.getMonth()]:"CURRENT_MONTH_NAME_SHORT"===t?j.monthNamesShort[this._date.getMonth()]:"CURRENT_SECONDS_UNIX"===t?String(Math.floor(this._date.getTime()/1e3)):void 0}}j.dayNames=[L.N("Sunday","Sunday"),L.N("Monday","Monday"),L.N("Tuesday","Tuesday"),L.N("Wednesday","Wednesday"),L.N("Thursday","Thursday"),L.N("Friday","Friday"),L.N("Saturday","Saturday")],j.dayNamesShort=[L.N("SundayShort","Sun"),L.N("MondayShort","Mon"),L.N("TuesdayShort","Tue"),L.N("WednesdayShort","Wed"),L.N("ThursdayShort","Thu"),L.N("FridayShort","Fri"),L.N("SaturdayShort","Sat")],j.monthNames=[L.N("January","January"),L.N("February","February"),L.N("March","March"),L.N("April","April"),L.N("May","May"),L.N("June","June"),L.N("July","July"),L.N("August","August"),L.N("September","September"),L.N("October","October"),L.N("November","November"),L.N("December","December")],j.monthNamesShort=[L.N("JanuaryShort","Jan"),L.N("FebruaryShort","Feb"),L.N("MarchShort","Mar"),L.N("AprilShort","Apr"),L.N("MayShort","May"),L.N("JuneShort","Jun"),L.N("JulyShort","Jul"),L.N("AugustShort","Aug"),L.N("SeptemberShort","Sep"),L.N("OctoberShort","Oct"),L.N("NovemberShort","Nov"),L.N("DecemberShort","Dec")];class ${constructor(e){this._workspaceService=e}resolve(e){if(!this._workspaceService)return;const t=function(e){return e.configuration?{id:e.id,configPath:e.configuration}:1===e.folders.length?{id:e.id,uri:e.folders[0].uri}:void 0}(this._workspaceService.getWorkspace());return t?"WORKSPACE_NAME"===e.name?this._resolveWorkspaceName(t):"WORKSPACE_FOLDER"===e.name?this._resoveWorkspacePath(t):void 0:void 0}_resolveWorkspaceName(e){if(T(e))return E.EZ(e.uri.path);let t=E.EZ(e.configPath.path);return t.endsWith(M)&&(t=t.substr(0,t.length-M.length-1)),t}_resoveWorkspacePath(e){if(T(e))return(0,R.D)(e.uri.fsPath);let t=E.EZ(e.configPath.path),n=e.configPath.fsPath;return n.endsWith(t)&&(n=n.substr(0,n.length-t.length-1)),n?(0,R.D)(n):"/"}}class U{resolve(e){const{name:t}=e;return"RANDOM"===t?Math.random().toString().slice(-6):"RANDOM_HEX"===t?Math.random().toString(16).slice(-6):"UUID"===t?function(){P(O),O[6]=15&O[6]|64,O[8]=63&O[8]|128;let e=0,t="";return t+=B[O[e++]],t+=B[O[e++]],t+=B[O[e++]],t+=B[O[e++]],t+="-",t+=B[O[e++]],t+=B[O[e++]],t+="-",t+=B[O[e++]],t+=B[O[e++]],t+="-",t+=B[O[e++]],t+=B[O[e++]],t+="-",t+=B[O[e++]],t+=B[O[e++]],t+=B[O[e++]],t+=B[O[e++]],t+=B[O[e++]],t+=B[O[e++]],t}():void 0}}var Z=n(7781),K=n(3910),q=n(4349);(0,Z.Ic)(((e,t)=>{function n(t){const n=e.getColor(t);return n?n.toString():"transparent"}t.addRule(`.monaco-editor .snippet-placeholder { background-color: ${n(K.u2)}; outline-color: ${n(K.Pk)}; }`),t.addRule(`.monaco-editor .finish-snippet-placeholder { background-color: ${n(K.I1)}; outline-color: ${n(K.U6)}; }`)}));class Y{constructor(e,t,n,o){this._editor=e,this._snippet=t,this._offset=n,this._snippetLineLeadingWhitespace=o,this._nestingLevel=1,this._placeholderGroups=(0,i.vM)(t.placeholders,k.Vm.compareByIndex),this._placeholderGroupsIdx=-1}dispose(){this._placeholderDecorations&&this._editor.deltaDecorations([...this._placeholderDecorations.values()],[]),this._placeholderGroups.length=0}_initDecorations(){if(this._placeholderDecorations)return;this._placeholderDecorations=new Map;const e=this._editor.getModel();this._editor.changeDecorations((t=>{for(const n of this._snippet.placeholders){const i=this._snippet.offset(n),o=this._snippet.fullLen(n),r=w.e.fromPositions(e.getPositionAt(this._offset+i),e.getPositionAt(this._offset+i+o)),s=n.isFinalTabstop?Y._decor.inactiveFinal:Y._decor.inactive,a=t.addDecoration(r,s);this._placeholderDecorations.set(n,a)}}))}move(e){if(!this._editor.hasModel())return[];if(this._initDecorations(),this._placeholderGroupsIdx>=0){let e=[];for(const t of this._placeholderGroups[this._placeholderGroupsIdx])if(t.transform){const n=this._placeholderDecorations.get(t),i=this._editor.getModel().getDecorationRange(n),o=this._editor.getModel().getValueInRange(i),r=t.transform.resolve(o).split(/\r\n|\r|\n/);for(let e=1;e0&&this._editor.executeEdits("snippet.placeholderTransform",e)}let t=!1;!0===e&&this._placeholderGroupsIdx0&&(this._placeholderGroupsIdx-=1,t=!0);const n=this._editor.getModel().changeDecorations((e=>{const n=new Set,i=[];for(const o of this._placeholderGroups[this._placeholderGroupsIdx]){const r=this._placeholderDecorations.get(o),s=this._editor.getModel().getDecorationRange(r);i.push(new y.Y(s.startLineNumber,s.startColumn,s.endLineNumber,s.endColumn)),t=t&&this._hasPlaceholderBeenCollapsed(o),e.changeDecorationOptions(r,o.isFinalTabstop?Y._decor.activeFinal:Y._decor.active),n.add(o);for(const t of this._snippet.enclosingPlaceholders(o)){const i=this._placeholderDecorations.get(t);e.changeDecorationOptions(i,t.isFinalTabstop?Y._decor.activeFinal:Y._decor.active),n.add(t)}}for(const[t,i]of this._placeholderDecorations)n.has(t)||e.changeDecorationOptions(i,t.isFinalTabstop?Y._decor.inactiveFinal:Y._decor.inactive);return i}));return t?this.move(e):null!=n?n:[]}_hasPlaceholderBeenCollapsed(e){let t=e;for(;t;){if(t instanceof k.Vm){const e=this._placeholderDecorations.get(t);if(this._editor.getModel().getDecorationRange(e).isEmpty()&&t.toString().length>0)return!0}t=t.parent}return!1}get isAtFirstPlaceholder(){return this._placeholderGroupsIdx<=0||0===this._placeholderGroups.length}get isAtLastPlaceholder(){return this._placeholderGroupsIdx===this._placeholderGroups.length-1}get hasPlaceholder(){return this._snippet.placeholders.length>0}computePossibleSelections(){const e=new Map;for(const t of this._placeholderGroups){let n;for(const i of t){if(i.isFinalTabstop)break;n||(n=[],e.set(i.index,n));const t=this._placeholderDecorations.get(i),o=this._editor.getModel().getDecorationRange(t);if(!o){e.delete(i.index);break}n.push(o)}}return e}get choice(){return this._placeholderGroups[this._placeholderGroupsIdx][0].choice}merge(e){const t=this._editor.getModel();this._nestingLevel*=10,this._editor.changeDecorations((n=>{for(const i of this._placeholderGroups[this._placeholderGroupsIdx]){const o=e.shift();console.assert(!o._placeholderDecorations);const r=o._snippet.placeholderInfo.last.index;for(const e of o._snippet.placeholderInfo.all)e.isFinalTabstop?e.index=i.index+(r+1)/this._nestingLevel:e.index=i.index+e.index/this._nestingLevel;this._snippet.replace(i,o._snippet.children);const s=this._placeholderDecorations.get(i);n.removeDecoration(s),this._placeholderDecorations.delete(i);for(const e of o._snippet.placeholders){const i=o._snippet.offset(e),r=o._snippet.fullLen(e),s=w.e.fromPositions(t.getPositionAt(o._offset+i),t.getPositionAt(o._offset+i+r)),a=n.addDecoration(s,Y._decor.inactive);this._placeholderDecorations.set(e,a)}}this._placeholderGroups=(0,i.vM)(this._snippet.placeholders,k.Vm.compareByIndex)}))}}Y._decor={active:A.qx.register({description:"snippet-placeholder-1",stickiness:0,className:"snippet-placeholder"}),inactive:A.qx.register({description:"snippet-placeholder-2",stickiness:1,className:"snippet-placeholder"}),activeFinal:A.qx.register({description:"snippet-placeholder-3",stickiness:1,className:"finish-snippet-placeholder"}),inactiveFinal:A.qx.register({description:"snippet-placeholder-4",stickiness:1,className:"finish-snippet-placeholder"})};const G={overwriteBefore:0,overwriteAfter:0,adjustWhitespace:!0,clipboardText:void 0,overtypingCapturer:void 0};class Q{constructor(e,t,n=G){this._templateMerges=[],this._snippets=[],this._editor=e,this._template=t,this._options=n}static adjustWhitespace(e,t,n,i,o){const s=e.getLineContent(t.lineNumber),a=(0,r.V8)(s,0,t.column-1);let l;return n.walk((t=>{if(!(t instanceof k.xv)||t.parent instanceof k.Lv)return!0;const o=t.value.split(/\r\n|\r|\n/);if(i){const i=n.offset(t);if(0===i)o[0]=e.normalizeIndentation(o[0]);else{l=null!=l?l:n.toString();let t=l.charCodeAt(i-1);10!==t&&13!==t||(o[0]=e.normalizeIndentation(a+o[0]))}for(let t=1;te.get(S.ec,x.jt))),u=e.invokeWithinContext((e=>new z(e.get(q.e,x.jt),c))),g=()=>s;let p=0,m=c.getValueInRange(Q.adjustSelection(c,e.getSelection(),n,0)),f=c.getValueInRange(Q.adjustSelection(c,e.getSelection(),0,i)),_=c.getLineFirstNonWhitespaceColumn(e.getSelection().positionLineNumber);const b=e.getSelections().map(((e,t)=>({selection:e,idx:t}))).sort(((e,t)=>w.e.compareRangesUsingStarts(e.selection,t.selection)));for(const{selection:s,idx:C}of b){let w=Q.adjustSelection(c,s,n,0),y=Q.adjustSelection(c,s,0,i);m!==c.getValueInRange(w)&&(w=s),f!==c.getValueInRange(y)&&(y=s);const A=s.setStartPosition(w.startLineNumber,w.startColumn).setEndPosition(y.endLineNumber,y.endColumn),S=(new k.Yj).parse(t,!0,o),x=A.getStartPosition(),L=Q.adjustWhitespace(c,x,S,r||C>0&&_!==c.getLineFirstNonWhitespaceColumn(s.positionLineNumber),!0);S.resolveVariables(new F([u,new V(g,C,b.length,"spread"===e.getOption(69)),new W(c,s,C,a),new H(c,s),new j,new $(h),new U]));const E=c.getOffsetAt(x)+p;p+=S.toString().length-c.getValueLengthInRange(A),l[C]=v.h.replace(A,S.toString()),l[C].identifier={major:C,minor:0},d[C]=new Y(e,S,E,L)}return{edits:l,snippets:d}}dispose(){(0,o.B9)(this._snippets)}_logInfo(){return`template="${this._template}", merged_templates="${this._templateMerges.join(" -> ")}"`}insert(){if(!this._editor.hasModel())return;const{edits:e,snippets:t}=Q.createEditsAndSnippets(this._editor,this._template,this._options.overwriteBefore,this._options.overwriteAfter,!1,this._options.adjustWhitespace,this._options.clipboardText,this._options.overtypingCapturer);this._snippets=t,this._editor.executeEdits("snippet",e,(e=>this._snippets[0].hasPlaceholder?this._move(!0):e.filter((e=>!!e.identifier)).map((e=>y.Y.fromPositions(e.range.getEndPosition()))))),this._editor.revealRange(this._editor.getSelections()[0])}merge(e,t=G){if(!this._editor.hasModel())return;this._templateMerges.push([this._snippets[0]._nestingLevel,this._snippets[0]._placeholderGroupsIdx,e]);const{edits:n,snippets:i}=Q.createEditsAndSnippets(this._editor,e,t.overwriteBefore,t.overwriteAfter,!0,t.adjustWhitespace,t.clipboardText,t.overtypingCapturer);this._editor.executeEdits("snippet",n,(e=>{for(const e of this._snippets)e.merge(i);return console.assert(0===i.length),this._snippets[0].hasPlaceholder?this._move(void 0):e.filter((e=>!!e.identifier)).map((e=>y.Y.fromPositions(e.range.getEndPosition())))}))}next(){const e=this._move(!0);this._editor.setSelections(e),this._editor.revealPositionInCenterIfOutsideViewport(e[0].getPosition())}prev(){const e=this._move(!1);this._editor.setSelections(e),this._editor.revealPositionInCenterIfOutsideViewport(e[0].getPosition())}_move(e){const t=[];for(const n of this._snippets){const i=n.move(e);t.push(...i)}return t}get isAtFirstPlaceholder(){return this._snippets[0].isAtFirstPlaceholder}get isAtLastPlaceholder(){return this._snippets[0].isAtLastPlaceholder}get hasPlaceholder(){return this._snippets[0].hasPlaceholder}get choice(){return this._snippets[0].choice}isSelectionWithinPlaceholders(){if(!this.hasPlaceholder)return!1;const e=this._editor.getSelections();if(e.length{e.push(...i.get(t))}))}e.sort(w.e.compareRangesUsingStarts);for(let[n,i]of t)if(i.length===e.length){i.sort(w.e.compareRangesUsingStarts);for(let o=0;o0}}},9599:(e,t,n)=>{"use strict";n.d(t,{_y:()=>v,GI:()=>w,A9:()=>A,ZJ:()=>S,kL:()=>k,wg:()=>N,i5:()=>I});var i=n(7301),o=n(4101),r=n(187),s=n(8819),a=n(1050),l=n(4314),d=n(5392),c=n(5976),h=n(4144),u=n(3472),g=n(4013),p=n(4565),m=n(8401),f=n(666),_=n(8216),b=n(3580),C=function(e,t,n,i){return new(n||(n=Promise))((function(o,r){function s(e){try{l(i.next(e))}catch(e){r(e)}}function a(e){try{l(i.throw(e))}catch(e){r(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,a)}l((i=i.apply(e,t||[])).next())}))};const v={Visible:new s.uy("suggestWidgetVisible",!1,(0,b.N)("suggestWidgetVisible","Whether suggestion are visible")),DetailsVisible:new s.uy("suggestWidgetDetailsVisible",!1,(0,b.N)("suggestWidgetDetailsVisible","Whether suggestion details are visible")),MultipleSuggestions:new s.uy("suggestWidgetMultipleSuggestions",!1,(0,b.N)("suggestWidgetMultipleSuggestions","Whether there are multiple suggestions to pick from")),MakesTextEdit:new s.uy("suggestionMakesTextEdit",!0,(0,b.N)("suggestionMakesTextEdit","Whether inserting the current suggestion yields in a change or has everything already been typed")),AcceptSuggestionsOnEnter:new s.uy("acceptSuggestionOnEnter",!0,(0,b.N)("acceptSuggestionOnEnter","Whether suggestions are inserted when pressing Enter")),HasInsertAndReplaceRange:new s.uy("suggestionHasInsertAndReplaceRange",!1,(0,b.N)("suggestionHasInsertAndReplaceRange","Whether the current suggestion has insert and replace behaviour")),InsertMode:new s.uy("suggestionInsertMode",void 0,{type:"string",description:(0,b.N)("suggestionInsertMode","Whether the default behaviour is to insert or replace")}),CanResolve:new s.uy("suggestionCanResolve",!1,(0,b.N)("suggestionCanResolve","Whether the current suggestion supports to resolve further details"))},w=new h.eH("suggestWidgetStatusBar");class y{constructor(e,t,n,i){this.position=e,this.completion=t,this.container=n,this.provider=i,this.isInvalid=!1,this.score=d.CL.Default,this.distance=0,this.textLabel="string"==typeof t.label?t.label:t.label.label,this.labelLow=this.textLabel.toLowerCase(),this.isInvalid=!this.textLabel,this.sortTextLow=t.sortText&&t.sortText.toLowerCase(),this.filterTextLow=t.filterText&&t.filterText.toLowerCase(),l.e.isIRange(t.range)?(this.editStart=new r.L(t.range.startLineNumber,t.range.startColumn),this.editInsertEnd=new r.L(t.range.endLineNumber,t.range.endColumn),this.editReplaceEnd=new r.L(t.range.endLineNumber,t.range.endColumn),this.isInvalid=this.isInvalid||l.e.spansMultipleLines(t.range)||t.range.startLineNumber!==e.lineNumber):(this.editStart=new r.L(t.range.insert.startLineNumber,t.range.insert.startColumn),this.editInsertEnd=new r.L(t.range.insert.endLineNumber,t.range.insert.endColumn),this.editReplaceEnd=new r.L(t.range.replace.endLineNumber,t.range.replace.endColumn),this.isInvalid=this.isInvalid||l.e.spansMultipleLines(t.range.insert)||l.e.spansMultipleLines(t.range.replace)||t.range.insert.startLineNumber!==e.lineNumber||t.range.replace.startLineNumber!==e.lineNumber||t.range.insert.startColumn!==t.range.replace.startColumn),"function"!=typeof i.resolveCompletionItem&&(this._resolveCache=Promise.resolve(),this._isResolved=!0)}get isResolved(){return!!this._isResolved}resolve(e){return C(this,void 0,void 0,(function*(){if(!this._resolveCache){const t=e.onCancellationRequested((()=>{this._resolveCache=void 0,this._isResolved=!1}));this._resolveCache=Promise.resolve(this.provider.resolveCompletionItem(this.completion,e)).then((e=>{Object.assign(this.completion,e),this._isResolved=!0,t.dispose()}),(e=>{(0,i.VV)(e)&&(this._resolveCache=void 0,this._isResolved=!1)}))}return this._resolveCache}))}}class A{constructor(e=2,t=new Set,n=new Set,i=!0){this.snippetSortOrder=e,this.kindFilter=t,this.providerFilter=n,this.showDeprecated=i}}function S(){}A.default=new A;class x{constructor(e,t,n,i){this.items=e,this.needsClipboard=t,this.durations=n,this.disposable=i}}function k(e,t,n=A.default,r={triggerKind:0},s=a.T.None){return C(this,void 0,void 0,(function*(){const a=new g.G(!0);t=t.clone();const d=e.getWordAtPosition(t),h=d?new l.e(t.lineNumber,d.startColumn,t.lineNumber,d.endColumn):l.e.fromPositions(t),p={replace:h,insert:h.setEndPosition(t.lineNumber,t.column)},m=[],f=new c.SL,_=[];let b=!1;const v=(e,i,o)=>{var r,s,a;if(i){for(let o of i.suggestions)if(!n.kindFilter.has(o.kind)){if(!n.showDeprecated&&(null===(r=null==o?void 0:o.tags)||void 0===r?void 0:r.includes(1)))continue;o.range||(o.range=p),o.sortText||(o.sortText="string"==typeof o.label?o.label:o.label.label),!b&&o.insertTextRules&&4&o.insertTextRules&&(b=u.Yj.guessNeedsClipboard(o.insertText)),m.push(new y(t,o,i,e))}(0,c.Wf)(i)&&f.add(i),_.push({providerName:null!==(s=e._debugDisplayName)&&void 0!==s?s:"unkown_provider",elapsedProvider:null!==(a=i.duration)&&void 0!==a?a:-1,elapsedOverall:o.elapsed()})}},w=(()=>C(this,void 0,void 0,(function*(){})))();for(let a of o.KZ.orderedGroups(e)){let o=m.length;if(yield Promise.all(a.map((o=>C(this,void 0,void 0,(function*(){if(!(n.providerFilter.size>0)||n.providerFilter.has(o))try{const n=new g.G(!0),i=yield o.provideCompletionItems(e,t,r,s);v(o,i,n)}catch(e){(0,i.Cp)(e)}}))))),o!==m.length||s.isCancellationRequested)break}return yield w,s.isCancellationRequested?(f.dispose(),Promise.reject((0,i.F0)())):new x(m.sort(N(n.snippetSortOrder)),b,{entries:_,elapsed:a.elapsed()},f)}))}function L(e,t){if(e.sortTextLow&&t.sortTextLow){if(e.sortTextLowt.sortTextLow)return 1}return e.completion.labelt.completion.label?1:e.completion.kind-t.completion.kind}const E=new Map;function N(e){return E.get(e)}E.set(0,(function(e,t){if(e.completion.kind!==t.completion.kind){if(27===e.completion.kind)return-1;if(27===t.completion.kind)return 1}return L(e,t)})),E.set(2,(function(e,t){if(e.completion.kind!==t.completion.kind){if(27===e.completion.kind)return 1;if(27===t.completion.kind)return-1}return L(e,t)})),E.set(1,L),p.P.registerCommand("_executeCompletionItemProvider",((e,...t)=>C(void 0,void 0,void 0,(function*(){const[n,i,o,s]=t;(0,m.p_)(f.o.isUri(n)),(0,m.p_)(r.L.isIPosition(i)),(0,m.p_)("string"==typeof o||!o),(0,m.p_)("number"==typeof s||!s);const l=yield e.get(_.S).createModelReference(n);try{const e={incomplete:!1,suggestions:[]},t=[],n=yield k(l.object.textEditorModel,r.L.lift(i),void 0,{triggerCharacter:o,triggerKind:o?1:0});for(const i of n.items)t.length<(null!=s?s:0)&&t.push(i.resolve(a.T.None)),e.incomplete=e.incomplete||i.container.incomplete,e.suggestions.push(i.completion);try{return yield Promise.all(t),e}finally{setTimeout((()=>n.disposable.dispose()),100)}}finally{l.dispose()}}))));const D=new class{constructor(){this.onlyOnceSuggestions=[]}provideCompletionItems(){let e={suggestions:this.onlyOnceSuggestions.slice(0)};return this.onlyOnceSuggestions.length=0,e}};function I(e,t){setTimeout((()=>{D.onlyOnceSuggestions.push(...t),e.getContribution("editor.contrib.suggestController").triggerSuggest((new Set).add(D))}),0)}o.KZ.register("*",D)},9830:(e,t,n)=>{"use strict";n.r(t),n.d(t,{SuggestController:()=>_t,TriggerSuggestAction:()=>bt});var i=n(6346),o=n(9488),r=n(7301),s=n(2258),a=n(5976),l=n(9925),d=n(6830),c=n(9386),h=n(4314),u=n(9102),g=n(2860),p=n(3472),m=n(3702),f=n(6904),_=n(4101),b=n(5393),C=n(2065),v=n(3108),w=n(5026),y=n(1531),A=function(e,t){return function(n,i){t(n,i,e)}};class S{constructor(e){this.name=e}select(e,t,n){if(0===n.length)return 0;let i=n[0].score[0];for(let e=0;ethis._saveState()),500),this._disposables.add(e.onWillSaveState((e=>{e.reason===f.fk.SHUTDOWN&&this._saveState()})))}dispose(){this._disposables.dispose(),this._persistSoon.dispose()}memorize(e,t,n){this._withStrategy(e,t).memorize(e,t,n),this._persistSoon.schedule()}select(e,t,n){return this._withStrategy(e,t).select(e,t,n)}_withStrategy(t,n){var i,o;const r=this._configService.getValue("editor.suggestSelection",{overrideIdentifier:null===(i=this._modeService.getLanguageIdentifier(t.getLanguageIdAtPosition(n.lineNumber,n.column)))||void 0===i?void 0:i.language,resource:t.uri});if((null===(o=this._strategy)||void 0===o?void 0:o.name)!==r){this._saveState();const t=e._strategyCtors.get(r)||x;this._strategy=new t;try{const t=this._configService.getValue("editor.suggest.shareSuggestSelections")?0:1,n=this._storageService.get(`${e._storagePrefix}/${r}`,t);n&&this._strategy.fromJSON(JSON.parse(n))}catch(e){}}return this._strategy}_saveState(){if(this._strategy){const t=this._configService.getValue("editor.suggest.shareSuggestSelections")?0:1,n=JSON.stringify(this._strategy);this._storageService.store(`${e._storagePrefix}/${this._strategy.name}`,n,t,1)}}};k._strategyCtors=new Map([["recentlyUsedByPrefix",class extends S{constructor(){super("recentlyUsedByPrefix"),this._trie=m.Id.forStrings(),this._seq=0}memorize(e,t,n){const{word:i}=e.getWordUntilPosition(t),o=`${e.getLanguageIdentifier().language}/${i}`;this._trie.set(o,{type:n.completion.kind,insertText:n.completion.insertText,touch:this._seq++})}select(e,t,n){let{word:i}=e.getWordUntilPosition(t);if(!i)return super.select(e,t,n);let o=`${e.getLanguageIdentifier().language}/${i}`,r=this._trie.get(o);if(r||(r=this._trie.findSubstr(o)),r)for(let e=0;ee.push([n,t]))),e.sort(((e,t)=>-(e[1].touch-t[1].touch))).forEach(((e,t)=>e[1].touch=t)),e.slice(0,200)}fromJSON(e){if(this._trie.clear(),e.length>0){this._seq=e[0][1].touch+1;for(const[t,n]of e)n.type="number"==typeof n.type?n.type:(0,_.jr)(n.type),this._trie.set(t,n)}}}],["recentlyUsed",class extends S{constructor(){super("recentlyUsed"),this._cache=new m.z6(300,.66),this._seq=0}memorize(e,t,n){const i=`${e.getLanguageIdentifier().language}/${n.textLabel}`;this._cache.set(i,{touch:this._seq++,type:n.completion.kind,insertText:n.completion.insertText})}select(e,t,n){if(0===n.length)return 0;const i=e.getLineContent(t.lineNumber).substr(t.column-10,t.column-1);if(/\s$/.test(i))return super.select(e,t,n);let o=n[0].score[0],r=-1,s=-1;for(let t=0;ts&&o.type===n[t].completion.kind&&o.insertText===n[t].completion.insertText&&(s=o.touch,r=t),n[t].completion.preselect)return t}return-1!==r?r:0}toJSON(){return this._cache.toJSON()}fromJSON(e){this._cache.clear();for(const[t,n]of e)n.touch=0,n.type="number"==typeof n.type?n.type:(0,_.jr)(n.type),this._cache.set(t,n);this._seq=this._cache.size}}],["first",x]]),k._storagePrefix="suggest/memories",k=function(e,t,n,i){var o,r=arguments.length,s=r<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,i);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,n,s):o(t,n))||s);return r>3&&s&&Object.defineProperty(t,n,s),s}([A(0,f.Uy),A(1,y.h),A(2,v.Ui)],k);const L=(0,C.yh)("ISuggestMemories");(0,w.z)(L,k,!0);var E=n(3580),N=n(4565),D=n(8819),I=n(9989),M=n(9599);let T=class e{constructor(t,n){this._editor=t,this._index=0,this._ckOtherSuggestions=e.OtherSuggestions.bindTo(n)}dispose(){this.reset()}reset(){var e;this._ckOtherSuggestions.reset(),null===(e=this._listener)||void 0===e||e.dispose(),this._model=void 0,this._acceptNext=void 0,this._ignore=!1}set({model:t,index:n},i){0!==t.items.length&&e._moveIndex(!0,t,n)!==n?(this._acceptNext=i,this._model=t,this._index=n,this._listener=this._editor.onDidChangeCursorPosition((()=>{this._ignore||this.reset()})),this._ckOtherSuggestions.set(!0)):this.reset()}static _moveIndex(e,t,n){let i=n;for(;i=(i+t.items.length+(e?1:-1))%t.items.length,i!==n&&t.items[i].completion.additionalTextEdits;);return i}next(){this._move(!0)}prev(){this._move(!1)}_move(t){if(this._model)try{this._ignore=!0,this._index=e._moveIndex(t,this._model,this._index),this._acceptNext({index:this._index,item:this._model.items[this._index],model:this._model})}finally{this._ignore=!1}}};var R,O;T.OtherSuggestions=new D.uy("hasOtherSuggestions",!1),T=function(e,t,n,i){var o,r=arguments.length,s=r<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,i);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,n,s):o(t,n))||s);return r>3&&s&&Object.defineProperty(t,n,s),s}([(R=1,O=D.i6,function(e,t){O(e,t,R)})],T);var B=n(4669),P=n(3860),F=n(5392),W=n(7295);class z{constructor(e,t,n,i,o,r,s){this.clipboardText=s,this._snippetCompareFn=z._compareCompletionItems,this._items=e,this._column=t,this._wordDistance=i,this._options=o,this._refilterKind=1,this._lineContext=n,"top"===r?this._snippetCompareFn=z._compareCompletionItemsSnippetsUp:"bottom"===r&&(this._snippetCompareFn=z._compareCompletionItemsSnippetsDown)}get lineContext(){return this._lineContext}set lineContext(e){this._lineContext.leadingLineContent===e.leadingLineContent&&this._lineContext.characterCountDelta===e.characterCountDelta||(this._refilterKind=this._lineContext.characterCountDelta2e3?F.EW:F.l7;for(let o=0;o=h)d.score=F.CL.Default;else if("string"==typeof d.completion.filterText){let t=l(i,r,e,d.completion.filterText,d.filterTextLow,0,!1);if(!t)continue;0===(0,W.zY)(d.completion.filterText,d.textLabel)?d.score=t:(d.score=(0,F.jB)(i,r,e,d.textLabel,d.labelLow,0),d.score[0]=t[0])}else{let t=l(i,r,e,d.textLabel,d.labelLow,0,!1);if(!t)continue;d.score=t}}d.idx=o,d.distance=this._wordDistance.distance(d.position,d.completion),a.push(d),e.push(d.textLabel.length)}this._filteredItems=a.sort(this._snippetCompareFn),this._refilterKind=0,this._stats={pLabelLen:e.length?(0,o.HW)(e.length-.85,e,((e,t)=>e-t)):0}}static _compareCompletionItems(e,t){return e.score[0]>t.score[0]?-1:e.score[0]t.distance?1:e.idxt.idx?1:0}static _compareCompletionItemsSnippetsDown(e,t){if(e.completion.kind!==t.completion.kind){if(27===e.completion.kind)return 1;if(27===t.completion.kind)return-1}return z._compareCompletionItems(e,t)}static _compareCompletionItemsSnippetsUp(e,t){if(e.completion.kind!==t.completion.kind){if(27===e.completion.kind)return-1;if(27===t.completion.kind)return 1}return z._compareCompletionItems(e,t)}}var V=n(1050),H=n(469),j=n(689);class ${static create(e,t){return n=this,i=void 0,s=function*(){if(!t.getOption(105).localityBonus)return $.None;if(!t.hasModel())return $.None;const n=t.getModel(),i=t.getPosition();if(!e.canComputeWordRanges(n.uri))return $.None;const[r]=yield(new j.x).provideSelectionRanges(n,[i]);if(0===r.length)return $.None;const s=yield e.computeWordRanges(n.uri,r[0].range);if(!s)return $.None;const a=n.getWordUntilPosition(i);return delete s[a.word],new class extends ${distance(e,n){if(!i.equals(t.getPosition()))return 0;if(17===n.kind)return 2<<20;let a="string"==typeof n.label?n.label:n.label.label,l=s[a];if((0,o.XY)(l))return 2<<20;let d=(0,o.ry)(l,h.e.fromPositions(e),h.e.compareRangesUsingStarts),c=d>=0?l[d]:l[Math.max(0,~d-1)],u=r.length;for(const e of r){if(!h.e.containsRange(e.range,c))break;u-=1}return u}}},new((r=void 0)||(r=Promise))((function(e,t){function o(e){try{l(s.next(e))}catch(e){t(e)}}function a(e){try{l(s.throw(e))}catch(e){t(e)}}function l(t){var n;t.done?e(t.value):(n=t.value,n instanceof r?n:new r((function(e){e(n)}))).then(o,a)}l((s=s.apply(n,i||[])).next())}));var n,i,r,s}}$.None=new class extends ${distance(){return 0}};var U=n(4972),Z=n(829),K=n(3557),q=function(e,t){return function(n,i){t(n,i,e)}};class Y{constructor(e,t,n,i){this.leadingLineContent=e.getLineContent(t.lineNumber).substr(0,t.column-1),this.leadingWord=e.getWordUntilPosition(t),this.lineNumber=t.lineNumber,this.column=t.column,this.auto=n,this.shy=i}static shouldAutoTrigger(e){if(!e.hasModel())return!1;const t=e.getModel(),n=e.getPosition();t.tokenizeIfCheap(n.lineNumber);const i=t.getWordAtPosition(n);return!!i&&i.endColumn===n.column&&!!isNaN(Number(i.word))}}let G=class e{constructor(e,t,n,i,o,r,s){this._editor=e,this._editorWorkerService=t,this._clipboardService=n,this._telemetryService=i,this._logService=o,this._contextKeyService=r,this._configurationService=s,this._toDispose=new a.SL,this._quickSuggestDelay=10,this._triggerCharacterListener=new a.SL,this._triggerQuickSuggest=new b._F,this._state=0,this._completionDisposables=new a.SL,this._onDidCancel=new B.Q5,this._onDidTrigger=new B.Q5,this._onDidSuggest=new B.Q5,this.onDidCancel=this._onDidCancel.event,this.onDidTrigger=this._onDidTrigger.event,this.onDidSuggest=this._onDidSuggest.event,this._telemetryGate=0,this._currentSelection=this._editor.getSelection()||new P.Y(1,1,1,1),this._toDispose.add(this._editor.onDidChangeModel((()=>{this._updateTriggerCharacters(),this.cancel()}))),this._toDispose.add(this._editor.onDidChangeModelLanguage((()=>{this._updateTriggerCharacters(),this.cancel()}))),this._toDispose.add(this._editor.onDidChangeConfiguration((()=>{this._updateTriggerCharacters(),this._updateQuickSuggest()}))),this._toDispose.add(_.KZ.onDidChange((()=>{this._updateTriggerCharacters(),this._updateActiveSuggestSession()}))),this._toDispose.add(this._editor.onDidChangeCursorSelection((e=>{this._onCursorChange(e)})));let l=!1;this._toDispose.add(this._editor.onDidCompositionStart((()=>{l=!0}))),this._toDispose.add(this._editor.onDidCompositionEnd((()=>{l=!1,this._refilterCompletionItems()}))),this._toDispose.add(this._editor.onDidChangeModelContent((()=>{l||this._refilterCompletionItems()}))),this._updateTriggerCharacters(),this._updateQuickSuggest()}dispose(){(0,a.B9)(this._triggerCharacterListener),(0,a.B9)([this._onDidCancel,this._onDidSuggest,this._onDidTrigger,this._triggerQuickSuggest]),this._toDispose.dispose(),this._completionDisposables.dispose(),this.cancel()}_updateQuickSuggest(){this._quickSuggestDelay=this._editor.getOption(78),(isNaN(this._quickSuggestDelay)||!this._quickSuggestDelay&&0!==this._quickSuggestDelay||this._quickSuggestDelay<0)&&(this._quickSuggestDelay=10)}_updateTriggerCharacters(){if(this._triggerCharacterListener.clear(),this._editor.getOption(79)||!this._editor.hasModel()||!this._editor.getOption(108))return;const e=new Map;for(const t of _.KZ.all(this._editor.getModel()))for(const n of t.triggerCharacters||[]){let i=e.get(n);i||(i=new Set,i.add((0,M.ZJ)()),e.set(n,i)),i.add(t)}const t=t=>{if(n=this._contextKeyService,i=this._configurationService,Boolean(n.getContextKeyValue("inlineSuggestionVisible"))&&!Boolean(i.getValue("editor.inlineSuggest.allowSuggestOnTriggerCharacters")))return;var n,i;if(Y.shouldAutoTrigger(this._editor))return;if(!t){const e=this._editor.getPosition();t=this._editor.getModel().getLineContent(e.lineNumber).substr(0,e.column-1)}let o="";(0,W.YK)(t.charCodeAt(t.length-1))?(0,W.ZG)(t.charCodeAt(t.length-2))&&(o=t.substr(t.length-2)):o=t.charAt(t.length-1);const r=e.get(o);if(r){const e=this._completionModel?{items:this._completionModel.adopt(r),clipboardText:this._completionModel.clipboardText}:void 0;this.trigger({auto:!0,shy:!1,triggerCharacter:o},Boolean(this._completionModel),r,e)}};this._triggerCharacterListener.add(this._editor.onDidType(t)),this._triggerCharacterListener.add(this._editor.onDidCompositionEnd(t))}get state(){return this._state}cancel(e=!1){var t;0!==this._state&&(this._triggerQuickSuggest.cancel(),null===(t=this._requestToken)||void 0===t||t.cancel(),this._requestToken=void 0,this._state=0,this._completionModel=void 0,this._context=void 0,this._onDidCancel.fire({retrigger:e}))}clear(){this._completionDisposables.clear()}_updateActiveSuggestSession(){0!==this._state&&(this._editor.hasModel()&&_.KZ.has(this._editor.getModel())?this.trigger({auto:2===this._state,shy:!1},!0):this.cancel())}_onCursorChange(e){if(!this._editor.hasModel())return;const t=this._editor.getModel(),n=this._currentSelection;if(this._currentSelection=this._editor.getSelection(),!e.selection.isEmpty()||0!==e.reason&&3!==e.reason||"keyboard"!==e.source&&"deleteLeft"!==e.source)this.cancel();else if(_.KZ.has(t))if(0===this._state&&0===e.reason){if(!1===this._editor.getOption(77))return;if(!n.containsRange(this._currentSelection)&&!n.getEndPosition().isBeforeOrEqual(this._currentSelection.getPosition()))return;if(this._editor.getOption(105).snippetsPreventQuickSuggestions&&g.SnippetController2.get(this._editor).isInSnippet())return;this.cancel(),this._triggerQuickSuggest.cancelAndSet((()=>{if(0!==this._state)return;if(!Y.shouldAutoTrigger(this._editor))return;if(!this._editor.hasModel())return;const e=this._editor.getModel(),t=this._editor.getPosition(),n=this._editor.getOption(77);if(!1!==n){if(!0===n);else{e.tokenizeIfCheap(t.lineNumber);const i=e.getLineTokens(t.lineNumber),o=i.getStandardTokenType(i.findTokenIndexAtOffset(Math.max(t.column-1-1,0)));if(!(n.other&&0===o||n.comments&&1===o||n.strings&&2===o))return}var i,o;i=this._contextKeyService,o=this._configurationService,(!Boolean(i.getContextKeyValue("inlineSuggestionVisible"))||Boolean(o.getValue("editor.inlineSuggest.allowQuickSuggestions")))&&this.trigger({auto:!0,shy:!1})}}),this._quickSuggestDelay)}else 0!==this._state&&3===e.reason&&this._refilterCompletionItems()}_refilterCompletionItems(){Promise.resolve().then((()=>{if(0===this._state)return;if(!this._editor.hasModel())return;const e=this._editor.getModel(),t=this._editor.getPosition(),n=new Y(e,t,2===this._state,!1);this._onNewContext(n)}))}trigger(t,n=!1,i,o){var s;if(!this._editor.hasModel())return;const a=this._editor.getModel(),l=t.auto,d=new Y(a,this._editor.getPosition(),l,t.shy);this.cancel(n),this._state=l?2:1,this._onDidTrigger.fire({auto:l,shy:t.shy,position:this._editor.getPosition()}),this._context=d;let c={triggerKind:null!==(s=t.triggerKind)&&void 0!==s?s:0};t.triggerCharacter&&(c={triggerKind:1,triggerCharacter:t.triggerCharacter}),this._requestToken=new V.A;const h=this._editor.getOption(100);let u=1;switch(h){case"top":u=0;break;case"bottom":u=2}const{itemKind:g,showDeprecated:p}=e._createSuggestFilter(this._editor),m=$.create(this._editorWorkerService,this._editor),f=(0,M.kL)(a,this._editor.getPosition(),new M.A9(u,g,i,p),c,this._requestToken.token);Promise.all([f,m]).then((([e,n])=>{return i=this,r=void 0,a=function*(){var i;if(null===(i=this._requestToken)||void 0===i||i.dispose(),!this._editor.hasModel())return;let r=null==o?void 0:o.clipboardText;if(!r&&e.needsClipboard&&(r=yield this._clipboardService.readText()),0===this._state)return;const s=this._editor.getModel();let a=e.items;if(o){const e=(0,M.wg)(u);a=a.concat(o.items).sort(e)}const d=new Y(s,this._editor.getPosition(),l,t.shy);this._completionModel=new z(a,this._context.column,{leadingLineContent:d.leadingLineContent,characterCountDelta:d.column-this._context.column},n,this._editor.getOption(105),this._editor.getOption(100),r),this._completionDisposables.add(e.disposable),this._onNewContext(d),this._reportDurationsTelemetry(e.durations)},new((s=void 0)||(s=Promise))((function(e,t){function n(e){try{l(a.next(e))}catch(e){t(e)}}function o(e){try{l(a.throw(e))}catch(e){t(e)}}function l(t){var i;t.done?e(t.value):(i=t.value,i instanceof s?i:new s((function(e){e(i)}))).then(n,o)}l((a=a.apply(i,r||[])).next())}));var i,r,s,a})).catch(r.dL)}_reportDurationsTelemetry(e){this._telemetryGate++%230==0&&setTimeout((()=>{this._telemetryService.publicLog2("suggest.durations.json",{data:JSON.stringify(e)}),this._logService.debug("suggest.durations.json",e)}))}static _createSuggestFilter(e){const t=new Set;"none"===e.getOption(100)&&t.add(27);const n=e.getOption(105);return n.showMethods||t.add(0),n.showFunctions||t.add(1),n.showConstructors||t.add(2),n.showFields||t.add(3),n.showVariables||t.add(4),n.showClasses||t.add(5),n.showStructs||t.add(6),n.showInterfaces||t.add(7),n.showModules||t.add(8),n.showProperties||t.add(9),n.showEvents||t.add(10),n.showOperators||t.add(11),n.showUnits||t.add(12),n.showValues||t.add(13),n.showConstants||t.add(14),n.showEnums||t.add(15),n.showEnumMembers||t.add(16),n.showKeywords||t.add(17),n.showWords||t.add(18),n.showColors||t.add(19),n.showFiles||t.add(20),n.showReferences||t.add(21),n.showColors||t.add(22),n.showFolders||t.add(23),n.showTypeParameters||t.add(24),n.showSnippets||t.add(27),n.showUsers||t.add(25),n.showIssues||t.add(26),{itemKind:t,showDeprecated:n.showDeprecated}}_onNewContext(e){if(this._context)if(e.lineNumber===this._context.lineNumber)if((0,W.V8)(e.leadingLineContent)===(0,W.V8)(this._context.leadingLineContent)){if(e.columnthis._context.leadingWord.startColumn){const e=new Set(_.KZ.all(this._editor.getModel()));for(let t of this._completionModel.allProvider)e.delete(t);const t=this._completionModel.adopt(new Set);this.trigger({auto:this._context.auto,shy:!1},!0,e,{items:t,clipboardText:this._completionModel.clipboardText})}else if(e.column>this._context.column&&this._completionModel.incomplete.size>0&&0!==e.leadingWord.word.length){const{incomplete:e}=this._completionModel,t=this._completionModel.adopt(e);this.trigger({auto:2===this._state,shy:!1,triggerKind:2},!0,e,{items:t,clipboardText:this._completionModel.clipboardText})}else{let t=this._completionModel.lineContext,n=!1;if(this._completionModel.lineContext={leadingLineContent:e.leadingLineContent,characterCountDelta:e.column-this._context.column},0===this._completionModel.items.length){if(Y.shouldAutoTrigger(this._editor)&&this._context.leadingWord.endColumn0,n&&0===e.leadingWord.word.length)return void this.cancel()}this._onDidSuggest.fire({completionModel:this._completionModel,auto:this._context.auto,shy:this._context.shy,isFrozen:n})}}else this.cancel();else this.cancel()}};G=function(e,t,n,i){var o,r=arguments.length,s=r<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,i);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,n,s):o(t,n))||s);return r>3&&s&&Object.defineProperty(t,n,s),s}([q(1,H.p),q(2,U.p),q(3,Z.b),q(4,K.VZ),q(5,D.i6),q(6,v.Ui)],G);var Q=n(3379),X=n.n(Q),J=n(7795),ee=n.n(J),te=n(569),ne=n.n(te),ie=n(3565),oe=n.n(ie),re=n(9216),se=n.n(re),ae=n(4589),le=n.n(ae),de=n(36),ce={};ce.styleTagTransform=le(),ce.setAttributes=oe(),ce.insert=ne().bind(null,"head"),ce.domAPI=ee(),ce.insertStyleElement=se(),X()(de.Z,ce),de.Z&&de.Z.locals&&de.Z.locals,n(9899),n(4954);var he=n(5321),ue=n(3799),ge=n(8810),pe=n(7781),me=n(3910),fe=n(6781),_e=n(3947),be=n(9365),Ce=n(3046),ve=n(3841);class we{constructor(){let e;this._onDidWillResize=new B.Q5,this.onDidWillResize=this._onDidWillResize.event,this._onDidResize=new B.Q5,this.onDidResize=this._onDidResize.event,this._sashListener=new a.SL,this._size=new he.Ro(0,0),this._minSize=new he.Ro(0,0),this._maxSize=new he.Ro(Number.MAX_SAFE_INTEGER,Number.MAX_SAFE_INTEGER),this.domNode=document.createElement("div"),this._eastSash=new ve.g(this.domNode,{getVerticalSashLeft:()=>this._size.width},{orientation:0}),this._westSash=new ve.g(this.domNode,{getVerticalSashLeft:()=>0},{orientation:0}),this._northSash=new ve.g(this.domNode,{getHorizontalSashTop:()=>0},{orientation:1,orthogonalEdge:ve.l.North}),this._southSash=new ve.g(this.domNode,{getHorizontalSashTop:()=>this._size.height},{orientation:1,orthogonalEdge:ve.l.South}),this._northSash.orthogonalStartSash=this._westSash,this._northSash.orthogonalEndSash=this._eastSash,this._southSash.orthogonalStartSash=this._westSash,this._southSash.orthogonalEndSash=this._eastSash;let t=0,n=0;this._sashListener.add(B.ju.any(this._northSash.onDidStart,this._eastSash.onDidStart,this._southSash.onDidStart,this._westSash.onDidStart)((()=>{void 0===e&&(this._onDidWillResize.fire(),e=this._size,t=0,n=0)}))),this._sashListener.add(B.ju.any(this._northSash.onDidEnd,this._eastSash.onDidEnd,this._southSash.onDidEnd,this._westSash.onDidEnd)((()=>{void 0!==e&&(e=void 0,t=0,n=0,this._onDidResize.fire({dimension:this._size,done:!0}))}))),this._sashListener.add(this._eastSash.onDidChange((i=>{e&&(n=i.currentX-i.startX,this.layout(e.height+t,e.width+n),this._onDidResize.fire({dimension:this._size,done:!1,east:!0}))}))),this._sashListener.add(this._westSash.onDidChange((i=>{e&&(n=-(i.currentX-i.startX),this.layout(e.height+t,e.width+n),this._onDidResize.fire({dimension:this._size,done:!1,west:!0}))}))),this._sashListener.add(this._northSash.onDidChange((i=>{e&&(t=-(i.currentY-i.startY),this.layout(e.height+t,e.width+n),this._onDidResize.fire({dimension:this._size,done:!1,north:!0}))}))),this._sashListener.add(this._southSash.onDidChange((i=>{e&&(t=i.currentY-i.startY,this.layout(e.height+t,e.width+n),this._onDidResize.fire({dimension:this._size,done:!1,south:!0}))}))),this._sashListener.add(B.ju.any(this._eastSash.onDidReset,this._westSash.onDidReset)((e=>{this._preferredSize&&(this.layout(this._size.height,this._preferredSize.width),this._onDidResize.fire({dimension:this._size,done:!0}))}))),this._sashListener.add(B.ju.any(this._northSash.onDidReset,this._southSash.onDidReset)((e=>{this._preferredSize&&(this.layout(this._preferredSize.height,this._size.width),this._onDidResize.fire({dimension:this._size,done:!0}))})))}dispose(){this._northSash.dispose(),this._southSash.dispose(),this._eastSash.dispose(),this._westSash.dispose(),this._sashListener.dispose(),this._onDidResize.dispose(),this._onDidWillResize.dispose(),this.domNode.remove()}enableSashes(e,t,n,i){this._northSash.state=e?3:0,this._eastSash.state=t?3:0,this._southSash.state=n?3:0,this._westSash.state=i?3:0}layout(e=this.size.height,t=this.size.width){const{height:n,width:i}=this._minSize,{height:o,width:r}=this._maxSize;e=Math.max(n,Math.min(o,e)),t=Math.max(i,Math.min(r,t));const s=new he.Ro(t,e);he.Ro.equals(s,this._size)||(this.domNode.style.height=e+"px",this.domNode.style.width=t+"px",this._size=s,this._northSash.layout(),this._eastSash.layout(),this._southSash.layout(),this._westSash.layout())}clearSashHoverState(){this._eastSash.clearSashHoverState(),this._westSash.clearSashHoverState(),this._northSash.clearSashHoverState(),this._southSash.clearSashHoverState()}get size(){return this._size}set maxSize(e){this._maxSize=e}get maxSize(){return this._maxSize}set minSize(e){this._minSize=e}get minSize(){return this._minSize}set preferredSize(e){this._preferredSize=e}get preferredSize(){return this._preferredSize}}function ye(e){return!!e&&Boolean(e.completion.documentation||e.completion.detail&&e.completion.detail!==e.completion.label)}let Ae=class{constructor(e,t){this._editor=e,this._onDidClose=new B.Q5,this.onDidClose=this._onDidClose.event,this._onDidChangeContents=new B.Q5,this.onDidChangeContents=this._onDidChangeContents.event,this._disposables=new a.SL,this._renderDisposeable=new a.SL,this._borderWidth=1,this._size=new he.Ro(330,0),this.domNode=he.$(".suggest-details"),this.domNode.classList.add("no-docs"),this._markdownRenderer=t.createInstance(_e.$,{editor:e}),this._body=he.$(".body"),this._scrollbar=new fe.s$(this._body,{}),he.R3(this.domNode,this._scrollbar.getDomNode()),this._disposables.add(this._scrollbar),this._header=he.R3(this._body,he.$(".header")),this._close=he.R3(this._header,he.$("span"+Ce.lA.close.cssSelector)),this._close.title=E.N("details.close","Close"),this._type=he.R3(this._header,he.$("p.type")),this._docs=he.R3(this._body,he.$("p.docs")),this._configureFont(),this._disposables.add(this._editor.onDidChangeConfiguration((e=>{e.hasChanged(41)&&this._configureFont()})))}dispose(){this._disposables.dispose(),this._renderDisposeable.dispose()}_configureFont(){const e=this._editor.getOptions(),t=e.get(41),n=t.fontFamily,i=e.get(106)||t.fontSize,o=e.get(107)||t.lineHeight,r=t.fontWeight,s=`${i}px`,a=`${o}px`;this.domNode.style.fontSize=s,this.domNode.style.lineHeight=a,this.domNode.style.fontWeight=r,this.domNode.style.fontFeatureSettings=t.fontFeatureSettings,this._type.style.fontFamily=n,this._close.style.height=a,this._close.style.width=a}getLayoutInfo(){const e=this._editor.getOption(107)||this._editor.getOption(41).lineHeight,t=this._borderWidth;return{lineHeight:e,borderWidth:t,borderHeight:2*t,verticalPadding:22,horizontalPadding:14}}renderLoading(){this._type.textContent=E.N("loading","Loading..."),this._docs.textContent="",this.domNode.classList.remove("no-docs","no-type"),this.layout(this.size.width,2*this.getLayoutInfo().lineHeight),this._onDidChangeContents.fire(this)}renderItem(e,t){var n,i;this._renderDisposeable.clear();let{detail:o,documentation:r}=e.completion;if(t){let t="";t+=`score: ${e.score[0]}\n`,t+=`prefix: ${null!==(n=e.word)&&void 0!==n?n:"(no prefix)"}\n`,t+=`word: ${e.completion.filterText?e.completion.filterText+" (filterText)":e.textLabel}\n`,t+=`distance: ${e.distance} (localityBonus-setting)\n`,t+=`index: ${e.idx}, based on ${e.completion.sortText&&`sortText: "${e.completion.sortText}"`||"label"}\n`,t+=`commit_chars: ${null===(i=e.completion.commitCharacters)||void 0===i?void 0:i.join("")}\n`,r=(new be.W5).appendCodeblock("empty",t),o=`Provider: ${e.provider._debugDisplayName}`}if(t||ye(e)){if(this.domNode.classList.remove("no-docs","no-type"),o){const e=o.length>1e5?`${o.substr(0,1e5)}…`:o;this._type.textContent=e,this._type.title=e,he.$Z(this._type),this._type.classList.toggle("auto-wrap",!/\r?\n^\s+/gim.test(e))}else he.PO(this._type),this._type.title="",he.Cp(this._type),this.domNode.classList.add("no-type");if(he.PO(this._docs),"string"==typeof r)this._docs.classList.remove("markdown-docs"),this._docs.textContent=r;else if(r){this._docs.classList.add("markdown-docs"),he.PO(this._docs);const e=this._markdownRenderer.render(r);this._docs.appendChild(e.element),this._renderDisposeable.add(e),this._renderDisposeable.add(this._markdownRenderer.onDidRenderAsync((()=>{this.layout(this._size.width,this._type.clientHeight+this._docs.clientHeight),this._onDidChangeContents.fire(this)})))}this.domNode.style.userSelect="text",this.domNode.tabIndex=-1,this._close.onmousedown=e=>{e.preventDefault(),e.stopPropagation()},this._close.onclick=e=>{e.preventDefault(),e.stopPropagation(),this._onDidClose.fire()},this._body.scrollTop=0,this.layout(this._size.width,this._type.clientHeight+this._docs.clientHeight),this._onDidChangeContents.fire(this)}else this.clearContents()}clearContents(){this.domNode.classList.add("no-docs"),this._type.textContent="",this._docs.textContent=""}get size(){return this._size}layout(e,t){const n=new he.Ro(e,t);he.Ro.equals(n,this._size)||(this._size=n,he.dp(this.domNode,e,t)),this._scrollbar.scanDomNode()}scrollDown(e=8){this._body.scrollTop+=e}scrollUp(e=8){this._body.scrollTop-=e}scrollTop(){this._body.scrollTop=0}scrollBottom(){this._body.scrollTop=this._body.scrollHeight}pageDown(){this.scrollDown(80)}pageUp(){this.scrollUp(80)}set borderWidth(e){this._borderWidth=e}get borderWidth(){return this._borderWidth}};Ae=function(e,t,n,i){var o,r=arguments.length,s=r<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,i);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,n,s):o(t,n))||s);return r>3&&s&&Object.defineProperty(t,n,s),s}([function(e,t){return function(n,i){t(n,i,e)}}(1,C.TG)],Ae);class Se{constructor(e,t){let n,i;this.widget=e,this._editor=t,this._disposables=new a.SL,this._added=!1,this._resizable=new we,this._resizable.domNode.classList.add("suggest-details-container"),this._resizable.domNode.appendChild(e.domNode),this._resizable.enableSashes(!1,!0,!0,!1);let o=0,r=0;this._disposables.add(this._resizable.onDidWillResize((()=>{n=this._topLeft,i=this._resizable.size}))),this._disposables.add(this._resizable.onDidResize((e=>{if(n&&i){this.widget.layout(e.dimension.width,e.dimension.height);let t=!1;e.west&&(r=i.width-e.dimension.width,t=!0),e.north&&(o=i.height-e.dimension.height,t=!0),t&&this._applyTopLeft({top:n.top+o,left:n.left+r})}e.done&&(n=void 0,i=void 0,o=0,r=0,this._userSize=e.dimension)}))),this._disposables.add(this.widget.onDidChangeContents((()=>{var e;this._anchorBox&&this._placeAtAnchor(this._anchorBox,null!==(e=this._userSize)&&void 0!==e?e:this.widget.size)})))}dispose(){this._resizable.dispose(),this._disposables.dispose(),this.hide()}getId(){return"suggest.details"}getDomNode(){return this._resizable.domNode}getPosition(){return null}show(){this._added||(this._editor.addOverlayWidget(this),this.getDomNode().style.position="fixed",this._added=!0)}hide(e=!1){this._resizable.clearSashHoverState(),this._added&&(this._editor.removeOverlayWidget(this),this._added=!1,this._anchorBox=void 0,this._topLeft=void 0),e&&(this._userSize=void 0,this.widget.clearContents())}placeAtAnchor(e){var t;const n=he.i(e);this._anchorBox=n,this._placeAtAnchor(this._anchorBox,null!==(t=this._userSize)&&void 0!==t?t:this.widget.size)}_placeAtAnchor(e,t){const n=he.D6(document.body),i=this.widget.getLayoutInfo();let o,r,s,a,l=new he.Ro(220,2*i.lineHeight),d=0,c=e.top,h=e.top+e.height-i.borderHeight,u=n.width-(e.left+e.width+i.borderWidth+i.horizontalPadding);d=-i.borderWidth+e.left+e.width,a=!0,o=new he.Ro(u,n.height-e.top-i.borderHeight-i.verticalPadding),r=o.with(void 0,e.top+e.height-i.borderHeight-i.verticalPadding),t.width>u&&(e.left>u&&(u=e.left-i.borderWidth-i.horizontalPadding,a=!1,d=Math.max(i.horizontalPadding,e.left-t.width-i.borderWidth),o=o.with(u),r=o.with(void 0,r.height)),e.width>1.3*u&&n.height-(e.top+e.height)>e.height&&(u=e.width,d=e.left,c=-i.borderWidth+e.top+e.height,o=new he.Ro(e.width-i.borderHeight,n.height-e.top-e.height-i.verticalPadding),r=o.with(void 0,e.top-i.verticalPadding),l=l.with(o.width)));let g,p=t.height,m=Math.max(o.height,r.height);p>m&&(p=m),p<=o.height?(s=!0,g=o):(s=!1,g=r),this._applyTopLeft({left:d,top:s?c:h-p}),this.getDomNode().style.position="fixed",this._resizable.enableSashes(!s,a,s,!a),this._resizable.minSize=l,this._resizable.maxSize=g,this._resizable.layout(p,Math.min(g.width,t.width)),this.widget.layout(this._resizable.size.width,this._resizable.size.height)}_applyTopLeft(e){this._topLeft=e,this.getDomNode().style.left=`${this._topLeft.left}px`,this.getDomNode().style.top=`${this._topLeft.top}px`}}var xe=n(317),ke=n(1133),Le=n(4144),Ee=function(e,t){return function(n,i){t(n,i,e)}};class Ne extends ke.Mm{updateLabel(){const e=this._keybindingService.lookupKeybinding(this._action.id,this._contextKeyService);if(!e)return super.updateLabel();this.label&&(this.label.textContent=(0,E.N)("ddd","{0} ({1})",this._action.label,Ne.symbolPrintEnter(e)))}static symbolPrintEnter(e){var t;return null===(t=e.getLabel())||void 0===t?void 0:t.replace(/\benter\b/gi,"⏎")}}let De=class{constructor(e,t,n,i){this._menuService=n,this._contextKeyService=i,this._menuDisposables=new a.SL,this.element=he.R3(e,he.$(".suggest-status-bar"));const o=e=>e instanceof Le.U8?t.createInstance(Ne,e,void 0):void 0;this._leftActions=new xe.o(this.element,{actionViewItemProvider:o}),this._rightActions=new xe.o(this.element,{actionViewItemProvider:o}),this._leftActions.domNode.classList.add("left"),this._rightActions.domNode.classList.add("right")}dispose(){this._menuDisposables.dispose(),this.element.remove()}show(){const e=this._menuService.createMenu(M.GI,this._contextKeyService),t=()=>{const t=[],n=[];for(let[i,o]of e.getActions())"left"===i?t.push(...o):n.push(...o);this._leftActions.clear(),this._leftActions.push(t),this._rightActions.clear(),this._rightActions.push(n)};this._menuDisposables.add(e.onDidChange((()=>t()))),this._menuDisposables.add(e)}hide(){this._menuDisposables.clear()}};De=function(e,t,n,i){var o,r=arguments.length,s=r<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,i);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,n,s):o(t,n))||s);return r>3&&s&&Object.defineProperty(t,n,s),s}([Ee(1,C.TG),Ee(2,Le.co),Ee(3,D.i6)],De);var Ie,Me=n(3326),Te=n(6663),Re=n(5935),Oe=n(1144);function Be(e,t,n,i){const o=i===Ie.ROOT_FOLDER?["rootfolder-icon"]:i===Ie.FOLDER?["folder-icon"]:["file-icon"];if(n){let r;if(r=n.scheme===Te.lg.data?Re.Vb.parseMetaData(n).get(Re.Vb.META_DATA_LABEL):Pe((0,Re.Hx)(n).toLowerCase()),i===Ie.FOLDER)o.push(`${r}-name-folder-icon`);else{if(r){if(o.push(`${r}-name-file-icon`),r.length<=255){const e=r.split(".");for(let t=1;t{const e=this._editor.getOptions(),n=e.get(41),o=n.fontFamily,r=n.fontFeatureSettings,s=e.get(106)||n.fontSize,a=e.get(107)||n.lineHeight,l=n.fontWeight,d=`${s}px`,c=`${a}px`;t.root.style.fontSize=d,t.root.style.fontWeight=l,i.style.fontFamily=o,i.style.fontFeatureSettings=r,i.style.lineHeight=c,t.icon.style.height=c,t.icon.style.width=c,t.readMore.style.height=c,t.readMore.style.width=c};return o(),t.disposables.add(this._editor.onDidChangeConfiguration((e=>{(e.hasChanged(41)||e.hasChanged(106)||e.hasChanged(107))&&o()}))),t}renderElement(e,t,n){const{completion:i}=e;n.root.id=He(t),n.colorspan.style.backgroundColor="";const r={labelEscapeNewLines:!0,matches:(0,F.mB)(e.score)};let s=[];if(19===i.kind&&$e.extract(e,s))n.icon.className="icon customcolor",n.iconContainer.className="icon hide",n.colorspan.style.backgroundColor=s[0];else if(20===i.kind&&this._themeService.getFileIconTheme().hasFileIcons){n.icon.className="icon hide",n.iconContainer.className="icon hide";const t=Be(this._modelService,this._modeService,ze.o.from({scheme:"fake",path:e.textLabel}),Ie.FILE),o=Be(this._modelService,this._modeService,ze.o.from({scheme:"fake",path:i.detail}),Ie.FILE);r.extraClasses=t.length>o.length?t:o}else 23===i.kind&&this._themeService.getFileIconTheme().hasFolderIcons?(n.icon.className="icon hide",n.iconContainer.className="icon hide",r.extraClasses=(0,o.xH)([Be(this._modelService,this._modeService,ze.o.from({scheme:"fake",path:e.textLabel}),Ie.FOLDER),Be(this._modelService,this._modeService,ze.o.from({scheme:"fake",path:i.detail}),Ie.FOLDER)])):(n.icon.className="icon hide",n.iconContainer.className="",n.iconContainer.classList.add("suggest-icon",...(0,_.Sy)(i.kind).split(" ")));i.tags&&i.tags.indexOf(1)>=0&&(r.extraClasses=(r.extraClasses||[]).concat(["deprecated"]),r.matches=[]),n.iconLabel.setLabel(e.textLabel,void 0,r),"string"==typeof i.label?(n.parametersLabel.textContent="",n.detailsLabel.textContent=Ze(i.detail||""),n.root.classList.add("string-label")):(n.parametersLabel.textContent=Ze(i.label.detail||""),n.detailsLabel.textContent=Ze(i.label.description||""),n.root.classList.remove("string-label")),this._editor.getOption(105).showInlineDetails?(0,he.$Z)(n.detailsLabel):(0,he.Cp)(n.detailsLabel),ye(e)?(n.right.classList.add("can-expand-details"),(0,he.$Z)(n.readMore),n.readMore.onmousedown=e=>{e.stopPropagation(),e.preventDefault()},n.readMore.onclick=e=>{e.stopPropagation(),e.preventDefault(),this._onDidToggleDetails.fire()}):(n.right.classList.remove("can-expand-details"),(0,he.Cp)(n.readMore),n.readMore.onmousedown=null,n.readMore.onclick=null)}disposeTemplate(e){e.disposables.dispose()}};function Ze(e){return e.replace(/\r\n|\r|\n/g,"")}Ue=function(e,t,n,i){var o,r=arguments.length,s=r<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,i);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,n,s):o(t,n))||s);return r>3&&s&&Object.defineProperty(t,n,s),s}([Ve(1,We.q),Ve(2,y.h),Ve(3,pe.XE)],Ue);var Ke=n(4527),qe=n(9870),Ye=function(e,t){return function(n,i){t(n,i,e)}};const Ge=(0,me.P6)("editorSuggestWidget.background",{dark:me.D0,light:me.D0,hc:me.D0},E.N("editorSuggestWidgetBackground","Background color of the suggest widget.")),Qe=(0,me.P6)("editorSuggestWidget.border",{dark:me.D1,light:me.D1,hc:me.D1},E.N("editorSuggestWidgetBorder","Border color of the suggest widget.")),Xe=(0,me.P6)("editorSuggestWidget.foreground",{dark:me.NO,light:me.NO,hc:me.NO},E.N("editorSuggestWidgetForeground","Foreground color of the suggest widget.")),Je=(0,me.P6)("editorSuggestWidget.selectedForeground",{dark:me.NP,light:me.NP,hc:me.NP},E.N("editorSuggestWidgetSelectedForeground","Foreground color of the selected entry in the suggest widget.")),et=(0,me.P6)("editorSuggestWidget.selectedIconForeground",{dark:me.cb,light:me.cb,hc:me.cb},E.N("editorSuggestWidgetSelectedIconForeground","Icon foreground color of the selected entry in the suggest widget.")),tt=(0,me.P6)("editorSuggestWidget.selectedBackground",{dark:me.Vq,light:me.Vq,hc:me.Vq},E.N("editorSuggestWidgetSelectedBackground","Background color of the selected entry in the suggest widget.")),nt=(0,me.P6)("editorSuggestWidget.highlightForeground",{dark:me.Gw,light:me.Gw,hc:me.Gw},E.N("editorSuggestWidgetHighlightForeground","Color of the match highlights in the suggest widget.")),it=(0,me.P6)("editorSuggestWidget.focusHighlightForeground",{dark:me.PX,light:me.PX,hc:me.PX},E.N("editorSuggestWidgetFocusHighlightForeground","Color of the match highlights in the suggest widget when an item is focused."));class ot{constructor(e,t){this._service=e,this._key=`suggestWidget.size/${t.getEditorType()}/${t instanceof Ke.H}`}restore(){var e;const t=null!==(e=this._service.get(this._key,0))&&void 0!==e?e:"";try{const e=JSON.parse(t);if(he.Ro.is(e))return he.Ro.lift(e)}catch(e){}}store(e){this._service.store(this._key,JSON.stringify(e),0,1)}reset(){this._service.remove(this._key,0)}}let rt=class e{constructor(e,t,n,i,o){this.editor=e,this._storageService=t,this._state=0,this._isAuto=!1,this._ignoreFocusEvents=!1,this._forceRenderingAbove=!1,this._explainMode=!1,this._showTimeout=new b._F,this._disposables=new a.SL,this._onDidSelect=new B.Q5,this._onDidFocus=new B.Q5,this._onDidHide=new B.Q5,this._onDidShow=new B.Q5,this.onDidSelect=this._onDidSelect.event,this.onDidFocus=this._onDidFocus.event,this.onDidHide=this._onDidHide.event,this.onDidShow=this._onDidShow.event,this._onDetailsKeydown=new B.Q5,this.onDetailsKeyDown=this._onDetailsKeydown.event,this.element=new we,this.element.domNode.classList.add("editor-widget","suggest-widget"),this._contentWidget=new st(this,e),this._persistedSize=new ot(t,e);class r{constructor(e,t,n=!1,i=!1){this.persistedSize=e,this.currentSize=t,this.persistHeight=n,this.persistWidth=i}}let s;this._disposables.add(this.element.onDidWillResize((()=>{this._contentWidget.lockPreference(),s=new r(this._persistedSize.restore(),this.element.size)}))),this._disposables.add(this.element.onDidResize((e=>{var t,n,i,o;if(this._resize(e.dimension.width,e.dimension.height),s&&(s.persistHeight=s.persistHeight||!!e.north||!!e.south,s.persistWidth=s.persistWidth||!!e.east||!!e.west),e.done){if(s){const{itemHeight:e,defaultSize:r}=this.getLayoutInfo(),a=Math.round(e/2);let{width:l,height:d}=this.element.size;(!s.persistHeight||Math.abs(s.currentSize.height-d)<=a)&&(d=null!==(n=null===(t=s.persistedSize)||void 0===t?void 0:t.height)&&void 0!==n?n:r.height),(!s.persistWidth||Math.abs(s.currentSize.width-l)<=a)&&(l=null!==(o=null===(i=s.persistedSize)||void 0===i?void 0:i.width)&&void 0!==o?o:r.width),this._persistedSize.store(new he.Ro(l,d))}this._contentWidget.unlockPreference(),s=void 0}}))),this._messageElement=he.R3(this.element.domNode,he.$(".message")),this._listElement=he.R3(this.element.domNode,he.$(".tree"));const l=o.createInstance(Ae,this.editor);l.onDidClose(this.toggleDetails,this,this._disposables),this._details=new Se(l,this.editor);const d=()=>this.element.domNode.classList.toggle("no-icons",!this.editor.getOption(105).showIcons);d();const c=o.createInstance(Ue,this.editor);this._disposables.add(c),this._disposables.add(c.onDidToggleDetails((()=>this.toggleDetails()))),this._list=new ue.aV("SuggestWidget",this._listElement,{getHeight:e=>this.getLayoutInfo().itemHeight,getTemplateId:e=>"suggestion"},[c],{alwaysConsumeMouseWheel:!0,useShadows:!1,mouseSupport:!1,accessibilityProvider:{getRole:()=>"option",getAriaLabel:e=>{if(e.isResolved&&this._isDetailsVisible()){const{documentation:t,detail:n}=e.completion,i=W.WU("{0}{1}",n||"",t?"string"==typeof t?t:t.value:"");return E.N("ariaCurrenttSuggestionReadDetails","{0}, docs: {1}",e.textLabel,i)}return e.textLabel},getWidgetAriaLabel:()=>E.N("suggest","Suggest"),getWidgetRole:()=>"listbox"}}),this._status=o.createInstance(De,this.element.domNode);const h=()=>this.element.domNode.classList.toggle("with-status-bar",this.editor.getOption(105).showStatusBar);h(),this._disposables.add((0,ge.Jl)(this._list,i,{listInactiveFocusBackground:tt,listInactiveFocusOutline:me.xL})),this._disposables.add(i.onDidColorThemeChange((e=>this._onThemeChange(e)))),this._onThemeChange(i.getColorTheme()),this._disposables.add(this._list.onMouseDown((e=>this._onListMouseDownOrTap(e)))),this._disposables.add(this._list.onTap((e=>this._onListMouseDownOrTap(e)))),this._disposables.add(this._list.onDidChangeSelection((e=>this._onListSelection(e)))),this._disposables.add(this._list.onDidChangeFocus((e=>this._onListFocus(e)))),this._disposables.add(this.editor.onDidChangeCursorSelection((()=>this._onCursorSelectionChanged()))),this._disposables.add(this.editor.onDidChangeConfiguration((e=>{e.hasChanged(105)&&(h(),d())}))),this._ctxSuggestWidgetVisible=M._y.Visible.bindTo(n),this._ctxSuggestWidgetDetailsVisible=M._y.DetailsVisible.bindTo(n),this._ctxSuggestWidgetMultipleSuggestions=M._y.MultipleSuggestions.bindTo(n),this._disposables.add(he.mu(this._details.widget.domNode,"keydown",(e=>{this._onDetailsKeydown.fire(e)}))),this._disposables.add(this.editor.onMouseDown((e=>this._onEditorMouseDown(e))))}dispose(){var e;this._details.widget.dispose(),this._details.dispose(),this._list.dispose(),this._status.dispose(),this._disposables.dispose(),null===(e=this._loadingTimeout)||void 0===e||e.dispose(),this._showTimeout.dispose(),this._contentWidget.dispose(),this.element.dispose()}_onEditorMouseDown(e){this._details.widget.domNode.contains(e.target.element)?this._details.widget.domNode.focus():this.element.domNode.contains(e.target.element)&&this.editor.focus()}_onCursorSelectionChanged(){0!==this._state&&this._contentWidget.layout()}_onListMouseDownOrTap(e){void 0!==e.element&&void 0!==e.index&&(e.browserEvent.preventDefault(),e.browserEvent.stopPropagation(),this._select(e.element,e.index))}_onListSelection(e){e.elements.length&&this._select(e.elements[0],e.indexes[0])}_select(e,t){const n=this._completionModel;n&&(this._onDidSelect.fire({item:e,index:t,model:n}),this.editor.focus())}_onThemeChange(e){const t=e.getColor(Ge);t&&(this.element.domNode.style.backgroundColor=t.toString(),this._messageElement.style.backgroundColor=t.toString(),this._details.widget.domNode.style.backgroundColor=t.toString());const n=e.getColor(Qe);n&&(this.element.domNode.style.borderColor=n.toString(),this._messageElement.style.borderColor=n.toString(),this._status.element.style.borderTopColor=n.toString(),this._details.widget.domNode.style.borderColor=n.toString(),this._detailsBorderColor=n.toString());const i=e.getColor(me.R8);i&&(this._detailsFocusBorderColor=i.toString()),this._details.widget.borderWidth="hc"===e.type?2:1}_onListFocus(e){var t;if(this._ignoreFocusEvents)return;if(!e.elements.length)return this._currentSuggestionDetails&&(this._currentSuggestionDetails.cancel(),this._currentSuggestionDetails=void 0,this._focusedItem=void 0),void this.editor.setAriaOptions({activeDescendant:void 0});if(!this._completionModel)return;const n=e.elements[0],i=e.indexes[0];n!==this._focusedItem&&(null===(t=this._currentSuggestionDetails)||void 0===t||t.cancel(),this._currentSuggestionDetails=void 0,this._focusedItem=n,this._list.reveal(i),this._currentSuggestionDetails=(0,b.PG)((e=>{return t=this,i=void 0,r=function*(){const t=(0,b.Vg)((()=>{this._isDetailsVisible()&&this.showDetails(!0)}),250);e.onCancellationRequested((()=>t.dispose()));const i=yield n.resolve(e);return t.dispose(),i},new((o=void 0)||(o=Promise))((function(e,n){function s(e){try{l(r.next(e))}catch(e){n(e)}}function a(e){try{l(r.throw(e))}catch(e){n(e)}}function l(t){var n;t.done?e(t.value):(n=t.value,n instanceof o?n:new o((function(e){e(n)}))).then(s,a)}l((r=r.apply(t,i||[])).next())}));var t,i,o,r})),this._currentSuggestionDetails.then((()=>{i>=this._list.length||n!==this._list.element(i)||(this._ignoreFocusEvents=!0,this._list.splice(i,1,[n]),this._list.setFocus([i]),this._ignoreFocusEvents=!1,this._isDetailsVisible()?this.showDetails(!1):this.element.domNode.classList.remove("docs-side"),this.editor.setAriaOptions({activeDescendant:He(i)}))})).catch(r.dL)),this._onDidFocus.fire({item:n,index:i,model:this._completionModel})}_setState(t){if(this._state!==t)switch(this._state=t,this.element.domNode.classList.toggle("frozen",4===t),this.element.domNode.classList.remove("message"),t){case 0:he.Cp(this._messageElement,this._listElement,this._status.element),this._details.hide(!0),this._status.hide(),this._contentWidget.hide(),this._ctxSuggestWidgetVisible.reset(),this._ctxSuggestWidgetMultipleSuggestions.reset(),this._showTimeout.cancel(),this.element.domNode.classList.remove("visible"),this._list.splice(0,this._list.length),this._focusedItem=void 0,this._cappedHeight=void 0,this._explainMode=!1;break;case 1:this.element.domNode.classList.add("message"),this._messageElement.textContent=e.LOADING_MESSAGE,he.Cp(this._listElement,this._status.element),he.$Z(this._messageElement),this._details.hide(),this._show(),this._focusedItem=void 0;break;case 2:this.element.domNode.classList.add("message"),this._messageElement.textContent=e.NO_SUGGESTIONS_MESSAGE,he.Cp(this._listElement,this._status.element),he.$Z(this._messageElement),this._details.hide(),this._show(),this._focusedItem=void 0;break;case 3:case 4:he.Cp(this._messageElement),he.$Z(this._listElement,this._status.element),this._show();break;case 5:he.Cp(this._messageElement),he.$Z(this._listElement,this._status.element),this._details.show(),this._show()}}_show(){this._status.show(),this._contentWidget.show(),this._layout(this._persistedSize.restore()),this._ctxSuggestWidgetVisible.set(!0),this._showTimeout.cancelAndSet((()=>{this.element.domNode.classList.add("visible"),this._onDidShow.fire(this)}),100)}showTriggered(e,t){0===this._state&&(this._contentWidget.setPosition(this.editor.getPosition()),this._isAuto=!!e,this._isAuto||(this._loadingTimeout=(0,b.Vg)((()=>this._setState(1)),t)))}showSuggestions(e,t,n,i){var o,r;if(this._contentWidget.setPosition(this.editor.getPosition()),null===(o=this._loadingTimeout)||void 0===o||o.dispose(),null===(r=this._currentSuggestionDetails)||void 0===r||r.cancel(),this._currentSuggestionDetails=void 0,this._completionModel!==e&&(this._completionModel=e),n&&2!==this._state&&0!==this._state)return void this._setState(4);const s=this._completionModel.items.length,a=0===s;if(this._ctxSuggestWidgetMultipleSuggestions.set(s>1),a)return this._setState(i?0:2),void(this._completionModel=void 0);this._focusedItem=void 0,this._list.splice(0,this._list.length,this._completionModel.items),this._setState(n?4:3),this._list.reveal(t,0),this._list.setFocus([t]),this._layout(this.element.size),this._detailsBorderColor&&(this._details.widget.domNode.style.borderColor=this._detailsBorderColor)}selectNextPage(){switch(this._state){case 0:return!1;case 5:return this._details.widget.pageDown(),!0;case 1:return!this._isAuto;default:return this._list.focusNextPage(),!0}}selectNext(){switch(this._state){case 0:return!1;case 1:return!this._isAuto;default:return this._list.focusNext(1,!0),!0}}selectLast(){switch(this._state){case 0:return!1;case 5:return this._details.widget.scrollBottom(),!0;case 1:return!this._isAuto;default:return this._list.focusLast(),!0}}selectPreviousPage(){switch(this._state){case 0:return!1;case 5:return this._details.widget.pageUp(),!0;case 1:return!this._isAuto;default:return this._list.focusPreviousPage(),!0}}selectPrevious(){switch(this._state){case 0:return!1;case 1:return!this._isAuto;default:return this._list.focusPrevious(1,!0),!1}}selectFirst(){switch(this._state){case 0:return!1;case 5:return this._details.widget.scrollTop(),!0;case 1:return!this._isAuto;default:return this._list.focusFirst(),!0}}getFocusedItem(){if(0!==this._state&&2!==this._state&&1!==this._state&&this._completionModel)return{item:this._list.getFocusedElements()[0],index:this._list.getFocus()[0],model:this._completionModel}}toggleDetailsFocus(){5===this._state?(this._setState(3),this._detailsBorderColor&&(this._details.widget.domNode.style.borderColor=this._detailsBorderColor)):3===this._state&&this._isDetailsVisible()&&(this._setState(5),this._detailsFocusBorderColor&&(this._details.widget.domNode.style.borderColor=this._detailsFocusBorderColor))}toggleDetails(){this._isDetailsVisible()?(this._ctxSuggestWidgetDetailsVisible.set(!1),this._setDetailsVisible(!1),this._details.hide(),this.element.domNode.classList.remove("shows-details")):!ye(this._list.getFocusedElements()[0])&&!this._explainMode||3!==this._state&&5!==this._state&&4!==this._state||(this._ctxSuggestWidgetDetailsVisible.set(!0),this._setDetailsVisible(!0),this.showDetails(!1))}showDetails(e){this._details.show(),e?this._details.widget.renderLoading():this._details.widget.renderItem(this._list.getFocusedElements()[0],this._explainMode),this._positionDetails(),this.editor.focus(),this.element.domNode.classList.add("shows-details")}toggleExplainMode(){this._list.getFocusedElements()[0]&&(this._explainMode=!this._explainMode,this._isDetailsVisible()?this.showDetails(!1):this.toggleDetails())}resetPersistedSize(){this._persistedSize.reset()}hideWidget(){var e;null===(e=this._loadingTimeout)||void 0===e||e.dispose(),this._setState(0),this._onDidHide.fire(this),this.element.clearSashHoverState();const t=this._persistedSize.restore(),n=Math.ceil(4.3*this.getLayoutInfo().itemHeight);t&&t.heightl&&(a=l);const d=this._completionModel?this._completionModel.stats.pLabelLen*r.typicalHalfwidthCharacterWidth:a,c=r.statusBarHeight+this._list.contentHeight+r.borderHeight,h=r.itemHeight+r.statusBarHeight,u=he.i(this.editor.getDomNode()),g=this.editor.getScrolledVisiblePosition(this.editor.getPosition()),p=u.top+g.top+g.height,m=Math.min(o.height-p-r.verticalPadding,c),f=Math.min(u.top+g.top-r.verticalPadding,c);let _=Math.min(Math.max(f,m)+r.borderHeight,c);s===(null===(t=this._cappedHeight)||void 0===t?void 0:t.capped)&&(s=this._cappedHeight.wanted),s_&&(s=_);const b=100;s>m||this._forceRenderingAbove&&f>b?(this._contentWidget.setPreference(1),this.element.enableSashes(!0,!0,!1,!1),_=f):(this._contentWidget.setPreference(2),this.element.enableSashes(!1,!0,!0,!1),_=m),this.element.preferredSize=new he.Ro(d,r.defaultSize.height),this.element.maxSize=new he.Ro(l,_),this.element.minSize=new he.Ro(220,h),this._cappedHeight=s===c?{wanted:null!==(i=null===(n=this._cappedHeight)||void 0===n?void 0:n.wanted)&&void 0!==i?i:e.height,capped:s}:void 0}this._resize(a,s)}_resize(e,t){const{width:n,height:i}=this.element.maxSize;e=Math.min(n,e),t=Math.min(i,t);const{statusBarHeight:o}=this.getLayoutInfo();this._list.layout(t-o,e),this._listElement.style.height=t-o+"px",this.element.layout(t,e),this._contentWidget.layout(),this._positionDetails()}_positionDetails(){this._isDetailsVisible()&&this._details.placeAtAnchor(this.element.domNode)}getLayoutInfo(){const e=this.editor.getOption(41),t=(0,qe.u)(this.editor.getOption(107)||e.lineHeight,8,1e3),n=this.editor.getOption(105).showStatusBar&&2!==this._state&&1!==this._state?t:0,i=this._details.widget.borderWidth,o=2*i;return{itemHeight:t,statusBarHeight:n,borderWidth:i,borderHeight:o,typicalHalfwidthCharacterWidth:e.typicalHalfwidthCharacterWidth,verticalPadding:22,horizontalPadding:14,defaultSize:new he.Ro(430,n+12*t+o)}}_isDetailsVisible(){return this._storageService.getBoolean("expandSuggestionDocs",0,!1)}_setDetailsVisible(e){this._storageService.store("expandSuggestionDocs",e,0,0)}forceRenderingAbove(){this._forceRenderingAbove||(this._forceRenderingAbove=!0,this._layout(this._persistedSize.restore()))}stopForceRenderingAbove(){this._forceRenderingAbove=!1}};rt.LOADING_MESSAGE=E.N("suggestWidget.loading","Loading..."),rt.NO_SUGGESTIONS_MESSAGE=E.N("suggestWidget.noSuggestions","No suggestions."),rt=function(e,t,n,i){var o,r=arguments.length,s=r<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,i);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,n,s):o(t,n))||s);return r>3&&s&&Object.defineProperty(t,n,s),s}([Ye(1,f.Uy),Ye(2,D.i6),Ye(3,pe.XE),Ye(4,C.TG)],rt);class st{constructor(e,t){this._widget=e,this._editor=t,this.allowEditorOverflow=!0,this.suppressMouseDown=!1,this._preferenceLocked=!1,this._added=!1,this._hidden=!1}dispose(){this._added&&(this._added=!1,this._editor.removeContentWidget(this))}getId(){return"editor.widget.suggestWidget"}getDomNode(){return this._widget.element.domNode}show(){this._hidden=!1,this._added||(this._added=!0,this._editor.addContentWidget(this))}hide(){this._hidden||(this._hidden=!0,this.layout())}layout(){this._editor.layoutContentWidget(this)}getPosition(){return!this._hidden&&this._position&&this._preference?{position:this._position,preference:[this._preference]}:null}beforeRender(){const{height:e,width:t}=this._widget.element.size,{borderWidth:n,horizontalPadding:i}=this._widget.getLayoutInfo();return new he.Ro(t+2*n+i,e+2*n)}afterRender(e){this._widget._afterRender(e)}setPreference(e){this._preferenceLocked||(this._preference=e)}lockPreference(){this._preferenceLocked=!0}unlockPreference(){this._preferenceLocked=!1}setPosition(e){this._position=e}}(0,pe.Ic)(((e,t)=>{const n=e.getColor(nt);n&&t.addRule(`.monaco-editor .suggest-widget .monaco-list .monaco-list-row .monaco-highlighted-label .highlight { color: ${n}; }`);const i=e.getColor(it);n&&t.addRule(`.monaco-editor .suggest-widget .monaco-list .monaco-list-row.focused .monaco-highlighted-label .highlight { color: ${i}; }`);const o=e.getColor(Xe);o&&t.addRule(`.monaco-editor .suggest-widget, .monaco-editor .suggest-details { color: ${o}; }`);const r=e.getColor(Je);r&&t.addRule(`.monaco-editor .suggest-widget .monaco-list .monaco-list-row.focused { color: ${r}; }`);const s=e.getColor(et);s&&t.addRule(`.monaco-editor .suggest-widget .monaco-list .monaco-list-row.focused .codicon { color: ${s}; }`);const a=e.getColor(me.ur);a&&t.addRule(`.monaco-editor .suggest-details a { color: ${a}; }`);const l=e.getColor(me.Sw);l&&t.addRule(`.monaco-editor .suggest-details code { background-color: ${l}; }`)}));let at=class e{constructor(t,n){this._editor=t,this._enabled=!1,this._ckAtEnd=e.AtEnd.bindTo(n),this._configListener=this._editor.onDidChangeConfiguration((e=>e.hasChanged(110)&&this._update())),this._update()}dispose(){var e;this._configListener.dispose(),null===(e=this._selectionListener)||void 0===e||e.dispose(),this._ckAtEnd.reset()}_update(){const e="on"===this._editor.getOption(110);if(this._enabled!==e)if(this._enabled=e,this._enabled){const e=()=>{if(!this._editor.hasModel())return void this._ckAtEnd.set(!1);const e=this._editor.getModel(),t=this._editor.getSelection(),n=e.getWordAtPosition(t.getStartPosition());n?this._ckAtEnd.set(n.endColumn===t.getStartPosition().column):this._ckAtEnd.set(!1)};this._selectionListener=this._editor.onDidChangeCursorSelection(e),e()}else this._selectionListener&&(this._ckAtEnd.reset(),this._selectionListener.dispose(),this._selectionListener=void 0)}};at.AtEnd=new D.uy("atEndOfWord",!1),at=function(e,t,n,i){var o,r=arguments.length,s=r<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,i);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,n,s):o(t,n))||s);return r>3&&s&&Object.defineProperty(t,n,s),s}([function(e,t){return function(n,i){t(n,i,e)}}(1,D.i6)],at);var lt=n(8401),dt=n(4906);class ct{constructor(e,t,n){this._disposables=new a.SL,this._disposables.add(t.onDidShow((()=>this._onItem(t.getFocusedItem())))),this._disposables.add(t.onDidFocus(this._onItem,this)),this._disposables.add(t.onDidHide(this.reset,this)),this._disposables.add(e.onWillType((i=>{if(this._active&&!t.isFrozen()){const t=i.charCodeAt(i.length-1);this._active.acceptCharacters.has(t)&&e.getOption(0)&&n(this._active.item)}})))}_onItem(e){if(!e||!(0,o.Of)(e.item.completion.commitCharacters))return void this.reset();if(this._active&&this._active.item.item===e.item)return;const t=new dt.q;for(const n of e.item.completion.commitCharacters)n.length>0&&t.add(n.charCodeAt(0));this._active={acceptCharacters:t,item:e}}reset(){this._active=void 0}dispose(){this._disposables.dispose()}}class ht{constructor(e,t){this._disposables=new a.SL,this._lastOvertyped=[],this._empty=!0,this._disposables.add(e.onWillType((()=>{if(!this._empty)return;if(!e.hasModel())return;const t=e.getSelections(),n=t.length;let i=!1;for(let e=0;eht._maxSelectionLength)return;this._lastOvertyped[e]={value:o.getValueInRange(n),multiline:n.startLineNumber!==n.endLineNumber}}this._empty=!1}))),this._disposables.add(t.onDidCancel((e=>{this._empty||e.retrigger||(this._empty=!0)})))}getLastOvertypedInfo(e){if(!this._empty&&e>=0&&el.set(e.getOption(105).insertMode))),this.widget=this._toDispose.add(new b.Ue((()=>{const e=this._instantiationService.createInstance(rt,this.editor);this._toDispose.add(e),this._toDispose.add(e.onDidSelect((e=>this._insertSuggestion(e,0)),this));const t=new ct(this.editor,e,(e=>this._insertSuggestion(e,2)));this._toDispose.add(t),this._toDispose.add(this.model.onDidSuggest((e=>{0===e.completionModel.items.length&&t.reset()})));const n=M._y.MakesTextEdit.bindTo(this._contextKeyService),i=M._y.HasInsertAndReplaceRange.bindTo(this._contextKeyService),o=M._y.CanResolve.bindTo(this._contextKeyService);return this._toDispose.add((0,a.OF)((()=>{n.reset(),i.reset(),o.reset()}))),this._toDispose.add(e.onDidFocus((({item:e})=>{const t=this.editor.getPosition(),r=e.editStart.column,s=t.column;let a=!0;"smart"!==this.editor.getOption(1)||2!==this.model.state||e.completion.command||e.completion.additionalTextEdits||4&e.completion.insertTextRules||s-r!==e.completion.insertText.length||(a=this.editor.getModel().getValueInRange({startLineNumber:t.lineNumber,startColumn:r,endLineNumber:t.lineNumber,endColumn:s})!==e.completion.insertText),n.set(a),i.set(!ut.L.equals(e.editInsertEnd,e.editReplaceEnd)),o.set(Boolean(e.provider.resolveCompletionItem)||Boolean(e.completion.documentation)||e.completion.detail!==e.completion.label)}))),this._toDispose.add(e.onDetailsKeyDown((e=>{e.toKeybinding().equals(new s.QC(!0,!1,!1,!1,33))||gt.dz&&e.toKeybinding().equals(new s.QC(!1,!1,!1,!0,33))?e.stopPropagation():e.toKeybinding().isModifierKey()||this.editor.focus()}))),e}))),this._overtypingCapturer=this._toDispose.add(new b.Ue((()=>this._toDispose.add(new ht(this.editor,this.model))))),this._alternatives=this._toDispose.add(new b.Ue((()=>this._toDispose.add(new T(this.editor,this._contextKeyService))))),this._toDispose.add(o.createInstance(at,e)),this._toDispose.add(this.model.onDidTrigger((e=>{this.widget.value.showTriggered(e.auto,e.shy?250:50),this._lineSuffix.value=new ft(this.editor.getModel(),e.position)}))),this._toDispose.add(this.model.onDidSuggest((e=>{if(!e.shy){let t=this._memoryService.select(this.editor.getModel(),this.editor.getPosition(),e.completionModel.items);this.widget.value.showSuggestions(e.completionModel,t,e.isFrozen,e.auto)}}))),this._toDispose.add(this.model.onDidCancel((e=>{e.retrigger||this.widget.value.hideWidget()}))),this._toDispose.add(this.editor.onDidBlurEditorWidget((()=>{this.model.cancel(),this.model.clear()})));let d=M._y.AcceptSuggestionsOnEnter.bindTo(i),c=()=>{const e=this.editor.getOption(1);d.set("on"===e||"smart"===e)};this._toDispose.add(this.editor.onDidChangeConfiguration((()=>c()))),c()}static get(t){return t.getContribution(e.ID)}dispose(){this._alternatives.dispose(),this._toDispose.dispose(),this.widget.dispose(),this.model.dispose(),this._lineSuffix.dispose()}_insertSuggestion(e,t){if(!e||!e.item)return this._alternatives.value.reset(),this.model.cancel(),void this.model.clear();if(!this.editor.hasModel())return;const n=this.editor.getModel(),i=n.getAlternativeVersionId(),{item:o}=e,s=[],a=new V.A;1&t||this.editor.pushUndoStop();const d=this.getOverwriteInfo(o,Boolean(8&t));if(this._memoryService.memorize(n,this.editor.getPosition(),o),Array.isArray(o.completion.additionalTextEdits)){const e=l.ZF.capture(this.editor);this.editor.executeEdits("suggestController.additionalTextEdits.sync",o.completion.additionalTextEdits.map((e=>c.h.replace(h.e.lift(e.range),e.text)))),e.restoreRelativeVerticalPositionOfCursor(this.editor)}else if(!o.isResolved){const e=new pt.G(!0);let i;const r=n.onDidChangeContent((e=>{if(e.isFlush)return a.cancel(),void r.dispose();for(let t of e.changes){const e=h.e.getEndPosition(t.range);i&&!ut.L.isBefore(e,i)||(i=e)}}));let d=t;t|=2;let u=!1,g=this.editor.onWillType((()=>{g.dispose(),u=!0,2&d||this.editor.pushUndoStop()}));s.push(o.resolve(a.token).then((()=>{if(!o.completion.additionalTextEdits||a.token.isCancellationRequested)return!1;if(i&&o.completion.additionalTextEdits.some((e=>ut.L.isBefore(i,h.e.getStartPosition(e.range)))))return!1;u&&this.editor.pushUndoStop();const e=l.ZF.capture(this.editor);return this.editor.executeEdits("suggestController.additionalTextEdits.async",o.completion.additionalTextEdits.map((e=>c.h.replace(h.e.lift(e.range),e.text)))),e.restoreRelativeVerticalPositionOfCursor(this.editor),!u&&2&d||this.editor.pushUndoStop(),!0})).then((t=>{this._logService.trace("[suggest] async resolving of edits DONE (ms, applied?)",e.elapsed(),t),r.dispose(),g.dispose()})))}let{insertText:u}=o.completion;4&o.completion.insertTextRules||(u=p.Yj.escape(u)),g.SnippetController2.get(this.editor).insert(u,{overwriteBefore:d.overwriteBefore,overwriteAfter:d.overwriteAfter,undoStopBefore:!1,undoStopAfter:!1,adjustWhitespace:!(1&o.completion.insertTextRules),clipboardText:e.model.clipboardText,overtypingCapturer:this._overtypingCapturer.value}),2&t||this.editor.pushUndoStop(),o.completion.command?o.completion.command.id===bt.id?this.model.trigger({auto:!0,shy:!1},!0):(s.push(this._commandService.executeCommand(o.completion.command.id,...o.completion.command.arguments?[...o.completion.command.arguments]:[]).catch(r.dL)),this.model.cancel()):this.model.cancel(),4&t&&this._alternatives.value.set(e,(e=>{for(a.cancel();n.canUndo();){i!==n.getAlternativeVersionId()&&n.undo(),this._insertSuggestion(e,3|(8&t?8:0));break}})),this._alertCompletionItem(o),Promise.all(s).finally((()=>{this.model.clear(),a.dispose()}))}getOverwriteInfo(e,t){(0,lt.p_)(this.editor.hasModel());let n="replace"===this.editor.getOption(105).insertMode;t&&(n=!n);const i=e.position.column-e.editStart.column,o=(n?e.editReplaceEnd.column:e.editInsertEnd.column)-e.position.column;return{overwriteBefore:i+(this.editor.getPosition().column-e.position.column),overwriteAfter:o+(this._lineSuffix.value?this._lineSuffix.value.delta(this.editor.getPosition()):0)}}_alertCompletionItem(e){if((0,o.Of)(e.completion.additionalTextEdits)){let t=E.N("aria.alert.snippet","Accepting '{0}' made {1} additional edits",e.textLabel,e.completion.additionalTextEdits.length);(0,i.Z9)(t)}}triggerSuggest(e){this.editor.hasModel()&&(this.model.trigger({auto:!1,shy:!1},!1,e),this.editor.revealLine(this.editor.getPosition().lineNumber,0),this.editor.focus())}triggerSuggestAndAcceptBest(e){if(!this.editor.hasModel())return;const t=this.editor.getPosition(),n=()=>{t.equals(this.editor.getPosition())&&this._commandService.executeCommand(e.fallback)},i=e=>{if(4&e.completion.insertTextRules||e.completion.additionalTextEdits)return!0;const t=this.editor.getPosition(),n=e.editStart.column,i=t.column;return i-n!==e.completion.insertText.length||this.editor.getModel().getValueInRange({startLineNumber:t.lineNumber,startColumn:n,endLineNumber:t.lineNumber,endColumn:i})!==e.completion.insertText};B.ju.once(this.model.onDidTrigger)((e=>{let t=[];B.ju.any(this.model.onDidTrigger,this.model.onDidCancel)((()=>{(0,a.B9)(t),n()}),void 0,t),this.model.onDidSuggest((({completionModel:e})=>{if((0,a.B9)(t),0===e.items.length)return void n();const o=this._memoryService.select(this.editor.getModel(),this.editor.getPosition(),e.items),r=e.items[o];i(r)?(this.editor.pushUndoStop(),this._insertSuggestion({index:o,item:r,model:e},7)):n()}),void 0,t)})),this.model.trigger({auto:!1,shy:!0}),this.editor.revealLine(t.lineNumber,0),this.editor.focus()}acceptSelectedSuggestion(e,t){const n=this.widget.value.getFocusedItem();let i=0;e&&(i|=4),t&&(i|=8),this._insertSuggestion(n,i)}acceptNextSuggestion(){this._alternatives.value.next()}acceptPrevSuggestion(){this._alternatives.value.prev()}cancelSuggestWidget(){this.model.cancel(),this.model.clear(),this.widget.value.hideWidget()}selectNextSuggestion(){this.widget.value.selectNext()}selectNextPageSuggestion(){this.widget.value.selectNextPage()}selectLastSuggestion(){this.widget.value.selectLast()}selectPrevSuggestion(){this.widget.value.selectPrevious()}selectPrevPageSuggestion(){this.widget.value.selectPreviousPage()}selectFirstSuggestion(){this.widget.value.selectFirst()}toggleSuggestionDetails(){this.widget.value.toggleDetails()}toggleExplainMode(){this.widget.value.toggleExplainMode()}toggleSuggestionFocus(){this.widget.value.toggleDetailsFocus()}resetWidgetSize(){this.widget.value.resetPersistedSize()}forceRenderingAbove(){this.widget.value.forceRenderingAbove()}stopForceRenderingAbove(){this.widget.value.stopForceRenderingAbove()}};_t.ID="editor.contrib.suggestController",_t=function(e,t,n,i){var o,r=arguments.length,s=r<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,i);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,n,s):o(t,n))||s);return r>3&&s&&Object.defineProperty(t,n,s),s}([mt(1,L),mt(2,N.H),mt(3,D.i6),mt(4,C.TG),mt(5,K.VZ)],_t);class bt extends d.R6{constructor(){super({id:bt.id,label:E.N("suggest.trigger.label","Trigger Suggest"),alias:"Trigger Suggest",precondition:D.Ao.and(u.u.writable,u.u.hasCompletionItemProvider),kbOpts:{kbExpr:u.u.textInputFocus,primary:2058,secondary:[2087],mac:{primary:266,secondary:[521,2087]},weight:100}})}run(e,t){const n=_t.get(t);n&&n.triggerSuggest()}}bt.id="editor.action.triggerSuggest",(0,d._K)(_t.ID,_t),(0,d.Qr)(bt);const Ct=190,vt=d._l.bindToContribution(_t.get);(0,d.fK)(new vt({id:"acceptSelectedSuggestion",precondition:M._y.Visible,handler(e){e.acceptSelectedSuggestion(!0,!1)}})),I.W.registerKeybindingRule({id:"acceptSelectedSuggestion",when:D.Ao.and(M._y.Visible,u.u.textInputFocus),primary:2,weight:Ct}),I.W.registerKeybindingRule({id:"acceptSelectedSuggestion",when:D.Ao.and(M._y.Visible,u.u.textInputFocus,M._y.AcceptSuggestionsOnEnter,M._y.MakesTextEdit),primary:3,weight:Ct}),Le.BH.appendMenuItem(M.GI,{command:{id:"acceptSelectedSuggestion",title:E.N("accept.insert","Insert")},group:"left",order:1,when:M._y.HasInsertAndReplaceRange.toNegated()}),Le.BH.appendMenuItem(M.GI,{command:{id:"acceptSelectedSuggestion",title:E.N("accept.insert","Insert")},group:"left",order:1,when:D.Ao.and(M._y.HasInsertAndReplaceRange,M._y.InsertMode.isEqualTo("insert"))}),Le.BH.appendMenuItem(M.GI,{command:{id:"acceptSelectedSuggestion",title:E.N("accept.replace","Replace")},group:"left",order:1,when:D.Ao.and(M._y.HasInsertAndReplaceRange,M._y.InsertMode.isEqualTo("replace"))}),(0,d.fK)(new vt({id:"acceptAlternativeSelectedSuggestion",precondition:D.Ao.and(M._y.Visible,u.u.textInputFocus),kbOpts:{weight:Ct,kbExpr:u.u.textInputFocus,primary:1027,secondary:[1026]},handler(e){e.acceptSelectedSuggestion(!1,!0)},menuOpts:[{menuId:M.GI,group:"left",order:2,when:D.Ao.and(M._y.HasInsertAndReplaceRange,M._y.InsertMode.isEqualTo("insert")),title:E.N("accept.replace","Replace")},{menuId:M.GI,group:"left",order:2,when:D.Ao.and(M._y.HasInsertAndReplaceRange,M._y.InsertMode.isEqualTo("replace")),title:E.N("accept.insert","Insert")}]})),N.P.registerCommandAlias("acceptSelectedSuggestionOnEnter","acceptSelectedSuggestion"),(0,d.fK)(new vt({id:"hideSuggestWidget",precondition:M._y.Visible,handler:e=>e.cancelSuggestWidget(),kbOpts:{weight:Ct,kbExpr:u.u.textInputFocus,primary:9,secondary:[1033]}})),(0,d.fK)(new vt({id:"selectNextSuggestion",precondition:D.Ao.and(M._y.Visible,M._y.MultipleSuggestions),handler:e=>e.selectNextSuggestion(),kbOpts:{weight:Ct,kbExpr:u.u.textInputFocus,primary:18,secondary:[2066],mac:{primary:18,secondary:[2066,300]}}})),(0,d.fK)(new vt({id:"selectNextPageSuggestion",precondition:D.Ao.and(M._y.Visible,M._y.MultipleSuggestions),handler:e=>e.selectNextPageSuggestion(),kbOpts:{weight:Ct,kbExpr:u.u.textInputFocus,primary:12,secondary:[2060]}})),(0,d.fK)(new vt({id:"selectLastSuggestion",precondition:D.Ao.and(M._y.Visible,M._y.MultipleSuggestions),handler:e=>e.selectLastSuggestion()})),(0,d.fK)(new vt({id:"selectPrevSuggestion",precondition:D.Ao.and(M._y.Visible,M._y.MultipleSuggestions),handler:e=>e.selectPrevSuggestion(),kbOpts:{weight:Ct,kbExpr:u.u.textInputFocus,primary:16,secondary:[2064],mac:{primary:16,secondary:[2064,302]}}})),(0,d.fK)(new vt({id:"selectPrevPageSuggestion",precondition:D.Ao.and(M._y.Visible,M._y.MultipleSuggestions),handler:e=>e.selectPrevPageSuggestion(),kbOpts:{weight:Ct,kbExpr:u.u.textInputFocus,primary:11,secondary:[2059]}})),(0,d.fK)(new vt({id:"selectFirstSuggestion",precondition:D.Ao.and(M._y.Visible,M._y.MultipleSuggestions),handler:e=>e.selectFirstSuggestion()})),(0,d.fK)(new vt({id:"toggleSuggestionDetails",precondition:M._y.Visible,handler:e=>e.toggleSuggestionDetails(),kbOpts:{weight:Ct,kbExpr:u.u.textInputFocus,primary:2058,mac:{primary:266}},menuOpts:[{menuId:M.GI,group:"right",order:1,when:D.Ao.and(M._y.DetailsVisible,M._y.CanResolve),title:E.N("detail.more","show less")},{menuId:M.GI,group:"right",order:1,when:D.Ao.and(M._y.DetailsVisible.toNegated(),M._y.CanResolve),title:E.N("detail.less","show more")}]})),(0,d.fK)(new vt({id:"toggleExplainMode",precondition:M._y.Visible,handler:e=>e.toggleExplainMode(),kbOpts:{weight:100,primary:2133}})),(0,d.fK)(new vt({id:"toggleSuggestionFocus",precondition:M._y.Visible,handler:e=>e.toggleSuggestionFocus(),kbOpts:{weight:Ct,kbExpr:u.u.textInputFocus,primary:2570,mac:{primary:778}}})),(0,d.fK)(new vt({id:"insertBestCompletion",precondition:D.Ao.and(u.u.textInputFocus,D.Ao.equals("config.editor.tabCompletion","on"),at.AtEnd,M._y.Visible.toNegated(),T.OtherSuggestions.toNegated(),g.SnippetController2.InSnippetMode.toNegated()),handler:(e,t)=>{e.triggerSuggestAndAcceptBest((0,lt.Kn)(t)?Object.assign({fallback:"tab"},t):{fallback:"tab"})},kbOpts:{weight:Ct,primary:2}})),(0,d.fK)(new vt({id:"insertNextSuggestion",precondition:D.Ao.and(u.u.textInputFocus,D.Ao.equals("config.editor.tabCompletion","on"),T.OtherSuggestions,M._y.Visible.toNegated(),g.SnippetController2.InSnippetMode.toNegated()),handler:e=>e.acceptNextSuggestion(),kbOpts:{weight:Ct,kbExpr:u.u.textInputFocus,primary:2}})),(0,d.fK)(new vt({id:"insertPrevSuggestion",precondition:D.Ao.and(u.u.textInputFocus,D.Ao.equals("config.editor.tabCompletion","on"),T.OtherSuggestions,M._y.Visible.toNegated(),g.SnippetController2.InSnippetMode.toNegated()),handler:e=>e.acceptPrevSuggestion(),kbOpts:{weight:Ct,kbExpr:u.u.textInputFocus,primary:1026}})),(0,d.Qr)(class extends d.R6{constructor(){super({id:"editor.action.resetSuggestSize",label:E.N("suggest.reset.label","Reset Suggest Widget Size"),alias:"Reset Suggest Widget Size",precondition:void 0})}run(e,t){_t.get(t).resetWidgetSize()}})},4954:(e,t,n)=>{"use strict";var i=n(3580),o=n(7781),r=n(3910),s=n(3046);const a=(0,r.P6)("symbolIcon.arrayForeground",{dark:r.dR,light:r.dR,hc:r.dR},(0,i.N)("symbolIcon.arrayForeground","The foreground color for array symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),l=(0,r.P6)("symbolIcon.booleanForeground",{dark:r.dR,light:r.dR,hc:r.dR},(0,i.N)("symbolIcon.booleanForeground","The foreground color for boolean symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),d=(0,r.P6)("symbolIcon.classForeground",{dark:"#EE9D28",light:"#D67E00",hc:"#EE9D28"},(0,i.N)("symbolIcon.classForeground","The foreground color for class symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),c=(0,r.P6)("symbolIcon.colorForeground",{dark:r.dR,light:r.dR,hc:r.dR},(0,i.N)("symbolIcon.colorForeground","The foreground color for color symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),h=(0,r.P6)("symbolIcon.constantForeground",{dark:r.dR,light:r.dR,hc:r.dR},(0,i.N)("symbolIcon.constantForeground","The foreground color for constant symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),u=(0,r.P6)("symbolIcon.constructorForeground",{dark:"#B180D7",light:"#652D90",hc:"#B180D7"},(0,i.N)("symbolIcon.constructorForeground","The foreground color for constructor symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),g=(0,r.P6)("symbolIcon.enumeratorForeground",{dark:"#EE9D28",light:"#D67E00",hc:"#EE9D28"},(0,i.N)("symbolIcon.enumeratorForeground","The foreground color for enumerator symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),p=(0,r.P6)("symbolIcon.enumeratorMemberForeground",{dark:"#75BEFF",light:"#007ACC",hc:"#75BEFF"},(0,i.N)("symbolIcon.enumeratorMemberForeground","The foreground color for enumerator member symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),m=(0,r.P6)("symbolIcon.eventForeground",{dark:"#EE9D28",light:"#D67E00",hc:"#EE9D28"},(0,i.N)("symbolIcon.eventForeground","The foreground color for event symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),f=(0,r.P6)("symbolIcon.fieldForeground",{dark:"#75BEFF",light:"#007ACC",hc:"#75BEFF"},(0,i.N)("symbolIcon.fieldForeground","The foreground color for field symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),_=(0,r.P6)("symbolIcon.fileForeground",{dark:r.dR,light:r.dR,hc:r.dR},(0,i.N)("symbolIcon.fileForeground","The foreground color for file symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),b=(0,r.P6)("symbolIcon.folderForeground",{dark:r.dR,light:r.dR,hc:r.dR},(0,i.N)("symbolIcon.folderForeground","The foreground color for folder symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),C=(0,r.P6)("symbolIcon.functionForeground",{dark:"#B180D7",light:"#652D90",hc:"#B180D7"},(0,i.N)("symbolIcon.functionForeground","The foreground color for function symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),v=(0,r.P6)("symbolIcon.interfaceForeground",{dark:"#75BEFF",light:"#007ACC",hc:"#75BEFF"},(0,i.N)("symbolIcon.interfaceForeground","The foreground color for interface symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),w=(0,r.P6)("symbolIcon.keyForeground",{dark:r.dR,light:r.dR,hc:r.dR},(0,i.N)("symbolIcon.keyForeground","The foreground color for key symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),y=(0,r.P6)("symbolIcon.keywordForeground",{dark:r.dR,light:r.dR,hc:r.dR},(0,i.N)("symbolIcon.keywordForeground","The foreground color for keyword symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),A=(0,r.P6)("symbolIcon.methodForeground",{dark:"#B180D7",light:"#652D90",hc:"#B180D7"},(0,i.N)("symbolIcon.methodForeground","The foreground color for method symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),S=(0,r.P6)("symbolIcon.moduleForeground",{dark:r.dR,light:r.dR,hc:r.dR},(0,i.N)("symbolIcon.moduleForeground","The foreground color for module symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),x=(0,r.P6)("symbolIcon.namespaceForeground",{dark:r.dR,light:r.dR,hc:r.dR},(0,i.N)("symbolIcon.namespaceForeground","The foreground color for namespace symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),k=(0,r.P6)("symbolIcon.nullForeground",{dark:r.dR,light:r.dR,hc:r.dR},(0,i.N)("symbolIcon.nullForeground","The foreground color for null symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),L=(0,r.P6)("symbolIcon.numberForeground",{dark:r.dR,light:r.dR,hc:r.dR},(0,i.N)("symbolIcon.numberForeground","The foreground color for number symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),E=(0,r.P6)("symbolIcon.objectForeground",{dark:r.dR,light:r.dR,hc:r.dR},(0,i.N)("symbolIcon.objectForeground","The foreground color for object symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),N=(0,r.P6)("symbolIcon.operatorForeground",{dark:r.dR,light:r.dR,hc:r.dR},(0,i.N)("symbolIcon.operatorForeground","The foreground color for operator symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),D=(0,r.P6)("symbolIcon.packageForeground",{dark:r.dR,light:r.dR,hc:r.dR},(0,i.N)("symbolIcon.packageForeground","The foreground color for package symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),I=(0,r.P6)("symbolIcon.propertyForeground",{dark:r.dR,light:r.dR,hc:r.dR},(0,i.N)("symbolIcon.propertyForeground","The foreground color for property symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),M=(0,r.P6)("symbolIcon.referenceForeground",{dark:r.dR,light:r.dR,hc:r.dR},(0,i.N)("symbolIcon.referenceForeground","The foreground color for reference symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),T=(0,r.P6)("symbolIcon.snippetForeground",{dark:r.dR,light:r.dR,hc:r.dR},(0,i.N)("symbolIcon.snippetForeground","The foreground color for snippet symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),R=(0,r.P6)("symbolIcon.stringForeground",{dark:r.dR,light:r.dR,hc:r.dR},(0,i.N)("symbolIcon.stringForeground","The foreground color for string symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),O=(0,r.P6)("symbolIcon.structForeground",{dark:r.dR,light:r.dR,hc:r.dR},(0,i.N)("symbolIcon.structForeground","The foreground color for struct symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),B=(0,r.P6)("symbolIcon.textForeground",{dark:r.dR,light:r.dR,hc:r.dR},(0,i.N)("symbolIcon.textForeground","The foreground color for text symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),P=(0,r.P6)("symbolIcon.typeParameterForeground",{dark:r.dR,light:r.dR,hc:r.dR},(0,i.N)("symbolIcon.typeParameterForeground","The foreground color for type parameter symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),F=(0,r.P6)("symbolIcon.unitForeground",{dark:r.dR,light:r.dR,hc:r.dR},(0,i.N)("symbolIcon.unitForeground","The foreground color for unit symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),W=(0,r.P6)("symbolIcon.variableForeground",{dark:"#75BEFF",light:"#007ACC",hc:"#75BEFF"},(0,i.N)("symbolIcon.variableForeground","The foreground color for variable symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));(0,o.Ic)(((e,t)=>{const n=e.getColor(a);n&&t.addRule(`${s.lA.symbolArray.cssSelector} { color: ${n}; }`);const i=e.getColor(l);i&&t.addRule(`${s.lA.symbolBoolean.cssSelector} { color: ${i}; }`);const o=e.getColor(d);o&&t.addRule(`${s.lA.symbolClass.cssSelector} { color: ${o}; }`);const r=e.getColor(A);r&&t.addRule(`${s.lA.symbolMethod.cssSelector} { color: ${r}; }`);const z=e.getColor(c);z&&t.addRule(`${s.lA.symbolColor.cssSelector} { color: ${z}; }`);const V=e.getColor(h);V&&t.addRule(`${s.lA.symbolConstant.cssSelector} { color: ${V}; }`);const H=e.getColor(u);H&&t.addRule(`${s.lA.symbolConstructor.cssSelector} { color: ${H}; }`);const j=e.getColor(g);j&&t.addRule(`\n\t\t\t${s.lA.symbolValue.cssSelector},${s.lA.symbolEnum.cssSelector} { color: ${j}; }`);const $=e.getColor(p);$&&t.addRule(`${s.lA.symbolEnumMember.cssSelector} { color: ${$}; }`);const U=e.getColor(m);U&&t.addRule(`${s.lA.symbolEvent.cssSelector} { color: ${U}; }`);const Z=e.getColor(f);Z&&t.addRule(`${s.lA.symbolField.cssSelector} { color: ${Z}; }`);const K=e.getColor(_);K&&t.addRule(`${s.lA.symbolFile.cssSelector} { color: ${K}; }`);const q=e.getColor(b);q&&t.addRule(`${s.lA.symbolFolder.cssSelector} { color: ${q}; }`);const Y=e.getColor(C);Y&&t.addRule(`${s.lA.symbolFunction.cssSelector} { color: ${Y}; }`);const G=e.getColor(v);G&&t.addRule(`${s.lA.symbolInterface.cssSelector} { color: ${G}; }`);const Q=e.getColor(w);Q&&t.addRule(`${s.lA.symbolKey.cssSelector} { color: ${Q}; }`);const X=e.getColor(y);X&&t.addRule(`${s.lA.symbolKeyword.cssSelector} { color: ${X}; }`);const J=e.getColor(S);J&&t.addRule(`${s.lA.symbolModule.cssSelector} { color: ${J}; }`);const ee=e.getColor(x);ee&&t.addRule(`${s.lA.symbolNamespace.cssSelector} { color: ${ee}; }`);const te=e.getColor(k);te&&t.addRule(`${s.lA.symbolNull.cssSelector} { color: ${te}; }`);const ne=e.getColor(L);ne&&t.addRule(`${s.lA.symbolNumber.cssSelector} { color: ${ne}; }`);const ie=e.getColor(E);ie&&t.addRule(`${s.lA.symbolObject.cssSelector} { color: ${ie}; }`);const oe=e.getColor(N);oe&&t.addRule(`${s.lA.symbolOperator.cssSelector} { color: ${oe}; }`);const re=e.getColor(D);re&&t.addRule(`${s.lA.symbolPackage.cssSelector} { color: ${re}; }`);const se=e.getColor(I);se&&t.addRule(`${s.lA.symbolProperty.cssSelector} { color: ${se}; }`);const ae=e.getColor(M);ae&&t.addRule(`${s.lA.symbolReference.cssSelector} { color: ${ae}; }`);const le=e.getColor(T);le&&t.addRule(`${s.lA.symbolSnippet.cssSelector} { color: ${le}; }`);const de=e.getColor(R);de&&t.addRule(`${s.lA.symbolString.cssSelector} { color: ${de}; }`);const ce=e.getColor(O);ce&&t.addRule(`${s.lA.symbolStruct.cssSelector} { color: ${ce}; }`);const he=e.getColor(B);he&&t.addRule(`${s.lA.symbolText.cssSelector} { color: ${he}; }`);const ue=e.getColor(P);ue&&t.addRule(`${s.lA.symbolTypeParameter.cssSelector} { color: ${ue}; }`);const ge=e.getColor(F);ge&&t.addRule(`${s.lA.symbolUnit.cssSelector} { color: ${ge}; }`);const pe=e.getColor(W);pe&&t.addRule(`${s.lA.symbolVariable.cssSelector} { color: ${pe}; }`)}))},9720:(e,t,n)=>{"use strict";n.r(t),n.d(t,{ToggleTabFocusModeAction:()=>a});var i=n(3580),o=n(6346),r=n(6830),s=n(6345);class a extends r.R6{constructor(){super({id:a.ID,label:i.N({key:"toggle.tabMovesFocus",comment:["Turn on/off use of tab key for moving focus around VS Code"]},"Toggle Tab Key Moves Focus"),alias:"Toggle Tab Key Moves Focus",precondition:void 0,kbOpts:{kbExpr:null,primary:2091,mac:{primary:1323},weight:100}})}run(e,t){const n=!s.nG.getTabFocusMode();s.nG.setTabFocusMode(n),n?(0,o.Z9)(i.N("toggle.tabMovesFocus.on","Pressing Tab will now move focus to the next focusable element")):(0,o.Z9)(i.N("toggle.tabMovesFocus.off","Pressing Tab will now insert the tab character"))}}a.ID="editor.action.toggleTabFocusMode",(0,r.Qr)(a)},1725:(e,t,n)=>{"use strict";n.r(t),n.d(t,{UnusualLineTerminatorsDetector:()=>h});var i=n(3580),o=n(5976),r=n(6830),s=n(1640),a=n(8820),l=n(5935),d=function(e,t){return function(n,i){t(n,i,e)}};const c="ignoreUnusualLineTerminators";let h=class extends o.JT{constructor(e,t,n){super(),this._editor=e,this._dialogService=t,this._codeEditorService=n,this._config=this._editor.getOption(112),this._register(this._editor.onDidChangeConfiguration((e=>{e.hasChanged(112)&&(this._config=this._editor.getOption(112),this._checkForUnusualLineTerminators())}))),this._register(this._editor.onDidChangeModel((()=>{this._checkForUnusualLineTerminators()}))),this._register(this._editor.onDidChangeModelContent((e=>{e.isUndoing||this._checkForUnusualLineTerminators()})))}_checkForUnusualLineTerminators(){return e=this,t=void 0,o=function*(){if("off"===this._config)return;if(!this._editor.hasModel())return;const e=this._editor.getModel();if(!e.mightContainUnusualLineTerminators())return;const t=function(e,t){return e.getModelProperty(t.uri,c)}(this._codeEditorService,e);!0!==t&&(this._editor.getOption(79)||("auto"!==this._config?(yield this._dialogService.confirm({title:i.N("unusualLineTerminators.title","Unusual Line Terminators"),message:i.N("unusualLineTerminators.message","Detected unusual line terminators"),detail:i.N("unusualLineTerminators.detail","The file '{0}' contains one or more unusual line terminator characters, like Line Separator (LS) or Paragraph Separator (PS).\n\nIt is recommended to remove them from the file. This can be configured via `editor.unusualLineTerminators`.",(0,l.EZ)(e.uri)),primaryButton:i.N("unusualLineTerminators.fix","Remove Unusual Line Terminators"),secondaryButton:i.N("unusualLineTerminators.ignore","Ignore")})).confirmed?e.removeUnusualLineTerminators(this._editor.getSelections()):function(e,t,n){e.setModelProperty(t.uri,c,!0)}(this._codeEditorService,e):e.removeUnusualLineTerminators(this._editor.getSelections())))},new((n=void 0)||(n=Promise))((function(i,r){function s(e){try{l(o.next(e))}catch(e){r(e)}}function a(e){try{l(o.throw(e))}catch(e){r(e)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,a)}l((o=o.apply(e,t||[])).next())}));var e,t,n,o}};h.ID="editor.contrib.unusualLineTerminatorsDetector",h=function(e,t,n,i){var o,r=arguments.length,s=r<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,i);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,n,s):o(t,n))||s);return r>3&&s&&Object.defineProperty(t,n,s),s}([d(1,a.S),d(2,s.$)],h),(0,r._K)(h.ID,h)},185:(e,t,n)=>{"use strict";n.r(t);var i=n(5393),o=n(5976),r=n(6830),s=n(4101),a=n(1200),l=n(5072),d=n(7781),c=n(3108),h=n(7390),u=n(9510),g=function(e,t){return function(n,i){t(n,i,e)}};let p=class extends o.JT{constructor(e,t,n,o){super(),this._modelService=t,this._themeService=n,this._configurationService=o,this._editor=e,this._tokenizeViewport=new i.pY((()=>this._tokenizeViewportNow()),100),this._outstandingRequests=[],this._register(this._editor.onDidScrollChange((()=>{this._tokenizeViewport.schedule()}))),this._register(this._editor.onDidChangeModel((()=>{this._cancelAll(),this._tokenizeViewport.schedule()}))),this._register(this._editor.onDidChangeModelContent((e=>{this._cancelAll(),this._tokenizeViewport.schedule()}))),this._register(s.K7.onDidChange((()=>{this._cancelAll(),this._tokenizeViewport.schedule()}))),this._register(this._configurationService.onDidChangeConfiguration((e=>{e.affectsConfiguration(h.e3)&&(this._cancelAll(),this._tokenizeViewport.schedule())}))),this._register(this._themeService.onDidColorThemeChange((()=>{this._cancelAll(),this._tokenizeViewport.schedule()})))}_cancelAll(){for(const e of this._outstandingRequests)e.cancel();this._outstandingRequests=[]}_removeOutstandingRequest(e){for(let t=0,n=this._outstandingRequests.length;tthis._requestRange(e,i,t,n))))}_requestRange(e,t,n,o){const r=e.getVersionId(),s=(0,i.PG)((i=>Promise.resolve(n.provideDocumentRangeSemanticTokens(e,t,i))));return s.then((n=>{n&&!e.isDisposed()&&e.getVersionId()===r&&e.setPartialSemanticTokens(t,(0,l.h)(n,o,e.getLanguageIdentifier()))})).then((()=>this._removeOutstandingRequest(s)),(()=>this._removeOutstandingRequest(s))),s}};p.ID="editor.contrib.viewportSemanticTokens",p=function(e,t,n,i){var o,r=arguments.length,s=r<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,i);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,n,s):o(t,n))||s);return r>3&&s&&Object.defineProperty(t,n,s),s}([g(1,a.q),g(2,d.XE),g(3,c.Ui)],p),(0,r._K)(p.ID,p)},3497:(e,t,n)=>{"use strict";n.r(t),n.d(t,{getOccurrencesAtPosition:()=>k});var i=n(3580),o=n(9488),r=n(5393),s=n(1050),a=n(7301),l=n(5976),d=n(6830),c=n(4314),h=n(9102),u=n(4973),g=n(3103),p=n(4101),m=n(8819),f=n(3910),_=n(7781),b=n(6346);const C=(0,f.P6)("editor.wordHighlightBackground",{dark:"#575757B8",light:"#57575740",hc:null},i.N("wordHighlight","Background color of a symbol during read-access, like reading a variable. The color must not be opaque so as not to hide underlying decorations."),!0),v=(0,f.P6)("editor.wordHighlightStrongBackground",{dark:"#004972B8",light:"#0e639c40",hc:null},i.N("wordHighlightStrong","Background color of a symbol during write-access, like writing to a variable. The color must not be opaque so as not to hide underlying decorations."),!0),w=(0,f.P6)("editor.wordHighlightBorder",{light:null,dark:null,hc:f.xL},i.N("wordHighlightBorder","Border color of a symbol during read-access, like reading a variable.")),y=(0,f.P6)("editor.wordHighlightStrongBorder",{light:null,dark:null,hc:f.xL},i.N("wordHighlightStrongBorder","Border color of a symbol during write-access, like writing to a variable.")),A=(0,f.P6)("editorOverviewRuler.wordHighlightForeground",{dark:"#A0A0A0CC",light:"#A0A0A0CC",hc:"#A0A0A0CC"},i.N("overviewRulerWordHighlightForeground","Overview ruler marker color for symbol highlights. The color must not be opaque so as not to hide underlying decorations."),!0),S=(0,f.P6)("editorOverviewRuler.wordHighlightStrongForeground",{dark:"#C0A0C0CC",light:"#C0A0C0CC",hc:"#C0A0C0CC"},i.N("overviewRulerWordHighlightStrongForeground","Overview ruler marker color for write-access symbol highlights. The color must not be opaque so as not to hide underlying decorations."),!0),x=new m.uy("hasWordHighlights",!1);function k(e,t,n){const i=p.vH.ordered(e);return(0,r.Ps)(i.map((i=>()=>Promise.resolve(i.provideDocumentHighlights(e,t,n)).then(void 0,a.Cp))),o.Of)}class L{constructor(e,t,n){this._wordRange=this._getCurrentWordRange(e,t),this.result=(0,r.PG)((i=>this._compute(e,t,n,i)))}_getCurrentWordRange(e,t){const n=e.getWordAtPosition(t.getPosition());return n?new c.e(t.startLineNumber,n.startColumn,t.startLineNumber,n.endColumn):null}isValid(e,t,n){const i=t.startLineNumber,o=t.startColumn,r=t.endColumn,s=this._getCurrentWordRange(e,t);let a=Boolean(this._wordRange&&this._wordRange.equalsRange(s));for(let t=0,s=n.length;!a&&t=r&&(a=!0)}return a}cancel(){this.result.cancel()}}class E extends L{_compute(e,t,n,i){return k(e,t.getPosition(),i).then((e=>e||[]))}}class N extends L{constructor(e,t,n){super(e,t,n),this._selectionIsEmpty=t.isEmpty()}_compute(e,t,n,i){return(0,r.Vs)(250,i).then((()=>{if(!t.isEmpty())return[];const i=e.getWordAtPosition(t.getPosition());return!i||i.word.length>1e3?[]:e.findMatches(i.word,!0,!1,!0,n,!1).map((e=>({range:e.range,kind:p.MY.Text})))}))}isValid(e,t,n){const i=t.isEmpty();return this._selectionIsEmpty===i&&super.isValid(e,t,n)}}(0,d.sb)("_executeDocumentHighlights",((e,t)=>k(e,t,s.T.None)));class D{constructor(e,t){this.toUnhook=new l.SL,this.workerRequestTokenId=0,this.workerRequestCompleted=!1,this.workerRequestValue=[],this.lastCursorPositionChangeTime=0,this.renderDecorationsTimer=-1,this.editor=e,this._hasWordHighlights=x.bindTo(t),this._ignorePositionChangeEvent=!1,this.occurrencesHighlight=this.editor.getOption(70),this.model=this.editor.getModel(),this.toUnhook.add(e.onDidChangeCursorPosition((e=>{this._ignorePositionChangeEvent||this.occurrencesHighlight&&this._onPositionChanged(e)}))),this.toUnhook.add(e.onDidChangeModelContent((e=>{this._stopAll()}))),this.toUnhook.add(e.onDidChangeConfiguration((e=>{let t=this.editor.getOption(70);this.occurrencesHighlight!==t&&(this.occurrencesHighlight=t,this._stopAll())}))),this._decorationIds=[],this.workerRequestTokenId=0,this.workerRequest=null,this.workerRequestCompleted=!1,this.lastCursorPositionChangeTime=0,this.renderDecorationsTimer=-1}hasDecorations(){return this._decorationIds.length>0}restore(){this.occurrencesHighlight&&this._run()}_getSortedHighlights(){return o.kX(this._decorationIds.map((e=>this.model.getDecorationRange(e))).sort(c.e.compareRangesUsingStarts))}moveNext(){let e=this._getSortedHighlights(),t=(e.findIndex((e=>e.containsPosition(this.editor.getPosition())))+1)%e.length,n=e[t];try{this._ignorePositionChangeEvent=!0,this.editor.setPosition(n.getStartPosition()),this.editor.revealRangeInCenterIfOutsideViewport(n);const i=this._getWord();if(i){const o=this.editor.getModel().getLineContent(n.startLineNumber);(0,b.Z9)(`${o}, ${t+1} of ${e.length} for '${i.word}'`)}}finally{this._ignorePositionChangeEvent=!1}}moveBack(){let e=this._getSortedHighlights(),t=(e.findIndex((e=>e.containsPosition(this.editor.getPosition())))-1+e.length)%e.length,n=e[t];try{this._ignorePositionChangeEvent=!0,this.editor.setPosition(n.getStartPosition()),this.editor.revealRangeInCenterIfOutsideViewport(n);const i=this._getWord();if(i){const o=this.editor.getModel().getLineContent(n.startLineNumber);(0,b.Z9)(`${o}, ${t+1} of ${e.length} for '${i.word}'`)}}finally{this._ignorePositionChangeEvent=!1}}_removeDecorations(){this._decorationIds.length>0&&(this._decorationIds=this.editor.deltaDecorations(this._decorationIds,[]),this._hasWordHighlights.set(!1))}_stopAll(){this._removeDecorations(),-1!==this.renderDecorationsTimer&&(clearTimeout(this.renderDecorationsTimer),this.renderDecorationsTimer=-1),null!==this.workerRequest&&(this.workerRequest.cancel(),this.workerRequest=null),this.workerRequestCompleted||(this.workerRequestTokenId++,this.workerRequestCompleted=!0)}_onPositionChanged(e){this.occurrencesHighlight&&3===e.reason?this._run():this._stopAll()}_getWord(){let e=this.editor.getSelection(),t=e.startLineNumber,n=e.startColumn;return this.model.getWordAtPosition({lineNumber:t,column:n})}_run(){let e=this.editor.getSelection();if(e.startLineNumber!==e.endLineNumber)return void this._stopAll();let t=e.startColumn,n=e.endColumn;const i=this._getWord();if(!i||i.startColumn>t||i.endColumn{e===this.workerRequestTokenId&&(this.workerRequestCompleted=!0,this.workerRequestValue=t||[],this._beginRenderDecorations())}),a.dL)}var r,s,l}_beginRenderDecorations(){let e=(new Date).getTime(),t=this.lastCursorPositionChangeTime+250;e>=t?(this.renderDecorationsTimer=-1,this.renderDecorations()):this.renderDecorationsTimer=setTimeout((()=>{this.renderDecorations()}),t-e)}renderDecorations(){this.renderDecorationsTimer=-1;let e=[];for(const t of this.workerRequestValue)t.range&&e.push({range:t.range,options:D._getDecorationOptions(t.kind)});this._decorationIds=this.editor.deltaDecorations(this._decorationIds,e),this._hasWordHighlights.set(this.hasDecorations())}static _getDecorationOptions(e){return e===p.MY.Write?this._WRITE_OPTIONS:e===p.MY.Text?this._TEXT_OPTIONS:this._REGULAR_OPTIONS}dispose(){this._stopAll(),this.toUnhook.dispose()}}D._WRITE_OPTIONS=g.qx.register({description:"word-highlight-strong",stickiness:1,className:"wordHighlightStrong",overviewRuler:{color:(0,_.EN)(S),position:u.sh.Center}}),D._TEXT_OPTIONS=g.qx.register({description:"selection-highlight",stickiness:1,className:"selectionHighlight",overviewRuler:{color:(0,_.EN)(f.SP),position:u.sh.Center}}),D._REGULAR_OPTIONS=g.qx.register({description:"word-highlight",stickiness:1,className:"wordHighlight",overviewRuler:{color:(0,_.EN)(A),position:u.sh.Center}});let I=class e extends l.JT{constructor(e,t){super(),this.wordHighlighter=null;const n=()=>{e.hasModel()&&(this.wordHighlighter=new D(e,t))};this._register(e.onDidChangeModel((e=>{this.wordHighlighter&&(this.wordHighlighter.dispose(),this.wordHighlighter=null),n()}))),n()}static get(t){return t.getContribution(e.ID)}saveViewState(){return!(!this.wordHighlighter||!this.wordHighlighter.hasDecorations())}moveNext(){this.wordHighlighter&&this.wordHighlighter.moveNext()}moveBack(){this.wordHighlighter&&this.wordHighlighter.moveBack()}restoreViewState(e){this.wordHighlighter&&e&&this.wordHighlighter.restore()}dispose(){this.wordHighlighter&&(this.wordHighlighter.dispose(),this.wordHighlighter=null),super.dispose()}};var M,T;I.ID="editor.contrib.wordHighlighter",I=function(e,t,n,i){var o,r=arguments.length,s=r<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,i);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,n,s):o(t,n))||s);return r>3&&s&&Object.defineProperty(t,n,s),s}([(M=1,T=m.i6,function(e,t){T(e,t,M)})],I);class R extends d.R6{constructor(e,t){super(t),this._isNext=e}run(e,t){const n=I.get(t);n&&(this._isNext?n.moveNext():n.moveBack())}}class O extends d.R6{constructor(){super({id:"editor.action.wordHighlight.trigger",label:i.N("wordHighlight.trigger.label","Trigger Symbol Highlight"),alias:"Trigger Symbol Highlight",precondition:x.toNegated(),kbOpts:{kbExpr:h.u.editorTextFocus,primary:0,weight:100}})}run(e,t,n){const i=I.get(t);i&&i.restoreViewState(!0)}}(0,d._K)(I.ID,I),(0,d.Qr)(class extends R{constructor(){super(!0,{id:"editor.action.wordHighlight.next",label:i.N("wordHighlight.next.label","Go to Next Symbol Highlight"),alias:"Go to Next Symbol Highlight",precondition:x,kbOpts:{kbExpr:h.u.editorTextFocus,primary:65,weight:100}})}}),(0,d.Qr)(class extends R{constructor(){super(!1,{id:"editor.action.wordHighlight.prev",label:i.N("wordHighlight.previous.label","Go to Previous Symbol Highlight"),alias:"Go to Previous Symbol Highlight",precondition:x,kbOpts:{kbExpr:h.u.editorTextFocus,primary:1089,weight:100}})}}),(0,d.Qr)(O),(0,_.Ic)(((e,t)=>{const n=e.getColor(f.Rz);n&&(t.addRule(`.monaco-editor .focused .selectionHighlight { background-color: ${n}; }`),t.addRule(`.monaco-editor .selectionHighlight { background-color: ${n.transparent(.5)}; }`));const i=e.getColor(C);i&&t.addRule(`.monaco-editor .wordHighlight { background-color: ${i}; }`);const o=e.getColor(v);o&&t.addRule(`.monaco-editor .wordHighlightStrong { background-color: ${o}; }`);const r=e.getColor(f.g_);r&&t.addRule(`.monaco-editor .selectionHighlight { border: 1px ${"hc"===e.type?"dotted":"solid"} ${r}; box-sizing: border-box; }`);const s=e.getColor(w);s&&t.addRule(`.monaco-editor .wordHighlight { border: 1px ${"hc"===e.type?"dashed":"solid"} ${s}; box-sizing: border-box; }`);const a=e.getColor(y);a&&t.addRule(`.monaco-editor .wordHighlightStrong { border: 1px ${"hc"===e.type?"dashed":"solid"} ${a}; box-sizing: border-box; }`)}))},9453:(e,t,n)=>{"use strict";n.r(t),n.d(t,{MoveWordCommand:()=>b,WordLeftCommand:()=>C,WordRightCommand:()=>v,CursorWordStartLeft:()=>w,CursorWordEndLeft:()=>y,CursorWordLeft:()=>A,CursorWordStartLeftSelect:()=>S,CursorWordEndLeftSelect:()=>x,CursorWordLeftSelect:()=>k,CursorWordAccessibilityLeft:()=>L,CursorWordAccessibilityLeftSelect:()=>E,CursorWordStartRight:()=>N,CursorWordEndRight:()=>D,CursorWordRight:()=>I,CursorWordStartRightSelect:()=>M,CursorWordEndRightSelect:()=>T,CursorWordRightSelect:()=>R,CursorWordAccessibilityRight:()=>O,CursorWordAccessibilityRightSelect:()=>B,DeleteWordCommand:()=>P,DeleteWordLeftCommand:()=>F,DeleteWordRightCommand:()=>W,DeleteWordStartLeft:()=>z,DeleteWordEndLeft:()=>V,DeleteWordLeft:()=>H,DeleteWordStartRight:()=>j,DeleteWordEndRight:()=>$,DeleteWordRight:()=>U,DeleteInsideWord:()=>Z});var i=n(3580),o=n(6830),r=n(1329),s=n(3181),a=n(5795),l=n(9410),d=n(187),c=n(4314),h=n(3860),u=n(9102),g=n(1106),p=n(8819),m=n(4141),f=n(3831),_=n(9282);class b extends o._l{constructor(e){super(e),this._inSelectionMode=e.inSelectionMode,this._wordNavigationType=e.wordNavigationType}runEditorCommand(e,t,n){if(!t.hasModel())return;const i=(0,l.u)(t.getOption(115)),o=t.getModel(),r=t.getSelections().map((e=>{const t=new d.L(e.positionLineNumber,e.positionColumn),n=this._move(i,o,t,this._wordNavigationType);return this._moveTo(e,n,this._inSelectionMode)}));if(o.pushStackElement(),t._getViewModel().setCursorStates("moveWordCommand",3,r.map((e=>s.Vi.fromModelSelection(e)))),1===r.length){const e=new d.L(r[0].positionLineNumber,r[0].positionColumn);t.revealPosition(e,0)}}_moveTo(e,t,n){return n?new h.Y(e.selectionStartLineNumber,e.selectionStartColumn,t.lineNumber,t.column):new h.Y(t.lineNumber,t.column,t.lineNumber,t.column)}}class C extends b{_move(e,t,n,i){return a.w.moveWordLeft(e,t,n,i)}}class v extends b{_move(e,t,n,i){return a.w.moveWordRight(e,t,n,i)}}class w extends C{constructor(){super({inSelectionMode:!1,wordNavigationType:0,id:"cursorWordStartLeft",precondition:void 0})}}class y extends C{constructor(){super({inSelectionMode:!1,wordNavigationType:2,id:"cursorWordEndLeft",precondition:void 0})}}class A extends C{constructor(){var e;super({inSelectionMode:!1,wordNavigationType:1,id:"cursorWordLeft",precondition:void 0,kbOpts:{kbExpr:p.Ao.and(u.u.textInputFocus,null===(e=p.Ao.and(g.U,_.c))||void 0===e?void 0:e.negate()),primary:2063,mac:{primary:527},weight:100}})}}class S extends C{constructor(){super({inSelectionMode:!0,wordNavigationType:0,id:"cursorWordStartLeftSelect",precondition:void 0})}}class x extends C{constructor(){super({inSelectionMode:!0,wordNavigationType:2,id:"cursorWordEndLeftSelect",precondition:void 0})}}class k extends C{constructor(){var e;super({inSelectionMode:!0,wordNavigationType:1,id:"cursorWordLeftSelect",precondition:void 0,kbOpts:{kbExpr:p.Ao.and(u.u.textInputFocus,null===(e=p.Ao.and(g.U,_.c))||void 0===e?void 0:e.negate()),primary:3087,mac:{primary:1551},weight:100}})}}class L extends C{constructor(){super({inSelectionMode:!1,wordNavigationType:3,id:"cursorWordAccessibilityLeft",precondition:void 0})}_move(e,t,n,i){return super._move((0,l.u)(m.BH.wordSeparators.defaultValue),t,n,i)}}class E extends C{constructor(){super({inSelectionMode:!0,wordNavigationType:3,id:"cursorWordAccessibilityLeftSelect",precondition:void 0})}_move(e,t,n,i){return super._move((0,l.u)(m.BH.wordSeparators.defaultValue),t,n,i)}}class N extends v{constructor(){super({inSelectionMode:!1,wordNavigationType:0,id:"cursorWordStartRight",precondition:void 0})}}class D extends v{constructor(){var e;super({inSelectionMode:!1,wordNavigationType:2,id:"cursorWordEndRight",precondition:void 0,kbOpts:{kbExpr:p.Ao.and(u.u.textInputFocus,null===(e=p.Ao.and(g.U,_.c))||void 0===e?void 0:e.negate()),primary:2065,mac:{primary:529},weight:100}})}}class I extends v{constructor(){super({inSelectionMode:!1,wordNavigationType:2,id:"cursorWordRight",precondition:void 0})}}class M extends v{constructor(){super({inSelectionMode:!0,wordNavigationType:0,id:"cursorWordStartRightSelect",precondition:void 0})}}class T extends v{constructor(){var e;super({inSelectionMode:!0,wordNavigationType:2,id:"cursorWordEndRightSelect",precondition:void 0,kbOpts:{kbExpr:p.Ao.and(u.u.textInputFocus,null===(e=p.Ao.and(g.U,_.c))||void 0===e?void 0:e.negate()),primary:3089,mac:{primary:1553},weight:100}})}}class R extends v{constructor(){super({inSelectionMode:!0,wordNavigationType:2,id:"cursorWordRightSelect",precondition:void 0})}}class O extends v{constructor(){super({inSelectionMode:!1,wordNavigationType:3,id:"cursorWordAccessibilityRight",precondition:void 0})}_move(e,t,n,i){return super._move((0,l.u)(m.BH.wordSeparators.defaultValue),t,n,i)}}class B extends v{constructor(){super({inSelectionMode:!0,wordNavigationType:3,id:"cursorWordAccessibilityRightSelect",precondition:void 0})}_move(e,t,n,i){return super._move((0,l.u)(m.BH.wordSeparators.defaultValue),t,n,i)}}class P extends o._l{constructor(e){super(e),this._whitespaceHeuristics=e.whitespaceHeuristics,this._wordNavigationType=e.wordNavigationType}runEditorCommand(e,t,n){if(!t.hasModel())return;const i=(0,l.u)(t.getOption(115)),o=t.getModel(),s=t.getSelections(),a=t.getOption(5),d=t.getOption(8),c=f.zu.getAutoClosingPairs(o.getLanguageIdentifier().id),h=t._getViewModel(),u=s.map((e=>{const n=this._delete({wordSeparators:i,model:o,selection:e,whitespaceHeuristics:this._whitespaceHeuristics,autoClosingDelete:t.getOption(6),autoClosingBrackets:a,autoClosingQuotes:d,autoClosingPairs:c,autoClosedCharacters:h.getCursorAutoClosedCharacters()},this._wordNavigationType);return new r.T4(n,"")}));t.pushUndoStop(),t.executeCommands(this.id,u),t.pushUndoStop()}}class F extends P{_delete(e,t){return a.w.deleteWordLeft(e,t)||new c.e(1,1,1,1)}}class W extends P{_delete(e,t){let n=a.w.deleteWordRight(e,t);if(n)return n;const i=e.model.getLineCount(),o=e.model.getLineMaxColumn(i);return new c.e(i,o,i,o)}}class z extends F{constructor(){super({whitespaceHeuristics:!1,wordNavigationType:0,id:"deleteWordStartLeft",precondition:u.u.writable})}}class V extends F{constructor(){super({whitespaceHeuristics:!1,wordNavigationType:2,id:"deleteWordEndLeft",precondition:u.u.writable})}}class H extends F{constructor(){super({whitespaceHeuristics:!0,wordNavigationType:0,id:"deleteWordLeft",precondition:u.u.writable,kbOpts:{kbExpr:u.u.textInputFocus,primary:2049,mac:{primary:513},weight:100}})}}class j extends W{constructor(){super({whitespaceHeuristics:!1,wordNavigationType:0,id:"deleteWordStartRight",precondition:u.u.writable})}}class $ extends W{constructor(){super({whitespaceHeuristics:!1,wordNavigationType:2,id:"deleteWordEndRight",precondition:u.u.writable})}}class U extends W{constructor(){super({whitespaceHeuristics:!0,wordNavigationType:2,id:"deleteWordRight",precondition:u.u.writable,kbOpts:{kbExpr:u.u.textInputFocus,primary:2068,mac:{primary:532},weight:100}})}}class Z extends o.R6{constructor(){super({id:"deleteInsideWord",precondition:u.u.writable,label:i.N("deleteInsideWord","Delete Word"),alias:"Delete Word"})}run(e,t,n){if(!t.hasModel())return;const i=(0,l.u)(t.getOption(115)),o=t.getModel(),s=t.getSelections().map((e=>{const t=a.w.deleteInsideWord(i,o,e);return new r.T4(t,"")}));t.pushUndoStop(),t.executeCommands(this.id,s),t.pushUndoStop()}}(0,o.fK)(new w),(0,o.fK)(new y),(0,o.fK)(new A),(0,o.fK)(new S),(0,o.fK)(new x),(0,o.fK)(new k),(0,o.fK)(new N),(0,o.fK)(new D),(0,o.fK)(new I),(0,o.fK)(new M),(0,o.fK)(new T),(0,o.fK)(new R),(0,o.fK)(new L),(0,o.fK)(new E),(0,o.fK)(new O),(0,o.fK)(new B),(0,o.fK)(new z),(0,o.fK)(new V),(0,o.fK)(new H),(0,o.fK)(new j),(0,o.fK)(new $),(0,o.fK)(new U),(0,o.Qr)(Z)},661:(e,t,n)=>{"use strict";n.r(t),n.d(t,{DeleteWordPartLeft:()=>d,DeleteWordPartRight:()=>c,WordPartLeftCommand:()=>h,CursorWordPartLeft:()=>u,CursorWordPartLeftSelect:()=>g,WordPartRightCommand:()=>p,CursorWordPartRight:()=>m,CursorWordPartRightSelect:()=>f});var i=n(6830),o=n(5795),r=n(4314),s=n(9102),a=n(9453),l=n(4565);class d extends a.DeleteWordCommand{constructor(){super({whitespaceHeuristics:!0,wordNavigationType:0,id:"deleteWordPartLeft",precondition:s.u.writable,kbOpts:{kbExpr:s.u.textInputFocus,primary:0,mac:{primary:769},weight:100}})}_delete(e,t){return o.L.deleteWordPartLeft(e)||new r.e(1,1,1,1)}}class c extends a.DeleteWordCommand{constructor(){super({whitespaceHeuristics:!0,wordNavigationType:2,id:"deleteWordPartRight",precondition:s.u.writable,kbOpts:{kbExpr:s.u.textInputFocus,primary:0,mac:{primary:788},weight:100}})}_delete(e,t){let n=o.L.deleteWordPartRight(e);if(n)return n;const i=e.model.getLineCount(),s=e.model.getLineMaxColumn(i);return new r.e(i,s,i,s)}}class h extends a.MoveWordCommand{_move(e,t,n,i){return o.L.moveWordPartLeft(e,t,n)}}class u extends h{constructor(){super({inSelectionMode:!1,wordNavigationType:0,id:"cursorWordPartLeft",precondition:void 0,kbOpts:{kbExpr:s.u.textInputFocus,primary:0,mac:{primary:783},weight:100}})}}l.P.registerCommandAlias("cursorWordPartStartLeft","cursorWordPartLeft");class g extends h{constructor(){super({inSelectionMode:!0,wordNavigationType:0,id:"cursorWordPartLeftSelect",precondition:void 0,kbOpts:{kbExpr:s.u.textInputFocus,primary:0,mac:{primary:1807},weight:100}})}}l.P.registerCommandAlias("cursorWordPartStartLeftSelect","cursorWordPartLeftSelect");class p extends a.MoveWordCommand{_move(e,t,n,i){return o.L.moveWordPartRight(e,t,n)}}class m extends p{constructor(){super({inSelectionMode:!1,wordNavigationType:2,id:"cursorWordPartRight",precondition:void 0,kbOpts:{kbExpr:s.u.textInputFocus,primary:0,mac:{primary:785},weight:100}})}}class f extends p{constructor(){super({inSelectionMode:!0,wordNavigationType:2,id:"cursorWordPartRightSelect",precondition:void 0,kbOpts:{kbExpr:s.u.textInputFocus,primary:0,mac:{primary:1809},weight:100}})}}(0,i.fK)(new d),(0,i.fK)(new c),(0,i.fK)(new u),(0,i.fK)(new g),(0,i.fK)(new m),(0,i.fK)(new f)},110:(e,t,n)=>{"use strict";n.r(t),n.d(t,{CancellationTokenSource:()=>_l,Emitter:()=>bl,KeyCode:()=>Cl,KeyMod:()=>vl,MarkerSeverity:()=>xl,MarkerTag:()=>kl,Position:()=>wl,Range:()=>yl,Selection:()=>Al,SelectionDirection:()=>Sl,Token:()=>El,Uri:()=>Ll,editor:()=>Nl,languages:()=>Dl});var i,o,r,s,a,l,d,c,h,u,g,p,m,f,_,b,C,v,w,y,A,S,x,k,L,E,N,D,I,M,T,R,O,B,P,F=n(4141),W=n(1050),z=n(4669),V=n(2258),H=n(666),j=n(187),$=n(4314),U=n(3860),Z=n(5600);!function(e){e[e.Unknown=0]="Unknown",e[e.Disabled=1]="Disabled",e[e.Enabled=2]="Enabled"}(i||(i={})),function(e){e[e.KeepWhitespace=1]="KeepWhitespace",e[e.InsertAsSnippet=4]="InsertAsSnippet"}(o||(o={})),function(e){e[e.Method=0]="Method",e[e.Function=1]="Function",e[e.Constructor=2]="Constructor",e[e.Field=3]="Field",e[e.Variable=4]="Variable",e[e.Class=5]="Class",e[e.Struct=6]="Struct",e[e.Interface=7]="Interface",e[e.Module=8]="Module",e[e.Property=9]="Property",e[e.Event=10]="Event",e[e.Operator=11]="Operator",e[e.Unit=12]="Unit",e[e.Value=13]="Value",e[e.Constant=14]="Constant",e[e.Enum=15]="Enum",e[e.EnumMember=16]="EnumMember",e[e.Keyword=17]="Keyword",e[e.Text=18]="Text",e[e.Color=19]="Color",e[e.File=20]="File",e[e.Reference=21]="Reference",e[e.Customcolor=22]="Customcolor",e[e.Folder=23]="Folder",e[e.TypeParameter=24]="TypeParameter",e[e.User=25]="User",e[e.Issue=26]="Issue",e[e.Snippet=27]="Snippet"}(r||(r={})),function(e){e[e.Deprecated=1]="Deprecated"}(s||(s={})),function(e){e[e.Invoke=0]="Invoke",e[e.TriggerCharacter=1]="TriggerCharacter",e[e.TriggerForIncompleteCompletions=2]="TriggerForIncompleteCompletions"}(a||(a={})),function(e){e[e.EXACT=0]="EXACT",e[e.ABOVE=1]="ABOVE",e[e.BELOW=2]="BELOW"}(l||(l={})),function(e){e[e.NotSet=0]="NotSet",e[e.ContentFlush=1]="ContentFlush",e[e.RecoverFromMarkers=2]="RecoverFromMarkers",e[e.Explicit=3]="Explicit",e[e.Paste=4]="Paste",e[e.Undo=5]="Undo",e[e.Redo=6]="Redo"}(d||(d={})),function(e){e[e.LF=1]="LF",e[e.CRLF=2]="CRLF"}(c||(c={})),function(e){e[e.Text=0]="Text",e[e.Read=1]="Read",e[e.Write=2]="Write"}(h||(h={})),function(e){e[e.None=0]="None",e[e.Keep=1]="Keep",e[e.Brackets=2]="Brackets",e[e.Advanced=3]="Advanced",e[e.Full=4]="Full"}(u||(u={})),function(e){e[e.acceptSuggestionOnCommitCharacter=0]="acceptSuggestionOnCommitCharacter",e[e.acceptSuggestionOnEnter=1]="acceptSuggestionOnEnter",e[e.accessibilitySupport=2]="accessibilitySupport",e[e.accessibilityPageSize=3]="accessibilityPageSize",e[e.ariaLabel=4]="ariaLabel",e[e.autoClosingBrackets=5]="autoClosingBrackets",e[e.autoClosingDelete=6]="autoClosingDelete",e[e.autoClosingOvertype=7]="autoClosingOvertype",e[e.autoClosingQuotes=8]="autoClosingQuotes",e[e.autoIndent=9]="autoIndent",e[e.automaticLayout=10]="automaticLayout",e[e.autoSurround=11]="autoSurround",e[e.codeLens=12]="codeLens",e[e.codeLensFontFamily=13]="codeLensFontFamily",e[e.codeLensFontSize=14]="codeLensFontSize",e[e.colorDecorators=15]="colorDecorators",e[e.columnSelection=16]="columnSelection",e[e.comments=17]="comments",e[e.contextmenu=18]="contextmenu",e[e.copyWithSyntaxHighlighting=19]="copyWithSyntaxHighlighting",e[e.cursorBlinking=20]="cursorBlinking",e[e.cursorSmoothCaretAnimation=21]="cursorSmoothCaretAnimation",e[e.cursorStyle=22]="cursorStyle",e[e.cursorSurroundingLines=23]="cursorSurroundingLines",e[e.cursorSurroundingLinesStyle=24]="cursorSurroundingLinesStyle",e[e.cursorWidth=25]="cursorWidth",e[e.disableLayerHinting=26]="disableLayerHinting",e[e.disableMonospaceOptimizations=27]="disableMonospaceOptimizations",e[e.domReadOnly=28]="domReadOnly",e[e.dragAndDrop=29]="dragAndDrop",e[e.emptySelectionClipboard=30]="emptySelectionClipboard",e[e.extraEditorClassName=31]="extraEditorClassName",e[e.fastScrollSensitivity=32]="fastScrollSensitivity",e[e.find=33]="find",e[e.fixedOverflowWidgets=34]="fixedOverflowWidgets",e[e.folding=35]="folding",e[e.foldingStrategy=36]="foldingStrategy",e[e.foldingHighlight=37]="foldingHighlight",e[e.foldingImportsByDefault=38]="foldingImportsByDefault",e[e.unfoldOnClickAfterEndOfLine=39]="unfoldOnClickAfterEndOfLine",e[e.fontFamily=40]="fontFamily",e[e.fontInfo=41]="fontInfo",e[e.fontLigatures=42]="fontLigatures",e[e.fontSize=43]="fontSize",e[e.fontWeight=44]="fontWeight",e[e.formatOnPaste=45]="formatOnPaste",e[e.formatOnType=46]="formatOnType",e[e.glyphMargin=47]="glyphMargin",e[e.gotoLocation=48]="gotoLocation",e[e.hideCursorInOverviewRuler=49]="hideCursorInOverviewRuler",e[e.highlightActiveIndentGuide=50]="highlightActiveIndentGuide",e[e.hover=51]="hover",e[e.inDiffEditor=52]="inDiffEditor",e[e.inlineSuggest=53]="inlineSuggest",e[e.letterSpacing=54]="letterSpacing",e[e.lightbulb=55]="lightbulb",e[e.lineDecorationsWidth=56]="lineDecorationsWidth",e[e.lineHeight=57]="lineHeight",e[e.lineNumbers=58]="lineNumbers",e[e.lineNumbersMinChars=59]="lineNumbersMinChars",e[e.linkedEditing=60]="linkedEditing",e[e.links=61]="links",e[e.matchBrackets=62]="matchBrackets",e[e.minimap=63]="minimap",e[e.mouseStyle=64]="mouseStyle",e[e.mouseWheelScrollSensitivity=65]="mouseWheelScrollSensitivity",e[e.mouseWheelZoom=66]="mouseWheelZoom",e[e.multiCursorMergeOverlapping=67]="multiCursorMergeOverlapping",e[e.multiCursorModifier=68]="multiCursorModifier",e[e.multiCursorPaste=69]="multiCursorPaste",e[e.occurrencesHighlight=70]="occurrencesHighlight",e[e.overviewRulerBorder=71]="overviewRulerBorder",e[e.overviewRulerLanes=72]="overviewRulerLanes",e[e.padding=73]="padding",e[e.parameterHints=74]="parameterHints",e[e.peekWidgetDefaultFocus=75]="peekWidgetDefaultFocus",e[e.definitionLinkOpensInPeek=76]="definitionLinkOpensInPeek",e[e.quickSuggestions=77]="quickSuggestions",e[e.quickSuggestionsDelay=78]="quickSuggestionsDelay",e[e.readOnly=79]="readOnly",e[e.renameOnType=80]="renameOnType",e[e.renderControlCharacters=81]="renderControlCharacters",e[e.renderIndentGuides=82]="renderIndentGuides",e[e.renderFinalNewline=83]="renderFinalNewline",e[e.renderLineHighlight=84]="renderLineHighlight",e[e.renderLineHighlightOnlyWhenFocus=85]="renderLineHighlightOnlyWhenFocus",e[e.renderValidationDecorations=86]="renderValidationDecorations",e[e.renderWhitespace=87]="renderWhitespace",e[e.revealHorizontalRightPadding=88]="revealHorizontalRightPadding",e[e.roundedSelection=89]="roundedSelection",e[e.rulers=90]="rulers",e[e.scrollbar=91]="scrollbar",e[e.scrollBeyondLastColumn=92]="scrollBeyondLastColumn",e[e.scrollBeyondLastLine=93]="scrollBeyondLastLine",e[e.scrollPredominantAxis=94]="scrollPredominantAxis",e[e.selectionClipboard=95]="selectionClipboard",e[e.selectionHighlight=96]="selectionHighlight",e[e.selectOnLineNumbers=97]="selectOnLineNumbers",e[e.showFoldingControls=98]="showFoldingControls",e[e.showUnused=99]="showUnused",e[e.snippetSuggestions=100]="snippetSuggestions",e[e.smartSelect=101]="smartSelect",e[e.smoothScrolling=102]="smoothScrolling",e[e.stickyTabStops=103]="stickyTabStops",e[e.stopRenderingLineAfter=104]="stopRenderingLineAfter",e[e.suggest=105]="suggest",e[e.suggestFontSize=106]="suggestFontSize",e[e.suggestLineHeight=107]="suggestLineHeight",e[e.suggestOnTriggerCharacters=108]="suggestOnTriggerCharacters",e[e.suggestSelection=109]="suggestSelection",e[e.tabCompletion=110]="tabCompletion",e[e.tabIndex=111]="tabIndex",e[e.unusualLineTerminators=112]="unusualLineTerminators",e[e.useShadowDOM=113]="useShadowDOM",e[e.useTabStops=114]="useTabStops",e[e.wordSeparators=115]="wordSeparators",e[e.wordWrap=116]="wordWrap",e[e.wordWrapBreakAfterCharacters=117]="wordWrapBreakAfterCharacters",e[e.wordWrapBreakBeforeCharacters=118]="wordWrapBreakBeforeCharacters",e[e.wordWrapColumn=119]="wordWrapColumn",e[e.wordWrapOverride1=120]="wordWrapOverride1",e[e.wordWrapOverride2=121]="wordWrapOverride2",e[e.wrappingIndent=122]="wrappingIndent",e[e.wrappingStrategy=123]="wrappingStrategy",e[e.showDeprecated=124]="showDeprecated",e[e.inlayHints=125]="inlayHints",e[e.editorClassName=126]="editorClassName",e[e.pixelRatio=127]="pixelRatio",e[e.tabFocusMode=128]="tabFocusMode",e[e.layoutInfo=129]="layoutInfo",e[e.wrappingInfo=130]="wrappingInfo"}(g||(g={})),function(e){e[e.TextDefined=0]="TextDefined",e[e.LF=1]="LF",e[e.CRLF=2]="CRLF"}(p||(p={})),function(e){e[e.LF=0]="LF",e[e.CRLF=1]="CRLF"}(m||(m={})),function(e){e[e.None=0]="None",e[e.Indent=1]="Indent",e[e.IndentOutdent=2]="IndentOutdent",e[e.Outdent=3]="Outdent"}(f||(f={})),function(e){e[e.Other=0]="Other",e[e.Type=1]="Type",e[e.Parameter=2]="Parameter"}(_||(_={})),function(e){e[e.Automatic=0]="Automatic",e[e.Explicit=1]="Explicit"}(b||(b={})),function(e){e[e.DependsOnKbLayout=-1]="DependsOnKbLayout",e[e.Unknown=0]="Unknown",e[e.Backspace=1]="Backspace",e[e.Tab=2]="Tab",e[e.Enter=3]="Enter",e[e.Shift=4]="Shift",e[e.Ctrl=5]="Ctrl",e[e.Alt=6]="Alt",e[e.PauseBreak=7]="PauseBreak",e[e.CapsLock=8]="CapsLock",e[e.Escape=9]="Escape",e[e.Space=10]="Space",e[e.PageUp=11]="PageUp",e[e.PageDown=12]="PageDown",e[e.End=13]="End",e[e.Home=14]="Home",e[e.LeftArrow=15]="LeftArrow",e[e.UpArrow=16]="UpArrow",e[e.RightArrow=17]="RightArrow",e[e.DownArrow=18]="DownArrow",e[e.Insert=19]="Insert",e[e.Delete=20]="Delete",e[e.KEY_0=21]="KEY_0",e[e.KEY_1=22]="KEY_1",e[e.KEY_2=23]="KEY_2",e[e.KEY_3=24]="KEY_3",e[e.KEY_4=25]="KEY_4",e[e.KEY_5=26]="KEY_5",e[e.KEY_6=27]="KEY_6",e[e.KEY_7=28]="KEY_7",e[e.KEY_8=29]="KEY_8",e[e.KEY_9=30]="KEY_9",e[e.KEY_A=31]="KEY_A",e[e.KEY_B=32]="KEY_B",e[e.KEY_C=33]="KEY_C",e[e.KEY_D=34]="KEY_D",e[e.KEY_E=35]="KEY_E",e[e.KEY_F=36]="KEY_F",e[e.KEY_G=37]="KEY_G",e[e.KEY_H=38]="KEY_H",e[e.KEY_I=39]="KEY_I",e[e.KEY_J=40]="KEY_J",e[e.KEY_K=41]="KEY_K",e[e.KEY_L=42]="KEY_L",e[e.KEY_M=43]="KEY_M",e[e.KEY_N=44]="KEY_N",e[e.KEY_O=45]="KEY_O",e[e.KEY_P=46]="KEY_P",e[e.KEY_Q=47]="KEY_Q",e[e.KEY_R=48]="KEY_R",e[e.KEY_S=49]="KEY_S",e[e.KEY_T=50]="KEY_T",e[e.KEY_U=51]="KEY_U",e[e.KEY_V=52]="KEY_V",e[e.KEY_W=53]="KEY_W",e[e.KEY_X=54]="KEY_X",e[e.KEY_Y=55]="KEY_Y",e[e.KEY_Z=56]="KEY_Z",e[e.Meta=57]="Meta",e[e.ContextMenu=58]="ContextMenu",e[e.F1=59]="F1",e[e.F2=60]="F2",e[e.F3=61]="F3",e[e.F4=62]="F4",e[e.F5=63]="F5",e[e.F6=64]="F6",e[e.F7=65]="F7",e[e.F8=66]="F8",e[e.F9=67]="F9",e[e.F10=68]="F10",e[e.F11=69]="F11",e[e.F12=70]="F12",e[e.F13=71]="F13",e[e.F14=72]="F14",e[e.F15=73]="F15",e[e.F16=74]="F16",e[e.F17=75]="F17",e[e.F18=76]="F18",e[e.F19=77]="F19",e[e.NumLock=78]="NumLock",e[e.ScrollLock=79]="ScrollLock",e[e.US_SEMICOLON=80]="US_SEMICOLON",e[e.US_EQUAL=81]="US_EQUAL",e[e.US_COMMA=82]="US_COMMA",e[e.US_MINUS=83]="US_MINUS",e[e.US_DOT=84]="US_DOT",e[e.US_SLASH=85]="US_SLASH",e[e.US_BACKTICK=86]="US_BACKTICK",e[e.US_OPEN_SQUARE_BRACKET=87]="US_OPEN_SQUARE_BRACKET",e[e.US_BACKSLASH=88]="US_BACKSLASH",e[e.US_CLOSE_SQUARE_BRACKET=89]="US_CLOSE_SQUARE_BRACKET",e[e.US_QUOTE=90]="US_QUOTE",e[e.OEM_8=91]="OEM_8",e[e.OEM_102=92]="OEM_102",e[e.NUMPAD_0=93]="NUMPAD_0",e[e.NUMPAD_1=94]="NUMPAD_1",e[e.NUMPAD_2=95]="NUMPAD_2",e[e.NUMPAD_3=96]="NUMPAD_3",e[e.NUMPAD_4=97]="NUMPAD_4",e[e.NUMPAD_5=98]="NUMPAD_5",e[e.NUMPAD_6=99]="NUMPAD_6",e[e.NUMPAD_7=100]="NUMPAD_7",e[e.NUMPAD_8=101]="NUMPAD_8",e[e.NUMPAD_9=102]="NUMPAD_9",e[e.NUMPAD_MULTIPLY=103]="NUMPAD_MULTIPLY",e[e.NUMPAD_ADD=104]="NUMPAD_ADD",e[e.NUMPAD_SEPARATOR=105]="NUMPAD_SEPARATOR",e[e.NUMPAD_SUBTRACT=106]="NUMPAD_SUBTRACT",e[e.NUMPAD_DECIMAL=107]="NUMPAD_DECIMAL",e[e.NUMPAD_DIVIDE=108]="NUMPAD_DIVIDE",e[e.KEY_IN_COMPOSITION=109]="KEY_IN_COMPOSITION",e[e.ABNT_C1=110]="ABNT_C1",e[e.ABNT_C2=111]="ABNT_C2",e[e.MAX_VALUE=112]="MAX_VALUE"}(C||(C={})),function(e){e[e.Hint=1]="Hint",e[e.Info=2]="Info",e[e.Warning=4]="Warning",e[e.Error=8]="Error"}(v||(v={})),function(e){e[e.Unnecessary=1]="Unnecessary",e[e.Deprecated=2]="Deprecated"}(w||(w={})),function(e){e[e.Inline=1]="Inline",e[e.Gutter=2]="Gutter"}(y||(y={})),function(e){e[e.UNKNOWN=0]="UNKNOWN",e[e.TEXTAREA=1]="TEXTAREA",e[e.GUTTER_GLYPH_MARGIN=2]="GUTTER_GLYPH_MARGIN",e[e.GUTTER_LINE_NUMBERS=3]="GUTTER_LINE_NUMBERS",e[e.GUTTER_LINE_DECORATIONS=4]="GUTTER_LINE_DECORATIONS",e[e.GUTTER_VIEW_ZONE=5]="GUTTER_VIEW_ZONE",e[e.CONTENT_TEXT=6]="CONTENT_TEXT",e[e.CONTENT_EMPTY=7]="CONTENT_EMPTY",e[e.CONTENT_VIEW_ZONE=8]="CONTENT_VIEW_ZONE",e[e.CONTENT_WIDGET=9]="CONTENT_WIDGET",e[e.OVERVIEW_RULER=10]="OVERVIEW_RULER",e[e.SCROLLBAR=11]="SCROLLBAR",e[e.OVERLAY_WIDGET=12]="OVERLAY_WIDGET",e[e.OUTSIDE_EDITOR=13]="OUTSIDE_EDITOR"}(A||(A={})),function(e){e[e.TOP_RIGHT_CORNER=0]="TOP_RIGHT_CORNER",e[e.BOTTOM_RIGHT_CORNER=1]="BOTTOM_RIGHT_CORNER",e[e.TOP_CENTER=2]="TOP_CENTER"}(S||(S={})),function(e){e[e.Left=1]="Left",e[e.Center=2]="Center",e[e.Right=4]="Right",e[e.Full=7]="Full"}(x||(x={})),function(e){e[e.Off=0]="Off",e[e.On=1]="On",e[e.Relative=2]="Relative",e[e.Interval=3]="Interval",e[e.Custom=4]="Custom"}(k||(k={})),function(e){e[e.None=0]="None",e[e.Text=1]="Text",e[e.Blocks=2]="Blocks"}(L||(L={})),function(e){e[e.Smooth=0]="Smooth",e[e.Immediate=1]="Immediate"}(E||(E={})),function(e){e[e.Auto=1]="Auto",e[e.Hidden=2]="Hidden",e[e.Visible=3]="Visible"}(N||(N={})),function(e){e[e.LTR=0]="LTR",e[e.RTL=1]="RTL"}(D||(D={})),function(e){e[e.Invoke=1]="Invoke",e[e.TriggerCharacter=2]="TriggerCharacter",e[e.ContentChange=3]="ContentChange"}(I||(I={})),function(e){e[e.File=0]="File",e[e.Module=1]="Module",e[e.Namespace=2]="Namespace",e[e.Package=3]="Package",e[e.Class=4]="Class",e[e.Method=5]="Method",e[e.Property=6]="Property",e[e.Field=7]="Field",e[e.Constructor=8]="Constructor",e[e.Enum=9]="Enum",e[e.Interface=10]="Interface",e[e.Function=11]="Function",e[e.Variable=12]="Variable",e[e.Constant=13]="Constant",e[e.String=14]="String",e[e.Number=15]="Number",e[e.Boolean=16]="Boolean",e[e.Array=17]="Array",e[e.Object=18]="Object",e[e.Key=19]="Key",e[e.Null=20]="Null",e[e.EnumMember=21]="EnumMember",e[e.Struct=22]="Struct",e[e.Event=23]="Event",e[e.Operator=24]="Operator",e[e.TypeParameter=25]="TypeParameter"}(M||(M={})),function(e){e[e.Deprecated=1]="Deprecated"}(T||(T={})),function(e){e[e.Hidden=0]="Hidden",e[e.Blink=1]="Blink",e[e.Smooth=2]="Smooth",e[e.Phase=3]="Phase",e[e.Expand=4]="Expand",e[e.Solid=5]="Solid"}(R||(R={})),function(e){e[e.Line=1]="Line",e[e.Block=2]="Block",e[e.Underline=3]="Underline",e[e.LineThin=4]="LineThin",e[e.BlockOutline=5]="BlockOutline",e[e.UnderlineThin=6]="UnderlineThin"}(O||(O={})),function(e){e[e.AlwaysGrowsWhenTypingAtEdges=0]="AlwaysGrowsWhenTypingAtEdges",e[e.NeverGrowsWhenTypingAtEdges=1]="NeverGrowsWhenTypingAtEdges",e[e.GrowsOnlyWhenTypingBefore=2]="GrowsOnlyWhenTypingBefore",e[e.GrowsOnlyWhenTypingAfter=3]="GrowsOnlyWhenTypingAfter"}(B||(B={})),function(e){e[e.None=0]="None",e[e.Same=1]="Same",e[e.Indent=2]="Indent",e[e.DeepIndent=3]="DeepIndent"}(P||(P={}));class K{static chord(e,t){return(0,V.gx)(e,t)}}function q(){return{editor:void 0,languages:void 0,CancellationTokenSource:W.A,Emitter:z.Q5,KeyCode:C,KeyMod:K,Position:j.L,Range:$.e,Selection:U.Y,SelectionDirection:D,MarkerSeverity:v,MarkerTag:w,Uri:H.o,Token:Z.WU}}K.CtrlCmd=2048,K.Shift=1024,K.Alt=512,K.WinCtrl=256;var Y=n(3379),G=n.n(Y),Q=n(7795),X=n.n(Q),J=n(569),ee=n.n(J),te=n(3565),ne=n.n(te),ie=n(9216),oe=n.n(ie),re=n(4589),se=n.n(re),ae=n(643),le={};le.styleTagTransform=se(),le.setAttributes=ne(),le.insert=ee().bind(null,"head"),le.domAPI=X(),le.insertStyleElement=oe(),G()(ae.Z,le),ae.Z&&ae.Z.locals&&ae.Z.locals;var de,ce=n(1640),he=n(5321),ue=n(1741),ge=n(3702),pe=n(3897),me=n(6663),fe=n(5935),_e=n(4565);!function(e){e[e.API=0]="API",e[e.USER=1]="USER"}(de||(de={}));var be=n(988),Ce=function(e,t,n,i){var o,r=arguments.length,s=r<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,i);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,n,s):o(t,n))||s);return r>3&&s&&Object.defineProperty(t,n,s),s},ve=function(e,t){return function(n,i){t(n,i,e)}},we=function(e,t,n,i){return new(n||(n=Promise))((function(o,r){function s(e){try{l(i.next(e))}catch(e){r(e)}}function a(e){try{l(i.throw(e))}catch(e){r(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,a)}l((i=i.apply(e,t||[])).next())}))};let ye=class{constructor(e){this._commandService=e}open(e,t){return we(this,void 0,void 0,(function*(){if(!(0,be.xn)(e,me.lg.command))return!1;if(!(null==t?void 0:t.allowCommands))return!0;"string"==typeof e&&(e=H.o.parse(e));let n=[];try{n=(0,pe.Q)(decodeURIComponent(e.query))}catch(t){try{n=(0,pe.Q)(e.query)}catch(e){}}return Array.isArray(n)||(n=[n]),yield this._commandService.executeCommand(e.path,...n),!0}))}};ye=Ce([ve(0,_e.H)],ye);let Ae=class{constructor(e){this._editorService=e}open(e,t){return we(this,void 0,void 0,(function*(){let n;"string"==typeof e&&(e=H.o.parse(e));const i=/^L?(\d+)(?:,(\d+))?/.exec(e.fragment);return i&&(n={startLineNumber:parseInt(i[1]),startColumn:i[2]?parseInt(i[2]):1},e=e.with({fragment:""})),e.scheme===me.lg.file&&(e=(0,fe.AH)(e)),yield this._editorService.openCodeEditor({resource:e,options:Object.assign({selection:n,context:(null==t?void 0:t.fromUserGesture)?de.USER:de.API},null==t?void 0:t.editorOptions)},this._editorService.getFocusedCodeEditor(),null==t?void 0:t.openToSide),!0}))}};Ae=Ce([ve(0,ce.$)],Ae);let Se=class{constructor(e,t){this._openers=new ue.S,this._validators=new ue.S,this._resolvers=new ue.S,this._resolvedUriTargets=new ge.Y9((e=>e.with({path:null,fragment:null,query:null}).toString())),this._externalOpeners=new ue.S,this._defaultExternalOpener={openExternal:e=>we(this,void 0,void 0,(function*(){return(0,be.xn)(e,me.lg.http)||(0,be.xn)(e,me.lg.https)?he.V3(e):window.location.href=e,!0}))},this._openers.push({open:(e,t)=>we(this,void 0,void 0,(function*(){return!!((null==t?void 0:t.openExternal)||(0,be.xn)(e,me.lg.mailto)||(0,be.xn)(e,me.lg.http)||(0,be.xn)(e,me.lg.https))&&(yield this._doOpenExternal(e,t),!0)}))}),this._openers.push(new ye(t)),this._openers.push(new Ae(e))}registerOpener(e){return{dispose:this._openers.unshift(e)}}registerValidator(e){return{dispose:this._validators.push(e)}}registerExternalUriResolver(e){return{dispose:this._resolvers.push(e)}}setDefaultExternalOpener(e){this._defaultExternalOpener=e}registerExternalOpener(e){return{dispose:this._externalOpeners.push(e)}}open(e,t){var n;return we(this,void 0,void 0,(function*(){const i="string"==typeof e?H.o.parse(e):e,o=null!==(n=this._resolvedUriTargets.get(i))&&void 0!==n?n:e;for(const e of this._validators)if(!(yield e.shouldOpen(o)))return!1;for(const n of this._openers)if(yield n.open(e,t))return!0;return!1}))}resolveExternalUri(e,t){return we(this,void 0,void 0,(function*(){for(const n of this._resolvers)try{const i=yield n.resolveExternalUri(e,t);if(i)return this._resolvedUriTargets.has(i.resolved)||this._resolvedUriTargets.set(i.resolved,e),i}catch(e){}throw new Error("Could not resolve external URI: "+e.toString())}))}_doOpenExternal(e,t){return we(this,void 0,void 0,(function*(){const n="string"==typeof e?H.o.parse(e):e;let i,o;try{i=(yield this.resolveExternalUri(n,t)).resolved}catch(e){i=n}if(o="string"==typeof e&&n.toString()===i.toString()?e:encodeURI(i.toString(!0)),null==t?void 0:t.allowContributedOpeners){const e="string"==typeof(null==t?void 0:t.allowContributedOpeners)?null==t?void 0:t.allowContributedOpeners:void 0;for(const t of this._externalOpeners)if(yield t.openExternal(o,{sourceUri:n,preferredOpenerId:e},W.T.None))return!0}return this._defaultExternalOpener.openExternal(o,{sourceUri:n},W.T.None)}))}dispose(){this._validators.clear()}};Se=Ce([ve(0,ce.$),ve(1,_e.H)],Se);var xe=n(5146),ke=n(5976),Le=n(6248);const Ee={followsCaret:!0,ignoreCharChanges:!0,alwaysRevealFirst:!0};class Ne extends ke.JT{constructor(e,t={}){super(),this._onDidUpdate=this._register(new z.Q5),this._editor=e,this._options=Le.jB(t,Ee,!1),this.disposed=!1,this.nextIdx=-1,this.ranges=[],this.ignoreSelectionChange=!1,this.revealFirst=Boolean(this._options.alwaysRevealFirst),this._register(this._editor.onDidDispose((()=>this.dispose()))),this._register(this._editor.onDidUpdateDiff((()=>this._onDiffUpdated()))),this._options.followsCaret&&this._register(this._editor.getModifiedEditor().onDidChangeCursorPosition((e=>{this.ignoreSelectionChange||(this.nextIdx=-1)}))),this._options.alwaysRevealFirst&&this._register(this._editor.getModifiedEditor().onDidChangeModel((e=>{this.revealFirst=!0}))),this._init()}_init(){this._editor.getLineChanges()}_onDiffUpdated(){this._init(),this._compute(this._editor.getLineChanges()),this.revealFirst&&null!==this._editor.getLineChanges()&&(this.revealFirst=!1,this.nextIdx=-1,this.next(1))}_compute(e){this.ranges=[],e&&e.forEach((e=>{!this._options.ignoreCharChanges&&e.charChanges?e.charChanges.forEach((e=>{this.ranges.push({rhs:!0,range:new $.e(e.modifiedStartLineNumber,e.modifiedStartColumn,e.modifiedEndLineNumber,e.modifiedEndColumn)})})):this.ranges.push({rhs:!0,range:new $.e(e.modifiedStartLineNumber,1,e.modifiedStartLineNumber,1)})})),this.ranges.sort(((e,t)=>e.range.getStartPosition().isBeforeOrEqual(t.range.getStartPosition())?-1:t.range.getStartPosition().isBeforeOrEqual(e.range.getStartPosition())?1:0)),this._onDidUpdate.fire(this)}_initIdx(e){let t=!1,n=this._editor.getPosition();if(n){for(let i=0,o=this.ranges.length;i=this.ranges.length&&(this.nextIdx=0)):(this.nextIdx-=1,this.nextIdx<0&&(this.nextIdx=this.ranges.length-1));let n=this.ranges[this.nextIdx];this.ignoreSelectionChange=!0;try{let e=n.range.getStartPosition();this._editor.setPosition(e),this._editor.revealPositionInCenter(e,t)}finally{this.ignoreSelectionChange=!1}}canNavigate(){return this.ranges&&this.ranges.length>0}next(e=0){this._move(!0,e)}previous(e=0){this._move(!1,e)}dispose(){super.dispose(),this.ranges=[],this.disposed=!0}}var De=n(7374),Ie=n(6518),Me=n(4973),Te=n(4101),Re=n(8111),Oe=n(469),Be=n(1531),Pe=n(8216),Fe=n(5393),We=n(7301),ze=n(1432),Ve=n(8401);let He=!1;function je(e){ze.$L&&(He||(He=!0,console.warn("Could not create web worker(s). Falling back to loading web worker code in main thread, which might cause UI freezes. Please see https://github.com/microsoft/monaco-editor#faq")),console.warn(e.message))}class $e{constructor(e){this._workerId=-1,this._handler=e,this._lastSentReq=0,this._pendingReplies=Object.create(null)}setWorkerId(e){this._workerId=e}sendMessage(e,t){let n=String(++this._lastSentReq);return new Promise(((i,o)=>{this._pendingReplies[n]={resolve:i,reject:o},this._send({vsWorker:this._workerId,req:n,method:e,args:t})}))}handleMessage(e){e&&e.vsWorker&&(-1!==this._workerId&&e.vsWorker!==this._workerId||this._handleMessage(e))}_handleMessage(e){if(e.seq){let t=e;if(!this._pendingReplies[t.seq])return void console.warn("Got reply to unknown seq");let n=this._pendingReplies[t.seq];if(delete this._pendingReplies[t.seq],t.err){let e=t.err;return t.err.$isError&&(e=new Error,e.name=t.err.name,e.message=t.err.message,e.stack=t.err.stack),void n.reject(e)}return void n.resolve(t.res)}let t=e,n=t.req;this._handler.handleMessage(t.method,t.args).then((e=>{this._send({vsWorker:this._workerId,seq:n,res:e,err:void 0})}),(e=>{e.detail instanceof Error&&(e.detail=(0,We.ri)(e.detail)),this._send({vsWorker:this._workerId,seq:n,res:void 0,err:(0,We.ri)(e)})}))}_send(e){let t=[];if(e.req){const n=e;for(let e=0;e{this._protocol.handleMessage(e)}),(e=>{i&&i(e)}))),this._protocol=new $e({sendMessage:(e,t)=>{this._worker.postMessage(e,t)},handleMessage:(e,t)=>{if("function"!=typeof n[e])return Promise.reject(new Error("Missing method "+e+" on main thread host."));try{return Promise.resolve(n[e].apply(n,t))}catch(e){return Promise.reject(e)}}}),this._protocol.setWorkerId(this._worker.getId());let o=null;void 0!==self.require&&"function"==typeof self.require.getConfig?o=self.require.getConfig():void 0!==self.requirejs&&(o=self.requirejs.s.contexts._.config);const r=Ve.$E(n);this._onModuleLoaded=this._protocol.sendMessage("$initialize",[this._worker.getId(),JSON.parse(JSON.stringify(o)),t,r]);const s=(e,t)=>this._request(e,t);this._lazyProxy=new Promise(((e,n)=>{i=n,this._onModuleLoaded.then((t=>{e(Ve.IU(t,s))}),(e=>{n(e),this._onError("Worker failed to load "+t,e)}))}))}getProxyObject(){return this._lazyProxy}_request(e,t){return new Promise(((n,i)=>{this._onModuleLoaded.then((()=>{this._protocol.sendMessage(e,t).then(n,i)}),i)}))}_onError(e,t){console.error(e),console.info(t)}}var Ze;const Ke=null===(Ze=window.trustedTypes)||void 0===Ze?void 0:Ze.createPolicy("defaultWorkerFactory",{createScriptURL:e=>e});class qe{constructor(e,t,n,i,o){this.id=t;const r=function(e,t){if(ze.li.MonacoEnvironment){if("function"==typeof ze.li.MonacoEnvironment.getWorker)return ze.li.MonacoEnvironment.getWorker(e,t);if("function"==typeof ze.li.MonacoEnvironment.getWorkerUrl){const n=ze.li.MonacoEnvironment.getWorkerUrl(e,t);return new Worker(Ke?Ke.createScriptURL(n):n,{name:t})}}throw new Error("You must define a function MonacoEnvironment.getWorkerUrl or MonacoEnvironment.getWorker")}("workerMain.js",n);"function"==typeof r.then?this.worker=r:this.worker=Promise.resolve(r),this.postMessage(e,[]),this.worker.then((e=>{e.onmessage=function(e){i(e.data)},e.onmessageerror=o,"function"==typeof e.addEventListener&&e.addEventListener("error",o)}))}getId(){return this.id}postMessage(e,t){this.worker&&this.worker.then((n=>n.postMessage(e,t)))}dispose(){this.worker&&this.worker.then((e=>e.terminate())),this.worker=null}}class Ye{constructor(e){this._label=e,this._webWorkerFailedBeforeError=!1}create(e,t,n){let i=++Ye.LAST_WORKER_ID;if(this._webWorkerFailedBeforeError)throw this._webWorkerFailedBeforeError;return new qe(e,i,this._label||"anonymous"+i,t,(e=>{je(e),this._webWorkerFailedBeforeError=e,n(e)}))}}Ye.LAST_WORKER_ID=0;var Ge=n(3831),Qe=n(2484),Xe=n(7295);function Je(e,t,n,i){return new Qe.Hs(e,t,n).ComputeDiff(i)}class et{constructor(e){const t=[],n=[];for(let i=0,o=e.length;i0&&t.originalLength<20&&t.modifiedLength>0&&t.modifiedLength<20&&o()){const r=n.createCharSequence(e,t.originalStart,t.originalStart+t.originalLength-1),a=i.createCharSequence(e,t.modifiedStart,t.modifiedStart+t.modifiedLength-1);let l=Je(r,a,o,!0).changes;s&&(l=function(e){if(e.length<=1)return e;const t=[e[0]];let n=t[0];for(let i=1,o=e.length;i1&&s>1&&e.charCodeAt(n-2)===t.charCodeAt(s-2);)n--,s--;(n>1||s>1)&&this._pushTrimWhitespaceCharChange(i,o+1,1,n,r+1,1,s)}{let n=st(e,1),s=st(t,1);const a=e.length+1,l=t.length+1;for(;n!0;const t=Date.now();return()=>Date.now()-tt&&(t=r),o>n&&(n=o),s>n&&(n=s)}t++,n++;let i=new ht(n,t,0);for(let t=0,n=e.length;t=this._maxCharCode?0:this._states.get(e,t)}}let gt=null,pt=null;class mt{static _createLink(e,t,n,i,o){let r=o-1;do{const n=t.charCodeAt(r);if(2!==e.get(n))break;r--}while(r>i);if(i>0){const e=t.charCodeAt(i-1),n=t.charCodeAt(r);(40===e&&41===n||91===e&&93===n||123===e&&125===n)&&r--}return{range:{startLineNumber:n,startColumn:i+1,endLineNumber:n,endColumn:r+2},url:t.substring(i,r+1)}}static computeLinks(e,t=function(){return null===gt&&(gt=new ut([[1,104,2],[1,72,2],[1,102,6],[1,70,6],[2,116,3],[2,84,3],[3,116,4],[3,84,4],[4,112,5],[4,80,5],[5,115,9],[5,83,9],[5,58,10],[6,105,7],[6,73,7],[7,108,8],[7,76,8],[8,101,9],[8,69,9],[9,58,10],[10,47,11],[11,47,12]])),gt}()){const n=function(){if(null===pt){pt=new ct.N(0);const e=" \t<>'\"、。。、,.:;‘〈「『〔([{「」}])〕』」〉’`~…";for(let t=0;t=0?(i+=n?1:-1,i<0?i=e.length-1:i%=e.length,e[i]):null}}ft.INSTANCE=new ft;var _t=n(4013),bt=function(e,t,n,i){return new(n||(n=Promise))((function(o,r){function s(e){try{l(i.next(e))}catch(e){r(e)}}function a(e){try{l(i.throw(e))}catch(e){r(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,a)}l((i=i.apply(e,t||[])).next())}))};class Ct extends class{constructor(e,t,n,i){this._uri=e,this._lines=t,this._eol=n,this._versionId=i,this._lineStarts=null,this._cachedTextValue=null}dispose(){this._lines.length=0}get version(){return this._versionId}getText(){return null===this._cachedTextValue&&(this._cachedTextValue=this._lines.join(this._eol)),this._cachedTextValue}onEvents(e){e.eol&&e.eol!==this._eol&&(this._eol=e.eol,this._lineStarts=null);const t=e.changes;for(const e of t)this._acceptDeleteRange(e.range),this._acceptInsertText(new j.L(e.range.startLineNumber,e.range.startColumn),e.text);this._versionId=e.versionId,this._cachedTextValue=null}_ensureLineStarts(){if(!this._lineStarts){const e=this._eol.length,t=this._lines.length,n=new Uint32Array(t);for(let i=0;ithis._lines.length)t=this._lines.length,n=this._lines[t-1].length+1,i=!0;else{let e=this._lines[t-1].length+1;n<1?(n=1,i=!0):n>e&&(n=e,i=!0)}return i?{lineNumber:t,column:n}:e}}class vt{constructor(e,t){this._host=e,this._models=Object.create(null),this._foreignModuleFactory=t,this._foreignModule=null}dispose(){this._models=Object.create(null)}_getModel(e){return this._models[e]}_getModels(){let e=[];return Object.keys(this._models).forEach((t=>e.push(this._models[t]))),e}acceptNewModel(e){this._models[e.url]=new Ct(H.o.parse(e.url),e.lines,e.EOL,e.versionId)}acceptModelChanged(e,t){this._models[e]&&this._models[e].onEvents(t)}acceptRemovedModel(e){this._models[e]&&delete this._models[e]}computeDiff(e,t,n,i){return bt(this,void 0,void 0,(function*(){const o=this._getModel(e),r=this._getModel(t);if(!o||!r)return null;const s=o.getLinesContent(),a=r.getLinesContent(),l=new ot(s,a,{shouldComputeCharChanges:!0,shouldPostProcessCharChanges:!0,shouldIgnoreTrimWhitespace:n,shouldMakePrettyDiff:!0,maxComputationTime:i}).computeDiff(),d=!(l.changes.length>0)&&this._modelsAreIdentical(o,r);return{quitEarly:l.quitEarly,identical:d,changes:l.changes}}))}_modelsAreIdentical(e,t){const n=e.getLineCount();if(n!==t.getLineCount())return!1;for(let i=1;i<=n;i++)if(e.getLineContent(i)!==t.getLineContent(i))return!1;return!0}computeMoreMinimalEdits(e,t){return bt(this,void 0,void 0,(function*(){const n=this._getModel(e);if(!n)return t;const i=[];let o;t=t.slice(0).sort(((e,t)=>e.range&&t.range?$.e.compareRangesUsingStarts(e.range,t.range):(e.range?0:1)-(t.range?0:1)));for(let{range:e,text:r,eol:s}of t){if("number"==typeof s&&(o=s),$.e.isEmpty(e)&&!r)continue;const t=n.getValueInRange(e);if(r=r.replace(/\r\n|\n|\r/g,n.eol),t===r)continue;if(Math.max(r.length,t.length)>vt._diffLimit){i.push({range:e,text:r});continue}const a=(0,Qe.a$)(t,r,!1),l=n.offsetAt($.e.lift(e).getStartPosition());for(const e of a){const t=n.positionAt(l+e.originalStart),o=n.positionAt(l+e.originalStart+e.originalLength),s={text:r.substr(e.modifiedStart,e.modifiedLength),range:{startLineNumber:t.lineNumber,startColumn:t.column,endLineNumber:o.lineNumber,endColumn:o.column}};n.getValueInRange(s.range)!==s.text&&i.push(s)}}return"number"==typeof o&&i.push({eol:o,text:"",range:{startLineNumber:0,startColumn:0,endLineNumber:0,endColumn:0}}),i}))}computeLinks(e){return bt(this,void 0,void 0,(function*(){let t=this._getModel(e);return t?function(e){return e&&"function"==typeof e.getLineCount&&"function"==typeof e.getLineContent?mt.computeLinks(e):[]}(t):null}))}textualSuggest(e,t,n,i){return bt(this,void 0,void 0,(function*(){const o=new _t.G(!0),r=new RegExp(n,i),s=new Set;e:for(let n of e){const e=this._getModel(n);if(e)for(let n of e.words(r))if(n!==t&&isNaN(Number(n))&&(s.add(n),s.size>vt._suggestionsLimit))break e}return{words:Array.from(s),duration:o.elapsed()}}))}computeWordRanges(e,t,n,i){return bt(this,void 0,void 0,(function*(){let o=this._getModel(e);if(!o)return Object.create(null);const r=new RegExp(n,i),s=Object.create(null);for(let e=t.startLineNumber;ethis._host.fhr(e,t))),getMirrorModels:()=>this._getModels()};return this._foreignModuleFactory?(this._foreignModule=this._foreignModuleFactory(i,t),Promise.resolve(Ve.$E(this._foreignModule))):Promise.reject(new Error("Unexpected usage"))}fmr(e,t){if(!this._foreignModule||"function"!=typeof this._foreignModule[e])return Promise.reject(new Error("Missing requestHandler or method: "+e));try{return Promise.resolve(this._foreignModule[e].apply(this._foreignModule,t))}catch(e){return Promise.reject(e)}}}vt._diffLimit=1e5,vt._suggestionsLimit=1e4,"function"==typeof importScripts&&(ze.li.monaco=q());var wt=n(1200),yt=n(3187),At=n(9488),St=n(3557),xt=function(e,t){return function(n,i){t(n,i,e)}},kt=function(e,t,n,i){return new(n||(n=Promise))((function(o,r){function s(e){try{l(i.next(e))}catch(e){r(e)}}function a(e){try{l(i.throw(e))}catch(e){r(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,a)}l((i=i.apply(e,t||[])).next())}))};function Lt(e,t){let n=e.getModel(t);return!!n&&!n.isTooLargeForSyncing()}let Et=class extends ke.JT{constructor(e,t,n){super(),this._modelService=e,this._workerManager=this._register(new Dt(this._modelService)),this._logService=n,this._register(Te.pM.register("*",{provideLinks:(e,t)=>Lt(this._modelService,e.uri)?this._workerManager.withWorker().then((t=>t.computeLinks(e.uri))).then((e=>e&&{links:e})):Promise.resolve({links:[]})})),this._register(Te.KZ.register("*",new Nt(this._workerManager,t,this._modelService)))}dispose(){super.dispose()}canComputeDiff(e,t){return Lt(this._modelService,e)&&Lt(this._modelService,t)}computeDiff(e,t,n,i){return this._workerManager.withWorker().then((o=>o.computeDiff(e,t,n,i)))}computeMoreMinimalEdits(e,t){if((0,At.Of)(t)){if(!Lt(this._modelService,e))return Promise.resolve(t);const n=_t.G.create(!0),i=this._workerManager.withWorker().then((n=>n.computeMoreMinimalEdits(e,t)));return i.finally((()=>this._logService.trace("FORMAT#computeMoreMinimalEdits",e.toString(!0),n.elapsed()))),Promise.race([i,(0,Fe.Vs)(1e3).then((()=>t))])}return Promise.resolve(void 0)}canNavigateValueSet(e){return Lt(this._modelService,e)}navigateValueSet(e,t,n){return this._workerManager.withWorker().then((i=>i.navigateValueSet(e,t,n)))}canComputeWordRanges(e){return Lt(this._modelService,e)}computeWordRanges(e,t){return this._workerManager.withWorker().then((n=>n.computeWordRanges(e,t)))}};Et=function(e,t,n,i){var o,r=arguments.length,s=r<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,i);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,n,s):o(t,n))||s);return r>3&&s&&Object.defineProperty(t,n,s),s}([xt(0,wt.q),xt(1,yt.V),xt(2,St.VZ)],Et);class Nt{constructor(e,t,n){this._debugDisplayName="wordbasedCompletions",this._workerManager=e,this._configurationService=t,this._modelService=n}provideCompletionItems(e,t){return kt(this,void 0,void 0,(function*(){const n=this._configurationService.getValue(e.uri,t,"editor");if(!n.wordBasedSuggestions)return;const i=[];if("currentDocument"===n.wordBasedSuggestionsMode)Lt(this._modelService,e.uri)&&i.push(e.uri);else for(const t of this._modelService.getModels())Lt(this._modelService,t.uri)&&(t===e?i.unshift(t.uri):"allDocuments"!==n.wordBasedSuggestionsMode&&t.getLanguageIdentifier().id!==e.getLanguageIdentifier().id||i.push(t.uri));if(0===i.length)return;const o=Ge.zu.getWordDefinition(e.getLanguageIdentifier().id),r=e.getWordAtPosition(t),s=r?new $.e(t.lineNumber,r.startColumn,t.lineNumber,r.endColumn):$.e.fromPositions(t),a=s.setEndPosition(t.lineNumber,t.column),l=yield this._workerManager.withWorker(),d=yield l.textualSuggest(i,null==r?void 0:r.word,o);return d?{duration:d.duration,suggestions:d.words.map((e=>({kind:18,label:e,insertText:e,range:{insert:a,replace:s}})))}:void 0}))}}class Dt extends ke.JT{constructor(e){super(),this._modelService=e,this._editorWorkerClient=null,this._lastWorkerUsedTime=(new Date).getTime(),this._register(new Fe.zh).cancelAndSet((()=>this._checkStopIdleWorker()),Math.round(15e4)),this._register(this._modelService.onModelRemoved((e=>this._checkStopEmptyWorker())))}dispose(){this._editorWorkerClient&&(this._editorWorkerClient.dispose(),this._editorWorkerClient=null),super.dispose()}_checkStopEmptyWorker(){this._editorWorkerClient&&0===this._modelService.getModels().length&&(this._editorWorkerClient.dispose(),this._editorWorkerClient=null)}_checkStopIdleWorker(){this._editorWorkerClient&&(new Date).getTime()-this._lastWorkerUsedTime>3e5&&(this._editorWorkerClient.dispose(),this._editorWorkerClient=null)}withWorker(){return this._lastWorkerUsedTime=(new Date).getTime(),this._editorWorkerClient||(this._editorWorkerClient=new Rt(this._modelService,!1,"editorWorkerService")),Promise.resolve(this._editorWorkerClient)}}class It extends ke.JT{constructor(e,t,n){if(super(),this._syncedModels=Object.create(null),this._syncedModelsLastUsedTime=Object.create(null),this._proxy=e,this._modelService=t,!n){let e=new Fe.zh;e.cancelAndSet((()=>this._checkStopModelSync()),Math.round(3e4)),this._register(e)}}dispose(){for(let e in this._syncedModels)(0,ke.B9)(this._syncedModels[e]);this._syncedModels=Object.create(null),this._syncedModelsLastUsedTime=Object.create(null),super.dispose()}ensureSyncedResources(e){for(const t of e){let e=t.toString();this._syncedModels[e]||this._beginModelSync(t),this._syncedModels[e]&&(this._syncedModelsLastUsedTime[e]=(new Date).getTime())}}_checkStopModelSync(){let e=(new Date).getTime(),t=[];for(let n in this._syncedModelsLastUsedTime)e-this._syncedModelsLastUsedTime[n]>6e4&&t.push(n);for(const e of t)this._stopModelSync(e)}_beginModelSync(e){let t=this._modelService.getModel(e);if(!t)return;if(t.isTooLargeForSyncing())return;let n=e.toString();this._proxy.acceptNewModel({url:t.uri.toString(),lines:t.getLinesContent(),EOL:t.getEOL(),versionId:t.getVersionId()});const i=new ke.SL;i.add(t.onDidChangeContent((e=>{this._proxy.acceptModelChanged(n.toString(),e)}))),i.add(t.onWillDispose((()=>{this._stopModelSync(n)}))),i.add((0,ke.OF)((()=>{this._proxy.acceptRemovedModel(n)}))),this._syncedModels[n]=i}_stopModelSync(e){let t=this._syncedModels[e];delete this._syncedModels[e],delete this._syncedModelsLastUsedTime[e],(0,ke.B9)(t)}}class Mt{constructor(e){this._instance=e,this._proxyObj=Promise.resolve(this._instance)}dispose(){this._instance.dispose()}getProxyObject(){return this._proxyObj}}class Tt{constructor(e){this._workerClient=e}fhr(e,t){return this._workerClient.fhr(e,t)}}class Rt extends ke.JT{constructor(e,t,n){super(),this._disposed=!1,this._modelService=e,this._keepIdleModels=t,this._workerFactory=new Ye(n),this._worker=null,this._modelManager=null}fhr(e,t){throw new Error("Not implemented!")}_getOrCreateWorker(){if(!this._worker)try{this._worker=this._register(new Ue(this._workerFactory,"vs/editor/common/services/editorSimpleWorker",new Tt(this)))}catch(e){je(e),this._worker=new Mt(new vt(new Tt(this),null))}return this._worker}_getProxy(){return this._getOrCreateWorker().getProxyObject().then(void 0,(e=>(je(e),this._worker=new Mt(new vt(new Tt(this),null)),this._getOrCreateWorker().getProxyObject())))}_getOrCreateModelManager(e){return this._modelManager||(this._modelManager=this._register(new It(e,this._modelService,this._keepIdleModels))),this._modelManager}_withSyncedResources(e){return this._disposed?Promise.reject((0,We.F0)()):this._getProxy().then((t=>(this._getOrCreateModelManager(t).ensureSyncedResources(e),t)))}computeDiff(e,t,n,i){return this._withSyncedResources([e,t]).then((o=>o.computeDiff(e.toString(),t.toString(),n,i)))}computeMoreMinimalEdits(e,t){return this._withSyncedResources([e]).then((n=>n.computeMoreMinimalEdits(e.toString(),t)))}computeLinks(e){return this._withSyncedResources([e]).then((t=>t.computeLinks(e.toString())))}textualSuggest(e,t,n){return kt(this,void 0,void 0,(function*(){const i=yield this._withSyncedResources(e),o=n.source,r=(0,Xe.mr)(n);return i.textualSuggest(e.map((e=>e.toString())),t,o,r)}))}computeWordRanges(e,t){return this._withSyncedResources([e]).then((n=>{let i=this._modelService.getModel(e);if(!i)return Promise.resolve(null);let o=Ge.zu.getWordDefinition(i.getLanguageIdentifier().id),r=o.source,s=(0,Xe.mr)(o);return n.computeWordRanges(e.toString(),t,r,s)}))}navigateValueSet(e,t,n){return this._withSyncedResources([e]).then((i=>{let o=this._modelService.getModel(e);if(!o)return null;let r=Ge.zu.getWordDefinition(o.getLanguageIdentifier().id),s=r.source,a=(0,Xe.mr)(r);return i.navigateValueSet(e.toString(),t,n,s,a)}))}dispose(){super.dispose(),this._disposed=!0}}class Ot extends Rt{constructor(e,t){super(e,t.keepIdleModels||!1,t.label),this._foreignModuleId=t.moduleId,this._foreignModuleCreateData=t.createData||null,this._foreignModuleHost=t.host||null,this._foreignProxy=null}fhr(e,t){if(!this._foreignModuleHost||"function"!=typeof this._foreignModuleHost[e])return Promise.reject(new Error("Missing method "+e+" or missing main thread foreign host."));try{return Promise.resolve(this._foreignModuleHost[e].apply(this._foreignModuleHost,t))}catch(e){return Promise.reject(e)}}_getForeignProxy(){return this._foreignProxy||(this._foreignProxy=this._getProxy().then((e=>{const t=this._foreignModuleHost?Ve.$E(this._foreignModuleHost):[];return e.loadForeignModule(this._foreignModuleId,this._foreignModuleCreateData,t).then((t=>{this._foreignModuleCreateData=null;const n=(t,n)=>e.fmr(t,n),i=(e,t)=>function(){const n=Array.prototype.slice.call(arguments,0);return t(e,n)};let o={};for(const e of t)o[e]=i(e,n);return o}))}))),this._foreignProxy}getProxy(){return this._getForeignProxy()}withSyncedResources(e){return this._withSyncedResources(e).then((e=>this.getProxy()))}}var Bt,Pt=n(8411),Ft=n(7736),Wt=n(3824);function zt(e){return"string"==typeof e}function Vt(e){return!zt(e)}function Ht(e){return!e}function jt(e,t){return e.ignoreCase&&t?t.toLowerCase():t}function $t(e){return e.replace(/[&<>'"_]/g,"-")}function Ut(e,t){return new Error(`${e.languageId}: ${t}`)}function Zt(e,t,n,i,o){let r=null;return t.replace(/\$((\$)|(#)|(\d\d?)|[sS](\d\d?)|@(\w+))/g,(function(t,s,a,l,d,c,h,u,g){return Ht(a)?Ht(l)?!Ht(d)&&d0;){const t=e.tokenizer[n];if(t)return t;const i=n.lastIndexOf(".");n=i<0?null:n.substr(0,i)}return null}class qt{constructor(e){this._maxCacheDepth=e,this._entries=Object.create(null)}static create(e,t){return this._INSTANCE.create(e,t)}create(e,t){if(null!==e&&e.depth>=this._maxCacheDepth)return new Yt(e,t);let n=Yt.getStackElementId(e);n.length>0&&(n+="|"),n+=t;let i=this._entries[n];return i||(i=new Yt(e,t),this._entries[n]=i,i)}}qt._INSTANCE=new qt(5);class Yt{constructor(e,t){this.parent=e,this.state=t,this.depth=(this.parent?this.parent.depth:0)+1}static getStackElementId(e){let t="";for(;null!==e;)t.length>0&&(t+="|"),t+=e.state,e=e.parent;return t}static _equals(e,t){for(;null!==e&&null!==t;){if(e===t)return!0;if(e.state!==t.state)return!1;e=e.parent,t=t.parent}return null===e&&null===t}equals(e){return Yt._equals(this,e)}push(e){return qt.create(this,e)}pop(){return this.parent}popall(){let e=this;for(;e.parent;)e=e.parent;return e}switchTo(e){return qt.create(this.parent,e)}}class Gt{constructor(e,t){this.modeId=e,this.state=t}equals(e){return this.modeId===e.modeId&&this.state.equals(e.state)}clone(){return this.state.clone()===this.state?this:new Gt(this.modeId,this.state)}}class Qt{constructor(e){this._maxCacheDepth=e,this._entries=Object.create(null)}static create(e,t){return this._INSTANCE.create(e,t)}create(e,t){if(null!==t)return new Xt(e,t);if(null!==e&&e.depth>=this._maxCacheDepth)return new Xt(e,t);let n=Yt.getStackElementId(e),i=this._entries[n];return i||(i=new Xt(e,null),this._entries[n]=i,i)}}Qt._INSTANCE=new Qt(5);class Xt{constructor(e,t){this.stack=e,this.embeddedModeData=t}clone(){return(this.embeddedModeData?this.embeddedModeData.clone():null)===this.embeddedModeData?this:Qt.create(this.stack,this.embeddedModeData)}equals(e){return e instanceof Xt&&!!this.stack.equals(e.stack)&&(null===this.embeddedModeData&&null===e.embeddedModeData||null!==this.embeddedModeData&&null!==e.embeddedModeData&&this.embeddedModeData.equals(e.embeddedModeData))}}class Jt{constructor(){this._tokens=[],this._language=null,this._lastTokenType=null,this._lastTokenLanguage=null}enterMode(e,t){this._language=t}emit(e,t){this._lastTokenType===t&&this._lastTokenLanguage===this._language||(this._lastTokenType=t,this._lastTokenLanguage=this._language,this._tokens.push(new Z.WU(e,t,this._language)))}nestedModeTokenize(e,t,n,i){const o=n.modeId,r=n.state,s=Te.RW.get(o);if(!s)return this.enterMode(i,o),this.emit(i,""),r;let a=s.tokenize(e,t,r,i);return this._tokens=this._tokens.concat(a.tokens),this._lastTokenType=null,this._lastTokenLanguage=null,this._language=null,a.endState}finalize(e){return new Z.hG(this._tokens,e)}}class en{constructor(e,t){this._modeService=e,this._theme=t,this._prependTokens=null,this._tokens=[],this._currentLanguageId=0,this._lastTokenMetadata=0}enterMode(e,t){this._currentLanguageId=this._modeService.getLanguageIdentifier(t).id}emit(e,t){let n=this._theme.match(this._currentLanguageId,t);this._lastTokenMetadata!==n&&(this._lastTokenMetadata=n,this._tokens.push(e),this._tokens.push(n))}static _merge(e,t,n){let i=null!==e?e.length:0,o=t.length,r=null!==n?n.length:0;if(0===i&&0===o&&0===r)return new Uint32Array(0);if(0===i&&0===o)return n;if(0===o&&0===r)return e;let s=new Uint32Array(i+o+r);null!==e&&s.set(e);for(let e=0;e{if(o)return;let t=!1;for(let n=0,i=e.changedLanguages.length;n{}))}}getInitialState(){let e=qt.create(null,this._lexer.start);return Qt.create(e,null)}tokenize(e,t,n,i){let o=new Jt,r=this._tokenize(e,t,n,i,o);return o.finalize(r)}tokenize2(e,t,n,i){let o=new en(this._modeService,this._standaloneThemeService.getColorTheme().tokenTheme),r=this._tokenize(e,t,n,i,o);return o.finalize(r)}_tokenize(e,t,n,i,o){return n.embeddedModeData?this._nestedTokenize(e,t,n,i,o):this._myTokenize(e,t,n,i,o)}_findLeavingNestedModeOffset(e,t){let n=this._lexer.tokenizer[t.stack.state];if(!n&&(n=Kt(this._lexer,t.stack.state),!n))throw Ut(this._lexer,"tokenizer state is not defined: "+t.stack.state);let i=-1,o=!1;for(const t of n){if(!Vt(t.action)||"@pop"!==t.action.nextEmbedded)continue;o=!0;let n=t.regex,r=t.regex.source;if("^(?:"===r.substr(0,4)&&")"===r.substr(r.length-1,1)){let e=(n.ignoreCase?"i":"")+(n.unicode?"u":"");n=new RegExp(r.substr(4,r.length-5),e)}let s=e.search(n);-1===s||0!==s&&t.matchOnlyAtLineStart||(-1===i||s0&&o.nestedModeTokenize(s,!1,n.embeddedModeData,i);let a=e.substring(r);return this._myTokenize(a,t,n,i+r,o)}_safeRuleName(e){return e?e.name:"(unknown)"}_myTokenize(e,t,n,i,o){o.enterMode(i,this._modeId);const r=e.length,s=t&&this._lexer.includeLF?e+"\n":e,a=s.length;let l=n.embeddedModeData,d=n.stack,c=0,h=null,u=!0;for(;u||c=a)break;u=!1;let e=this._lexer.tokenizer[_];if(!e&&(e=Kt(this._lexer,_),!e))throw Ut(this._lexer,"tokenizer state is not defined: "+_);let t=s.substr(c);for(const n of e)if((0===c||!n.matchOnlyAtLineStart)&&(b=t.match(n.regex),b)){C=b[0],v=n.action;break}}if(b||(b=[""],C=""),v||(c=this._lexer.maxStack)throw Ut(this._lexer,"maximum tokenizer stack size reached: ["+d.state+","+d.parent.state+",...]");d=d.push(_)}else if("@pop"===v.next){if(d.depth<=1)throw Ut(this._lexer,"trying to pop an empty stack in rule: "+this._safeRuleName(w));d=d.pop()}else if("@popall"===v.next)d=d.popall();else{let e=Zt(this._lexer,v.next,C,b,_);if("@"===e[0]&&(e=e.substr(1)),!Kt(this._lexer,e))throw Ut(this._lexer,"trying to set a next state '"+e+"' that is undefined in rule: "+this._safeRuleName(w));d=d.push(e)}}v.log&&"string"==typeof v.log&&(g=this._lexer,p=this._lexer.languageId+": "+Zt(this._lexer,v.log,C,b,_),console.log(`${g.languageId}: ${p}`))}if(null===A)throw Ut(this._lexer,"lexer rule has no well-defined action in rule: "+this._safeRuleName(w));const S=n=>{let r=this._modeService.getModeIdForLanguageName(n);r&&(n=r);const s=this._getNestedEmbeddedModeData(n);if(c0)throw Ut(this._lexer,"groups cannot be nested: "+this._safeRuleName(w));if(b.length!==A.length+1)throw Ut(this._lexer,"matched number of groups does not match the number of actions in rule: "+this._safeRuleName(w));let e=0;for(let t=1;te});class rn{static colorizeElement(e,t,n,i){let o=(i=i||{}).theme||"vs",r=i.mimeType||n.getAttribute("lang")||n.getAttribute("data-lang");if(!r)return console.error("Mode not detected"),Promise.resolve();e.setTheme(o);let s=n.firstChild?n.firstChild.nodeValue:"";return n.className+=" "+o,this.colorize(t,s||"",r,i).then((e=>{var t;const i=null!==(t=null==on?void 0:on.createHTML(e))&&void 0!==t?t:e;n.innerHTML=i}),(e=>console.error(e)))}static colorize(e,t,n,i){let o=4;i&&"number"==typeof i.tabSize&&(o=i.tabSize),Xe.uS(t)&&(t=t.substr(1));let r=Xe.uq(t),s=e.getModeId(n);if(!s)return Promise.resolve(an(r,o));e.triggerMode(s);const a=Te.RW.get(s);if(a)return sn(r,o,a);const l=Te.RW.getPromise(s);return new Promise(l?(e,t)=>{l.then((n=>{sn(r,o,n).then(e,t)}),t)}:(e,t)=>{let n=null,i=null;const a=()=>{n&&(n.dispose(),n=null),i&&(i.dispose(),i=null);const a=Te.RW.get(s);a?sn(r,o,a).then(e,t):e(an(r,o))};i=new Fe._F,i.cancelAndSet(a,500),n=Te.RW.onDidChange((e=>{e.changedLanguages.indexOf(s)>=0&&a()}))})}static colorizeLine(e,t,n,i,o=4){const r=Wt.wA.isBasicASCII(e,t),s=Wt.wA.containsRTL(e,r,n);return(0,Ft.tF)(new Ft.IJ(!1,!0,e,!1,r,s,0,i,[],o,0,0,0,0,-1,"none",!1,!1,null)).html}static colorizeModelLine(e,t,n=4){let i=e.getLineContent(t);e.forceTokenization(t);let o=e.getLineTokens(t).inflate();return this.colorizeLine(i,e.mightContainNonBasicASCII(),e.mightContainRTL(),o,n)}}function sn(e,t,n){return new Promise(((i,o)=>{const r=()=>{const s=function(e,t,n){let i=[],o=n.getInitialState();for(let r=0,s=e.length;r"),o=a.endState}return i.join("")}(e,t,n);if(n instanceof tn){const e=n.getLoadStatus();if(!1===e.loaded)return void e.promise.then(r,o)}i(s)};r()}))}function an(e,t){let n=[];const i=new Uint32Array(2);i[0]=0,i[1]=16793600;for(let o=0,r=e.length;o")}return n.join("")}var ln=n(9069),dn=n(4603),cn=n(5520),hn=n(6007),un=n(6345),gn=n(9386),pn=n(3108),mn=n(3193);class fn{constructor(e={},t=[],n=[]){this._contents=e,this._keys=t,this._overrides=n,this.isFrozen=!1}get contents(){return this.checkAndFreeze(this._contents)}get overrides(){return this.checkAndFreeze(this._overrides)}get keys(){return this.checkAndFreeze(this._keys)}isEmpty(){return 0===this._keys.length&&0===Object.keys(this._contents).length&&0===this._overrides.length}getValue(e){return e?(0,pn.Mt)(this.contents,e):this.contents}override(e){const t=this.getContentsForOverrideIdentifer(e);if(!t||"object"!=typeof t||!Object.keys(t).length)return this;let n={};for(const e of At.EB([...Object.keys(this.contents),...Object.keys(t)])){let i=this.contents[e],o=t[e];o&&("object"==typeof i&&"object"==typeof o?(i=Le.I8(i),this.mergeContents(i,o)):i=o),n[e]=i}return new fn(n,this.keys,this.overrides)}merge(...e){const t=Le.I8(this.contents),n=Le.I8(this.overrides),i=[...this.keys];for(const o of e){this.mergeContents(t,o.contents);for(const e of o.overrides){const[t]=n.filter((t=>At.fS(t.identifiers,e.identifiers)));t?this.mergeContents(t.contents,e.contents):n.push(Le.I8(e))}for(const e of o.keys)-1===i.indexOf(e)&&i.push(e)}return new fn(t,i,n)}freeze(){return this.isFrozen=!0,this}mergeContents(e,t){for(const n of Object.keys(t))n in e&&Ve.Kn(e[n])&&Ve.Kn(t[n])?this.mergeContents(e[n],t[n]):e[n]=Le.I8(t[n])}checkAndFreeze(e){return this.isFrozen&&!Object.isFrozen(e)?Le._A(e):e}getContentsForOverrideIdentifer(e){for(const t of this.overrides)if(-1!==t.identifiers.indexOf(e))return t.contents;return null}toJSON(){return{contents:this.contents,overrides:this.overrides,keys:this.keys}}setValue(e,t){this.addKey(e),(0,pn.KV)(this.contents,e,t,(e=>{throw new Error(e)}))}removeValue(e){this.removeKey(e)&&(0,pn.xL)(this.contents,e)}addKey(e){let t=this.keys.length;for(let n=0;nconsole.error(`Conflict in default settings file: ${e}`)))});super(e,t,n)}}class bn{constructor(e,t,n=new fn,i=new fn,o=new ge.Y9,r=new fn,s=new ge.Y9,a=!0){this._defaultConfiguration=e,this._localUserConfiguration=t,this._remoteUserConfiguration=n,this._workspaceConfiguration=i,this._folderConfigurations=o,this._memoryConfiguration=r,this._memoryConfigurationByResource=s,this._freeze=a,this._workspaceConsolidatedConfiguration=null,this._foldersConsolidatedConfigurations=new ge.Y9,this._userConfiguration=null}getValue(e,t,n){return this.getConsolidateConfigurationModel(t,n).getValue(e)}updateValue(e,t,n={}){let i;n.resource?(i=this._memoryConfigurationByResource.get(n.resource),i||(i=new fn,this._memoryConfigurationByResource.set(n.resource,i))):i=this._memoryConfiguration,void 0===t?i.removeValue(e):i.setValue(e,t),n.resource||(this._workspaceConsolidatedConfiguration=null)}get userConfiguration(){return this._userConfiguration||(this._userConfiguration=this._remoteUserConfiguration.isEmpty()?this._localUserConfiguration:this._localUserConfiguration.merge(this._remoteUserConfiguration),this._freeze&&this._userConfiguration.freeze()),this._userConfiguration}getConsolidateConfigurationModel(e,t){let n=this.getConsolidatedConfigurationModelForResource(e,t);return e.overrideIdentifier?n.override(e.overrideIdentifier):n}getConsolidatedConfigurationModelForResource({resource:e},t){let n=this.getWorkspaceConsolidatedConfiguration();if(t&&e){const i=t.getFolder(e);i&&(n=this.getFolderConsolidatedConfiguration(i.uri)||n);const o=this._memoryConfigurationByResource.get(e);o&&(n=n.merge(o))}return n}getWorkspaceConsolidatedConfiguration(){return this._workspaceConsolidatedConfiguration||(this._workspaceConsolidatedConfiguration=this._defaultConfiguration.merge(this.userConfiguration,this._workspaceConfiguration,this._memoryConfiguration),this._freeze&&(this._workspaceConfiguration=this._workspaceConfiguration.freeze())),this._workspaceConsolidatedConfiguration}getFolderConsolidatedConfiguration(e){let t=this._foldersConsolidatedConfigurations.get(e);if(!t){const n=this.getWorkspaceConsolidatedConfiguration(),i=this._folderConfigurations.get(e);i?(t=n.merge(i),this._freeze&&(t=t.freeze()),this._foldersConsolidatedConfigurations.set(e,t)):t=n}return t}toData(){return{defaults:{contents:this._defaultConfiguration.contents,overrides:this._defaultConfiguration.overrides,keys:this._defaultConfiguration.keys},user:{contents:this.userConfiguration.contents,overrides:this.userConfiguration.overrides,keys:this.userConfiguration.keys},workspace:{contents:this._workspaceConfiguration.contents,overrides:this._workspaceConfiguration.overrides,keys:this._workspaceConfiguration.keys},folders:[...this._folderConfigurations.keys()].reduce(((e,t)=>{const{contents:n,overrides:i,keys:o}=this._folderConfigurations.get(t);return e.push([t,{contents:n,overrides:i,keys:o}]),e}),[])}}static parse(e){const t=this.parseConfigurationModel(e.defaults),n=this.parseConfigurationModel(e.user),i=this.parseConfigurationModel(e.workspace),o=e.folders.reduce(((e,t)=>(e.set(H.o.revive(t[0]),this.parseConfigurationModel(t[1])),e)),new ge.Y9);return new bn(t,n,new fn,i,o,new fn,new ge.Y9,!1)}static parseConfigurationModel(e){return new fn(e.contents,e.keys,e.overrides).freeze()}}class Cn{constructor(e,t,n,i){this.change=e,this.previous=t,this.currentConfiguraiton=n,this.currentWorkspace=i,this._previousConfiguration=void 0;const o=new Set;e.keys.forEach((e=>o.add(e))),e.overrides.forEach((([,e])=>e.forEach((e=>o.add(e))))),this.affectedKeys=[...o.values()];const r=new fn;this.affectedKeys.forEach((e=>r.setValue(e,{}))),this.affectedKeysTree=r.contents}get previousConfiguration(){return!this._previousConfiguration&&this.previous&&(this._previousConfiguration=bn.parse(this.previous.data)),this._previousConfiguration}affectsConfiguration(e,t){var n;if(this.doesAffectedKeysTreeContains(this.affectedKeysTree,e)){if(t){const i=this.previousConfiguration?this.previousConfiguration.getValue(e,t,null===(n=this.previous)||void 0===n?void 0:n.workspace):void 0,o=this.currentConfiguraiton.getValue(e,t,this.currentWorkspace);return!Le.fS(i,o)}return!0}return!1}doesAffectedKeysTreeContains(e,t){let n,i=(0,pn.Od)({[t]:!0},(()=>{}));for(;"object"==typeof i&&(n=Object.keys(i)[0]);){if(!(e=e[n]))return!1;i=i[n]}return!0}}var vn=n(3580);class wn extends ke.JT{constructor(e,t,n,i,o){super(),this._contextKeyService=e,this._commandService=t,this._telemetryService=n,this._notificationService=i,this._logService=o,this._onDidUpdateKeybindings=this._register(new z.Q5),this._currentChord=null,this._currentChordChecker=new Fe.zh,this._currentChordStatusMessage=null,this._currentSingleModifier=null,this._currentSingleModifierClearTimeout=new Fe._F,this._logging=!1}get onDidUpdateKeybindings(){return this._onDidUpdateKeybindings?this._onDidUpdateKeybindings.event:z.ju.None}dispose(){super.dispose()}_log(e){this._logging&&this._logService.info(`[KeybindingService]: ${e}`)}getKeybindings(){return this._getResolver().getKeybindings()}lookupKeybinding(e,t){const n=this._getResolver().lookupPrimaryKeybinding(e,t||this._contextKeyService);if(n)return n.resolvedKeybinding}dispatchEvent(e,t){return this._dispatch(e,t)}softDispatch(e,t){const n=this.resolveKeyboardEvent(e);if(n.isChord())return console.warn("Unexpected keyboard event mapped to a chord"),null;const[i]=n.getDispatchParts();if(null===i)return null;const o=this._contextKeyService.getContext(t),r=this._currentChord?this._currentChord.keypress:null;return this._getResolver().resolve(o,r,i)}_enterChordMode(e,t){this._currentChord={keypress:e,label:t},this._currentChordStatusMessage=this._notificationService.status(vn.N("first.chord","({0}) was pressed. Waiting for second key of chord...",t));const n=Date.now();this._currentChordChecker.cancelAndSet((()=>{this._documentHasFocus()?Date.now()-n>5e3&&this._leaveChordMode():this._leaveChordMode()}),500)}_leaveChordMode(){this._currentChordStatusMessage&&(this._currentChordStatusMessage.dispose(),this._currentChordStatusMessage=null),this._currentChordChecker.cancel(),this._currentChord=null}_dispatch(e,t){return this._doDispatch(this.resolveKeyboardEvent(e),t,!1)}_singleModifierDispatch(e,t){const n=this.resolveKeyboardEvent(e),[i]=n.getSingleModifierDispatchParts();return null!==i&&null===this._currentSingleModifier?(this._log(`+ Storing single modifier for possible chord ${i}.`),this._currentSingleModifier=i,this._currentSingleModifierClearTimeout.cancelAndSet((()=>{this._log("+ Clearing single modifier due to 300ms elapsed."),this._currentSingleModifier=null}),300),!1):null!==i&&i===this._currentSingleModifier?(this._log(`/ Dispatching single modifier chord ${i} ${i}`),this._currentSingleModifierClearTimeout.cancel(),this._currentSingleModifier=null,this._doDispatch(n,t,!0)):(this._currentSingleModifierClearTimeout.cancel(),this._currentSingleModifier=null,!1)}_doDispatch(e,t,n=!1){let i=!1;if(e.isChord())return console.warn("Unexpected keyboard event mapped to a chord"),!1;let o=null,r=null;if(n){const[t]=e.getSingleModifierDispatchParts();o=t,r=t}else[o]=e.getDispatchParts(),r=this._currentChord?this._currentChord.keypress:null;if(null===o)return this._log("\\ Keyboard event cannot be dispatched in keydown phase."),i;const s=this._contextKeyService.getContext(t),a=e.getLabel(),l=this._getResolver().resolve(s,r,o);return this._logService.trace("KeybindingService#dispatch",a,null==l?void 0:l.commandId),l&&l.enterChord?(i=!0,this._enterChordMode(o,a),i):(this._currentChord&&(l&&l.commandId||(this._notificationService.status(vn.N("missing.chord","The key combination ({0}, {1}) is not a command.",this._currentChord.label,a),{hideAfter:1e4}),i=!0)),this._leaveChordMode(),l&&l.commandId&&(l.bubble||(i=!0),void 0===l.commandArgs?this._commandService.executeCommand(l.commandId).then(void 0,(e=>this._notificationService.warn(e))):this._commandService.executeCommand(l.commandId,l.commandArgs).then(void 0,(e=>this._notificationService.warn(e))),this._telemetryService.publicLog2("workbenchActionExecuted",{id:l.commandId,from:"keybinding"})),i)}mightProducePrintableCharacter(e){return!e.ctrlKey&&!e.metaKey&&(e.keyCode>=31&&e.keyCode<=56||e.keyCode>=21&&e.keyCode<=30)}}class yn{constructor(e,t,n){this._log=n,this._defaultKeybindings=e,this._defaultBoundCommands=new Map;for(let t=0,n=e.length;t=0;n--)this._isTargetedForRemoval(e[n],o,r,t,s)&&e.splice(n,1)}return e.concat(n)}_addKeyPress(e,t){const n=this._map.get(e);if(void 0===n)return this._map.set(e,[t]),void this._addToLookupMap(t);for(let e=n.length-1;e>=0;e--){let i=n[e];if(i.command===t.command)continue;const o=i.keypressParts.length>1,r=t.keypressParts.length>1;o&&r&&i.keypressParts[1]!==t.keypressParts[1]||yn.whenIsEntirelyIncluded(i.when,t.when)&&this._removeFromLookupMap(i)}n.push(t),this._addToLookupMap(t)}_addToLookupMap(e){if(!e.command)return;let t=this._lookupMap.get(e.command);void 0===t?(t=[e],this._lookupMap.set(e.command,t)):t.push(e)}_removeFromLookupMap(e){if(!e.command)return;let t=this._lookupMap.get(e.command);if(void 0!==t)for(let n=0,i=t.length;n9===e.type?e.expr:[e];let i=n(e.negate()).concat(n(t));for(let e=0;e=0;e--){const i=n[e];if(t.contextMatchesRules(i.when))return i}return n[n.length-1]}resolve(e,t,n){this._log(`| Resolving ${n}${t?` chorded from ${t}`:""}`);let i=null;if(null!==t){const e=this._map.get(t);if(void 0===e)return this._log("\\ No keybinding entries."),null;i=[];for(let t=0,o=e.length;t1&&null!==o.keypressParts[1]?(this._log(`\\ From ${i.length} keybinding entries, matched chord, when: ${An(o.when)}, source: ${Sn(o)}.`),{enterChord:!0,leaveChord:!1,commandId:null,commandArgs:null,bubble:!1}):(this._log(`\\ From ${i.length} keybinding entries, matched ${o.command}, when: ${An(o.when)}, source: ${Sn(o)}.`),{enterChord:!1,leaveChord:o.keypressParts.length>1,commandId:o.command,commandArgs:o.commandArgs,bubble:o.bubble}):(this._log(`\\ From ${i.length} keybinding entries, no when clauses matched the context.`),null)}_findCommand(e,t){for(let n=t.length-1;n>=0;n--){let i=t[n];if(yn.contextMatchesRules(e,i.when))return i}return null}static contextMatchesRules(e,t){return!t||t.evaluate(e)}}function An(e){return e?`${e.serialize()}`:"no when condition"}function Sn(e){return e.extensionId?e.isBuiltinExtension?`built-in extension ${e.extensionId}`:`user extension ${e.extensionId}`:e.isDefault?"built-in":"user"}var xn=n(9989);class kn{constructor(e,t,n,i,o,r,s){this._resolvedKeybindingItemBrand=void 0,this.resolvedKeybinding=e,this.keypressParts=e?Ln(e.getDispatchParts()):[],e&&0===this.keypressParts.length&&(this.keypressParts=Ln(e.getSingleModifierDispatchParts())),this.bubble=!!t&&94===t.charCodeAt(0),this.command=this.bubble?t.substr(1):t,this.commandArgs=n,this.when=i,this.isDefault=o,this.extensionId=r,this.isBuiltinExtension=s}}function Ln(e){let t=[];for(let n=0,i=e.length;nthis._getLabel(e)))}getAriaLabel(){return En.X4.toLabel(this._os,this._parts,(e=>this._getAriaLabel(e)))}isChord(){return this._parts.length>1}getParts(){return this._parts.map((e=>this._getPart(e)))}_getPart(e){return new V.BQ(e.ctrlKey,e.shiftKey,e.altKey,e.metaKey,this._getLabel(e),this._getAriaLabel(e))}getDispatchParts(){return this._parts.map((e=>this._getDispatchPart(e)))}getSingleModifierDispatchParts(){return this._parts.map((e=>this._getSingleModifierDispatchPart(e)))}}class Dn extends Nn{constructor(e,t){super(t,e.parts)}_keyCodeToUILabel(e){if(2===this._os)switch(e){case 15:return"←";case 16:return"↑";case 17:return"→";case 18:return"↓"}return V.kL.toString(e)}_getLabel(e){return e.isDuplicateModifierCase()?"":this._keyCodeToUILabel(e.keyCode)}_getAriaLabel(e){return e.isDuplicateModifierCase()?"":V.kL.toString(e.keyCode)}_getDispatchPart(e){return Dn.getDispatchStr(e)}static getDispatchStr(e){if(e.isModifierKey())return null;let t="";return e.ctrlKey&&(t+="ctrl+"),e.shiftKey&&(t+="shift+"),e.altKey&&(t+="alt+"),e.metaKey&&(t+="meta+"),t+=V.kL.toString(e.keyCode),t}_getSingleModifierDispatchPart(e){return 5!==e.keyCode||e.shiftKey||e.altKey||e.metaKey?4!==e.keyCode||e.ctrlKey||e.altKey||e.metaKey?6!==e.keyCode||e.ctrlKey||e.shiftKey||e.metaKey?57!==e.keyCode||e.ctrlKey||e.shiftKey||e.altKey?null:"meta":"alt":"shift":"ctrl"}}var In=n(9422),Mn=n(382),Tn=n(913),Rn=function(e,t,n,i){var o,r=arguments.length,s=r<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,i);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,n,s):o(t,n))||s);return r>3&&s&&Object.defineProperty(t,n,s),s},On=function(e,t){return function(n,i){t(n,i,e)}},Bn=function(e,t,n,i){return new(n||(n=Promise))((function(o,r){function s(e){try{l(i.next(e))}catch(e){r(e)}}function a(e){try{l(i.throw(e))}catch(e){r(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,a)}l((i=i.apply(e,t||[])).next())}))};class Pn{constructor(e){this.disposed=!1,this.model=e,this._onWillDispose=new z.Q5}get textEditorModel(){return this.model}dispose(){this.disposed=!0,this._onWillDispose.fire()}}let Fn=class{constructor(e){this.modelService=e}setEditor(e){this.editor=e}createModelReference(e){let t=null;var n,i,o;return this.editor&&(n=this.editor,i=t=>this.findModel(t,e),o=t=>this.findModel(t.getOriginalEditor(),e)||this.findModel(t.getModifiedEditor(),e),t=(0,cn.CL)(n)?i(n):o(n)),t?Promise.resolve(new ke.Jz(new Pn(t))):Promise.reject(new Error("Model not found"))}findModel(e,t){let n=this.modelService.getModel(t);return n&&n.uri.toString()!==t.toString()?null:n}};Fn=Rn([On(0,wt.q)],Fn);class Wn{show(){return Wn.NULL_PROGRESS_RUNNER}showWhile(e,t){return Bn(this,void 0,void 0,(function*(){yield e}))}}Wn.NULL_PROGRESS_RUNNER={done:()=>{},total:()=>{},worked:()=>{}};class zn{confirm(e){return this.doConfirm(e).then((e=>({confirmed:e,checkboxChecked:!1})))}doConfirm(e){let t=e.message;return e.detail&&(t=t+"\n\n"+e.detail),Promise.resolve(window.confirm(t))}show(e,t,n,i){return Promise.resolve({choice:0})}}class Vn{info(e){return this.notify({severity:dn.Z.Info,message:e})}warn(e){return this.notify({severity:dn.Z.Warning,message:e})}error(e){return this.notify({severity:dn.Z.Error,message:e})}notify(e){switch(e.severity){case dn.Z.Error:console.error(e.message);break;case dn.Z.Warning:console.warn(e.message);break;default:console.log(e.message)}return Vn.NO_OP}status(e,t){return ke.JT.None}}Vn.NO_OP=new In.EO;class Hn{constructor(e){this._onWillExecuteCommand=new z.Q5,this._onDidExecuteCommand=new z.Q5,this.onDidExecuteCommand=this._onDidExecuteCommand.event,this._instantiationService=e}executeCommand(e,...t){const n=_e.P.getCommand(e);if(!n)return Promise.reject(new Error(`command '${e}' not found`));try{this._onWillExecuteCommand.fire({commandId:e,args:t});const i=this._instantiationService.invokeFunction.apply(this._instantiationService,[n.handler,...t]);return this._onDidExecuteCommand.fire({commandId:e,args:t}),Promise.resolve(i)}catch(e){return Promise.reject(e)}}}class jn extends wn{constructor(e,t,n,i,o,r){super(e,t,n,i,o),this._cachedResolver=null,this._dynamicKeybindings=[],this._register(he.nm(r,he.tw.KEY_DOWN,(e=>{const t=new ln.y(e);this._dispatch(t,t.target)&&(t.preventDefault(),t.stopPropagation())}))),this._register(he.nm(window,he.tw.KEY_UP,(e=>{const t=new ln.y(e);this._singleModifierDispatch(t,t.target)&&t.preventDefault()})))}addDynamicKeybinding(e,t,n,i){const o=(0,V.gm)(t,ze.OS),r=new ke.SL;return o&&(this._dynamicKeybindings.push({keybinding:o,command:e,when:i,weight1:1e3,weight2:0,extensionId:null,isBuiltinExtension:!1}),r.add((0,ke.OF)((()=>{for(let t=0;tthis._log(e)))}return this._cachedResolver}_documentHasFocus(){return document.hasFocus()}_toNormalizedKeybindingItems(e,t){let n=[],i=0;for(const o of e){const e=o.when||void 0,r=o.keybinding;if(r){const s=this.resolveKeybinding(r);for(const r of s)n[i++]=new kn(r,o.command,o.commandArgs,e,t,null,!1)}else n[i++]=new kn(void 0,o.command,o.commandArgs,e,t,null,!1)}return n}resolveKeybinding(e){return[new Dn(e,ze.OS)]}resolveKeyboardEvent(e){let t=new V.QC(e.ctrlKey,e.shiftKey,e.altKey,e.metaKey,e.keyCode).toChord();return new Dn(t,ze.OS)}}function $n(e){return e&&"object"==typeof e&&(!e.overrideIdentifier||"string"==typeof e.overrideIdentifier)&&(!e.resource||e.resource instanceof H.o)}class Un{constructor(){this._onDidChangeConfiguration=new z.Q5,this.onDidChangeConfiguration=this._onDidChangeConfiguration.event,this._configuration=new bn(new _n,new fn)}getValue(e,t){const n="string"==typeof e?e:void 0,i=$n(e)?e:$n(t)?t:{};return this._configuration.getValue(n,i,void 0)}updateValues(e){const t={data:this._configuration.toData()};let n=[];for(const t of e){const[e,i]=t;this.getValue(e)!==i&&(this._configuration.updateValue(e,i),n.push(e))}if(n.length>0){const e=new Cn({keys:n,overrides:[]},t,this._configuration);e.source=7,e.sourceConfig=null,this._onDidChangeConfiguration.fire(e)}return Promise.resolve()}}class Zn{constructor(e){this.configurationService=e,this._onDidChangeConfiguration=new z.Q5,this.configurationService.onDidChangeConfiguration((e=>{this._onDidChangeConfiguration.fire({affectedKeys:e.affectedKeys,affectsConfiguration:(t,n)=>e.affectsConfiguration(n)})}))}getValue(e,t,n){const i=j.L.isIPosition(t)&&t?"string"==typeof n?n:void 0:"string"==typeof t?t:void 0;return void 0===i?this.configurationService.getValue():this.configurationService.getValue(i)}}let Kn=class{constructor(e){this.configurationService=e}getEOL(e,t){const n=this.configurationService.getValue("files.eol",{overrideIdentifier:t,resource:e});return n&&"string"==typeof n&&"auto"!==n?n:ze.IJ||ze.dz?"\n":"\r\n"}};Kn=Rn([On(0,pn.Ui)],Kn);class qn{publicLog(e,t){return Promise.resolve(void 0)}publicLog2(e,t){return this.publicLog(e,t)}}class Yn{constructor(){const e=H.o.from({scheme:Yn.SCHEME,authority:"model",path:"/"});this.workspace={id:"4064f6ec-cb38-4ad0-af64-ee6467e63c82",folders:[new Mn.md({uri:e,name:"",index:0})]}}getWorkspace(){return this.workspace}}function Gn(e,t,n){if(!t)return;if(!(e instanceof Un))return;let i=[];Object.keys(t).forEach((e=>{(0,un.ei)(e)&&i.push([`editor.${e}`,t[e]]),n&&(0,un.Pe)(e)&&i.push([`diffEditor.${e}`,t[e]])})),i.length>0&&e.updateValues(i)}Yn.SCHEME="inmemory";class Qn{constructor(e){this._modelService=e}hasPreviewHandler(){return!1}apply(e,t){return Bn(this,void 0,void 0,(function*(){const t=new Map;for(let n of e){if(!(n instanceof hn.Gl))throw new Error("bad edit - only text edits are supported");const e=this._modelService.getModel(n.resource);if(!e)throw new Error("bad edit - model not found");if("number"==typeof n.versionId&&e.getVersionId()!==n.versionId)throw new Error("bad state - model changed in the meantime");let i=t.get(e);i||(i=[],t.set(e,i)),i.push(gn.h.replaceMove($.e.lift(n.textEdit.range),n.textEdit.text))}let n=0,i=0;for(const[e,o]of t)e.pushStackElement(),e.pushEditOperations([],o,(()=>[])),e.pushStackElement(),i+=1,n+=o.length;return{ariaSummary:Xe.WU(Tn.UL.bulkEditServiceSummary,n,i)}}))}}class Xn{getUriLabel(e,t){return"file"===e.scheme?e.fsPath:e.path}}class Jn{constructor(e,t){this._codeEditorService=e,this._container=t,this.onDidLayout=z.ju.None}get dimension(){return this._dimension||(this._dimension=he.D6(window.document.body)),this._dimension}get container(){return this._container}focus(){var e;null===(e=this._codeEditorService.getFocusedCodeEditor())||void 0===e||e.focus()}}var ei=n(6346),ti=n(6341),ni=n(2360),ii={};ii.styleTagTransform=se(),ii.setAttributes=ne(),ii.insert=ee().bind(null,"head"),ii.domAPI=X(),ii.insertStyleElement=oe(),G()(ni.Z,ii),ni.Z&&ni.Z.locals&&ni.Z.locals;var oi=n(8626),ri=n(3841),si=n(9052),ai=n(9925),li=n(4504),di={};di.styleTagTransform=se(),di.setAttributes=ne(),di.insert=ee().bind(null,"head"),di.domAPI=X(),di.insertStyleElement=oe(),G()(li.Z,di),li.Z&&li.Z.locals&&li.Z.locals;var ci,hi=n(317),ui=n(6781),gi=n(4741),pi=n(6830),mi=n(7869),fi=n(8819),_i=n(3910),bi=n(7781),Ci=n(3046),vi=n(9554);class wi{constructor(e,t,n,i){this.originalLineStart=e,this.originalLineEnd=t,this.modifiedLineStart=n,this.modifiedLineEnd=i}getType(){return 0===this.originalLineStart?1:0===this.modifiedLineStart?2:0}}class yi{constructor(e){this.entries=e}}const Ai=(0,vi.q5)("diff-review-insert",Ci.lA.add,vn.N("diffReviewInsertIcon","Icon for 'Insert' in diff review.")),Si=(0,vi.q5)("diff-review-remove",Ci.lA.remove,vn.N("diffReviewRemoveIcon","Icon for 'Remove' in diff review.")),xi=(0,vi.q5)("diff-review-close",Ci.lA.close,vn.N("diffReviewCloseIcon","Icon for 'Close' in diff review."));class ki extends ke.JT{constructor(e){super(),this._width=0,this._diffEditor=e,this._isVisible=!1,this.shadow=(0,oi.X)(document.createElement("div")),this.shadow.setClassName("diff-review-shadow"),this.actionBarContainer=(0,oi.X)(document.createElement("div")),this.actionBarContainer.setClassName("diff-review-actions"),this._actionBar=this._register(new hi.o(this.actionBarContainer.domNode)),this._actionBar.push(new gi.aU("diffreview.close",vn.N("label.close","Close"),"close-diff-review "+bi.kS.asClassName(xi),!0,(()=>{return e=this,t=void 0,i=function*(){return this.hide()},new((n=void 0)||(n=Promise))((function(o,r){function s(e){try{l(i.next(e))}catch(e){r(e)}}function a(e){try{l(i.throw(e))}catch(e){r(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,a)}l((i=i.apply(e,t||[])).next())}));var e,t,n,i})),{label:!1,icon:!0}),this.domNode=(0,oi.X)(document.createElement("div")),this.domNode.setClassName("diff-review monaco-editor-background"),this._content=(0,oi.X)(document.createElement("div")),this._content.setClassName("diff-review-content"),this._content.setAttribute("role","code"),this.scrollbar=this._register(new ui.s$(this._content.domNode,{})),this.domNode.domNode.appendChild(this.scrollbar.getDomNode()),this._register(e.onDidUpdateDiff((()=>{this._isVisible&&(this._diffs=this._compute(),this._render())}))),this._register(e.getModifiedEditor().onDidChangeCursorPosition((()=>{this._isVisible&&this._render()}))),this._register(he.mu(this.domNode.domNode,"click",(e=>{e.preventDefault();let t=he.Fx(e.target,"diff-review-row");t&&this._goToRow(t)}))),this._register(he.mu(this.domNode.domNode,"keydown",(e=>{(e.equals(18)||e.equals(2066)||e.equals(530))&&(e.preventDefault(),this._goToRow(this._getNextRow())),(e.equals(16)||e.equals(2064)||e.equals(528))&&(e.preventDefault(),this._goToRow(this._getPrevRow())),(e.equals(9)||e.equals(2057)||e.equals(521)||e.equals(1033))&&(e.preventDefault(),this.hide()),(e.equals(10)||e.equals(3))&&(e.preventDefault(),this.accept())}))),this._diffs=[],this._currentDiff=null}prev(){let e=0;if(this._isVisible||(this._diffs=this._compute()),this._isVisible){let t=-1;for(let e=0,n=this._diffs.length;e0){const t=e[r-1];i=0===t.originalEndLineNumber?t.originalStartLineNumber+1:t.originalEndLineNumber+1,o=0===t.modifiedEndLineNumber?t.modifiedStartLineNumber+1:t.modifiedEndLineNumber+1}let s=t-3+1,a=n-3+1;if(sa){const e=a-m;m+=e,f+=e}if(f>p){const e=p-f;m+=e,f+=e}u[g++]=new wi(i,m,o,f)}i[o++]=new yi(u)}let r=i[0].entries,s=[],a=0;for(let e=1,t=i.length;ec)&&(c=i),0!==o&&(0===h||ou)&&(u=r)}let g=document.createElement("div");g.className="diff-review-row";let p=document.createElement("div");p.className="diff-review-cell diff-review-summary";const m=c-d+1,f=u-h+1;p.appendChild(document.createTextNode(`${s+1}/${this._diffs.length}: @@ -${d},${m} +${h},${f} @@`)),g.setAttribute("data-line",String(h));const _=e=>0===e?vn.N("no_lines_changed","no lines changed"):1===e?vn.N("one_line_changed","1 line changed"):vn.N("more_lines_changed","{0} lines changed",e),b=_(m),C=_(f);g.setAttribute("aria-label",vn.N({key:"header",comment:["This is the ARIA label for a git diff header.","A git diff header looks like this: @@ -154,12 +159,39 @@.","That encodes that at original line 154 (which is now line 159), 12 lines were removed/changed with 39 lines.","Variables 0 and 1 refer to the diff index out of total number of diffs.","Variables 2 and 4 will be numbers (a line number).",'Variables 3 and 5 will be "no lines changed", "1 line changed" or "X lines changed", localized separately.']},"Difference {0} of {1}: original line {2}, {3}, modified line {4}, {5}",s+1,this._diffs.length,d,b,h,C)),g.appendChild(p),g.setAttribute("role","listitem"),l.appendChild(g);const v=t.get(57);let w=h;for(let s=0,d=a.length;se}),(0,bi.Ic)(((e,t)=>{const n=e.getColor(mi.hw);n&&t.addRule(`.monaco-diff-editor .diff-review-line-number { color: ${n}; }`);const i=e.getColor(_i._w);i&&t.addRule(`.monaco-diff-editor .diff-review-shadow { box-shadow: ${i} 0 -6px 6px -6px inset; }`)}));class Li extends pi.R6{constructor(){super({id:"editor.action.diffReview.next",label:vn.N("editor.action.diffReview.next","Go to Next Difference"),alias:"Go to Next Difference",precondition:fi.Ao.has("isInDiffEditor"),kbOpts:{kbExpr:null,primary:65,weight:100}})}run(e,t){const n=Ni(e);n&&n.diffReviewNext()}}class Ei extends pi.R6{constructor(){super({id:"editor.action.diffReview.prev",label:vn.N("editor.action.diffReview.prev","Go to Previous Difference"),alias:"Go to Previous Difference",precondition:fi.Ao.has("isInDiffEditor"),kbOpts:{kbExpr:null,primary:1089,weight:100}})}run(e,t){const n=Ni(e);n&&n.diffReviewPrev()}}function Ni(e){const t=e.get(ce.$),n=t.listDiffEditors(),i=t.getActiveCodeEditor();if(!i)return null;for(let e=0,t=n.length;ei.modifiedStartLineNumber?vn.N("diff.clipboard.copyDeletedLinesContent.label","Copy deleted lines"):vn.N("diff.clipboard.copyDeletedLinesContent.single.label","Copy deleted line"),void 0,!0,(()=>Pi(this,void 0,void 0,(function*(){const e=new $.e(i.originalStartLineNumber,1,i.originalEndLineNumber+1,1),t=i.originalModel.getValueInRange(e);yield this._clipboardService.writeText(t)})))));let d,c=0;i.originalEndLineNumber>i.modifiedStartLineNumber&&(d=new gi.aU("diff.clipboard.copyDeletedLineContent",vn.N("diff.clipboard.copyDeletedLineContent.label","Copy deleted line ({0})",i.originalStartLineNumber),void 0,!0,(()=>Pi(this,void 0,void 0,(function*(){const e=i.originalModel.getLineContent(i.originalStartLineNumber+c);yield this._clipboardService.writeText(e)})))),l.push(d)),n.getOption(79)||l.push(new gi.aU("diff.inline.revertChange",vn.N("diff.inline.revertChange.label","Revert this change"),void 0,!0,(()=>Pi(this,void 0,void 0,(function*(){const e=new $.e(i.originalStartLineNumber,1,i.originalEndLineNumber,i.originalModel.getLineMaxColumn(i.originalEndLineNumber)),t=i.originalModel.getValueInRange(e);if(0===i.modifiedEndLineNumber){const e=n.getModel().getLineMaxColumn(i.modifiedStartLineNumber);n.executeEdits("diffEditor",[{range:new $.e(i.modifiedStartLineNumber,e,i.modifiedStartLineNumber,e),text:a+t}])}else{const e=n.getModel().getLineMaxColumn(i.modifiedEndLineNumber);n.executeEdits("diffEditor",[{range:new $.e(i.modifiedStartLineNumber,1,i.modifiedEndLineNumber,e),text:t}])}})))));const h=(e,t)=>{this._contextMenuService.showContextMenu({getAnchor:()=>({x:e,y:t}),getActions:()=>(d&&(d.label=vn.N("diff.clipboard.copyDeletedLineContent.label","Copy deleted line ({0})",i.originalStartLineNumber+c)),l),autoSelectFirstItem:!0})};this._register(he.mu(this._diffActions,"mousedown",(e=>{const{top:t,height:n}=he.i(this._diffActions);let i=Math.floor(s/3);e.preventDefault(),h(e.posx,t+n+i)}))),this._register(n.onMouseMove((e=>{(8===e.target.type||5===e.target.type)&&e.target.detail.viewZoneId===this._viewZoneId?(this.visibility=!0,c=this._updateLightBulbPosition(this._marginDomNode,e.event.browserEvent.y,s)):this.visibility=!1}))),this._register(n.onMouseDown((e=>{!e.event.rightButton||8!==e.target.type&&5!==e.target.type||e.target.detail.viewZoneId===this._viewZoneId&&(e.event.preventDefault(),c=this._updateLightBulbPosition(this._marginDomNode,e.event.browserEvent.y,s),h(e.event.posx,e.event.posy+s))})))}get visibility(){return this._visibility}set visibility(e){this._visibility!==e&&(this._visibility=e,this._diffActions.style.visibility=e?"visible":"hidden")}_updateLightBulbPosition(e,t,n){const{top:i}=he.i(e),o=t-i,r=Math.floor(o/n),s=r*n;if(this._diffActions.style.top=`${s}px`,this.diff.viewLineCounts){let e=0;for(let t=0;t!this._zonesMap[String(e.id)]))}clean(e){this._zones.length>0&&e.changeViewZones((e=>{for(const t of this._zones)e.removeZone(t)})),this._zones=[],this._zonesMap={},this._decorations=e.deltaDecorations(this._decorations,[])}apply(e,t,n,i){const o=i?ai.ZF.capture(e):null;e.changeViewZones((t=>{for(const e of this._zones)t.removeZone(e);for(const e of this._inlineDiffMargins)e.dispose();this._zones=[],this._zonesMap={},this._inlineDiffMargins=[];for(let i=0,o=n.zones.length;ie});let Gi=class e extends ke.JT{constructor(t,n,i,o,r,s,a,l,d,c,h,u){super(),this._editorProgressService=u,this._onDidDispose=this._register(new z.Q5),this.onDidDispose=this._onDidDispose.event,this._onDidUpdateDiff=this._register(new z.Q5),this.onDidUpdateDiff=this._onDidUpdateDiff.event,this._onDidContentSizeChange=this._register(new z.Q5),this._lastOriginalWarning=null,this._lastModifiedWarning=null,this._editorWorkerService=r,this._codeEditorService=l,this._contextKeyService=this._register(s.createScoped(t)),this._instantiationService=a.createChild(new Oi.y([fi.i6,this._contextKeyService])),this._contextKeyService.createKey("isInDiffEditor",!0),this._themeService=d,this._notificationService=c,this._id=++Zi,this._state=0,this._updatingDiffProgress=null,this._domElement=t,n=n||{},this._renderSideBySide=!0,void 0!==n.renderSideBySide&&(this._renderSideBySide=n.renderSideBySide),this._maxComputationTime=5e3,void 0!==n.maxComputationTime&&(this._maxComputationTime=n.maxComputationTime),this._ignoreTrimWhitespace=!0,void 0!==n.ignoreTrimWhitespace&&(this._ignoreTrimWhitespace=n.ignoreTrimWhitespace),this._renderIndicators=!0,void 0!==n.renderIndicators&&(this._renderIndicators=n.renderIndicators),this._originalIsEditable=(0,F.O7)(n.originalEditable,!1),this._diffCodeLens=(0,F.O7)(n.diffCodeLens,!1),this._diffWordWrap=so(n.diffWordWrap,"inherit"),void 0!==n.isInEmbeddedEditor?this._contextKeyService.createKey("isInEmbeddedDiffEditor",n.isInEmbeddedEditor):this._contextKeyService.createKey("isInEmbeddedDiffEditor",!1),this._renderOverviewRuler=!0,void 0!==n.renderOverviewRuler&&(this._renderOverviewRuler=Boolean(n.renderOverviewRuler)),this._updateDecorationsRunner=this._register(new Fe.pY((()=>this._updateDecorations()),0)),this._containerDomElement=document.createElement("div"),this._containerDomElement.className=e._getClassName(this._themeService.getColorTheme(),this._renderSideBySide),this._containerDomElement.style.position="relative",this._containerDomElement.style.height="100%",this._domElement.appendChild(this._containerDomElement),this._overviewViewportDomElement=(0,oi.X)(document.createElement("div")),this._overviewViewportDomElement.setClassName("diffViewport"),this._overviewViewportDomElement.setPosition("absolute"),this._overviewDomElement=document.createElement("div"),this._overviewDomElement.className="diffOverview",this._overviewDomElement.style.position="absolute",this._overviewDomElement.appendChild(this._overviewViewportDomElement.domNode),this._register(he.mu(this._overviewDomElement,"mousedown",(e=>{this._modifiedEditor.delegateVerticalScrollbarMouseDown(e)}))),this._renderOverviewRuler&&this._containerDomElement.appendChild(this._overviewDomElement),this._originalDomNode=document.createElement("div"),this._originalDomNode.className="editor original",this._originalDomNode.style.position="absolute",this._originalDomNode.style.height="100%",this._containerDomElement.appendChild(this._originalDomNode),this._modifiedDomNode=document.createElement("div"),this._modifiedDomNode.className="editor modified",this._modifiedDomNode.style.position="absolute",this._modifiedDomNode.style.height="100%",this._containerDomElement.appendChild(this._modifiedDomNode),this._beginUpdateDecorationsTimeout=-1,this._currentlyChangingViewZones=!1,this._diffComputationToken=0,this._originalEditorState=new Ui(h,o),this._modifiedEditorState=new Ui(h,o),this._isVisible=!0,this._isHandlingScrollEvent=!1,this._elementSizeObserver=this._register(new Hi.I(this._containerDomElement,n.dimension,(()=>this._onDidContainerSizeChanged()))),n.automaticLayout&&this._elementSizeObserver.startObserving(),this._diffComputationResult=null,this._originalEditor=this._createLeftHandSideEditor(n,i.originalEditor||{}),this._modifiedEditor=this._createRightHandSideEditor(n,i.modifiedEditor||{}),this._originalOverviewRuler=null,this._modifiedOverviewRuler=null,this._reviewPane=new ki(this),this._containerDomElement.appendChild(this._reviewPane.domNode.domNode),this._containerDomElement.appendChild(this._reviewPane.shadow.domNode),this._containerDomElement.appendChild(this._reviewPane.actionBarContainer.domNode),this._enableSplitViewResizing=!0,void 0!==n.enableSplitViewResizing&&(this._enableSplitViewResizing=n.enableSplitViewResizing),this._renderSideBySide?this._setStrategy(new no(this._createDataSource(),this._enableSplitViewResizing)):this._setStrategy(new oo(this._createDataSource(),this._enableSplitViewResizing)),this._register(d.onDidColorThemeChange((t=>{this._strategy&&this._strategy.applyColors(t)&&this._updateDecorationsRunner.schedule(),this._containerDomElement.className=e._getClassName(this._themeService.getColorTheme(),this._renderSideBySide)})));const g=pi.Uc.getDiffEditorContributions();for(const e of g)try{this._register(a.createInstance(e.ctor,this))}catch(e){(0,We.dL)(e)}this._codeEditorService.addDiffEditor(this)}_setState(e){this._state!==e&&(this._state=e,this._updatingDiffProgress&&(this._updatingDiffProgress.done(),this._updatingDiffProgress=null),1===this._state&&(this._updatingDiffProgress=this._editorProgressService.show(!0,1e3)))}diffReviewNext(){this._reviewPane.next()}diffReviewPrev(){this._reviewPane.prev()}static _getClassName(e,t){let n="monaco-diff-editor monaco-editor-background ";return t&&(n+="side-by-side "),n+=(0,bi.m6)(e.type),n}_recreateOverviewRulers(){this._renderOverviewRuler&&(this._originalOverviewRuler&&(this._overviewDomElement.removeChild(this._originalOverviewRuler.getDomNode()),this._originalOverviewRuler.dispose()),this._originalEditor.hasModel()&&(this._originalOverviewRuler=this._originalEditor.createOverviewRuler("original diffOverviewRuler"),this._overviewDomElement.appendChild(this._originalOverviewRuler.getDomNode())),this._modifiedOverviewRuler&&(this._overviewDomElement.removeChild(this._modifiedOverviewRuler.getDomNode()),this._modifiedOverviewRuler.dispose()),this._modifiedEditor.hasModel()&&(this._modifiedOverviewRuler=this._modifiedEditor.createOverviewRuler("modified diffOverviewRuler"),this._overviewDomElement.appendChild(this._modifiedOverviewRuler.getDomNode())),this._layoutOverviewRulers())}_createLeftHandSideEditor(t,n){const i=this._createInnerEditor(this._instantiationService,this._originalDomNode,this._adjustOptionsForLeftHandSide(t),n);this._register(i.onDidScrollChange((e=>{this._isHandlingScrollEvent||(e.scrollTopChanged||e.scrollLeftChanged||e.scrollHeightChanged)&&(this._isHandlingScrollEvent=!0,this._modifiedEditor.setScrollPosition({scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}),this._isHandlingScrollEvent=!1,this._layoutOverviewViewport())}))),this._register(i.onDidChangeViewZones((()=>{this._onViewZonesChanged()}))),this._register(i.onDidChangeConfiguration((e=>{i.getModel()&&(e.hasChanged(41)&&this._updateDecorationsRunner.schedule(),e.hasChanged(130)&&(this._updateDecorationsRunner.cancel(),this._updateDecorations()))}))),this._register(i.onDidChangeModelContent((()=>{this._isVisible&&this._beginUpdateDecorationsSoon()})));const o=this._contextKeyService.createKey("isInDiffLeftEditor",i.hasWidgetFocus());return this._register(i.onDidFocusEditorWidget((()=>o.set(!0)))),this._register(i.onDidBlurEditorWidget((()=>o.set(!1)))),this._register(i.onDidContentSizeChange((t=>{const n=this._originalEditor.getContentWidth()+this._modifiedEditor.getContentWidth()+e.ONE_OVERVIEW_WIDTH,i=Math.max(this._modifiedEditor.getContentHeight(),this._originalEditor.getContentHeight());this._onDidContentSizeChange.fire({contentHeight:i,contentWidth:n,contentHeightChanged:t.contentHeightChanged,contentWidthChanged:t.contentWidthChanged})}))),i}_createRightHandSideEditor(t,n){const i=this._createInnerEditor(this._instantiationService,this._modifiedDomNode,this._adjustOptionsForRightHandSide(t),n);this._register(i.onDidScrollChange((e=>{this._isHandlingScrollEvent||(e.scrollTopChanged||e.scrollLeftChanged||e.scrollHeightChanged)&&(this._isHandlingScrollEvent=!0,this._originalEditor.setScrollPosition({scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}),this._isHandlingScrollEvent=!1,this._layoutOverviewViewport())}))),this._register(i.onDidChangeViewZones((()=>{this._onViewZonesChanged()}))),this._register(i.onDidChangeConfiguration((e=>{i.getModel()&&(e.hasChanged(41)&&this._updateDecorationsRunner.schedule(),e.hasChanged(130)&&(this._updateDecorationsRunner.cancel(),this._updateDecorations()))}))),this._register(i.onDidChangeModelContent((()=>{this._isVisible&&this._beginUpdateDecorationsSoon()}))),this._register(i.onDidChangeModelOptions((e=>{e.tabSize&&this._updateDecorationsRunner.schedule()})));const o=this._contextKeyService.createKey("isInDiffRightEditor",i.hasWidgetFocus());return this._register(i.onDidFocusEditorWidget((()=>o.set(!0)))),this._register(i.onDidBlurEditorWidget((()=>o.set(!1)))),this._register(i.onDidContentSizeChange((t=>{const n=this._originalEditor.getContentWidth()+this._modifiedEditor.getContentWidth()+e.ONE_OVERVIEW_WIDTH,i=Math.max(this._modifiedEditor.getContentHeight(),this._originalEditor.getContentHeight());this._onDidContentSizeChange.fire({contentHeight:i,contentWidth:n,contentHeightChanged:t.contentHeightChanged,contentWidthChanged:t.contentWidthChanged})}))),i}_createInnerEditor(e,t,n,i){return e.createInstance(ti.Gm,t,n,i)}dispose(){this._codeEditorService.removeDiffEditor(this),-1!==this._beginUpdateDecorationsTimeout&&(window.clearTimeout(this._beginUpdateDecorationsTimeout),this._beginUpdateDecorationsTimeout=-1),this._cleanViewZonesAndDecorations(),this._originalOverviewRuler&&(this._overviewDomElement.removeChild(this._originalOverviewRuler.getDomNode()),this._originalOverviewRuler.dispose()),this._modifiedOverviewRuler&&(this._overviewDomElement.removeChild(this._modifiedOverviewRuler.getDomNode()),this._modifiedOverviewRuler.dispose()),this._overviewDomElement.removeChild(this._overviewViewportDomElement.domNode),this._renderOverviewRuler&&this._containerDomElement.removeChild(this._overviewDomElement),this._containerDomElement.removeChild(this._originalDomNode),this._originalEditor.dispose(),this._containerDomElement.removeChild(this._modifiedDomNode),this._modifiedEditor.dispose(),this._strategy.dispose(),this._containerDomElement.removeChild(this._reviewPane.domNode.domNode),this._containerDomElement.removeChild(this._reviewPane.shadow.domNode),this._containerDomElement.removeChild(this._reviewPane.actionBarContainer.domNode),this._reviewPane.dispose(),this._domElement.removeChild(this._containerDomElement),this._onDidDispose.fire(),super.dispose()}getId(){return this.getEditorType()+":"+this._id}getEditorType(){return Ie.g.IDiffEditor}getLineChanges(){return this._diffComputationResult?this._diffComputationResult.changes:null}getOriginalEditor(){return this._originalEditor}getModifiedEditor(){return this._modifiedEditor}updateOptions(t){let n=!1;void 0!==t.renderSideBySide&&this._renderSideBySide!==t.renderSideBySide&&(this._renderSideBySide=t.renderSideBySide,n=!0),void 0!==t.maxComputationTime&&(this._maxComputationTime=t.maxComputationTime,this._isVisible&&this._beginUpdateDecorationsSoon());let i=!1;void 0!==t.ignoreTrimWhitespace&&this._ignoreTrimWhitespace!==t.ignoreTrimWhitespace&&(this._ignoreTrimWhitespace=t.ignoreTrimWhitespace,i=!0),void 0!==t.renderIndicators&&this._renderIndicators!==t.renderIndicators&&(this._renderIndicators=t.renderIndicators,i=!0),i&&this._beginUpdateDecorations(),this._originalIsEditable=(0,F.O7)(t.originalEditable,this._originalIsEditable),this._diffCodeLens=(0,F.O7)(t.diffCodeLens,this._diffCodeLens),this._diffWordWrap=so(t.diffWordWrap,this._diffWordWrap),this._modifiedEditor.updateOptions(this._adjustOptionsForRightHandSide(t)),this._originalEditor.updateOptions(this._adjustOptionsForLeftHandSide(t)),void 0!==t.enableSplitViewResizing&&(this._enableSplitViewResizing=t.enableSplitViewResizing),this._strategy.setEnableSplitViewResizing(this._enableSplitViewResizing),n&&(this._renderSideBySide?this._setStrategy(new no(this._createDataSource(),this._enableSplitViewResizing)):this._setStrategy(new oo(this._createDataSource(),this._enableSplitViewResizing)),this._containerDomElement.className=e._getClassName(this._themeService.getColorTheme(),this._renderSideBySide)),void 0!==t.renderOverviewRuler&&this._renderOverviewRuler!==t.renderOverviewRuler&&(this._renderOverviewRuler=t.renderOverviewRuler,this._renderOverviewRuler?this._containerDomElement.appendChild(this._overviewDomElement):this._containerDomElement.removeChild(this._overviewDomElement))}getModel(){return{original:this._originalEditor.getModel(),modified:this._modifiedEditor.getModel()}}setModel(e){if(e&&(!e.original||!e.modified))throw new Error(e.original?"DiffEditorWidget.setModel: Modified model is null":"DiffEditorWidget.setModel: Original model is null");this._cleanViewZonesAndDecorations(),this._originalEditor.setModel(e?e.original:null),this._modifiedEditor.setModel(e?e.modified:null),this._updateDecorationsRunner.cancel(),e&&(this._originalEditor.setScrollTop(0),this._modifiedEditor.setScrollTop(0)),this._diffComputationResult=null,this._diffComputationToken++,this._setState(0),e&&(this._recreateOverviewRulers(),this._beginUpdateDecorations()),this._layoutOverviewViewport()}getDomNode(){return this._domElement}getVisibleColumnFromPosition(e){return this._modifiedEditor.getVisibleColumnFromPosition(e)}getPosition(){return this._modifiedEditor.getPosition()}setPosition(e){this._modifiedEditor.setPosition(e)}revealLine(e,t=0){this._modifiedEditor.revealLine(e,t)}revealLineInCenter(e,t=0){this._modifiedEditor.revealLineInCenter(e,t)}revealLineInCenterIfOutsideViewport(e,t=0){this._modifiedEditor.revealLineInCenterIfOutsideViewport(e,t)}revealLineNearTop(e,t=0){this._modifiedEditor.revealLineNearTop(e,t)}revealPosition(e,t=0){this._modifiedEditor.revealPosition(e,t)}revealPositionInCenter(e,t=0){this._modifiedEditor.revealPositionInCenter(e,t)}revealPositionInCenterIfOutsideViewport(e,t=0){this._modifiedEditor.revealPositionInCenterIfOutsideViewport(e,t)}revealPositionNearTop(e,t=0){this._modifiedEditor.revealPositionNearTop(e,t)}getSelection(){return this._modifiedEditor.getSelection()}getSelections(){return this._modifiedEditor.getSelections()}setSelection(e){this._modifiedEditor.setSelection(e)}setSelections(e){this._modifiedEditor.setSelections(e)}revealLines(e,t,n=0){this._modifiedEditor.revealLines(e,t,n)}revealLinesInCenter(e,t,n=0){this._modifiedEditor.revealLinesInCenter(e,t,n)}revealLinesInCenterIfOutsideViewport(e,t,n=0){this._modifiedEditor.revealLinesInCenterIfOutsideViewport(e,t,n)}revealLinesNearTop(e,t,n=0){this._modifiedEditor.revealLinesNearTop(e,t,n)}revealRange(e,t=0,n=!1,i=!0){this._modifiedEditor.revealRange(e,t,n,i)}revealRangeInCenter(e,t=0){this._modifiedEditor.revealRangeInCenter(e,t)}revealRangeInCenterIfOutsideViewport(e,t=0){this._modifiedEditor.revealRangeInCenterIfOutsideViewport(e,t)}revealRangeNearTop(e,t=0){this._modifiedEditor.revealRangeNearTop(e,t)}revealRangeNearTopIfOutsideViewport(e,t=0){this._modifiedEditor.revealRangeNearTopIfOutsideViewport(e,t)}revealRangeAtTop(e,t=0){this._modifiedEditor.revealRangeAtTop(e,t)}getSupportedActions(){return this._modifiedEditor.getSupportedActions()}saveViewState(){return{original:this._originalEditor.saveViewState(),modified:this._modifiedEditor.saveViewState()}}restoreViewState(e){if(e&&e.original&&e.modified){const t=e;this._originalEditor.restoreViewState(t.original),this._modifiedEditor.restoreViewState(t.modified)}}layout(e){this._elementSizeObserver.observe(e)}focus(){this._modifiedEditor.focus()}hasTextFocus(){return this._originalEditor.hasTextFocus()||this._modifiedEditor.hasTextFocus()}trigger(e,t,n){this._modifiedEditor.trigger(e,t,n)}changeDecorations(e){return this._modifiedEditor.changeDecorations(e)}_onDidContainerSizeChanged(){this._doLayout()}_getReviewHeight(){return this._reviewPane.isVisible()?this._elementSizeObserver.getHeight():0}_layoutOverviewRulers(){if(!this._renderOverviewRuler)return;if(!this._originalOverviewRuler||!this._modifiedOverviewRuler)return;const t=this._elementSizeObserver.getHeight(),n=this._getReviewHeight(),i=e.ENTIRE_DIFF_OVERVIEW_WIDTH-2*e.ONE_OVERVIEW_WIDTH;this._modifiedEditor.getLayoutInfo()&&(this._originalOverviewRuler.setLayout({top:0,width:e.ONE_OVERVIEW_WIDTH,right:i+e.ONE_OVERVIEW_WIDTH,height:t-n}),this._modifiedOverviewRuler.setLayout({top:0,right:0,width:e.ONE_OVERVIEW_WIDTH,height:t-n}))}_onViewZonesChanged(){this._currentlyChangingViewZones||this._updateDecorationsRunner.schedule()}_beginUpdateDecorationsSoon(){-1!==this._beginUpdateDecorationsTimeout&&(window.clearTimeout(this._beginUpdateDecorationsTimeout),this._beginUpdateDecorationsTimeout=-1),this._beginUpdateDecorationsTimeout=window.setTimeout((()=>this._beginUpdateDecorations()),e.UPDATE_DIFF_DECORATIONS_DELAY)}static _equals(e,t){return!e&&!t||!(!e||!t)&&e.toString()===t.toString()}_beginUpdateDecorations(){this._beginUpdateDecorationsTimeout=-1;const t=this._originalEditor.getModel(),n=this._modifiedEditor.getModel();if(!t||!n)return;this._diffComputationToken++;const i=this._diffComputationToken;this._setState(1),this._editorWorkerService.canComputeDiff(t.uri,n.uri)?this._editorWorkerService.computeDiff(t.uri,n.uri,this._ignoreTrimWhitespace,this._maxComputationTime).then((e=>{i===this._diffComputationToken&&t===this._originalEditor.getModel()&&n===this._modifiedEditor.getModel()&&(this._setState(2),this._diffComputationResult=e,this._updateDecorationsRunner.schedule(),this._onDidUpdateDiff.fire())}),(e=>{i===this._diffComputationToken&&t===this._originalEditor.getModel()&&n===this._modifiedEditor.getModel()&&(this._setState(2),this._diffComputationResult=null,this._updateDecorationsRunner.schedule())})):e._equals(t.uri,this._lastOriginalWarning)&&e._equals(n.uri,this._lastModifiedWarning)||(this._lastOriginalWarning=t.uri,this._lastModifiedWarning=n.uri,this._notificationService.warn(vn.N("diff.tooLarge","Cannot compare files because one file is too large.")))}_cleanViewZonesAndDecorations(){this._originalEditorState.clean(this._originalEditor),this._modifiedEditorState.clean(this._modifiedEditor)}_updateDecorations(){if(!this._originalEditor.getModel()||!this._modifiedEditor.getModel())return;const e=this._diffComputationResult?this._diffComputationResult.changes:[],t=this._originalEditorState.getForeignViewZones(this._originalEditor.getWhitespaces()),n=this._modifiedEditorState.getForeignViewZones(this._modifiedEditor.getWhitespaces()),i=this._strategy.getEditorsDiffDecorations(e,this._ignoreTrimWhitespace,this._renderIndicators,t,n);try{this._currentlyChangingViewZones=!0,this._originalEditorState.apply(this._originalEditor,this._originalOverviewRuler,i.original,!1),this._modifiedEditorState.apply(this._modifiedEditor,this._modifiedOverviewRuler,i.modified,!0)}finally{this._currentlyChangingViewZones=!1}}_adjustOptionsForSubEditor(e){const t=Object.assign({},e);return t.inDiffEditor=!0,t.automaticLayout=!1,t.scrollbar=Object.assign({},t.scrollbar||{}),t.scrollbar.vertical="visible",t.folding=!1,t.codeLens=this._diffCodeLens,t.fixedOverflowWidgets=!0,t.minimap=Object.assign({},t.minimap||{}),t.minimap.enabled=!1,t}_adjustOptionsForLeftHandSide(e){const t=this._adjustOptionsForSubEditor(e);return this._renderSideBySide?t.wordWrapOverride1=this._diffWordWrap:t.wordWrapOverride1="off",e.originalAriaLabel&&(t.ariaLabel=e.originalAriaLabel),t.readOnly=!this._originalIsEditable,t.extraEditorClassName="original-in-monaco-diff-editor",Object.assign(Object.assign({},t),{dimension:{height:0,width:0}})}_adjustOptionsForRightHandSide(t){const n=this._adjustOptionsForSubEditor(t);return t.modifiedAriaLabel&&(n.ariaLabel=t.modifiedAriaLabel),n.wordWrapOverride1=this._diffWordWrap,n.revealHorizontalRightPadding=F.BH.revealHorizontalRightPadding.defaultValue+e.ENTIRE_DIFF_OVERVIEW_WIDTH,n.scrollbar.verticalHasArrows=!1,n.extraEditorClassName="modified-in-monaco-diff-editor",Object.assign(Object.assign({},n),{dimension:{height:0,width:0}})}doLayout(){this._elementSizeObserver.observe(),this._doLayout()}_doLayout(){const t=this._elementSizeObserver.getWidth(),n=this._elementSizeObserver.getHeight(),i=this._getReviewHeight(),o=this._strategy.layout();this._originalDomNode.style.width=o+"px",this._originalDomNode.style.left="0px",this._modifiedDomNode.style.width=t-o+"px",this._modifiedDomNode.style.left=o+"px",this._overviewDomElement.style.top="0px",this._overviewDomElement.style.height=n-i+"px",this._overviewDomElement.style.width=e.ENTIRE_DIFF_OVERVIEW_WIDTH+"px",this._overviewDomElement.style.left=t-e.ENTIRE_DIFF_OVERVIEW_WIDTH+"px",this._overviewViewportDomElement.setWidth(e.ENTIRE_DIFF_OVERVIEW_WIDTH),this._overviewViewportDomElement.setHeight(30),this._originalEditor.layout({width:o,height:n-i}),this._modifiedEditor.layout({width:t-o-(this._renderOverviewRuler?e.ENTIRE_DIFF_OVERVIEW_WIDTH:0),height:n-i}),(this._originalOverviewRuler||this._modifiedOverviewRuler)&&this._layoutOverviewRulers(),this._reviewPane.layout(n-i,t,i),this._layoutOverviewViewport()}_layoutOverviewViewport(){const e=this._computeOverviewViewport();e?(this._overviewViewportDomElement.setTop(e.top),this._overviewViewportDomElement.setHeight(e.height)):(this._overviewViewportDomElement.setTop(0),this._overviewViewportDomElement.setHeight(0))}_computeOverviewViewport(){const e=this._modifiedEditor.getLayoutInfo();if(!e)return null;const t=this._modifiedEditor.getScrollTop(),n=this._modifiedEditor.getScrollHeight(),i=Math.max(0,e.height),o=Math.max(0,i-0),r=n>0?o/n:0;return{height:Math.max(0,Math.floor(e.height*r)),top:Math.floor(t*r)}}_createDataSource(){return{getWidth:()=>this._elementSizeObserver.getWidth(),getHeight:()=>this._elementSizeObserver.getHeight()-this._getReviewHeight(),getOptions:()=>({renderOverviewRuler:this._renderOverviewRuler}),getContainerDomNode:()=>this._containerDomElement,relayoutEditors:()=>{this._doLayout()},getOriginalEditor:()=>this._originalEditor,getModifiedEditor:()=>this._modifiedEditor}}_setStrategy(e){this._strategy&&this._strategy.dispose(),this._strategy=e,e.applyColors(this._themeService.getColorTheme()),this._diffComputationResult&&this._updateDecorations(),this._doLayout()}_getLineChangeAtOrBeforeLineNumber(e,t){const n=this._diffComputationResult?this._diffComputationResult.changes:[];if(0===n.length||e=a?i=r+1:(i=r,o=r)}return n[i]}_getEquivalentLineForOriginalLineNumber(e){const t=this._getLineChangeAtOrBeforeLineNumber(e,(e=>e.originalStartLineNumber));if(!t)return e;const n=t.originalStartLineNumber+(t.originalEndLineNumber>0?-1:0),i=t.modifiedStartLineNumber+(t.modifiedEndLineNumber>0?-1:0),o=t.originalEndLineNumber>0?t.originalEndLineNumber-t.originalStartLineNumber+1:0,r=t.modifiedEndLineNumber>0?t.modifiedEndLineNumber-t.modifiedStartLineNumber+1:0,s=e-n;return s<=o?i+Math.min(s,r):i+r-o+s}_getEquivalentLineForModifiedLineNumber(e){const t=this._getLineChangeAtOrBeforeLineNumber(e,(e=>e.modifiedStartLineNumber));if(!t)return e;const n=t.originalStartLineNumber+(t.originalEndLineNumber>0?-1:0),i=t.modifiedStartLineNumber+(t.modifiedEndLineNumber>0?-1:0),o=t.originalEndLineNumber>0?t.originalEndLineNumber-t.originalStartLineNumber+1:0,r=t.modifiedEndLineNumber>0?t.modifiedEndLineNumber-t.modifiedStartLineNumber+1:0,s=e-i;return s<=r?n+Math.min(s,o):n+o-r+s}getDiffLineInformationForOriginal(e){return this._diffComputationResult?{equivalentLineNumber:this._getEquivalentLineForOriginalLineNumber(e)}:null}getDiffLineInformationForModified(e){return this._diffComputationResult?{equivalentLineNumber:this._getEquivalentLineForModifiedLineNumber(e)}:null}};Gi.ONE_OVERVIEW_WIDTH=15,Gi.ENTIRE_DIFF_OVERVIEW_WIDTH=30,Gi.UPDATE_DIFF_DECORATIONS_DELAY=200,Gi=function(e,t,n,i){var o,r=arguments.length,s=r<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,i);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,n,s):o(t,n))||s);return r>3&&s&&Object.defineProperty(t,n,s),s}([$i(3,zi.p),$i(4,Oe.p),$i(5,fi.i6),$i(6,Ri.TG),$i(7,ce.$),$i(8,bi.XE),$i(9,In.lT),$i(10,Bi.i),$i(11,Vi.e)],Gi);class Qi extends ke.JT{constructor(e){super(),this._dataSource=e,this._insertColor=null,this._removeColor=null}applyColors(e){const t=(e.getColor(_i.yp)||_i.Cz).transparent(2),n=(e.getColor(_i.P4)||_i.ke).transparent(2),i=!t.equals(this._insertColor)||!n.equals(this._removeColor);return this._insertColor=t,this._removeColor=n,i}getEditorsDiffDecorations(e,t,n,i,o){o=o.sort(((e,t)=>e.afterLineNumber-t.afterLineNumber)),i=i.sort(((e,t)=>e.afterLineNumber-t.afterLineNumber));const r=this._getViewZones(e,i,o,n),s=this._getOriginalEditorDecorations(e,t,n),a=this._getModifiedEditorDecorations(e,t,n);return{original:{decorations:s.decorations,overviewZones:s.overviewZones,zones:r.original},modified:{decorations:a.decorations,overviewZones:a.overviewZones,zones:r.modified}}}}class Xi{constructor(e){this._source=e,this._index=-1,this.current=null,this.advance()}advance(){this._index++,this._indexe.afterLineNumber-t.afterLineNumber,_=(e,t)=>{if(null===t.domNode&&e.length>0){const n=e[e.length-1];if(n.afterLineNumber===t.afterLineNumber&&null===n.domNode)return void(n.heightInLines+=t.heightInLines)}e.push(t)},b=new Xi(this._modifiedForeignVZ),C=new Xi(this._originalForeignVZ);let v=1,w=1;for(let n=0,i=this._lineChanges.length;n<=i;n++){const y=n0?-1:0),g=y.modifiedStartLineNumber+(y.modifiedEndLineNumber>0?-1:0),h=y.originalEndLineNumber>0?Ji._getViewLineCount(this._originalEditor,y.originalStartLineNumber,y.originalEndLineNumber):0,c=y.modifiedEndLineNumber>0?Ji._getViewLineCount(this._modifiedEditor,y.modifiedStartLineNumber,y.modifiedEndLineNumber):0,p=Math.max(y.originalStartLineNumber,y.originalEndLineNumber),m=Math.max(y.modifiedStartLineNumber,y.modifiedEndLineNumber)):(u+=1e7+h,g+=1e7+c,p=u,m=g);let A=[],S=[];if(o){let e;e=y?y.originalEndLineNumber>0?y.originalStartLineNumber-v:y.modifiedStartLineNumber-w:r.getLineCount()-v;for(let t=0;to&&S.push({afterLineNumber:n,heightInLines:i-o,domNode:null,marginDomNode:null})}y&&(v=(y.originalEndLineNumber>0?y.originalEndLineNumber:y.originalStartLineNumber)+1,w=(y.modifiedEndLineNumber>0?y.modifiedEndLineNumber:y.modifiedStartLineNumber)+1)}for(;b.current&&b.current.afterLineNumber<=m;){let e;e=b.current.afterLineNumber<=g?u-g+b.current.afterLineNumber:p;let n=null;y&&y.modifiedStartLineNumber<=b.current.afterLineNumber&&b.current.afterLineNumber<=y.modifiedEndLineNumber&&(n=this._createOriginalMarginDomNodeForModifiedForeignViewZoneInAddedRegion()),A.push({afterLineNumber:e,heightInLines:b.current.height/t,domNode:null,marginDomNode:n}),b.advance()}for(;C.current&&C.current.afterLineNumber<=p;){let t;t=C.current.afterLineNumber<=u?g-u+C.current.afterLineNumber:m,S.push({afterLineNumber:t,heightInLines:C.current.height/e,domNode:null}),C.advance()}if(null!==y&&ao(y)){const e=this._produceOriginalFromDiff(y,h,c);e&&A.push(e)}if(null!==y&&lo(y)){const e=this._produceModifiedFromDiff(y,h,c);e&&S.push(e)}let x=0,k=0;for(A=A.sort(f),S=S.sort(f);x=t.heightInLines?(e.heightInLines-=t.heightInLines,k++):(t.heightInLines-=e.heightInLines,x++)}for(;x(e.domNode||(e.domNode=co()),e)))}}function eo(e,t,n,i,o){return{range:new $.e(e,t,n,i),options:o}}const to={charDelete:Ii.qx.register({description:"diff-editor-char-delete",className:"char-delete"}),charDeleteWholeLine:Ii.qx.register({description:"diff-editor-char-delete-whole-line",className:"char-delete",isWholeLine:!0}),charInsert:Ii.qx.register({description:"diff-editor-char-insert",className:"char-insert"}),charInsertWholeLine:Ii.qx.register({description:"diff-editor-char-insert-whole-line",className:"char-insert",isWholeLine:!0}),lineInsert:Ii.qx.register({description:"diff-editor-line-insert",className:"line-insert",marginClassName:"line-insert",isWholeLine:!0}),lineInsertWithSign:Ii.qx.register({description:"diff-editor-line-insert-with-sign",className:"line-insert",linesDecorationsClassName:"insert-sign "+bi.kS.asClassName(Ki),marginClassName:"line-insert",isWholeLine:!0}),lineDelete:Ii.qx.register({description:"diff-editor-line-delete",className:"line-delete",marginClassName:"line-delete",isWholeLine:!0}),lineDeleteWithSign:Ii.qx.register({description:"diff-editor-line-delete-with-sign",className:"line-delete",linesDecorationsClassName:"delete-sign "+bi.kS.asClassName(qi),marginClassName:"line-delete",isWholeLine:!0}),lineDeleteMargin:Ii.qx.register({description:"diff-editor-line-delete-margin",marginClassName:"line-delete"})};class no extends Qi{constructor(e,t){super(e),this._disableSash=!1===t,this._sashRatio=null,this._sashPosition=null,this._startSashPosition=null,this._sash=this._register(new ri.g(this._dataSource.getContainerDomNode(),this,{orientation:0})),this._disableSash&&(this._sash.state=0),this._sash.onDidStart((()=>this._onSashDragStart())),this._sash.onDidChange((e=>this._onSashDrag(e))),this._sash.onDidEnd((()=>this._onSashDragEnd())),this._sash.onDidReset((()=>this._onSashReset()))}setEnableSplitViewResizing(e){const t=!1===e;this._disableSash!==t&&(this._disableSash=t,this._sash.state=this._disableSash?0:3)}layout(e=this._sashRatio){const t=this._dataSource.getWidth()-(this._dataSource.getOptions().renderOverviewRuler?Gi.ENTIRE_DIFF_OVERVIEW_WIDTH:0);let n=Math.floor((e||.5)*t);const i=Math.floor(.5*t);return n=this._disableSash?i:n||i,t>2*no.MINIMUM_EDITOR_WIDTH?(nt-no.MINIMUM_EDITOR_WIDTH&&(n=t-no.MINIMUM_EDITOR_WIDTH)):n=i,this._sashPosition!==n&&(this._sashPosition=n,this._sash.layout()),this._sashPosition}_onSashDragStart(){this._startSashPosition=this._sashPosition}_onSashDrag(e){const t=this._dataSource.getWidth()-(this._dataSource.getOptions().renderOverviewRuler?Gi.ENTIRE_DIFF_OVERVIEW_WIDTH:0),n=this.layout((this._startSashPosition+(e.currentX-e.startX))/t);this._sashRatio=n/t,this._dataSource.relayoutEditors()}_onSashDragEnd(){this._sash.layout()}_onSashReset(){this._sashRatio=.5,this._dataSource.relayoutEditors(),this._sash.layout()}getVerticalSashTop(e){return 0}getVerticalSashLeft(e){return this._sashPosition}getVerticalSashHeight(e){return this._dataSource.getHeight()}_getViewZones(e,t,n){const i=this._dataSource.getOriginalEditor(),o=this._dataSource.getModifiedEditor();return new io(e,t,n,i,o).getViewZones()}_getOriginalEditorDecorations(e,t,n){const i=this._dataSource.getOriginalEditor(),o=String(this._removeColor),r={decorations:[],overviewZones:[]},s=i.getModel(),a=i._getViewModel();for(const i of e)if(lo(i)){r.decorations.push({range:new $.e(i.originalStartLineNumber,1,i.originalEndLineNumber,1073741824),options:n?to.lineDeleteWithSign:to.lineDelete}),ao(i)&&i.charChanges||r.decorations.push(eo(i.originalStartLineNumber,1,i.originalEndLineNumber,1073741824,to.charDeleteWholeLine));const e=ho(s,a,i.originalStartLineNumber,i.originalEndLineNumber);if(r.overviewZones.push(new Mi.EY(e.startLineNumber,e.endLineNumber,o)),i.charChanges)for(const e of i.charChanges)if(lo(e))if(t)for(let t=e.originalStartLineNumber;t<=e.originalEndLineNumber;t++){let n,i;n=t===e.originalStartLineNumber?e.originalStartColumn:s.getLineFirstNonWhitespaceColumn(t),i=t===e.originalEndLineNumber?e.originalEndColumn:s.getLineLastNonWhitespaceColumn(t),r.decorations.push(eo(t,n,t,i,to.charDelete))}else r.decorations.push(eo(e.originalStartLineNumber,e.originalStartColumn,e.originalEndLineNumber,e.originalEndColumn,to.charDelete))}return r}_getModifiedEditorDecorations(e,t,n){const i=this._dataSource.getModifiedEditor(),o=String(this._insertColor),r={decorations:[],overviewZones:[]},s=i.getModel(),a=i._getViewModel();for(const i of e)if(ao(i)){r.decorations.push({range:new $.e(i.modifiedStartLineNumber,1,i.modifiedEndLineNumber,1073741824),options:n?to.lineInsertWithSign:to.lineInsert}),lo(i)&&i.charChanges||r.decorations.push(eo(i.modifiedStartLineNumber,1,i.modifiedEndLineNumber,1073741824,to.charInsertWholeLine));const e=ho(s,a,i.modifiedStartLineNumber,i.modifiedEndLineNumber);if(r.overviewZones.push(new Mi.EY(e.startLineNumber,e.endLineNumber,o)),i.charChanges)for(const e of i.charChanges)if(ao(e))if(t)for(let t=e.modifiedStartLineNumber;t<=e.modifiedEndLineNumber;t++){let n,i;n=t===e.modifiedStartLineNumber?e.modifiedStartColumn:s.getLineFirstNonWhitespaceColumn(t),i=t===e.modifiedEndLineNumber?e.modifiedEndColumn:s.getLineLastNonWhitespaceColumn(t),r.decorations.push(eo(t,n,t,i,to.charInsert))}else r.decorations.push(eo(e.modifiedStartLineNumber,e.modifiedStartColumn,e.modifiedEndLineNumber,e.modifiedEndColumn,to.charInsert))}return r}}no.MINIMUM_EDITOR_WIDTH=100;class io extends Ji{constructor(e,t,n,i,o){super(e,t,n,i,o)}_createOriginalMarginDomNodeForModifiedForeignViewZoneInAddedRegion(){return null}_produceOriginalFromDiff(e,t,n){return n>t?{afterLineNumber:Math.max(e.originalStartLineNumber,e.originalEndLineNumber),heightInLines:n-t,domNode:null}:null}_produceModifiedFromDiff(e,t,n){return t>n?{afterLineNumber:Math.max(e.modifiedStartLineNumber,e.modifiedEndLineNumber),heightInLines:t-n,domNode:null}:null}}class oo extends Qi{constructor(e,t){super(e),this._decorationsLeft=e.getOriginalEditor().getLayoutInfo().decorationsLeft,this._register(e.getOriginalEditor().onDidLayoutChange((t=>{this._decorationsLeft!==t.decorationsLeft&&(this._decorationsLeft=t.decorationsLeft,e.relayoutEditors())})))}setEnableSplitViewResizing(e){}_getViewZones(e,t,n,i){const o=this._dataSource.getOriginalEditor(),r=this._dataSource.getModifiedEditor();return new ro(e,t,n,o,r,i).getViewZones()}_getOriginalEditorDecorations(e,t,n){const i=String(this._removeColor),o={decorations:[],overviewZones:[]},r=this._dataSource.getOriginalEditor(),s=r.getModel(),a=r._getViewModel();for(const t of e)if(lo(t)){o.decorations.push({range:new $.e(t.originalStartLineNumber,1,t.originalEndLineNumber,1073741824),options:to.lineDeleteMargin});const e=ho(s,a,t.originalStartLineNumber,t.originalEndLineNumber);o.overviewZones.push(new Mi.EY(e.startLineNumber,e.endLineNumber,i))}return o}_getModifiedEditorDecorations(e,t,n){const i=this._dataSource.getModifiedEditor(),o=String(this._insertColor),r={decorations:[],overviewZones:[]},s=i.getModel(),a=i._getViewModel();for(const i of e)if(ao(i)){r.decorations.push({range:new $.e(i.modifiedStartLineNumber,1,i.modifiedEndLineNumber,1073741824),options:n?to.lineInsertWithSign:to.lineInsert});const e=ho(s,a,i.modifiedStartLineNumber,i.modifiedEndLineNumber);if(r.overviewZones.push(new Mi.EY(e.startLineNumber,e.endLineNumber,o)),i.charChanges){for(const e of i.charChanges)if(ao(e))if(t)for(let t=e.modifiedStartLineNumber;t<=e.modifiedEndLineNumber;t++){let n,i;n=t===e.modifiedStartLineNumber?e.modifiedStartColumn:s.getLineFirstNonWhitespaceColumn(t),i=t===e.modifiedEndLineNumber?e.modifiedEndColumn:s.getLineLastNonWhitespaceColumn(t),r.decorations.push(eo(t,n,t,i,to.charInsert))}else r.decorations.push(eo(e.modifiedStartLineNumber,e.modifiedStartColumn,e.modifiedEndLineNumber,e.modifiedEndColumn,to.charInsert))}else r.decorations.push(eo(i.modifiedStartLineNumber,1,i.modifiedEndLineNumber,1073741824,to.charInsertWholeLine))}return r}layout(){return Math.max(5,this._decorationsLeft)}}class ro extends Ji{constructor(e,t,n,i,o,r){super(e,t,n,i,o),this._originalModel=i.getModel(),this._renderIndicators=r,this._pendingLineChange=[],this._pendingViewZones=[],this._lineBreaksComputer=this._modifiedEditor._getViewModel().createLineBreaksComputer()}getViewZones(){const e=super.getViewZones();return this._finalize(e),e}_createOriginalMarginDomNodeForModifiedForeignViewZoneInAddedRegion(){const e=document.createElement("div");return e.className="inline-added-margin-view-zone",e}_produceOriginalFromDiff(e,t,n){const i=document.createElement("div");return i.className="inline-added-margin-view-zone",{afterLineNumber:Math.max(e.originalStartLineNumber,e.originalEndLineNumber),heightInLines:n,domNode:document.createElement("div"),marginDomNode:i}}_produceModifiedFromDiff(e,t,n){const i=document.createElement("div");i.className=`view-lines line-delete ${ji.S}`;const o=document.createElement("div");o.className="inline-deleted-margin-view-zone";const r={shouldNotShrink:!0,afterLineNumber:0===e.modifiedEndLineNumber?e.modifiedStartLineNumber:e.modifiedStartLineNumber-1,heightInLines:t,minWidthInPx:0,domNode:i,marginDomNode:o,diff:{originalStartLineNumber:e.originalStartLineNumber,originalEndLineNumber:e.originalEndLineNumber,modifiedStartLineNumber:e.modifiedStartLineNumber,modifiedEndLineNumber:e.modifiedEndLineNumber,originalModel:this._originalModel,viewLineCounts:null}};for(let t=e.originalStartLineNumber;t<=e.originalEndLineNumber;t++)this._lineBreaksComputer.addRequest(this._originalModel.getLineContent(t),null,null);return this._pendingLineChange.push(e),this._pendingViewZones.push(r),r}_finalize(e){const t=this._modifiedEditor.getOptions(),n=this._modifiedEditor.getModel().getOptions().tabSize,i=t.get(41),o=t.get(27),r=i.typicalHalfwidthCharacterWidth,s=t.get(92),a=this._originalModel.mightContainNonBasicASCII(),l=this._originalModel.mightContainRTL(),d=t.get(57),c=t.get(129).decorationsWidth,h=t.get(104),u=t.get(87),g=t.get(81),p=t.get(42),m=this._lineBreaksComputer.finalize();let f=0;for(let t=0;t0,A=(0,Di.l$)(1e4);let S=0,x=0,k=null;for(let t=_.originalStartLineNumber;t<=_.originalEndLineNumber;t++){const r=t-_.originalStartLineNumber,s=this._originalModel.getLineTokens(t),C=s.getLineContent(),L=m[f++],E=Ti.Kp.filter(w,t,1,C.length+1);if(L){let m=0;for(const e of L.breakOffsets){const t=s.sliceAndInflate(m,e,0),r=C.substring(m,e);S=Math.max(S,this._renderOriginalLine(x++,r,t,Ti.Kp.extractWrapped(E,m,e),y,a,l,i,o,d,c,h,u,g,p,n,A,v)),m=e}for(k||(k=[]);k.lengthe.afterLineNumber-t.afterLineNumber))}_renderOriginalLine(e,t,n,i,o,r,s,a,l,d,c,h,u,g,p,m,f,_){f.appendASCIIString('
    ');const b=Wt.wA.isBasicASCII(t,r),C=Wt.wA.containsRTL(t,b,s),v=(0,Ft.d1)(new Ft.IJ(a.isMonospace&&!l,a.canUseHalfwidthRightwardsArrow,t,!1,b,C,0,n,i,m,0,a.spaceWidth,a.middotWidth,a.wsmiddotWidth,h,u,g,p!==F.n0.OFF,null),f);if(f.appendASCIIString("
    "),this._renderIndicators){const t=document.createElement("div");t.className=`delete-sign ${bi.kS.asClassName(qi)}`,t.setAttribute("style",`position:absolute;top:${e*d}px;width:${c}px;height:${d}px;right:0;`),_.appendChild(t)}return v.characterMapping.getAbsoluteOffset(v.characterMapping.length)}}function so(e,t){return(0,F.NY)(e,t,["off","on","inherit"])}function ao(e){return e.modifiedEndLineNumber>0}function lo(e){return e.originalEndLineNumber>0}function co(){const e=document.createElement("div");return e.className="diagonal-fill",e}function ho(e,t,n,i){const o=e.getLineCount();return n=Math.min(o,Math.max(1,n)),i=Math.min(o,Math.max(1,i)),t.coordinatesConverter.convertModelRangeToViewRange(new $.e(n,e.getLineMinColumn(n),i,e.getLineMaxColumn(i)))}(0,bi.Ic)(((e,t)=>{const n=e.getColor(_i.yp);n&&(t.addRule(`.monaco-editor .line-insert, .monaco-editor .char-insert { background-color: ${n}; }`),t.addRule(`.monaco-diff-editor .line-insert, .monaco-diff-editor .char-insert { background-color: ${n}; }`),t.addRule(`.monaco-editor .inline-added-margin-view-zone { background-color: ${n}; }`));const i=e.getColor(_i.P4);i&&(t.addRule(`.monaco-editor .line-delete, .monaco-editor .char-delete { background-color: ${i}; }`),t.addRule(`.monaco-diff-editor .line-delete, .monaco-diff-editor .char-delete { background-color: ${i}; }`),t.addRule(`.monaco-editor .inline-deleted-margin-view-zone { background-color: ${i}; }`));const o=e.getColor(_i.XL);o&&t.addRule(`.monaco-editor .line-insert, .monaco-editor .char-insert { border: 1px ${"hc"===e.type?"dashed":"solid"} ${o}; }`);const r=e.getColor(_i.mH);r&&t.addRule(`.monaco-editor .line-delete, .monaco-editor .char-delete { border: 1px ${"hc"===e.type?"dashed":"solid"} ${r}; }`);const s=e.getColor(_i._w);s&&t.addRule(`.monaco-diff-editor.side-by-side .editor.modified { box-shadow: -6px 0 5px -5px ${s}; }`);const a=e.getColor(_i.LL);a&&t.addRule(`.monaco-diff-editor.side-by-side .editor.modified { border-left: 1px solid ${a}; }`);const l=e.getColor(_i.et);l&&t.addRule(`\n\t\t\t.monaco-diff-editor .diffViewport {\n\t\t\t\tbackground: ${l};\n\t\t\t}\n\t\t`);const d=e.getColor(_i.AB);d&&t.addRule(`\n\t\t\t.monaco-diff-editor .diffViewport:hover {\n\t\t\t\tbackground: ${d};\n\t\t\t}\n\t\t`);const c=e.getColor(_i.yn);c&&t.addRule(`\n\t\t\t.monaco-diff-editor .diffViewport:active {\n\t\t\t\tbackground: ${c};\n\t\t\t}\n\t\t`);const h=e.getColor(_i.L_);t.addRule(`\n\t.monaco-editor .diagonal-fill {\n\t\tbackground-image: linear-gradient(\n\t\t\t-45deg,\n\t\t\t${h} 12.5%,\n\t\t\t#0000 12.5%, #0000 50%,\n\t\t\t${h} 50%, ${h} 62.5%,\n\t\t\t#0000 62.5%, #0000 100%\n\t\t);\n\t\tbackground-size: 8px 8px;\n\t}\n\t`)}));var uo=n(653),go=n(2095),po=n(4144),mo=n(1847),fo=n(1106);class _o extends ke.JT{constructor(){super(),this._onCodeEditorAdd=this._register(new z.Q5),this.onCodeEditorAdd=this._onCodeEditorAdd.event,this._onCodeEditorRemove=this._register(new z.Q5),this.onCodeEditorRemove=this._onCodeEditorRemove.event,this._onDiffEditorAdd=this._register(new z.Q5),this._onDiffEditorRemove=this._register(new z.Q5),this._onDecorationTypeRegistered=this._register(new z.Q5),this._modelProperties=new Map,this._codeEditors=Object.create(null),this._diffEditors=Object.create(null)}addCodeEditor(e){this._codeEditors[e.getId()]=e,this._onCodeEditorAdd.fire(e)}removeCodeEditor(e){delete this._codeEditors[e.getId()]&&this._onCodeEditorRemove.fire(e)}listCodeEditors(){return Object.keys(this._codeEditors).map((e=>this._codeEditors[e]))}addDiffEditor(e){this._diffEditors[e.getId()]=e,this._onDiffEditorAdd.fire(e)}removeDiffEditor(e){delete this._diffEditors[e.getId()]&&this._onDiffEditorRemove.fire(e)}listDiffEditors(){return Object.keys(this._diffEditors).map((e=>this._diffEditors[e]))}getFocusedCodeEditor(){let e=null;const t=this.listCodeEditors();for(const n of t){if(n.hasTextFocus())return n;n.hasWidgetFocus()&&(e=n)}return e}setModelProperty(e,t,n){const i=e.toString();let o;this._modelProperties.has(i)?o=this._modelProperties.get(i):(o=new Map,this._modelProperties.set(i,o)),o.set(t,n)}getModelProperty(e,t){const n=e.toString();if(this._modelProperties.has(n))return this._modelProperties.get(n).get(t)}}class bo{constructor(e,t,n){this._parent=e,this._editorId=t,this._styleSheet=n,this._refCount=0}ref(){this._refCount++}unref(){var e;this._refCount--,0===this._refCount&&(null===(e=this._styleSheet.parentNode)||void 0===e||e.removeChild(this._styleSheet),this._parent._removeEditorStyleSheets(this._editorId))}insertRule(e,t){this._styleSheet.sheet.insertRule(e,t)}removeRulesContainingSelector(e){he.uN(e,this._styleSheet)}}class Co{constructor(e){this._styleSheet=e}ref(){}unref(){}insertRule(e,t){this._styleSheet.sheet.insertRule(e,t)}removeRulesContainingSelector(e){he.uN(e,this._styleSheet)}}let vo=class extends _o{constructor(e,t){super(),this._decorationOptionProviders=new Map,this._editorStyleSheets=new Map,this._globalStyleSheet=e||null,this._themeService=t}_getOrCreateGlobalStyleSheet(){return this._globalStyleSheet||(this._globalStyleSheet=new Co(he.dS())),this._globalStyleSheet}_getOrCreateStyleSheet(e){if(!e)return this._getOrCreateGlobalStyleSheet();const t=e.getContainerDomNode();if(!he.OO(t))return this._getOrCreateGlobalStyleSheet();const n=e.getId();if(!this._editorStyleSheets.has(n)){const e=new bo(this,n,he.dS(t));this._editorStyleSheets.set(n,e)}return this._editorStyleSheets.get(n)}_removeEditorStyleSheets(e){this._editorStyleSheets.delete(e)}registerDecorationType(e,t,n,i,o){let r=this._decorationOptionProviders.get(t);if(!r){const s=this._getOrCreateStyleSheet(o),a={styleSheet:s,key:t,parentTypeKey:i,options:n||Object.create(null)};r=i?new Ao(this._themeService,s,a):new So(e,this._themeService,s,a),this._decorationOptionProviders.set(t,r),this._onDecorationTypeRegistered.fire(t)}r.refCount++}removeDecorationType(e){const t=this._decorationOptionProviders.get(e);t&&(t.refCount--,t.refCount<=0&&(this._decorationOptionProviders.delete(e),t.dispose(),this.listCodeEditors().forEach((t=>t.removeDecorations(e)))))}resolveDecorationOptions(e,t){const n=this._decorationOptionProviders.get(e);if(!n)throw new Error("Unknown decoration type key: "+e);return n.getOptions(this,t)}};var wo,yo;vo=function(e,t,n,i){var o,r=arguments.length,s=r<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,i);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,n,s):o(t,n))||s);return r>3&&s&&Object.defineProperty(t,n,s),s}([(wo=1,yo=bi.XE,function(e,t){yo(e,t,wo)})],vo);class Ao{constructor(e,t,n){this._styleSheet=t,this._styleSheet.ref(),this._parentTypeKey=n.parentTypeKey,this.refCount=0,this._beforeContentRules=new ko(3,n,e),this._afterContentRules=new ko(4,n,e)}getOptions(e,t){const n=e.resolveDecorationOptions(this._parentTypeKey,!0);return this._beforeContentRules&&(n.beforeContentClassName=this._beforeContentRules.className),this._afterContentRules&&(n.afterContentClassName=this._afterContentRules.className),n}dispose(){this._beforeContentRules&&(this._beforeContentRules.dispose(),this._beforeContentRules=null),this._afterContentRules&&(this._afterContentRules.dispose(),this._afterContentRules=null),this._styleSheet.unref()}}class So{constructor(e,t,n,i){this._disposables=new ke.SL,this.description=e,this._styleSheet=n,this._styleSheet.ref(),this.refCount=0;const o=e=>{const n=new ko(e,i,t);if(this._disposables.add(n),n.hasContent)return n.className},r=e=>{const n=new ko(e,i,t);return this._disposables.add(n),n.hasContent?{className:n.className,hasLetterSpacing:n.hasLetterSpacing}:null};this.className=o(0);const s=r(1);if(s&&(this.inlineClassName=s.className,this.inlineClassNameAffectsLetterSpacing=s.hasLetterSpacing),this.beforeContentClassName=o(3),this.afterContentClassName=o(4),i.options.beforeInjectedText&&i.options.beforeInjectedText.contentText){const e=r(5);this.beforeInjectedText={content:i.options.beforeInjectedText.contentText,inlineClassName:null==e?void 0:e.className,inlineClassNameAffectsLetterSpacing:(null==e?void 0:e.hasLetterSpacing)||i.options.beforeInjectedText.affectsLetterSpacing}}if(i.options.afterInjectedText&&i.options.afterInjectedText.contentText){const e=r(6);this.afterInjectedText={content:i.options.afterInjectedText.contentText,inlineClassName:null==e?void 0:e.className,inlineClassNameAffectsLetterSpacing:(null==e?void 0:e.hasLetterSpacing)||i.options.afterInjectedText.affectsLetterSpacing}}this.glyphMarginClassName=o(2);const a=i.options;this.isWholeLine=Boolean(a.isWholeLine),this.stickiness=a.rangeBehavior;const l=a.light&&a.light.overviewRulerColor||a.overviewRulerColor,d=a.dark&&a.dark.overviewRulerColor||a.overviewRulerColor;void 0===l&&void 0===d||(this.overviewRuler={color:l||d,darkColor:d||l,position:a.overviewRulerLane||Me.sh.Center})}getOptions(e,t){return t?{description:this.description,inlineClassName:this.inlineClassName,beforeContentClassName:this.beforeContentClassName,afterContentClassName:this.afterContentClassName,className:this.className,glyphMarginClassName:this.glyphMarginClassName,isWholeLine:this.isWholeLine,overviewRuler:this.overviewRuler,stickiness:this.stickiness,before:this.beforeInjectedText}:this}dispose(){this._disposables.dispose(),this._styleSheet.unref()}}const xo={color:"color:{0} !important;",opacity:"opacity:{0};",backgroundColor:"background-color:{0};",outline:"outline:{0};",outlineColor:"outline-color:{0};",outlineStyle:"outline-style:{0};",outlineWidth:"outline-width:{0};",border:"border:{0};",borderColor:"border-color:{0};",borderRadius:"border-radius:{0};",borderSpacing:"border-spacing:{0};",borderStyle:"border-style:{0};",borderWidth:"border-width:{0};",fontStyle:"font-style:{0};",fontWeight:"font-weight:{0};",fontSize:"font-size:{0};",fontFamily:"font-family:{0};",textDecoration:"text-decoration:{0};",cursor:"cursor:{0};",letterSpacing:"letter-spacing:{0};",gutterIconPath:"background:{0} center center no-repeat;",gutterIconSize:"background-size:{0};",contentText:"content:'{0}';",contentIconPath:"content:{0};",margin:"margin:{0};",padding:"padding:{0};",width:"width:{0};",height:"height:{0};"};class ko{constructor(e,t,n){this._theme=n.getColorTheme(),this._ruleType=e,this._providerArgs=t,this._usesThemeColors=!1,this._hasContent=!1,this._hasLetterSpacing=!1;let i=Lo.getClassName(this._providerArgs.key,e);this._providerArgs.parentTypeKey&&(i=i+" "+Lo.getClassName(this._providerArgs.parentTypeKey,e)),this._className=i,this._unThemedSelector=Lo.getSelector(this._providerArgs.key,this._providerArgs.parentTypeKey,e),this._buildCSS(),this._usesThemeColors?this._themeListener=n.onDidColorThemeChange((e=>{this._theme=n.getColorTheme(),this._removeCSS(),this._buildCSS()})):this._themeListener=null}dispose(){this._hasContent&&(this._removeCSS(),this._hasContent=!1),this._themeListener&&(this._themeListener.dispose(),this._themeListener=null)}get hasContent(){return this._hasContent}get hasLetterSpacing(){return this._hasLetterSpacing}get className(){return this._className}_buildCSS(){const e=this._providerArgs.options;let t,n,i;switch(this._ruleType){case 0:t=this.getCSSTextForModelDecorationClassName(e),n=this.getCSSTextForModelDecorationClassName(e.light),i=this.getCSSTextForModelDecorationClassName(e.dark);break;case 1:t=this.getCSSTextForModelDecorationInlineClassName(e),n=this.getCSSTextForModelDecorationInlineClassName(e.light),i=this.getCSSTextForModelDecorationInlineClassName(e.dark);break;case 2:t=this.getCSSTextForModelDecorationGlyphMarginClassName(e),n=this.getCSSTextForModelDecorationGlyphMarginClassName(e.light),i=this.getCSSTextForModelDecorationGlyphMarginClassName(e.dark);break;case 3:t=this.getCSSTextForModelDecorationContentClassName(e.before),n=this.getCSSTextForModelDecorationContentClassName(e.light&&e.light.before),i=this.getCSSTextForModelDecorationContentClassName(e.dark&&e.dark.before);break;case 4:t=this.getCSSTextForModelDecorationContentClassName(e.after),n=this.getCSSTextForModelDecorationContentClassName(e.light&&e.light.after),i=this.getCSSTextForModelDecorationContentClassName(e.dark&&e.dark.after);break;case 5:t=this.getCSSTextForModelDecorationContentClassName(e.beforeInjectedText),n=this.getCSSTextForModelDecorationContentClassName(e.light&&e.light.beforeInjectedText),i=this.getCSSTextForModelDecorationContentClassName(e.dark&&e.dark.beforeInjectedText);break;case 6:t=this.getCSSTextForModelDecorationContentClassName(e.afterInjectedText),n=this.getCSSTextForModelDecorationContentClassName(e.light&&e.light.afterInjectedText),i=this.getCSSTextForModelDecorationContentClassName(e.dark&&e.dark.afterInjectedText);break;default:throw new Error("Unknown rule type: "+this._ruleType)}const o=this._providerArgs.styleSheet;let r=!1;t.length>0&&(o.insertRule(`${this._unThemedSelector} {${t}}`,0),r=!0),n.length>0&&(o.insertRule(`.vs${this._unThemedSelector} {${n}}`,0),r=!0),i.length>0&&(o.insertRule(`.vs-dark${this._unThemedSelector}, .hc-black${this._unThemedSelector} {${i}}`,0),r=!0),this._hasContent=r}_removeCSS(){this._providerArgs.styleSheet.removeRulesContainingSelector(this._unThemedSelector)}getCSSTextForModelDecorationClassName(e){if(!e)return"";const t=[];return this.collectCSSText(e,["backgroundColor"],t),this.collectCSSText(e,["outline","outlineColor","outlineStyle","outlineWidth"],t),this.collectBorderSettingsCSSText(e,t),t.join("")}getCSSTextForModelDecorationInlineClassName(e){if(!e)return"";const t=[];return this.collectCSSText(e,["fontStyle","fontWeight","textDecoration","cursor","color","opacity","letterSpacing"],t),e.letterSpacing&&(this._hasLetterSpacing=!0),t.join("")}getCSSTextForModelDecorationContentClassName(e){if(!e)return"";const t=[];if(void 0!==e){if(this.collectBorderSettingsCSSText(e,t),void 0!==e.contentIconPath&&t.push(Xe.WU(xo.contentIconPath,he.wY(H.o.revive(e.contentIconPath)))),"string"==typeof e.contentText){const n=e.contentText.match(/^.*$/m)[0].replace(/['\\]/g,"\\$&");t.push(Xe.WU(xo.contentText,n))}this.collectCSSText(e,["fontStyle","fontWeight","fontSize","fontFamily","textDecoration","color","opacity","backgroundColor","margin","padding"],t),this.collectCSSText(e,["width","height"],t)&&t.push("display:inline-block;")}return t.join("")}getCSSTextForModelDecorationGlyphMarginClassName(e){if(!e)return"";const t=[];return void 0!==e.gutterIconPath&&(t.push(Xe.WU(xo.gutterIconPath,he.wY(H.o.revive(e.gutterIconPath)))),void 0!==e.gutterIconSize&&t.push(Xe.WU(xo.gutterIconSize,e.gutterIconSize))),t.join("")}collectBorderSettingsCSSText(e,t){return!!this.collectCSSText(e,["border","borderColor","borderRadius","borderSpacing","borderStyle","borderWidth"],t)&&(t.push(Xe.WU("box-sizing: border-box;")),!0)}collectCSSText(e,t,n){const i=n.length;for(let i of t){const t=this.resolveValue(e[i]);"string"==typeof t&&n.push(Xe.WU(xo[i],t))}return n.length!==i}resolveValue(e){if((0,Ie.I)(e)){this._usesThemeColors=!0;const t=this._theme.getColor(e.id);return t?t.toString():"transparent"}return e}}class Lo{static getClassName(e,t){return"ced-"+e+"-"+t}static getSelector(e,t,n){let i=".monaco-editor ."+this.getClassName(e,n);return t&&(i=i+"."+this.getClassName(t,n)),3===n?i+="::before":4===n&&(i+="::after"),i}}var Eo=function(e,t){return function(n,i){t(n,i,e)}};let No=class extends vo{constructor(e,t,n){super(e,n),this.onCodeEditorAdd((()=>this._checkContextKey())),this.onCodeEditorRemove((()=>this._checkContextKey())),this._editorIsOpen=t.createKey("editorIsOpen",!1),this._activeCodeEditor=null}_checkContextKey(){let e=!1;for(const t of this.listCodeEditors())if(!t.isSimpleWidget){e=!0;break}this._editorIsOpen.set(e)}setActiveCodeEditor(e){this._activeCodeEditor=e}getActiveCodeEditor(){return this._activeCodeEditor}openCodeEditor(e,t,n){return t?Promise.resolve(this.doOpenEditor(t,e)):Promise.resolve(null)}doOpenEditor(e,t){if(!this.findModel(e,t.resource)){if(t.resource){const n=t.resource.scheme;if(n===me.lg.http||n===me.lg.https)return(0,he.V3)(t.resource.toString()),e}return null}const n=t.options?t.options.selection:null;if(n)if("number"==typeof n.endLineNumber&&"number"==typeof n.endColumn)e.setSelection(n),e.revealRangeInCenter(n,1);else{const t={lineNumber:n.startLineNumber,column:n.startColumn};e.setPosition(t),e.revealPositionInCenter(t,1)}return e}findModel(e,t){const n=e.getModel();return n&&n.uri.toString()!==t.toString()?null:n}};No=function(e,t,n,i){var o,r=arguments.length,s=r<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,i);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,n,s):o(t,n))||s);return r>3&&s&&Object.defineProperty(t,n,s),s}([Eo(1,fi.i6),Eo(2,bi.XE)],No);var Do=n(1170),Io=function(e,t,n,i){var o,r=arguments.length,s=r<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,i);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,n,s):o(t,n))||s);return r>3&&s&&Object.defineProperty(t,n,s),s},Mo=function(e,t){return function(n,i){t(n,i,e)}};let To=0,Ro=!1,Oo=class extends ti.Gm{constructor(e,t,n,i,o,r,s,a,l,d){const c=Object.assign({},t);c.ariaLabel=c.ariaLabel||Tn.B8.editorViewAccessibleLabel,c.ariaLabel=c.ariaLabel+";"+Tn.B8.accessibilityHelpMessage,super(e,c,{},n,i,o,r,a,l,d),this._standaloneKeybindingService=s instanceof jn?s:null,Ro||(Ro=!0,ei.wW(document.body))}addCommand(e,t,n){if(!this._standaloneKeybindingService)return console.warn("Cannot add command because the editor is configured with an unrecognized KeybindingService"),null;let i="DYNAMIC_"+ ++To,o=fi.Ao.deserialize(n);return this._standaloneKeybindingService.addDynamicKeybinding(i,e,t,o),i}createContextKey(e,t){return this._contextKeyService.createKey(e,t)}addAction(e){if("string"!=typeof e.id||"string"!=typeof e.label||"function"!=typeof e.run)throw new Error("Invalid action descriptor, `id`, `label` and `run` are required properties!");if(!this._standaloneKeybindingService)return console.warn("Cannot add keybinding because the editor is configured with an unrecognized KeybindingService"),ke.JT.None;const t=e.id,n=e.label,i=fi.Ao.and(fi.Ao.equals("editorId",this.getId()),fi.Ao.deserialize(e.precondition)),o=e.keybindings,r=fi.Ao.and(i,fi.Ao.deserialize(e.keybindingContext)),s=e.contextMenuGroupId||null,a=e.contextMenuOrder||0,l=(t,...n)=>Promise.resolve(e.run(this,...n)),d=new ke.SL,c=this.getId()+":"+t;if(d.add(_e.P.registerCommand(c,l)),s){let e={command:{id:c,title:n},when:i,group:s,order:a};d.add(po.BH.appendMenuItem(po.eH.EditorContext,e))}if(Array.isArray(o))for(const e of o)d.add(this._standaloneKeybindingService.addDynamicKeybinding(c,e,l,r));let h=new uo.p(c,n,n,i,l,this._contextKeyService);return this._actions[t]=h,d.add((0,ke.OF)((()=>{delete this._actions[t]}))),d}_triggerCommand(e,t){if(this._codeEditorService instanceof No)try{this._codeEditorService.setActiveCodeEditor(this),super._triggerCommand(e,t)}finally{this._codeEditorService.setActiveCodeEditor(null)}else super._triggerCommand(e,t)}};Oo=Io([Mo(2,Ri.TG),Mo(3,ce.$),Mo(4,_e.H),Mo(5,fi.i6),Mo(6,mo.d),Mo(7,bi.XE),Mo(8,In.lT),Mo(9,fo.F)],Oo);let Bo=class extends Oo{constructor(e,t,n,i,o,r,s,a,l,d,c,h,u,g,p){const m=Object.assign({},t);Gn(h,m,!1);const f=d.registerEditorContainer(e);"string"==typeof m.theme&&d.setTheme(m.theme),void 0!==m.autoDetectHighContrast&&d.setAutoDetectHighContrast(Boolean(m.autoDetectHighContrast));let _,b=m.model;if(delete m.model,super(e,m,i,o,r,s,a,d,c,u),this._contextViewService=l,this._configurationService=h,this._standaloneThemeService=d,this._register(n),this._register(f),void 0===b?(_=Fo(g,p,m.value||"",m.language||Do.vW.text,void 0),this._ownsModel=!0):(_=b,this._ownsModel=!1),this._attachModel(_),_){let e={oldModelUrl:null,newModelUrl:_.uri};this._onDidChangeModel.fire(e)}}dispose(){super.dispose()}updateOptions(e){Gn(this._configurationService,e,!1),"string"==typeof e.theme&&this._standaloneThemeService.setTheme(e.theme),void 0!==e.autoDetectHighContrast&&this._standaloneThemeService.setAutoDetectHighContrast(Boolean(e.autoDetectHighContrast)),super.updateOptions(e)}_attachModel(e){super._attachModel(e),this._modelData&&this._contextViewService.setContainer(this._modelData.view.domNode.domNode)}_postDetachModelCleanup(e){super._postDetachModelCleanup(e),e&&this._ownsModel&&(e.dispose(),this._ownsModel=!1)}};Bo=Io([Mo(3,Ri.TG),Mo(4,ce.$),Mo(5,_e.H),Mo(6,fi.i6),Mo(7,mo.d),Mo(8,Bi.u),Mo(9,go.Z),Mo(10,In.lT),Mo(11,pn.Ui),Mo(12,fo.F),Mo(13,wt.q),Mo(14,Be.h)],Bo);let Po=class extends Gi{constructor(e,t,n,i,o,r,s,a,l,d,c,h,u,g,p){const m=Object.assign({},t);Gn(h,m,!0);const f=d.registerEditorContainer(e);"string"==typeof m.theme&&d.setTheme(m.theme),void 0!==m.autoDetectHighContrast&&d.setAutoDetectHighContrast(Boolean(m.autoDetectHighContrast)),super(e,m,{},p,a,o,i,l,d,c,u,g),this._contextViewService=s,this._configurationService=h,this._standaloneThemeService=d,this._register(n),this._register(f),this._contextViewService.setContainer(this._containerDomElement)}dispose(){super.dispose()}updateOptions(e){Gn(this._configurationService,e,!0),"string"==typeof e.theme&&this._standaloneThemeService.setTheme(e.theme),void 0!==e.autoDetectHighContrast&&this._standaloneThemeService.setAutoDetectHighContrast(Boolean(e.autoDetectHighContrast)),super.updateOptions(e)}_createInnerEditor(e,t,n){return e.createInstance(Oo,t,n)}getOriginalEditor(){return super.getOriginalEditor()}getModifiedEditor(){return super.getModifiedEditor()}addCommand(e,t,n){return this.getModifiedEditor().addCommand(e,t,n)}createContextKey(e,t){return this.getModifiedEditor().createContextKey(e,t)}addAction(e){return this.getModifiedEditor().addAction(e)}};function Fo(e,t,n,i,o){if(n=n||"",!i){const i=n.indexOf("\n");let r=n;return-1!==i&&(r=n.substring(0,i)),Wo(e,n,t.createByFilepathOrFirstLine(o||null,r),o)}return Wo(e,n,t.create(i),o)}function Wo(e,t,n,i){return e.createModel(t,n,i)}Po=Io([Mo(3,Ri.TG),Mo(4,fi.i6),Mo(5,mo.d),Mo(6,Bi.u),Mo(7,Oe.p),Mo(8,ce.$),Mo(9,go.Z),Mo(10,In.lT),Mo(11,pn.Ui),Mo(12,Bi.i),Mo(13,Vi.e),Mo(14,zi.p)],Po);class zo{constructor(e){this._languageIdentifier=e}getId(){return this._languageIdentifier.language}}var Vo=n(1144),Ho=n(9872);const jo=Object.prototype.hasOwnProperty;class $o extends ke.JT{constructor(e=!0,t=!1){super(),this._onDidChange=this._register(new z.Q5),this.onDidChange=this._onDidChange.event,this._warnOnOverwrite=t,this._nextLanguageId2=1,this._languageIdToLanguage=[],this._languageToLanguageId=Object.create(null),this._languages={},this._mimeTypesMap={},this._nameMap={},this._lowercaseNameMap={},e&&(this._initializeFromRegistry(),this._register(Vo.dQ.onDidChangeLanguages((e=>this._initializeFromRegistry()))))}_initializeFromRegistry(){this._languages={},this._mimeTypesMap={},this._nameMap={},this._lowercaseNameMap={};const e=Vo.dQ.getLanguages();this._registerLanguages(e)}_registerLanguages(e){for(const t of e)this._registerLanguage(t);this._mimeTypesMap={},this._nameMap={},this._lowercaseNameMap={},Object.keys(this._languages).forEach((e=>{let t=this._languages[e];t.name&&(this._nameMap[t.name]=t.identifier),t.aliases.forEach((e=>{this._lowercaseNameMap[e.toLowerCase()]=t.identifier})),t.mimetypes.forEach((e=>{this._mimeTypesMap[e]=t.identifier}))})),Ho.B.as(mn.IP.Configuration).registerOverrideIdentifiers(Vo.dQ.getLanguages().map((e=>e.id))),this._onDidChange.fire()}_getLanguageId(e){if(this._languageToLanguageId[e])return this._languageToLanguageId[e];const t=this._nextLanguageId2++;return this._languageIdToLanguage[t]=e,this._languageToLanguageId[e]=t,t}_registerLanguage(e){const t=e.id;let n;if(jo.call(this._languages,t))n=this._languages[t];else{const e=this._getLanguageId(t);n={identifier:new Te.rl(t,e),name:null,mimetypes:[],aliases:[],extensions:[],filenames:[],configurationFiles:[]},this._languages[t]=n}this._mergeLanguage(n,e)}_mergeLanguage(e,t){const n=t.id;let i=null;if(Array.isArray(t.mimetypes)&&t.mimetypes.length>0&&(e.mimetypes.push(...t.mimetypes),i=t.mimetypes[0]),i||(i=`text/x-${n}`,e.mimetypes.push(i)),Array.isArray(t.extensions)){t.configuration?e.extensions=t.extensions.concat(e.extensions):e.extensions=e.extensions.concat(t.extensions);for(let e of t.extensions)Do.sA({id:n,mime:i,extension:e},this._warnOnOverwrite)}if(Array.isArray(t.filenames))for(let o of t.filenames)Do.sA({id:n,mime:i,filename:o},this._warnOnOverwrite),e.filenames.push(o);if(Array.isArray(t.filenamePatterns))for(let e of t.filenamePatterns)Do.sA({id:n,mime:i,filepattern:e},this._warnOnOverwrite);if("string"==typeof t.firstLine&&t.firstLine.length>0){let e=t.firstLine;"^"!==e.charAt(0)&&(e="^"+e);try{let t=new RegExp(e);Xe.IO(t)||Do.sA({id:n,mime:i,firstline:t},this._warnOnOverwrite)}catch(e){(0,We.dL)(e)}}e.aliases.push(n);let o=null;if(void 0!==t.aliases&&Array.isArray(t.aliases)&&(o=0===t.aliases.length?[null]:t.aliases),null!==o)for(const t of o)t&&0!==t.length&&e.aliases.push(t);let r=null!==o&&o.length>0;if(r&&null===o[0]);else{let t=(r?o[0]:null)||n;!r&&e.name||(e.name=t)}t.configuration&&e.configurationFiles.push(t.configuration)}isRegisteredMode(e){return!!jo.call(this._mimeTypesMap,e)||jo.call(this._languages,e)}getModeIdForLanguageNameLowercase(e){return jo.call(this._lowercaseNameMap,e)?this._lowercaseNameMap[e].language:null}extractModeIds(e){return e?e.split(",").map((e=>e.trim())).map((e=>jo.call(this._mimeTypesMap,e)?this._mimeTypesMap[e].language:e)).filter((e=>jo.call(this._languages,e))):[]}getLanguageIdentifier(e){if(e===Re.TG||0===e)return Re.pA;let t;if("string"==typeof e)t=e;else if(t=this._languageIdToLanguage[e],!t)return null;return jo.call(this._languages,t)?this._languages[t].identifier:null}getModeIdsFromFilepathOrFirstLine(e,t){if(!e&&!t)return[];let n=Do.G8(e,t);return this.extractModeIds(n.join(","))}}class Uo{constructor(e,t){let n;this._selector=t,this.languageIdentifier=this._selector(),this._onDidChange=new z.Q5({onFirstListenerAdd:()=>{n=e((()=>this._evaluate()))},onLastListenerRemove:()=>{n.dispose()}}),this.onDidChange=this._onDidChange.event}_evaluate(){let e=this._selector();e.id!==this.languageIdentifier.id&&(this.languageIdentifier=e,this._onDidChange.fire(this.languageIdentifier))}}class Zo extends ke.JT{constructor(e=!1){super(),this._onDidCreateMode=this._register(new z.Q5),this.onDidCreateMode=this._onDidCreateMode.event,this._onLanguagesMaybeChanged=this._register(new z.Q5({leakWarningThreshold:200})),this.onLanguagesMaybeChanged=this._onLanguagesMaybeChanged.event,this._instantiatedModes={},this._registry=this._register(new $o(!0,e)),this._register(this._registry.onDidChange((()=>this._onLanguagesMaybeChanged.fire())))}isRegisteredMode(e){return this._registry.isRegisteredMode(e)}getModeIdForLanguageName(e){return this._registry.getModeIdForLanguageNameLowercase(e)}getModeIdByFilepathOrFirstLine(e,t){const n=this._registry.getModeIdsFromFilepathOrFirstLine(e,t);return(0,At.Xh)(n,null)}getModeId(e){const t=this._registry.extractModeIds(e);return(0,At.Xh)(t,null)}getLanguageIdentifier(e){return this._registry.getLanguageIdentifier(e)}create(e){return new Uo(this.onLanguagesMaybeChanged,(()=>{const t=this.getModeId(e);return this._createModeAndGetLanguageIdentifier(t)}))}createByFilepathOrFirstLine(e,t){return new Uo(this.onLanguagesMaybeChanged,(()=>{const n=this.getModeIdByFilepathOrFirstLine(e,t);return this._createModeAndGetLanguageIdentifier(n)}))}_createModeAndGetLanguageIdentifier(e){const t=this.getLanguageIdentifier(e||"plaintext")||Re.pA;return this._getOrCreateMode(t.language),t}triggerMode(e){const t=this.getModeId(e);this._getOrCreateMode(t||"plaintext")}_getOrCreateMode(e){if(!this._instantiatedModes.hasOwnProperty(e)){let t=this.getLanguageIdentifier(e)||Re.pA;this._instantiatedModes[e]=new zo(t),this._onDidCreateMode.fire(this._instantiatedModes[e])}return this._instantiatedModes[e]}}var Ko=n(7390),qo=n(1264);class Yo{constructor(e,t,n,i,o){this._parsedThemeRuleBrand=void 0,this.token=e,this.index=t,this.fontStyle=n,this.foreground=i,this.background=o}}const Go=/^#?([0-9A-Fa-f]{6})([0-9A-Fa-f]{2})?$/;class Qo{constructor(){this._lastColorId=0,this._id2color=[],this._color2id=new Map}getId(e){if(null===e)return 0;const t=e.match(Go);if(!t)throw new Error("Illegal value for token color: "+e);e=t[1].toUpperCase();let n=this._color2id.get(e);return n||(n=++this._lastColorId,this._color2id.set(e,n),this._id2color[n]=qo.Il.fromHex("#"+e),n)}getColorMap(){return this._id2color.slice(0)}}class Xo{constructor(e,t){this._colorMap=e,this._root=t,this._cache=new Map}static createFromRawTokenTheme(e,t){return this.createFromParsedTokenTheme(function(e){if(!e||!Array.isArray(e))return[];let t=[],n=0;for(let i=0,o=e.length;i{let n=function(e,t){return et?1:0}(e.token,t.token);return 0!==n?n:e.index-t.index}));let n=0,i="000000",o="ffffff";for(;e.length>=1&&""===e[0].token;){let t=e.shift();-1!==t.fontStyle&&(n=t.fontStyle),null!==t.foreground&&(i=t.foreground),null!==t.background&&(o=t.background)}let r=new Qo;for(let e of t)r.getId(e);let s=r.getId(i),a=r.getId(o),l=new er(n,s,a),d=new tr(l);for(let t=0,n=e.length;t>>0,this._cache.set(t,n)}return(n|e<<0)>>>0}}const Jo=/\b(comment|string|regex|regexp)\b/;class er{constructor(e,t,n){this._themeTrieElementRuleBrand=void 0,this._fontStyle=e,this._foreground=t,this._background=n,this.metadata=(this._fontStyle<<11|this._foreground<<14|this._background<<23)>>>0}clone(){return new er(this._fontStyle,this._foreground,this._background)}acceptOverwrite(e,t,n){-1!==e&&(this._fontStyle=e),0!==t&&(this._foreground=t),0!==n&&(this._background=n),this.metadata=(this._fontStyle<<11|this._foreground<<14|this._background<<23)>>>0}}class tr{constructor(e){this._themeTrieElementBrand=void 0,this._mainRule=e,this._children=new Map}match(e){if(""===e)return this._mainRule;let t,n,i=e.indexOf(".");-1===i?(t=e,n=""):(t=e.substring(0,i),n=e.substring(i+1));let o=this._children.get(t);return void 0!==o?o.match(n):this._mainRule}insert(e,t,n,i){if(""===e)return void this._mainRule.acceptOverwrite(t,n,i);let o,r,s=e.indexOf(".");-1===s?(o=e,r=""):(o=e.substring(0,s),r=e.substring(s+1));let a=this._children.get(o);void 0===a&&(a=new tr(this._mainRule.clone()),this._children.set(o,a)),a.insert(r,t,n,i)}}const nr={base:"vs",inherit:!1,rules:[{token:"",foreground:"000000",background:"fffffe"},{token:"invalid",foreground:"cd3131"},{token:"emphasis",fontStyle:"italic"},{token:"strong",fontStyle:"bold"},{token:"variable",foreground:"001188"},{token:"variable.predefined",foreground:"4864AA"},{token:"constant",foreground:"dd0000"},{token:"comment",foreground:"008000"},{token:"number",foreground:"098658"},{token:"number.hex",foreground:"3030c0"},{token:"regexp",foreground:"800000"},{token:"annotation",foreground:"808080"},{token:"type",foreground:"008080"},{token:"delimiter",foreground:"000000"},{token:"delimiter.html",foreground:"383838"},{token:"delimiter.xml",foreground:"0000FF"},{token:"tag",foreground:"800000"},{token:"tag.id.pug",foreground:"4F76AC"},{token:"tag.class.pug",foreground:"4F76AC"},{token:"meta.scss",foreground:"800000"},{token:"metatag",foreground:"e00000"},{token:"metatag.content.html",foreground:"FF0000"},{token:"metatag.html",foreground:"808080"},{token:"metatag.xml",foreground:"808080"},{token:"metatag.php",fontStyle:"bold"},{token:"key",foreground:"863B00"},{token:"string.key.json",foreground:"A31515"},{token:"string.value.json",foreground:"0451A5"},{token:"attribute.name",foreground:"FF0000"},{token:"attribute.value",foreground:"0451A5"},{token:"attribute.value.number",foreground:"098658"},{token:"attribute.value.unit",foreground:"098658"},{token:"attribute.value.html",foreground:"0000FF"},{token:"attribute.value.xml",foreground:"0000FF"},{token:"string",foreground:"A31515"},{token:"string.html",foreground:"0000FF"},{token:"string.sql",foreground:"FF0000"},{token:"string.yaml",foreground:"0451A5"},{token:"keyword",foreground:"0000FF"},{token:"keyword.json",foreground:"0451A5"},{token:"keyword.flow",foreground:"AF00DB"},{token:"keyword.flow.scss",foreground:"0000FF"},{token:"operator.scss",foreground:"666666"},{token:"operator.sql",foreground:"778899"},{token:"operator.swift",foreground:"666666"},{token:"predefined.sql",foreground:"C700C7"}],colors:{[_i.cv]:"#FFFFFE",[_i.NO]:"#000000",[_i.ES]:"#E5EBF1",[mi.tR]:"#D3D3D3",[mi.Ym]:"#939393",[_i.Rz]:"#ADD6FF4D"}},ir={base:"vs-dark",inherit:!1,rules:[{token:"",foreground:"D4D4D4",background:"1E1E1E"},{token:"invalid",foreground:"f44747"},{token:"emphasis",fontStyle:"italic"},{token:"strong",fontStyle:"bold"},{token:"variable",foreground:"74B0DF"},{token:"variable.predefined",foreground:"4864AA"},{token:"variable.parameter",foreground:"9CDCFE"},{token:"constant",foreground:"569CD6"},{token:"comment",foreground:"608B4E"},{token:"number",foreground:"B5CEA8"},{token:"number.hex",foreground:"5BB498"},{token:"regexp",foreground:"B46695"},{token:"annotation",foreground:"cc6666"},{token:"type",foreground:"3DC9B0"},{token:"delimiter",foreground:"DCDCDC"},{token:"delimiter.html",foreground:"808080"},{token:"delimiter.xml",foreground:"808080"},{token:"tag",foreground:"569CD6"},{token:"tag.id.pug",foreground:"4F76AC"},{token:"tag.class.pug",foreground:"4F76AC"},{token:"meta.scss",foreground:"A79873"},{token:"meta.tag",foreground:"CE9178"},{token:"metatag",foreground:"DD6A6F"},{token:"metatag.content.html",foreground:"9CDCFE"},{token:"metatag.html",foreground:"569CD6"},{token:"metatag.xml",foreground:"569CD6"},{token:"metatag.php",fontStyle:"bold"},{token:"key",foreground:"9CDCFE"},{token:"string.key.json",foreground:"9CDCFE"},{token:"string.value.json",foreground:"CE9178"},{token:"attribute.name",foreground:"9CDCFE"},{token:"attribute.value",foreground:"CE9178"},{token:"attribute.value.number.css",foreground:"B5CEA8"},{token:"attribute.value.unit.css",foreground:"B5CEA8"},{token:"attribute.value.hex.css",foreground:"D4D4D4"},{token:"string",foreground:"CE9178"},{token:"string.sql",foreground:"FF0000"},{token:"keyword",foreground:"569CD6"},{token:"keyword.flow",foreground:"C586C0"},{token:"keyword.json",foreground:"CE9178"},{token:"keyword.flow.scss",foreground:"569CD6"},{token:"operator.scss",foreground:"909090"},{token:"operator.sql",foreground:"778899"},{token:"operator.swift",foreground:"909090"},{token:"predefined.sql",foreground:"FF00FF"}],colors:{[_i.cv]:"#1E1E1E",[_i.NO]:"#D4D4D4",[_i.ES]:"#3A3D41",[mi.tR]:"#404040",[mi.Ym]:"#707070",[_i.Rz]:"#ADD6FF26"}},or={base:"hc-black",inherit:!1,rules:[{token:"",foreground:"FFFFFF",background:"000000"},{token:"invalid",foreground:"f44747"},{token:"emphasis",fontStyle:"italic"},{token:"strong",fontStyle:"bold"},{token:"variable",foreground:"1AEBFF"},{token:"variable.parameter",foreground:"9CDCFE"},{token:"constant",foreground:"569CD6"},{token:"comment",foreground:"608B4E"},{token:"number",foreground:"FFFFFF"},{token:"regexp",foreground:"C0C0C0"},{token:"annotation",foreground:"569CD6"},{token:"type",foreground:"3DC9B0"},{token:"delimiter",foreground:"FFFF00"},{token:"delimiter.html",foreground:"FFFF00"},{token:"tag",foreground:"569CD6"},{token:"tag.id.pug",foreground:"4F76AC"},{token:"tag.class.pug",foreground:"4F76AC"},{token:"meta",foreground:"D4D4D4"},{token:"meta.tag",foreground:"CE9178"},{token:"metatag",foreground:"569CD6"},{token:"metatag.content.html",foreground:"1AEBFF"},{token:"metatag.html",foreground:"569CD6"},{token:"metatag.xml",foreground:"569CD6"},{token:"metatag.php",fontStyle:"bold"},{token:"key",foreground:"9CDCFE"},{token:"string.key",foreground:"9CDCFE"},{token:"string.value",foreground:"CE9178"},{token:"attribute.name",foreground:"569CD6"},{token:"attribute.value",foreground:"3FF23F"},{token:"string",foreground:"CE9178"},{token:"string.sql",foreground:"FF0000"},{token:"keyword",foreground:"569CD6"},{token:"keyword.flow",foreground:"C586C0"},{token:"operator.sql",foreground:"778899"},{token:"operator.swift",foreground:"909090"},{token:"predefined.sql",foreground:"FF00FF"}],colors:{[_i.cv]:"#000000",[_i.NO]:"#FFFFFF",[mi.tR]:"#FFFFFF",[mi.Ym]:"#FFFFFF"}};var rr=n(2321);const sr="vs",ar="vs-dark",lr="hc-black",dr=Ho.B.as(_i.IP.ColorContribution),cr=Ho.B.as(bi.IP.ThemingContribution);class hr{constructor(e,t){this.semanticHighlighting=!1,this.themeData=t;let n=t.base;e.length>0?(ur(e)?this.id=e:this.id=n+" "+e,this.themeName=e):(this.id=n,this.themeName=n),this.colors=null,this.defaultColors=Object.create(null),this._tokenTheme=null}get base(){return this.themeData.base}notifyBaseUpdated(){this.themeData.inherit&&(this.colors=null,this._tokenTheme=null)}getColors(){if(!this.colors){const e=new Map;for(let t in this.themeData.colors)e.set(t,qo.Il.fromHex(this.themeData.colors[t]));if(this.themeData.inherit){let t=gr(this.themeData.base);for(let n in t.colors)e.has(n)||e.set(n,qo.Il.fromHex(t.colors[n]))}this.colors=e}return this.colors}getColor(e,t){return this.getColors().get(e)||(!1!==t?this.getDefault(e):void 0)}getDefault(e){let t=this.defaultColors[e];return t||(t=dr.resolveDefaultColor(e,this),this.defaultColors[e]=t,t)}defines(e){return Object.prototype.hasOwnProperty.call(this.getColors(),e)}get type(){switch(this.base){case sr:return rr.e.LIGHT;case lr:return rr.e.HIGH_CONTRAST;default:return rr.e.DARK}}get tokenTheme(){if(!this._tokenTheme){let e=[],t=[];if(this.themeData.inherit){let n=gr(this.themeData.base);e=n.rules,n.encodedTokensColors&&(t=n.encodedTokensColors)}e=e.concat(this.themeData.rules),this.themeData.encodedTokensColors&&(t=this.themeData.encodedTokensColors),this._tokenTheme=Xo.createFromRawTokenTheme(e,t)}return this._tokenTheme}getTokenStyleMetadata(e,t,n){const i=this.tokenTheme._match([e].concat(t).join(".")).metadata,o=Te.NX.getForeground(i),r=Te.NX.getFontStyle(i);return{foreground:o,italic:Boolean(1&r),bold:Boolean(2&r),underline:Boolean(4&r)}}}function ur(e){return e===sr||e===ar||e===lr}function gr(e){switch(e){case sr:return nr;case ar:return ir;case lr:return or}}function pr(e){let t=gr(e);return new hr(e,t)}class mr extends ke.JT{constructor(){super(),this._onColorThemeChange=this._register(new z.Q5),this.onDidColorThemeChange=this._onColorThemeChange.event,this._environment=Object.create(null),this._autoDetectHighContrast=!0,this._knownThemes=new Map,this._knownThemes.set(sr,pr(sr)),this._knownThemes.set(ar,pr(ar)),this._knownThemes.set(lr,pr(lr));const e=function(){const e=new z.Q5,t=(0,vi.Ks)();return t.onDidChange((()=>e.fire())),{onDidChange:e.event,getCSS(){const e={},n=n=>{let i=n.defaults;for(;bi.kS.isThemeIcon(i);){const e=t.getIcon(i.id);if(!e)return;i=e.defaults}const o=i.fontId;if(o){const r=t.getIconFont(o);if(r)return e[o]=r,`.codicon-${n.id}:before { content: '${i.fontCharacter}'; font-family: ${(0,he._h)(o)}; }`}return`.codicon-${n.id}:before { content: '${i.fontCharacter}'; }`},i=[];for(let e of t.getIcons()){const t=n(e);t&&i.push(t)}for(let t in e){const n=e[t].definition.src.map((e=>`${(0,he.wY)(e.location)} format('${e.format}')`)).join(", ");i.push(`@font-face { src: ${n}; font-family: ${(0,he._h)(t)}; }`)}return i.join("\n")}}}();this._codiconCSS=e.getCSS(),this._themeCSS="",this._allCSS=`${this._codiconCSS}\n${this._themeCSS}`,this._globalStyleElement=null,this._styleElements=[],this._colorMapOverride=null,this.setTheme(sr),e.onDidChange((()=>{this._codiconCSS=e.getCSS(),this._updateCSS()})),he.uB("(forced-colors: active)",(()=>{this._updateActualTheme()}))}registerEditorContainer(e){return he.OO(e)?this._registerShadowDomContainer(e):this._registerRegularEditorContainer()}_registerRegularEditorContainer(){return this._globalStyleElement||(this._globalStyleElement=he.dS(),this._globalStyleElement.className="monaco-colors",this._globalStyleElement.textContent=this._allCSS,this._styleElements.push(this._globalStyleElement)),ke.JT.None}_registerShadowDomContainer(e){const t=he.dS(e);return t.className="monaco-colors",t.textContent=this._allCSS,this._styleElements.push(t),{dispose:()=>{for(let e=0;e{t.base===e&&t.notifyBaseUpdated()})),this._theme.themeName===e&&this.setTheme(e)}getColorTheme(){return this._theme}setColorMapOverride(e){this._colorMapOverride=e,this._updateThemeOrColorMap()}setTheme(e){let t;t=this._knownThemes.has(e)?this._knownThemes.get(e):this._knownThemes.get(sr),this._desiredTheme=t,this._updateActualTheme()}_updateActualTheme(){const e=this._autoDetectHighContrast&&window.matchMedia("(forced-colors: active)").matches?this._knownThemes.get(lr):this._desiredTheme;this._theme!==e&&(this._theme=e,this._updateThemeOrColorMap())}setAutoDetectHighContrast(e){this._autoDetectHighContrast=e,this._updateActualTheme()}_updateThemeOrColorMap(){let e=[],t={},n={addRule:n=>{t[n]||(e.push(n),t[n]=!0)}};cr.getThemingParticipants().forEach((e=>e(this._theme,n,this._environment)));const i=this._colorMapOverride||this._theme.tokenTheme.getColorMap();n.addRule(function(e){let t=[];for(let n=1,i=e.length;ne.textContent=this._allCSS))}getFileIconTheme(){return{hasFileIcons:!1,hasFolderIcons:!1,hidesExplorerArrows:!1}}}var fr=n(3725);const _r="data-keybinding-context";class br{constructor(e,t){this._id=e,this._parent=t,this._value=Object.create(null),this._value._contextId=e}setValue(e,t){return this._value[e]!==t&&(this._value[e]=t,!0)}removeValue(e){return e in this._value&&(delete this._value[e],!0)}getValue(e){const t=this._value[e];return void 0===t&&this._parent?this._parent.getValue(e):t}}class Cr extends br{constructor(){super(-1,null)}setValue(e,t){return!1}removeValue(e){return!1}getValue(e){}}Cr.INSTANCE=new Cr;class vr extends br{constructor(e,t,n){super(e,null),this._configurationService=t,this._values=ge.Id.forConfigKeys(),this._listener=this._configurationService.onDidChangeConfiguration((e=>{if(6===e.source){const e=Array.from(fr.$.map(this._values,(([e])=>e)));this._values.clear(),n.fire(new Ar(e))}else{const t=[];for(const n of e.affectedKeys){const e=`config.${n}`,i=this._values.findSuperstr(e);void 0!==i&&(t.push(...fr.$.map(i,(([e])=>e))),this._values.deleteSuperstr(e)),this._values.has(e)&&(t.push(e),this._values.delete(e))}n.fire(new Ar(t))}}))}dispose(){this._listener.dispose()}getValue(e){if(0!==e.indexOf(vr._keyPrefix))return super.getValue(e);if(this._values.has(e))return this._values.get(e);const t=e.substr(vr._keyPrefix.length),n=this._configurationService.getValue(t);let i;switch(typeof n){case"number":case"boolean":case"string":i=n;break;default:i=Array.isArray(n)?JSON.stringify(n):n}return this._values.set(e,i),i}setValue(e,t){return super.setValue(e,t)}removeValue(e){return super.removeValue(e)}}vr._keyPrefix="config.";class wr{constructor(e,t,n){this._service=e,this._key=t,this._defaultValue=n,this.reset()}set(e){this._service.setContext(this._key,e)}reset(){void 0===this._defaultValue?this._service.removeContext(this._key):this._service.setContext(this._key,this._defaultValue)}get(){return this._service.getContextKeyValue(this._key)}}class yr{constructor(e){this.key=e}affectsSome(e){return e.has(this.key)}}class Ar{constructor(e){this.keys=e}affectsSome(e){for(const t of this.keys)if(e.has(t))return!0;return!1}}class Sr{constructor(e){this.events=e}affectsSome(e){for(const t of this.events)if(t.affectsSome(e))return!0;return!1}}class xr{constructor(e){this._onDidChangeContext=new z.K3({merge:e=>new Sr(e)}),this.onDidChangeContext=this._onDidChangeContext.event,this._isDisposed=!1,this._myContextId=e}createKey(e,t){if(this._isDisposed)throw new Error("AbstractContextKeyService has been disposed");return new wr(this,e,t)}bufferChangeEvents(e){this._onDidChangeContext.pause();try{e()}finally{this._onDidChangeContext.resume()}}createScoped(e){if(this._isDisposed)throw new Error("AbstractContextKeyService has been disposed");return new Lr(this,e)}contextMatchesRules(e){if(this._isDisposed)throw new Error("AbstractContextKeyService has been disposed");const t=this.getContextValuesContainer(this._myContextId);return yn.contextMatchesRules(t,e)}getContextKeyValue(e){if(!this._isDisposed)return this.getContextValuesContainer(this._myContextId).getValue(e)}setContext(e,t){if(this._isDisposed)return;const n=this.getContextValuesContainer(this._myContextId);n&&n.setValue(e,t)&&this._onDidChangeContext.fire(new yr(e))}removeContext(e){this._isDisposed||this.getContextValuesContainer(this._myContextId).removeValue(e)&&this._onDidChangeContext.fire(new yr(e))}getContext(e){return this._isDisposed?Cr.INSTANCE:this.getContextValuesContainer(function(e){for(;e;){if(e.hasAttribute(_r)){const t=e.getAttribute(_r);return t?parseInt(t,10):NaN}e=e.parentElement}return 0}(e))}}let kr=class extends xr{constructor(e){super(0),this._contexts=new Map,this._toDispose=new ke.SL,this._lastContextId=0;const t=new vr(this._myContextId,e,this._onDidChangeContext);this._contexts.set(this._myContextId,t),this._toDispose.add(t)}dispose(){this._onDidChangeContext.dispose(),this._isDisposed=!0,this._toDispose.dispose()}getContextValuesContainer(e){return this._isDisposed?Cr.INSTANCE:this._contexts.get(e)||Cr.INSTANCE}createChildContext(e=this._myContextId){if(this._isDisposed)throw new Error("ContextKeyService has been disposed");let t=++this._lastContextId;return this._contexts.set(t,new br(t,this.getContextValuesContainer(e))),t}disposeContext(e){this._isDisposed||this._contexts.delete(e)}};kr=function(e,t,n,i){var o,r=arguments.length,s=r<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,i);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,n,s):o(t,n))||s);return r>3&&s&&Object.defineProperty(t,n,s),s}([function(e,t){return function(n,i){t(n,i,e)}}(0,pn.Ui)],kr);class Lr extends xr{constructor(e,t){if(super(e.createChildContext()),this._parentChangeListener=new ke.XK,this._parent=e,this._updateParentChangeListener(),this._domNode=t,this._domNode.hasAttribute(_r)){let e="";this._domNode.classList&&(e=Array.from(this._domNode.classList.values()).join(", ")),console.error("Element already has context attribute"+(e?": "+e:""))}this._domNode.setAttribute(_r,String(this._myContextId))}_updateParentChangeListener(){this._parentChangeListener.value=this._parent.onDidChangeContext(this._onDidChangeContext.fire,this._onDidChangeContext)}dispose(){this._isDisposed||(this._onDidChangeContext.dispose(),this._parent.disposeContext(this._myContextId),this._parentChangeListener.dispose(),this._domNode.removeAttribute(_r),this._isDisposed=!0)}getContextValuesContainer(e){return this._isDisposed?Cr.INSTANCE:this._parent.getContextValuesContainer(e)}createChildContext(e=this._myContextId){if(this._isDisposed)throw new Error("ScopedContextKeyService has been disposed");return this._parent.createChildContext(e)}disposeContext(e){this._isDisposed||this._parent.disposeContext(e)}}_e.P.registerCommand(fi.Eq,(function(e,t,n){e.get(fi.i6).createKey(String(t),n)})),_e.P.registerCommand({id:"getContextKeyInfo",handler:()=>[...fi.uy.all()].sort(((e,t)=>e.key.localeCompare(t.key))),description:{description:(0,vn.N)("getContextKeyInfo","A command that returns information about context keys"),args:[]}}),_e.P.registerCommand("_generateContextKeyInfo",(function(){const e=[],t=new Set;for(let n of fi.uy.all())t.has(n.key)||(t.add(n.key),e.push(n));e.sort(((e,t)=>e.key.localeCompare(t.key))),console.log(JSON.stringify(e,void 0,2))}));var Er=n(4932),Nr={};Nr.styleTagTransform=se(),Nr.setAttributes=ne(),Nr.insert=ee().bind(null,"head"),Nr.domAPI=X(),Nr.insertStyleElement=oe(),G()(Er.Z,Nr),Er.Z&&Er.Z.locals&&Er.Z.locals;var Dr=n(6328),Ir={};Ir.styleTagTransform=se(),Ir.setAttributes=ne(),Ir.insert=ee().bind(null,"head"),Ir.domAPI=X(),Ir.insertStyleElement=oe(),G()(Dr.Z,Ir),Dr.Z&&Dr.Z.locals&&Dr.Z.locals;var Mr,Tr=n(1134),Rr=n(161);function Or(e,t,n){const i=n.mode===Mr.ALIGN?n.offset:n.offset+n.size,o=n.mode===Mr.ALIGN?n.offset+n.size:n.offset;return 0===n.position?t<=e-i?i:t<=o?o-t:Math.max(e-t,0):t<=o?o-t:t<=e-i?i:0}!function(e){e[e.AVOID=0]="AVOID",e[e.ALIGN=1]="ALIGN"}(Mr||(Mr={}));class Br extends ke.JT{constructor(e,t){super(),this.container=null,this.delegate=null,this.toDisposeOnClean=ke.JT.None,this.toDisposeOnSetContainer=ke.JT.None,this.shadowRoot=null,this.shadowRootHostElement=null,this.view=he.$(".context-view"),this.useFixedPosition=!1,this.useShadowDOM=!1,he.Cp(this.view),this.setContainer(e,t),this._register((0,ke.OF)((()=>this.setContainer(null,1))))}setContainer(e,t){var n;if(this.container&&(this.toDisposeOnSetContainer.dispose(),this.shadowRoot?(this.shadowRoot.removeChild(this.view),this.shadowRoot=null,null===(n=this.shadowRootHostElement)||void 0===n||n.remove(),this.shadowRootHostElement=null):this.container.removeChild(this.view),this.container=null),e){if(this.container=e,this.useFixedPosition=1!==t,this.useShadowDOM=3===t,this.useShadowDOM){this.shadowRootHostElement=he.$(".shadow-root-host"),this.container.appendChild(this.shadowRootHostElement),this.shadowRoot=this.shadowRootHostElement.attachShadow({mode:"open"});const e=document.createElement("style");e.textContent=Pr,this.shadowRoot.appendChild(e),this.shadowRoot.appendChild(this.view),this.shadowRoot.appendChild(he.$("slot"))}else this.container.appendChild(this.view);const n=new ke.SL;Br.BUBBLE_UP_EVENTS.forEach((e=>{n.add(he.mu(this.container,e,(e=>{this.onDOMEvent(e,!1)})))})),Br.BUBBLE_DOWN_EVENTS.forEach((e=>{n.add(he.mu(this.container,e,(e=>{this.onDOMEvent(e,!0)}),!0))})),this.toDisposeOnSetContainer=n}}show(e){this.isVisible()&&this.hide(),he.PO(this.view),this.view.className="context-view",this.view.style.top="0px",this.view.style.left="0px",this.view.style.zIndex="2500",this.view.style.position=this.useFixedPosition?"fixed":"absolute",he.$Z(this.view),this.toDisposeOnClean=e.render(this.view)||ke.JT.None,this.delegate=e,this.doLayout(),this.delegate.focus&&this.delegate.focus()}getViewElement(){return this.view}layout(){this.isVisible()&&(!1!==this.delegate.canRelayout||ze.gn&&Rr.D.pointerEvents?(this.delegate.layout&&this.delegate.layout(),this.doLayout()):this.hide())}doLayout(){if(!this.isVisible())return;let e,t=this.delegate.getAnchor();if(he.Re(t)){let n=he.i(t);e={top:n.top,left:n.left,width:n.width,height:n.height}}else e={top:t.y,left:t.x,width:t.width||1,height:t.height||2};const n=he.w(this.view),i=he.wn(this.view),o=this.delegate.anchorPosition||0,r=this.delegate.anchorAlignment||0;let s,a;if(0===(this.delegate.anchorAxisAlignment||0)){const t={offset:e.top-window.pageYOffset,size:e.height,position:0===o?0:1},l={offset:e.left,size:e.width,position:0===r?0:1,mode:Mr.ALIGN};s=Or(window.innerHeight,i,t)+window.pageYOffset,Tr.e.intersects({start:s,end:s+i},{start:t.offset,end:t.offset+t.size})&&(l.mode=Mr.AVOID),a=Or(window.innerWidth,n,l)}else{const t={offset:e.left,size:e.width,position:0===r?0:1},l={offset:e.top,size:e.height,position:0===o?0:1,mode:Mr.ALIGN};a=Or(window.innerWidth,n,t),Tr.e.intersects({start:a,end:a+n},{start:t.offset,end:t.offset+t.size})&&(l.mode=Mr.AVOID),s=Or(window.innerHeight,i,l)+window.pageYOffset}this.view.classList.remove("top","bottom","left","right"),this.view.classList.add(0===o?"bottom":"top"),this.view.classList.add(0===r?"left":"right"),this.view.classList.toggle("fixed",this.useFixedPosition);const l=he.i(this.container);this.view.style.top=s-(this.useFixedPosition?he.i(this.view).top:l.top)+"px",this.view.style.left=a-(this.useFixedPosition?he.i(this.view).left:l.left)+"px",this.view.style.width="initial"}hide(e){const t=this.delegate;this.delegate=null,(null==t?void 0:t.onHide)&&t.onHide(e),this.toDisposeOnClean.dispose(),he.Cp(this.view)}isVisible(){return!!this.delegate}onDOMEvent(e,t){this.delegate&&(this.delegate.onDOMEvent?this.delegate.onDOMEvent(e,document.activeElement):t&&!he.jg(e.target,this.container)&&this.hide())}dispose(){this.hide(),super.dispose()}}Br.BUBBLE_UP_EVENTS=["click","keydown","focus","blur"],Br.BUBBLE_DOWN_EVENTS=["click"];let Pr='\n\t:host {\n\t\tall: initial; /* 1st rule so subsequent properties are reset. */\n\t}\n\n\t@font-face {\n\t\tfont-family: "codicon";\n\t\tsrc: url("./codicon.ttf?5d4d76ab2ce5108968ad644d591a16a6") format("truetype");\n\t}\n\n\t.codicon[class*=\'codicon-\'] {\n\t\tfont: normal normal normal 16px/1 codicon;\n\t\tdisplay: inline-block;\n\t\ttext-decoration: none;\n\t\ttext-rendering: auto;\n\t\ttext-align: center;\n\t\t-webkit-font-smoothing: antialiased;\n\t\t-moz-osx-font-smoothing: grayscale;\n\t\tuser-select: none;\n\t\t-webkit-user-select: none;\n\t\t-ms-user-select: none;\n\t}\n\n\t:host {\n\t\tfont-family: -apple-system, BlinkMacSystemFont, "Segoe WPC", "Segoe UI", "HelveticaNeue-Light", system-ui, "Ubuntu", "Droid Sans", sans-serif;\n\t}\n\n\t:host-context(.mac) { font-family: -apple-system, BlinkMacSystemFont, sans-serif; }\n\t:host-context(.mac:lang(zh-Hans)) { font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", sans-serif; }\n\t:host-context(.mac:lang(zh-Hant)) { font-family: -apple-system, BlinkMacSystemFont, "PingFang TC", sans-serif; }\n\t:host-context(.mac:lang(ja)) { font-family: -apple-system, BlinkMacSystemFont, "Hiragino Kaku Gothic Pro", sans-serif; }\n\t:host-context(.mac:lang(ko)) { font-family: -apple-system, BlinkMacSystemFont, "Nanum Gothic", "Apple SD Gothic Neo", "AppleGothic", sans-serif; }\n\n\t:host-context(.windows) { font-family: "Segoe WPC", "Segoe UI", sans-serif; }\n\t:host-context(.windows:lang(zh-Hans)) { font-family: "Segoe WPC", "Segoe UI", "Microsoft YaHei", sans-serif; }\n\t:host-context(.windows:lang(zh-Hant)) { font-family: "Segoe WPC", "Segoe UI", "Microsoft Jhenghei", sans-serif; }\n\t:host-context(.windows:lang(ja)) { font-family: "Segoe WPC", "Segoe UI", "Yu Gothic UI", "Meiryo UI", sans-serif; }\n\t:host-context(.windows:lang(ko)) { font-family: "Segoe WPC", "Segoe UI", "Malgun Gothic", "Dotom", sans-serif; }\n\n\t:host-context(.linux) { font-family: system-ui, "Ubuntu", "Droid Sans", sans-serif; }\n\t:host-context(.linux:lang(zh-Hans)) { font-family: system-ui, "Ubuntu", "Droid Sans", "Source Han Sans SC", "Source Han Sans CN", "Source Han Sans", sans-serif; }\n\t:host-context(.linux:lang(zh-Hant)) { font-family: system-ui, "Ubuntu", "Droid Sans", "Source Han Sans TC", "Source Han Sans TW", "Source Han Sans", sans-serif; }\n\t:host-context(.linux:lang(ja)) { font-family: system-ui, "Ubuntu", "Droid Sans", "Source Han Sans J", "Source Han Sans JP", "Source Han Sans", sans-serif; }\n\t:host-context(.linux:lang(ko)) { font-family: system-ui, "Ubuntu", "Droid Sans", "Source Han Sans K", "Source Han Sans JR", "Source Han Sans", "UnDotum", "FBaekmuk Gulim", sans-serif; }\n';var Fr=n(6033),Wr=n(9899),zr=n(6268),Vr=n(3938),Hr=n(1212);const jr=/\(&([^\s&])\)|(^|[^&])&([^\s&])/,$r=/(&)?(&)([^\s&])/g,Ur=(0,Ci.CM)("menu-selection",Ci.lA.check),Zr=(0,Ci.CM)("menu-submenu",Ci.lA.chevronRight);var Kr;!function(e){e[e.Right=0]="Right",e[e.Left=1]="Left"}(Kr||(Kr={}));class qr extends hi.o{constructor(e,t,n={}){e.classList.add("monaco-menu-container"),e.setAttribute("role","presentation");const i=document.createElement("div");i.classList.add("monaco-menu"),i.setAttribute("role","presentation"),super(i,{orientation:1,actionViewItemProvider:e=>this.doGetActionViewItem(e,n,o),context:n.context,actionRunner:n.actionRunner,ariaLabel:n.ariaLabel,focusOnlyEnabledItems:!0,triggerKeys:{keys:[3,...ze.dz||ze.IJ?[10]:[]],keyDown:!0}}),this.menuElement=i,this.actionsList.setAttribute("role","menu"),this.actionsList.tabIndex=0,this.menuDisposables=this._register(new ke.SL),this.initializeStyleSheet(e),(0,he.nm)(i,he.tw.KEY_DOWN,(e=>{new ln.y(e).equals(2)&&e.preventDefault()})),n.enableMnemonics&&this.menuDisposables.add((0,he.nm)(i,he.tw.KEY_DOWN,(e=>{const t=e.key.toLocaleLowerCase();if(this.mnemonics.has(t)){he.zB.stop(e,!0);const n=this.mnemonics.get(t);if(1===n.length&&(n[0]instanceof Gr&&n[0].container&&this.focusItemByElement(n[0].container),n[0].onClick(e)),n.length>1){const e=n.shift();e&&e.container&&(this.focusItemByElement(e.container),n.push(e)),this.mnemonics.set(t,n)}}}))),ze.IJ&&this._register((0,he.nm)(i,he.tw.KEY_DOWN,(e=>{const t=new ln.y(e);t.equals(14)||t.equals(11)?(this.focusedItem=this.viewItems.length-1,this.focusNext(),he.zB.stop(e,!0)):(t.equals(13)||t.equals(12))&&(this.focusedItem=0,this.focusPrevious(),he.zB.stop(e,!0))}))),this._register((0,he.nm)(this.domNode,he.tw.MOUSE_OUT,(e=>{let t=e.relatedTarget;(0,he.jg)(t,this.domNode)||(this.focusedItem=void 0,this.updateFocus(),e.stopPropagation())}))),this._register((0,he.nm)(this.actionsList,he.tw.MOUSE_OVER,(e=>{let t=e.target;if(t&&(0,he.jg)(t,this.actionsList)&&t!==this.actionsList){for(;t.parentElement!==this.actionsList&&null!==t.parentElement;)t=t.parentElement;if(t.classList.contains("action-item")){const e=this.focusedItem;this.setFocusedItem(t),e!==this.focusedItem&&this.updateFocus()}}})));let o={parent:this};this.mnemonics=new Map,this.scrollableElement=this._register(new ui.s$(i,{alwaysConsumeMouseWheel:!0,horizontal:2,vertical:3,verticalScrollbarSize:7,handleMouseWheel:!0,useShadows:!0}));const r=this.scrollableElement.getDomNode();r.style.position="",this._register((0,he.nm)(r,he.tw.MOUSE_UP,(e=>{e.preventDefault()}))),i.style.maxHeight=`${Math.max(10,window.innerHeight-e.getBoundingClientRect().top-35)}px`,t=t.filter((e=>{var t;return!(null===(t=n.submenuIds)||void 0===t?void 0:t.has(e.id))||(console.warn(`Found submenu cycle: ${e.id}`),!1)})),this.push(t,{icon:!0,label:!0,isMenu:!0}),e.appendChild(this.scrollableElement.getDomNode()),this.scrollableElement.scanDomNode(),this.viewItems.filter((e=>!(e instanceof Qr))).forEach(((e,t,n)=>{e.updatePositionInSet(t+1,n.length)}))}initializeStyleSheet(e){(0,he.OO)(e)?(this.styleSheet=(0,he.dS)(e),this.styleSheet.textContent=Xr):(qr.globalStyleSheet||(qr.globalStyleSheet=(0,he.dS)(),qr.globalStyleSheet.textContent=Xr),this.styleSheet=qr.globalStyleSheet)}style(e){const t=this.getContainer(),n=e.foregroundColor?`${e.foregroundColor}`:"",i=e.backgroundColor?`${e.backgroundColor}`:"",o=e.borderColor?`1px solid ${e.borderColor}`:"",r=e.shadowColor?`0 2px 4px ${e.shadowColor}`:"";t.style.border=o,this.domNode.style.color=n,this.domNode.style.backgroundColor=i,t.style.boxShadow=r,this.viewItems&&this.viewItems.forEach((t=>{(t instanceof Yr||t instanceof Qr)&&t.style(e)}))}getContainer(){return this.scrollableElement.getDomNode()}get onScroll(){return this.scrollableElement.onScroll}focusItemByElement(e){const t=this.focusedItem;this.setFocusedItem(e),t!==this.focusedItem&&this.updateFocus()}setFocusedItem(e){for(let t=0;t{this.element&&(this._register((0,he.nm)(this.element,he.tw.MOUSE_UP,(e=>{if(he.zB.stop(e,!0),zr.vU){if(new Vr.n(e).rightButton)return;this.onClick(e)}else setTimeout((()=>{this.onClick(e)}),0)}))),this._register((0,he.nm)(this.element,he.tw.CONTEXT_MENU,(e=>{he.zB.stop(e,!0)}))))}),100),this._register(this.runOnceToEnableMouseUp)}render(e){super.render(e),this.element&&(this.container=e,this.item=(0,he.R3)(this.element,(0,he.$)("a.action-menu-item")),this._action.id===gi.Z0.ID?this.item.setAttribute("role","presentation"):(this.item.setAttribute("role","menuitem"),this.mnemonic&&this.item.setAttribute("aria-keyshortcuts",`${this.mnemonic}`)),this.check=(0,he.R3)(this.item,(0,he.$)("span.menu-item-check"+Ur.cssSelector)),this.check.setAttribute("role","none"),this.label=(0,he.R3)(this.item,(0,he.$)("span.action-label")),this.options.label&&this.options.keybinding&&((0,he.R3)(this.item,(0,he.$)("span.keybinding")).textContent=this.options.keybinding),this.runOnceToEnableMouseUp.schedule(),this.updateClass(),this.updateLabel(),this.updateTooltip(),this.updateEnabled(),this.updateChecked())}blur(){super.blur(),this.applyStyle()}focus(){super.focus(),this.item&&this.item.focus(),this.applyStyle()}updatePositionInSet(e,t){this.item&&(this.item.setAttribute("aria-posinset",`${e}`),this.item.setAttribute("aria-setsize",`${t}`))}updateLabel(){if(this.label&&this.options.label){(0,he.PO)(this.label);let e=(0,Hr.x$)(this.getAction().label);if(e){const t=function(e){const t=jr,n=t.exec(e);if(!n)return e;const i=!n[1];return e.replace(t,i?"$2$3":"").trim()}(e);this.options.enableMnemonics||(e=t),this.label.setAttribute("aria-label",t.replace(/&&/g,"&"));const n=jr.exec(e);if(n){e=Xe.YU(e),$r.lastIndex=0;let t=$r.exec(e);for(;t&&t[1];)t=$r.exec(e);const i=e=>e.replace(/&&/g,"&");t?this.label.append(Xe.j3(i(e.substr(0,t.index))," "),(0,he.$)("u",{"aria-hidden":"true"},t[3]),Xe.oL(i(e.substr(t.index+t[0].length))," ")):this.label.innerText=i(e).trim(),this.item&&this.item.setAttribute("aria-keyshortcuts",(n[1]?n[1]:n[3]).toLocaleLowerCase())}else this.label.innerText=e.replace(/&&/g,"&").trim()}}}updateTooltip(){let e=null;this.getAction().tooltip?e=this.getAction().tooltip:!this.options.label&&this.getAction().label&&this.options.icon&&(e=this.getAction().label,this.options.keybinding&&(e=vn.N({key:"titleLabel",comment:["action title","action keybinding"]},"{0} ({1})",e,this.options.keybinding))),e&&this.item&&(this.item.title=e)}updateClass(){this.cssClass&&this.item&&this.item.classList.remove(...this.cssClass.split(" ")),this.options.icon&&this.label?(this.cssClass=this.getAction().class||"",this.label.classList.add("icon"),this.cssClass&&this.label.classList.add(...this.cssClass.split(" ")),this.updateEnabled()):this.label&&this.label.classList.remove("icon")}updateEnabled(){this.getAction().enabled?(this.element&&(this.element.classList.remove("disabled"),this.element.removeAttribute("aria-disabled")),this.item&&(this.item.classList.remove("disabled"),this.item.removeAttribute("aria-disabled"),this.item.tabIndex=0)):(this.element&&(this.element.classList.add("disabled"),this.element.setAttribute("aria-disabled","true")),this.item&&(this.item.classList.add("disabled"),this.item.setAttribute("aria-disabled","true")))}updateChecked(){this.item&&(this.getAction().checked?(this.item.classList.add("checked"),this.item.setAttribute("role","menuitemcheckbox"),this.item.setAttribute("aria-checked","true")):(this.item.classList.remove("checked"),this.item.setAttribute("role","menuitem"),this.item.setAttribute("aria-checked","false")))}getMnemonic(){return this.mnemonic}applyStyle(){if(!this.menuStyle)return;const e=this.element&&this.element.classList.contains("focused"),t=e&&this.menuStyle.selectionForegroundColor?this.menuStyle.selectionForegroundColor:this.menuStyle.foregroundColor,n=e&&this.menuStyle.selectionBackgroundColor?this.menuStyle.selectionBackgroundColor:void 0,i=e&&this.menuStyle.selectionBorderColor?`thin solid ${this.menuStyle.selectionBorderColor}`:"";this.item&&(this.item.style.color=t?t.toString():"",this.item.style.backgroundColor=n?n.toString():""),this.check&&(this.check.style.color=t?t.toString():""),this.container&&(this.container.style.border=i)}style(e){this.menuStyle=e,this.applyStyle()}}class Gr extends Yr{constructor(e,t,n,i){super(e,e,i),this.submenuActions=t,this.parentData=n,this.submenuOptions=i,this.mysubmenu=null,this.submenuDisposables=this._register(new ke.SL),this.mouseOver=!1,this.expandDirection=i&&void 0!==i.expandDirection?i.expandDirection:Kr.Right,this.showScheduler=new Fe.pY((()=>{this.mouseOver&&(this.cleanupExistingSubmenu(!1),this.createSubmenu(!1))}),250),this.hideScheduler=new Fe.pY((()=>{this.element&&!(0,he.jg)((0,he.vY)(),this.element)&&this.parentData.submenu===this.mysubmenu&&(this.parentData.parent.focus(!1),this.cleanupExistingSubmenu(!0))}),750)}render(e){super.render(e),this.element&&(this.item&&(this.item.classList.add("monaco-submenu-item"),this.item.tabIndex=0,this.item.setAttribute("aria-haspopup","true"),this.updateAriaExpanded("false"),this.submenuIndicator=(0,he.R3)(this.item,(0,he.$)("span.submenu-indicator"+Zr.cssSelector)),this.submenuIndicator.setAttribute("aria-hidden","true")),this._register((0,he.nm)(this.element,he.tw.KEY_UP,(e=>{let t=new ln.y(e);(t.equals(17)||t.equals(3))&&(he.zB.stop(e,!0),this.createSubmenu(!0))}))),this._register((0,he.nm)(this.element,he.tw.KEY_DOWN,(e=>{let t=new ln.y(e);(0,he.vY)()===this.item&&(t.equals(17)||t.equals(3))&&he.zB.stop(e,!0)}))),this._register((0,he.nm)(this.element,he.tw.MOUSE_OVER,(e=>{this.mouseOver||(this.mouseOver=!0,this.showScheduler.schedule())}))),this._register((0,he.nm)(this.element,he.tw.MOUSE_LEAVE,(e=>{this.mouseOver=!1}))),this._register((0,he.nm)(this.element,he.tw.FOCUS_OUT,(e=>{this.element&&!(0,he.jg)((0,he.vY)(),this.element)&&this.hideScheduler.schedule()}))),this._register(this.parentData.parent.onScroll((()=>{this.parentData.parent.focus(!1),this.cleanupExistingSubmenu(!1)}))))}updateEnabled(){}onClick(e){he.zB.stop(e,!0),this.cleanupExistingSubmenu(!1),this.createSubmenu(!0)}cleanupExistingSubmenu(e){if(this.parentData.submenu&&(e||this.parentData.submenu!==this.mysubmenu)){try{this.parentData.submenu.dispose()}catch(e){}this.parentData.submenu=void 0,this.updateAriaExpanded("false"),this.submenuContainer&&(this.submenuDisposables.clear(),this.submenuContainer=void 0)}}calculateSubmenuMenuLayout(e,t,n,i){const o={top:0,left:0};return o.left=Or(e.width,t.width,{position:i===Kr.Right?0:1,offset:n.left,size:n.width}),o.left>=n.left&&o.left{new ln.y(e).equals(15)&&(he.zB.stop(e,!0),this.parentData.parent.focus(),this.cleanupExistingSubmenu(!0))}))),this.submenuDisposables.add((0,he.nm)(this.submenuContainer,he.tw.KEY_DOWN,(e=>{new ln.y(e).equals(15)&&he.zB.stop(e,!0)}))),this.submenuDisposables.add(this.parentData.submenu.onDidCancel((()=>{this.parentData.parent.focus(),this.cleanupExistingSubmenu(!0)}))),this.parentData.submenu.focus(e),this.mysubmenu=this.parentData.submenu}}updateAriaExpanded(e){var t;this.item&&(null===(t=this.item)||void 0===t||t.setAttribute("aria-expanded",e))}applyStyle(){if(super.applyStyle(),!this.menuStyle)return;const e=this.element&&this.element.classList.contains("focused")&&this.menuStyle.selectionForegroundColor?this.menuStyle.selectionForegroundColor:this.menuStyle.foregroundColor;this.submenuIndicator&&(this.submenuIndicator.style.color=e?`${e}`:""),this.parentData.submenu&&this.parentData.submenu.style(this.menuStyle)}dispose(){super.dispose(),this.hideScheduler.dispose(),this.mysubmenu&&(this.mysubmenu.dispose(),this.mysubmenu=null),this.submenuContainer&&(this.submenuContainer=void 0)}}class Qr extends Fr.g{style(e){this.label&&(this.label.style.borderBottomColor=e.separatorColor?`${e.separatorColor}`:"")}}let Xr=`\n.monaco-menu {\n\tfont-size: 13px;\n\n}\n\n${(0,Wr.a)(Ur)}\n${(0,Wr.a)(Zr)}\n\n.monaco-menu .monaco-action-bar {\n\ttext-align: right;\n\toverflow: hidden;\n\twhite-space: nowrap;\n}\n\n.monaco-menu .monaco-action-bar .actions-container {\n\tdisplay: flex;\n\tmargin: 0 auto;\n\tpadding: 0;\n\twidth: 100%;\n\tjustify-content: flex-end;\n}\n\n.monaco-menu .monaco-action-bar.vertical .actions-container {\n\tdisplay: inline-block;\n}\n\n.monaco-menu .monaco-action-bar.reverse .actions-container {\n\tflex-direction: row-reverse;\n}\n\n.monaco-menu .monaco-action-bar .action-item {\n\tcursor: pointer;\n\tdisplay: inline-block;\n\ttransition: transform 50ms ease;\n\tposition: relative; /* DO NOT REMOVE - this is the key to preventing the ghosting icon bug in Chrome 42 */\n}\n\n.monaco-menu .monaco-action-bar .action-item.disabled {\n\tcursor: default;\n}\n\n.monaco-menu .monaco-action-bar.animated .action-item.active {\n\ttransform: scale(1.272019649, 1.272019649); /* 1.272019649 = √φ */\n}\n\n.monaco-menu .monaco-action-bar .action-item .icon,\n.monaco-menu .monaco-action-bar .action-item .codicon {\n\tdisplay: inline-block;\n}\n\n.monaco-menu .monaco-action-bar .action-item .codicon {\n\tdisplay: flex;\n\talign-items: center;\n}\n\n.monaco-menu .monaco-action-bar .action-label {\n\tfont-size: 11px;\n\tmargin-right: 4px;\n}\n\n.monaco-menu .monaco-action-bar .action-item.disabled .action-label,\n.monaco-menu .monaco-action-bar .action-item.disabled .action-label:hover {\n\topacity: 0.4;\n}\n\n/* Vertical actions */\n\n.monaco-menu .monaco-action-bar.vertical {\n\ttext-align: left;\n}\n\n.monaco-menu .monaco-action-bar.vertical .action-item {\n\tdisplay: block;\n}\n\n.monaco-menu .monaco-action-bar.vertical .action-label.separator {\n\tdisplay: block;\n\tborder-bottom: 1px solid #bbb;\n\tpadding-top: 1px;\n\tmargin-left: .8em;\n\tmargin-right: .8em;\n}\n\n.monaco-menu .secondary-actions .monaco-action-bar .action-label {\n\tmargin-left: 6px;\n}\n\n/* Action Items */\n.monaco-menu .monaco-action-bar .action-item.select-container {\n\toverflow: hidden; /* somehow the dropdown overflows its container, we prevent it here to not push */\n\tflex: 1;\n\tmax-width: 170px;\n\tmin-width: 60px;\n\tdisplay: flex;\n\talign-items: center;\n\tjustify-content: center;\n\tmargin-right: 10px;\n}\n\n.monaco-menu .monaco-action-bar.vertical {\n\tmargin-left: 0;\n\toverflow: visible;\n}\n\n.monaco-menu .monaco-action-bar.vertical .actions-container {\n\tdisplay: block;\n}\n\n.monaco-menu .monaco-action-bar.vertical .action-item {\n\tpadding: 0;\n\ttransform: none;\n\tdisplay: flex;\n}\n\n.monaco-menu .monaco-action-bar.vertical .action-item.active {\n\ttransform: none;\n}\n\n.monaco-menu .monaco-action-bar.vertical .action-menu-item {\n\tflex: 1 1 auto;\n\tdisplay: flex;\n\theight: 2em;\n\talign-items: center;\n\tposition: relative;\n}\n\n.monaco-menu .monaco-action-bar.vertical .action-label {\n\tflex: 1 1 auto;\n\ttext-decoration: none;\n\tpadding: 0 1em;\n\tbackground: none;\n\tfont-size: 12px;\n\tline-height: 1;\n}\n\n.monaco-menu .monaco-action-bar.vertical .keybinding,\n.monaco-menu .monaco-action-bar.vertical .submenu-indicator {\n\tdisplay: inline-block;\n\tflex: 2 1 auto;\n\tpadding: 0 1em;\n\ttext-align: right;\n\tfont-size: 12px;\n\tline-height: 1;\n}\n\n.monaco-menu .monaco-action-bar.vertical .submenu-indicator {\n\theight: 100%;\n}\n\n.monaco-menu .monaco-action-bar.vertical .submenu-indicator.codicon {\n\tfont-size: 16px !important;\n\tdisplay: flex;\n\talign-items: center;\n}\n\n.monaco-menu .monaco-action-bar.vertical .submenu-indicator.codicon::before {\n\tmargin-left: auto;\n\tmargin-right: -20px;\n}\n\n.monaco-menu .monaco-action-bar.vertical .action-item.disabled .keybinding,\n.monaco-menu .monaco-action-bar.vertical .action-item.disabled .submenu-indicator {\n\topacity: 0.4;\n}\n\n.monaco-menu .monaco-action-bar.vertical .action-label:not(.separator) {\n\tdisplay: inline-block;\n\tbox-sizing: border-box;\n\tmargin: 0;\n}\n\n.monaco-menu .monaco-action-bar.vertical .action-item {\n\tposition: static;\n\toverflow: visible;\n}\n\n.monaco-menu .monaco-action-bar.vertical .action-item .monaco-submenu {\n\tposition: absolute;\n}\n\n.monaco-menu .monaco-action-bar.vertical .action-label.separator {\n\tpadding: 0.5em 0 0 0;\n\tmargin-bottom: 0.5em;\n\twidth: 100%;\n\theight: 0px !important;\n\tmargin-left: .8em !important;\n\tmargin-right: .8em !important;\n}\n\n.monaco-menu .monaco-action-bar.vertical .action-label.separator.text {\n\tpadding: 0.7em 1em 0.1em 1em;\n\tfont-weight: bold;\n\topacity: 1;\n}\n\n.monaco-menu .monaco-action-bar.vertical .action-label:hover {\n\tcolor: inherit;\n}\n\n.monaco-menu .monaco-action-bar.vertical .menu-item-check {\n\tposition: absolute;\n\tvisibility: hidden;\n\twidth: 1em;\n\theight: 100%;\n}\n\n.monaco-menu .monaco-action-bar.vertical .action-menu-item.checked .menu-item-check {\n\tvisibility: visible;\n\tdisplay: flex;\n\talign-items: center;\n\tjustify-content: center;\n}\n\n/* Context Menu */\n\n.context-view.monaco-menu-container {\n\toutline: 0;\n\tborder: none;\n\tanimation: fadeIn 0.083s linear;\n\t-webkit-app-region: no-drag;\n}\n\n.context-view.monaco-menu-container :focus,\n.context-view.monaco-menu-container .monaco-action-bar.vertical:focus,\n.context-view.monaco-menu-container .monaco-action-bar.vertical :focus {\n\toutline: 0;\n}\n\n.monaco-menu .monaco-action-bar.vertical .action-item {\n\tborder: thin solid transparent; /* prevents jumping behaviour on hover or focus */\n}\n\n\n/* High Contrast Theming */\n:host-context(.hc-black) .context-view.monaco-menu-container {\n\tbox-shadow: none;\n}\n\n:host-context(.hc-black) .monaco-menu .monaco-action-bar.vertical .action-item.focused {\n\tbackground: none;\n}\n\n/* Vertical Action Bar Styles */\n\n.monaco-menu .monaco-action-bar.vertical {\n\tpadding: .5em 0;\n}\n\n.monaco-menu .monaco-action-bar.vertical .action-menu-item {\n\theight: 1.8em;\n}\n\n.monaco-menu .monaco-action-bar.vertical .action-label:not(.separator),\n.monaco-menu .monaco-action-bar.vertical .keybinding {\n\tfont-size: inherit;\n\tpadding: 0 2em;\n}\n\n.monaco-menu .monaco-action-bar.vertical .menu-item-check {\n\tfont-size: inherit;\n\twidth: 2em;\n}\n\n.monaco-menu .monaco-action-bar.vertical .action-label.separator {\n\tfont-size: inherit;\n\tpadding: 0.2em 0 0 0;\n\tmargin-bottom: 0.2em;\n}\n\n:host-context(.linux) .monaco-menu .monaco-action-bar.vertical .action-label.separator {\n\tmargin-left: 0;\n\tmargin-right: 0;\n}\n\n.monaco-menu .monaco-action-bar.vertical .submenu-indicator {\n\tfont-size: 60%;\n\tpadding: 0 1.8em;\n}\n\n:host-context(.linux) .monaco-menu .monaco-action-bar.vertical .submenu-indicator {\n\theight: 100%;\n\tmask-size: 10px 10px;\n\t-webkit-mask-size: 10px 10px;\n}\n\n.monaco-menu .action-item {\n\tcursor: default;\n}\n\n/* Arrows */\n.monaco-scrollable-element > .scrollbar > .scra {\n\tcursor: pointer;\n\tfont-size: 11px !important;\n}\n\n.monaco-scrollable-element > .visible {\n\topacity: 1;\n\n\t/* Background rule added for IE9 - to allow clicks on dom node */\n\tbackground:rgba(0,0,0,0);\n\n\ttransition: opacity 100ms linear;\n}\n.monaco-scrollable-element > .invisible {\n\topacity: 0;\n\tpointer-events: none;\n}\n.monaco-scrollable-element > .invisible.fade {\n\ttransition: opacity 800ms linear;\n}\n\n/* Scrollable Content Inset Shadow */\n.monaco-scrollable-element > .shadow {\n\tposition: absolute;\n\tdisplay: none;\n}\n.monaco-scrollable-element > .shadow.top {\n\tdisplay: block;\n\ttop: 0;\n\tleft: 3px;\n\theight: 3px;\n\twidth: 100%;\n\tbox-shadow: #DDD 0 6px 6px -6px inset;\n}\n.monaco-scrollable-element > .shadow.left {\n\tdisplay: block;\n\ttop: 3px;\n\tleft: 0;\n\theight: 100%;\n\twidth: 3px;\n\tbox-shadow: #DDD 6px 0 6px -6px inset;\n}\n.monaco-scrollable-element > .shadow.top-left-corner {\n\tdisplay: block;\n\ttop: 0;\n\tleft: 0;\n\theight: 3px;\n\twidth: 3px;\n}\n.monaco-scrollable-element > .shadow.top.left {\n\tbox-shadow: #DDD 6px 6px 6px -6px inset;\n}\n\n/* ---------- Default Style ---------- */\n\n:host-context(.vs) .monaco-scrollable-element > .scrollbar > .slider {\n\tbackground: rgba(100, 100, 100, .4);\n}\n:host-context(.vs-dark) .monaco-scrollable-element > .scrollbar > .slider {\n\tbackground: rgba(121, 121, 121, .4);\n}\n:host-context(.hc-black) .monaco-scrollable-element > .scrollbar > .slider {\n\tbackground: rgba(111, 195, 223, .6);\n}\n\n.monaco-scrollable-element > .scrollbar > .slider:hover {\n\tbackground: rgba(100, 100, 100, .7);\n}\n:host-context(.hc-black) .monaco-scrollable-element > .scrollbar > .slider:hover {\n\tbackground: rgba(111, 195, 223, .8);\n}\n\n.monaco-scrollable-element > .scrollbar > .slider.active {\n\tbackground: rgba(0, 0, 0, .6);\n}\n:host-context(.vs-dark) .monaco-scrollable-element > .scrollbar > .slider.active {\n\tbackground: rgba(191, 191, 191, .4);\n}\n:host-context(.hc-black) .monaco-scrollable-element > .scrollbar > .slider.active {\n\tbackground: rgba(111, 195, 223, 1);\n}\n\n:host-context(.vs-dark) .monaco-scrollable-element .shadow.top {\n\tbox-shadow: none;\n}\n\n:host-context(.vs-dark) .monaco-scrollable-element .shadow.left {\n\tbox-shadow: #000 6px 0 6px -6px inset;\n}\n\n:host-context(.vs-dark) .monaco-scrollable-element .shadow.top.left {\n\tbox-shadow: #000 6px 6px 6px -6px inset;\n}\n\n:host-context(.hc-black) .monaco-scrollable-element .shadow.top {\n\tbox-shadow: none;\n}\n\n:host-context(.hc-black) .monaco-scrollable-element .shadow.left {\n\tbox-shadow: none;\n}\n\n:host-context(.hc-black) .monaco-scrollable-element .shadow.top.left {\n\tbox-shadow: none;\n}\n`;var Jr=n(8810);class es{constructor(e,t,n,i,o){this.contextViewService=e,this.telemetryService=t,this.notificationService=n,this.keybindingService=i,this.themeService=o,this.focusToReturn=null,this.block=null,this.options={blockMouse:!0}}configure(e){this.options=e}showContextMenu(e){const t=e.getActions();if(!t.length)return;let n;this.focusToReturn=document.activeElement;let i=(0,he.Re)(e.domForShadowRoot)?e.domForShadowRoot:void 0;this.contextViewService.showContextView({getAnchor:()=>e.getAnchor(),canRelayout:!1,anchorAlignment:e.anchorAlignment,anchorAxisAlignment:e.anchorAxisAlignment,render:i=>{let o=e.getMenuClassName?e.getMenuClassName():"";o&&(i.className+=" "+o),this.options.blockMouse&&(this.block=i.appendChild((0,he.$)(".context-view-block")),this.block.style.position="fixed",this.block.style.cursor="initial",this.block.style.left="0",this.block.style.top="0",this.block.style.width="100%",this.block.style.height="100%",this.block.style.zIndex="-1",(0,he.nm)(this.block,he.tw.MOUSE_DOWN,(e=>e.stopPropagation())));const r=new ke.SL,s=e.actionRunner||new gi.Wi;return s.onBeforeRun(this.onActionRun,this,r),s.onDidRun(this.onDidActionRun,this,r),n=new qr(i,t,{actionViewItemProvider:e.getActionViewItem,context:e.getActionsContext?e.getActionsContext():null,actionRunner:s,getKeyBinding:e.getKeyBinding?e.getKeyBinding:e=>this.keybindingService.lookupKeybinding(e.id)}),r.add((0,Jr.tj)(n,this.themeService)),n.onDidCancel((()=>this.contextViewService.hideContextView(!0)),null,r),n.onDidBlur((()=>this.contextViewService.hideContextView(!0)),null,r),r.add((0,he.nm)(window,he.tw.BLUR,(()=>this.contextViewService.hideContextView(!0)))),r.add((0,he.nm)(window,he.tw.MOUSE_DOWN,(e=>{if(e.defaultPrevented)return;let t=new Vr.n(e),n=t.target;if(!t.rightButton){for(;n;){if(n===i)return;n=n.parentElement}this.contextViewService.hideContextView(!0)}}))),(0,ke.F8)(r,n)},focus:()=>{n&&n.focus(!!e.autoSelectFirstItem)},onHide:t=>{e.onHide&&e.onHide(!!t),this.block&&(this.block.remove(),this.block=null),this.focusToReturn&&this.focusToReturn.focus()}},i,!!i)}onActionRun(e){this.telemetryService.publicLog2("workbenchActionExecuted",{id:e.action.id,from:"contextMenu"}),this.contextViewService.hideContextView(!1),this.focusToReturn&&this.focusToReturn.focus()}onDidActionRun(e){e.error&&!(0,We.VV)(e.error)&&this.notificationService.error(e.error)}}var ts=n(829),ns=function(e,t){return function(n,i){t(n,i,e)}};let is=class extends ke.JT{constructor(e,t,n,i,o){super(),this.contextMenuHandler=new es(n,e,t,i,o)}configure(e){this.contextMenuHandler.configure(e)}showContextMenu(e){this.contextMenuHandler.showContextMenu(e),he._q.getInstance().resetKeyStatus()}};is=function(e,t,n,i){var o,r=arguments.length,s=r<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,i);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,n,s):o(t,n))||s);return r>3&&s&&Object.defineProperty(t,n,s),s}([ns(0,ts.b),ns(1,In.lT),ns(2,Bi.u),ns(3,mo.d),ns(4,bi.XE)],is);const os=(0,Ri.yh)("layoutService");let rs=class extends ke.JT{constructor(e){super(),this.layoutService=e,this.currentViewDisposable=ke.JT.None,this.container=e.container,this.contextView=this._register(new Br(this.container,1)),this.layout(),this._register(e.onDidLayout((()=>this.layout())))}setContainer(e,t){this.contextView.setContainer(e,t||1)}showContextView(e,t,n){t?t!==this.container&&(this.container=t,this.setContainer(t,n?3:2)):this.container!==this.layoutService.container&&(this.container=this.layoutService.container,this.setContainer(this.container,1)),this.contextView.show(e);const i=(0,ke.OF)((()=>{this.currentViewDisposable===i&&this.hideContextView()}));return this.currentViewDisposable=i,i}getContextViewElement(){return this.contextView.getViewElement()}layout(){this.contextView.layout()}hideContextView(e){this.contextView.hide(e)}};rs=function(e,t,n,i){var o,r=arguments.length,s=r<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,i);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,n,s):o(t,n))||s);return r>3&&s&&Object.defineProperty(t,n,s),s}([function(e,t){return function(n,i){t(n,i,e)}}(0,os)],rs);var ss=n(8820);class as{constructor(e){this.incoming=new Map,this.outgoing=new Map,this.data=e}}class ls{constructor(e){this._hashFn=e,this._nodes=new Map}roots(){const e=[];for(let t of this._nodes.values())0===t.outgoing.size&&e.push(t);return e}insertEdge(e,t){const n=this.lookupOrInsertNode(e),i=this.lookupOrInsertNode(t);n.outgoing.set(this._hashFn(t),i),i.incoming.set(this._hashFn(e),n)}removeNode(e){const t=this._hashFn(e);this._nodes.delete(t);for(let e of this._nodes.values())e.outgoing.delete(t),e.incoming.delete(t)}lookupOrInsertNode(e){const t=this._hashFn(e);let n=this._nodes.get(t);return n||(n=new as(e),this._nodes.set(t,n)),n}isEmpty(){return 0===this._nodes.size}toString(){let e=[];for(let[t,n]of this._nodes)e.push(`${t}, (incoming)[${[...n.incoming.keys()].join(", ")}], (outgoing)[${[...n.outgoing.keys()].join(",")}]`);return e.join("\n")}findCycleSlow(){for(let[e,t]of this._nodes){const n=new Set([e]),i=this._findCycle(t,n);if(i)return i}}_findCycle(e,t){for(let[n,i]of e.outgoing){if(t.has(n))return[...t,n].join(" -> ");t.add(n);const e=this._findCycle(i,t);if(e)return e;t.delete(n)}}}var ds=n(7108);class cs extends Error{constructor(e){var t;super("cyclic dependency between services"),this.message=null!==(t=e.findCycleSlow())&&void 0!==t?t:`UNABLE to detect cycle, dumping graph: \n${e.toString()}`}}class hs{constructor(e=new Oi.y,t=!1,n){this._activeInstantiations=new Set,this._services=e,this._strict=t,this._parent=n,this._services.set(Ri.TG,this)}createChild(e){return new hs(e,this._strict,this)}invokeFunction(e,...t){let n=us.traceInvocation(e),i=!1;try{return e({get:(e,t)=>{if(i)throw(0,We.L6)("service accessor is only valid during the invocation of its target method");const o=this._getOrCreateServiceInstance(e,n);if(!o&&t!==Ri.jt)throw new Error(`[invokeFunction] unknown service '${e}'`);return o}},...t)}finally{i=!0,n.stop()}}createInstance(e,...t){let n,i;return e instanceof ds.M?(n=us.traceCreation(e.ctor),i=this._createInstance(e.ctor,e.staticArguments.concat(t),n)):(n=us.traceCreation(e),i=this._createInstance(e,t,n)),n.stop(),i}_createInstance(e,t=[],n){let i=Ri.I8.getServiceDependencies(e).sort(((e,t)=>e.index-t.index)),o=[];for(const t of i){let i=this._getOrCreateServiceInstance(t.id,n);if(!i&&this._strict&&!t.optional)throw new Error(`[createInstance] ${e.name} depends on UNKNOWN service ${t.id}.`);o.push(i)}let r=i.length>0?i[0].index:t.length;if(t.length!==r){console.warn(`[createInstance] First service dependency of ${e.name} at position ${r+1} conflicts with ${t.length} static arguments`);let n=r-t.length;t=n>0?t.concat(new Array(n)):t.slice(0,r)}return new e(...[...t,...o])}_setServiceInstance(e,t){if(this._services.get(e)instanceof ds.M)this._services.set(e,t);else{if(!this._parent)throw new Error("illegalState - setting UNKNOWN service instance");this._parent._setServiceInstance(e,t)}}_getServiceInstanceOrDescriptor(e){let t=this._services.get(e);return!t&&this._parent?this._parent._getServiceInstanceOrDescriptor(e):t}_getOrCreateServiceInstance(e,t){let n=this._getServiceInstanceOrDescriptor(e);return n instanceof ds.M?this._safeCreateAndCacheServiceInstance(e,n,t.branch(e,!0)):(t.branch(e,!1),n)}_safeCreateAndCacheServiceInstance(e,t,n){if(this._activeInstantiations.has(e))throw new Error(`illegal state - RECURSIVELY instantiating service '${e}'`);this._activeInstantiations.add(e);try{return this._createAndCacheServiceInstance(e,t,n)}finally{this._activeInstantiations.delete(e)}}_createAndCacheServiceInstance(e,t,n){const i=new ls((e=>e.id.toString()));let o=0;const r=[{id:e,desc:t,_trace:n}];for(;r.length;){const t=r.pop();if(i.lookupOrInsertNode(t),o++>1e3)throw new cs(i);for(let n of Ri.I8.getServiceDependencies(t.desc.ctor)){let o=this._getServiceInstanceOrDescriptor(n.id);if(o||n.optional||console.warn(`[createInstance] ${e} depends on ${n.id} which is NOT registered.`),o instanceof ds.M){const e={id:n.id,desc:o,_trace:t._trace.branch(n.id,!0)};i.insertEdge(t,e),r.push(e)}}}for(;;){const e=i.roots();if(0===e.length){if(!i.isEmpty())throw new cs(i);break}for(const{data:t}of e){if(this._getServiceInstanceOrDescriptor(t.id)instanceof ds.M){const e=this._createServiceInstanceWithOwner(t.id,t.desc.ctor,t.desc.staticArguments,t.desc.supportsDelayedInstantiation,t._trace);this._setServiceInstance(t.id,e)}i.removeNode(t)}}return this._getServiceInstanceOrDescriptor(e)}_createServiceInstanceWithOwner(e,t,n=[],i,o){if(this._services.get(e)instanceof ds.M)return this._createServiceInstance(t,n,i,o);if(this._parent)return this._parent._createServiceInstanceWithOwner(e,t,n,i,o);throw new Error(`illegalState - creating UNKNOWN service instance ${t.name}`)}_createServiceInstance(e,t=[],n,i){if(n){const n=new Fe.Ue((()=>this._createInstance(e,t,i)));return new Proxy(Object.create(null),{get(e,t){if(t in e)return e[t];let i=n.value,o=i[t];return"function"!=typeof o||(o=o.bind(i),e[t]=o),o},set:(e,t,i)=>(n.value[t]=i,!0)})}return this._createInstance(e,t,i)}}class us{constructor(e,t){this.type=e,this.name=t,this._start=Date.now(),this._dep=[]}static traceInvocation(e){return us._None}static traceCreation(e){return us._None}branch(e,t){let n=new us(2,e.toString());return this._dep.push([e,t,n]),n}stop(){let e=Date.now()-this._start;us._totals+=e;let t=!1,n=[`${0===this.type?"CREATE":"CALL"} ${this.name}`,`${function e(n,i){let o=[],r=new Array(n+1).join("\t");for(const[s,a,l]of i._dep)if(a&&l){t=!0,o.push(`${r}CREATES -> ${s}`);let i=e(n+1,l);i&&o.push(i)}else o.push(`${r}uses -> ${s}`);return o.join("\n")}(1,this)}`,`DONE, took ${e.toFixed(2)}ms (grand total ${us._totals.toFixed(2)}ms)`];(e>2||t)&&console.log(n.join("\n"))}}us._None=new class extends us{constructor(){super(-1,null)}stop(){}branch(){return this}},us._totals=0;var gs=n(4349),ps=n(3738),ms=n(8674);class fs{constructor(){this._byResource=new ge.Y9,this._byOwner=new Map}set(e,t,n){let i=this._byResource.get(e);i||(i=new Map,this._byResource.set(e,i)),i.set(t,n);let o=this._byOwner.get(t);o||(o=new ge.Y9,this._byOwner.set(t,o)),o.set(e,n)}get(e,t){let n=this._byResource.get(e);return null==n?void 0:n.get(t)}delete(e,t){let n=!1,i=!1,o=this._byResource.get(e);o&&(n=o.delete(t));let r=this._byOwner.get(t);if(r&&(i=r.delete(e)),n!==i)throw new Error("illegal state");return n&&i}values(e){var t,n,i,o;return"string"==typeof e?null!==(n=null===(t=this._byOwner.get(e))||void 0===t?void 0:t.values())&&void 0!==n?n:fr.$.empty():H.o.isUri(e)?null!==(o=null===(i=this._byResource.get(e))||void 0===i?void 0:i.values())&&void 0!==o?o:fr.$.empty():fr.$.map(fr.$.concat(...this._byOwner.values()),(e=>e[1]))}}class _s{constructor(e){this.errors=0,this.infos=0,this.warnings=0,this.unknowns=0,this._data=new ge.Y9,this._service=e,this._subscription=e.onMarkerChanged(this._update,this)}dispose(){this._subscription.dispose()}_update(e){for(const t of e){const e=this._data.get(t);e&&this._substract(e);const n=this._resourceStats(t);this._add(n),this._data.set(t,n)}}_resourceStats(e){const t={errors:0,warnings:0,infos:0,unknowns:0};if(e.scheme===me.lg.inMemory||e.scheme===me.lg.walkThrough||e.scheme===me.lg.walkThroughSnippet)return t;for(const{severity:n}of this._service.read({resource:e}))n===ms.ZL.Error?t.errors+=1:n===ms.ZL.Warning?t.warnings+=1:n===ms.ZL.Info?t.infos+=1:t.unknowns+=1;return t}_substract(e){this.errors-=e.errors,this.warnings-=e.warnings,this.infos-=e.infos,this.unknowns-=e.unknowns}_add(e){this.errors+=e.errors,this.warnings+=e.warnings,this.infos+=e.infos,this.unknowns+=e.unknowns}}class bs{constructor(){this._onMarkerChanged=new z.D0({delay:0,merge:bs._merge}),this.onMarkerChanged=this._onMarkerChanged.event,this._data=new fs,this._stats=new _s(this)}dispose(){this._stats.dispose(),this._onMarkerChanged.dispose()}remove(e,t){for(const n of t||[])this.changeOne(e,n,[])}changeOne(e,t,n){if((0,At.XY)(n))this._data.delete(t,e)&&this._onMarkerChanged.fire([t]);else{const i=[];for(const o of n){const n=bs._toMarker(e,t,o);n&&i.push(n)}this._data.set(t,e,i),this._onMarkerChanged.fire([t])}}static _toMarker(e,t,n){let{code:i,severity:o,message:r,source:s,startLineNumber:a,startColumn:l,endLineNumber:d,endColumn:c,relatedInformation:h,tags:u}=n;if(r)return a=a>0?a:1,l=l>0?l:1,d=d>=a?d:a,c=c>0?c:l,{resource:t,owner:e,code:i,severity:o,message:r,source:s,startLineNumber:a,startColumn:l,endLineNumber:d,endColumn:c,relatedInformation:h,tags:u}}read(e=Object.create(null)){let{owner:t,resource:n,severities:i,take:o}=e;if((!o||o<0)&&(o=-1),t&&n){const e=this._data.get(n,t);if(e){const t=[];for(const n of e)if(bs._accept(n,i)){const e=t.push(n);if(o>0&&e===o)break}return t}return[]}if(t||n){const e=this._data.values(null!=n?n:t),r=[];for(const t of e)for(const e of t)if(bs._accept(e,i)){const t=r.push(e);if(o>0&&t===o)return r}return r}{const e=[];for(let t of this._data.values())for(let n of t)if(bs._accept(n,i)){const t=e.push(n);if(o>0&&t===o)return e}return e}}static _accept(e,t){return void 0===t||(t&e.severity)===e.severity}static _merge(e){const t=new ge.Y9;for(let n of e)for(let e of n)t.set(e,!0);return Array.from(t.keys())}}var Cs=n(6904),vs=function(e,t,n,i){var o,r=arguments.length,s=r<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,i);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,n,s):o(t,n))||s);return r>3&&s&&Object.defineProperty(t,n,s),s},ws=function(e,t){return function(n,i){t(n,i,e)}};let ys=class{constructor(e){this._commandService=e}createMenu(e,t,n=!1){return new As(e,n,this._commandService,t,this)}};ys=vs([ws(0,_e.H)],ys);let As=class e{constructor(e,t,n,i,o){this._id=e,this._fireEventsForSubmenuChanges=t,this._commandService=n,this._contextKeyService=i,this._menuService=o,this._disposables=new ke.SL,this._menuGroups=[],this._contextKeys=new Set,this._build();const r=new Fe.pY((()=>{this._build(),this._onDidChange.fire(this)}),50);this._disposables.add(r),this._disposables.add(po.BH.onDidChangeMenu((t=>{t.has(e)&&r.schedule()})));const s=this._disposables.add(new ke.SL);this._onDidChange=new z.Q5({onFirstListenerAdd:()=>{const e=new Fe.pY((()=>this._onDidChange.fire(this)),50);s.add(e),s.add(i.onDidChangeContext((t=>{t.affectsSome(this._contextKeys)&&e.schedule()})))},onLastListenerRemove:s.clear.bind(s)}),this.onDidChange=this._onDidChange.event}dispose(){this._disposables.dispose(),this._onDidChange.dispose()}_build(){this._menuGroups.length=0,this._contextKeys.clear();const t=po.BH.getMenuItems(this._id);let n;t.sort(e._compareMenuItems);for(const e of t){const t=e.group||"";n&&n[0]===t||(n=[t,[]],this._menuGroups.push(n)),n[1].push(e),this._collectContextKeys(e)}}_collectContextKeys(t){if(e._fillInKbExprKeys(t.when,this._contextKeys),(0,po.vr)(t)){if(t.command.precondition&&e._fillInKbExprKeys(t.command.precondition,this._contextKeys),t.command.toggled){const n=t.command.toggled.condition||t.command.toggled;e._fillInKbExprKeys(n,this._contextKeys)}}else this._fireEventsForSubmenuChanges&&po.BH.getMenuItems(t.submenu).forEach(this._collectContextKeys,this)}getActions(e){const t=[];for(let n of this._menuGroups){const[i,o]=n,r=[];for(const t of o)if(this._contextKeyService.contextMatchesRules(t.when)){const n=(0,po.vr)(t)?new po.U8(t.command,t.alt,e,this._contextKeyService,this._commandService):new po.NZ(t,this._menuService,this._contextKeyService,e);r.push(n)}r.length>0&&t.push([i,r])}return t}static _fillInKbExprKeys(e,t){if(e)for(let n of e.keys())t.add(n)}static _compareMenuItems(t,n){let i=t.group,o=n.group;if(i!==o){if(!i)return 1;if(!o)return-1;if("navigation"===i)return-1;if("navigation"===o)return 1;let e=i.localeCompare(o);if(0!==e)return e}let r=t.order||0,s=n.order||0;return rs?1:e._compareTitles((0,po.vr)(t)?t.command.title:t.title,(0,po.vr)(n)?n.command.title:n.title)}static _compareTitles(e,t){const n="string"==typeof e?e:e.original,i="string"==typeof t?t:t.original;return n.localeCompare(i)}};As=vs([ws(2,_e.H),ws(3,fi.i6),ws(4,po.co)],As);var Ss=n(6479),xs=function(e,t){return function(n,i){t(n,i,e)}};class ks extends ke.JT{constructor(e){super(),this.model=e,this._markersData=new Map,this._register((0,ke.OF)((()=>{this.model.deltaDecorations([...this._markersData.keys()],[]),this._markersData.clear()})))}update(e,t){const n=[...this._markersData.keys()];this._markersData.clear();const i=this.model.deltaDecorations(n,t);for(let t=0;tthis._onModelAdded(e))),this._register(e.onModelAdded(this._onModelAdded,this)),this._register(e.onModelRemoved(this._onModelRemoved,this)),this._register(this._markerService.onMarkerChanged(this._handleMarkerChange,this))}dispose(){super.dispose(),this._markerDecorations.forEach((e=>e.dispose())),this._markerDecorations.clear()}getMarker(e,t){const n=this._markerDecorations.get(e);return n&&n.getMarker(t)||null}_handleMarkerChange(e){e.forEach((e=>{const t=this._markerDecorations.get(e);t&&this._updateDecorations(t)}))}_onModelAdded(e){const t=new ks(e);this._markerDecorations.set(e.uri,t),this._updateDecorations(t)}_onModelRemoved(e){const t=this._markerDecorations.get(e.uri);t&&(t.dispose(),this._markerDecorations.delete(e.uri)),e.uri.scheme!==me.lg.inMemory&&e.uri.scheme!==me.lg.internal&&e.uri.scheme!==me.lg.vscode||this._markerService&&this._markerService.read({resource:e.uri}).map((e=>e.owner)).forEach((t=>this._markerService.remove(t,[e.uri])))}_updateDecorations(e){const t=this._markerService.read({resource:e.model.uri,take:500});let n=t.map((t=>({range:this._createDecorationRange(e.model,t),options:this._createDecorationOption(t)})));e.update(t,n)&&this._onDidChangeMarker.fire(e.model)}_createDecorationRange(e,t){let n=$.e.lift(t);if(t.severity!==ms.ZL.Hint||this._hasMarkerTag(t,1)||this._hasMarkerTag(t,2)||(n=n.setEndPosition(n.startLineNumber,n.startColumn+2)),n=e.validateRange(n),n.isEmpty()){let t=e.getWordAtPosition(n.getStartPosition());if(t)n=new $.e(n.startLineNumber,t.startColumn,n.endLineNumber,t.endColumn);else{let t=e.getLineLastNonWhitespaceColumn(n.startLineNumber)||e.getLineMaxColumn(n.startLineNumber);1===t||(n=n.endColumn>=t?new $.e(n.startLineNumber,t-1,n.endLineNumber,t):new $.e(n.startLineNumber,n.startColumn,n.endLineNumber,n.endColumn+1))}}else if(t.endColumn===Number.MAX_VALUE&&1===t.startColumn&&n.startLineNumber===n.endLineNumber){let i=e.getLineFirstNonWhitespaceColumn(t.startLineNumber);i=0}};Ls=function(e,t,n,i){var o,r=arguments.length,s=r<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,i);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,n,s):o(t,n))||s);return r>3&&s&&Object.defineProperty(t,n,s),s}([xs(0,wt.q),xs(1,ms.lT)],Ls);var Es=n(5026),Ns=function(e,t){return function(n,i){t(n,i,e)}};let Ds=class extends ke.JT{constructor(e,t){super(),this._contextKeyService=e,this._configurationService=t,this._accessibilitySupport=0,this._onDidChangeScreenReaderOptimized=new z.Q5,this._accessibilityModeEnabledContext=fo.U.bindTo(this._contextKeyService);const n=()=>this._accessibilityModeEnabledContext.set(this.isScreenReaderOptimized());this._register(this._configurationService.onDidChangeConfiguration((e=>{e.affectsConfiguration("editor.accessibilitySupport")&&(n(),this._onDidChangeScreenReaderOptimized.fire())}))),n(),this.onDidChangeScreenReaderOptimized((()=>n()))}get onDidChangeScreenReaderOptimized(){return this._onDidChangeScreenReaderOptimized.event}isScreenReaderOptimized(){const e=this._configurationService.getValue("editor.accessibilitySupport");return"on"===e||"auto"===e&&2===this._accessibilitySupport}getAccessibilitySupport(){return this._accessibilitySupport}};Ds=function(e,t,n,i){var o,r=arguments.length,s=r<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,i);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,n,s):o(t,n))||s);return r>3&&s&&Object.defineProperty(t,n,s),s}([Ns(0,fi.i6),Ns(1,pn.Ui)],Ds);var Is=function(e,t,n,i){return new(n||(n=Promise))((function(o,r){function s(e){try{l(i.next(e))}catch(e){r(e)}}function a(e){try{l(i.throw(e))}catch(e){r(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,a)}l((i=i.apply(e,t||[])).next())}))};class Ms{constructor(){this.mapTextToType=new Map,this.findText=""}writeText(e,t){return Is(this,void 0,void 0,(function*(){if(t)return void this.mapTextToType.set(t,e);try{return yield navigator.clipboard.writeText(e)}catch(e){console.error(e)}const n=document.activeElement,i=document.body.appendChild((0,he.$)("textarea",{"aria-hidden":!0}));i.style.height="1px",i.style.width="1px",i.style.position="absolute",i.value=e,i.focus(),i.select(),document.execCommand("copy"),n instanceof HTMLElement&&n.focus(),document.body.removeChild(i)}))}readText(e){return Is(this,void 0,void 0,(function*(){if(e)return this.mapTextToType.get(e)||"";try{return yield navigator.clipboard.readText()}catch(e){return console.error(e),""}}))}readFindText(){return Is(this,void 0,void 0,(function*(){return this.findText}))}writeFindText(e){return Is(this,void 0,void 0,(function*(){this.findText=e}))}}var Ts=n(4862),Rs=function(e,t){return function(n,i){t(n,i,e)}},Os=function(e,t,n,i){return new(n||(n=Promise))((function(o,r){function s(e){try{l(i.next(e))}catch(e){r(e)}}function a(e){try{l(i.throw(e))}catch(e){r(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,a)}l((i=i.apply(e,t||[])).next())}))};function Bs(e){return e.scheme===me.lg.file?e.fsPath:e.path}let Ps=0;class Fs{constructor(e,t,n,i,o,r,s){this.id=++Ps,this.type=0,this.actual=e,this.label=e.label,this.confirmBeforeUndo=e.confirmBeforeUndo||!1,this.resourceLabel=t,this.strResource=n,this.resourceLabels=[this.resourceLabel],this.strResources=[this.strResource],this.groupId=i,this.groupOrder=o,this.sourceId=r,this.sourceOrder=s,this.isValid=!0}setValid(e){this.isValid=e}toString(){return`[id:${this.id}] [group:${this.groupId}] [${this.isValid?" VALID":"INVALID"}] ${this.actual.constructor.name} - ${this.actual}`}}class Ws{constructor(e,t){this.resourceLabel=e,this.reason=t}}class zs{constructor(){this.elements=new Map}createMessage(){const e=[],t=[];for(const[,n]of this.elements)(0===n.reason?e:t).push(n.resourceLabel);let n=[];return e.length>0&&n.push(vn.N({key:"externalRemoval",comment:["{0} is a list of filenames"]},"The following files have been closed and modified on disk: {0}.",e.join(", "))),t.length>0&&n.push(vn.N({key:"noParallelUniverses",comment:["{0} is a list of filenames"]},"The following files have been modified in an incompatible way: {0}.",t.join(", "))),n.join("\n")}get size(){return this.elements.size}has(e){return this.elements.has(e)}set(e,t){this.elements.set(e,t)}delete(e){return this.elements.delete(e)}}class Vs{constructor(e,t,n,i,o,r,s){this.id=++Ps,this.type=1,this.actual=e,this.label=e.label,this.confirmBeforeUndo=e.confirmBeforeUndo||!1,this.resourceLabels=t,this.strResources=n,this.groupId=i,this.groupOrder=o,this.sourceId=r,this.sourceOrder=s,this.removedResources=null,this.invalidatedResources=null}canSplit(){return"function"==typeof this.actual.split}removeResource(e,t,n){this.removedResources||(this.removedResources=new zs),this.removedResources.has(t)||this.removedResources.set(t,new Ws(e,n))}setValid(e,t,n){n?this.invalidatedResources&&(this.invalidatedResources.delete(t),0===this.invalidatedResources.size&&(this.invalidatedResources=null)):(this.invalidatedResources||(this.invalidatedResources=new zs),this.invalidatedResources.has(t)||this.invalidatedResources.set(t,new Ws(e,0)))}toString(){return`[id:${this.id}] [group:${this.groupId}] [${this.invalidatedResources?"INVALID":" VALID"}] ${this.actual.constructor.name} - ${this.actual}`}}class Hs{constructor(e,t){this.resourceLabel=e,this.strResource=t,this._past=[],this._future=[],this.locked=!1,this.versionId=1}dispose(){for(const e of this._past)1===e.type&&e.removeResource(this.resourceLabel,this.strResource,0);for(const e of this._future)1===e.type&&e.removeResource(this.resourceLabel,this.strResource,0);this.versionId++}toString(){let e=[];e.push(`* ${this.strResource}:`);for(let t=0;t=0;t--)e.push(` * [REDO] ${this._future[t]}`);return e.join("\n")}flushAllElements(){this._past=[],this._future=[],this.versionId++}_setElementValidFlag(e,t){1===e.type?e.setValid(this.resourceLabel,this.strResource,t):e.setValid(t)}setElementsValidFlag(e,t){for(const n of this._past)t(n.actual)&&this._setElementValidFlag(n,e);for(const n of this._future)t(n.actual)&&this._setElementValidFlag(n,e)}pushElement(e){for(const e of this._future)1===e.type&&e.removeResource(this.resourceLabel,this.strResource,1);this._future=[],this._past.push(e),this.versionId++}createSnapshot(e){const t=[];for(let e=0,n=this._past.length;e=0;e--)t.push(this._future[e].id);return new Ts.YO(e,t)}restoreSnapshot(e){const t=e.elements.length;let n=!0,i=0,o=-1;for(let r=0,s=this._past.length;r=t||s.id!==e.elements[i])&&(n=!1,o=0),n||1!==s.type||s.removeResource(this.resourceLabel,this.strResource,0)}let r=-1;for(let o=this._future.length-1;o>=0;o--,i++){const s=this._future[o];n&&(i>=t||s.id!==e.elements[i])&&(n=!1,r=o),n||1!==s.type||s.removeResource(this.resourceLabel,this.strResource,0)}-1!==o&&(this._past=this._past.slice(0,o)),-1!==r&&(this._future=this._future.slice(r+1)),this.versionId++}getElements(){const e=[],t=[];for(const t of this._past)e.push(t.actual);for(const e of this._future)t.push(e.actual);return{past:e,future:t}}getClosestPastElement(){return 0===this._past.length?null:this._past[this._past.length-1]}getSecondClosestPastElement(){return this._past.length<2?null:this._past[this._past.length-2]}getClosestFutureElement(){return 0===this._future.length?null:this._future[this._future.length-1]}hasPastElements(){return this._past.length>0}hasFutureElements(){return this._future.length>0}splitPastWorkspaceElement(e,t){for(let n=this._past.length-1;n>=0;n--)if(this._past[n]===e){t.has(this.strResource)?this._past[n]=t.get(this.strResource):this._past.splice(n,1);break}this.versionId++}splitFutureWorkspaceElement(e,t){for(let n=this._future.length-1;n>=0;n--)if(this._future[n]===e){t.has(this.strResource)?this._future[n]=t.get(this.strResource):this._future.splice(n,1);break}this.versionId++}moveBackward(e){this._past.pop(),this._future.push(e),this.versionId++}moveForward(e){this._future.pop(),this._past.push(e),this.versionId++}}class js{constructor(e){this.editStacks=e,this._versionIds=[];for(let e=0,t=this.editStacks.length;et.sourceOrder)&&(t=r,n=i)}return[t,n]}canUndo(e){if(e instanceof Ts.gJ){const[,t]=this._findClosestUndoElementWithSource(e.id);return!!t}const t=this.getUriComparisonKey(e);return!!this._editStacks.has(t)&&this._editStacks.get(t).hasPastElements()}_onError(e,t){(0,We.dL)(e);for(const e of t.strResources)this.removeElements(e);this._notificationService.error(e)}_acquireLocks(e){for(const t of e.editStacks)if(t.locked)throw new Error("Cannot acquire edit stack lock");for(const t of e.editStacks)t.locked=!0;return()=>{for(const t of e.editStacks)t.locked=!1}}_safeInvokeWithLocks(e,t,n,i,o){const r=this._acquireLocks(n);let s;try{s=t()}catch(t){return r(),i.dispose(),this._onError(t,e)}return s?s.then((()=>(r(),i.dispose(),o())),(t=>(r(),i.dispose(),this._onError(t,e)))):(r(),i.dispose(),o())}_invokeWorkspacePrepare(e){return Os(this,void 0,void 0,(function*(){if(void 0===e.actual.prepareUndoRedo)return ke.JT.None;const t=e.actual.prepareUndoRedo();return void 0===t?ke.JT.None:t}))}_invokeResourcePrepare(e,t){if(1!==e.actual.type||void 0===e.actual.prepareUndoRedo)return t(ke.JT.None);const n=e.actual.prepareUndoRedo();return n?(0,ke.Wf)(n)?t(n):n.then((e=>t(e))):t(ke.JT.None)}_getAffectedEditStacks(e){const t=[];for(const n of e.strResources)t.push(this._editStacks.get(n)||$s);return new js(t)}_tryToSplitAndUndo(e,t,n,i){if(t.canSplit())return this._splitPastWorkspaceElement(t,n),this._notificationService.warn(i),new Zs(this._undo(e,0,!0));for(const e of t.strResources)this.removeElements(e);return this._notificationService.warn(i),new Zs}_checkWorkspaceUndo(e,t,n,i){if(t.removedResources)return this._tryToSplitAndUndo(e,t,t.removedResources,vn.N({key:"cannotWorkspaceUndo",comment:["{0} is a label for an operation. {1} is another message."]},"Could not undo '{0}' across all files. {1}",t.label,t.removedResources.createMessage()));if(i&&t.invalidatedResources)return this._tryToSplitAndUndo(e,t,t.invalidatedResources,vn.N({key:"cannotWorkspaceUndo",comment:["{0} is a label for an operation. {1} is another message."]},"Could not undo '{0}' across all files. {1}",t.label,t.invalidatedResources.createMessage()));const o=[];for(const e of n.editStacks)e.getClosestPastElement()!==t&&o.push(e.resourceLabel);if(o.length>0)return this._tryToSplitAndUndo(e,t,null,vn.N({key:"cannotWorkspaceUndoDueToChanges",comment:["{0} is a label for an operation. {1} is a list of filenames."]},"Could not undo '{0}' across all files because changes were made to {1}",t.label,o.join(", ")));const r=[];for(const e of n.editStacks)e.locked&&r.push(e.resourceLabel);return r.length>0?this._tryToSplitAndUndo(e,t,null,vn.N({key:"cannotWorkspaceUndoDueToInProgressUndoRedo",comment:["{0} is a label for an operation. {1} is a list of filenames."]},"Could not undo '{0}' across all files because there is already an undo or redo operation running on {1}",t.label,r.join(", "))):n.isValid()?null:this._tryToSplitAndUndo(e,t,null,vn.N({key:"cannotWorkspaceUndoDueToInMeantimeUndoRedo",comment:["{0} is a label for an operation. {1} is a list of filenames."]},"Could not undo '{0}' across all files because an undo or redo operation occurred in the meantime",t.label))}_workspaceUndo(e,t,n){const i=this._getAffectedEditStacks(t),o=this._checkWorkspaceUndo(e,t,i,!1);return o?o.returnValue:this._confirmAndExecuteWorkspaceUndo(e,t,i,n)}_isPartOfUndoGroup(e){if(!e.groupId)return!1;for(const[,t]of this._editStacks){const n=t.getClosestPastElement();if(n){if(n===e){const n=t.getSecondClosestPastElement();if(n&&n.groupId===e.groupId)return!0}if(n.groupId===e.groupId)return!0}}return!1}_confirmAndExecuteWorkspaceUndo(e,t,n,i){return Os(this,void 0,void 0,(function*(){if(t.canSplit()&&!this._isPartOfUndoGroup(t)){const o=yield this._dialogService.show(dn.Z.Info,vn.N("confirmWorkspace","Would you like to undo '{0}' across all files?",t.label),[vn.N({key:"ok",comment:["{0} denotes a number that is > 1"]},"Undo in {0} Files",n.editStacks.length),vn.N("nok","Undo this File"),vn.N("cancel","Cancel")],{cancelId:2});if(2===o.choice)return;if(1===o.choice)return this._splitPastWorkspaceElement(t,null),this._undo(e,0,!0);const r=this._checkWorkspaceUndo(e,t,n,!1);if(r)return r.returnValue;i=!0}let o;try{o=yield this._invokeWorkspacePrepare(t)}catch(e){return this._onError(e,t)}const r=this._checkWorkspaceUndo(e,t,n,!0);if(r)return o.dispose(),r.returnValue;for(const e of n.editStacks)e.moveBackward(t);return this._safeInvokeWithLocks(t,(()=>t.actual.undo()),n,o,(()=>this._continueUndoInGroup(t.groupId,i)))}))}_resourceUndo(e,t,n){if(t.isValid){if(!e.locked)return this._invokeResourcePrepare(t,(i=>(e.moveBackward(t),this._safeInvokeWithLocks(t,(()=>t.actual.undo()),new js([e]),i,(()=>this._continueUndoInGroup(t.groupId,n))))));{const e=vn.N({key:"cannotResourceUndoDueToInProgressUndoRedo",comment:["{0} is a label for an operation."]},"Could not undo '{0}' because there is already an undo or redo operation running.",t.label);this._notificationService.warn(e)}}else e.flushAllElements()}_findClosestUndoElementInGroup(e){if(!e)return[null,null];let t=null,n=null;for(const[i,o]of this._editStacks){const r=o.getClosestPastElement();r&&r.groupId===e&&(!t||r.groupOrder>t.groupOrder)&&(t=r,n=i)}return[t,n]}_continueUndoInGroup(e,t){if(!e)return;const[,n]=this._findClosestUndoElementInGroup(e);return n?this._undo(n,0,t):void 0}undo(e){if(e instanceof Ts.gJ){const[,t]=this._findClosestUndoElementWithSource(e.id);return t?this._undo(t,e.id,!1):void 0}return"string"==typeof e?this._undo(e,0,!1):this._undo(this.getUriComparisonKey(e),0,!1)}_undo(e,t=0,n){if(!this._editStacks.has(e))return;const i=this._editStacks.get(e),o=i.getClosestPastElement();if(o){if(o.groupId){const[e,i]=this._findClosestUndoElementInGroup(o.groupId);if(o!==e&&i)return this._undo(i,t,n)}if((o.sourceId!==t||o.confirmBeforeUndo)&&!n)return this._confirmAndContinueUndo(e,t,o);try{return 1===o.type?this._workspaceUndo(e,o,n):this._resourceUndo(i,o,n)}finally{}}}_confirmAndContinueUndo(e,t,n){return Os(this,void 0,void 0,(function*(){if(1!==(yield this._dialogService.show(dn.Z.Info,vn.N("confirmDifferentSource","Would you like to undo '{0}'?",n.label),[vn.N("confirmDifferentSource.yes","Yes"),vn.N("cancel","Cancel")],{cancelId:1})).choice)return this._undo(e,t,!0)}))}_findClosestRedoElementWithSource(e){if(!e)return[null,null];let t=null,n=null;for(const[i,o]of this._editStacks){const r=o.getClosestFutureElement();r&&r.sourceId===e&&(!t||r.sourceOrder0)return this._tryToSplitAndRedo(e,t,null,vn.N({key:"cannotWorkspaceRedoDueToChanges",comment:["{0} is a label for an operation. {1} is a list of filenames."]},"Could not redo '{0}' across all files because changes were made to {1}",t.label,o.join(", ")));const r=[];for(const e of n.editStacks)e.locked&&r.push(e.resourceLabel);return r.length>0?this._tryToSplitAndRedo(e,t,null,vn.N({key:"cannotWorkspaceRedoDueToInProgressUndoRedo",comment:["{0} is a label for an operation. {1} is a list of filenames."]},"Could not redo '{0}' across all files because there is already an undo or redo operation running on {1}",t.label,r.join(", "))):n.isValid()?null:this._tryToSplitAndRedo(e,t,null,vn.N({key:"cannotWorkspaceRedoDueToInMeantimeUndoRedo",comment:["{0} is a label for an operation. {1} is a list of filenames."]},"Could not redo '{0}' across all files because an undo or redo operation occurred in the meantime",t.label))}_workspaceRedo(e,t){const n=this._getAffectedEditStacks(t),i=this._checkWorkspaceRedo(e,t,n,!1);return i?i.returnValue:this._executeWorkspaceRedo(e,t,n)}_executeWorkspaceRedo(e,t,n){return Os(this,void 0,void 0,(function*(){let i;try{i=yield this._invokeWorkspacePrepare(t)}catch(e){return this._onError(e,t)}const o=this._checkWorkspaceRedo(e,t,n,!0);if(o)return i.dispose(),o.returnValue;for(const e of n.editStacks)e.moveForward(t);return this._safeInvokeWithLocks(t,(()=>t.actual.redo()),n,i,(()=>this._continueRedoInGroup(t.groupId)))}))}_resourceRedo(e,t){if(t.isValid){if(!e.locked)return this._invokeResourcePrepare(t,(n=>(e.moveForward(t),this._safeInvokeWithLocks(t,(()=>t.actual.redo()),new js([e]),n,(()=>this._continueRedoInGroup(t.groupId))))));{const e=vn.N({key:"cannotResourceRedoDueToInProgressUndoRedo",comment:["{0} is a label for an operation."]},"Could not redo '{0}' because there is already an undo or redo operation running.",t.label);this._notificationService.warn(e)}}else e.flushAllElements()}_findClosestRedoElementInGroup(e){if(!e)return[null,null];let t=null,n=null;for(const[i,o]of this._editStacks){const r=o.getClosestFutureElement();r&&r.groupId===e&&(!t||r.groupOrder=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,n,s):o(t,n))||s);return r>3&&s&&Object.defineProperty(t,n,s),s}([Rs(0,ss.S),Rs(1,In.lT)],Us);class Zs{constructor(e){this.returnValue=e}}(0,Es.z)(Ts.tJ,Us);var Ks=n(3198),qs={};qs.styleTagTransform=se(),qs.setAttributes=ne(),qs.insert=ee().bind(null,"head"),qs.domAPI=X(),qs.insertStyleElement=oe(),G()(Ks.Z,qs),Ks.Z&&Ks.Z.locals&&Ks.Z.locals;var Ys=n(3257),Gs={};Gs.styleTagTransform=se(),Gs.setAttributes=ne(),Gs.insert=ee().bind(null,"head"),Gs.domAPI=X(),Gs.insertStyleElement=oe(),G()(Ys.Z,Gs),Ys.Z&&Ys.Z.locals&&Ys.Z.locals;var Qs=n(7746);const Xs=new Fe.Ue((()=>{const e=new Intl.Collator(void 0,{numeric:!0,sensitivity:"base"});return{collator:e,collatorIsNumeric:e.resolvedOptions().numeric}}));var Js=n(3326),ea=n(4650),ta=n(9898),na=n(4742);const ia={},oa=new na.R("quick-input-button-icon-");function ra(e){if(!e)return;let t;const n=e.dark.toString();return ia[n]?t=ia[n]:(t=oa.nextId(),he.fk(`.${t}`,`background-image: ${he.wY(e.light||e.dark)}`),he.fk(`.vs-dark .${t}, .hc-black .${t}`,`background-image: ${he.wY(e.dark)}`),ia[n]=t),t}var sa=n(2298),aa={};aa.styleTagTransform=se(),aa.setAttributes=ne(),aa.insert=ee().bind(null,"head"),aa.domAPI=X(),aa.insertStyleElement=oe(),G()(sa.Z,aa),sa.Z&&sa.Z.locals&&sa.Z.locals;const la=he.$;class da{constructor(e,t,n){this.os=t,this.keyElements=new Set,this.options=n||Object.create(null),this.labelBackground=this.options.keybindingLabelBackground,this.labelForeground=this.options.keybindingLabelForeground,this.labelBorder=this.options.keybindingLabelBorder,this.labelBottomBorder=this.options.keybindingLabelBottomBorder,this.labelShadow=this.options.keybindingLabelShadow,this.domNode=he.R3(e,la(".monaco-keybinding")),this.didEverRender=!1,e.appendChild(this.domNode)}get element(){return this.domNode}set(e,t){this.didEverRender&&this.keybinding===e&&da.areSame(this.matches,t)||(this.keybinding=e,this.matches=t,this.render())}render(){if(this.clear(),this.keybinding){let[e,t]=this.keybinding.getParts();e&&this.renderPart(this.domNode,e,this.matches?this.matches.firstPart:null),t&&(he.R3(this.domNode,la("span.monaco-keybinding-key-chord-separator",void 0," ")),this.renderPart(this.domNode,t,this.matches?this.matches.chordPart:null)),this.domNode.title=this.keybinding.getAriaLabel()||""}else this.options&&this.options.renderUnboundKeybindings&&this.renderUnbound(this.domNode);this.applyStyles(),this.didEverRender=!0}clear(){he.PO(this.domNode),this.keyElements.clear()}renderPart(e,t,n){const i=En.xo.modifierLabels[this.os];t.ctrlKey&&this.renderKey(e,i.ctrlKey,Boolean(null==n?void 0:n.ctrlKey),i.separator),t.shiftKey&&this.renderKey(e,i.shiftKey,Boolean(null==n?void 0:n.shiftKey),i.separator),t.altKey&&this.renderKey(e,i.altKey,Boolean(null==n?void 0:n.altKey),i.separator),t.metaKey&&this.renderKey(e,i.metaKey,Boolean(null==n?void 0:n.metaKey),i.separator);const o=t.keyLabel;o&&this.renderKey(e,o,Boolean(null==n?void 0:n.keyCode),"")}renderKey(e,t,n,i){he.R3(e,this.createKeyElement(t,n?".highlight":"")),i&&he.R3(e,la("span.monaco-keybinding-key-separator",void 0,i))}renderUnbound(e){he.R3(e,this.createKeyElement((0,vn.N)("unbound","Unbound")))}createKeyElement(e,t=""){const n=la("span.monaco-keybinding-key"+t,void 0,e);return this.keyElements.add(n),n}style(e){this.labelBackground=e.keybindingLabelBackground,this.labelForeground=e.keybindingLabelForeground,this.labelBorder=e.keybindingLabelBorder,this.labelBottomBorder=e.keybindingLabelBottomBorder,this.labelShadow=e.keybindingLabelShadow,this.applyStyles()}applyStyles(){var e;if(this.element){for(const t of this.keyElements)this.labelBackground&&(t.style.backgroundColor=null===(e=this.labelBackground)||void 0===e?void 0:e.toString()),this.labelBorder&&(t.style.borderColor=this.labelBorder.toString()),this.labelBottomBorder&&(t.style.borderBottomColor=this.labelBottomBorder.toString()),this.labelShadow&&(t.style.boxShadow=`inset 0 -1px 0 ${this.labelShadow}`);this.labelForeground&&(this.element.style.color=this.labelForeground.toString())}}static areSame(e,t){return e===t||!e&&!t||!!e&&!!t&&(0,Le.fS)(e.firstPart,t.firstPart)&&(0,Le.fS)(e.chordPart,t.chordPart)}}var ca=function(e,t,n,i){var o,r=arguments.length,s=r<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,i);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,n,s):o(t,n))||s);return r>3&&s&&Object.defineProperty(t,n,s),s};const ha=he.$;class ua{constructor(e){this.hidden=!1,this._onChecked=new z.Q5,this.onChecked=this._onChecked.event,Object.assign(this,e)}get checked(){return!!this._checked}set checked(e){e!==this._checked&&(this._checked=e,this._onChecked.fire(e))}dispose(){this._onChecked.dispose()}}class ga{get templateId(){return ga.ID}renderTemplate(e){const t=Object.create(null);t.toDisposeElement=[],t.toDisposeTemplate=[],t.entry=he.R3(e,ha(".quick-input-list-entry"));const n=he.R3(t.entry,ha("label.quick-input-list-label"));t.toDisposeTemplate.push(he.mu(n,he.tw.CLICK,(e=>{t.checkbox.offsetParent||e.preventDefault()}))),t.checkbox=he.R3(n,ha("input.quick-input-list-checkbox")),t.checkbox.type="checkbox",t.toDisposeTemplate.push(he.mu(t.checkbox,he.tw.CHANGE,(e=>{t.element.checked=t.checkbox.checked})));const i=he.R3(n,ha(".quick-input-list-rows")),o=he.R3(i,ha(".quick-input-list-row")),r=he.R3(i,ha(".quick-input-list-row"));t.label=new Js.g(o,{supportHighlights:!0,supportDescriptionHighlights:!0,supportIcons:!0});const s=he.R3(o,ha(".quick-input-list-entry-keybinding"));t.keybinding=new da(s,ze.OS);const a=he.R3(r,ha(".quick-input-list-label-meta"));return t.detail=new ea.q(a,!0),t.separator=he.R3(t.entry,ha(".quick-input-list-separator")),t.actionBar=new hi.o(t.entry),t.actionBar.domNode.classList.add("quick-input-list-entry-action-bar"),t.toDisposeTemplate.push(t.actionBar),t}renderElement(e,t,n){n.toDisposeElement=(0,ke.B9)(n.toDisposeElement),n.element=e,n.checkbox.checked=e.checked,n.toDisposeElement.push(e.onChecked((e=>n.checkbox.checked=e)));const{labelHighlights:i,descriptionHighlights:o,detailHighlights:r}=e,s=Object.create(null);s.matches=i||[],s.descriptionTitle=e.saneDescription,s.descriptionMatches=o||[],s.extraClasses=e.item.iconClasses,s.italic=e.item.italic,s.strikethrough=e.item.strikethrough,n.label.setLabel(e.saneLabel,e.saneDescription,s),n.keybinding.set(e.item.keybinding),n.detail.set(e.saneDetail,r),e.separator&&e.separator.label?(n.separator.textContent=e.separator.label,n.separator.style.display=""):n.separator.style.display="none",n.entry.classList.toggle("quick-input-list-separator-border",!!e.separator),n.actionBar.clear();const a=e.item.buttons;a&&a.length?(n.actionBar.push(a.map(((t,n)=>{let i=t.iconClass||(t.iconPath?ra(t.iconPath):void 0);t.alwaysVisible&&(i=i?`${i} always-visible`:"always-visible");const o=new gi.aU(`id-${n}`,"",i,!0,(()=>{return n=this,i=void 0,r=function*(){e.fireButtonTriggered({button:t,item:e.item})},new((o=void 0)||(o=Promise))((function(e,t){function s(e){try{l(r.next(e))}catch(e){t(e)}}function a(e){try{l(r.throw(e))}catch(e){t(e)}}function l(t){var n;t.done?e(t.value):(n=t.value,n instanceof o?n:new o((function(e){e(n)}))).then(s,a)}l((r=r.apply(n,i||[])).next())}));var n,i,o,r}));return o.tooltip=t.tooltip||"",o})),{icon:!0,label:!1}),n.entry.classList.add("has-actions")):n.entry.classList.remove("has-actions")}disposeElement(e,t,n){n.toDisposeElement=(0,ke.B9)(n.toDisposeElement)}disposeTemplate(e){e.toDisposeElement=(0,ke.B9)(e.toDisposeElement),e.toDisposeTemplate=(0,ke.B9)(e.toDisposeTemplate)}}ga.ID="listelement";class pa{getHeight(e){return e.saneDetail?44:22}getTemplateId(e){return ga.ID}}var ma;!function(e){e[e.First=1]="First",e[e.Second=2]="Second",e[e.Last=3]="Last",e[e.Next=4]="Next",e[e.Previous=5]="Previous",e[e.NextPage=6]="NextPage",e[e.PreviousPage=7]="PreviousPage"}(ma||(ma={}));class fa{constructor(e,t,n){this.parent=e,this.inputElements=[],this.elements=[],this.elementsToIndexes=new Map,this.matchOnDescription=!1,this.matchOnDetail=!1,this.matchOnLabel=!0,this.matchOnMeta=!0,this.sortByLabel=!0,this._onChangedAllVisibleChecked=new z.Q5,this.onChangedAllVisibleChecked=this._onChangedAllVisibleChecked.event,this._onChangedCheckedCount=new z.Q5,this.onChangedCheckedCount=this._onChangedCheckedCount.event,this._onChangedVisibleCount=new z.Q5,this.onChangedVisibleCount=this._onChangedVisibleCount.event,this._onChangedCheckedElements=new z.Q5,this.onChangedCheckedElements=this._onChangedCheckedElements.event,this._onButtonTriggered=new z.Q5,this.onButtonTriggered=this._onButtonTriggered.event,this._onKeyDown=new z.Q5,this.onKeyDown=this._onKeyDown.event,this._onLeave=new z.Q5,this.onLeave=this._onLeave.event,this._fireCheckedEvents=!0,this.elementDisposables=[],this.disposables=[],this.id=t,this.container=he.R3(this.parent,ha(".quick-input-list"));const i=new pa,o=new _a;this.list=n.createList("QuickInput",this.container,i,[new ga],{identityProvider:{getId:e=>e.saneLabel},setRowLineHeight:!1,multipleSelectionSupport:!1,horizontalScrolling:!1,accessibilityProvider:o}),this.list.getHTMLElement().id=t,this.disposables.push(this.list),this.disposables.push(this.list.onKeyDown((e=>{const t=new ln.y(e);switch(t.keyCode){case 10:this.toggleCheckbox();break;case 31:(ze.dz?e.metaKey:e.ctrlKey)&&this.list.setFocus((0,At.w6)(this.list.length));break;case 16:const t=this.list.getFocus();1===t.length&&0===t[0]&&this._onLeave.fire();break;case 18:const n=this.list.getFocus();1===n.length&&n[0]===this.list.length-1&&this._onLeave.fire()}this._onKeyDown.fire(t)}))),this.disposables.push(this.list.onMouseDown((e=>{2!==e.browserEvent.button&&e.browserEvent.preventDefault()}))),this.disposables.push(he.nm(this.container,he.tw.CLICK,(e=>{(e.x||e.y)&&this._onLeave.fire()}))),this.disposables.push(this.list.onMouseMiddleClick((e=>{this._onLeave.fire()}))),this.disposables.push(this.list.onContextMenu((e=>{"number"==typeof e.index&&(e.browserEvent.preventDefault(),this.list.setSelection([e.index]))}))),this.disposables.push(this._onChangedAllVisibleChecked,this._onChangedCheckedCount,this._onChangedVisibleCount,this._onChangedCheckedElements,this._onButtonTriggered,this._onLeave,this._onKeyDown)}get onDidChangeFocus(){return z.ju.map(this.list.onDidChangeFocus,(e=>e.elements.map((e=>e.item))))}get onDidChangeSelection(){return z.ju.map(this.list.onDidChangeSelection,(e=>({items:e.elements.map((e=>e.item)),event:e.browserEvent})))}getAllVisibleChecked(){return this.allVisibleChecked(this.elements,!1)}allVisibleChecked(e,t=!0){for(let n=0,i=e.length;n{t.hidden||(t.checked=e)}))}finally{this._fireCheckedEvents=!0,this.fireCheckedEvents()}}setElements(e){this.elementDisposables=(0,ke.B9)(this.elementDisposables);const t=e=>this.fireButtonTriggered(e);this.inputElements=e,this.elements=e.reduce(((n,i,o)=>{var r,s,a;if("separator"!==i.type){const l=o&&e[o-1],d=i.label&&i.label.replace(/\r?\n/g," "),c=i.meta&&i.meta.replace(/\r?\n/g," "),h=i.description&&i.description.replace(/\r?\n/g," "),u=i.detail&&i.detail.replace(/\r?\n/g," "),g=i.ariaLabel||[d,h,u].map((e=>(0,Ci.JL)(e))).filter((e=>!!e)).join(", ");n.push(new ua({index:o,item:i,saneLabel:d,saneMeta:c,saneAriaLabel:g,saneDescription:h,saneDetail:u,labelHighlights:null===(r=i.highlights)||void 0===r?void 0:r.label,descriptionHighlights:null===(s=i.highlights)||void 0===s?void 0:s.description,detailHighlights:null===(a=i.highlights)||void 0===a?void 0:a.detail,checked:!1,separator:l&&"separator"===l.type?l:void 0,fireButtonTriggered:t}))}return n}),[]),this.elementDisposables.push(...this.elements),this.elementDisposables.push(...this.elements.map((e=>e.onChecked((()=>this.fireCheckedEvents()))))),this.elementsToIndexes=this.elements.reduce(((e,t,n)=>(e.set(t.item,n),e)),new Map),this.list.splice(0,this.list.length),this.list.splice(0,this.list.length,this.elements),this._onChangedVisibleCount.fire(this.elements.length)}getFocusedElements(){return this.list.getFocusedElements().map((e=>e.item))}setFocusedElements(e){if(this.list.setFocus(e.filter((e=>this.elementsToIndexes.has(e))).map((e=>this.elementsToIndexes.get(e)))),e.length>0){const e=this.list.getFocus()[0];"number"==typeof e&&this.list.reveal(e)}}getActiveDescendant(){return this.list.getHTMLElement().getAttribute("aria-activedescendant")}setSelectedElements(e){this.list.setSelection(e.filter((e=>this.elementsToIndexes.has(e))).map((e=>this.elementsToIndexes.get(e))))}getCheckedElements(){return this.elements.filter((e=>e.checked)).map((e=>e.item))}setCheckedElements(e){try{this._fireCheckedEvents=!1;const t=new Set;for(const n of e)t.add(n);for(const e of this.elements)e.checked=t.has(e.item)}finally{this._fireCheckedEvents=!0,this.fireCheckedEvents()}}set enabled(e){this.list.getHTMLElement().style.pointerEvents=e?"":"none"}focus(e){if(!this.list.length)return;switch(e===ma.Next&&this.list.getFocus()[0]===this.list.length-1&&(e=ma.First),e===ma.Previous&&0===this.list.getFocus()[0]&&(e=ma.Last),e===ma.Second&&this.list.length<2&&(e=ma.First),e){case ma.First:this.list.focusFirst();break;case ma.Second:this.list.focusNth(1);break;case ma.Last:this.list.focusLast();break;case ma.Next:this.list.focusNext();break;case ma.Previous:this.list.focusPrevious();break;case ma.NextPage:this.list.focusNextPage();break;case ma.PreviousPage:this.list.focusPreviousPage()}const t=this.list.getFocus()[0];"number"==typeof t&&this.list.reveal(t)}clearFocus(){this.list.setFocus([])}domFocus(){this.list.domFocus()}layout(e){this.list.getHTMLElement().style.maxHeight=e?`calc(${44*Math.floor(e/44)}px)`:"",this.list.layout()}filter(e){if(!(this.sortByLabel||this.matchOnLabel||this.matchOnDescription||this.matchOnDetail))return this.list.layout(),!1;if((e=e.trim())&&(this.matchOnLabel||this.matchOnDescription||this.matchOnDetail)){let t;this.elements.forEach((n=>{const i=this.matchOnLabel?(0,Ve.f6)((0,Hr.Gt)(e,(0,Hr.Ho)(n.saneLabel))):void 0,o=this.matchOnDescription?(0,Ve.f6)((0,Hr.Gt)(e,(0,Hr.Ho)(n.saneDescription||""))):void 0,r=this.matchOnDetail?(0,Ve.f6)((0,Hr.Gt)(e,(0,Hr.Ho)(n.saneDetail||""))):void 0,s=this.matchOnMeta?(0,Ve.f6)((0,Hr.Gt)(e,(0,Hr.Ho)(n.saneMeta||""))):void 0;if(i||o||r||s?(n.labelHighlights=i,n.descriptionHighlights=o,n.detailHighlights=r,n.hidden=!1):(n.labelHighlights=void 0,n.descriptionHighlights=void 0,n.detailHighlights=void 0,n.hidden=!n.item.alwaysShow),n.separator=void 0,!this.sortByLabel){const e=n.index&&this.inputElements[n.index-1];t=e&&"separator"===e.type?e:t,t&&!n.hidden&&(n.separator=t,t=void 0)}}))}else this.elements.forEach((e=>{e.labelHighlights=void 0,e.descriptionHighlights=void 0,e.detailHighlights=void 0,e.hidden=!1;const t=e.index&&this.inputElements[e.index-1];e.separator=t&&"separator"===t.type?t:void 0}));const t=this.elements.filter((e=>!e.hidden));if(this.sortByLabel&&e){const n=e.toLowerCase();t.sort(((e,t)=>function(e,t,n){const i=e.labelHighlights||[],o=t.labelHighlights||[];return i.length&&!o.length?-1:!i.length&&o.length?1:0===i.length&&0===o.length?0:function(e,t,n){const i=e.toLowerCase(),o=t.toLowerCase(),r=function(e,t,n){const i=e.toLowerCase(),o=t.toLowerCase(),r=i.startsWith(n),s=o.startsWith(n);if(r!==s)return r?-1:1;if(r&&s){if(i.lengtho.length)return 1}return 0}(e,t,n);if(r)return r;const s=i.endsWith(n);if(s!==o.endsWith(n))return s?-1:1;const a=function(e,t,n=!1){const i=e||"",o=t||"",r=Xs.value.collator.compare(i,o);return Xs.value.collatorIsNumeric&&0===r&&i!==o?i(e.set(t.item,n),e)),new Map),this.list.splice(0,this.list.length,t),this.list.setFocus([]),this.list.layout(),this._onChangedAllVisibleChecked.fire(this.getAllVisibleChecked()),this._onChangedVisibleCount.fire(t.length),!0}toggleCheckbox(){try{this._fireCheckedEvents=!1;const e=this.list.getFocusedElements(),t=this.allVisibleChecked(e);for(const n of e)n.checked=!t}finally{this._fireCheckedEvents=!0,this.fireCheckedEvents()}}display(e){this.container.style.display=e?"":"none"}isDisplayed(){return"none"!==this.container.style.display}dispose(){this.elementDisposables=(0,ke.B9)(this.elementDisposables),this.disposables=(0,ke.B9)(this.disposables)}fireCheckedEvents(){this._fireCheckedEvents&&(this._onChangedAllVisibleChecked.fire(this.getAllVisibleChecked()),this._onChangedCheckedCount.fire(this.getCheckedCount()),this._onChangedCheckedElements.fire(this.getCheckedElements()))}fireButtonTriggered(e){this._onButtonTriggered.fire(e)}style(e){this.list.style(e)}}ca([ta.H],fa.prototype,"onDidChangeFocus",null),ca([ta.H],fa.prototype,"onDidChangeSelection",null);class _a{getWidgetAriaLabel(){return(0,vn.N)("quickInput","Quick Input")}getAriaLabel(e){return e.saneAriaLabel}getWidgetRole(){return"listbox"}getRole(){return"option"}}var ba=n(4299);const Ca=he.$;class va extends ke.JT{constructor(e){super(),this.parent=e,this.onKeyDown=e=>he.nm(this.inputBox.inputElement,he.tw.KEY_DOWN,(t=>{e(new ln.y(t))})),this.onMouseDown=e=>he.nm(this.inputBox.inputElement,he.tw.MOUSE_DOWN,(t=>{e(new Vr.n(t))})),this.onDidChange=e=>this.inputBox.onDidChange(e),this.container=he.R3(this.parent,Ca(".quick-input-box")),this.inputBox=this._register(new ba.W(this.container,void 0))}get value(){return this.inputBox.value}set value(e){this.inputBox.value=e}select(e=null){this.inputBox.select(e)}isSelectionAtEnd(){return this.inputBox.isSelectionAtEnd()}get placeholder(){return this.inputBox.inputElement.getAttribute("placeholder")||""}set placeholder(e){this.inputBox.setPlaceHolder(e)}get ariaLabel(){return this.inputBox.getAriaLabel()}set ariaLabel(e){this.inputBox.setAriaLabel(e)}get password(){return"password"===this.inputBox.inputElement.type}set password(e){this.inputBox.inputElement.type=e?"password":"text"}setAttribute(e,t){this.inputBox.inputElement.setAttribute(e,t)}removeAttribute(e){this.inputBox.inputElement.removeAttribute(e)}showDecoration(e){e===dn.Z.Ignore?this.inputBox.hideMessage():this.inputBox.showMessage({type:e===dn.Z.Info?1:e===dn.Z.Warning?2:3,content:""})}stylesForType(e){return this.inputBox.stylesForType(e===dn.Z.Info?1:e===dn.Z.Warning?2:3)}setFocus(){this.inputBox.focus()}layout(){this.inputBox.layout()}style(e){this.inputBox.style(e)}}var wa=n(9162),ya=n(4185),Aa={};Aa.styleTagTransform=se(),Aa.setAttributes=ne(),Aa.insert=ee().bind(null,"head"),Aa.domAPI=X(),Aa.insertStyleElement=oe(),G()(ya.Z,Aa),ya.Z&&ya.Z.locals&&ya.Z.locals;const Sa="done",xa="active",ka="infinite",La="discrete",Ea={progressBarBackground:qo.Il.fromHex("#0E70C0")};class Na extends ke.JT{constructor(e,t){super(),this.options=t||Object.create(null),(0,Le.jB)(this.options,Ea,!1),this.workedVal=0,this.progressBarBackground=this.options.progressBarBackground,this._register(this.showDelayedScheduler=new Fe.pY((()=>(0,he.$Z)(this.element)),0)),this.create(e)}create(e){this.element=document.createElement("div"),this.element.classList.add("monaco-progress-container"),this.element.setAttribute("role","progressbar"),this.element.setAttribute("aria-valuemin","0"),e.appendChild(this.element),this.bit=document.createElement("div"),this.bit.classList.add("progress-bit"),this.element.appendChild(this.bit),this.applyStyles()}off(){this.bit.style.width="inherit",this.bit.style.opacity="1",this.element.classList.remove(xa,ka,La),this.workedVal=0,this.totalWork=void 0}stop(){return this.doDone(!1)}doDone(e){return this.element.classList.add(Sa),this.element.classList.contains(ka)?(this.bit.style.opacity="0",e?setTimeout((()=>this.off()),200):this.off()):(this.bit.style.width="inherit",e?setTimeout((()=>this.off()),200):this.off()),this}infinite(){return this.bit.style.width="2%",this.bit.style.opacity="1",this.element.classList.remove(La,Sa),this.element.classList.add(xa,ka),this}getContainer(){return this.element}style(e){this.progressBarBackground=e.progressBarBackground,this.applyStyles()}applyStyles(){if(this.bit){const e=this.progressBarBackground?this.progressBarBackground.toString():"";this.bit.style.backgroundColor=e}}}var Da=n(2013),Ia={};Ia.styleTagTransform=se(),Ia.setAttributes=ne(),Ia.insert=ee().bind(null,"head"),Ia.domAPI=X(),Ia.insertStyleElement=oe(),G()(Da.Z,Ia),Da.Z&&Da.Z.locals&&Da.Z.locals;var Ma=n(553),Ta=n(6811);const Ra={buttonBackground:qo.Il.fromHex("#0E639C"),buttonHoverBackground:qo.Il.fromHex("#006BB3"),buttonForeground:qo.Il.white};class Oa extends ke.JT{constructor(e,t){super(),this._onDidClick=this._register(new z.Q5),this.options=t||Object.create(null),(0,Le.jB)(this.options,Ra,!1),this.buttonForeground=this.options.buttonForeground,this.buttonBackground=this.options.buttonBackground,this.buttonHoverBackground=this.options.buttonHoverBackground,this.buttonSecondaryForeground=this.options.buttonSecondaryForeground,this.buttonSecondaryBackground=this.options.buttonSecondaryBackground,this.buttonSecondaryHoverBackground=this.options.buttonSecondaryHoverBackground,this.buttonBorder=this.options.buttonBorder,this._element=document.createElement("a"),this._element.classList.add("monaco-button"),this._element.tabIndex=0,this._element.setAttribute("role","button"),e.appendChild(this._element),this._register(Ma.o.addTarget(this._element)),[he.tw.CLICK,Ma.t.Tap].forEach((e=>{this._register((0,he.nm)(this._element,e,(e=>{this.enabled?this._onDidClick.fire(e):he.zB.stop(e)})))})),this._register((0,he.nm)(this._element,he.tw.KEY_DOWN,(e=>{const t=new ln.y(e);let n=!1;this.enabled&&(t.equals(3)||t.equals(10))?(this._onDidClick.fire(e),n=!0):t.equals(9)&&(this._element.blur(),n=!0),n&&he.zB.stop(t,!0)}))),this._register((0,he.nm)(this._element,he.tw.MOUSE_OVER,(e=>{this._element.classList.contains("disabled")||this.setHoverBackground()}))),this._register((0,he.nm)(this._element,he.tw.MOUSE_OUT,(e=>{this.applyStyles()}))),this.focusTracker=this._register((0,he.go)(this._element)),this._register(this.focusTracker.onDidFocus((()=>this.setHoverBackground()))),this._register(this.focusTracker.onDidBlur((()=>this.applyStyles()))),this.applyStyles()}get onDidClick(){return this._onDidClick.event}setHoverBackground(){let e;e=this.options.secondary?this.buttonSecondaryHoverBackground?this.buttonSecondaryHoverBackground.toString():null:this.buttonHoverBackground?this.buttonHoverBackground.toString():null,e&&(this._element.style.backgroundColor=e)}style(e){this.buttonForeground=e.buttonForeground,this.buttonBackground=e.buttonBackground,this.buttonHoverBackground=e.buttonHoverBackground,this.buttonSecondaryForeground=e.buttonSecondaryForeground,this.buttonSecondaryBackground=e.buttonSecondaryBackground,this.buttonSecondaryHoverBackground=e.buttonSecondaryHoverBackground,this.buttonBorder=e.buttonBorder,this.applyStyles()}applyStyles(){if(this._element){let e,t;this.options.secondary?(t=this.buttonSecondaryForeground?this.buttonSecondaryForeground.toString():"",e=this.buttonSecondaryBackground?this.buttonSecondaryBackground.toString():""):(t=this.buttonForeground?this.buttonForeground.toString():"",e=this.buttonBackground?this.buttonBackground.toString():"");const n=this.buttonBorder?this.buttonBorder.toString():"";this._element.style.color=t,this._element.style.backgroundColor=e,this._element.style.borderWidth=n?"1px":"",this._element.style.borderStyle=n?"solid":"",this._element.style.borderColor=n}}get element(){return this._element}set label(e){this._element.classList.add("monaco-text-button"),this.options.supportIcons?(0,he.mc)(this._element,...(0,Ta.T)(e)):this._element.textContent=e,"string"==typeof this.options.title?this._element.title=this.options.title:this.options.title&&(this._element.title=e)}set enabled(e){e?(this._element.classList.remove("disabled"),this._element.setAttribute("aria-disabled",String(!1)),this._element.tabIndex=0):(this._element.classList.add("disabled"),this._element.setAttribute("aria-disabled",String(!0)))}get enabled(){return!this._element.classList.contains("disabled")}}var Ba=function(e,t,n,i){return new(n||(n=Promise))((function(o,r){function s(e){try{l(i.next(e))}catch(e){r(e)}}function a(e){try{l(i.throw(e))}catch(e){r(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,a)}l((i=i.apply(e,t||[])).next())}))};const Pa=he.$,Fa={iconClass:(0,Ci.CM)("quick-input-back",Ci.lA.arrowLeft).classNames,tooltip:(0,vn.N)("quickInput.back","Back"),handle:-1};class Wa extends ke.JT{constructor(e){super(),this.ui=e,this.visible=!1,this._enabled=!0,this._busy=!1,this._ignoreFocusOut=!1,this._buttons=[],this.noValidationMessage=Wa.noPromptMessage,this._severity=dn.Z.Ignore,this.buttonsUpdated=!1,this.onDidTriggerButtonEmitter=this._register(new z.Q5),this.onDidHideEmitter=this._register(new z.Q5),this.onDisposeEmitter=this._register(new z.Q5),this.visibleDisposables=this._register(new ke.SL),this.onDidHide=this.onDidHideEmitter.event}get title(){return this._title}set title(e){this._title=e,this.update()}get description(){return this._description}set description(e){this._description=e,this.update()}get step(){return this._steps}set step(e){this._steps=e,this.update()}get totalSteps(){return this._totalSteps}set totalSteps(e){this._totalSteps=e,this.update()}get enabled(){return this._enabled}set enabled(e){this._enabled=e,this.update()}get contextKey(){return this._contextKey}set contextKey(e){this._contextKey=e,this.update()}get busy(){return this._busy}set busy(e){this._busy=e,this.update()}get ignoreFocusOut(){return this._ignoreFocusOut}set ignoreFocusOut(e){const t=this._ignoreFocusOut!==e&&!ze.gn;this._ignoreFocusOut=e&&!ze.gn,t&&this.update()}get buttons(){return this._buttons}set buttons(e){this._buttons=e,this.buttonsUpdated=!0,this.update()}get validationMessage(){return this._validationMessage}set validationMessage(e){this._validationMessage=e,this.update()}get severity(){return this._severity}set severity(e){this._severity=e,this.update()}show(){this.visible||(this.visibleDisposables.add(this.ui.onDidTriggerButton((e=>{-1!==this.buttons.indexOf(e)&&this.onDidTriggerButtonEmitter.fire(e)}))),this.ui.show(this),this.visible=!0,this.update())}hide(){this.visible&&this.ui.hide()}didHide(e=Qs.Jq.Other){this.visible=!1,this.visibleDisposables.clear(),this.onDidHideEmitter.fire({reason:e})}update(){if(!this.visible)return;const e=this.getTitle();e&&this.ui.title.textContent!==e?this.ui.title.textContent=e:e||" "===this.ui.title.innerHTML||(this.ui.title.innerText=" ;");const t=this.getDescription();if(this.ui.description1.textContent!==t&&(this.ui.description1.textContent=t),this.ui.description2.textContent!==t&&(this.ui.description2.textContent=t),this.busy&&!this.busyDelay&&(this.busyDelay=new Fe._F,this.busyDelay.setIfNotSet((()=>{this.visible&&this.ui.progressBar.infinite()}),800)),!this.busy&&this.busyDelay&&(this.ui.progressBar.stop(),this.busyDelay.cancel(),this.busyDelay=void 0),this.buttonsUpdated){this.buttonsUpdated=!1,this.ui.leftActionBar.clear();const e=this.buttons.filter((e=>e===Fa));this.ui.leftActionBar.push(e.map(((e,t)=>{const n=new gi.aU(`id-${t}`,"",e.iconClass||ra(e.iconPath),!0,(()=>Ba(this,void 0,void 0,(function*(){this.onDidTriggerButtonEmitter.fire(e)}))));return n.tooltip=e.tooltip||"",n})),{icon:!0,label:!1}),this.ui.rightActionBar.clear();const t=this.buttons.filter((e=>e!==Fa));this.ui.rightActionBar.push(t.map(((e,t)=>{const n=new gi.aU(`id-${t}`,"",e.iconClass||ra(e.iconPath),!0,(()=>Ba(this,void 0,void 0,(function*(){this.onDidTriggerButtonEmitter.fire(e)}))));return n.tooltip=e.tooltip||"",n})),{icon:!0,label:!1})}this.ui.ignoreFocusOut=this.ignoreFocusOut,this.ui.setEnabled(this.enabled),this.ui.setContextKey(this.contextKey);const n=this.validationMessage||this.noValidationMessage;this._lastValidationMessage!==n&&(this._lastValidationMessage=n,he.mc(this.ui.message,...(0,Ta.T)(n))),this._lastSeverity!==this.severity&&(this._lastSeverity=this.severity,this.showMessageDecoration(this.severity))}getTitle(){return this.title&&this.step?`${this.title} (${this.getSteps()})`:this.title?this.title:this.step?this.getSteps():""}getDescription(){return this.description||""}getSteps(){return this.step&&this.totalSteps?(0,vn.N)("quickInput.steps","{0}/{1}",this.step,this.totalSteps):this.step?String(this.step):""}showMessageDecoration(e){if(this.ui.inputBox.showDecoration(e),e!==dn.Z.Ignore){const t=this.ui.inputBox.stylesForType(e);this.ui.message.style.color=t.foreground?`${t.foreground}`:"",this.ui.message.style.backgroundColor=t.background?`${t.background}`:"",this.ui.message.style.border=t.border?`1px solid ${t.border}`:"",this.ui.message.style.paddingBottom="4px"}else this.ui.message.style.color="",this.ui.message.style.backgroundColor="",this.ui.message.style.border="",this.ui.message.style.paddingBottom=""}dispose(){this.hide(),this.onDisposeEmitter.fire(),super.dispose()}}Wa.noPromptMessage=(0,vn.N)("inputModeEntry","Press 'Enter' to confirm your input or 'Escape' to cancel");class za extends Wa{constructor(){super(...arguments),this._value="",this.onDidChangeValueEmitter=this._register(new z.Q5),this.onWillAcceptEmitter=this._register(new z.Q5),this.onDidAcceptEmitter=this._register(new z.Q5),this.onDidCustomEmitter=this._register(new z.Q5),this._items=[],this.itemsUpdated=!1,this._canSelectMany=!1,this._canAcceptInBackground=!1,this._matchOnDescription=!1,this._matchOnDetail=!1,this._matchOnLabel=!0,this._sortByLabel=!0,this._autoFocusOnList=!0,this._itemActivation=this.ui.isScreenReaderOptimized()?Qs.jG.NONE:Qs.jG.FIRST,this._activeItems=[],this.activeItemsUpdated=!1,this.activeItemsToConfirm=[],this.onDidChangeActiveEmitter=this._register(new z.Q5),this._selectedItems=[],this.selectedItemsUpdated=!1,this.selectedItemsToConfirm=[],this.onDidChangeSelectionEmitter=this._register(new z.Q5),this.onDidTriggerItemButtonEmitter=this._register(new z.Q5),this.valueSelectionUpdated=!0,this._ok="default",this._customButton=!1,this.filterValue=e=>e,this.onDidChangeValue=this.onDidChangeValueEmitter.event,this.onWillAccept=this.onWillAcceptEmitter.event,this.onDidAccept=this.onDidAcceptEmitter.event,this.onDidChangeActive=this.onDidChangeActiveEmitter.event,this.onDidChangeSelection=this.onDidChangeSelectionEmitter.event,this.onDidTriggerItemButton=this.onDidTriggerItemButtonEmitter.event}get quickNavigate(){return this._quickNavigate}set quickNavigate(e){this._quickNavigate=e,this.update()}get value(){return this._value}set value(e){this._value!==e&&(this._value=e||"",this.update(),this.onDidChangeValueEmitter.fire(this._value))}set ariaLabel(e){this._ariaLabel=e,this.update()}get ariaLabel(){return this._ariaLabel}get placeholder(){return this._placeholder}set placeholder(e){this._placeholder=e,this.update()}get items(){return this._items}set items(e){this._items=e,this.itemsUpdated=!0,this.update()}get canSelectMany(){return this._canSelectMany}set canSelectMany(e){this._canSelectMany=e,this.update()}get canAcceptInBackground(){return this._canAcceptInBackground}set canAcceptInBackground(e){this._canAcceptInBackground=e}get matchOnDescription(){return this._matchOnDescription}set matchOnDescription(e){this._matchOnDescription=e,this.update()}get matchOnDetail(){return this._matchOnDetail}set matchOnDetail(e){this._matchOnDetail=e,this.update()}get matchOnLabel(){return this._matchOnLabel}set matchOnLabel(e){this._matchOnLabel=e,this.update()}get sortByLabel(){return this._sortByLabel}set sortByLabel(e){this._sortByLabel=e,this.update()}get autoFocusOnList(){return this._autoFocusOnList}set autoFocusOnList(e){this._autoFocusOnList=e,this.update()}get itemActivation(){return this._itemActivation}set itemActivation(e){this._itemActivation=e}get activeItems(){return this._activeItems}set activeItems(e){this._activeItems=e,this.activeItemsUpdated=!0,this.update()}get selectedItems(){return this._selectedItems}set selectedItems(e){this._selectedItems=e,this.selectedItemsUpdated=!0,this.update()}get keyMods(){return this._quickNavigate?Qs.X5:this.ui.keyMods}set valueSelection(e){this._valueSelection=e,this.valueSelectionUpdated=!0,this.update()}get customButton(){return this._customButton}set customButton(e){this._customButton=e,this.update()}get customLabel(){return this._customButtonLabel}set customLabel(e){this._customButtonLabel=e,this.update()}get customHover(){return this._customButtonHover}set customHover(e){this._customButtonHover=e,this.update()}get ok(){return this._ok}set ok(e){this._ok=e,this.update()}get hideInput(){return!!this._hideInput}set hideInput(e){this._hideInput=e,this.update()}trySelectFirst(){this.autoFocusOnList&&(this.canSelectMany||this.ui.list.focus(ma.First))}show(){this.visible||(this.visibleDisposables.add(this.ui.inputBox.onDidChange((e=>{e!==this.value&&(this._value=e,this.ui.list.filter(this.filterValue(this.ui.inputBox.value))&&this.trySelectFirst(),this.onDidChangeValueEmitter.fire(e))}))),this.visibleDisposables.add(this.ui.inputBox.onMouseDown((e=>{this.autoFocusOnList||this.ui.list.clearFocus()}))),this.visibleDisposables.add((this._hideInput?this.ui.list:this.ui.inputBox).onKeyDown((e=>{switch(e.keyCode){case 18:this.ui.list.focus(ma.Next),this.canSelectMany&&this.ui.list.domFocus(),he.zB.stop(e,!0);break;case 16:this.ui.list.getFocusedElements().length?this.ui.list.focus(ma.Previous):this.ui.list.focus(ma.Last),this.canSelectMany&&this.ui.list.domFocus(),he.zB.stop(e,!0);break;case 12:this.ui.list.focus(ma.NextPage),this.canSelectMany&&this.ui.list.domFocus(),he.zB.stop(e,!0);break;case 11:this.ui.list.focus(ma.PreviousPage),this.canSelectMany&&this.ui.list.domFocus(),he.zB.stop(e,!0);break;case 17:if(!this._canAcceptInBackground)return;if(!this.ui.inputBox.isSelectionAtEnd())return;this.activeItems[0]&&(this._selectedItems=[this.activeItems[0]],this.onDidChangeSelectionEmitter.fire(this.selectedItems),this.handleAccept(!0));break;case 14:!e.ctrlKey&&!e.metaKey||e.shiftKey||e.altKey||(this.ui.list.focus(ma.First),he.zB.stop(e,!0));break;case 13:!e.ctrlKey&&!e.metaKey||e.shiftKey||e.altKey||(this.ui.list.focus(ma.Last),he.zB.stop(e,!0))}}))),this.visibleDisposables.add(this.ui.onDidAccept((()=>{!this.canSelectMany&&this.activeItems[0]&&(this._selectedItems=[this.activeItems[0]],this.onDidChangeSelectionEmitter.fire(this.selectedItems)),this.handleAccept(!1)}))),this.visibleDisposables.add(this.ui.onDidCustom((()=>{this.onDidCustomEmitter.fire()}))),this.visibleDisposables.add(this.ui.list.onDidChangeFocus((e=>{this.activeItemsUpdated||this.activeItemsToConfirm!==this._activeItems&&(0,At.fS)(e,this._activeItems,((e,t)=>e===t))||(this._activeItems=e,this.onDidChangeActiveEmitter.fire(e))}))),this.visibleDisposables.add(this.ui.list.onDidChangeSelection((({items:e,event:t})=>{this.canSelectMany?e.length&&this.ui.list.setSelectedElements([]):this.selectedItemsToConfirm!==this._selectedItems&&(0,At.fS)(e,this._selectedItems,((e,t)=>e===t))||(this._selectedItems=e,this.onDidChangeSelectionEmitter.fire(e),e.length&&this.handleAccept(t instanceof MouseEvent&&1===t.button))}))),this.visibleDisposables.add(this.ui.list.onChangedCheckedElements((e=>{this.canSelectMany&&(this.selectedItemsToConfirm!==this._selectedItems&&(0,At.fS)(e,this._selectedItems,((e,t)=>e===t))||(this._selectedItems=e,this.onDidChangeSelectionEmitter.fire(e)))}))),this.visibleDisposables.add(this.ui.list.onButtonTriggered((e=>this.onDidTriggerItemButtonEmitter.fire(e)))),this.visibleDisposables.add(this.registerQuickNavigation()),this.valueSelectionUpdated=!0),super.show()}handleAccept(e){let t=!1;this.onWillAcceptEmitter.fire({veto:()=>t=!0}),t||this.onDidAcceptEmitter.fire({inBackground:e})}registerQuickNavigation(){return he.nm(this.ui.container,he.tw.KEY_UP,(e=>{if(this.canSelectMany||!this._quickNavigate)return;const t=new ln.y(e),n=t.keyCode;this._quickNavigate.keybindings.some((e=>{const[i,o]=e.getParts();return!(o||(i.shiftKey&&4===n?t.ctrlKey||t.altKey||t.metaKey:!(i.altKey&&6===n||i.ctrlKey&&5===n||i.metaKey&&57===n)))}))&&(this.activeItems[0]&&(this._selectedItems=[this.activeItems[0]],this.onDidChangeSelectionEmitter.fire(this.selectedItems),this.handleAccept(!1)),this._quickNavigate=void 0)}))}update(){if(!this.visible)return;const e=!!this._hideInput&&this._items.length>0;this.ui.container.classList.toggle("hidden-input",e&&!this.description);const t={title:!!this.title||!!this.step||!!this.buttons.length,description:!!this.description,checkAll:this.canSelectMany&&!this._hideCheckAll,checkBox:this.canSelectMany,inputBox:!e,progressBar:!e,visibleCount:!0,count:this.canSelectMany,ok:"default"===this.ok?this.canSelectMany:this.ok,list:!0,message:!!this.validationMessage,customButton:this.customButton};this.ui.setVisibilities(t),super.update(),this.ui.inputBox.value!==this.value&&(this.ui.inputBox.value=this.value),this.valueSelectionUpdated&&(this.valueSelectionUpdated=!1,this.ui.inputBox.select(this._valueSelection&&{start:this._valueSelection[0],end:this._valueSelection[1]})),this.ui.inputBox.placeholder!==(this.placeholder||"")&&(this.ui.inputBox.placeholder=this.placeholder||"");const n=this.ariaLabel||this.placeholder||za.DEFAULT_ARIA_LABEL;if(this.ui.inputBox.ariaLabel!==n&&(this.ui.inputBox.ariaLabel=n),this.ui.list.matchOnDescription=this.matchOnDescription,this.ui.list.matchOnDetail=this.matchOnDetail,this.ui.list.matchOnLabel=this.matchOnLabel,this.ui.list.sortByLabel=this.sortByLabel,this.itemsUpdated)switch(this.itemsUpdated=!1,this.ui.list.setElements(this.items),this.ui.list.filter(this.filterValue(this.ui.inputBox.value)),this.ui.checkAll.checked=this.ui.list.getAllVisibleChecked(),this.ui.visibleCount.setCount(this.ui.list.getVisibleCount()),this.ui.count.setCount(this.ui.list.getCheckedCount()),this._itemActivation){case Qs.jG.NONE:this._itemActivation=Qs.jG.FIRST;break;case Qs.jG.SECOND:this.ui.list.focus(ma.Second),this._itemActivation=Qs.jG.FIRST;break;case Qs.jG.LAST:this.ui.list.focus(ma.Last),this._itemActivation=Qs.jG.FIRST;break;default:this.trySelectFirst()}this.ui.container.classList.contains("show-checkboxes")!==!!this.canSelectMany&&(this.canSelectMany?this.ui.list.clearFocus():this.trySelectFirst()),this.activeItemsUpdated&&(this.activeItemsUpdated=!1,this.activeItemsToConfirm=this._activeItems,this.ui.list.setFocusedElements(this.activeItems),this.activeItemsToConfirm===this._activeItems&&(this.activeItemsToConfirm=null)),this.selectedItemsUpdated&&(this.selectedItemsUpdated=!1,this.selectedItemsToConfirm=this._selectedItems,this.canSelectMany?this.ui.list.setCheckedElements(this.selectedItems):this.ui.list.setSelectedElements(this.selectedItems),this.selectedItemsToConfirm===this._selectedItems&&(this.selectedItemsToConfirm=null)),this.ui.customButton.label=this.customLabel||"",this.ui.customButton.element.title=this.customHover||"",this.ui.setComboboxAccessibility(!0),t.inputBox||(this.ui.list.domFocus(),this.canSelectMany&&this.ui.list.focus(ma.First))}}za.DEFAULT_ARIA_LABEL=(0,vn.N)("quickInputBox.ariaLabel","Type to narrow down results.");class Va extends ke.JT{constructor(e){super(),this.options=e,this.comboboxAccessibility=!1,this.enabled=!0,this.onDidAcceptEmitter=this._register(new z.Q5),this.onDidCustomEmitter=this._register(new z.Q5),this.onDidTriggerButtonEmitter=this._register(new z.Q5),this.keyMods={ctrlCmd:!1,alt:!1},this.controller=null,this.onShowEmitter=this._register(new z.Q5),this.onShow=this.onShowEmitter.event,this.onHideEmitter=this._register(new z.Q5),this.onHide=this.onHideEmitter.event,this.idPrefix=e.idPrefix,this.parentElement=e.container,this.styles=e.styles,this.registerKeyModsListeners()}registerKeyModsListeners(){const e=e=>{this.keyMods.ctrlCmd=e.ctrlKey||e.metaKey,this.keyMods.alt=e.altKey};this._register(he.nm(window,he.tw.KEY_DOWN,e,!0)),this._register(he.nm(window,he.tw.KEY_UP,e,!0)),this._register(he.nm(window,he.tw.MOUSE_DOWN,e,!0))}getUI(){if(this.ui)return this.ui;const e=he.R3(this.parentElement,Pa(".quick-input-widget.show-file-icons"));e.tabIndex=-1,e.style.display="none";const t=he.dS(e),n=he.R3(e,Pa(".quick-input-titlebar")),i=this._register(new hi.o(n));i.domNode.classList.add("quick-input-left-action-bar");const o=he.R3(n,Pa(".quick-input-title")),r=this._register(new hi.o(n));r.domNode.classList.add("quick-input-right-action-bar");const s=he.R3(e,Pa(".quick-input-description")),a=he.R3(e,Pa(".quick-input-header")),l=he.R3(a,Pa("input.quick-input-check-all"));l.type="checkbox",this._register(he.mu(l,he.tw.CHANGE,(e=>{const t=l.checked;y.setAllVisibleChecked(t)}))),this._register(he.nm(l,he.tw.CLICK,(e=>{(e.x||e.y)&&u.setFocus()})));const d=he.R3(a,Pa(".quick-input-description")),c=he.R3(a,Pa(".quick-input-and-message")),h=he.R3(c,Pa(".quick-input-filter")),u=this._register(new va(h));u.setAttribute("aria-describedby",`${this.idPrefix}message`);const g=he.R3(h,Pa(".quick-input-visible-count"));g.setAttribute("aria-live","polite"),g.setAttribute("aria-atomic","true");const p=new wa.Z(g,{countFormat:(0,vn.N)({key:"quickInput.visibleCount",comment:["This tells the user how many items are shown in a list of items to select from. The items can be anything. Currently not visible, but read by screen readers."]},"{0} Results")}),m=he.R3(h,Pa(".quick-input-count"));m.setAttribute("aria-live","polite");const f=new wa.Z(m,{countFormat:(0,vn.N)({key:"quickInput.countSelected",comment:["This tells the user how many items are selected in a list of items to select from. The items can be anything."]},"{0} Selected")}),_=he.R3(a,Pa(".quick-input-action")),b=new Oa(_);b.label=(0,vn.N)("ok","OK"),this._register(b.onDidClick((e=>{this.onDidAcceptEmitter.fire()})));const C=he.R3(a,Pa(".quick-input-action")),v=new Oa(C);v.label=(0,vn.N)("custom","Custom"),this._register(v.onDidClick((e=>{this.onDidCustomEmitter.fire()})));const w=he.R3(c,Pa(`#${this.idPrefix}message.quick-input-message`)),y=this._register(new fa(e,this.idPrefix+"list",this.options));this._register(y.onChangedAllVisibleChecked((e=>{l.checked=e}))),this._register(y.onChangedVisibleCount((e=>{p.setCount(e)}))),this._register(y.onChangedCheckedCount((e=>{f.setCount(e)}))),this._register(y.onLeave((()=>{setTimeout((()=>{u.setFocus(),this.controller instanceof za&&this.controller.canSelectMany&&y.clearFocus()}),0)}))),this._register(y.onDidChangeFocus((()=>{this.comboboxAccessibility&&this.getUI().inputBox.setAttribute("aria-activedescendant",this.getUI().list.getActiveDescendant()||"")})));const A=new Na(e);A.getContainer().classList.add("quick-input-progress");const S=he.go(e);return this._register(S),this._register(he.nm(e,he.tw.FOCUS,(e=>{this.previousFocusElement=e.relatedTarget instanceof HTMLElement?e.relatedTarget:void 0}),!0)),this._register(S.onDidBlur((()=>{this.getUI().ignoreFocusOut||this.options.ignoreFocusOut()||this.hide(Qs.Jq.Blur),this.previousFocusElement=void 0}))),this._register(he.nm(e,he.tw.FOCUS,(e=>{u.setFocus()}))),this._register(he.nm(e,he.tw.KEY_DOWN,(t=>{const n=new ln.y(t);switch(n.keyCode){case 3:he.zB.stop(t,!0),this.onDidAcceptEmitter.fire();break;case 9:he.zB.stop(t,!0),this.hide(Qs.Jq.Gesture);break;case 2:if(!n.altKey&&!n.ctrlKey&&!n.metaKey){const i=[".action-label.codicon"];e.classList.contains("show-checkboxes")?i.push("input"):i.push("input[type=text]"),this.getUI().list.isDisplayed()&&i.push(".monaco-list");const o=e.querySelectorAll(i.join(", "));n.shiftKey&&n.target===o[0]?(he.zB.stop(t,!0),o[o.length-1].focus()):n.shiftKey||n.target!==o[o.length-1]||(he.zB.stop(t,!0),o[0].focus())}}}))),this.ui={container:e,styleSheet:t,leftActionBar:i,titleBar:n,title:o,description1:s,description2:d,rightActionBar:r,checkAll:l,filterContainer:h,inputBox:u,visibleCountContainer:g,visibleCount:p,countContainer:m,count:f,okContainer:_,ok:b,message:w,customButtonContainer:C,customButton:v,list:y,progressBar:A,onDidAccept:this.onDidAcceptEmitter.event,onDidCustom:this.onDidCustomEmitter.event,onDidTriggerButton:this.onDidTriggerButtonEmitter.event,ignoreFocusOut:!1,keyMods:this.keyMods,isScreenReaderOptimized:()=>this.options.isScreenReaderOptimized(),show:e=>this.show(e),hide:()=>this.hide(),setVisibilities:e=>this.setVisibilities(e),setComboboxAccessibility:e=>this.setComboboxAccessibility(e),setEnabled:e=>this.setEnabled(e),setContextKey:e=>this.options.setContextKey(e)},this.updateStyles(),this.ui}pick(e,t={},n=W.T.None){return new Promise(((i,o)=>{let r=e=>{r=i,t.onKeyMods&&t.onKeyMods(s.keyMods),i(e)};if(n.isCancellationRequested)return void r(void 0);const s=this.createQuickPick();let a;const l=[s,s.onDidAccept((()=>{if(s.canSelectMany)r(s.selectedItems.slice()),s.hide();else{const e=s.activeItems[0];e&&(r(e),s.hide())}})),s.onDidChangeActive((e=>{const n=e[0];n&&t.onDidFocus&&t.onDidFocus(n)})),s.onDidChangeSelection((e=>{if(!s.canSelectMany){const t=e[0];t&&(r(t),s.hide())}})),s.onDidTriggerItemButton((e=>t.onDidTriggerItemButton&&t.onDidTriggerItemButton(Object.assign(Object.assign({},e),{removeItem:()=>{const t=s.items.indexOf(e.item);if(-1!==t){const e=s.items.slice(),n=e.splice(t,1),i=s.activeItems.filter((e=>e!==n[0]));s.items=e,i&&(s.activeItems=i)}}})))),s.onDidChangeValue((e=>{!a||e||1===s.activeItems.length&&s.activeItems[0]===a||(s.activeItems=[a])})),n.onCancellationRequested((()=>{s.hide()})),s.onDidHide((()=>{(0,ke.B9)(l),r(void 0)}))];s.title=t.title,s.canSelectMany=!!t.canPickMany,s.placeholder=t.placeHolder,s.ignoreFocusOut=!!t.ignoreFocusLost,s.matchOnDescription=!!t.matchOnDescription,s.matchOnDetail=!!t.matchOnDetail,s.matchOnLabel=void 0===t.matchOnLabel||t.matchOnLabel,s.autoFocusOnList=void 0===t.autoFocusOnList||t.autoFocusOnList,s.quickNavigate=t.quickNavigate,s.contextKey=t.contextKey,s.busy=!0,Promise.all([e,t.activeItem]).then((([e,t])=>{a=t,s.busy=!1,s.items=e,s.canSelectMany&&(s.selectedItems=e.filter((e=>"separator"!==e.type&&e.picked))),a&&(s.activeItems=[a])})),s.show(),Promise.resolve(e).then(void 0,(e=>{o(e),s.hide()}))}))}createQuickPick(){const e=this.getUI();return new za(e)}show(e){const t=this.getUI();this.onShowEmitter.fire();const n=this.controller;this.controller=e,n&&n.didHide(),this.setEnabled(!0),t.leftActionBar.clear(),t.title.textContent="",t.description1.textContent="",t.description2.textContent="",t.rightActionBar.clear(),t.checkAll.checked=!1,t.inputBox.placeholder="",t.inputBox.password=!1,t.inputBox.showDecoration(dn.Z.Ignore),t.visibleCount.setCount(0),t.count.setCount(0),he.mc(t.message),t.progressBar.stop(),t.list.setElements([]),t.list.matchOnDescription=!1,t.list.matchOnDetail=!1,t.list.matchOnLabel=!0,t.list.sortByLabel=!0,t.ignoreFocusOut=!1,this.setComboboxAccessibility(!1),t.inputBox.ariaLabel="";const i=this.options.backKeybindingLabel();Fa.tooltip=i?(0,vn.N)("quickInput.backWithKeybinding","Back ({0})",i):(0,vn.N)("quickInput.back","Back"),t.container.style.display="",this.updateLayout(),t.inputBox.setFocus()}setVisibilities(e){const t=this.getUI();t.title.style.display=e.title?"":"none",t.description1.style.display=e.description&&(e.inputBox||e.checkAll)?"":"none",t.description2.style.display=!e.description||e.inputBox||e.checkAll?"none":"",t.checkAll.style.display=e.checkAll?"":"none",t.filterContainer.style.display=e.inputBox?"":"none",t.visibleCountContainer.style.display=e.visibleCount?"":"none",t.countContainer.style.display=e.count?"":"none",t.okContainer.style.display=e.ok?"":"none",t.customButtonContainer.style.display=e.customButton?"":"none",t.message.style.display=e.message?"":"none",t.progressBar.getContainer().style.display=e.progressBar?"":"none",t.list.display(!!e.list),t.container.classList[e.checkBox?"add":"remove"]("show-checkboxes"),this.updateLayout()}setComboboxAccessibility(e){if(e!==this.comboboxAccessibility){const t=this.getUI();this.comboboxAccessibility=e,this.comboboxAccessibility?(t.inputBox.setAttribute("role","combobox"),t.inputBox.setAttribute("aria-haspopup","true"),t.inputBox.setAttribute("aria-autocomplete","list"),t.inputBox.setAttribute("aria-activedescendant",t.list.getActiveDescendant()||"")):(t.inputBox.removeAttribute("role"),t.inputBox.removeAttribute("aria-haspopup"),t.inputBox.removeAttribute("aria-autocomplete"),t.inputBox.removeAttribute("aria-activedescendant"))}}setEnabled(e){if(e!==this.enabled){this.enabled=e;for(const t of this.getUI().leftActionBar.viewItems)t.getAction().enabled=e;for(const t of this.getUI().rightActionBar.viewItems)t.getAction().enabled=e;this.getUI().checkAll.disabled=!e,this.getUI().ok.enabled=e,this.getUI().list.enabled=e}}hide(e){var t;const n=this.controller;if(n){const i=!(null===(t=this.ui)||void 0===t?void 0:t.container.contains(document.activeElement));this.controller=null,this.onHideEmitter.fire(),this.getUI().container.style.display="none",i||(this.previousFocusElement&&this.previousFocusElement.offsetParent?(this.previousFocusElement.focus(),this.previousFocusElement=void 0):this.options.returnFocus()),n.didHide(e)}}layout(e,t){this.dimension=e,this.titleBarOffset=t,this.updateLayout()}updateLayout(){if(this.ui){this.ui.container.style.top=`${this.titleBarOffset}px`;const e=this.ui.container.style,t=Math.min(.62*this.dimension.width,Va.MAX_WIDTH);e.width=t+"px",e.marginLeft="-"+t/2+"px",this.ui.inputBox.layout(),this.ui.list.layout(this.dimension&&.4*this.dimension.height)}}applyStyles(e){this.styles=e,this.updateStyles()}updateStyles(){if(this.ui){const{quickInputTitleBackground:e,quickInputBackground:t,quickInputForeground:n,contrastBorder:i,widgetShadow:o}=this.styles.widget;this.ui.titleBar.style.backgroundColor=e?e.toString():"",this.ui.container.style.backgroundColor=t?t.toString():"",this.ui.container.style.color=n?n.toString():"",this.ui.container.style.border=i?`1px solid ${i}`:"",this.ui.container.style.boxShadow=o?`0 0 8px 2px ${o}`:"",this.ui.inputBox.style(this.styles.inputBox),this.ui.count.style(this.styles.countBadge),this.ui.ok.style(this.styles.button),this.ui.customButton.style(this.styles.button),this.ui.progressBar.style(this.styles.progressBar),this.ui.list.style(this.styles.list);const r=[];this.styles.list.pickerGroupBorder&&r.push(`.quick-input-list .quick-input-list-entry { border-top-color: ${this.styles.list.pickerGroupBorder}; }`),this.styles.list.pickerGroupForeground&&r.push(`.quick-input-list .quick-input-list-separator { color: ${this.styles.list.pickerGroupForeground}; }`),(this.styles.keybindingLabel.keybindingLabelBackground||this.styles.keybindingLabel.keybindingLabelBorder||this.styles.keybindingLabel.keybindingLabelBottomBorder||this.styles.keybindingLabel.keybindingLabelShadow||this.styles.keybindingLabel.keybindingLabelForeground)&&(r.push(".quick-input-list .monaco-keybinding > .monaco-keybinding-key {"),this.styles.keybindingLabel.keybindingLabelBackground&&r.push(`background-color: ${this.styles.keybindingLabel.keybindingLabelBackground};`),this.styles.keybindingLabel.keybindingLabelBorder&&r.push(`border-color: ${this.styles.keybindingLabel.keybindingLabelBorder};`),this.styles.keybindingLabel.keybindingLabelBottomBorder&&r.push(`border-bottom-color: ${this.styles.keybindingLabel.keybindingLabelBottomBorder};`),this.styles.keybindingLabel.keybindingLabelShadow&&r.push(`box-shadow: inset 0 -1px 0 ${this.styles.keybindingLabel.keybindingLabelShadow};`),this.styles.keybindingLabel.keybindingLabelForeground&&r.push(`color: ${this.styles.keybindingLabel.keybindingLabelForeground};`),r.push("}"));const s=r.join("\n");s!==this.ui.styleSheet.textContent&&(this.ui.styleSheet.textContent=s)}}}Va.MAX_WIDTH=600;var Ha=n(1157),ja=n(725),$a=n(8289),Ua=function(e,t){return function(n,i){t(n,i,e)}};let Za=class extends ke.JT{constructor(e,t){super(),this.quickInputService=e,this.instantiationService=t,this.registry=Ho.B.as(ja.IP.Quickaccess),this.mapProviderToDescriptor=new Map,this.lastAcceptedPickerValues=new Map,this.visibleQuickAccess=void 0}show(e="",t){this.doShowOrPick(e,!1,t)}doShowOrPick(e,t,n){var i;const[o,r]=this.getOrInstantiateProvider(e),s=this.visibleQuickAccess,a=null==s?void 0:s.descriptor;if(s&&r&&a===r)return e===r.prefix||(null==n?void 0:n.preserveValue)||(s.picker.value=e),void this.adjustValueSelection(s.picker,r,n);if(r&&!(null==n?void 0:n.preserveValue)){let t;if(s&&a&&a!==r){const e=s.value.substr(a.prefix.length);e&&(t=`${r.prefix}${e}`)}if(!t){const e=null==o?void 0:o.defaultFilterValue;e===ja.Ry.LAST?t=this.lastAcceptedPickerValues.get(r):"string"==typeof e&&(t=`${r.prefix}${e}`)}"string"==typeof t&&(e=t)}const l=new ke.SL,d=l.add(this.quickInputService.createQuickPick());let c,h;d.value=e,this.adjustValueSelection(d,r,n),d.placeholder=null==r?void 0:r.placeholder,d.quickNavigate=null==n?void 0:n.quickNavigateConfiguration,d.hideInput=!!d.quickNavigate&&!s,("number"==typeof(null==n?void 0:n.itemActivation)||(null==n?void 0:n.quickNavigateConfiguration))&&(d.itemActivation=null!==(i=null==n?void 0:n.itemActivation)&&void 0!==i?i:Ha.jG.SECOND),d.contextKey=null==r?void 0:r.contextKey,d.filterValue=e=>e.substring(r?r.prefix.length:0),(null==r?void 0:r.placeholder)&&(d.ariaLabel=null==r?void 0:r.placeholder),t&&(c=new Promise((e=>h=e)),l.add((0,$a.I)(d.onWillAccept)((e=>{e.veto(),d.hide()})))),l.add(this.registerPickerListeners(d,o,r,e));const u=l.add(new W.A);return o&&l.add(o.provide(d,u.token)),(0,$a.I)(d.onDidHide)((()=>{0===d.selectedItems.length&&u.cancel(),l.dispose(),null==h||h(d.selectedItems)})),d.show(),t?c:void 0}adjustValueSelection(e,t,n){var i;let o;o=(null==n?void 0:n.preserveValue)?[e.value.length,e.value.length]:[null!==(i=null==t?void 0:t.prefix.length)&&void 0!==i?i:0,e.value.length],e.valueSelection=o}registerPickerListeners(e,t,n,i){const o=new ke.SL,r=this.visibleQuickAccess={picker:e,descriptor:n,value:i};return o.add((0,ke.OF)((()=>{r===this.visibleQuickAccess&&(this.visibleQuickAccess=void 0)}))),o.add(e.onDidChangeValue((e=>{const[n]=this.getOrInstantiateProvider(e);n!==t?this.show(e,{preserveValue:!0}):r.value=e}))),n&&o.add(e.onDidAccept((()=>{this.lastAcceptedPickerValues.set(n,e.value)}))),o}getOrInstantiateProvider(e){const t=this.registry.getQuickAccessProvider(e);if(!t)return[void 0,void 0];let n=this.mapProviderToDescriptor.get(t);return n||(n=this.instantiationService.createInstance(t.ctor),this.mapProviderToDescriptor.set(t,n)),[n,t]}};Za=function(e,t,n,i){var o,r=arguments.length,s=r<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,i);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,n,s):o(t,n))||s);return r>3&&s&&Object.defineProperty(t,n,s),s}([Ua(0,Ha.eJ),Ua(1,Ri.TG)],Za);var Ka=function(e,t){return function(n,i){t(n,i,e)}};let qa=class extends bi.bB{constructor(e,t,n,i,o){super(n),this.instantiationService=e,this.contextKeyService=t,this.accessibilityService=i,this.layoutService=o,this.contexts=new Map}get controller(){return this._controller||(this._controller=this._register(this.createController())),this._controller}get quickAccess(){return this._quickAccess||(this._quickAccess=this._register(this.instantiationService.createInstance(Za))),this._quickAccess}createController(e=this.layoutService,t){var n,i;const o={idPrefix:"quickInput_",container:e.container,ignoreFocusOut:()=>!1,isScreenReaderOptimized:()=>this.accessibilityService.isScreenReaderOptimized(),backKeybindingLabel:()=>{},setContextKey:e=>this.setContextKey(e),returnFocus:()=>e.focus(),createList:(e,t,n,i,o)=>this.instantiationService.createInstance(ps.ev,e,t,n,i,o),styles:this.computeStyles()},r=this._register(new Va(Object.assign(Object.assign({},o),t)));return r.layout(e.dimension,null!==(i=null===(n=e.offset)||void 0===n?void 0:n.top)&&void 0!==i?i:0),this._register(e.onDidLayout((t=>{var n,i;return r.layout(t,null!==(i=null===(n=e.offset)||void 0===n?void 0:n.top)&&void 0!==i?i:0)}))),this._register(r.onShow((()=>this.resetContextKeys()))),this._register(r.onHide((()=>this.resetContextKeys()))),r}setContextKey(e){let t;e&&(t=this.contexts.get(e),t||(t=new fi.uy(e,!1).bindTo(this.contextKeyService),this.contexts.set(e,t))),t&&t.get()||(this.resetContextKeys(),t&&t.set(!0))}resetContextKeys(){this.contexts.forEach((e=>{e.get()&&e.reset()}))}pick(e,t={},n=W.T.None){return this.controller.pick(e,t,n)}createQuickPick(){return this.controller.createQuickPick()}updateStyles(){this.controller.applyStyles(this.computeStyles())}computeStyles(){return{widget:Object.assign({},(0,Jr.o)(this.theme,{quickInputBackground:_i.zK,quickInputForeground:_i.tZ,quickInputTitleBackground:_i.lo,contrastBorder:_i.lR,widgetShadow:_i.rh})),inputBox:(0,Jr.o)(this.theme,{inputForeground:_i.zJ,inputBackground:_i.sE,inputBorder:_i.dt,inputValidationInfoBackground:_i._l,inputValidationInfoForeground:_i.YI,inputValidationInfoBorder:_i.EP,inputValidationWarningBackground:_i.RV,inputValidationWarningForeground:_i.SU,inputValidationWarningBorder:_i.C3,inputValidationErrorBackground:_i.p,inputValidationErrorForeground:_i._t,inputValidationErrorBorder:_i.OZ}),countBadge:(0,Jr.o)(this.theme,{badgeBackground:_i.g8,badgeForeground:_i.qe,badgeBorder:_i.lR}),button:(0,Jr.o)(this.theme,{buttonForeground:_i.j5,buttonBackground:_i.b7,buttonHoverBackground:_i.GO,buttonBorder:_i.lR}),progressBar:(0,Jr.o)(this.theme,{progressBarBackground:_i.zR}),keybindingLabel:(0,Jr.o)(this.theme,{keybindingLabelBackground:_i.oQ,keybindingLabelForeground:_i.lW,keybindingLabelBorder:_i.AW,keybindingLabelBottomBorder:_i.K1,keybindingLabelShadow:_i.rh}),list:(0,Jr.o)(this.theme,{listBackground:_i.zK,listInactiveFocusForeground:_i.NP,listInactiveSelectionIconForeground:_i.cb,listInactiveFocusBackground:_i.Vq,listFocusOutline:_i.xL,listInactiveFocusOutline:_i.xL,pickerGroupBorder:_i.op,pickerGroupForeground:_i.kJ})}}};qa=function(e,t,n,i){var o,r=arguments.length,s=r<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,i);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,n,s):o(t,n))||s);return r>3&&s&&Object.defineProperty(t,n,s),s}([Ka(0,Ri.TG),Ka(1,fi.i6),Ka(2,bi.XE),Ka(3,fo.F),Ka(4,os)],qa);var Ya=function(e,t,n,i){var o,r=arguments.length,s=r<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,i);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,n,s):o(t,n))||s);return r>3&&s&&Object.defineProperty(t,n,s),s},Ga=function(e,t){return function(n,i){t(n,i,e)}};let Qa=class extends qa{constructor(e,t,n,i,o,r){super(t,n,i,o,r),this.host=void 0;const s=Ja.get(e);this.host={_serviceBrand:void 0,get container(){return s.widget.getDomNode()},get dimension(){return e.getLayoutInfo()},get onDidLayout(){return e.onDidLayoutChange},focus:()=>e.focus()}}createController(){return super.createController(this.host)}};Qa=Ya([Ga(1,Ri.TG),Ga(2,fi.i6),Ga(3,bi.XE),Ga(4,fo.F),Ga(5,os)],Qa);let Xa=class{constructor(e,t){this.instantiationService=e,this.codeEditorService=t,this.mapEditorToService=new Map}get activeService(){const e=this.codeEditorService.getFocusedCodeEditor();if(!e)throw new Error("Quick input service needs a focused editor to work.");let t=this.mapEditorToService.get(e);if(!t){const n=t=this.instantiationService.createInstance(Qa,e);this.mapEditorToService.set(e,t),(0,$a.I)(e.onDidDispose)((()=>{n.dispose(),this.mapEditorToService.delete(e)}))}return t}get quickAccess(){return this.activeService.quickAccess}pick(e,t={},n=W.T.None){return this.activeService.pick(e,t,n)}createQuickPick(){return this.activeService.createQuickPick()}};Xa=Ya([Ga(0,Ri.TG),Ga(1,ce.$)],Xa);class Ja{constructor(e){this.editor=e,this.widget=new el(this.editor)}static get(e){return e.getContribution(Ja.ID)}dispose(){this.widget.dispose()}}Ja.ID="editor.controller.quickInput";class el{constructor(e){this.codeEditor=e,this.domNode=document.createElement("div"),this.codeEditor.addOverlayWidget(this)}getId(){return el.ID}getDomNode(){return this.domNode}getPosition(){return{preference:2}}dispose(){this.codeEditor.removeOverlayWidget(this)}}var tl;el.ID="editor.contrib.quickInputWidget",(0,pi._K)(Ja.ID,Ja),function(e){const t=new Oi.y;class n{constructor(e,t){this._serviceId=e,this._factory=t,this._value=null}get id(){return this._serviceId}get(e){if(!this._value){if(e&&(this._value=e[this._serviceId.toString()]),this._value||(this._value=this._factory(e)),!this._value)throw new Error("Service "+this._serviceId+" is missing!");t.set(this._serviceId,this._value)}return this._value}}e.LazyStaticService=n;let i=[];function o(e,t){let o=new n(e,t);return i.push(o),o}e.init=function(e){let t=new Oi.y;for(const[e,n]of(0,Es.d)())t.set(e,n);for(let n in e)e.hasOwnProperty(n)&&t.set((0,Ri.yh)(n),e[n]);i.forEach((n=>t.set(n.id,n.get(e))));let n=new hs(t,!0);return t.set(Ri.TG,n),[t,n]},e.instantiationService=o(Ri.TG,(()=>new hs(t,!0)));const r=new Un;e.configurationService=o(pn.Ui,(()=>r)),e.resourceConfigurationService=o(yt.V,(()=>new Zn(r))),e.resourcePropertiesService=o(yt.y,(()=>new Kn(r))),e.contextService=o(Mn.ec,(()=>new Yn)),e.labelService=o(gs.e,(()=>new Xn)),e.telemetryService=o(ts.b,(()=>new qn)),e.dialogService=o(ss.S,(()=>new zn)),e.notificationService=o(In.lT,(()=>new Vn)),e.markerService=o(ms.lT,(()=>new bs)),e.modeService=o(Be.h,(e=>new Zo)),e.standaloneThemeService=o(go.Z,(()=>new mr)),e.logService=o(St.VZ,(()=>new St.$V(new St.kw))),e.undoRedoService=o(Ts.tJ,(t=>new Us(e.dialogService.get(t),e.notificationService.get(t)))),e.modelService=o(wt.q,(t=>new Ko.BR(e.configurationService.get(t),e.resourcePropertiesService.get(t),e.standaloneThemeService.get(t),e.logService.get(t),e.undoRedoService.get(t)))),e.markerDecorationsService=o(Ss.i,(t=>new Ls(e.modelService.get(t),e.markerService.get(t)))),e.contextKeyService=o(fi.i6,(t=>new kr(e.configurationService.get(t)))),e.codeEditorService=o(ce.$,(t=>new No(null,e.contextKeyService.get(t),e.standaloneThemeService.get(t)))),e.editorProgressService=o(Vi.e,(()=>new Wn)),e.storageService=o(Cs.Uy,(()=>new Cs.vm)),e.editorWorkerService=o(Oe.p,(t=>new Et(e.modelService.get(t),e.resourceConfigurationService.get(t),e.logService.get(t))))}(tl||(tl={}));class nl extends ke.JT{constructor(e,t){super();const[n,i]=tl.init(t);this._serviceCollection=n,this._instantiationService=i;const o=this.get(pn.Ui),r=this.get(In.lT),s=this.get(ts.b),a=this.get(bi.XE),l=this.get(St.VZ),d=this.get(fi.i6);let c=(e,n)=>{let i=null;return t&&(i=t[e.toString()]),i||(i=n()),this._serviceCollection.set(e,i),i};c(fo.F,(()=>new Ds(d,o))),c(ps.Lw,(()=>new ps.XN(a)));let h=c(_e.H,(()=>new Hn(this._instantiationService))),u=c(mo.d,(()=>this._register(new jn(d,h,s,r,l,e)))),g=c(os,(()=>new Jn(tl.codeEditorService.get(ce.$),e)));c(Ha.eJ,(()=>new Xa(i,tl.codeEditorService.get(ce.$))));let p=c(Bi.u,(()=>this._register(new rs(g))));c(zi.p,(()=>new Ms)),c(Bi.i,(()=>{const e=new is(s,r,p,u,a);return e.configure({blockMouse:!1}),this._register(e)})),c(po.co,(()=>new ys(h))),c(hn.vu,(()=>new Qn(tl.modelService.get(wt.q))))}get(e){let t=this._serviceCollection.get(e);if(!t)throw new Error("Missing service "+e);return t}set(e,t){this._serviceCollection.set(e,t)}has(e){return this._serviceCollection.has(e)}}function il(e,t,n){let i=new nl(e,t),o=null;i.has(Pe.S)||(o=new Fn(tl.modelService.get()),i.set(Pe.S,o)),i.has(be.v4)||i.set(be.v4,new Se(i.get(ce.$),i.get(_e.H)));let r=n(i);return o&&o.setEditor(r),r}function ol(e,t){return"boolean"==typeof e?e:t}function rl(e,t){return"string"==typeof e?e:t}function sl(e,t=!1){t&&(e=e.map((function(e){return e.toLowerCase()})));const n=function(e){const t={};for(const n of e)t[n]=!0;return t}(e);return t?function(e){return void 0!==n[e.toLowerCase()]&&n.hasOwnProperty(e.toLowerCase())}:function(e){return void 0!==n[e]&&n.hasOwnProperty(e)}}function al(e,t){t=t.replace(/@@/g,"");let n,i=0;do{n=!1,t=t.replace(/@(\w+)/g,(function(i,o){n=!0;let r="";if("string"==typeof e[o])r=e[o];else{if(!(e[o]&&e[o]instanceof RegExp))throw void 0===e[o]?Ut(e,"language definition does not contain attribute '"+o+"', used at: "+t):Ut(e,"attribute reference '"+o+"' must be a string, used at: "+t);r=e[o].source}return Ht(r)?"":"(?:"+r+")"})),i++}while(n&&i<5);t=t.replace(/\x01/g,"@");let o=(e.ignoreCase?"i":"")+(e.unicode?"u":"");return new RegExp(t,o)}function ll(e,t,n,i){let o=-1,r=n,s=n.match(/^\$(([sS]?)(\d\d?)|#)(.*)$/);s&&(s[3]&&(o=parseInt(s[3]),s[2]&&(o+=100)),r=s[4]);let a,l="~",d=r;if(r&&0!==r.length?/^\w*$/.test(d)?l="==":(s=r.match(/^(@|!@|~|!~|==|!=)(.*)$/),s&&(l=s[1],d=s[2])):(l="!=",d=""),"~"!==l&&"!~"!==l||!/^(\w|\|)*$/.test(d))if("@"===l||"!@"===l){let n=e[d];if(!n)throw Ut(e,"the @ match target '"+d+"' is not defined, in rule: "+t);if(!function(e,t){if(!t)return!1;if(!Array.isArray(t))return!1;for(const e of t)if("string"!=typeof e)return!1;return!0}(0,n))throw Ut(e,"the @ match target '"+d+"' must be an array of strings, in rule: "+t);let i=sl(n,e.ignoreCase);a=function(e){return"@"===l?i(e):!i(e)}}else if("~"===l||"!~"===l)if(d.indexOf("$")<0){let t=al(e,"^"+d+"$");a=function(e){return"~"===l?t.test(e):!t.test(e)}}else a=function(t,n,i,o){return al(e,"^"+Zt(e,d,n,i,o)+"$").test(t)};else if(d.indexOf("$")<0){let t=jt(e,d);a=function(e){return"=="===l?e===t:e!==t}}else{let t=jt(e,d);a=function(n,i,o,r,s){let a=Zt(e,t,i,o,r);return"=="===l?n===a:n!==a}}else{let t=sl(d.split("|"),e.ignoreCase);a=function(e){return"~"===l?t(e):!t(e)}}return-1===o?{name:n,value:i,test:function(e,t,n,i){return a(e,e,t,n,i)}}:{name:n,value:i,test:function(e,t,n,i){let r=function(e,t,n,i){if(i<0)return e;if(i=100){i-=100;let e=n.split(".");if(e.unshift(n),i=0&&(i.tokenSubst=!0),"string"==typeof n.bracket)if("@open"===n.bracket)i.bracket=1;else{if("@close"!==n.bracket)throw Ut(e,"a 'bracket' attribute must be either '@open' or '@close', in rule: "+t);i.bracket=-1}if(n.next){if("string"!=typeof n.next)throw Ut(e,"the next state must be a string value in rule: "+t);{let o=n.next;if(!/^(@pop|@push|@popall)$/.test(o)&&("@"===o[0]&&(o=o.substr(1)),o.indexOf("$")<0&&!function(e,t){let n=t;for(;n&&n.length>0;){if(e.stateNames[n])return!0;const t=n.lastIndexOf(".");n=t<0?null:n.substr(0,t)}return!1}(e,Zt(e,o,"",[],""))))throw Ut(e,"the next state '"+n.next+"' is not defined in rule: "+t);i.next=o}}return"number"==typeof n.goBack&&(i.goBack=n.goBack),"string"==typeof n.switchTo&&(i.switchTo=n.switchTo),"string"==typeof n.log&&(i.log=n.log),"string"==typeof n.nextEmbedded&&(i.nextEmbedded=n.nextEmbedded,e.usesEmbedded=!0),i}}if(Array.isArray(n)){let i=[];for(let o=0,r=n.length;o0&&"^"===n[0],this.name=this.name+": "+n,this.regex=al(e,"^(?:"+(this.matchOnlyAtLineStart?n.substr(1):n)+")")}setAction(e,t){this.action=dl(e,this.name,t)}}class hl{constructor(e,t){this._languageIdentifier=e,this._actual=t}getInitialState(){return this._actual.getInitialState()}tokenize(e,t,n,i){if("function"==typeof this._actual.tokenize)return ul.adaptTokenize(this._languageIdentifier.language,this._actual,e,n,i);throw new Error("Not supported!")}tokenize2(e,t,n){let i=this._actual.tokenizeEncoded(e,n);return new Z.Hi(i.tokens,i.endState)}}class ul{constructor(e,t,n){this._standaloneThemeService=e,this._languageIdentifier=t,this._actual=n}getInitialState(){return this._actual.getInitialState()}static _toClassicTokens(e,t,n){let i=[],o=0;for(let r=0,s=e.length;r0&&o[r-1]===d)continue;let c=l.startIndex;0===a?c=0:cPromise.resolve(e[0])));const fl=q();fl.editor={create:function(e,t,n){return il(e,n||{},(n=>new Bo(e,t,n,n.get(Ri.TG),n.get(ce.$),n.get(_e.H),n.get(fi.i6),n.get(mo.d),n.get(Bi.u),n.get(go.Z),n.get(In.lT),n.get(pn.Ui),n.get(fo.F),n.get(wt.q),n.get(Be.h))))},onDidCreateEditor:function(e){return tl.codeEditorService.get().onCodeEditorAdd((t=>{e(t)}))},createDiffEditor:function(e,t,n){return il(e,n||{},(n=>new Po(e,t,n,n.get(Ri.TG),n.get(fi.i6),n.get(mo.d),n.get(Bi.u),n.get(Oe.p),n.get(ce.$),n.get(go.Z),n.get(In.lT),n.get(pn.Ui),n.get(Bi.i),n.get(Vi.e),n.get(zi.p))))},createDiffNavigator:function(e,t){return new Ne(e,t)},createModel:function(e,t,n){return Fo(tl.modelService.get(),tl.modeService.get(),e,t,n)},setModelLanguage:function(e,t){tl.modelService.get().setMode(e,tl.modeService.get().create(t))},setModelMarkers:function(e,t,n){e&&tl.markerService.get().changeOne(t,e.uri,n)},getModelMarkers:function(e){return tl.markerService.get().read(e)},onDidChangeMarkers:function(e){return tl.markerService.get().onMarkerChanged(e)},getModels:function(){return tl.modelService.get().getModels()},getModel:function(e){return tl.modelService.get().getModel(e)},onDidCreateModel:function(e){return tl.modelService.get().onModelAdded(e)},onWillDisposeModel:function(e){return tl.modelService.get().onModelRemoved(e)},onDidChangeModelLanguage:function(e){return tl.modelService.get().onModelModeChanged((t=>{e({model:t.model,oldLanguage:t.oldModeId})}))},createWebWorker:function(e){return function(e,t){return new Ot(e,t)}(tl.modelService.get(),e)},colorizeElement:function(e,t){const n=tl.standaloneThemeService.get();return n.registerEditorContainer(e),rn.colorizeElement(n,tl.modeService.get(),e,t)},colorize:function(e,t,n){return tl.standaloneThemeService.get().registerEditorContainer(document.body),rn.colorize(tl.modeService.get(),e,t,n)},colorizeModelLine:function(e,t,n=4){return tl.standaloneThemeService.get().registerEditorContainer(document.body),rn.colorizeModelLine(e,t,n)},tokenize:function(e,t){tl.modeService.get().triggerMode(t);let n=(i=t,Te.RW.get(i)||{getInitialState:()=>Re.nO,tokenize:(e,t,n,o)=>(0,Re.Ri)(i,e,n,o)});var i;let o=(0,Xe.uq)(e),r=[],s=n.getInitialState();for(let e=0,t=o.length;e{i.getId()===e&&(n.dispose(),t())}));return n},getEncodedLanguageId:function(e){let t=tl.modeService.get().getLanguageIdentifier(e);return t?t.id:0},setLanguageConfiguration:function(e,t){let n=tl.modeService.get().getLanguageIdentifier(e);if(!n)throw new Error(`Cannot set configuration for unknown language ${e}`);return Ge.zu.register(n,t,100)},setColorMap:function(e){if(e){const t=[null];for(let n=1,i=e.length;nfunction(e){return"tokenizeEncoded"in e}(e)?new hl(n,e):new ul(tl.standaloneThemeService.get(),n,e);return gl(t)?Te.RW.registerPromise(e,t.then((e=>i(e)))):Te.RW.register(e,i(t))},setMonarchTokensProvider:function(e,t){const n=t=>function(e,t,n,i){return new tn(e,t,n,i)}(tl.modeService.get(),tl.standaloneThemeService.get(),e,function(e,t){if(!t||"object"!=typeof t)throw new Error("Monarch: expecting a language definition object");let n={};n.languageId=e,n.includeLF=ol(t.includeLF,!1),n.noThrow=!1,n.maxStack=100,n.start="string"==typeof t.start?t.start:null,n.ignoreCase=ol(t.ignoreCase,!1),n.unicode=ol(t.unicode,!1),n.tokenPostfix=rl(t.tokenPostfix,"."+n.languageId),n.defaultToken=rl(t.defaultToken,"source"),n.usesEmbedded=!1;let i=t;function o(e,r,s){for(const a of s){let s=a.include;if(s){if("string"!=typeof s)throw Ut(n,"an 'include' attribute must be a string at: "+e);if("@"===s[0]&&(s=s.substr(1)),!t.tokenizer[s])throw Ut(n,"include target '"+s+"' is not defined at: "+e);o(e+"."+s,r,t.tokenizer[s])}else{const t=new cl(e);if(Array.isArray(a)&&a.length>=1&&a.length<=3)if(t.setRegex(i,a[0]),a.length>=3)if("string"==typeof a[1])t.setAction(i,{token:a[1],next:a[2]});else{if("object"!=typeof a[1])throw Ut(n,"a next state as the last element of a rule can only be given if the action is either an object or a string, at: "+e);{const e=a[1];e.next=a[2],t.setAction(i,e)}}else t.setAction(i,a[1]);else{if(!a.regex)throw Ut(n,"a rule must either be an array, or an object with a 'regex' or 'include' field at: "+e);a.name&&"string"==typeof a.name&&(t.name=a.name),a.matchOnlyAtStart&&(t.matchOnlyAtLineStart=ol(a.matchOnlyAtLineStart,!1)),t.setRegex(i,a.regex),t.setAction(i,a.action)}r.push(t)}}}if(i.languageId=e,i.includeLF=n.includeLF,i.ignoreCase=n.ignoreCase,i.unicode=n.unicode,i.noThrow=n.noThrow,i.usesEmbedded=n.usesEmbedded,i.stateNames=t.tokenizer,i.defaultToken=n.defaultToken,!t.tokenizer||"object"!=typeof t.tokenizer)throw Ut(n,"a language definition must define the 'tokenizer' attribute as an object");n.tokenizer=[];for(let e in t.tokenizer)if(t.tokenizer.hasOwnProperty(e)){n.start||(n.start=e);const i=t.tokenizer[e];n.tokenizer[e]=new Array,o("tokenizer."+e,n.tokenizer[e],i)}if(n.usesEmbedded=i.usesEmbedded,t.brackets){if(!Array.isArray(t.brackets))throw Ut(n,"the 'brackets' attribute must be defined as an array")}else t.brackets=[{open:"{",close:"}",token:"delimiter.curly"},{open:"[",close:"]",token:"delimiter.square"},{open:"(",close:")",token:"delimiter.parenthesis"},{open:"<",close:">",token:"delimiter.angle"}];let r=[];for(let e of t.brackets){let t=e;if(t&&Array.isArray(t)&&3===t.length&&(t={token:t[2],open:t[0],close:t[1]}),t.open===t.close)throw Ut(n,"open and close brackets in a 'brackets' attribute must be different: "+t.open+"\n hint: use the 'bracket' attribute if matching on equal brackets is required.");if("string"!=typeof t.open||"string"!=typeof t.token||"string"!=typeof t.close)throw Ut(n,"every element in the 'brackets' array must be a '{open,close,token}' object or array");r.push({token:t.token+n.tokenPostfix,open:jt(n,t.open),close:jt(n,t.close)})}return n.brackets=r,n.noThrow=!0,n}(e,t));return gl(t)?Te.RW.registerPromise(e,t.then((e=>n(e)))):Te.RW.register(e,n(t))},registerReferenceProvider:function(e,t){return Te.FL.register(e,t)},registerRenameProvider:function(e,t){return Te.G0.register(e,t)},registerCompletionItemProvider:function(e,t){return Te.KZ.register(e,t)},registerSignatureHelpProvider:function(e,t){return Te.nD.register(e,t)},registerHoverProvider:function(e,t){return Te.xp.register(e,{provideHover:(e,n,i)=>{let o=e.getWordAtPosition(n);return Promise.resolve(t.provideHover(e,n,i)).then((e=>{if(e)return!e.range&&o&&(e.range=new $.e(n.lineNumber,o.startColumn,n.lineNumber,o.endColumn)),e.range||(e.range=new $.e(n.lineNumber,n.column,n.lineNumber,n.column)),e}))}})},registerDocumentSymbolProvider:function(e,t){return Te.vJ.register(e,t)},registerDocumentHighlightProvider:function(e,t){return Te.vH.register(e,t)},registerLinkedEditingRangeProvider:function(e,t){return Te.id.register(e,t)},registerDefinitionProvider:function(e,t){return Te.Ct.register(e,t)},registerImplementationProvider:function(e,t){return Te.vI.register(e,t)},registerTypeDefinitionProvider:function(e,t){return Te.tA.register(e,t)},registerCodeLensProvider:function(e,t){return Te.He.register(e,t)},registerCodeActionProvider:function(e,t){return Te.H9.register(e,{provideCodeActions:(e,n,i,o)=>{let r=tl.markerService.get().read({resource:e.uri}).filter((e=>$.e.areIntersectingOrTouching(e,n)));return t.provideCodeActions(e,n,{markers:r,only:i.only},o)}})},registerDocumentFormattingEditProvider:function(e,t){return Te.Az.register(e,t)},registerDocumentRangeFormattingEditProvider:function(e,t){return Te.vN.register(e,t)},registerOnTypeFormattingEditProvider:function(e,t){return Te.ln.register(e,t)},registerLinkProvider:function(e,t){return Te.pM.register(e,t)},registerColorProvider:function(e,t){return Te.OH.register(e,t)},registerFoldingRangeProvider:function(e,t){return Te.aC.register(e,t)},registerDeclarationProvider:function(e,t){return Te.RN.register(e,t)},registerSelectionRangeProvider:function(e,t){return Te.AC.register(e,t)},registerDocumentSemanticTokensProvider:function(e,t){return Te.wT.register(e,t)},registerDocumentRangeSemanticTokensProvider:function(e,t){return Te.K7.register(e,t)},registerInlineCompletionsProvider:function(e,t){return Te.zu.register(e,t)},registerInlayHintsProvider:function(e,t){return Te.mX.register(e,t)},DocumentHighlightKind:h,CompletionItemKind:r,CompletionItemTag:s,CompletionItemInsertTextRule:o,SymbolKind:M,SymbolTag:T,IndentAction:f,CompletionTriggerKind:a,SignatureHelpTriggerKind:I,InlayHintKind:_,InlineCompletionTriggerKind:b,FoldingRangeKind:Te.AD};const _l=fl.CancellationTokenSource,bl=fl.Emitter,Cl=fl.KeyCode,vl=fl.KeyMod,wl=fl.Position,yl=fl.Range,Al=fl.Selection,Sl=fl.SelectionDirection,xl=fl.MarkerSeverity,kl=fl.MarkerTag,Ll=fl.Uri,El=fl.Token,Nl=fl.editor,Dl=fl.languages;((null===(pl=ze.li.MonacoEnvironment)||void 0===pl?void 0:pl.globalAPI)||"function"==typeof define&&n.amdO)&&(self.monaco=fl),void 0!==self.require&&"function"==typeof self.require.config&&self.require.config({ignoreDuplicateModules:["vscode-languageserver-types","vscode-languageserver-types/main","vscode-languageserver-textdocument","vscode-languageserver-textdocument/main","vscode-nls","vscode-nls/vscode-nls","jsonc-parser","jsonc-parser/main","vscode-uri","vscode-uri/index","vs/basic-languages/typescript/typescript"]})},5898:(e,t,n)=>{"use strict";n.r(t);var i=n(3379),o=n.n(i),r=n(7795),s=n.n(r),a=n(569),l=n.n(a),d=n(3565),c=n.n(d),h=n(9216),u=n.n(h),g=n(4589),p=n.n(g),m=n(8844),f={};f.styleTagTransform=p(),f.setAttributes=c(),f.insert=l().bind(null,"head"),f.domAPI=s(),f.insertStyleElement=u(),o()(m.Z,f),m.Z&&m.Z.locals&&m.Z.locals;var _=n(5321),b=n(8626),C=n(8764),v=n(6346),w=n(3794),y=n(5976),A=n(1432),S=n(7295),x=n(666),k=n(6830),L=n(9102),E=n(9720),N=n(8819),D=n(2065),I=n(1847),M=n(988),T=n(3910),R=n(7781),O=n(913),B=function(e,t,n,i){var o,r=arguments.length,s=r<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,i);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,n,s):o(t,n))||s);return r>3&&s&&Object.defineProperty(t,n,s),s},P=function(e,t){return function(n,i){t(n,i,e)}};const F=new N.uy("accessibilityHelpWidgetVisible",!1);let W=class e extends y.JT{constructor(e,t){super(),this._editor=e,this._widget=this._register(t.createInstance(z,this._editor))}static get(t){return t.getContribution(e.ID)}show(){this._widget.show()}hide(){this._widget.hide()}};W.ID="editor.contrib.accessibilityHelpController",W=B([P(1,D.TG)],W);let z=class e extends w.${constructor(e,t,n,i){super(),this._contextKeyService=t,this._keybindingService=n,this._openerService=i,this._editor=e,this._isVisibleKey=F.bindTo(this._contextKeyService),this._domNode=(0,b.X)(document.createElement("div")),this._domNode.setClassName("accessibilityHelpWidget"),this._domNode.setDisplay("none"),this._domNode.setAttribute("role","dialog"),this._domNode.setAttribute("aria-hidden","true"),this._contentDomNode=(0,b.X)(document.createElement("div")),this._contentDomNode.setAttribute("role","document"),this._domNode.appendChild(this._contentDomNode),this._isVisible=!1,this._register(this._editor.onDidLayoutChange((()=>{this._isVisible&&this._layout()}))),this._register(_.mu(this._contentDomNode.domNode,"keydown",(e=>{if(this._isVisible&&(e.equals(2083)&&((0,v.Z9)(O.Oe.emergencyConfOn),this._editor.updateOptions({accessibilitySupport:"on"}),_.PO(this._contentDomNode.domNode),this._buildContent(),this._contentDomNode.domNode.focus(),e.preventDefault(),e.stopPropagation()),e.equals(2086))){(0,v.Z9)(O.Oe.openingDocs);let t=this._editor.getRawOptions().accessibilityHelpUrl;void 0===t&&(t="https://go.microsoft.com/fwlink/?linkid=852450"),this._openerService.open(x.o.parse(t)),e.preventDefault(),e.stopPropagation()}}))),this.onblur(this._contentDomNode.domNode,(()=>{this.hide()})),this._editor.addOverlayWidget(this)}dispose(){this._editor.removeOverlayWidget(this),super.dispose()}getId(){return e.ID}getDomNode(){return this._domNode.domNode}getPosition(){return{preference:null}}show(){this._isVisible||(this._isVisible=!0,this._isVisibleKey.set(!0),this._layout(),this._domNode.setDisplay("block"),this._domNode.setAttribute("aria-hidden","false"),this._contentDomNode.domNode.tabIndex=0,this._buildContent(),this._contentDomNode.domNode.focus())}_descriptionForCommand(e,t,n){let i=this._keybindingService.lookupKeybinding(e);return i?S.WU(t,i.getAriaLabel()):S.WU(n,e)}_buildContent(){const e=this._editor.getOptions(),t=this._editor.getSelections();let n=0;if(t){const e=this._editor.getModel();e&&t.forEach((t=>{n+=e.getValueLengthInRange(t)}))}let i=function(e,t){return e&&0!==e.length?1===e.length?t?S.WU(O.Oe.singleSelectionRange,e[0].positionLineNumber,e[0].positionColumn,t):S.WU(O.Oe.singleSelection,e[0].positionLineNumber,e[0].positionColumn):t?S.WU(O.Oe.multiSelectionRange,e.length,t):e.length>0?S.WU(O.Oe.multiSelection,e.length):"":O.Oe.noSelection}(t,n);e.get(52)?e.get(79)?i+=O.Oe.readonlyDiffEditor:i+=O.Oe.editableDiffEditor:e.get(79)?i+=O.Oe.readonlyEditor:i+=O.Oe.editableEditor;const o=A.dz?O.Oe.changeConfigToOnMac:O.Oe.changeConfigToOnWinLinux;switch(e.get(2)){case 0:i+="\n\n - "+o;break;case 2:i+="\n\n - "+O.Oe.auto_on;break;case 1:i+="\n\n - "+O.Oe.auto_off,i+=" "+o}e.get(128)?i+="\n\n - "+this._descriptionForCommand(E.ToggleTabFocusModeAction.ID,O.Oe.tabFocusModeOnMsg,O.Oe.tabFocusModeOnMsgNoKb):i+="\n\n - "+this._descriptionForCommand(E.ToggleTabFocusModeAction.ID,O.Oe.tabFocusModeOffMsg,O.Oe.tabFocusModeOffMsgNoKb),i+="\n\n - "+(A.dz?O.Oe.openDocMac:O.Oe.openDocWinLinux),i+="\n\n"+O.Oe.outroMsg,this._contentDomNode.domNode.appendChild((0,C.BO)(i)),this._contentDomNode.domNode.setAttribute("aria-label",i)}hide(){this._isVisible&&(this._isVisible=!1,this._isVisibleKey.reset(),this._domNode.setDisplay("none"),this._domNode.setAttribute("aria-hidden","true"),this._contentDomNode.domNode.tabIndex=-1,_.PO(this._contentDomNode.domNode),this._editor.focus())}_layout(){let t=this._editor.getLayoutInfo(),n=Math.max(5,Math.min(e.WIDTH,t.width-40)),i=Math.max(5,Math.min(e.HEIGHT,t.height-40));this._domNode.setWidth(n),this._domNode.setHeight(i);let o=Math.round((t.height-i)/2);this._domNode.setTop(o);let r=Math.round((t.width-n)/2);this._domNode.setLeft(r)}};z.ID="editor.contrib.accessibilityHelpWidget",z.WIDTH=500,z.HEIGHT=300,z=B([P(1,N.i6),P(2,I.d),P(3,M.v4)],z);class V extends k.R6{constructor(){super({id:"editor.action.showAccessibilityHelp",label:O.Oe.showAccessibilityHelpAction,alias:"Show Accessibility Help",precondition:void 0,kbOpts:{primary:571,weight:100,linux:{primary:1595,secondary:[571]}}})}run(e,t){let n=W.get(t);n&&n.show()}}(0,k._K)(W.ID,W),(0,k.Qr)(V);const H=k._l.bindToContribution(W.get);(0,k.fK)(new H({id:"closeAccessibilityHelp",precondition:F,handler:e=>e.hide(),kbOpts:{weight:200,kbExpr:L.u.focus,primary:9,secondary:[1033]}})),(0,R.Ic)(((e,t)=>{const n=e.getColor(T.D0);n&&t.addRule(`.monaco-editor .accessibilityHelpWidget { background-color: ${n}; }`);const i=e.getColor(T.Hf);i&&t.addRule(`.monaco-editor .accessibilityHelpWidget { color: ${i}; }`);const o=e.getColor(T.rh);o&&t.addRule(`.monaco-editor .accessibilityHelpWidget { box-shadow: 0 2px 8px ${o}; }`);const r=e.getColor(T.lR);r&&t.addRule(`.monaco-editor .accessibilityHelpWidget { border: 2px solid ${r}; }`)}))},1321:(e,t,n)=>{"use strict";n.r(t),n.d(t,{IPadShowKeyboard:()=>w});var i=n(3379),o=n.n(i),r=n(7795),s=n.n(r),a=n(569),l=n.n(a),d=n(3565),c=n.n(d),h=n(9216),u=n.n(h),g=n(4589),p=n.n(g),m=n(1556),f={};f.styleTagTransform=p(),f.setAttributes=c(),f.insert=l().bind(null,"head"),f.domAPI=s(),f.insertStyleElement=u(),o()(m.Z,f),m.Z&&m.Z.locals&&m.Z.locals;var _=n(5321),b=n(5976),C=n(6830),v=n(1432);class w extends b.JT{constructor(e){super(),this.editor=e,this.widget=null,v.gn&&(this._register(e.onDidChangeConfiguration((()=>this.update()))),this.update())}update(){const e=!this.editor.getOption(79);!this.widget&&e?this.widget=new y(this.editor):this.widget&&!e&&(this.widget.dispose(),this.widget=null)}dispose(){super.dispose(),this.widget&&(this.widget.dispose(),this.widget=null)}}w.ID="editor.contrib.iPadShowKeyboard";class y extends b.JT{constructor(e){super(),this.editor=e,this._domNode=document.createElement("textarea"),this._domNode.className="iPadShowKeyboard",this._register(_.nm(this._domNode,"touchstart",(e=>{this.editor.focus()}))),this._register(_.nm(this._domNode,"focus",(e=>{this.editor.focus()}))),this.editor.addOverlayWidget(this)}dispose(){this.editor.removeOverlayWidget(this),super.dispose()}getId(){return y.ID}getDomNode(){return this._domNode}getPosition(){return{preference:1}}}y.ID="editor.contrib.ShowKeyboardWidget",(0,C._K)(w.ID,w)},5733:(e,t,n)=>{"use strict";n.r(t);var i=n(3379),o=n.n(i),r=n(7795),s=n.n(r),a=n(569),l=n.n(a),d=n(3565),c=n.n(d),h=n(9216),u=n.n(h),g=n(4589),p=n.n(g),m=n(5189),f={};f.styleTagTransform=p(),f.setAttributes=c(),f.insert=l().bind(null,"head"),f.domAPI=s(),f.insertStyleElement=u(),o()(m.Z,f),m.Z&&m.Z.locals&&m.Z.locals;var _=n(5321),b=n(1264),C=n(5976),v=n(6830),w=n(4101),y=n(8111),A=n(1531),S=n(2095),x=n(3910),k=n(7781),L=n(913),E=n(2321),N=function(e,t){return function(n,i){t(n,i,e)}};let D=class e extends C.JT{constructor(e,t,n){super(),this._editor=e,this._modeService=n,this._widget=null,this._register(this._editor.onDidChangeModel((e=>this.stop()))),this._register(this._editor.onDidChangeModelLanguage((e=>this.stop()))),this._register(w.RW.onDidChange((e=>this.stop()))),this._register(this._editor.onKeyUp((e=>9===e.keyCode&&this.stop())))}static get(t){return t.getContribution(e.ID)}dispose(){this.stop(),super.dispose()}launch(){this._widget||this._editor.hasModel()&&(this._widget=new M(this._editor,this._modeService))}stop(){this._widget&&(this._widget.dispose(),this._widget=null)}};D.ID="editor.contrib.inspectTokens",D=function(e,t,n,i){var o,r=arguments.length,s=r<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,i);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,n,s):o(t,n))||s);return r>3&&s&&Object.defineProperty(t,n,s),s}([N(1,S.Z),N(2,A.h)],D);class I extends v.R6{constructor(){super({id:"editor.action.inspectTokens",label:L.ug.inspectTokensAction,alias:"Developer: Inspect Tokens",precondition:void 0})}run(e,t){let n=D.get(t);n&&n.launch()}}class M extends C.JT{constructor(e,t){var n;super(),this.allowEditorOverflow=!0,this._editor=e,this._modeService=t,this._model=this._editor.getModel(),this._domNode=document.createElement("div"),this._domNode.className="tokens-inspect-widget",this._tokenizationSupport=(n=this._model.getLanguageIdentifier(),w.RW.get(n.language)||{getInitialState:()=>y.nO,tokenize:(e,t,i,o)=>(0,y.Ri)(n.language,e,i,o),tokenize2:(e,t,i,o)=>(0,y.mh)(n.id,e,i,o)}),this._compute(this._editor.getPosition()),this._register(this._editor.onDidChangeCursorPosition((e=>this._compute(this._editor.getPosition())))),this._editor.addContentWidget(this)}dispose(){this._editor.removeContentWidget(this),super.dispose()}getId(){return M._ID}_compute(e){let t=this._getTokensAtLine(e.lineNumber),n=0;for(let i=t.tokens1.length-1;i>=0;i--){let o=t.tokens1[i];if(e.column-1>=o.offset){n=i;break}}let i=0;for(let n=t.tokens2.length>>>1;n>=0;n--)if(e.column-1>=t.tokens2[n<<1]){i=n;break}let o=this._model.getLineContent(e.lineNumber),r="";if(n{const n=e.getColor(x.CN);if(n){let i=e.type===E.e.HIGH_CONTRAST?2:1;t.addRule(`.monaco-editor .tokens-inspect-widget { border: ${i}px solid ${n}; }`),t.addRule(`.monaco-editor .tokens-inspect-widget .tokens-inspect-separator { background-color: ${n}; }`)}const i=e.getColor(x.yJ);i&&t.addRule(`.monaco-editor .tokens-inspect-widget { background-color: ${i}; }`);const o=e.getColor(x.Sb);o&&t.addRule(`.monaco-editor .tokens-inspect-widget { color: ${o}; }`)}))},7720:(e,t,n)=>{"use strict";n.r(t),n.d(t,{GotoLineAction:()=>$,StandaloneCommandsQuickAccessProvider:()=>j});var i,o=n(9872),r=n(725),s=n(913),a=n(1640),l=n(3580),d=n(1050),c=n(5976),h=n(5393),u=function(e,t,n,i){return new(n||(n=Promise))((function(o,r){function s(e){try{l(i.next(e))}catch(e){r(e)}}function a(e){try{l(i.throw(e))}catch(e){r(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,a)}l((i=i.apply(e,t||[])).next())}))};function g(e){const t=e;return Array.isArray(t.items)}!function(e){e[e.NO_ACTION=0]="NO_ACTION",e[e.CLOSE_PICKER=1]="CLOSE_PICKER",e[e.REFRESH_PICKER=2]="REFRESH_PICKER",e[e.REMOVE_ITEM=3]="REMOVE_ITEM"}(i||(i={}));class p extends c.JT{constructor(e,t){super(),this.prefix=e,this.options=t}provide(e,t){var n;const o=new c.SL;let r;e.canAcceptInBackground=!!(null===(n=this.options)||void 0===n?void 0:n.canAcceptInBackground),e.matchOnLabel=e.matchOnDescription=e.matchOnDetail=e.sortByLabel=!1;const s=o.add(new c.XK),a=()=>u(this,void 0,void 0,(function*(){const n=s.value=new c.SL;null==r||r.dispose(!0),e.busy=!1,r=new d.A(t);const i=r.token,o=e.value.substr(this.prefix.length).trim(),a=this._getPicks(o,n,i),l=(t,n)=>{var i;let r,s;if(g(t)?(r=t.items,s=t.active):r=t,0===r.length){if(n)return!1;o.length>0&&(null===(i=this.options)||void 0===i?void 0:i.noResultsPick)&&(r=[this.options.noResultsPick])}return e.items=r,s&&(e.activeItems=[s]),!0};if(null===a);else if(function(e){const t=e;return!!t.picks&&t.additionalPicks instanceof Promise}(a)){let t=!1,n=!1;yield Promise.all([(()=>u(this,void 0,void 0,(function*(){yield(0,h.Vs)(p.FAST_PICKS_RACE_DELAY),i.isCancellationRequested||n||(t=l(a.picks,!0))})))(),(()=>u(this,void 0,void 0,(function*(){e.busy=!0;try{const o=yield a.additionalPicks;if(i.isCancellationRequested)return;let r,s,d,c;if(g(a.picks)?(r=a.picks.items,s=a.picks.active):r=a.picks,g(o)?(d=o.items,c=o.active):d=o,d.length>0||!t){let t;if(!s&&!c){const n=e.activeItems[0];n&&-1!==r.indexOf(n)&&(t=n)}l({items:[...r,...d],active:s||c||t})}}finally{i.isCancellationRequested||(e.busy=!1),n=!0}})))()])}else if(a instanceof Promise){e.busy=!0;try{const t=yield a;if(i.isCancellationRequested)return;l(t)}finally{i.isCancellationRequested||(e.busy=!1)}}else l(a)}));return o.add(e.onDidChangeValue((()=>a()))),a(),o.add(e.onDidAccept((t=>{const[n]=e.selectedItems;"function"==typeof(null==n?void 0:n.accept)&&(t.inBackground||e.hide(),n.accept(e.keyMods,t))}))),o.add(e.onDidTriggerItemButton((({button:n,item:o})=>u(this,void 0,void 0,(function*(){var r,s;if("function"==typeof o.trigger){const l=null!==(s=null===(r=o.buttons)||void 0===r?void 0:r.indexOf(n))&&void 0!==s?s:-1;if(l>=0){const n=o.trigger(l,e.keyMods),r="number"==typeof n?n:yield n;if(t.isCancellationRequested)return;switch(r){case i.NO_ACTION:break;case i.CLOSE_PICKER:e.hide();break;case i.REFRESH_PICKER:a();break;case i.REMOVE_ITEM:const t=e.items.indexOf(o);if(-1!==t){const n=e.items.slice();n.splice(t,1),e.items=n}}}}}))))),o}}p.FAST_PICKS_RACE_DELAY=200;var m=n(5392),f=n(8401),_=n(3702),b=n(6904),C=n(3108),v=n(2065),w=n(1847),y=n(4565),A=n(829),S=n(7301),x=n(8820),k=n(4603),L=n(9488);function E(e,t){return t&&(e.stack||e.stacktrace)?l.N("stackTrace.format","{0}: {1}",D(e),N(e.stack)||N(e.stacktrace)):D(e)}function N(e){return Array.isArray(e)?e.join("\n"):e}function D(e){return"string"==typeof e.code&&"number"==typeof e.errno&&"string"==typeof e.syscall?l.N("nodeExceptionMessage","A system error occurred ({0})",e.message):e.message||l.N("error.defaultMessage","An unknown error occurred. Please consult the log for more details.")}function I(e=null,t=!1){if(!e)return l.N("error.defaultMessage","An unknown error occurred. Please consult the log for more details.");if(Array.isArray(e)){const n=L.kX(e),i=I(n[0],t);return n.length>1?l.N("error.moreErrors","{0} ({1} errors in total)",i,n.length):i}if(f.HD(e))return e;if(e.detail){const n=e.detail;if(n.error)return E(n.error,t);if(n.exception)return E(n.exception,t)}return e.stack?E(e,t):e.message?e.message:l.N("error.defaultMessage","An unknown error occurred. Please consult the log for more details.")}var M=function(e,t,n,i){var o,r=arguments.length,s=r<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,i);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,n,s):o(t,n))||s);return r>3&&s&&Object.defineProperty(t,n,s),s},T=function(e,t){return function(n,i){t(n,i,e)}},R=function(e,t,n,i){return new(n||(n=Promise))((function(o,r){function s(e){try{l(i.next(e))}catch(e){r(e)}}function a(e){try{l(i.throw(e))}catch(e){r(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,a)}l((i=i.apply(e,t||[])).next())}))};let O=class e extends p{constructor(t,n,i,o,r,s){super(e.PREFIX,t),this.instantiationService=n,this.keybindingService=i,this.commandService=o,this.telemetryService=r,this.dialogService=s,this.commandsHistory=this._register(this.instantiationService.createInstance(B)),this.options=t}_getPicks(t,n,i){return R(this,void 0,void 0,(function*(){const o=yield this.getCommandPicks(n,i);if(i.isCancellationRequested)return[];const r=[];for(const n of o){const i=(0,f.f6)(e.WORD_FILTER(t,n.label)),o=n.commandAlias?(0,f.f6)(e.WORD_FILTER(t,n.commandAlias)):void 0;i||o?(n.highlights={label:i,detail:this.options.showAlias?o:void 0},r.push(n)):t===n.commandId&&r.push(n)}const s=new Map;for(const e of r){const t=s.get(e.label);t?(e.description=e.commandId,t.description=t.commandId):s.set(e.label,e)}r.sort(((e,t)=>{const n=this.commandsHistory.peek(e.commandId),i=this.commandsHistory.peek(t.commandId);return n&&i?n>i?-1:1:n?-1:i?1:e.label.localeCompare(t.label)}));const a=[];let d=!1;for(let e=0;eR(this,void 0,void 0,(function*(){this.commandsHistory.push(t.commandId),this.telemetryService.publicLog2("workbenchActionExecuted",{id:t.commandId,from:"quick open"});try{yield this.commandService.executeCommand(t.commandId)}catch(e){(0,S.VV)(e)||this.dialogService.show(k.Z.Error,(0,l.N)("canNotRun","Command '{0}' resulted in an error ({1})",t.label,I(e)))}}))}))}return a}))}};O.PREFIX=">",O.WORD_FILTER=(0,m.or)(m.Ji,m.KZ,m.ir),O=M([T(1,v.TG),T(2,w.d),T(3,y.H),T(4,A.b),T(5,x.S)],O);let B=class e extends c.JT{constructor(e,t){super(),this.storageService=e,this.configurationService=t,this.configuredCommandsHistoryLength=0,this.updateConfiguration(),this.load(),this.registerListeners()}registerListeners(){this._register(this.configurationService.onDidChangeConfiguration((()=>this.updateConfiguration())))}updateConfiguration(){this.configuredCommandsHistoryLength=e.getConfiguredCommandHistoryLength(this.configurationService),e.cache&&e.cache.limit!==this.configuredCommandsHistoryLength&&(e.cache.limit=this.configuredCommandsHistoryLength,e.saveState(this.storageService))}load(){const t=this.storageService.get(e.PREF_KEY_CACHE,0);let n;if(t)try{n=JSON.parse(t)}catch(e){}const i=e.cache=new _.z6(this.configuredCommandsHistoryLength,1);if(n){let e;e=n.usesLRU?n.entries:n.entries.sort(((e,t)=>e.value-t.value)),e.forEach((e=>i.set(e.key,e.value)))}e.counter=this.storageService.getNumber(e.PREF_KEY_COUNTER,0,e.counter)}push(t){e.cache&&(e.cache.set(t,e.counter++),e.saveState(this.storageService))}peek(t){var n;return null===(n=e.cache)||void 0===n?void 0:n.peek(t)}static saveState(t){if(!e.cache)return;const n={usesLRU:!0,entries:[]};e.cache.forEach(((e,t)=>n.entries.push({key:t,value:e}))),t.store(e.PREF_KEY_CACHE,JSON.stringify(n),0,0),t.store(e.PREF_KEY_COUNTER,e.counter,0,0)}static getConfiguredCommandHistoryLength(t){var n,i;const o=null===(i=null===(n=t.getValue().workbench)||void 0===n?void 0:n.commandPalette)||void 0===i?void 0:i.history;return"number"==typeof o?o:e.DEFAULT_COMMANDS_HISTORY_LENGTH}};B.DEFAULT_COMMANDS_HISTORY_LENGTH=50,B.PREF_KEY_CACHE="commandPalette.mru.cache",B.PREF_KEY_COUNTER="commandPalette.mru.counter",B.counter=1,B=M([T(0,b.Uy),T(1,C.Ui)],B);var P=n(1212);class F extends O{constructor(e,t,n,i,o,r){super(e,t,n,i,o,r)}getCodeEditorCommandPicks(){const e=this.activeTextEditorControl;if(!e)return[];const t=[];for(const n of e.getSupportedActions())t.push({commandId:n.id,commandAlias:n.alias,label:(0,P.x$)(n.label)||n.id});return t}}var W=n(6830),z=n(9102),V=n(1157),H=function(e,t){return function(n,i){t(n,i,e)}};let j=class extends F{constructor(e,t,n,i,o,r){super({showAlias:!1},e,n,i,o,r),this.codeEditorService=t}get activeTextEditorControl(){return(0,f.f6)(this.codeEditorService.getFocusedCodeEditor())}getCommandPicks(){return e=this,t=void 0,i=function*(){return this.getCodeEditorCommandPicks()},new((n=void 0)||(n=Promise))((function(o,r){function s(e){try{l(i.next(e))}catch(e){r(e)}}function a(e){try{l(i.throw(e))}catch(e){r(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,a)}l((i=i.apply(e,t||[])).next())}));var e,t,n,i}};j=function(e,t,n,i){var o,r=arguments.length,s=r<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,i);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,n,s):o(t,n))||s);return r>3&&s&&Object.defineProperty(t,n,s),s}([H(0,v.TG),H(1,a.$),H(2,w.d),H(3,y.H),H(4,A.b),H(5,x.S)],j),o.B.as(r.IP.Quickaccess).registerQuickAccessProvider({ctor:j,prefix:j.PREFIX,helpEntries:[{description:s.UX.quickCommandHelp,needsEditor:!0}]});class $ extends W.R6{constructor(){super({id:"editor.action.quickCommand",label:s.UX.quickCommandActionLabel,alias:"Command Palette",precondition:void 0,kbOpts:{kbExpr:z.u.focus,primary:59,weight:100},contextMenuOpts:{group:"z_commands",order:1}})}run(e){e.get(V.eJ).quickAccess.show(j.PREFIX)}}(0,W.Qr)($)},2097:(e,t,n)=>{"use strict";n.r(t),n.d(t,{GotoLineAction:()=>v,StandaloneGotoLineQuickAccessProvider:()=>_});var i=n(3580),o=n(5976),r=n(8275),s=n(5520);class a extends r.X{constructor(){super({canAcceptInBackground:!0})}provideWithoutTextEditor(e){const t=(0,i.N)("cannotRunGotoLine","Open a text editor first to go to a line.");return e.items=[{label:t}],e.ariaLabel=t,o.JT.None}provideWithTextEditor(e,t,n){const i=e.editor,r=new o.SL;r.add(t.onDidAccept((n=>{const[o]=t.selectedItems;if(o){if(!this.isValidLineNumber(i,o.lineNumber))return;this.gotoLocation(e,{range:this.toRange(o.lineNumber,o.column),keyMods:t.keyMods,preserveFocus:n.inBackground}),n.inBackground||t.hide()}})));const l=()=>{const e=this.parsePosition(i,t.value.trim().substr(a.PREFIX.length)),n=this.getPickLabel(i,e.lineNumber,e.column);if(t.items=[{lineNumber:e.lineNumber,column:e.column,label:n}],t.ariaLabel=n,!this.isValidLineNumber(i,e.lineNumber))return void this.clearDecorations(i);const o=this.toRange(e.lineNumber,e.column);i.revealRangeInCenter(o,0),this.addDecorations(i,o)};l(),r.add(t.onDidChangeValue((()=>l())));const d=(0,s.Pi)(i);return d&&2===d.getOptions().get(58).renderType&&(d.updateOptions({lineNumbers:"on"}),r.add((0,o.OF)((()=>d.updateOptions({lineNumbers:"relative"}))))),r}toRange(e=1,t=1){return{startLineNumber:e,startColumn:t,endLineNumber:e,endColumn:t}}parsePosition(e,t){const n=t.split(/,|:|#/).map((e=>parseInt(e,10))).filter((e=>!isNaN(e))),i=this.lineCount(e)+1;return{lineNumber:n[0]>0?n[0]:i+n[0],column:n[1]}}getPickLabel(e,t,n){if(this.isValidLineNumber(e,t))return this.isValidColumn(e,t,n)?(0,i.N)("gotoLineColumnLabel","Go to line {0} and character {1}.",t,n):(0,i.N)("gotoLineLabel","Go to line {0}.",t);const o=e.getPosition()||{lineNumber:1,column:1},r=this.lineCount(e);return r>1?(0,i.N)("gotoLineLabelEmptyWithLimit","Current Line: {0}, Character: {1}. Type a line number between 1 and {2} to navigate to.",o.lineNumber,o.column,r):(0,i.N)("gotoLineLabelEmpty","Current Line: {0}, Character: {1}. Type a line number to navigate to.",o.lineNumber,o.column)}isValidLineNumber(e,t){return!(!t||"number"!=typeof t)&&t>0&&t<=this.lineCount(e)}isValidColumn(e,t,n){if(!n||"number"!=typeof n)return!1;const i=this.getModel(e);if(!i)return!1;const o={lineNumber:t,column:n};return i.validatePosition(o).equals(o)}lineCount(e){var t,n;return null!==(n=null===(t=this.getModel(e))||void 0===t?void 0:t.getLineCount())&&void 0!==n?n:0}}a.PREFIX=":";var l=n(9872),d=n(725),c=n(1640),h=n(8401),u=n(913),g=n(4669),p=n(6830),m=n(9102),f=n(1157);let _=class extends a{constructor(e){super(),this.editorService=e,this.onDidActiveTextEditorControlChange=g.ju.None}get activeTextEditorControl(){return(0,h.f6)(this.editorService.getFocusedCodeEditor())}};var b,C;_=function(e,t,n,i){var o,r=arguments.length,s=r<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,i);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,n,s):o(t,n))||s);return r>3&&s&&Object.defineProperty(t,n,s),s}([(b=0,C=c.$,function(e,t){C(e,t,b)})],_),l.B.as(d.IP.Quickaccess).registerQuickAccessProvider({ctor:_,prefix:_.PREFIX,helpEntries:[{description:u.qq.gotoLineActionLabel,needsEditor:!0}]});class v extends p.R6{constructor(){super({id:"editor.action.gotoLine",label:u.qq.gotoLineActionLabel,alias:"Go to Line/Column...",precondition:void 0,kbOpts:{kbExpr:m.u.focus,primary:2085,mac:{primary:293},weight:100}})}run(e){e.get(f.eJ).quickAccess.show(_.PREFIX)}}(0,p.Qr)(v)},8936:(e,t,n)=>{"use strict";n.r(t),n.d(t,{GotoLineAction:()=>F,StandaloneGotoSymbolQuickAccessProvider:()=>O}),n(9899),n(4954);var i=n(3580),o=n(1050),r=n(5976),s=n(4314),a=n(8275),l=n(4101),d=n(6895),c=n(7295),h=n(5392),u=n(8721),g=n(1432);const p=[void 0,[]];function m(e,t,n=0,i=0){const o=t;return o.values&&o.values.length>1?function(e,t,n,i){let o=0;const r=[];for(const s of t){const[t,a]=f(e,s,n,i);if("number"!=typeof t)return p;o+=t,r.push(...a)}return[o,_(r)]}(e,o.values,n,i):f(e,t,n,i)}function f(e,t,n,i){const o=(0,h.EW)(t.original,t.originalLowercase,n,e,e.toLowerCase(),i,!0);return o?[o[0],(0,h.mB)(o)]:p}function _(e){const t=e.sort(((e,t)=>e.start-t.start)),n=[];let i;for(const e of t)!i||(r=e,(o=i).end=0;let s;const a=e.split(" ");if(a.length>1)for(const e of a){const{pathNormalized:t,normalized:n,normalizedLowercase:i}=C(e);n&&(s||(s=[]),s.push({original:e,originalLowercase:e.toLowerCase(),pathNormalized:t,normalized:n,normalizedLowercase:i}))}return{original:e,originalLowercase:t,pathNormalized:n,normalized:i,normalizedLowercase:o,values:s,containsPathSeparator:r}}function C(e){let t;t=g.ED?e.replace(/\//g,u.ir):e.replace(/\\/g,u.ir);const n=(0,c.R1)(t).replace(/\s/g,"");return{pathNormalized:t,normalized:n,normalizedLowercase:n.toLowerCase()}}function v(e){return Array.isArray(e)?b(e.map((e=>e.original)).join(" ")):b(e.original)}var w=n(3046),y=function(e,t,n,i){return new(n||(n=Promise))((function(o,r){function s(e){try{l(i.next(e))}catch(e){r(e)}}function a(e){try{l(i.throw(e))}catch(e){r(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,a)}l((i=i.apply(e,t||[])).next())}))};class A extends a.X{constructor(e=Object.create(null)){super(e),this.options=e,this.options.canAcceptInBackground=!0}provideWithoutTextEditor(e){return this.provideLabelPick(e,(0,i.N)("cannotRunGotoSymbolWithoutEditor","To go to a symbol, first open a text editor with symbol information.")),r.JT.None}provideWithTextEditor(e,t,n){const i=e.editor,o=this.getModel(i);return o?l.vJ.has(o)?this.doProvideWithEditorSymbols(e,o,t,n):this.doProvideWithoutEditorSymbols(e,o,t,n):r.JT.None}doProvideWithoutEditorSymbols(e,t,n,o){const s=new r.SL;return this.provideLabelPick(n,(0,i.N)("cannotRunGotoSymbolWithoutSymbolProvider","The active text editor does not provide symbol information.")),(()=>{y(this,void 0,void 0,(function*(){(yield this.waitForLanguageSymbolRegistry(t,s))&&!o.isCancellationRequested&&s.add(this.doProvideWithEditorSymbols(e,t,n,o))}))})(),s}provideLabelPick(e,t){e.items=[{label:t,index:0,kind:14}],e.ariaLabel=t}waitForLanguageSymbolRegistry(e,t){return y(this,void 0,void 0,(function*(){if(l.vJ.has(e))return!0;let n;const i=new Promise((e=>n=e)),o=t.add(l.vJ.onDidChange((()=>{l.vJ.has(e)&&(o.dispose(),n(!0))})));return t.add((0,r.OF)((()=>n(!1)))),i}))}doProvideWithEditorSymbols(e,t,n,s){const a=e.editor,l=new r.SL;l.add(n.onDidAccept((t=>{const[i]=n.selectedItems;i&&i.range&&(this.gotoLocation(e,{range:i.range.selection,keyMods:n.keyMods,preserveFocus:t.inBackground}),t.inBackground||n.hide())}))),l.add(n.onDidTriggerItemButton((({item:t})=>{t&&t.range&&(this.gotoLocation(e,{range:t.range.selection,keyMods:n.keyMods,forceSideBySide:!0}),n.hide())})));const d=this.getDocumentSymbols(t,s);let c;const h=()=>y(this,void 0,void 0,(function*(){null==c||c.dispose(!0),n.busy=!1,c=new o.A(s),n.busy=!0;try{const e=b(n.value.substr(A.PREFIX.length).trim()),t=yield this.doGetSymbolPicks(d,e,void 0,c.token);if(s.isCancellationRequested)return;t.length>0?n.items=t:e.original.length>0?this.provideLabelPick(n,(0,i.N)("noMatchingSymbolResults","No matching editor symbols")):this.provideLabelPick(n,(0,i.N)("noSymbolResults","No editor symbols"))}finally{s.isCancellationRequested||(n.busy=!1)}}));l.add(n.onDidChangeValue((()=>h()))),h();let u=!0;return l.add(n.onDidChangeActive((()=>{const[e]=n.activeItems;if(e&&e.range){if(u)return void(u=!1);a.revealRangeInCenter(e.range.selection,0),this.addDecorations(a,e.range.decoration)}}))),l}doGetSymbolPicks(e,t,n,o){return y(this,void 0,void 0,(function*(){const r=yield e;if(o.isCancellationRequested)return[];const a=0===t.original.indexOf(A.SCOPE_PREFIX),d=a?1:0;let h,u;t.values&&t.values.length>1?(h=v(t.values[0]),u=v(t.values.slice(1))):h=t;const g=[];for(let e=0;ed){let e=!1;if(h!==t&&([_,b]=m(p,Object.assign(Object.assign({},t),{values:void 0}),d,f),"number"==typeof _&&(e=!0)),"number"!=typeof _&&([_,b]=m(p,h,d,f),"number"!=typeof _))continue;if(!e&&u){if(y&&u.original.length>0&&([C,v]=m(y,u)),"number"!=typeof C)continue;"number"==typeof _&&(_+=C)}}const A=o.tags&&o.tags.indexOf(1)>=0;g.push({index:e,kind:o.kind,score:_,label:p,ariaLabel:a,description:y,highlights:A?void 0:{label:b,description:v},range:{selection:s.e.collapseToStart(o.selectionRange),decoration:o.range},strikethrough:A,buttons:(()=>{var e,t;const n=(null===(e=this.options)||void 0===e?void 0:e.openSideBySideDirection)?null===(t=this.options)||void 0===t?void 0:t.openSideBySideDirection():void 0;if(n)return[{iconClass:"right"===n?w.lA.splitHorizontal.classNames:w.lA.splitVertical.classNames,tooltip:"right"===n?(0,i.N)("openToSide","Open to the Side"):(0,i.N)("openToBottom","Open to the Bottom")}]})()})}const p=g.sort(((e,t)=>a?this.compareByKindAndScore(e,t):this.compareByScore(e,t)));let f=[];if(a){let e,t,n=0;function i(){t&&"number"==typeof e&&n>0&&(t.label=(0,c.WU)(x[e]||S,n))}for(const o of p)e!==o.kind?(i(),e=o.kind,n=1,t={type:"separator"},f.push(t)):n++,f.push(o);i()}else p.length>0&&(f=[{label:(0,i.N)("symbols","symbols ({0})",g.length),type:"separator"},...p]);return f}))}compareByScore(e,t){if("number"!=typeof e.score&&"number"==typeof t.score)return 1;if("number"==typeof e.score&&"number"!=typeof t.score)return-1;if("number"==typeof e.score&&"number"==typeof t.score){if(e.score>t.score)return-1;if(e.scoret.index?1:0}compareByKindAndScore(e,t){const n=x[e.kind]||S,i=x[t.kind]||S,o=n.localeCompare(i);return 0===o?this.compareByScore(e,t):o}getDocumentSymbols(e,t){return y(this,void 0,void 0,(function*(){const n=yield d.C3.create(e,t);return t.isCancellationRequested?[]:n.asListOfDocumentSymbols()}))}}A.PREFIX="@",A.SCOPE_PREFIX=":",A.PREFIX_BY_CATEGORY=`${A.PREFIX}${A.SCOPE_PREFIX}`;const S=(0,i.N)("property","properties ({0})"),x={5:(0,i.N)("method","methods ({0})"),11:(0,i.N)("function","functions ({0})"),8:(0,i.N)("_constructor","constructors ({0})"),12:(0,i.N)("variable","variables ({0})"),4:(0,i.N)("class","classes ({0})"),22:(0,i.N)("struct","structs ({0})"),23:(0,i.N)("event","events ({0})"),24:(0,i.N)("operator","operators ({0})"),10:(0,i.N)("interface","interfaces ({0})"),2:(0,i.N)("namespace","namespaces ({0})"),3:(0,i.N)("package","packages ({0})"),25:(0,i.N)("typeParameter","type parameters ({0})"),1:(0,i.N)("modules","modules ({0})"),6:(0,i.N)("property","properties ({0})"),9:(0,i.N)("enum","enumerations ({0})"),21:(0,i.N)("enumMember","enumeration members ({0})"),14:(0,i.N)("string","strings ({0})"),0:(0,i.N)("file","files ({0})"),17:(0,i.N)("array","arrays ({0})"),15:(0,i.N)("number","numbers ({0})"),16:(0,i.N)("boolean","booleans ({0})"),18:(0,i.N)("object","objects ({0})"),19:(0,i.N)("key","keys ({0})"),7:(0,i.N)("field","fields ({0})"),13:(0,i.N)("constant","constants ({0})")};var k=n(9872),L=n(725),E=n(1640),N=n(8401),D=n(913),I=n(4669),M=n(6830),T=n(9102),R=n(1157);let O=class extends A{constructor(e){super(),this.editorService=e,this.onDidActiveTextEditorControlChange=I.ju.None}get activeTextEditorControl(){return(0,N.f6)(this.editorService.getFocusedCodeEditor())}};var B,P;O=function(e,t,n,i){var o,r=arguments.length,s=r<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,i);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,n,s):o(t,n))||s);return r>3&&s&&Object.defineProperty(t,n,s),s}([(B=0,P=E.$,function(e,t){P(e,t,B)})],O),k.B.as(L.IP.Quickaccess).registerQuickAccessProvider({ctor:O,prefix:A.PREFIX,helpEntries:[{description:D.aq.quickOutlineActionLabel,prefix:A.PREFIX,needsEditor:!0},{description:D.aq.quickOutlineByCategoryActionLabel,prefix:A.PREFIX_BY_CATEGORY,needsEditor:!0}]});class F extends M.R6{constructor(){super({id:"editor.action.quickOutline",label:D.aq.quickOutlineActionLabel,alias:"Go to Symbol...",precondition:T.u.hasDocumentSymbolProvider,kbOpts:{kbExpr:T.u.focus,primary:3117,weight:100},contextMenuOpts:{group:"navigation",order:3}})}run(e){e.get(R.eJ).quickAccess.show(A.PREFIX)}}(0,M.Qr)(F)},8944:(e,t,n)=>{"use strict";n.r(t);var i=n(9872),o=n(725),r=n(913),s=n(1157),a=n(3580),l=n(5976);let d=class e{constructor(e){this.quickInputService=e,this.registry=i.B.as(o.IP.Quickaccess)}provide(t){const n=new l.SL;n.add(t.onDidAccept((()=>{const[e]=t.selectedItems;e&&this.quickInputService.quickAccess.show(e.prefix,{preserveValue:!0})}))),n.add(t.onDidChangeValue((t=>{const n=this.registry.getQuickAccessProvider(t.substr(e.PREFIX.length));n&&n.prefix&&n.prefix!==e.PREFIX&&this.quickInputService.quickAccess.show(n.prefix,{preserveValue:!0})})));const{editorProviders:i,globalProviders:o}=this.getQuickAccessProviders();return t.items=0===i.length||0===o.length?[...0===i.length?o:i]:[{label:(0,a.N)("globalCommands","global commands"),type:"separator"},...o,{label:(0,a.N)("editorCommands","editor commands"),type:"separator"},...i],n}getQuickAccessProviders(){const t=[],n=[];for(const i of this.registry.getQuickAccessProviders().sort(((e,t)=>e.prefix.localeCompare(t.prefix))))if(i.prefix!==e.PREFIX)for(const e of i.helpEntries){const o=e.prefix||i.prefix,r=o||"…";(e.needsEditor?n:t).push({prefix:o,label:r,ariaLabel:(0,a.N)("helpPickAriaLabel","{0}, {1}",r,e.description),description:e.description})}return{editorProviders:n,globalProviders:t}}};var c,h;d.PREFIX="?",d=function(e,t,n,i){var o,r=arguments.length,s=r<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,i);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,n,s):o(t,n))||s);return r>3&&s&&Object.defineProperty(t,n,s),s}([(c=0,h=s.eJ,function(e,t){h(e,t,c)})],d),i.B.as(o.IP.Quickaccess).registerQuickAccessProvider({ctor:d,prefix:"",helpEntries:[{description:r.ld.helpQuickAccessActionLabel,needsEditor:!0}]})},5048:(e,t,n)=>{"use strict";n.r(t),n.d(t,{StandaloneReferencesController:()=>u});var i=n(6830),o=n(1640),r=n(2406),s=n(3108),a=n(8819),l=n(2065),d=n(9422),c=n(6904),h=function(e,t){return function(n,i){t(n,i,e)}};let u=class extends r.J{constructor(e,t,n,i,o,r,s){super(!0,e,t,n,i,o,r,s)}};u=function(e,t,n,i){var o,r=arguments.length,s=r<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,i);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,n,s):o(t,n))||s);return r>3&&s&&Object.defineProperty(t,n,s),s}([h(1,a.i6),h(2,o.$),h(3,d.lT),h(4,l.TG),h(5,c.Uy),h(6,s.Ui)],u),(0,i._K)(r.J.ID,u)},5662:(e,t,n)=>{"use strict";n.r(t);var i=n(6830),o=n(2095),r=n(913);class s extends i.R6{constructor(){super({id:"editor.action.toggleHighContrast",label:r.xi.toggleHighContrast,alias:"Toggle High Contrast Theme",precondition:void 0}),this._originalThemeName=null}run(e,t){const n=e.get(o.Z);this._originalThemeName?(n.setTheme(this._originalThemeName),this._originalThemeName=null):(this._originalThemeName=n.getColorTheme().themeName,n.setTheme("hc-black"))}}(0,i.Qr)(s)},2095:(e,t,n)=>{"use strict";n.d(t,{Z:()=>i});const i=(0,n(2065).yh)("themeService")},1174:(e,t,n)=>{"use strict";n.d(t,{Q5:()=>i.Emitter,ZL:()=>i.MarkerSeverity,e6:()=>i.Range,j6:()=>i.editor,Mj:()=>i.languages});var i=n(1593)},2323:(e,t,n)=>{"use strict";n.r(t),n.d(t,{jsonDefaults:()=>o}),n(1593);var i=n(1174),o=new(function(){function e(e,t,n){this._onDidChange=new i.Q5,this._languageId=e,this.setDiagnosticsOptions(t),this.setModeConfiguration(n)}return Object.defineProperty(e.prototype,"onDidChange",{get:function(){return this._onDidChange.event},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"languageId",{get:function(){return this._languageId},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"modeConfiguration",{get:function(){return this._modeConfiguration},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"diagnosticsOptions",{get:function(){return this._diagnosticsOptions},enumerable:!1,configurable:!0}),e.prototype.setDiagnosticsOptions=function(e){this._diagnosticsOptions=e||Object.create(null),this._onDidChange.fire(this)},e.prototype.setModeConfiguration=function(e){this._modeConfiguration=e||Object.create(null),this._onDidChange.fire(this)},e}())("json",{validate:!0,allowComments:!0,schemas:[],enableSchemaRequest:!1,schemaRequest:"warning",schemaValidation:"warning",comments:"error",trailingCommas:"error"},{documentFormattingEdits:!0,documentRangeFormattingEdits:!0,completionItems:!0,hovers:!0,documentSymbols:!0,tokens:!0,colors:!0,foldingRanges:!0,diagnostics:!0,selectionRanges:!0});i.Mj.json={jsonDefaults:o},i.Mj.register({id:"json",extensions:[".json",".bowerrc",".jshintrc",".jscsrc",".eslintrc",".babelrc",".har"],aliases:["JSON","json"],mimetypes:["application/json"]}),i.Mj.onLanguage("json",(function(){n.e(99).then(n.bind(n,1099)).then((function(e){return e.setupMode(o)}))}))},1429:(e,t,n)=>{"use strict";n.d(t,{Q5:()=>i.Emitter,ZL:()=>i.MarkerSeverity,eB:()=>i.MarkerTag,e6:()=>i.Range,Sf:()=>i.Uri,j6:()=>i.editor,Mj:()=>i.languages});var i=n(1593)},8828:(e,t,n)=>{"use strict";n.r(t),n.d(t,{JsxEmit:()=>o,ModuleKind:()=>i,ModuleResolutionKind:()=>a,NewLineKind:()=>r,ScriptTarget:()=>s,getJavaScriptWorker:()=>p,getTypeScriptWorker:()=>g,javascriptDefaults:()=>u,typescriptDefaults:()=>h,typescriptVersion:()=>c}),n(1593);var i,o,r,s,a,l=n(1429);!function(e){e[e.None=0]="None",e[e.CommonJS=1]="CommonJS",e[e.AMD=2]="AMD",e[e.UMD=3]="UMD",e[e.System=4]="System",e[e.ES2015=5]="ES2015",e[e.ESNext=99]="ESNext"}(i||(i={})),function(e){e[e.None=0]="None",e[e.Preserve=1]="Preserve",e[e.React=2]="React",e[e.ReactNative=3]="ReactNative",e[e.ReactJSX=4]="ReactJSX",e[e.ReactJSXDev=5]="ReactJSXDev"}(o||(o={})),function(e){e[e.CarriageReturnLineFeed=0]="CarriageReturnLineFeed",e[e.LineFeed=1]="LineFeed"}(r||(r={})),function(e){e[e.ES3=0]="ES3",e[e.ES5=1]="ES5",e[e.ES2015=2]="ES2015",e[e.ES2016=3]="ES2016",e[e.ES2017=4]="ES2017",e[e.ES2018=5]="ES2018",e[e.ES2019=6]="ES2019",e[e.ES2020=7]="ES2020",e[e.ESNext=99]="ESNext",e[e.JSON=100]="JSON",e[e.Latest=99]="Latest"}(s||(s={})),function(e){e[e.Classic=1]="Classic",e[e.NodeJs=2]="NodeJs"}(a||(a={}));var d=function(){function e(e,t,n){this._onDidChange=new l.Q5,this._onDidExtraLibsChange=new l.Q5,this._extraLibs=Object.create(null),this._removedExtraLibs=Object.create(null),this._eagerModelSync=!1,this.setCompilerOptions(e),this.setDiagnosticsOptions(t),this.setWorkerOptions(n),this._onDidExtraLibsChangeTimeout=-1}return Object.defineProperty(e.prototype,"onDidChange",{get:function(){return this._onDidChange.event},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"onDidExtraLibsChange",{get:function(){return this._onDidExtraLibsChange.event},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"workerOptions",{get:function(){return this._workerOptions},enumerable:!1,configurable:!0}),e.prototype.getExtraLibs=function(){return this._extraLibs},e.prototype.addExtraLib=function(e,t){var n,i=this;if(n=void 0===t?"ts:extralib-"+Math.random().toString(36).substring(2,15):t,this._extraLibs[n]&&this._extraLibs[n].content===e)return{dispose:function(){}};var o=1;return this._removedExtraLibs[n]&&(o=this._removedExtraLibs[n]+1),this._extraLibs[n]&&(o=this._extraLibs[n].version+1),this._extraLibs[n]={content:e,version:o},this._fireOnDidExtraLibsChangeSoon(),{dispose:function(){var e=i._extraLibs[n];e&&e.version===o&&(delete i._extraLibs[n],i._removedExtraLibs[n]=o,i._fireOnDidExtraLibsChangeSoon())}}},e.prototype.setExtraLibs=function(e){for(var t in this._extraLibs)this._removedExtraLibs[t]=this._extraLibs[t].version;if(this._extraLibs=Object.create(null),e&&e.length>0)for(var n=0,i=e;n{"use strict";function i(e,t,...n){return function(e,t){let n;return n=0===t.length?e:e.replace(/\{(\d+)\}/g,(function(e,n){const i=n[0];return void 0!==t[i]?t[i]:e})),n}(t,n)}n.d(t,{N:()=>i})},1106:(e,t,n)=>{"use strict";n.d(t,{F:()=>r,U:()=>s});var i=n(2065),o=n(8819);const r=(0,i.yh)("accessibilityService"),s=new o.uy("accessibilityModeEnabled",!1)},1133:(e,t,n)=>{"use strict";n.d(t,{Mm:()=>$,Id:()=>K,vr:()=>j});var i=n(3379),o=n.n(i),r=n(7795),s=n.n(r),a=n(569),l=n.n(a),d=n(3565),c=n.n(d),h=n(9216),u=n.n(h),g=n(4589),p=n.n(g),m=n(1854),f={};f.styleTagTransform=p(),f.setAttributes=c(),f.insert=l().bind(null,"head"),f.domAPI=s(),f.insertStyleElement=u(),o()(m.Z,f),m.Z&&m.Z.locals&&m.Z.locals;var _=n(5321),b=n(4741),C=n(5976),v=n(3580),w=n(4144),y=n(5606),A=n(1847),S=n(8030),x=n(9422),k=n(7781),L=n(6033),E=n(5035),N={};N.styleTagTransform=p(),N.setAttributes=c(),N.insert=l().bind(null,"head"),N.domAPI=s(),N.insertStyleElement=u(),o()(E.Z,N),E.Z&&E.Z.locals&&E.Z.locals;var D=n(4669),I=n(553),M=n(9069);class T extends b.Wi{constructor(e,t){super(),this._onDidChangeVisibility=new D.Q5,this.onDidChangeVisibility=this._onDidChangeVisibility.event,this._element=(0,_.R3)(e,(0,_.$)(".monaco-dropdown")),this._label=(0,_.R3)(this._element,(0,_.$)(".dropdown-label"));let n=t.labelRenderer;n||(n=e=>(e.textContent=t.label||"",null));for(const e of[_.tw.CLICK,_.tw.MOUSE_DOWN,I.t.Tap])this._register((0,_.nm)(this.element,e,(e=>_.zB.stop(e,!0))));for(const e of[_.tw.MOUSE_DOWN,I.t.Tap])this._register((0,_.nm)(this._label,e,(e=>{e instanceof MouseEvent&&e.detail>1||(this.visible?this.hide():this.show())})));this._register((0,_.nm)(this._label,_.tw.KEY_UP,(e=>{const t=new M.y(e);(t.equals(3)||t.equals(10))&&(_.zB.stop(e,!0),this.visible?this.hide():this.show())})));const i=n(this._label);i&&this._register(i),this._register(I.o.addTarget(this._label))}get element(){return this._element}show(){this.visible||(this.visible=!0,this._onDidChangeVisibility.fire(!0))}hide(){this.visible&&(this.visible=!1,this._onDidChangeVisibility.fire(!1))}dispose(){super.dispose(),this.hide(),this.boxContainer&&(this.boxContainer.remove(),this.boxContainer=void 0),this.contents&&(this.contents.remove(),this.contents=void 0),this._label&&(this._label.remove(),this._label=void 0)}}class R extends T{constructor(e,t){super(e,t),this._actions=[],this._contextMenuProvider=t.contextMenuProvider,this.actions=t.actions||[],this.actionProvider=t.actionProvider,this.menuClassName=t.menuClassName||"",this.menuAsChild=!!t.menuAsChild}set menuOptions(e){this._menuOptions=e}get menuOptions(){return this._menuOptions}get actions(){return this.actionProvider?this.actionProvider.getActions():this._actions}set actions(e){this._actions=e}show(){super.show(),this.element.classList.add("active"),this._contextMenuProvider.showContextMenu({getAnchor:()=>this.element,getActions:()=>this.actions,getActionsContext:()=>this.menuOptions?this.menuOptions.context:null,getActionViewItem:e=>this.menuOptions&&this.menuOptions.actionViewItemProvider?this.menuOptions.actionViewItemProvider(e):void 0,getKeyBinding:e=>this.menuOptions&&this.menuOptions.getKeyBinding?this.menuOptions.getKeyBinding(e):void 0,getMenuClassName:()=>this.menuClassName,onHide:()=>this.onHide(),actionRunner:this.menuOptions?this.menuOptions.actionRunner:void 0,anchorAlignment:this.menuOptions?this.menuOptions.anchorAlignment:0,domForShadowRoot:this.menuAsChild?this.element:void 0})}hide(){super.hide()}onHide(){this.hide(),this.element.classList.remove("active")}}class O extends L.Y{constructor(e,t,n,i=Object.create(null)){super(null,e,i),this.actionItem=null,this._onDidChangeVisibility=this._register(new D.Q5),this.menuActionsOrProvider=t,this.contextMenuProvider=n,this.options=i,this.options.actionRunner&&(this.actionRunner=this.options.actionRunner)}render(e){this.actionItem=e;const t=Array.isArray(this.menuActionsOrProvider),n={contextMenuProvider:this.contextMenuProvider,labelRenderer:e=>{this.element=(0,_.R3)(e,(0,_.$)("a.action-label"));let t=[];return"string"==typeof this.options.classNames?t=this.options.classNames.split(/\s+/g).filter((e=>!!e)):this.options.classNames&&(t=this.options.classNames),t.find((e=>"icon"===e))||t.push("codicon"),this.element.classList.add(...t),this.element.setAttribute("role","button"),this.element.setAttribute("aria-haspopup","true"),this.element.setAttribute("aria-expanded","false"),this.element.title=this._action.label||"",null},menuAsChild:this.options.menuAsChild,actions:t?this.menuActionsOrProvider:void 0,actionProvider:t?void 0:this.menuActionsOrProvider};if(this.dropdownMenu=this._register(new R(e,n)),this._register(this.dropdownMenu.onDidChangeVisibility((e=>{var t;null===(t=this.element)||void 0===t||t.setAttribute("aria-expanded",`${e}`),this._onDidChangeVisibility.fire(e)}))),this.dropdownMenu.menuOptions={actionViewItemProvider:this.options.actionViewItemProvider,actionRunner:this.actionRunner,getKeyBinding:this.options.keybindingProvider,context:this._context},this.options.anchorAlignmentProvider){const e=this;this.dropdownMenu.menuOptions=Object.assign(Object.assign({},this.dropdownMenu.menuOptions),{get anchorAlignment(){return e.options.anchorAlignmentProvider()}})}this.updateEnabled()}setActionContext(e){super.setActionContext(e),this.dropdownMenu&&(this.dropdownMenu.menuOptions?this.dropdownMenu.menuOptions.context=e:this.dropdownMenu.menuOptions={context:e})}updateEnabled(){var e,t;const n=!this.getAction().enabled;null===(e=this.actionItem)||void 0===e||e.classList.toggle("disabled",n),null===(t=this.element)||void 0===t||t.classList.toggle("disabled",n)}}var B=n(1432),P=n(2065),F=n(8819),W=n(6904),z=function(e,t,n,i){var o,r=arguments.length,s=r<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,i);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,n,s):o(t,n))||s);return r>3&&s&&Object.defineProperty(t,n,s),s},V=function(e,t){return function(n,i){t(n,i,e)}},H=function(e,t,n,i){return new(n||(n=Promise))((function(o,r){function s(e){try{l(i.next(e))}catch(e){r(e)}}function a(e){try{l(i.throw(e))}catch(e){r(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,a)}l((i=i.apply(e,t||[])).next())}))};function j(e,t,n,i,o,r,s){const a=e.getActions(t);return function(e,t,n,i=(e=>"navigation"===e),o=Number.MAX_SAFE_INTEGER,r=(()=>!1),s=!1){let a,l;Array.isArray(t)?(a=t,l=t):(a=t.primary,l=t.secondary);const d=new Set;for(const[t,o]of e){let e;i(t)?(e=a,e.length>0&&s&&e.push(new b.Z0)):(e=l,e.length>0&&e.push(new b.Z0));for(let i of o){n&&(i=i instanceof w.U8&&i.alt?i.alt:i);const o=e.push(i);i instanceof b.wY&&d.add({group:t,action:i,index:o-1})}}for(const{group:e,action:t,index:n}of d){const s=i(e)?a:l,d=t.actions;(d.length<=1||s.length+d.length-2<=o)&&r(t,e,s.length)&&s.splice(n,1,...d)}if(a!==l&&a.length>o){const e=a.splice(o,a.length-o);l.unshift(...e,new b.Z0)}}(a,n,!1,"string"==typeof i?e=>e===i:i,o,r,s),function(e){const t=new C.SL;for(const[,n]of e)for(const e of n)t.add(e);return t}(a)}let $=class extends L.g{constructor(e,t,n,i,o){super(void 0,e,{icon:!(!e.class&&!e.item.icon),label:!e.class&&!e.item.icon,draggable:null==t?void 0:t.draggable}),this._keybindingService=n,this._notificationService=i,this._contextKeyService=o,this._wantsAltCommand=!1,this._itemClassDispose=this._register(new C.XK),this._altKey=_._q.getInstance()}get _menuItemAction(){return this._action}get _commandAction(){return this._wantsAltCommand&&this._menuItemAction.alt||this._menuItemAction}onClick(e){return H(this,void 0,void 0,(function*(){e.preventDefault(),e.stopPropagation();try{yield this.actionRunner.run(this._commandAction,this._context)}catch(e){this._notificationService.error(e)}}))}render(e){super.render(e),e.classList.add("menu-entry"),this._updateItemClass(this._menuItemAction.item);let t=!1,n=this._altKey.keyStatus.altKey||(B.ED||B.IJ)&&this._altKey.keyStatus.shiftKey;const i=()=>{const e=t&&n;e!==this._wantsAltCommand&&(this._wantsAltCommand=e,this.updateLabel(),this.updateTooltip(),this.updateClass())};this._menuItemAction.alt&&this._register(this._altKey.event((e=>{n=e.altKey||(B.ED||B.IJ)&&e.shiftKey,i()}))),this._register((0,_.nm)(e,"mouseleave",(e=>{t=!1,i()}))),this._register((0,_.nm)(e,"mouseenter",(e=>{t=!0,i()})))}updateLabel(){this.options.label&&this.label&&(this.label.textContent=this._commandAction.label)}updateTooltip(){if(this.label){const e=this._keybindingService.lookupKeybinding(this._commandAction.id,this._contextKeyService),t=e&&e.getLabel(),n=this._commandAction.tooltip||this._commandAction.label;let i=t?(0,v.N)("titleAndKb","{0} ({1})",n,t):n;if(!this._wantsAltCommand&&this._menuItemAction.alt){const e=this._menuItemAction.alt.tooltip||this._menuItemAction.alt.label,t=this._keybindingService.lookupKeybinding(this._menuItemAction.alt.id,this._contextKeyService),n=t&&t.getLabel(),o=n?(0,v.N)("titleAndKb","{0} ({1})",e,n):e;i+=`\n[${S.xo.modifierLabels[B.OS].altKey}] ${o}`}this.label.title=i}}updateClass(){this.options.icon&&(this._commandAction!==this._menuItemAction?this._menuItemAction.alt&&this._updateItemClass(this._menuItemAction.alt.item):this._menuItemAction.alt&&this._updateItemClass(this._menuItemAction.item))}_updateItemClass(e){var t;this._itemClassDispose.value=void 0;const{element:n,label:i}=this;if(!n||!i)return;const o=this._commandAction.checked&&(null===(t=e.toggled)||void 0===t?void 0:t.icon)?e.toggled.icon:e.icon;if(o)if(k.kS.isThemeIcon(o)){const e=k.kS.asClassNameArray(o);i.classList.add(...e),this._itemClassDispose.value=(0,C.OF)((()=>{i.classList.remove(...e)}))}else o.light&&i.style.setProperty("--menu-entry-icon-light",(0,_.wY)(o.light)),o.dark&&i.style.setProperty("--menu-entry-icon-dark",(0,_.wY)(o.dark)),i.classList.add("icon"),this._itemClassDispose.value=(0,C.OF)((()=>{i.classList.remove("icon"),i.style.removeProperty("--menu-entry-icon-light"),i.style.removeProperty("--menu-entry-icon-dark")}))}};$=z([V(2,A.d),V(3,x.lT),V(4,F.i6)],$);let U=class extends O{constructor(e,t){super(e,{getActions:()=>e.actions},t,{menuAsChild:!0,classNames:k.kS.isThemeIcon(e.item.icon)?k.kS.asClassName(e.item.icon):void 0})}render(e){if(super.render(e),this.element){e.classList.add("menu-entry");const{icon:t}=this._action.item;t&&!k.kS.isThemeIcon(t)&&(this.element.classList.add("icon"),t.light&&this.element.style.setProperty("--menu-entry-icon-light",(0,_.wY)(t.light)),t.dark&&this.element.style.setProperty("--menu-entry-icon-dark",(0,_.wY)(t.dark)))}}};U=z([V(1,y.i)],U);let Z=class extends L.Y{constructor(e,t,n,i,o,r,s){let a;super(null,e),this._keybindingService=t,this._notificationService=n,this._contextMenuService=i,this._menuService=o,this._instaService=r,this._storageService=s,this._container=null,this._storageKey=`${e.item.submenu._debugName}_lastActionId`;let l=s.get(this._storageKey,1);l&&(a=e.actions.find((e=>l===e.id))),a||(a=e.actions[0]),this._defaultAction=this._instaService.createInstance($,a,void 0),this._dropdown=new O(e,e.actions,this._contextMenuService,{menuAsChild:!0,classNames:["codicon","codicon-chevron-down"]}),this._dropdown.actionRunner.onDidRun((e=>{e.action instanceof w.U8&&this.update(e.action)}))}update(e){this._storageService.store(this._storageKey,e.id,1,0),this._defaultAction.dispose(),this._defaultAction=this._instaService.createInstance($,e,void 0),this._defaultAction.actionRunner=new class extends b.Wi{runAction(e,t){return H(this,void 0,void 0,(function*(){yield e.run(void 0)}))}},this._container&&this._defaultAction.render((0,_.Ce)(this._container,(0,_.$)(".action-container")))}setActionContext(e){super.setActionContext(e),this._defaultAction.setActionContext(e),this._dropdown.setActionContext(e)}render(e){this._container=e,super.render(this._container),this._container.classList.add("monaco-dropdown-with-primary");const t=(0,_.$)(".action-container");this._defaultAction.render((0,_.R3)(this._container,t)),this._register((0,_.nm)(t,_.tw.KEY_DOWN,(e=>{const t=new M.y(e);t.equals(17)&&(this._defaultAction.element.tabIndex=-1,this._dropdown.focus(),t.stopPropagation())})));const n=(0,_.$)(".dropdown-action-container");this._dropdown.render((0,_.R3)(this._container,n)),this._register((0,_.nm)(n,_.tw.KEY_DOWN,(e=>{var t;const n=new M.y(e);n.equals(15)&&(this._defaultAction.element.tabIndex=0,this._dropdown.setFocusable(!1),null===(t=this._defaultAction.element)||void 0===t||t.focus(),n.stopPropagation())})))}focus(e){e?this._dropdown.focus():(this._defaultAction.element.tabIndex=0,this._defaultAction.element.focus())}blur(){this._defaultAction.element.tabIndex=-1,this._dropdown.blur(),this._container.blur()}setFocusable(e){e?this._defaultAction.element.tabIndex=0:(this._defaultAction.element.tabIndex=-1,this._dropdown.setFocusable(!1))}dispose(){this._defaultAction.dispose(),this._dropdown.dispose(),super.dispose()}};function K(e,t){if(t instanceof w.U8)return e.createInstance($,t,void 0);if(t instanceof w.NZ){const n=!t.actions.some((e=>e instanceof w.U8&&e.item.icon&&!k.kS.isThemeIcon(e.item.icon)));return t.item.rememberDefaultAction&&n?e.createInstance(Z,t):e.createInstance(U,t)}}Z=z([V(1,A.d),V(2,x.lT),V(3,y.i),V(4,w.co),V(5,P.TG),V(6,W.Uy)],Z)},4144:(e,t,n)=>{"use strict";n.d(t,{vr:()=>p,eH:()=>m,co:()=>f,BH:()=>_,NZ:()=>b,U8:()=>C});var i=n(4741),o=n(2065),r=n(8819),s=n(4565),a=n(5976),l=n(4669),d=n(7781),c=n(3725),h=n(1741),u=n(3046),g=function(e,t){return function(n,i){t(n,i,e)}};function p(e){return void 0!==e.command}class m{constructor(e){this.id=m._idPool++,this._debugName=e}}m._idPool=0,m.CommandPalette=new m("CommandPalette"),m.EditorContext=new m("EditorContext"),m.SimpleEditorContext=new m("SimpleEditorContext"),m.EditorContextCopy=new m("EditorContextCopy"),m.EditorContextPeek=new m("EditorContextPeek"),m.MenubarEditMenu=new m("MenubarEditMenu"),m.MenubarCopy=new m("MenubarCopy"),m.MenubarGoMenu=new m("MenubarGoMenu"),m.MenubarSelectionMenu=new m("MenubarSelectionMenu"),m.InlineCompletionsActions=new m("InlineCompletionsActions");const f=(0,o.yh)("menuService"),_=new class{constructor(){this._commands=new Map,this._menuItems=new Map,this._onDidChangeMenu=new l.Q5,this.onDidChangeMenu=this._onDidChangeMenu.event,this._commandPaletteChangeEvent={has:e=>e===m.CommandPalette}}addCommand(e){return this.addCommands(c.$.single(e))}addCommands(e){for(const t of e)this._commands.set(t.id,t);return this._onDidChangeMenu.fire(this._commandPaletteChangeEvent),(0,a.OF)((()=>{let t=!1;for(const n of e)t=this._commands.delete(n.id)||t;t&&this._onDidChangeMenu.fire(this._commandPaletteChangeEvent)}))}getCommand(e){return this._commands.get(e)}getCommands(){const e=new Map;return this._commands.forEach(((t,n)=>e.set(n,t))),e}appendMenuItem(e,t){return this.appendMenuItems(c.$.single({id:e,item:t}))}appendMenuItems(e){const t=new Set,n=new h.S;for(const{id:i,item:o}of e){let e=this._menuItems.get(i);e||(e=new h.S,this._menuItems.set(i,e)),n.push(e.push(o)),t.add(i)}return this._onDidChangeMenu.fire(t),(0,a.OF)((()=>{if(n.size>0){for(let e of n)e();this._onDidChangeMenu.fire(t),n.clear()}}))}getMenuItems(e){let t;return t=this._menuItems.has(e)?[...this._menuItems.get(e)]:[],e===m.CommandPalette&&this._appendImplicitItems(t),t}_appendImplicitItems(e){const t=new Set;for(const n of e)p(n)&&(t.add(n.command.id),n.alt&&t.add(n.alt.id));this._commands.forEach(((n,i)=>{t.has(i)||e.push({command:n})}))}};class b extends i.wY{constructor(e,t,n,i){super(`submenuitem.${e.submenu.id}`,"string"==typeof e.title?e.title:e.title.value,[],"submenu"),this.item=e,this._menuService=t,this._contextKeyService=n,this._options=i}get actions(){const e=[],t=this._menuService.createMenu(this.item.submenu,this._contextKeyService),n=t.getActions(this._options);t.dispose();for(const[,t]of n)t.length>0&&(e.push(...t),e.push(new i.Z0));return e.length&&e.pop(),e}}let C=class e{constructor(t,n,i,o,r){var s;if(this._commandService=r,this.id=t.id,this.label=(null==i?void 0:i.renderShortTitle)&&t.shortTitle?"string"==typeof t.shortTitle?t.shortTitle:t.shortTitle.value:"string"==typeof t.title?t.title:t.title.value,this.tooltip=null!==(s=t.tooltip)&&void 0!==s?s:"",this.enabled=!t.precondition||o.contextMatchesRules(t.precondition),this.checked=!1,t.toggled){const e=t.toggled.condition?t.toggled:{condition:t.toggled};this.checked=o.contextMatchesRules(e.condition),this.checked&&e.tooltip&&(this.tooltip="string"==typeof e.tooltip?e.tooltip:e.tooltip.value),e.title&&(this.label="string"==typeof e.title?e.title:e.title.value)}this.item=t,this.alt=n?new e(n,void 0,i,o,r):void 0,this._options=i,d.kS.isThemeIcon(t.icon)&&(this.class=u.dT.asClassName(t.icon))}dispose(){}run(...e){var t,n;let i=[];return(null===(t=this._options)||void 0===t?void 0:t.arg)&&(i=[...i,this._options.arg]),(null===(n=this._options)||void 0===n?void 0:n.shouldForwardArgs)&&(i=[...i,...e]),this._commandService.executeCommand(this.id,...i)}};C=function(e,t,n,i){var o,r=arguments.length,s=r<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,i);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,n,s):o(t,n))||s);return r>3&&s&&Object.defineProperty(t,n,s),s}([g(3,r.i6),g(4,s.H)],C)},4972:(e,t,n)=>{"use strict";n.d(t,{p:()=>i});const i=(0,n(2065).yh)("clipboardService")},4565:(e,t,n)=>{"use strict";n.d(t,{H:()=>d,P:()=>c});var i=n(5976),o=n(8401),r=n(2065),s=n(4669),a=n(1741),l=n(3725);const d=(0,r.yh)("commandService"),c=new class{constructor(){this._commands=new Map,this._onDidRegisterCommand=new s.Q5,this.onDidRegisterCommand=this._onDidRegisterCommand.event}registerCommand(e,t){if(!e)throw new Error("invalid command");if("string"==typeof e){if(!t)throw new Error("invalid command");return this.registerCommand({id:e,handler:t})}if(e.description){const t=[];for(let n of e.description.args)t.push(n.constraint);const n=e.handler;e.handler=function(e,...i){return(0,o.D8)(i,t),n(e,...i)}}const{id:n}=e;let r=this._commands.get(n);r||(r=new a.S,this._commands.set(n,r));let s=r.unshift(e),l=(0,i.OF)((()=>{s();const e=this._commands.get(n);(null==e?void 0:e.isEmpty())&&this._commands.delete(n)}));return this._onDidRegisterCommand.fire(n),l}registerCommandAlias(e,t){return c.registerCommand(e,((e,...n)=>e.get(d).executeCommand(t,...n)))}getCommand(e){const t=this._commands.get(e);if(t&&!t.isEmpty())return l.$.first(t)}getCommands(){const e=new Map;for(const t of this._commands.keys()){const n=this.getCommand(t);n&&e.set(t,n)}return e}};c.registerCommand("noop",(()=>{}))},3108:(e,t,n)=>{"use strict";n.d(t,{Ui:()=>s,Od:()=>a,KV:()=>l,xL:()=>d,Mt:()=>h,MR:()=>u,O4:()=>g});var i=n(9872),o=n(2065),r=n(3193);const s=(0,o.yh)("configurationService");function a(e,t){const n=Object.create(null);for(let i in e)l(n,i,e[i],t);return n}function l(e,t,n,i){const o=t.split("."),r=o.pop();let s=e;for(let e=0;econsole.error(`Conflict in default settings: ${e}`)));return e}},3193:(e,t,n)=>{"use strict";n.d(t,{IP:()=>l,G1:()=>_,Uh:()=>b});var i=n(3580),o=n(4669),r=n(9872),s=n(8401),a=n(1294);const l={Configuration:"base.contributions.configuration"},d={properties:{},patternProperties:{}},c={properties:{},patternProperties:{}},h={properties:{},patternProperties:{}},u={properties:{},patternProperties:{}},g={properties:{},patternProperties:{}},p={properties:{},patternProperties:{}},m="vscode://schemas/settings/resourceLanguage",f=r.B.as(a.I.JSONContribution),_=new RegExp("\\[.*\\]$");function b(e){return e.substring(1,e.length-1)}const C=new class{constructor(){this.overrideIdentifiers=new Set,this._onDidSchemaChange=new o.Q5,this._onDidUpdateConfiguration=new o.Q5,this.defaultValues={},this.defaultLanguageConfigurationOverridesNode={id:"defaultOverrides",title:i.N("defaultLanguageConfigurationOverrides.title","Default Language Configuration Overrides"),properties:{}},this.configurationContributors=[this.defaultLanguageConfigurationOverridesNode],this.resourceLanguageSettingsSchema={properties:{},patternProperties:{},additionalProperties:!1,errorMessage:"Unknown editor configuration setting",allowTrailingCommas:!0,allowComments:!0},this.configurationProperties={},this.excludedConfigurationProperties={},f.registerSchema(m,this.resourceLanguageSettingsSchema)}registerConfiguration(e,t=!0){this.registerConfigurations([e],t)}registerConfigurations(e,t=!0){const n=[];e.forEach((e=>{n.push(...this.validateAndRegisterProperties(e,t,e.extensionInfo)),this.configurationContributors.push(e),this.registerJSONConfiguration(e)})),f.registerSchema(m,this.resourceLanguageSettingsSchema),this._onDidSchemaChange.fire(),this._onDidUpdateConfiguration.fire(n)}registerOverrideIdentifiers(e){for(const t of e)this.overrideIdentifiers.add(t);this.updateOverridePropertyPatternKey()}validateAndRegisterProperties(e,t=!0,n,i=3){var o;i=s.Jp(e.scope)?i:e.scope;let r=[],a=e.properties;if(a)for(let e in a){if(t&&v(e)){delete a[e];continue}const l=a[e];this.updatePropertyDefaultValue(e,l),_.test(e)?l.scope=void 0:(l.scope=s.Jp(l.scope)?i:l.scope,l.restricted=s.Jp(l.restricted)?!!(null===(o=null==n?void 0:n.restrictedConfigurations)||void 0===o?void 0:o.includes(e)):l.restricted),!a[e].hasOwnProperty("included")||a[e].included?(this.configurationProperties[e]=a[e],!a[e].deprecationMessage&&a[e].markdownDeprecationMessage&&(a[e].deprecationMessage=a[e].markdownDeprecationMessage),r.push(e)):(this.excludedConfigurationProperties[e]=a[e],delete a[e])}let l=e.allOf;if(l)for(let e of l)r.push(...this.validateAndRegisterProperties(e,t,n,i));return r}getConfigurationProperties(){return this.configurationProperties}registerJSONConfiguration(e){const t=e=>{let n=e.properties;if(n)for(const e in n)this.updateSchema(e,n[e]);let i=e.allOf;i&&i.forEach(t)};t(e)}updateSchema(e,t){switch(d.properties[e]=t,t.scope){case 1:c.properties[e]=t;break;case 2:h.properties[e]=t;break;case 6:u.properties[e]=t;break;case 3:g.properties[e]=t;break;case 4:p.properties[e]=t;break;case 5:p.properties[e]=t,this.resourceLanguageSettingsSchema.properties[e]=t}}updateOverridePropertyPatternKey(){for(const e of this.overrideIdentifiers.values()){const t=`[${e}]`,n={type:"object",description:i.N("overrideSettings.defaultDescription","Configure editor settings to be overridden for a language."),errorMessage:i.N("overrideSettings.errorMessage","This setting does not support per-language configuration."),$ref:m};this.updatePropertyDefaultValue(t,n),d.properties[t]=n,c.properties[t]=n,h.properties[t]=n,u.properties[t]=n,g.properties[t]=n,p.properties[t]=n}this._onDidSchemaChange.fire()}updatePropertyDefaultValue(e,t){let n=this.defaultValues[e];s.o8(n)&&(n=t.default),s.o8(n)&&(n=function(e){switch(Array.isArray(e)?e[0]:e){case"boolean":return!1;case"integer":case"number":return 0;case"string":return"";case"array":return[];case"object":return{};default:return null}}(t.type)),t.default=n}};function v(e){return e.trim()?_.test(e)?i.N("config.property.languageDefault","Cannot register '{0}'. This matches property pattern '\\\\[.*\\\\]$' for describing language specific editor settings. Use 'configurationDefaults' contribution.",e):void 0!==C.getConfigurationProperties()[e]?i.N("config.property.duplicate","Cannot register '{0}'. This property is already registered.",e):null:i.N("config.property.empty","Cannot register an empty property")}r.B.add(l.Configuration,C)},8819:(e,t,n)=>{"use strict";n.d(t,{Ao:()=>d,uy:()=>L,i6:()=>E,Eq:()=>N});var i=n(7295),o=n(2065),r=n(1432);let s=r.WE||"";const a=new Map;a.set("false",!1),a.set("true",!0),a.set("isMac",r.dz),a.set("isLinux",r.IJ),a.set("isWindows",r.ED),a.set("isWeb",r.$L),a.set("isMacNative",r.dz&&!r.$L),a.set("isEdge",s.indexOf("Edg/")>=0),a.set("isFirefox",s.indexOf("Firefox")>=0),a.set("isChrome",s.indexOf("Chrome")>=0),a.set("isSafari",s.indexOf("Safari")>=0);const l=Object.prototype.hasOwnProperty;class d{static has(e){return g.create(e)}static equals(e,t){return p.create(e,t)}static regex(e,t){return A.create(e,t)}static not(e){return b.create(e)}static and(...e){return x.create(e)}static or(...e){return k.create(e)}static deserialize(e,t=!1){if(e)return this._deserializeOrExpression(e,t)}static _deserializeOrExpression(e,t){let n=e.split("||");return k.create(n.map((e=>this._deserializeAndExpression(e,t))))}static _deserializeAndExpression(e,t){let n=e.split("&&");return x.create(n.map((e=>this._deserializeOne(e,t))))}static _deserializeOne(e,t){if((e=e.trim()).indexOf("!=")>=0){let n=e.split("!=");return _.create(n[0].trim(),this._deserializeValue(n[1],t))}if(e.indexOf("==")>=0){let n=e.split("==");return p.create(n[0].trim(),this._deserializeValue(n[1],t))}if(e.indexOf("=~")>=0){let n=e.split("=~");return A.create(n[0].trim(),this._deserializeRegexValue(n[1],t))}if(e.indexOf(" in ")>=0){let t=e.split(" in ");return m.create(t[0].trim(),t[1].trim())}if(/^[^<=>]+>=[^<=>]+$/.test(e)){const t=e.split(">=");return v.create(t[0].trim(),t[1].trim())}if(/^[^<=>]+>[^<=>]+$/.test(e)){const t=e.split(">");return C.create(t[0].trim(),t[1].trim())}if(/^[^<=>]+<=[^<=>]+$/.test(e)){const t=e.split("<=");return y.create(t[0].trim(),t[1].trim())}if(/^[^<=>]+<[^<=>]+$/.test(e)){const t=e.split("<");return w.create(t[0].trim(),t[1].trim())}return/^\!\s*/.test(e)?b.create(e.substr(1).trim()):g.create(e)}static _deserializeValue(e,t){if("true"===(e=e.trim()))return!0;if("false"===e)return!1;let n=/^'([^']*)'$/.exec(e);return n?n[1].trim():e}static _deserializeRegexValue(e,t){if((0,i.m5)(e)){if(t)throw new Error("missing regexp-value for =~-expression");return console.warn("missing regexp-value for =~-expression"),null}let n=e.indexOf("/"),o=e.lastIndexOf("/");if(n===o||n<0){if(t)throw new Error(`bad regexp-value '${e}', missing /-enclosure`);return console.warn(`bad regexp-value '${e}', missing /-enclosure`),null}let r=e.slice(n+1,o),s="i"===e[o+1]?"i":"";try{return new RegExp(r,s)}catch(n){if(t)throw new Error(`bad regexp-value '${e}', parse error: ${n}`);return console.warn(`bad regexp-value '${e}', parse error: ${n}`),null}}}function c(e,t){return e.cmp(t)}class h{constructor(){this.type=0}cmp(e){return this.type-e.type}equals(e){return e.type===this.type}evaluate(e){return!1}serialize(){return"false"}keys(){return[]}negate(){return u.INSTANCE}}h.INSTANCE=new h;class u{constructor(){this.type=1}cmp(e){return this.type-e.type}equals(e){return e.type===this.type}evaluate(e){return!0}serialize(){return"true"}keys(){return[]}negate(){return h.INSTANCE}}u.INSTANCE=new u;class g{constructor(e){this.key=e,this.type=2}static create(e){const t=a.get(e);return"boolean"==typeof t?t?u.INSTANCE:h.INSTANCE:new g(e)}cmp(e){return e.type!==this.type?this.type-e.type:D(this.key,e.key)}equals(e){return e.type===this.type&&this.key===e.key}evaluate(e){return!!e.getValue(this.key)}serialize(){return this.key}keys(){return[this.key]}negate(){return b.create(this.key)}}class p{constructor(e,t){this.key=e,this.value=t,this.type=4}static create(e,t){if("boolean"==typeof t)return t?g.create(e):b.create(e);const n=a.get(e);return"boolean"==typeof n?t===(n?"true":"false")?u.INSTANCE:h.INSTANCE:new p(e,t)}cmp(e){return e.type!==this.type?this.type-e.type:I(this.key,this.value,e.key,e.value)}equals(e){return e.type===this.type&&this.key===e.key&&this.value===e.value}evaluate(e){return e.getValue(this.key)==this.value}serialize(){return`${this.key} == '${this.value}'`}keys(){return[this.key]}negate(){return _.create(this.key,this.value)}}class m{constructor(e,t){this.key=e,this.valueKey=t,this.type=10}static create(e,t){return new m(e,t)}cmp(e){return e.type!==this.type?this.type-e.type:I(this.key,this.valueKey,e.key,e.valueKey)}equals(e){return e.type===this.type&&this.key===e.key&&this.valueKey===e.valueKey}evaluate(e){const t=e.getValue(this.valueKey),n=e.getValue(this.key);return Array.isArray(t)?t.indexOf(n)>=0:"string"==typeof n&&"object"==typeof t&&null!==t&&l.call(t,n)}serialize(){return`${this.key} in '${this.valueKey}'`}keys(){return[this.key,this.valueKey]}negate(){return f.create(this)}}class f{constructor(e){this._actual=e,this.type=11}static create(e){return new f(e)}cmp(e){return e.type!==this.type?this.type-e.type:this._actual.cmp(e._actual)}equals(e){return e.type===this.type&&this._actual.equals(e._actual)}evaluate(e){return!this._actual.evaluate(e)}serialize(){throw new Error("Method not implemented.")}keys(){return this._actual.keys()}negate(){return this._actual}}class _{constructor(e,t){this.key=e,this.value=t,this.type=5}static create(e,t){if("boolean"==typeof t)return t?b.create(e):g.create(e);const n=a.get(e);return"boolean"==typeof n?t===(n?"true":"false")?h.INSTANCE:u.INSTANCE:new _(e,t)}cmp(e){return e.type!==this.type?this.type-e.type:I(this.key,this.value,e.key,e.value)}equals(e){return e.type===this.type&&this.key===e.key&&this.value===e.value}evaluate(e){return e.getValue(this.key)!=this.value}serialize(){return`${this.key} != '${this.value}'`}keys(){return[this.key]}negate(){return p.create(this.key,this.value)}}class b{constructor(e){this.key=e,this.type=3}static create(e){const t=a.get(e);return"boolean"==typeof t?t?h.INSTANCE:u.INSTANCE:new b(e)}cmp(e){return e.type!==this.type?this.type-e.type:D(this.key,e.key)}equals(e){return e.type===this.type&&this.key===e.key}evaluate(e){return!e.getValue(this.key)}serialize(){return`!${this.key}`}keys(){return[this.key]}negate(){return g.create(this.key)}}class C{constructor(e,t){this.key=e,this.value=t,this.type=12}static create(e,t){return new C(e,t)}cmp(e){return e.type!==this.type?this.type-e.type:I(this.key,this.value,e.key,e.value)}equals(e){return e.type===this.type&&this.key===e.key&&this.value===e.value}evaluate(e){return parseFloat(e.getValue(this.key))>parseFloat(this.value)}serialize(){return`${this.key} > ${this.value}`}keys(){return[this.key]}negate(){return y.create(this.key,this.value)}}class v{constructor(e,t){this.key=e,this.value=t,this.type=13}static create(e,t){return new v(e,t)}cmp(e){return e.type!==this.type?this.type-e.type:I(this.key,this.value,e.key,e.value)}equals(e){return e.type===this.type&&this.key===e.key&&this.value===e.value}evaluate(e){return parseFloat(e.getValue(this.key))>=parseFloat(this.value)}serialize(){return`${this.key} >= ${this.value}`}keys(){return[this.key]}negate(){return w.create(this.key,this.value)}}class w{constructor(e,t){this.key=e,this.value=t,this.type=14}static create(e,t){return new w(e,t)}cmp(e){return e.type!==this.type?this.type-e.type:I(this.key,this.value,e.key,e.value)}equals(e){return e.type===this.type&&this.key===e.key&&this.value===e.value}evaluate(e){return parseFloat(e.getValue(this.key))e.key)return 1;const t=this.regexp?this.regexp.source:"",n=e.regexp?e.regexp.source:"";return tn?1:0}equals(e){if(e.type===this.type){const t=this.regexp?this.regexp.source:"",n=e.regexp?e.regexp.source:"";return this.key===e.key&&t===n}return!1}evaluate(e){let t=e.getValue(this.key);return!!this.regexp&&this.regexp.test(t)}serialize(){const e=this.regexp?`/${this.regexp.source}/${this.regexp.ignoreCase?"i":""}`:"/invalid/";return`${this.key} =~ ${e}`}keys(){return[this.key]}negate(){return S.create(this)}}class S{constructor(e){this._actual=e,this.type=8}static create(e){return new S(e)}cmp(e){return e.type!==this.type?this.type-e.type:this._actual.cmp(e._actual)}equals(e){return e.type===this.type&&this._actual.equals(e._actual)}evaluate(e){return!this._actual.evaluate(e)}serialize(){throw new Error("Method not implemented.")}keys(){return this._actual.keys()}negate(){return this._actual}}class x{constructor(e){this.expr=e,this.type=6}static create(e){return x._normalizeArr(e)}cmp(e){if(e.type!==this.type)return this.type-e.type;if(this.expr.lengthe.expr.length)return 1;for(let t=0,n=this.expr.length;t1;){const e=t[t.length-1];if(9!==e.type)break;t.pop();const n=t.pop(),i=k.create(e.expr.map((e=>x.create([e,n]))));i&&(t.push(i),t.sort(c))}return 1===t.length?t[0]:new x(t)}}serialize(){return this.expr.map((e=>e.serialize())).join(" && ")}keys(){const e=[];for(let t of this.expr)e.push(...t.keys());return e}negate(){let e=[];for(let t of this.expr)e.push(t.negate());return k.create(e)}}class k{constructor(e){this.expr=e,this.type=9}static create(e){const t=k._normalizeArr(e);if(0!==t.length)return 1===t.length?t[0]:new k(t)}cmp(e){if(e.type!==this.type)return this.type-e.type;if(this.expr.lengthe.expr.length)return 1;for(let t=0,n=this.expr.length;te.serialize())).join(" || ")}keys(){const e=[];for(let t of this.expr)e.push(...t.keys());return e}negate(){let e=[];for(let t of this.expr)e.push(t.negate());const t=e=>9===e.type?e.expr:[e];for(;e.length>1;){const n=e.shift(),i=e.shift(),o=[];for(const e of t(n))for(const n of t(i))o.push(d.and(e,n));e.unshift(d.or(...o))}return e[0]}}class L extends g{constructor(e,t,n){super(e),this._defaultValue=t,"object"==typeof n?L._info.push(Object.assign(Object.assign({},n),{key:e})):!0!==n&&L._info.push({key:e,description:n,type:null!=t?typeof t:void 0})}static all(){return L._info.values()}bindTo(e){return e.createKey(this.key,this._defaultValue)}getValue(e){return e.getContextKeyValue(this.key)}toNegated(){return d.not(this.key)}isEqualTo(e){return d.equals(this.key,e)}}L._info=[];const E=(0,o.yh)("contextKeyService"),N="setContext";function D(e,t){return et?1:0}function I(e,t,n,i){return en?1:ti?1:0}},9282:(e,t,n)=>{"use strict";n.d(t,{c:()=>s,d:()=>a});var i=n(3580),o=n(8819),r=n(1432);const s=new o.uy("isWindows",r.ED,(0,i.N)("isWindows","Whether the operating system is Windows")),a="inputFocus"},5606:(e,t,n)=>{"use strict";n.d(t,{u:()=>o,i:()=>r});var i=n(2065);const o=(0,i.yh)("contextViewService"),r=(0,i.yh)("contextMenuService")},8820:(e,t,n)=>{"use strict";n.d(t,{S:()=>i});const i=(0,n(2065).yh)("dialogService")},7108:(e,t,n)=>{"use strict";n.d(t,{M:()=>i});class i{constructor(e,t=[],n=!1){this.ctor=e,this.staticArguments=t,this.supportsDelayedInstantiation=n}}},5026:(e,t,n)=>{"use strict";n.d(t,{z:()=>r,d:()=>s});var i=n(7108);const o=[];function r(e,t,n){t instanceof i.M||(t=new i.M(t,[],n)),o.push([e,t])}function s(){return o}},2065:(e,t,n)=>{"use strict";var i;n.d(t,{I8:()=>i,TG:()=>o,yh:()=>s,jt:()=>a}),function(e){e.serviceIds=new Map,e.DI_TARGET="$di$target",e.DI_DEPENDENCIES="$di$dependencies",e.getServiceDependencies=function(t){return t[e.DI_DEPENDENCIES]||[]}}(i||(i={}));const o=s("instantiationService");function r(e,t,n,o){t[i.DI_TARGET]===t?t[i.DI_DEPENDENCIES].push({id:e,index:n,optional:o}):(t[i.DI_DEPENDENCIES]=[{id:e,index:n,optional:o}],t[i.DI_TARGET]=t)}function s(e){if(i.serviceIds.has(e))return i.serviceIds.get(e);const t=function(e,n,i){if(3!==arguments.length)throw new Error("@IServiceName-decorator can only be used to decorate a parameter");r(t,e,i,!1)};return t.toString=()=>e,i.serviceIds.set(e,t),t}function a(e){return function(t,n,i){if(3!==arguments.length)throw new Error("@optional-decorator can only be used to decorate a parameter");r(e,t,i,!0)}}},972:(e,t,n)=>{"use strict";n.d(t,{y:()=>i});class i{constructor(...e){this._entries=new Map;for(let[t,n]of e)this.set(t,n)}set(e,t){const n=this._entries.get(e);return this._entries.set(e,t),n}has(e){return this._entries.has(e)}get(e){return this._entries.get(e)}}},1294:(e,t,n)=>{"use strict";n.d(t,{I:()=>r});var i=n(9872),o=n(4669);const r={JSONContribution:"base.contributions.json"},s=new class{constructor(){this._onDidChangeSchema=new o.Q5,this.schemasById={}}registerSchema(e,t){var n;this.schemasById[(n=e,n.length>0&&"#"===n.charAt(n.length-1)?n.substring(0,n.length-1):n)]=t,this._onDidChangeSchema.fire(e)}notifySchemaChanged(e){this._onDidChangeSchema.fire(e)}};i.B.add(r.JSONContribution,s)},1847:(e,t,n)=>{"use strict";n.d(t,{d:()=>i});const i=(0,n(2065).yh)("keybindingService")},9989:(e,t,n)=>{"use strict";n.d(t,{W:()=>l});var i=n(2258),o=n(1432),r=n(4565),s=n(9872);class a{constructor(){this._coreKeybindings=[],this._extensionKeybindings=[],this._cachedMergedKeybindings=null}static bindToCurrentPlatform(e){if(1===o.OS){if(e&&e.win)return e.win}else if(2===o.OS){if(e&&e.mac)return e.mac}else if(e&&e.linux)return e.linux;return e}registerKeybindingRule(e){const t=a.bindToCurrentPlatform(e);if(t&&t.primary){const n=(0,i.gm)(t.primary,o.OS);n&&this._registerDefaultKeybinding(n,e.id,e.args,e.weight,0,e.when)}if(t&&Array.isArray(t.secondary))for(let n=0,r=t.secondary.length;n=21&&e<=30||e>=31&&e<=56||80===e||81===e||82===e||83===e||84===e||85===e||86===e||110===e||111===e||87===e||88===e||89===e||90===e||91===e||92===e}_assertNoCtrlAlt(e,t){e.ctrlKey&&e.altKey&&!e.metaKey&&a._mightProduceChar(e.keyCode)&&console.warn("Ctrl+Alt+ keybindings should not be used by default under Windows. Offender: ",e," for ",t)}_registerDefaultKeybinding(e,t,n,i,r,s){1===o.OS&&this._assertNoCtrlAlt(e.parts[0],t),this._coreKeybindings.push({keybinding:e,command:t,commandArgs:n,when:s,weight1:i,weight2:r,extensionId:null,isBuiltinExtension:!1}),this._cachedMergedKeybindings=null}getDefaultKeybindings(){return this._cachedMergedKeybindings||(this._cachedMergedKeybindings=[].concat(this._coreKeybindings).concat(this._extensionKeybindings),this._cachedMergedKeybindings.sort(d)),this._cachedMergedKeybindings.slice(0)}}const l=new a;function d(e,t){return e.weight1!==t.weight1?e.weight1-t.weight1:e.commandt.command?1:e.weight2-t.weight2}s.B.add("platform.keybindingsRegistry",l)},4349:(e,t,n)=>{"use strict";n.d(t,{e:()=>i});const i=(0,n(2065).yh)("labelService")},3738:(e,t,n)=>{"use strict";n.d(t,{Lw:()=>at,XN:()=>lt,ls:()=>jt,ev:()=>Mt,CQ:()=>ht});var i=n(5321),o=(n(3164),n(5976)),r=n(9488),s=n(3799),a=n(4669),l=n(1050);class d{constructor(e,t){this.renderer=e,this.modelProvider=t}get templateId(){return this.renderer.templateId}renderTemplate(e){return{data:this.renderer.renderTemplate(e),disposable:o.JT.None}}renderElement(e,t,n,i){if(n.disposable&&n.disposable.dispose(),!n.data)return;const o=this.modelProvider();if(o.isResolved(e))return this.renderer.renderElement(o.get(e),e,n.data,i);const r=new l.A,s=o.resolve(e,r.token);n.disposable={dispose:()=>r.cancel()},this.renderer.renderPlaceholder(e,n.data),s.then((t=>this.renderer.renderElement(t,e,n.data,i)))}disposeTemplate(e){e.disposable&&(e.disposable.dispose(),e.disposable=void 0),e.data&&(this.renderer.disposeTemplate(e.data),e.data=void 0)}}class c{constructor(e,t){this.modelProvider=e,this.accessibilityProvider=t}getWidgetAriaLabel(){return this.accessibilityProvider.getWidgetAriaLabel()}getAriaLabel(e){const t=this.modelProvider();return t.isResolved(e)?this.accessibilityProvider.getAriaLabel(t.get(e)):null}}var h=n(3580),u=n(3108),g=n(3193),p=n(8819),m=n(2065),f=n(1847),_=n(9872),b=n(8810),C=n(7781),v=n(9282),w=n(3725),y=n(3379),A=n.n(y),S=n(7795),x=n.n(S),k=n(569),L=n.n(k),E=n(3565),N=n.n(E),D=n(9216),I=n.n(D),M=n(4589),T=n.n(M),R=n(1766),O={};O.styleTagTransform=T(),O.setAttributes=N(),O.insert=L().bind(null,"head"),O.domAPI=x(),O.insertStyleElement=I(),A()(R.Z,O),R.Z&&R.Z.locals&&R.Z.locals;var B,P=n(9069);!function(e){e[e.Unknown=0]="Unknown",e[e.Twistie=1]="Twistie",e[e.Element=2]="Element"}(B||(B={}));class F extends Error{constructor(e,t){super(`TreeError [${e}] ${t}`)}}class W{constructor(e){this.fn=e,this._map=new WeakMap}map(e){let t=this._map.get(e);return t||(t=this.fn(e),this._map.set(e,t)),t}}var z=n(3547),V=n(5707),H=n(4850),j=n(5392),$=n(2484);function U(e){return"object"==typeof e&&"visibility"in e&&"data"in e}function Z(e){switch(e){case!0:return 1;case!1:return 0;default:return e}}function K(e){return"boolean"==typeof e.collapsible}class q{constructor(e,t,n,i={}){this.user=e,this.list=t,this.rootRef=[],this.eventBufferer=new a.E7,this._onDidChangeCollapseState=new a.Q5,this.onDidChangeCollapseState=this.eventBufferer.wrapEvent(this._onDidChangeCollapseState.event),this._onDidChangeRenderNodeCount=new a.Q5,this.onDidChangeRenderNodeCount=this.eventBufferer.wrapEvent(this._onDidChangeRenderNodeCount.event),this._onDidSplice=new a.Q5,this.onDidSplice=this._onDidSplice.event,this.collapseByDefault=void 0!==i.collapseByDefault&&i.collapseByDefault,this.filter=i.filter,this.autoExpandSingleChildren=void 0!==i.autoExpandSingleChildren&&i.autoExpandSingleChildren,this.root={parent:void 0,element:n,children:[],depth:0,visibleChildrenCount:0,visibleChildIndex:-1,collapsible:!1,collapsed:!1,renderNodeCount:0,visibility:1,visible:!0,filterData:void 0}}splice(e,t,n=w.$.empty(),i={}){if(0===e.length)throw new F(this.user,"Invalid tree location");i.diffIdentityProvider?this.spliceSmart(i.diffIdentityProvider,e,t,n,i):this.spliceSimple(e,t,n,i)}spliceSmart(e,t,n,i,o,r){var s;void 0===i&&(i=w.$.empty()),void 0===r&&(r=null!==(s=o.diffDepth)&&void 0!==s?s:0);const{parentNode:a}=this.getParentNodeWithListIndex(t),l=[...i],d=t[t.length-1],c=new $.Hs({getElements:()=>a.children.map((t=>e.getId(t.element).toString()))},{getElements:()=>[...a.children.slice(0,d),...l,...a.children.slice(d+n)].map((t=>e.getId(t.element).toString()))}).ComputeDiff(!1);if(c.quitEarly)return this.spliceSimple(t,n,l,o);const h=t.slice(0,-1),u=(t,n,i)=>{if(r>0)for(let s=0;st.originalStart-e.originalStart)))u(g,p,g-(e.originalStart+e.originalLength)),g=e.originalStart,p=e.modifiedStart-d,this.spliceSimple([...h,g],e.originalLength,w.$.slice(l,p,p+e.modifiedLength),o);u(g,p,g)}spliceSimple(e,t,n=w.$.empty(),{onDidCreateNode:i,onDidDeleteNode:o}){const{parentNode:s,listIndex:a,revealed:l,visible:d}=this.getParentNodeWithListIndex(e),c=[],h=w.$.map(n,(e=>this.createTreeNode(e,s,s.visible?1:0,l,c,i))),u=e[e.length-1],g=s.children.length>0;let p=0;for(let e=u;e>=0&&ee+(t.visible?t.renderNodeCount:0)),0);this._updateAncestorsRenderNodeCount(s,_-e),this.list.splice(a,e,c)}if(b.length>0&&o){const e=t=>{o(t),t.children.forEach(e)};b.forEach(e)}const v=s.children.length>0;g!==v&&this.setCollapsible(e.slice(0,-1),v),this._onDidSplice.fire({insertedNodes:m,deletedNodes:b});let y=s;for(;y;){if(2===y.visibility){this.refilter();break}y=y.parent}}rerender(e){if(0===e.length)throw new F(this.user,"Invalid tree location");const{node:t,listIndex:n,revealed:i}=this.getTreeNodeWithListIndex(e);t.visible&&i&&this.list.splice(n,1,[t])}has(e){return this.hasTreeNode(e)}getListIndex(e){const{listIndex:t,visible:n,revealed:i}=this.getTreeNodeWithListIndex(e);return n&&i?t:-1}getListRenderCount(e){return this.getTreeNode(e).renderNodeCount}isCollapsible(e){return this.getTreeNode(e).collapsible}setCollapsible(e,t){const n=this.getTreeNode(e);void 0===t&&(t=!n.collapsible);const i={collapsible:t};return this.eventBufferer.bufferEvents((()=>this._setCollapseState(e,i)))}isCollapsed(e){return this.getTreeNode(e).collapsed}setCollapsed(e,t,n){const i=this.getTreeNode(e);void 0===t&&(t=!i.collapsed);const o={collapsed:t,recursive:n||!1};return this.eventBufferer.bufferEvents((()=>this._setCollapseState(e,o)))}_setCollapseState(e,t){const{node:n,listIndex:i,revealed:o}=this.getTreeNodeWithListIndex(e),r=this._setListNodeCollapseState(n,i,o,t);if(n!==this.root&&this.autoExpandSingleChildren&&r&&!K(t)&&n.collapsible&&!n.collapsed&&!t.recursive){let i=-1;for(let e=0;e-1){i=-1;break}i=e}i>-1&&this._setCollapseState([...e,i],t)}return r}_setListNodeCollapseState(e,t,n,i){const o=this._setNodeCollapseState(e,i,!1);if(!n||!e.visible||!o)return o;const r=e.renderNodeCount,s=this.updateNodeAfterCollapseChange(e),a=r-(-1===t?0:1);return this.list.splice(t+1,a,s.slice(1)),o}_setNodeCollapseState(e,t,n){let i;if(e===this.root?i=!1:(K(t)?(i=e.collapsible!==t.collapsible,e.collapsible=t.collapsible):e.collapsible?(i=e.collapsed!==t.collapsed,e.collapsed=t.collapsed):i=!1,i&&this._onDidChangeCollapseState.fire({node:e,deep:n})),!K(t)&&t.recursive)for(const n of e.children)i=this._setNodeCollapseState(n,t,!0)||i;return i}expandTo(e){this.eventBufferer.bufferEvents((()=>{let t=this.getTreeNode(e);for(;t.parent;)t=t.parent,e=e.slice(0,e.length-1),t.collapsed&&this._setCollapseState(e,{collapsed:!1,recursive:!1})}))}refilter(){const e=this.root.renderNodeCount,t=this.updateNodeAfterFilterChange(this.root);this.list.splice(0,e,t)}createTreeNode(e,t,n,i,o,r){const s={parent:t,element:e.element,children:[],depth:t.depth+1,visibleChildrenCount:0,visibleChildIndex:-1,collapsible:"boolean"==typeof e.collapsible?e.collapsible:void 0!==e.collapsed,collapsed:void 0===e.collapsed?this.collapseByDefault:e.collapsed,renderNodeCount:1,visibility:1,visible:!0,filterData:void 0},a=this._filterNode(s,n);s.visibility=a,i&&o.push(s);const l=e.children||w.$.empty(),d=i&&0!==a&&!s.collapsed,c=w.$.map(l,(e=>this.createTreeNode(e,s,a,d,o,r)));let h=0,u=1;for(const e of c)s.children.push(e),u+=e.renderNodeCount,e.visible&&(e.visibleChildIndex=h++);return s.collapsible=s.collapsible||s.children.length>0,s.visibleChildrenCount=h,s.visible=2===a?h>0:1===a,s.visible?s.collapsed||(s.renderNodeCount=u):(s.renderNodeCount=0,i&&o.pop()),r&&r(s),s}updateNodeAfterCollapseChange(e){const t=e.renderNodeCount,n=[];return this._updateNodeAfterCollapseChange(e,n),this._updateAncestorsRenderNodeCount(e.parent,n.length-t),n}_updateNodeAfterCollapseChange(e,t){if(!1===e.visible)return 0;if(t.push(e),e.renderNodeCount=1,!e.collapsed)for(const n of e.children)e.renderNodeCount+=this._updateNodeAfterCollapseChange(n,t);return this._onDidChangeRenderNodeCount.fire(e),e.renderNodeCount}updateNodeAfterFilterChange(e){const t=e.renderNodeCount,n=[];return this._updateNodeAfterFilterChange(e,e.visible?1:0,n),this._updateAncestorsRenderNodeCount(e.parent,n.length-t),n}_updateNodeAfterFilterChange(e,t,n,i=!0){let o;if(e!==this.root){if(o=this._filterNode(e,t),0===o)return e.visible=!1,e.renderNodeCount=0,!1;i&&n.push(e)}const r=n.length;e.renderNodeCount=e===this.root?0:1;let s=!1;if(e.collapsed&&0===o)e.visibleChildrenCount=0;else{let t=0;for(const r of e.children)s=this._updateNodeAfterFilterChange(r,o,n,i&&!e.collapsed)||s,r.visible&&(r.visibleChildIndex=t++);e.visibleChildrenCount=t}return e!==this.root&&(e.visible=2===o?s:1===o),e.visible?e.collapsed||(e.renderNodeCount+=n.length-r):(e.renderNodeCount=0,i&&n.pop()),this._onDidChangeRenderNodeCount.fire(e),e.visible}_updateAncestorsRenderNodeCount(e,t){if(0!==t)for(;e;)e.renderNodeCount+=t,this._onDidChangeRenderNodeCount.fire(e),e=e.parent}_filterNode(e,t){const n=this.filter?this.filter.filter(e.element,t):1;return"boolean"==typeof n?(e.filterData=void 0,n?1:0):U(n)?(e.filterData=n.data,Z(n.visibility)):(e.filterData=void 0,Z(n))}hasTreeNode(e,t=this.root){if(!e||0===e.length)return!0;const[n,...i]=e;return!(n<0||n>t.children.length)&&this.hasTreeNode(i,t.children[n])}getTreeNode(e,t=this.root){if(!e||0===e.length)return t;const[n,...i]=e;if(n<0||n>t.children.length)throw new F(this.user,"Invalid tree location");return this.getTreeNode(i,t.children[n])}getTreeNodeWithListIndex(e){if(0===e.length)return{node:this.root,listIndex:-1,revealed:!0,visible:!1};const{parentNode:t,listIndex:n,revealed:i,visible:o}=this.getParentNodeWithListIndex(e),r=e[e.length-1];if(r<0||r>t.children.length)throw new F(this.user,"Invalid tree location");const s=t.children[r];return{node:s,listIndex:n,revealed:i,visible:o&&s.visible}}getParentNodeWithListIndex(e,t=this.root,n=0,i=!0,o=!0){const[r,...s]=e;if(r<0||r>t.children.length)throw new F(this.user,"Invalid tree location");for(let e=0;ee.element))),this.data=e}}function se(e){return e instanceof V.kX?new re(e):e}class ae{constructor(e,t){this.modelProvider=e,this.dnd=t,this.autoExpandDisposable=o.JT.None}getDragURI(e){return this.dnd.getDragURI(e.element)}getDragLabel(e,t){if(this.dnd.getDragLabel)return this.dnd.getDragLabel(e.map((e=>e.element)),t)}onDragStart(e,t){this.dnd.onDragStart&&this.dnd.onDragStart(se(e),t)}onDragOver(e,t,n,i,o=!0){const s=this.dnd.onDragOver(se(e),t&&t.element,n,i),a=this.autoExpandNode!==t;if(a&&(this.autoExpandDisposable.dispose(),this.autoExpandNode=t),void 0===t)return s;if(a&&"boolean"!=typeof s&&s.autoExpand&&(this.autoExpandDisposable=(0,Y.Vg)((()=>{const e=this.modelProvider(),n=e.getNodeLocation(t);e.isCollapsed(n)&&e.setCollapsed(n,!1),this.autoExpandNode=void 0}),500)),"boolean"==typeof s||!s.accept||void 0===s.bubble||s.feedback)return o?s:{accept:"boolean"==typeof s?s:s.accept,effect:"boolean"==typeof s?void 0:s.effect,feedback:[n]};if(1===s.bubble){const n=this.modelProvider(),o=n.getNodeLocation(t),r=n.getParentNodeLocation(o),s=n.getNode(r),a=r&&n.getListIndex(r);return this.onDragOver(e,s,a,i,!1)}const l=this.modelProvider(),d=l.getNodeLocation(t),c=l.getListIndex(d),h=l.getListRenderCount(d);return Object.assign(Object.assign({},s),{feedback:(0,r.w6)(c,c+h)})}drop(e,t,n,i){this.autoExpandDisposable.dispose(),this.autoExpandNode=void 0,this.dnd.drop(se(e),t&&t.element,n,i)}onDragEnd(e){this.dnd.onDragEnd&&this.dnd.onDragEnd(e)}}class le{constructor(e){this.delegate=e}getHeight(e){return this.delegate.getHeight(e.element)}getTemplateId(e){return this.delegate.getTemplateId(e.element)}hasDynamicHeight(e){return!!this.delegate.hasDynamicHeight&&this.delegate.hasDynamicHeight(e.element)}setDynamicHeight(e,t){this.delegate.setDynamicHeight&&this.delegate.setDynamicHeight(e.element,t)}}var de;!function(e){e.None="none",e.OnHover="onHover",e.Always="always"}(de||(de={}));class ce{constructor(e,t=[]){this._elements=t,this.onDidChange=a.ju.forEach(e,(e=>this._elements=e))}get elements(){return this._elements}}class he{constructor(e,t,n,i,r={}){this.renderer=e,this.modelProvider=t,this.activeNodes=i,this.renderedElements=new Map,this.renderedNodes=new Map,this.indent=he.DefaultIndent,this.hideTwistiesOfChildlessElements=!1,this.shouldRenderIndentGuides=!1,this.renderedIndentGuides=new X.r,this.activeIndentNodes=new Set,this.indentGuidesDisposable=o.JT.None,this.disposables=new o.SL,this.templateId=e.templateId,this.updateOptions(r),a.ju.map(n,(e=>e.node))(this.onDidChangeNodeTwistieState,this,this.disposables),e.onDidChangeTwistieState&&e.onDidChangeTwistieState(this.onDidChangeTwistieState,this,this.disposables)}updateOptions(e={}){if(void 0!==e.indent&&(this.indent=(0,Q.u)(e.indent,0,40)),void 0!==e.renderIndentGuides){const t=e.renderIndentGuides!==de.None;if(t!==this.shouldRenderIndentGuides&&(this.shouldRenderIndentGuides=t,this.indentGuidesDisposable.dispose(),t)){const e=new o.SL;this.activeNodes.onDidChange(this._onDidChangeActiveNodes,this,e),this.indentGuidesDisposable=e,this._onDidChangeActiveNodes(this.activeNodes.elements)}}void 0!==e.hideTwistiesOfChildlessElements&&(this.hideTwistiesOfChildlessElements=e.hideTwistiesOfChildlessElements)}renderTemplate(e){const t=(0,i.R3)(e,(0,i.$)(".monaco-tl-row")),n=(0,i.R3)(t,(0,i.$)(".monaco-tl-indent")),r=(0,i.R3)(t,(0,i.$)(".monaco-tl-twistie")),s=(0,i.R3)(t,(0,i.$)(".monaco-tl-contents")),a=this.renderer.renderTemplate(s);return{container:e,indent:n,twistie:r,indentGuidesDisposable:o.JT.None,templateData:a}}renderElement(e,t,n,i){"number"==typeof i&&(this.renderedNodes.set(e,{templateData:n,height:i}),this.renderedElements.set(e.element,e));const o=he.DefaultIndent+(e.depth-1)*this.indent;n.twistie.style.paddingLeft=`${o}px`,n.indent.style.width=o+this.indent-16+"px",this.renderTwistie(e,n),"number"==typeof i&&this.renderIndentGuides(e,n),this.renderer.renderElement(e,t,n.templateData,i)}disposeElement(e,t,n,i){n.indentGuidesDisposable.dispose(),this.renderer.disposeElement&&this.renderer.disposeElement(e,t,n.templateData,i),"number"==typeof i&&(this.renderedNodes.delete(e),this.renderedElements.delete(e.element))}disposeTemplate(e){this.renderer.disposeTemplate(e.templateData)}onDidChangeTwistieState(e){const t=this.renderedElements.get(e);t&&this.onDidChangeNodeTwistieState(t)}onDidChangeNodeTwistieState(e){const t=this.renderedNodes.get(e);t&&(this.renderTwistie(e,t.templateData),this._onDidChangeActiveNodes(this.activeNodes.elements),this.renderIndentGuides(e,t.templateData))}renderTwistie(e,t){t.twistie.classList.remove(...ee.classNamesArray);let n=!1;this.renderer.renderTwistie&&(n=this.renderer.renderTwistie(e.element,t.twistie)),e.collapsible&&(!this.hideTwistiesOfChildlessElements||e.visibleChildrenCount>0)?(n||t.twistie.classList.add(...ee.classNamesArray),t.twistie.classList.add("collapsible"),t.twistie.classList.toggle("collapsed",e.collapsed)):t.twistie.classList.remove("collapsible","collapsed"),e.collapsible?t.container.setAttribute("aria-expanded",String(!e.collapsed)):t.container.removeAttribute("aria-expanded")}renderIndentGuides(e,t){if((0,i.PO)(t.indent),t.indentGuidesDisposable.dispose(),!this.shouldRenderIndentGuides)return;const n=new o.SL,r=this.modelProvider();let s=e;for(;;){const e=r.getNodeLocation(s),a=r.getParentNodeLocation(e);if(!a)break;const l=r.getNode(a),d=(0,i.$)(".indent-guide",{style:`width: ${this.indent}px`});this.activeIndentNodes.has(l)&&d.classList.add("active"),0===t.indent.childElementCount?t.indent.appendChild(d):t.indent.insertBefore(d,t.indent.firstElementChild),this.renderedIndentGuides.add(l,d),n.add((0,o.OF)((()=>this.renderedIndentGuides.delete(l,d)))),s=l}t.indentGuidesDisposable=n}_onDidChangeActiveNodes(e){if(!this.shouldRenderIndentGuides)return;const t=new Set,n=this.modelProvider();e.forEach((e=>{const i=n.getNodeLocation(e);try{const o=n.getParentNodeLocation(i);e.collapsible&&e.children.length>0&&!e.collapsed?t.add(e):o&&t.add(n.getNode(o))}catch(e){}})),this.activeIndentNodes.forEach((e=>{t.has(e)||this.renderedIndentGuides.forEach(e,(e=>e.classList.remove("active")))})),t.forEach((e=>{this.activeIndentNodes.has(e)||this.renderedIndentGuides.forEach(e,(e=>e.classList.add("active")))})),this.activeIndentNodes=t}dispose(){this.renderedNodes.clear(),this.renderedElements.clear(),this.indentGuidesDisposable.dispose(),(0,o.B9)(this.disposables)}}he.DefaultIndent=8;class ue{constructor(e,t,n){this.tree=e,this.keyboardNavigationLabelProvider=t,this._filter=n,this._totalCount=0,this._matchCount=0,this._pattern="",this._lowercasePattern="",this.disposables=new o.SL,e.onWillRefilter(this.reset,this,this.disposables)}get totalCount(){return this._totalCount}get matchCount(){return this._matchCount}set pattern(e){this._pattern=e,this._lowercasePattern=e.toLowerCase()}filter(e,t){if(this._filter){const n=this._filter.filter(e,t);if(this.tree.options.simpleKeyboardNavigation)return n;let i;if(i="boolean"==typeof n?n?1:0:U(n)?Z(n.visibility):n,0===i)return!1}if(this._totalCount++,this.tree.options.simpleKeyboardNavigation||!this._pattern)return this._matchCount++,{data:j.CL.Default,visibility:!0};const n=this.keyboardNavigationLabelProvider.getKeyboardNavigationLabel(e),i=Array.isArray(n)?n:[n];for(const e of i){const t=e&&e.toString();if(void 0===t)return{data:j.CL.Default,visibility:!0};const n=(0,j.EW)(this._pattern,this._lowercasePattern,0,t,t.toLowerCase(),0,!0);if(n)return this._matchCount++,1===i.length?{data:n,visibility:!0}:{data:{label:t,score:n},visibility:!0}}return this.tree.options.filterOnType?2:{data:j.CL.Default,visibility:!0}}reset(){this._totalCount=0,this._matchCount=0}dispose(){(0,o.B9)(this.disposables)}}class ge{constructor(e,t,n,r,s){this.tree=e,this.view=n,this.filter=r,this.keyboardNavigationDelegate=s,this._enabled=!1,this._pattern="",this._empty=!1,this._onDidChangeEmptyState=new a.Q5,this.positionClassName="ne",this.automaticKeyboardNavigation=!0,this.triggered=!1,this._onDidChangePattern=new a.Q5,this.enabledDisposables=new o.SL,this.disposables=new o.SL,this.domNode=(0,i.$)(`.monaco-list-type-filter.${this.positionClassName}`),this.domNode.draggable=!0,this.disposables.add((0,i.nm)(this.domNode,"dragstart",(()=>this.onDragStart()))),this.messageDomNode=(0,i.R3)(n.getHTMLElement(),(0,i.$)(".monaco-list-type-filter-message")),this.labelDomNode=(0,i.R3)(this.domNode,(0,i.$)("span.label"));const l=(0,i.R3)(this.domNode,(0,i.$)(".controls"));this._filterOnType=!!e.options.filterOnType,this.filterOnTypeDomNode=(0,i.R3)(l,(0,i.$)("input.filter")),this.filterOnTypeDomNode.type="checkbox",this.filterOnTypeDomNode.checked=this._filterOnType,this.filterOnTypeDomNode.tabIndex=-1,this.updateFilterOnTypeTitleAndIcon(),this.disposables.add((0,i.nm)(this.filterOnTypeDomNode,"input",(()=>this.onDidChangeFilterOnType()))),this.clearDomNode=(0,i.R3)(l,(0,i.$)("button.clear"+ie.cssSelector)),this.clearDomNode.tabIndex=-1,this.clearDomNode.title=(0,h.N)("clear","Clear"),this.keyboardNavigationEventFilter=e.options.keyboardNavigationEventFilter,t.onDidSplice(this.onDidSpliceModel,this,this.disposables),this.updateOptions(e.options)}get enabled(){return this._enabled}get pattern(){return this._pattern}get filterOnType(){return this._filterOnType}updateOptions(e){e.simpleKeyboardNavigation?this.disable():this.enable(),void 0!==e.filterOnType&&(this._filterOnType=!!e.filterOnType,this.filterOnTypeDomNode.checked=this._filterOnType,this.updateFilterOnTypeTitleAndIcon()),void 0!==e.automaticKeyboardNavigation&&(this.automaticKeyboardNavigation=e.automaticKeyboardNavigation),this.tree.refilter(),this.render(),this.automaticKeyboardNavigation||this.onEventOrInput("")}enable(){if(this._enabled)return;const e=this.enabledDisposables.add(new H.Y(this.view.getHTMLElement(),"keydown")),t=a.ju.chain(e.event).filter((e=>!(0,s.cK)(e.target)||e.target===this.filterOnTypeDomNode)).filter((e=>"Dead"!==e.key&&!/^Media/.test(e.key))).map((e=>new P.y(e))).filter(this.keyboardNavigationEventFilter||(()=>!0)).filter((()=>this.automaticKeyboardNavigation||this.triggered)).filter((e=>this.keyboardNavigationDelegate.mightProducePrintableCharacter(e)&&!(18===e.keyCode||16===e.keyCode||15===e.keyCode||17===e.keyCode)||(this.pattern.length>0||this.triggered)&&(9===e.keyCode||1===e.keyCode)&&!e.altKey&&!e.ctrlKey&&!e.metaKey||1===e.keyCode&&(G.dz?e.altKey&&!e.metaKey:e.ctrlKey)&&!e.shiftKey)).forEach((e=>{e.stopPropagation(),e.preventDefault()})).event,n=this.enabledDisposables.add(new H.Y(this.clearDomNode,"click"));a.ju.chain(a.ju.any(t,n.event)).event(this.onEventOrInput,this,this.enabledDisposables),this.filter.pattern="",this.tree.refilter(),this.render(),this._enabled=!0,this.triggered=!1}disable(){this._enabled&&(this.domNode.remove(),this.enabledDisposables.clear(),this.tree.refilter(),this.render(),this._enabled=!1,this.triggered=!1)}onEventOrInput(e){"string"==typeof e?this.onInput(e):e instanceof MouseEvent||9===e.keyCode||1===e.keyCode&&(G.dz?e.altKey:e.ctrlKey)?this.onInput(""):1===e.keyCode?this.onInput(0===this.pattern.length?"":this.pattern.substr(0,this.pattern.length-1)):this.onInput(this.pattern+e.browserEvent.key)}onInput(e){const t=this.view.getHTMLElement();e&&!this.domNode.parentElement?t.append(this.domNode):!e&&this.domNode.parentElement&&(this.domNode.remove(),this.tree.domFocus()),this._pattern=e,this._onDidChangePattern.fire(e),this.filter.pattern=e,this.tree.refilter(),e&&this.tree.focusNext(0,!0,void 0,(e=>!j.CL.isDefault(e.filterData)));const n=this.tree.getFocus();if(n.length>0){const e=n[0];null===this.tree.getRelativeTop(e)&&this.tree.reveal(e,.5)}this.render(),e||(this.triggered=!1)}onDragStart(){const e=this.view.getHTMLElement(),{left:t}=(0,i.i)(e),n=e.clientWidth,r=n/2,s=this.domNode.clientWidth,a=new o.SL;let l=this.positionClassName;const d=()=>{switch(l){case"nw":this.domNode.style.top="4px",this.domNode.style.left="4px";break;case"ne":this.domNode.style.top="4px",this.domNode.style.left=n-s-6+"px"}},c=()=>{this.positionClassName=l,this.domNode.className=`monaco-list-type-filter ${this.positionClassName}`,this.domNode.style.top="",this.domNode.style.left="",(0,o.B9)(a)};d(),this.domNode.classList.remove(l),this.domNode.classList.add("dragging"),a.add((0,o.OF)((()=>this.domNode.classList.remove("dragging")))),a.add((0,i.nm)(document,"dragover",(e=>(e=>{e.preventDefault();const n=e.clientX-t;e.dataTransfer&&(e.dataTransfer.dropEffect="none"),l=nc()))),z.P$.CurrentDragAndDropData=new z.TN("vscode-ui"),a.add((0,o.OF)((()=>z.P$.CurrentDragAndDropData=void 0)))}onDidSpliceModel(){this._enabled&&0!==this.pattern.length&&(this.tree.refilter(),this.render())}onDidChangeFilterOnType(){this.tree.updateOptions({filterOnType:this.filterOnTypeDomNode.checked}),this.tree.refilter(),this.tree.domFocus(),this.render(),this.updateFilterOnTypeTitleAndIcon()}updateFilterOnTypeTitleAndIcon(){this.filterOnType?(this.filterOnTypeDomNode.classList.remove(...ne.classNamesArray),this.filterOnTypeDomNode.classList.add(...te.classNamesArray),this.filterOnTypeDomNode.title=(0,h.N)("disable filter on type","Disable Filter on Type")):(this.filterOnTypeDomNode.classList.remove(...te.classNamesArray),this.filterOnTypeDomNode.classList.add(...ne.classNamesArray),this.filterOnTypeDomNode.title=(0,h.N)("enable filter on type","Enable Filter on Type"))}render(){const e=this.filter.totalCount>0&&0===this.filter.matchCount;this.pattern&&this.tree.options.filterOnType&&e?(this.messageDomNode.textContent=(0,h.N)("empty","No elements found"),this._empty=!0):(this.messageDomNode.innerText="",this._empty=!1),this.domNode.classList.toggle("no-matches",e),this.domNode.title=(0,h.N)("found","Matched {0} out of {1} elements",this.filter.matchCount,this.filter.totalCount),this.labelDomNode.textContent=this.pattern.length>16?"…"+this.pattern.substr(this.pattern.length-16):this.pattern,this._onDidChangeEmptyState.fire(this._empty)}shouldAllowFocus(e){return!(this.enabled&&this.pattern&&!this.filterOnType)||this.filter.totalCount>0&&this.filter.matchCount<=1||!j.CL.isDefault(e.filterData)}dispose(){this._enabled&&(this.domNode.remove(),this.enabledDisposables.dispose(),this._enabled=!1,this.triggered=!1),this._onDidChangePattern.dispose(),(0,o.B9)(this.disposables)}}function pe(e){let t=B.Unknown;return(0,i.uU)(e.browserEvent.target,"monaco-tl-twistie","monaco-tl-row")?t=B.Twistie:(0,i.uU)(e.browserEvent.target,"monaco-tl-contents","monaco-tl-row")&&(t=B.Element),{browserEvent:e.browserEvent,element:e.element?e.element.element:null,target:t}}function me(e,t){t(e),e.children.forEach((e=>me(e,t)))}class fe{constructor(e,t){this.getFirstViewElementWithTrait=e,this.identityProvider=t,this.nodes=[],this._onDidChange=new a.Q5,this.onDidChange=this._onDidChange.event}get nodeSet(){return this._nodeSet||(this._nodeSet=this.createNodeSet()),this._nodeSet}set(e,t){var n;!(null===(n=t)||void 0===n?void 0:n.__forceEvent)&&(0,r.fS)(this.nodes,e)||this._set(e,!1,t)}_set(e,t,n){if(this.nodes=[...e],this.elements=void 0,this._nodeSet=void 0,!t){const e=this;this._onDidChange.fire({get elements(){return e.get()},browserEvent:n})}}get(){return this.elements||(this.elements=this.nodes.map((e=>e.element))),[...this.elements]}getNodes(){return this.nodes}has(e){return this.nodeSet.has(e)}onDidModelSplice({insertedNodes:e,deletedNodes:t}){if(!this.identityProvider){const e=this.createNodeSet(),n=t=>e.delete(t);return t.forEach((e=>me(e,n))),void this.set([...e.values()])}const n=new Set,i=e=>n.add(this.identityProvider.getId(e.element).toString());t.forEach((e=>me(e,i)));const o=new Map,r=e=>o.set(this.identityProvider.getId(e.element).toString(),e);e.forEach((e=>me(e,r)));const s=[];for(const e of this.nodes){const t=this.identityProvider.getId(e.element).toString();if(n.has(t)){const e=o.get(t);e&&s.push(e)}else s.push(e)}if(this.nodes.length>0&&0===s.length){const e=this.getFirstViewElementWithTrait();e&&s.push(e)}this._set(s,!0)}createNodeSet(){const e=new Set;for(const t of this.nodes)e.add(t);return e}}class _e extends s.sx{constructor(e,t){super(e),this.tree=t}onViewPointer(e){if((0,s.cK)(e.browserEvent.target)||(0,s.hD)(e.browserEvent.target))return;const t=e.element;if(!t)return super.onViewPointer(e);if(this.isSelectionRangeChangeEvent(e)||this.isSelectionSingleChangeEvent(e))return super.onViewPointer(e);const n=e.browserEvent.target,i=n.classList.contains("monaco-tl-twistie")||n.classList.contains("monaco-icon-label")&&n.classList.contains("folder-icon")&&e.browserEvent.offsetX<16;let o=!1;if(o="function"==typeof this.tree.expandOnlyOnTwistieClick?this.tree.expandOnlyOnTwistieClick(t.element):!!this.tree.expandOnlyOnTwistieClick,o&&!i&&2!==e.browserEvent.detail)return super.onViewPointer(e);if(!this.tree.expandOnDoubleClick&&2===e.browserEvent.detail)return super.onViewPointer(e);if(t.collapsible){const n=this.tree.model,r=n.getNodeLocation(t),s=e.browserEvent.altKey;if(this.tree.setFocus([r]),n.setCollapsed(r,void 0,s),o&&i)return}super.onViewPointer(e)}onDoubleClick(e){!e.browserEvent.target.classList.contains("monaco-tl-twistie")&&this.tree.expandOnDoubleClick&&super.onDoubleClick(e)}}class be extends s.aV{constructor(e,t,n,i,o,r,s,a){super(e,t,n,i,a),this.focusTrait=o,this.selectionTrait=r,this.anchorTrait=s}createMouseController(e){return new _e(this,e.tree)}splice(e,t,n=[]){if(super.splice(e,t,n),0===n.length)return;const i=[],o=[];let s;n.forEach(((t,n)=>{this.focusTrait.has(t)&&i.push(e+n),this.selectionTrait.has(t)&&o.push(e+n),this.anchorTrait.has(t)&&(s=e+n)})),i.length>0&&super.setFocus((0,r.cU)([...super.getFocus(),...i])),o.length>0&&super.setSelection((0,r.cU)([...super.getSelection(),...o])),"number"==typeof s&&super.setAnchor(s)}setFocus(e,t,n=!1){super.setFocus(e,t),n||this.focusTrait.set(e.map((e=>this.element(e))),t)}setSelection(e,t,n=!1){super.setSelection(e,t),n||this.selectionTrait.set(e.map((e=>this.element(e))),t)}setAnchor(e,t=!1){super.setAnchor(e),t||(void 0===e?this.anchorTrait.set([]):this.anchorTrait.set([this.element(e)]))}}class Ce{constructor(e,t,n,r,l={}){this._options=l,this.eventBufferer=new a.E7,this.disposables=new o.SL,this._onWillRefilter=new a.Q5,this.onWillRefilter=this._onWillRefilter.event,this._onDidUpdateOptions=new a.Q5;const d=new le(n),c=new a.ZD,h=new a.ZD,u=new ce(h.event);this.renderers=r.map((e=>new he(e,(()=>this.model),c.event,u,l)));for(let e of this.renderers)this.disposables.add(e);let g;l.keyboardNavigationLabelProvider&&(g=new ue(this,l.keyboardNavigationLabelProvider,l.filter),l=Object.assign(Object.assign({},l),{filter:g}),this.disposables.add(g)),this.focus=new fe((()=>this.view.getFocusedElements()[0]),l.identityProvider),this.selection=new fe((()=>this.view.getSelectedElements()[0]),l.identityProvider),this.anchor=new fe((()=>this.view.getAnchorElement()),l.identityProvider),this.view=new be(e,t,d,this.renderers,this.focus,this.selection,this.anchor,Object.assign(Object.assign({},function(e,t){return t&&Object.assign(Object.assign({},t),{identityProvider:t.identityProvider&&{getId:e=>t.identityProvider.getId(e.element)},dnd:t.dnd&&new ae(e,t.dnd),multipleSelectionController:t.multipleSelectionController&&{isSelectionSingleChangeEvent:e=>t.multipleSelectionController.isSelectionSingleChangeEvent(Object.assign(Object.assign({},e),{element:e.element})),isSelectionRangeChangeEvent:e=>t.multipleSelectionController.isSelectionRangeChangeEvent(Object.assign(Object.assign({},e),{element:e.element}))},accessibilityProvider:t.accessibilityProvider&&Object.assign(Object.assign({},t.accessibilityProvider),{getSetSize(t){const n=e(),i=n.getNodeLocation(t),o=n.getParentNodeLocation(i);return n.getNode(o).visibleChildrenCount},getPosInSet:e=>e.visibleChildIndex+1,isChecked:t.accessibilityProvider&&t.accessibilityProvider.isChecked?e=>t.accessibilityProvider.isChecked(e.element):void 0,getRole:t.accessibilityProvider&&t.accessibilityProvider.getRole?e=>t.accessibilityProvider.getRole(e.element):()=>"treeitem",getAriaLabel:e=>t.accessibilityProvider.getAriaLabel(e.element),getWidgetAriaLabel:()=>t.accessibilityProvider.getWidgetAriaLabel(),getWidgetRole:t.accessibilityProvider&&t.accessibilityProvider.getWidgetRole?()=>t.accessibilityProvider.getWidgetRole():()=>"tree",getAriaLevel:t.accessibilityProvider&&t.accessibilityProvider.getAriaLevel?e=>t.accessibilityProvider.getAriaLevel(e.element):e=>e.depth,getActiveDescendantId:t.accessibilityProvider.getActiveDescendantId&&(e=>t.accessibilityProvider.getActiveDescendantId(e.element))}),keyboardNavigationLabelProvider:t.keyboardNavigationLabelProvider&&Object.assign(Object.assign({},t.keyboardNavigationLabelProvider),{getKeyboardNavigationLabel:e=>t.keyboardNavigationLabelProvider.getKeyboardNavigationLabel(e.element)}),enableKeyboardNavigation:t.simpleKeyboardNavigation})}((()=>this.model),l)),{tree:this})),this.model=this.createModel(e,this.view,l),c.input=this.model.onDidChangeCollapseState;const p=a.ju.forEach(this.model.onDidSplice,(e=>{this.eventBufferer.bufferEvents((()=>{this.focus.onDidModelSplice(e),this.selection.onDidModelSplice(e)}))}));if(p((()=>null),null,this.disposables),h.input=a.ju.chain(a.ju.any(p,this.focus.onDidChange,this.selection.onDidChange)).debounce((()=>null),0).map((()=>{const e=new Set;for(const t of this.focus.getNodes())e.add(t);for(const t of this.selection.getNodes())e.add(t);return[...e.values()]})).event,!1!==l.keyboardSupport){const e=a.ju.chain(this.view.onKeyDown).filter((e=>!(0,s.cK)(e.target))).map((e=>new P.y(e)));e.filter((e=>15===e.keyCode)).on(this.onLeftArrow,this,this.disposables),e.filter((e=>17===e.keyCode)).on(this.onRightArrow,this,this.disposables),e.filter((e=>10===e.keyCode)).on(this.onSpace,this,this.disposables)}if(l.keyboardNavigationLabelProvider){const e=l.keyboardNavigationDelegate||s.WK;this.typeFilterController=new ge(this,this.model,this.view,g,e),this.focusNavigationFilter=e=>this.typeFilterController.shouldAllowFocus(e),this.disposables.add(this.typeFilterController)}this.styleElement=(0,i.dS)(this.view.getHTMLElement()),this.getHTMLElement().classList.toggle("always",this._options.renderIndentGuides===de.Always)}get onDidChangeFocus(){return this.eventBufferer.wrapEvent(this.focus.onDidChange)}get onDidChangeSelection(){return this.eventBufferer.wrapEvent(this.selection.onDidChange)}get onMouseDblClick(){return a.ju.map(this.view.onMouseDblClick,pe)}get onPointer(){return a.ju.map(this.view.onPointer,pe)}get onDidFocus(){return this.view.onDidFocus}get onDidChangeCollapseState(){return this.model.onDidChangeCollapseState}get expandOnDoubleClick(){return void 0===this._options.expandOnDoubleClick||this._options.expandOnDoubleClick}get expandOnlyOnTwistieClick(){return void 0===this._options.expandOnlyOnTwistieClick||this._options.expandOnlyOnTwistieClick}get onDidDispose(){return this.view.onDidDispose}updateOptions(e={}){this._options=Object.assign(Object.assign({},this._options),e);for(const t of this.renderers)t.updateOptions(e);this.view.updateOptions(Object.assign(Object.assign({},this._options),{enableKeyboardNavigation:this._options.simpleKeyboardNavigation})),this.typeFilterController&&this.typeFilterController.updateOptions(this._options),this._onDidUpdateOptions.fire(this._options),this.getHTMLElement().classList.toggle("always",this._options.renderIndentGuides===de.Always)}get options(){return this._options}getHTMLElement(){return this.view.getHTMLElement()}get scrollTop(){return this.view.scrollTop}set scrollTop(e){this.view.scrollTop=e}domFocus(){this.view.domFocus()}layout(e,t){this.view.layout(e,t)}style(e){const t=`.${this.view.domId}`,n=[];e.treeIndentGuidesStroke&&(n.push(`.monaco-list${t}:hover .monaco-tl-indent > .indent-guide, .monaco-list${t}.always .monaco-tl-indent > .indent-guide { border-color: ${e.treeIndentGuidesStroke.transparent(.4)}; }`),n.push(`.monaco-list${t} .monaco-tl-indent > .indent-guide.active { border-color: ${e.treeIndentGuidesStroke}; }`)),this.styleElement.textContent=n.join("\n"),this.view.style(e)}collapse(e,t=!1){return this.model.setCollapsed(e,!0,t)}expand(e,t=!1){return this.model.setCollapsed(e,!1,t)}isCollapsible(e){return this.model.isCollapsible(e)}setCollapsible(e,t){return this.model.setCollapsible(e,t)}isCollapsed(e){return this.model.isCollapsed(e)}refilter(){this._onWillRefilter.fire(void 0),this.model.refilter()}setSelection(e,t){const n=e.map((e=>this.model.getNode(e)));this.selection.set(n,t);const i=e.map((e=>this.model.getListIndex(e))).filter((e=>e>-1));this.view.setSelection(i,t,!0)}getSelection(){return this.selection.get()}setFocus(e,t){const n=e.map((e=>this.model.getNode(e)));this.focus.set(n,t);const i=e.map((e=>this.model.getListIndex(e))).filter((e=>e>-1));this.view.setFocus(i,t,!0)}focusNext(e=1,t=!1,n,i=this.focusNavigationFilter){this.view.focusNext(e,t,n,i)}getFocus(){return this.focus.get()}reveal(e,t){this.model.expandTo(e);const n=this.model.getListIndex(e);-1!==n&&this.view.reveal(n,t)}getRelativeTop(e){const t=this.model.getListIndex(e);return-1===t?null:this.view.getRelativeTop(t)}onLeftArrow(e){e.preventDefault(),e.stopPropagation();const t=this.view.getFocusedElements();if(0===t.length)return;const n=t[0],i=this.model.getNodeLocation(n);if(!this.model.setCollapsed(i,!0)){const e=this.model.getParentNodeLocation(i);if(!e)return;const t=this.model.getListIndex(e);this.view.reveal(t),this.view.setFocus([t])}}onRightArrow(e){e.preventDefault(),e.stopPropagation();const t=this.view.getFocusedElements();if(0===t.length)return;const n=t[0],i=this.model.getNodeLocation(n);if(!this.model.setCollapsed(i,!1)){if(!n.children.some((e=>e.visible)))return;const[e]=this.view.getFocus(),t=e+1;this.view.reveal(t),this.view.setFocus([t])}}onSpace(e){e.preventDefault(),e.stopPropagation();const t=this.view.getFocusedElements();if(0===t.length)return;const n=t[0],i=this.model.getNodeLocation(n),o=e.browserEvent.altKey;this.model.setCollapsed(i,void 0,o)}dispose(){(0,o.B9)(this.disposables),this.view.dispose()}}class ve{constructor(e,t,n={}){this.user=e,this.rootRef=null,this.nodes=new Map,this.nodesByIdentity=new Map,this.model=new q(e,t,null,n),this.onDidSplice=this.model.onDidSplice,this.onDidChangeCollapseState=this.model.onDidChangeCollapseState,this.onDidChangeRenderNodeCount=this.model.onDidChangeRenderNodeCount,n.sorter&&(this.sorter={compare:(e,t)=>n.sorter.compare(e.element,t.element)}),this.identityProvider=n.identityProvider}setChildren(e,t=w.$.empty(),n={}){const i=this.getElementLocation(e);this._setChildren(i,this.preserveCollapseState(t),n)}_setChildren(e,t=w.$.empty(),n){const i=new Set,o=new Set;this.model.splice([...e,0],Number.MAX_VALUE,t,Object.assign(Object.assign({},n),{onDidCreateNode:e=>{var t;if(null===e.element)return;const r=e;if(i.add(r.element),this.nodes.set(r.element,r),this.identityProvider){const e=this.identityProvider.getId(r.element).toString();o.add(e),this.nodesByIdentity.set(e,r)}null===(t=n.onDidCreateNode)||void 0===t||t.call(n,r)},onDidDeleteNode:e=>{var t;if(null===e.element)return;const r=e;if(i.has(r.element)||this.nodes.delete(r.element),this.identityProvider){const e=this.identityProvider.getId(r.element).toString();o.has(e)||this.nodesByIdentity.delete(e)}null===(t=n.onDidDeleteNode)||void 0===t||t.call(n,r)}}))}preserveCollapseState(e=w.$.empty()){return this.sorter&&(e=[...e].sort(this.sorter.compare.bind(this.sorter))),w.$.map(e,(e=>{let t=this.nodes.get(e.element);if(!t&&this.identityProvider){const n=this.identityProvider.getId(e.element).toString();t=this.nodesByIdentity.get(n)}if(!t)return Object.assign(Object.assign({},e),{children:this.preserveCollapseState(e.children)});const n="boolean"==typeof e.collapsible?e.collapsible:t.collapsible,i=void 0!==e.collapsed?e.collapsed:t.collapsed;return Object.assign(Object.assign({},e),{collapsible:n,collapsed:i,children:this.preserveCollapseState(e.children)})}))}rerender(e){const t=this.getElementLocation(e);this.model.rerender(t)}has(e){return this.nodes.has(e)}getListIndex(e){const t=this.getElementLocation(e);return this.model.getListIndex(t)}getListRenderCount(e){const t=this.getElementLocation(e);return this.model.getListRenderCount(t)}isCollapsible(e){const t=this.getElementLocation(e);return this.model.isCollapsible(t)}setCollapsible(e,t){const n=this.getElementLocation(e);return this.model.setCollapsible(n,t)}isCollapsed(e){const t=this.getElementLocation(e);return this.model.isCollapsed(t)}setCollapsed(e,t,n){const i=this.getElementLocation(e);return this.model.setCollapsed(i,t,n)}expandTo(e){const t=this.getElementLocation(e);this.model.expandTo(t)}refilter(){this.model.refilter()}getNode(e=null){if(null===e)return this.model.getNode(this.model.rootRef);const t=this.nodes.get(e);if(!t)throw new F(this.user,`Tree element not found: ${e}`);return t}getNodeLocation(e){return e.element}getParentNodeLocation(e){if(null===e)throw new F(this.user,"Invalid getParentNodeLocation call");const t=this.nodes.get(e);if(!t)throw new F(this.user,`Tree element not found: ${e}`);const n=this.model.getNodeLocation(t),i=this.model.getParentNodeLocation(n);return this.model.getNode(i).element}getElementLocation(e){if(null===e)return[];const t=this.nodes.get(e);if(!t)throw new F(this.user,`Tree element not found: ${e}`);return this.model.getNodeLocation(t)}}function we(e){return{element:{elements:[e.element],incompressible:e.incompressible||!1},children:w.$.map(w.$.from(e.children),we),collapsible:e.collapsible,collapsed:e.collapsed}}function ye(e){const t=[e.element],n=e.incompressible||!1;let i,o;for(;[o,i]=w.$.consume(w.$.from(e.children),2),1===o.length&&!o[0].incompressible;)e=o[0],t.push(e.element);return{element:{elements:t,incompressible:n},children:w.$.map(w.$.concat(o,i),ye),collapsible:e.collapsible,collapsed:e.collapsed}}function Ae(e,t=0){let n;return n=tAe(e,0))),0===t&&e.element.incompressible?{element:e.element.elements[t],children:n,incompressible:!0,collapsible:e.collapsible,collapsed:e.collapsed}:{element:e.element.elements[t],children:n,collapsible:e.collapsible,collapsed:e.collapsed}}function Se(e){return Ae(e,0)}function xe(e,t,n){return e.element===t?Object.assign(Object.assign({},e),{children:n}):Object.assign(Object.assign({},e),{children:w.$.map(w.$.from(e.children),(e=>xe(e,t,n)))})}class ke{constructor(e,t,n={}){this.user=e,this.rootRef=null,this.nodes=new Map,this.model=new ve(e,t,n),this.enabled=void 0===n.compressionEnabled||n.compressionEnabled,this.identityProvider=n.identityProvider}get onDidSplice(){return this.model.onDidSplice}get onDidChangeCollapseState(){return this.model.onDidChangeCollapseState}get onDidChangeRenderNodeCount(){return this.model.onDidChangeRenderNodeCount}setChildren(e,t=w.$.empty(),n){const i=n.diffIdentityProvider&&(o=n.diffIdentityProvider,{getId:e=>e.elements.map((e=>o.getId(e).toString())).join("\0")});var o;if(null===e){const e=w.$.map(t,this.enabled?ye:we);return void this._setChildren(null,e,{diffIdentityProvider:i,diffDepth:1/0})}const r=this.nodes.get(e);if(!r)throw new Error("Unknown compressed tree node");const s=this.model.getNode(r),a=this.model.getParentNodeLocation(r),l=this.model.getNode(a),d=xe(Se(s),e,t),c=(this.enabled?ye:we)(d),h=l.children.map((e=>e===s?c:e));this._setChildren(l.element,h,{diffIdentityProvider:i,diffDepth:s.depth-l.depth})}setCompressionEnabled(e){if(e===this.enabled)return;this.enabled=e;const t=this.model.getNode().children,n=w.$.map(t,Se),i=w.$.map(n,e?ye:we);this._setChildren(null,i,{diffIdentityProvider:this.identityProvider,diffDepth:1/0})}_setChildren(e,t,n){const i=new Set;this.model.setChildren(e,t,Object.assign(Object.assign({},n),{onDidCreateNode:e=>{for(const t of e.element.elements)i.add(t),this.nodes.set(t,e.element)},onDidDeleteNode:e=>{for(const t of e.element.elements)i.has(t)||this.nodes.delete(t)}}))}has(e){return this.nodes.has(e)}getListIndex(e){const t=this.getCompressedNode(e);return this.model.getListIndex(t)}getListRenderCount(e){const t=this.getCompressedNode(e);return this.model.getListRenderCount(t)}getNode(e){if(void 0===e)return this.model.getNode();const t=this.getCompressedNode(e);return this.model.getNode(t)}getNodeLocation(e){const t=this.model.getNodeLocation(e);return null===t?null:t.elements[t.elements.length-1]}getParentNodeLocation(e){const t=this.getCompressedNode(e),n=this.model.getParentNodeLocation(t);return null===n?null:n.elements[n.elements.length-1]}isCollapsible(e){const t=this.getCompressedNode(e);return this.model.isCollapsible(t)}setCollapsible(e,t){const n=this.getCompressedNode(e);return this.model.setCollapsible(n,t)}isCollapsed(e){const t=this.getCompressedNode(e);return this.model.isCollapsed(t)}setCollapsed(e,t,n){const i=this.getCompressedNode(e);return this.model.setCollapsed(i,t,n)}expandTo(e){const t=this.getCompressedNode(e);this.model.expandTo(t)}rerender(e){const t=this.getCompressedNode(e);this.model.rerender(t)}refilter(){this.model.refilter()}getCompressedNode(e){if(null===e)return null;const t=this.nodes.get(e);if(!t)throw new F(this.user,`Tree element not found: ${e}`);return t}}const Le=e=>e[e.length-1];class Ee{constructor(e,t){this.unwrapper=e,this.node=t}get element(){return null===this.node.element?null:this.unwrapper(this.node.element)}get children(){return this.node.children.map((e=>new Ee(this.unwrapper,e)))}get depth(){return this.node.depth}get visibleChildrenCount(){return this.node.visibleChildrenCount}get visibleChildIndex(){return this.node.visibleChildIndex}get collapsible(){return this.node.collapsible}get collapsed(){return this.node.collapsed}get visible(){return this.node.visible}get filterData(){return this.node.filterData}}class Ne{constructor(e,t,n={}){this.rootRef=null,this.elementMapper=n.elementMapper||Le;const i=e=>this.elementMapper(e.elements);this.nodeMapper=new W((e=>new Ee(i,e))),this.model=new ke(e,function(e,t){return{splice(n,i,o){t.splice(n,i,o.map((t=>e.map(t))))},updateElementHeight(e,n){t.updateElementHeight(e,n)}}}(this.nodeMapper,t),function(e,t){return Object.assign(Object.assign({},t),{identityProvider:t.identityProvider&&{getId:n=>t.identityProvider.getId(e(n))},sorter:t.sorter&&{compare:(e,n)=>t.sorter.compare(e.elements[0],n.elements[0])},filter:t.filter&&{filter:(n,i)=>t.filter.filter(e(n),i)}})}(i,n))}get onDidSplice(){return a.ju.map(this.model.onDidSplice,(({insertedNodes:e,deletedNodes:t})=>({insertedNodes:e.map((e=>this.nodeMapper.map(e))),deletedNodes:t.map((e=>this.nodeMapper.map(e)))})))}get onDidChangeCollapseState(){return a.ju.map(this.model.onDidChangeCollapseState,(({node:e,deep:t})=>({node:this.nodeMapper.map(e),deep:t})))}get onDidChangeRenderNodeCount(){return a.ju.map(this.model.onDidChangeRenderNodeCount,(e=>this.nodeMapper.map(e)))}setChildren(e,t=w.$.empty(),n={}){this.model.setChildren(e,t,n)}setCompressionEnabled(e){this.model.setCompressionEnabled(e)}has(e){return this.model.has(e)}getListIndex(e){return this.model.getListIndex(e)}getListRenderCount(e){return this.model.getListRenderCount(e)}getNode(e){return this.nodeMapper.map(this.model.getNode(e))}getNodeLocation(e){return e.element}getParentNodeLocation(e){return this.model.getParentNodeLocation(e)}isCollapsible(e){return this.model.isCollapsible(e)}setCollapsible(e,t){return this.model.setCollapsible(e,t)}isCollapsed(e){return this.model.isCollapsed(e)}setCollapsed(e,t,n){return this.model.setCollapsed(e,t,n)}expandTo(e){return this.model.expandTo(e)}rerender(e){return this.model.rerender(e)}refilter(){return this.model.refilter()}getCompressedTreeNode(e=null){return this.model.getNode(e)}}var De=n(9898);class Ie extends Ce{constructor(e,t,n,i,o={}){super(e,t,n,i,o)}get onDidChangeCollapseState(){return this.model.onDidChangeCollapseState}setChildren(e,t=w.$.empty(),n){this.model.setChildren(e,t,n)}rerender(e){void 0!==e?this.model.rerender(e):this.view.rerender()}hasElement(e){return this.model.has(e)}createModel(e,t,n){return new ve(e,t,n)}}class Me{constructor(e,t){this._compressedTreeNodeProvider=e,this.renderer=t,this.templateId=t.templateId,t.onDidChangeTwistieState&&(this.onDidChangeTwistieState=t.onDidChangeTwistieState)}get compressedTreeNodeProvider(){return this._compressedTreeNodeProvider()}renderTemplate(e){return{compressedTreeNode:void 0,data:this.renderer.renderTemplate(e)}}renderElement(e,t,n,i){const o=this.compressedTreeNodeProvider.getCompressedTreeNode(e.element);1===o.element.elements.length?(n.compressedTreeNode=void 0,this.renderer.renderElement(e,t,n.data,i)):(n.compressedTreeNode=o,this.renderer.renderCompressedElements(o,t,n.data,i))}disposeElement(e,t,n,i){n.compressedTreeNode?this.renderer.disposeCompressedElements&&this.renderer.disposeCompressedElements(n.compressedTreeNode,t,n.data,i):this.renderer.disposeElement&&this.renderer.disposeElement(e,t,n.data,i)}disposeTemplate(e){this.renderer.disposeTemplate(e.data)}renderTwistie(e,t){return!!this.renderer.renderTwistie&&this.renderer.renderTwistie(e,t)}}!function(e,t,n,i){var o,r=arguments.length,s=r<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,i);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,n,s):o(t,n))||s);r>3&&s&&Object.defineProperty(t,n,s)}([De.H],Me.prototype,"compressedTreeNodeProvider",null);class Te extends Ie{constructor(e,t,n,i,o={}){const r=()=>this;super(e,t,n,i.map((e=>new Me(r,e))),function(e,t){return t&&Object.assign(Object.assign({},t),{keyboardNavigationLabelProvider:t.keyboardNavigationLabelProvider&&{getKeyboardNavigationLabel(n){let i;try{i=e().getCompressedTreeNode(n)}catch(e){return t.keyboardNavigationLabelProvider.getKeyboardNavigationLabel(n)}return 1===i.element.elements.length?t.keyboardNavigationLabelProvider.getKeyboardNavigationLabel(n):t.keyboardNavigationLabelProvider.getCompressedNodeKeyboardNavigationLabel(i.element.elements)}}})}(r,o))}setChildren(e,t=w.$.empty(),n){this.model.setChildren(e,t,n)}createModel(e,t,n){return new Ne(e,t,n)}updateOptions(e={}){super.updateOptions(e),void 0!==e.compressionEnabled&&this.model.setCompressionEnabled(e.compressionEnabled)}getCompressedTreeNode(e=null){return this.model.getCompressedTreeNode(e)}}var Re=n(7301),Oe=function(e,t,n,i){return new(n||(n=Promise))((function(o,r){function s(e){try{l(i.next(e))}catch(e){r(e)}}function a(e){try{l(i.throw(e))}catch(e){r(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,a)}l((i=i.apply(e,t||[])).next())}))};function Be(e){return Object.assign(Object.assign({},e),{children:[],refreshPromise:void 0,stale:!0,slow:!1,collapsedByDefault:void 0})}function Pe(e,t){return!!t.parent&&(t.parent===e||Pe(e,t.parent))}class Fe{constructor(e){this.node=e}get element(){return this.node.element.element}get children(){return this.node.children.map((e=>new Fe(e)))}get depth(){return this.node.depth}get visibleChildrenCount(){return this.node.visibleChildrenCount}get visibleChildIndex(){return this.node.visibleChildIndex}get collapsible(){return this.node.collapsible}get collapsed(){return this.node.collapsed}get visible(){return this.node.visible}get filterData(){return this.node.filterData}}class We{constructor(e,t,n){this.renderer=e,this.nodeMapper=t,this.onDidChangeTwistieState=n,this.renderedNodes=new Map,this.templateId=e.templateId}renderTemplate(e){return{templateData:this.renderer.renderTemplate(e)}}renderElement(e,t,n,i){this.renderer.renderElement(this.nodeMapper.map(e),t,n.templateData,i)}renderTwistie(e,t){return e.slow?(t.classList.add(...oe.classNamesArray),!0):(t.classList.remove(...oe.classNamesArray),!1)}disposeElement(e,t,n,i){this.renderer.disposeElement&&this.renderer.disposeElement(this.nodeMapper.map(e),t,n.templateData,i)}disposeTemplate(e){this.renderer.disposeTemplate(e.templateData)}dispose(){this.renderedNodes.clear()}}function ze(e){return{browserEvent:e.browserEvent,elements:e.elements.map((e=>e.element))}}function Ve(e){return{browserEvent:e.browserEvent,element:e.element&&e.element.element,target:e.target}}class He extends V.kX{constructor(e){super(e.elements.map((e=>e.element))),this.data=e}}function je(e){return e instanceof V.kX?new He(e):e}class $e{constructor(e){this.dnd=e}getDragURI(e){return this.dnd.getDragURI(e.element)}getDragLabel(e,t){if(this.dnd.getDragLabel)return this.dnd.getDragLabel(e.map((e=>e.element)),t)}onDragStart(e,t){this.dnd.onDragStart&&this.dnd.onDragStart(je(e),t)}onDragOver(e,t,n,i,o=!0){return this.dnd.onDragOver(je(e),t&&t.element,n,i)}drop(e,t,n,i){this.dnd.drop(je(e),t&&t.element,n,i)}onDragEnd(e){this.dnd.onDragEnd&&this.dnd.onDragEnd(e)}}function Ue(e){return e&&Object.assign(Object.assign({},e),{collapseByDefault:!0,identityProvider:e.identityProvider&&{getId:t=>e.identityProvider.getId(t.element)},dnd:e.dnd&&new $e(e.dnd),multipleSelectionController:e.multipleSelectionController&&{isSelectionSingleChangeEvent:t=>e.multipleSelectionController.isSelectionSingleChangeEvent(Object.assign(Object.assign({},t),{element:t.element})),isSelectionRangeChangeEvent:t=>e.multipleSelectionController.isSelectionRangeChangeEvent(Object.assign(Object.assign({},t),{element:t.element}))},accessibilityProvider:e.accessibilityProvider&&Object.assign(Object.assign({},e.accessibilityProvider),{getPosInSet:void 0,getSetSize:void 0,getRole:e.accessibilityProvider.getRole?t=>e.accessibilityProvider.getRole(t.element):()=>"treeitem",isChecked:e.accessibilityProvider.isChecked?t=>{var n;return!!(null===(n=e.accessibilityProvider)||void 0===n?void 0:n.isChecked(t.element))}:void 0,getAriaLabel:t=>e.accessibilityProvider.getAriaLabel(t.element),getWidgetAriaLabel:()=>e.accessibilityProvider.getWidgetAriaLabel(),getWidgetRole:e.accessibilityProvider.getWidgetRole?()=>e.accessibilityProvider.getWidgetRole():()=>"tree",getAriaLevel:e.accessibilityProvider.getAriaLevel&&(t=>e.accessibilityProvider.getAriaLevel(t.element)),getActiveDescendantId:e.accessibilityProvider.getActiveDescendantId&&(t=>e.accessibilityProvider.getActiveDescendantId(t.element))}),filter:e.filter&&{filter:(t,n)=>e.filter.filter(t.element,n)},keyboardNavigationLabelProvider:e.keyboardNavigationLabelProvider&&Object.assign(Object.assign({},e.keyboardNavigationLabelProvider),{getKeyboardNavigationLabel:t=>e.keyboardNavigationLabelProvider.getKeyboardNavigationLabel(t.element)}),sorter:void 0,expandOnlyOnTwistieClick:void 0===e.expandOnlyOnTwistieClick?void 0:"function"!=typeof e.expandOnlyOnTwistieClick?e.expandOnlyOnTwistieClick:t=>e.expandOnlyOnTwistieClick(t.element),additionalScrollHeight:e.additionalScrollHeight})}function Ze(e,t){t(e),e.children.forEach((e=>Ze(e,t)))}class Ke{constructor(e,t,n,i,r,s={}){this.user=e,this.dataSource=r,this.nodes=new Map,this.subTreeRefreshPromises=new Map,this.refreshPromises=new Map,this._onDidRender=new a.Q5,this._onDidChangeNodeSlowState=new a.Q5,this.nodeMapper=new W((e=>new Fe(e))),this.disposables=new o.SL,this.identityProvider=s.identityProvider,this.autoExpandSingleChildren=void 0!==s.autoExpandSingleChildren&&s.autoExpandSingleChildren,this.sorter=s.sorter,this.collapseByDefault=s.collapseByDefault,this.tree=this.createTree(e,t,n,i,s),this.root=Be({element:void 0,parent:null,hasChildren:!0}),this.identityProvider&&(this.root=Object.assign(Object.assign({},this.root),{id:null})),this.nodes.set(null,this.root),this.tree.onDidChangeCollapseState(this._onDidChangeCollapseState,this,this.disposables)}get onDidChangeFocus(){return a.ju.map(this.tree.onDidChangeFocus,ze)}get onDidChangeSelection(){return a.ju.map(this.tree.onDidChangeSelection,ze)}get onMouseDblClick(){return a.ju.map(this.tree.onMouseDblClick,Ve)}get onPointer(){return a.ju.map(this.tree.onPointer,Ve)}get onDidFocus(){return this.tree.onDidFocus}get onDidDispose(){return this.tree.onDidDispose}createTree(e,t,n,i,o){const r=new le(n),s=i.map((e=>new We(e,this.nodeMapper,this._onDidChangeNodeSlowState.event))),a=Ue(o)||{};return new Ie(e,t,r,s,a)}updateOptions(e={}){this.tree.updateOptions(e)}getHTMLElement(){return this.tree.getHTMLElement()}get scrollTop(){return this.tree.scrollTop}set scrollTop(e){this.tree.scrollTop=e}domFocus(){this.tree.domFocus()}layout(e,t){this.tree.layout(e,t)}style(e){this.tree.style(e)}getInput(){return this.root.element}setInput(e,t){return Oe(this,void 0,void 0,(function*(){this.refreshPromises.forEach((e=>e.cancel())),this.refreshPromises.clear(),this.root.element=e;const n=t&&{viewState:t,focus:[],selection:[]};yield this._updateChildren(e,!0,!1,n),n&&(this.tree.setFocus(n.focus),this.tree.setSelection(n.selection)),t&&"number"==typeof t.scrollTop&&(this.scrollTop=t.scrollTop)}))}_updateChildren(e=this.root.element,t=!0,n=!1,i,o){return Oe(this,void 0,void 0,(function*(){if(void 0===this.root.element)throw new F(this.user,"Tree input not set");this.root.refreshPromise&&(yield this.root.refreshPromise,yield a.ju.toPromise(this._onDidRender.event));const r=this.getDataNode(e);if(yield this.refreshAndRenderNode(r,t,i,o),n)try{this.tree.rerender(r)}catch(e){}}))}rerender(e){if(void 0===e||e===this.root.element)return void this.tree.rerender();const t=this.getDataNode(e);this.tree.rerender(t)}collapse(e,t=!1){const n=this.getDataNode(e);return this.tree.collapse(n===this.root?null:n,t)}expand(e,t=!1){return Oe(this,void 0,void 0,(function*(){if(void 0===this.root.element)throw new F(this.user,"Tree input not set");this.root.refreshPromise&&(yield this.root.refreshPromise,yield a.ju.toPromise(this._onDidRender.event));const n=this.getDataNode(e);if(this.tree.hasElement(n)&&!this.tree.isCollapsible(n))return!1;if(n.refreshPromise&&(yield this.root.refreshPromise,yield a.ju.toPromise(this._onDidRender.event)),n!==this.root&&!n.refreshPromise&&!this.tree.isCollapsed(n))return!1;const i=this.tree.expand(n===this.root?null:n,t);return n.refreshPromise&&(yield this.root.refreshPromise,yield a.ju.toPromise(this._onDidRender.event)),i}))}setSelection(e,t){const n=e.map((e=>this.getDataNode(e)));this.tree.setSelection(n,t)}getSelection(){return this.tree.getSelection().map((e=>e.element))}setFocus(e,t){const n=e.map((e=>this.getDataNode(e)));this.tree.setFocus(n,t)}getFocus(){return this.tree.getFocus().map((e=>e.element))}reveal(e,t){this.tree.reveal(this.getDataNode(e),t)}getDataNode(e){const t=this.nodes.get(e===this.root.element?null:e);if(!t)throw new F(this.user,`Data tree node not found: ${e}`);return t}refreshAndRenderNode(e,t,n,i){return Oe(this,void 0,void 0,(function*(){yield this.refreshNode(e,t,n),this.render(e,n,i)}))}refreshNode(e,t,n){return Oe(this,void 0,void 0,(function*(){let i;return this.subTreeRefreshPromises.forEach(((o,r)=>{!i&&function(e,t){return e===t||Pe(e,t)||Pe(t,e)}(r,e)&&(i=o.then((()=>this.refreshNode(e,t,n))))})),i||this.doRefreshSubTree(e,t,n)}))}doRefreshSubTree(e,t,n){return Oe(this,void 0,void 0,(function*(){let i;e.refreshPromise=new Promise((e=>i=e)),this.subTreeRefreshPromises.set(e,e.refreshPromise),e.refreshPromise.finally((()=>{e.refreshPromise=void 0,this.subTreeRefreshPromises.delete(e)}));try{const o=yield this.doRefreshNode(e,t,n);e.stale=!1,yield Y.jT.settled(o.map((e=>this.doRefreshSubTree(e,t,n))))}finally{i()}}))}doRefreshNode(e,t,n){return Oe(this,void 0,void 0,(function*(){let i;if(e.hasChildren=!!this.dataSource.hasChildren(e.element),e.hasChildren){const t=(0,Y.Vs)(800);t.then((()=>{e.slow=!0,this._onDidChangeNodeSlowState.fire(e)}),(e=>null)),i=this.doGetChildren(e).finally((()=>t.cancel()))}else i=Promise.resolve(w.$.empty());try{const o=yield i;return this.setChildren(e,o,t,n)}catch(t){if(e!==this.root&&this.tree.hasElement(e)&&this.tree.collapse(e),(0,Re.VV)(t))return[];throw t}finally{e.slow&&(e.slow=!1,this._onDidChangeNodeSlowState.fire(e))}}))}doGetChildren(e){let t=this.refreshPromises.get(e);return t||(t=(0,Y.PG)((()=>Oe(this,void 0,void 0,(function*(){const t=yield this.dataSource.getChildren(e.element);return this.processChildren(t)})))),this.refreshPromises.set(e,t),t.finally((()=>{this.refreshPromises.delete(e)})))}_onDidChangeCollapseState({node:e,deep:t}){null!==e.element&&!e.collapsed&&e.element.stale&&(t?this.collapse(e.element.element):this.refreshAndRenderNode(e.element,!1).catch(Re.dL))}setChildren(e,t,n,i){const o=[...t];if(0===e.children.length&&0===o.length)return[];const r=new Map,s=new Map;for(const t of e.children)if(r.set(t.element,t),this.identityProvider){const e=this.tree.isCollapsed(t);s.set(t.id,{node:t,collapsed:e})}const a=[],l=o.map((t=>{const o=!!this.dataSource.hasChildren(t);if(!this.identityProvider){const n=Be({element:t,parent:e,hasChildren:o});return o&&this.collapseByDefault&&!this.collapseByDefault(t)&&(n.collapsedByDefault=!1,a.push(n)),n}const l=this.identityProvider.getId(t).toString(),d=s.get(l);if(d){const e=d.node;return r.delete(e.element),this.nodes.delete(e.element),this.nodes.set(t,e),e.element=t,e.hasChildren=o,n?d.collapsed?(e.children.forEach((e=>Ze(e,(e=>this.nodes.delete(e.element))))),e.children.splice(0,e.children.length),e.stale=!0):a.push(e):o&&this.collapseByDefault&&!this.collapseByDefault(t)&&(e.collapsedByDefault=!1,a.push(e)),e}const c=Be({element:t,parent:e,id:l,hasChildren:o});return i&&i.viewState.focus&&i.viewState.focus.indexOf(l)>-1&&i.focus.push(c),i&&i.viewState.selection&&i.viewState.selection.indexOf(l)>-1&&i.selection.push(c),i&&i.viewState.expanded&&i.viewState.expanded.indexOf(l)>-1?a.push(c):o&&this.collapseByDefault&&!this.collapseByDefault(t)&&(c.collapsedByDefault=!1,a.push(c)),c}));for(const e of r.values())Ze(e,(e=>this.nodes.delete(e.element)));for(const e of l)this.nodes.set(e.element,e);return e.children.splice(0,e.children.length,...l),e!==this.root&&this.autoExpandSingleChildren&&1===l.length&&0===a.length&&(l[0].collapsedByDefault=!1,a.push(l[0])),a}render(e,t,n){const i=e.children.map((e=>this.asTreeElement(e,t))),o=n&&Object.assign(Object.assign({},n),{diffIdentityProvider:n.diffIdentityProvider&&{getId:e=>n.diffIdentityProvider.getId(e.element)}});this.tree.setChildren(e===this.root?null:e,i,o),e!==this.root&&this.tree.setCollapsible(e,e.hasChildren),this._onDidRender.fire()}asTreeElement(e,t){if(e.stale)return{element:e,collapsible:e.hasChildren,collapsed:!0};let n;return n=!(t&&t.viewState.expanded&&e.id&&t.viewState.expanded.indexOf(e.id)>-1)&&e.collapsedByDefault,e.collapsedByDefault=void 0,{element:e,children:e.hasChildren?w.$.map(e.children,(e=>this.asTreeElement(e,t))):[],collapsible:e.hasChildren,collapsed:n}}processChildren(e){return this.sorter&&(e=[...e].sort(this.sorter.compare.bind(this.sorter))),e}dispose(){this.disposables.dispose()}}class qe{constructor(e){this.node=e}get element(){return{elements:this.node.element.elements.map((e=>e.element)),incompressible:this.node.element.incompressible}}get children(){return this.node.children.map((e=>new qe(e)))}get depth(){return this.node.depth}get visibleChildrenCount(){return this.node.visibleChildrenCount}get visibleChildIndex(){return this.node.visibleChildIndex}get collapsible(){return this.node.collapsible}get collapsed(){return this.node.collapsed}get visible(){return this.node.visible}get filterData(){return this.node.filterData}}class Ye{constructor(e,t,n,i){this.renderer=e,this.nodeMapper=t,this.compressibleNodeMapperProvider=n,this.onDidChangeTwistieState=i,this.renderedNodes=new Map,this.disposables=[],this.templateId=e.templateId}renderTemplate(e){return{templateData:this.renderer.renderTemplate(e)}}renderElement(e,t,n,i){this.renderer.renderElement(this.nodeMapper.map(e),t,n.templateData,i)}renderCompressedElements(e,t,n,i){this.renderer.renderCompressedElements(this.compressibleNodeMapperProvider().map(e),t,n.templateData,i)}renderTwistie(e,t){return e.slow?(t.classList.add(...oe.classNamesArray),!0):(t.classList.remove(...oe.classNamesArray),!1)}disposeElement(e,t,n,i){this.renderer.disposeElement&&this.renderer.disposeElement(this.nodeMapper.map(e),t,n.templateData,i)}disposeCompressedElements(e,t,n,i){this.renderer.disposeCompressedElements&&this.renderer.disposeCompressedElements(this.compressibleNodeMapperProvider().map(e),t,n.templateData,i)}disposeTemplate(e){this.renderer.disposeTemplate(e.templateData)}dispose(){this.renderedNodes.clear(),this.disposables=(0,o.B9)(this.disposables)}}class Ge extends Ke{constructor(e,t,n,i,o,r,s={}){super(e,t,n,o,r,s),this.compressionDelegate=i,this.compressibleNodeMapper=new W((e=>new qe(e))),this.filter=s.filter}createTree(e,t,n,i,o){const r=new le(n),s=i.map((e=>new Ye(e,this.nodeMapper,(()=>this.compressibleNodeMapper),this._onDidChangeNodeSlowState.event))),a=function(e){const t=e&&Ue(e);return t&&Object.assign(Object.assign({},t),{keyboardNavigationLabelProvider:t.keyboardNavigationLabelProvider&&Object.assign(Object.assign({},t.keyboardNavigationLabelProvider),{getCompressedNodeKeyboardNavigationLabel:t=>e.keyboardNavigationLabelProvider.getCompressedNodeKeyboardNavigationLabel(t.map((e=>e.element)))})})}(o)||{};return new Te(e,t,r,s,a)}asTreeElement(e,t){return Object.assign({incompressible:this.compressionDelegate.isIncompressible(e.element)},super.asTreeElement(e,t))}updateOptions(e={}){this.tree.updateOptions(e)}render(e,t){if(!this.identityProvider)return super.render(e,t);const n=e=>this.identityProvider.getId(e).toString(),i=e=>{const t=new Set;for(const i of e){const e=this.tree.getCompressedTreeNode(i===this.root?null:i);if(e.element)for(const i of e.element.elements)t.add(n(i.element))}return t},o=i(this.tree.getSelection()),r=i(this.tree.getFocus());super.render(e,t);const s=this.getSelection();let a=!1;const l=this.getFocus();let d=!1;const c=e=>{const t=e.element;if(t)for(let e=0;e{const t="boolean"==typeof(n=this.filter.filter(e,1))?n?1:0:U(n)?Z(n.visibility):Z(n);var n;if(2===t)throw new Error("Recursive tree visibility not supported in async data compressed trees");return 1===t}))),super.processChildren(e)}}class Qe extends Ce{constructor(e,t,n,i,o,r={}){super(e,t,n,i,r),this.user=e,this.dataSource=o,this.identityProvider=r.identityProvider}createModel(e,t,n){return new ve(e,t,n)}}var Xe=n(1106),Je=n(1728),et={};et.styleTagTransform=T(),et.setAttributes=N(),et.insert=L().bind(null,"head"),et.domAPI=x(),et.insertStyleElement=I(),A()(Je.Z,et),Je.Z&&Je.Z.locals&&Je.Z.locals;var tt=n(9782);class nt{constructor(e,t,n){this.columns=e,this.getColumnSize=n,this.templateId=nt.TemplateId,this.renderedTemplates=new Set;const i=new Map(t.map((e=>[e.templateId,e])));this.renderers=[];for(const t of e){const e=i.get(t.templateId);if(!e)throw new Error(`Table cell renderer for template id ${t.templateId} not found.`);this.renderers.push(e)}}renderTemplate(e){const t=(0,i.R3)(e,(0,i.$)(".monaco-table-tr")),n=[],o=[];for(let e=0;enew it(e,t))),c={size:d.reduce(((e,t)=>e+t.column.weight),0),views:d.map((e=>({size:e.column.weight,view:e})))};this.splitview=new tt.z(this.domNode,{orientation:1,scrollbarVisibility:2,getSashOrthogonalSize:()=>this.cachedHeight,descriptor:c}),this.splitview.el.style.height=`${n.headerRowHeight}px`,this.splitview.el.style.lineHeight=`${n.headerRowHeight}px`;const h=new nt(o,r,(e=>this.splitview.getViewSize(e)));var u;this.list=new s.aV(e,this.domNode,(u=n,{getHeight:e=>u.getHeight(e),getTemplateId:()=>nt.TemplateId}),[h],l),this.columnLayoutDisposable=a.ju.any(...d.map((e=>e.onDidLayout)))((([e,t])=>h.layoutColumn(e,t))),this.styleElement=(0,i.dS)(this.domNode),this.style({})}get onDidChangeFocus(){return this.list.onDidChangeFocus}get onDidChangeSelection(){return this.list.onDidChangeSelection}get onMouseDblClick(){return this.list.onMouseDblClick}get onPointer(){return this.list.onPointer}get onDidFocus(){return this.list.onDidFocus}get onDidDispose(){return this.list.onDidDispose}updateOptions(e){this.list.updateOptions(e)}splice(e,t,n=[]){this.list.splice(e,t,n)}getHTMLElement(){return this.domNode}style(e){const t=[];t.push(`.monaco-table.${this.domId} > .monaco-split-view2 .monaco-sash.vertical::before {\n\t\t\ttop: ${this.virtualDelegate.headerRowHeight+1}px;\n\t\t\theight: calc(100% - ${this.virtualDelegate.headerRowHeight}px);\n\t\t}`),this.styleElement.textContent=t.join("\n"),this.list.style(e)}getSelectedElements(){return this.list.getSelectedElements()}getSelection(){return this.list.getSelection()}getFocus(){return this.list.getFocus()}dispose(){this.splitview.dispose(),this.list.dispose(),this.columnLayoutDisposable.dispose()}}ot.InstanceCount=0;var rt=function(e,t,n,i){var o,r=arguments.length,s=r<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,i);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,n,s):o(t,n))||s);return r>3&&s&&Object.defineProperty(t,n,s),s},st=function(e,t){return function(n,i){t(n,i,e)}};const at=(0,m.yh)("listService");let lt=class{constructor(e){this._themeService=e,this.disposables=new o.SL,this.lists=[],this._lastFocusedWidget=void 0,this._hasCreatedStyleController=!1}get lastFocusedList(){return this._lastFocusedWidget}register(e,t){if(!this._hasCreatedStyleController){this._hasCreatedStyleController=!0;const e=new s.wD((0,i.dS)(),"");this.disposables.add((0,b.Jl)(e,this._themeService))}if(this.lists.some((t=>t.widget===e)))throw new Error("Cannot register the same widget multiple times");const n={widget:e,extraContextKeys:t};return this.lists.push(n),e.getHTMLElement()===document.activeElement&&(this._lastFocusedWidget=e),(0,o.F8)(e.onDidFocus((()=>this._lastFocusedWidget=e)),(0,o.OF)((()=>this.lists.splice(this.lists.indexOf(n),1))),e.onDidDispose((()=>{this.lists=this.lists.filter((e=>e!==n)),this._lastFocusedWidget===e&&(this._lastFocusedWidget=void 0)})))}dispose(){this.disposables.dispose()}};lt=rt([st(0,C.XE)],lt);const dt=new p.uy("listFocus",!0),ct=new p.uy("listSupportsMultiselect",!0),ht=p.Ao.and(dt,p.Ao.not(v.d)),ut=new p.uy("listHasSelectionOrFocus",!1),gt=new p.uy("listDoubleSelection",!1),pt=new p.uy("listMultiSelection",!1),mt=new p.uy("listSelectionNavigation",!1),ft="listAutomaticKeyboardNavigation";function _t(e,t){const n=e.createScoped(t.getHTMLElement());return dt.bindTo(n),n}const bt="workbench.list.multiSelectModifier",Ct="workbench.list.openMode",vt="workbench.list.horizontalScrolling",wt="workbench.list.keyboardNavigation",yt="workbench.list.automaticKeyboardNavigation",At="workbench.tree.indent",St="workbench.tree.renderIndentGuides",xt="workbench.list.smoothScrolling",kt="workbench.list.mouseWheelScrollSensitivity",Lt="workbench.list.fastScrollSensitivity",Et="workbench.tree.expandMode";function Nt(e){return"alt"===e.getValue(bt)}class Dt extends o.JT{constructor(e){super(),this.configurationService=e,this.useAltAsMultipleSelectionModifier=Nt(e),this.registerListeners()}registerListeners(){this._register(this.configurationService.onDidChangeConfiguration((e=>{e.affectsConfiguration(bt)&&(this.useAltAsMultipleSelectionModifier=Nt(this.configurationService))})))}isSelectionSingleChangeEvent(e){return this.useAltAsMultipleSelectionModifier?e.browserEvent.altKey:(0,s.Zo)(e)}isSelectionRangeChangeEvent(e){return(0,s.wn)(e)}}function It(e,t,n){var i;const r=new o.SL;return[Object.assign(Object.assign({},e),{keyboardNavigationDelegate:{mightProducePrintableCharacter:e=>n.mightProducePrintableCharacter(e)},smoothScrolling:Boolean(t.getValue(xt)),mouseWheelScrollSensitivity:t.getValue(kt),fastScrollSensitivity:t.getValue(Lt),multipleSelectionController:null!==(i=e.multipleSelectionController)&&void 0!==i?i:r.add(new Dt(t))}),r]}let Mt=class extends s.aV{constructor(e,t,n,i,o,r,s,a,l,d){const c=void 0!==o.horizontalScrolling?o.horizontalScrolling:Boolean(l.getValue(vt)),[h,u]=It(o,l,d);super(e,t,n,i,Object.assign(Object.assign(Object.assign({keyboardSupport:!1},(0,b.o)(a.getColorTheme(),b.O2)),h),{horizontalScrolling:c})),this.disposables.add(u),this.contextKeyService=_t(r,this),this.themeService=a,this.listSupportsMultiSelect=ct.bindTo(this.contextKeyService),this.listSupportsMultiSelect.set(!1!==o.multipleSelectionSupport),mt.bindTo(this.contextKeyService).set(Boolean(o.selectionNavigation)),this.listHasSelectionOrFocus=ut.bindTo(this.contextKeyService),this.listDoubleSelection=gt.bindTo(this.contextKeyService),this.listMultiSelection=pt.bindTo(this.contextKeyService),this.horizontalScrolling=o.horizontalScrolling,this._useAltAsMultipleSelectionModifier=Nt(l),this.disposables.add(this.contextKeyService),this.disposables.add(s.register(this)),o.overrideStyles&&this.updateStyles(o.overrideStyles),this.disposables.add(this.onDidChangeSelection((()=>{const e=this.getSelection(),t=this.getFocus();this.contextKeyService.bufferChangeEvents((()=>{this.listHasSelectionOrFocus.set(e.length>0||t.length>0),this.listMultiSelection.set(e.length>1),this.listDoubleSelection.set(2===e.length)}))}))),this.disposables.add(this.onDidChangeFocus((()=>{const e=this.getSelection(),t=this.getFocus();this.listHasSelectionOrFocus.set(e.length>0||t.length>0)}))),this.disposables.add(l.onDidChangeConfiguration((e=>{e.affectsConfiguration(bt)&&(this._useAltAsMultipleSelectionModifier=Nt(l));let t={};if(e.affectsConfiguration(vt)&&void 0===this.horizontalScrolling){const e=Boolean(l.getValue(vt));t=Object.assign(Object.assign({},t),{horizontalScrolling:e})}if(e.affectsConfiguration(xt)){const e=Boolean(l.getValue(xt));t=Object.assign(Object.assign({},t),{smoothScrolling:e})}if(e.affectsConfiguration(kt)){const e=l.getValue(kt);t=Object.assign(Object.assign({},t),{mouseWheelScrollSensitivity:e})}if(e.affectsConfiguration(Lt)){const e=l.getValue(Lt);t=Object.assign(Object.assign({},t),{fastScrollSensitivity:e})}Object.keys(t).length>0&&this.updateOptions(t)}))),this.navigator=new Bt(this,Object.assign({configurationService:l},o)),this.disposables.add(this.navigator)}updateOptions(e){super.updateOptions(e),e.overrideStyles&&this.updateStyles(e.overrideStyles),void 0!==e.multipleSelectionSupport&&this.listSupportsMultiSelect.set(!!e.multipleSelectionSupport)}updateStyles(e){var t;null===(t=this._styler)||void 0===t||t.dispose(),this._styler=(0,b.Jl)(this,this.themeService,e)}dispose(){var e;null===(e=this._styler)||void 0===e||e.dispose(),super.dispose()}};Mt=rt([st(5,p.i6),st(6,at),st(7,C.XE),st(8,u.Ui),st(9,f.d)],Mt);let Tt=class extends class{constructor(e,t,n,i,o={}){const r=()=>this.model,a=i.map((e=>new d(e,r)));this.list=new s.aV(e,t,n,a,function(e,t){return Object.assign(Object.assign({},t),{accessibilityProvider:t.accessibilityProvider&&new c(e,t.accessibilityProvider)})}(r,o))}updateOptions(e){this.list.updateOptions(e)}getHTMLElement(){return this.list.getHTMLElement()}get onDidFocus(){return this.list.onDidFocus}get onDidDispose(){return this.list.onDidDispose}get onMouseDblClick(){return a.ju.map(this.list.onMouseDblClick,(({element:e,index:t,browserEvent:n})=>({element:void 0===e?void 0:this._model.get(e),index:t,browserEvent:n})))}get onPointer(){return a.ju.map(this.list.onPointer,(({element:e,index:t,browserEvent:n})=>({element:void 0===e?void 0:this._model.get(e),index:t,browserEvent:n})))}get onDidChangeSelection(){return a.ju.map(this.list.onDidChangeSelection,(({elements:e,indexes:t,browserEvent:n})=>({elements:e.map((e=>this._model.get(e))),indexes:t,browserEvent:n})))}get model(){return this._model}set model(e){this._model=e,this.list.splice(0,this.list.length,(0,r.w6)(e.length))}getFocus(){return this.list.getFocus()}getSelection(){return this.list.getSelection()}getSelectedElements(){return this.getSelection().map((e=>this.model.get(e)))}style(e){this.list.style(e)}dispose(){this.list.dispose()}}{constructor(e,t,n,i,r,s,a,l,d,c){const h=void 0!==r.horizontalScrolling?r.horizontalScrolling:Boolean(d.getValue(vt)),[u,g]=It(r,d,c);super(e,t,n,i,Object.assign(Object.assign(Object.assign({keyboardSupport:!1},(0,b.o)(l.getColorTheme(),b.O2)),u),{horizontalScrolling:h})),this.disposables=new o.SL,this.disposables.add(g),this.contextKeyService=_t(s,this),this.themeService=l,this.horizontalScrolling=r.horizontalScrolling,this.listSupportsMultiSelect=ct.bindTo(this.contextKeyService),this.listSupportsMultiSelect.set(!1!==r.multipleSelectionSupport),mt.bindTo(this.contextKeyService).set(Boolean(r.selectionNavigation)),this._useAltAsMultipleSelectionModifier=Nt(d),this.disposables.add(this.contextKeyService),this.disposables.add(a.register(this)),r.overrideStyles&&this.updateStyles(r.overrideStyles),r.overrideStyles&&this.disposables.add((0,b.Jl)(this,l,r.overrideStyles)),this.disposables.add(d.onDidChangeConfiguration((e=>{e.affectsConfiguration(bt)&&(this._useAltAsMultipleSelectionModifier=Nt(d));let t={};if(e.affectsConfiguration(vt)&&void 0===this.horizontalScrolling){const e=Boolean(d.getValue(vt));t=Object.assign(Object.assign({},t),{horizontalScrolling:e})}if(e.affectsConfiguration(xt)){const e=Boolean(d.getValue(xt));t=Object.assign(Object.assign({},t),{smoothScrolling:e})}if(e.affectsConfiguration(kt)){const e=d.getValue(kt);t=Object.assign(Object.assign({},t),{mouseWheelScrollSensitivity:e})}if(e.affectsConfiguration(Lt)){const e=d.getValue(Lt);t=Object.assign(Object.assign({},t),{fastScrollSensitivity:e})}Object.keys(t).length>0&&this.updateOptions(t)}))),this.navigator=new Bt(this,Object.assign({configurationService:d},r)),this.disposables.add(this.navigator)}updateOptions(e){super.updateOptions(e),e.overrideStyles&&this.updateStyles(e.overrideStyles),void 0!==e.multipleSelectionSupport&&this.listSupportsMultiSelect.set(!!e.multipleSelectionSupport)}updateStyles(e){var t;null===(t=this._styler)||void 0===t||t.dispose(),this._styler=(0,b.Jl)(this,this.themeService,e)}dispose(){var e;null===(e=this._styler)||void 0===e||e.dispose(),this.disposables.dispose(),super.dispose()}};Tt=rt([st(5,p.i6),st(6,at),st(7,C.XE),st(8,u.Ui),st(9,f.d)],Tt);let Rt=class extends ot{constructor(e,t,n,i,r,s,a,l,d,c,h){const u=void 0!==s.horizontalScrolling?s.horizontalScrolling:Boolean(c.getValue(vt)),[g,p]=It(s,c,h);super(e,t,n,i,r,Object.assign(Object.assign(Object.assign({keyboardSupport:!1},(0,b.o)(d.getColorTheme(),b.O2)),g),{horizontalScrolling:u})),this.disposables=new o.SL,this.disposables.add(p),this.contextKeyService=_t(a,this),this.themeService=d,this.listSupportsMultiSelect=ct.bindTo(this.contextKeyService),this.listSupportsMultiSelect.set(!1!==s.multipleSelectionSupport),mt.bindTo(this.contextKeyService).set(Boolean(s.selectionNavigation)),this.listHasSelectionOrFocus=ut.bindTo(this.contextKeyService),this.listDoubleSelection=gt.bindTo(this.contextKeyService),this.listMultiSelection=pt.bindTo(this.contextKeyService),this.horizontalScrolling=s.horizontalScrolling,this._useAltAsMultipleSelectionModifier=Nt(c),this.disposables.add(this.contextKeyService),this.disposables.add(l.register(this)),s.overrideStyles&&this.updateStyles(s.overrideStyles),this.disposables.add(this.onDidChangeSelection((()=>{const e=this.getSelection(),t=this.getFocus();this.contextKeyService.bufferChangeEvents((()=>{this.listHasSelectionOrFocus.set(e.length>0||t.length>0),this.listMultiSelection.set(e.length>1),this.listDoubleSelection.set(2===e.length)}))}))),this.disposables.add(this.onDidChangeFocus((()=>{const e=this.getSelection(),t=this.getFocus();this.listHasSelectionOrFocus.set(e.length>0||t.length>0)}))),this.disposables.add(c.onDidChangeConfiguration((e=>{e.affectsConfiguration(bt)&&(this._useAltAsMultipleSelectionModifier=Nt(c));let t={};if(e.affectsConfiguration(vt)&&void 0===this.horizontalScrolling){const e=Boolean(c.getValue(vt));t=Object.assign(Object.assign({},t),{horizontalScrolling:e})}if(e.affectsConfiguration(xt)){const e=Boolean(c.getValue(xt));t=Object.assign(Object.assign({},t),{smoothScrolling:e})}if(e.affectsConfiguration(kt)){const e=c.getValue(kt);t=Object.assign(Object.assign({},t),{mouseWheelScrollSensitivity:e})}if(e.affectsConfiguration(Lt)){const e=c.getValue(Lt);t=Object.assign(Object.assign({},t),{fastScrollSensitivity:e})}Object.keys(t).length>0&&this.updateOptions(t)}))),this.navigator=new Pt(this,Object.assign({configurationService:c},s)),this.disposables.add(this.navigator)}updateOptions(e){super.updateOptions(e),e.overrideStyles&&this.updateStyles(e.overrideStyles),void 0!==e.multipleSelectionSupport&&this.listSupportsMultiSelect.set(!!e.multipleSelectionSupport)}updateStyles(e){var t;null===(t=this._styler)||void 0===t||t.dispose(),this._styler=(0,b.Jl)(this,this.themeService,e)}dispose(){var e;null===(e=this._styler)||void 0===e||e.dispose(),this.disposables.dispose(),super.dispose()}};Rt=rt([st(6,p.i6),st(7,at),st(8,C.XE),st(9,u.Ui),st(10,f.d)],Rt);class Ot extends o.JT{constructor(e,t){var n;super(),this.widget=e,this._onDidOpen=this._register(new a.Q5),this.onDidOpen=this._onDidOpen.event,this._register(a.ju.filter(this.widget.onDidChangeSelection,(e=>e.browserEvent instanceof KeyboardEvent))((e=>this.onSelectionFromKeyboard(e)))),this._register(this.widget.onPointer((e=>this.onPointer(e.element,e.browserEvent)))),this._register(this.widget.onMouseDblClick((e=>this.onMouseDblClick(e.element,e.browserEvent)))),"boolean"!=typeof(null==t?void 0:t.openOnSingleClick)&&(null==t?void 0:t.configurationService)?(this.openOnSingleClick="doubleClick"!==(null==t?void 0:t.configurationService.getValue(Ct)),this._register(null==t?void 0:t.configurationService.onDidChangeConfiguration((()=>{this.openOnSingleClick="doubleClick"!==(null==t?void 0:t.configurationService.getValue(Ct))})))):this.openOnSingleClick=null===(n=null==t?void 0:t.openOnSingleClick)||void 0===n||n}onSelectionFromKeyboard(e){if(1!==e.elements.length)return;const t=e.browserEvent,n="boolean"!=typeof t.preserveFocus||t.preserveFocus,i="boolean"==typeof t.pinned?t.pinned:!n;this._open(this.getSelectedElement(),n,i,!1,e.browserEvent)}onPointer(e,t){if(!this.openOnSingleClick)return;if(2===t.detail)return;const n=1===t.button,i=t.ctrlKey||t.metaKey||t.altKey;this._open(e,!0,n,i,t)}onMouseDblClick(e,t){if(!t)return;const n=t.target;if(n.classList.contains("monaco-tl-twistie")||n.classList.contains("monaco-icon-label")&&n.classList.contains("folder-icon")&&t.offsetX<16)return;const i=t.ctrlKey||t.metaKey||t.altKey;this._open(e,!1,!0,i,t)}_open(e,t,n,i,o){e&&this._onDidOpen.fire({editorOptions:{preserveFocus:t,pinned:n,revealIfVisible:!0},sideBySide:i,element:e,browserEvent:o})}}class Bt extends Ot{constructor(e,t){super(e,t),this.widget=e}getSelectedElement(){return this.widget.getSelectedElements()[0]}}class Pt extends Ot{constructor(e,t){super(e,t)}getSelectedElement(){return this.widget.getSelectedElements()[0]}}class Ft extends Ot{constructor(e,t){super(e,t)}getSelectedElement(){var e;return null!==(e=this.widget.getSelection()[0])&&void 0!==e?e:void 0}}function Wt(e,t){let n=!1;return i=>{if(n)return n=!1,!1;const o=t.softDispatch(i,e);return o&&o.enterChord?(n=!0,!1):(n=!1,!0)}}let zt=class extends Ie{constructor(e,t,n,i,o,r,s,a,l,d,c){const{options:h,getAutomaticKeyboardNavigation:u,disposable:g}=Ut(t,o,r,l,d,c);super(e,t,n,i,h),this.disposables.add(g),this.internals=new Zt(this,o,u,o.overrideStyles,r,s,a,l,c),this.disposables.add(this.internals)}updateOptions(e){super.updateOptions(e),this.internals.updateOptions(e)}};zt=rt([st(5,p.i6),st(6,at),st(7,C.XE),st(8,u.Ui),st(9,f.d),st(10,Xe.F)],zt);let Vt=class extends Te{constructor(e,t,n,i,o,r,s,a,l,d,c){const{options:h,getAutomaticKeyboardNavigation:u,disposable:g}=Ut(t,o,r,l,d,c);super(e,t,n,i,h),this.disposables.add(g),this.internals=new Zt(this,o,u,o.overrideStyles,r,s,a,l,c),this.disposables.add(this.internals)}updateOptions(e={}){super.updateOptions(e),e.overrideStyles&&this.internals.updateStyleOverrides(e.overrideStyles),this.internals.updateOptions(e)}};Vt=rt([st(5,p.i6),st(6,at),st(7,C.XE),st(8,u.Ui),st(9,f.d),st(10,Xe.F)],Vt);let Ht=class extends Qe{constructor(e,t,n,i,o,r,s,a,l,d,c,h){const{options:u,getAutomaticKeyboardNavigation:g,disposable:p}=Ut(t,r,s,d,c,h);super(e,t,n,i,o,u),this.disposables.add(p),this.internals=new Zt(this,r,g,r.overrideStyles,s,a,l,d,h),this.disposables.add(this.internals)}updateOptions(e={}){super.updateOptions(e),e.overrideStyles&&this.internals.updateStyleOverrides(e.overrideStyles),this.internals.updateOptions(e)}};Ht=rt([st(6,p.i6),st(7,at),st(8,C.XE),st(9,u.Ui),st(10,f.d),st(11,Xe.F)],Ht);let jt=class extends Ke{constructor(e,t,n,i,o,r,s,a,l,d,c,h){const{options:u,getAutomaticKeyboardNavigation:g,disposable:p}=Ut(t,r,s,d,c,h);super(e,t,n,i,o,u),this.disposables.add(p),this.internals=new Zt(this,r,g,r.overrideStyles,s,a,l,d,h),this.disposables.add(this.internals)}get onDidOpen(){return this.internals.onDidOpen}updateOptions(e={}){super.updateOptions(e),e.overrideStyles&&this.internals.updateStyleOverrides(e.overrideStyles),this.internals.updateOptions(e)}};jt=rt([st(6,p.i6),st(7,at),st(8,C.XE),st(9,u.Ui),st(10,f.d),st(11,Xe.F)],jt);let $t=class extends Ge{constructor(e,t,n,i,o,r,s,a,l,d,c,h,u){const{options:g,getAutomaticKeyboardNavigation:p,disposable:m}=Ut(t,s,a,c,h,u);super(e,t,n,i,o,r,g),this.disposables.add(m),this.internals=new Zt(this,s,p,s.overrideStyles,a,l,d,c,u),this.disposables.add(this.internals)}updateOptions(e){super.updateOptions(e),this.internals.updateOptions(e)}};function Ut(e,t,n,i,o,r){var s;const a=()=>{let e=Boolean(n.getContextKeyValue(ft));return e&&(e=Boolean(i.getValue(yt))),e},l=r.isScreenReaderOptimized(),d=t.simpleKeyboardNavigation||l?"simple":i.getValue(wt),c=void 0!==t.horizontalScrolling?t.horizontalScrolling:Boolean(i.getValue(vt)),[h,u]=It(t,i,o),g=t.additionalScrollHeight;return{getAutomaticKeyboardNavigation:a,disposable:u,options:Object.assign(Object.assign({keyboardSupport:!1},h),{indent:"number"==typeof i.getValue(At)?i.getValue(At):void 0,renderIndentGuides:i.getValue(St),smoothScrolling:Boolean(i.getValue(xt)),automaticKeyboardNavigation:a(),simpleKeyboardNavigation:"simple"===d,filterOnType:"filter"===d,horizontalScrolling:c,keyboardNavigationEventFilter:Wt(e,o),additionalScrollHeight:g,hideTwistiesOfChildlessElements:t.hideTwistiesOfChildlessElements,expandOnlyOnTwistieClick:null!==(s=t.expandOnlyOnTwistieClick)&&void 0!==s?s:"doubleClick"===i.getValue(Et)})}}$t=rt([st(7,p.i6),st(8,at),st(9,C.XE),st(10,u.Ui),st(11,f.d),st(12,Xe.F)],$t);let Zt=class{constructor(e,t,n,i,o,r,s,a,l){this.tree=e,this.themeService=s,this.disposables=[],this.contextKeyService=_t(o,e),this.listSupportsMultiSelect=ct.bindTo(this.contextKeyService),this.listSupportsMultiSelect.set(!1!==t.multipleSelectionSupport),mt.bindTo(this.contextKeyService).set(Boolean(t.selectionNavigation)),this.hasSelectionOrFocus=ut.bindTo(this.contextKeyService),this.hasDoubleSelection=gt.bindTo(this.contextKeyService),this.hasMultiSelection=pt.bindTo(this.contextKeyService),this._useAltAsMultipleSelectionModifier=Nt(a);const d=new Set;d.add(ft);const c=()=>{const t=l.isScreenReaderOptimized()?"simple":a.getValue(wt);e.updateOptions({simpleKeyboardNavigation:"simple"===t,filterOnType:"filter"===t})};this.updateStyleOverrides(i),this.disposables.push(this.contextKeyService,r.register(e),e.onDidChangeSelection((()=>{const t=e.getSelection(),n=e.getFocus();this.contextKeyService.bufferChangeEvents((()=>{this.hasSelectionOrFocus.set(t.length>0||n.length>0),this.hasMultiSelection.set(t.length>1),this.hasDoubleSelection.set(2===t.length)}))})),e.onDidChangeFocus((()=>{const t=e.getSelection(),n=e.getFocus();this.hasSelectionOrFocus.set(t.length>0||n.length>0)})),a.onDidChangeConfiguration((i=>{let o={};if(i.affectsConfiguration(bt)&&(this._useAltAsMultipleSelectionModifier=Nt(a)),i.affectsConfiguration(At)){const e=a.getValue(At);o=Object.assign(Object.assign({},o),{indent:e})}if(i.affectsConfiguration(St)){const e=a.getValue(St);o=Object.assign(Object.assign({},o),{renderIndentGuides:e})}if(i.affectsConfiguration(xt)){const e=Boolean(!!a.getValue(xt));o=Object.assign(Object.assign({},o),{smoothScrolling:e})}if(i.affectsConfiguration(wt)&&c(),i.affectsConfiguration(yt)&&(o=Object.assign(Object.assign({},o),{automaticKeyboardNavigation:n()})),i.affectsConfiguration(vt)&&void 0===t.horizontalScrolling){const e=Boolean(!!a.getValue(vt));o=Object.assign(Object.assign({},o),{horizontalScrolling:e})}if(i.affectsConfiguration(Et)&&void 0===t.expandOnlyOnTwistieClick&&(o=Object.assign(Object.assign({},o),{expandOnlyOnTwistieClick:"doubleClick"===a.getValue(Et)})),i.affectsConfiguration(kt)){const e=a.getValue(kt);o=Object.assign(Object.assign({},o),{mouseWheelScrollSensitivity:e})}if(i.affectsConfiguration(Lt)){const e=a.getValue(Lt);o=Object.assign(Object.assign({},o),{fastScrollSensitivity:e})}Object.keys(o).length>0&&e.updateOptions(o)})),this.contextKeyService.onDidChangeContext((t=>{t.affectsSome(d)&&e.updateOptions({automaticKeyboardNavigation:n()})})),l.onDidChangeScreenReaderOptimized((()=>c()))),this.navigator=new Ft(e,Object.assign({configurationService:a},t)),this.disposables.push(this.navigator)}get onDidOpen(){return this.navigator.onDidOpen}updateOptions(e){void 0!==e.multipleSelectionSupport&&this.listSupportsMultiSelect.set(!!e.multipleSelectionSupport)}updateStyleOverrides(e){(0,o.B9)(this.styler),this.styler=e?(0,b.Jl)(this.tree,this.themeService,e):o.JT.None}dispose(){this.disposables=(0,o.B9)(this.disposables),(0,o.B9)(this.styler),this.styler=void 0}};Zt=rt([st(4,p.i6),st(5,at),st(6,C.XE),st(7,u.Ui),st(8,Xe.F)],Zt),_.B.as(g.IP.Configuration).registerConfiguration({id:"workbench",order:7,title:(0,h.N)("workbenchConfigurationTitle","Workbench"),type:"object",properties:{[bt]:{type:"string",enum:["ctrlCmd","alt"],enumDescriptions:[(0,h.N)("multiSelectModifier.ctrlCmd","Maps to `Control` on Windows and Linux and to `Command` on macOS."),(0,h.N)("multiSelectModifier.alt","Maps to `Alt` on Windows and Linux and to `Option` on macOS.")],default:"ctrlCmd",description:(0,h.N)({key:"multiSelectModifier",comment:["- `ctrlCmd` refers to a value the setting can take and should not be localized.","- `Control` and `Command` refer to the modifier keys Ctrl or Cmd on the keyboard and can be localized."]},"The modifier to be used to add an item in trees and lists to a multi-selection with the mouse (for example in the explorer, open editors and scm view). The 'Open to Side' mouse gestures - if supported - will adapt such that they do not conflict with the multiselect modifier.")},[Ct]:{type:"string",enum:["singleClick","doubleClick"],default:"singleClick",description:(0,h.N)({key:"openModeModifier",comment:["`singleClick` and `doubleClick` refers to a value the setting can take and should not be localized."]},"Controls how to open items in trees and lists using the mouse (if supported). Note that some trees and lists might choose to ignore this setting if it is not applicable.")},[vt]:{type:"boolean",default:!1,description:(0,h.N)("horizontalScrolling setting","Controls whether lists and trees support horizontal scrolling in the workbench. Warning: turning on this setting has a performance implication.")},[At]:{type:"number",default:8,minimum:0,maximum:40,description:(0,h.N)("tree indent setting","Controls tree indentation in pixels.")},[St]:{type:"string",enum:["none","onHover","always"],default:"onHover",description:(0,h.N)("render tree indent guides","Controls whether the tree should render indent guides.")},[xt]:{type:"boolean",default:!1,description:(0,h.N)("list smoothScrolling setting","Controls whether lists and trees have smooth scrolling.")},[kt]:{type:"number",default:1,description:(0,h.N)("Mouse Wheel Scroll Sensitivity","A multiplier to be used on the deltaX and deltaY of mouse wheel scroll events.")},[Lt]:{type:"number",default:5,description:(0,h.N)("Fast Scroll Sensitivity","Scrolling speed multiplier when pressing Alt.")},[wt]:{type:"string",enum:["simple","highlight","filter"],enumDescriptions:[(0,h.N)("keyboardNavigationSettingKey.simple","Simple keyboard navigation focuses elements which match the keyboard input. Matching is done only on prefixes."),(0,h.N)("keyboardNavigationSettingKey.highlight","Highlight keyboard navigation highlights elements which match the keyboard input. Further up and down navigation will traverse only the highlighted elements."),(0,h.N)("keyboardNavigationSettingKey.filter","Filter keyboard navigation will filter out and hide all the elements which do not match the keyboard input.")],default:"highlight",description:(0,h.N)("keyboardNavigationSettingKey","Controls the keyboard navigation style for lists and trees in the workbench. Can be simple, highlight and filter.")},[yt]:{type:"boolean",default:!0,markdownDescription:(0,h.N)("automatic keyboard navigation setting","Controls whether keyboard navigation in lists and trees is automatically triggered simply by typing. If set to `false`, keyboard navigation is only triggered when executing the `list.toggleKeyboardNavigation` command, for which you can assign a keyboard shortcut.")},[Et]:{type:"string",enum:["singleClick","doubleClick"],default:"singleClick",description:(0,h.N)("expand mode","Controls how tree folders are expanded when clicking the folder names. Note that some trees and lists might choose to ignore this setting if it is not applicable.")}}})},3557:(e,t,n)=>{"use strict";n.d(t,{VZ:()=>s,in:()=>a,kw:()=>c,$V:()=>h});var i=n(2065),o=n(5976),r=n(4669);const s=(0,i.yh)("logService");var a;!function(e){e[e.Trace=0]="Trace",e[e.Debug=1]="Debug",e[e.Info=2]="Info",e[e.Warning=3]="Warning",e[e.Error=4]="Error",e[e.Critical=5]="Critical",e[e.Off=6]="Off"}(a||(a={}));const l=a.Info;class d extends o.JT{constructor(){super(...arguments),this.level=l,this._onDidChangeLogLevel=this._register(new r.Q5)}setLevel(e){this.level!==e&&(this.level=e,this._onDidChangeLogLevel.fire(this.level))}getLevel(){return this.level}}class c extends d{constructor(e=l){super(),this.setLevel(e)}trace(e,...t){this.getLevel()<=a.Trace&&console.log("%cTRACE","color: #888",e,...t)}debug(e,...t){this.getLevel()<=a.Debug&&console.log("%cDEBUG","background: #eee; color: #888",e,...t)}info(e,...t){this.getLevel()<=a.Info&&console.log("%c INFO","color: #33f",e,...t)}error(e,...t){this.getLevel()<=a.Error&&console.log("%c ERR","color: #f33",e,...t)}dispose(){}}class h extends o.JT{constructor(e){super(),this.logger=e,this._register(e)}getLevel(){return this.logger.getLevel()}trace(e,...t){this.logger.trace(e,...t)}debug(e,...t){this.logger.debug(e,...t)}info(e,...t){this.logger.info(e,...t)}error(e,...t){this.logger.error(e,...t)}}},8674:(e,t,n)=>{"use strict";n.d(t,{ZL:()=>i,H0:()=>o,lT:()=>l});var i,o,r=n(2065),s=n(3580),a=n(4603);!function(e){e[e.Hint=1]="Hint",e[e.Info=2]="Info",e[e.Warning=4]="Warning",e[e.Error=8]="Error"}(i||(i={})),function(e){e.compare=function(e,t){return t-e};const t=Object.create(null);t[e.Error]=(0,s.N)("sev.error","Error"),t[e.Warning]=(0,s.N)("sev.warning","Warning"),t[e.Info]=(0,s.N)("sev.info","Info"),e.toString=function(e){return t[e]||""},e.fromSeverity=function(t){switch(t){case a.Z.Error:return e.Error;case a.Z.Warning:return e.Warning;case a.Z.Info:return e.Info;case a.Z.Ignore:return e.Hint}},e.toSeverity=function(t){switch(t){case e.Error:return a.Z.Error;case e.Warning:return a.Z.Warning;case e.Info:return a.Z.Info;case e.Hint:return a.Z.Ignore}}}(i||(i={})),function(e){const t="";function n(e,n){let o=[t];return e.source?o.push(e.source.replace("¦","\\¦")):o.push(t),e.code?"string"==typeof e.code?o.push(e.code.replace("¦","\\¦")):o.push(e.code.value.replace("¦","\\¦")):o.push(t),void 0!==e.severity&&null!==e.severity?o.push(i.toString(e.severity)):o.push(t),e.message&&n?o.push(e.message.replace("¦","\\¦")):o.push(t),void 0!==e.startLineNumber&&null!==e.startLineNumber?o.push(e.startLineNumber.toString()):o.push(t),void 0!==e.startColumn&&null!==e.startColumn?o.push(e.startColumn.toString()):o.push(t),void 0!==e.endLineNumber&&null!==e.endLineNumber?o.push(e.endLineNumber.toString()):o.push(t),void 0!==e.endColumn&&null!==e.endColumn?o.push(e.endColumn.toString()):o.push(t),o.push(t),o.join("¦")}e.makeKey=function(e){return n(e,!0)},e.makeKeyOptionalMessage=n}(o||(o={}));const l=(0,r.yh)("markerService")},9422:(e,t,n)=>{"use strict";n.d(t,{lT:()=>i,EO:()=>o}),n(4603);const i=(0,n(2065).yh)("notificationService");class o{}},988:(e,t,n)=>{"use strict";n.d(t,{v4:()=>l,SW:()=>d,xn:()=>c});var i=n(5976),o=n(7295),r=n(666),s=n(2065),a=function(e,t,n,i){return new(n||(n=Promise))((function(o,r){function s(e){try{l(i.next(e))}catch(e){r(e)}}function a(e){try{l(i.throw(e))}catch(e){r(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,a)}l((i=i.apply(e,t||[])).next())}))};const l=(0,s.yh)("openerService"),d=Object.freeze({_serviceBrand:void 0,registerOpener:()=>i.JT.None,registerValidator:()=>i.JT.None,registerExternalUriResolver:()=>i.JT.None,setDefaultExternalOpener(){},registerExternalOpener:()=>i.JT.None,open(){return a(this,void 0,void 0,(function*(){return!1}))},resolveExternalUri(e){return a(this,void 0,void 0,(function*(){return{resolved:e,dispose(){}}}))}});function c(e,t){return r.o.isUri(e)?(0,o.qq)(e.scheme,t):(0,o.ok)(e,t+":")}},535:(e,t,n)=>{"use strict";n.d(t,{E:()=>o,e:()=>r});var i=n(2065);class o{constructor(e){this.callback=e}report(e){this._value=e,this.callback(this._value)}}o.None=Object.freeze({report(){}});const r=(0,i.yh)("editorProgressService")},725:(e,t,n)=>{"use strict";n.d(t,{Ry:()=>i,IP:()=>a});var i,o=n(9872),r=n(9488),s=n(5976);!function(e){e[e.PRESERVE=0]="PRESERVE",e[e.LAST=1]="LAST"}(i||(i={}));const a={Quickaccess:"workbench.contributions.quickaccess"};o.B.add(a.Quickaccess,new class{constructor(){this.providers=[],this.defaultProvider=void 0}registerQuickAccessProvider(e){return 0===e.prefix.length?this.defaultProvider=e:this.providers.push(e),this.providers.sort(((e,t)=>t.prefix.length-e.prefix.length)),(0,s.OF)((()=>{this.providers.splice(this.providers.indexOf(e),1),this.defaultProvider===e&&(this.defaultProvider=void 0)}))}getQuickAccessProviders(){return(0,r.kX)([this.defaultProvider,...this.providers])}getQuickAccessProvider(e){return e&&this.providers.find((t=>e.startsWith(t.prefix)))||this.defaultProvider}})},1157:(e,t,n)=>{"use strict";n.d(t,{jG:()=>o.jG,eJ:()=>r});var i=n(2065),o=n(7746);const r=(0,i.yh)("quickInputService")},9872:(e,t,n)=>{"use strict";n.d(t,{B:()=>r});var i=n(8401),o=n(5146);const r=new class{constructor(){this.data=new Map}add(e,t){o.ok(i.HD(e)),o.ok(i.Kn(t)),o.ok(!this.data.has(e),"There is already an extension with this id"),this.data.set(e,t)}as(e){return this.data.get(e)||null}}},6904:(e,t,n)=>{"use strict";n.d(t,{Uy:()=>g,vm:()=>f,fk:()=>p});var i,o=n(2065),r=n(4669),s=n(5976),a=n(8401),l=n(5393),d=function(e,t,n,i){return new(n||(n=Promise))((function(o,r){function s(e){try{l(i.next(e))}catch(e){r(e)}}function a(e){try{l(i.throw(e))}catch(e){r(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,a)}l((i=i.apply(e,t||[])).next())}))};!function(e){e[e.None=0]="None",e[e.Initialized=1]="Initialized",e[e.Closed=2]="Closed"}(i||(i={}));class c extends s.JT{constructor(e,t=Object.create(null)){super(),this.database=e,this.options=t,this._onDidChangeStorage=this._register(new r.Q5),this.onDidChangeStorage=this._onDidChangeStorage.event,this.state=i.None,this.cache=new Map,this.flushDelayer=new l.rH(c.DEFAULT_FLUSH_DELAY),this.pendingDeletes=new Set,this.pendingInserts=new Map,this.whenFlushedCallbacks=[],this.registerListeners()}registerListeners(){this._register(this.database.onDidChangeItemsExternal((e=>this.onDidChangeItemsExternal(e))))}onDidChangeItemsExternal(e){var t,n;null===(t=e.changed)||void 0===t||t.forEach(((e,t)=>this.accept(t,e))),null===(n=e.deleted)||void 0===n||n.forEach((e=>this.accept(e,void 0)))}accept(e,t){if(this.state===i.Closed)return;let n=!1;(0,a.Jp)(t)?n=this.cache.delete(e):this.cache.get(e)!==t&&(this.cache.set(e,t),n=!0),n&&this._onDidChangeStorage.fire(e)}get(e,t){const n=this.cache.get(e);return(0,a.Jp)(n)?t:n}getBoolean(e,t){const n=this.get(e);return(0,a.Jp)(n)?t:"true"===n}getNumber(e,t){const n=this.get(e);return(0,a.Jp)(n)?t:parseInt(n,10)}set(e,t){return d(this,void 0,void 0,(function*(){if(this.state===i.Closed)return;if((0,a.Jp)(t))return this.delete(e);const n=String(t);return this.cache.get(e)!==n?(this.cache.set(e,n),this.pendingInserts.set(e,n),this.pendingDeletes.delete(e),this._onDidChangeStorage.fire(e),this.flushDelayer.trigger((()=>this.flushPending()))):void 0}))}delete(e){return d(this,void 0,void 0,(function*(){if(this.state!==i.Closed)return this.cache.delete(e)?(this.pendingDeletes.has(e)||this.pendingDeletes.add(e),this.pendingInserts.delete(e),this._onDidChangeStorage.fire(e),this.flushDelayer.trigger((()=>this.flushPending()))):void 0}))}get hasPending(){return this.pendingInserts.size>0||this.pendingDeletes.size>0}flushPending(){return d(this,void 0,void 0,(function*(){if(!this.hasPending)return;const e={insert:this.pendingInserts,delete:this.pendingDeletes};return this.pendingDeletes=new Set,this.pendingInserts=new Map,this.database.updateItems(e).finally((()=>{var e;if(!this.hasPending)for(;this.whenFlushedCallbacks.length;)null===(e=this.whenFlushedCallbacks.pop())||void 0===e||e()}))}))}dispose(){this.flushDelayer.dispose(),super.dispose()}}c.DEFAULT_FLUSH_DELAY=100;class h{constructor(){this.onDidChangeItemsExternal=r.ju.None,this.items=new Map}updateItems(e){return d(this,void 0,void 0,(function*(){e.insert&&e.insert.forEach(((e,t)=>this.items.set(t,e))),e.delete&&e.delete.forEach((e=>this.items.delete(e)))}))}}const u="__$__targetStorageMarker",g=(0,o.yh)("storageService");var p;!function(e){e[e.NONE=0]="NONE",e[e.SHUTDOWN=1]="SHUTDOWN"}(p||(p={}));class m extends s.JT{constructor(e={flushInterval:m.DEFAULT_FLUSH_INTERVAL}){super(),this.options=e,this._onDidChangeValue=this._register(new r.K3),this._onDidChangeTarget=this._register(new r.K3),this._onWillSaveState=this._register(new r.Q5),this.onWillSaveState=this._onWillSaveState.event,this._workspaceKeyTargets=void 0,this._globalKeyTargets=void 0}emitDidChangeValue(e,t){t===u?(0===e?this._globalKeyTargets=void 0:1===e&&(this._workspaceKeyTargets=void 0),this._onDidChangeTarget.fire({scope:e})):this._onDidChangeValue.fire({scope:e,key:t,target:this.getKeyTargets(e)[t]})}get(e,t,n){var i;return null===(i=this.getStorage(t))||void 0===i?void 0:i.get(e,n)}getBoolean(e,t,n){var i;return null===(i=this.getStorage(t))||void 0===i?void 0:i.getBoolean(e,n)}getNumber(e,t,n){var i;return null===(i=this.getStorage(t))||void 0===i?void 0:i.getNumber(e,n)}store(e,t,n,i){(0,a.Jp)(t)?this.remove(e,n):this.withPausedEmitters((()=>{var o;this.updateKeyTarget(e,n,i),null===(o=this.getStorage(n))||void 0===o||o.set(e,t)}))}remove(e,t){this.withPausedEmitters((()=>{var n;this.updateKeyTarget(e,t,void 0),null===(n=this.getStorage(t))||void 0===n||n.delete(e)}))}withPausedEmitters(e){this._onDidChangeValue.pause(),this._onDidChangeTarget.pause();try{e()}finally{this._onDidChangeValue.resume(),this._onDidChangeTarget.resume()}}updateKeyTarget(e,t,n){var i,o;const r=this.getKeyTargets(t);"number"==typeof n?r[e]!==n&&(r[e]=n,null===(i=this.getStorage(t))||void 0===i||i.set(u,JSON.stringify(r))):"number"==typeof r[e]&&(delete r[e],null===(o=this.getStorage(t))||void 0===o||o.set(u,JSON.stringify(r)))}get workspaceKeyTargets(){return this._workspaceKeyTargets||(this._workspaceKeyTargets=this.loadKeyTargets(1)),this._workspaceKeyTargets}get globalKeyTargets(){return this._globalKeyTargets||(this._globalKeyTargets=this.loadKeyTargets(0)),this._globalKeyTargets}getKeyTargets(e){return 0===e?this.globalKeyTargets:this.workspaceKeyTargets}loadKeyTargets(e){const t=this.get(u,e);if(t)try{return JSON.parse(t)}catch(e){}return Object.create(null)}}m.DEFAULT_FLUSH_INTERVAL=6e4;class f extends m{constructor(){super(),this.globalStorage=this._register(new c(new h)),this.workspaceStorage=this._register(new c(new h)),this._register(this.workspaceStorage.onDidChangeStorage((e=>this.emitDidChangeValue(1,e)))),this._register(this.globalStorage.onDidChangeStorage((e=>this.emitDidChangeValue(0,e))))}getStorage(e){return 0===e?this.globalStorage:this.workspaceStorage}}},829:(e,t,n)=>{"use strict";n.d(t,{b:()=>i});const i=(0,n(2065).yh)("telemetryService")},3910:(e,t,n)=>{"use strict";n.d(t,{IP:()=>c,P6:()=>u,dR:()=>g,Id:()=>p,XZ:()=>m,R8:()=>f,lR:()=>_,xL:()=>b,ur:()=>C,sg:()=>v,Sw:()=>w,rh:()=>y,sE:()=>A,zJ:()=>S,dt:()=>x,PR:()=>k,XE:()=>L,Pv:()=>E,_l:()=>N,YI:()=>D,EP:()=>I,RV:()=>M,SU:()=>T,C3:()=>R,p:()=>O,_t:()=>B,OZ:()=>P,j5:()=>z,b7:()=>V,GO:()=>H,g8:()=>j,qe:()=>$,_w:()=>U,et:()=>Z,AB:()=>K,yn:()=>q,zR:()=>Y,A2:()=>G,lX:()=>Q,b6:()=>X,gp:()=>J,uo:()=>ee,pW:()=>te,fe:()=>ne,c6:()=>ie,T8:()=>oe,Du:()=>re,fE:()=>se,cv:()=>ae,NO:()=>le,D0:()=>de,Hf:()=>ce,D1:()=>he,Ng:()=>ue,zK:()=>ge,tZ:()=>pe,lo:()=>me,kJ:()=>fe,op:()=>_e,oQ:()=>be,lW:()=>Ce,AW:()=>ve,K1:()=>we,hE:()=>ye,yb:()=>Ae,ES:()=>Se,Rz:()=>xe,g_:()=>ke,ny:()=>Le,MU:()=>Ee,jU:()=>Ne,pn:()=>De,Ei:()=>Ie,gk:()=>Me,pt:()=>Te,yJ:()=>Re,Sb:()=>Oe,CN:()=>Be,Lo:()=>Pe,_Y:()=>Fe,VV:()=>We,Pp:()=>ze,Fu:()=>Ve,sK:()=>He,Cz:()=>je,ke:()=>$e,yp:()=>Ue,P4:()=>Ze,XL:()=>Ke,mH:()=>qe,LL:()=>Ye,L_:()=>Ge,_b:()=>Qe,_2:()=>Xe,Oo:()=>Je,dC:()=>et,M6:()=>tt,Tn:()=>nt,rg:()=>it,yt:()=>ot,kv:()=>rt,s$:()=>st,F3:()=>at,mV:()=>lt,$d:()=>dt,AS:()=>ct,Gw:()=>ht,PX:()=>ut,vG:()=>mt,oS:()=>ft,S:()=>_t,Un:()=>bt,ux:()=>Ct,NP:()=>wt,cb:()=>yt,Vq:()=>At,Cd:()=>St,DE:()=>xt,Hz:()=>kt,jb:()=>Lt,$D:()=>Et,E3:()=>Nt,ZG:()=>Dt,u2:()=>It,Pk:()=>Mt,I1:()=>Tt,U6:()=>Rt,Fm:()=>Ot,SP:()=>Bt,KT:()=>Pt,ov:()=>Ft,Gj:()=>Wt,Iv:()=>zt,kV:()=>Vt,CA:()=>Ht,Xy:()=>jt,br:()=>$t,Jp:()=>Ut,BO:()=>Zt,OL:()=>Kt,Zn:()=>Gt,kw:()=>Qt,Sn:()=>Jt});var i=n(9872),o=n(1264),r=n(4669),s=n(3580),a=n(1294),l=n(5393),d=n(8401);const c={ColorContribution:"base.contributions.colors"},h=new class{constructor(){this._onDidChangeSchema=new r.Q5,this.onDidChangeSchema=this._onDidChangeSchema.event,this.colorSchema={type:"object",properties:{}},this.colorReferenceSchema={type:"string",enum:[],enumDescriptions:[]},this.colorsById={}}registerColor(e,t,n,i=!1,o){let r={id:e,description:n,defaults:t,needsTransparency:i,deprecationMessage:o};this.colorsById[e]=r;let s={type:"string",description:n,format:"color-hex",defaultSnippets:[{body:"${1:#ff0000}"}]};return o&&(s.deprecationMessage=o),this.colorSchema.properties[e]=s,this.colorReferenceSchema.enum.push(e),this.colorReferenceSchema.enumDescriptions.push(n),this._onDidChangeSchema.fire(),e}resolveDefaultColor(e,t){const n=this.colorsById[e];if(n&&n.defaults)return Jt(n.defaults[t.type],t)}getColorSchema(){return this.colorSchema}toString(){return Object.keys(this.colorsById).sort(((e,t)=>{let n=-1===e.indexOf(".")?0:1,i=-1===t.indexOf(".")?0:1;return n!==i?n-i:e.localeCompare(t)})).map((e=>`- \`${e}\`: ${this.colorsById[e].description}`)).join("\n")}};function u(e,t,n,i,o){return h.registerColor(e,t,n,i,o)}i.B.add(c.ColorContribution,h);const g=u("foreground",{dark:"#CCCCCC",light:"#616161",hc:"#FFFFFF"},s.N("foreground","Overall foreground color. This color is only used if not overridden by a component.")),p=u("errorForeground",{dark:"#F48771",light:"#A1260D",hc:"#F48771"},s.N("errorForeground","Overall foreground color for error messages. This color is only used if not overridden by a component.")),m=u("icon.foreground",{dark:"#C5C5C5",light:"#424242",hc:"#FFFFFF"},s.N("iconForeground","The default color for icons in the workbench.")),f=u("focusBorder",{dark:"#007FD4",light:"#0090F1",hc:"#F38518"},s.N("focusBorder","Overall border color for focused elements. This color is only used if not overridden by a component.")),_=u("contrastBorder",{light:null,dark:null,hc:"#6FC3DF"},s.N("contrastBorder","An extra border around elements to separate them from others for greater contrast.")),b=u("contrastActiveBorder",{light:null,dark:null,hc:f},s.N("activeContrastBorder","An extra border around active elements to separate them from others for greater contrast.")),C=u("textLink.foreground",{light:"#006AB1",dark:"#3794FF",hc:"#3794FF"},s.N("textLinkForeground","Foreground color for links in text.")),v=u("textLink.activeForeground",{light:"#006AB1",dark:"#3794FF",hc:"#3794FF"},s.N("textLinkActiveForeground","Foreground color for links in text when clicked on and on mouse hover.")),w=u("textCodeBlock.background",{light:"#dcdcdc66",dark:"#0a0a0a66",hc:o.Il.black},s.N("textCodeBlockBackground","Background color for code blocks in text.")),y=u("widget.shadow",{dark:Gt(o.Il.black,.36),light:Gt(o.Il.black,.16),hc:null},s.N("widgetShadow","Shadow color of widgets such as find/replace inside the editor.")),A=u("input.background",{dark:"#3C3C3C",light:o.Il.white,hc:o.Il.black},s.N("inputBoxBackground","Input box background.")),S=u("input.foreground",{dark:g,light:g,hc:g},s.N("inputBoxForeground","Input box foreground.")),x=u("input.border",{dark:null,light:null,hc:_},s.N("inputBoxBorder","Input box border.")),k=u("inputOption.activeBorder",{dark:"#007ACC00",light:"#007ACC00",hc:_},s.N("inputBoxActiveOptionBorder","Border color of activated options in input fields.")),L=u("inputOption.activeBackground",{dark:Gt(f,.4),light:Gt(f,.2),hc:o.Il.transparent},s.N("inputOption.activeBackground","Background color of activated options in input fields.")),E=u("inputOption.activeForeground",{dark:o.Il.white,light:o.Il.black,hc:null},s.N("inputOption.activeForeground","Foreground color of activated options in input fields.")),N=u("inputValidation.infoBackground",{dark:"#063B49",light:"#D6ECF2",hc:o.Il.black},s.N("inputValidationInfoBackground","Input validation background color for information severity.")),D=u("inputValidation.infoForeground",{dark:null,light:null,hc:null},s.N("inputValidationInfoForeground","Input validation foreground color for information severity.")),I=u("inputValidation.infoBorder",{dark:"#007acc",light:"#007acc",hc:_},s.N("inputValidationInfoBorder","Input validation border color for information severity.")),M=u("inputValidation.warningBackground",{dark:"#352A05",light:"#F6F5D2",hc:o.Il.black},s.N("inputValidationWarningBackground","Input validation background color for warning severity.")),T=u("inputValidation.warningForeground",{dark:null,light:null,hc:null},s.N("inputValidationWarningForeground","Input validation foreground color for warning severity.")),R=u("inputValidation.warningBorder",{dark:"#B89500",light:"#B89500",hc:_},s.N("inputValidationWarningBorder","Input validation border color for warning severity.")),O=u("inputValidation.errorBackground",{dark:"#5A1D1D",light:"#F2DEDE",hc:o.Il.black},s.N("inputValidationErrorBackground","Input validation background color for error severity.")),B=u("inputValidation.errorForeground",{dark:null,light:null,hc:null},s.N("inputValidationErrorForeground","Input validation foreground color for error severity.")),P=u("inputValidation.errorBorder",{dark:"#BE1100",light:"#BE1100",hc:_},s.N("inputValidationErrorBorder","Input validation border color for error severity.")),F=u("dropdown.background",{dark:"#3C3C3C",light:o.Il.white,hc:o.Il.black},s.N("dropdownBackground","Dropdown background.")),W=u("dropdown.foreground",{dark:"#F0F0F0",light:null,hc:o.Il.white},s.N("dropdownForeground","Dropdown foreground.")),z=u("button.foreground",{dark:o.Il.white,light:o.Il.white,hc:o.Il.white},s.N("buttonForeground","Button foreground color.")),V=u("button.background",{dark:"#0E639C",light:"#007ACC",hc:null},s.N("buttonBackground","Button background color.")),H=u("button.hoverBackground",{dark:Yt(V,.2),light:qt(V,.2),hc:null},s.N("buttonHoverBackground","Button background color when hovering.")),j=u("badge.background",{dark:"#4D4D4D",light:"#C4C4C4",hc:o.Il.black},s.N("badgeBackground","Badge background color. Badges are small information labels, e.g. for search results count.")),$=u("badge.foreground",{dark:o.Il.white,light:"#333",hc:o.Il.white},s.N("badgeForeground","Badge foreground color. Badges are small information labels, e.g. for search results count.")),U=u("scrollbar.shadow",{dark:"#000000",light:"#DDDDDD",hc:null},s.N("scrollbarShadow","Scrollbar shadow to indicate that the view is scrolled.")),Z=u("scrollbarSlider.background",{dark:o.Il.fromHex("#797979").transparent(.4),light:o.Il.fromHex("#646464").transparent(.4),hc:Gt(_,.6)},s.N("scrollbarSliderBackground","Scrollbar slider background color.")),K=u("scrollbarSlider.hoverBackground",{dark:o.Il.fromHex("#646464").transparent(.7),light:o.Il.fromHex("#646464").transparent(.7),hc:Gt(_,.8)},s.N("scrollbarSliderHoverBackground","Scrollbar slider background color when hovering.")),q=u("scrollbarSlider.activeBackground",{dark:o.Il.fromHex("#BFBFBF").transparent(.4),light:o.Il.fromHex("#000000").transparent(.6),hc:_},s.N("scrollbarSliderActiveBackground","Scrollbar slider background color when clicked on.")),Y=u("progressBar.background",{dark:o.Il.fromHex("#0E70C0"),light:o.Il.fromHex("#0E70C0"),hc:_},s.N("progressBarBackground","Background color of the progress bar that can show for long running operations.")),G=u("editorError.background",{dark:null,light:null,hc:null},s.N("editorError.background","Background color of error text in the editor. The color must not be opaque so as not to hide underlying decorations."),!0),Q=u("editorError.foreground",{dark:"#F48771",light:"#E51400",hc:null},s.N("editorError.foreground","Foreground color of error squigglies in the editor.")),X=u("editorError.border",{dark:null,light:null,hc:o.Il.fromHex("#E47777").transparent(.8)},s.N("errorBorder","Border color of error boxes in the editor.")),J=u("editorWarning.background",{dark:null,light:null,hc:null},s.N("editorWarning.background","Background color of warning text in the editor. The color must not be opaque so as not to hide underlying decorations."),!0),ee=u("editorWarning.foreground",{dark:"#CCA700",light:"#BF8803",hc:null},s.N("editorWarning.foreground","Foreground color of warning squigglies in the editor.")),te=u("editorWarning.border",{dark:null,light:null,hc:o.Il.fromHex("#FFCC00").transparent(.8)},s.N("warningBorder","Border color of warning boxes in the editor.")),ne=u("editorInfo.background",{dark:null,light:null,hc:null},s.N("editorInfo.background","Background color of info text in the editor. The color must not be opaque so as not to hide underlying decorations."),!0),ie=u("editorInfo.foreground",{dark:"#75BEFF",light:"#75BEFF",hc:null},s.N("editorInfo.foreground","Foreground color of info squigglies in the editor.")),oe=u("editorInfo.border",{dark:null,light:null,hc:o.Il.fromHex("#75BEFF").transparent(.8)},s.N("infoBorder","Border color of info boxes in the editor.")),re=u("editorHint.foreground",{dark:o.Il.fromHex("#eeeeee").transparent(.7),light:"#6c6c6c",hc:null},s.N("editorHint.foreground","Foreground color of hint squigglies in the editor.")),se=u("editorHint.border",{dark:null,light:null,hc:o.Il.fromHex("#eeeeee").transparent(.8)},s.N("hintBorder","Border color of hint boxes in the editor.")),ae=u("editor.background",{light:"#fffffe",dark:"#1E1E1E",hc:o.Il.black},s.N("editorBackground","Editor background color.")),le=u("editor.foreground",{light:"#333333",dark:"#BBBBBB",hc:o.Il.white},s.N("editorForeground","Editor default foreground color.")),de=u("editorWidget.background",{dark:"#252526",light:"#F3F3F3",hc:"#0C141F"},s.N("editorWidgetBackground","Background color of editor widgets, such as find/replace.")),ce=u("editorWidget.foreground",{dark:g,light:g,hc:g},s.N("editorWidgetForeground","Foreground color of editor widgets, such as find/replace.")),he=u("editorWidget.border",{dark:"#454545",light:"#C8C8C8",hc:_},s.N("editorWidgetBorder","Border color of editor widgets. The color is only used if the widget chooses to have a border and if the color is not overridden by a widget.")),ue=u("editorWidget.resizeBorder",{light:null,dark:null,hc:null},s.N("editorWidgetResizeBorder","Border color of the resize bar of editor widgets. The color is only used if the widget chooses to have a resize border and if the color is not overridden by a widget.")),ge=u("quickInput.background",{dark:de,light:de,hc:de},s.N("pickerBackground","Quick picker background color. The quick picker widget is the container for pickers like the command palette.")),pe=u("quickInput.foreground",{dark:ce,light:ce,hc:ce},s.N("pickerForeground","Quick picker foreground color. The quick picker widget is the container for pickers like the command palette.")),me=u("quickInputTitle.background",{dark:new o.Il(new o.VS(255,255,255,.105)),light:new o.Il(new o.VS(0,0,0,.06)),hc:"#000000"},s.N("pickerTitleBackground","Quick picker title background color. The quick picker widget is the container for pickers like the command palette.")),fe=u("pickerGroup.foreground",{dark:"#3794FF",light:"#0066BF",hc:o.Il.white},s.N("pickerGroupForeground","Quick picker color for grouping labels.")),_e=u("pickerGroup.border",{dark:"#3F3F46",light:"#CCCEDB",hc:o.Il.white},s.N("pickerGroupBorder","Quick picker color for grouping borders.")),be=u("keybindingLabel.background",{dark:new o.Il(new o.VS(128,128,128,.17)),light:new o.Il(new o.VS(221,221,221,.4)),hc:o.Il.transparent},s.N("keybindingLabelBackground","Keybinding label background color. The keybinding label is used to represent a keyboard shortcut.")),Ce=u("keybindingLabel.foreground",{dark:o.Il.fromHex("#CCCCCC"),light:o.Il.fromHex("#555555"),hc:o.Il.white},s.N("keybindingLabelForeground","Keybinding label foreground color. The keybinding label is used to represent a keyboard shortcut.")),ve=u("keybindingLabel.border",{dark:new o.Il(new o.VS(51,51,51,.6)),light:new o.Il(new o.VS(204,204,204,.4)),hc:new o.Il(new o.VS(111,195,223))},s.N("keybindingLabelBorder","Keybinding label border color. The keybinding label is used to represent a keyboard shortcut.")),we=u("keybindingLabel.bottomBorder",{dark:new o.Il(new o.VS(68,68,68,.6)),light:new o.Il(new o.VS(187,187,187,.4)),hc:new o.Il(new o.VS(111,195,223))},s.N("keybindingLabelBottomBorder","Keybinding label border bottom color. The keybinding label is used to represent a keyboard shortcut.")),ye=u("editor.selectionBackground",{light:"#ADD6FF",dark:"#264F78",hc:"#f3f518"},s.N("editorSelectionBackground","Color of the editor selection.")),Ae=u("editor.selectionForeground",{light:null,dark:null,hc:"#000000"},s.N("editorSelectionForeground","Color of the selected text for high contrast.")),Se=u("editor.inactiveSelectionBackground",{light:Gt(ye,.5),dark:Gt(ye,.5),hc:Gt(ye,.5)},s.N("editorInactiveSelection","Color of the selection in an inactive editor. The color must not be opaque so as not to hide underlying decorations."),!0),xe=u("editor.selectionHighlightBackground",{light:Xt(ye,ae,.3,.6),dark:Xt(ye,ae,.3,.6),hc:null},s.N("editorSelectionHighlight","Color for regions with the same content as the selection. The color must not be opaque so as not to hide underlying decorations."),!0),ke=u("editor.selectionHighlightBorder",{light:null,dark:null,hc:b},s.N("editorSelectionHighlightBorder","Border color for regions with the same content as the selection.")),Le=u("editor.findMatchBackground",{light:"#A8AC94",dark:"#515C6A",hc:null},s.N("editorFindMatch","Color of the current search match.")),Ee=u("editor.findMatchHighlightBackground",{light:"#EA5C0055",dark:"#EA5C0055",hc:null},s.N("findMatchHighlight","Color of the other search matches. The color must not be opaque so as not to hide underlying decorations."),!0),Ne=u("editor.findRangeHighlightBackground",{dark:"#3a3d4166",light:"#b4b4b44d",hc:null},s.N("findRangeHighlight","Color of the range limiting the search. The color must not be opaque so as not to hide underlying decorations."),!0),De=u("editor.findMatchBorder",{light:null,dark:null,hc:b},s.N("editorFindMatchBorder","Border color of the current search match.")),Ie=u("editor.findMatchHighlightBorder",{light:null,dark:null,hc:b},s.N("findMatchHighlightBorder","Border color of the other search matches.")),Me=u("editor.findRangeHighlightBorder",{dark:null,light:null,hc:Gt(b,.4)},s.N("findRangeHighlightBorder","Border color of the range limiting the search. The color must not be opaque so as not to hide underlying decorations."),!0),Te=u("editor.hoverHighlightBackground",{light:"#ADD6FF26",dark:"#264f7840",hc:"#ADD6FF26"},s.N("hoverHighlight","Highlight below the word for which a hover is shown. The color must not be opaque so as not to hide underlying decorations."),!0),Re=u("editorHoverWidget.background",{light:de,dark:de,hc:de},s.N("hoverBackground","Background color of the editor hover.")),Oe=u("editorHoverWidget.foreground",{light:ce,dark:ce,hc:ce},s.N("hoverForeground","Foreground color of the editor hover.")),Be=u("editorHoverWidget.border",{light:he,dark:he,hc:he},s.N("hoverBorder","Border color of the editor hover.")),Pe=u("editorHoverWidget.statusBarBackground",{dark:Yt(Re,.2),light:qt(Re,.05),hc:de},s.N("statusBarBackground","Background color of the editor hover status bar.")),Fe=u("editorLink.activeForeground",{dark:"#4E94CE",light:o.Il.blue,hc:o.Il.cyan},s.N("activeLinkForeground","Color of active links.")),We=u("editorInlayHint.foreground",{dark:Gt($,.8),light:Gt($,.8),hc:$},s.N("editorInlayHintForeground","Foreground color of inline hints")),ze=u("editorInlayHint.background",{dark:Gt(j,.6),light:Gt(j,.3),hc:j},s.N("editorInlayHintBackground","Background color of inline hints")),Ve=u("editorLightBulb.foreground",{dark:"#FFCC00",light:"#DDB100",hc:"#FFCC00"},s.N("editorLightBulbForeground","The color used for the lightbulb actions icon.")),He=u("editorLightBulbAutoFix.foreground",{dark:"#75BEFF",light:"#007ACC",hc:"#75BEFF"},s.N("editorLightBulbAutoFixForeground","The color used for the lightbulb auto fix actions icon.")),je=new o.Il(new o.VS(155,185,85,.2)),$e=new o.Il(new o.VS(255,0,0,.2)),Ue=u("diffEditor.insertedTextBackground",{dark:je,light:je,hc:null},s.N("diffEditorInserted","Background color for text that got inserted. The color must not be opaque so as not to hide underlying decorations."),!0),Ze=u("diffEditor.removedTextBackground",{dark:$e,light:$e,hc:null},s.N("diffEditorRemoved","Background color for text that got removed. The color must not be opaque so as not to hide underlying decorations."),!0),Ke=u("diffEditor.insertedTextBorder",{dark:null,light:null,hc:"#33ff2eff"},s.N("diffEditorInsertedOutline","Outline color for the text that got inserted.")),qe=u("diffEditor.removedTextBorder",{dark:null,light:null,hc:"#FF008F"},s.N("diffEditorRemovedOutline","Outline color for text that got removed.")),Ye=u("diffEditor.border",{dark:null,light:null,hc:_},s.N("diffEditorBorder","Border color between the two text editors.")),Ge=u("diffEditor.diagonalFill",{dark:"#cccccc33",light:"#22222233",hc:null},s.N("diffDiagonalFill","Color of the diff editor's diagonal fill. The diagonal fill is used in side-by-side diff views.")),Qe=u("list.focusBackground",{dark:null,light:null,hc:null},s.N("listFocusBackground","List/Tree background color for the focused item when the list/tree is active. An active list/tree has keyboard focus, an inactive does not.")),Xe=u("list.focusForeground",{dark:null,light:null,hc:null},s.N("listFocusForeground","List/Tree foreground color for the focused item when the list/tree is active. An active list/tree has keyboard focus, an inactive does not.")),Je=u("list.focusOutline",{dark:f,light:f,hc:b},s.N("listFocusOutline","List/Tree outline color for the focused item when the list/tree is active. An active list/tree has keyboard focus, an inactive does not.")),et=u("list.activeSelectionBackground",{dark:"#094771",light:"#0060C0",hc:null},s.N("listActiveSelectionBackground","List/Tree background color for the selected item when the list/tree is active. An active list/tree has keyboard focus, an inactive does not.")),tt=u("list.activeSelectionForeground",{dark:o.Il.white,light:o.Il.white,hc:null},s.N("listActiveSelectionForeground","List/Tree foreground color for the selected item when the list/tree is active. An active list/tree has keyboard focus, an inactive does not.")),nt=u("list.activeSelectionIconForeground",{dark:null,light:null,hc:null},s.N("listActiveSelectionIconForeground","List/Tree icon foreground color for the selected item when the list/tree is active. An active list/tree has keyboard focus, an inactive does not.")),it=u("list.inactiveSelectionBackground",{dark:"#37373D",light:"#E4E6F1",hc:null},s.N("listInactiveSelectionBackground","List/Tree background color for the selected item when the list/tree is inactive. An active list/tree has keyboard focus, an inactive does not.")),ot=u("list.inactiveSelectionForeground",{dark:null,light:null,hc:null},s.N("listInactiveSelectionForeground","List/Tree foreground color for the selected item when the list/tree is inactive. An active list/tree has keyboard focus, an inactive does not.")),rt=u("list.inactiveSelectionIconForeground",{dark:null,light:null,hc:null},s.N("listInactiveSelectionIconForeground","List/Tree icon foreground color for the selected item when the list/tree is inactive. An active list/tree has keyboard focus, an inactive does not.")),st=u("list.inactiveFocusBackground",{dark:null,light:null,hc:null},s.N("listInactiveFocusBackground","List/Tree background color for the focused item when the list/tree is inactive. An active list/tree has keyboard focus, an inactive does not.")),at=u("list.inactiveFocusOutline",{dark:null,light:null,hc:null},s.N("listInactiveFocusOutline","List/Tree outline color for the focused item when the list/tree is inactive. An active list/tree has keyboard focus, an inactive does not.")),lt=u("list.hoverBackground",{dark:"#2A2D2E",light:"#F0F0F0",hc:null},s.N("listHoverBackground","List/Tree background when hovering over items using the mouse.")),dt=u("list.hoverForeground",{dark:null,light:null,hc:null},s.N("listHoverForeground","List/Tree foreground when hovering over items using the mouse.")),ct=u("list.dropBackground",{dark:"#062F4A",light:"#D6EBFF",hc:null},s.N("listDropBackground","List/Tree drag and drop background when moving items around using the mouse.")),ht=u("list.highlightForeground",{dark:"#18A3FF",light:"#0066BF",hc:f},s.N("highlight","List/Tree foreground color of the match highlights when searching inside the list/tree.")),ut=u("list.focusHighlightForeground",{dark:ht,light:(gt=et,pt=ht,"#9DDDFF",{op:5,if:gt,then:pt,else:"#9DDDFF"}),hc:ht},s.N("listFocusHighlightForeground","List/Tree foreground color of the match highlights on actively focused items when searching inside the list/tree."));var gt,pt;const mt=u("listFilterWidget.background",{light:"#efc1ad",dark:"#653723",hc:o.Il.black},s.N("listFilterWidgetBackground","Background color of the type filter widget in lists and trees.")),ft=u("listFilterWidget.outline",{dark:o.Il.transparent,light:o.Il.transparent,hc:"#f38518"},s.N("listFilterWidgetOutline","Outline color of the type filter widget in lists and trees.")),_t=u("listFilterWidget.noMatchesOutline",{dark:"#BE1100",light:"#BE1100",hc:_},s.N("listFilterWidgetNoMatchesOutline","Outline color of the type filter widget in lists and trees, when there are no matches.")),bt=u("tree.indentGuidesStroke",{dark:"#585858",light:"#a9a9a9",hc:"#a9a9a9"},s.N("treeIndentGuidesStroke","Tree stroke color for the indentation guides.")),Ct=u("tree.tableColumnsBorder",{dark:"#CCCCCC20",light:"#61616120",hc:null},s.N("treeIndentGuidesStroke","Tree stroke color for the indentation guides.")),vt=u("quickInput.list.focusBackground",{dark:null,light:null,hc:null},"",void 0,s.N("quickInput.list.focusBackground deprecation","Please use quickInputList.focusBackground instead")),wt=u("quickInputList.focusForeground",{dark:tt,light:tt,hc:tt},s.N("quickInput.listFocusForeground","Quick picker foreground color for the focused item.")),yt=u("quickInputList.focusIconForeground",{dark:nt,light:nt,hc:nt},s.N("quickInput.listFocusIconForeground","Quick picker icon foreground color for the focused item.")),At=u("quickInputList.focusBackground",{dark:Qt(vt,et),light:Qt(vt,et),hc:null},s.N("quickInput.listFocusBackground","Quick picker background color for the focused item.")),St=u("menu.border",{dark:null,light:null,hc:_},s.N("menuBorder","Border color of menus.")),xt=u("menu.foreground",{dark:W,light:g,hc:W},s.N("menuForeground","Foreground color of menu items.")),kt=u("menu.background",{dark:F,light:F,hc:F},s.N("menuBackground","Background color of menu items.")),Lt=u("menu.selectionForeground",{dark:tt,light:tt,hc:tt},s.N("menuSelectionForeground","Foreground color of the selected menu item in menus.")),Et=u("menu.selectionBackground",{dark:et,light:et,hc:et},s.N("menuSelectionBackground","Background color of the selected menu item in menus.")),Nt=u("menu.selectionBorder",{dark:null,light:null,hc:b},s.N("menuSelectionBorder","Border color of the selected menu item in menus.")),Dt=u("menu.separatorBackground",{dark:"#BBBBBB",light:"#888888",hc:_},s.N("menuSeparatorBackground","Color of a separator menu item in menus.")),It=u("editor.snippetTabstopHighlightBackground",{dark:new o.Il(new o.VS(124,124,124,.3)),light:new o.Il(new o.VS(10,50,100,.2)),hc:new o.Il(new o.VS(124,124,124,.3))},s.N("snippetTabstopHighlightBackground","Highlight background color of a snippet tabstop.")),Mt=u("editor.snippetTabstopHighlightBorder",{dark:null,light:null,hc:null},s.N("snippetTabstopHighlightBorder","Highlight border color of a snippet tabstop.")),Tt=u("editor.snippetFinalTabstopHighlightBackground",{dark:null,light:null,hc:null},s.N("snippetFinalTabstopHighlightBackground","Highlight background color of the final tabstop of a snippet.")),Rt=u("editor.snippetFinalTabstopHighlightBorder",{dark:"#525252",light:new o.Il(new o.VS(10,50,100,.5)),hc:"#525252"},s.N("snippetFinalTabstopHighlightBorder","Highlight border color of the final tabstop of a snippet.")),Ot=u("editorOverviewRuler.findMatchForeground",{dark:"#d186167e",light:"#d186167e",hc:"#AB5A00"},s.N("overviewRulerFindMatchForeground","Overview ruler marker color for find matches. The color must not be opaque so as not to hide underlying decorations."),!0),Bt=u("editorOverviewRuler.selectionHighlightForeground",{dark:"#A0A0A0CC",light:"#A0A0A0CC",hc:"#A0A0A0CC"},s.N("overviewRulerSelectionHighlightForeground","Overview ruler marker color for selection highlights. The color must not be opaque so as not to hide underlying decorations."),!0),Pt=u("minimap.findMatchHighlight",{light:"#d18616",dark:"#d18616",hc:"#AB5A00"},s.N("minimapFindMatchHighlight","Minimap marker color for find matches."),!0),Ft=u("minimap.selectionHighlight",{light:"#ADD6FF",dark:"#264F78",hc:"#ffffff"},s.N("minimapSelectionHighlight","Minimap marker color for the editor selection."),!0),Wt=u("minimap.errorHighlight",{dark:new o.Il(new o.VS(255,18,18,.7)),light:new o.Il(new o.VS(255,18,18,.7)),hc:new o.Il(new o.VS(255,50,50,1))},s.N("minimapError","Minimap marker color for errors.")),zt=u("minimap.warningHighlight",{dark:ee,light:ee,hc:te},s.N("overviewRuleWarning","Minimap marker color for warnings.")),Vt=u("minimap.background",{dark:null,light:null,hc:null},s.N("minimapBackground","Minimap background color.")),Ht=u("minimapSlider.background",{light:Gt(Z,.5),dark:Gt(Z,.5),hc:Gt(Z,.5)},s.N("minimapSliderBackground","Minimap slider background color.")),jt=u("minimapSlider.hoverBackground",{light:Gt(K,.5),dark:Gt(K,.5),hc:Gt(K,.5)},s.N("minimapSliderHoverBackground","Minimap slider background color when hovering.")),$t=u("minimapSlider.activeBackground",{light:Gt(q,.5),dark:Gt(q,.5),hc:Gt(q,.5)},s.N("minimapSliderActiveBackground","Minimap slider background color when clicked on.")),Ut=u("problemsErrorIcon.foreground",{dark:Q,light:Q,hc:Q},s.N("problemsErrorIconForeground","The color used for the problems error icon.")),Zt=u("problemsWarningIcon.foreground",{dark:ee,light:ee,hc:ee},s.N("problemsWarningIconForeground","The color used for the problems warning icon.")),Kt=u("problemsInfoIcon.foreground",{dark:ie,light:ie,hc:ie},s.N("problemsInfoIconForeground","The color used for the problems info icon."));function qt(e,t){return{op:0,value:e,factor:t}}function Yt(e,t){return{op:1,value:e,factor:t}}function Gt(e,t){return{op:2,value:e,factor:t}}function Qt(...e){return{op:3,values:e}}function Xt(e,t,n,i){return{op:4,value:e,background:t,factor:n,transparency:i}}function Jt(e,t){if(null!==e)return"string"==typeof e?"#"===e[0]?o.Il.fromHex(e):t.getColor(e):e instanceof o.Il?e:"object"==typeof e?function(e,t){var n,i,r;switch(e.op){case 0:return null===(n=Jt(e.value,t))||void 0===n?void 0:n.darken(e.factor);case 1:return null===(i=Jt(e.value,t))||void 0===i?void 0:i.lighten(e.factor);case 2:return null===(r=Jt(e.value,t))||void 0===r?void 0:r.transparent(e.factor);case 3:for(const n of e.values){const e=Jt(n,t);if(e)return e}return;case 5:return Jt(t.defines(e.if)?e.then:e.else,t);case 4:const s=Jt(e.value,t);if(!s)return;const a=Jt(e.background,t);return a?s.isDarkerThan(a)?o.Il.getLighterColor(s,a,e.factor).transparent(e.transparency):o.Il.getDarkerColor(s,a,e.factor).transparent(e.transparency):s.transparent(e.factor*e.transparency);default:throw(0,d.vE)(e)}}(e,t):void 0}const en="vscode://schemas/workbench-colors";let tn=i.B.as(a.I.JSONContribution);tn.registerSchema(en,h.getColorSchema());const nn=new l.pY((()=>tn.notifySchemaChanged(en)),200);h.onDidChangeSchema((()=>{nn.isScheduled()||nn.schedule()}))},9554:(e,t,n)=>{"use strict";n.d(t,{q5:()=>h,Ks:()=>u,s_:()=>f});var i=n(9872),o=n(7781),r=n(4669),s=n(3580),a=n(1294),l=n(5393),d=n(3046);const c=new class{constructor(){this._onDidChange=new r.Q5,this.onDidChange=this._onDidChange.event,this.iconSchema={definitions:{icons:{type:"object",properties:{fontId:{type:"string",description:(0,s.N)("iconDefintion.fontId","The id of the font to use. If not set, the font that is defined first is used.")},fontCharacter:{type:"string",description:(0,s.N)("iconDefintion.fontCharacter","The font character associated with the icon definition.")}},additionalProperties:!1,defaultSnippets:[{body:{fontCharacter:"\\\\e030"}}]}},type:"object",properties:{}},this.iconReferenceSchema={type:"string",pattern:`^${d.dT.iconNameExpression}$`,enum:[],enumDescriptions:[]},this.iconsById={},this.iconFontsById={}}registerIcon(e,t,n,i){const o=this.iconsById[e];if(o){if(n&&!o.description){o.description=n,this.iconSchema.properties[e].markdownDescription=`${n} $(${e})`;const t=this.iconReferenceSchema.enum.indexOf(e);-1!==t&&(this.iconReferenceSchema.enumDescriptions[t]=n),this._onDidChange.fire()}return o}let r={id:e,description:n,defaults:t,deprecationMessage:i};this.iconsById[e]=r;let s={$ref:"#/definitions/icons"};return i&&(s.deprecationMessage=i),n&&(s.markdownDescription=`${n}: $(${e})`),this.iconSchema.properties[e]=s,this.iconReferenceSchema.enum.push(e),this.iconReferenceSchema.enumDescriptions.push(n||""),this._onDidChange.fire(),{id:e}}getIcons(){return Object.keys(this.iconsById).map((e=>this.iconsById[e]))}getIcon(e){return this.iconsById[e]}getIconSchema(){return this.iconSchema}getIconFont(e){return this.iconFontsById[e]}toString(){const e=(e,t)=>e.id.localeCompare(t.id),t=e=>{for(;o.kS.isThemeIcon(e.defaults);)e=this.iconsById[e.defaults.id];return`codicon codicon-${e?e.id:""}`};let n=[];n.push("| preview | identifier | default codicon ID | description"),n.push("| ----------- | --------------------------------- | --------------------------------- | --------------------------------- |");const i=Object.keys(this.iconsById).map((e=>this.iconsById[e]));for(const r of i.filter((e=>!!e.description)).sort(e))n.push(`||${r.id}|${o.kS.isThemeIcon(r.defaults)?r.defaults.id:r.id}|${r.description||""}|`);n.push("| preview | identifier "),n.push("| ----------- | --------------------------------- |");for(const r of i.filter((e=>!o.kS.isThemeIcon(e.defaults))).sort(e))n.push(`||${r.id}|`);return n.join("\n")}};function h(e,t,n,i){return c.registerIcon(e,t,n,i)}function u(){return c}i.B.add("base.contributions.icons",c),function(){for(const e of d.fK.all)c.registerIcon(e.id,e.definition,e.description);d.fK.onDidRegister((e=>c.registerIcon(e.id,e.definition,e.description)))}();const g="vscode://schemas/icons";let p=i.B.as(a.I.JSONContribution);p.registerSchema(g,c.getIconSchema());const m=new l.pY((()=>p.notifySchemaChanged(g)),200);c.onDidChange((()=>{m.isScheduled()||m.schedule()}));const f=h("widget-close",d.lA.close,(0,s.N)("widgetClose","Icon for the close action in widgets."))},8810:(e,t,n)=>{"use strict";n.d(t,{o:()=>o,WZ:()=>s,Jl:()=>a,O2:()=>l,tj:()=>c});var i=n(3910);function o(e,t){const n=Object.create(null);for(let o in t){const r=t[o];r&&(n[o]=(0,i.Sn)(r,e))}return n}function r(e,t,n){function i(){const i=o(e.getColorTheme(),t);"function"==typeof n?n(i):n.style(i)}return i(),e.onDidColorThemeChange(i)}function s(e,t,n){return r(t,{badgeBackground:(null==n?void 0:n.badgeBackground)||i.g8,badgeForeground:(null==n?void 0:n.badgeForeground)||i.qe,badgeBorder:i.lR},e)}function a(e,t,n){return r(t,Object.assign(Object.assign({},l),n||{}),e)}const l={listFocusBackground:i._b,listFocusForeground:i._2,listFocusOutline:i.Oo,listActiveSelectionBackground:i.dC,listActiveSelectionForeground:i.M6,listActiveSelectionIconForeground:i.Tn,listFocusAndSelectionBackground:i.dC,listFocusAndSelectionForeground:i.M6,listInactiveSelectionBackground:i.rg,listInactiveSelectionIconForeground:i.kv,listInactiveSelectionForeground:i.yt,listInactiveFocusBackground:i.s$,listInactiveFocusOutline:i.F3,listHoverBackground:i.mV,listHoverForeground:i.$d,listDropBackground:i.AS,listSelectionOutline:i.xL,listHoverOutline:i.xL,listFilterWidgetBackground:i.vG,listFilterWidgetOutline:i.oS,listFilterWidgetNoMatchesOutline:i.S,listMatchesShadow:i.rh,treeIndentGuidesStroke:i.Un,tableColumnsBorder:i.ux},d={shadowColor:i.rh,borderColor:i.Cd,foregroundColor:i.DE,backgroundColor:i.Hz,selectionForegroundColor:i.jb,selectionBackgroundColor:i.$D,selectionBorderColor:i.E3,separatorColor:i.ZG};function c(e,t,n){return r(t,Object.assign(Object.assign({},d),n),e)}},2321:(e,t,n)=>{"use strict";var i;n.d(t,{e:()=>i}),function(e){e.DARK="dark",e.LIGHT="light",e.HIGH_CONTRAST="hc"}(i||(i={}))},7781:(e,t,n)=>{"use strict";n.d(t,{XE:()=>d,EN:()=>u,kS:()=>h,m6:()=>g,IP:()=>p,Ic:()=>f,bB:()=>_});var i=n(2065),o=n(5976),r=n(9872),s=n(4669),a=n(2321),l=n(3046);const d=(0,i.yh)("themeService");var c,h;function u(e){return{id:e}}function g(e){switch(e){case a.e.DARK:return"vs-dark";case a.e.HIGH_CONTRAST:return"hc-black";default:return"vs"}}!function(e){e.isThemeColor=function(e){return e&&"object"==typeof e&&"string"==typeof e.id}}(c||(c={})),function(e){e.isThemeIcon=function(e){return e&&"object"==typeof e&&"string"==typeof e.id&&(void 0===e.color||c.isThemeColor(e.color))};const t=new RegExp(`^\\$\\((${l.dT.iconNameExpression}(?:${l.dT.iconModifierExpression})?)\\)$`);e.fromString=function(e){const n=t.exec(e);if(!n)return;let[,i]=n;return{id:i}},e.modify=function(e,t){let n=e.id;const i=n.lastIndexOf("~");return-1!==i&&(n=n.substring(0,i)),t&&(n=`${n}~${t}`),{id:n}},e.isEqual=function(e,t){var n,i;return e.id===t.id&&(null===(n=e.color)||void 0===n?void 0:n.id)===(null===(i=t.color)||void 0===i?void 0:i.id)},e.asThemeIcon=function(e,t){return{id:e.id,color:t?u(t):void 0}},e.asClassNameArray=l.dT.asClassNameArray,e.asClassName=l.dT.asClassName,e.asCSSSelector=l.dT.asCSSSelector}(h||(h={}));const p={ThemingContribution:"base.contributions.theming"};let m=new class{constructor(){this.themingParticipants=[],this.themingParticipants=[],this.onThemingParticipantAddedEmitter=new s.Q5}onColorThemeChange(e){return this.themingParticipants.push(e),this.onThemingParticipantAddedEmitter.fire(e),(0,o.OF)((()=>{const t=this.themingParticipants.indexOf(e);this.themingParticipants.splice(t,1)}))}getThemingParticipants(){return this.themingParticipants}};function f(e){return m.onColorThemeChange(e)}r.B.add(p.ThemingContribution,m);class _ extends o.JT{constructor(e){super(),this.themeService=e,this.theme=e.getColorTheme(),this._register(this.themeService.onDidColorThemeChange((e=>this.onThemeChange(e))))}onThemeChange(e){this.theme=e,this.updateStyles()}updateStyles(){}}},4862:(e,t,n)=>{"use strict";n.d(t,{tJ:()=>i,YO:()=>o,Xt:()=>r,gJ:()=>s});const i=(0,n(2065).yh)("undoRedoService");class o{constructor(e,t){this.resource=e,this.elements=t}}class r{constructor(){this.id=r._ID++,this.order=1}nextOrder(){return 0===this.id?0:this.order++}}r._ID=0,r.None=new r;class s{constructor(){this.id=s._ID++,this.order=1}nextOrder(){return 0===this.id?0:this.order++}}s._ID=0,s.None=new s},382:(e,t,n)=>{"use strict";n.d(t,{ec:()=>o,md:()=>r});var i=n(2065);n(3702);const o=(0,i.yh)("contextService");class r{constructor(e,t){this.raw=t,this.uri=e.uri,this.index=e.index,this.name=e.name}toJSON(){return{uri:this.uri,name:this.name,index:this.index}}}},9271:function(e,t){var n,i;void 0===(i="function"==typeof(n=function(){"use strict";var e=Object.prototype.hasOwnProperty,t=Object.prototype.toString,n="boolean"==typeof(new RegExp).sticky;function i(e){return e&&"[object RegExp]"===t.call(e)}function o(e){return e&&"object"==typeof e&&!i(e)&&!Array.isArray(e)}function r(e){return"("+e+")"}function s(e){return e.length?"(?:"+e.map((function(e){return"(?:"+e+")"})).join("|")+")":"(?!)"}function a(e){if("string"==typeof e)return"(?:"+(e.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")+")");if(i(e)){if(e.ignoreCase)throw new Error("RegExp /i flag not allowed");if(e.global)throw new Error("RegExp /g flag is implied");if(e.sticky)throw new Error("RegExp /y flag is implied");if(e.multiline)throw new Error("RegExp /m flag is implied");return e.source}throw new Error("Not a pattern: "+e)}function l(t,n){if(o(n)||(n={match:n}),n.include)throw new Error("Matching rules cannot also include states");var r={defaultType:t,lineBreaks:!!n.error||!!n.fallback,pop:!1,next:null,push:null,error:!1,fallback:!1,value:null,type:null,shouldThrow:!1};for(var s in n)e.call(n,s)&&(r[s]=n[s]);if("string"==typeof r.type&&t!==r.type)throw new Error("Type transform cannot be a string (type '"+r.type+"' for token '"+t+"')");var a=r.match;return r.match=Array.isArray(a)?a:a?[a]:[],r.match.sort((function(e,t){return i(e)&&i(t)?0:i(t)?-1:i(e)?1:t.length-e.length})),r}function d(e){return Array.isArray(e)?function(e){for(var t=[],n=0;n0)throw new Error("RegExp has capture groups: "+v+"\nUse (?: … ) instead");if(!m.lineBreaks&&v.test("\n"))throw new Error("Rule should declare lineBreaks: "+v);g.push(r(C))}}var w=o&&o.fallback,y=n&&!w?"ym":"gm",A=n||w?"":"|";return!0===h&&(y+="u"),{regexp:new RegExp(s(g)+A,y),groups:u,fast:l,error:o||c}}function u(e,t,n){var i=e&&(e.push||e.next);if(i&&!n[i])throw new Error("Missing state '"+i+"' (in token '"+e.defaultType+"' of state '"+t+"')");if(e&&e.pop&&1!=+e.pop)throw new Error("pop must be 1 (in token '"+e.defaultType+"' of state '"+t+"')")}var g=function(e,t){this.startState=t,this.states=e,this.buffer="",this.stack=[],this.reset()};g.prototype.reset=function(e,t){return this.buffer=e||"",this.index=0,this.line=t?t.line:1,this.col=t?t.col:1,this.queuedToken=t?t.queuedToken:null,this.queuedThrow=t?t.queuedThrow:null,this.setState(t?t.state:this.startState),this.stack=t&&t.stack?t.stack.slice():[],this},g.prototype.save=function(){return{line:this.line,col:this.col,state:this.state,stack:this.stack.slice(),queuedToken:this.queuedToken,queuedThrow:this.queuedThrow}},g.prototype.setState=function(e){if(e&&this.state!==e){this.state=e;var t=this.states[e];this.groups=t.groups,this.error=t.error,this.re=t.regexp,this.fast=t.fast}},g.prototype.popState=function(){this.setState(this.stack.pop())},g.prototype.pushState=function(e){this.stack.push(this.state),this.setState(e)};var p=n?function(e,t){return e.exec(t)}:function(e,t){var n=e.exec(t);return 0===n[0].length?null:n};function m(){return this.value}if(g.prototype._getGroup=function(e){for(var t=this.groups.length,n=0;n";throw new Error("Unknown symbol type: "+e)}}return e.highestId=0,e.prototype.toString=function(e){var t=void 0===e?this.symbols.map(s).join(" "):this.symbols.slice(0,e).map(s).join(" ")+" ● "+this.symbols.slice(e).map(s).join(" ");return this.name+" → "+t},t.prototype.toString=function(){return"{"+this.rule.toString(this.dot)+"}, from: "+(this.reference||0)},t.prototype.nextState=function(e){var n=new t(this.rule,this.dot+1,this.reference,this.wantedBy);return n.left=this,n.right=e,n.isComplete&&(n.data=n.build(),n.right=void 0),n},t.prototype.build=function(){var e=[],t=this;do{e.push(t.right.data),t=t.left}while(t.left);return e.reverse(),e},t.prototype.finish=function(){this.rule.postprocess&&(this.data=this.rule.postprocess(this.data,this.reference,r.fail))},n.prototype.process=function(e){for(var t=this.states,n=this.wants,i=this.completed,o=0;o0&&t.push(" ^ "+i+" more lines identical to this"),i=0,t.push(" "+s)),n=s}},r.prototype.getSymbolDisplay=function(e){return function(e){var t=typeof e;if("string"===t)return e;if("object"===t){if(e.literal)return JSON.stringify(e.literal);if(e instanceof RegExp)return"character matching "+e;if(e.type)return e.type+" token";if(e.test)return"token matching "+String(e.test);throw new Error("Unknown symbol type: "+e)}}(e)},r.prototype.buildFirstStateStack=function(e,t){if(-1!==t.indexOf(e))return null;if(0===e.wantedBy.length)return[e];var n=e.wantedBy[0],i=[e].concat(t),o=this.buildFirstStateStack(n,i);return null===o?null:[e].concat(o)},r.prototype.save=function(){var e=this.table[this.current];return e.lexerState=this.lexerState,e},r.prototype.restore=function(e){var t=e.index;this.current=t,this.table[t]=e,this.table.splice(t+1),this.lexerState=e.lexerState,this.results=this.finish()},r.prototype.rewind=function(e){if(!this.options.keepHistory)throw new Error("set option `keepHistory` to enable rewinding");this.restore(this.table[e])},r.prototype.finish=function(){var e=[],t=this.grammar.start;return this.table[this.table.length-1].states.forEach((function(n){n.rule.name===t&&n.dot===n.rule.symbols.length&&0===n.reference&&n.data!==r.fail&&e.push(n)})),e.map((function(e){return e.data}))},{Parser:r,Grammar:i,Rule:e}},e.exports?e.exports=t():this.nearley=t()},7418:e=>{"use strict";var t=Object.getOwnPropertySymbols,n=Object.prototype.hasOwnProperty,i=Object.prototype.propertyIsEnumerable;function o(e){if(null==e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}e.exports=function(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var t={},n=0;n<10;n++)t["_"+String.fromCharCode(n)]=n;if("0123456789"!==Object.getOwnPropertyNames(t).map((function(e){return t[e]})).join(""))return!1;var i={};return"abcdefghijklmnopqrst".split("").forEach((function(e){i[e]=e})),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},i)).join("")}catch(e){return!1}}()?Object.assign:function(e,r){for(var s,a,l=o(e),d=1;d{"use strict";var i=n(414);function o(){}function r(){}r.resetWarningCache=o,e.exports=function(){function e(e,t,n,o,r,s){if(s!==i){var a=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw a.name="Invariant Violation",a}}function t(){return e}e.isRequired=e;var n={array:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:r,resetWarningCache:o};return n.PropTypes=n,n}},5697:(e,t,n)=>{e.exports=n(2703)()},414:e=>{"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},4419:(e,t,n)=>{const i=n(3753),o=n(9450),r=i.types;e.exports=class e{constructor(e,t){if(this._setDefaults(e),e instanceof RegExp)this.ignoreCase=e.ignoreCase,this.multiline=e.multiline,e=e.source;else{if("string"!=typeof e)throw new Error("Expected a regexp or string");this.ignoreCase=t&&-1!==t.indexOf("i"),this.multiline=t&&-1!==t.indexOf("m")}this.tokens=i(e)}_setDefaults(t){this.max=null!=t.max?t.max:null!=e.prototype.max?e.prototype.max:100,this.defaultRange=t.defaultRange?t.defaultRange:this.defaultRange.clone(),t.randInt&&(this.randInt=t.randInt)}gen(){return this._gen(this.tokens,[])}_gen(e,t){var n,i,o,s,a;switch(e.type){case r.ROOT:case r.GROUP:if(e.followedBy||e.notFollowedBy)return"";for(e.remember&&void 0===e.groupNumber&&(e.groupNumber=t.push(null)-1),i="",s=0,a=(n=e.options?this._randSelect(e.options):e.stack).length;s{const i=n(2162),o=n(4864),r=n(8792),s=n(5244);e.exports=e=>{var t,n,a=0,l={type:o.ROOT,stack:[]},d=l,c=l.stack,h=[],u=t=>{i.error(e,"Nothing to repeat at column "+(t-1))},g=i.strToChars(e);for(t=g.length;a{const i=n(4864);t.wordBoundary=()=>({type:i.POSITION,value:"b"}),t.nonWordBoundary=()=>({type:i.POSITION,value:"B"}),t.begin=()=>({type:i.POSITION,value:"^"}),t.end=()=>({type:i.POSITION,value:"$"})},8792:(e,t,n)=>{const i=n(4864),o=()=>[{type:i.RANGE,from:48,to:57}],r=()=>[{type:i.CHAR,value:95},{type:i.RANGE,from:97,to:122},{type:i.RANGE,from:65,to:90}].concat(o()),s=()=>[{type:i.CHAR,value:9},{type:i.CHAR,value:10},{type:i.CHAR,value:11},{type:i.CHAR,value:12},{type:i.CHAR,value:13},{type:i.CHAR,value:32},{type:i.CHAR,value:160},{type:i.CHAR,value:5760},{type:i.RANGE,from:8192,to:8202},{type:i.CHAR,value:8232},{type:i.CHAR,value:8233},{type:i.CHAR,value:8239},{type:i.CHAR,value:8287},{type:i.CHAR,value:12288},{type:i.CHAR,value:65279}];t.words=()=>({type:i.SET,set:r(),not:!1}),t.notWords=()=>({type:i.SET,set:r(),not:!0}),t.ints=()=>({type:i.SET,set:o(),not:!1}),t.notInts=()=>({type:i.SET,set:o(),not:!0}),t.whitespace=()=>({type:i.SET,set:s(),not:!1}),t.notWhitespace=()=>({type:i.SET,set:s(),not:!0}),t.anyChar=()=>({type:i.SET,set:[{type:i.CHAR,value:10},{type:i.CHAR,value:13},{type:i.CHAR,value:8232},{type:i.CHAR,value:8233}],not:!0})},4864:e=>{e.exports={ROOT:0,GROUP:1,POSITION:2,SET:3,RANGE:4,REPETITION:5,REFERENCE:6,CHAR:7}},2162:(e,t,n)=>{const i=n(4864),o=n(8792),r={0:0,t:9,n:10,v:11,f:12,r:13};t.strToChars=function(e){return e.replace(/(\[\\b\])|(\\)?\\(?:u([A-F0-9]{4})|x([A-F0-9]{2})|(0?[0-7]{2})|c([@A-Z[\\\]^?])|([0tnvfr]))/g,(function(e,t,n,i,o,s,a,l){if(n)return e;var d=t?8:i?parseInt(i,16):o?parseInt(o,16):s?parseInt(s,8):a?"@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^ ?".indexOf(a):r[l],c=String.fromCharCode(d);return/[[\]{}^$.|?*+()]/.test(c)&&(c="\\"+c),c}))},t.tokenizeClass=(e,n)=>{for(var r,s,a=[],l=/\\(?:(w)|(d)|(s)|(W)|(D)|(S))|((?:(?:\\)(.)|([^\]\\]))-(?:\\)?([^\]]))|(\])|(?:\\)?([^])/g;null!=(r=l.exec(e));)if(r[1])a.push(o.words());else if(r[2])a.push(o.ints());else if(r[3])a.push(o.whitespace());else if(r[4])a.push(o.notWords());else if(r[5])a.push(o.notInts());else if(r[6])a.push(o.notWhitespace());else if(r[7])a.push({type:i.RANGE,from:(r[8]||r[9]).charCodeAt(0),to:r[10].charCodeAt(0)});else{if(!(s=r[12]))return[a,l.lastIndex];a.push({type:i.CHAR,value:s.charCodeAt(0)})}t.error(n,"Unterminated character class")},t.error=(e,t)=>{throw new SyntaxError("Invalid regular expression: /"+e+"/: "+t)}},4448:(e,t,n)=>{"use strict";var i=n(7294),o=n(7418),r=n(3840);function s(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n