Newton_Editor/user_config/usr/share/newton/context_path/resources/js/libs/monaco-editor/min/vs/base/worker/workerMain.js

22 lines
310 KiB
JavaScript
Raw Normal View History

2024-04-20 04:18:38 +00:00
/*!-----------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Version: 0.32.1(8ad5e3bceab16a4d0856c43a374b511dffb1e795)
* Released under the MIT license
* https://github.com/microsoft/vscode/blob/main/LICENSE.txt
*-----------------------------------------------------------*/(function(){var X=["require","exports","vs/base/common/strings","vs/base/common/platform","vs/base/common/event","vs/editor/common/core/position","vs/editor/common/core/range","vs/base/common/lifecycle","vs/base/common/path","vs/base/common/types","vs/base/common/errors","vs/base/common/uri","vs/base/common/stopwatch","vs/base/common/cancellation","vs/base/common/diff/diff","vs/base/common/uint","vs/editor/common/core/characterClassifier","vs/editor/common/model","vs/base/common/arrays","vs/base/common/cache","vs/base/common/codicons","vs/base/common/diff/diffChange","vs/base/common/functional","vs/base/common/iterator","vs/base/common/keyCodes","vs/base/common/lazy","vs/base/common/linkedList","vs/base/common/process","vs/base/common/async","vs/base/common/extpath","vs/base/common/hash","vs/base/common/map","vs/base/common/glob","vs/base/common/objects","vs/editor/common/core/selection","vs/editor/common/core/wordCharacterClassifier","vs/editor/common/core/wordHelper","vs/editor/common/diff/diffComputer","vs/editor/common/languageSelector","vs/editor/common/languages/linkComputer","vs/editor/common/languages/supports/inplaceReplaceSupport","vs/editor/common/languageFeatureRegistry","vs/editor/common/model/prefixSumComputer","vs/editor/common/model/mirrorTextModel","vs/editor/common/model/textModelSearch","vs/editor/common/languages/unicodeTextModelHighlighter","vs/editor/common/standalone/standaloneEnums","vs/editor/common/tokenizationRegistry","vs/editor/common/languages","vs/editor/common/services/editorBaseApi","vs/base/common/worker/simpleWorker","vs/editor/common/services/editorSimpleWorker"],K=function(B){for(var r=[],P=0,e=B.length;P<e;P++)r[P]=X[B[P]];return r},pe=this,ye=typeof global=="object"?global:{},se;(function(B){B.global=pe;var r=function(){function P(){this._detected=!1,this._isWindows=!1,this._isNode=!1,this._isElectronRenderer=!1,this._isWebWorker=!1,this._isElectronNodeIntegrationWebWorker=!1}return Object.defineProperty(P.prototype,"isWindows",{get:function(){return this._detect(),this._isWindows},enumerable:!1,configurable:!0}),Object.defineProperty(P.prototype,"isNode",{get:function(){return this._detect(),this._isNode},enumerable:!1,configurable:!0}),Object.defineProperty(P.prototype,"isElectronRenderer",{get:function(){return this._detect(),this._isElectronRenderer},enumerable:!1,configurable:!0}),Object.defineProperty(P.prototype,"isWebWorker",{get:function(){return this._detect(),this._isWebWorker},enumerable:!1,configurable:!0}),Object.defineProperty(P.prototype,"isElectronNodeIntegrationWebWorker",{get:function(){return this._detect(),this._isElectronNodeIntegrationWebWorker},enumerable:!1,configurable:!0}),P.prototype._detect=function(){this._detected||(this._detected=!0,this._isWindows=P._isWindows(),this._isNode=typeof module!="undefined"&&!!module.exports,this._isElectronRenderer=typeof process!="undefined"&&typeof process.versions!="undefined"&&typeof process.versions.electron!="undefined"&&process.type==="renderer",this._isWebWorker=typeof B.global.importScripts=="function",this._isElectronNodeIntegrationWebWorker=this._isWebWorker&&typeof process!="undefined"&&typeof process.versions!="undefined"&&typeof process.versions.electron!="undefined"&&process.type==="worker")},P._isWindows=function(){return typeof navigator!="undefined"&&navigator.userAgent&&navigator.userAgent.indexOf("Windows")>=0?!0:typeof process!="undefined"?process.platform==="win32":!1},P}();B.Environment=r})(se||(se={}));var se;(function(B){var r=function(){function A(c,v,C){this.type=c,this.detail=v,this.timestamp=C}return A}();B.LoaderEvent=r;var P=function(){function A(c){this._events=[new r(1,"",c)]}return A.prototype.record=function(c,v){this._events.push(new r(c,v,B.Utilities.getHighPerformanceTimestamp()))},A.prototype.getEvents=function(){return this._events},A}();B.LoaderEventRecorder=P;var e=function(){function A(){}return A.prototype.record=function(c,v){},A.prototype.getEvents=function(){return[]},A.INSTANCE=new A,A}();B.NullLoaderEventRecord
//# sourceURL=`+w;var i=b?self.eval(b.createScript("",o)):new Function(o);i.call(self),t()}).then(void 0,_);return}try{b&&(w=b.createScriptURL(w)),importScripts(w),t()}catch(o){_(o)}}},f}(),c=function(){function f(d){this._env=d,this._didInitialize=!1,this._didPatchNodeRequire=!1}return f.prototype._init=function(d){this._didInitialize||(this._didInitialize=!0,this._fs=d("fs"),this._vm=d("vm"),this._path=d("path"),this._crypto=d("crypto"))},f.prototype._initNodeRequire=function(d,w){var t=w.getConfig().getOptionsLiteral().nodeCachedData;if(!t||this._didPatchNodeRequire)return;this._didPatchNodeRequire=!0;var _=this,u=d("module");function S(L){var s=L.constructor,b=function(o){try{return L.require(o)}finally{}};return b.resolve=function(o,i){return s._resolveFilename(o,L,!1,i)},b.resolve.paths=function(o){return s._resolveLookupPaths(o,L)},b.main=process.mainModule,b.extensions=s._extensions,b.cache=s._cache,b}u.prototype._compile=function(L,s){var b=u.wrap(L.replace(/^#!.*/,"")),m=w.getRecorder(),o=_._getCachedDataPath(t,s),i={filename:s},a;try{var l=_._fs.readFileSync(o);a=l.slice(0,16),i.cachedData=l.slice(16),m.record(60,o)}catch{m.record(61,o)}var g=new _._vm.Script(b,i),h=g.runInThisContext(i),p=_._path.dirname(s),y=S(this),N=[this.exports,y,this,s,p,process,ye,Buffer],E=h.apply(this.exports,N);return _._handleCachedData(g,b,o,!i.cachedData,w),_._verifyCachedData(g,b,o,a,w),E}},f.prototype.load=function(d,w,t,_){var u=this,S=d.getConfig().getOptionsLiteral(),L=v(d.getRecorder(),S.nodeRequire||B.global.nodeRequire),s=S.nodeInstrumenter||function(h){return h};this._init(L),this._initNodeRequire(L,d);var b=d.getRecorder();if(/^node\|/.test(w)){var m=w.split("|"),o=null;try{o=L(m[1])}catch(h){_(h);return}d.enqueueDefineAnonymousModule([],function(){return o}),t()}else{w=B.Utilities.fileUriToFilePath(this._env.isWindows,w);var i=this._path.normalize(w),a=this._getElectronRendererScriptPathOrUri(i),l=Boolean(S.nodeCachedData),g=l?this._getCachedDataPath(S.nodeCachedData,w):void 0;this._readSourceAndCachedData(i,g,b,function(h,p,y,N){if(h){_(h);return}var E;p.charCodeAt(0)===f._BOM?E=f._PREFIX+p.substring(1)+f._SUFFIX:E=f._PREFIX+p+f._SUFFIX,E=s(E,i);var M={filename:a,cachedData:y},k=u._createAndEvalScript(d,E,M,t,_);u._handleCachedData(k,E,g,l&&!y,d),u._verifyCachedData(k,E,g,N,d)})}},f.prototype._createAndEvalScript=function(d,w,t,_,u){var S=d.getRecorder();S.record(31,t.filename);var L=new this._vm.Script(w,t),s=L.runInThisContext(t),b=d.getGlobalAMDDefineFunc(),m=!1,o=function(){return m=!0,b.apply(null,arguments)};return o.amd=b.amd,s.call(B.global,d.getGlobalAMDRequireFunc(),o,t.filename,this._path.dirname(t.filename)),S.record(32,t.filename),m?_():u(new Error("Didn't receive define call in "+t.filename+"!")),L},f.prototype._getElectronRendererScriptPathOrUri=function(d){if(!this._env.isElectronRenderer)return d;var w=d.match(/^([a-z])\:(.*)/i);return w?"file:///"+(w[1].toUpperCase()+":"+w[2]).replace(/\\/g,"/"):"file://"+d},f.prototype._getCachedDataPath=function(d,w){var t=this._crypto.createHash("md5").update(w,"utf8").update(d.seed,"utf8").update(process.arch,"").digest("hex"),_=this._path.basename(w).replace(/\.js$/,"");return this._path.join(d.path,_+"-"+t+".code")},f.prototype._handleCachedData=function(d,w,t,_,u){var S=this;d.cachedDataRejected?this._fs.unlink(t,function(L){u.getRecorder().record(62,t),S._createAndWriteCachedData(d,w,t,u),L&&u.getConfig().onError(L)}):_&&this._createAndWriteCachedData(d,w,t,u)},f.prototype._createAndWriteCachedData=function(d,w,t,_){var u=this,S=Math.ceil(_.getConfig().getOptionsLiteral().nodeCachedData.writeDelay*(1+Math.random())),L=-1,s=0,b=void 0,m=function(){setTimeout(function(){b||(b=u._crypto.createHash("md5").update(w,"utf8").digest());var o=d.createCachedData();if(!(o.length===0||o.length===L||s>=5)){if(o.length<L){m();return}L=o.length,u._fs.writeFile(t,Buffer.concat([b,o]),function(i){i&&_.getConfig().onError(i),_.getRecorder().record(63,t),m()})}},S*Math.pow(4,s++))};m()},f.prototype._readSourceAndCachedData=function(d,w,t,_){if(!w)this._fs.readFile(d,{encoding:
});`,f}();function v(f,d){if(d.__$__isRecorded)return d;var w=function(_){f.record(33,_);try{return d(_)}finally{f.record(34,_)}};return w.__$__isRecorded=!0,w}B.ensureRecordedNodeRequire=v;function C(f){return new r(f)}B.createScriptLoader=C})(se||(se={}));var se;(function(B){var r=function(){function C(f){var d=f.lastIndexOf("/");d!==-1?this.fromModulePath=f.substr(0,d+1):this.fromModulePath=""}return C._normalizeModuleId=function(f){var d=f,w;for(w=/\/\.\//;w.test(d);)d=d.replace(w,"/");for(d=d.replace(/^\.\//g,""),w=/\/(([^\/])|([^\/][^\/\.])|([^\/\.][^\/])|([^\/][^\/][^\/]+))\/\.\.\//;w.test(d);)d=d.replace(w,"/");return d=d.replace(/^(([^\/])|([^\/][^\/\.])|([^\/\.][^\/])|([^\/][^\/][^\/]+))\/\.\.\//,""),d},C.prototype.resolveModule=function(f){var d=f;return B.Utilities.isAbsolutePath(d)||(B.Utilities.startsWith(d,"./")||B.Utilities.startsWith(d,"../"))&&(d=C._normalizeModuleId(this.fromModulePath+d)),d},C.ROOT=new C(""),C}();B.ModuleIdResolver=r;var P=function(){function C(f,d,w,t,_,u){this.id=f,this.strId=d,this.dependencies=w,this._callback=t,this._errorback=_,this.moduleIdResolver=u,this.exports={},this.error=null,this.exportsPassedIn=!1,this.unresolvedDependenciesCount=this.dependencies.length,this._isComplete=!1}return C._safeInvokeFunction=function(f,d){try{return{returnedValue:f.apply(B.global,d),producedError:null}}catch(w){return{returnedValue:null,producedError:w}}},C._invokeFactory=function(f,d,w,t){return f.isBuild()&&!B.Utilities.isAnonymousModule(d)?{returnedValue:null,producedError:null}:f.shouldCatchError()?this._safeInvokeFunction(w,t):{returnedValue:w.apply(B.global,t),producedError:null}},C.prototype.complete=function(f,d,w){this._isComplete=!0;var t=null;if(this._callback)if(typeof this._callback=="function"){f.record(21,this.strId);var _=C._invokeFactory(d,this.strId,this._callback,w);t=_.producedError,f.record(22,this.strId),!t&&typeof _.returnedValue!="undefined"&&(!this.exportsPassedIn||B.Utilities.isEmpty(this.exports))&&(this.exports=_.returnedValue)}else this.exports=this._callback;if(t){var u=B.ensureError(t);u.phase="factory",u.moduleId=this.strId,this.error=u,d.onError(u)}this.dependencies=null,this._callback=null,this._errorback=null,this.moduleIdResolver=null},C.prototype.onDependencyError=function(f){return this._isComplete=!0,this.error=f,this._errorback?(this._errorback(f),!0):!1},C.prototype.isComplete=function(){return this._isComplete},C}();B.Module=P;var e=function(){function C(){this._nextId=0,this._strModuleIdToIntModuleId=new Map,this._intModuleIdToStrModuleId=[],this.getModuleId("exports"),this.getModuleId("module"),this.getModuleId("require")}return C.prototype.getMaxModuleId=function(){return this._nextId},C.prototype.getModuleId=function(f){var d=this._strModuleIdToIntModuleId.get(f);return typeof d=="undefined"&&(d=this._nextId++,this._strModuleIdToIntModuleId.set(f,d),this._intModuleIdToStrModuleId[d]=f),d},C.prototype.getStrModuleId=function(f){return this._intModuleIdToStrModuleId[f]},C}(),A=function(){function C(f){this.id=f}return C.EXPORTS=new C(0),C.MODULE=new C(1),C.REQUIRE=new C(2),C}();B.RegularDependency=A;var c=function(){function C(f,d,w){this.id=f,this.pluginId=d,this.pluginParam=w}return C}();B.PluginDependency=c;var v=function(){function C(f,d,w,t,_){_===void 0&&(_=0),this._env=f,this._scriptLoader=d,this._loaderAvailableTimestamp=_,this._defineFunc=w,this._requireFunc=t,this._moduleIdProvider=new e,this._config=new B.Configuration(this._env),this._hasDependencyCycle=!1,this._modules2=[],this._knownModules2=[],this._inverseDependencies2=[],this._inversePluginDependencies2=new Map,this._currentAnonymousDefineCall=null,this._recorder=null,this._buildInfoPath=[],this._buildInfoDefineStack=[],this._buildInfoDependencies=[]}return C.prototype.reset=function(){return new C(this._env,this._scriptLoader,this._defineFunc,this._requireFunc,this._loaderAvailableTimestamp)},C.prototype.getGlobalAMDDefineFunc=function(){return this._defineFunc},C.prototype.getGlobalAMDRequireFunc=function(){return this._requireFunc},C._findRelevantLocationInStack=function(f,d){fo
`)),f.unresolvedDependenciesCount--;continue}if(this._inverseDependencies2[u.id]=this._inverseDependencies2[u.id]||[],this._inverseDependencies2[u.id].push(f.id),u instanceof c){var s=this._modules2[u.pluginId];if(s&&s.isComplete()){this._loadPluginDependency(s.exports,u);continue}var b=this._inversePluginDependencies2.get(u.pluginId);b||(b=[],this._inversePluginDependencies2.set(u.pluginId,b)),b.push(u),this._loadModule(u.pluginId);continue}this._loadModule(u.id)}f.unresolvedDependenciesCount===0&&this._onModuleComplete(f)},C.prototype._onModuleComplete=function(f){var d=this,w=this.getRecorder();if(!f.isComplete()){var t=f.dependencies,_=[];if(t)for(var u=0,S=t.length;u<S;u++){var L=t[u];if(L===A.EXPORTS){_[u]=f.exports;continue}if(L===A.MODULE){_[u]={id:f.strId,config:function(){return d._config.getConfigForModule(f.strId)}};continue}if(L===A.REQUIRE){_[u]=this._createRequire(f.moduleIdResolver);continue}var s=this._modules2[L.id];if(s){_[u]=s.exports;continue}_[u]=null}f.complete(w,this._config,_);var b=this._inverseDependencies2[f.id];if(this._inverseDependencies2[f.id]=null,b)for(var u=0,S=b.length;u<S;u++){var m=b[u],o=this._modules2[m];o.unresolvedDependenciesCount--,o.unresolvedDependenciesCount===0&&this._onModuleComplete(o)}var i=this._inversePluginDependencies2.get(f.id);if(i){this._inversePluginDependencies2.delete(f.id);for(var u=0,S=i.length;u<S;u++)this._loadPluginDependency(f.exports,i[u])}}},C}();B.ModuleManager=v})(se||(se={}));var Q,se;(function(B){var r=new B.Environment,P=null,e=function(C,f,d){typeof C!="string"&&(d=f,f=C,C=null),(typeof f!="object"||!Array.isArray(f))&&(d=f,f=null),f||(f=["require","exports","module"]),C?P.defineModule(C,f,d,null,null):P.enqueueDefineAnonymousModule(f,d)};e.amd={jQuery:!0};var A=function(C,f){f===void 0&&(f=!1),P.configure(C,f)},c=function(){if(arguments.length===1){if(arguments[0]instanceof Object&&!Array.isArray(arguments[0])){A(arguments[0]);return}if(typeof arguments[0]=="string")return P.synchronousRequire(arguments[0])}if((arguments.length===2||arguments.length===3)&&Array.isArray(arguments[0])){P.defineModule(B.Utilities.generateAnonymousModule(),arguments[0],arguments[1],arguments[2],null);return}throw new Error("Unrecognized require call")};c.config=A,c.getConfig=function(){return P.getConfig().getOptionsLiteral()},c.reset=function(){P=P.reset()},c.getBuildInfo=function(){return P.getBuildInfo()},c.getStats=function(){return P.getLoaderEvents()},c.define=e;function v(){if(typeof B.global.require!="undefined"||typeof require!="undefined"){var C=B.global.require||require;if(typeof C=="function"&&typeof C.resolve=="function"){var f=B.ensureRecordedNodeRequire(P.getRecorder(),C);B.global.nodeRequire=f,c.nodeRequire=f,c.__$__nodeRequire=f}}r.isNode&&!r.isElectronRenderer&&!r.isElectronNodeIntegrationWebWorker?(module.exports=c,require=c):(r.isElectronRenderer||(B.global.define=e),B.global.require=c)}B.init=v,(typeof B.global.define!="function"||!B.global.define.amd)&&(P=new B.ModuleManager(r,B.createScriptLoader(r),e,c,B.Utilities.getHighPerformanceTimestamp()),typeof B.global.require!="undefined"&&typeof B.global.require!="function"&&c.config(B.global.require),Q=function(){return e.apply(null,arguments)},Q.amd=e.amd,typeof doNotInitLoader=="undefined"&&v())})(se||(se={})),Q(X[18],K([0,1]),function(B,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.ArrayQueue=r.findMinBy=r.findLastMaxBy=r.findMaxBy=r.numberComparator=r.compareBy=r.splice=r.insertInto=r.asArray=r.pushToEnd=r.pushToStart=r.arrayInsert=r.range=r.flatten=r.firstOrDefault=r.lastIndex=r.findLast=r.distinct=r.isNonEmptyArray=r.isFalsyOrEmpty=r.coalesce=r.groupBy=r.quickSelect=r.findFirstInSorted=r.binarySearch=r.equals=r.tail2=r.tail=void 0;function P(R,I=0){return R[R.length-(1+I)]}r.tail=P;function e(R){if(R.length===0)throw new Error("Invalid tail call");return[R.slice(0,R.length-1),R[R.length-1]]}r.tail2=e;function A(R,I,F=(O,H)=>O===H){if(R===I)return!0;if(!R||!I||R.length!==I.length)return!1;for(let O=0,H=R.length;O<H;O++)if(!F(R[O],I[O]))return!1;return!0}r.equals=A;function
`+S.stack):S},0)}}emit(S){this.listeners.forEach(L=>{L(S)})}onUnexpectedError(S){this.unexpectedErrorHandler(S),this.emit(S)}onUnexpectedExternalError(S){this.unexpectedErrorHandler(S)}}r.ErrorHandler=P,r.errorHandler=new P;function e(u){C(u)||r.errorHandler.onUnexpectedError(u)}r.onUnexpectedError=e;function A(u){C(u)||r.errorHandler.onUnexpectedExternalError(u)}r.onUnexpectedExternalError=A;function c(u){if(u instanceof Error){let{name:S,message:L}=u;const s=u.stacktrace||u.stack;return{$isError:!0,name:S,message:L,stack:s}}return u}r.transformErrorForSerialization=c;const v="Canceled";function C(u){return u instanceof f?!0:u instanceof Error&&u.name===v&&u.message===v}r.isCancellationError=C;class f extends Error{constructor(){super(v);this.name=this.message}}r.CancellationError=f;function d(){const u=new Error(v);return u.name=u.message,u}r.canceled=d;function w(u){return u?new Error(`Illegal argument: ${u}`):new Error("Illegal argument")}r.illegalArgument=w;function t(u){return u?new Error(`Illegal state: ${u}`):new Error("Illegal state")}r.illegalState=t;class _ extends Error{constructor(S){super("NotSupported");S&&(this.message=S)}}r.NotSupportedError=_}),Q(X[22],K([0,1]),function(B,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.once=void 0;function P(e){const A=this;let c=!1,v;return function(){return c||(c=!0,v=e.apply(A,arguments)),v}}r.once=P}),Q(X[23],K([0,1]),function(B,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.Iterable=void 0;var P;(function(e){function A(a){return a&&typeof a=="object"&&typeof a[Symbol.iterator]=="function"}e.is=A;const c=Object.freeze([]);function v(){return c}e.empty=v;function*C(a){yield a}e.single=C;function f(a){return a||c}e.from=f;function d(a){return!a||a[Symbol.iterator]().next().done===!0}e.isEmpty=d;function w(a){return a[Symbol.iterator]().next().value}e.first=w;function t(a,l){for(const g of a)if(l(g))return!0;return!1}e.some=t;function _(a,l){for(const g of a)if(l(g))return g}e.find=_;function*u(a,l){for(const g of a)l(g)&&(yield g)}e.filter=u;function*S(a,l){let g=0;for(const h of a)yield l(h,g++)}e.map=S;function*L(...a){for(const l of a)for(const g of l)yield g}e.concat=L;function*s(a){for(const l of a)for(const g of l)yield g}e.concatNested=s;function b(a,l,g){let h=g;for(const p of a)h=l(h,p);return h}e.reduce=b;function*m(a,l,g=a.length){for(l<0&&(l+=a.length),g<0?g+=a.length:g>a.length&&(g=a.length);l<g;l++)yield a[l]}e.slice=m;function o(a,l=Number.POSITIVE_INFINITY){const g=[];if(l===0)return[g,a];const h=a[Symbol.iterator]();for(let p=0;p<l;p++){const y=h.next();if(y.done)return[g,e.empty()];g.push(y.value)}return[g,{[Symbol.iterator](){return h}}]}e.consume=o;function i(a,l,g=(h,p)=>h===p){const h=a[Symbol.iterator](),p=l[Symbol.iterator]();for(;;){const y=h.next(),N=p.next();if(y.done!==N.done)return!1;if(y.done)return!0;if(!g(y.value,N.value))return!1}}e.equals=i})(P=r.Iterable||(r.Iterable={}))}),Q(X[24],K([0,1]),function(B,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.KeyChord=r.KeyCodeUtils=r.IMMUTABLE_KEY_CODE_TO_CODE=r.IMMUTABLE_CODE_TO_KEY_CODE=r.NATIVE_WINDOWS_KEY_CODE_TO_KEY_CODE=r.EVENT_KEY_CODE_MAP=void 0;class P{constructor(){this._keyCodeToStr=[],this._strToKeyCode=Object.create(null)}define(_,u){this._keyCodeToStr[_]=u,this._strToKeyCode[u.toLowerCase()]=_}keyCodeToStr(_){return this._keyCodeToStr[_]}strToKeyCode(_){return this._strToKeyCode[_.toLowerCase()]||0}}const e=new P,A=new P,c=new P;r.EVENT_KEY_CODE_MAP=new Array(230),r.NATIVE_WINDOWS_KEY_CODE_TO_KEY_CODE={};const v=[],C=Object.create(null),f=Object.create(null);r.IMMUTABLE_CODE_TO_KEY_CODE=[],r.IMMUTABLE_KEY_CODE_TO_CODE=[];for(let t=0;t<=193;t++)r.IMMUTABLE_CODE_TO_KEY_CODE[t]=-1;for(let t=0;t<=126;t++)r.IMMUTABLE_KEY_CODE_TO_CODE[t]=-1;(function(){const t="",_=[[0,1,0,"None",0,"unknown",0,"VK_UNKNOWN",t,t],[0,1,1,"Hyper",0,t,0,t,t,t],[0,1,2,"Super",0,t,0,t,t,t],[0,1,3,"Fn",0,t,0,t,t,t],[0,1,4,"FnLock",0,t,0,t,t,t],[0,1,5,"Suspend",0,t,0,t,t,t],[0,1,6,"Resume",0,t,0,t,t,t],[0,1,7,"Turbo",0,t,0,t,t,t],[0,1,8,"Sleep",0,t,0,"V
`).slice(3).join(`
`),o=this._stacks.get(m)||0;if(this._stacks.set(m,o+1),this._warnCountdown-=1,this._warnCountdown<=0){this._warnCountdown=b*.5;let i,a=0;for(const[l,g]of this._stacks)(!i||a<g)&&(i=l,a=g);console.warn(`[${this.name}] potential listener LEAK detected, having ${s} listeners already. MOST frequent listener (${a}):`),console.warn(i)}return()=>{const i=this._stacks.get(m)||0;this._stacks.set(m,i-1)}}}class w{constructor(s){var b;this._disposed=!1,this._options=s,this._leakageMon=f>0?new d(this._options&&this._options.leakWarningThreshold):void 0,this._perfMon=((b=this._options)===null||b===void 0?void 0:b._profName)?new C(this._options._profName):void 0}get event(){return this._event||(this._event=(s,b,m)=>{var o;this._listeners||(this._listeners=new A.LinkedList);const i=this._listeners.isEmpty();i&&this._options&&this._options.onFirstListenerAdd&&this._options.onFirstListenerAdd(this);const a=this._listeners.push(b?[s,b]:s);i&&this._options&&this._options.onFirstListenerDidAdd&&this._options.onFirstListenerDidAdd(this),this._options&&this._options.onListenerDidAdd&&this._options.onListenerDidAdd(this,s,b);const l=(o=this._leakageMon)===null||o===void 0?void 0:o.check(this._listeners.size),g=(0,e.toDisposable)(()=>{l&&l(),this._disposed||(a(),this._options&&this._options.onLastListenerRemove&&(this._listeners&&!this._listeners.isEmpty()||this._options.onLastListenerRemove(this)))});return m instanceof e.DisposableStore?m.add(g):Array.isArray(m)&&m.push(g),g}),this._event}fire(s){var b,m;if(this._listeners){this._deliveryQueue||(this._deliveryQueue=new A.LinkedList);for(let o of this._listeners)this._deliveryQueue.push([o,s]);for((b=this._perfMon)===null||b===void 0||b.start(this._deliveryQueue.size);this._deliveryQueue.size>0;){const[o,i]=this._deliveryQueue.shift();try{typeof o=="function"?o.call(void 0,i):o[0].call(o[1],i)}catch(a){(0,P.onUnexpectedError)(a)}}(m=this._perfMon)===null||m===void 0||m.stop()}}dispose(){var s,b,m,o,i;this._disposed||(this._disposed=!0,(s=this._listeners)===null||s===void 0||s.clear(),(b=this._deliveryQueue)===null||b===void 0||b.clear(),(o=(m=this._options)===null||m===void 0?void 0:m.onLastListenerRemove)===null||o===void 0||o.call(m),(i=this._leakageMon)===null||i===void 0||i.dispose())}}r.Emitter=w;class t extends w{constructor(s){super(s);this._isPaused=0,this._eventQueue=new A.LinkedList,this._mergeFn=s==null?void 0:s.merge}pause(){this._isPaused++}resume(){if(this._isPaused!==0&&--this._isPaused==0)if(this._mergeFn){const s=Array.from(this._eventQueue);this._eventQueue.clear(),super.fire(this._mergeFn(s))}else for(;!this._isPaused&&this._eventQueue.size!==0;)super.fire(this._eventQueue.shift())}fire(s){this._listeners&&(this._isPaused!==0?this._eventQueue.push(s):super.fire(s))}}r.PauseableEmitter=t;class _ extends t{constructor(s){var b;super(s);this._delay=(b=s.delay)!==null&&b!==void 0?b:100}fire(s){this._handle||(this.pause(),this._handle=setTimeout(()=>{this._handle=void 0,this.resume()},this._delay)),super.fire(s)}}r.DebounceEmitter=_;class u{constructor(){this.buffers=[]}wrapEvent(s){return(b,m,o)=>s(i=>{const a=this.buffers[this.buffers.length-1];a?a.push(()=>b.call(m,i)):b.call(m,i)},void 0,o)}bufferEvents(s){const b=[];this.buffers.push(b);const m=s();return this.buffers.pop(),b.forEach(o=>o()),m}}r.EventBufferer=u;class S{constructor(){this.listening=!1,this.inputEvent=v.None,this.inputEventListener=e.Disposable.None,this.emitter=new w({onFirstListenerDidAdd:()=>{this.listening=!0,this.inputEventListener=this.inputEvent(this.emitter.fire,this.emitter)},onLastListenerRemove:()=>{this.listening=!1,this.inputEventListener.dispose()}}),this.event=this.emitter.event}set input(s){this.inputEvent=s,this.listening&&(this.inputEventListener.dispose(),this.inputEventListener=s(this.emitter.fire,this.emitter))}dispose(){this.inputEventListener.dispose(),this.emitter.dispose()}}r.Relay=S}),Q(X[13],K([0,1,4]),function(B,r,P){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.CancellationTokenSource=r.CancellationToken=void 0;const e=Object.freeze(function(C,f){const d=setTime
`)>=0;let o=null;try{o=P.createRegExp(this.searchString,this.isRegex,{matchCase:this.matchCase,wholeWord:!1,multiline:m,global:!0,unicode:!0})}catch{return null}if(!o)return null;let i=!this.isRegex&&!m;return i&&this.searchString.toLowerCase()!==this.searchString.toUpperCase()&&(i=this.matchCase),new v.SearchData(o,this.wordSeparators?(0,e.getMapForWordSeparators)(this.wordSeparators):null,i?this.searchString:null)}}r.SearchParams=f;function d(b){if(!b||b.length===0)return!1;for(let m=0,o=b.length;m<o;m++)if(b.charCodeAt(m)===92){if(m++,m>=o)break;const a=b.charCodeAt(m);if(a===110||a===114||a===87)return!0}return!1}r.isMultilineRegexSource=d;function w(b,m,o){if(!o)return new v.FindMatch(b,null);const i=[];for(let a=0,l=m.length;a<l;a++)i[a]=m[a];return new v.FindMatch(b,i)}r.createFindMatch=w;class t{constructor(m){const o=[];let i=0;for(let a=0,l=m.length;a<l;a++)m.charCodeAt(a)===10&&(o[i++]=a);this._lineFeedsOffsets=o}findLineFeedCountBeforeOffset(m){const o=this._lineFeedsOffsets;let i=0,a=o.length-1;if(a===-1||m<=o[0])return 0;for(;i<a;){const l=i+((a-i)/2>>0);o[l]>=m?a=l-1:o[l+1]>=m?(i=l,a=l):i=l+1}return i+1}}class _{static findMatches(m,o,i,a,l){const g=o.parseSearchRequest();return g?g.regex.multiline?this._doFindMatchesMultiline(m,i,new s(g.wordSeparators,g.regex),a,l):this._doFindMatchesLineByLine(m,i,g,a,l):[]}static _getMultilineMatchRange(m,o,i,a,l,g){let h,p=0;a?(p=a.findLineFeedCountBeforeOffset(l),h=o+l+p):h=o+l;let y;if(a){const k=a.findLineFeedCountBeforeOffset(l+g.length)-p;y=h+g.length+k}else y=h+g.length;const N=m.getPositionAt(h),E=m.getPositionAt(y);return new c.Range(N.lineNumber,N.column,E.lineNumber,E.column)}static _doFindMatchesMultiline(m,o,i,a,l){const g=m.getOffsetAt(o.getStartPosition()),h=m.getValueInRange(o,1),p=m.getEOL()===`\r
`?new t(h):null,y=[];let N=0,E;for(i.reset(0);E=i.next(h);)if(y[N++]=w(this._getMultilineMatchRange(m,g,h,p,E.index,E[0]),E,a),N>=l)return y;return y}static _doFindMatchesLineByLine(m,o,i,a,l){const g=[];let h=0;if(o.startLineNumber===o.endLineNumber){const y=m.getLineContent(o.startLineNumber).substring(o.startColumn-1,o.endColumn-1);return h=this._findMatchesInLine(i,y,o.startLineNumber,o.startColumn-1,h,g,a,l),g}const p=m.getLineContent(o.startLineNumber).substring(o.startColumn-1);h=this._findMatchesInLine(i,p,o.startLineNumber,o.startColumn-1,h,g,a,l);for(let y=o.startLineNumber+1;y<o.endLineNumber&&h<l;y++)h=this._findMatchesInLine(i,m.getLineContent(y),y,0,h,g,a,l);if(h<l){const y=m.getLineContent(o.endLineNumber).substring(0,o.endColumn-1);h=this._findMatchesInLine(i,y,o.endLineNumber,0,h,g,a,l)}return g}static _findMatchesInLine(m,o,i,a,l,g,h,p){const y=m.wordSeparators;if(!h&&m.simpleSearch){const M=m.simpleSearch,k=M.length,R=o.length;let I=-k;for(;(I=o.indexOf(M,I+k))!==-1;)if((!y||L(y,o,R,I,k))&&(g[l++]=new v.FindMatch(new c.Range(i,I+1+a,i,I+1+k+a),null),l>=p))return l;return l}const N=new s(m.wordSeparators,m.regex);let E;N.reset(0);do if(E=N.next(o),E&&(g[l++]=w(new c.Range(i,E.index+1+a,i,E.index+1+E[0].length+a),E,h),l>=p))return l;while(E);return l}static findNextMatch(m,o,i,a){const l=o.parseSearchRequest();if(!l)return null;const g=new s(l.wordSeparators,l.regex);return l.regex.multiline?this._doFindNextMatchMultiline(m,i,g,a):this._doFindNextMatchLineByLine(m,i,g,a)}static _doFindNextMatchMultiline(m,o,i,a){const l=new A.Position(o.lineNumber,1),g=m.getOffsetAt(l),h=m.getLineCount(),p=m.getValueInRange(new c.Range(l.lineNumber,l.column,h,m.getLineMaxColumn(h)),1),y=m.getEOL()===`\r
`?new t(p):null;i.reset(o.column-1);let N=i.next(p);return N?w(this._getMultilineMatchRange(m,g,p,y,N.index,N[0]),N,a):o.lineNumber!==1||o.column!==1?this._doFindNextMatchMultiline(m,new A.Position(1,1),i,a):null}static _doFindNextMatchLineByLine(m,o,i,a){const l=m.getLineCount(),g=o.lineNumber,h=m.getLineContent(g),p=this._findFirstMatchInLine(i,h,g,o.column,a);if(p)return p;for(let y=1;y<=l;y++){const N=(g+y-1)%l,E=m.getLineContent(N+1),M=this._findFirstMatchInLine(i,E,N+1,1,a);if(M)return M}return null}static _findFirstMatchInLine(m,o,i,a,l){m.reset(a-1);const g=m.next(o);return g?w(new c.Range(i,g.index+1,i,g.index+1+g[0].length),g,l):null}static findPreviousMatch(m,o,i,a){const l=o.parseSearchRequest();if(!l)return null;const g=new s(l.wordSeparators,l.regex);return l.regex.multiline?this._doFindPreviousMatchMultiline(m,i,g,a):this._doFindPreviousMatchLineByLine(m,i,g,a)}static _doFindPreviousMatchMultiline(m,o,i,a){const l=this._doFindMatchesMultiline(m,new c.Range(1,1,o.lineNumber,o.column),i,a,10*C);if(l.length>0)return l[l.length-1];const g=m.getLineCount();return o.lineNumber!==g||o.column!==m.getLineMaxColumn(g)?this._doFindPreviousMatchMultiline(m,new A.Position(g,m.getLineMaxColumn(g)),i,a):null}static _doFindPreviousMatchLineByLine(m,o,i,a){const l=m.getLineCount(),g=o.lineNumber,h=m.getLineContent(g).substring(0,o.column-1),p=this._findLastMatchInLine(i,h,g,a);if(p)return p;for(let y=1;y<=l;y++){const N=(l+g-y-1)%l,E=m.getLineContent(N+1),M=this._findLastMatchInLine(i,E,N+1,a);if(M)return M}return null}static _findLastMatchInLine(m,o,i,a){let l=null,g;for(m.reset(0);g=m.next(o);)l=w(new c.Range(i,g.index+1,i,g.index+1+g[0].length),g,a);return l}}r.TextModelSearch=_;function u(b,m,o,i,a){if(i===0)return!0;const l=m.charCodeAt(i-1);if(b.get(l)!==0||l===13||l===10)return!0;if(a>0){const g=m.charCodeAt(i);if(b.get(g)!==0)return!0}return!1}function S(b,m,o,i,a){if(i+a===o)return!0;const l=m.charCodeAt(i+a);if(b.get(l)!==0||l===13||l===10)return!0;if(a>0){const g=m.charCodeAt(i+a-1);if(b.get(g)!==0)return!0}return!1}function L(b,m,o,i,a){return u(b,m,o,i,a)&&S(b,m,o,i,a)}r.isValidMatch=L;class s{constructor(m,o){this._wordSeparators=m,this._searchRegex=o,this._prevMatchStartIndex=-1,this._prevMatchLength=0}reset(m){this._searchRegex.lastIndex=m,this._prevMatchStartIndex=-1,this._prevMatchLength=0}next(m){const o=m.length;let i;do{if(this._prevMatchStartIndex+this._prevMatchLength===o||(i=this._searchRegex.exec(m),!i))return null;const a=i.index,l=i[0].length;if(a===this._prevMatchStartIndex&&l===this._prevMatchLength){if(l===0){P.getNextCodePoint(m,o,this._searchRegex.lastIndex)>65535?this._searchRegex.lastIndex+=2:this._searchRegex.lastIndex+=1;continue}return null}if(this._prevMatchStartIndex=a,this._prevMatchLength=l,!this._wordSeparators||L(this._wordSeparators,m,o,a,l))return i}while(i);return null}}r.Searcher=s}),Q(X[45],K([0,1,6,44,2,9]),function(B,r,P,e,A,c){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.UnicodeTextModelHighlighter=void 0;class v{static computeUnicodeHighlights(w,t,_){const u=_?_.startLineNumber:1,S=_?_.endLineNumber:w.getLineCount(),L=new f(t),s=L.getCandidateCodePoints();let b;s==="allNonBasicAscii"?b=new RegExp("[^\\t\\n\\r\\x20-\\x7E]","g"):b=new RegExp(`${C(Array.from(s))}`,"g");const m=new e.Searcher(null,b),o=[];let i=!1,a,l=0,g=0,h=0;e:for(let p=u,y=S;p<=y;p++){const N=w.getLineContent(p),E=N.length;m.reset(0);do if(a=m.next(N),a){let M=a.index,k=a.index+a[0].length;if(M>0){const F=N.charCodeAt(M-1);A.isHighSurrogate(F)&&M--}if(k+1<E){const F=N.charCodeAt(k-1);A.isHighSurrogate(F)&&k++}const R=N.substring(M,k),I=L.shouldHighlightNonBasicASCII(R);if(I!==0){I===3?l++:I===2?g++:I===1?h++:(0,c.assertNever)(I);const F=1e3;if(o.length>=F){i=!0;break e}o.push(new P.Range(p,M+1,p,k+1))}}while(a)}return{ranges:o,hasMore:i,ambiguousCharacterCount:l,invisibleCharacterCount:g,nonBasicAsciiCharacterCount:h}}static computeUnicodeHighlightReason(w,t){const _=new f(t);switch(_.shouldHighlightNonBasicASCII(w)){case 0:return null;case 2:return{kind:1};case 3:{const S=w.codePointA
`||w===" ")&&A.InvisibleCharacters.isInvisibleCharacter(t)?2:this.options.ambiguousCharacters&&this.ambiguousCharacters.isAmbiguous(t)?3:0}}}),Q(X[46],K([0,1]),function(B,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.WrappingIndent=r.TrackedRangeStickiness=r.TextEditorCursorStyle=r.TextEditorCursorBlinkingStyle=r.SymbolTag=r.SymbolKind=r.SignatureHelpTriggerKind=r.SelectionDirection=r.ScrollbarVisibility=r.ScrollType=r.RenderMinimap=r.RenderLineNumbersType=r.PositionAffinity=r.OverviewRulerLane=r.OverlayWidgetPositionPreference=r.MouseTargetType=r.MinimapPosition=r.MarkerTag=r.MarkerSeverity=r.KeyCode=r.InlineCompletionTriggerKind=r.InlayHintKind=r.InjectedTextCursorStops=r.IndentAction=r.EndOfLineSequence=r.EndOfLinePreference=r.EditorOption=r.EditorAutoIndentStrategy=r.DocumentHighlightKind=r.DefaultEndOfLine=r.CursorChangeReason=r.ContentWidgetPositionPreference=r.CompletionTriggerKind=r.CompletionItemTag=r.CompletionItemKind=r.CompletionItemInsertTextRule=r.AccessibilitySupport=void 0;var P;(function(n){n[n.Unknown=0]="Unknown",n[n.Disabled=1]="Disabled",n[n.Enabled=2]="Enabled"})(P=r.AccessibilitySupport||(r.AccessibilitySupport={}));var e;(function(n){n[n.KeepWhitespace=1]="KeepWhitespace",n[n.InsertAsSnippet=4]="InsertAsSnippet"})(e=r.CompletionItemInsertTextRule||(r.CompletionItemInsertTextRule={}));var A;(function(n){n[n.Method=0]="Method",n[n.Function=1]="Function",n[n.Constructor=2]="Constructor",n[n.Field=3]="Field",n[n.Variable=4]="Variable",n[n.Class=5]="Class",n[n.Struct=6]="Struct",n[n.Interface=7]="Interface",n[n.Module=8]="Module",n[n.Property=9]="Property",n[n.Event=10]="Event",n[n.Operator=11]="Operator",n[n.Unit=12]="Unit",n[n.Value=13]="Value",n[n.Constant=14]="Constant",n[n.Enum=15]="Enum",n[n.EnumMember=16]="EnumMember",n[n.Keyword=17]="Keyword",n[n.Text=18]="Text",n[n.Color=19]="Color",n[n.File=20]="File",n[n.Reference=21]="Reference",n[n.Customcolor=22]="Customcolor",n[n.Folder=23]="Folder",n[n.TypeParameter=24]="TypeParameter",n[n.User=25]="User",n[n.Issue=26]="Issue",n[n.Snippet=27]="Snippet"})(A=r.CompletionItemKind||(r.CompletionItemKind={}));var c;(function(n){n[n.Deprecated=1]="Deprecated"})(c=r.CompletionItemTag||(r.CompletionItemTag={}));var v;(function(n){n[n.Invoke=0]="Invoke",n[n.TriggerCharacter=1]="TriggerCharacter",n[n.TriggerForIncompleteCompletions=2]="TriggerForIncompleteCompletions"})(v=r.CompletionTriggerKind||(r.CompletionTriggerKind={}));var C;(function(n){n[n.EXACT=0]="EXACT",n[n.ABOVE=1]="ABOVE",n[n.BELOW=2]="BELOW"})(C=r.ContentWidgetPositionPreference||(r.ContentWidgetPositionPreference={}));var f;(function(n){n[n.NotSet=0]="NotSet",n[n.ContentFlush=1]="ContentFlush",n[n.RecoverFromMarkers=2]="RecoverFromMarkers",n[n.Explicit=3]="Explicit",n[n.Paste=4]="Paste",n[n.Undo=5]="Undo",n[n.Redo=6]="Redo"})(f=r.CursorChangeReason||(r.CursorChangeReason={}));var d;(function(n){n[n.LF=1]="LF",n[n.CRLF=2]="CRLF"})(d=r.DefaultEndOfLine||(r.DefaultEndOfLine={}));var w;(function(n){n[n.Text=0]="Text",n[n.Read=1]="Read",n[n.Write=2]="Write"})(w=r.DocumentHighlightKind||(r.DocumentHighlightKind={}));var t;(function(n){n[n.None=0]="None",n[n.Keep=1]="Keep",n[n.Brackets=2]="Brackets",n[n.Advanced=3]="Advanced",n[n.Full=4]="Full"})(t=r.EditorAutoIndentStrategy||(r.EditorAutoIndentStrategy={}));var _;(function(n){n[n.acceptSuggestionOnCommitCharacter=0]="acceptSuggestionOnCommitCharacter",n[n.acceptSuggestionOnEnter=1]="acceptSuggestionOnEnter",n[n.accessibilitySupport=2]="accessibilitySupport",n[n.accessibilityPageSize=3]="accessibilityPageSize",n[n.ariaLabel=4]="ariaLabel",n[n.autoClosingBrackets=5]="autoClosingBrackets",n[n.autoClosingDelete=6]="autoClosingDelete",n[n.autoClosingOvertype=7]="autoClosingOvertype",n[n.autoClosingQuotes=8]="autoClosingQuotes",n[n.autoIndent=9]="autoIndent",n[n.automaticLayout=10]="automaticLayout",n[n.autoSurround=11]="autoSurround",n[n.bracketPairColorization=12]="bracketPairColorization",n[n.guides=13]="guides",n[n.codeLens=14]="codeLens",n[n.codeLensFontFamily=15]="codeLensFontFamily",n[n.codeLensFontSize=16]="codeLensFontSize",n[n.
${u}
})`}}):void 0;function c(){try{return(A?self.eval(A.createScript("","true")):new Function("true")).call(self),!0}catch{return!1}}function v(){return new Promise((w,t)=>{if(typeof self.define=="function"&&self.define.amd)return w();const _=e+"vs/loader.js";if(!(/^((http:)|(https:)|(file:))/.test(_)&&_.substring(0,self.origin.length)!==self.origin)&&c()){fetch(_).then(S=>{if(S.status!==200)throw new Error(S.statusText);return S.text()}).then(S=>{S=`${S}
//# sourceURL=${_}`,(A?self.eval(A.createScript("",S)):new Function(S)).call(self),w()}).then(void 0,t);return}A?importScripts(A.createScriptURL(_)):importScripts(_),w()})}const C=function(w){v().then(()=>{require.config({baseUrl:e,catchError:!0,trustedTypesPolicy:A,amdModulesPattern:/^vs\//}),require([w],function(t){setTimeout(function(){let _=t.create((u,S)=>{self.postMessage(u,S)},null);for(self.onmessage=u=>_.onmessage(u.data,u.ports);d.length>0;)self.onmessage(d.shift())},0)})})};let f=!0,d=[];self.onmessage=w=>{if(!f){d.push(w);return}f=!1,C(w.data)}}()}).call(this);
//# sourceMappingURL=../../../../min-maps/vs/base/worker/workerMain.js.map