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,YAAYlB,EAG/B,C,iBACA,IAAIC,EAAmB,EACvB,MAAMG,EAAa,IAAIc,YAAY,IA6DnC,SAAShB,EAAkBH,EAAMoB,EAAOC,GAEhCrB,GAAQqB,GAAmBrB,EAAOqB,EAAkBD,EAAMH,QAIlE,SAA0BK,GAGtB,GAAc,IAAVA,EACA,OAGJjB,EAAWH,KAA8B,IAARoB,EAC7BA,GAAS,IACTjB,EAAWH,KAAuBoB,GAAS,EAAK,KAEhDA,GAAS,KACTjB,EAAWH,KAAuBoB,GAAS,GAAM,IAEzD,CAjBQC,CAAiBH,EAAMpB,EAAOqB,GAEtC,CA0BA,MAAMjB,EAAmB,IAAIoB,WAAW,CACpC,IACA,GACA,IACA,IACA,GACA,IACA,GACA,IACA,GACA,IACA,GACA,IACA,IACA,GACA,GACA,IACA,IACA,IACA,MAYEjB,EAAe,IAAIkB,YAAY,CACjC,IACA,IACA,IACA,GACA,IACA,IACA,IACA,GACA,IACA,MACA,MACA,MACA,IACA,IACA,MACA,MACA,MACA,GACA,IACA,MACA,MAaEjB,EAAwB,IAAIiB,YAAY,CAC1C,IACA,GACA,MACA,IACA,MACA,MACA,IACA,IACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,GACA,IACA,MACA,IACA,GACA,IACA,IACA,GACA,IACA,IACA,IACA,MAmBEhB,EAAoB,IAAIgB,YAAY,CACtC,IACA,GACA,MACA,IACA,MACA,MACA,IACA,GACA,IACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,GACA,IACA,GACA,MACA,IACA,GACA,IACA,IACA,GACA,GACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,GACA,IACA,IACA,IACA,GACA,IACA,MACA,MACA,MACA,IACA,IACA,MACA,MACA,MACA,GACA,IACA,MACA,K,mCC/QG,MAAMC,EACT,WAAAC,CAAYC,EAAOC,EAAQ,EAAGC,EAAMF,EAAMX,OAAQc,EAAQF,EAAQ,GAC9DG,KAAKJ,MAAQA,EACbI,KAAKH,MAAQA,EACbG,K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IACXhD,MAAO,KACPiD,MAAO,MAEXA,EAAMjD,MAAQA,EAAMA,MAAQA,EAC5BiD,EAAMA,MAAQjD,EAAMiD,MAAQA,EACrB,MAAMtC,EAAahC,EAAkBqB,EAAMW,UAAYsC,EAAMtC,UACvD1P,EAAW0N,EAAkBqB,EAAM/O,QAAUgS,EAAMhS,QACnDkQ,EAAYxC,EAAkBqB,EAAMmB,SAAW8B,EAAM9B,SACrDe,EAAWvD,EAAkBqB,EAAMkC,QAAUe,EAAMf,QACnDG,EAAY1D,EAAkBqB,EAAMqC,SAAWY,EAAMZ,SACrDG,EAAW7D,EAAkBqB,EAAMwC,QAAUS,EAAMT,QACnD/C,EAAOd,EAAkBqB,EAAMP,IAAMwD,EAAMxD,G","sources":["file:////home/runner/work/platform/platform/common/temp/node_modules/.pnpm/monaco-editor@0.50.0/node_modules/monaco-editor/esm/vs/base/common/naturalLanguage/korean.js","file:////home/runner/work/platform/platform/common/temp/node_modules/.pnpm/monaco-editor@0.50.0/node_modules/monaco-editor/esm/vs/base/common/navigator.js","file:////home/runner/work/platform/platform/common/temp/node_modules/.pnpm/monaco-editor@0.50.0/node_modules/monaco-editor/esm/vs/base/common/network.js","file:////home/runner/work/platform/platform/common/temp/node_modules/.pnpm/monaco-editor@0.50.0/node_modules/monaco-editor/esm/vs/base/common/numbers.js","file:////home/runner/work/platform/platform/common/temp/node_modules/.pnpm/monaco-editor@0.50.0/node_modules/monaco-editor/esm/vs/base/common/objects.js","file:////home/runner/work/platform/platform/common/temp/node_modules/.pnpm/monaco-editor@0.50.0/node_modules/monaco-editor/esm/vs/base/common/observableInternal/autorun.js","file:////home/runner/work/platform/platform/common/temp/node_modules/.pnpm/monaco-editor@0.50.0/node_modules/monaco-editor/esm/vs/base/common/observableInternal/promise.js","file:////home/runner/work/platform/platform/common/temp/node_modules/.pnpm/monaco-editor@0.50.0/node_modules/monaco-editor/esm/vs/base/common/observableInternal/base.js","file:////home/runner/work/platform/platform/common/temp/node_modules/.pnpm/monaco-editor@0.50.0/node_modules/monaco-editor/esm/vs/base/common/observableInternal/debugName.js","file:////home/runner/work/platform/platform/common/temp/node_modules/.pnpm/monaco-editor@0.50.0/node_modules/monaco-editor/esm/vs/base/common/observableInternal/derived.js","file:////home/runner/work/platform/platform/common/temp/node_modules/.pnpm/monaco-editor@0.50.0/node_modules/monaco-editor/esm/vs/base/common/observableInternal/logging.js","file:////home/runner/work/platform/platform/common/temp/node_modules/.pnpm/monaco-editor@0.50.0/node_modules/monaco-editor/esm/vs/base/common/observableInternal/utils.js","file:////home/runner/work/platform/platform/common/temp/node_modules/.pnpm/monaco-editor@0.50.0/node_modules/monaco-editor/esm/vs/base/common/path.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// allow-any-unicode-comment-file\n/**\n * Gets alternative Korean characters for the character code. This will return the ascii\n * character code(s) that a Hangul character may have been input with using a qwerty layout.\n *\n * This only aims to cover modern (not archaic) Hangul syllables.\n *\n * @param code The character code to get alternate characters for\n */\nexport function getKoreanAltChars(code) {\n const result = disassembleKorean(code);\n if (result && result.length > 0) {\n return new Uint32Array(result);\n }\n return undefined;\n}\nlet codeBufferLength = 0;\nconst codeBuffer = new Uint32Array(10);\nfunction disassembleKorean(code) {\n codeBufferLength = 0;\n // Initial consonants (초성)\n getCodesFromArray(code, modernConsonants, 4352 /* HangulRangeStartCode.InitialConsonant */);\n if (codeBufferLength > 0) {\n return codeBuffer.subarray(0, codeBufferLength);\n }\n // Vowels (중성)\n getCodesFromArray(code, modernVowels, 4449 /* HangulRangeStartCode.Vowel */);\n if (codeBufferLength > 0) {\n return codeBuffer.subarray(0, codeBufferLength);\n }\n // Final consonants (종성)\n getCodesFromArray(code, modernFinalConsonants, 4520 /* HangulRangeStartCode.FinalConsonant */);\n if (codeBufferLength > 0) {\n return codeBuffer.subarray(0, codeBufferLength);\n }\n // Hangul Compatibility Jamo\n getCodesFromArray(code, compatibilityJamo, 12593 /* HangulRangeStartCode.CompatibilityJamo */);\n if (codeBufferLength) {\n return codeBuffer.subarray(0, codeBufferLength);\n }\n // Hangul Syllables\n if (code >= 0xAC00 && code <= 0xD7A3) {\n const hangulIndex = code - 0xAC00;\n const vowelAndFinalConsonantProduct = hangulIndex % 588;\n // 0-based starting at 0x1100\n const initialConsonantIndex = Math.floor(hangulIndex / 588);\n // 0-based starting at 0x1161\n const vowelIndex = Math.floor(vowelAndFinalConsonantProduct / 28);\n // 0-based starting at 0x11A8\n // Subtract 1 as the standard algorithm uses the 0 index to represent no\n // final consonant\n const finalConsonantIndex = vowelAndFinalConsonantProduct % 28 - 1;\n if (initialConsonantIndex < modernConsonants.length) {\n getCodesFromArray(initialConsonantIndex, modernConsonants, 0);\n }\n else if (4352 /* HangulRangeStartCode.InitialConsonant */ + initialConsonantIndex - 12593 /* HangulRangeStartCode.CompatibilityJamo */ < compatibilityJamo.length) {\n getCodesFromArray(4352 /* HangulRangeStartCode.InitialConsonant */ + initialConsonantIndex, compatibilityJamo, 12593 /* HangulRangeStartCode.CompatibilityJamo */);\n }\n if (vowelIndex < modernVowels.length) {\n getCodesFromArray(vowelIndex, modernVowels, 0);\n }\n else if (4449 /* HangulRangeStartCode.Vowel */ + vowelIndex - 12593 /* HangulRangeStartCode.CompatibilityJamo */ < compatibilityJamo.length) {\n getCodesFromArray(4449 /* HangulRangeStartCode.Vowel */ + vowelIndex - 12593 /* HangulRangeStartCode.CompatibilityJamo */, compatibilityJamo, 12593 /* HangulRangeStartCode.CompatibilityJamo */);\n }\n if (finalConsonantIndex >= 0) {\n if (finalConsonantIndex < modernFinalConsonants.length) {\n getCodesFromArray(finalConsonantIndex, modernFinalConsonants, 0);\n }\n else if (4520 /* HangulRangeStartCode.FinalConsonant */ + finalConsonantIndex - 12593 /* HangulRangeStartCode.CompatibilityJamo */ < compatibilityJamo.length) {\n getCodesFromArray(4520 /* HangulRangeStartCode.FinalConsonant */ + finalConsonantIndex - 12593 /* HangulRangeStartCode.CompatibilityJamo */, compatibilityJamo, 12593 /* HangulRangeStartCode.CompatibilityJamo */);\n }\n }\n if (codeBufferLength > 0) {\n return codeBuffer.subarray(0, codeBufferLength);\n }\n }\n return undefined;\n}\nfunction getCodesFromArray(code, array, arrayStartIndex) {\n // Verify the code is within the array's range\n if (code >= arrayStartIndex && code < arrayStartIndex + array.length) {\n addCodesToBuffer(array[code - arrayStartIndex]);\n }\n}\nfunction addCodesToBuffer(codes) {\n // NUL is ignored, this is used for archaic characters to avoid using a Map\n // for the data\n if (codes === 0 /* AsciiCode.NUL */) {\n return;\n }\n // Number stored in format: OptionalThirdCode << 16 | OptionalSecondCode << 8 | Code\n codeBuffer[codeBufferLength++] = codes & 0xFF;\n if (codes >> 8) {\n codeBuffer[codeBufferLength++] = (codes >> 8) & 0xFF;\n }\n if (codes >> 16) {\n codeBuffer[codeBufferLength++] = (codes >> 16) & 0xFF;\n }\n}\n/**\n * Hangul Jamo - Modern consonants #1\n *\n * Range U+1100..U+1112\n *\n * | | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | A | B | C | D | E | F |\n * |--------|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|\n * | U+110x | ᄀ | ᄁ | ᄂ | ᄃ | ᄄ | ᄅ | ᄆ | ᄇ | ᄈ | ᄉ | ᄊ | ᄋ | ᄌ | ᄍ | ᄎ | ᄏ |\n * | U+111x | ᄐ | ᄑ | ᄒ |\n */\nconst modernConsonants = new Uint8Array([\n 114 /* AsciiCode.r */, // ㄱ\n 82 /* AsciiCode.R */, // ㄲ\n 115 /* AsciiCode.s */, // ㄴ\n 101 /* AsciiCode.e */, // ㄷ\n 69 /* AsciiCode.E */, // ㄸ\n 102 /* AsciiCode.f */, // ㄹ\n 97 /* AsciiCode.a */, // ㅁ\n 113 /* AsciiCode.q */, // ㅂ\n 81 /* AsciiCode.Q */, // ㅃ\n 116 /* AsciiCode.t */, // ㅅ\n 84 /* AsciiCode.T */, // ㅆ\n 100 /* AsciiCode.d */, // ㅇ\n 119 /* AsciiCode.w */, // ㅈ\n 87 /* AsciiCode.W */, // ㅉ\n 99 /* AsciiCode.c */, // ㅊ\n 122 /* AsciiCode.z */, // ㅋ\n 120 /* AsciiCode.x */, // ㅌ\n 118 /* AsciiCode.v */, // ㅍ\n 103 /* AsciiCode.g */, // ㅎ\n]);\n/**\n * Hangul Jamo - Modern Vowels\n *\n * Range U+1161..U+1175\n *\n * | | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | A | B | C | D | E | F |\n * |--------|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|\n * | U+116x | | ᅡ | ᅢ | ᅣ | ᅤ | ᅥ | ᅦ | ᅧ | ᅨ | ᅩ | ᅪ | ᅫ | ᅬ | ᅭ | ᅮ | ᅯ |\n * | U+117x | ᅰ | ᅱ | ᅲ | ᅳ | ᅴ | ᅵ |\n */\nconst modernVowels = new Uint16Array([\n 107 /* AsciiCode.k */, // -> ㅏ\n 111 /* AsciiCode.o */, // -> ㅐ\n 105 /* AsciiCode.i */, // -> ㅑ\n 79 /* AsciiCode.O */, // -> ㅒ\n 106 /* AsciiCode.j */, // -> ㅓ\n 112 /* AsciiCode.p */, // -> ㅔ\n 117 /* AsciiCode.u */, // -> ㅕ\n 80 /* AsciiCode.P */, // -> ㅖ\n 104 /* AsciiCode.h */, // -> ㅗ\n 27496 /* AsciiCodeCombo.hk */, // -> ㅘ\n 28520 /* AsciiCodeCombo.ho */, // -> ㅙ\n 27752 /* AsciiCodeCombo.hl */, // -> ㅚ\n 121 /* AsciiCode.y */, // -> ㅛ\n 110 /* AsciiCode.n */, // -> ㅜ\n 27246 /* AsciiCodeCombo.nj */, // -> ㅝ\n 28782 /* AsciiCodeCombo.np */, // -> ㅞ\n 27758 /* AsciiCodeCombo.nl */, // -> ㅟ\n 98 /* AsciiCode.b */, // -> ㅠ\n 109 /* AsciiCode.m */, // -> ㅡ\n 27757 /* AsciiCodeCombo.ml */, // -> ㅢ\n 108 /* AsciiCode.l */, // -> ㅣ\n]);\n/**\n * Hangul Jamo - Modern Consonants #2\n *\n * Range U+11A8..U+11C2\n *\n * | | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | A | B | C | D | E | F |\n * |--------|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|\n * | U+11Ax | | | | | | | | | ᆨ | ᆩ | ᆪ | ᆫ | ᆬ | ᆭ | ᆮ | ᆯ |\n * | U+11Bx | ᆰ | ᆱ | ᆲ | ᆳ | ᆴ | ᆵ | ᆶ | ᆷ | ᆸ | ᆹ | ᆺ | ᆻ | ᆼ | ᆽ | ᆾ | ᆿ |\n * | U+11Cx | ᇀ | ᇁ | ᇂ |\n */\nconst modernFinalConsonants = new Uint16Array([\n 114 /* AsciiCode.r */, // ㄱ\n 82 /* AsciiCode.R */, // ㄲ\n 29810 /* AsciiCodeCombo.rt */, // ㄳ\n 115 /* AsciiCode.s */, // ㄴ\n 30579 /* AsciiCodeCombo.sw */, // ㄵ\n 26483 /* AsciiCodeCombo.sg */, // ㄶ\n 101 /* AsciiCode.e */, // ㄷ\n 102 /* AsciiCode.f */, // ㄹ\n 29286 /* AsciiCodeCombo.fr */, // ㄺ\n 24934 /* AsciiCodeCombo.fa */, // ㄻ\n 29030 /* AsciiCodeCombo.fq */, // ㄼ\n 29798 /* AsciiCodeCombo.ft */, // ㄽ\n 30822 /* AsciiCodeCombo.fx */, // ㄾ\n 30310 /* AsciiCodeCombo.fv */, // ㄿ\n 26470 /* AsciiCodeCombo.fg */, // ㅀ\n 97 /* AsciiCode.a */, // ㅁ\n 113 /* AsciiCode.q */, // ㅂ\n 29809 /* AsciiCodeCombo.qt */, // ㅄ\n 116 /* AsciiCode.t */, // ㅅ\n 84 /* AsciiCode.T */, // ㅆ\n 100 /* AsciiCode.d */, // ㅇ\n 119 /* AsciiCode.w */, // ㅈ\n 99 /* AsciiCode.c */, // ㅊ\n 122 /* AsciiCode.z */, // ㅋ\n 120 /* AsciiCode.x */, // ㅌ\n 118 /* AsciiCode.v */, // ㅍ\n 103 /* AsciiCode.g */, // ㅎ\n]);\n/**\n * Hangul Compatibility Jamo\n *\n * Range U+3131..U+318F\n *\n * This includes range includes archaic jamo which we don't consider, these are\n * given the NUL character code in order to be ignored.\n *\n * | | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | A | B | C | D | E | F |\n * |--------|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|\n * | U+313x | | ㄱ | ㄲ | ㄳ | ㄴ | ㄵ | ㄶ | ㄷ | ㄸ | ㄹ | ㄺ | ㄻ | ㄼ | ㄽ | ㄾ | ㄿ |\n * | U+314x | ㅀ | ㅁ | ㅂ | ㅃ | ㅄ | ㅅ | ㅆ | ㅇ | ㅈ | ㅉ | ㅊ | ㅋ | ㅌ | ㅍ | ㅎ | ㅏ |\n * | U+315x | ㅐ | ㅑ | ㅒ | ㅓ | ㅔ | ㅕ | ㅖ | ㅗ | ㅘ | ㅙ | ㅚ | ㅛ | ㅜ | ㅝ | ㅞ | ㅟ |\n * | U+316x | ㅠ | ㅡ | ㅢ | ㅣ | HF | ㅥ | ㅦ | ㅧ | ㅨ | ㅩ | ㅪ | ㅫ | ㅬ | ㅭ | ㅮ | ㅯ |\n * | U+317x | ㅰ | ㅱ | ㅲ | ㅳ | ㅴ | ㅵ | ㅶ | ㅷ | ㅸ | ㅹ | ㅺ | ㅻ | ㅼ | ㅽ | ㅾ | ㅿ |\n * | U+318x | ㆀ | ㆁ | ㆂ | ㆃ | ㆄ | ㆅ | ㆆ | ㆇ | ㆈ | ㆉ | ㆊ | ㆋ | ㆌ | ㆍ | ㆎ |\n */\nconst compatibilityJamo = new Uint16Array([\n 114 /* AsciiCode.r */, // ㄱ\n 82 /* AsciiCode.R */, // ㄲ\n 29810 /* AsciiCodeCombo.rt */, // ㄳ\n 115 /* AsciiCode.s */, // ㄴ\n 30579 /* AsciiCodeCombo.sw */, // ㄵ\n 26483 /* AsciiCodeCombo.sg */, // ㄶ\n 101 /* AsciiCode.e */, // ㄷ\n 69 /* AsciiCode.E */, // ㄸ\n 102 /* AsciiCode.f */, // ㄹ\n 29286 /* AsciiCodeCombo.fr */, // ㄺ\n 24934 /* AsciiCodeCombo.fa */, // ㄻ\n 29030 /* AsciiCodeCombo.fq */, // ㄼ\n 29798 /* AsciiCodeCombo.ft */, // ㄽ\n 30822 /* AsciiCodeCombo.fx */, // ㄾ\n 30310 /* AsciiCodeCombo.fv */, // ㄿ\n 26470 /* AsciiCodeCombo.fg */, // ㅀ\n 97 /* AsciiCode.a */, // ㅁ\n 113 /* AsciiCode.q */, // ㅂ\n 81 /* AsciiCode.Q */, // ㅃ\n 29809 /* AsciiCodeCombo.qt */, // ㅄ\n 116 /* AsciiCode.t */, // ㅅ\n 84 /* AsciiCode.T */, // ㅆ\n 100 /* AsciiCode.d */, // ㅇ\n 119 /* AsciiCode.w */, // ㅈ\n 87 /* AsciiCode.W */, // ㅉ\n 99 /* AsciiCode.c */, // ㅊ\n 122 /* AsciiCode.z */, // ㅋ\n 120 /* AsciiCode.x */, // ㅌ\n 118 /* AsciiCode.v */, // ㅍ\n 103 /* AsciiCode.g */, // ㅎ\n 107 /* AsciiCode.k */, // ㅏ\n 111 /* AsciiCode.o */, // ㅐ\n 105 /* AsciiCode.i */, // ㅑ\n 79 /* AsciiCode.O */, // ㅒ\n 106 /* AsciiCode.j */, // ㅓ\n 112 /* AsciiCode.p */, // ㅔ\n 117 /* AsciiCode.u */, // ㅕ\n 80 /* AsciiCode.P */, // ㅖ\n 104 /* AsciiCode.h */, // ㅗ\n 27496 /* AsciiCodeCombo.hk */, // ㅘ\n 28520 /* AsciiCodeCombo.ho */, // ㅙ\n 27752 /* AsciiCodeCombo.hl */, // ㅚ\n 121 /* AsciiCode.y */, // ㅛ\n 110 /* AsciiCode.n */, // ㅜ\n 27246 /* AsciiCodeCombo.nj */, // ㅝ\n 28782 /* AsciiCodeCombo.np */, // ㅞ\n 27758 /* AsciiCodeCombo.nl */, // ㅟ\n 98 /* AsciiCode.b */, // ㅠ\n 109 /* AsciiCode.m */, // ㅡ\n 27757 /* AsciiCodeCombo.ml */, // ㅢ\n 108 /* AsciiCode.l */, // ㅣ\n // HF: Hangul Filler (everything after this is archaic)\n // ㅥ\n // ㅦ\n // ㅧ\n // ㅨ\n // ㅩ\n // ㅪ\n // ㅫ\n // ㅬ\n // ㅮ\n // ㅯ\n // ㅰ\n // ㅱ\n // ㅲ\n // ㅳ\n // ㅴ\n // ㅵ\n // ㅶ\n // ㅷ\n // ㅸ\n // ㅹ\n // ㅺ\n // ㅻ\n // ㅼ\n // ㅽ\n // ㅾ\n // ㅿ\n // ㆀ\n // ㆁ\n // ㆂ\n // ㆃ\n // ㆄ\n // ㆅ\n // ㆆ\n // ㆇ\n // ㆈ\n // ㆉ\n // ㆊ\n // ㆋ\n // ㆌ\n // ㆍ\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 *--------------------------------------------------------------------------------------------*/\nexport class ArrayNavigator {\n constructor(items, start = 0, end = items.length, index = start - 1) {\n this.items = items;\n this.start = start;\n this.end = end;\n this.index = index;\n }\n current() {\n if (this.index === this.start - 1 || this.index === this.end) {\n return null;\n }\n return this.items[this.index];\n }\n next() {\n this.index = Math.min(this.index + 1, this.end);\n return this.current();\n }\n previous() {\n this.index = Math.max(this.index - 1, this.start - 1);\n return this.current();\n }\n first() {\n this.index = this.start;\n return this.current();\n }\n last() {\n this.index = this.end - 1;\n return this.current();\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 errors from './errors.js';\nimport * as platform from './platform.js';\nimport { equalsIgnoreCase, startsWithIgnoreCase } from './strings.js';\nimport { URI } from './uri.js';\nimport * as paths from './path.js';\nexport var Schemas;\n(function (Schemas) {\n /**\n * A schema that is used for models that exist in memory\n * only and that have no correspondence on a server or such.\n */\n Schemas.inMemory = 'inmemory';\n /**\n * A schema that is used for setting files\n */\n Schemas.vscode = 'vscode';\n /**\n * A schema that is used for internal private files\n */\n Schemas.internal = 'private';\n /**\n * A walk-through document.\n */\n Schemas.walkThrough = 'walkThrough';\n /**\n * An embedded code snippet.\n */\n Schemas.walkThroughSnippet = 'walkThroughSnippet';\n Schemas.http = 'http';\n Schemas.https = 'https';\n Schemas.file = 'file';\n Schemas.mailto = 'mailto';\n Schemas.untitled = 'untitled';\n Schemas.data = 'data';\n Schemas.command = 'command';\n Schemas.vscodeRemote = 'vscode-remote';\n Schemas.vscodeRemoteResource = 'vscode-remote-resource';\n Schemas.vscodeManagedRemoteResource = 'vscode-managed-remote-resource';\n Schemas.vscodeUserData = 'vscode-userdata';\n Schemas.vscodeCustomEditor = 'vscode-custom-editor';\n Schemas.vscodeNotebookCell = 'vscode-notebook-cell';\n Schemas.vscodeNotebookCellMetadata = 'vscode-notebook-cell-metadata';\n Schemas.vscodeNotebookCellOutput = 'vscode-notebook-cell-output';\n Schemas.vscodeInteractiveInput = 'vscode-interactive-input';\n Schemas.vscodeSettings = 'vscode-settings';\n Schemas.vscodeWorkspaceTrust = 'vscode-workspace-trust';\n Schemas.vscodeTerminal = 'vscode-terminal';\n /** Scheme used for code blocks in chat. */\n Schemas.vscodeChatCodeBlock = 'vscode-chat-code-block';\n /**\n * Scheme used for backing documents created by copilot for chat.\n */\n Schemas.vscodeCopilotBackingChatCodeBlock = 'vscode-copilot-chat-code-block';\n /** Scheme used for LHS of code compare (aka diff) blocks in chat. */\n Schemas.vscodeChatCodeCompareBlock = 'vscode-chat-code-compare-block';\n /** Scheme used for the chat input editor. */\n Schemas.vscodeChatSesssion = 'vscode-chat-editor';\n /**\n * Scheme used internally for webviews that aren't linked to a resource (i.e. not custom editors)\n */\n Schemas.webviewPanel = 'webview-panel';\n /**\n * Scheme used for loading the wrapper html and script in webviews.\n */\n Schemas.vscodeWebview = 'vscode-webview';\n /**\n * Scheme used for extension pages\n */\n Schemas.extension = 'extension';\n /**\n * Scheme used as a replacement of `file` scheme to load\n * files with our custom protocol handler (desktop only).\n */\n Schemas.vscodeFileResource = 'vscode-file';\n /**\n * Scheme used for temporary resources\n */\n Schemas.tmp = 'tmp';\n /**\n * Scheme used vs live share\n */\n Schemas.vsls = 'vsls';\n /**\n * Scheme used for the Source Control commit input's text document\n */\n Schemas.vscodeSourceControl = 'vscode-scm';\n /**\n * Scheme used for input box for creating comments.\n */\n Schemas.commentsInput = 'comment';\n /**\n * Scheme used for special rendering of settings in the release notes\n */\n Schemas.codeSetting = 'code-setting';\n})(Schemas || (Schemas = {}));\nexport function matchesScheme(target, scheme) {\n if (URI.isUri(target)) {\n return equalsIgnoreCase(target.scheme, scheme);\n }\n else {\n return startsWithIgnoreCase(target, scheme + ':');\n }\n}\nexport function matchesSomeScheme(target, ...schemes) {\n return schemes.some(scheme => matchesScheme(target, scheme));\n}\nexport const connectionTokenQueryName = 'tkn';\nclass RemoteAuthoritiesImpl {\n constructor() {\n this._hosts = Object.create(null);\n this._ports = Object.create(null);\n this._connectionTokens = Object.create(null);\n this._preferredWebSchema = 'http';\n this._delegate = null;\n this._serverRootPath = '/';\n }\n setPreferredWebSchema(schema) {\n this._preferredWebSchema = schema;\n }\n get _remoteResourcesPath() {\n return paths.posix.join(this._serverRootPath, Schemas.vscodeRemoteResource);\n }\n rewrite(uri) {\n if (this._delegate) {\n try {\n return this._delegate(uri);\n }\n catch (err) {\n errors.onUnexpectedError(err);\n return uri;\n }\n }\n const authority = uri.authority;\n let host = this._hosts[authority];\n if (host && host.indexOf(':') !== -1 && host.indexOf('[') === -1) {\n host = `[${host}]`;\n }\n const port = this._ports[authority];\n const connectionToken = this._connectionTokens[authority];\n let query = `path=${encodeURIComponent(uri.path)}`;\n if (typeof connectionToken === 'string') {\n query += `&${connectionTokenQueryName}=${encodeURIComponent(connectionToken)}`;\n }\n return URI.from({\n scheme: platform.isWeb ? this._preferredWebSchema : Schemas.vscodeRemoteResource,\n authority: `${host}:${port}`,\n path: this._remoteResourcesPath,\n query\n });\n }\n}\nexport const RemoteAuthorities = new RemoteAuthoritiesImpl();\nexport const VSCODE_AUTHORITY = 'vscode-app';\nclass FileAccessImpl {\n /**\n * Returns a URI to use in contexts where the browser is responsible\n * for loading (e.g. fetch()) or when used within the DOM.\n *\n * **Note:** use `dom.ts#asCSSUrl` whenever the URL is to be used in CSS context.\n */\n uriToBrowserUri(uri) {\n // Handle remote URIs via `RemoteAuthorities`\n if (uri.scheme === Schemas.vscodeRemote) {\n return RemoteAuthorities.rewrite(uri);\n }\n // Convert to `vscode-file` resource..\n if (\n // ...only ever for `file` resources\n uri.scheme === Schemas.file &&\n (\n // ...and we run in native environments\n platform.isNative ||\n // ...or web worker extensions on desktop\n (platform.webWorkerOrigin === `${Schemas.vscodeFileResource}://${FileAccessImpl.FALLBACK_AUTHORITY}`))) {\n return uri.with({\n scheme: Schemas.vscodeFileResource,\n // We need to provide an authority here so that it can serve\n // as origin for network and loading matters in chromium.\n // If the URI is not coming with an authority already, we\n // add our own\n authority: uri.authority || FileAccessImpl.FALLBACK_AUTHORITY,\n query: null,\n fragment: null\n });\n }\n return uri;\n }\n}\nFileAccessImpl.FALLBACK_AUTHORITY = VSCODE_AUTHORITY;\nexport const FileAccess = new FileAccessImpl();\nexport var COI;\n(function (COI) {\n const coiHeaders = new Map([\n ['1', { 'Cross-Origin-Opener-Policy': 'same-origin' }],\n ['2', { 'Cross-Origin-Embedder-Policy': 'require-corp' }],\n ['3', { 'Cross-Origin-Opener-Policy': 'same-origin', 'Cross-Origin-Embedder-Policy': 'require-corp' }],\n ]);\n COI.CoopAndCoep = Object.freeze(coiHeaders.get('3'));\n const coiSearchParamName = 'vscode-coi';\n /**\n * Extract desired headers from `vscode-coi` invocation\n */\n function getHeadersFromQuery(url) {\n let params;\n if (typeof url === 'string') {\n params = new URL(url).searchParams;\n }\n else if (url instanceof URL) {\n params = url.searchParams;\n }\n else if (URI.isUri(url)) {\n params = new URL(url.toString(true)).searchParams;\n }\n const value = params === null || params === void 0 ? void 0 : params.get(coiSearchParamName);\n if (!value) {\n return undefined;\n }\n return coiHeaders.get(value);\n }\n COI.getHeadersFromQuery = getHeadersFromQuery;\n /**\n * Add the `vscode-coi` query attribute based on wanting `COOP` and `COEP`. Will be a noop when `crossOriginIsolated`\n * isn't enabled the current context\n */\n function addSearchParam(urlOrSearch, coop, coep) {\n if (!globalThis.crossOriginIsolated) {\n // depends on the current context being COI\n return;\n }\n const value = coop && coep ? '3' : coep ? '2' : '1';\n if (urlOrSearch instanceof URLSearchParams) {\n urlOrSearch.set(coiSearchParamName, value);\n }\n else {\n urlOrSearch[coiSearchParamName] = value;\n }\n }\n COI.addSearchParam = addSearchParam;\n})(COI || (COI = {}));\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 clamp(value, min, max) {\n return Math.min(Math.max(value, min), max);\n}\nexport class MovingAverage {\n constructor() {\n this._n = 1;\n this._val = 0;\n }\n update(value) {\n this._val = this._val + (value - this._val) / this._n;\n this._n += 1;\n return this._val;\n }\n get value() {\n return this._val;\n }\n}\nexport class SlidingWindowAverage {\n constructor(size) {\n this._n = 0;\n this._val = 0;\n this._values = [];\n this._index = 0;\n this._sum = 0;\n this._values = new Array(size);\n this._values.fill(0, 0, size);\n }\n update(value) {\n const oldValue = this._values[this._index];\n this._values[this._index] = value;\n this._index = (this._index + 1) % this._values.length;\n this._sum -= oldValue;\n this._sum += value;\n if (this._n < this._values.length) {\n this._n += 1;\n }\n this._val = this._sum / this._n;\n return this._val;\n }\n get value() {\n return this._val;\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 { isTypedArray, isObject, isUndefinedOrNull } from './types.js';\nexport function deepClone(obj) {\n if (!obj || typeof obj !== 'object') {\n return obj;\n }\n if (obj instanceof RegExp) {\n return obj;\n }\n const result = Array.isArray(obj) ? [] : {};\n Object.entries(obj).forEach(([key, value]) => {\n result[key] = value && typeof value === 'object' ? deepClone(value) : value;\n });\n return result;\n}\nexport function deepFreeze(obj) {\n if (!obj || typeof obj !== 'object') {\n return obj;\n }\n const stack = [obj];\n while (stack.length > 0) {\n const obj = stack.shift();\n Object.freeze(obj);\n for (const key in obj) {\n if (_hasOwnProperty.call(obj, key)) {\n const prop = obj[key];\n if (typeof prop === 'object' && !Object.isFrozen(prop) && !isTypedArray(prop)) {\n stack.push(prop);\n }\n }\n }\n }\n return obj;\n}\nconst _hasOwnProperty = Object.prototype.hasOwnProperty;\nexport function cloneAndChange(obj, changer) {\n return _cloneAndChange(obj, changer, new Set());\n}\nfunction _cloneAndChange(obj, changer, seen) {\n if (isUndefinedOrNull(obj)) {\n return obj;\n }\n const changed = changer(obj);\n if (typeof changed !== 'undefined') {\n return changed;\n }\n if (Array.isArray(obj)) {\n const r1 = [];\n for (const e of obj) {\n r1.push(_cloneAndChange(e, changer, seen));\n }\n return r1;\n }\n if (isObject(obj)) {\n if (seen.has(obj)) {\n throw new Error('Cannot clone recursive data-structure');\n }\n seen.add(obj);\n const r2 = {};\n for (const i2 in obj) {\n if (_hasOwnProperty.call(obj, i2)) {\n r2[i2] = _cloneAndChange(obj[i2], changer, seen);\n }\n }\n seen.delete(obj);\n return r2;\n }\n return obj;\n}\n/**\n * Copies all properties of source into destination. The optional parameter \"overwrite\" allows to control\n * if existing properties on the destination should be overwritten or not. Defaults to true (overwrite).\n */\nexport function mixin(destination, source, overwrite = true) {\n if (!isObject(destination)) {\n return source;\n }\n if (isObject(source)) {\n Object.keys(source).forEach(key => {\n if (key in destination) {\n if (overwrite) {\n if (isObject(destination[key]) && isObject(source[key])) {\n mixin(destination[key], source[key], overwrite);\n }\n else {\n destination[key] = source[key];\n }\n }\n }\n else {\n destination[key] = source[key];\n }\n });\n }\n return destination;\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 let i;\n let 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 const oneKeys = [];\n for (key in one) {\n oneKeys.push(key);\n }\n oneKeys.sort();\n const 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 getAllPropertyNames(obj) {\n let res = [];\n while (Object.prototype !== obj) {\n res = res.concat(Object.getOwnPropertyNames(obj));\n obj = Object.getPrototypeOf(obj);\n }\n return res;\n}\nexport function getAllMethodNames(obj) {\n const methods = [];\n for (const prop of getAllPropertyNames(obj)) {\n if (typeof obj[prop] === 'function') {\n methods.push(prop);\n }\n }\n return methods;\n}\nexport function createProxyObject(methodNames, invoke) {\n const createProxyMethod = (method) => {\n return function () {\n const args = Array.prototype.slice.call(arguments, 0);\n return invoke(method, args);\n };\n };\n const result = {};\n for (const methodName of methodNames) {\n result[methodName] = createProxyMethod(methodName);\n }\n return result;\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 { assertFn } from '../assert.js';\nimport { DisposableStore, markAsDisposed, toDisposable, trackDisposable } from '../lifecycle.js';\nimport { DebugNameData } from './debugName.js';\nimport { getLogger } from './logging.js';\n/**\n * Runs immediately and whenever a transaction ends and an observed observable changed.\n * {@link fn} should start with a JS Doc using `@description` to name the autorun.\n */\nexport function autorun(fn) {\n return new AutorunObserver(new DebugNameData(undefined, undefined, fn), fn, undefined, undefined);\n}\n/**\n * Runs immediately and whenever a transaction ends and an observed observable changed.\n * {@link fn} should start with a JS Doc using `@description` to name the autorun.\n */\nexport function autorunOpts(options, fn) {\n var _a;\n return new AutorunObserver(new DebugNameData(options.owner, options.debugName, (_a = options.debugReferenceFn) !== null && _a !== void 0 ? _a : fn), fn, undefined, undefined);\n}\n/**\n * Runs immediately and whenever a transaction ends and an observed observable changed.\n * {@link fn} should start with a JS Doc using `@description` to name the autorun.\n *\n * Use `createEmptyChangeSummary` to create a \"change summary\" that can collect the changes.\n * Use `handleChange` to add a reported change to the change summary.\n * The run function is given the last change summary.\n * The change summary is discarded after the run function was called.\n *\n * @see autorun\n */\nexport function autorunHandleChanges(options, fn) {\n var _a;\n return new AutorunObserver(new DebugNameData(options.owner, options.debugName, (_a = options.debugReferenceFn) !== null && _a !== void 0 ? _a : fn), fn, options.createEmptyChangeSummary, options.handleChange);\n}\n/**\n * @see autorun (but with a disposable store that is cleared before the next run or on dispose)\n */\nexport function autorunWithStore(fn) {\n const store = new DisposableStore();\n const disposable = autorunOpts({\n owner: undefined,\n debugName: undefined,\n debugReferenceFn: fn,\n }, reader => {\n store.clear();\n fn(reader, store);\n });\n return toDisposable(() => {\n disposable.dispose();\n store.dispose();\n });\n}\nexport class AutorunObserver {\n get debugName() {\n var _a;\n return (_a = this._debugNameData.getDebugName(this)) !== null && _a !== void 0 ? _a : '(anonymous)';\n }\n constructor(_debugNameData, _runFn, createChangeSummary, _handleChange) {\n var _a, _b;\n this._debugNameData = _debugNameData;\n this._runFn = _runFn;\n this.createChangeSummary = createChangeSummary;\n this._handleChange = _handleChange;\n this.state = 2 /* AutorunState.stale */;\n this.updateCount = 0;\n this.disposed = false;\n this.dependencies = new Set();\n this.dependenciesToBeRemoved = new Set();\n this.changeSummary = (_a = this.createChangeSummary) === null || _a === void 0 ? void 0 : _a.call(this);\n (_b = getLogger()) === null || _b === void 0 ? void 0 : _b.handleAutorunCreated(this);\n this._runIfNeeded();\n trackDisposable(this);\n }\n dispose() {\n this.disposed = true;\n for (const o of this.dependencies) {\n o.removeObserver(this);\n }\n this.dependencies.clear();\n markAsDisposed(this);\n }\n _runIfNeeded() {\n var _a, _b, _c;\n if (this.state === 3 /* AutorunState.upToDate */) {\n return;\n }\n const emptySet = this.dependenciesToBeRemoved;\n this.dependenciesToBeRemoved = this.dependencies;\n this.dependencies = emptySet;\n this.state = 3 /* AutorunState.upToDate */;\n const isDisposed = this.disposed;\n try {\n if (!isDisposed) {\n (_a = getLogger()) === null || _a === void 0 ? void 0 : _a.handleAutorunTriggered(this);\n const changeSummary = this.changeSummary;\n this.changeSummary = (_b = this.createChangeSummary) === null || _b === void 0 ? void 0 : _b.call(this);\n this._runFn(this, changeSummary);\n }\n }\n finally {\n if (!isDisposed) {\n (_c = getLogger()) === null || _c === void 0 ? void 0 : _c.handleAutorunFinished(this);\n }\n // We don't want our observed observables to think that they are (not even temporarily) not being observed.\n // Thus, we only unsubscribe from observables that are definitely not read anymore.\n for (const o of this.dependenciesToBeRemoved) {\n o.removeObserver(this);\n }\n this.dependenciesToBeRemoved.clear();\n }\n }\n toString() {\n return `Autorun<${this.debugName}>`;\n }\n // IObserver implementation\n beginUpdate() {\n if (this.state === 3 /* AutorunState.upToDate */) {\n this.state = 1 /* AutorunState.dependenciesMightHaveChanged */;\n }\n this.updateCount++;\n }\n endUpdate() {\n if (this.updateCount === 1) {\n do {\n if (this.state === 1 /* AutorunState.dependenciesMightHaveChanged */) {\n this.state = 3 /* AutorunState.upToDate */;\n for (const d of this.dependencies) {\n d.reportChanges();\n if (this.state === 2 /* AutorunState.stale */) {\n // The other dependencies will refresh on demand\n break;\n }\n }\n }\n this._runIfNeeded();\n } while (this.state !== 3 /* AutorunState.upToDate */);\n }\n this.updateCount--;\n assertFn(() => this.updateCount >= 0);\n }\n handlePossibleChange(observable) {\n if (this.state === 3 /* AutorunState.upToDate */ && this.dependencies.has(observable) && !this.dependenciesToBeRemoved.has(observable)) {\n this.state = 1 /* AutorunState.dependenciesMightHaveChanged */;\n }\n }\n handleChange(observable, change) {\n if (this.dependencies.has(observable) && !this.dependenciesToBeRemoved.has(observable)) {\n const shouldReact = this._handleChange ? this._handleChange({\n changedObservable: observable,\n change,\n didChange: (o) => o === observable,\n }, this.changeSummary) : true;\n if (shouldReact) {\n this.state = 2 /* AutorunState.stale */;\n }\n }\n }\n // IReader implementation\n readObservable(observable) {\n // In case the run action disposes the autorun\n if (this.disposed) {\n return observable.get();\n }\n observable.addObserver(this);\n const value = observable.get();\n this.dependencies.add(observable);\n this.dependenciesToBeRemoved.delete(observable);\n return value;\n }\n}\n(function (autorun) {\n autorun.Observer = AutorunObserver;\n})(autorun || (autorun = {}));\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 { autorun } from './autorun.js';\nimport { CancellationError } from '../errors.js';\nexport function waitForState(observable, predicate, isError, cancellationToken) {\n if (!predicate) {\n predicate = state => state !== null && state !== undefined;\n }\n return new Promise((resolve, reject) => {\n let isImmediateRun = true;\n let shouldDispose = false;\n const stateObs = observable.map(state => {\n /** @description waitForState.state */\n return {\n isFinished: predicate(state),\n error: isError ? isError(state) : false,\n state\n };\n });\n const d = autorun(reader => {\n /** @description waitForState */\n const { isFinished, error, state } = stateObs.read(reader);\n if (isFinished || error) {\n if (isImmediateRun) {\n // The variable `d` is not initialized yet\n shouldDispose = true;\n }\n else {\n d.dispose();\n }\n if (error) {\n reject(error === true ? state : error);\n }\n else {\n resolve(state);\n }\n }\n });\n if (cancellationToken) {\n const dc = cancellationToken.onCancellationRequested(() => {\n d.dispose();\n dc.dispose();\n reject(new CancellationError());\n });\n if (cancellationToken.isCancellationRequested) {\n d.dispose();\n dc.dispose();\n reject(new CancellationError());\n return;\n }\n }\n isImmediateRun = false;\n if (shouldDispose) {\n d.dispose();\n }\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 { strictEquals } from '../equals.js';\nimport { DebugNameData, getFunctionName } from './debugName.js';\nimport { getLogger } from './logging.js';\nlet _recomputeInitiallyAndOnChange;\nexport function _setRecomputeInitiallyAndOnChange(recomputeInitiallyAndOnChange) {\n _recomputeInitiallyAndOnChange = recomputeInitiallyAndOnChange;\n}\nlet _keepObserved;\nexport function _setKeepObserved(keepObserved) {\n _keepObserved = keepObserved;\n}\nlet _derived;\n/**\n * @internal\n * This is to allow splitting files.\n*/\nexport function _setDerivedOpts(derived) {\n _derived = derived;\n}\nexport class ConvenientObservable {\n get TChange() { return null; }\n reportChanges() {\n this.get();\n }\n /** @sealed */\n read(reader) {\n if (reader) {\n return reader.readObservable(this);\n }\n else {\n return this.get();\n }\n }\n map(fnOrOwner, fnOrUndefined) {\n const owner = fnOrUndefined === undefined ? undefined : fnOrOwner;\n const fn = fnOrUndefined === undefined ? fnOrOwner : fnOrUndefined;\n return _derived({\n owner,\n debugName: () => {\n const name = getFunctionName(fn);\n if (name !== undefined) {\n return name;\n }\n // regexp to match `x => x.y` or `x => x?.y` where x and y can be arbitrary identifiers (uses backref):\n const regexp = /^\\s*\\(?\\s*([a-zA-Z_$][a-zA-Z_$0-9]*)\\s*\\)?\\s*=>\\s*\\1(?:\\??)\\.([a-zA-Z_$][a-zA-Z_$0-9]*)\\s*$/;\n const match = regexp.exec(fn.toString());\n if (match) {\n return `${this.debugName}.${match[2]}`;\n }\n if (!owner) {\n return `${this.debugName} (mapped)`;\n }\n return undefined;\n },\n debugReferenceFn: fn,\n }, (reader) => fn(this.read(reader), reader));\n }\n recomputeInitiallyAndOnChange(store, handleValue) {\n store.add(_recomputeInitiallyAndOnChange(this, handleValue));\n return this;\n }\n}\nexport class BaseObservable extends ConvenientObservable {\n constructor() {\n super(...arguments);\n this.observers = new Set();\n }\n addObserver(observer) {\n const len = this.observers.size;\n this.observers.add(observer);\n if (len === 0) {\n this.onFirstObserverAdded();\n }\n }\n removeObserver(observer) {\n const deleted = this.observers.delete(observer);\n if (deleted && this.observers.size === 0) {\n this.onLastObserverRemoved();\n }\n }\n onFirstObserverAdded() { }\n onLastObserverRemoved() { }\n}\n/**\n * Starts a transaction in which many observables can be changed at once.\n * {@link fn} should start with a JS Doc using `@description` to give the transaction a debug name.\n * Reaction run on demand or when the transaction ends.\n */\nexport function transaction(fn, getDebugName) {\n const tx = new TransactionImpl(fn, getDebugName);\n try {\n fn(tx);\n }\n finally {\n tx.finish();\n }\n}\nlet _globalTransaction = undefined;\nexport function globalTransaction(fn) {\n if (_globalTransaction) {\n fn(_globalTransaction);\n }\n else {\n const tx = new TransactionImpl(fn, undefined);\n _globalTransaction = tx;\n try {\n fn(tx);\n }\n finally {\n tx.finish(); // During finish, more actions might be added to the transaction.\n // Which is why we only clear the global transaction after finish.\n _globalTransaction = undefined;\n }\n }\n}\nexport async function asyncTransaction(fn, getDebugName) {\n const tx = new TransactionImpl(fn, getDebugName);\n try {\n await fn(tx);\n }\n finally {\n tx.finish();\n }\n}\n/**\n * Allows to chain transactions.\n */\nexport function subtransaction(tx, fn, getDebugName) {\n if (!tx) {\n transaction(fn, getDebugName);\n }\n else {\n fn(tx);\n }\n}\nexport class TransactionImpl {\n constructor(_fn, _getDebugName) {\n var _a;\n this._fn = _fn;\n this._getDebugName = _getDebugName;\n this.updatingObservers = [];\n (_a = getLogger()) === null || _a === void 0 ? void 0 : _a.handleBeginTransaction(this);\n }\n getDebugName() {\n if (this._getDebugName) {\n return this._getDebugName();\n }\n return getFunctionName(this._fn);\n }\n updateObserver(observer, observable) {\n // When this gets called while finish is active, they will still get considered\n this.updatingObservers.push({ observer, observable });\n observer.beginUpdate(observable);\n }\n finish() {\n var _a;\n const updatingObservers = this.updatingObservers;\n for (let i = 0; i < updatingObservers.length; i++) {\n const { observer, observable } = updatingObservers[i];\n observer.endUpdate(observable);\n }\n // Prevent anyone from updating observers from now on.\n this.updatingObservers = null;\n (_a = getLogger()) === null || _a === void 0 ? void 0 : _a.handleEndTransaction();\n }\n}\nexport function observableValue(nameOrOwner, initialValue) {\n let debugNameData;\n if (typeof nameOrOwner === 'string') {\n debugNameData = new DebugNameData(undefined, nameOrOwner, undefined);\n }\n else {\n debugNameData = new DebugNameData(nameOrOwner, undefined, undefined);\n }\n return new ObservableValue(debugNameData, initialValue, strictEquals);\n}\nexport function observableValueOpts(options, initialValue) {\n var _a;\n return new ObservableValue(new DebugNameData(options.owner, options.debugName, undefined), initialValue, (_a = options.equalsFn) !== null && _a !== void 0 ? _a : strictEquals);\n}\nexport class ObservableValue extends BaseObservable {\n get debugName() {\n var _a;\n return (_a = this._debugNameData.getDebugName(this)) !== null && _a !== void 0 ? _a : 'ObservableValue';\n }\n constructor(_debugNameData, initialValue, _equalityComparator) {\n super();\n this._debugNameData = _debugNameData;\n this._equalityComparator = _equalityComparator;\n this._value = initialValue;\n }\n get() {\n return this._value;\n }\n set(value, tx, change) {\n var _a;\n if (change === undefined && this._equalityComparator(this._value, value)) {\n return;\n }\n let _tx;\n if (!tx) {\n tx = _tx = new TransactionImpl(() => { }, () => `Setting ${this.debugName}`);\n }\n try {\n const oldValue = this._value;\n this._setValue(value);\n (_a = getLogger()) === null || _a === void 0 ? void 0 : _a.handleObservableChanged(this, { oldValue, newValue: value, change, didChange: true, hadValue: true });\n for (const observer of this.observers) {\n tx.updateObserver(observer, this);\n observer.handleChange(this, change);\n }\n }\n finally {\n if (_tx) {\n _tx.finish();\n }\n }\n }\n toString() {\n return `${this.debugName}: ${this._value}`;\n }\n _setValue(newValue) {\n this._value = newValue;\n }\n}\n/**\n * A disposable observable. When disposed, its value is also disposed.\n * When a new value is set, the previous value is disposed.\n */\nexport function disposableObservableValue(nameOrOwner, initialValue) {\n let debugNameData;\n if (typeof nameOrOwner === 'string') {\n debugNameData = new DebugNameData(undefined, nameOrOwner, undefined);\n }\n else {\n debugNameData = new DebugNameData(nameOrOwner, undefined, undefined);\n }\n return new DisposableObservableValue(debugNameData, initialValue, strictEquals);\n}\nexport class DisposableObservableValue extends ObservableValue {\n _setValue(newValue) {\n if (this._value === newValue) {\n return;\n }\n if (this._value) {\n this._value.dispose();\n }\n this._value = newValue;\n }\n dispose() {\n var _a;\n (_a = this._value) === null || _a === void 0 ? void 0 : _a.dispose();\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 *--------------------------------------------------------------------------------------------*/\nexport class DebugNameData {\n constructor(owner, debugNameSource, referenceFn) {\n this.owner = owner;\n this.debugNameSource = debugNameSource;\n this.referenceFn = referenceFn;\n }\n getDebugName(target) {\n return getDebugName(target, this);\n }\n}\nconst countPerName = new Map();\nconst cachedDebugName = new WeakMap();\nexport function getDebugName(target, data) {\n var _a;\n const cached = cachedDebugName.get(target);\n if (cached) {\n return cached;\n }\n const dbgName = computeDebugName(target, data);\n if (dbgName) {\n let count = (_a = countPerName.get(dbgName)) !== null && _a !== void 0 ? _a : 0;\n count++;\n countPerName.set(dbgName, count);\n const result = count === 1 ? dbgName : `${dbgName}#${count}`;\n cachedDebugName.set(target, result);\n return result;\n }\n return undefined;\n}\nfunction computeDebugName(self, data) {\n const cached = cachedDebugName.get(self);\n if (cached) {\n return cached;\n }\n const ownerStr = data.owner ? formatOwner(data.owner) + `.` : '';\n let result;\n const debugNameSource = data.debugNameSource;\n if (debugNameSource !== undefined) {\n if (typeof debugNameSource === 'function') {\n result = debugNameSource();\n if (result !== undefined) {\n return ownerStr + result;\n }\n }\n else {\n return ownerStr + debugNameSource;\n }\n }\n const referenceFn = data.referenceFn;\n if (referenceFn !== undefined) {\n result = getFunctionName(referenceFn);\n if (result !== undefined) {\n return ownerStr + result;\n }\n }\n if (data.owner !== undefined) {\n const key = findKey(data.owner, self);\n if (key !== undefined) {\n return ownerStr + key;\n }\n }\n return undefined;\n}\nfunction findKey(obj, value) {\n for (const key in obj) {\n if (obj[key] === value) {\n return key;\n }\n }\n return undefined;\n}\nconst countPerClassName = new Map();\nconst ownerId = new WeakMap();\nfunction formatOwner(owner) {\n var _a;\n const id = ownerId.get(owner);\n if (id) {\n return id;\n }\n const className = getClassName(owner);\n let count = (_a = countPerClassName.get(className)) !== null && _a !== void 0 ? _a : 0;\n count++;\n countPerClassName.set(className, count);\n const result = count === 1 ? className : `${className}#${count}`;\n ownerId.set(owner, result);\n return result;\n}\nfunction getClassName(obj) {\n const ctor = obj.constructor;\n if (ctor) {\n return ctor.name;\n }\n return 'Object';\n}\nexport function getFunctionName(fn) {\n const fnSrc = fn.toString();\n // Pattern: /** @description ... */\n const regexp = /\\/\\*\\*\\s*@description\\s*([^*]*)\\*\\//;\n const match = regexp.exec(fnSrc);\n const result = match ? match[1] : undefined;\n return result === null || result === void 0 ? void 0 : result.trim();\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 { assertFn } from '../assert.js';\nimport { strictEquals } from '../equals.js';\nimport { DisposableStore } from '../lifecycle.js';\nimport { BaseObservable, _setDerivedOpts } from './base.js';\nimport { DebugNameData } from './debugName.js';\nimport { getLogger } from './logging.js';\nexport function derived(computeFnOrOwner, computeFn) {\n if (computeFn !== undefined) {\n return new Derived(new DebugNameData(computeFnOrOwner, undefined, computeFn), computeFn, undefined, undefined, undefined, strictEquals);\n }\n return new Derived(new DebugNameData(undefined, undefined, computeFnOrOwner), computeFnOrOwner, undefined, undefined, undefined, strictEquals);\n}\nexport function derivedWithSetter(owner, computeFn, setter) {\n return new DerivedWithSetter(new DebugNameData(owner, undefined, computeFn), computeFn, undefined, undefined, undefined, strictEquals, setter);\n}\nexport function derivedOpts(options, computeFn) {\n var _a;\n return new Derived(new DebugNameData(options.owner, options.debugName, options.debugReferenceFn), computeFn, undefined, undefined, options.onLastObserverRemoved, (_a = options.equalsFn) !== null && _a !== void 0 ? _a : strictEquals);\n}\n_setDerivedOpts(derivedOpts);\n/**\n * Represents an observable that is derived from other observables.\n * The value is only recomputed when absolutely needed.\n *\n * {@link computeFn} should start with a JS Doc using `@description` to name the derived.\n *\n * Use `createEmptyChangeSummary` to create a \"change summary\" that can collect the changes.\n * Use `handleChange` to add a reported change to the change summary.\n * The compute function is given the last change summary.\n * The change summary is discarded after the compute function was called.\n *\n * @see derived\n */\nexport function derivedHandleChanges(options, computeFn) {\n var _a;\n return new Derived(new DebugNameData(options.owner, options.debugName, undefined), computeFn, options.createEmptyChangeSummary, options.handleChange, undefined, (_a = options.equalityComparer) !== null && _a !== void 0 ? _a : strictEquals);\n}\nexport function derivedWithStore(computeFnOrOwner, computeFnOrUndefined) {\n let computeFn;\n let owner;\n if (computeFnOrUndefined === undefined) {\n computeFn = computeFnOrOwner;\n owner = undefined;\n }\n else {\n owner = computeFnOrOwner;\n computeFn = computeFnOrUndefined;\n }\n const store = new DisposableStore();\n return new Derived(new DebugNameData(owner, undefined, computeFn), r => {\n store.clear();\n return computeFn(r, store);\n }, undefined, undefined, () => store.dispose(), strictEquals);\n}\nexport function derivedDisposable(computeFnOrOwner, computeFnOrUndefined) {\n let computeFn;\n let owner;\n if (computeFnOrUndefined === undefined) {\n computeFn = computeFnOrOwner;\n owner = undefined;\n }\n else {\n owner = computeFnOrOwner;\n computeFn = computeFnOrUndefined;\n }\n const store = new DisposableStore();\n return new Derived(new DebugNameData(owner, undefined, computeFn), r => {\n store.clear();\n const result = computeFn(r);\n if (result) {\n store.add(result);\n }\n return result;\n }, undefined, undefined, () => store.dispose(), strictEquals);\n}\nexport class Derived extends BaseObservable {\n get debugName() {\n var _a;\n return (_a = this._debugNameData.getDebugName(this)) !== null && _a !== void 0 ? _a : '(anonymous)';\n }\n constructor(_debugNameData, _computeFn, createChangeSummary, _handleChange, _handleLastObserverRemoved = undefined, _equalityComparator) {\n var _a, _b;\n super();\n this._debugNameData = _debugNameData;\n this._computeFn = _computeFn;\n this.createChangeSummary = createChangeSummary;\n this._handleChange = _handleChange;\n this._handleLastObserverRemoved = _handleLastObserverRemoved;\n this._equalityComparator = _equalityComparator;\n this.state = 0 /* DerivedState.initial */;\n this.value = undefined;\n this.updateCount = 0;\n this.dependencies = new Set();\n this.dependenciesToBeRemoved = new Set();\n this.changeSummary = undefined;\n this.changeSummary = (_a = this.createChangeSummary) === null || _a === void 0 ? void 0 : _a.call(this);\n (_b = getLogger()) === null || _b === void 0 ? void 0 : _b.handleDerivedCreated(this);\n }\n onLastObserverRemoved() {\n var _a;\n /**\n * We are not tracking changes anymore, thus we have to assume\n * that our cache is invalid.\n */\n this.state = 0 /* DerivedState.initial */;\n this.value = undefined;\n for (const d of this.dependencies) {\n d.removeObserver(this);\n }\n this.dependencies.clear();\n (_a = this._handleLastObserverRemoved) === null || _a === void 0 ? void 0 : _a.call(this);\n }\n get() {\n var _a;\n if (this.observers.size === 0) {\n // Without observers, we don't know when to clean up stuff.\n // Thus, we don't cache anything to prevent memory leaks.\n const result = this._computeFn(this, (_a = this.createChangeSummary) === null || _a === void 0 ? void 0 : _a.call(this));\n // Clear new dependencies\n this.onLastObserverRemoved();\n return result;\n }\n else {\n do {\n // We might not get a notification for a dependency that changed while it is updating,\n // thus we also have to ask all our depedencies if they changed in this case.\n if (this.state === 1 /* DerivedState.dependenciesMightHaveChanged */) {\n for (const d of this.dependencies) {\n /** might call {@link handleChange} indirectly, which could make us stale */\n d.reportChanges();\n if (this.state === 2 /* DerivedState.stale */) {\n // The other dependencies will refresh on demand, so early break\n break;\n }\n }\n }\n // We called report changes of all dependencies.\n // If we are still not stale, we can assume to be up to date again.\n if (this.state === 1 /* DerivedState.dependenciesMightHaveChanged */) {\n this.state = 3 /* DerivedState.upToDate */;\n }\n this._recomputeIfNeeded();\n // In case recomputation changed one of our dependencies, we need to recompute again.\n } while (this.state !== 3 /* DerivedState.upToDate */);\n return this.value;\n }\n }\n _recomputeIfNeeded() {\n var _a, _b;\n if (this.state === 3 /* DerivedState.upToDate */) {\n return;\n }\n const emptySet = this.dependenciesToBeRemoved;\n this.dependenciesToBeRemoved = this.dependencies;\n this.dependencies = emptySet;\n const hadValue = this.state !== 0 /* DerivedState.initial */;\n const oldValue = this.value;\n this.state = 3 /* DerivedState.upToDate */;\n const changeSummary = this.changeSummary;\n this.changeSummary = (_a = this.createChangeSummary) === null || _a === void 0 ? void 0 : _a.call(this);\n try {\n /** might call {@link handleChange} indirectly, which could invalidate us */\n this.value = this._computeFn(this, changeSummary);\n }\n finally {\n // We don't want our observed observables to think that they are (not even temporarily) not being observed.\n // Thus, we only unsubscribe from observables that are definitely not read anymore.\n for (const o of this.dependenciesToBeRemoved) {\n o.removeObserver(this);\n }\n this.dependenciesToBeRemoved.clear();\n }\n const didChange = hadValue && !(this._equalityComparator(oldValue, this.value));\n (_b = getLogger()) === null || _b === void 0 ? void 0 : _b.handleDerivedRecomputed(this, {\n oldValue,\n newValue: this.value,\n change: undefined,\n didChange,\n hadValue,\n });\n if (didChange) {\n for (const r of this.observers) {\n r.handleChange(this, undefined);\n }\n }\n }\n toString() {\n return `LazyDerived<${this.debugName}>`;\n }\n // IObserver Implementation\n beginUpdate(_observable) {\n this.updateCount++;\n const propagateBeginUpdate = this.updateCount === 1;\n if (this.state === 3 /* DerivedState.upToDate */) {\n this.state = 1 /* DerivedState.dependenciesMightHaveChanged */;\n // If we propagate begin update, that will already signal a possible change.\n if (!propagateBeginUpdate) {\n for (const r of this.observers) {\n r.handlePossibleChange(this);\n }\n }\n }\n if (propagateBeginUpdate) {\n for (const r of this.observers) {\n r.beginUpdate(this); // This signals a possible change\n }\n }\n }\n endUpdate(_observable) {\n this.updateCount--;\n if (this.updateCount === 0) {\n // End update could change the observer list.\n const observers = [...this.observers];\n for (const r of observers) {\n r.endUpdate(this);\n }\n }\n assertFn(() => this.updateCount >= 0);\n }\n handlePossibleChange(observable) {\n // In all other states, observers already know that we might have changed.\n if (this.state === 3 /* DerivedState.upToDate */ && this.dependencies.has(observable) && !this.dependenciesToBeRemoved.has(observable)) {\n this.state = 1 /* DerivedState.dependenciesMightHaveChanged */;\n for (const r of this.observers) {\n r.handlePossibleChange(this);\n }\n }\n }\n handleChange(observable, change) {\n if (this.dependencies.has(observable) && !this.dependenciesToBeRemoved.has(observable)) {\n const shouldReact = this._handleChange ? this._handleChange({\n changedObservable: observable,\n change,\n didChange: (o) => o === observable,\n }, this.changeSummary) : true;\n const wasUpToDate = this.state === 3 /* DerivedState.upToDate */;\n if (shouldReact && (this.state === 1 /* DerivedState.dependenciesMightHaveChanged */ || wasUpToDate)) {\n this.state = 2 /* DerivedState.stale */;\n if (wasUpToDate) {\n for (const r of this.observers) {\n r.handlePossibleChange(this);\n }\n }\n }\n }\n }\n // IReader Implementation\n readObservable(observable) {\n // Subscribe before getting the value to enable caching\n observable.addObserver(this);\n /** This might call {@link handleChange} indirectly, which could invalidate us */\n const value = observable.get();\n // Which is why we only add the observable to the dependencies now.\n this.dependencies.add(observable);\n this.dependenciesToBeRemoved.delete(observable);\n return value;\n }\n addObserver(observer) {\n const shouldCallBeginUpdate = !this.observers.has(observer) && this.updateCount > 0;\n super.addObserver(observer);\n if (shouldCallBeginUpdate) {\n observer.beginUpdate(this);\n }\n }\n removeObserver(observer) {\n const shouldCallEndUpdate = this.observers.has(observer) && this.updateCount > 0;\n super.removeObserver(observer);\n if (shouldCallEndUpdate) {\n // Calling end update after removing the observer makes sure endUpdate cannot be called twice here.\n observer.endUpdate(this);\n }\n }\n}\nexport class DerivedWithSetter extends Derived {\n constructor(debugNameData, computeFn, createChangeSummary, handleChange, handleLastObserverRemoved = undefined, equalityComparator, set) {\n super(debugNameData, computeFn, createChangeSummary, handleChange, handleLastObserverRemoved, equalityComparator);\n this.set = set;\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 *--------------------------------------------------------------------------------------------*/\nlet globalObservableLogger;\nexport function setLogger(logger) {\n globalObservableLogger = logger;\n}\nexport function getLogger() {\n return globalObservableLogger;\n}\nexport class ConsoleObservableLogger {\n constructor() {\n this.indentation = 0;\n this.changedObservablesSets = new WeakMap();\n }\n textToConsoleArgs(text) {\n return consoleTextToArgs([\n normalText(repeat('| ', this.indentation)),\n text,\n ]);\n }\n formatInfo(info) {\n if (!info.hadValue) {\n return [\n normalText(` `),\n styled(formatValue(info.newValue, 60), {\n color: 'green',\n }),\n normalText(` (initial)`),\n ];\n }\n return info.didChange\n ? [\n normalText(` `),\n styled(formatValue(info.oldValue, 70), {\n color: 'red',\n strikeThrough: true,\n }),\n normalText(` `),\n styled(formatValue(info.newValue, 60), {\n color: 'green',\n }),\n ]\n : [normalText(` (unchanged)`)];\n }\n handleObservableChanged(observable, info) {\n console.log(...this.textToConsoleArgs([\n formatKind('observable value changed'),\n styled(observable.debugName, { color: 'BlueViolet' }),\n ...this.formatInfo(info),\n ]));\n }\n formatChanges(changes) {\n if (changes.size === 0) {\n return undefined;\n }\n return styled(' (changed deps: ' +\n [...changes].map((o) => o.debugName).join(', ') +\n ')', { color: 'gray' });\n }\n handleDerivedCreated(derived) {\n const existingHandleChange = derived.handleChange;\n this.changedObservablesSets.set(derived, new Set());\n derived.handleChange = (observable, change) => {\n this.changedObservablesSets.get(derived).add(observable);\n return existingHandleChange.apply(derived, [observable, change]);\n };\n }\n handleDerivedRecomputed(derived, info) {\n const changedObservables = this.changedObservablesSets.get(derived);\n console.log(...this.textToConsoleArgs([\n formatKind('derived recomputed'),\n styled(derived.debugName, { color: 'BlueViolet' }),\n ...this.formatInfo(info),\n this.formatChanges(changedObservables),\n { data: [{ fn: derived._computeFn }] }\n ]));\n changedObservables.clear();\n }\n handleFromEventObservableTriggered(observable, info) {\n console.log(...this.textToConsoleArgs([\n formatKind('observable from event triggered'),\n styled(observable.debugName, { color: 'BlueViolet' }),\n ...this.formatInfo(info),\n { data: [{ fn: observable._getValue }] }\n ]));\n }\n handleAutorunCreated(autorun) {\n const existingHandleChange = autorun.handleChange;\n this.changedObservablesSets.set(autorun, new Set());\n autorun.handleChange = (observable, change) => {\n this.changedObservablesSets.get(autorun).add(observable);\n return existingHandleChange.apply(autorun, [observable, change]);\n };\n }\n handleAutorunTriggered(autorun) {\n const changedObservables = this.changedObservablesSets.get(autorun);\n console.log(...this.textToConsoleArgs([\n formatKind('autorun'),\n styled(autorun.debugName, { color: 'BlueViolet' }),\n this.formatChanges(changedObservables),\n { data: [{ fn: autorun._runFn }] }\n ]));\n changedObservables.clear();\n this.indentation++;\n }\n handleAutorunFinished(autorun) {\n this.indentation--;\n }\n handleBeginTransaction(transaction) {\n let transactionName = transaction.getDebugName();\n if (transactionName === undefined) {\n transactionName = '';\n }\n console.log(...this.textToConsoleArgs([\n formatKind('transaction'),\n styled(transactionName, { color: 'BlueViolet' }),\n { data: [{ fn: transaction._fn }] }\n ]));\n this.indentation++;\n }\n handleEndTransaction() {\n this.indentation--;\n }\n}\nfunction consoleTextToArgs(text) {\n const styles = new Array();\n const data = [];\n let firstArg = '';\n function process(t) {\n if ('length' in t) {\n for (const item of t) {\n if (item) {\n process(item);\n }\n }\n }\n else if ('text' in t) {\n firstArg += `%c${t.text}`;\n styles.push(t.style);\n if (t.data) {\n data.push(...t.data);\n }\n }\n else if ('data' in t) {\n data.push(...t.data);\n }\n }\n process(text);\n const result = [firstArg, ...styles];\n result.push(...data);\n return result;\n}\nfunction normalText(text) {\n return styled(text, { color: 'black' });\n}\nfunction formatKind(kind) {\n return styled(padStr(`${kind}: `, 10), { color: 'black', bold: true });\n}\nfunction styled(text, options = {\n color: 'black',\n}) {\n function objToCss(styleObj) {\n return Object.entries(styleObj).reduce((styleString, [propName, propValue]) => {\n return `${styleString}${propName}:${propValue};`;\n }, '');\n }\n const style = {\n color: options.color,\n };\n if (options.strikeThrough) {\n style['text-decoration'] = 'line-through';\n }\n if (options.bold) {\n style['font-weight'] = 'bold';\n }\n return {\n text,\n style: objToCss(style),\n };\n}\nfunction formatValue(value, availableLen) {\n switch (typeof value) {\n case 'number':\n return '' + value;\n case 'string':\n if (value.length + 2 <= availableLen) {\n return `\"${value}\"`;\n }\n return `\"${value.substr(0, availableLen - 7)}\"+...`;\n case 'boolean':\n return value ? 'true' : 'false';\n case 'undefined':\n return 'undefined';\n case 'object':\n if (value === null) {\n return 'null';\n }\n if (Array.isArray(value)) {\n return formatArray(value, availableLen);\n }\n return formatObject(value, availableLen);\n case 'symbol':\n return value.toString();\n case 'function':\n return `[[Function${value.name ? ' ' + value.name : ''}]]`;\n default:\n return '' + value;\n }\n}\nfunction formatArray(value, availableLen) {\n let result = '[ ';\n let first = true;\n for (const val of value) {\n if (!first) {\n result += ', ';\n }\n if (result.length - 5 > availableLen) {\n result += '...';\n break;\n }\n first = false;\n result += `${formatValue(val, availableLen - result.length)}`;\n }\n result += ' ]';\n return result;\n}\nfunction formatObject(value, availableLen) {\n let result = '{ ';\n let first = true;\n for (const [key, val] of Object.entries(value)) {\n if (!first) {\n result += ', ';\n }\n if (result.length - 5 > availableLen) {\n result += '...';\n break;\n }\n first = false;\n result += `${key}: ${formatValue(val, availableLen - result.length)}`;\n }\n result += ' }';\n return result;\n}\nfunction repeat(str, count) {\n let result = '';\n for (let i = 1; i <= count; i++) {\n result += str;\n }\n return result;\n}\nfunction padStr(str, length) {\n while (str.length < length) {\n str += ' ';\n }\n return str;\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 { Event } from '../event.js';\nimport { DisposableStore, toDisposable } from '../lifecycle.js';\nimport { BaseObservable, ConvenientObservable, _setKeepObserved, _setRecomputeInitiallyAndOnChange, subtransaction, transaction } from './base.js';\nimport { DebugNameData, getFunctionName } from './debugName.js';\nimport { derived, derivedOpts } from './derived.js';\nimport { getLogger } from './logging.js';\n/**\n * Represents an efficient observable whose value never changes.\n */\nexport function constObservable(value) {\n return new ConstObservable(value);\n}\nclass ConstObservable extends ConvenientObservable {\n constructor(value) {\n super();\n this.value = value;\n }\n get debugName() {\n return this.toString();\n }\n get() {\n return this.value;\n }\n addObserver(observer) {\n // NO OP\n }\n removeObserver(observer) {\n // NO OP\n }\n toString() {\n return `Const: ${this.value}`;\n }\n}\nexport function observableFromEvent(event, getValue) {\n return new FromEventObservable(event, getValue);\n}\nexport class FromEventObservable extends BaseObservable {\n constructor(event, _getValue) {\n super();\n this.event = event;\n this._getValue = _getValue;\n this.hasValue = false;\n this.handleEvent = (args) => {\n var _a;\n const newValue = this._getValue(args);\n const oldValue = this.value;\n const didChange = !this.hasValue || oldValue !== newValue;\n let didRunTransaction = false;\n if (didChange) {\n this.value = newValue;\n if (this.hasValue) {\n didRunTransaction = true;\n subtransaction(FromEventObservable.globalTransaction, (tx) => {\n var _a;\n (_a = getLogger()) === null || _a === void 0 ? void 0 : _a.handleFromEventObservableTriggered(this, { oldValue, newValue, change: undefined, didChange, hadValue: this.hasValue });\n for (const o of this.observers) {\n tx.updateObserver(o, this);\n o.handleChange(this, undefined);\n }\n }, () => {\n const name = this.getDebugName();\n return 'Event fired' + (name ? `: ${name}` : '');\n });\n }\n this.hasValue = true;\n }\n if (!didRunTransaction) {\n (_a = getLogger()) === null || _a === void 0 ? void 0 : _a.handleFromEventObservableTriggered(this, { oldValue, newValue, change: undefined, didChange, hadValue: this.hasValue });\n }\n };\n }\n getDebugName() {\n return getFunctionName(this._getValue);\n }\n get debugName() {\n const name = this.getDebugName();\n return 'From Event' + (name ? `: ${name}` : '');\n }\n onFirstObserverAdded() {\n this.subscription = this.event(this.handleEvent);\n }\n onLastObserverRemoved() {\n this.subscription.dispose();\n this.subscription = undefined;\n this.hasValue = false;\n this.value = undefined;\n }\n get() {\n if (this.subscription) {\n if (!this.hasValue) {\n this.handleEvent(undefined);\n }\n return this.value;\n }\n else {\n // no cache, as there are no subscribers to keep it updated\n const value = this._getValue(undefined);\n return value;\n }\n }\n}\n(function (observableFromEvent) {\n observableFromEvent.Observer = FromEventObservable;\n function batchEventsGlobally(tx, fn) {\n let didSet = false;\n if (FromEventObservable.globalTransaction === undefined) {\n FromEventObservable.globalTransaction = tx;\n didSet = true;\n }\n try {\n fn();\n }\n finally {\n if (didSet) {\n FromEventObservable.globalTransaction = undefined;\n }\n }\n }\n observableFromEvent.batchEventsGlobally = batchEventsGlobally;\n})(observableFromEvent || (observableFromEvent = {}));\nexport function observableSignalFromEvent(debugName, event) {\n return new FromEventObservableSignal(debugName, event);\n}\nclass FromEventObservableSignal extends BaseObservable {\n constructor(debugName, event) {\n super();\n this.debugName = debugName;\n this.event = event;\n this.handleEvent = () => {\n transaction((tx) => {\n for (const o of this.observers) {\n tx.updateObserver(o, this);\n o.handleChange(this, undefined);\n }\n }, () => this.debugName);\n };\n }\n onFirstObserverAdded() {\n this.subscription = this.event(this.handleEvent);\n }\n onLastObserverRemoved() {\n this.subscription.dispose();\n this.subscription = undefined;\n }\n get() {\n // NO OP\n }\n}\nexport function observableSignal(debugNameOrOwner) {\n if (typeof debugNameOrOwner === 'string') {\n return new ObservableSignal(debugNameOrOwner);\n }\n else {\n return new ObservableSignal(undefined, debugNameOrOwner);\n }\n}\nclass ObservableSignal extends BaseObservable {\n get debugName() {\n var _a;\n return (_a = new DebugNameData(this._owner, this._debugName, undefined).getDebugName(this)) !== null && _a !== void 0 ? _a : 'Observable Signal';\n }\n constructor(_debugName, _owner) {\n super();\n this._debugName = _debugName;\n this._owner = _owner;\n }\n trigger(tx, change) {\n if (!tx) {\n transaction(tx => {\n this.trigger(tx, change);\n }, () => `Trigger signal ${this.debugName}`);\n return;\n }\n for (const o of this.observers) {\n tx.updateObserver(o, this);\n o.handleChange(this, change);\n }\n }\n get() {\n // NO OP\n }\n}\n/**\n * This makes sure the observable is being observed and keeps its cache alive.\n */\nexport function keepObserved(observable) {\n const o = new KeepAliveObserver(false, undefined);\n observable.addObserver(o);\n return toDisposable(() => {\n observable.removeObserver(o);\n });\n}\n_setKeepObserved(keepObserved);\n/**\n * This converts the given observable into an autorun.\n */\nexport function recomputeInitiallyAndOnChange(observable, handleValue) {\n const o = new KeepAliveObserver(true, handleValue);\n observable.addObserver(o);\n if (handleValue) {\n handleValue(observable.get());\n }\n else {\n observable.reportChanges();\n }\n return toDisposable(() => {\n observable.removeObserver(o);\n });\n}\n_setRecomputeInitiallyAndOnChange(recomputeInitiallyAndOnChange);\nexport class KeepAliveObserver {\n constructor(_forceRecompute, _handleValue) {\n this._forceRecompute = _forceRecompute;\n this._handleValue = _handleValue;\n this._counter = 0;\n }\n beginUpdate(observable) {\n this._counter++;\n }\n endUpdate(observable) {\n this._counter--;\n if (this._counter === 0 && this._forceRecompute) {\n if (this._handleValue) {\n this._handleValue(observable.get());\n }\n else {\n observable.reportChanges();\n }\n }\n }\n handlePossibleChange(observable) {\n // NO OP\n }\n handleChange(observable, change) {\n // NO OP\n }\n}\nexport function derivedObservableWithCache(owner, computeFn) {\n let lastValue = undefined;\n const observable = derived(owner, reader => {\n lastValue = computeFn(reader, lastValue);\n return lastValue;\n });\n return observable;\n}\nexport function derivedObservableWithWritableCache(owner, computeFn) {\n let lastValue = undefined;\n const onChange = observableSignal('derivedObservableWithWritableCache');\n const observable = derived(owner, reader => {\n onChange.read(reader);\n lastValue = computeFn(reader, lastValue);\n return lastValue;\n });\n return Object.assign(observable, {\n clearCache: (tx) => {\n lastValue = undefined;\n onChange.trigger(tx);\n },\n setCache: (newValue, tx) => {\n lastValue = newValue;\n onChange.trigger(tx);\n }\n });\n}\n/**\n * When the items array changes, referential equal items are not mapped again.\n */\nexport function mapObservableArrayCached(owner, items, map, keySelector) {\n let m = new ArrayMap(map, keySelector);\n const self = derivedOpts({\n debugReferenceFn: map,\n owner,\n onLastObserverRemoved: () => {\n m.dispose();\n m = new ArrayMap(map);\n }\n }, (reader) => {\n m.setItems(items.read(reader));\n return m.getItems();\n });\n return self;\n}\nclass ArrayMap {\n constructor(_map, _keySelector) {\n this._map = _map;\n this._keySelector = _keySelector;\n this._cache = new Map();\n this._items = [];\n }\n dispose() {\n this._cache.forEach(entry => entry.store.dispose());\n this._cache.clear();\n }\n setItems(items) {\n const newItems = [];\n const itemsToRemove = new Set(this._cache.keys());\n for (const item of items) {\n const key = this._keySelector ? this._keySelector(item) : item;\n let entry = this._cache.get(key);\n if (!entry) {\n const store = new DisposableStore();\n const out = this._map(item, store);\n entry = { out, store };\n this._cache.set(key, entry);\n }\n else {\n itemsToRemove.delete(key);\n }\n newItems.push(entry.out);\n }\n for (const item of itemsToRemove) {\n const entry = this._cache.get(item);\n entry.store.dispose();\n this._cache.delete(item);\n }\n this._items = newItems;\n }\n getItems() {\n return this._items;\n }\n}\nexport class ValueWithChangeEventFromObservable {\n constructor(observable) {\n this.observable = observable;\n }\n get onDidChange() {\n return Event.fromObservableLight(this.observable);\n }\n get value() {\n return this.observable.get();\n }\n}\nexport function observableFromValueWithChangeEvent(_owner, value) {\n if (value instanceof ValueWithChangeEventFromObservable) {\n return value.observable;\n }\n return observableFromEvent(value.onDidChange, () => value.value);\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// NOTE: VSCode's copy of nodejs path library to be usable in common (non-node) namespace\n// Copied from: https://github.com/nodejs/node/blob/v16.14.2/lib/path.js\n/**\n * Copyright Joyent, Inc. and other Node contributors.\n *\n * Permission is hereby granted, free of charge, to any person obtaining a\n * copy of this software and associated documentation files (the\n * \"Software\"), to deal in the Software without restriction, including\n * without limitation the rights to use, copy, modify, merge, publish,\n * distribute, sublicense, and/or sell copies of the Software, and to permit\n * persons to whom the Software is furnished to do so, subject to the\n * following conditions:\n *\n * The above copyright notice and this permission notice shall be included\n * in all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN\n * NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\n * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\n * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE\n * USE OR OTHER DEALINGS IN THE SOFTWARE.\n */\nimport * as process from './process.js';\nconst CHAR_UPPERCASE_A = 65; /* A */\nconst CHAR_LOWERCASE_A = 97; /* a */\nconst CHAR_UPPERCASE_Z = 90; /* Z */\nconst CHAR_LOWERCASE_Z = 122; /* z */\nconst CHAR_DOT = 46; /* . */\nconst CHAR_FORWARD_SLASH = 47; /* / */\nconst CHAR_BACKWARD_SLASH = 92; /* \\ */\nconst CHAR_COLON = 58; /* : */\nconst CHAR_QUESTION_MARK = 63; /* ? */\nclass ErrorInvalidArgType extends Error {\n constructor(name, expected, actual) {\n // determiner: 'must be' or 'must not be'\n let determiner;\n if (typeof expected === 'string' && expected.indexOf('not ') === 0) {\n determiner = 'must not be';\n expected = expected.replace(/^not /, '');\n }\n else {\n determiner = 'must be';\n }\n const type = name.indexOf('.') !== -1 ? 'property' : 'argument';\n let msg = `The \"${name}\" ${type} ${determiner} of type ${expected}`;\n msg += `. Received type ${typeof actual}`;\n super(msg);\n this.code = 'ERR_INVALID_ARG_TYPE';\n }\n}\nfunction validateObject(pathObject, name) {\n if (pathObject === null || typeof pathObject !== 'object') {\n throw new ErrorInvalidArgType(name, 'Object', pathObject);\n }\n}\nfunction validateString(value, name) {\n if (typeof value !== 'string') {\n throw new ErrorInvalidArgType(name, 'string', value);\n }\n}\nconst platformIsWin32 = (process.platform === 'win32');\nfunction isPathSeparator(code) {\n return code === CHAR_FORWARD_SLASH || code === CHAR_BACKWARD_SLASH;\n}\nfunction isPosixPathSeparator(code) {\n return code === CHAR_FORWARD_SLASH;\n}\nfunction isWindowsDeviceRoot(code) {\n return (code >= CHAR_UPPERCASE_A && code <= CHAR_UPPERCASE_Z) ||\n (code >= CHAR_LOWERCASE_A && code <= CHAR_LOWERCASE_Z);\n}\n// Resolves . and .. elements in a path with directory names\nfunction normalizeString(path, allowAboveRoot, separator, isPathSeparator) {\n let res = '';\n let lastSegmentLength = 0;\n let lastSlash = -1;\n let dots = 0;\n let code = 0;\n for (let i = 0; i <= path.length; ++i) {\n if (i < path.length) {\n code = path.charCodeAt(i);\n }\n else if (isPathSeparator(code)) {\n break;\n }\n else {\n code = CHAR_FORWARD_SLASH;\n }\n if (isPathSeparator(code)) {\n if (lastSlash === i - 1 || dots === 1) {\n // NOOP\n }\n else if (dots === 2) {\n if (res.length < 2 || lastSegmentLength !== 2 ||\n res.charCodeAt(res.length - 1) !== CHAR_DOT ||\n res.charCodeAt(res.length - 2) !== CHAR_DOT) {\n if (res.length > 2) {\n const lastSlashIndex = res.lastIndexOf(separator);\n if (lastSlashIndex === -1) {\n res = '';\n lastSegmentLength = 0;\n }\n else {\n res = res.slice(0, lastSlashIndex);\n lastSegmentLength = res.length - 1 - res.lastIndexOf(separator);\n }\n lastSlash = i;\n dots = 0;\n continue;\n }\n else if (res.length !== 0) {\n res = '';\n lastSegmentLength = 0;\n lastSlash = i;\n dots = 0;\n continue;\n }\n }\n if (allowAboveRoot) {\n res += res.length > 0 ? `${separator}..` : '..';\n lastSegmentLength = 2;\n }\n }\n else {\n if (res.length > 0) {\n res += `${separator}${path.slice(lastSlash + 1, i)}`;\n }\n else {\n res = path.slice(lastSlash + 1, i);\n }\n lastSegmentLength = i - lastSlash - 1;\n }\n lastSlash = i;\n dots = 0;\n }\n else if (code === CHAR_DOT && dots !== -1) {\n ++dots;\n }\n else {\n dots = -1;\n }\n }\n return res;\n}\nfunction _format(sep, pathObject) {\n validateObject(pathObject, 'pathObject');\n const dir = pathObject.dir || pathObject.root;\n const base = pathObject.base ||\n `${pathObject.name || ''}${pathObject.ext || ''}`;\n if (!dir) {\n return base;\n }\n return dir === pathObject.root ? `${dir}${base}` : `${dir}${sep}${base}`;\n}\nexport const win32 = {\n // path.resolve([from ...], to)\n resolve(...pathSegments) {\n let resolvedDevice = '';\n let resolvedTail = '';\n let resolvedAbsolute = false;\n for (let i = pathSegments.length - 1; i >= -1; i--) {\n let path;\n if (i >= 0) {\n path = pathSegments[i];\n validateString(path, 'path');\n // Skip empty entries\n if (path.length === 0) {\n continue;\n }\n }\n else if (resolvedDevice.length === 0) {\n path = process.cwd();\n }\n else {\n // Windows has the concept of drive-specific current working\n // directories. If we've resolved a drive letter but not yet an\n // absolute path, get cwd for that drive, or the process cwd if\n // the drive cwd is not available. We're sure the device is not\n // a UNC path at this points, because UNC paths are always absolute.\n path = process.env[`=${resolvedDevice}`] || process.cwd();\n // Verify that a cwd was found and that it actually points\n // to our drive. If not, default to the drive's root.\n if (path === undefined ||\n (path.slice(0, 2).toLowerCase() !== resolvedDevice.toLowerCase() &&\n path.charCodeAt(2) === CHAR_BACKWARD_SLASH)) {\n path = `${resolvedDevice}\\\\`;\n }\n }\n const len = path.length;\n let rootEnd = 0;\n let device = '';\n let isAbsolute = false;\n const code = path.charCodeAt(0);\n // Try to match a root\n if (len === 1) {\n if (isPathSeparator(code)) {\n // `path` contains just a path separator\n rootEnd = 1;\n isAbsolute = true;\n }\n }\n else if (isPathSeparator(code)) {\n // Possible UNC root\n // If we started with a separator, we know we at least have an\n // absolute path of some kind (UNC or otherwise)\n isAbsolute = true;\n if (isPathSeparator(path.charCodeAt(1))) {\n // Matched double path separator at beginning\n let j = 2;\n let last = j;\n // Match 1 or more non-path separators\n while (j < len && !isPathSeparator(path.charCodeAt(j))) {\n j++;\n }\n if (j < len && j !== last) {\n const firstPart = path.slice(last, j);\n // Matched!\n last = j;\n // Match 1 or more path separators\n while (j < len && isPathSeparator(path.charCodeAt(j))) {\n j++;\n }\n if (j < len && j !== last) {\n // Matched!\n last = j;\n // Match 1 or more non-path separators\n while (j < len && !isPathSeparator(path.charCodeAt(j))) {\n j++;\n }\n if (j === len || j !== last) {\n // We matched a UNC root\n device = `\\\\\\\\${firstPart}\\\\${path.slice(last, j)}`;\n rootEnd = j;\n }\n }\n }\n }\n else {\n rootEnd = 1;\n }\n }\n else if (isWindowsDeviceRoot(code) &&\n path.charCodeAt(1) === CHAR_COLON) {\n // Possible device root\n device = path.slice(0, 2);\n rootEnd = 2;\n if (len > 2 && isPathSeparator(path.charCodeAt(2))) {\n // Treat separator following drive name as an absolute path\n // indicator\n isAbsolute = true;\n rootEnd = 3;\n }\n }\n if (device.length > 0) {\n if (resolvedDevice.length > 0) {\n if (device.toLowerCase() !== resolvedDevice.toLowerCase()) {\n // This path points to another device so it is not applicable\n continue;\n }\n }\n else {\n resolvedDevice = device;\n }\n }\n if (resolvedAbsolute) {\n if (resolvedDevice.length > 0) {\n break;\n }\n }\n else {\n resolvedTail = `${path.slice(rootEnd)}\\\\${resolvedTail}`;\n resolvedAbsolute = isAbsolute;\n if (isAbsolute && resolvedDevice.length > 0) {\n break;\n }\n }\n }\n // At this point the path should be resolved to a full absolute path,\n // but handle relative paths to be safe (might happen when process.cwd()\n // fails)\n // Normalize the tail path\n resolvedTail = normalizeString(resolvedTail, !resolvedAbsolute, '\\\\', isPathSeparator);\n return resolvedAbsolute ?\n `${resolvedDevice}\\\\${resolvedTail}` :\n `${resolvedDevice}${resolvedTail}` || '.';\n },\n normalize(path) {\n validateString(path, 'path');\n const len = path.length;\n if (len === 0) {\n return '.';\n }\n let rootEnd = 0;\n let device;\n let isAbsolute = false;\n const code = path.charCodeAt(0);\n // Try to match a root\n if (len === 1) {\n // `path` contains just a single char, exit early to avoid\n // unnecessary work\n return isPosixPathSeparator(code) ? '\\\\' : path;\n }\n if (isPathSeparator(code)) {\n // Possible UNC root\n // If we started with a separator, we know we at least have an absolute\n // path of some kind (UNC or otherwise)\n isAbsolute = true;\n if (isPathSeparator(path.charCodeAt(1))) {\n // Matched double path separator at beginning\n let j = 2;\n let last = j;\n // Match 1 or more non-path separators\n while (j < len && !isPathSeparator(path.charCodeAt(j))) {\n j++;\n }\n if (j < len && j !== last) {\n const firstPart = path.slice(last, j);\n // Matched!\n last = j;\n // Match 1 or more path separators\n while (j < len && isPathSeparator(path.charCodeAt(j))) {\n j++;\n }\n if (j < len && j !== last) {\n // Matched!\n last = j;\n // Match 1 or more non-path separators\n while (j < len && !isPathSeparator(path.charCodeAt(j))) {\n j++;\n }\n if (j === len) {\n // We matched a UNC root only\n // Return the normalized version of the UNC root since there\n // is nothing left to process\n return `\\\\\\\\${firstPart}\\\\${path.slice(last)}\\\\`;\n }\n if (j !== last) {\n // We matched a UNC root with leftovers\n device = `\\\\\\\\${firstPart}\\\\${path.slice(last, j)}`;\n rootEnd = j;\n }\n }\n }\n }\n else {\n rootEnd = 1;\n }\n }\n else if (isWindowsDeviceRoot(code) && path.charCodeAt(1) === CHAR_COLON) {\n // Possible device root\n device = path.slice(0, 2);\n rootEnd = 2;\n if (len > 2 && isPathSeparator(path.charCodeAt(2))) {\n // Treat separator following drive name as an absolute path\n // indicator\n isAbsolute = true;\n rootEnd = 3;\n }\n }\n let tail = rootEnd < len ?\n normalizeString(path.slice(rootEnd), !isAbsolute, '\\\\', isPathSeparator) :\n '';\n if (tail.length === 0 && !isAbsolute) {\n tail = '.';\n }\n if (tail.length > 0 && isPathSeparator(path.charCodeAt(len - 1))) {\n tail += '\\\\';\n }\n if (device === undefined) {\n return isAbsolute ? `\\\\${tail}` : tail;\n }\n return isAbsolute ? `${device}\\\\${tail}` : `${device}${tail}`;\n },\n isAbsolute(path) {\n validateString(path, 'path');\n const len = path.length;\n if (len === 0) {\n return false;\n }\n const code = path.charCodeAt(0);\n return isPathSeparator(code) ||\n // Possible device root\n (len > 2 &&\n isWindowsDeviceRoot(code) &&\n path.charCodeAt(1) === CHAR_COLON &&\n isPathSeparator(path.charCodeAt(2)));\n },\n join(...paths) {\n if (paths.length === 0) {\n return '.';\n }\n let joined;\n let firstPart;\n for (let i = 0; i < paths.length; ++i) {\n const arg = paths[i];\n validateString(arg, 'path');\n if (arg.length > 0) {\n if (joined === undefined) {\n joined = firstPart = arg;\n }\n else {\n joined += `\\\\${arg}`;\n }\n }\n }\n if (joined === undefined) {\n return '.';\n }\n // Make sure that the joined path doesn't start with two slashes, because\n // normalize() will mistake it for a UNC path then.\n //\n // This step is skipped when it is very clear that the user actually\n // intended to point at a UNC path. This is assumed when the first\n // non-empty string arguments starts with exactly two slashes followed by\n // at least one more non-slash character.\n //\n // Note that for normalize() to treat a path as a UNC path it needs to\n // have at least 2 components, so we don't filter for that here.\n // This means that the user can use join to construct UNC paths from\n // a server name and a share name; for example:\n // path.join('//server', 'share') -> '\\\\\\\\server\\\\share\\\\')\n let needsReplace = true;\n let slashCount = 0;\n if (typeof firstPart === 'string' && isPathSeparator(firstPart.charCodeAt(0))) {\n ++slashCount;\n const firstLen = firstPart.length;\n if (firstLen > 1 && isPathSeparator(firstPart.charCodeAt(1))) {\n ++slashCount;\n if (firstLen > 2) {\n if (isPathSeparator(firstPart.charCodeAt(2))) {\n ++slashCount;\n }\n else {\n // We matched a UNC path in the first part\n needsReplace = false;\n }\n }\n }\n }\n if (needsReplace) {\n // Find any more consecutive slashes we need to replace\n while (slashCount < joined.length &&\n isPathSeparator(joined.charCodeAt(slashCount))) {\n slashCount++;\n }\n // Replace the slashes if needed\n if (slashCount >= 2) {\n joined = `\\\\${joined.slice(slashCount)}`;\n }\n }\n return win32.normalize(joined);\n },\n // It will solve the relative path from `from` to `to`, for instance:\n // from = 'C:\\\\orandea\\\\test\\\\aaa'\n // to = 'C:\\\\orandea\\\\impl\\\\bbb'\n // The output of the function should be: '..\\\\..\\\\impl\\\\bbb'\n relative(from, to) {\n validateString(from, 'from');\n validateString(to, 'to');\n if (from === to) {\n return '';\n }\n const fromOrig = win32.resolve(from);\n const toOrig = win32.resolve(to);\n if (fromOrig === toOrig) {\n return '';\n }\n from = fromOrig.toLowerCase();\n to = toOrig.toLowerCase();\n if (from === to) {\n return '';\n }\n // Trim any leading backslashes\n let fromStart = 0;\n while (fromStart < from.length &&\n from.charCodeAt(fromStart) === CHAR_BACKWARD_SLASH) {\n fromStart++;\n }\n // Trim trailing backslashes (applicable to UNC paths only)\n let fromEnd = from.length;\n while (fromEnd - 1 > fromStart &&\n from.charCodeAt(fromEnd - 1) === CHAR_BACKWARD_SLASH) {\n fromEnd--;\n }\n const fromLen = fromEnd - fromStart;\n // Trim any leading backslashes\n let toStart = 0;\n while (toStart < to.length &&\n to.charCodeAt(toStart) === CHAR_BACKWARD_SLASH) {\n toStart++;\n }\n // Trim trailing backslashes (applicable to UNC paths only)\n let toEnd = to.length;\n while (toEnd - 1 > toStart &&\n to.charCodeAt(toEnd - 1) === CHAR_BACKWARD_SLASH) {\n toEnd--;\n }\n const toLen = toEnd - toStart;\n // Compare paths to find the longest common path from root\n const length = fromLen < toLen ? fromLen : toLen;\n let lastCommonSep = -1;\n let i = 0;\n for (; i < length; i++) {\n const fromCode = from.charCodeAt(fromStart + i);\n if (fromCode !== to.charCodeAt(toStart + i)) {\n break;\n }\n else if (fromCode === CHAR_BACKWARD_SLASH) {\n lastCommonSep = i;\n }\n }\n // We found a mismatch before the first common path separator was seen, so\n // return the original `to`.\n if (i !== length) {\n if (lastCommonSep === -1) {\n return toOrig;\n }\n }\n else {\n if (toLen > length) {\n if (to.charCodeAt(toStart + i) === CHAR_BACKWARD_SLASH) {\n // We get here if `from` is the exact base path for `to`.\n // For example: from='C:\\\\foo\\\\bar'; to='C:\\\\foo\\\\bar\\\\baz'\n return toOrig.slice(toStart + i + 1);\n }\n if (i === 2) {\n // We get here if `from` is the device root.\n // For example: from='C:\\\\'; to='C:\\\\foo'\n return toOrig.slice(toStart + i);\n }\n }\n if (fromLen > length) {\n if (from.charCodeAt(fromStart + i) === CHAR_BACKWARD_SLASH) {\n // We get here if `to` is the exact base path for `from`.\n // For example: from='C:\\\\foo\\\\bar'; to='C:\\\\foo'\n lastCommonSep = i;\n }\n else if (i === 2) {\n // We get here if `to` is the device root.\n // For example: from='C:\\\\foo\\\\bar'; to='C:\\\\'\n lastCommonSep = 3;\n }\n }\n if (lastCommonSep === -1) {\n lastCommonSep = 0;\n }\n }\n let out = '';\n // Generate the relative path based on the path difference between `to` and\n // `from`\n for (i = fromStart + lastCommonSep + 1; i <= fromEnd; ++i) {\n if (i === fromEnd || from.charCodeAt(i) === CHAR_BACKWARD_SLASH) {\n out += out.length === 0 ? '..' : '\\\\..';\n }\n }\n toStart += lastCommonSep;\n // Lastly, append the rest of the destination (`to`) path that comes after\n // the common path parts\n if (out.length > 0) {\n return `${out}${toOrig.slice(toStart, toEnd)}`;\n }\n if (toOrig.charCodeAt(toStart) === CHAR_BACKWARD_SLASH) {\n ++toStart;\n }\n return toOrig.slice(toStart, toEnd);\n },\n toNamespacedPath(path) {\n // Note: this will *probably* throw somewhere.\n if (typeof path !== 'string' || path.length === 0) {\n return path;\n }\n const resolvedPath = win32.resolve(path);\n if (resolvedPath.length <= 2) {\n return path;\n }\n if (resolvedPath.charCodeAt(0) === CHAR_BACKWARD_SLASH) {\n // Possible UNC root\n if (resolvedPath.charCodeAt(1) === CHAR_BACKWARD_SLASH) {\n const code = resolvedPath.charCodeAt(2);\n if (code !== CHAR_QUESTION_MARK && code !== CHAR_DOT) {\n // Matched non-long UNC root, convert the path to a long UNC path\n return `\\\\\\\\?\\\\UNC\\\\${resolvedPath.slice(2)}`;\n }\n }\n }\n else if (isWindowsDeviceRoot(resolvedPath.charCodeAt(0)) &&\n resolvedPath.charCodeAt(1) === CHAR_COLON &&\n resolvedPath.charCodeAt(2) === CHAR_BACKWARD_SLASH) {\n // Matched device root, convert the path to a long UNC path\n return `\\\\\\\\?\\\\${resolvedPath}`;\n }\n return path;\n },\n dirname(path) {\n validateString(path, 'path');\n const len = path.length;\n if (len === 0) {\n return '.';\n }\n let rootEnd = -1;\n let offset = 0;\n const code = path.charCodeAt(0);\n if (len === 1) {\n // `path` contains just a path separator, exit early to avoid\n // unnecessary work or a dot.\n return isPathSeparator(code) ? path : '.';\n }\n // Try to match a root\n if (isPathSeparator(code)) {\n // Possible UNC root\n rootEnd = offset = 1;\n if (isPathSeparator(path.charCodeAt(1))) {\n // Matched double path separator at beginning\n let j = 2;\n let last = j;\n // Match 1 or more non-path separators\n while (j < len && !isPathSeparator(path.charCodeAt(j))) {\n j++;\n }\n if (j < len && j !== last) {\n // Matched!\n last = j;\n // Match 1 or more path separators\n while (j < len && isPathSeparator(path.charCodeAt(j))) {\n j++;\n }\n if (j < len && j !== last) {\n // Matched!\n last = j;\n // Match 1 or more non-path separators\n while (j < len && !isPathSeparator(path.charCodeAt(j))) {\n j++;\n }\n if (j === len) {\n // We matched a UNC root only\n return path;\n }\n if (j !== last) {\n // We matched a UNC root with leftovers\n // Offset by 1 to include the separator after the UNC root to\n // treat it as a \"normal root\" on top of a (UNC) root\n rootEnd = offset = j + 1;\n }\n }\n }\n }\n // Possible device root\n }\n else if (isWindowsDeviceRoot(code) && path.charCodeAt(1) === CHAR_COLON) {\n rootEnd = len > 2 && isPathSeparator(path.charCodeAt(2)) ? 3 : 2;\n offset = rootEnd;\n }\n let end = -1;\n let matchedSlash = true;\n for (let i = len - 1; i >= offset; --i) {\n if (isPathSeparator(path.charCodeAt(i))) {\n if (!matchedSlash) {\n end = i;\n break;\n }\n }\n else {\n // We saw the first non-path separator\n matchedSlash = false;\n }\n }\n if (end === -1) {\n if (rootEnd === -1) {\n return '.';\n }\n end = rootEnd;\n }\n return path.slice(0, end);\n },\n basename(path, ext) {\n if (ext !== undefined) {\n validateString(ext, 'ext');\n }\n validateString(path, 'path');\n let start = 0;\n let end = -1;\n let matchedSlash = true;\n let i;\n // Check for a drive letter prefix so as not to mistake the following\n // path separator as an extra separator at the end of the path that can be\n // disregarded\n if (path.length >= 2 &&\n isWindowsDeviceRoot(path.charCodeAt(0)) &&\n path.charCodeAt(1) === CHAR_COLON) {\n start = 2;\n }\n if (ext !== undefined && ext.length > 0 && ext.length <= path.length) {\n if (ext === path) {\n return '';\n }\n let extIdx = ext.length - 1;\n let firstNonSlashEnd = -1;\n for (i = path.length - 1; i >= start; --i) {\n const code = path.charCodeAt(i);\n if (isPathSeparator(code)) {\n // If we reached a path separator that was not part of a set of path\n // separators at the end of the string, stop now\n if (!matchedSlash) {\n start = i + 1;\n break;\n }\n }\n else {\n if (firstNonSlashEnd === -1) {\n // We saw the first non-path separator, remember this index in case\n // we need it if the extension ends up not matching\n matchedSlash = false;\n firstNonSlashEnd = i + 1;\n }\n if (extIdx >= 0) {\n // Try to match the explicit extension\n if (code === ext.charCodeAt(extIdx)) {\n if (--extIdx === -1) {\n // We matched the extension, so mark this as the end of our path\n // component\n end = i;\n }\n }\n else {\n // Extension does not match, so our result is the entire path\n // component\n extIdx = -1;\n end = firstNonSlashEnd;\n }\n }\n }\n }\n if (start === end) {\n end = firstNonSlashEnd;\n }\n else if (end === -1) {\n end = path.length;\n }\n return path.slice(start, end);\n }\n for (i = path.length - 1; i >= start; --i) {\n if (isPathSeparator(path.charCodeAt(i))) {\n // If we reached a path separator that was not part of a set of path\n // separators at the end of the string, stop now\n if (!matchedSlash) {\n start = i + 1;\n break;\n }\n }\n else if (end === -1) {\n // We saw the first non-path separator, mark this as the end of our\n // path component\n matchedSlash = false;\n end = i + 1;\n }\n }\n if (end === -1) {\n return '';\n }\n return path.slice(start, end);\n },\n extname(path) {\n validateString(path, 'path');\n let start = 0;\n let startDot = -1;\n let startPart = 0;\n let end = -1;\n let matchedSlash = true;\n // Track the state of characters (if any) we see before our first dot and\n // after any path separator we find\n let preDotState = 0;\n // Check for a drive letter prefix so as not to mistake the following\n // path separator as an extra separator at the end of the path that can be\n // disregarded\n if (path.length >= 2 &&\n path.charCodeAt(1) === CHAR_COLON &&\n isWindowsDeviceRoot(path.charCodeAt(0))) {\n start = startPart = 2;\n }\n for (let i = path.length - 1; i >= start; --i) {\n const code = path.charCodeAt(i);\n if (isPathSeparator(code)) {\n // If we reached a path separator that was not part of a set of path\n // separators at the end of the string, stop now\n if (!matchedSlash) {\n startPart = i + 1;\n break;\n }\n continue;\n }\n if (end === -1) {\n // We saw the first non-path separator, mark this as the end of our\n // extension\n matchedSlash = false;\n end = i + 1;\n }\n if (code === CHAR_DOT) {\n // If this is our first dot, mark it as the start of our extension\n if (startDot === -1) {\n startDot = i;\n }\n else if (preDotState !== 1) {\n preDotState = 1;\n }\n }\n else if (startDot !== -1) {\n // We saw a non-dot and non-path separator before our dot, so we should\n // have a good chance at having a non-empty extension\n preDotState = -1;\n }\n }\n if (startDot === -1 ||\n end === -1 ||\n // We saw a non-dot character immediately before the dot\n preDotState === 0 ||\n // The (right-most) trimmed path component is exactly '..'\n (preDotState === 1 &&\n startDot === end - 1 &&\n startDot === startPart + 1)) {\n return '';\n }\n return path.slice(startDot, end);\n },\n format: _format.bind(null, '\\\\'),\n parse(path) {\n validateString(path, 'path');\n const ret = { root: '', dir: '', base: '', ext: '', name: '' };\n if (path.length === 0) {\n return ret;\n }\n const len = path.length;\n let rootEnd = 0;\n let code = path.charCodeAt(0);\n if (len === 1) {\n if (isPathSeparator(code)) {\n // `path` contains just a path separator, exit early to avoid\n // unnecessary work\n ret.root = ret.dir = path;\n return ret;\n }\n ret.base = ret.name = path;\n return ret;\n }\n // Try to match a root\n if (isPathSeparator(code)) {\n // Possible UNC root\n rootEnd = 1;\n if (isPathSeparator(path.charCodeAt(1))) {\n // Matched double path separator at beginning\n let j = 2;\n let last = j;\n // Match 1 or more non-path separators\n while (j < len && !isPathSeparator(path.charCodeAt(j))) {\n j++;\n }\n if (j < len && j !== last) {\n // Matched!\n last = j;\n // Match 1 or more path separators\n while (j < len && isPathSeparator(path.charCodeAt(j))) {\n j++;\n }\n if (j < len && j !== last) {\n // Matched!\n last = j;\n // Match 1 or more non-path separators\n while (j < len && !isPathSeparator(path.charCodeAt(j))) {\n j++;\n }\n if (j === len) {\n // We matched a UNC root only\n rootEnd = j;\n }\n else if (j !== last) {\n // We matched a UNC root with leftovers\n rootEnd = j + 1;\n }\n }\n }\n }\n }\n else if (isWindowsDeviceRoot(code) && path.charCodeAt(1) === CHAR_COLON) {\n // Possible device root\n if (len <= 2) {\n // `path` contains just a drive root, exit early to avoid\n // unnecessary work\n ret.root = ret.dir = path;\n return ret;\n }\n rootEnd = 2;\n if (isPathSeparator(path.charCodeAt(2))) {\n if (len === 3) {\n // `path` contains just a drive root, exit early to avoid\n // unnecessary work\n ret.root = ret.dir = path;\n return ret;\n }\n rootEnd = 3;\n }\n }\n if (rootEnd > 0) {\n ret.root = path.slice(0, rootEnd);\n }\n let startDot = -1;\n let startPart = rootEnd;\n let end = -1;\n let matchedSlash = true;\n let i = path.length - 1;\n // Track the state of characters (if any) we see before our first dot and\n // after any path separator we find\n let preDotState = 0;\n // Get non-dir info\n for (; i >= rootEnd; --i) {\n code = path.charCodeAt(i);\n if (isPathSeparator(code)) {\n // If we reached a path separator that was not part of a set of path\n // separators at the end of the string, stop now\n if (!matchedSlash) {\n startPart = i + 1;\n break;\n }\n continue;\n }\n if (end === -1) {\n // We saw the first non-path separator, mark this as the end of our\n // extension\n matchedSlash = false;\n end = i + 1;\n }\n if (code === CHAR_DOT) {\n // If this is our first dot, mark it as the start of our extension\n if (startDot === -1) {\n startDot = i;\n }\n else if (preDotState !== 1) {\n preDotState = 1;\n }\n }\n else if (startDot !== -1) {\n // We saw a non-dot and non-path separator before our dot, so we should\n // have a good chance at having a non-empty extension\n preDotState = -1;\n }\n }\n if (end !== -1) {\n if (startDot === -1 ||\n // We saw a non-dot character immediately before the dot\n preDotState === 0 ||\n // The (right-most) trimmed path component is exactly '..'\n (preDotState === 1 &&\n startDot === end - 1 &&\n startDot === startPart + 1)) {\n ret.base = ret.name = path.slice(startPart, end);\n }\n else {\n ret.name = path.slice(startPart, startDot);\n ret.base = path.slice(startPart, end);\n ret.ext = path.slice(startDot, end);\n }\n }\n // If the directory is the root, use the entire root as the `dir` including\n // the trailing slash if any (`C:\\abc` -> `C:\\`). Otherwise, strip out the\n // trailing slash (`C:\\abc\\def` -> `C:\\abc`).\n if (startPart > 0 && startPart !== rootEnd) {\n ret.dir = path.slice(0, startPart - 1);\n }\n else {\n ret.dir = ret.root;\n }\n return ret;\n },\n sep: '\\\\',\n delimiter: ';',\n win32: null,\n posix: null\n};\nconst posixCwd = (() => {\n if (platformIsWin32) {\n // Converts Windows' backslash path separators to POSIX forward slashes\n // and truncates any drive indicator\n const regexp = /\\\\/g;\n return () => {\n const cwd = process.cwd().replace(regexp, '/');\n return cwd.slice(cwd.indexOf('/'));\n };\n }\n // We're already on POSIX, no need for any transformations\n return () => process.cwd();\n})();\nexport const posix = {\n // path.resolve([from ...], to)\n resolve(...pathSegments) {\n let resolvedPath = '';\n let resolvedAbsolute = false;\n for (let i = pathSegments.length - 1; i >= -1 && !resolvedAbsolute; i--) {\n const path = i >= 0 ? pathSegments[i] : posixCwd();\n validateString(path, 'path');\n // Skip empty entries\n if (path.length === 0) {\n continue;\n }\n resolvedPath = `${path}/${resolvedPath}`;\n resolvedAbsolute = path.charCodeAt(0) === CHAR_FORWARD_SLASH;\n }\n // At this point the path should be resolved to a full absolute path, but\n // handle relative paths to be safe (might happen when process.cwd() fails)\n // Normalize the path\n resolvedPath = normalizeString(resolvedPath, !resolvedAbsolute, '/', isPosixPathSeparator);\n if (resolvedAbsolute) {\n return `/${resolvedPath}`;\n }\n return resolvedPath.length > 0 ? resolvedPath : '.';\n },\n normalize(path) {\n validateString(path, 'path');\n if (path.length === 0) {\n return '.';\n }\n const isAbsolute = path.charCodeAt(0) === CHAR_FORWARD_SLASH;\n const trailingSeparator = path.charCodeAt(path.length - 1) === CHAR_FORWARD_SLASH;\n // Normalize the path\n path = normalizeString(path, !isAbsolute, '/', isPosixPathSeparator);\n if (path.length === 0) {\n if (isAbsolute) {\n return '/';\n }\n return trailingSeparator ? './' : '.';\n }\n if (trailingSeparator) {\n path += '/';\n }\n return isAbsolute ? `/${path}` : path;\n },\n isAbsolute(path) {\n validateString(path, 'path');\n return path.length > 0 && path.charCodeAt(0) === CHAR_FORWARD_SLASH;\n },\n join(...paths) {\n if (paths.length === 0) {\n return '.';\n }\n let joined;\n for (let i = 0; i < paths.length; ++i) {\n const arg = paths[i];\n validateString(arg, 'path');\n if (arg.length > 0) {\n if (joined === undefined) {\n joined = arg;\n }\n else {\n joined += `/${arg}`;\n }\n }\n }\n if (joined === undefined) {\n return '.';\n }\n return posix.normalize(joined);\n },\n relative(from, to) {\n validateString(from, 'from');\n validateString(to, 'to');\n if (from === to) {\n return '';\n }\n // Trim leading forward slashes.\n from = posix.resolve(from);\n to = posix.resolve(to);\n if (from === to) {\n return '';\n }\n const fromStart = 1;\n const fromEnd = from.length;\n const fromLen = fromEnd - fromStart;\n const toStart = 1;\n const toLen = to.length - toStart;\n // Compare paths to find the longest common path from root\n const length = (fromLen < toLen ? fromLen : toLen);\n let lastCommonSep = -1;\n let i = 0;\n for (; i < length; i++) {\n const fromCode = from.charCodeAt(fromStart + i);\n if (fromCode !== to.charCodeAt(toStart + i)) {\n break;\n }\n else if (fromCode === CHAR_FORWARD_SLASH) {\n lastCommonSep = i;\n }\n }\n if (i === length) {\n if (toLen > length) {\n if (to.charCodeAt(toStart + i) === CHAR_FORWARD_SLASH) {\n // We get here if `from` is the exact base path for `to`.\n // For example: from='/foo/bar'; to='/foo/bar/baz'\n return to.slice(toStart + i + 1);\n }\n if (i === 0) {\n // We get here if `from` is the root\n // For example: from='/'; to='/foo'\n return to.slice(toStart + i);\n }\n }\n else if (fromLen > length) {\n if (from.charCodeAt(fromStart + i) === CHAR_FORWARD_SLASH) {\n // We get here if `to` is the exact base path for `from`.\n // For example: from='/foo/bar/baz'; to='/foo/bar'\n lastCommonSep = i;\n }\n else if (i === 0) {\n // We get here if `to` is the root.\n // For example: from='/foo/bar'; to='/'\n lastCommonSep = 0;\n }\n }\n }\n let out = '';\n // Generate the relative path based on the path difference between `to`\n // and `from`.\n for (i = fromStart + lastCommonSep + 1; i <= fromEnd; ++i) {\n if (i === fromEnd || from.charCodeAt(i) === CHAR_FORWARD_SLASH) {\n out += out.length === 0 ? '..' : '/..';\n }\n }\n // Lastly, append the rest of the destination (`to`) path that comes after\n // the common path parts.\n return `${out}${to.slice(toStart + lastCommonSep)}`;\n },\n toNamespacedPath(path) {\n // Non-op on posix systems\n return path;\n },\n dirname(path) {\n validateString(path, 'path');\n if (path.length === 0) {\n return '.';\n }\n const hasRoot = path.charCodeAt(0) === CHAR_FORWARD_SLASH;\n let end = -1;\n let matchedSlash = true;\n for (let i = path.length - 1; i >= 1; --i) {\n if (path.charCodeAt(i) === CHAR_FORWARD_SLASH) {\n if (!matchedSlash) {\n end = i;\n break;\n }\n }\n else {\n // We saw the first non-path separator\n matchedSlash = false;\n }\n }\n if (end === -1) {\n return hasRoot ? '/' : '.';\n }\n if (hasRoot && end === 1) {\n return '//';\n }\n return path.slice(0, end);\n },\n basename(path, ext) {\n if (ext !== undefined) {\n validateString(ext, 'ext');\n }\n validateString(path, 'path');\n let start = 0;\n let end = -1;\n let matchedSlash = true;\n let i;\n if (ext !== undefined && ext.length > 0 && ext.length <= path.length) {\n if (ext === path) {\n return '';\n }\n let extIdx = ext.length - 1;\n let firstNonSlashEnd = -1;\n for (i = path.length - 1; i >= 0; --i) {\n const code = path.charCodeAt(i);\n if (code === CHAR_FORWARD_SLASH) {\n // If we reached a path separator that was not part of a set of path\n // separators at the end of the string, stop now\n if (!matchedSlash) {\n start = i + 1;\n break;\n }\n }\n else {\n if (firstNonSlashEnd === -1) {\n // We saw the first non-path separator, remember this index in case\n // we need it if the extension ends up not matching\n matchedSlash = false;\n firstNonSlashEnd = i + 1;\n }\n if (extIdx >= 0) {\n // Try to match the explicit extension\n if (code === ext.charCodeAt(extIdx)) {\n if (--extIdx === -1) {\n // We matched the extension, so mark this as the end of our path\n // component\n end = i;\n }\n }\n else {\n // Extension does not match, so our result is the entire path\n // component\n extIdx = -1;\n end = firstNonSlashEnd;\n }\n }\n }\n }\n if (start === end) {\n end = firstNonSlashEnd;\n }\n else if (end === -1) {\n end = path.length;\n }\n return path.slice(start, end);\n }\n for (i = path.length - 1; i >= 0; --i) {\n if (path.charCodeAt(i) === CHAR_FORWARD_SLASH) {\n // If we reached a path separator that was not part of a set of path\n // separators at the end of the string, stop now\n if (!matchedSlash) {\n start = i + 1;\n break;\n }\n }\n else if (end === -1) {\n // We saw the first non-path separator, mark this as the end of our\n // path component\n matchedSlash = false;\n end = i + 1;\n }\n }\n if (end === -1) {\n return '';\n }\n return path.slice(start, end);\n },\n extname(path) {\n validateString(path, 'path');\n let startDot = -1;\n let startPart = 0;\n let end = -1;\n let matchedSlash = true;\n // Track the state of characters (if any) we see before our first dot and\n // after any path separator we find\n let preDotState = 0;\n for (let i = path.length - 1; i >= 0; --i) {\n const code = path.charCodeAt(i);\n if (code === CHAR_FORWARD_SLASH) {\n // If we reached a path separator that was not part of a set of path\n // separators at the end of the string, stop now\n if (!matchedSlash) {\n startPart = i + 1;\n break;\n }\n continue;\n }\n if (end === -1) {\n // We saw the first non-path separator, mark this as the end of our\n // extension\n matchedSlash = false;\n end = i + 1;\n }\n if (code === CHAR_DOT) {\n // If this is our first dot, mark it as the start of our extension\n if (startDot === -1) {\n startDot = i;\n }\n else if (preDotState !== 1) {\n preDotState = 1;\n }\n }\n else if (startDot !== -1) {\n // We saw a non-dot and non-path separator before our dot, so we should\n // have a good chance at having a non-empty extension\n preDotState = -1;\n }\n }\n if (startDot === -1 ||\n end === -1 ||\n // We saw a non-dot character immediately before the dot\n preDotState === 0 ||\n // The (right-most) trimmed path component is exactly '..'\n (preDotState === 1 &&\n startDot === end - 1 &&\n startDot === startPart + 1)) {\n return '';\n }\n return path.slice(startDot, end);\n },\n format: _format.bind(null, '/'),\n parse(path) {\n validateString(path, 'path');\n const ret = { root: '', dir: '', base: '', ext: '', name: '' };\n if (path.length === 0) {\n return ret;\n }\n const isAbsolute = path.charCodeAt(0) === CHAR_FORWARD_SLASH;\n let start;\n if (isAbsolute) {\n ret.root = '/';\n start = 1;\n }\n else {\n start = 0;\n }\n let startDot = -1;\n let startPart = 0;\n let end = -1;\n let matchedSlash = true;\n let i = path.length - 1;\n // Track the state of characters (if any) we see before our first dot and\n // after any path separator we find\n let preDotState = 0;\n // Get non-dir info\n for (; i >= start; --i) {\n const code = path.charCodeAt(i);\n if (code === CHAR_FORWARD_SLASH) {\n // If we reached a path separator that was not part of a set of path\n // separators at the end of the string, stop now\n if (!matchedSlash) {\n startPart = i + 1;\n break;\n }\n continue;\n }\n if (end === -1) {\n // We saw the first non-path separator, mark this as the end of our\n // extension\n matchedSlash = false;\n end = i + 1;\n }\n if (code === CHAR_DOT) {\n // If this is our first dot, mark it as the start of our extension\n if (startDot === -1) {\n startDot = i;\n }\n else if (preDotState !== 1) {\n preDotState = 1;\n }\n }\n else if (startDot !== -1) {\n // We saw a non-dot and non-path separator before our dot, so we should\n // have a good chance at having a non-empty extension\n preDotState = -1;\n }\n }\n if (end !== -1) {\n const start = startPart === 0 && isAbsolute ? 1 : startPart;\n if (startDot === -1 ||\n // We saw a non-dot character immediately before the dot\n preDotState === 0 ||\n // The (right-most) trimmed path component is exactly '..'\n (preDotState === 1 &&\n startDot === end - 1 &&\n startDot === startPart + 1)) {\n ret.base = ret.name = path.slice(start, end);\n }\n else {\n ret.name = path.slice(start, startDot);\n ret.base = path.slice(start, end);\n ret.ext = path.slice(startDot, end);\n }\n }\n if (startPart > 0) {\n ret.dir = path.slice(0, startPart - 1);\n }\n else if (isAbsolute) {\n ret.dir = '/';\n }\n return ret;\n },\n sep: '/',\n delimiter: ':',\n win32: null,\n posix: null\n};\nposix.win32 = win32.win32 = win32;\nposix.posix = win32.posix = posix;\nexport const normalize = (platformIsWin32 ? win32.normalize : posix.normalize);\nexport const resolve = (platformIsWin32 ? win32.resolve : posix.resolve);\nexport const relative = (platformIsWin32 ? win32.relative : posix.relative);\nexport const dirname = (platformIsWin32 ? win32.dirname : posix.dirname);\nexport const basename = (platformIsWin32 ? win32.basename : posix.basename);\nexport const extname = (platformIsWin32 ? win32.extname : posix.extname);\nexport const sep = (platformIsWin32 ? win32.sep : posix.sep);\n"],"names":["getKoreanAltChars","code","result","codeBufferLength","getCodesFromArray","modernConsonants","codeBuffer","subarray","modernVowels","modernFinalConsonants","compatibilityJamo","hangulIndex","vowelAndFinalConsonantProduct","initialConsonantIndex","Math","floor","vowelIndex","finalConsonantIndex","length","disassembleKorean","Uint32Array","array","arrayStartIndex","codes","addCodesToBuffer","Uint8Array","Uint16Array","ArrayNavigator","constructor","items","start","end","index","this","current","next","min","previous","max","first","last","Schemas","matchesScheme","target","scheme","matchesSomeScheme","schemes","some","inMemory","vscode","internal","walkThrough","walkThroughSnippet","http","https","file","mailto","untitled","data","command","vscodeRemote","vscodeRemoteResource","vscodeManagedRemoteResource","vscodeUserData","vscodeCustomEditor","vscodeNotebookCell","vscodeNotebookCellMetadata","vscodeNotebookCellOutput","vscodeInteractiveInput","vscodeSettings","vscodeWorkspaceTrust","vscodeTerminal","vscodeChatCodeBlock","vscodeCopilotBackingChatCodeBlock","vscodeChatCodeCompareBlock","vscodeChatSesssion","webviewPanel","vscodeWebview","extension","vscodeFileResource","tmp","vsls","vscodeSourceControl","commentsInput","codeSetting","RemoteAuthorities","_hosts","Object","create","_ports","_connectionTokens","_preferredWebSchema","_delegate","_serverRootPath","setPreferredWebSchema","schema","_remoteResourcesPath","rewrite","uri","err","authority","host","indexOf","port","connectionToken","query","encodeURIComponent","path","FileAccessImpl","uriToBrowserUri","FALLBACK_AUTHORITY","with","fragment","FileAccess","COI","coiHeaders","Map","CoopAndCoep","freeze","get","coiSearchParamName","getHeadersFromQuery","url","params","URL","searchParams","toString","value","addSearchParam","urlOrSearch","coop","coep","globalThis","crossOriginIsolated","URLSearchParams","set","clamp","MovingAverage","_n","_val","update","SlidingWindowAverage","size","_values","_index","_sum","Array","fill","oldValue","deepClone","obj","RegExp","isArray","entries","forEach","key","deepFreeze","stack","shift","_hasOwnProperty","call","prop","isFrozen","push","prototype","hasOwnProperty","cloneAndChange","changer","_cloneAndChange","Set","seen","changed","r1","e","has","Error","add","r2","i2","delete","mixin","destination","source","overwrite","keys","equals","one","other","i","oneKeys","sort","otherKeys","getAllMethodNames","methods","res","concat","getOwnPropertyNames","getPrototypeOf","getAllPropertyNames","createProxyObject","methodNames","invoke","createProxyMethod","method","args","slice","arguments","methodName","autorun","fn","AutorunObserver","undefined","autorunOpts","options","_a","owner","debugName","debugReferenceFn","autorunHandleChanges","createEmptyChangeSummary","handleChange","autorunWithStore","store","disposable","reader","clear","dispose","_debugNameData","getDebugName","_runFn","createChangeSummary","_handleChange","_b","state","updateCount","disposed","dependencies","dependenciesToBeRemoved","changeSummary","handleAutorunCreated","_runIfNeeded","o","removeObserver","_c","emptySet","isDisposed","handleAutorunTriggered","handleAutorunFinished","beginUpdate","endUpdate","d","reportChanges","assert","handlePossibleChange","observable","change","changedObservable","didChange","readObservable","addObserver","Observer","waitForState","predicate","isError","cancellationToken","Promise","resolve","reject","isImmediateRun","shouldDispose","stateObs","map","isFinished","error","read","dc","onCancellationRequested","isCancellationRequested","_recomputeInitiallyAndOnChange","_keepObserved","_derived","_globalTransaction","_setRecomputeInitiallyAndOnChange","recomputeInitiallyAndOnChange","_setKeepObserved","keepObserved","_setDerivedOpts","derived","ConvenientObservable","TChange","fnOrOwner","fnOrUndefined","name","match","exec","handleValue","BaseObservable","super","observers","observer","len","onFirstObserverAdded","onLastObserverRemoved","transaction","tx","TransactionImpl","finish","globalTransaction","async","asyncTransaction","subtransaction","_fn","_getDebugName","updatingObservers","handleBeginTransaction","updateObserver","handleEndTransaction","observableValue","nameOrOwner","initialValue","debugNameData","ObservableValue","observableValueOpts","equalsFn","_equalityComparator","_value","_tx","_setValue","handleObservableChanged","newValue","hadValue","disposableObservableValue","DisposableObservableValue","DebugNameData","debugNameSource","referenceFn","cached","cachedDebugName","dbgName","self","ownerStr","id","ownerId","className","ctor","getClassName","count","countPerClassName","formatOwner","getFunctionName","findKey","computeDebugName","countPerName","WeakMap","fnSrc","trim","computeFnOrOwner","computeFn","Derived","derivedWithSetter","setter","DerivedWithSetter","derivedOpts","derivedHandleChanges","equalityComparer","derivedWithStore","computeFnOrUndefined","r","derivedDisposable","_computeFn","_handleLastObserverRemoved","handleDerivedCreated","_recomputeIfNeeded","handleDerivedRecomputed","_observable","propagateBeginUpdate","shouldReact","wasUpToDate","shouldCallBeginUpdate","shouldCallEndUpdate","handleLastObserverRemoved","equalityComparator","globalObservableLogger","setLogger","logger","getLogger","ConsoleObservableLogger","indentation","changedObservablesSets","textToConsoleArgs","text","styles","firstArg","process","t","item","style","consoleTextToArgs","normalText","repeat","formatInfo","info","styled","formatValue","color","strikeThrough","console","log","formatKind","formatChanges","changes","join","existingHandleChange","apply","changedObservables","handleFromEventObservableTriggered","_getValue","transactionName","kind","str","padStr","bold","styleObj","reduce","styleString","propName","propValue","availableLen","substr","val","formatArray","formatObject","constObservable","ConstObservable","observableFromEvent","event","getValue","FromEventObservable","hasValue","handleEvent","didRunTransaction","subscription","observableSignalFromEvent","FromEventObservableSignal","batchEventsGlobally","didSet","observableSignal","debugNameOrOwner","ObservableSignal","_owner","_debugName","trigger","KeepAliveObserver","_forceRecompute","_handleValue","_counter","derivedObservableWithCache","lastValue","mapObservableArrayCached","keySelector","m","ArrayMap","setItems","getItems","_map","_keySelector","_cache","_items","entry","newItems","itemsToRemove","out","CHAR_DOT","CHAR_FORWARD_SLASH","CHAR_BACKWARD_SLASH","CHAR_COLON","ErrorInvalidArgType","expected","actual","determiner","replace","type","msg","validateString","platformIsWin32","isPathSeparator","isPosixPathSeparator","isWindowsDeviceRoot","normalizeString","allowAboveRoot","separator","lastSegmentLength","lastSlash","dots","charCodeAt","lastSlashIndex","lastIndexOf","_format","sep","pathObject","validateObject","dir","root","base","ext","win32","pathSegments","resolvedDevice","resolvedTail","resolvedAbsolute","toLowerCase","rootEnd","device","isAbsolute","j","firstPart","normalize","tail","paths","joined","arg","needsReplace","slashCount","firstLen","relative","from","to","fromOrig","toOrig","fromStart","fromEnd","fromLen","toStart","toEnd","toLen","lastCommonSep","fromCode","toNamespacedPath","resolvedPath","dirname","offset","matchedSlash","basename","extIdx","firstNonSlashEnd","extname","startDot","startPart","preDotState","format","bind","parse","ret","delimiter","posix","posixCwd","regexp","cwd","trailingSeparator","hasRoot"],"sourceRoot":""}