diff --git a/index.html b/index.html index 9e088672..af75bc07 100644 --- a/index.html +++ b/index.html @@ -1 +1 @@ -
".concat(e,"
")},i.codeBlockRenderer&&(g.code=function(e,t){var n=i.codeBlockRenderer(t,e),r=ye.a.nextId();return(0,fe.eP)(Promise.all([n,f]),u.token).then((function(e){var t;if(!s&&e){var n=c.querySelector('div[data-code="'.concat(r,'"]'));n&&l.reset(n,e[0]),null===(t=i.asyncRenderCallback)||void 0===t||t.call(i)}}))["catch"]((function(){})),'t&&(B=t-T);var W=B-T,V=W+I;W>R+1?(0!==O&&c.fillRect(Z,M,A,R-M),M=W,R=V):V>R&&(R=V)}c.fillRect(Z,M,A,R-M)}this._settings.renderBorder&&this._settings.borderColor&&this._settings.overviewRulerLanes>0&&(c.beginPath(),c.lineWidth=1,c.strokeStyle=this._settings.borderColor,c.moveTo(0,0),c.lineTo(0,t),c.stroke(),c.moveTo(0,0),c.lineTo(e,0),c.stroke())}else this._domNode.setBackgroundColor(this._settings.backgroundColor?this._settings.backgroundColor:"")}}]),n}(R),hn=n(65289),fn=function(e){(0,l.Z)(n,e);var t=(0,u.Z)(n);function n(e,i){var r;(0,c.Z)(this,n),r=t.call(this),r._context=e;var s=r._context.configuration.options;return r._domNode=(0,D.X)(document.createElement("canvas")),r._domNode.setClassName(i),r._domNode.setPosition("absolute"),r._domNode.setLayerHinting(!0),r._domNode.setContain("strict"),r._zoneManager=new hn.Tj((function(e){return r._context.viewLayout.getVerticalOffsetForLineNumber(e)})),r._zoneManager.setDOMWidth(0),r._zoneManager.setDOMHeight(0),r._zoneManager.setOuterHeight(r._context.viewLayout.getScrollHeight()),r._zoneManager.setLineHeight(s.get(58)),r._zoneManager.setPixelRatio(s.get(128)),r._context.addEventHandler((0,o.Z)(r)),r}return(0,d.Z)(n,[{key:"dispose",value:function(){this._context.removeEventHandler(this),(0,s.Z)((0,a.Z)(n.prototype),"dispose",this).call(this)}},{key:"onConfigurationChanged",value:function(e){var t=this._context.configuration.options;return e.hasChanged(58)&&(this._zoneManager.setLineHeight(t.get(58)),this._render()),e.hasChanged(128)&&(this._zoneManager.setPixelRatio(t.get(128)),this._domNode.setWidth(this._zoneManager.getDOMWidth()),this._domNode.setHeight(this._zoneManager.getDOMHeight()),this._domNode.domNode.width=this._zoneManager.getCanvasWidth(),this._domNode.domNode.height=this._zoneManager.getCanvasHeight(),this._render()),!0}},{key:"onFlushed",value:function(e){return this._render(),!0}},{key:"onScrollChanged",value:function(e){return e.scrollHeightChanged&&(this._zoneManager.setOuterHeight(e.scrollHeight),this._render()),!0}},{key:"onZonesChanged",value:function(e){return this._render(),!0}},{key:"getDomNode",value:function(){return this._domNode.domNode}},{key:"setLayout",value:function(e){this._domNode.setTop(e.top),this._domNode.setRight(e.right);var t=!1;t=this._zoneManager.setDOMWidth(e.width)||t,t=this._zoneManager.setDOMHeight(e.height)||t,t&&(this._domNode.setWidth(this._zoneManager.getDOMWidth()),this._domNode.setHeight(this._zoneManager.getDOMHeight()),this._domNode.domNode.width=this._zoneManager.getCanvasWidth(),this._domNode.domNode.height=this._zoneManager.getCanvasHeight(),this._render())}},{key:"setZones",value:function(e){this._zoneManager.setZones(e),this._render()}},{key:"_render",value:function(){if(0===this._zoneManager.getOuterHeight())return!1;var e=this._zoneManager.getCanvasWidth(),t=this._zoneManager.getCanvasHeight(),n=this._zoneManager.resolveColorZones(),i=this._zoneManager.getId2Color(),r=this._domNode.domNode.getContext("2d");return r.clearRect(0,0,e,t),n.length>0&&this._renderOneLane(r,n,i,e),!0}},{key:"_renderOneLane",value:function(e,t,n,i){var o,s=0,a=0,l=0,u=(0,r.Z)(t);try{for(u.s();!(o=u.n()).done;){var c=o.value,d=c.colorId,h=c.from,f=c.to;d!==s?(e.fillRect(0,a,i,l-a),s=d,e.fillStyle=n[s],a=h,l=f):l>=h?l=Math.max(l,f):(e.fillRect(0,a,i,l-a),a=h,l=f)}}catch(g){u.e(g)}finally{u.f()}e.fillRect(0,a,i,l-a)}}]),n}(M),gn=function(e){(0,l.Z)(n,e);var t=(0,u.Z)(n);function n(e){var i;(0,c.Z)(this,n),i=t.call(this,e),i.domNode=(0,D.X)(document.createElement("div")),i.domNode.setAttribute("role","presentation"),i.domNode.setAttribute("aria-hidden","true"),i.domNode.setClassName("view-rulers"),i._renderedRulers=[];var r=i._context.configuration.options;return i._rulers=r.get(90),i._typicalHalfwidthCharacterWidth=r.get(43).typicalHalfwidthCharacterWidth,i}return(0,d.Z)(n,[{key:"dispose",value:function(){(0,s.Z)((0,a.Z)(n.prototype),"dispose",this).call(this)}},{key:"onConfigurationChanged",value:function(e){var t=this._context.configuration.options;return this._rulers=t.get(90),this._typicalHalfwidthCharacterWidth=t.get(43).typicalHalfwidthCharacterWidth,!0}},{key:"onScrollChanged",value:function(e){return e.scrollHeightChanged}},{key:"prepareRender",value:function(e){}},{key:"_ensureRulersCount",value:function(){var e=this._renderedRulers.length,t=this._rulers.length;if(e!==t)if(e 0?o.wrappedTextIndentLength:0,y=_+Math.max(v-c,0),b=_+Math.min(p-c,d);y!==b&&r.push(new Wt.Wx(y,b,m.inlineClassName,m.inlineClassNameAffectsLetterSpacing))}}h+=g}}else{var k=this.getInputStartOffsetOfOutputLineIndex(n),C=this.getInputEndOffsetOfOutputLineIndex(n),w=e.getLineTokens(t);i=w.sliceAndInflate(k,C,s),r=null}var S=i.getLineContent();n>0&&(S=Zi(o.wrappedTextIndentLength)+S);var L=this._lineBreakData.getMinOutputOffset(n)+1,x=S.length+1,N=n+1r+1?(n.push(new le.e(i,1,r,1)),i=a.startLineNumber,r=a.endLineNumber):a.endLineNumber>r&&(r=a.endLineNumber)}return n.push(new le.e(i,1,r,1)),n}var Pi,Fi=function(){function e(t,n){(0,c.Z)(this,e),this.modelLineNumber=t,this.modelLineWrappedLineIdx=n}return(0,d.Z)(e,[{key:"isWrappedLineContinuation",get:function(){return this.modelLineWrappedLineIdx>0}}]),e}(),Bi=(0,d.Z)((function e(t,n){(0,c.Z)(this,e),this.modelRange=t,this.viewLines=n})),Wi=function(){function e(t){(0,c.Z)(this,e),this._lines=t}return(0,d.Z)(e,[{key:"convertViewPositionToModelPosition",value:function(e){return this._lines.convertViewPositionToModelPosition(e.lineNumber,e.column)}},{key:"convertViewRangeToModelRange",value:function(e){return this._lines.convertViewRangeToModelRange(e)}},{key:"validateViewPosition",value:function(e,t){return this._lines.validateViewPosition(e.lineNumber,e.column,t)}},{key:"validateViewRange",value:function(e,t){return this._lines.validateViewRange(e,t)}},{key:"convertModelPositionToViewPosition",value:function(e,t){return this._lines.convertModelPositionToViewPosition(e.lineNumber,e.column,t)}},{key:"convertModelRangeToViewRange",value:function(e,t){return this._lines.convertModelRangeToViewRange(e,t)}},{key:"modelPositionIsVisible",value:function(e){return this._lines.modelPositionIsVisible(e.lineNumber,e.column)}},{key:"getModelLineViewLineCount",value:function(e){return this._lines.getModelLineViewLineCount(e)}},{key:"getViewLineNumberOfModelPosition",value:function(e,t){return this._lines.getViewLineNumberOfModelPosition(e,t)}}]),e}(),Vi=function(){function e(t){(0,c.Z)(this,e),this.model=t}return(0,d.Z)(e,[{key:"dispose",value:function(){}},{key:"createCoordinatesConverter",value:function(){return new Hi(this)}},{key:"getHiddenAreas",value:function(){return[]}},{key:"setHiddenAreas",value:function(e){return!1}},{key:"setTabSize",value:function(e){return!1}},{key:"setWrappingSettings",value:function(e,t,n,i){return!1}},{key:"createLineBreaksComputer",value:function(){var e=[];return{addRequest:function(t,n,i){e.push(null)},finalize:function(){return e}}}},{key:"onModelFlushed",value:function(){}},{key:"onModelLinesDeleted",value:function(e,t,n){return new Gn(t,n)}},{key:"onModelLinesInserted",value:function(e,t,n,i){return new Qn(t,n)}},{key:"onModelLineChanged",value:function(e,t,n){return[!1,new qn(t,t),null,null]}},{key:"acceptVersionId",value:function(e){}},{key:"getViewLineCount",value:function(){return this.model.getLineCount()}},{key:"getActiveIndentGuide",value:function(e,t,n){return{startLineNumber:e,endLineNumber:e,indent:0}}},{key:"getViewLinesBracketGuides",value:function(e,t,n){return new Array(t-e+1).fill([])}},{key:"getViewLinesIndentGuides",value:function(e,t){for(var n=t-e+1,i=new Array(n),r=0;r
":(0,mi.F)(c,u.inflate(),t,d,h,s,E.ED)}return a}},{key:"_getColorMap",value:function(){var e=Ft.RW.getColorMap(),t=["#000000"];if(e)for(var n=1,i=e.length;n2&&void 0!==arguments[2]?arguments[2]:0;this._withViewEventsCollector((function(r){return n._cursor.setSelections(r,e,t,i)}))}},{key:"saveCursorState",value:function(){return this._cursor.saveState()}},{key:"restoreCursorState",value:function(e){var t=this;this._withViewEventsCollector((function(n){return t._cursor.restoreState(n,e)}))}},{key:"_executeCursorEdit",value:function(e){this._cursor.context.cursorConfig.readOnly?this._eventDispatcher.emitOutgoingEvent(new ui):this._withViewEventsCollector(e)}},{key:"executeEdits",value:function(e,t,n){var i=this;this._executeCursorEdit((function(r){return i._cursor.executeEdits(r,e,t,n)}))}},{key:"startComposition",value:function(){var e=this;this._cursor.setIsDoingComposition(!0),this._executeCursorEdit((function(t){return e._cursor.startComposition(t)}))}},{key:"endComposition",value:function(e){var t=this;this._cursor.setIsDoingComposition(!1),this._executeCursorEdit((function(n){return t._cursor.endComposition(n,e)}))}},{key:"type",value:function(e,t){var n=this;this._executeCursorEdit((function(i){return n._cursor.type(i,e,t)}))}},{key:"compositionType",value:function(e,t,n,i,r){var o=this;this._executeCursorEdit((function(s){return o._cursor.compositionType(s,e,t,n,i,r)}))}},{key:"paste",value:function(e,t,n,i){var r=this;this._executeCursorEdit((function(o){return r._cursor.paste(o,e,t,n,i)}))}},{key:"cut",value:function(e){var t=this;this._executeCursorEdit((function(n){return t._cursor.cut(n,e)}))}},{key:"executeCommand",value:function(e,t){var n=this;this._executeCursorEdit((function(i){return n._cursor.executeCommand(i,e,t)}))}},{key:"executeCommands",value:function(e,t){var n=this;this._executeCursorEdit((function(i){return n._cursor.executeCommands(i,e,t)}))}},{key:"revealPrimaryCursor",value:function(e,t){var n=this;this._withViewEventsCollector((function(i){return n._cursor.revealPrimary(i,e,t,0)}))}},{key:"revealTopMostCursor",value:function(e){var t=this._cursor.getTopMostViewPosition(),n=new le.e(t.lineNumber,t.column,t.lineNumber,t.column);this._withViewEventsCollector((function(t){return t.emitViewEvent(new Yn(e,n,null,0,!0,0))}))}},{key:"revealBottomMostCursor",value:function(e){var t=this._cursor.getBottomMostViewPosition(),n=new le.e(t.lineNumber,t.column,t.lineNumber,t.column);this._withViewEventsCollector((function(t){return t.emitViewEvent(new Yn(e,n,null,0,!0,0))}))}},{key:"revealRange",value:function(e,t,n,i,r){this._withViewEventsCollector((function(o){return o.emitViewEvent(new Yn(e,n,null,i,t,r))}))}},{key:"getVerticalOffsetForLineNumber",value:function(e){return this.viewLayout.getVerticalOffsetForLineNumber(e)}},{key:"getScrollTop",value:function(){return this.viewLayout.getCurrentScrollTop()}},{key:"setScrollTop",value:function(e,t){this.viewLayout.setScrollPosition({scrollTop:e},t)}},{key:"setScrollPosition",value:function(e,t){this.viewLayout.setScrollPosition(e,t)}},{key:"deltaScrollNow",value:function(e,t){this.viewLayout.deltaScrollNow(e,t)}},{key:"changeWhitespace",value:function(e){var t=this.viewLayout.changeWhitespace(e);t&&(this._eventDispatcher.emitSingleViewEvent(new ti),this._eventDispatcher.emitOutgoingEvent(new ai))}},{key:"setMaxLineWidth",value:function(e){this.viewLayout.setMaxLineWidth(e)}},{key:"_withViewEventsCollector",value:function(e){try{var t=this._eventDispatcher.beginEmitViewEvents();e(t)}finally{this._eventDispatcher.endEmitViewEvents()}}},{key:"normalizePosition",value:function(e,t){return this._lines.normalizePosition(e,t)}},{key:"getLineIndentColumn",value:function(e){return this._lines.getLineIndentColumn(e)}}]),n}(C.JT),qi=function(){function e(){(0,c.Z)(this,e),this._asMap=Object.create(null),this.asArray=[]}return(0,d.Z)(e,[{key:"accept",value:function(e,t,n,i,r){var o=this._asMap[e];if(o){var s=o.data,a=s[s.length-3],l=s[s.length-1];if(a===r&&l+1>=n)return void(i>l&&(s[s.length-1]=i));s.push(r,n,i)}else{var u=new Wt.SQ(e,t,[r,n,i]);this._asMap[e]=u,this.asArray.push(u)}}}]),e}(),Gi=n(27757),Qi=n(43021),Yi=n(68804),$i=n(18938),Ji=n(65798),Xi=n(69913),er=n(6886),tr=function(){function e(t,n,i,r,o){(0,c.Z)(this,e),this.injectionOffsets=t,this.injectionOptions=n,this.breakOffsets=i,this.breakOffsetsVisibleColumn=r,this.wrappedTextIndentLength=o}return(0,d.Z)(e,[{key:"getOutputLineCount",value:function(){return this.breakOffsets.length}},{key:"getMinOutputOffset",value:function(e){return e>0?this.wrappedTextIndentLength:0}},{key:"getLineLength",value:function(e){var t=e>0?this.breakOffsets[e-1]:0,n=this.breakOffsets[e],i=n-t;return e>0&&(i+=this.wrappedTextIndentLength),i}},{key:"getMaxOutputOffset",value:function(e){return this.getLineLength(e)}},{key:"translateToInputOffset",value:function(e,t){e>0&&(t=Math.max(0,t-this.wrappedTextIndentLength));var n=0===e?t:this.breakOffsets[e-1]+t,i=n;if(null!==this.injectionOffsets)for(var r=0;rn&&(o=0)}}return o}var fr=null===(Pi=window.trustedTypes)||void 0===Pi?void 0:Pi.createPolicy("domLineBreaksComputer",{createHTML:function(e){return e}}),gr=function(){function e(){(0,c.Z)(this,e)}return(0,d.Z)(e,[{key:"createLineBreaksComputer",value:function(e,t,n,i){var r=[],o=[];return{addRequest:function(e,t,n){r.push(e),o.push(t)},finalize:function(){return vr(r,e,t,n,i,o)}}}}],[{key:"create",value:function(){return new e}}]),e}();function vr(e,t,n,i,r,o){var s;function a(t){var n=o[t];if(n){var i=Pn.gk.applyInjectedText(e[t],n),r=n.map((function(e){return e.options})),s=n.map((function(e){return e.column-1}));return new tr(s,r,[i.length],[],0)}return null}if(-1===i){for(var l=[],u=0,c=e.length;u=65536?2:1,c=h}o.K7(u)||o.C8(u)?a+=2:a+=1}}return a}},{key:"visibleColumnFromColumn2",value:function(e,t,n){return this.visibleColumnFromColumn(t.getLineContent(n.lineNumber),n.column,e.tabSize)}},{key:"columnFromVisibleColumn",value:function(t,n,i){if(n<=0)return 1;var r=t.length,s=0,a=1,l=0;while(l1&&(null===r||void 0===r?void 0:r.endLineNumber)!==h.lineNumber?(f=h.lineNumber-1,g=t.getLineMaxColumn(h.lineNumber-1),v=h.lineNumber,p=t.getLineMaxColumn(h.lineNumber)):(f=h.lineNumber,g=1,v=h.lineNumber,p=t.getLineMaxColumn(h.lineNumber));var m=new c.e(f,g,v,p);r=m,m.isEmpty()?i[o]=null:i[o]=new a.T4(m,"")}else i[o]=null;else i[o]=new a.T4(u,"")}return new l.Tp(0,i,{shouldPushStackElementBefore:!0,shouldPushStackElementAfter:!0})}}]),e}()},71361:(e,t,n)=>{"use strict";n.d(t,{N:()=>i,P:()=>h});var i,r=n(13087),o=n(62833),s=(n(21249),n(82526),n(41817),n(37479)),a=n(14269),l=n(62541),u=n(54826),c=n(33501),d=n(56665),h=function(){function e(){(0,r.Z)(this,e)}return(0,o.Z)(e,null,[{key:"addCursorDown",value:function(e,t,n){for(var i=[],r=0,o=0,s=t.length;ol&&(u=l,h=e.model.getLineMaxColumn(u)),a.Vi.fromModelState(new a.rS(new d.e(o.lineNumber,1,u,h),0,new c.L(u,h),0))}var f=t.modelState.selectionStart.getStartPosition().lineNumber;if(o.lineNumber{"use strict";n.d(t,{N:()=>s,q:()=>a});var i=n(13087),r=n(62833),o=(n(51532),n(41539),n(78783),n(33948),n(39575),n(82472),n(48675),n(92990),n(18927),n(33105),n(35035),n(74345),n(7174),n(63408),n(14590),n(32846),n(44731),n(77209),n(96319),n(58867),n(37789),n(33739),n(29368),n(14483),n(12056),n(3462),n(30678),n(27462),n(33824),n(55021),n(12974),n(15016),n(23767),n(8585),n(68696),n(95242)),s=function(){function e(t){(0,i.Z)(this,e);var n=(0,o.K)(t);this._defaultValue=n,this._asciiMap=e._createAsciiMap(n),this._map=new Map}return(0,r.Z)(e,[{key:"set",value:function(e,t){var n=(0,o.K)(t);e>=0&&e<256?this._asciiMap[e]=n:this._map.set(e,n)}},{key:"get",value:function(e){return e>=0&&e<256?this._asciiMap[e]:this._map.get(e)||this._defaultValue}}],[{key:"_createAsciiMap",value:function(e){for(var t=new Uint8Array(256),n=0;n<256;n++)t[n]=e;return t}}]),e}(),a=function(){function e(){(0,i.Z)(this,e),this._actual=new s(0)}return(0,r.Z)(e,[{key:"add",value:function(e){this._actual.set(e,1)}},{key:"has",value:function(e){return 1===this._actual.get(e)}}]),e}()},87940:(e,t,n)=>{"use strict";n.d(t,{h:()=>s});var i=n(13087),r=n(62833),o=n(56665),s=function(){function e(){(0,i.Z)(this,e)}return(0,r.Z)(e,null,[{key:"insert",value:function(e,t){return{range:new o.e(e.lineNumber,e.column,e.lineNumber,e.column),text:t,forceMoveMarkers:!0}}},{key:"delete",value:function(e){return{range:e,text:null}}},{key:"replace",value:function(e,t){return{range:e,text:t}}},{key:"replaceMove",value:function(e,t){return{range:e,text:t,forceMoveMarkers:!0}}}]),e}()},94750:(e,t,n)=>{"use strict";n.d(t,{A:()=>s});var i=n(13087),r=n(62833),o=(n(57658),n(39575),n(41539),n(29135),n(48675),n(92990),n(18927),n(33105),n(35035),n(74345),n(7174),n(63408),n(14590),n(32846),n(44731),n(77209),n(96319),n(58867),n(37789),n(33739),n(29368),n(14483),n(12056),n(3462),n(30678),n(27462),n(33824),n(55021),n(12974),n(15016),n(23767),n(8585),n(68696),n(59956)),s=function(){function e(t,n,r){(0,i.Z)(this,e),this._lineTokensBrand=void 0,this._tokens=t,this._tokensCount=this._tokens.length>>>1,this._text=n,this._languageIdCodec=r}return(0,r.Z)(e,[{key:"equals",value:function(t){return t instanceof e&&this.slicedEquals(t,0,this._tokensCount)}},{key:"slicedEquals",value:function(e,t,n){if(this._text!==e._text)return!1;if(this._tokensCount!==e._tokensCount)return!1;for(var i=t<<1,r=i+(n<<1),o=i;on)&&(1!==i&&(2===i||t))}function z(e,t,n,i,r){var o=M(e),s=0===o||2===o,a=1===o||2===o,l=n-t,u=i,c=Math.min(l,u),d=e.start,h=!1,f=e.end,g=!1;t<=d&&f<=n&&O(e)&&(e.start=t,h=!0,e.end=t,g=!0);var v=r?1:l>0?2:0;if(!h&&H(d,s,t,v)&&(h=!0),!g&&H(f,a,t,v)&&(g=!0),c>0&&!r){var p=l>u?2:0;!h&&H(d,s,t+c,p)&&(h=!0),!g&&H(f,a,t+c,p)&&(g=!0)}var m=r?1:0;!h&&H(d,s,n,m)&&(e.start=t+u,h=!0),!g&&H(f,a,n,m)&&(e.end=t+u,g=!0);var _=u-l;h||(e.start=Math.max(0,d+_)),g||(e.end=Math.max(0,f+_)),e.start>e.end&&(e.end=e.start)}function K(e,t,n){var i=e.root,r=0,o=0,s=0,a=0,l=[],u=0;while(i!==B)if(I(i))T(i.left,!1),T(i.right,!1),i===i.parent.right&&(r-=i.parent.delta),i=i.parent;else{if(!I(i.left)){if(o=r+i.maxEnd,o0&&T[j-1].lineNumber===G)){var Q=T[j].oldContent,Y=this.getLineContent(G);0!==Y.length&&Y!==Q&&-1===m.LC(Y)&&U.push(G)}}}return this._onDidChangeContent.fire(),new w.je(P,K,U)}},{key:"_reduceOperations",value:function(e){return e.length<1e3?e:[this._toSingleEditOperation(e)]}},{key:"_toSingleEditOperation",value:function(e){for(var t=!1,n=e[0].range,i=e[e.length-1].range,r=new k.e(n.startLineNumber,n.startColumn,i.endLineNumber,i.endColumn),s=n.startLineNumber,a=n.startColumn,l=[],u=0,c=e.length;u