Auto-push
This commit is contained in:
1 parent
e9d34f9af0
commit
b028b1df5b
769 files changed
+509481
-1
No files matched your search
@@ -0,0 +1,11 @@
|
||||
/*!-----------------------------------------------------------
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Version: 0.8.1(91da4276775da6adafaed44281946344f57800cd)
|
||||
* Released under the MIT license
|
||||
* https://github.com/Microsoft/vscode/blob/master/LICENSE.txt
|
||||
*-----------------------------------------------------------*/
|
||||
(function(){var e,t=["exports","require","vs/base/common/winjs.base","vs/base/common/platform","vs/base/common/errors","vs/base/common/event","vs/editor/common/core/range","vs/editor/common/core/position","vs/editor/common/core/uint","vs/base/common/lifecycle","vs/base/common/uri","vs/base/common/diff/diff","vs/base/common/cancellation","vs/base/common/map","vs/base/common/functional","vs/base/common/strings","vs/base/common/types","vs/base/common/async","vs/base/common/keyCodes","vs/base/common/callbackList","vs/editor/common/core/selection","vs/editor/common/core/token","vs/base/common/diff/diffChange","vs/editor/common/core/characterClassifier","vs/editor/common/diff/diffComputer","vs/editor/common/model/wordHelper","vs/editor/common/modes/linkComputer","vs/editor/common/modes/supports/inplaceReplaceSupport","vs/editor/common/standalone/standaloneBase","vs/editor/common/viewModel/prefixSumComputer","vs/editor/common/model/mirrorModel2","vs/base/common/worker/simpleWorker","vs/editor/common/services/editorSimpleWorker","vs/base/common/winjs.base.raw"],n=function(e){for(var n=[],r=0,i=e.length;r<i;r++)n[r]=t[e[r]];return n},r=this;!function(e){e.global=r,e.isNode="undefined"!=typeof module&&!!module.exports,e.isWindows=function(){return!!("undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.indexOf("Windows")>=0)||"undefined"!=typeof process&&"win32"===process.platform}(),e.isWebWorker="function"==typeof e.global.importScripts,e.isElectronRenderer="undefined"!=typeof process&&"undefined"!=typeof process.versions&&"undefined"!=typeof process.versions.electron&&"renderer"===process.type,e.isElectronMain="undefined"!=typeof process&&"undefined"!=typeof process.versions&&"undefined"!=typeof process.versions.electron&&"browser"===process.type,e.hasPerformanceNow=e.global.performance&&"function"==typeof e.global.performance.now}(e||(e={}));var e;!function(e){function t(){return e.hasPerformanceNow?e.global.performance.now():Date.now()}var n;!function(e){e[e.LoaderAvailable=1]="LoaderAvailable",e[e.BeginLoadingScript=10]="BeginLoadingScript",e[e.EndLoadingScriptOK=11]="EndLoadingScriptOK",e[e.EndLoadingScriptError=12]="EndLoadingScriptError",e[e.BeginInvokeFactory=21]="BeginInvokeFactory",e[e.EndInvokeFactory=22]="EndInvokeFactory",e[e.NodeBeginEvaluatingScript=31]="NodeBeginEvaluatingScript",e[e.NodeEndEvaluatingScript=32]="NodeEndEvaluatingScript",e[e.NodeBeginNativeRequire=33]="NodeBeginNativeRequire",e[e.NodeEndNativeRequire=34]="NodeEndNativeRequire"}(n=e.LoaderEventType||(e.LoaderEventType={})),e.getHighPerformanceTimestamp=t;var r=function(){function e(e,t,n){this.type=e,this.detail=t,this.timestamp=n}return e}();e.LoaderEvent=r;var i=function(){function e(e){this._events=[new r(n.LoaderAvailable,"",e)]}return e.prototype.record=function(e,n){this._events.push(new r(e,n,t()))},e.prototype.getEvents=function(){return this._events},e}();e.LoaderEventRecorder=i;var o=function(){function e(){}return e.prototype.record=function(e,t){},e.prototype.getEvents=function(){return[]},e}();o.INSTANCE=new o,e.NullLoaderEventRecorder=o}(e||(e={}));var e;!function(e){var t=function(){function t(){}return t.fileUriToFilePath=function(t){if(t=decodeURI(t),e.isWindows){if(/^file:\/\/\//.test(t))return t.substr(8);if(/^file:\/\//.test(t))return t.substr(5)}else if(/^file:\/\//.test(t))return t.substr(7);return t},t.startsWith=function(e,t){return e.length>=t.length&&e.substr(0,t.length)===t},t.endsWith=function(e,t){return e.length>=t.length&&e.substr(e.length-t.length)===t},t.containsQueryString=function(e){return/^[^\#]*\?/gi.test(e)},t.isAbsolutePath=function(e){return/^((http:\/\/)|(https:\/\/)|(file:\/\/)|(\/))/.test(e)},t.forEachProperty=function(e,t){if(e){var n=void 0;for(n in e)e.hasOwnProperty(n)&&t(n,e[n])}},t.isEmpty=function(e){var n=!0;return t.forEachProperty(e,function(){n=!1}),n},t.recursiveClone=function(e){if(!e||"object"!=typeof e)return e;var n=Array.isArray(e)?[]:{};return t.forEachProperty(e,function(e,r){r&&"object"==typeof r?n[e]=t.recursiveClone(r):n[e]=r}),n},t.generateAnonymousModule=function(){return"===anonymous"+t.NEXT_ANONYMOUS_ID++ +"==="},t.isAnonymousModule=function(e){return/^===anonymous/.test(e)},t}();t.NEXT_ANONYMOUS_ID=1,e.Utilities=t}(e||(e={}));var e;!function(e){var t=function(){function t(){}return t.validateConfigurationOptions=function(t){function n(e){return"load"===e.errorCode?(console.error('Loading "'+e.moduleId+'" failed'),console.error("Detail: ",e.detail),e.detail&&e.detail.stack&&console.error(e.detail.stack),console.error("Here are the modules that depend on it:"),void console.error(e.neededBy)):"factory"===e.errorCode?(console.error('The factory method of "'+e.moduleId+'" has thrown an exception'),console.error(e.detail),void(e.detail&&e.detail.stack&&console.error(e.detail.stack))):void 0}return t=t||{},"string"!=typeof t.baseUrl&&(t.baseUrl=""),"boolean"!=typeof t.isBuild&&(t.isBuild=!1),"object"!=typeof t.paths&&(t.paths={}),"object"!=typeof t.confLine truncated
|
||||
P=h,S.AddModifiedElement(h+1,m),N=b+1-e):(h=c[b-1]+1,m=h-N-i,h<P&&S.MarkNextChange(),P=h-1,S.AddOriginalElement(h,m+1),N=b-1-e),M>=0&&(c=this.m_forwardHistory[M],e=c[0],L=1,A=c.length-1);while(--M>=-1);if(E=S.getReverseChanges(),y[0]){var w=p[0]+1,D=g[0]+1;if(null!==E&&E.length>0){var I=E[E.length-1];w=Math.max(w,I.getOriginalEnd()),D=Math.max(D,I.getModifiedEnd())}C=[new n.DiffChange(w,d-w+1,D,_-D+1)]}else{S=new a,L=s,A=u,N=p[0]-g[0]-l,P=Number.MAX_VALUE,M=v?this.m_reverseHistory.length-1:this.m_reverseHistory.length-2;do b=N+o,b===L||b<A&&f[b-1]>=f[b+1]?(h=f[b+1]-1,m=h-N-l,h>P&&S.MarkNextChange(),P=h+1,S.AddOriginalElement(h+1,m+1),N=b+1-o):(h=f[b-1],m=h-N-l,h>P&&S.MarkNextChange(),P=h,S.AddModifiedElement(h+1,m+1),N=b-1-o),M>=0&&(f=this.m_reverseHistory[M],o=f[0],L=1,A=f.length-1);while(--M>=-1);C=S.getChanges()}return this.ConcatenateChanges(E,C)},e.prototype.ComputeRecursionPoint=function(e,t,r,i,o,a,l){var c,f,h,d=0,p=0,m=0,_=0;e--,r--,o[0]=0,a[0]=0,this.m_forwardHistory=[],this.m_reverseHistory=[];var g=t-e+(i-r),v=g+1,y=new Array(v),b=new Array(v),E=i-r,C=t-e,S=e-r,L=t-i,A=C-E,N=A%2===0;y[E]=e,b[C]=t,l[0]=!1;var P,M;for(h=1;h<=g/2+1;h++){var w=0,D=0;for(d=this.ClipDiagonalBound(E-h,h,E,v),p=this.ClipDiagonalBound(E+h,h,E,v),P=d;P<=p;P+=2){for(c=P===d||P<p&&y[P-1]<y[P+1]?y[P+1]:y[P-1]+1,f=c-(P-E)-S,M=c;c<t&&f<i&&this.ElementsAreEqual(c+1,f+1);)c++,f++;if(y[P]=c,c+f>w+D&&(w=c,D=f),!N&&Math.abs(P-C)<=h-1&&c>=b[P])return o[0]=c,a[0]=f,M<=b[P]&&u>0&&h<=u+1?this.WALKTRACE(E,d,p,S,C,m,_,L,y,b,c,t,o,f,i,a,N,l):null}var I=(w-e+(D-r)-h)/2;if(null!==this.ContinueProcessingPredicate&&!this.ContinueProcessingPredicate(w,this.OriginalSequence,I))return l[0]=!0,o[0]=w,a[0]=D,I>0&&u>0&&h<=u+1?this.WALKTRACE(E,d,p,S,C,m,_,L,y,b,c,t,o,f,i,a,N,l):(e++,r++,[new n.DiffChange(e,t-e+1,r,i-r+1)]);for(m=this.ClipDiagonalBound(C-h,h,C,v),_=this.ClipDiagonalBound(C+h,h,C,v),P=m;P<=_;P+=2){for(c=P===m||P<_&&b[P-1]>=b[P+1]?b[P+1]-1:b[P-1],f=c-(P-C)-L,M=c;c>e&&f>r&&this.ElementsAreEqual(c,f);)c--,f--;if(b[P]=c,N&&Math.abs(P-E)<=h&&c<=y[P])return o[0]=c,a[0]=f,M>=y[P]&&u>0&&h<=u+1?this.WALKTRACE(E,d,p,S,C,m,_,L,y,b,c,t,o,f,i,a,N,l):null}if(h<=u){var k=new Array(p-d+2);k[0]=E-d+1,s.Copy(y,d,k,1,p-d+1),this.m_forwardHistory.push(k),k=new Array(_-m+2),k[0]=C-m+1,s.Copy(b,m,k,1,_-m+1),this.m_reverseHistory.push(k)}}return this.WALKTRACE(E,d,p,S,C,m,_,L,y,b,c,t,o,f,i,a,N,l)},e.prototype.ConcatenateChanges=function(e,t){var n=[],r=null;return 0===e.length||0===t.length?t.length>0?t:e:this.ChangesOverlap(e[e.length-1],t[0],n)?(r=new Array(e.length+t.length-1),s.Copy(e,0,r,0,e.length-1),r[e.length-1]=n[0],s.Copy(t,1,r,e.length,t.length-1),r):(r=new Array(e.length+t.length),s.Copy(e,0,r,0,e.length),s.Copy(t,0,r,e.length,t.length),r)},e.prototype.ChangesOverlap=function(e,t,r){if(o.Assert(e.originalStart<=t.originalStart,"Left change is not less than or equal to right change"),o.Assert(e.modifiedStart<=t.modifiedStart,"Left change is not less than or equal to right change"),e.originalStart+e.originalLength>=t.originalStart||e.modifiedStart+e.modifiedLength>=t.modifiedStart){var i=e.originalStart,s=e.originalLength,u=e.modifiedStart,a=e.modifiedLength;return e.originalStart+e.originalLength>=t.originalStart&&(s=t.originalStart+t.originalLength-e.originalStart),e.modifiedStart+e.modifiedLength>=t.modifiedStart&&(a=t.modifiedStart+t.modifiedLength-e.modifiedStart),r[0]=new n.DiffChange(i,s,u,a),!0}return r[0]=null,!1},e.prototype.ClipDiagonalBound=function(e,t,n,r){if(e>=0&&e<r)return e;var i=n,o=r-n-1,s=t%2===0;if(e<0){var u=i%2===0;return s===u?0:1}var a=o%2===0;return s===a?r-1:r-2},e}();t.LcsDiff=c}),i(t[14],n([1,0]),function(e,t){"use strict";function n(e){return function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return!e.apply(void 0,t)}}function r(e){var t,n=this,r=!1;return function(){return r?t:(r=!0,t=e.apply(n,arguments))}}t.not=n,t.once=r}),i(t[18],n([1,0]),function(e,t){"use strict";function n(e,t){var n=[];e(n);for(var r={},i=0,s=n.length;i<s;i++)n[i]&&(r[n[i]]=i);t(r);var u={};for(var a in r)r.hasOwnProperty(a)&&(u[a]=r[a],u[a.toLowerCase()]=r[a]);return new o(n,u)}function r(e,t){var n=(65535&t)<<16>>>0;return(e|n)>>>0}var i;!function(e){e[e.Unknown=0]="Unknown",e[e.Backspace=1]="Backspace",e[e.Tab=2]="Tab",e[e.Enter=3]="Enter",e[e.Shift=4]="Shift",e[e.Ctrl=5]="Ctrl",e[e.Alt=6]="Alt",e[e.PauseBreak=7]="PauseBreak",e[e.CapsLock=8]="CapsLock",e[e.Escape=9]="Escape",e[e.Space=10]="Space",e[e.PageUp=11]="PageUp",e[e.PageDown=12]="PageDown",e[e.End=13]="End",e[e.Home=14]="Home",e[e.LeftArrow=15]="LeftArrow",e[e.UpArrow=16]="UpArrow",e[e.RightArrow=17]="RightArrow",e[e.DownArrow=18]="DownArrow",e[e.Insert=19]="Insert",e[e.Delete=20]="Delete",e[e.KEY_0=21]="KEY_0",e[e.KEY_1=22]="KEY_1",e[e.KEY_2=23]="KEY_2",e[e.KEY_3=24]="KEY_3",e[e.KEY_4=25]="KEY_4",e[e.KEY_5=26]="KEY_5",e[e.KEY_6=27]="KEY_6",e[e.KEY_7=28]="KEY_7",e[e.KEY_8=29]="KEY_8",e[e.KEY_9=30]="KEY_9",e[e.KEY_A=31]="KEY_A",e[e.KEY_B=32]="KEY_B",e[e.KEY_C=33]Line truncated
|
||||
this._callbacks&&(this._callbacks.dispose(),this._callbacks=void 0,this._disposed=!0)},e}();v._noop=function(){},t.Emitter=v;var y=function(){function e(){var e=this;this.hasListeners=!1,this.events=[],this.emitter=new v({onFirstListenerAdd:function(){return e.onFirstListenerAdd()},onLastListenerRemove:function(){return e.onLastListenerRemove()}})}return Object.defineProperty(e.prototype,"event",{get:function(){return this.emitter.event},enumerable:!0,configurable:!0}),e.prototype.add=function(e){var t=this,r={event:e,listener:null};this.events.push(r),this.hasListeners&&this.hook(r);var o=function(){t.hasListeners&&t.unhook(r);var e=t.events.indexOf(r);t.events.splice(e,1)};return n.toDisposable(i.once(o))},e.prototype.onFirstListenerAdd=function(){var e=this;this.hasListeners=!0,this.events.forEach(function(t){return e.hook(t)})},e.prototype.onLastListenerRemove=function(){var e=this;this.hasListeners=!1,this.events.forEach(function(t){return e.unhook(t)})},e.prototype.hook=function(e){var t=this;e.listener=e.event(function(e){return t.emitter.fire(e)})},e.prototype.unhook=function(e){e.listener.dispose(),e.listener=null},e.prototype.dispose=function(){this.emitter.dispose()},e}();t.EventMultiplexer=y,t.fromEventEmitter=o,t.fromCallback=s,t.fromPromise=u,t.delayed=a,t.once=l,t.any=c,t.debounceEvent=f;var b=function(){function e(){this.buffers=[]}return e.prototype.wrapEvent=function(e){var t=this;return function(n,r,i){return e(function(e){var i=t.buffers[t.buffers.length-1];i?i.push(function(){return n.call(r,e)}):n.call(r,e)},void 0,i)}},e.prototype.bufferEvents=function(e){var t=[];this.buffers.push(t),e(),this.buffers.pop(),t.forEach(function(e){return e()})},e}();t.EventBufferer=b,t.mapEvent=h,t.filterEvent=d;var E=function(){function e(e){this._event=e}return Object.defineProperty(e.prototype,"event",{get:function(){return this._event},enumerable:!0,configurable:!0}),e.prototype.map=function(t){return new e(h(this._event,t))},e.prototype.filter=function(t){return new e(d(this._event,t))},e.prototype.on=function(e,t,n){return this._event(e,t,n)},e}();t.chain=p,t.stopwatch=m,t.buffer=_}),i(t[12],n([1,0,5]),function(e,t,n){"use strict";var r,i=Object.freeze(function(e,t){var n=setTimeout(e.bind(t),0);return{dispose:function(){clearTimeout(n)}}});!function(e){e.None=Object.freeze({isCancellationRequested:!1,onCancellationRequested:n.default.None}),e.Cancelled=Object.freeze({isCancellationRequested:!0,onCancellationRequested:i})}(r=t.CancellationToken||(t.CancellationToken={}));var o=function(){function e(){this._isCancelled=!1}return e.prototype.cancel=function(){this._isCancelled||(this._isCancelled=!0,this._emitter&&(this._emitter.fire(void 0),this._emitter=void 0))},Object.defineProperty(e.prototype,"isCancellationRequested",{get:function(){return this._isCancelled},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"onCancellationRequested",{get:function(){return this._isCancelled?i:(this._emitter||(this._emitter=new n.Emitter),this._emitter.event)},enumerable:!0,configurable:!0}),e}(),s=function(){function e(){}return Object.defineProperty(e.prototype,"token",{get:function(){return this._token||(this._token=new o),this._token},enumerable:!0,configurable:!0}),e.prototype.cancel=function(){this._token?this._token.cancel():this._token=r.Cancelled},e.prototype.dispose=function(){this.cancel()},e}();t.CancellationTokenSource=s}),i(t[10],n([1,0,3]),function(e,t,n){"use strict";function r(e){return"%"+e.charCodeAt(0).toString(16).toUpperCase()}function i(e){return encodeURIComponent(e).replace(/[!'()*]/g,r)}function o(e){return e}var s=function(){function e(){this._scheme=e._empty,this._authority=e._empty,this._path=e._empty,this._query=e._empty,this._fragment=e._empty,this._formatted=null,this._fsPath=null}return e.isUri=function(t){return t instanceof e||!!t&&("string"==typeof t.authority&&"string"==typeof t.fragment&&"string"==typeof t.path&&"string"==typeof t.query&&"string"==typeof t.scheme)},Object.defineProperty(e.prototype,"scheme",{get:function(){return this._scheme},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"authority",{get:function(){return this._authority},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"path",{get:function(){return this._path},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"query",{get:function(){return this._query},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"fragment",{get:function(){return this._fragment},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"fsPath",{get:function(){if(!this._fsPath){var t;t=this._authority&&this._path&&"file"===this.scheme?"//"+this._authority+this._path:e._driveLetterPath.test(this._path)?this._path[1].toLowerCase()+this._path.substr(2):this._path,n.isWindows&&(t=t.replace(/\//g,"\\")),this._fsPath=t}return this._fsPath},enumerable:!0,configurable:!0}),e.prototype.with=function(t){if(!t)return this;var n=t.scheme,r=t.authority,iLine truncated
|
||||
factory:e,c:n,e:r,p:i}),t.consume()})},e.prototype.consume=function(){for(var e=this;this.outstandingPromises.length&&this.runningPromises<this.maxDegreeOfParalellism;){var t=this.outstandingPromises.shift();this.runningPromises++;var n=t.factory();n.done(t.c,t.e,t.p),n.done(function(){return e.consumed()},function(){return e.consumed()})}},e.prototype.consumed=function(){this.runningPromises--,this.outstandingPromises.length>0?this.consume():this._onFinished.fire()},e.prototype.dispose=function(){this._onFinished.dispose()},e}();t.Limiter=A;var N=function(e){function t(){return e.call(this,1)||this}return o(t,e),t}(A);t.Queue=N;var P=function(e){function t(){var t=e.call(this)||this;return t._token=-1,t}return o(t,e),t.prototype.dispose=function(){this.cancel(),e.prototype.dispose.call(this)},t.prototype.cancel=function(){this._token!==-1&&(r.clearTimeout(this._token),this._token=-1)},t.prototype.cancelAndSet=function(e,t){var n=this;this.cancel(),this._token=r.setTimeout(function(){n._token=-1,e()},t)},t.prototype.setIfNotSet=function(e,t){var n=this;this._token===-1&&(this._token=r.setTimeout(function(){n._token=-1,e()},t))},t}(u.Disposable);t.TimeoutTimer=P;var M=function(e){function t(){var t=e.call(this)||this;return t._token=-1,t}return o(t,e),t.prototype.dispose=function(){this.cancel(),e.prototype.dispose.call(this)},t.prototype.cancel=function(){this._token!==-1&&(r.clearInterval(this._token),this._token=-1)},t.prototype.cancelAndSet=function(e,t){this.cancel(),this._token=r.setInterval(function(){e()},t)},t}(u.Disposable);t.IntervalTimer=M;var w=function(){function e(e,t){this.timeoutToken=-1,this.runner=e,this.timeout=t,this.timeoutHandler=this.onTimeout.bind(this)}return e.prototype.dispose=function(){this.cancel(),this.runner=null},e.prototype.cancel=function(){this.isScheduled()&&(r.clearTimeout(this.timeoutToken),this.timeoutToken=-1)},e.prototype.setRunner=function(e){this.runner=e},e.prototype.schedule=function(e){void 0===e&&(e=this.timeout),this.cancel(),this.timeoutToken=r.setTimeout(this.timeoutHandler,e)},e.prototype.isScheduled=function(){return this.timeoutToken!==-1},e.prototype.onTimeout=function(){this.timeoutToken=-1,this.runner&&this.runner()},e}();t.RunOnceScheduler=w,t.nfcall=_,t.ninvoke=g}),i(t[31],n([1,0,4,9,2,17,3]),function(e,t,n,r,i,s,u){"use strict";function a(e){u.isWeb&&(f||(f=!0,console.warn("Could not create web worker(s). Falling back to loading web worker code in main thread, which might cause UI freezes. Please see https://github.com/Microsoft/monaco-editor#faq")),console.warn(e.message))}function l(e){return new p(e)}var c="$initialize",f=!1;t.logOnceWebWorkerWarning=a;var h=function(){function e(e){this._workerId=-1,this._handler=e,this._lastSentReq=0,this._pendingReplies=Object.create(null)}return e.prototype.setWorkerId=function(e){this._workerId=e},e.prototype.sendMessage=function(e,t){var n=String(++this._lastSentReq),r={c:null,e:null},o=new i.TPromise(function(e,t,n){r.c=e,r.e=t},function(){});return this._pendingReplies[n]=r,this._send({vsWorker:this._workerId,req:n,method:e,args:t}),o},e.prototype.handleMessage=function(e){var t;try{t=JSON.parse(e)}catch(e){}t.vsWorker&&(this._workerId!==-1&&t.vsWorker!==this._workerId||this._handleMessage(t))},e.prototype._handleMessage=function(e){var t=this;if(e.seq){var r=e;if(!this._pendingReplies[r.seq])return void console.warn("Got reply to unknown seq");var i=this._pendingReplies[r.seq];if(delete this._pendingReplies[r.seq],r.err){var o=r.err;return r.err.$isError&&(o=new Error,o.name=r.err.name,o.message=r.err.message,o.stack=r.err.stack),void i.e(o)}return void i.c(r.res)}var s=e,u=s.req,a=this._handler.handleMessage(s.method,s.args);a.then(function(e){t._send({vsWorker:t._workerId,seq:u,res:e,err:void 0})},function(e){t._send({vsWorker:t._workerId,seq:u,res:void 0,err:n.transformErrorForSerialization(e)})})},e.prototype._send=function(e){var t=JSON.stringify(e);this._handler.sendMessage(t)},e}(),d=function(e){function t(t,n){var r=e.call(this)||this;r._lastRequestTimestamp=-1;var o=null,s=null;r._worker=r._register(t.create("vs/base/common/worker/simpleWorker",function(e){r._protocol.handleMessage(e)},function(e){s(e)})),r._protocol=new h({sendMessage:function(e){r._worker.postMessage(e)},handleMessage:function(e,t){return i.TPromise.as(null)}}),r._protocol.setWorkerId(r._worker.getId());var u=null,a=self.require;"function"==typeof a.getConfig?u=a.getConfig():"undefined"!=typeof self.requirejs&&(u=self.requirejs.s.contexts._.config),r._lazyProxy=new i.TPromise(function(e,t,n){o=e,s=t},function(){}),r._onModuleLoaded=r._protocol.sendMessage(c,[r._worker.getId(),n,u]),r._onModuleLoaded.then(function(e){for(var t={},n=0;n<e.length;n++)t[e[n]]=f(e[n],l);o(t)},function(e){s(e),r._onError("Worker failed to load "+n,e)});var l=function(e,t){return r._request(e,t)},f=function(e,t){return function(){var n=Array.prototype.slice.call(arguments,0);return t(e,n)}};return r}return o(t,e),t.prototype.getProxyObject=functionLine truncated
|
||||
},Object.defineProperty(e.prototype,"version",{get:function(){return this._versionId},enumerable:!0,configurable:!0}),e.prototype.getText=function(){return this._lines.join(this._eol)},e.prototype.onEvents=function(e){for(var t=null,n=0,r=e.length;n<r;n++){var i=e[n];i.eol&&(t=i.eol)}t&&t!==this._eol&&(this._eol=t,this._lineStarts=null);for(var o=-1,n=0,r=e.length;n<r;n++){var i=e[n];this._acceptDeleteRange(i.range),this._acceptInsertText({lineNumber:i.range.startLineNumber,column:i.range.startColumn},i.text),o=Math.max(o,i.versionId)}o!==-1&&(this._versionId=o)},e.prototype._ensureLineStarts=function(){if(!this._lineStarts){for(var e=this._eol.length,t=this._lines.length,r=new Uint32Array(t),i=0;i<t;i++)r[i]=this._lines[i].length+e;this._lineStarts=new n.PrefixSumComputer(r)}},e.prototype._setLineText=function(e,t){this._lines[e]=t,this._lineStarts&&this._lineStarts.changeValue(e,this._lines[e].length+this._eol.length)},e.prototype._acceptDeleteRange=function(e){if(e.startLineNumber===e.endLineNumber){if(e.startColumn===e.endColumn)return;return void this._setLineText(e.startLineNumber-1,this._lines[e.startLineNumber-1].substring(0,e.startColumn-1)+this._lines[e.startLineNumber-1].substring(e.endColumn-1))}this._setLineText(e.startLineNumber-1,this._lines[e.startLineNumber-1].substring(0,e.startColumn-1)+this._lines[e.endLineNumber-1].substring(e.endColumn-1)),this._lines.splice(e.startLineNumber,e.endLineNumber-e.startLineNumber),this._lineStarts&&this._lineStarts.removeValues(e.startLineNumber,e.endLineNumber-e.startLineNumber)},e.prototype._acceptInsertText=function(e,t){if(0!==t.length){var n=t.split(/\r\n|\r|\n/);if(1===n.length)return void this._setLineText(e.lineNumber-1,this._lines[e.lineNumber-1].substring(0,e.column-1)+n[0]+this._lines[e.lineNumber-1].substring(e.column-1));n[n.length-1]+=this._lines[e.lineNumber-1].substring(e.column-1),this._setLineText(e.lineNumber-1,this._lines[e.lineNumber-1].substring(0,e.column-1)+n[0]);for(var r=new Uint32Array(n.length-1),i=1;i<n.length;i++)this._lines.splice(e.lineNumber+i-1,0,n[i]),r[i-1]=n[i].length+this._eol.length;this._lineStarts&&this._lineStarts.insertValues(e.lineNumber,r)}},e}();t.MirrorModel2=r}),i(t[32],n([1,0,10,2,6,24,11,7,30,26,27,25,28]),function(e,t,n,r,i,s,u,a,l,c,f,h,d){"use strict";function p(){return new g}var m=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),Object.defineProperty(t.prototype,"uri",{get:function(){return this._uri},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"version",{get:function(){return this._versionId},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"eol",{get:function(){return this._eol},enumerable:!0,configurable:!0}),t.prototype.getValue=function(){return this.getText()},t.prototype.getLinesContent=function(){return this._lines.slice(0)},t.prototype.getLineCount=function(){return this._lines.length},t.prototype.getLineContent=function(e){return this._lines[e-1]},t.prototype.getWordAtPosition=function(e,t){var n=h.getWordAtText(e.column,h.ensureValidWordDefinition(t),this._lines[e.lineNumber-1],0);return n?new i.Range(e.lineNumber,n.startColumn,e.lineNumber,n.endColumn):null},t.prototype.getWordUntilPosition=function(e,t){var n=this.getWordAtPosition(e,t);return n?{word:this._lines[e.lineNumber-1].substring(n.startColumn-1,e.column-1),startColumn:n.startColumn,endColumn:e.column}:{word:"",startColumn:e.column,endColumn:e.column}},t.prototype._getAllWords=function(e){var t=this,n=[];return this._lines.forEach(function(r){t._wordenize(r,e).forEach(function(e){n.push(r.substring(e.start,e.end))})}),n},t.prototype.getAllUniqueWords=function(e,t){var n=!1,r=Object.create(null);return this._getAllWords(e).filter(function(e){return t&&!n&&t===e?(n=!0,!1):!r[e]&&(r[e]=!0,!0)})},t.prototype._wordenize=function(e,t){var n,r=[];for(t.lastIndex=0;(n=t.exec(e))&&0!==n[0].length;)r.push({start:n.index,end:n.index+n[0].length});return r},t.prototype.getValueInRange=function(e){if(e=this._validateRange(e),e.startLineNumber===e.endLineNumber)return this._lines[e.startLineNumber-1].substring(e.startColumn-1,e.endColumn-1);var t=this._eol,n=e.startLineNumber-1,r=e.endLineNumber-1,i=[];i.push(this._lines[n].substring(e.startColumn-1));for(var o=n+1;o<r;o++)i.push(this._lines[o]);return i.push(this._lines[r].substring(0,e.endColumn-1)),i.join(t)},t.prototype.offsetAt=function(e){return e=this._validatePosition(e),this._ensureLineStarts(),this._lineStarts.getAccumulatedValue(e.lineNumber-2)+(e.column-1)},t.prototype.positionAt=function(e){e=Math.floor(e),e=Math.max(0,e),this._ensureLineStarts();var t=this._lineStarts.getIndexOf(e),n=this._lines[t.index].length;return{lineNumber:1+t.index,column:1+Math.min(t.remainder,n)}},t.prototype._validateRange=function(e){var t=this._validatePosition({lineNumber:e.startLineNumber,column:e.startColumn}),n=this._validatePosition({lineNumber:e.endLineNumber,column:e.endColumn});return t.lineNumber!==e.startLineNumber||Line truncated
|
||||
Reference in new issue
Block a user