mirror of
https://github.com/renbaoshuo/S2OJ.git
synced 2024-11-22 23:28:40 +00:00
3 lines
61 KiB
JavaScript
3 lines
61 KiB
JavaScript
|
/*! monaco-markdown v0.0.12 | github.com/traff/monaco-markdown */
|
||
|
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("monaco-editor")):"function"==typeof define&&define.amd?define("MonacoMarkdown",["vs/editor/editor.main"],t):"object"==typeof exports?exports.MonacoMarkdown=t(require("monaco-editor")):e.MonacoMarkdown=t(e.monaco)}(window,function(n){return r=[function(e,t){e.exports=n},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.SnippetString=t.TextEditorSelectionChangeKind=t.TextEditorRevealType=t.WorkspaceEdit=t.TextEdit=t.EndOfLine=t.Selection=t.Range=t.Position=t.values=void 0;var o=n(9);function a(e){var t=[];return e.forEach(function(e){return t.push(e)}),t}t.values=a;var s=(c.Min=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];if(0===e.length)throw new TypeError;for(var n=e[0],r=1;r<e.length;r++){var i=e[r];i.isBefore(n)&&(n=i)}return n},c.Max=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];if(0===e.length)throw new TypeError;for(var n=e[0],r=1;r<e.length;r++){var i=e[r];i.isAfter(n)&&(n=i)}return n},c.isPosition=function(e){if(!e)return!1;if(e instanceof c)return!0;var t=e.line,e=e.character;return"number"==typeof t&&"number"==typeof e},Object.defineProperty(c.prototype,"line",{get:function(){return this._line},enumerable:!1,configurable:!0}),Object.defineProperty(c.prototype,"character",{get:function(){return this._character},enumerable:!1,configurable:!0}),c.prototype.isBefore=function(e){return this._line<e._line||!(e._line<this._line)&&this._character<e._character},c.prototype.isBeforeOrEqual=function(e){return this._line<e._line||!(e._line<this._line)&&this._character<=e._character},c.prototype.isAfter=function(e){return!this.isBeforeOrEqual(e)},c.prototype.isAfterOrEqual=function(e){return!this.isBefore(e)},c.prototype.isEqual=function(e){return this._line===e._line&&this._character===e._character},c.prototype.compareTo=function(e){return this._line<e._line?-1:this._line>e.line?1:this._character<e._character?-1:this._character>e._character?1:0},c.prototype.translate=function(e,t){if(void 0===t&&(t=0),null===e||null===t)throw o.illegalArgument();var n;return void 0===e?n=0:"number"==typeof e?n=e:(n="number"==typeof e.lineDelta?e.lineDelta:0,t="number"==typeof e.characterDelta?e.characterDelta:0),0===n&&0===t?this:new c(this.line+n,this.character+t)},c.prototype.with=function(e,t){if(void 0===t&&(t=this.character),null===e||null===t)throw o.illegalArgument();var n;return void 0===e?n=this.line:"number"==typeof e?n=e:(n=("number"==typeof e.line?e:this).line,t=("number"==typeof e.character?e:this).character),n===this.line&&t===this.character?this:new c(n,t)},c.prototype.toJSON=function(){return{line:this.line,character:this.character}},c);function c(e,t){if(e<0)throw o.illegalArgument("line must be non-negative");if(t<0)throw o.illegalArgument("character must be non-negative");this._line=e,this._character=t}t.Position=s;var l=(u.isRange=function(e){return e instanceof u||!!e&&(s.isPosition(e.start)&&s.isPosition(e.end))},Object.defineProperty(u.prototype,"start",{get:function(){return this._start},enumerable:!1,configurable:!0}),Object.defineProperty(u.prototype,"end",{get:function(){return this._end},enumerable:!1,configurable:!0}),u.prototype.contains=function(e){return e instanceof u?this.contains(e._start)&&this.contains(e._end):e instanceof s&&(!e.isBefore(this._start)&&!this._end.isBefore(e))},u.prototype.isEqual=function(e){return this._start.isEqual(e._start)&&this._end.isEqual(e._end)},u.prototype.intersection=function(e){var t=s.Max(e.start,this._start),e=s.Min(e.end,this._end);if(!t.isAfter(e))return new u(t,e)},u.prototype.union=function(e){return this.contains(e)?this:e.contains(this)?e:new u(s.Min(e.start,this._start)
|