|
|
(window.webpackJsonp=window.webpackJsonp||[]).push([[26],{"+3Gp":function(mt,M,t){"use strict";t.d(M,"a",function(){return A}),t.d(M,"b",function(){return I});var g=t("MNsG"),B=t("Yr1X");const x=g.f?1.5:1.35,R=8;class A{constructor(v){this._bareFontInfoBrand=void 0,this.zoomLevel=v.zoomLevel,this.pixelRatio=v.pixelRatio,this.fontFamily=String(v.fontFamily),this.fontWeight=String(v.fontWeight),this.fontSize=v.fontSize,this.fontFeatureSettings=v.fontFeatureSettings,this.lineHeight=v.lineHeight|0,this.letterSpacing=v.letterSpacing}static createFromValidatedSettings(v,C,m,d){const D=v.get(42),L=v.get(46),r=v.get(45),w=v.get(44),b=v.get(58),u=v.get(55);return A._create(D,L,r,w,b,u,C,m,d)}static _create(v,C,m,d,D,L,r,w,b){D===0?D=x*m:D<R&&(D=D*m),D=Math.round(D),D<R&&(D=R);const u=1+(b?0:B.a.getZoomLevel()*.1);return m*=u,D*=u,new A({zoomLevel:r,pixelRatio:w,fontFamily:v,fontWeight:C,fontSize:m,fontFeatureSettings:d,lineHeight:D,letterSpacing:L})}getId(){return this.zoomLevel+"-"+this.pixelRatio+"-"+this.fontFamily+"-"+this.fontWeight+"-"+this.fontSize+"-"+this.fontFeatureSettings+"-"+this.lineHeight+"-"+this.letterSpacing}getMassagedFontFamily(v){const C=A._wrapInQuotes(this.fontFamily);return v&&this.fontFamily!==v?`${C}, ${v}`:C}static _wrapInQuotes(v){return/[,"']/.test(v)?v:/[+ ]/.test(v)?`"${v}"`:v}}const j=1;class I extends A{constructor(v,C){super(v);this._editorStylingBrand=void 0,this.version=j,this.isTrusted=C,this.isMonospace=v.isMonospace,this.typicalHalfwidthCharacterWidth=v.typicalHalfwidthCharacterWidth,this.typicalFullwidthCharacterWidth=v.typicalFullwidthCharacterWidth,this.canUseHalfwidthRightwardsArrow=v.canUseHalfwidthRightwardsArrow,this.spaceWidth=v.spaceWidth,this.middotWidth=v.middotWidth,this.wsmiddotWidth=v.wsmiddotWidth,this.maxDigitWidth=v.maxDigitWidth}equals(v){return this.fontFamily===v.fontFamily&&this.fontWeight===v.fontWeight&&this.fontSize===v.fontSize&&this.fontFeatureSettings===v.fontFeatureSettings&&this.lineHeight===v.lineHeight&&this.letterSpacing===v.letterSpacing&&this.typicalHalfwidthCharacterWidth===v.typicalHalfwidthCharacterWidth&&this.typicalFullwidthCharacterWidth===v.typicalFullwidthCharacterWidth&&this.canUseHalfwidthRightwardsArrow===v.canUseHalfwidthRightwardsArrow&&this.spaceWidth===v.spaceWidth&&this.middotWidth===v.middotWidth&&this.wsmiddotWidth===v.wsmiddotWidth&&this.maxDigitWidth===v.maxDigitWidth}}},"+7oY":function(mt,M,t){"use strict";t.d(M,"a",function(){return R}),t.d(M,"g",function(){return A}),t.d(M,"b",function(){return j}),t.d(M,"f",function(){return I}),t.d(M,"d",function(){return C}),t.d(M,"c",function(){return m}),t.d(M,"e",function(){return d});var g=t("CRAX"),B=t("Cg/j"),x=t("ic2d");const R=Object(B.c)("configurationService");function A(D,L){const r=Object.create(null);for(let w in D)j(r,w,D[w],L);return r}function j(D,L,r,w){const b=L.split("."),u=b.pop();let c=D;for(let p=0;p<b.length;p++){let S=b[p],E=c[S];switch(typeof E){case"undefined":E=c[S]=Object.create(null);break;case"object":break;default:w(`Ignoring ${L} as ${b.slice(0,p+1).join(".")} is ${JSON.stringify(E)}`);return}c=E}if(typeof c=="object"&&c!==null)try{c[u]=r}catch(p){w(`Ignoring ${L} as ${b.join(".")} is ${JSON.stringify(c)}`)}else w(`Ignoring ${L} as ${b.join(".")} is ${JSON.stringify(c)}`)}function I(D,L){const r=L.split(".");v(D,r)}function v(D,L){const r=L.shift();if(L.length===0){delete D[r];return}if(Object.keys(D).indexOf(r)!==-1){const w=D[r];typeof w=="object"&&!Array.isArray(w)&&(v(w,L),Object.keys(w).length===0&&delete D[r])}}function C(D,L,r){function w(c,p){let S=c;for(const E of p){if(typeof S!="object"||S===null)return;S=S[E]}return S}const b=L.split("."),u=w(D,b);return typeof u=="undefined"?r:u}function m(){const D=x.a.as(g.a.Configuration).getConfigurationProperties();return Object.keys(D)}function d(){const D=Object.create(null),L=x.a.as(g.a.Configuration).getConfigurationProperties();for(let r in L){let w=L[r].default;j(D,r,w,b=>console.error(`Conflict in default settings: ${b}`))}return D}},"+Fos":function(mt,M,t){"use strict";t.d(M,"a",function(){return I});var g=t("Ll0s"),B=t("cGHE"),x=t("aokT"),R=t("N0LK"),A=t("cIqD");class j{constructor(v,C,m){this._cursorPositionBrand=void 0,this.lineNumber=v,this.column=C,this.leftoverVisibleColumns=m}}class I{static leftPosition(v,C){if(C.column>v.getLineMinColumn(C.lineNumber))return C.delta(void 0,-R.L(v.getLineContent(C.lineNumber),C.column-1));if(C.lineNumber>1){const m=C.lineNumber-1;return new B.a(m,v.getLineMaxColumn(m))}else return C}static leftPositionAtomicSoftTabs(v,C,m){if(C.column<=v.getLineIndentColumn(C.lineNumber)){const d=v.getLineMinColumn(C.lineNumber),D=v.getLineContent(C.lineNumber),L=A.a.atomicPosition(D,C.column-1,m,0);if(L!==-1&&L+1>=d)return new B.a(C.lineNumber,L+1)}return this.leftPosition(v,C)}static left(v,C,m){const d=v.stickyTabStops?I.leftPositionAtomicSoftTabs(C,m,v.tabSize):I.leftPosition(C,m);return new j(d.lineNumber,d.column,0)}static moveLeft(v,C,m,d,D){let L,r;if(m.hasSelection()&&!d)L=m.selection.startLineNumber,r=m.selection.startColumn;else{const w=m.position.delta(void 0,-(D-1)),b=C.normalizePosition(I.clipPositionColumn(w,C),0),u=I.left(v,C,b);L=u.lineNumber,r=u.column}return m.move(d,L,r,0)}static clipPositionColumn(v,C){return new B.a(v.lineNumber,I.clipRange(v.column,C.getLineMinColumn(v.lineNumber),C.getLineMaxColumn(v.lineNumber)))}static clipRange(v,C,m){return v<C?C:v>m?m:v}static rightPosition(v,C,m){return m<v.getLineMaxColumn(C)?m=m+R.K(v.getLineContent(C),m-1):C<v.getLineCount()&&(C=C+1,m=v.getLineMinColumn(C)),new B.a(C,m)}static rightPositionAtomicSoftTabs(v,C,m,d,D){if(m<v.getLineIndentColumn(C)){const L=v.getLineContent(C),r=A.a.atomicPosition(L,m-1,d,1);if(r!==-1)return new B.a(C,r+1)}return this.rightPosition(v,C,m)}static right(v,C,m){const d=v.stickyTabStops?I.rightPositionAtomicSoftTabs(C,m.lineNumber,m.column,v.tabSize,v.indentSize):I.rightPosition(C,m.lineNumber,m.column);return new j(d.lineNumber,d.column,0)}static moveRight(v,C,m,d,D){let L,r;if(m.hasSelection()&&!d)L=m.selection.endLineNumber,r=m.selection.endColumn;else{const w=m.position.delta(void 0,D-1),b=C.normalizePosition(I.clipPositionColumn(w,C),1),u=I.right(v,C,b);L=u.lineNumber,r=u.column}return m.move(d,L,r,0)}static vertical(v,C,m,d,D,L,r){const w=g.a.visibleColumnFromColumn(C.getLineContent(m),d,v.tabSize)+D,b=C.getLineCount(),u=m===1&&d===1,c=m===b&&d===C.getLineMaxColumn(m),p=L<m?u:c;return m=L,m<1?(m=1,r?d=C.getLineMinColumn(m):d=Math.min(C.getLineMaxColumn(m),d)):m>b?(m=b,r?d=C.getLineMaxColumn(m):d=Math.min(C.getLineMaxColumn(m),d)):d=g.a.columnFromVisibleColumn2(v,C,m,w),p?D=0:D=w-g.a.visibleColumnFromColumn(C.getLineContent(m),d,v.tabSize),new j(m,d,D)}static down(v,C,m,d,D,L,r){return this.vertical(v,C,m,d,D,m+L,r)}static moveDown(v,C,m,d,D){let L,r;m.hasSelection()&&!d?(L=m.selection.endLineNumber,r=m.selection.endColumn):(L=m.position.lineNumber,r=m.position.column);let w=I.down(v,C,L,r,m.leftoverVisibleColumns,D,!0);return m.move(d,w.lineNumber,w.column,w.leftoverVisibleColumns)}static translateDown(v,C,m){let d=m.selection,D=I.down(v,C,d.selectionStartLineNumber,d.selectionStartColumn,m.selectionStartLeftoverVisibleColumns,1,!1),L=I.down(v,C,d.positionLineNumber,d.positionColumn,m.leftoverVisibleColumns,1,!1);return new g.f(new x.a(D.lineNumber,D.column,D.lineNumber,D.column),D.leftoverVisibleColumns,new B.a(L.lineNumber,L.column),L.leftoverVisibleColumns)}static up(v,C,m,d,D,L,r){return this.vertical(v,C,m,d,D,m-L,r)}static moveUp(v,C,m,d,D){let L,r;m.hasSelection()&&!d?(L=m.selection.startLineNumber,r=m.selection.startColumn):(L=m.position.lineNumber,r=m.position.column);let w=I.up(v,C,L,r,m.leftoverVisibleColumns,D,!0);return m.move(d,w.lineNumber,w.column,w.leftoverVisibleColumns)}static translateUp(v,C,m){let d=m.selection,D=I.up(v,C,d.selectionStartLineNumber,d.selectionStartColumn,m.selectionStartLeftoverVisibleColumns,1,!1),L=I.up(v,C,d.positionLineNumber,d.positionColumn,m.leftoverVisibleColumns,1,!1);return new g.f(new x.a(D.lineNumber,D.column,D.lineNumber,D.column),D.leftoverVisibleColumns,new B.a(L.lineNumber,L.column),L.leftoverVisibleColumns)}static _isBlankLine(v,C){return v.getLineFirstNonWhitespaceColumn(C)===0}static moveToPrevBlankLine(v,C,m,d){let D=m.position.lineNumber;for(;D>1&&this._isBlankLine(C,D);)D--;for(;D>1&&!this._isBlankLine(C,D);)D--;return m.move(d,D,C.getLineMinColumn(D),0)}static moveToNextBlankLine(v,C,m,d){const D=C.getLineCount();let L=m.position.lineNumber;for(;L<D&&this._isBlankLine(C,L);)L++;for(;L<D&&!this._isBlankLine(C,L);)L++;return m.move(d,L,C.getLineMinColumn(L),0)}static moveToBeginningOfLine(v,C,m,d){let D=m.position.lineNumber,L=C.getLineMinColumn(D),r=C.getLineFirstNonWhitespaceColumn(D)||L,w,b=m.position.column;return b===r?w=L:w=r,m.move(d,D,w,0)}static moveToEndOfLine(v,C,m,d,D){let L=m.position.lineNumber,r=C.getLineMaxColumn(L);return m.move(d,L,r,D?1073741824-r:0)}static moveToBeginningOfBuffer(v,C,m,d){return m.move(d,1,1,0)}static moveToEndOfBuffer(v,C,m,d){let D=C.getLineCount(),L=C.getLineMaxColumn(D);return m.move(d,D,L,0)}}},"+a1H":function(mt,M,t){"use strict";t.r(M);var g=t("+hIS");Object(g.a)({id:"handlebars",extensions:[".handlebars",".hbs"],aliases:["Handlebars","handlebars","hbs"],mimetypes:["text/x-handlebars-template"],loader:function(){return t.e(335).then(t.bind(null,"O3xE"))}})},"+hIS":function(mt,M,t){"use strict";t.d(M,"a",function(){return j});var g=t("+sZP"),B={},x={},R=function(){function I(v){var C=this;this._languageId=v,this._loadingTriggered=!1,this._lazyLoadPromise=new Promise(function(m,d){C._lazyLoadPromiseResolve=m,C._lazyLoadPromiseReject=d})}return I.getOrCreate=function(v){return x[v]||(x[v]=new I(v)),x[v]},I.prototype.whenLoaded=function(){return this._lazyLoadPromise},I.prototype.load=function(){var v=this;return this._loadingTriggered||(this._loadingTriggered=!0,B[this._languageId].loader().then(function(C){return v._lazyLoadPromiseResolve(C)},function(C){return v._lazyLoadPromiseReject(C)})),this._lazyLoadPromise},I}();function A(I){return R.getOrCreate(I).load()}function j(I){var v=I.id;B[v]=I,g.languages.register(I);var C=R.getOrCreate(v);g.languages.setMonarchTokensProvider(v,C.whenLoaded().then(function(m){return m.language})),g.languages.onLanguage(v,function(){C.load().then(function(m){g.languages.setLanguageConfiguration(v,m.conf)})})}},"+sZP":function(mt,M,t){"use strict";var g=t("M/lh"),B=t.n(g);t.o(g,"languages")&&t.d(M,"languages",function(){return g.languages})},"/6w4":function(mt,M,t){},"/RFl":function(mt,M,t){"use strict";t.r(M),t.d(M,"DragAndDropController",function(){return d});var g=t("pmY6"),B=t("MNsG"),x=t("OhnE"),R=t("sswD"),A=t("cGHE"),j=t("aokT"),I=t("gCVg"),v=t("tX9W");class C{constructor(D,L,r){this.selection=D,this.targetPosition=L,this.copy=r,this.targetSelection=null}getEditOperations(D,L){let r=D.getValueInRange(this.selection);if(this.copy||L.addEditOperation(this.selection,null),L.addEditOperation(new j.a(this.targetPosition.lineNumber,this.targetPosition.column,this.targetPosition.lineNumber,this.targetPosition.column),r),this.selection.containsPosition(this.targetPosition)&&!(this.copy&&(this.selection.getEndPosition().equals(this.targetPosition)||this.selection.getStartPosition().equals(this.targetPosition)))){this.targetSelection=this.selection;return}if(this.copy){this.targetSelection=new I.a(this.targetPosition.lineNumber,this.targetPosition.column,this.selection.endLineNumber-this.selection.startLineNumber+this.targetPosition.lineNumber,this.selection.startLineNumber===this.selection.endLineNumber?this.targetPosition.column+this.selection.endColumn-this.selection.startColumn:this.selection.endColumn);return}if(this.targetPosition.lineNumber>this.selection.endLineNumber){this.targetSelection=new I.a(this.targetPosition.lineNumber-this.selection.endLineNumber+this.selection.startLineNumber,this.targetPosition.column,this.targetPosition.lineNumber,this.selection.startLineNumber===this.selection.endLineNumber?this.targetPosition.column+this.selection.endColumn-this.selection.startColumn:this.selection.endColumn);return}if(this.targetPosition.lineNumber<this.selection.endLineNumber){this.targetSelection=new I.a(this.targetPosition.lineNumber,this.targetPosition.column,this.targetPosition.lineNumber+this.selection.endLineNumber-this.selection.startLineNumber,this.selection.startLineNumber===this.selection.endLineNumber?this.targetPosition.column+this.selection.endColumn-this.selection.startColumn:this.selection.endColumn);return}this.selection.endColumn<=this.targetPosition.column?this.targetSelection=new I.a(this.targetPosition.lineNumber-this.selection.endLineNumber+this.selection.startLineNumber,this.selection.startLineNumber===this.selection.endLineNumber?this.targetPosition.column-this.selection.endColumn+this.selection.startColumn:this.targetPosition.column-this.selection.endColumn+this.selection.startColumn,this.targetPosition.lineNumber,this.selection.startLineNumber===this.selection.endLineNumber?this.targetPosition.column:this.selection.endColumn):this.targetSelection=new I.a(this.targetPosition.lineNumber-this.selection.endLineNumber+this.selection.startLineNumber,this.targetPosition.column,this.targetPosition.lineNumber,this.targetPosition.column+this.selection.endColumn-this.selection.startColumn)}computeCursorState(D,L){return this.targetSelection}}function m(D){return B.f?D.altKey:D.ctrlKey}class d extends g.a{constructor(D){super();this._editor=D,this._register(this._editor.onMouseDown(L=>this._onEditorMouseDown(L))),this._register(this._editor.onMouseUp(L=>this._onEditorMouseUp(L))),this._register(this._editor.onMouseDrag(L=>this._onEditorMouseDrag(L))),this._register(this._editor.onMouseDrop(L=>this._onEditorMouseDrop(L))),this._register(this._editor.onMouseDropCanceled(()=>this._onEditorMouseDropCanceled())),this._register(this._editor.onKeyDown(L=>this.onEditorKeyDown(L))),this._register(this._editor.onKeyUp(L=>this.onEditorKeyUp(L))),this._register(this._editor.onDidBlurEditorWidget(()=>this.onEditorBlur())),this._register(this._editor.onDidBlurEditorText(()=>this.onEditorBlur())),this._dndDecorationIds=[],this._mouseDown=!1,this._modifierPressed=!1,this._dragSelection=null}onEditorBlur(){this._removeDecoration(),this._dragSelection=null,this._mouseDown=!1,this._modifierPressed=!1}onEditorKeyDown(D){if(!this._editor.getOption(31)||this._editor.getOption(18))return;m(D)&&(this._modifierPressed=!0),this._mouseDown&&m(D)&&this._editor.updateOptions({mouseStyle:"copy"})}onEditorKeyUp(D){if(!this._editor.getOption(31)||this._editor.getOption(18))return;m(D)&&(this._modifierPressed=!1),this._mouseDown&&D.keyCode===d.TRIGGER_KEY_VALUE&&this._editor.updateOptions({mouseStyle:"default"})}_onEditorMouseDown(D){this._mouseDown=!0}_onEditorMouseUp(D){this._mouseDown=!1,this._editor.updateOptions({mouseStyle:"text"})}_onEditorMouseDrag(D){let L=D.target;if(this._dragSelection===null){const r=this._editor.getSelections()||[];let w=r.filter(b=>L.position&&b.containsPosition(L.position));if(w.length===1)this._dragSelection=w[0];else return}m(D.event)?this._editor.updateOptions({mouseStyle:"copy"}):this._editor.updateOptions({mouseStyle:"default"}),L.position&&(this._dragSelection.containsPosition(L.position)?this._removeDecoration():this.showAt(L.position))}_onEditorMouseDropCanceled(){this._editor.updateOptions({mouseStyle:"text"}),this._removeDecoration(),this._dragSelection=null,this._mouseDown=!1}_onEditorMouseDrop(D){if(D.target&&(this._hitContent(D.target)||this._hitMargin(D.target))&&D.target.position){let L=new A.a(D.target.position.lineNumber,D.target.position.column);if(this._dragSelection===null){let r=null;if(D.event.shiftKey){let w=this._editor.getSelection();if(w){const{selectionStartLineNumber:b,selectionStartColumn:u}=w;r=[new I.a(b,u,L.lineNumber,L.column)]}}else r=(this._editor.getSelections()||[]).map(w=>w.containsPosition(L)?new I.a(L.lineNumber,L.column,L.lineNumber,L.column):w);this._editor.setSelections(r||[],"mouse",3)}else(!this._dragSelection.containsPosition(L)||(m(D.event)||this._modifierPressed)&&(this._dragSelection.getEndPosition().equals(L)||this._dragSelection.getStartPosition().equals(L)))&&(this._editor.pushUndoStop(),this._editor.executeCommand(d.ID,new C(this._dragSelection,L,m(D.event)||this._modifierPressed)),this._editor.pushUndoStop())}this._editor.updateOptions({mouseStyle:"text"}),this._removeDecoration(),this._dragSelection=null,this._mouseDown=!1}showAt(D){let L=[{range:new j.a(D.lineNumber,D.column,D.lineNumber,D.column),options:d._DECORATION_OPTIONS}];this._dndDecorationIds=this._editor.deltaDecorations(this._dndDecorationIds,L),this._editor.revealPosition(D,1)}_removeDecoration(){this._dndDecorationIds=this._editor.deltaDecorations(this._dndDecorationIds,[])}_hitContent(D){return D.type===6||D.type===7}_hitMargin(D){return D.type===2||D.type===3||D.type===4}dispose(){this._removeDecoration(),this._dragSelection=null,this._mouseDown=!1,this._modifierPressed=!1,super.dispose()}}d.ID="editor.contrib.dragAndDrop",d.TRIGGER_KEY_VALUE=B.f?6:5,d._DECORATION_OPTIONS=v.b.register({description:"dnd-target",className:"dnd-target"}),Object(R.l)(d.ID,d)},"/UlZ":function(mt,M,t){"use strict";t.d(M,"h",function(){return R}),t.d(M,"b",function(){return A}),t.d(M,"j",function(){return j}),t.d(M,"a",function(){return I}),t.d(M,"k",function(){return d}),t.d(M,"l",function(){return L}),t.d(M,"o",function(){return u}),t.d(M,"i",function(){return k}),t.d(M,"e",function(){return re}),t.d(M,"f",function(){return oe}),t.d(M,"n",function(){return fe}),t.d(M,"c",function(){return dt}),t.d(M,"d",function(){return Lt}),t.d(M,"m",function(){return Ht}),t.d(M,"g",function(){return ot});var g=t("3/fG"),B=t("MNsG"),x=t("0JNc");const R=8;class A{constructor(ce){this._values=ce}hasChanged(ce){return this._values[ce]}}class j{constructor(){this._values=[]}_read(ce){return this._values[ce]}get(ce){return this._values[ce]}_write(ce,Ve){this._values[ce]=Ve}}class I{constructor(){this.stableMinimapLayoutInput=null,this.stableFitMaxMinimapScale=0,this.stableFitRemainingWidth=0}}class v{constructor(ce,Ve,it,Et){this.id=ce,this.name=Ve,this.defaultValue=it,this.schema=Et}compute(ce,Ve,it){return it}}class C{constructor(ce,Ve=null){this.schema=void 0,this.id=ce,this.name="_never_",this.defaultValue=void 0,this.deps=Ve}validate(ce){return this.defaultValue}}class m{constructor(ce,Ve,it,Et){this.id=ce,this.name=Ve,this.defaultValue=it,this.schema=Et}validate(ce){return typeof ce=="undefined"?this.defaultValue:ce}compute(ce,Ve,it){return it}}function d(ce,Ve){return typeof ce=="undefined"?Ve:ce==="false"?!1:Boolean(ce)}class D extends m{constructor(ce,Ve,it,Et=void 0){typeof Et!="undefined"&&(Et.type="boolean",Et.default=it),super(ce,Ve,it,Et)}validate(ce){return d(ce,this.defaultValue)}}function L(ce,Ve,it,Et){if(typeof ce=="undefined")return Ve;let It=parseInt(ce,10);return isNaN(It)?Ve:(It=Math.max(it,It),It=Math.min(Et,It),It|0)}class r extends m{constructor(ce,Ve,it,Et,It,Rt=void 0){typeof Rt!="undefined"&&(Rt.type="integer",Rt.default=it,Rt.minimum=Et,Rt.maximum=It),super(ce,Ve,it,Rt),this.minimum=Et,this.maximum=It}static clampedInt(ce,Ve,it,Et){return L(ce,Ve,it,Et)}validate(ce){return r.clampedInt(ce,this.defaultValue,this.minimum,this.maximum)}}class w extends m{constructor(ce,Ve,it,Et,It){typeof It!="undefined"&&(It.type="number",It.default=it),super(ce,Ve,it,It),this.validationFn=Et}static clamp(ce,Ve,it){return ce<Ve?Ve:ce>it?it:ce}static float(ce,Ve){if(typeof ce=="number")return ce;if(typeof ce=="undefined")return Ve;const it=parseFloat(ce);return isNaN(it)?Ve:it}validate(ce){return this.validationFn(w.float(ce,this.defaultValue))}}class b extends m{static string(ce,Ve){return typeof ce!="string"?Ve:ce}constructor(ce,Ve,it,Et=void 0){typeof Et!="undefined"&&(Et.type="string",Et.default=it),super(ce,Ve,it,Et)}validate(ce){return b.string(ce,this.defaultValue)}}function u(ce,Ve,it){return typeof ce!="string"||it.indexOf(ce)===-1?Ve:ce}class c extends m{constructor(ce,Ve,it,Et,It=void 0){typeof It!="undefined"&&(It.type="string",It.enum=Et,It.default=it),super(ce,Ve,it,It),this._allowedValues=Et}validate(ce){return u(ce,this.defaultValue,this._allowedValues)}}class p extends v{constructor(ce,Ve,it,Et,It,Rt,vo=void 0){typeof vo!="undefined"&&(vo.type="string",vo.enum=It,vo.default=Et),super(ce,Ve,it,vo),this._allowedValues=It,this._convert=Rt}validate(ce){return typeof ce!="string"?this.defaultValue:this._allowedValues.indexOf(ce)===-1?this.defaultValue:this._convert(ce)}}function S(ce){switch(ce){case"none":return 0;case"keep":return 1;case"brackets":return 2;case"advanced":return 3;case"full":return 4}}class E extends v{constructor(){super(2,"accessibilitySupport",0,{type:"string",enum:["auto","on","off"],enumDescriptions:[g.a("accessibilitySupport.auto","The editor will use platform APIs to detect when a Screen Reader is attached."),g.a("accessibilitySupport.on","The editor will be permanently optimized for usage with a Screen Reader. Word wrapping will be disabled."),g.a("accessibilitySupport.off","The editor will never be optimized for usage with a Screen Reader.")],default:"auto",description:g.a("accessibilitySupport","Controls whether the editor should run in a mode where it is optimized for screen readers. Setting to on will disable word wrapping.")})}validate(ce){switch(ce){case"auto":return 0;case"off":return 1;case"on":return 2}return this.defaultValue}compute(ce,Ve,it){return it===0?ce.accessibilitySupport:it}}class y extends v{constructor(){const ce={insertSpace:!0,ignoreEmptyLines:!0};super(19,"comments",ce,{"editor.comments.insertSpace":{type:"boolean",default:ce.insertSpace,description:g.a("comments.insertSpace","Controls whether a space character is inserted when commenting.")},"editor.comments.ignoreEmptyLines":{type:"boolean",default:ce.ignoreEmptyLines,description:g.a("comments.ignoreEmptyLines","Controls if empty lines should be ignored with toggle, add or remove actions for line comments.")}})}validate(ce){if(!ce||typeof ce!="object")return this.defaultValue;const Ve=ce;return{insertSpace:d(Ve.insertSpace,this.defaultValue.insertSpace),ignoreEmptyLines:d(Ve.ignoreEmptyLines,this.defaultValue.ignoreEmptyLines)}}}function O(ce){switch(ce){case"blink":return 1;case"smooth":return 2;case"phase":return 3;case"expand":return 4;case"solid":return 5}}var k;(function(ce){ce[ce.Line=1]="Line",ce[ce.Block=2]="Block",ce[ce.Underline=3]="Underline",ce[ce.LineThin=4]="LineThin",ce[ce.BlockOutline=5]="BlockOutline",ce[ce.UnderlineThin=6]="UnderlineThin"})(k||(k={}));function Q(ce){switch(ce){case"line":return k.Line;case"block":return k.Block;case"underline":return k.Underline;case"line-thin":return k.LineThin;case"block-outline":return k.BlockOutline;case"underline-thin":return k.UnderlineThin}}class q extends C{constructor(){super(126,[65,33])}compute(ce,Ve,it){const Et=["monaco-editor"];return Ve.get(33)&&Et.push(Ve.get(33)),ce.extraEditorClassName&&Et.push(ce.extraEditorClassName),Ve.get(65)==="default"?Et.push("mouse-default"):Ve.get(65)==="copy"&&Et.push("mouse-copy"),Ve.get(99)&&Et.push("showUnused"),Ve.get(124)&&Et.push("showDeprecated"),Et.join(" ")}}class z extends D{constructor(){super(32,"emptySelectionClipboard",!0,{description:g.a("emptySelectionClipboard","Controls whether copying without a selection copies the current line.")})}compute(ce,Ve,it){return it&&ce.emptySelectionClipboard}}class J extends v{constructor(){const ce={cursorMoveOnType:!0,seedSearchStringFromSelection:"always",autoFindInSelection:"never",globalFindClipboard:!1,addExtraSpaceOnTop:!0,loop:!0};super(35,"find",ce,{"editor.find.cursorMoveOnType":{type:"boolean",default:ce.cursorMoveOnType,description:g.a("find.cursorMoveOnType","Controls whether the cursor should jump to find matches while typing.")},"editor.find.seedSearchStringFromSelection":{type:"string",enum:["never","always","selection"],default:ce.seedSearchStringFromSelection,enumDescriptions:[g.a("editor.find.seedSearchStringFromSelection.never","Never seed search string from the editor selection."),g.a("editor.find.seedSearchStringFromSelection.always","Always seed search string from the editor selection, including word at cursor position."),g.a("editor.find.seedSearchStringFromSelection.selection","Only seed search string from the editor selection.")],description:g.a("find.seedSearchStringFromSelection","Controls whether the search string in the Find Widget is seeded from the editor selection.")},"editor.find.autoFindInSelection":{type:"string",enum:["never","always","multiline"],default:ce.autoFindInSelection,enumDescriptions:[g.a("editor.find.autoFindInSelection.never","Never turn on Find in Selection automatically (default)."),g.a("editor.find.autoFindInSelection.always","Always turn on Find in Selection automatically."),g.a("editor.find.autoFindInSelection.multiline","Turn on Find in Selection automatically when multiple lines of content are selected.")],description:g.a("find.autoFindInSelection","Controls the condition for turning on Find in Selection automatically.")},"editor.find.globalFindClipboard":{type:"boolean",default:ce.globalFindClipboard,description:g.a("find.globalFindClipboard","Controls whether the Find Widget should read or modify the shared find clipboard on macOS."),included:B.f},"editor.find.addExtraSpaceOnTop":{type:"boolean",default:ce.addExtraSpaceOnTop,description:g.a("find.addExtraSpaceOnTop","Controls whether the Find Widget should add extra lines on top of the editor. When true, you can scroll beyond the first line when the Find Widget is visible.")},"editor.find.loop":{type:"boolean",default:ce.loop,description:g.a("find.loop","Controls whether the search automatically restarts from the beginning (or the end) when no further matches can be found.")}})}validate(ce){if(!ce||typeof ce!="object")return this.defaultValue;const Ve=ce;return{cursorMoveOnType:d(Ve.cursorMoveOnType,this.defaultValue.cursorMoveOnType),seedSearchStringFromSelection:typeof ce.seedSearchStringFromSelection=="boolean"?ce.seedSearchStringFromSelection?"always":"never":u(Ve.seedSearchStringFromSelection,this.defaultValue.seedSearchStringFromSelection,["never","always","selection"]),autoFindInSelection:typeof ce.autoFindInSelection=="boolean"?ce.autoFindInSelection?"always":"never":u(Ve.autoFindInSelection,this.defaultValue.autoFindInSelection,["never","always","multiline"]),globalFindClipboard:d(Ve.globalFindClipboard,this.defaultValue.globalFindClipboard),addExtraSpaceOnTop:d(Ve.addExtraSpaceOnTop,this.defaultValue.addExtraSpaceOnTop),loop:d(Ve.loop,this.defaultValue.loop)}}}class re extends v{constructor(){super(44,"fontLigatures",re.OFF,{anyOf:[{type:"boolean",description:g.a("fontLigatures","Enables/Disables font ligatures ('calt' and 'liga' font features). Change this to a string for fine-grained control of the 'font-feature-settings' CSS property.")},{type:"string",description:g.a("fontFeatureSettings","Explicit 'font-feature-settings' CSS property. A boolean can be passed instead if one only needs to turn on/off ligatures.")}],description:g.a("fontLigaturesGeneral","Configures font ligatures or font features. Can be either a boolean to enable/disable ligatures or a string for the value of the CSS 'font-feature-settings' property."),default:!1})}validate(ce){return typeof ce=="undefined"?this.defaultValue:typeof ce=="string"?ce==="false"?re.OFF:ce==="true"?re.ON:ce:Boolean(ce)?re.ON:re.OFF}}re.OFF='"liga" off, "calt" off',re.ON='"liga" on, "calt" on';class Z extends C{constructor(){super(43)}compute(ce,Ve,it){return ce.fontInfo}}class ne extends m{constructor(){super(45,"fontSize",dt.fontSize,{type:"number",minimum:6,maximum:100,default:dt.fontSize,description:g.a("fontSize","Controls the font size in pixels.")})}validate(ce){let Ve=w.float(ce,this.defaultValue);return Ve===0?dt.fontSize:w.clamp(Ve,6,100)}compute(ce,Ve,it){return ce.fontInfo.fontSize}}class le extends v{constructor(){super(46,"fontWeight",dt.fontWeight,{anyOf:[{type:"number",minimum:le.MINIMUM_VALUE,maximum:le.MAXIMUM_VALUE,errorMessage:g.a("fontWeightErrorMessage",'Only "normal" and "bold" keywords or numbers between 1 and 1000 are allowed.')},{type:"string",pattern:"^(normal|bold|1000|[1-9][0-9]{0,2})$"},{enum:le.SUGGESTION_VALUES}],default:dt.fontWeight,description:g.a("fontWeight",'Controls the font weight. Accepts "normal" and "bold" keywords or numbers between 1 and 1000.')})}validate(ce){return ce==="normal"||ce==="bold"?ce:String(r.clampedInt(ce,dt.fontWeight,le.MINIMUM_VALUE,le.MAXIMUM_VALUE))}}le.SUGGESTION_VALUES=["normal","bold","100","200","300","400","500","600","700","800","900"],le.MINIMUM_VALUE=1,le.MAXIMUM_VALUE=1e3;class _e extends v{constructor(){const ce={multiple:"peek",multipleDefinitions:"peek",multipleTypeDefinitions:"peek",multipleDeclarations:"peek",multipleImplementations:"peek",multipleReferences:"peek",alternativeDefinitionCommand:"editor.action.goToReferences",alternativeTypeDefinitionCommand:"editor.action.goToReferences",alternativeDeclarationCommand:"editor.action.goToReferences",alternativeImplementationCommand:"",alternativeReferenceCommand:""},Ve={type:"string",enum:["peek","gotoAndPeek","goto"],default:ce.multiple,enumDescriptions:[g.a("editor.gotoLocation.multiple.peek","Show peek view of the results (default)"),g.a("editor.gotoLocation.multiple.gotoAndPeek","Go to the primary result and show a peek view"),g.a("editor.gotoLocation.multiple.goto","Go to the primary result and enable peek-less navigation to others")]},it=["","editor.action.referenceSearch.trigger","editor.action.goToReferences","editor.action.peekImplementation","editor.action.goToImplementation","editor.action.peekTypeDefinition","editor.action.goToTypeDefinition","editor.action.peekDeclaration","editor.action.revealDeclaration","editor.action.peekDefinition","editor.action.revealDefinitionAside","editor.action.revealDefinition"];super(50,"gotoLocation",ce,{"editor.gotoLocation.multiple":{deprecationMessage:g.a("editor.gotoLocation.multiple.deprecated","This setting is deprecated, please use separate settings like 'editor.editor.gotoLocation.multipleDefinitions' or 'editor.editor.gotoLocation.multipleImplementations' instead.")},"editor.gotoLocation.multipleDefinitions":Object.assign({description:g.a("editor.editor.gotoLocation.multipleDefinitions","Controls the behavior the 'Go to Definition'-command when multiple target locations exist.")},Ve),"editor.gotoLocation.multipleTypeDefinitions":Object.assign({description:g.a("editor.editor.gotoLocation.multipleTypeDefinitions","Controls the behavior the 'Go to Type Definition'-command when multiple target locations exist.")},Ve),"editor.gotoLocation.multipleDeclarations":Object.assign({description:g.a("editor.editor.gotoLocation.multipleDeclarations","Controls the behavior the 'Go to Declaration'-command when multiple target locations exist.")},Ve),"editor.gotoLocation.multipleImplementations":Object.assign({description:g.a("editor.editor.gotoLocation.multipleImplemenattions","Controls the behavior the 'Go to Implementations'-command when multiple target locations exist.")},Ve),"editor.gotoLocation.multipleReferences":Object.assign({description:g.a("editor.editor.gotoLocation.multipleReferences","Controls the behavior the 'Go to References'-command when multiple target locations exist.")},Ve),"editor.gotoLocation.alternativeDefinitionCommand":{type:"string",default:ce.alternativeDefinitionCommand,enum:it,description:g.a("alternativeDefinitionCommand","Alternative command id that is being executed when the result of 'Go to Definition' is the current location.")},"editor.gotoLocation.alternativeTypeDefinitionCommand":{type:"string",default:ce.alternativeTypeDefinitionCommand,enum:it,description:g.a("alternativeTypeDefinitionCommand","Alternative command id that is being executed when the result of 'Go to Type Definition' is the current location.")},"editor.gotoLocation.alternativeDeclarationCommand":{type:"string",default:ce.alternativeDeclarationCommand,enum:it,description:g.a("alternativeDeclarationCommand","Alternative command id that is being executed when the result of 'Go to Declaration' is the current location.")},"editor.gotoLocation.alternativeImplementationCommand":{type:"string",default:ce.alternativeImplementationCommand,enum:it,description:g.a("alternativeImplementationCommand","Alternative command id that is being executed when the result of 'Go to Implementation' is the current location.")},"editor.gotoLocation.alternativeReferenceCommand":{type:"string",default:ce.alternativeReferenceCommand,enum:it,description:g.a("alternativeReferenceCommand","Alternative command id that is being executed when the result of 'Go to Reference' is the current location.")}})}validate(ce){var Ve,it,Et,It,Rt;if(!ce||typeof ce!="object")return this.defaultValue;const vo=ce;return{multiple:u(vo.multiple,this.defaultValue.multiple,["peek","gotoAndPeek","goto"]),multipleDefinitions:(Ve=vo.multipleDefinitions)!==null&&Ve!==void 0?Ve:u(vo.multipleDefinitions,"peek",["peek","gotoAndPeek","goto"]),multipleTypeDefinitions:(it=vo.multipleTypeDefinitions)!==null&&it!==void 0?it:u(vo.multipleTypeDefinitions,"peek",["peek","gotoAndPeek","goto"]),multipleDeclarations:(Et=vo.multipleDeclarations)!==null&&Et!==void 0?Et:u(vo.multipleDeclarations,"peek",["peek","gotoAndPeek","goto"]),multipleImplementations:(It=vo.multipleImplementations)!==null&&It!==void 0?It:u(vo.multipleImplementations,"peek",["peek","gotoAndPeek","goto"]),multipleReferences:(Rt=vo.multipleReferences)!==null&&Rt!==void 0?Rt:u(vo.multipleReferences,"peek",["peek","gotoAndPeek","goto"]),alternativeDefinitionCommand:b.string(vo.alternativeDefinitionCommand,this.defaultValue.alternativeDefinitionCommand),alternativeTypeDefinitionCommand:b.string(vo.alternativeTypeDefinitionCommand,this.defaultValue.alternativeTypeDefinitionCommand),alternativeDeclarationCommand:b.string(vo.alternativeDeclarationCommand,this.defaultValue.alternativeDeclarationCommand),alternativeImplementationCommand:b.string(vo.alternativeImplementationCommand,this.defaultValue.alternativeImplementationCommand),alternativeReferenceCommand:b.string(vo.alternativeReferenceCommand,this.defaultValue.alternativeReferenceCommand)}}}class Ce extends v{constructor(){const ce={enabled:!0,delay:300,sticky:!0,above:!0};super(52,"hover",ce,{"editor.hover.enabled":{type:"boolean",default:ce.enabled,description:g.a("hover.enabled","Controls whether the hover is shown.")},"editor.hover.delay":{type:"number",default:ce.delay,description:g.a("hover.delay","Controls the delay in milliseconds after which the hover is shown.")},"editor.hover.sticky":{type:"boolean",default:ce.sticky,description:g.a("hover.sticky","Controls whether the hover should remain visible when mouse is moved over it.")},"editor.hover.above":{type:"boolean",default:ce.above,description:g.a("hover.above","Prefer showing hovers above the line, if there's space.")}})}validate(ce){if(!ce||typeof ce!="object")return this.defaultValue;const Ve=ce;return{enabled:d(Ve.enabled,this.defaultValue.enabled),delay:r.clampedInt(Ve.delay,this.defaultValue.delay,0,1e4),sticky:d(Ve.sticky,this.defaultValue.sticky),above:d(Ve.above,this.defaultValue.above)}}}class oe extends C{constructor(){super(129,[49,57,37,64,91,59,60,93,116,119,120,121,2])}compute(ce,Ve,it){return oe.computeLayout(Ve,{memory:ce.memory,outerWidth:ce.outerWidth,outerHeight:ce.outerHeight,isDominatedByLongLines:ce.isDominatedByLongLines,lineHeight:ce.fontInfo.lineHeight,viewLineCount:ce.viewLineCount,lineNumbersDigitCount:ce.lineNumbersDigitCount,typicalHalfwidthCharacterWidth:ce.fontInfo.typicalHalfwidthCharacterWidth,maxDigitWidth:ce.fontInfo.maxDigitWidth,pixelRatio:ce.pixelRatio})}static computeContainedMinimapLineCount(ce){const Ve=ce.height/ce.lineHeight,it=ce.scrollBeyondLastLine?Ve-1:0,Et=(ce.viewLineCount+it)/(ce.pixelRatio*ce.height),It=Math.floor(ce.viewLineCount/Et);return{typicalViewportLineCount:Ve,extraLinesBeyondLastLine:it,desiredRatio:Et,minimapLineCount:It}}static _computeMinimapLayout(ce,Ve){const it=ce.outerWidth,Et=ce.outerHeight,It=ce.pixelRatio;if(!ce.minimap.enabled)return{renderMinimap:0,minimapLeft:0,minimapWidth:0,minimapHeightIsEditorHeight:!1,minimapIsSampling:!1,minimapScale:1,minimapLineHeight:1,minimapCanvasInnerWidth:0,minimapCanvasInnerHeight:Math.floor(It*Et),minimapCanvasOuterWidth:0,minimapCanvasOuterHeight:Et};const Rt=Ve.stableMinimapLayoutInput,vo=Rt&&ce.outerHeight===Rt.outerHeight&&ce.lineHeight===Rt.lineHeight&&ce.typicalHalfwidthCharacterWidth===Rt.typicalHalfwidthCharacterWidth&&ce.pixelRatio===Rt.pixelRatio&&ce.scrollBeyondLastLine===Rt.scrollBeyondLastLine&&ce.minimap.enabled===Rt.minimap.enabled&&ce.minimap.side===Rt.minimap.side&&ce.minimap.size===Rt.minimap.size&&ce.minimap.showSlider===Rt.minimap.showSlider&&ce.minimap.renderCharacters===Rt.minimap.renderCharacters&&ce.minimap.maxColumn===Rt.minimap.maxColumn&&ce.minimap.scale===Rt.minimap.scale&&ce.verticalScrollbarWidth===Rt.verticalScrollbarWidth&&ce.isViewportWrapping===Rt.isViewportWrapping,Mo=ce.lineHeight,xo=ce.typicalHalfwidthCharacterWidth,Do=ce.scrollBeyondLastLine,Lo=ce.minimap.renderCharacters;let To=It>=2?Math.round(ce.minimap.scale*2):ce.minimap.scale;const Vt=ce.minimap.maxColumn,xt=ce.minimap.size,ze=ce.minimap.side,ct=ce.verticalScrollbarWidth,Ut=ce.viewLineCount,Qe=ce.remainingWidth,tt=ce.isViewportWrapping,ut=Lo?2:3;let Dt=Math.floor(It*Et);const Pt=Dt/It;let Wt=!1,zt=!1,so=ut*To,wo=To/It,No=1;if(xt==="fill"||xt==="fit"){const{typicalViewportLineCount:rt,extraLinesBeyondLastLine:lt,desiredRatio:bt,minimapLineCount:St}=oe.computeContainedMinimapLineCount({viewLineCount:Ut,scrollBeyondLastLine:Do,height:Et,lineHeight:Mo,pixelRatio:It}),Qt=Ut/St;if(Qt>1)Wt=!0,zt=!0,To=1,so=1,wo=To/It;else{let bo=!1,qt=To+1;if(xt==="fit"){const Eo=Math.ceil((Ut+lt)*so);tt&&vo&&Qe<=Ve.stableFitRemainingWidth?(bo=!0,qt=Ve.stableFitMaxMinimapScale):bo=Eo>Dt}if(xt==="fill"||bo){Wt=!0;const Eo=To;so=Math.min(Mo*It,Math.max(1,Math.floor(1/bt))),tt&&vo&&Qe<=Ve.stableFitRemainingWidth&&(qt=Ve.stableFitMaxMinimapScale),To=Math.min(qt,Math.max(1,Math.floor(so/ut))),To>Eo&&(No=Math.min(2,To/Eo)),wo=To/It/No,Dt=Math.ceil(Math.max(rt,Ut+lt)*so),tt?(Ve.stableMinimapLayoutInput=ce,Ve.stableFitRemainingWidth=Qe,Ve.stableFitMaxMinimapScale=To):(Ve.stableMinimapLayoutInput=null,Ve.stableFitRemainingWidth=0)}}}const di=Math.floor(Vt*wo),_o=Math.min(di,Math.max(0,Math.floor((Qe-ct-2)*wo/(xo+wo)))+R);let no=Math.floor(It*_o);const _t=no/It;no=Math.floor(no*No);const Tt=Lo?1:2,Nt=ze==="left"?0:it-_o-ct;return{renderMinimap:Tt,minimapLeft:Nt,minimapWidth:_o,minimapHeightIsEditorHeight:Wt,minimapIsSampling:zt,minimapScale:To,minimapLineHeight:so,minimapCanvasInnerWidth:no,minimapCanvasInnerHeight:Dt,minimapCanvasOuterWidth:_t,minimapCanvasOuterHeight:Pt}}static computeLayout(ce,Ve){const it=Ve.outerWidth|0,Et=Ve.outerHeight|0,It=Ve.lineHeight|0,Rt=Ve.lineNumbersDigitCount|0,vo=Ve.typicalHalfwidthCharacterWidth,Mo=Ve.maxDigitWidth,xo=Ve.pixelRatio,Do=Ve.viewLineCount,Lo=ce.get(121),To=Lo==="inherit"?ce.get(120):Lo,Vt=To==="inherit"?ce.get(116):To,xt=ce.get(119),ze=ce.get(2),ct=Ve.isDominatedByLongLines,Ut=ce.get(49),Qe=ce.get(59).renderType!==0,tt=ce.get(60),ut=ce.get(93),Dt=ce.get(64),Pt=ce.get(91),Wt=Pt.verticalScrollbarSize,zt=Pt.verticalHasArrows,so=Pt.arrowSize,wo=Pt.horizontalScrollbarSize,No=ce.get(57),di=ce.get(37);let _o;if(typeof No=="string"&&/^\d+(\.\d+)?ch$/.test(No)){const Bo=parseFloat(No.substr(0,No.length-2));_o=r.clampedInt(Bo*vo,0,0,1e3)}else _o=r.clampedInt(No,0,0,1e3);di&&(_o+=16);let no=0;if(Qe){const Bo=Math.max(Rt,tt);no=Math.round(Bo*Mo)}let _t=0;Ut&&(_t=It);let Tt=0,Nt=Tt+_t,rt=Nt+no,lt=rt+_o;const bt=it-_t-no-_o;let St=!1,Qt=!1,bo=-1;ze!==2&&(To==="inherit"&&ct?(St=!0,Qt=!0):Vt==="on"||Vt==="bounded"?Qt=!0:Vt==="wordWrapColumn"&&(bo=xt));const qt=oe._computeMinimapLayout({outerWidth:it,outerHeight:Et,lineHeight:It,typicalHalfwidthCharacterWidth:vo,pixelRatio:xo,scrollBeyondLastLine:ut,minimap:Dt,verticalScrollbarWidth:Wt,viewLineCount:Do,remainingWidth:bt,isViewportWrapping:Qt},Ve.memory||new I);qt.renderMinimap!==0&&qt.minimapLeft===0&&(Tt+=qt.minimapWidth,Nt+=qt.minimapWidth,rt+=qt.minimapWidth,lt+=qt.minimapWidth);const Eo=bt-qt.minimapWidth,Ro=Math.max(1,Math.floor((Eo-Wt-2)/vo)),zo=zt?so:0;return Qt&&(bo=Math.max(1,Ro),Vt==="bounded"&&(bo=Math.min(bo,xt))),{width:it,height:Et,glyphMarginLeft:Tt,glyphMarginWidth:_t,lineNumbersLeft:Nt,lineNumbersWidth:no,decorationsLeft:rt,decorationsWidth:_o,contentLeft:lt,contentWidth:Eo,minimap:qt,viewportColumn:Ro,isWordWrapMinified:St,isViewportWrapping:Qt,wrappingColumn:bo,verticalScrollbarWidth:Wt,horizontalScrollbarHeight:wo,overviewRuler:{top:zo,width:Wt,height:Et-2*zo,right:0}}}}class ae extends v{constructor(){const ce={enabled:!0};super(56,"lightbulb",ce,{"editor.lightbulb.enabled":{type:"boolean",default:ce.enabled,description:g.a("codeActions","Enables the code action lightbulb in the editor.")}})}validate(ce){if(!ce||typeof ce!="object")return this.defaultValue;const Ve=ce;return{enabled:d(Ve.enabled,this.defaultValue.enabled)}}}class V extends v{constructor(){const ce={enabled:!0,fontSize:0,fontFamily:""};super(125,"inlayHints",ce,{"editor.inlayHints.enabled":{type:"boolean",default:ce.enabled,description:g.a("inlayHints.enable","Enables the inlay hints in the editor.")},"editor.inlayHints.fontSize":{type:"number",default:ce.fontSize,markdownDescription:g.a("inlayHints.fontSize","Controls font size of inlay hints in the editor. A default of 90% of `#editor.fontSize#` is used when the configured value is less than `5` or greater than the editor font size.")},"editor.inlayHints.fontFamily":{type:"string",default:ce.fontFamily,markdownDescription:g.a("inlayHints.fontFamily","Controls font family of inlay hints in the editor. When set to empty, the `#editor.fontFamily#` is used.")}})}validate(ce){if(!ce||typeof ce!="object")return this.defaultValue;const Ve=ce;return{enabled:d(Ve.enabled,this.defaultValue.enabled),fontSize:r.clampedInt(Ve.fontSize,this.defaultValue.fontSize,0,100),fontFamily:b.string(Ve.fontFamily,this.defaultValue.fontFamily)}}}class G extends w{constructor(){super(58,"lineHeight",dt.lineHeight,ce=>w.clamp(ce,0,150),{markdownDescription:g.a("lineHeight",`Controls the line height.
|
|
|
- Use 0 to automatically compute the line height from the font size.
|
|
|
- Values between 0 and 8 will be used as a multiplier with the font size.
|
|
|
- Values greater than or equal to 8 will be used as effective values.`)})}compute(ce,Ve,it){return ce.fontInfo.lineHeight}}class ee extends v{constructor(){const ce={enabled:!0,size:"proportional",side:"right",showSlider:"mouseover",renderCharacters:!0,maxColumn:120,scale:1};super(64,"minimap",ce,{"editor.minimap.enabled":{type:"boolean",default:ce.enabled,description:g.a("minimap.enabled","Controls whether the minimap is shown.")},"editor.minimap.size":{type:"string",enum:["proportional","fill","fit"],enumDescriptions:[g.a("minimap.size.proportional","The minimap has the same size as the editor contents (and might scroll)."),g.a("minimap.size.fill","The minimap will stretch or shrink as necessary to fill the height of the editor (no scrolling)."),g.a("minimap.size.fit","The minimap will shrink as necessary to never be larger than the editor (no scrolling).")],default:ce.size,description:g.a("minimap.size","Controls the size of the minimap.")},"editor.minimap.side":{type:"string",enum:["left","right"],default:ce.side,description:g.a("minimap.side","Controls the side where to render the minimap.")},"editor.minimap.showSlider":{type:"string",enum:["always","mouseover"],default:ce.showSlider,description:g.a("minimap.showSlider","Controls when the minimap slider is shown.")},"editor.minimap.scale":{type:"number",default:ce.scale,minimum:1,maximum:3,enum:[1,2,3],description:g.a("minimap.scale","Scale of content drawn in the minimap: 1, 2 or 3.")},"editor.minimap.renderCharacters":{type:"boolean",default:ce.renderCharacters,description:g.a("minimap.renderCharacters","Render the actual characters on a line as opposed to color blocks.")},"editor.minimap.maxColumn":{type:"number",default:ce.maxColumn,description:g.a("minimap.maxColumn","Limit the width of the minimap to render at most a certain number of columns.")}})}validate(ce){if(!ce||typeof ce!="object")return this.defaultValue;const Ve=ce;return{enabled:d(Ve.enabled,this.defaultValue.enabled),size:u(Ve.size,this.defaultValue.size,["proportional","fill","fit"]),side:u(Ve.side,this.defaultValue.side,["right","left"]),showSlider:u(Ve.showSlider,this.defaultValue.showSlider,["always","mouseover"]),renderCharacters:d(Ve.renderCharacters,this.defaultValue.renderCharacters),scale:r.clampedInt(Ve.scale,1,1,3),maxColumn:r.clampedInt(Ve.maxColumn,this.defaultValue.maxColumn,1,1e4)}}}function pe(ce){return ce==="ctrlCmd"?B.f?"metaKey":"ctrlKey":"altKey"}class Te extends v{constructor(){super(74,"padding",{top:0,bottom:0},{"editor.padding.top":{type:"number",default:0,minimum:0,maximum:1e3,description:g.a("padding.top","Controls the amount of space between the top edge of the editor and the first line.")},"editor.padding.bottom":{type:"number",default:0,minimum:0,maximum:1e3,description:g.a("padding.bottom","Controls the amount of space between the bottom edge of the editor and the last line.")}})}validate(ce){if(!ce||typeof ce!="object")return this.defaultValue;const Ve=ce;return{top:r.clampedInt(Ve.top,0,0,1e3),bottom:r.clampedInt(Ve.bottom,0,0,1e3)}}}class Ie extends v{constructor(){const ce={enabled:!0,cycle:!1};super(75,"parameterHints",ce,{"editor.parameterHints.enabled":{type:"boolean",default:ce.enabled,description:g.a("parameterHints.enabled","Enables a pop-up that shows parameter documentation and type information as you type.")},"editor.parameterHints.cycle":{type:"boolean",default:ce.cycle,description:g.a("parameterHints.cycle","Controls whether the parameter hints menu cycles or closes when reaching the end of the list.")}})}validate(ce){if(!ce||typeof ce!="object")return this.defaultValue;const Ve=ce;return{enabled:d(Ve.enabled,this.defaultValue.enabled),cycle:d(Ve.cycle,this.defaultValue.cycle)}}}class Me extends C{constructor(){super(127)}compute(ce,Ve,it){return ce.pixelRatio}}class Oe extends v{constructor(){const ce={other:!0,comments:!1,strings:!1};super(78,"quickSuggestions",ce,{anyOf:[{type:"boolean"},{type:"object",properties:{strings:{type:"boolean",default:ce.strings,description:g.a("quickSuggestions.strings","Enable quick suggestions inside strings.")},comments:{type:"boolean",default:ce.comments,description:g.a("quickSuggestions.comments","Enable quick suggestions inside comments.")},other:{type:"boolean",default:ce.other,description:g.a("quickSuggestions.other","Enable quick suggestions outside of strings and comments.")}}}],default:ce,description:g.a("quickSuggestions","Controls whether suggestions should automatically show up while typing.")});this.defaultValue=ce}validate(ce){if(typeof ce=="boolean")return ce;if(ce&&typeof ce=="object"){const Ve=ce,it={other:d(Ve.other,this.defaultValue.other),comments:d(Ve.comments,this.defaultValue.comments),strings:d(Ve.strings,this.defaultValue.strings)};return it.other&&it.comments&&it.strings?!0:!it.other&&!it.comments&&!it.strings?!1:it}return this.defaultValue}}class Xe extends v{constructor(){super(59,"lineNumbers",{renderType:1,renderFn:null},{type:"string",enum:["off","on","relative","interval"],enumDescriptions:[g.a("lineNumbers.off","Line numbers are not rendered."),g.a("lineNumbers.on","Line numbers are rendered as absolute number."),g.a("lineNumbers.relative","Line numbers are rendered as distance in lines to cursor position."),g.a("lineNumbers.interval","Line numbers are rendered every 10 lines.")],default:"on",description:g.a("lineNumbers","Controls the display of line numbers.")})}validate(ce){let Ve=this.defaultValue.renderType,it=this.defaultValue.renderFn;return typeof ce!="undefined"&&(typeof ce=="function"?(Ve=4,it=ce):ce==="interval"?Ve=3:ce==="relative"?Ve=2:ce==="on"?Ve=1:Ve=0),{renderType:Ve,renderFn:it}}}function fe(ce){const Ve=ce.get(86);return Ve==="editable"?ce.get(80):!(Ve==="on")}class Pe extends v{constructor(){const ce=[],Ve={type:"number",description:g.a("rulers.size","Number of monospace characters at which this editor ruler will render.")};super(90,"rulers",ce,{type:"array",items:{anyOf:[Ve,{type:["object"],properties:{column:Ve,color:{type:"string",description:g.a("rulers.color","Color of this editor ruler."),format:"color-hex"}}}]},default:ce,description:g.a("rulers","Render vertical rulers after a certain number of monospace characters. Use multiple values for multiple rulers. No rulers are drawn if array is empty.")})}validate(ce){if(Array.isArray(ce)){let Ve=[];for(let it of ce)if(typeof it=="number")Ve.push({column:r.clampedInt(it,0,0,1e4),color:null});else if(it&&typeof it=="object"){const Et=it;Ve.push({column:r.clampedInt(Et.column,0,0,1e4),color:Et.color})}return Ve.sort((it,Et)=>it.column-Et.column),Ve}return this.defaultValue}}function Be(ce,Ve){if(typeof ce!="string")return Ve;switch(ce){case"hidden":return 2;case"visible":return 3;default:return 1}}class Se extends v{constructor(){const ce={vertical:1,horizontal:1,arrowSize:11,useShadows:!0,verticalHasArrows:!1,horizontalHasArrows:!1,horizontalScrollbarSize:12,horizontalSliderSize:12,verticalScrollbarSize:14,verticalSliderSize:14,handleMouseWheel:!0,alwaysConsumeMouseWheel:!0,scrollByPage:!1};super(91,"scrollbar",ce,{"editor.scrollbar.vertical":{type:"string",enum:["auto","visible","hidden"],enumDescriptions:[g.a("scrollbar.vertical.auto","The vertical scrollbar will be visible only when necessary."),g.a("scrollbar.vertical.visible","The vertical scrollbar will always be visible."),g.a("scrollbar.vertical.fit","The vertical scrollbar will always be hidden.")],default:"auto",description:g.a("scrollbar.vertical","Controls the visibility of the vertical scrollbar.")},"editor.scrollbar.horizontal":{type:"string",enum:["auto","visible","hidden"],enumDescriptions:[g.a("scrollbar.horizontal.auto","The horizontal scrollbar will be visible only when necessary."),g.a("scrollbar.horizontal.visible","The horizontal scrollbar will always be visible."),g.a("scrollbar.horizontal.fit","The horizontal scrollbar will always be hidden.")],default:"auto",description:g.a("scrollbar.horizontal","Controls the visibility of the horizontal scrollbar.")},"editor.scrollbar.verticalScrollbarSize":{type:"number",default:ce.verticalScrollbarSize,description:g.a("scrollbar.verticalScrollbarSize","The width of the vertical scrollbar.")},"editor.scrollbar.horizontalScrollbarSize":{type:"number",default:ce.horizontalScrollbarSize,description:g.a("scrollbar.horizontalScrollbarSize","The height of the horizontal scrollbar.")},"editor.scrollbar.scrollByPage":{type:"boolean",default:ce.scrollByPage,description:g.a("scrollbar.scrollByPage","Controls whether clicks scroll by page or jump to click position.")}})}validate(ce){if(!ce||typeof ce!="object")return this.defaultValue;const Ve=ce,it=r.clampedInt(Ve.horizontalScrollbarSize,this.defaultValue.horizontalScrollbarSize,0,1e3),Et=r.clampedInt(Ve.verticalScrollbarSize,this.defaultValue.verticalScrollbarSize,0,1e3);return{arrowSize:r.clampedInt(Ve.arrowSize,this.defaultValue.arrowSize,0,1e3),vertical:Be(Ve.vertical,this.defaultValue.vertical),horizontal:Be(Ve.horizontal,this.defaultValue.horizontal),useShadows:d(Ve.useShadows,this.defaultValue.useShadows),verticalHasArrows:d(Ve.verticalHasArrows,this.defaultValue.verticalHasArrows),horizontalHasArrows:d(Ve.horizontalHasArrows,this.defaultValue.horizontalHasArrows),handleMouseWheel:d(Ve.handleMouseWheel,this.defaultValue.handleMouseWheel),alwaysConsumeMouseWheel:d(Ve.alwaysConsumeMouseWheel,this.defaultValue.alwaysConsumeMouseWheel),horizontalScrollbarSize:it,horizontalSliderSize:r.clampedInt(Ve.horizontalSliderSize,it,0,1e3),verticalScrollbarSize:Et,verticalSliderSize:r.clampedInt(Ve.verticalSliderSize,Et,0,1e3),scrollByPage:d(Ve.scrollByPage,this.defaultValue.scrollByPage)}}}class me extends v{constructor(){const ce={enabled:!0,mode:"subwordSmart"};super(54,"inlineSuggest",ce,{"editor.inlineSuggest.enabled":{type:"boolean",default:ce.enabled,description:g.a("inlineSuggest.enabled","Controls whether to automatically show inline suggestions in the editor.")}})}validate(ce){if(!ce||typeof ce!="object")return this.defaultValue;const Ve=ce;return{enabled:d(Ve.enabled,this.defaultValue.enabled),mode:u(Ve.mode,this.defaultValue.mode,["prefix","subword","subwordSmart"])}}}class he extends v{constructor(){const ce={enabled:Lt.bracketPairColorizationOptions.enabled};super(12,"bracketPairColorization",ce,{"editor.bracketPairColorization.enabled":{type:"boolean",default:ce.enabled,description:g.a("bracketPairColorization.enabled","Controls whether bracket pair colorization is enabled or not. Use 'workbench.colorCustomizations' to override the bracket highlight colors.")}})}validate(ce){if(!ce||typeof ce!="object")return this.defaultValue;const Ve=ce;return{enabled:d(Ve.enabled,this.defaultValue.enabled)}}}class Le extends v{constructor(){const ce={bracketPairs:!1,bracketPairsHorizontal:"active",highlightActiveBracketPair:!0,indentation:!0,highlightActiveIndentation:!0};super(13,"guides",ce,{"editor.guides.bracketPairs":{type:["boolean","string"],enum:[!0,"active",!1],enumDescriptions:[g.a("editor.guides.bracketPairs.true","Enables bracket pair guides."),g.a("editor.guides.bracketPairs.active","Enables bracket pair guides only for the active bracket pair."),g.a("editor.guides.bracketPairs.false","Disables bracket pair guides.")],default:ce.bracketPairs,description:g.a("editor.guides.bracketPairs","Controls whether bracket pair guides are enabled or not.")},"editor.guides.bracketPairsHorizontal":{type:["boolean","string"],enum:[!0,"active",!1],enumDescriptions:[g.a("editor.guides.bracketPairsHorizontal.true","Enables horizontal guides as addition to vertical bracket pair guides."),g.a("editor.guides.bracketPairsHorizontal.active","Enables horizontal guides only for the active bracket pair."),g.a("editor.guides.bracketPairsHorizontal.false","Disables horizontal bracket pair guides.")],default:ce.bracketPairsHorizontal,description:g.a("editor.guides.bracketPairsHorizontal","Controls whether horizontal bracket pair guides are enabled or not.")},"editor.guides.highlightActiveBracketPair":{type:"boolean",default:ce.highlightActiveBracketPair,description:g.a("editor.guides.highlightActiveBracketPair","Controls whether bracket pair guides are enabled or not.")},"editor.guides.indentation":{type:"boolean",default:ce.indentation,description:g.a("editor.guides.indentation","Controls whether the editor should render indent guides.")},"editor.guides.highlightActiveIndentation":{type:"boolean",default:ce.highlightActiveIndentation,description:g.a("editor.guides.highlightActiveIndentation","Controls whether the editor should highlight the active indent guide.")}})}validate(ce){if(!ce||typeof ce!="object")return this.defaultValue;const Ve=ce;return{bracketPairs:we(Ve.bracketPairs,this.defaultValue.bracketPairs,[!0,!1,"active"]),bracketPairsHorizontal:we(Ve.bracketPairsHorizontal,this.defaultValue.bracketPairsHorizontal,[!0,!1,"active"]),highlightActiveBracketPair:d(Ve.highlightActiveBracketPair,this.defaultValue.highlightActiveBracketPair),indentation:d(Ve.indentation,this.defaultValue.indentation),highlightActiveIndentation:d(Ve.highlightActiveIndentation,this.defaultValue.highlightActiveIndentation)}}}function we(ce,Ve,it){const Et=it.indexOf(ce);return Et===-1?Ve:it[Et]}class ve extends v{constructor(){const ce={insertMode:"insert",filterGraceful:!0,snippetsPreventQuickSuggestions:!0,localityBonus:!1,shareSuggestSelections:!1,showIcons:!0,showStatusBar:!1,preview:!1,previewMode:"subwordSmart",showInlineDetails:!0,showMethods:!0,showFunctions:!0,showConstructors:!0,showDeprecated:!0,showFields:!0,showVariables:!0,showClasses:!0,showStructs:!0,showInterfaces:!0,showModules:!0,showProperties:!0,showEvents:!0,showOperators:!0,showUnits:!0,showValues:!0,showConstants:!0,showEnums:!0,showEnumMembers:!0,showKeywords:!0,showWords:!0,showColors:!0,showFiles:!0,showReferences:!0,showFolders:!0,showTypeParameters:!0,showSnippets:!0,showUsers:!0,showIssues:!0};super(105,"suggest",ce,{"editor.suggest.insertMode":{type:"string",enum:["insert","replace"],enumDescriptions:[g.a("suggest.insertMode.insert","Insert suggestion without overwriting text right of the cursor."),g.a("suggest.insertMode.replace","Insert suggestion and overwrite text right of the cursor.")],default:ce.insertMode,description:g.a("suggest.insertMode","Controls whether words are overwritten when accepting completions. Note that this depends on extensions opting into this feature.")},"editor.suggest.filterGraceful":{type:"boolean",default:ce.filterGraceful,description:g.a("suggest.filterGraceful","Controls whether filtering and sorting suggestions accounts for small typos.")},"editor.suggest.localityBonus":{type:"boolean",default:ce.localityBonus,description:g.a("suggest.localityBonus","Controls whether sorting favors words that appear close to the cursor.")},"editor.suggest.shareSuggestSelections":{type:"boolean",default:ce.shareSuggestSelections,markdownDescription:g.a("suggest.shareSuggestSelections","Controls whether remembered suggestion selections are shared between multiple workspaces and windows (needs `#editor.suggestSelection#`).")},"editor.suggest.snippetsPreventQuickSuggestions":{type:"boolean",default:ce.snippetsPreventQuickSuggestions,description:g.a("suggest.snippetsPreventQuickSuggestions","Controls whether an active snippet prevents quick suggestions.")},"editor.suggest.showIcons":{type:"boolean",default:ce.showIcons,description:g.a("suggest.showIcons","Controls whether to show or hide icons in suggestions.")},"editor.suggest.showStatusBar":{type:"boolean",default:ce.showStatusBar,description:g.a("suggest.showStatusBar","Controls the visibility of the status bar at the bottom of the suggest widget.")},"editor.suggest.preview":{type:"boolean",default:ce.preview,description:g.a("suggest.preview","Controls whether to preview the suggestion outcome in the editor.")},"editor.suggest.showInlineDetails":{type:"boolean",default:ce.showInlineDetails,description:g.a("suggest.showInlineDetails","Controls whether suggest details show inline with the label or only in the details widget")},"editor.suggest.maxVisibleSuggestions":{type:"number",deprecationMessage:g.a("suggest.maxVisibleSuggestions.dep","This setting is deprecated. The suggest widget can now be resized.")},"editor.suggest.filteredTypes":{type:"object",deprecationMessage:g.a("deprecated","This setting is deprecated, please use separate settings like 'editor.suggest.showKeywords' or 'editor.suggest.showSnippets' instead.")},"editor.suggest.showMethods":{type:"boolean",default:!0,markdownDescription:g.a("editor.suggest.showMethods","When enabled IntelliSense shows `method`-suggestions.")},"editor.suggest.showFunctions":{type:"boolean",default:!0,markdownDescription:g.a("editor.suggest.showFunctions","When enabled IntelliSense shows `function`-suggestions.")},"editor.suggest.showConstructors":{type:"boolean",default:!0,markdownDescription:g.a("editor.suggest.showConstructors","When enabled IntelliSense shows `constructor`-suggestions.")},"editor.suggest.showDeprecated":{type:"boolean",default:!0,markdownDescription:g.a("editor.suggest.showDeprecated","When enabled IntelliSense shows `deprecated`-suggestions.")},"editor.suggest.showFields":{type:"boolean",default:!0,markdownDescription:g.a("editor.suggest.showFields","When enabled IntelliSense shows `field`-suggestions.")},"editor.suggest.showVariables":{type:"boolean",default:!0,markdownDescription:g.a("editor.suggest.showVariables","When enabled IntelliSense shows `variable`-suggestions.")},"editor.suggest.showClasses":{type:"boolean",default:!0,markdownDescription:g.a("editor.suggest.showClasss","When enabled IntelliSense shows `class`-suggestions.")},"editor.suggest.showStructs":{type:"boolean",default:!0,markdownDescription:g.a("editor.suggest.showStructs","When enabled IntelliSense shows `struct`-suggestions.")},"editor.suggest.showInterfaces":{type:"boolean",default:!0,markdownDescription:g.a("editor.suggest.showInterfaces","When enabled IntelliSense shows `interface`-suggestions.")},"editor.suggest.showModules":{type:"boolean",default:!0,markdownDescription:g.a("editor.suggest.showModules","When enabled IntelliSense shows `module`-suggestions.")},"editor.suggest.showProperties":{type:"boolean",default:!0,markdownDescription:g.a("editor.suggest.showPropertys","When enabled IntelliSense shows `property`-suggestions.")},"editor.suggest.showEvents":{type:"boolean",default:!0,markdownDescription:g.a("editor.suggest.showEvents","When enabled IntelliSense shows `event`-suggestions.")},"editor.suggest.showOperators":{type:"boolean",default:!0,markdownDescription:g.a("editor.suggest.showOperators","When enabled IntelliSense shows `operator`-suggestions.")},"editor.suggest.showUnits":{type:"boolean",default:!0,markdownDescription:g.a("editor.suggest.showUnits","When enabled IntelliSense shows `unit`-suggestions.")},"editor.suggest.showValues":{type:"boolean",default:!0,markdownDescription:g.a("editor.suggest.showValues","When enabled IntelliSense shows `value`-suggestions.")},"editor.suggest.showConstants":{type:"boolean",default:!0,markdownDescription:g.a("editor.suggest.showConstants","When enabled IntelliSense shows `constant`-suggestions.")},"editor.suggest.showEnums":{type:"boolean",default:!0,markdownDescription:g.a("editor.suggest.showEnums","When enabled IntelliSense shows `enum`-suggestions.")},"editor.suggest.showEnumMembers":{type:"boolean",default:!0,markdownDescription:g.a("editor.suggest.showEnumMembers","When enabled IntelliSense shows `enumMember`-suggestions.")},"editor.suggest.showKeywords":{type:"boolean",default:!0,markdownDescription:g.a("editor.suggest.showKeywords","When enabled IntelliSense shows `keyword`-suggestions.")},"editor.suggest.showWords":{type:"boolean",default:!0,markdownDescription:g.a("editor.suggest.showTexts","When enabled IntelliSense shows `text`-suggestions.")},"editor.suggest.showColors":{type:"boolean",default:!0,markdownDescription:g.a("editor.suggest.showColors","When enabled IntelliSense shows `color`-suggestions.")},"editor.suggest.showFiles":{type:"boolean",default:!0,markdownDescription:g.a("editor.suggest.showFiles","When enabled IntelliSense shows `file`-suggestions.")},"editor.suggest.showReferences":{type:"boolean",default:!0,markdownDescription:g.a("editor.suggest.showReferences","When enabled IntelliSense shows `reference`-suggestions.")},"editor.suggest.showCustomcolors":{type:"boolean",default:!0,markdownDescription:g.a("editor.suggest.showCustomcolors","When enabled IntelliSense shows `customcolor`-suggestions.")},"editor.suggest.showFolders":{type:"boolean",default:!0,markdownDescription:g.a("editor.suggest.showFolders","When enabled IntelliSense shows `folder`-suggestions.")},"editor.suggest.showTypeParameters":{type:"boolean",default:!0,markdownDescription:g.a("editor.suggest.showTypeParameters","When enabled IntelliSense shows `typeParameter`-suggestions.")},"editor.suggest.showSnippets":{type:"boolean",default:!0,markdownDescription:g.a("editor.suggest.showSnippets","When enabled IntelliSense shows `snippet`-suggestions.")},"editor.suggest.showUsers":{type:"boolean",default:!0,markdownDescription:g.a("editor.suggest.showUsers","When enabled IntelliSense shows `user`-suggestions.")},"editor.suggest.showIssues":{type:"boolean",default:!0,markdownDescription:g.a("editor.suggest.showIssues","When enabled IntelliSense shows `issues`-suggestions.")}})}validate(ce){if(!ce||typeof ce!="object")return this.defaultValue;const Ve=ce;return{insertMode:u(Ve.insertMode,this.defaultValue.insertMode,["insert","replace"]),filterGraceful:d(Ve.filterGraceful,this.defaultValue.filterGraceful),snippetsPreventQuickSuggestions:d(Ve.snippetsPreventQuickSuggestions,this.defaultValue.filterGraceful),localityBonus:d(Ve.localityBonus,this.defaultValue.localityBonus),shareSuggestSelections:d(Ve.shareSuggestSelections,this.defaultValue.shareSuggestSelections),showIcons:d(Ve.showIcons,this.defaultValue.showIcons),showStatusBar:d(Ve.showStatusBar,this.defaultValue.showStatusBar),preview:d(Ve.preview,this.defaultValue.preview),previewMode:u(Ve.previewMode,this.defaultValue.previewMode,["prefix","subword","subwordSmart"]),showInlineDetails:d(Ve.showInlineDetails,this.defaultValue.showInlineDetails),showMethods:d(Ve.showMethods,this.defaultValue.showMethods),showFunctions:d(Ve.showFunctions,this.defaultValue.showFunctions),showConstructors:d(Ve.showConstructors,this.defaultValue.showConstructors),showDeprecated:d(Ve.showDeprecated,this.defaultValue.showDeprecated),showFields:d(Ve.showFields,this.defaultValue.showFields),showVariables:d(Ve.showVariables,this.defaultValue.showVariables),showClasses:d(Ve.showClasses,this.defaultValue.showClasses),showStructs:d(Ve.showStructs,this.defaultValue.showStructs),showInterfaces:d(Ve.showInterfaces,this.defaultValue.showInterfaces),showModules:d(Ve.showModules,this.defaultValue.showModules),showProperties:d(Ve.showProperties,this.defaultValue.showProperties),showEvents:d(Ve.showEvents,this.defaultValue.showEvents),showOperators:d(Ve.showOperators,this.defaultValue.showOperators),showUnits:d(Ve.showUnits,this.defaultValue.showUnits),showValues:d(Ve.showValues,this.defaultValue.showValues),showConstants:d(Ve.showConstants,this.defaultValue.showConstants),showEnums:d(Ve.showEnums,this.defaultValue.showEnums),showEnumMembers:d(Ve.showEnumMembers,this.defaultValue.showEnumMembers),showKeywords:d(Ve.showKeywords,this.defaultValue.showKeywords),showWords:d(Ve.showWords,this.defaultValue.showWords),showColors:d(Ve.showColors,this.defaultValue.showColors),showFiles:d(Ve.showFiles,this.defaultValue.showFiles),showReferences:d(Ve.showReferences,this.defaultValue.showReferences),showFolders:d(Ve.showFolders,this.defaultValue.showFolders),showTypeParameters:d(Ve.showTypeParameters,this.defaultValue.showTypeParameters),showSnippets:d(Ve.showSnippets,this.defaultValue.showSnippets),showUsers:d(Ve.showUsers,this.defaultValue.showUsers),showIssues:d(Ve.showIssues,this.defaultValue.showIssues)}}}class ie extends v{constructor(){super(101,"smartSelect",{selectLeadingAndTrailingWhitespace:!0},{"editor.smartSelect.selectLeadingAndTrailingWhitespace":{description:g.a("selectLeadingAndTrailingWhitespace","Whether leading and trailing whitespace should always be selected."),default:!0,type:"boolean"}})}validate(ce){return!ce||typeof ce!="object"?this.defaultValue:{selectLeadingAndTrailingWhitespace:d(ce.selectLeadingAndTrailingWhitespace,this.defaultValue.selectLeadingAndTrailingWhitespace)}}}class W extends C{constructor(){super(128,[80])}compute(ce,Ve,it){const Et=Ve.get(80);return Et?!0:ce.tabFocusMode}}function U(ce){switch(ce){case"none":return 0;case"same":return 1;case"indent":return 2;case"deepIndent":return 3}}class se extends C{constructor(){super(130,[129])}compute(ce,Ve,it){const Et=Ve.get(129);return{isDominatedByLongLines:ce.isDominatedByLongLines,isWordWrapMinified:Et.isWordWrapMinified,isViewportWrapping:Et.isViewportWrapping,wrappingColumn:Et.wrappingColumn}}}const je="Consolas, 'Courier New', monospace",Re="Menlo, Monaco, 'Courier New', monospace",We="'Droid Sans Mono', 'monospace', monospace, 'Droid Sans Fallback'",dt={fontFamily:B.f?Re:B.d?We:je,fontWeight:"normal",fontSize:B.f?12:14,lineHeight:0,letterSpacing:0},Lt={tabSize:4,indentSize:4,insertSpaces:!0,detectIndentation:!0,trimAutoWhitespace:!0,largeFileOptimizations:!0,bracketPairColorizationOptions:{enabled:!1}},Ht=[];function $e(ce){return Ht[ce.id]=ce,ce}const ot={acceptSuggestionOnCommitCharacter:$e(new D(0,"acceptSuggestionOnCommitCharacter",!0,{markdownDescription:g.a("acceptSuggestionOnCommitCharacter","Controls whether suggestions should be accepted on commit characters. For example, in JavaScript, the semi-colon (`;`) can be a commit character that accepts a suggestion and types that character.")})),acceptSuggestionOnEnter:$e(new c(1,"acceptSuggestionOnEnter","on",["on","smart","off"],{markdownEnumDescriptions:["",g.a("acceptSuggestionOnEnterSmart","Only accept a suggestion with `Enter` when it makes a textual change."),""],markdownDescription:g.a("acceptSuggestionOnEnter","Controls whether suggestions should be accepted on `Enter`, in addition to `Tab`. Helps to avoid ambiguity between inserting new lines or accepting suggestions.")})),accessibilitySupport:$e(new E),accessibilityPageSize:$e(new r(3,"accessibilityPageSize",10,1,1073741824,{description:g.a("accessibilityPageSize","Controls the number of lines in the editor that can be read out by a screen reader at once. When we detect a screen reader we automatically set the default to be 500. Warning: this has a performance implication for numbers larger than the default.")})),ariaLabel:$e(new b(4,"ariaLabel",g.a("editorViewAccessibleLabel","Editor content"))),autoClosingBrackets:$e(new c(5,"autoClosingBrackets","languageDefined",["always","languageDefined","beforeWhitespace","never"],{enumDescriptions:["",g.a("editor.autoClosingBrackets.languageDefined","Use language configurations to determine when to autoclose brackets."),g.a("editor.autoClosingBrackets.beforeWhitespace","Autoclose brackets only when the cursor is to the left of whitespace."),""],description:g.a("autoClosingBrackets","Controls whether the editor should automatically close brackets after the user adds an opening bracket.")})),autoClosingDelete:$e(new c(6,"autoClosingDelete","auto",["always","auto","never"],{enumDescriptions:["",g.a("editor.autoClosingDelete.auto","Remove adjacent closing quotes or brackets only if they were automatically inserted."),""],description:g.a("autoClosingDelete","Controls whether the editor should remove adjacent closing quotes or brackets when deleting.")})),autoClosingOvertype:$e(new c(7,"autoClosingOvertype","auto",["always","auto","never"],{enumDescriptions:["",g.a("editor.autoClosingOvertype.auto","Type over closing quotes or brackets only if they were automatically inserted."),""],description:g.a("autoClosingOvertype","Controls whether the editor should type over closing quotes or brackets.")})),autoClosingQuotes:$e(new c(8,"autoClosingQuotes","languageDefined",["always","languageDefined","beforeWhitespace","never"],{enumDescriptions:["",g.a("editor.autoClosingQuotes.languageDefined","Use language configurations to determine when to autoclose quotes."),g.a("editor.autoClosingQuotes.beforeWhitespace","Autoclose quotes only when the cursor is to the left of whitespace."),""],description:g.a("autoClosingQuotes","Controls whether the editor should automatically close quotes after the user adds an opening quote.")})),autoIndent:$e(new p(9,"autoIndent",4,"full",["none","keep","brackets","advanced","full"],S,{enumDescriptions:[g.a("editor.autoIndent.none","The editor will not insert indentation automatically."),g.a("editor.autoIndent.keep","The editor will keep the current line's indentation."),g.a("editor.autoIndent.brackets","The editor will keep the current line's indentation and honor language defined brackets."),g.a("editor.autoIndent.advanced","The editor will keep the current line's indentation, honor language defined brackets and invoke special onEnterRules defined by languages."),g.a("editor.autoIndent.full","The editor will keep the current line's indentation, honor language defined brackets, invoke special onEnterRules defined by languages, and honor indentationRules defined by languages.")],description:g.a("autoIndent","Controls whether the editor should automatically adjust the indentation when users type, paste, move or indent lines.")})),automaticLayout:$e(new D(10,"automaticLayout",!1)),autoSurround:$e(new c(11,"autoSurround","languageDefined",["languageDefined","quotes","brackets","never"],{enumDescriptions:[g.a("editor.autoSurround.languageDefined","Use language configurations to determine when to automatically surround selections."),g.a("editor.autoSurround.quotes","Surround with quotes but not brackets."),g.a("editor.autoSurround.brackets","Surround with brackets but not quotes."),""],description:g.a("autoSurround","Controls whether the editor should automatically surround selections when typing quotes or brackets.")})),bracketPairColorization:$e(new he),bracketPairGuides:$e(new Le),stickyTabStops:$e(new D(103,"stickyTabStops",!1,{description:g.a("stickyTabStops","Emulate selection behavior of tab characters when using spaces for indentation. Selection will stick to tab stops.")})),codeLens:$e(new D(14,"codeLens",!0,{description:g.a("codeLens","Controls whether the editor shows CodeLens.")})),codeLensFontFamily:$e(new b(15,"codeLensFontFamily","",{description:g.a("codeLensFontFamily","Controls the font family for CodeLens.")})),codeLensFontSize:$e(new r(16,"codeLensFontSize",0,0,100,{type:"number",default:0,minimum:0,maximum:100,markdownDescription:g.a("codeLensFontSize","Controls the font size in pixels for CodeLens. When set to `0`, the 90% of `#editor.fontSize#` is used.")})),colorDecorators:$e(new D(17,"colorDecorators",!0,{description:g.a("colorDecorators","Controls whether the editor should render the inline color decorators and color picker.")})),columnSelection:$e(new D(18,"columnSelection",!1,{description:g.a("columnSelection","Enable that the selection with the mouse and keys is doing column selection.")})),comments:$e(new y),contextmenu:$e(new D(20,"contextmenu",!0)),copyWithSyntaxHighlighting:$e(new D(21,"copyWithSyntaxHighlighting",!0,{description:g.a("copyWithSyntaxHighlighting","Controls whether syntax highlighting should be copied into the clipboard.")})),cursorBlinking:$e(new p(22,"cursorBlinking",1,"blink",["blink","smooth","phase","expand","solid"],O,{description:g.a("cursorBlinking","Control the cursor animation style.")})),cursorSmoothCaretAnimation:$e(new D(23,"cursorSmoothCaretAnimation",!1,{description:g.a("cursorSmoothCaretAnimation","Controls whether the smooth caret animation should be enabled.")})),cursorStyle:$e(new p(24,"cursorStyle",k.Line,"line",["line","block","underline","line-thin","block-outline","underline-thin"],Q,{description:g.a("cursorStyle","Controls the cursor style.")})),cursorSurroundingLines:$e(new r(25,"cursorSurroundingLines",0,0,1073741824,{description:g.a("cursorSurroundingLines","Controls the minimal number of visible leading and trailing lines surrounding the cursor. Known as 'scrollOff' or 'scrollOffset' in some other editors.")})),cursorSurroundingLinesStyle:$e(new c(26,"cursorSurroundingLinesStyle","default",["default","all"],{enumDescriptions:[g.a("cursorSurroundingLinesStyle.default","`cursorSurroundingLines` is enforced only when triggered via the keyboard or API."),g.a("cursorSurroundingLinesStyle.all","`cursorSurroundingLines` is enforced always.")],description:g.a("cursorSurroundingLinesStyle","Controls when `cursorSurroundingLines` should be enforced.")})),cursorWidth:$e(new r(27,"cursorWidth",0,0,1073741824,{markdownDescription:g.a("cursorWidth","Controls the width of the cursor when `#editor.cursorStyle#` is set to `line`.")})),disableLayerHinting:$e(new D(28,"disableLayerHinting",!1)),disableMonospaceOptimizations:$e(new D(29,"disableMonospaceOptimizations",!1)),domReadOnly:$e(new D(30,"domReadOnly",!1)),dragAndDrop:$e(new D(31,"dragAndDrop",!0,{description:g.a("dragAndDrop","Controls whether the editor should allow moving selections via drag and drop.")})),emptySelectionClipboard:$e(new z),extraEditorClassName:$e(new b(33,"extraEditorClassName","")),fastScrollSensitivity:$e(new w(34,"fastScrollSensitivity",5,ce=>ce<=0?5:ce,{markdownDescription:g.a("fastScrollSensitivity","Scrolling speed multiplier when pressing `Alt`.")})),find:$e(new J),fixedOverflowWidgets:$e(new D(36,"fixedOverflowWidgets",!1)),folding:$e(new D(37,"folding",!0,{description:g.a("folding","Controls whether the editor has code folding enabled.")})),foldingStrategy:$e(new c(38,"foldingStrategy","auto",["auto","indentation"],{enumDescriptions:[g.a("foldingStrategy.auto","Use a language-specific folding strategy if available, else the indentation-based one."),g.a("foldingStrategy.indentation","Use the indentation-based folding strategy.")],description:g.a("foldingStrategy","Controls the strategy for computing folding ranges.")})),foldingHighlight:$e(new D(39,"foldingHighlight",!0,{description:g.a("foldingHighlight","Controls whether the editor should highlight folded ranges.")})),foldingImportsByDefault:$e(new D(40,"foldingImportsByDefault",!1,{description:g.a("foldingImportsByDefault","Controls whether the editor automatically collapses import ranges.")})),unfoldOnClickAfterEndOfLine:$e(new D(41,"unfoldOnClickAfterEndOfLine",!1,{description:g.a("unfoldOnClickAfterEndOfLine","Controls whether clicking on the empty content after a folded line will unfold the line.")})),fontFamily:$e(new b(42,"fontFamily",dt.fontFamily,{description:g.a("fontFamily","Controls the font family.")})),fontInfo:$e(new Z),fontLigatures2:$e(new re),fontSize:$e(new ne),fontWeight:$e(new le),formatOnPaste:$e(new D(47,"formatOnPaste",!1,{description:g.a("formatOnPaste","Controls whether the editor should automatically format the pasted content. A formatter must be available and the formatter should be able to format a range in a document.")})),formatOnType:$e(new D(48,"formatOnType",!1,{description:g.a("formatOnType","Controls whether the editor should automatically format the line after typing.")})),glyphMargin:$e(new D(49,"glyphMargin",!0,{description:g.a("glyphMargin","Controls whether the editor should render the vertical glyph margin. Glyph margin is mostly used for debugging.")})),gotoLocation:$e(new _e),hideCursorInOverviewRuler:$e(new D(51,"hideCursorInOverviewRuler",!1,{description:g.a("hideCursorInOverviewRuler","Controls whether the cursor should be hidden in the overview ruler.")})),hover:$e(new Ce),inDiffEditor:$e(new D(53,"inDiffEditor",!1)),letterSpacing:$e(new w(55,"letterSpacing",dt.letterSpacing,ce=>w.clamp(ce,-5,20),{description:g.a("letterSpacing","Controls the letter spacing in pixels.")})),lightbulb:$e(new ae),lineDecorationsWidth:$e(new m(57,"lineDecorationsWidth",10)),lineHeight:$e(new G),lineNumbers:$e(new Xe),lineNumbersMinChars:$e(new r(60,"lineNumbersMinChars",5,1,300)),linkedEditing:$e(new D(61,"linkedEditing",!1,{description:g.a("linkedEditing","Controls whether the editor has linked editing enabled. Depending on the language, related symbols, e.g. HTML tags, are updated while editing.")})),links:$e(new D(62,"links",!0,{description:g.a("links","Controls whether the editor should detect links and make them clickable.")})),matchBrackets:$e(new c(63,"matchBrackets","always",["always","near","never"],{description:g.a("matchBrackets","Highlight matching brackets.")})),minimap:$e(new ee),mouseStyle:$e(new c(65,"mouseStyle","text",["text","default","copy"])),mouseWheelScrollSensitivity:$e(new w(66,"mouseWheelScrollSensitivity",1,ce=>ce===0?1:ce,{markdownDescription:g.a("mouseWheelScrollSensitivity","A multiplier to be used on the `deltaX` and `deltaY` of mouse wheel scroll events.")})),mouseWheelZoom:$e(new D(67,"mouseWheelZoom",!1,{markdownDescription:g.a("mouseWheelZoom","Zoom the font of the editor when using mouse wheel and holding `Ctrl`.")})),multiCursorMergeOverlapping:$e(new D(68,"multiCursorMergeOverlapping",!0,{description:g.a("multiCursorMergeOverlapping","Merge multiple cursors when they are overlapping.")})),multiCursorModifier:$e(new p(69,"multiCursorModifier","altKey","alt",["ctrlCmd","alt"],pe,{markdownEnumDescriptions:[g.a("multiCursorModifier.ctrlCmd","Maps to `Control` on Windows and Linux and to `Command` on macOS."),g.a("multiCursorModifier.alt","Maps to `Alt` on Windows and Linux and to `Option` on macOS.")],markdownDescription:g.a({key:"multiCursorModifier",comment:["- `ctrlCmd` refers to a value the setting can take and should not be localized.","- `Control` and `Command` refer to the modifier keys Ctrl or Cmd on the keyboard and can be localized."]},"The modifier to be used to add multiple cursors with the mouse. The Go to Definition and Open Link mouse gestures will adapt such that they do not conflict with the multicursor modifier. [Read more](https://code.visualstudio.com/docs/editor/codebasics#_multicursor-modifier).")})),multiCursorPaste:$e(new c(70,"multiCursorPaste","spread",["spread","full"],{markdownEnumDescriptions:[g.a("multiCursorPaste.spread","Each cursor pastes a single line of the text."),g.a("multiCursorPaste.full","Each cursor pastes the full text.")],markdownDescription:g.a("multiCursorPaste","Controls pasting when the line count of the pasted text matches the cursor count.")})),occurrencesHighlight:$e(new D(71,"occurrencesHighlight",!0,{description:g.a("occurrencesHighlight","Controls whether the editor should highlight semantic symbol occurrences.")})),overviewRulerBorder:$e(new D(72,"overviewRulerBorder",!0,{description:g.a("overviewRulerBorder","Controls whether a border should be drawn around the overview ruler.")})),overviewRulerLanes:$e(new r(73,"overviewRulerLanes",3,0,3)),padding:$e(new Te),parameterHints:$e(new Ie),peekWidgetDefaultFocus:$e(new c(76,"peekWidgetDefaultFocus","tree",["tree","editor"],{enumDescriptions:[g.a("peekWidgetDefaultFocus.tree","Focus the tree when opening peek"),g.a("peekWidgetDefaultFocus.editor","Focus the editor when opening peek")],description:g.a("peekWidgetDefaultFocus","Controls whether to focus the inline editor or the tree in the peek widget.")})),definitionLinkOpensInPeek:$e(new D(77,"definitionLinkOpensInPeek",!1,{description:g.a("definitionLinkOpensInPeek","Controls whether the Go to Definition mouse gesture always opens the peek widget.")})),quickSuggestions:$e(new Oe),quickSuggestionsDelay:$e(new r(79,"quickSuggestionsDelay",10,0,1073741824,{description:g.a("quickSuggestionsDelay","Controls the delay in milliseconds after which quick suggestions will show up.")})),readOnly:$e(new D(80,"readOnly",!1)),renameOnType:$e(new D(81,"renameOnType",!1,{description:g.a("renameOnType","Controls whether the editor auto renames on type."),markdownDeprecationMessage:g.a("renameOnTypeDeprecate","Deprecated, use `editor.linkedEditing` instead.")})),renderControlCharacters:$e(new D(82,"renderControlCharacters",!0,{description:g.a("renderControlCharacters","Controls whether the editor should render control characters."),restricted:!0})),renderFinalNewline:$e(new D(83,"renderFinalNewline",!0,{description:g.a("renderFinalNewline","Render last line number when the file ends with a newline.")})),renderLineHighlight:$e(new c(84,"renderLineHighlight","line",["none","gutter","line","all"],{enumDescriptions:["","","",g.a("renderLineHighlight.all","Highlights both the gutter and the current line.")],description:g.a("renderLineHighlight","Controls how the editor should render the current line highlight.")})),renderLineHighlightOnlyWhenFocus:$e(new D(85,"renderLineHighlightOnlyWhenFocus",!1,{description:g.a("renderLineHighlightOnlyWhenFocus","Controls if the editor should render the current line highlight only when the editor is focused.")})),renderValidationDecorations:$e(new c(86,"renderValidationDecorations","editable",["editable","on","off"])),renderWhitespace:$e(new c(87,"renderWhitespace","selection",["none","boundary","selection","trailing","all"],{enumDescriptions:["",g.a("renderWhitespace.boundary","Render whitespace characters except for single spaces between words."),g.a("renderWhitespace.selection","Render whitespace characters only on selected text."),g.a("renderWhitespace.trailing","Render only trailing whitespace characters."),""],description:g.a("renderWhitespace","Controls how the editor should render whitespace characters.")})),revealHorizontalRightPadding:$e(new r(88,"revealHorizontalRightPadding",30,0,1e3)),roundedSelection:$e(new D(89,"roundedSelection",!0,{description:g.a("roundedSelection","Controls whether selections should have rounded corners.")})),rulers:$e(new Pe),scrollbar:$e(new Se),scrollBeyondLastColumn:$e(new r(92,"scrollBeyondLastColumn",5,0,1073741824,{description:g.a("scrollBeyondLastColumn","Controls the number of extra characters beyond which the editor will scroll horizontally.")})),scrollBeyondLastLine:$e(new D(93,"scrollBeyondLastLine",!0,{description:g.a("scrollBeyondLastLine","Controls whether the editor will scroll beyond the last line.")})),scrollPredominantAxis:$e(new D(94,"scrollPredominantAxis",!0,{description:g.a("scrollPredominantAxis","Scroll only along the predominant axis when scrolling both vertically and horizontally at the same time. Prevents horizontal drift when scrolling vertically on a trackpad.")})),selectionClipboard:$e(new D(95,"selectionClipboard",!0,{description:g.a("selectionClipboard","Controls whether the Linux primary clipboard should be supported."),included:B.d})),selectionHighlight:$e(new D(96,"selectionHighlight",!0,{description:g.a("selectionHighlight","Controls whether the editor should highlight matches similar to the selection.")})),selectOnLineNumbers:$e(new D(97,"selectOnLineNumbers",!0)),showFoldingControls:$e(new c(98,"showFoldingControls","mouseover",["always","mouseover"],{enumDescriptions:[g.a("showFoldingControls.always","Always show the folding controls."),g.a("showFoldingControls.mouseover","Only show the folding controls when the mouse is over the gutter.")],description:g.a("showFoldingControls","Controls when the folding controls on the gutter are shown.")})),showUnused:$e(new D(99,"showUnused",!0,{description:g.a("showUnused","Controls fading out of unused code.")})),showDeprecated:$e(new D(124,"showDeprecated",!0,{description:g.a("showDeprecated","Controls strikethrough deprecated variables.")})),inlayHints:$e(new V),snippetSuggestions:$e(new c(100,"snippetSuggestions","inline",["top","bottom","inline","none"],{enumDescriptions:[g.a("snippetSuggestions.top","Show snippet suggestions on top of other suggestions."),g.a("snippetSuggestions.bottom","Show snippet suggestions below other suggestions."),g.a("snippetSuggestions.inline","Show snippets suggestions with other suggestions."),g.a("snippetSuggestions.none","Do not show snippet suggestions.")],description:g.a("snippetSuggestions","Controls whether snippets are shown with other suggestions and how they are sorted.")})),smartSelect:$e(new ie),smoothScrolling:$e(new D(102,"smoothScrolling",!1,{description:g.a("smoothScrolling","Controls whether the editor will scroll using an animation.")})),stopRenderingLineAfter:$e(new r(104,"stopRenderingLineAfter",1e4,-1,1073741824)),suggest:$e(new ve),inlineSuggest:$e(new me),suggestFontSize:$e(new r(106,"suggestFontSize",0,0,1e3,{markdownDescription:g.a("suggestFontSize","Font size for the suggest widget. When set to `0`, the value of `#editor.fontSize#` is used.")})),suggestLineHeight:$e(new r(107,"suggestLineHeight",0,0,1e3,{markdownDescription:g.a("suggestLineHeight","Line height for the suggest widget. When set to `0`, the value of `#editor.lineHeight#` is used. The minimum value is 8.")})),suggestOnTriggerCharacters:$e(new D(108,"suggestOnTriggerCharacters",!0,{description:g.a("suggestOnTriggerCharacters","Controls whether suggestions should automatically show up when typing trigger characters.")})),suggestSelection:$e(new c(109,"suggestSelection","recentlyUsed",["first","recentlyUsed","recentlyUsedByPrefix"],{markdownEnumDescriptions:[g.a("suggestSelection.first","Always select the first suggestion."),g.a("suggestSelection.recentlyUsed","Select recent suggestions unless further typing selects one, e.g. `console.| -> console.log` because `log` has been completed recently."),g.a("suggestSelection.recentlyUsedByPrefix","Select suggestions based on previous prefixes that have completed those suggestions, e.g. `co -> console` and `con -> const`.")],description:g.a("suggestSelection","Controls how suggestions are pre-selected when showing the suggest list.")})),tabCompletion:$e(new c(110,"tabCompletion","off",["on","off","onlySnippets"],{enumDescriptions:[g.a("tabCompletion.on","Tab complete will insert the best matching suggestion when pressing tab."),g.a("tabCompletion.off","Disable tab completions."),g.a("tabCompletion.onlySnippets","Tab complete snippets when their prefix match. Works best when 'quickSuggestions' aren't enabled.")],description:g.a("tabCompletion","Enables tab completions.")})),tabIndex:$e(new r(111,"tabIndex",0,-1,1073741824)),unusualLineTerminators:$e(new c(112,"unusualLineTerminators","prompt",["auto","off","prompt"],{enumDescriptions:[g.a("unusualLineTerminators.auto","Unusual line terminators are automatically removed."),g.a("unusualLineTerminators.off","Unusual line terminators are ignored."),g.a("unusualLineTerminators.prompt","Unusual line terminators prompt to be removed.")],description:g.a("unusualLineTerminators","Remove unusual line terminators that might cause problems.")})),useShadowDOM:$e(new D(113,"useShadowDOM",!0)),useTabStops:$e(new D(114,"useTabStops",!0,{description:g.a("useTabStops","Inserting and deleting whitespace follows tab stops.")})),wordSeparators:$e(new b(115,"wordSeparators",x.b,{description:g.a("wordSeparators","Characters that will be used as word separators when doing word related navigations or operations.")})),wordWrap:$e(new c(116,"wordWrap","off",["off","on","wordWrapColumn","bounded"],{markdownEnumDescriptions:[g.a("wordWrap.off","Lines will never wrap."),g.a("wordWrap.on","Lines will wrap at the viewport width."),g.a({key:"wordWrap.wordWrapColumn",comment:["- `editor.wordWrapColumn` refers to a different setting and should not be localized."]},"Lines will wrap at `#editor.wordWrapColumn#`."),g.a({key:"wordWrap.bounded",comment:["- viewport means the edge of the visible window size.","- `editor.wordWrapColumn` refers to a different setting and should not be localized."]},"Lines will wrap at the minimum of viewport and `#editor.wordWrapColumn#`.")],description:g.a({key:"wordWrap",comment:["- 'off', 'on', 'wordWrapColumn' and 'bounded' refer to values the setting can take and should not be localized.","- `editor.wordWrapColumn` refers to a different setting and should not be localized."]},"Controls how lines should wrap.")})),wordWrapBreakAfterCharacters:$e(new b(117,"wordWrapBreakAfterCharacters"," })]?|/&.,;\xA2\xB0\u2032\u2033\u2030\u2103\u3001\u3002\uFF61\uFF64\uFFE0\uFF0C\uFF0E\uFF1A\uFF1B\uFF1F\uFF01\uFF05\u30FB\uFF65\u309D\u309E\u30FD\u30FE\u30FC\u30A1\u30A3\u30A5\u30A7\u30A9\u30C3\u30E3\u30E5\u30E7\u30EE\u30F5\u30F6\u3041\u3043\u3045\u3047\u3049\u3063\u3083\u3085\u3087\u308E\u3095\u3096\u31F0\u31F1\u31F2\u31F3\u31F4\u31F5\u31F6\u31F7\u31F8\u31F9\u31FA\u31FB\u31FC\u31FD\u31FE\u31FF\u3005\u303B\uFF67\uFF68\uFF69\uFF6A\uFF6B\uFF6C\uFF6D\uFF6E\uFF6F\uFF70\u201D\u3009\u300B\u300D\u300F\u3011\u3015\uFF09\uFF3D\uFF5D\uFF63")),wordWrapBreakBeforeCharacters:$e(new b(118,"wordWrapBreakBeforeCharacters","([{\u2018\u201C\u3008\u300A\u300C\u300E\u3010\u3014\uFF08\uFF3B\uFF5B\uFF62\xA3\xA5\uFF04\uFFE1\uFFE5+\uFF0B")),wordWrapColumn:$e(new r(119,"wordWrapColumn",80,1,1073741824,{markdownDescription:g.a({key:"wordWrapColumn",comment:["- `editor.wordWrap` refers to a different setting and should not be localized.","- 'wordWrapColumn' and 'bounded' refer to values the different setting can take and should not be localized."]},"Controls the wrapping column of the editor when `#editor.wordWrap#` is `wordWrapColumn` or `bounded`.")})),wordWrapOverride1:$e(new c(120,"wordWrapOverride1","inherit",["off","on","inherit"])),wordWrapOverride2:$e(new c(121,"wordWrapOverride2","inherit",["off","on","inherit"])),wrappingIndent:$e(new p(122,"wrappingIndent",1,"same",["none","same","indent","deepIndent"],U,{enumDescriptions:[g.a("wrappingIndent.none","No indentation. Wrapped lines begin at column 1."),g.a("wrappingIndent.same","Wrapped lines get the same indentation as the parent."),g.a("wrappingIndent.indent","Wrapped lines get +1 indentation toward the parent."),g.a("wrappingIndent.deepIndent","Wrapped lines get +2 indentation toward the parent.")],description:g.a("wrappingIndent","Controls the indentation of wrapped lines.")})),wrappingStrategy:$e(new c(123,"wrappingStrategy","simple",["simple","advanced"],{enumDescriptions:[g.a("wrappingStrategy.simple","Assumes that all characters are of the same width. This is a fast algorithm that works correctly for monospace fonts and certain scripts (like Latin characters) where glyphs are of equal width."),g.a("wrappingStrategy.advanced","Delegates wrapping points computation to the browser. This is a slow algorithm, that might cause freezes for large files, but it works correctly in all cases.")],description:g.a("wrappingStrategy","Controls the algorithm that computes wrapping points.")})),editorClassName:$e(new q),pixelRatio:$e(new Me),tabFocusMode:$e(new W),layoutInfo:$e(new oe),wrappingInfo:$e(new se)}},"/cAr":function(mt,M,t){"use strict";t.r(M);var g=t("+hIS");Object(g.a)({id:"msdax",extensions:[".dax",".msdax"],aliases:["DAX","MSDAX"],loader:function(){return t.e(344).then(t.bind(null,"8m5U"))}})},"/kV6":function(mt,M,t){"use strict";t.d(M,"a",function(){return A}),t.d(M,"b",function(){return m}),t.d(M,"d",function(){return D}),t.d(M,"c",function(){return L});class g{constructor(){this._keyCodeToStr=[],this._strToKeyCode=Object.create(null)}define(r,w){this._keyCodeToStr[r]=w,this._strToKeyCode[w.toLowerCase()]=r}keyCodeToStr(r){return this._keyCodeToStr[r]}strToKeyCode(r){return this._strToKeyCode[r.toLowerCase()]||0}}const B=new g,x=new g,R=new g,A=new Array(230),j={},I=[],v=Object.create(null),C=Object.create(null),m=[],d=[];for(let r=0;r<=193;r++)m[r]=-1;for(let r=0;r<=126;r++)d[r]=-1;(function(){const r="",w=[[0,1,0,"None",0,"unknown",0,"VK_UNKNOWN",r,r],[0,1,1,"Hyper",0,r,0,r,r,r],[0,1,2,"Super",0,r,0,r,r,r],[0,1,3,"Fn",0,r,0,r,r,r],[0,1,4,"FnLock",0,r,0,r,r,r],[0,1,5,"Suspend",0,r,0,r,r,r],[0,1,6,"Resume",0,r,0,r,r,r],[0,1,7,"Turbo",0,r,0,r,r,r],[0,1,8,"Sleep",0,r,0,"VK_SLEEP",r,r],[0,1,9,"WakeUp",0,r,0,r,r,r],[31,0,10,"KeyA",31,"A",65,"VK_A",r,r],[32,0,11,"KeyB",32,"B",66,"VK_B",r,r],[33,0,12,"KeyC",33,"C",67,"VK_C",r,r],[34,0,13,"KeyD",34,"D",68,"VK_D",r,r],[35,0,14,"KeyE",35,"E",69,"VK_E",r,r],[36,0,15,"KeyF",36,"F",70,"VK_F",r,r],[37,0,16,"KeyG",37,"G",71,"VK_G",r,r],[38,0,17,"KeyH",38,"H",72,"VK_H",r,r],[39,0,18,"KeyI",39,"I",73,"VK_I",r,r],[40,0,19,"KeyJ",40,"J",74,"VK_J",r,r],[41,0,20,"KeyK",41,"K",75,"VK_K",r,r],[42,0,21,"KeyL",42,"L",76,"VK_L",r,r],[43,0,22,"KeyM",43,"M",77,"VK_M",r,r],[44,0,23,"KeyN",44,"N",78,"VK_N",r,r],[45,0,24,"KeyO",45,"O",79,"VK_O",r,r],[46,0,25,"KeyP",46,"P",80,"VK_P",r,r],[47,0,26,"KeyQ",47,"Q",81,"VK_Q",r,r],[48,0,27,"KeyR",48,"R",82,"VK_R",r,r],[49,0,28,"KeyS",49,"S",83,"VK_S",r,r],[50,0,29,"KeyT",50,"T",84,"VK_T",r,r],[51,0,30,"KeyU",51,"U",85,"VK_U",r,r],[52,0,31,"KeyV",52,"V",86,"VK_V",r,r],[53,0,32,"KeyW",53,"W",87,"VK_W",r,r],[54,0,33,"KeyX",54,"X",88,"VK_X",r,r],[55,0,34,"KeyY",55,"Y",89,"VK_Y",r,r],[56,0,35,"KeyZ",56,"Z",90,"VK_Z",r,r],[22,0,36,"Digit1",22,"1",49,"VK_1",r,r],[23,0,37,"Digit2",23,"2",50,"VK_2",r,r],[24,0,38,"Digit3",24,"3",51,"VK_3",r,r],[25,0,39,"Digit4",25,"4",52,"VK_4",r,r],[26,0,40,"Digit5",26,"5",53,"VK_5",r,r],[27,0,41,"Digit6",27,"6",54,"VK_6",r,r],[28,0,42,"Digit7",28,"7",55,"VK_7",r,r],[29,0,43,"Digit8",29,"8",56,"VK_8",r,r],[30,0,44,"Digit9",30,"9",57,"VK_9",r,r],[21,0,45,"Digit0",21,"0",48,"VK_0",r,r],[3,1,46,"Enter",3,"Enter",13,"VK_RETURN",r,r],[9,1,47,"Escape",9,"Escape",27,"VK_ESCAPE",r,r],[1,1,48,"Backspace",1,"Backspace",8,"VK_BACK",r,r],[2,1,49,"Tab",2,"Tab",9,"VK_TAB",r,r],[10,1,50,"Space",10,"Space",32,"VK_SPACE",r,r],[83,0,51,"Minus",83,"-",189,"VK_OEM_MINUS","-","OEM_MINUS"],[81,0,52,"Equal",81,"=",187,"VK_OEM_PLUS","=","OEM_PLUS"],[87,0,53,"BracketLeft",87,"[",219,"VK_OEM_4","[","OEM_4"],[89,0,54,"BracketRight",89,"]",221,"VK_OEM_6","]","OEM_6"],[88,0,55,"Backslash",88,"\\",220,"VK_OEM_5","\\","OEM_5"],[0,0,56,"IntlHash",0,r,0,r,r,r],[80,0,57,"Semicolon",80,";",186,"VK_OEM_1",";","OEM_1"],[90,0,58,"Quote",90,"'",222,"VK_OEM_7","'","OEM_7"],[86,0,59,"Backquote",86,"`",192,"VK_OEM_3","`","OEM_3"],[82,0,60,"Comma",82,",",188,"VK_OEM_COMMA",",","OEM_COMMA"],[84,0,61,"Period",84,".",190,"VK_OEM_PERIOD",".","OEM_PERIOD"],[85,0,62,"Slash",85,"/",191,"VK_OEM_2","/","OEM_2"],[8,1,63,"CapsLock",8,"CapsLock",20,"VK_CAPITAL",r,r],[59,1,64,"F1",59,"F1",112,"VK_F1",r,r],[60,1,65,"F2",60,"F2",113,"VK_F2",r,r],[61,1,66,"F3",61,"F3",114,"VK_F3",r,r],[62,1,67,"F4",62,"F4",115,"VK_F4",r,r],[63,1,68,"F5",63,"F5",116,"VK_F5",r,r],[64,1,69,"F6",64,"F6",117,"VK_F6",r,r],[65,1,70,"F7",65,"F7",118,"VK_F7",r,r],[66,1,71,"F8",66,"F8",119,"VK_F8",r,r],[67,1,72,"F9",67,"F9",120,"VK_F9",r,r],[68,1,73,"F10",68,"F10",121,"VK_F10",r,r],[69,1,74,"F11",69,"F11",122,"VK_F11",r,r],[70,1,75,"F12",70,"F12",123,"VK_F12",r,r],[0,1,76,"PrintScreen",0,r,0,r,r,r],[79,1,77,"ScrollLock",79,"ScrollLock",145,"VK_SCROLL",r,r],[7,1,78,"Pause",7,"PauseBreak",19,"VK_PAUSE",r,r],[19,1,79,"Insert",19,"Insert",45,"VK_INSERT",r,r],[14,1,80,"Home",14,"Home",36,"VK_HOME",r,r],[11,1,81,"PageUp",11,"PageUp",33,"VK_PRIOR",r,r],[20,1,82,"Delete",20,"Delete",46,"VK_DELETE",r,r],[13,1,83,"End",13,"End",35,"VK_END",r,r],[12,1,84,"PageDown",12,"PageDown",34,"VK_NEXT",r,r],[17,1,85,"ArrowRight",17,"RightArrow",39,"VK_RIGHT","Right",r],[15,1,86,"ArrowLeft",15,"LeftArrow",37,"VK_LEFT","Left",r],[18,1,87,"ArrowDown",18,"DownArrow",40,"VK_DOWN","Down",r],[16,1,88,"ArrowUp",16,"UpArrow",38,"VK_UP","Up",r],[78,1,89,"NumLock",78,"NumLock",144,"VK_NUMLOCK",r,r],[108,1,90,"NumpadDivide",108,"NumPad_Divide",111,"VK_DIVIDE",r,r],[103,1,91,"NumpadMultiply",103,"NumPad_Multiply",106,"VK_MULTIPLY",r,r],[106,1,92,"NumpadSubtract",106,"NumPad_Subtract",109,"VK_SUBTRACT",r,r],[104,1,93,"NumpadAdd",104,"NumPad_Add",107,"VK_ADD",r,r],[3,1,94,"NumpadEnter",3,r,0,r,r,r],[94,1,95,"Numpad1",94,"NumPad1",97,"VK_NUMPAD1",r,r],[95,1,96,"Numpad2",95,"NumPad2",98,"VK_NUMPAD2",r,r],[96,1,97,"Numpad3",96,"NumPad3",99,"VK_NUMPAD3",r,r],[97,1,98,"Numpad4",97,"NumPad4",100,"VK_NUMPAD4",r,r],[98,1,99,"Numpad5",98,"NumPad5",101,"VK_NUMPAD5",r,r],[99,1,100,"Numpad6",99,"NumPad6",102,"VK_NUMPAD6",r,r],[100,1,101,"Numpad7",100,"NumPad7",103,"VK_NUMPAD7",r,r],[101,1,102,"Numpad8",101,"NumPad8",104,"VK_NUMPAD8",r,r],[102,1,103,"Numpad9",102,"NumPad9",105,"VK_NUMPAD9",r,r],[93,1,104,"Numpad0",93,"NumPad0",96,"VK_NUMPAD0",r,r],[107,1,105,"NumpadDecimal",107,"NumPad_Decimal",110,"VK_DECIMAL",r,r],[92,0,106,"IntlBackslash",92,"OEM_102",226,"VK_OEM_102",r,r],[58,1,107,"ContextMenu",58,"ContextMenu",93,r,r,r],[0,1,108,"Power",0,r,0,r,r,r],[0,1,109,"NumpadEqual",0,r,0,r,r,r],[71,1,110,"F13",71,"F13",124,"VK_F13",r,r],[72,1,111,"F14",72,"F14",125,"VK_F14",r,r],[73,1,112,"F15",73,"F15",126,"VK_F15",r,r],[74,1,113,"F16",74,"F16",127,"VK_F16",r,r],[75,1,114,"F17",75,"F17",128,"VK_F17",r,r],[76,1,115,"F18",76,"F18",129,"VK_F18",r,r],[77,1,116,"F19",77,"F19",130,"VK_F19",r,r],[0,1,117,"F20",0,r,0,"VK_F20",r,r],[0,1,118,"F21",0,r,0,"VK_F21",r,r],[0,1,119,"F22",0,r,0,"VK_F22",r,r],[0,1,120,"F23",0,r,0,"VK_F23",r,r],[0,1,121,"F24",0,r,0,"VK_F24",r,r],[0,1,122,"Open",0,r,0,r,r,r],[0,1,123,"Help",0,r,0,r,r,r],[0,1,124,"Select",0,r,0,r,r,r],[0,1,125,"Again",0,r,0,r,r,r],[0,1,126,"Undo",0,r,0,r,r,r],[0,1,127,"Cut",0,r,0,r,r,r],[0,1,128,"Copy",0,r,0,r,r,r],[0,1,129,"Paste",0,r,0,r,r,r],[0,1,130,"Find",0,r,0,r,r,r],[0,1,131,"AudioVolumeMute",112,"AudioVolumeMute",173,"VK_VOLUME_MUTE",r,r],[0,1,132,"AudioVolumeUp",113,"AudioVolumeUp",175,"VK_VOLUME_UP",r,r],[0,1,133,"AudioVolumeDown",114,"AudioVolumeDown",174,"VK_VOLUME_DOWN",r,r],[105,1,134,"NumpadComma",105,"NumPad_Separator",108,"VK_SEPARATOR",r,r],[110,0,135,"IntlRo",110,"ABNT_C1",193,"VK_ABNT_C1",r,r],[0,1,136,"KanaMode",0,r,0,r,r,r],[0,0,137,"IntlYen",0,r,0,r,r,r],[0,1,138,"Convert",0,r,0,r,r,r],[0,1,139,"NonConvert",0,r,0,r,r,r],[0,1,140,"Lang1",0,r,0,r,r,r],[0,1,141,"Lang2",0,r,0,r,r,r],[0,1,142,"Lang3",0,r,0,r,r,r],[0,1,143,"Lang4",0,r,0,r,r,r],[0,1,144,"Lang5",0,r,0,r,r,r],[0,1,145,"Abort",0,r,0,r,r,r],[0,1,146,"Props",0,r,0,r,r,r],[0,1,147,"NumpadParenLeft",0,r,0,r,r,r],[0,1,148,"NumpadParenRight",0,r,0,r,r,r],[0,1,149,"NumpadBackspace",0,r,0,r,r,r],[0,1,150,"NumpadMemoryStore",0,r,0,r,r,r],[0,1,151,"NumpadMemoryRecall",0,r,0,r,r,r],[0,1,152,"NumpadMemoryClear",0,r,0,r,r,r],[0,1,153,"NumpadMemoryAdd",0,r,0,r,r,r],[0,1,154,"NumpadMemorySubtract",0,r,0,r,r,r],[0,1,155,"NumpadClear",0,r,0,r,r,r],[0,1,156,"NumpadClearEntry",0,r,0,r,r,r],[5,1,0,r,5,"Ctrl",17,"VK_CONTROL",r,r],[4,1,0,r,4,"Shift",16,"VK_SHIFT",r,r],[6,1,0,r,6,"Alt",18,"VK_MENU",r,r],[57,1,0,r,57,"Meta",0,"VK_COMMAND",r,r],[5,1,157,"ControlLeft",5,r,0,"VK_LCONTROL",r,r],[4,1,158,"ShiftLeft",4,r,0,"VK_LSHIFT",r,r],[6,1,159,"AltLeft",6,r,0,"VK_LMENU",r,r],[57,1,160,"MetaLeft",57,r,0,"VK_LWIN",r,r],[5,1,161,"ControlRight",5,r,0,"VK_RCONTROL",r,r],[4,1,162,"ShiftRight",4,r,0,"VK_RSHIFT",r,r],[6,1,163,"AltRight",6,r,0,"VK_RMENU",r,r],[57,1,164,"MetaRight",57,r,0,"VK_RWIN",r,r],[0,1,165,"BrightnessUp",0,r,0,r,r,r],[0,1,166,"BrightnessDown",0,r,0,r,r,r],[0,1,167,"MediaPlay",0,r,0,r,r,r],[0,1,168,"MediaRecord",0,r,0,r,r,r],[0,1,169,"MediaFastForward",0,r,0,r,r,r],[0,1,170,"MediaRewind",0,r,0,r,r,r],[114,1,171,"MediaTrackNext",119,"MediaTrackNext",176,"VK_MEDIA_NEXT_TRACK",r,r],[115,1,172,"MediaTrackPrevious",120,"MediaTrackPrevious",177,"VK_MEDIA_PREV_TRACK",r,r],[116,1,173,"MediaStop",121,"MediaStop",178,"VK_MEDIA_STOP",r,r],[0,1,174,"Eject",0,r,0,r,r,r],[117,1,175,"MediaPlayPause",122,"MediaPlayPause",179,"VK_MEDIA_PLAY_PAUSE",r,r],[0,1,176,"MediaSelect",123,"LaunchMediaPlayer",181,"VK_MEDIA_LAUNCH_MEDIA_SELECT",r,r],[0,1,177,"LaunchMail",124,"LaunchMail",180,"VK_MEDIA_LAUNCH_MAIL",r,r],[0,1,178,"LaunchApp2",125,"LaunchApp2",183,"VK_MEDIA_LAUNCH_APP2",r,r],[0,1,179,"LaunchApp1",0,r,0,"VK_MEDIA_LAUNCH_APP1",r,r],[0,1,180,"SelectTask",0,r,0,r,r,r],[0,1,181,"LaunchScreenSaver",0,r,0,r,r,r],[0,1,182,"BrowserSearch",115,"BrowserSearch",170,"VK_BROWSER_SEARCH",r,r],[0,1,183,"BrowserHome",116,"BrowserHome",172,"VK_BROWSER_HOME",r,r],[112,1,184,"BrowserBack",117,"BrowserBack",166,"VK_BROWSER_BACK",r,r],[113,1,185,"BrowserForward",118,"BrowserForward",167,"VK_BROWSER_FORWARD",r,r],[0,1,186,"BrowserStop",0,r,0,"VK_BROWSER_STOP",r,r],[0,1,187,"BrowserRefresh",0,r,0,"VK_BROWSER_REFRESH",r,r],[0,1,188,"BrowserFavorites",0,r,0,"VK_BROWSER_FAVORITES",r,r],[0,1,189,"ZoomToggle",0,r,0,r,r,r],[0,1,190,"MailReply",0,r,0,r,r,r],[0,1,191,"MailForward",0,r,0,r,r,r],[0,1,192,"MailSend",0,r,0,r,r,r],[109,1,0,r,109,"KeyInComposition",229,r,r,r],[111,1,0,r,111,"ABNT_C2",194,"VK_ABNT_C2",r,r],[91,1,0,r,91,"OEM_8",223,"VK_OEM_8",r,r],[0,1,0,r,0,r,0,"VK_CLEAR",r,r],[0,1,0,r,0,r,0,"VK_KANA",r,r],[0,1,0,r,0,r,0,"VK_HANGUL",r,r],[0,1,0,r,0,r,0,"VK_JUNJA",r,r],[0,1,0,r,0,r,0,"VK_FINAL",r,r],[0,1,0,r,0,r,0,"VK_HANJA",r,r],[0,1,0,r,0,r,0,"VK_KANJI",r,r],[0,1,0,r,0,r,0,"VK_CONVERT",r,r],[0,1,0,r,0,r,0,"VK_NONCONVERT",r,r],[0,1,0,r,0,r,0,"VK_ACCEPT",r,r],[0,1,0,r,0,r,0,"VK_MODECHANGE",r,r],[0,1,0,r,0,r,0,"VK_SELECT",r,r],[0,1,0,r,0,r,0,"VK_PRINT",r,r],[0,1,0,r,0,r,0,"VK_EXECUTE",r,r],[0,1,0,r,0,r,0,"VK_SNAPSHOT",r,r],[0,1,0,r,0,r,0,"VK_HELP",r,r],[0,1,0,r,0,r,0,"VK_APPS",r,r],[0,1,0,r,0,r,0,"VK_PROCESSKEY",r,r],[0,1,0,r,0,r,0,"VK_PACKET",r,r],[0,1,0,r,0,r,0,"VK_DBE_SBCSCHAR",r,r],[0,1,0,r,0,r,0,"VK_DBE_DBCSCHAR",r,r],[0,1,0,r,0,r,0,"VK_ATTN",r,r],[0,1,0,r,0,r,0,"VK_CRSEL",r,r],[0,1,0,r,0,r,0,"VK_EXSEL",r,r],[0,1,0,r,0,r,0,"VK_EREOF",r,r],[0,1,0,r,0,r,0,"VK_PLAY",r,r],[0,1,0,r,0,r,0,"VK_ZOOM",r,r],[0,1,0,r,0,r,0,"VK_NONAME",r,r],[0,1,0,r,0,r,0,"VK_PA1",r,r],[0,1,0,r,0,r,0,"VK_OEM_CLEAR",r,r]];let b=[],u=[];for(const c of w){const[p,S,E,y,O,k,Q,q,z,J]=c;if(u[E]||(u[E]=!0,I[E]=y,v[y]=E,C[y.toLowerCase()]=E,S&&(m[E]=O,O!==0&&O!==3&&O!==5&&O!==4&&O!==6&&O!==57&&(d[O]=E))),!b[O]){if(b[O]=!0,!k)throw new Error(`String representation missing for key code ${O} around scan code ${y}`);B.define(O,k),x.define(O,z||k),R.define(O,J||z||k)}Q&&(A[Q]=O),q&&(j[q]=O)}d[3]=46})();var D;(function(r){function w(E){return B.keyCodeToStr(E)}r.toString=w;function b(E){return B.strToKeyCode(E)}r.fromString=b;function u(E){return x.keyCodeToStr(E)}r.toUserSettingsUS=u;function c(E){return R.keyCodeToStr(E)}r.toUserSettingsGeneral=c;function p(E){return x.strToKeyCode(E)||R.strToKeyCode(E)}r.fromUserSettings=p;function S(E){if(E>=93&&E<=108)return null;switch(E){case 16:return"Up";case 18:return"Down";case 15:return"Left";case 17:return"Right"}return B.keyCodeToStr(E)}r.toElectronAccelerator=S})(D||(D={}));function L(r,w){const b=(w&65535)<<16>>>0;return(r|b)>>>0}},"/oaI":function(mt,M,t){},"/yTO":function(mt,M){(function(t,g){mt.exports=function(){var B={722:function(A){A.exports=t}},x={};function R(A){if(x[A])return x[A].exports;var j=x[A]={exports:{}},I=!0;try{B[A](j,j.exports,R),I=!1}finally{I&&delete x[A]}return j.exports}return R.ab=g+"/",R(722)}()}).call(this,{},"/")},"0+8E":function(mt,M,t){"use strict";t.d(M,"b",function(){return u}),t.d(M,"a",function(){return c});var g=t("EffR"),B=t("4y0V"),x=t("Md8J"),R=t("WqXY"),A=t("OBOq"),j=t("GJhM"),I=t("G300"),v=t("zrhQ"),C=t("MI8n");class m{constructor(p,S=0,E=p.length,y=S-1){this.items=p,this.start=S,this.end=E,this.index=y}current(){return this.index===this.start-1||this.index===this.end?null:this.items[this.index]}next(){return this.index=Math.min(this.index+1,this.end),this.current()}previous(){return this.index=Math.max(this.index-1,this.start-1),this.current()}first(){return this.index=this.start,this.current()}last(){return this.index=this.end-1,this.current()}}class d{constructor(p=[],S=10){this._initialize(p),this._limit=S,this._onChange()}getHistory(){return this._elements}add(p){this._history.delete(p),this._history.add(p),this._onChange()}next(){return this._currentPosition()!==this._elements.length-1?this._navigator.next():null}previous(){return this._currentPosition()!==0?this._navigator.previous():null}current(){return this._navigator.current()}first(){return this._navigator.first()}last(){return this._navigator.last()}has(p){return this._history.has(p)}_onChange(){this._reduceToLimit();const p=this._elements;this._navigator=new m(p,0,p.length,p.length)}_reduceToLimit(){const p=this._elements;p.length>this._limit&&this._initialize(p.slice(p.length-this._limit))}_currentPosition(){const p=this._navigator.current();return p?this._elements.indexOf(p):-1}_initialize(p){this._history=new Set;for(const S of p)this._history.add(S)}get _elements(){const p=[];return this._history.forEach(S=>p.push(S)),p}}var D=t("qj0h"),L=t("i/Rh"),r=t("3/fG");const w=g.a,b={inputBackground:v.a.fromHex("#3C3C3C"),inputForeground:v.a.fromHex("#CCCCCC"),inputValidationInfoBorder:v.a.fromHex("#55AAFF"),inputValidationInfoBackground:v.a.fromHex("#063B49"),inputValidationWarningBorder:v.a.fromHex("#B89500"),inputValidationWarningBackground:v.a.fromHex("#352A05"),inputValidationErrorBorder:v.a.fromHex("#BE1100"),inputValidationErrorBackground:v.a.fromHex("#5A1D1D")};class u extends I.a{constructor(p,S,E){var y;super();this.state="idle",this.maxHeight=Number.POSITIVE_INFINITY,this._onDidChange=this._register(new C.b),this.onDidChange=this._onDidChange.event,this._onDidHeightChange=this._register(new C.b),this.onDidHeightChange=this._onDidHeightChange.event,this.contextViewProvider=S,this.options=E||Object.create(null),Object(D.f)(this.options,b,!1),this.message=null,this.placeholder=this.options.placeholder||"",this.tooltip=(y=this.options.tooltip)!==null&&y!==void 0?y:this.placeholder||"",this.ariaLabel=this.options.ariaLabel||"",this.inputBackground=this.options.inputBackground,this.inputForeground=this.options.inputForeground,this.inputBorder=this.options.inputBorder,this.inputValidationInfoBorder=this.options.inputValidationInfoBorder,this.inputValidationInfoBackground=this.options.inputValidationInfoBackground,this.inputValidationInfoForeground=this.options.inputValidationInfoForeground,this.inputValidationWarningBorder=this.options.inputValidationWarningBorder,this.inputValidationWarningBackground=this.options.inputValidationWarningBackground,this.inputValidationWarningForeground=this.options.inputValidationWarningForeground,this.inputValidationErrorBorder=this.options.inputValidationErrorBorder,this.inputValidationErrorBackground=this.options.inputValidationErrorBackground,this.inputValidationErrorForeground=this.options.inputValidationErrorForeground,this.options.validationOptions&&(this.validation=this.options.validationOptions.validation),this.element=g.q(p,w(".monaco-inputbox.idle"));let O=this.options.flexibleHeight?"textarea":"input",k=g.q(this.element,w(".ibwrapper"));if(this.input=g.q(k,w(O+".input.empty")),this.input.setAttribute("autocorrect","off"),this.input.setAttribute("autocapitalize","off"),this.input.setAttribute("spellcheck","false"),this.onfocus(this.input,()=>this.element.classList.add("synthetic-focus")),this.onblur(this.input,()=>this.element.classList.remove("synthetic-focus")),this.options.flexibleHeight){this.maxHeight=typeof this.options.flexibleMaxHeight=="number"?this.options.flexibleMaxHeight:Number.POSITIVE_INFINITY,this.mirror=g.q(k,w("div.mirror")),this.mirror.innerText="\xA0",this.scrollableElement=new j.b(this.element,{vertical:1}),this.options.flexibleWidth&&(this.input.setAttribute("wrap","off"),this.mirror.style.whiteSpace="pre",this.mirror.style.wordWrap="initial"),g.q(p,this.scrollableElement.getDomNode()),this._register(this.scrollableElement),this._register(this.scrollableElement.onScroll(z=>this.input.scrollTop=z.scrollTop));const Q=this._register(new B.a(document,"selectionchange")),q=C.c.filter(Q.event,()=>{const z=document.getSelection();return(z==null?void 0:z.anchorNode)===k});this._register(q(this.updateScrollDimensions,this)),this._register(this.onDidHeightChange(this.updateScrollDimensions,this))}else this.input.type=this.options.type||"text",this.input.setAttribute("wrap","off");this.ariaLabel&&this.input.setAttribute("aria-label",this.ariaLabel),this.placeholder&&!this.options.showPlaceholderOnFocus&&this.setPlaceHolder(this.placeholder),this.tooltip&&this.setTooltip(this.tooltip),this.oninput(this.input,()=>this.onValueChange()),this.onblur(this.input,()=>this.onBlur()),this.onfocus(this.input,()=>this.onFocus()),this.ignoreGesture(this.input),setTimeout(()=>this.updateMirror(),0),this.options.actions&&(this.actionbar=this._register(new R.a(this.element)),this.actionbar.push(this.options.actions,{icon:!0,label:!1})),this.applyStyles()}onBlur(){this._hideMessage(),this.options.showPlaceholderOnFocus&&this.input.setAttribute("placeholder","")}onFocus(){this._showMessage(),this.options.showPlaceholderOnFocus&&this.input.setAttribute("placeholder",this.placeholder||"")}setPlaceHolder(p){this.placeholder=p,this.input.setAttribute("placeholder",p)}setTooltip(p){this.tooltip=p,this.input.title=p}setAriaLabel(p){this.ariaLabel=p,p?this.input.setAttribute("aria-label",this.ariaLabel):this.input.removeAttribute("aria-label")}getAriaLabel(){return this.ariaLabel}get inputElement(){return this.input}get value(){return this.input.value}set value(p){this.input.value!==p&&(this.input.value=p,this.onValueChange())}get height(){return typeof this.cachedHeight=="number"?this.cachedHeight:g.H(this.element)}focus(){this.input.focus()}blur(){this.input.blur()}hasFocus(){return document.activeElement===this.input}select(p=null){this.input.select(),p&&(this.input.setSelectionRange(p.start,p.end),p.end===this.input.value.length&&(this.input.scrollLeft=this.input.scrollWidth))}isSelectionAtEnd(){return this.input.selectionEnd===this.input.value.length&&this.input.selectionStart===this.input.selectionEnd}enable(){this.input.removeAttribute("disabled")}disable(){this.blur(),this.input.disabled=!0,this._hideMessage()}get width(){return g.I(this.input)}set width(p){if(this.options.flexibleHeight&&this.options.flexibleWidth){let S=0;if(this.mirror){const E=parseFloat(this.mirror.style.paddingLeft||"")||0,y=parseFloat(this.mirror.style.paddingRight||"")||0;S=E+y}this.input.style.width=p-S+"px"}else this.input.style.width=p+"px";this.mirror&&(this.mirror.style.width=p+"px")}set paddingRight(p){this.options.flexibleHeight&&this.options.flexibleWidth?this.input.style.width=`calc(100% - ${p}px)`:this.input.style.paddingRight=p+"px",this.mirror&&(this.mirror.style.paddingRight=p+"px")}updateScrollDimensions(){if(typeof this.cachedContentHeight!="number"||typeof this.cachedHeight!="number"||!this.scrollableElement)return;const p=this.cachedContentHeight,S=this.cachedHeight,E=this.input.scrollTop;this.scrollableElement.setScrollDimensions({scrollHeight:p,height:S}),this.scrollableElement.setScrollPosition({scrollTop:E})}showMessage(p,S){this.message=p,this.element.classList.remove("idle"),this.element.classList.remove("info"),this.element.classList.remove("warning"),this.element.classList.remove("error"),this.element.classList.add(this.classForType(p.type));const E=this.stylesForType(this.message.type);this.element.style.border=E.border?`1px solid ${E.border}`:"",(this.hasFocus()||S)&&this._showMessage()}hideMessage(){this.message=null,this.element.classList.remove("info"),this.element.classList.remove("warning"),this.element.classList.remove("error"),this.element.classList.add("idle"),this._hideMessage(),this.applyStyles()}validate(){let p=null;return this.validation&&(p=this.validation(this.value),p?(this.inputElement.setAttribute("aria-invalid","true"),this.showMessage(p)):this.inputElement.hasAttribute("aria-invalid")&&(this.inputElement.removeAttribute("aria-invalid"),this.hideMessage())),p==null?void 0:p.type}stylesForType(p){switch(p){case 1:return{border:this.inputValidationInfoBorder,background:this.inputValidationInfoBackground,foreground:this.inputValidationInfoForeground};case 2:return{border:this.inputValidationWarningBorder,background:this.inputValidationWarningBackground,foreground:this.inputValidationWarningForeground};default:return{border:this.inputValidationErrorBorder,background:this.inputValidationErrorBackground,foreground:this.inputValidationErrorForeground}}}classForType(p){switch(p){case 1:return"info";case 2:return"warning";default:return"error"}}_showMessage(){if(!this.contextViewProvider||!this.message)return;let p,S=()=>p.style.width=g.I(this.element)+"px";this.contextViewProvider.showContextView({getAnchor:()=>this.element,anchorAlignment:1,render:y=>{if(!this.message)return null;p=g.q(y,w(".monaco-inputbox-container")),S();const O={inline:!0,className:"monaco-inputbox-message"},k=this.message.formatContent?Object(x.b)(this.message.content,O):Object(x.c)(this.message.content,O);k.classList.add(this.classForType(this.message.type));const Q=this.stylesForType(this.message.type);return k.style.backgroundColor=Q.background?Q.background.toString():"",k.style.color=Q.foreground?Q.foreground.toString():"",k.style.border=Q.border?`1px solid ${Q.border}`:"",g.q(p,k),null},onHide:()=>{this.state="closed"},layout:S});let E;this.message.type===3?E=r.a("alertErrorMessage","Error: {0}",this.message.content):this.message.type===2?E=r.a("alertWarningMessage","Warning: {0}",this.message.content):E=r.a("alertInfoMessage","Info: {0}",this.message.content),A.a(E),this.state="open"}_hideMessage(){if(!this.contextViewProvider)return;this.state==="open"&&this.contextViewProvider.hideContextView(),this.state="idle"}onValueChange(){this._onDidChange.fire(this.value),this.validate(),this.updateMirror(),this.input.classList.toggle("empty",!this.value),this.state==="open"&&this.contextViewProvider&&this.contextViewProvider.layout()}updateMirror(){if(!this.mirror)return;const p=this.value,S=p.charCodeAt(p.length-1),E=S===10?" ":"",y=(p+E).replace(/\u000c/g,"");y?this.mirror.textContent=p+E:this.mirror.innerText="\xA0",this.layout()}style(p){this.inputBackground=p.inputBackground,this.inputForeground=p.inputForeground,this.inputBorder=p.inputBorder,this.inputValidationInfoBackground=p.inputValidationInfoBackground,this.inputValidationInfoForeground=p.inputValidationInfoForeground,this.inputValidationInfoBorder=p.inputValidationInfoBorder,this.inputValidationWarningBackground=p.inputValidationWarningBackground,this.inputValidationWarningForeground=p.inputValidationWarningForeground,this.inputValidationWarningBorder=p.inputValidationWarningBorder,this.inputValidationErrorBackground=p.inputValidationErrorBackground,this.inputValidationErrorForeground=p.inputValidationErrorForeground,this.inputValidationErrorBorder=p.inputValidationErrorBorder,this.applyStyles()}applyStyles(){const p=this.inputBackground?this.inputBackground.toString():"",S=this.inputForeground?this.inputForeground.toString():"",E=this.inputBorder?this.inputBorder.toString():"";this.element.style.backgroundColor=p,this.element.style.color=S,this.input.style.backgroundColor="inherit",this.input.style.color=S,this.element.style.borderWidth=E?"1px":"",this.element.style.borderStyle=E?"solid":"",this.element.style.borderColor=E}layout(){if(!this.mirror)return;const p=this.cachedContentHeight;this.cachedContentHeight=g.H(this.mirror),p!==this.cachedContentHeight&&(this.cachedHeight=Math.min(this.cachedContentHeight,this.maxHeight),this.input.style.height=this.cachedHeight+"px",this._onDidHeightChange.fire(this.cachedContentHeight))}insertAtCursor(p){const S=this.inputElement,E=S.selectionStart,y=S.selectionEnd,O=S.value;E!==null&&y!==null&&(this.value=O.substr(0,E)+p+O.substr(y),S.setSelectionRange(E+1,E+1),this.layout())}dispose(){this._hideMessage(),this.message=null,this.actionbar&&this.actionbar.dispose(),super.dispose()}}class c extends u{constructor(p,S,E){const y=r.a({key:"history.inputbox.hint",comment:["Text will be prefixed with \u21C5 plus a single space, then used as a hint where input field keeps history"]},"for history"),O=` or \u21C5 ${y}`,k=` (\u21C5 ${y})`;super(p,S,E);this.history=new d(E.history,100);const Q=()=>{if(E.showHistoryHint&&E.showHistoryHint()&&!this.placeholder.endsWith(O)&&!this.placeholder.endsWith(k)&&this.history.getHistory().length){const q=this.placeholder.endsWith(")")?O:k,z=this.placeholder+q;E.showPlaceholderOnFocus&&document.activeElement!==this.input?this.placeholder=z:this.setPlaceHolder(z)}};this.observer=new MutationObserver((q,z)=>{q.forEach(J=>{J.target.textContent||Q()})}),this.observer.observe(this.input,{attributeFilter:["class"]}),this.onfocus(this.input,()=>Q()),this.onblur(this.input,()=>{const q=z=>{if(this.placeholder.endsWith(z)){const J=this.placeholder.slice(0,this.placeholder.length-z.length);return E.showPlaceholderOnFocus?this.placeholder=J:this.setPlaceHolder(J),!0}else return!1};q(k)||q(O)})}dispose(){super.dispose(),this.observer&&(this.observer.disconnect(),this.observer=void 0)}addToHistory(){this.value&&this.value!==this.getCurrentValue()&&this.history.add(this.value)}showNextValue(){this.history.has(this.value)||this.addToHistory();let p=this.getNextValue();p&&(p=p===this.value?this.getNextValue():p),p&&(this.value=p,A.c(this.value))}showPreviousValue(){this.history.has(this.value)||this.addToHistory();let p=this.getPreviousValue();p&&(p=p===this.value?this.getPreviousValue():p),p&&(this.value=p,A.c(this.value))}getCurrentValue(){let p=this.history.current();return p||(p=this.history.last(),this.history.next()),p}getPreviousValue(){return this.history.previous()||this.history.first()}getNextValue(){return this.history.next()||this.history.last()}}},"0/Sa":function(mt,M,t){"use strict";t.d(M,"a",function(){return B});var g=t("aokT");class B{static insert(x,R){return{range:new g.a(x.lineNumber,x.column,x.lineNumber,x.column),text:R,forceMoveMarkers:!0}}static delete(x){return{range:x,text:null}}static replace(x,R){return{range:x,text:R}}static replaceMove(x,R){return{range:x,text:R,forceMoveMarkers:!0}}}},"03kh":function(mt,M,t){"use strict";t.d(M,"a",function(){return D});var g=t("qj0h"),B=t("Vxe3"),x=t("nB0o"),R=t("nnTU"),A=t("T8No"),j=t("Cg/j"),I=t("sM1p"),v=t("t9D7"),C=t("R3nR"),m=function(L,r,w,b){var u=arguments.length,c=u<3?r:b===null?b=Object.getOwnPropertyDescriptor(r,w):b,p;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")c=Reflect.decorate(L,r,w,b);else for(var S=L.length-1;S>=0;S--)(p=L[S])&&(c=(u<3?p(c):u>3?p(r,w,c):p(r,w))||c);return u>3&&c&&Object.defineProperty(r,w,c),c},d=function(L,r){return function(w,b){r(w,b,L)}};let D=class extends x.a{constructor(r,w,b,u,c,p,S,E,y,O){super(r,Object.assign(Object.assign({},b.getRawOptions()),{overflowWidgetsDomNode:b.getOverflowWidgetsDomNode()}),{},u,c,p,S,E,y,O);this._parentEditor=b,this._overwriteOptions=w,super.updateOptions(this._overwriteOptions),this._register(b.onDidChangeConfiguration(k=>this._onParentConfigurationChanged(k)))}getParentEditor(){return this._parentEditor}_onParentConfigurationChanged(r){super.updateOptions(this._parentEditor.getRawOptions()),super.updateOptions(this._overwriteOptions)}updateOptions(r){g.f(this._overwriteOptions,r,!0),super.updateOptions(this._overwriteOptions)}};D=m([d(3,j.a),d(4,B.a),d(5,R.b),d(6,A.b),d(7,v.b),d(8,I.a),d(9,C.b)],D)},"09fa":function(mt,M,t){"use strict";t.d(M,"b",function(){return R}),t.d(M,"c",function(){return A}),t.d(M,"a",function(){return v}),t.d(M,"d",function(){return C});var g=t("MI8n"),B=t("pmY6"),x=t("Cg/j");const R=Object(x.c)("logService");var A;(function(m){m[m.Trace=0]="Trace",m[m.Debug=1]="Debug",m[m.Info=2]="Info",m[m.Warning=3]="Warning",m[m.Error=4]="Error",m[m.Critical=5]="Critical",m[m.Off=6]="Off"})(A||(A={}));const j=A.Info;class I extends B.a{constructor(){super(...arguments);this.level=j,this._onDidChangeLogLevel=this._register(new g.b)}setLevel(m){this.level!==m&&(this.level=m,this._onDidChangeLogLevel.fire(this.level))}getLevel(){return this.level}}class v extends I{constructor(m=j){super();this.setLevel(m)}trace(m,...d){this.getLevel()<=A.Trace&&console.log("%cTRACE","color: #888",m,...d)}debug(m,...d){this.getLevel()<=A.Debug&&console.log("%cDEBUG","background: #eee; color: #888",m,...d)}info(m,...d){this.getLevel()<=A.Info&&console.log("%c INFO","color: #33f",m,...d)}error(m,...d){this.getLevel()<=A.Error&&console.log("%c ERR","color: #f33",m,...d)}dispose(){}}class C extends B.a{constructor(m){super();this.logger=m,this._register(m)}getLevel(){return this.logger.getLevel()}trace(m,...d){this.logger.trace(m,...d)}debug(m,...d){this.logger.debug(m,...d)}info(m,...d){this.logger.info(m,...d)}error(m,...d){this.logger.error(m,...d)}}},"0JNc":function(mt,M,t){"use strict";t.d(M,"b",function(){return g}),t.d(M,"a",function(){return x}),t.d(M,"c",function(){return R}),t.d(M,"d",function(){return j});const g="`~!@#$%^&*()-=+[{]}\\|;:'\",.<>/?";function B(v=""){let C="(-?\\d*\\.\\d\\w*)|([^";for(const m of g){if(v.indexOf(m)>=0)continue;C+="\\"+m}return C+="\\s]+)",new RegExp(C,"g")}const x=B();function R(v){let C=x;if(v&&v instanceof RegExp)if(v.global)C=v;else{let m="g";v.ignoreCase&&(m+="i"),v.multiline&&(m+="m"),v.unicode&&(m+="u"),C=new RegExp(v.source,m)}return C.lastIndex=0,C}const A={maxLen:1e3,windowSize:15,timeBudget:150};function j(v,C,m,d,D=A){if(m.length>D.maxLen){let u=v-D.maxLen/2;return u<0?u=0:d+=u,m=m.substring(u,v+D.maxLen/2),j(v,C,m,d,D)}const L=Date.now(),r=v-1-d;let w=-1,b=null;for(let u=1;!(Date.now()-L>=D.timeBudget);u++){const c=r-D.windowSize*u;C.lastIndex=Math.max(0,c);const p=I(C,m,r,w);if(!p&&b)break;if(b=p,c<=0)break;w=c}if(b){let u={word:b[0],startColumn:d+1+b.index,endColumn:d+1+b.index+b[0].length};return C.lastIndex=0,u}return null}function I(v,C,m,d){let D;for(;D=v.exec(C);){const L=D.index||0;if(L<=m&&v.lastIndex>=m)return D;if(d>0&&L>d)return null}return null}},"0nBa":function(mt,M){var t={}.toString;mt.exports=Array.isArray||function(g){return t.call(g)=="[object Array]"}},"0oIH":function(mt,M,t){"use strict";t.r(M);var g=t("+hIS");Object(g.a)({id:"graphql",extensions:[".graphql",".gql"],aliases:["GraphQL","graphql","gql"],mimetypes:["application/graphql"],loader:function(){return t.e(334).then(t.bind(null,"Eg73"))}})},"10Fh":function(mt,M,t){"use strict";t.r(M),t.d(M,"provideSelectionRanges",function(){return y});var g=t("6OMU"),B=t("JQT/"),x=t("/cxE"),R=t("sswD"),A=t("cGHE"),j=t("aokT"),I=t("gCVg"),v=t("wQH0"),C=t("twdY"),m=t("Z7SF"),d=t("N0LK");class D{provideSelectionRanges(O,k){const Q=[];for(const q of k){const z=[];Q.push(z),this._addInWordRanges(z,O,q),this._addWordRanges(z,O,q),this._addWhitespaceLine(z,O,q),z.push({range:O.getFullModelRange()})}return Q}_addInWordRanges(O,k,Q){const q=k.getWordAtPosition(Q);if(!q)return;let{word:z,startColumn:J}=q,re=Q.column-J,Z=re,ne=re,le=0;for(;Z>=0;Z--){let _e=z.charCodeAt(Z);if(Z!==re&&(_e===95||_e===45))break;if(Object(d.G)(_e)&&Object(d.H)(le))break;le=_e}for(Z+=1;ne<z.length;ne++){let _e=z.charCodeAt(ne);if(Object(d.H)(_e)&&Object(d.G)(le))break;if(_e===95||_e===45)break;le=_e}Z<ne&&O.push({range:new j.a(Q.lineNumber,J+Z,Q.lineNumber,J+ne)})}_addWordRanges(O,k,Q){const q=k.getWordAtPosition(Q);q&&O.push({range:new j.a(Q.lineNumber,q.startColumn,Q.lineNumber,q.endColumn)})}_addWhitespaceLine(O,k,Q){k.getLineLength(Q.lineNumber)>0&&k.getLineFirstNonWhitespaceColumn(Q.lineNumber)===0&&k.getLineLastNonWhitespaceColumn(Q.lineNumber)===0&&O.push({range:new j.a(Q.lineNumber,1,Q.lineNumber,k.getLineMaxColumn(Q.lineNumber))})}}var L=t("3/fG"),r=t("fjLI"),w=t("nnTU"),b=function(O,k,Q,q){function z(J){return J instanceof Q?J:new Q(function(re){re(J)})}return new(Q||(Q=Promise))(function(J,re){function Z(_e){try{le(q.next(_e))}catch(Ce){re(Ce)}}function ne(_e){try{le(q.throw(_e))}catch(Ce){re(Ce)}}function le(_e){_e.done?J(_e.value):z(_e.value).then(Z,ne)}le((q=q.apply(O,k||[])).next())})};class u{constructor(O,k){this.index=O,this.ranges=k}mov(O){let k=this.index+(O?1:-1);if(k<0||k>=this.ranges.length)return this;const Q=new u(k,this.ranges);return Q.ranges[k].equalsRange(this.ranges[this.index])?Q.mov(O):Q}}class c{constructor(O){this._editor=O,this._ignoreSelection=!1}static get(O){return O.getContribution(c.ID)}dispose(){var O;(O=this._selectionListener)===null||O===void 0||O.dispose()}run(O){return b(this,void 0,void 0,function*(){if(!this._editor.hasModel())return;const k=this._editor.getSelections(),Q=this._editor.getModel();if(!C.z.has(Q))return;if(this._state||(yield y(Q,k.map(z=>z.getPosition()),this._editor.getOption(101),B.a.None).then(z=>{var J;if(!g.n(z)||z.length!==k.length)return;if(!this._editor.hasModel()||!g.g(this._editor.getSelections(),k,(re,Z)=>re.equalsSelection(Z)))return;for(let re=0;re<z.length;re++)z[re]=z[re].filter(Z=>Z.containsPosition(k[re].getStartPosition())&&Z.containsPosition(k[re].getEndPosition())),z[re].unshift(k[re]);this._state=z.map(re=>new u(0,re)),(J=this._selectionListener)===null||J===void 0||J.dispose(),this._selectionListener=this._editor.onDidChangeCursorPosition(()=>{var re;this._ignoreSelection||((re=this._selectionListener)===null||re===void 0||re.dispose(),this._state=void 0)})})),!this._state)return;this._state=this._state.map(z=>z.mov(O));const q=this._state.map(z=>I.a.fromPositions(z.ranges[z.index].getStartPosition(),z.ranges[z.index].getEndPosition()));this._ignoreSelection=!0;try{this._editor.setSelections(q)}finally{this._ignoreSelection=!1}})}}c.ID="editor.contrib.smartSelectController";class p extends R.b{constructor(O,k){super(k);this._forward=O}run(O,k){return b(this,void 0,void 0,function*(){let Q=c.get(k);Q&&(yield Q.run(this._forward))})}}class S extends p{constructor(){super(!0,{id:"editor.action.smartSelect.expand",label:L.a("smartSelect.expand","Expand Selection"),alias:"Expand Selection",precondition:void 0,kbOpts:{kbExpr:v.a.editorTextFocus,primary:1024|512|17,mac:{primary:2048|256|1024|17,secondary:[256|1024|17]},weight:100},menuOpts:{menuId:r.b.MenubarSelectionMenu,group:"1_basic",title:L.a({key:"miSmartSelectGrow",comment:["&& denotes a mnemonic"]},"&&Expand Selection"),order:2}})}}w.a.registerCommandAlias("editor.action.smartSelect.grow","editor.action.smartSelect.expand");class E extends p{constructor(){super(!1,{id:"editor.action.smartSelect.shrink",label:L.a("smartSelect.shrink","Shrink Selection"),alias:"Shrink Selection",precondition:void 0,kbOpts:{kbExpr:v.a.editorTextFocus,primary:1024|512|15,mac:{primary:2048|256|1024|15,secondary:[256|1024|15]},weight:100},menuOpts:{menuId:r.b.MenubarSelectionMenu,group:"1_basic",title:L.a({key:"miSmartSelectShrink",comment:["&& denotes a mnemonic"]},"&&Shrink Selection"),order:3}})}}Object(R.l)(c.ID,c),Object(R.j)(S),Object(R.j)(E),C.z.register("*",new D);function y(O,k,Q,q){return b(this,void 0,void 0,function*(){const z=C.z.all(O);z.length===1&&z.unshift(new m.a);let J=[],re=[];for(const Z of z)J.push(Promise.resolve(Z.provideSelectionRanges(O,k,q)).then(ne=>{if(g.n(ne)&&ne.length===k.length)for(let le=0;le<k.length;le++){re[le]||(re[le]=[]);for(const _e of ne[le])j.a.isIRange(_e.range)&&j.a.containsPosition(_e.range,k[le])&&re[le].push(j.a.lift(_e.range))}},x.g));return yield Promise.all(J),re.map(Z=>{if(Z.length===0)return[];Z.sort((Ce,oe)=>A.a.isBefore(Ce.getStartPosition(),oe.getStartPosition())?1:A.a.isBefore(oe.getStartPosition(),Ce.getStartPosition())||A.a.isBefore(Ce.getEndPosition(),oe.getEndPosition())?-1:A.a.isBefore(oe.getEndPosition(),Ce.getEndPosition())?1:0);let ne=[],le;for(const Ce of Z)(!le||j.a.containsRange(Ce,le)&&!j.a.equalsRange(Ce,le))&&(ne.push(Ce),le=Ce);if(!Q.selectLeadingAndTrailingWhitespace)return ne;let _e=[ne[0]];for(let Ce=1;Ce<ne.length;Ce++){const oe=ne[Ce-1],ae=ne[Ce];if(ae.startLineNumber!==oe.startLineNumber||ae.endLineNumber!==oe.endLineNumber){const V=new j.a(oe.startLineNumber,O.getLineFirstNonWhitespaceColumn(oe.startLineNumber),oe.endLineNumber,O.getLineLastNonWhitespaceColumn(oe.endLineNumber));V.containsRange(oe)&&!V.equalsRange(oe)&&ae.containsRange(V)&&!ae.equalsRange(V)&&_e.push(V);const G=new j.a(oe.startLineNumber,1,oe.endLineNumber,O.getLineMaxColumn(oe.endLineNumber));G.containsRange(oe)&&!G.equalsRange(V)&&ae.containsRange(G)&&!ae.equalsRange(G)&&_e.push(G)}_e.push(ae)}return _e})})}Object(R.o)("_executeSelectionRangeProvider",function(O,...k){const[Q]=k;return y(O,Q,{selectLeadingAndTrailingWhitespace:!0},B.a.None)})},"1I1M":function(mt,M,t){"use strict";t.d(M,"a",function(){return I}),t.d(M,"b",function(){return v});var g=t("N0LK"),B=t("Ll0s"),x=t("snIX"),R=t("5v8Y"),A=t("cGHE"),j=t("aokT");class I{static _createWord(m,d,D,L,r){return{start:L,end:r,wordType:d,nextCharClass:D}}static _findPreviousWordOnLine(m,d,D){let L=d.getLineContent(D.lineNumber);return this._doFindPreviousWordOnLine(L,m,D)}static _doFindPreviousWordOnLine(m,d,D){let L=0;for(let r=D.column-2;r>=0;r--){let w=m.charCodeAt(r),b=d.get(w);if(b===0){if(L===2)return this._createWord(m,L,b,r+1,this._findEndOfWord(m,d,L,r+1));L=1}else if(b===2){if(L===1)return this._createWord(m,L,b,r+1,this._findEndOfWord(m,d,L,r+1));L=2}else if(b===1&&L!==0)return this._createWord(m,L,b,r+1,this._findEndOfWord(m,d,L,r+1))}return L!==0?this._createWord(m,L,1,0,this._findEndOfWord(m,d,L,0)):null}static _findEndOfWord(m,d,D,L){let r=m.length;for(let w=L;w<r;w++){let b=m.charCodeAt(w),u=d.get(b);if(u===1)return w;if(D===1&&u===2)return w;if(D===2&&u===0)return w}return r}static _findNextWordOnLine(m,d,D){let L=d.getLineContent(D.lineNumber);return this._doFindNextWordOnLine(L,m,D)}static _doFindNextWordOnLine(m,d,D){let L=0,r=m.length;for(let w=D.column-1;w<r;w++){let b=m.charCodeAt(w),u=d.get(b);if(u===0){if(L===2)return this._createWord(m,L,u,this._findStartOfWord(m,d,L,w-1),w);L=1}else if(u===2){if(L===1)return this._createWord(m,L,u,this._findStartOfWord(m,d,L,w-1),w);L=2}else if(u===1&&L!==0)return this._createWord(m,L,u,this._findStartOfWord(m,d,L,w-1),w)}return L!==0?this._createWord(m,L,1,this._findStartOfWord(m,d,L,r-1),r):null}static _findStartOfWord(m,d,D,L){for(let r=L;r>=0;r--){let w=m.charCodeAt(r),b=d.get(w);if(b===1)return r+1;if(D===1&&b===2)return r+1;if(D===2&&b===0)return r+1}return 0}static moveWordLeft(m,d,D,L){let r=D.lineNumber,w=D.column;w===1&&(r>1&&(r=r-1,w=d.getLineMaxColumn(r)));let b=I._findPreviousWordOnLine(m,d,new A.a(r,w));if(L===0)return new A.a(r,b?b.start+1:1);if(L===1)return b&&b.wordType===2&&b.end-b.start===1&&b.nextCharClass===0&&(b=I._findPreviousWordOnLine(m,d,new A.a(r,b.start+1))),new A.a(r,b?b.start+1:1);if(L===3){for(;b&&b.wordType===2;)b=I._findPreviousWordOnLine(m,d,new A.a(r,b.start+1));return new A.a(r,b?b.start+1:1)}return b&&w<=b.end+1&&(b=I._findPreviousWordOnLine(m,d,new A.a(r,b.start+1))),new A.a(r,b?b.end+1:1)}static _moveWordPartLeft(m,d){const D=d.lineNumber,L=m.getLineMaxColumn(D);if(d.column===1)return D>1?new A.a(D-1,m.getLineMaxColumn(D-1)):d;const r=m.getLineContent(D);for(let w=d.column-1;w>1;w--){const b=r.charCodeAt(w-2),u=r.charCodeAt(w-1);if(b===95&&u!==95)return new A.a(D,w);if(g.G(b)&&g.H(u))return new A.a(D,w);if(g.H(b)&&g.H(u)&&w+1<L){const c=r.charCodeAt(w);if(g.G(c))return new A.a(D,w)}}return new A.a(D,1)}static moveWordRight(m,d,D,L){let r=D.lineNumber,w=D.column,b=!1;w===d.getLineMaxColumn(r)&&(r<d.getLineCount()&&(b=!0,r=r+1,w=1));let u=I._findNextWordOnLine(m,d,new A.a(r,w));if(L===2)u&&u.wordType===2&&(u.end-u.start===1&&u.nextCharClass===0&&(u=I._findNextWordOnLine(m,d,new A.a(r,u.end+1)))),u?w=u.end+1:w=d.getLineMaxColumn(r);else if(L===3){for(b&&(w=0);u&&(u.wordType===2||u.start+1<=w);)u=I._findNextWordOnLine(m,d,new A.a(r,u.end+1));u?w=u.start+1:w=d.getLineMaxColumn(r)}else u&&!b&&w>=u.start+1&&(u=I._findNextWordOnLine(m,d,new A.a(r,u.end+1))),u?w=u.start+1:w=d.getLineMaxColumn(r);return new A.a(r,w)}static _moveWordPartRight(m,d){const D=d.lineNumber,L=m.getLineMaxColumn(D);if(d.column===L)return D<m.getLineCount()?new A.a(D+1,1):d;const r=m.getLineContent(D);for(let w=d.column+1;w<L;w++){const b=r.charCodeAt(w-2),u=r.charCodeAt(w-1);if(b!==95&&u===95)return new A.a(D,w);if(g.G(b)&&g.H(u))return new A.a(D,w);if(g.H(b)&&g.H(u)&&w+1<L){const c=r.charCodeAt(w);if(g.G(c))return new A.a(D,w)}}return new A.a(D,L)}static _deleteWordLeftWhitespace(m,d){const D=m.getLineContent(d.lineNumber),L=d.column-2,r=g.I(D,L);return r+1<L?new j.a(d.lineNumber,r+2,d.lineNumber,d.column):null}static deleteWordLeft(m,d){const D=m.wordSeparators,L=m.model,r=m.selection,w=m.whitespaceHeuristics;if(!r.isEmpty())return r;if(x.a.isAutoClosingPairDelete(m.autoClosingDelete,m.autoClosingBrackets,m.autoClosingQuotes,m.autoClosingPairs.autoClosingPairsOpenByEnd,m.model,[m.selection],m.autoClosedCharacters)){const S=m.selection.getPosition();return new j.a(S.lineNumber,S.column-1,S.lineNumber,S.column+1)}const b=new A.a(r.positionLineNumber,r.positionColumn);let u=b.lineNumber,c=b.column;if(u===1&&c===1)return null;if(w){let S=this._deleteWordLeftWhitespace(L,b);if(S)return S}let p=I._findPreviousWordOnLine(D,L,b);return d===0?p?c=p.start+1:c>1?c=1:(u--,c=L.getLineMaxColumn(u)):(p&&c<=p.end+1&&(p=I._findPreviousWordOnLine(D,L,new A.a(u,p.start+1))),p?c=p.end+1:c>1?c=1:(u--,c=L.getLineMaxColumn(u))),new j.a(u,c,b.lineNumber,b.column)}static deleteInsideWord(m,d,D){if(!D.isEmpty())return D;const L=new A.a(D.positionLineNumber,D.positionColumn);let r=this._deleteInsideWordWhitespace(d,L);return r||this._deleteInsideWordDetermineDeleteRange(m,d,L)}static _charAtIsWhitespace(m,d){const D=m.charCodeAt(d);return D===32||D===9}static _deleteInsideWordWhitespace(m,d){const D=m.getLineContent(d.lineNumber),L=D.length;if(L===0)return null;let r=Math.max(d.column-2,0);if(!this._charAtIsWhitespace(D,r))return null;let w=Math.min(d.column-1,L-1);if(!this._charAtIsWhitespace(D,w))return null;for(;r>0&&this._charAtIsWhitespace(D,r-1);)r--;for(;w+1<L&&this._charAtIsWhitespace(D,w+1);)w++;return new j.a(d.lineNumber,r+1,d.lineNumber,w+2)}static _deleteInsideWordDetermineDeleteRange(m,d,D){const L=d.getLineContent(D.lineNumber),r=L.length;if(r===0)return D.lineNumber>1?new j.a(D.lineNumber-1,d.getLineMaxColumn(D.lineNumber-1),D.lineNumber,1):D.lineNumber<d.getLineCount()?new j.a(D.lineNumber,1,D.lineNumber+1,1):new j.a(D.lineNumber,1,D.lineNumber,1);const w=S=>S.start+1<=D.column&&D.column<=S.end+1,b=(S,E)=>(S=Math.min(S,D.column),E=Math.max(E,D.column),new j.a(D.lineNumber,S,D.lineNumber,E)),u=S=>{let E=S.start+1,y=S.end+1,O=!1;for(;y-1<r&&this._charAtIsWhitespace(L,y-1);)O=!0,y++;if(!O)for(;E>1&&this._charAtIsWhitespace(L,E-2);)E--;return b(E,y)},c=I._findPreviousWordOnLine(m,d,D);if(c&&w(c))return u(c);const p=I._findNextWordOnLine(m,d,D);return p&&w(p)?u(p):c&&p?b(c.end+1,p.start+1):c?b(c.start+1,c.end+1):p?b(p.start+1,p.end+1):b(1,r+1)}static _deleteWordPartLeft(m,d){if(!d.isEmpty())return d;const D=d.getPosition(),L=I._moveWordPartLeft(m,D);return new j.a(D.lineNumber,D.column,L.lineNumber,L.column)}static _findFirstNonWhitespaceChar(m,d){let D=m.length;for(let L=d;L<D;L++){let r=m.charAt(L);if(r!==" "&&r!==" ")return L}return D}static _deleteWordRightWhitespace(m,d){const D=m.getLineContent(d.lineNumber),L=d.column-1,r=this._findFirstNonWhitespaceChar(D,L);return L+1<r?new j.a(d.lineNumber,d.column,d.lineNumber,r+1):null}static deleteWordRight(m,d){const D=m.wordSeparators,L=m.model,r=m.selection,w=m.whitespaceHeuristics;if(!r.isEmpty())return r;const b=new A.a(r.positionLineNumber,r.positionColumn);let u=b.lineNumber,c=b.column;const p=L.getLineCount(),S=L.getLineMaxColumn(u);if(u===p&&c===S)return null;if(w){let y=this._deleteWordRightWhitespace(L,b);if(y)return y}let E=I._findNextWordOnLine(D,L,b);return d===2?E?c=E.end+1:c<S||u===p?c=S:(u++,E=I._findNextWordOnLine(D,L,new A.a(u,1)),E?c=E.start+1:c=L.getLineMaxColumn(u)):(E&&c>=E.start+1&&(E=I._findNextWordOnLine(D,L,new A.a(u,E.end+1))),E?c=E.start+1:c<S||u===p?c=S:(u++,E=I._findNextWordOnLine(D,L,new A.a(u,1)),E?c=E.start+1:c=L.getLineMaxColumn(u))),new j.a(u,c,b.lineNumber,b.column)}static _deleteWordPartRight(m,d){if(!d.isEmpty())return d;const D=d.getPosition(),L=I._moveWordPartRight(m,D);return new j.a(D.lineNumber,D.column,L.lineNumber,L.column)}static _createWordAtPosition(m,d,D){const L=new j.a(d,D.start+1,d,D.end+1);return{word:m.getValueInRange(L),startColumn:L.startColumn,endColumn:L.endColumn}}static getWordAtPosition(m,d,D){const L=Object(R.a)(d),r=I._findPreviousWordOnLine(L,m,D);if(r&&r.wordType===1&&r.start<=D.column-1&&D.column-1<=r.end)return I._createWordAtPosition(m,D.lineNumber,r);const w=I._findNextWordOnLine(L,m,D);return w&&w.wordType===1&&w.start<=D.column-1&&D.column-1<=w.end?I._createWordAtPosition(m,D.lineNumber,w):null}static word(m,d,D,L,r){const w=Object(R.a)(m.wordSeparators);let b=I._findPreviousWordOnLine(w,d,r),u=I._findNextWordOnLine(w,d,r);if(!L){let y,O;return b&&b.wordType===1&&b.start<=r.column-1&&r.column-1<=b.end?(y=b.start+1,O=b.end+1):u&&u.wordType===1&&u.start<=r.column-1&&r.column-1<=u.end?(y=u.start+1,O=u.end+1):(b?y=b.end+1:y=1,u?O=u.start+1:O=d.getLineMaxColumn(r.lineNumber)),new B.f(new j.a(r.lineNumber,y,r.lineNumber,O),0,new A.a(r.lineNumber,O),0)}let c,p;b&&b.wordType===1&&b.start<r.column-1&&r.column-1<b.end?(c=b.start+1,p=b.end+1):u&&u.wordType===1&&u.start<r.column-1&&r.column-1<u.end?(c=u.start+1,p=u.end+1):(c=r.column,p=r.column);let S=r.lineNumber,E;if(D.selectionStart.containsPosition(r))E=D.selectionStart.endColumn;else if(r.isBeforeOrEqual(D.selectionStart.getStartPosition())){E=c;let y=new A.a(S,E);D.selectionStart.containsPosition(y)&&(E=D.selectionStart.endColumn)}else{E=p;let y=new A.a(S,E);D.selectionStart.containsPosition(y)&&(E=D.selectionStart.startColumn)}return D.move(!0,S,E,0)}}class v extends I{static deleteWordPartLeft(m){const d=C([I.deleteWordLeft(m,0),I.deleteWordLeft(m,2),I._deleteWordPartLeft(m.model,m.selection)]);return d.sort(j.a.compareRangesUsingEnds),d[2]}static deleteWordPartRight(m){const d=C([I.deleteWordRight(m,0),I.deleteWordRight(m,2),I._deleteWordPartRight(m.model,m.selection)]);return d.sort(j.a.compareRangesUsingStarts),d[0]}static moveWordPartLeft(m,d,D){const L=C([I.moveWordLeft(m,d,D,0),I.moveWordLeft(m,d,D,2),I._moveWordPartLeft(d,D)]);return L.sort(A.a.compare),L[2]}static moveWordPartRight(m,d,D){const L=C([I.moveWordRight(m,d,D,0),I.moveWordRight(m,d,D,2),I._moveWordPartRight(d,D)]);return L.sort(A.a.compare),L[0]}}function C(m){return m.filter(d=>Boolean(d))}},"1YUG":function(mt,M,t){"use strict";t.r(M),t.d(M,"CoreEditorCommand",function(){return c}),t.d(M,"EditorScroll_",function(){return p}),t.d(M,"RevealLine_",function(){return S}),t.d(M,"CoreNavigationCommands",function(){return y}),t.d(M,"CoreEditingCommands",function(){return q});var g=t("3/fG"),B=t("D3Dy"),x=t("746U"),R=t("OBOq"),A=t("sswD"),j=t("Vxe3"),I=t("Ll0s"),v=t("cGHE"),C=t("aokT");class m{static columnSelect(re,Z,ne,le,_e,Ce){let oe=Math.abs(_e-ne)+1,ae=ne>_e,V=le>Ce,G=le<Ce,ee=[];for(let pe=0;pe<oe;pe++){let Te=ne+(ae?-pe:pe),Ie=I.a.columnFromVisibleColumn2(re,Z,Te,le),Me=I.a.columnFromVisibleColumn2(re,Z,Te,Ce),Oe=I.a.visibleColumnFromColumn2(re,Z,new v.a(Te,Ie)),Xe=I.a.visibleColumnFromColumn2(re,Z,new v.a(Te,Me));if(G){if(Oe>Ce)continue;if(Xe<le)continue}if(V){if(Xe>le)continue;if(Oe<Ce)continue}ee.push(new I.f(new C.a(Te,Ie,Te,Ie),0,new v.a(Te,Me),0))}if(ee.length===0)for(let pe=0;pe<oe;pe++){const Te=ne+(ae?-pe:pe),Ie=Z.getLineMaxColumn(Te);ee.push(new I.f(new C.a(Te,Ie,Te,Ie),0,new v.a(Te,Ie),0))}return{viewStates:ee,reversed:ae,fromLineNumber:ne,fromVisualColumn:le,toLineNumber:_e,toVisualColumn:Ce}}static columnSelectLeft(re,Z,ne){let le=ne.toViewVisualColumn;return le>0&&le--,m.columnSelect(re,Z,ne.fromViewLineNumber,ne.fromViewVisualColumn,ne.toViewLineNumber,le)}static columnSelectRight(re,Z,ne){let le=0;const _e=Math.min(ne.fromViewLineNumber,ne.toViewLineNumber),Ce=Math.max(ne.fromViewLineNumber,ne.toViewLineNumber);for(let ae=_e;ae<=Ce;ae++){const V=Z.getLineMaxColumn(ae),G=I.a.visibleColumnFromColumn2(re,Z,new v.a(ae,V));le=Math.max(le,G)}let oe=ne.toViewVisualColumn;return oe<le&&oe++,this.columnSelect(re,Z,ne.fromViewLineNumber,ne.fromViewVisualColumn,ne.toViewLineNumber,oe)}static columnSelectUp(re,Z,ne,le){const _e=le?re.pageSize:1,Ce=Math.max(1,ne.toViewLineNumber-_e);return this.columnSelect(re,Z,ne.fromViewLineNumber,ne.fromViewVisualColumn,Ce,ne.toViewVisualColumn)}static columnSelectDown(re,Z,ne,le){const _e=le?re.pageSize:1,Ce=Math.min(Z.getLineCount(),ne.toViewLineNumber+_e);return this.columnSelect(re,Z,ne.fromViewLineNumber,ne.fromViewVisualColumn,Ce,ne.toViewVisualColumn)}}var d=t("snIX"),D=t("oAeH"),L=t("GR/f"),r=t("wQH0"),w=t("T8No"),b=t("nrhi");const u=0;class c extends A.c{runEditorCommand(re,Z,ne){const le=Z._getViewModel();if(!le)return;this.runCoreEditorCommand(le,ne||{})}}var p;(function(re){const Z=function(le){if(!x.k(le))return!1;const _e=le;return x.l(_e.to)?!x.m(_e.by)&&!x.l(_e.by)||!x.m(_e.value)&&!x.j(_e.value)?!1:!(!x.m(_e.revealCursor)&&!x.g(_e.revealCursor)):!1};re.description={description:"Scroll editor in the given direction",args:[{name:"Editor scroll argument object",description:"Property-value pairs that can be passed through this argument:\n * 'to': A mandatory direction value.\n ```\n 'up', 'down'\n ```\n * 'by': Unit to move. Default is computed based on 'to' value.\n ```\n 'line', 'wrappedLine', 'page', 'halfPage'\n ```\n * 'value': Number of units to move. Default is '1'.\n * 'revealCursor': If 'true' reveals the cursor if it is outside view port.\n ",constraint:Z,schema:{type:"object",required:["to"],properties:{to:{type:"string",enum:["up","down"]},by:{type:"string",enum:["line","wrappedLine","page","halfPage"]},value:{type:"number",default:1},revealCursor:{type:"boolean"}}}}]},re.RawDirection={Up:"up",Down:"down"},re.RawUnit={Line:"line",WrappedLine:"wrappedLine",Page:"page",HalfPage:"halfPage"};function ne(le){let _e;switch(le.to){case re.RawDirection.Up:_e=1;break;case re.RawDirection.Down:_e=2;break;default:return null}let Ce;switch(le.by){case re.RawUnit.Line:Ce=1;break;case re.RawUnit.WrappedLine:Ce=2;break;case re.RawUnit.Page:Ce=3;break;case re.RawUnit.HalfPage:Ce=4;break;default:Ce=2}const oe=Math.floor(le.value||1),ae=!!le.revealCursor;return{direction:_e,unit:Ce,value:oe,revealCursor:ae,select:!!le.select}}re.parse=ne})(p||(p={}));var S;(function(re){const Z=function(ne){if(!x.k(ne))return!1;const le=ne;return!x.j(le.lineNumber)&&!x.l(le.lineNumber)?!1:!(!x.m(le.at)&&!x.l(le.at))};re.description={description:"Reveal the given line at the given logical position",args:[{name:"Reveal line argument object",description:"Property-value pairs that can be passed through this argument:\n * 'lineNumber': A mandatory line number value.\n * 'at': Logical position at which line has to be revealed.\n ```\n 'top', 'center', 'bottom'\n ```\n ",constraint:Z,schema:{type:"object",required:["lineNumber"],properties:{lineNumber:{type:["number","string"]},at:{type:"string",enum:["top","center","bottom"]}}}}]},re.RawAtArgument={Top:"top",Center:"center",Bottom:"bottom"}})(S||(S={}));class E{constructor(re){re.addImplementation(1e4,"code-editor",(Z,ne)=>{const le=Z.get(j.a).getFocusedCodeEditor();return le&&le.hasTextFocus()?this._runEditorCommand(Z,le,ne):!1}),re.addImplementation(1e3,"generic-dom-input-textarea",(Z,ne)=>{const le=document.activeElement;return le&&["input","textarea"].indexOf(le.tagName.toLowerCase())>=0?(this.runDOMCommand(),!0):!1}),re.addImplementation(0,"generic-dom",(Z,ne)=>{const le=Z.get(j.a).getActiveCodeEditor();return le?(le.focus(),this._runEditorCommand(Z,le,ne)):!1})}_runEditorCommand(re,Z,ne){const le=this.runEditorCommand(re,Z,ne);return le||!0}}var y;(function(re){class Z extends c{constructor(fe){super(fe);this._inSelectionMode=fe.inSelectionMode}runCoreEditorCommand(fe,Pe){fe.model.pushStackElement(),fe.setCursorStates(Pe.source,3,[D.b.moveTo(fe,fe.getPrimaryCursorState(),this._inSelectionMode,Pe.position,Pe.viewPosition)]),fe.revealPrimaryCursor(Pe.source,!0)}}re.MoveTo=Object(A.k)(new Z({id:"_moveTo",inSelectionMode:!1,precondition:void 0})),re.MoveToSelect=Object(A.k)(new Z({id:"_moveToSelect",inSelectionMode:!0,precondition:void 0}));class ne extends c{runCoreEditorCommand(fe,Pe){fe.model.pushStackElement();const Be=this._getColumnSelectResult(fe,fe.getPrimaryCursorState(),fe.getCursorColumnSelectData(),Pe);fe.setCursorStates(Pe.source,3,Be.viewStates.map(Se=>I.d.fromViewState(Se))),fe.setCursorColumnSelectData({isReal:!0,fromViewLineNumber:Be.fromLineNumber,fromViewVisualColumn:Be.fromVisualColumn,toViewLineNumber:Be.toLineNumber,toViewVisualColumn:Be.toVisualColumn}),Be.reversed?fe.revealTopMostCursor(Pe.source):fe.revealBottomMostCursor(Pe.source)}}re.ColumnSelect=Object(A.k)(new class extends ne{constructor(){super({id:"columnSelect",precondition:void 0})}_getColumnSelectResult(fe,Pe,Be,Se){const me=fe.model.validatePosition(Se.position),he=fe.coordinatesConverter.validateViewPosition(new v.a(Se.viewPosition.lineNumber,Se.viewPosition.column),me);let Le=Se.doColumnSelect?Be.fromViewLineNumber:he.lineNumber,we=Se.doColumnSelect?Be.fromViewVisualColumn:Se.mouseColumn-1;return m.columnSelect(fe.cursorConfig,fe,Le,we,he.lineNumber,Se.mouseColumn-1)}}),re.CursorColumnSelectLeft=Object(A.k)(new class extends ne{constructor(){super({id:"cursorColumnSelectLeft",precondition:void 0,kbOpts:{weight:u,kbExpr:r.a.textInputFocus,primary:2048|1024|512|15,linux:{primary:0}}})}_getColumnSelectResult(fe,Pe,Be,Se){return m.columnSelectLeft(fe.cursorConfig,fe,Be)}}),re.CursorColumnSelectRight=Object(A.k)(new class extends ne{constructor(){super({id:"cursorColumnSelectRight",precondition:void 0,kbOpts:{weight:u,kbExpr:r.a.textInputFocus,primary:2048|1024|512|17,linux:{primary:0}}})}_getColumnSelectResult(fe,Pe,Be,Se){return m.columnSelectRight(fe.cursorConfig,fe,Be)}});class le extends ne{constructor(fe){super(fe);this._isPaged=fe.isPaged}_getColumnSelectResult(fe,Pe,Be,Se){return m.columnSelectUp(fe.cursorConfig,fe,Be,this._isPaged)}}re.CursorColumnSelectUp=Object(A.k)(new le({isPaged:!1,id:"cursorColumnSelectUp",precondition:void 0,kbOpts:{weight:u,kbExpr:r.a.textInputFocus,primary:2048|1024|512|16,linux:{primary:0}}})),re.CursorColumnSelectPageUp=Object(A.k)(new le({isPaged:!0,id:"cursorColumnSelectPageUp",precondition:void 0,kbOpts:{weight:u,kbExpr:r.a.textInputFocus,primary:2048|1024|512|11,linux:{primary:0}}}));class _e extends ne{constructor(fe){super(fe);this._isPaged=fe.isPaged}_getColumnSelectResult(fe,Pe,Be,Se){return m.columnSelectDown(fe.cursorConfig,fe,Be,this._isPaged)}}re.CursorColumnSelectDown=Object(A.k)(new _e({isPaged:!1,id:"cursorColumnSelectDown",precondition:void 0,kbOpts:{weight:u,kbExpr:r.a.textInputFocus,primary:2048|1024|512|18,linux:{primary:0}}})),re.CursorColumnSelectPageDown=Object(A.k)(new _e({isPaged:!0,id:"cursorColumnSelectPageDown",precondition:void 0,kbOpts:{weight:u,kbExpr:r.a.textInputFocus,primary:2048|1024|512|12,linux:{primary:0}}}));class Ce extends c{constructor(){super({id:"cursorMove",precondition:void 0,description:D.a.description})}runCoreEditorCommand(fe,Pe){const Be=D.a.parse(Pe);if(!Be)return;this._runCursorMove(fe,Pe.source,Be)}_runCursorMove(fe,Pe,Be){fe.model.pushStackElement(),fe.setCursorStates(Pe,3,Ce._move(fe,fe.getCursorStates(),Be)),fe.revealPrimaryCursor(Pe,!0)}static _move(fe,Pe,Be){const Se=Be.select,me=Be.value;switch(Be.direction){case 0:case 1:case 2:case 3:case 4:case 5:case 6:case 7:case 8:case 9:case 10:return D.b.simpleMove(fe,Pe,Be.direction,Se,me,Be.unit);case 11:case 13:case 12:case 14:return D.b.viewportMove(fe,Pe,Be.direction,Se,me);default:return null}}}re.CursorMoveImpl=Ce,re.CursorMove=Object(A.k)(new Ce);class oe extends c{constructor(fe){super(fe);this._staticArgs=fe.args}runCoreEditorCommand(fe,Pe){let Be=this._staticArgs;this._staticArgs.value===-1&&(Be={direction:this._staticArgs.direction,unit:this._staticArgs.unit,select:this._staticArgs.select,value:fe.cursorConfig.pageSize}),fe.model.pushStackElement(),fe.setCursorStates(Pe.source,3,D.b.simpleMove(fe,fe.getCursorStates(),Be.direction,Be.select,Be.value,Be.unit)),fe.revealPrimaryCursor(Pe.source,!0)}}re.CursorLeft=Object(A.k)(new oe({args:{direction:0,unit:0,select:!1,value:1},id:"cursorLeft",precondition:void 0,kbOpts:{weight:u,kbExpr:r.a.textInputFocus,primary:15,mac:{primary:15,secondary:[256|32]}}})),re.CursorLeftSelect=Object(A.k)(new oe({args:{direction:0,unit:0,select:!0,value:1},id:"cursorLeftSelect",precondition:void 0,kbOpts:{weight:u,kbExpr:r.a.textInputFocus,primary:1024|15}})),re.CursorRight=Object(A.k)(new oe({args:{direction:1,unit:0,select:!1,value:1},id:"cursorRight",precondition:void 0,kbOpts:{weight:u,kbExpr:r.a.textInputFocus,primary:17,mac:{primary:17,secondary:[256|36]}}})),re.CursorRightSelect=Object(A.k)(new oe({args:{direction:1,unit:0,select:!0,value:1},id:"cursorRightSelect",precondition:void 0,kbOpts:{weight:u,kbExpr:r.a.textInputFocus,primary:1024|17}})),re.CursorUp=Object(A.k)(new oe({args:{direction:2,unit:2,select:!1,value:1},id:"cursorUp",precondition:void 0,kbOpts:{weight:u,kbExpr:r.a.textInputFocus,primary:16,mac:{primary:16,secondary:[256|46]}}})),re.CursorUpSelect=Object(A.k)(new oe({args:{direction:2,unit:2,select:!0,value:1},id:"cursorUpSelect",precondition:void 0,kbOpts:{weight:u,kbExpr:r.a.textInputFocus,primary:1024|16,secondary:[2048|1024|16],mac:{primary:1024|16},linux:{primary:1024|16}}})),re.CursorPageUp=Object(A.k)(new oe({args:{direction:2,unit:2,select:!1,value:-1},id:"cursorPageUp",precondition:void 0,kbOpts:{weight:u,kbExpr:r.a.textInputFocus,primary:11}})),re.CursorPageUpSelect=Object(A.k)(new oe({args:{direction:2,unit:2,select:!0,value:-1},id:"cursorPageUpSelect",precondition:void 0,kbOpts:{weight:u,kbExpr:r.a.textInputFocus,primary:1024|11}})),re.CursorDown=Object(A.k)(new oe({args:{direction:3,unit:2,select:!1,value:1},id:"cursorDown",precondition:void 0,kbOpts:{weight:u,kbExpr:r.a.textInputFocus,primary:18,mac:{primary:18,secondary:[256|44]}}})),re.CursorDownSelect=Object(A.k)(new oe({args:{direction:3,unit:2,select:!0,value:1},id:"cursorDownSelect",precondition:void 0,kbOpts:{weight:u,kbExpr:r.a.textInputFocus,primary:1024|18,secondary:[2048|1024|18],mac:{primary:1024|18},linux:{primary:1024|18}}})),re.CursorPageDown=Object(A.k)(new oe({args:{direction:3,unit:2,select:!1,value:-1},id:"cursorPageDown",precondition:void 0,kbOpts:{weight:u,kbExpr:r.a.textInputFocus,primary:12}})),re.CursorPageDownSelect=Object(A.k)(new oe({args:{direction:3,unit:2,select:!0,value:-1},id:"cursorPageDownSelect",precondition:void 0,kbOpts:{weight:u,kbExpr:r.a.textInputFocus,primary:1024|12}})),re.CreateCursor=Object(A.k)(new class extends c{constructor(){super({id:"createCursor",precondition:void 0})}runCoreEditorCommand(fe,Pe){let Be;Pe.wholeLine?Be=D.b.line(fe,fe.getPrimaryCursorState(),!1,Pe.position,Pe.viewPosition):Be=D.b.moveTo(fe,fe.getPrimaryCursorState(),!1,Pe.position,Pe.viewPosition);const Se=fe.getCursorStates();if(Se.length>1){const me=Be.modelState?Be.modelState.position:null,he=Be.viewState?Be.viewState.position:null;for(let Le=0,we=Se.length;Le<we;Le++){const ve=Se[Le];if(me&&!ve.modelState.selection.containsPosition(me))continue;if(he&&!ve.viewState.selection.containsPosition(he))continue;Se.splice(Le,1),fe.model.pushStackElement(),fe.setCursorStates(Pe.source,3,Se);return}}Se.push(Be),fe.model.pushStackElement(),fe.setCursorStates(Pe.source,3,Se)}}),re.LastCursorMoveToSelect=Object(A.k)(new class extends c{constructor(){super({id:"_lastCursorMoveToSelect",precondition:void 0})}runCoreEditorCommand(fe,Pe){const Be=fe.getLastAddedCursorIndex(),Se=fe.getCursorStates(),me=Se.slice(0);me[Be]=D.b.moveTo(fe,Se[Be],!0,Pe.position,Pe.viewPosition),fe.model.pushStackElement(),fe.setCursorStates(Pe.source,3,me)}});class ae extends c{constructor(fe){super(fe);this._inSelectionMode=fe.inSelectionMode}runCoreEditorCommand(fe,Pe){fe.model.pushStackElement(),fe.setCursorStates(Pe.source,3,D.b.moveToBeginningOfLine(fe,fe.getCursorStates(),this._inSelectionMode)),fe.revealPrimaryCursor(Pe.source,!0)}}re.CursorHome=Object(A.k)(new ae({inSelectionMode:!1,id:"cursorHome",precondition:void 0,kbOpts:{weight:u,kbExpr:r.a.textInputFocus,primary:14,mac:{primary:14,secondary:[2048|15]}}})),re.CursorHomeSelect=Object(A.k)(new ae({inSelectionMode:!0,id:"cursorHomeSelect",precondition:void 0,kbOpts:{weight:u,kbExpr:r.a.textInputFocus,primary:1024|14,mac:{primary:1024|14,secondary:[2048|1024|15]}}}));class V extends c{constructor(fe){super(fe);this._inSelectionMode=fe.inSelectionMode}runCoreEditorCommand(fe,Pe){fe.model.pushStackElement(),fe.setCursorStates(Pe.source,3,this._exec(fe.getCursorStates())),fe.revealPrimaryCursor(Pe.source,!0)}_exec(fe){const Pe=[];for(let Be=0,Se=fe.length;Be<Se;Be++){const me=fe[Be],he=me.modelState.position.lineNumber;Pe[Be]=I.d.fromModelState(me.modelState.move(this._inSelectionMode,he,1,0))}return Pe}}re.CursorLineStart=Object(A.k)(new V({inSelectionMode:!1,id:"cursorLineStart",precondition:void 0,kbOpts:{weight:u,kbExpr:r.a.textInputFocus,primary:0,mac:{primary:256|31}}})),re.CursorLineStartSelect=Object(A.k)(new V({inSelectionMode:!0,id:"cursorLineStartSelect",precondition:void 0,kbOpts:{weight:u,kbExpr:r.a.textInputFocus,primary:0,mac:{primary:256|1024|31}}}));class G extends c{constructor(fe){super(fe);this._inSelectionMode=fe.inSelectionMode}runCoreEditorCommand(fe,Pe){fe.model.pushStackElement(),fe.setCursorStates(Pe.source,3,D.b.moveToEndOfLine(fe,fe.getCursorStates(),this._inSelectionMode,Pe.sticky||!1)),fe.revealPrimaryCursor(Pe.source,!0)}}re.CursorEnd=Object(A.k)(new G({inSelectionMode:!1,id:"cursorEnd",precondition:void 0,kbOpts:{args:{sticky:!1},weight:u,kbExpr:r.a.textInputFocus,primary:13,mac:{primary:13,secondary:[2048|17]}},description:{description:"Go to End",args:[{name:"args",schema:{type:"object",properties:{sticky:{description:g.a("stickydesc","Stick to the end even when going to longer lines"),type:"boolean",default:!1}}}}]}})),re.CursorEndSelect=Object(A.k)(new G({inSelectionMode:!0,id:"cursorEndSelect",precondition:void 0,kbOpts:{args:{sticky:!1},weight:u,kbExpr:r.a.textInputFocus,primary:1024|13,mac:{primary:1024|13,secondary:[2048|1024|17]}},description:{description:"Select to End",args:[{name:"args",schema:{type:"object",properties:{sticky:{description:g.a("stickydesc","Stick to the end even when going to longer lines"),type:"boolean",default:!1}}}}]}}));class ee extends c{constructor(fe){super(fe);this._inSelectionMode=fe.inSelectionMode}runCoreEditorCommand(fe,Pe){fe.model.pushStackElement(),fe.setCursorStates(Pe.source,3,this._exec(fe,fe.getCursorStates())),fe.revealPrimaryCursor(Pe.source,!0)}_exec(fe,Pe){const Be=[];for(let Se=0,me=Pe.length;Se<me;Se++){const he=Pe[Se],Le=he.modelState.position.lineNumber,we=fe.model.getLineMaxColumn(Le);Be[Se]=I.d.fromModelState(he.modelState.move(this._inSelectionMode,Le,we,0))}return Be}}re.CursorLineEnd=Object(A.k)(new ee({inSelectionMode:!1,id:"cursorLineEnd",precondition:void 0,kbOpts:{weight:u,kbExpr:r.a.textInputFocus,primary:0,mac:{primary:256|35}}})),re.CursorLineEndSelect=Object(A.k)(new ee({inSelectionMode:!0,id:"cursorLineEndSelect",precondition:void 0,kbOpts:{weight:u,kbExpr:r.a.textInputFocus,primary:0,mac:{primary:256|1024|35}}}));class pe extends c{constructor(fe){super(fe);this._inSelectionMode=fe.inSelectionMode}runCoreEditorCommand(fe,Pe){fe.model.pushStackElement(),fe.setCursorStates(Pe.source,3,D.b.moveToBeginningOfBuffer(fe,fe.getCursorStates(),this._inSelectionMode)),fe.revealPrimaryCursor(Pe.source,!0)}}re.CursorTop=Object(A.k)(new pe({inSelectionMode:!1,id:"cursorTop",precondition:void 0,kbOpts:{weight:u,kbExpr:r.a.textInputFocus,primary:2048|14,mac:{primary:2048|16}}})),re.CursorTopSelect=Object(A.k)(new pe({inSelectionMode:!0,id:"cursorTopSelect",precondition:void 0,kbOpts:{weight:u,kbExpr:r.a.textInputFocus,primary:2048|1024|14,mac:{primary:2048|1024|16}}}));class Te extends c{constructor(fe){super(fe);this._inSelectionMode=fe.inSelectionMode}runCoreEditorCommand(fe,Pe){fe.model.pushStackElement(),fe.setCursorStates(Pe.source,3,D.b.moveToEndOfBuffer(fe,fe.getCursorStates(),this._inSelectionMode)),fe.revealPrimaryCursor(Pe.source,!0)}}re.CursorBottom=Object(A.k)(new Te({inSelectionMode:!1,id:"cursorBottom",precondition:void 0,kbOpts:{weight:u,kbExpr:r.a.textInputFocus,primary:2048|13,mac:{primary:2048|18}}})),re.CursorBottomSelect=Object(A.k)(new Te({inSelectionMode:!0,id:"cursorBottomSelect",precondition:void 0,kbOpts:{weight:u,kbExpr:r.a.textInputFocus,primary:2048|1024|13,mac:{primary:2048|1024|18}}}));class Ie extends c{constructor(){super({id:"editorScroll",precondition:void 0,description:p.description})}runCoreEditorCommand(fe,Pe){const Be=p.parse(Pe);if(!Be)return;this._runEditorScroll(fe,Pe.source,Be)}_runEditorScroll(fe,Pe,Be){const Se=this._computeDesiredScrollTop(fe,Be);if(Be.revealCursor){const me=fe.getCompletelyVisibleViewRangeAtScrollTop(Se);fe.setCursorStates(Pe,3,[D.b.findPositionInViewportIfOutside(fe,fe.getPrimaryCursorState(),me,Be.select)])}fe.setScrollTop(Se,0)}_computeDesiredScrollTop(fe,Pe){if(Pe.unit===1){const me=fe.getCompletelyVisibleViewRange(),he=fe.coordinatesConverter.convertViewRangeToModelRange(me);let Le;Pe.direction===1?Le=Math.max(1,he.startLineNumber-Pe.value):Le=Math.min(fe.model.getLineCount(),he.startLineNumber+Pe.value);const we=fe.coordinatesConverter.convertModelPositionToViewPosition(new v.a(Le,1));return fe.getVerticalOffsetForLineNumber(we.lineNumber)}let Be;Pe.unit===3?Be=fe.cursorConfig.pageSize*Pe.value:Pe.unit===4?Be=Math.round(fe.cursorConfig.pageSize/2)*Pe.value:Be=Pe.value;const Se=(Pe.direction===1?-1:1)*Be;return fe.getScrollTop()+Se*fe.cursorConfig.lineHeight}}re.EditorScrollImpl=Ie,re.EditorScroll=Object(A.k)(new Ie),re.ScrollLineUp=Object(A.k)(new class extends c{constructor(){super({id:"scrollLineUp",precondition:void 0,kbOpts:{weight:u,kbExpr:r.a.textInputFocus,primary:2048|16,mac:{primary:256|11}}})}runCoreEditorCommand(fe,Pe){re.EditorScroll._runEditorScroll(fe,Pe.source,{direction:1,unit:2,value:1,revealCursor:!1,select:!1})}}),re.ScrollPageUp=Object(A.k)(new class extends c{constructor(){super({id:"scrollPageUp",precondition:void 0,kbOpts:{weight:u,kbExpr:r.a.textInputFocus,primary:2048|11,win:{primary:512|11},linux:{primary:512|11}}})}runCoreEditorCommand(fe,Pe){re.EditorScroll._runEditorScroll(fe,Pe.source,{direction:1,unit:3,value:1,revealCursor:!1,select:!1})}}),re.ScrollLineDown=Object(A.k)(new class extends c{constructor(){super({id:"scrollLineDown",precondition:void 0,kbOpts:{weight:u,kbExpr:r.a.textInputFocus,primary:2048|18,mac:{primary:256|12}}})}runCoreEditorCommand(fe,Pe){re.EditorScroll._runEditorScroll(fe,Pe.source,{direction:2,unit:2,value:1,revealCursor:!1,select:!1})}}),re.ScrollPageDown=Object(A.k)(new class extends c{constructor(){super({id:"scrollPageDown",precondition:void 0,kbOpts:{weight:u,kbExpr:r.a.textInputFocus,primary:2048|12,win:{primary:512|12},linux:{primary:512|12}}})}runCoreEditorCommand(fe,Pe){re.EditorScroll._runEditorScroll(fe,Pe.source,{direction:2,unit:3,value:1,revealCursor:!1,select:!1})}});class Me extends c{constructor(fe){super(fe);this._inSelectionMode=fe.inSelectionMode}runCoreEditorCommand(fe,Pe){fe.model.pushStackElement(),fe.setCursorStates(Pe.source,3,[D.b.word(fe,fe.getPrimaryCursorState(),this._inSelectionMode,Pe.position)]),fe.revealPrimaryCursor(Pe.source,!0)}}re.WordSelect=Object(A.k)(new Me({inSelectionMode:!1,id:"_wordSelect",precondition:void 0})),re.WordSelectDrag=Object(A.k)(new Me({inSelectionMode:!0,id:"_wordSelectDrag",precondition:void 0})),re.LastCursorWordSelect=Object(A.k)(new class extends c{constructor(){super({id:"lastCursorWordSelect",precondition:void 0})}runCoreEditorCommand(fe,Pe){const Be=fe.getLastAddedCursorIndex(),Se=fe.getCursorStates(),me=Se.slice(0),he=Se[Be];me[Be]=D.b.word(fe,he,he.modelState.hasSelection(),Pe.position),fe.model.pushStackElement(),fe.setCursorStates(Pe.source,3,me)}});class Oe extends c{constructor(fe){super(fe);this._inSelectionMode=fe.inSelectionMode}runCoreEditorCommand(fe,Pe){fe.model.pushStackElement(),fe.setCursorStates(Pe.source,3,[D.b.line(fe,fe.getPrimaryCursorState(),this._inSelectionMode,Pe.position,Pe.viewPosition)]),fe.revealPrimaryCursor(Pe.source,!1)}}re.LineSelect=Object(A.k)(new Oe({inSelectionMode:!1,id:"_lineSelect",precondition:void 0})),re.LineSelectDrag=Object(A.k)(new Oe({inSelectionMode:!0,id:"_lineSelectDrag",precondition:void 0}));class Xe extends c{constructor(fe){super(fe);this._inSelectionMode=fe.inSelectionMode}runCoreEditorCommand(fe,Pe){const Be=fe.getLastAddedCursorIndex(),Se=fe.getCursorStates(),me=Se.slice(0);me[Be]=D.b.line(fe,Se[Be],this._inSelectionMode,Pe.position,Pe.viewPosition),fe.model.pushStackElement(),fe.setCursorStates(Pe.source,3,me)}}re.LastCursorLineSelect=Object(A.k)(new Xe({inSelectionMode:!1,id:"lastCursorLineSelect",precondition:void 0})),re.LastCursorLineSelectDrag=Object(A.k)(new Xe({inSelectionMode:!0,id:"lastCursorLineSelectDrag",precondition:void 0})),re.ExpandLineSelection=Object(A.k)(new class extends c{constructor(){super({id:"expandLineSelection",precondition:void 0,kbOpts:{weight:u,kbExpr:r.a.textInputFocus,primary:2048|42}})}runCoreEditorCommand(fe,Pe){fe.model.pushStackElement(),fe.setCursorStates(Pe.source,3,D.b.expandLineSelection(fe,fe.getCursorStates())),fe.revealPrimaryCursor(Pe.source,!0)}}),re.CancelSelection=Object(A.k)(new class extends c{constructor(){super({id:"cancelSelection",precondition:r.a.hasNonEmptySelection,kbOpts:{weight:u,kbExpr:r.a.textInputFocus,primary:9,secondary:[1024|9]}})}runCoreEditorCommand(fe,Pe){fe.model.pushStackElement(),fe.setCursorStates(Pe.source,3,[D.b.cancelSelection(fe,fe.getPrimaryCursorState())]),fe.revealPrimaryCursor(Pe.source,!0)}}),re.RemoveSecondaryCursors=Object(A.k)(new class extends c{constructor(){super({id:"removeSecondaryCursors",precondition:r.a.hasMultipleSelections,kbOpts:{weight:u+1,kbExpr:r.a.textInputFocus,primary:9,secondary:[1024|9]}})}runCoreEditorCommand(fe,Pe){fe.model.pushStackElement(),fe.setCursorStates(Pe.source,3,[fe.getPrimaryCursorState()]),fe.revealPrimaryCursor(Pe.source,!0),Object(R.c)(g.a("removedCursor","Removed secondary cursors"))}}),re.RevealLine=Object(A.k)(new class extends c{constructor(){super({id:"revealLine",precondition:void 0,description:S.description})}runCoreEditorCommand(fe,Pe){const Be=Pe,Se=Be.lineNumber||0;let me=typeof Se=="number"?Se+1:parseInt(Se)+1;me<1&&(me=1);const he=fe.model.getLineCount();me>he&&(me=he);const Le=new C.a(me,1,me,fe.model.getLineMaxColumn(me));let we=0;if(Be.at)switch(Be.at){case S.RawAtArgument.Top:we=3;break;case S.RawAtArgument.Center:we=1;break;case S.RawAtArgument.Bottom:we=4;break;default:break}const ve=fe.coordinatesConverter.convertModelRangeToViewRange(Le);fe.revealRange(Pe.source,!1,ve,we,0)}}),re.SelectAll=new class extends E{constructor(){super(A.h)}runDOMCommand(){B.g&&(document.activeElement.focus(),document.activeElement.select()),document.execCommand("selectAll")}runEditorCommand(fe,Pe,Be){const Se=Pe._getViewModel();if(!Se)return;this.runCoreEditorCommand(Se,Be)}runCoreEditorCommand(fe,Pe){fe.model.pushStackElement(),fe.setCursorStates("keyboard",3,[D.b.selectAll(fe,fe.getPrimaryCursorState())])}},re.SetSelection=Object(A.k)(new class extends c{constructor(){super({id:"setSelection",precondition:void 0})}runCoreEditorCommand(fe,Pe){fe.model.pushStackElement(),fe.setCursorStates(Pe.source,3,[I.d.fromModelSelection(Pe.selection)])}})})(y||(y={}));const O=w.a.and(r.a.textInputFocus,r.a.columnSelection);function k(re,Z){b.a.registerKeybindingRule({id:re,primary:Z,when:O,weight:u+1})}k(y.CursorColumnSelectLeft.id,1024|15),k(y.CursorColumnSelectRight.id,1024|17),k(y.CursorColumnSelectUp.id,1024|16),k(y.CursorColumnSelectPageUp.id,1024|11),k(y.CursorColumnSelectDown.id,1024|18),k(y.CursorColumnSelectPageDown.id,1024|12);function Q(re){return re.register(),re}var q;(function(re){class Z extends A.c{runEditorCommand(ne,le,_e){const Ce=le._getViewModel();if(!Ce)return;this.runCoreEditingCommand(le,Ce,_e||{})}}re.CoreEditingCommand=Z,re.LineBreakInsert=Object(A.k)(new class extends Z{constructor(){super({id:"lineBreakInsert",precondition:r.a.writable,kbOpts:{weight:u,kbExpr:r.a.textInputFocus,primary:0,mac:{primary:256|45}}})}runCoreEditingCommand(ne,le,_e){ne.pushUndoStop(),ne.executeCommands(this.id,L.a.lineBreakInsert(le.cursorConfig,le.model,le.getCursorStates().map(Ce=>Ce.modelState.selection)))}}),re.Outdent=Object(A.k)(new class extends Z{constructor(){super({id:"outdent",precondition:r.a.writable,kbOpts:{weight:u,kbExpr:w.a.and(r.a.editorTextFocus,r.a.tabDoesNotMoveFocus),primary:1024|2}})}runCoreEditingCommand(ne,le,_e){ne.pushUndoStop(),ne.executeCommands(this.id,L.a.outdent(le.cursorConfig,le.model,le.getCursorStates().map(Ce=>Ce.modelState.selection))),ne.pushUndoStop()}}),re.Tab=Object(A.k)(new class extends Z{constructor(){super({id:"tab",precondition:r.a.writable,kbOpts:{weight:u,kbExpr:w.a.and(r.a.editorTextFocus,r.a.tabDoesNotMoveFocus),primary:2}})}runCoreEditingCommand(ne,le,_e){ne.pushUndoStop(),ne.executeCommands(this.id,L.a.tab(le.cursorConfig,le.model,le.getCursorStates().map(Ce=>Ce.modelState.selection))),ne.pushUndoStop()}}),re.DeleteLeft=Object(A.k)(new class extends Z{constructor(){super({id:"deleteLeft",precondition:void 0,kbOpts:{weight:u,kbExpr:r.a.textInputFocus,primary:1,secondary:[1024|1],mac:{primary:1,secondary:[1024|1,256|38,256|1]}}})}runCoreEditingCommand(ne,le,_e){const[Ce,oe]=d.a.deleteLeft(le.getPrevEditOperationType(),le.cursorConfig,le.model,le.getCursorStates().map(ae=>ae.modelState.selection),le.getCursorAutoClosedCharacters());Ce&&ne.pushUndoStop(),ne.executeCommands(this.id,oe),le.setPrevEditOperationType(2)}}),re.DeleteRight=Object(A.k)(new class extends Z{constructor(){super({id:"deleteRight",precondition:void 0,kbOpts:{weight:u,kbExpr:r.a.textInputFocus,primary:20,mac:{primary:20,secondary:[256|34,256|20]}}})}runCoreEditingCommand(ne,le,_e){const[Ce,oe]=d.a.deleteRight(le.getPrevEditOperationType(),le.cursorConfig,le.model,le.getCursorStates().map(ae=>ae.modelState.selection));Ce&&ne.pushUndoStop(),ne.executeCommands(this.id,oe),le.setPrevEditOperationType(3)}}),re.Undo=new class extends E{constructor(){super(A.i)}runDOMCommand(){document.execCommand("undo")}runEditorCommand(ne,le,_e){return!le.hasModel()||le.getOption(80)===!0?void 0:le.getModel().undo()}},re.Redo=new class extends E{constructor(){super(A.g)}runDOMCommand(){document.execCommand("redo")}runEditorCommand(ne,le,_e){return!le.hasModel()||le.getOption(80)===!0?void 0:le.getModel().redo()}}})(q||(q={}));class z extends A.a{constructor(re,Z,ne){super({id:re,precondition:void 0,description:ne});this._handlerId=Z}runCommand(re,Z){const ne=re.get(j.a).getFocusedCodeEditor();if(!ne)return;ne.trigger("keyboard",this._handlerId,Z)}}function J(re,Z){Q(new z("default:"+re,re)),Q(new z(re,re,Z))}J("type",{description:"Type",args:[{name:"args",schema:{type:"object",required:["text"],properties:{text:{type:"string"}}}}]}),J("replacePreviousChar"),J("compositionType"),J("compositionStart"),J("compositionEnd"),J("paste"),J("cut")},"1lwE":function(mt,M,t){"use strict";t.r(M);var g=t("+hIS");Object(g.a)({id:"aes",extensions:[".aes"],aliases:["aes","sophia","Sophia"],loader:function(){return t.e(369).then(t.bind(null,"cOMg"))}})},"23p7":function(mt,M,t){"use strict";t.r(M);var g=t("+hIS");Object(g.a)({id:"apex",extensions:[".cls"],aliases:["Apex","apex"],mimetypes:["text/x-apex-source","text/x-apex"],loader:function(){return t.e(322).then(t.bind(null,"aA7r"))}})},"28lO":function(mt,M,t){"use strict";var g=t("Vhoy"),B=t("3/fG"),x=t("MD5Z"),R=t("t9D7");const A=Object(x.wc)("symbolIcon.arrayForeground",{dark:x.cb,light:x.cb,hc:x.cb},Object(B.a)("symbolIcon.arrayForeground","The foreground color for array symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),j=Object(x.wc)("symbolIcon.booleanForeground",{dark:x.cb,light:x.cb,hc:x.cb},Object(B.a)("symbolIcon.booleanForeground","The foreground color for boolean symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),I=Object(x.wc)("symbolIcon.classForeground",{dark:"#EE9D28",light:"#D67E00",hc:"#EE9D28"},Object(B.a)("symbolIcon.classForeground","The foreground color for class symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),v=Object(x.wc)("symbolIcon.colorForeground",{dark:x.cb,light:x.cb,hc:x.cb},Object(B.a)("symbolIcon.colorForeground","The foreground color for color symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),C=Object(x.wc)("symbolIcon.constantForeground",{dark:x.cb,light:x.cb,hc:x.cb},Object(B.a)("symbolIcon.constantForeground","The foreground color for constant symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),m=Object(x.wc)("symbolIcon.constructorForeground",{dark:"#B180D7",light:"#652D90",hc:"#B180D7"},Object(B.a)("symbolIcon.constructorForeground","The foreground color for constructor symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),d=Object(x.wc)("symbolIcon.enumeratorForeground",{dark:"#EE9D28",light:"#D67E00",hc:"#EE9D28"},Object(B.a)("symbolIcon.enumeratorForeground","The foreground color for enumerator symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),D=Object(x.wc)("symbolIcon.enumeratorMemberForeground",{dark:"#75BEFF",light:"#007ACC",hc:"#75BEFF"},Object(B.a)("symbolIcon.enumeratorMemberForeground","The foreground color for enumerator member symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),L=Object(x.wc)("symbolIcon.eventForeground",{dark:"#EE9D28",light:"#D67E00",hc:"#EE9D28"},Object(B.a)("symbolIcon.eventForeground","The foreground color for event symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),r=Object(x.wc)("symbolIcon.fieldForeground",{dark:"#75BEFF",light:"#007ACC",hc:"#75BEFF"},Object(B.a)("symbolIcon.fieldForeground","The foreground color for field symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),w=Object(x.wc)("symbolIcon.fileForeground",{dark:x.cb,light:x.cb,hc:x.cb},Object(B.a)("symbolIcon.fileForeground","The foreground color for file symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),b=Object(x.wc)("symbolIcon.folderForeground",{dark:x.cb,light:x.cb,hc:x.cb},Object(B.a)("symbolIcon.folderForeground","The foreground color for folder symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),u=Object(x.wc)("symbolIcon.functionForeground",{dark:"#B180D7",light:"#652D90",hc:"#B180D7"},Object(B.a)("symbolIcon.functionForeground","The foreground color for function symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),c=Object(x.wc)("symbolIcon.interfaceForeground",{dark:"#75BEFF",light:"#007ACC",hc:"#75BEFF"},Object(B.a)("symbolIcon.interfaceForeground","The foreground color for interface symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),p=Object(x.wc)("symbolIcon.keyForeground",{dark:x.cb,light:x.cb,hc:x.cb},Object(B.a)("symbolIcon.keyForeground","The foreground color for key symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),S=Object(x.wc)("symbolIcon.keywordForeground",{dark:x.cb,light:x.cb,hc:x.cb},Object(B.a)("symbolIcon.keywordForeground","The foreground color for keyword symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),E=Object(x.wc)("symbolIcon.methodForeground",{dark:"#B180D7",light:"#652D90",hc:"#B180D7"},Object(B.a)("symbolIcon.methodForeground","The foreground color for method symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),y=Object(x.wc)("symbolIcon.moduleForeground",{dark:x.cb,light:x.cb,hc:x.cb},Object(B.a)("symbolIcon.moduleForeground","The foreground color for module symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),O=Object(x.wc)("symbolIcon.namespaceForeground",{dark:x.cb,light:x.cb,hc:x.cb},Object(B.a)("symbolIcon.namespaceForeground","The foreground color for namespace symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),k=Object(x.wc)("symbolIcon.nullForeground",{dark:x.cb,light:x.cb,hc:x.cb},Object(B.a)("symbolIcon.nullForeground","The foreground color for null symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),Q=Object(x.wc)("symbolIcon.numberForeground",{dark:x.cb,light:x.cb,hc:x.cb},Object(B.a)("symbolIcon.numberForeground","The foreground color for number symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),q=Object(x.wc)("symbolIcon.objectForeground",{dark:x.cb,light:x.cb,hc:x.cb},Object(B.a)("symbolIcon.objectForeground","The foreground color for object symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),z=Object(x.wc)("symbolIcon.operatorForeground",{dark:x.cb,light:x.cb,hc:x.cb},Object(B.a)("symbolIcon.operatorForeground","The foreground color for operator symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),J=Object(x.wc)("symbolIcon.packageForeground",{dark:x.cb,light:x.cb,hc:x.cb},Object(B.a)("symbolIcon.packageForeground","The foreground color for package symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),re=Object(x.wc)("symbolIcon.propertyForeground",{dark:x.cb,light:x.cb,hc:x.cb},Object(B.a)("symbolIcon.propertyForeground","The foreground color for property symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),Z=Object(x.wc)("symbolIcon.referenceForeground",{dark:x.cb,light:x.cb,hc:x.cb},Object(B.a)("symbolIcon.referenceForeground","The foreground color for reference symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),ne=Object(x.wc)("symbolIcon.snippetForeground",{dark:x.cb,light:x.cb,hc:x.cb},Object(B.a)("symbolIcon.snippetForeground","The foreground color for snippet symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),le=Object(x.wc)("symbolIcon.stringForeground",{dark:x.cb,light:x.cb,hc:x.cb},Object(B.a)("symbolIcon.stringForeground","The foreground color for string symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),_e=Object(x.wc)("symbolIcon.structForeground",{dark:x.cb,light:x.cb,hc:x.cb},Object(B.a)("symbolIcon.structForeground","The foreground color for struct symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),Ce=Object(x.wc)("symbolIcon.textForeground",{dark:x.cb,light:x.cb,hc:x.cb},Object(B.a)("symbolIcon.textForeground","The foreground color for text symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),oe=Object(x.wc)("symbolIcon.typeParameterForeground",{dark:x.cb,light:x.cb,hc:x.cb},Object(B.a)("symbolIcon.typeParameterForeground","The foreground color for type parameter symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),ae=Object(x.wc)("symbolIcon.unitForeground",{dark:x.cb,light:x.cb,hc:x.cb},Object(B.a)("symbolIcon.unitForeground","The foreground color for unit symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),V=Object(x.wc)("symbolIcon.variableForeground",{dark:"#75BEFF",light:"#007ACC",hc:"#75BEFF"},Object(B.a)("symbolIcon.variableForeground","The foreground color for variable symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));Object(R.f)((G,ee)=>{const pe=G.getColor(A);pe&&ee.addRule(`${g.b.symbolArray.cssSelector} { color: ${pe}; }`);const Te=G.getColor(j);Te&&ee.addRule(`${g.b.symbolBoolean.cssSelector} { color: ${Te}; }`);const Ie=G.getColor(I);Ie&&ee.addRule(`${g.b.symbolClass.cssSelector} { color: ${Ie}; }`);const Me=G.getColor(E);Me&&ee.addRule(`${g.b.symbolMethod.cssSelector} { color: ${Me}; }`);const Oe=G.getColor(v);Oe&&ee.addRule(`${g.b.symbolColor.cssSelector} { color: ${Oe}; }`);const Xe=G.getColor(C);Xe&&ee.addRule(`${g.b.symbolConstant.cssSelector} { color: ${Xe}; }`);const fe=G.getColor(m);fe&&ee.addRule(`${g.b.symbolConstructor.cssSelector} { color: ${fe}; }`);const Pe=G.getColor(d);Pe&&ee.addRule(`
|
|
|
${g.b.symbolValue.cssSelector},${g.b.symbolEnum.cssSelector} { color: ${Pe}; }`);const Be=G.getColor(D);Be&&ee.addRule(`${g.b.symbolEnumMember.cssSelector} { color: ${Be}; }`);const Se=G.getColor(L);Se&&ee.addRule(`${g.b.symbolEvent.cssSelector} { color: ${Se}; }`);const me=G.getColor(r);me&&ee.addRule(`${g.b.symbolField.cssSelector} { color: ${me}; }`);const he=G.getColor(w);he&&ee.addRule(`${g.b.symbolFile.cssSelector} { color: ${he}; }`);const Le=G.getColor(b);Le&&ee.addRule(`${g.b.symbolFolder.cssSelector} { color: ${Le}; }`);const we=G.getColor(u);we&&ee.addRule(`${g.b.symbolFunction.cssSelector} { color: ${we}; }`);const ve=G.getColor(c);ve&&ee.addRule(`${g.b.symbolInterface.cssSelector} { color: ${ve}; }`);const ie=G.getColor(p);ie&&ee.addRule(`${g.b.symbolKey.cssSelector} { color: ${ie}; }`);const W=G.getColor(S);W&&ee.addRule(`${g.b.symbolKeyword.cssSelector} { color: ${W}; }`);const U=G.getColor(y);U&&ee.addRule(`${g.b.symbolModule.cssSelector} { color: ${U}; }`);const se=G.getColor(O);se&&ee.addRule(`${g.b.symbolNamespace.cssSelector} { color: ${se}; }`);const je=G.getColor(k);je&&ee.addRule(`${g.b.symbolNull.cssSelector} { color: ${je}; }`);const Re=G.getColor(Q);Re&&ee.addRule(`${g.b.symbolNumber.cssSelector} { color: ${Re}; }`);const We=G.getColor(q);We&&ee.addRule(`${g.b.symbolObject.cssSelector} { color: ${We}; }`);const dt=G.getColor(z);dt&&ee.addRule(`${g.b.symbolOperator.cssSelector} { color: ${dt}; }`);const Lt=G.getColor(J);Lt&&ee.addRule(`${g.b.symbolPackage.cssSelector} { color: ${Lt}; }`);const Ht=G.getColor(re);Ht&&ee.addRule(`${g.b.symbolProperty.cssSelector} { color: ${Ht}; }`);const $e=G.getColor(Z);$e&&ee.addRule(`${g.b.symbolReference.cssSelector} { color: ${$e}; }`);const ot=G.getColor(ne);ot&&ee.addRule(`${g.b.symbolSnippet.cssSelector} { color: ${ot}; }`);const ce=G.getColor(le);ce&&ee.addRule(`${g.b.symbolString.cssSelector} { color: ${ce}; }`);const Ve=G.getColor(_e);Ve&&ee.addRule(`${g.b.symbolStruct.cssSelector} { color: ${Ve}; }`);const it=G.getColor(Ce);it&&ee.addRule(`${g.b.symbolText.cssSelector} { color: ${it}; }`);const Et=G.getColor(oe);Et&&ee.addRule(`${g.b.symbolTypeParameter.cssSelector} { color: ${Et}; }`);const It=G.getColor(ae);It&&ee.addRule(`${g.b.symbolUnit.cssSelector} { color: ${It}; }`);const Rt=G.getColor(V);Rt&&ee.addRule(`${g.b.symbolVariable.cssSelector} { color: ${Rt}; }`)})},"2ESN":function(mt,M,t){"use strict";t.r(M),t.d(M,"LinkDetector",function(){return oe});var g=t("X+cX"),B=t("JQT/"),x=t("/cxE"),R=t("eLzo"),A=t("pmY6"),j=t("tYmi"),I=t("MNsG"),v=t("gslv"),C=t("bY76"),m=t("YHy6"),d=t("sswD"),D=t("tX9W"),L=t("twdY"),r=t("aBYw"),w=t("6OMU"),b=t("746U"),u=t("aokT"),c=t("G2kB"),p=t("nnTU"),S=function(V,G,ee,pe){function Te(Ie){return Ie instanceof ee?Ie:new ee(function(Me){Me(Ie)})}return new(ee||(ee=Promise))(function(Ie,Me){function Oe(Pe){try{fe(pe.next(Pe))}catch(Be){Me(Be)}}function Xe(Pe){try{fe(pe.throw(Pe))}catch(Be){Me(Be)}}function fe(Pe){Pe.done?Ie(Pe.value):Te(Pe.value).then(Oe,Xe)}fe((pe=pe.apply(V,G||[])).next())})};class E{constructor(V,G){this._link=V,this._provider=G}toJSON(){return{range:this.range,url:this.url,tooltip:this.tooltip}}get range(){return this._link.range}get url(){return this._link.url}get tooltip(){return this._link.tooltip}resolve(V){return S(this,void 0,void 0,function*(){return this._link.url?this._link.url:typeof this._provider.resolveLink=="function"?Promise.resolve(this._provider.resolveLink(this._link,V)).then(G=>(this._link=G||this._link,this._link.url?this.resolve(V):Promise.reject(new Error("missing")))):Promise.reject(new Error("missing"))})}}class y{constructor(V){this._disposables=new A.b;let G=[];for(const[ee,pe]of V){const Te=ee.links.map(Ie=>new E(Ie,pe));G=y._union(G,Te),Object(A.g)(ee)&&this._disposables.add(ee)}this.links=G}dispose(){this._disposables.dispose(),this.links.length=0}static _union(V,G){let ee=[],pe,Te,Ie,Me;for(pe=0,Ie=0,Te=V.length,Me=G.length;pe<Te&&Ie<Me;){const Oe=V[pe],Xe=G[Ie];if(u.a.areIntersectingOrTouching(Oe.range,Xe.range)){pe++;continue}const fe=u.a.compareRangesUsingStarts(Oe.range,Xe.range);fe<0?(ee.push(Oe),pe++):(ee.push(Xe),Ie++)}for(;pe<Te;pe++)ee.push(V[pe]);for(;Ie<Me;Ie++)ee.push(G[Ie]);return ee}}function O(V,G){const ee=[],pe=L.u.ordered(V).reverse().map((Te,Ie)=>Promise.resolve(Te.provideLinks(V,G)).then(Me=>{Me&&(ee[Ie]=[Me,Te])},x.g));return Promise.all(pe).then(()=>{const Te=new y(Object(w.e)(ee));return G.isCancellationRequested?(Te.dispose(),new y([])):Te})}p.a.registerCommand("_executeLinkProvider",(V,...G)=>S(void 0,void 0,void 0,function*(){let[ee,pe]=G;Object(b.c)(ee instanceof C.a),typeof pe!="number"&&(pe=0);const Te=V.get(c.a).getModel(ee);if(!Te)return[];const Ie=yield O(Te,B.a.None);if(!Ie)return[];for(let Oe=0;Oe<Math.min(pe,Ie.links.length);Oe++)yield Ie.links[Oe].resolve(B.a.None);const Me=Ie.links.slice(0);return Ie.dispose(),Me}));var k=t("3/fG"),Q=t("sM1p"),q=t("W9cx"),z=t("MD5Z"),J=t("t9D7"),re=function(V,G,ee,pe){var Te=arguments.length,Ie=Te<3?G:pe===null?pe=Object.getOwnPropertyDescriptor(G,ee):pe,Me;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")Ie=Reflect.decorate(V,G,ee,pe);else for(var Oe=V.length-1;Oe>=0;Oe--)(Me=V[Oe])&&(Ie=(Te<3?Me(Ie):Te>3?Me(G,ee,Ie):Me(G,ee))||Ie);return Te>3&&Ie&&Object.defineProperty(G,ee,Ie),Ie},Z=function(V,G){return function(ee,pe){G(ee,pe,V)}},ne=function(V,G,ee,pe){function Te(Ie){return Ie instanceof ee?Ie:new ee(function(Me){Me(Ie)})}return new(ee||(ee=Promise))(function(Ie,Me){function Oe(Pe){try{fe(pe.next(Pe))}catch(Be){Me(Be)}}function Xe(Pe){try{fe(pe.throw(Pe))}catch(Be){Me(Be)}}function fe(Pe){Pe.done?Ie(Pe.value):Te(Pe.value).then(Oe,Xe)}fe((pe=pe.apply(V,G||[])).next())})};function le(V,G){const ee=V.url&&/^command:/i.test(V.url.toString()),pe=V.tooltip?V.tooltip:ee?k.a("links.navigate.executeCmd","Execute command"):k.a("links.navigate.follow","Follow link"),Te=G?I.f?k.a("links.navigate.kb.meta.mac","cmd + click"):k.a("links.navigate.kb.meta","ctrl + click"):I.f?k.a("links.navigate.kb.alt.mac","option + click"):k.a("links.navigate.kb.alt","alt + click");if(V.url){let Ie="";if(/^command:/i.test(V.url.toString())){const Oe=V.url.toString().match(/^command:([^?#]+)/);if(Oe){const Xe=Oe[1],fe=k.a("tooltip.explanation","Execute command {0}",Xe);Ie=` "${fe}"`}}const Me=new R.a("",!0).appendMarkdown(`[${pe}](${V.url.toString(!0).replace(/ /g,"%20")}${Ie}) (${Te})`);return Me}else return new R.a().appendText(`${pe} (${Te})`)}const _e={general:D.b.register({description:"detected-link",stickiness:1,collapseOnReplaceEdit:!0,inlineClassName:"detected-link"}),active:D.b.register({description:"detected-link-active",stickiness:1,collapseOnReplaceEdit:!0,inlineClassName:"detected-link-active"})};class Ce{constructor(V,G){this.link=V,this.decorationId=G}static decoration(V,G){return{range:V.range,options:Ce._getOptions(V,G,!1)}}static _getOptions(V,G,ee){const pe=Object.assign({},ee?_e.active:_e.general);return pe.hoverMessage=le(V,G),pe}activate(V,G){V.changeDecorationOptions(this.decorationId,Ce._getOptions(this.link,G,!0))}deactivate(V,G){V.changeDecorationOptions(this.decorationId,Ce._getOptions(this.link,G,!1))}}let oe=class V{constructor(G,ee,pe){this.listenersToRemove=new A.b,this.editor=G,this.openerService=ee,this.notificationService=pe;let Te=new r.a(G);this.listenersToRemove.add(Te),this.listenersToRemove.add(Te.onMouseMoveOrRelevantKeyDown(([Ie,Me])=>{this._onEditorMouseMove(Ie,Me)})),this.listenersToRemove.add(Te.onExecute(Ie=>{this.onEditorMouseUp(Ie)})),this.listenersToRemove.add(Te.onCancel(Ie=>{this.cleanUpActiveLinkDecoration()})),this.enabled=G.getOption(62),this.listenersToRemove.add(G.onDidChangeConfiguration(Ie=>{const Me=G.getOption(62);if(this.enabled===Me)return;this.enabled=Me,this.updateDecorations([]),this.stop(),this.beginCompute()})),this.listenersToRemove.add(G.onDidChangeModelContent(Ie=>this.onChange())),this.listenersToRemove.add(G.onDidChangeModel(Ie=>this.onModelChanged())),this.listenersToRemove.add(G.onDidChangeModelLanguage(Ie=>this.onModelModeChanged())),this.listenersToRemove.add(L.u.onDidChange(Ie=>this.onModelModeChanged())),this.timeout=new g.g,this.computePromise=null,this.activeLinksList=null,this.currentOccurrences={},this.activeLinkDecorationId=null,this.beginCompute()}static get(G){return G.getContribution(V.ID)}onModelChanged(){this.currentOccurrences={},this.activeLinkDecorationId=null,this.stop(),this.beginCompute()}onModelModeChanged(){this.stop(),this.beginCompute()}onChange(){this.timeout.setIfNotSet(()=>this.beginCompute(),V.RECOMPUTE_TIME)}beginCompute(){return ne(this,void 0,void 0,function*(){if(!this.editor.hasModel()||!this.enabled)return;const G=this.editor.getModel();if(!L.u.has(G))return;this.activeLinksList&&(this.activeLinksList.dispose(),this.activeLinksList=null),this.computePromise=g.h(ee=>O(G,ee));try{this.activeLinksList=yield this.computePromise,this.updateDecorations(this.activeLinksList.links)}catch(ee){Object(x.f)(ee)}finally{this.computePromise=null}})}updateDecorations(G){const ee=this.editor.getOption(69)==="altKey";let pe=[],Te=Object.keys(this.currentOccurrences);for(let Oe=0,Xe=Te.length;Oe<Xe;Oe++){let fe=Te[Oe],Pe=this.currentOccurrences[fe];pe.push(Pe.decorationId)}let Ie=[];if(G)for(const Oe of G)Ie.push(Ce.decoration(Oe,ee));let Me=this.editor.deltaDecorations(pe,Ie);this.currentOccurrences={},this.activeLinkDecorationId=null;for(let Oe=0,Xe=Me.length;Oe<Xe;Oe++){let fe=new Ce(G[Oe],Me[Oe]);this.currentOccurrences[fe.decorationId]=fe}}_onEditorMouseMove(G,ee){const pe=this.editor.getOption(69)==="altKey";if(this.isEnabled(G,ee)){this.cleanUpActiveLinkDecoration();const Te=this.getLinkOccurrence(G.target.position);Te&&this.editor.changeDecorations(Ie=>{Te.activate(Ie,pe),this.activeLinkDecorationId=Te.decorationId})}else this.cleanUpActiveLinkDecoration()}cleanUpActiveLinkDecoration(){const G=this.editor.getOption(69)==="altKey";if(this.activeLinkDecorationId){const ee=this.currentOccurrences[this.activeLinkDecorationId];ee&&this.editor.changeDecorations(pe=>{ee.deactivate(pe,G)}),this.activeLinkDecorationId=null}}onEditorMouseUp(G){if(!this.isEnabled(G))return;const ee=this.getLinkOccurrence(G.target.position);if(!ee)return;this.openLinkOccurrence(ee,G.hasSideBySideModifier,!0)}openLinkOccurrence(G,ee,pe=!1){if(!this.openerService)return;const{link:Te}=G;Te.resolve(B.a.None).then(Ie=>{if(typeof Ie=="string"&&this.editor.hasModel()){const Me=this.editor.getModel().uri;if(Me.scheme===j.c.file&&Ie.startsWith(`${j.c.file}:`)){const Oe=C.a.parse(Ie);if(Oe.scheme===j.c.file){const Xe=v.i(Oe);let fe=null;Xe.startsWith("/./")?fe=`.${Xe.substr(1)}`:Xe.startsWith("//./")&&(fe=`.${Xe.substr(2)}`),fe&&(Ie=v.g(Me,fe))}}}return this.openerService.open(Ie,{openToSide:ee,fromUserGesture:pe,allowContributedOpeners:!0,allowCommands:!0})},Ie=>{const Me=Ie instanceof Error?Ie.message:Ie;Me==="invalid"?this.notificationService.warn(k.a("invalid.url","Failed to open this link because it is not well-formed: {0}",Te.url.toString())):Me==="missing"?this.notificationService.warn(k.a("missing.url","Failed to open this link because its target is missing.")):Object(x.f)(Ie)})}getLinkOccurrence(G){if(!this.editor.hasModel()||!G)return null;const ee=this.editor.getModel().getDecorationsInRange({startLineNumber:G.lineNumber,startColumn:G.column,endLineNumber:G.lineNumber,endColumn:G.column},0,!0);for(const pe of ee){const Te=this.currentOccurrences[pe.id];if(Te)return Te}return null}isEnabled(G,ee){return Boolean(G.target.type===6&&(G.hasTriggerModifier||ee&&ee.keyCodeIsTriggerKey))}stop(){var G;this.timeout.cancel(),this.activeLinksList&&((G=this.activeLinksList)===null||G===void 0||G.dispose(),this.activeLinksList=null),this.computePromise&&(this.computePromise.cancel(),this.computePromise=null)}dispose(){this.listenersToRemove.dispose(),this.stop(),this.timeout.dispose()}};oe.ID="editor.linkDetector",oe.RECOMPUTE_TIME=1e3,oe=re([Z(1,q.a),Z(2,Q.a)],oe);class ae extends d.b{constructor(){super({id:"editor.action.openLink",label:k.a("label","Open Link"),alias:"Open Link",precondition:void 0})}run(V,G){let ee=oe.get(G);if(!ee)return;if(!G.hasModel())return;let pe=G.getSelections();for(let Te of pe){let Ie=ee.getLinkOccurrence(Te.getEndPosition());Ie&&ee.openLinkOccurrence(Ie,!1)}}}Object(d.l)(oe.ID,oe),Object(d.j)(ae),Object(J.f)((V,G)=>{const ee=V.getColor(z.q);ee&&G.addRule(`.monaco-editor .detected-link-active { color: ${ee} !important; }`)})},"2MPD":function(mt,M,t){},"2Tsy":function(mt,M,t){},"2V9f":function(mt,M,t){},"3Rsk":function(mt,M,t){"use strict";t.d(M,"a",function(){return x});var g=t("MI8n"),B=t("ic2d");const x={JSONContribution:"base.contributions.json"};function R(I){return I.length>0&&I.charAt(I.length-1)==="#"?I.substring(0,I.length-1):I}class A{constructor(){this._onDidChangeSchema=new g.b,this.schemasById={}}registerSchema(I,v){this.schemasById[R(I)]=v,this._onDidChangeSchema.fire(I)}notifySchemaChanged(I){this._onDidChangeSchema.fire(I)}}const j=new A;B.a.add(x.JSONContribution,j)},"3rx1":function(mt,M,t){"use strict";t.d(M,"a",function(){return j}),t.d(M,"b",function(){return I});var g=t("PTeM"),B=t("tYmi"),x=t("MNsG"),R=t("gslv"),A=t("bY76");function j(v){if(!v)return;typeof v=="string"&&(v=A.a.file(v));const C=Object(R.b)(v)||(v.scheme===B.c.file?v.fsPath:v.path);return x.i&&Object(g.c)(C)?I(C):C}function I(v){return Object(g.a)(v)?v.charAt(0).toUpperCase()+v.slice(1):v}},"44XX":function(mt,M,t){"use strict";t.d(M,"a",function(){return c}),t.d(M,"b",function(){return p});var g=t("EffR"),B=t("cMOf"),x=t("GJhM"),R=t("6OMU"),A=t("zrhQ"),j=t("MI8n"),I=t("pmY6"),v=t("Sdnv"),C=t("QuOb"),m=t("746U"),d=t("51B1"),D=t.n(d);const L={separatorBorder:A.a.transparent};class r{constructor(S,E,y,O){this.container=S,this.view=E,this.disposable=O,this._cachedVisibleSize=void 0,typeof y=="number"?(this._size=y,this._cachedVisibleSize=void 0,S.classList.add("visible")):(this._size=0,this._cachedVisibleSize=y.cachedVisibleSize)}set size(S){this._size=S}get size(){return this._size}get visible(){return typeof this._cachedVisibleSize=="undefined"}setVisible(S,E){if(S===this.visible)return;S?(this.size=Object(v.b)(this._cachedVisibleSize,this.viewMinimumSize,this.viewMaximumSize),this._cachedVisibleSize=void 0):(this._cachedVisibleSize=typeof E=="number"?E:this.size,this.size=0),this.container.classList.toggle("visible",S),this.view.setVisible&&this.view.setVisible(S)}get minimumSize(){return this.visible?this.view.minimumSize:0}get viewMinimumSize(){return this.view.minimumSize}get maximumSize(){return this.visible?this.view.maximumSize:0}get viewMaximumSize(){return this.view.maximumSize}get priority(){return this.view.priority}get snap(){return!!this.view.snap}set enabled(S){this.container.style.pointerEvents=S?"":"none"}layout(S,E){this.layoutContainer(S),this.view.layout(this.size,S,E)}dispose(){return this.disposable.dispose(),this.view}}class w extends r{layoutContainer(S){this.container.style.top=`${S}px`,this.container.style.height=`${this.size}px`}}class b extends r{layoutContainer(S){this.container.style.left=`${S}px`,this.container.style.width=`${this.size}px`}}var u;(function(S){S[S.Idle=0]="Idle",S[S.Busy=1]="Busy"})(u||(u={}));var c;(function(S){S.Distribute={type:"distribute"};function E(O){return{type:"split",index:O}}S.Split=E;function y(O){return{type:"invisible",cachedVisibleSize:O}}S.Invisible=y})(c||(c={}));class p extends I.a{constructor(S,E={}){var y,O;super();this.size=0,this.contentSize=0,this.proportions=void 0,this.viewItems=[],this.sashItems=[],this.state=u.Idle,this._onDidSashChange=this._register(new j.b),this.onDidSashChange=this._onDidSashChange.event,this._onDidSashReset=this._register(new j.b),this._startSnappingEnabled=!0,this._endSnappingEnabled=!0,this.orientation=m.m(E.orientation)?0:E.orientation,this.inverseAltBehavior=!!E.inverseAltBehavior,this.proportionalLayout=m.m(E.proportionalLayout)?!0:!!E.proportionalLayout,this.getSashOrthogonalSize=E.getSashOrthogonalSize,this.el=document.createElement("div"),this.el.classList.add("monaco-split-view2"),this.el.classList.add(this.orientation===0?"vertical":"horizontal"),S.appendChild(this.el),this.sashContainer=Object(g.q)(this.el,Object(g.a)(".sash-container")),this.viewContainer=Object(g.a)(".split-view-container"),this.scrollable=new C.a(125,g.V),this.scrollableElement=this._register(new x.c(this.viewContainer,{vertical:this.orientation===0?(y=E.scrollbarVisibility)!==null&&y!==void 0?y:1:2,horizontal:this.orientation===1?(O=E.scrollbarVisibility)!==null&&O!==void 0?O:1:2},this.scrollable)),this.onDidScroll=this.scrollableElement.onScroll,this._register(this.onDidScroll(k=>{this.viewContainer.scrollTop=k.scrollTop,this.viewContainer.scrollLeft=k.scrollLeft})),Object(g.q)(this.el,this.scrollableElement.getDomNode()),this.style(E.styles||L),E.descriptor&&(this.size=E.descriptor.size,E.descriptor.views.forEach((k,Q)=>{const q=m.m(k.visible)||k.visible?k.size:{type:"invisible",cachedVisibleSize:k.size},z=k.view;this.doAddView(z,q,Q,!0)}),this.contentSize=this.viewItems.reduce((k,Q)=>k+Q.size,0),this.saveProportions())}get orthogonalStartSash(){return this._orthogonalStartSash}set orthogonalStartSash(S){for(const E of this.sashItems)E.sash.orthogonalStartSash=S;this._orthogonalStartSash=S}get orthogonalEndSash(){return this._orthogonalEndSash}set orthogonalEndSash(S){for(const E of this.sashItems)E.sash.orthogonalEndSash=S;this._orthogonalEndSash=S}get startSnappingEnabled(){return this._startSnappingEnabled}set startSnappingEnabled(S){if(this._startSnappingEnabled===S)return;this._startSnappingEnabled=S,this.updateSashEnablement()}get endSnappingEnabled(){return this._endSnappingEnabled}set endSnappingEnabled(S){if(this._endSnappingEnabled===S)return;this._endSnappingEnabled=S,this.updateSashEnablement()}style(S){S.separatorBorder.isTransparent()?(this.el.classList.remove("separator-border"),this.el.style.removeProperty("--separator-border")):(this.el.classList.add("separator-border"),this.el.style.setProperty("--separator-border",S.separatorBorder.toString()))}addView(S,E,y=this.viewItems.length,O){this.doAddView(S,E,y,O)}layout(S,E){const y=Math.max(this.size,this.contentSize);if(this.size=S,this.layoutContext=E,this.proportions)for(let O=0;O<this.viewItems.length;O++){const k=this.viewItems[O];k.size=Object(v.b)(Math.round(this.proportions[O]*S),k.minimumSize,k.maximumSize)}else{const O=Object(R.r)(this.viewItems.length),k=O.filter(q=>this.viewItems[q].priority===1),Q=O.filter(q=>this.viewItems[q].priority===2);this.resize(this.viewItems.length-1,S-y,void 0,k,Q)}this.distributeEmptySpace(),this.layoutViews()}saveProportions(){this.proportionalLayout&&this.contentSize>0&&(this.proportions=this.viewItems.map(S=>S.size/this.contentSize))}onSashStart({sash:S,start:E,alt:y}){for(const q of this.viewItems)q.enabled=!1;const O=this.sashItems.findIndex(q=>q.sash===S),k=Object(I.e)(Object(g.i)(document.body,"keydown",q=>Q(this.sashDragState.current,q.altKey)),Object(g.i)(document.body,"keyup",()=>Q(this.sashDragState.current,!1))),Q=(q,z)=>{const J=this.viewItems.map(_e=>_e.size);let re=Number.NEGATIVE_INFINITY,Z=Number.POSITIVE_INFINITY;if(this.inverseAltBehavior&&(z=!z),z){const _e=O===this.sashItems.length-1;if(_e){const Ce=this.viewItems[O];re=(Ce.minimumSize-Ce.size)/2,Z=(Ce.maximumSize-Ce.size)/2}else{const Ce=this.viewItems[O+1];re=(Ce.size-Ce.maximumSize)/2,Z=(Ce.size-Ce.minimumSize)/2}}let ne,le;if(!z){const _e=Object(R.r)(O,-1),Ce=Object(R.r)(O+1,this.viewItems.length),oe=_e.reduce((Me,Oe)=>Me+(this.viewItems[Oe].minimumSize-J[Oe]),0),ae=_e.reduce((Me,Oe)=>Me+(this.viewItems[Oe].viewMaximumSize-J[Oe]),0),V=Ce.length===0?Number.POSITIVE_INFINITY:Ce.reduce((Me,Oe)=>Me+(J[Oe]-this.viewItems[Oe].minimumSize),0),G=Ce.length===0?Number.NEGATIVE_INFINITY:Ce.reduce((Me,Oe)=>Me+(J[Oe]-this.viewItems[Oe].viewMaximumSize),0),ee=Math.max(oe,G),pe=Math.min(V,ae),Te=this.findFirstSnapIndex(_e),Ie=this.findFirstSnapIndex(Ce);if(typeof Te=="number"){const Me=this.viewItems[Te],Oe=Math.floor(Me.viewMinimumSize/2);ne={index:Te,limitDelta:Me.visible?ee-Oe:ee+Oe,size:Me.size}}if(typeof Ie=="number"){const Me=this.viewItems[Ie],Oe=Math.floor(Me.viewMinimumSize/2);le={index:Ie,limitDelta:Me.visible?pe+Oe:pe-Oe,size:Me.size}}}this.sashDragState={start:q,current:q,index:O,sizes:J,minDelta:re,maxDelta:Z,alt:z,snapBefore:ne,snapAfter:le,disposable:k}};Q(E,y)}onSashChange({current:S}){const{index:E,start:y,sizes:O,alt:k,minDelta:Q,maxDelta:q,snapBefore:z,snapAfter:J}=this.sashDragState;this.sashDragState.current=S;const re=S-y,Z=this.resize(E,re,O,void 0,void 0,Q,q,z,J);if(k){const ne=E===this.sashItems.length-1,le=this.viewItems.map(G=>G.size),_e=ne?E:E+1,Ce=this.viewItems[_e],oe=Ce.size-Ce.maximumSize,ae=Ce.size-Ce.minimumSize,V=ne?E-1:E+1;this.resize(V,-Z,le,void 0,void 0,oe,ae)}this.distributeEmptySpace(),this.layoutViews()}onSashEnd(S){this._onDidSashChange.fire(S),this.sashDragState.disposable.dispose(),this.saveProportions();for(const E of this.viewItems)E.enabled=!0}onViewChange(S,E){const y=this.viewItems.indexOf(S);if(y<0||y>=this.viewItems.length)return;E=typeof E=="number"?E:S.size,E=Object(v.b)(E,S.minimumSize,S.maximumSize),this.inverseAltBehavior&&y>0?(this.resize(y-1,Math.floor((S.size-E)/2)),this.distributeEmptySpace(),this.layoutViews()):(S.size=E,this.relayout([y],void 0))}resizeView(S,E){if(this.state!==u.Idle)throw new Error("Cant modify splitview");if(this.state=u.Busy,S<0||S>=this.viewItems.length)return;const y=Object(R.r)(this.viewItems.length).filter(q=>q!==S),O=[...y.filter(q=>this.viewItems[q].priority===1),S],k=y.filter(q=>this.viewItems[q].priority===2),Q=this.viewItems[S];E=Math.round(E),E=Object(v.b)(E,Q.minimumSize,Math.min(Q.maximumSize,this.size)),Q.size=E,this.relayout(O,k),this.state=u.Idle}distributeViewSizes(){const S=[];let E=0;for(const q of this.viewItems)q.maximumSize-q.minimumSize>0&&(S.push(q),E+=q.size);const y=Math.floor(E/S.length);for(const q of S)q.size=Object(v.b)(y,q.minimumSize,q.maximumSize);const O=Object(R.r)(this.viewItems.length),k=O.filter(q=>this.viewItems[q].priority===1),Q=O.filter(q=>this.viewItems[q].priority===2);this.relayout(k,Q)}getViewSize(S){return S<0||S>=this.viewItems.length?-1:this.viewItems[S].size}doAddView(S,E,y=this.viewItems.length,O){if(this.state!==u.Idle)throw new Error("Cant modify splitview");this.state=u.Busy;const k=Object(g.a)(".split-view-view");y===this.viewItems.length?this.viewContainer.appendChild(k):this.viewContainer.insertBefore(k,this.viewContainer.children.item(y));const Q=S.onDidChange(ne=>this.onViewChange(re,ne)),q=Object(I.i)(()=>this.viewContainer.removeChild(k)),z=Object(I.e)(Q,q);let J;typeof E=="number"?J=E:E.type==="split"?J=this.getViewSize(E.index)/2:E.type==="invisible"?J={cachedVisibleSize:E.cachedVisibleSize}:J=S.minimumSize;const re=this.orientation===0?new w(k,S,J,z):new b(k,S,J,z);if(this.viewItems.splice(y,0,re),this.viewItems.length>1){let ne={orthogonalStartSash:this.orthogonalStartSash,orthogonalEndSash:this.orthogonalEndSash};const le=this.orientation===0?new B.b(this.sashContainer,{getHorizontalSashTop:Me=>this.getSashPosition(Me),getHorizontalSashWidth:this.getSashOrthogonalSize},Object.assign(Object.assign({},ne),{orientation:1})):new B.b(this.sashContainer,{getVerticalSashLeft:Me=>this.getSashPosition(Me),getVerticalSashHeight:this.getSashOrthogonalSize},Object.assign(Object.assign({},ne),{orientation:0})),_e=this.orientation===0?Me=>({sash:le,start:Me.startY,current:Me.currentY,alt:Me.altKey}):Me=>({sash:le,start:Me.startX,current:Me.currentX,alt:Me.altKey}),Ce=j.c.map(le.onDidStart,_e),oe=Ce(this.onSashStart,this),ae=j.c.map(le.onDidChange,_e),V=ae(this.onSashChange,this),G=j.c.map(le.onDidEnd,()=>this.sashItems.findIndex(Me=>Me.sash===le)),ee=G(this.onSashEnd,this),pe=le.onDidReset(()=>{const Me=this.sashItems.findIndex(Be=>Be.sash===le),Oe=Object(R.r)(Me,-1),Xe=Object(R.r)(Me+1,this.viewItems.length),fe=this.findFirstSnapIndex(Oe),Pe=this.findFirstSnapIndex(Xe);if(typeof fe=="number"&&!this.viewItems[fe].visible)return;if(typeof Pe=="number"&&!this.viewItems[Pe].visible)return;this._onDidSashReset.fire(Me)}),Te=Object(I.e)(oe,V,ee,pe,le),Ie={sash:le,disposable:Te};this.sashItems.splice(y-1,0,Ie)}k.appendChild(S.element);let Z;typeof E!="number"&&E.type==="split"&&(Z=[E.index]),O||this.relayout([y],Z),this.state=u.Idle,!O&&typeof E!="number"&&E.type==="distribute"&&this.distributeViewSizes()}relayout(S,E){const y=this.viewItems.reduce((O,k)=>O+k.size,0);this.resize(this.viewItems.length-1,this.size-y,void 0,S,E),this.distributeEmptySpace(),this.layoutViews(),this.saveProportions()}resize(S,E,y=this.viewItems.map(re=>re.size),O,k,Q=Number.NEGATIVE_INFINITY,q=Number.POSITIVE_INFINITY,z,J){if(S<0||S>=this.viewItems.length)return 0;const re=Object(R.r)(S,-1),Z=Object(R.r)(S+1,this.viewItems.length);if(k)for(const Ie of k)Object(R.p)(re,Ie),Object(R.p)(Z,Ie);if(O)for(const Ie of O)Object(R.o)(re,Ie),Object(R.o)(Z,Ie);const ne=re.map(Ie=>this.viewItems[Ie]),le=re.map(Ie=>y[Ie]),_e=Z.map(Ie=>this.viewItems[Ie]),Ce=Z.map(Ie=>y[Ie]),oe=re.reduce((Ie,Me)=>Ie+(this.viewItems[Me].minimumSize-y[Me]),0),ae=re.reduce((Ie,Me)=>Ie+(this.viewItems[Me].maximumSize-y[Me]),0),V=Z.length===0?Number.POSITIVE_INFINITY:Z.reduce((Ie,Me)=>Ie+(y[Me]-this.viewItems[Me].minimumSize),0),G=Z.length===0?Number.NEGATIVE_INFINITY:Z.reduce((Ie,Me)=>Ie+(y[Me]-this.viewItems[Me].maximumSize),0),ee=Math.max(oe,G,Q),pe=Math.min(V,ae,q);let Te=!1;if(z){const Ie=this.viewItems[z.index],Me=E>=z.limitDelta;Te=Me!==Ie.visible,Ie.setVisible(Me,z.size)}if(!Te&&J){const Ie=this.viewItems[J.index],Me=E<J.limitDelta;Te=Me!==Ie.visible,Ie.setVisible(Me,J.size)}if(Te)return this.resize(S,E,y,O,k,Q,q);E=Object(v.b)(E,ee,pe);for(let Ie=0,Me=E;Ie<ne.length;Ie++){const Oe=ne[Ie],Xe=Object(v.b)(le[Ie]+Me,Oe.minimumSize,Oe.maximumSize),fe=Xe-le[Ie];Me-=fe,Oe.size=Xe}for(let Ie=0,Me=E;Ie<_e.length;Ie++){const Oe=_e[Ie],Xe=Object(v.b)(Ce[Ie]-Me,Oe.minimumSize,Oe.maximumSize),fe=Xe-Ce[Ie];Me+=fe,Oe.size=Xe}return E}distributeEmptySpace(S){const E=this.viewItems.reduce((q,z)=>q+z.size,0);let y=this.size-E;const O=Object(R.r)(this.viewItems.length-1,-1),k=O.filter(q=>this.viewItems[q].priority===1),Q=O.filter(q=>this.viewItems[q].priority===2);for(const q of Q)Object(R.p)(O,q);for(const q of k)Object(R.o)(O,q);typeof S=="number"&&Object(R.o)(O,S);for(let q=0;y!==0&&q<O.length;q++){const z=this.viewItems[O[q]],J=Object(v.b)(z.size+y,z.minimumSize,z.maximumSize),re=J-z.size;y-=re,z.size=J}}layoutViews(){this.contentSize=this.viewItems.reduce((E,y)=>E+y.size,0);let S=0;for(const E of this.viewItems)E.layout(S,this.layoutContext),S+=E.size;this.sashItems.forEach(E=>E.sash.layout()),this.updateSashEnablement(),this.updateScrollableElement()}updateScrollableElement(){this.orientation===0?this.scrollableElement.setScrollDimensions({height:this.size,scrollHeight:this.contentSize}):this.scrollableElement.setScrollDimensions({width:this.size,scrollWidth:this.contentSize})}updateSashEnablement(){let S=!1;const E=this.viewItems.map(z=>S=z.size-z.minimumSize>0||S);S=!1;const y=this.viewItems.map(z=>S=z.maximumSize-z.size>0||S),O=[...this.viewItems].reverse();S=!1;const k=O.map(z=>S=z.size-z.minimumSize>0||S).reverse();S=!1;const Q=O.map(z=>S=z.maximumSize-z.size>0||S).reverse();let q=0;for(let z=0;z<this.sashItems.length;z++){const{sash:J}=this.sashItems[z],re=this.viewItems[z];q+=re.size;const Z=!(E[z]&&Q[z+1]),ne=!(y[z]&&k[z+1]);if(Z&&ne){const le=Object(R.r)(z,-1),_e=Object(R.r)(z+1,this.viewItems.length),Ce=this.findFirstSnapIndex(le),oe=this.findFirstSnapIndex(_e),ae=typeof Ce=="number"&&!this.viewItems[Ce].visible,V=typeof oe=="number"&&!this.viewItems[oe].visible;ae&&k[z]&&(q>0||this.startSnappingEnabled)?J.state=1:V&&E[z]&&(q<this.contentSize||this.endSnappingEnabled)?J.state=2:J.state=0}else Z&&!ne?J.state=1:!Z&&ne?J.state=2:J.state=3}}getSashPosition(S){let E=0;for(let y=0;y<this.sashItems.length;y++)if(E+=this.viewItems[y].size,this.sashItems[y].sash===S)return E;return 0}findFirstSnapIndex(S){for(const E of S){const y=this.viewItems[E];if(!y.visible)continue;if(y.snap)return E}for(const E of S){const y=this.viewItems[E];if(y.visible&&y.maximumSize-y.minimumSize>0)return;if(!y.visible&&y.snap)return E}return}dispose(){super.dispose(),this.viewItems.forEach(S=>S.dispose()),this.viewItems=[],this.sashItems.forEach(S=>S.disposable.dispose()),this.sashItems=[]}}},"4bUh":function(mt,M,t){"use strict";t.d(M,"a",function(){return B});var g=t("twdY");class B{constructor(R,A,j){this._lineTokensBrand=void 0,this._tokens=R,this._tokensCount=this._tokens.length>>>1,this._text=A,this._languageIdCodec=j}static createEmpty(R,A){const j=B.defaultTokenMetadata,I=new Uint32Array(2);return I[0]=R.length,I[1]=j,new B(I,R,A)}equals(R){return R instanceof B?this.slicedEquals(R,0,this._tokensCount):!1}slicedEquals(R,A,j){if(this._text!==R._text)return!1;if(this._tokensCount!==R._tokensCount)return!1;const I=A<<1,v=I+(j<<1);for(let C=I;C<v;C++)if(this._tokens[C]!==R._tokens[C])return!1;return!0}getLineContent(){return this._text}getCount(){return this._tokensCount}getStartOffset(R){return R>0?this._tokens[R-1<<1]:0}getMetadata(R){const A=this._tokens[(R<<1)+1];return A}getLanguageId(R){const A=this._tokens[(R<<1)+1],j=g.D.getLanguageId(A);return this._languageIdCodec.decodeLanguageId(j)}getStandardTokenType(R){const A=this._tokens[(R<<1)+1];return g.D.getTokenType(A)}getForeground(R){const A=this._tokens[(R<<1)+1];return g.D.getForeground(A)}getClassName(R){const A=this._tokens[(R<<1)+1];return g.D.getClassNameFromMetadata(A)}getInlineStyle(R,A){const j=this._tokens[(R<<1)+1];return g.D.getInlineStyleFromMetadata(j,A)}getEndOffset(R){return this._tokens[R<<1]}findTokenIndexAtOffset(R){return B.findIndexInTokensArray(this._tokens,R)}inflate(){return this}sliceAndInflate(R,A,j){return new x(this,R,A,j)}static convertToEndOffset(R,A){const j=R.length>>>1,I=j-1;for(let v=0;v<I;v++)R[v<<1]=R[v+1<<1];R[I<<1]=A}static findIndexInTokensArray(R,A){if(R.length<=2)return 0;let j=0,I=(R.length>>>1)-1;for(;j<I;){const v=j+Math.floor((I-j)/2),C=R[v<<1];if(C===A)return v+1;C<A?j=v+1:C>A&&(I=v)}return j}withInserted(R){if(R.length===0)return this;let A=0,j=0,I="";const v=new Array;let C=0;for(;;){let m=A<this._tokensCount?this._tokens[A<<1]:-1,d=j<R.length?R[j]:null;if(m!==-1&&(d===null||m<=d.offset)){I+=this._text.substring(C,m);const D=this._tokens[(A<<1)+1];v.push(I.length,D),A++,C=m}else if(d){if(d.offset>C){I+=this._text.substring(C,d.offset);const D=this._tokens[(A<<1)+1];v.push(I.length,D),C=d.offset}I+=d.text,v.push(I.length,d.tokenMetadata),j++}else break}return new B(new Uint32Array(v),I,this._languageIdCodec)}}B.defaultTokenMetadata=(0<<11|1<<14|2<<23)>>>0;class x{constructor(R,A,j,I){this._source=R,this._startOffset=A,this._endOffset=j,this._deltaOffset=I,this._firstTokenIndex=R.findTokenIndexAtOffset(A),this._tokensCount=0;for(let v=this._firstTokenIndex,C=R.getCount();v<C;v++){const m=R.getStartOffset(v);if(m>=j)break;this._tokensCount++}}equals(R){return R instanceof x?this._startOffset===R._startOffset&&this._endOffset===R._endOffset&&this._deltaOffset===R._deltaOffset&&this._source.slicedEquals(R._source,this._firstTokenIndex,this._tokensCount):!1}getCount(){return this._tokensCount}getForeground(R){return this._source.getForeground(this._firstTokenIndex+R)}getEndOffset(R){const A=this._source.getEndOffset(this._firstTokenIndex+R);return Math.min(this._endOffset,A)-this._startOffset+this._deltaOffset}getClassName(R){return this._source.getClassName(this._firstTokenIndex+R)}getInlineStyle(R,A){return this._source.getInlineStyle(this._firstTokenIndex+R,A)}findTokenIndexAtOffset(R){return this._source.findTokenIndexAtOffset(R+this._startOffset-this._deltaOffset)-this._firstTokenIndex}}},"4rho":function(mt,M,t){},"4sI4":function(mt,M,t){"use strict";t.r(M),t.d(M,"StandaloneReferencesController",function(){return d});var g=t("sswD"),B=t("Vxe3"),x=t("QY8A"),R=t("+7oY"),A=t("T8No"),j=t("Cg/j"),I=t("sM1p"),v=t("A+jI"),C=function(D,L,r,w){var b=arguments.length,u=b<3?L:w===null?w=Object.getOwnPropertyDescriptor(L,r):w,c;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")u=Reflect.decorate(D,L,r,w);else for(var p=D.length-1;p>=0;p--)(c=D[p])&&(u=(b<3?c(u):b>3?c(L,r,u):c(L,r))||u);return b>3&&u&&Object.defineProperty(L,r,u),u},m=function(D,L){return function(r,w){L(r,w,D)}};let d=class extends x.a{constructor(L,r,w,b,u,c,p){super(!0,L,r,w,b,u,c,p)}};d=C([m(1,A.b),m(2,B.a),m(3,I.a),m(4,j.a),m(5,v.a),m(6,R.a)],d),Object(g.l)(x.a.ID,d)},"4y0V":function(mt,M,t){"use strict";t.d(M,"a",function(){return B}),t.d(M,"b",function(){return x});var g=t("MI8n");class B{constructor(R,A,j){const I=v=>this.emitter.fire(v);this.emitter=new g.b({onFirstListenerAdd:()=>R.addEventListener(A,I,j),onLastListenerRemove:()=>R.removeEventListener(A,I,j)})}get event(){return this.emitter.event}dispose(){this.emitter.dispose()}}function x(R){return R.preventDefault(),R.stopPropagation(),R}},"51B1":function(mt,M,t){},"51f4":function(mt,M,t){"use strict";t.d(M,"a",function(){return R});let g=!1,B=null;function x(A){if(!A.parent||A.parent===A)return null;try{let j=A.location,I=A.parent.location;if(j.origin!=="null"&&I.origin!=="null"&&j.origin!==I.origin)return g=!0,null}catch(j){return g=!0,null}return A.parent}class R{static getSameOriginWindowChain(){if(!B){B=[];let A=window,j;do j=x(A),j?B.push({window:A,iframeElement:A.frameElement||null}):B.push({window:A,iframeElement:null}),A=j;while(A)}return B.slice(0)}static hasDifferentOriginAncestor(){return B||this.getSameOriginWindowChain(),g}static getPositionOfChildWindowRelativeToAncestorWindow(A,j){if(!j||A===j)return{top:0,left:0};let I=0,v=0,C=this.getSameOriginWindowChain();for(const m of C){if(I+=m.window.scrollY,v+=m.window.scrollX,m.window===j)break;if(!m.iframeElement)break;let d=m.iframeElement.getBoundingClientRect();I+=d.top,v+=d.left}return{top:I,left:v}}}},"51su":function(mt,M,t){"use strict";t.d(M,"a",function(){return x});var g=t("8LL/"),B=t.n(g);const x="monaco-mouse-cursor-text"},"5RaG":function(mt,M,t){"use strict";t.r(M),t.d(M,"CursorUndoRedoController",function(){return I}),t.d(M,"CursorUndo",function(){return v}),t.d(M,"CursorRedo",function(){return C});var g=t("pmY6"),B=t("sswD"),x=t("wQH0"),R=t("3/fG");class A{constructor(m){this.selections=m}equals(m){const d=this.selections.length,D=m.selections.length;if(d!==D)return!1;for(let L=0;L<d;L++)if(!this.selections[L].equalsSelection(m.selections[L]))return!1;return!0}}class j{constructor(m,d,D){this.cursorState=m,this.scrollTop=d,this.scrollLeft=D}}class I extends g.a{constructor(m){super();this._editor=m,this._isCursorUndoRedo=!1,this._undoStack=[],this._redoStack=[],this._register(m.onDidChangeModel(d=>{this._undoStack=[],this._redoStack=[]})),this._register(m.onDidChangeModelContent(d=>{this._undoStack=[],this._redoStack=[]})),this._register(m.onDidChangeCursorSelection(d=>{if(this._isCursorUndoRedo)return;if(!d.oldSelections)return;if(d.oldModelVersionId!==d.modelVersionId)return;const D=new A(d.oldSelections),L=this._undoStack.length>0&&this._undoStack[this._undoStack.length-1].cursorState.equals(D);L||(this._undoStack.push(new j(D,m.getScrollTop(),m.getScrollLeft())),this._redoStack=[],this._undoStack.length>50&&this._undoStack.shift())}))}static get(m){return m.getContribution(I.ID)}cursorUndo(){if(!this._editor.hasModel()||this._undoStack.length===0)return;this._redoStack.push(new j(new A(this._editor.getSelections()),this._editor.getScrollTop(),this._editor.getScrollLeft())),this._applyState(this._undoStack.pop())}cursorRedo(){if(!this._editor.hasModel()||this._redoStack.length===0)return;this._undoStack.push(new j(new A(this._editor.getSelections()),this._editor.getScrollTop(),this._editor.getScrollLeft())),this._applyState(this._redoStack.pop())}_applyState(m){this._isCursorUndoRedo=!0,this._editor.setSelections(m.cursorState.selections),this._editor.setScrollPosition({scrollTop:m.scrollTop,scrollLeft:m.scrollLeft}),this._isCursorUndoRedo=!1}}I.ID="editor.contrib.cursorUndoRedoController";class v extends B.b{constructor(){super({id:"cursorUndo",label:R.a("cursor.undo","Cursor Undo"),alias:"Cursor Undo",precondition:void 0,kbOpts:{kbExpr:x.a.textInputFocus,primary:2048|51,weight:100}})}run(m,d,D){I.get(d).cursorUndo()}}class C extends B.b{constructor(){super({id:"cursorRedo",label:R.a("cursor.redo","Cursor Redo"),alias:"Cursor Redo",precondition:void 0})}run(m,d,D){I.get(d).cursorRedo()}}Object(B.l)(I.ID,I),Object(B.j)(v),Object(B.j)(C)},"5TxY":function(mt,M,t){"use strict";t.d(M,"d",function(){return D}),t.d(M,"a",function(){return L}),t.d(M,"b",function(){return r}),t.d(M,"c",function(){return w});var g=t("D3Dy"),B=t("EffR"),x=t("X+cX"),R=t("MI8n"),A=t("pmY6"),j=t("ubTv"),I=t("MNsG"),v=t("N0LK"),C=t("Comh"),m=t("cGHE"),d=t("gCVg"),D;(function(c){c.Tap="-monaco-textarea-synthetic-tap"})(D||(D={}));const L={forceCopyWithSyntaxHighlighting:!1};class r{constructor(){this._lastState=null}set(c,p){this._lastState={lastCopiedValue:c,data:p}}get(c){return this._lastState&&this._lastState.lastCopiedValue===c?this._lastState.data:(this._lastState=null,null)}}r.INSTANCE=new r;class w extends A.a{constructor(c,p){super();this.textArea=p,this._onFocus=this._register(new R.b),this.onFocus=this._onFocus.event,this._onBlur=this._register(new R.b),this.onBlur=this._onBlur.event,this._onKeyDown=this._register(new R.b),this.onKeyDown=this._onKeyDown.event,this._onKeyUp=this._register(new R.b),this.onKeyUp=this._onKeyUp.event,this._onCut=this._register(new R.b),this.onCut=this._onCut.event,this._onPaste=this._register(new R.b),this.onPaste=this._onPaste.event,this._onType=this._register(new R.b),this.onType=this._onType.event,this._onCompositionStart=this._register(new R.b),this.onCompositionStart=this._onCompositionStart.event,this._onCompositionUpdate=this._register(new R.b),this.onCompositionUpdate=this._onCompositionUpdate.event,this._onCompositionEnd=this._register(new R.b),this.onCompositionEnd=this._onCompositionEnd.event,this._onSelectionChangeRequest=this._register(new R.b),this.onSelectionChangeRequest=this._onSelectionChangeRequest.event,this._host=c,this._textArea=this._register(new u(p)),this._asyncTriggerCut=this._register(new x.e(()=>this._onCut.fire(),0)),this._asyncFocusGainWriteScreenReaderContent=this._register(new x.e(()=>this.writeScreenReaderContent("asyncFocusGain"),0)),this._textAreaState=C.b.EMPTY,this._selectionChangeListener=null,this.writeScreenReaderContent("ctor"),this._hasFocus=!1,this._isDoingComposition=!1,this._nextCommand=0;let S=null;this._register(B.o(p.domNode,"keydown",k=>{(k.keyCode===109||this._isDoingComposition&&k.keyCode===1)&&k.stopPropagation(),k.equals(9)&&k.preventDefault(),S=k,this._onKeyDown.fire(k)})),this._register(B.o(p.domNode,"keyup",k=>{this._onKeyUp.fire(k)})),this._register(B.i(p.domNode,"compositionstart",k=>{if(C.c&&console.log("[compositionstart]",k),this._isDoingComposition)return;if(this._isDoingComposition=!0,I.f&&this._textAreaState.selectionStart===this._textAreaState.selectionEnd&&this._textAreaState.selectionStart>0&&this._textAreaState.value.substr(this._textAreaState.selectionStart-1,1)===k.data){const Q=S&&S.equals(109)&&(S.code==="ArrowRight"||S.code==="ArrowLeft");if(Q||g.g){C.c&&console.log("[compositionstart] Handling long press case on macOS + arrow key or Firefox",k),this._textAreaState=new C.b(this._textAreaState.value,this._textAreaState.selectionStart-1,this._textAreaState.selectionEnd,this._textAreaState.selectionStartPosition?new m.a(this._textAreaState.selectionStartPosition.lineNumber,this._textAreaState.selectionStartPosition.column-1):null,this._textAreaState.selectionEndPosition),this._onCompositionStart.fire({revealDeltaColumns:-1});return}}if(g.e){this._onCompositionStart.fire({revealDeltaColumns:-this._textAreaState.selectionStart});return}this._setAndWriteTextAreaState("compositionstart",C.b.EMPTY),this._onCompositionStart.fire({revealDeltaColumns:0})}));const E=k=>{const Q=this._textAreaState,q=C.b.readFromTextArea(this._textArea);return[q,C.b.deduceInput(Q,q,k)]},y=()=>{const k=this._textAreaState,Q=C.b.readFromTextArea(this._textArea);return[Q,C.b.deduceAndroidCompositionInput(k,Q)]},O=k=>{const Q=this._textAreaState,q=C.b.selectedText(k),z={text:q.value,replacePrevCharCnt:Q.selectionEnd-Q.selectionStart,replaceNextCharCnt:0,positionDelta:0};return[q,z]};this._register(B.i(p.domNode,"compositionupdate",k=>{if(C.c&&console.log("[compositionupdate]",k),g.e){const[z,J]=y();this._textAreaState=z,this._onType.fire(J),this._onCompositionUpdate.fire(k);return}const[Q,q]=O(k.data||"");this._textAreaState=Q,this._onType.fire(q),this._onCompositionUpdate.fire(k)})),this._register(B.i(p.domNode,"compositionend",k=>{if(C.c&&console.log("[compositionend]",k),!this._isDoingComposition)return;if(this._isDoingComposition=!1,g.e){const[z,J]=y();this._textAreaState=z,this._onType.fire(J),this._onCompositionEnd.fire();return}const[Q,q]=O(k.data||"");this._textAreaState=Q,this._onType.fire(q),(g.f||g.g)&&(this._textAreaState=C.b.readFromTextArea(this._textArea)),this._onCompositionEnd.fire()})),this._register(B.i(p.domNode,"input",()=>{if(this._textArea.setIgnoreSelectionChangeTime("received input event"),this._isDoingComposition)return;const[k,Q]=E(I.f);if(Q.replacePrevCharCnt===0&&Q.text.length===1&&v.E(Q.text.charCodeAt(0)))return;this._textAreaState=k,this._nextCommand===0?(Q.text!==""||Q.replacePrevCharCnt!==0)&&this._onType.fire(Q):((Q.text!==""||Q.replacePrevCharCnt!==0)&&this._firePaste(Q.text,null),this._nextCommand=0)})),this._register(B.i(p.domNode,"cut",k=>{this._textArea.setIgnoreSelectionChangeTime("received cut event"),this._ensureClipboardGetsEditorSelection(k),this._asyncTriggerCut.schedule()})),this._register(B.i(p.domNode,"copy",k=>{this._ensureClipboardGetsEditorSelection(k)})),this._register(B.i(p.domNode,"paste",k=>{if(this._textArea.setIgnoreSelectionChangeTime("received paste event"),b.canUseTextData(k)){const[Q,q]=b.getTextData(k);Q!==""&&this._firePaste(Q,q)}else this._textArea.getSelectionStart()!==this._textArea.getSelectionEnd()&&this._setAndWriteTextAreaState("paste",C.b.EMPTY),this._nextCommand=1})),this._register(B.i(p.domNode,"focus",()=>{const k=this._hasFocus;this._setHasFocus(!0),g.h&&!k&&this._hasFocus&&this._asyncFocusGainWriteScreenReaderContent.schedule()})),this._register(B.i(p.domNode,"blur",()=>{this._isDoingComposition&&(this._isDoingComposition=!1,this.writeScreenReaderContent("blurWithoutCompositionEnd"),this._onCompositionEnd.fire()),this._setHasFocus(!1)})),this._register(B.i(p.domNode,D.Tap,()=>{g.e&&this._isDoingComposition&&(this._isDoingComposition=!1,this.writeScreenReaderContent("tapWithoutCompositionEnd"),this._onCompositionEnd.fire())}))}_installSelectionChangeListener(){let c=0;return B.i(document,"selectionchange",p=>{if(!this._hasFocus)return;if(this._isDoingComposition)return;if(!g.f)return;const S=Date.now(),E=S-c;if(c=S,E<5)return;const y=S-this._textArea.getIgnoreSelectionChangeTime();if(this._textArea.resetSelectionChangeTime(),y<100)return;if(!this._textAreaState.selectionStartPosition||!this._textAreaState.selectionEndPosition)return;const O=this._textArea.getValue();if(this._textAreaState.value!==O)return;const k=this._textArea.getSelectionStart(),Q=this._textArea.getSelectionEnd();if(this._textAreaState.selectionStart===k&&this._textAreaState.selectionEnd===Q)return;const q=this._textAreaState.deduceEditorPosition(k),z=this._host.deduceModelPosition(q[0],q[1],q[2]),J=this._textAreaState.deduceEditorPosition(Q),re=this._host.deduceModelPosition(J[0],J[1],J[2]),Z=new d.a(z.lineNumber,z.column,re.lineNumber,re.column);this._onSelectionChangeRequest.fire(Z)})}dispose(){super.dispose(),this._selectionChangeListener&&(this._selectionChangeListener.dispose(),this._selectionChangeListener=null)}focusTextArea(){this._setHasFocus(!0),this.refreshFocusState()}isFocused(){return this._hasFocus}refreshFocusState(){const c=B.F(this.textArea.domNode);c?this._setHasFocus(c.activeElement===this.textArea.domNode):B.N(this.textArea.domNode)?this._setHasFocus(document.activeElement===this.textArea.domNode):this._setHasFocus(!1)}_setHasFocus(c){if(this._hasFocus===c)return;this._hasFocus=c,this._selectionChangeListener&&(this._selectionChangeListener.dispose(),this._selectionChangeListener=null),this._hasFocus&&(this._selectionChangeListener=this._installSelectionChangeListener()),this._hasFocus&&this.writeScreenReaderContent("focusgain"),this._hasFocus?this._onFocus.fire():this._onBlur.fire()}_setAndWriteTextAreaState(c,p){this._hasFocus||(p=p.collapseSelection()),p.writeToTextArea(c,this._textArea,this._hasFocus),this._textAreaState=p}writeScreenReaderContent(c){if(this._isDoingComposition)return;this._setAndWriteTextAreaState(c,this._host.getScreenReaderContent(this._textAreaState))}_ensureClipboardGetsEditorSelection(c){const p=this._host.getDataToCopy(b.canUseTextData(c)),S={version:1,isFromEmptySelection:p.isFromEmptySelection,multicursorText:p.multicursorText,mode:p.mode};if(r.INSTANCE.set(g.g?p.text.replace(/\r\n/g,`
|
|
|
`):p.text,S),!b.canUseTextData(c)){this._setAndWriteTextAreaState("copy or cut",C.b.selectedText(p.text));return}b.setTextData(c,p.text,p.html,S)}_firePaste(c,p){p||(p=r.INSTANCE.get(c)),this._onPaste.fire({text:c,metadata:p})}}class b{static canUseTextData(c){return!!c.clipboardData}static getTextData(c){if(c.clipboardData){c.preventDefault();const p=c.clipboardData.getData(j.a.text);let S=null;const E=c.clipboardData.getData("vscode-editor-data");if(typeof E=="string")try{S=JSON.parse(E),S.version!==1&&(S=null)}catch(y){}return[p,S]}throw new Error("ClipboardEventUtils.getTextData: Cannot use text data!")}static setTextData(c,p,S,E){if(c.clipboardData){c.clipboardData.setData(j.a.text,p),typeof S=="string"&&c.clipboardData.setData("text/html",S),c.clipboardData.setData("vscode-editor-data",JSON.stringify(E)),c.preventDefault();return}throw new Error("ClipboardEventUtils.setTextData: Cannot use text data!")}}class u extends A.a{constructor(c){super();this._actual=c,this._ignoreSelectionChangeTime=0}setIgnoreSelectionChangeTime(c){this._ignoreSelectionChangeTime=Date.now()}getIgnoreSelectionChangeTime(){return this._ignoreSelectionChangeTime}resetSelectionChangeTime(){this._ignoreSelectionChangeTime=0}getValue(){return this._actual.domNode.value}setValue(c,p){const S=this._actual.domNode;if(S.value===p)return;this.setIgnoreSelectionChangeTime("setValue"),S.value=p}getSelectionStart(){return this._actual.domNode.selectionDirection==="backward"?this._actual.domNode.selectionEnd:this._actual.domNode.selectionStart}getSelectionEnd(){return this._actual.domNode.selectionDirection==="backward"?this._actual.domNode.selectionStart:this._actual.domNode.selectionEnd}setSelectionRange(c,p,S){const E=this._actual.domNode;let y=null;const O=B.F(E);O?y=O.activeElement:y=document.activeElement;const k=y===E,Q=E.selectionStart,q=E.selectionEnd;if(k&&Q===p&&q===S){g.g&&window.parent!==window&&E.focus();return}if(k){this.setIgnoreSelectionChangeTime("setSelectionRange"),E.setSelectionRange(p,S),g.g&&window.parent!==window&&E.focus();return}try{const z=B.U(E);this.setIgnoreSelectionChangeTime("setSelectionRange"),E.focus(),E.setSelectionRange(p,S),B.S(E,z)}catch(z){}}}},"5nk5":function(mt,M,t){"use strict";t.d(M,"a",function(){return R}),t.d(M,"b",function(){return A});var g=t("HpOR"),B=t("erNZ");function x(I){return I.replace(/\n/g,"\\n").replace(/\r/g,"\\r")}class R{constructor(I,v,C,m){this.oldPosition=I,this.oldText=v,this.newPosition=C,this.newText=m}get oldLength(){return this.oldText.length}get oldEnd(){return this.oldPosition+this.oldText.length}get newLength(){return this.newText.length}get newEnd(){return this.newPosition+this.newText.length}toString(){return this.oldText.length===0?`(insert@${this.oldPosition} "${x(this.newText)}")`:this.newText.length===0?`(delete@${this.oldPosition} "${x(this.oldText)}")`:`(replace@${this.oldPosition} "${x(this.oldText)}" with "${x(this.newText)}")`}static _writeStringSize(I){return 4+2*I.length}static _writeString(I,v,C){const m=v.length;g.f(I,m,C),C+=4;for(let d=0;d<m;d++)g.e(I,v.charCodeAt(d),C),C+=2;return C}static _readString(I,v){const C=g.c(I,v);return v+=4,Object(B.b)(I,v,C)}writeSize(){return 4+4+R._writeStringSize(this.oldText)+R._writeStringSize(this.newText)}write(I,v){return g.f(I,this.oldPosition,v),v+=4,g.f(I,this.newPosition,v),v+=4,v=R._writeString(I,this.oldText,v),v=R._writeString(I,this.newText,v),v}static read(I,v,C){const m=g.c(I,v);v+=4;const d=g.c(I,v);v+=4;const D=R._readString(I,v);v+=R._writeStringSize(D);const L=R._readString(I,v);return v+=R._writeStringSize(L),C.push(new R(m,D,d,L)),v}}function A(I,v){if(I===null||I.length===0)return v;const C=new j(I,v);return C.compress()}class j{constructor(I,v){this._prevEdits=I,this._currEdits=v,this._result=[],this._resultLen=0,this._prevLen=this._prevEdits.length,this._prevDeltaOffset=0,this._currLen=this._currEdits.length,this._currDeltaOffset=0}compress(){let I=0,v=0,C=this._getPrev(I),m=this._getCurr(v);for(;I<this._prevLen||v<this._currLen;){if(C===null){this._acceptCurr(m),m=this._getCurr(++v);continue}if(m===null){this._acceptPrev(C),C=this._getPrev(++I);continue}if(m.oldEnd<=C.newPosition){this._acceptCurr(m),m=this._getCurr(++v);continue}if(C.newEnd<=m.oldPosition){this._acceptPrev(C),C=this._getPrev(++I);continue}if(m.oldPosition<C.newPosition){const[w,b]=j._splitCurr(m,C.newPosition-m.oldPosition);this._acceptCurr(w),m=b;continue}if(C.newPosition<m.oldPosition){const[w,b]=j._splitPrev(C,m.oldPosition-C.newPosition);this._acceptPrev(w),C=b;continue}let L,r;if(m.oldEnd===C.newEnd)L=C,r=m,C=this._getPrev(++I),m=this._getCurr(++v);else if(m.oldEnd<C.newEnd){const[w,b]=j._splitPrev(C,m.oldLength);L=w,r=m,C=b,m=this._getCurr(++v)}else{const[w,b]=j._splitCurr(m,C.newLength);L=C,r=w,C=this._getPrev(++I),m=b}this._result[this._resultLen++]=new R(L.oldPosition,L.oldText,r.newPosition,r.newText),this._prevDeltaOffset+=L.newLength-L.oldLength,this._currDeltaOffset+=r.newLength-r.oldLength}const d=j._merge(this._result),D=j._removeNoOps(d);return D}_acceptCurr(I){this._result[this._resultLen++]=j._rebaseCurr(this._prevDeltaOffset,I),this._currDeltaOffset+=I.newLength-I.oldLength}_getCurr(I){return I<this._currLen?this._currEdits[I]:null}_acceptPrev(I){this._result[this._resultLen++]=j._rebasePrev(this._currDeltaOffset,I),this._prevDeltaOffset+=I.newLength-I.oldLength}_getPrev(I){return I<this._prevLen?this._prevEdits[I]:null}static _rebaseCurr(I,v){return new R(v.oldPosition-I,v.oldText,v.newPosition,v.newText)}static _rebasePrev(I,v){return new R(v.oldPosition,v.oldText,v.newPosition+I,v.newText)}static _splitPrev(I,v){const C=I.newText.substr(0,v),m=I.newText.substr(v);return[new R(I.oldPosition,I.oldText,I.newPosition,C),new R(I.oldEnd,"",I.newPosition+v,m)]}static _splitCurr(I,v){const C=I.oldText.substr(0,v),m=I.oldText.substr(v);return[new R(I.oldPosition,C,I.newPosition,I.newText),new R(I.oldPosition+v,m,I.newEnd,"")]}static _merge(I){if(I.length===0)return I;let v=[],C=0,m=I[0];for(let d=1;d<I.length;d++){const D=I[d];m.oldEnd===D.oldPosition?m=new R(m.oldPosition,m.oldText+D.oldText,m.newPosition,m.newText+D.newText):(v[C++]=m,m=D)}return v[C++]=m,v}static _removeNoOps(I){if(I.length===0)return I;let v=[],C=0;for(let m=0;m<I.length;m++){const d=I[m];if(d.oldText===d.newText)continue;v[C++]=d}return v}}},"5v8Y":function(mt,M,t){"use strict";t.d(M,"a",function(){return R});var g=t("MXAL");class B extends g.a{constructor(A){super(0);for(let j=0,I=A.length;j<I;j++)this.set(A.charCodeAt(j),2);this.set(32,1),this.set(9,1)}}function x(A){let j={};return I=>(j.hasOwnProperty(I)||(j[I]=A(I)),j[I])}const R=x(A=>new B(A))},"62hx":function(mt,M,t){},"6OMU":function(mt,M,t){"use strict";t.d(M,"t",function(){return g}),t.d(M,"u",function(){return B}),t.d(M,"g",function(){return x}),t.d(M,"d",function(){return R}),t.d(M,"h",function(){return A}),t.d(M,"q",function(){return j}),t.d(M,"l",function(){return I}),t.d(M,"e",function(){return v}),t.d(M,"m",function(){return C}),t.d(M,"n",function(){return m}),t.d(M,"f",function(){return d}),t.d(M,"i",function(){return D}),t.d(M,"j",function(){return r}),t.d(M,"k",function(){return w}),t.d(M,"r",function(){return b}),t.d(M,"b",function(){return u}),t.d(M,"p",function(){return c}),t.d(M,"o",function(){return p}),t.d(M,"c",function(){return S}),t.d(M,"s",function(){return y}),t.d(M,"a",function(){return k});function g(Q,q=0){return Q[Q.length-(1+q)]}function B(Q){if(Q.length===0)throw new Error("Invalid tail call");return[Q.slice(0,Q.length-1),Q[Q.length-1]]}function x(Q,q,z=(J,re)=>J===re){if(Q===q)return!0;if(!Q||!q)return!1;if(Q.length!==q.length)return!1;for(let J=0,re=Q.length;J<re;J++)if(!z(Q[J],q[J]))return!1;return!0}function R(Q,q,z){let J=0,re=Q.length-1;for(;J<=re;){const Z=(J+re)/2|0,ne=z(Q[Z],q);if(ne<0)J=Z+1;else if(ne>0)re=Z-1;else return Z}return-(J+1)}function A(Q,q){let z=0,J=Q.length;if(J===0)return 0;for(;z<J;){const re=Math.floor((z+J)/2);q(Q[re])?J=re:z=re+1}return z}function j(Q,q,z){if(Q=Q|0,Q>=q.length)throw new TypeError("invalid index");let J=q[Math.floor(q.length*Math.random())],re=[],Z=[],ne=[];for(let le of q){const _e=z(le,J);_e<0?re.push(le):_e>0?Z.push(le):ne.push(le)}return Q<re.length?j(Q,re,z):Q<re.length+ne.length?ne[0]:j(Q-(re.length+ne.length),Z,z)}function I(Q,q){const z=[];let J;for(const re of Q.slice(0).sort(q))!J||q(J[0],re)!==0?(J=[re],z.push(J)):J.push(re);return z}function v(Q){return Q.filter(q=>!!q)}function C(Q){return!Array.isArray(Q)||Q.length===0}function m(Q){return Array.isArray(Q)&&Q.length>0}function d(Q,q=z=>z){const z=new Set;return Q.filter(J=>{const re=q(J);return z.has(re)?!1:(z.add(re),!0)})}function D(Q,q){const z=L(Q,q);return z===-1?void 0:Q[z]}function L(Q,q){for(let z=Q.length-1;z>=0;z--){const J=Q[z];if(q(J))return z}return-1}function r(Q,q){return Q.length>0?Q[0]:q}function w(Q){return[].concat(...Q)}function b(Q,q){let z=typeof q=="number"?Q:0;typeof q=="number"?z=Q:(z=0,q=Q);const J=[];if(z<=q)for(let re=z;re<q;re++)J.push(re);else for(let re=z;re>q;re--)J.push(re);return J}function u(Q,q,z){const J=Q.slice(0,q),re=Q.slice(q);return J.concat(z,re)}function c(Q,q){const z=Q.indexOf(q);z>-1&&(Q.splice(z,1),Q.unshift(q))}function p(Q,q){const z=Q.indexOf(q);z>-1&&(Q.splice(z,1),Q.push(q))}function S(Q){return Array.isArray(Q)?Q:[Q]}function E(Q,q,z){const J=O(Q,q),re=Q.length,Z=z.length;Q.length=re+Z;for(let ne=re-1;ne>=J;ne--)Q[ne+Z]=Q[ne];for(let ne=0;ne<Z;ne++)Q[ne+J]=z[ne]}function y(Q,q,z,J){const re=O(Q,q),Z=Q.splice(re,z);return E(Q,re,J),Z}function O(Q,q){return q<0?Math.max(q+Q.length,0):Math.min(q,Q.length)}class k{constructor(Q){this.items=Q,this.firstIdx=0,this.lastIdx=this.items.length-1}takeWhile(Q){let q=this.firstIdx;for(;q<this.items.length&&Q(this.items[q]);)q++;const z=q===this.firstIdx?null:this.items.slice(this.firstIdx,q);return this.firstIdx=q,z}takeFromEndWhile(Q){let q=this.lastIdx;for(;q>=0&&Q(this.items[q]);)q--;const z=q===this.lastIdx?null:this.items.slice(q+1,this.lastIdx+1);return this.lastIdx=q,z}peek(){return this.items[this.firstIdx]}}},"6lNC":function(mt,M,t){"use strict";t.r(M);var g=t("+hIS");Object(g.a)({id:"pascal",extensions:[".pas",".p",".pp"],aliases:["Pascal","pas"],mimetypes:["text/x-pascal-source","text/x-pascal"],loader:function(){return t.e(347).then(t.bind(null,"meXB"))}})},"6vuP":function(mt,M,t){"use strict";t.d(M,"a",function(){return B});var g=t("Cg/j");const B=Object(g.c)("dialogService")},"7/Ik":function(mt,M,t){"use strict";t.d(M,"b",function(){return D}),t.d(M,"a",function(){return L});var g=t("D3Dy"),B=t("ZQ78"),x=t("EffR"),R=t("pg8w"),A=t("8HAY"),j=t("pmY6"),I=t("MNsG"),v=t("746U"),C=t("yEoX"),m=t.n(C),d=t("3/fG");class D extends j.a{constructor(r,w,b={}){super();this.options=b,this._context=r||this,this._action=w,w instanceof A.a&&this._register(w.onDidChange(u=>{if(!this.element)return;this.handleActionChangeEvent(u)}))}handleActionChangeEvent(r){r.enabled!==void 0&&this.updateEnabled(),r.checked!==void 0&&this.updateChecked(),r.class!==void 0&&this.updateClass(),r.label!==void 0&&(this.updateLabel(),this.updateTooltip()),r.tooltip!==void 0&&this.updateTooltip()}get actionRunner(){return this._actionRunner||(this._actionRunner=this._register(new A.b)),this._actionRunner}set actionRunner(r){this._actionRunner=r}getAction(){return this._action}isEnabled(){return this._action.enabled}setActionContext(r){this._context=r}render(r){const w=this.element=r;this._register(R.b.addTarget(r));const b=this.options&&this.options.draggable;b&&(r.draggable=!0,g.g&&this._register(Object(x.i)(r,x.d.DRAG_START,u=>{var c;return(c=u.dataTransfer)===null||c===void 0?void 0:c.setData(B.a.TEXT,this._action.label)}))),this._register(Object(x.i)(w,R.a.Tap,u=>this.onClick(u,!0))),this._register(Object(x.i)(w,x.d.MOUSE_DOWN,u=>{b||x.c.stop(u,!0),this._action.enabled&&u.button===0&&w.classList.add("active")})),I.f&&this._register(Object(x.i)(w,x.d.CONTEXT_MENU,u=>{u.button===0&&u.ctrlKey===!0&&this.onClick(u)})),this._register(Object(x.i)(w,x.d.CLICK,u=>{x.c.stop(u,!0),this.options&&this.options.isMenu||this.onClick(u)})),this._register(Object(x.i)(w,x.d.DBLCLICK,u=>{x.c.stop(u,!0)})),[x.d.MOUSE_UP,x.d.MOUSE_OUT].forEach(u=>{this._register(Object(x.i)(w,u,c=>{x.c.stop(c),w.classList.remove("active")}))})}onClick(r,w=!1){var b;x.c.stop(r,!0);const u=v.n(this._context)?((b=this.options)===null||b===void 0?void 0:b.useEventAsContext)?r:{preserveFocus:w}:this._context;this.actionRunner.run(this._action,u)}focus(){this.element&&(this.element.tabIndex=0,this.element.focus(),this.element.classList.add("focused"))}blur(){this.element&&(this.element.blur(),this.element.tabIndex=-1,this.element.classList.remove("focused"))}setFocusable(r){this.element&&(this.element.tabIndex=r?0:-1)}get trapsArrowNavigation(){return!1}updateEnabled(){}updateLabel(){}updateTooltip(){}updateClass(){}updateChecked(){}dispose(){this.element&&(this.element.remove(),this.element=void 0),super.dispose()}}class L extends D{constructor(r,w,b={}){super(r,w,b);this.options=b,this.options.icon=b.icon!==void 0?b.icon:!1,this.options.label=b.label!==void 0?b.label:!0,this.cssClass=""}render(r){super.render(r),this.element&&(this.label=Object(x.q)(this.element,Object(x.a)("a.action-label"))),this.label&&(this._action.id===A.d.ID?this.label.setAttribute("role","presentation"):this.options.isMenu?this.label.setAttribute("role","menuitem"):this.label.setAttribute("role","button")),this.options.label&&this.options.keybinding&&this.element&&(Object(x.q)(this.element,Object(x.a)("span.keybinding")).textContent=this.options.keybinding),this.updateClass(),this.updateLabel(),this.updateTooltip(),this.updateEnabled(),this.updateChecked()}focus(){this.label&&(this.label.tabIndex=0,this.label.focus())}blur(){this.label&&(this.label.tabIndex=-1)}setFocusable(r){this.label&&(this.label.tabIndex=r?0:-1)}updateLabel(){this.options.label&&this.label&&(this.label.textContent=this.getAction().label)}updateTooltip(){let r=null;this.getAction().tooltip?r=this.getAction().tooltip:!this.options.label&&this.getAction().label&&this.options.icon&&(r=this.getAction().label,this.options.keybinding&&(r=d.a({key:"titleLabel",comment:["action title","action keybinding"]},"{0} ({1})",r,this.options.keybinding))),r&&this.label&&(this.label.title=r)}updateClass(){this.cssClass&&this.label&&this.label.classList.remove(...this.cssClass.split(" ")),this.options.icon?(this.cssClass=this.getAction().class,this.label&&(this.label.classList.add("codicon"),this.cssClass&&this.label.classList.add(...this.cssClass.split(" "))),this.updateEnabled()):this.label&&this.label.classList.remove("codicon")}updateEnabled(){this.getAction().enabled?(this.label&&(this.label.removeAttribute("aria-disabled"),this.label.classList.remove("disabled")),this.element&&this.element.classList.remove("disabled")):(this.label&&(this.label.setAttribute("aria-disabled","true"),this.label.classList.add("disabled")),this.element&&this.element.classList.add("disabled"))}updateChecked(){this.label&&(this.getAction().checked?this.label.classList.add("checked"):this.label.classList.remove("checked"))}}},"79sc":function(mt,M,t){"use strict";t.d(M,"a",function(){return B});var g=t("Cg/j");const B=Object(g.c)("markerDecorationsService")},"7GBL":function(mt,M,t){},"7afs":function(mt,M,t){"use strict";t.d(M,"c",function(){return B}),t.d(M,"b",function(){return x}),t.d(M,"d",function(){return j}),t.d(M,"a",function(){return L});var g=t("N0LK");function B(r){return x(r,0)}function x(r,w){switch(typeof r){case"object":return r===null?R(349,w):Array.isArray(r)?I(r,w):v(r,w);case"string":return j(r,w);case"boolean":return A(r,w);case"number":return R(r,w);case"undefined":return R(937,w);default:return R(617,w)}}function R(r,w){return(w<<5)-w+r|0}function A(r,w){return R(r?433:863,w)}function j(r,w){w=R(149417,w);for(let b=0,u=r.length;b<u;b++)w=R(r.charCodeAt(b),w);return w}function I(r,w){return w=R(104579,w),r.reduce((b,u)=>x(u,b),w)}function v(r,w){return w=R(181387,w),Object.keys(r).sort().reduce((b,u)=>(b=j(u,b),x(r[u],b)),w)}function C(r,w,b=32){const u=b-w,c=~((1<<u)-1);return(r<<w|(c&r)>>>u)>>>0}function m(r,w=0,b=r.byteLength,u=0){for(let c=0;c<b;c++)r[w+c]=u}function d(r,w,b="0"){for(;r.length<w;)r=b+r;return r}function D(r,w=32){return r instanceof ArrayBuffer?Array.from(new Uint8Array(r)).map(b=>b.toString(16).padStart(2,"0")).join(""):d((r>>>0).toString(16),w/4)}class L{constructor(){this._h0=1732584193,this._h1=4023233417,this._h2=2562383102,this._h3=271733878,this._h4=3285377520,this._buff=new Uint8Array(64+3),this._buffDV=new DataView(this._buff.buffer),this._buffLen=0,this._totalLen=0,this._leftoverHighSurrogate=0,this._finished=!1}update(r){const w=r.length;if(w===0)return;const b=this._buff;let u=this._buffLen,c=this._leftoverHighSurrogate,p,S;for(c!==0?(p=c,S=-1,c=0):(p=r.charCodeAt(0),S=0);;){let E=p;if(g.E(p))if(S+1<w){const y=r.charCodeAt(S+1);g.F(y)?(S++,E=g.j(p,y)):E=65533}else{c=p;break}else g.F(p)&&(E=65533);if(u=this._push(b,u,E),S++,S<w)p=r.charCodeAt(S);else break}this._buffLen=u,this._leftoverHighSurrogate=c}_push(r,w,b){return b<128?r[w++]=b:b<2048?(r[w++]=192|(b&1984)>>>6,r[w++]=128|(b&63)>>>0):b<65536?(r[w++]=224|(b&61440)>>>12,r[w++]=128|(b&4032)>>>6,r[w++]=128|(b&63)>>>0):(r[w++]=240|(b&1835008)>>>18,r[w++]=128|(b&258048)>>>12,r[w++]=128|(b&4032)>>>6,r[w++]=128|(b&63)>>>0),w>=64&&(this._step(),w-=64,this._totalLen+=64,r[0]=r[64+0],r[1]=r[64+1],r[2]=r[64+2]),w}digest(){return this._finished||(this._finished=!0,this._leftoverHighSurrogate&&(this._leftoverHighSurrogate=0,this._buffLen=this._push(this._buff,this._buffLen,65533)),this._totalLen+=this._buffLen,this._wrapUp()),D(this._h0)+D(this._h1)+D(this._h2)+D(this._h3)+D(this._h4)}_wrapUp(){this._buff[this._buffLen++]=128,m(this._buff,this._buffLen),this._buffLen>56&&(this._step(),m(this._buff));const r=8*this._totalLen;this._buffDV.setUint32(56,Math.floor(r/4294967296),!1),this._buffDV.setUint32(60,r%4294967296,!1),this._step()}_step(){const r=L._bigBlock32,w=this._buffDV;for(let k=0;k<64;k+=4)r.setUint32(k,w.getUint32(k,!1),!1);for(let k=64;k<320;k+=4)r.setUint32(k,C(r.getUint32(k-12,!1)^r.getUint32(k-32,!1)^r.getUint32(k-56,!1)^r.getUint32(k-64,!1),1),!1);let b=this._h0,u=this._h1,c=this._h2,p=this._h3,S=this._h4,E,y,O;for(let k=0;k<80;k++)k<20?(E=u&c|~u&p,y=1518500249):k<40?(E=u^c^p,y=1859775393):k<60?(E=u&c|u&p|c&p,y=2400959708):(E=u^c^p,y=3395469782),O=C(b,5)+E+S+y+r.getUint32(k*4,!1)&4294967295,S=p,p=c,c=C(u,30),u=b,b=O;this._h0=this._h0+b&4294967295,this._h1=this._h1+u&4294967295,this._h2=this._h2+c&4294967295,this._h3=this._h3+p&4294967295,this._h4=this._h4+S&4294967295}}L._bigBlock32=new DataView(new ArrayBuffer(320))},"7lZ/":function(mt,M,t){"use strict";t.d(M,"a",function(){return R});var g=t("EffR"),B=t("fdyd"),x=t("qj0h");class R{constructor(A,j){this.supportIcons=j,this.text="",this.title="",this.highlights=[],this.didEverRender=!1,this.domNode=document.createElement("span"),this.domNode.className="monaco-highlighted-label",A.appendChild(this.domNode)}get element(){return this.domNode}set(A,j=[],I="",v){if(A||(A=""),v&&(A=R.escapeNewLines(A,j)),this.didEverRender&&this.text===A&&this.title===I&&x.d(this.highlights,j))return;this.text=A,this.title=I,this.highlights=j,this.render()}render(){const A=[];let j=0;for(const I of this.highlights){if(I.end===I.start)continue;if(j<I.start){const m=this.text.substring(j,I.start);A.push(g.a("span",void 0,...this.supportIcons?Object(B.a)(m):[m])),j=I.end}const v=this.text.substring(I.start,I.end),C=g.a("span.highlight",void 0,...this.supportIcons?Object(B.a)(v):[v]);I.extraClasses&&C.classList.add(I.extraClasses),A.push(C),j=I.end}if(j<this.text.length){const I=this.text.substring(j);A.push(g.a("span",void 0,...this.supportIcons?Object(B.a)(I):[I]))}g.R(this.domNode,...A),this.title?this.domNode.title=this.title:this.domNode.removeAttribute("title"),this.didEverRender=!0}static escapeNewLines(A,j){let I=0,v=0;return A.replace(/\r\n|\r|\n/g,(C,m)=>{v=C===`\r
|
|
|
`?-1:0,m+=I;for(const d of j){if(d.end<=m)continue;d.start>=m&&(d.start+=v),d.end>=m&&(d.end+=v)}return I+=v,"\u23CE"})}}},"7zd4":function(mt,M,t){},"8ATB":function(mt,M,t){},"8HsV":function(mt,M,t){"use strict";t.d(M,"a",function(){return g});class g{constructor(...B){this._entries=new Map;for(let[x,R]of B)this.set(x,R)}set(B,x){const R=this._entries.get(B);return this._entries.set(B,x),R}has(B){return this._entries.has(B)}get(B){return this._entries.get(B)}}},"8LL/":function(mt,M,t){},"8XyJ":function(mt,M,t){"use strict";t.r(M),t.d(M,"InsertCursorAbove",function(){return S}),t.d(M,"InsertCursorBelow",function(){return E}),t.d(M,"MultiCursorSessionResult",function(){return Q}),t.d(M,"MultiCursorSession",function(){return q}),t.d(M,"MultiCursorSelectionController",function(){return z}),t.d(M,"MultiCursorSelectionControllerAction",function(){return J}),t.d(M,"AddSelectionToNextFindMatchAction",function(){return re}),t.d(M,"AddSelectionToPreviousFindMatchAction",function(){return Z}),t.d(M,"MoveSelectionToNextFindMatchAction",function(){return ne}),t.d(M,"MoveSelectionToPreviousFindMatchAction",function(){return le}),t.d(M,"SelectHighlightsAction",function(){return _e}),t.d(M,"CompatChangeAll",function(){return Ce}),t.d(M,"SelectionHighlighter",function(){return ae});var g=t("OBOq"),B=t("X+cX"),x=t("/kV6"),R=t("pmY6"),A=t("sswD"),j=t("oAeH"),I=t("aokT"),v=t("gCVg"),C=t("wQH0"),m=t("M1Kb"),d=t("tX9W"),D=t("twdY"),L=t("oQaD"),r=t("3/fG"),w=t("fjLI"),b=t("T8No"),u=t("MD5Z"),c=t("t9D7");function p(ee,pe){const Te=pe.filter(Ie=>!ee.find(Me=>Me.equals(Ie)));if(Te.length>=1){const Ie=Te.map(Oe=>`line ${Oe.viewState.position.lineNumber} column ${Oe.viewState.position.column}`).join(", "),Me=Te.length===1?r.a("cursorAdded","Cursor added: {0}",Ie):r.a("cursorsAdded","Cursors added: {0}",Ie);Object(g.c)(Me)}}class S extends A.b{constructor(){super({id:"editor.action.insertCursorAbove",label:r.a("mutlicursor.insertAbove","Add Cursor Above"),alias:"Add Cursor Above",precondition:void 0,kbOpts:{kbExpr:C.a.editorTextFocus,primary:2048|512|16,linux:{primary:1024|512|16,secondary:[2048|1024|16]},weight:100},menuOpts:{menuId:w.b.MenubarSelectionMenu,group:"3_multi",title:r.a({key:"miInsertCursorAbove",comment:["&& denotes a mnemonic"]},"&&Add Cursor Above"),order:2}})}run(ee,pe,Te){if(!pe.hasModel())return;let Ie=!0;Te&&Te.logicalLine===!1&&(Ie=!1);const Me=pe._getViewModel();if(Me.cursorConfig.readOnly)return;Me.pushStackElement();const Oe=Me.getCursorStates();Me.setCursorStates(Te.source,3,j.b.addCursorUp(Me,Oe,Ie)),Me.revealTopMostCursor(Te.source),p(Oe,Me.getCursorStates())}}class E extends A.b{constructor(){super({id:"editor.action.insertCursorBelow",label:r.a("mutlicursor.insertBelow","Add Cursor Below"),alias:"Add Cursor Below",precondition:void 0,kbOpts:{kbExpr:C.a.editorTextFocus,primary:2048|512|18,linux:{primary:1024|512|18,secondary:[2048|1024|18]},weight:100},menuOpts:{menuId:w.b.MenubarSelectionMenu,group:"3_multi",title:r.a({key:"miInsertCursorBelow",comment:["&& denotes a mnemonic"]},"A&&dd Cursor Below"),order:3}})}run(ee,pe,Te){if(!pe.hasModel())return;let Ie=!0;Te&&Te.logicalLine===!1&&(Ie=!1);const Me=pe._getViewModel();if(Me.cursorConfig.readOnly)return;Me.pushStackElement();const Oe=Me.getCursorStates();Me.setCursorStates(Te.source,3,j.b.addCursorDown(Me,Oe,Ie)),Me.revealBottomMostCursor(Te.source),p(Oe,Me.getCursorStates())}}class y extends A.b{constructor(){super({id:"editor.action.insertCursorAtEndOfEachLineSelected",label:r.a("mutlicursor.insertAtEndOfEachLineSelected","Add Cursors to Line Ends"),alias:"Add Cursors to Line Ends",precondition:void 0,kbOpts:{kbExpr:C.a.editorTextFocus,primary:1024|512|39,weight:100},menuOpts:{menuId:w.b.MenubarSelectionMenu,group:"3_multi",title:r.a({key:"miInsertCursorAtEndOfEachLineSelected",comment:["&& denotes a mnemonic"]},"Add C&&ursors to Line Ends"),order:4}})}getCursorsForSelection(ee,pe,Te){if(ee.isEmpty())return;for(let Ie=ee.startLineNumber;Ie<ee.endLineNumber;Ie++){let Me=pe.getLineMaxColumn(Ie);Te.push(new v.a(Ie,Me,Ie,Me))}ee.endColumn>1&&Te.push(new v.a(ee.endLineNumber,ee.endColumn,ee.endLineNumber,ee.endColumn))}run(ee,pe){if(!pe.hasModel())return;const Te=pe.getModel(),Ie=pe.getSelections(),Me=pe._getViewModel(),Oe=Me.getCursorStates();let Xe=[];Ie.forEach(fe=>this.getCursorsForSelection(fe,Te,Xe)),Xe.length>0&&pe.setSelections(Xe),p(Oe,Me.getCursorStates())}}class O extends A.b{constructor(){super({id:"editor.action.addCursorsToBottom",label:r.a("mutlicursor.addCursorsToBottom","Add Cursors To Bottom"),alias:"Add Cursors To Bottom",precondition:void 0})}run(ee,pe){if(!pe.hasModel())return;const Te=pe.getSelections(),Ie=pe.getModel().getLineCount();let Me=[];for(let fe=Te[0].startLineNumber;fe<=Ie;fe++)Me.push(new v.a(fe,Te[0].startColumn,fe,Te[0].endColumn));const Oe=pe._getViewModel(),Xe=Oe.getCursorStates();Me.length>0&&pe.setSelections(Me),p(Xe,Oe.getCursorStates())}}class k extends A.b{constructor(){super({id:"editor.action.addCursorsToTop",label:r.a("mutlicursor.addCursorsToTop","Add Cursors To Top"),alias:"Add Cursors To Top",precondition:void 0})}run(ee,pe){if(!pe.hasModel())return;const Te=pe.getSelections();let Ie=[];for(let Xe=Te[0].startLineNumber;Xe>=1;Xe--)Ie.push(new v.a(Xe,Te[0].startColumn,Xe,Te[0].endColumn));const Me=pe._getViewModel(),Oe=Me.getCursorStates();Ie.length>0&&pe.setSelections(Ie),p(Oe,Me.getCursorStates())}}class Q{constructor(ee,pe,Te){this.selections=ee,this.revealRange=pe,this.revealScrollType=Te}}class q{constructor(ee,pe,Te,Ie,Me,Oe,Xe){this._editor=ee,this.findController=pe,this.isDisconnectedFromFindController=Te,this.searchText=Ie,this.wholeWord=Me,this.matchCase=Oe,this.currentMatch=Xe}static create(ee,pe){if(!ee.hasModel())return null;const Te=pe.getState();if(!ee.hasTextFocus()&&Te.isRevealed&&Te.searchString.length>0)return new q(ee,pe,!1,Te.searchString,Te.wholeWord,Te.matchCase,null);let Ie=!1,Me,Oe;const Xe=ee.getSelections();Xe.length===1&&Xe[0].isEmpty()?(Ie=!0,Me=!0,Oe=!0):(Me=Te.wholeWord,Oe=Te.matchCase);const fe=ee.getSelection();let Pe,Be=null;if(fe.isEmpty()){const Se=ee.getConfiguredWordAtPosition(fe.getStartPosition());if(!Se)return null;Pe=Se.word,Be=new v.a(fe.startLineNumber,Se.startColumn,fe.startLineNumber,Se.endColumn)}else Pe=ee.getModel().getValueInRange(fe).replace(/\r\n/g,`
|
|
|
`);return new q(ee,pe,Ie,Pe,Me,Oe,Be)}addSelectionToNextFindMatch(){if(!this._editor.hasModel())return null;const ee=this._getNextMatch();if(!ee)return null;const pe=this._editor.getSelections();return new Q(pe.concat(ee),ee,0)}moveSelectionToNextFindMatch(){if(!this._editor.hasModel())return null;const ee=this._getNextMatch();if(!ee)return null;const pe=this._editor.getSelections();return new Q(pe.slice(0,pe.length-1).concat(ee),ee,0)}_getNextMatch(){if(!this._editor.hasModel())return null;if(this.currentMatch){const Ie=this.currentMatch;return this.currentMatch=null,Ie}this.findController.highlightFindOptions();const ee=this._editor.getSelections(),pe=ee[ee.length-1],Te=this._editor.getModel().findNextMatch(this.searchText,pe.getEndPosition(),!1,this.matchCase,this.wholeWord?this._editor.getOption(115):null,!1);return Te?new v.a(Te.range.startLineNumber,Te.range.startColumn,Te.range.endLineNumber,Te.range.endColumn):null}addSelectionToPreviousFindMatch(){if(!this._editor.hasModel())return null;const ee=this._getPreviousMatch();if(!ee)return null;const pe=this._editor.getSelections();return new Q(pe.concat(ee),ee,0)}moveSelectionToPreviousFindMatch(){if(!this._editor.hasModel())return null;const ee=this._getPreviousMatch();if(!ee)return null;const pe=this._editor.getSelections();return new Q(pe.slice(0,pe.length-1).concat(ee),ee,0)}_getPreviousMatch(){if(!this._editor.hasModel())return null;if(this.currentMatch){const Ie=this.currentMatch;return this.currentMatch=null,Ie}this.findController.highlightFindOptions();const ee=this._editor.getSelections(),pe=ee[ee.length-1],Te=this._editor.getModel().findPreviousMatch(this.searchText,pe.getStartPosition(),!1,this.matchCase,this.wholeWord?this._editor.getOption(115):null,!1);return Te?new v.a(Te.range.startLineNumber,Te.range.startColumn,Te.range.endLineNumber,Te.range.endColumn):null}selectAll(){return this._editor.hasModel()?(this.findController.highlightFindOptions(),this._editor.getModel().findMatches(this.searchText,!0,!1,this.matchCase,this.wholeWord?this._editor.getOption(115):null,!1,1073741824)):[]}}class z extends R.a{constructor(ee){super();this._sessionDispose=this._register(new R.b),this._editor=ee,this._ignoreSelectionChange=!1,this._session=null}static get(ee){return ee.getContribution(z.ID)}dispose(){this._endSession(),super.dispose()}_beginSessionIfNeeded(ee){if(!this._session){const pe=q.create(this._editor,ee);if(!pe)return;this._session=pe;const Te={searchString:this._session.searchText};this._session.isDisconnectedFromFindController&&(Te.wholeWordOverride=1,Te.matchCaseOverride=1,Te.isRegexOverride=2),ee.getState().change(Te,!1),this._sessionDispose.add(this._editor.onDidChangeCursorSelection(Ie=>{if(this._ignoreSelectionChange)return;this._endSession()})),this._sessionDispose.add(this._editor.onDidBlurEditorText(()=>{this._endSession()})),this._sessionDispose.add(ee.getState().onFindReplaceStateChange(Ie=>{(Ie.matchCase||Ie.wholeWord)&&this._endSession()}))}}_endSession(){if(this._sessionDispose.clear(),this._session&&this._session.isDisconnectedFromFindController){const ee={wholeWordOverride:0,matchCaseOverride:0,isRegexOverride:0};this._session.findController.getState().change(ee,!1)}this._session=null}_setSelections(ee){this._ignoreSelectionChange=!0,this._editor.setSelections(ee),this._ignoreSelectionChange=!1}_expandEmptyToWord(ee,pe){if(!pe.isEmpty())return pe;const Te=this._editor.getConfiguredWordAtPosition(pe.getStartPosition());return Te?new v.a(pe.startLineNumber,Te.startColumn,pe.startLineNumber,Te.endColumn):pe}_applySessionResult(ee){if(!ee)return;this._setSelections(ee.selections),ee.revealRange&&this._editor.revealRangeInCenterIfOutsideViewport(ee.revealRange,ee.revealScrollType)}getSession(ee){return this._session}addSelectionToNextFindMatch(ee){if(!this._editor.hasModel())return;if(!this._session){const pe=this._editor.getSelections();if(pe.length>1){const Te=ee.getState(),Ie=Te.matchCase,Me=V(this._editor.getModel(),pe,Ie);if(!Me){const Oe=this._editor.getModel();let Xe=[];for(let fe=0,Pe=pe.length;fe<Pe;fe++)Xe[fe]=this._expandEmptyToWord(Oe,pe[fe]);this._editor.setSelections(Xe);return}}}this._beginSessionIfNeeded(ee),this._session&&this._applySessionResult(this._session.addSelectionToNextFindMatch())}addSelectionToPreviousFindMatch(ee){this._beginSessionIfNeeded(ee),this._session&&this._applySessionResult(this._session.addSelectionToPreviousFindMatch())}moveSelectionToNextFindMatch(ee){this._beginSessionIfNeeded(ee),this._session&&this._applySessionResult(this._session.moveSelectionToNextFindMatch())}moveSelectionToPreviousFindMatch(ee){this._beginSessionIfNeeded(ee),this._session&&this._applySessionResult(this._session.moveSelectionToPreviousFindMatch())}selectAll(ee){if(!this._editor.hasModel())return;let pe=null;const Te=ee.getState();if(Te.isRevealed&&Te.searchString.length>0&&Te.isRegex)pe=this._editor.getModel().findMatches(Te.searchString,!0,Te.isRegex,Te.matchCase,Te.wholeWord?this._editor.getOption(115):null,!1,1073741824);else{if(this._beginSessionIfNeeded(ee),!this._session)return;pe=this._session.selectAll()}if(Te.searchScope){const Ie=Te.searchScope;let Me=[];pe.forEach(Oe=>{Ie.forEach(Xe=>{Oe.range.endLineNumber<=Xe.endLineNumber&&Oe.range.startLineNumber>=Xe.startLineNumber&&Me.push(Oe)})}),pe=Me}if(pe.length>0){const Ie=this._editor.getSelection();for(let Me=0,Oe=pe.length;Me<Oe;Me++){const Xe=pe[Me],fe=Xe.range.intersectRanges(Ie);if(fe){pe[Me]=pe[0],pe[0]=Xe;break}}this._setSelections(pe.map(Me=>new v.a(Me.range.startLineNumber,Me.range.startColumn,Me.range.endLineNumber,Me.range.endColumn)))}}}z.ID="editor.contrib.multiCursorController";class J extends A.b{run(ee,pe){const Te=z.get(pe);if(!Te)return;const Ie=L.CommonFindController.get(pe);if(!Ie)return;const Me=pe._getViewModel();if(Me){const Oe=Me.getCursorStates();this._run(Te,Ie),p(Oe,Me.getCursorStates())}}}class re extends J{constructor(){super({id:"editor.action.addSelectionToNextFindMatch",label:r.a("addSelectionToNextFindMatch","Add Selection To Next Find Match"),alias:"Add Selection To Next Find Match",precondition:void 0,kbOpts:{kbExpr:C.a.focus,primary:2048|34,weight:100},menuOpts:{menuId:w.b.MenubarSelectionMenu,group:"3_multi",title:r.a({key:"miAddSelectionToNextFindMatch",comment:["&& denotes a mnemonic"]},"Add &&Next Occurrence"),order:5}})}_run(ee,pe){ee.addSelectionToNextFindMatch(pe)}}class Z extends J{constructor(){super({id:"editor.action.addSelectionToPreviousFindMatch",label:r.a("addSelectionToPreviousFindMatch","Add Selection To Previous Find Match"),alias:"Add Selection To Previous Find Match",precondition:void 0,menuOpts:{menuId:w.b.MenubarSelectionMenu,group:"3_multi",title:r.a({key:"miAddSelectionToPreviousFindMatch",comment:["&& denotes a mnemonic"]},"Add P&&revious Occurrence"),order:6}})}_run(ee,pe){ee.addSelectionToPreviousFindMatch(pe)}}class ne extends J{constructor(){super({id:"editor.action.moveSelectionToNextFindMatch",label:r.a("moveSelectionToNextFindMatch","Move Last Selection To Next Find Match"),alias:"Move Last Selection To Next Find Match",precondition:void 0,kbOpts:{kbExpr:C.a.focus,primary:Object(x.c)(2048|41,2048|34),weight:100}})}_run(ee,pe){ee.moveSelectionToNextFindMatch(pe)}}class le extends J{constructor(){super({id:"editor.action.moveSelectionToPreviousFindMatch",label:r.a("moveSelectionToPreviousFindMatch","Move Last Selection To Previous Find Match"),alias:"Move Last Selection To Previous Find Match",precondition:void 0})}_run(ee,pe){ee.moveSelectionToPreviousFindMatch(pe)}}class _e extends J{constructor(){super({id:"editor.action.selectHighlights",label:r.a("selectAllOccurrencesOfFindMatch","Select All Occurrences of Find Match"),alias:"Select All Occurrences of Find Match",precondition:void 0,kbOpts:{kbExpr:C.a.focus,primary:2048|1024|42,weight:100},menuOpts:{menuId:w.b.MenubarSelectionMenu,group:"3_multi",title:r.a({key:"miSelectHighlights",comment:["&& denotes a mnemonic"]},"Select All &&Occurrences"),order:7}})}_run(ee,pe){ee.selectAll(pe)}}class Ce extends J{constructor(){super({id:"editor.action.changeAll",label:r.a("changeAll.label","Change All Occurrences"),alias:"Change All Occurrences",precondition:b.a.and(C.a.writable,C.a.editorTextFocus),kbOpts:{kbExpr:C.a.editorTextFocus,primary:2048|60,weight:100},contextMenuOpts:{group:"1_modification",order:1.2}})}_run(ee,pe){ee.selectAll(pe)}}class oe{constructor(ee,pe,Te,Ie){this.searchText=ee,this.matchCase=pe,this.wordSeparators=Te,this.modelVersionId=Ie}static softEquals(ee,pe){return!ee&&!pe?!0:!ee||!pe?!1:ee.searchText===pe.searchText&&ee.matchCase===pe.matchCase&&ee.wordSeparators===pe.wordSeparators&&ee.modelVersionId===pe.modelVersionId}}class ae extends R.a{constructor(ee){super();this.editor=ee,this._isEnabled=ee.getOption(96),this.decorations=[],this.updateSoon=this._register(new B.e(()=>this._update(),300)),this.state=null,this._register(ee.onDidChangeConfiguration(pe=>{this._isEnabled=ee.getOption(96)})),this._register(ee.onDidChangeCursorSelection(pe=>{if(!this._isEnabled)return;pe.selection.isEmpty()?pe.reason===3?(this.state&&this._setState(null),this.updateSoon.schedule()):this._setState(null):this._update()})),this._register(ee.onDidChangeModel(pe=>{this._setState(null)})),this._register(ee.onDidChangeModelContent(pe=>{this._isEnabled&&this.updateSoon.schedule()})),this._register(L.CommonFindController.get(ee).getState().onFindReplaceStateChange(pe=>{this._update()}))}_update(){this._setState(ae._createState(this._isEnabled,this.editor))}static _createState(ee,pe){if(!ee)return null;if(!pe.hasModel())return null;const Te=pe.getSelection();if(Te.startLineNumber!==Te.endLineNumber)return null;const Ie=z.get(pe);if(!Ie)return null;const Me=L.CommonFindController.get(pe);if(!Me)return null;let Oe=Ie.getSession(Me);if(!Oe){const Pe=pe.getSelections();if(Pe.length>1){const Be=Me.getState(),Se=Be.matchCase,me=V(pe.getModel(),Pe,Se);if(!me)return null}Oe=q.create(pe,Me)}if(!Oe)return null;if(Oe.currentMatch)return null;if(/^[ \t]+$/.test(Oe.searchText))return null;if(Oe.searchText.length>200)return null;const Xe=Me.getState(),fe=Xe.matchCase;if(Xe.isRevealed){let Pe=Xe.searchString;fe||(Pe=Pe.toLowerCase());let Be=Oe.searchText;if(fe||(Be=Be.toLowerCase()),Pe===Be&&Oe.matchCase===Xe.matchCase&&Oe.wholeWord===Xe.wholeWord&&!Xe.isRegex)return null}return new oe(Oe.searchText,Oe.matchCase,Oe.wholeWord?pe.getOption(115):null,pe.getModel().getVersionId())}_setState(ee){if(oe.softEquals(this.state,ee)){this.state=ee;return}if(this.state=ee,!this.state){this.decorations=this.editor.deltaDecorations(this.decorations,[]);return}if(!this.editor.hasModel())return;const pe=this.editor.getModel();if(pe.isTooLargeForTokenization())return;const Te=D.i.has(pe)&&this.editor.getOption(71);let Ie=pe.findMatches(this.state.searchText,!0,!1,this.state.matchCase,this.state.wordSeparators,!1).map(fe=>fe.range);Ie.sort(I.a.compareRangesUsingStarts);let Me=this.editor.getSelections();Me.sort(I.a.compareRangesUsingStarts);let Oe=[];for(let fe=0,Pe=0,Be=Ie.length,Se=Me.length;fe<Be;){const me=Ie[fe];if(Pe>=Se)Oe.push(me),fe++;else{const he=I.a.compareRangesUsingStarts(me,Me[Pe]);he<0?((Me[Pe].isEmpty()||!I.a.areIntersecting(me,Me[Pe]))&&Oe.push(me),fe++):(he>0||fe++,Pe++)}}const Xe=Oe.map(fe=>({range:fe,options:Te?ae._SELECTION_HIGHLIGHT:ae._SELECTION_HIGHLIGHT_OVERVIEW}));this.decorations=this.editor.deltaDecorations(this.decorations,Xe)}dispose(){this._setState(null),super.dispose()}}ae.ID="editor.contrib.selectionHighlighter",ae._SELECTION_HIGHLIGHT_OVERVIEW=d.b.register({description:"selection-highlight-overview",stickiness:1,className:"selectionHighlight",minimap:{color:Object(c.g)(u.cc),position:m.f.Inline},overviewRuler:{color:Object(c.g)(u.jc),position:m.g.Center}}),ae._SELECTION_HIGHLIGHT=d.b.register({description:"selection-highlight",stickiness:1,className:"selectionHighlight"});function V(ee,pe,Te){const Ie=G(ee,pe[0],!Te);for(let Me=1,Oe=pe.length;Me<Oe;Me++){const Xe=pe[Me];if(Xe.isEmpty())return!1;const fe=G(ee,Xe,!Te);if(Ie!==fe)return!1}return!0}function G(ee,pe,Te){const Ie=ee.getValueInRange(pe);return Te?Ie.toLowerCase():Ie}Object(A.l)(z.ID,z),Object(A.l)(ae.ID,ae),Object(A.j)(S),Object(A.j)(E),Object(A.j)(y),Object(A.j)(re),Object(A.j)(Z),Object(A.j)(ne),Object(A.j)(le),Object(A.j)(_e),Object(A.j)(Ce),Object(A.j)(O),Object(A.j)(k)},"8Ydt":function(mt,M,t){"use strict";t.r(M),t.d(M,"DefinitionAction",function(){return we});var g=t("D3Dy"),B=t("OBOq"),x=t("X+cX"),R=t("/kV6"),A=t("MNsG"),j=t("746U"),I=t("bY76"),v=t("vATl"),C=t("sFUC"),m=t("sswD"),d=t("Vxe3"),D=t("03kh"),L=t("cGHE"),r=t("aokT"),w=t("wQH0"),b=t("twdY"),u=t("QY8A"),c=t("9o5J"),p=t("MI8n"),S=t("pmY6"),E=t("gslv"),y=t("3/fG"),O=t("T8No"),k=t("9fML"),Q=t("Cg/j"),q=t("bexQ"),z=t("nrhi"),J=t("sM1p"),re=function(Re,We,dt,Lt){var Ht=arguments.length,$e=Ht<3?We:Lt===null?Lt=Object.getOwnPropertyDescriptor(We,dt):Lt,ot;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")$e=Reflect.decorate(Re,We,dt,Lt);else for(var ce=Re.length-1;ce>=0;ce--)(ot=Re[ce])&&($e=(Ht<3?ot($e):Ht>3?ot(We,dt,$e):ot(We,dt))||$e);return Ht>3&&$e&&Object.defineProperty(We,dt,$e),$e},Z=function(Re,We){return function(dt,Lt){We(dt,Lt,Re)}};const ne=new O.c("hasSymbols",!1,Object(y.a)("hasSymbols","Whether there are symbol locations that can be navigated via keyboard-only.")),le=Object(Q.c)("ISymbolNavigationService");let _e=class{constructor(We,dt,Lt,Ht){this._editorService=dt,this._notificationService=Lt,this._keybindingService=Ht,this._currentModel=void 0,this._currentIdx=-1,this._ignoreEditorChange=!1,this._ctxHasSymbols=ne.bindTo(We)}reset(){var We,dt;this._ctxHasSymbols.reset(),(We=this._currentState)===null||We===void 0||We.dispose(),(dt=this._currentMessage)===null||dt===void 0||dt.dispose(),this._currentModel=void 0,this._currentIdx=-1}put(We){const dt=We.parent.parent;if(dt.references.length<=1){this.reset();return}this._currentModel=dt,this._currentIdx=dt.references.indexOf(We),this._ctxHasSymbols.set(!0),this._showMessage();const Lt=new Ce(this._editorService),Ht=Lt.onDidChange($e=>{if(this._ignoreEditorChange)return;const ot=this._editorService.getActiveCodeEditor();if(!ot)return;const ce=ot.getModel(),Ve=ot.getPosition();if(!ce||!Ve)return;let it=!1,Et=!1;for(const It of dt.references)if(Object(E.f)(It.uri,ce.uri))it=!0,Et=Et||r.a.containsPosition(It.range,Ve);else if(it)break;(!it||!Et)&&this.reset()});this._currentState=Object(S.e)(Lt,Ht)}revealNext(We){if(!this._currentModel)return Promise.resolve();this._currentIdx+=1,this._currentIdx%=this._currentModel.references.length;const dt=this._currentModel.references[this._currentIdx];return this._showMessage(),this._ignoreEditorChange=!0,this._editorService.openCodeEditor({resource:dt.uri,options:{selection:r.a.collapseToStart(dt.range),selectionRevealType:3}},We).finally(()=>{this._ignoreEditorChange=!1})}_showMessage(){var We;(We=this._currentMessage)===null||We===void 0||We.dispose();const dt=this._keybindingService.lookupKeybinding("editor.gotoNextSymbolFromResult"),Lt=dt?Object(y.a)("location.kb","Symbol {0} of {1}, {2} for next",this._currentIdx+1,this._currentModel.references.length,dt.getLabel()):Object(y.a)("location","Symbol {0} of {1}",this._currentIdx+1,this._currentModel.references.length);this._currentMessage=this._notificationService.status(Lt)}};_e=re([Z(0,O.b),Z(1,d.a),Z(2,J.a),Z(3,q.a)],_e),Object(k.b)(le,_e,!0),Object(m.k)(new class extends m.c{constructor(){super({id:"editor.gotoNextSymbolFromResult",precondition:ne,kbOpts:{weight:100,primary:70}})}runEditorCommand(Re,We){return Re.get(le).revealNext(We)}}),z.a.registerCommandAndKeybindingRule({id:"editor.gotoNextSymbolFromResult.cancel",weight:100,when:ne,primary:9,handler(Re){Re.get(le).reset()}});let Ce=class{constructor(We){this._listener=new Map,this._disposables=new S.b,this._onDidChange=new p.b,this.onDidChange=this._onDidChange.event,this._disposables.add(We.onCodeEditorRemove(this._onDidRemoveEditor,this)),this._disposables.add(We.onCodeEditorAdd(this._onDidAddEditor,this)),We.listCodeEditors().forEach(this._onDidAddEditor,this)}dispose(){this._disposables.dispose(),this._onDidChange.dispose(),Object(S.f)(this._listener.values())}_onDidAddEditor(We){this._listener.set(We,Object(S.e)(We.onDidChangeCursorPosition(dt=>this._onDidChange.fire({editor:We})),We.onDidChangeModelContent(dt=>this._onDidChange.fire({editor:We}))))}_onDidRemoveEditor(We){var dt;(dt=this._listener.get(We))===null||dt===void 0||dt.dispose(),this._listener.delete(We)}};Ce=re([Z(0,d.a)],Ce);var oe=t("NR8r"),ae=t("iNS8"),V=t("fjLI"),G=t("nnTU"),ee=t("tTk5"),pe=t("vRMv"),Te=function(Re,We,dt,Lt){function Ht($e){return $e instanceof dt?$e:new dt(function(ot){ot($e)})}return new(dt||(dt=Promise))(function($e,ot){function ce(Et){try{it(Lt.next(Et))}catch(It){ot(It)}}function Ve(Et){try{it(Lt.throw(Et))}catch(It){ot(It)}}function it(Et){Et.done?$e(Et.value):Ht(Et.value).then(ce,Ve)}it((Lt=Lt.apply(Re,We||[])).next())})},Ie,Me,Oe,Xe,fe,Pe,Be,Se;V.d.appendMenuItem(V.b.EditorContext,{submenu:V.b.EditorContextPeek,title:y.a("peek.submenu","Peek"),group:"navigation",order:100});const me=new Set;function he(Re){const We=new Re;return Object(m.m)(We),me.add(We.id),We}class Le extends m.b{constructor(Re,We){super(We);this._configuration=Re}run(Re,We){if(!We.hasModel())return Promise.resolve(void 0);const dt=Re.get(J.a),Lt=Re.get(d.a),Ht=Re.get(ee.a),$e=Re.get(le),ot=We.getModel(),ce=We.getPosition(),Ve=new v.b(We,1|4),it=Object(x.l)(this._getLocationModel(ot,ce,Ve.token),Ve.token).then(Et=>Te(this,void 0,void 0,function*(){if(!Et||Ve.token.isCancellationRequested)return;Object(B.a)(Et.ariaMessage);let It;if(Et.referenceAt(ot.uri,ce)){const vo=this._getAlternativeCommand(We);vo!==this.id&&me.has(vo)&&(It=We.getAction(vo))}const Rt=Et.references.length;if(Rt===0){if(!this._configuration.muteMessage){const vo=ot.getWordAtPosition(ce);oe.a.get(We).showMessage(this._getNoResultFoundMessage(vo),ce)}}else if(Rt===1&&It)It.run();else return this._onResult(Lt,$e,We,Et)}),Et=>{dt.error(Et)}).finally(()=>{Ve.dispose()});return Ht.showWhile(it,250),it}_onResult(Re,We,dt,Lt){return Te(this,void 0,void 0,function*(){const Ht=this._getGoToPreference(dt);if(!(dt instanceof D.a)&&(this._configuration.openInPeek||Ht==="peek"&&Lt.references.length>1))this._openInPeek(dt,Lt);else{const $e=Lt.firstReference(),ot=Lt.references.length>1&&Ht==="gotoAndPeek",ce=yield this._openReference(dt,Re,$e,this._configuration.openToSide,!ot);ot&&ce?this._openInPeek(ce,Lt):Lt.dispose(),Ht==="goto"&&We.put($e)}})}_openReference(Re,We,dt,Lt,Ht){return Te(this,void 0,void 0,function*(){let $e;if(Object(b.I)(dt)&&($e=dt.targetSelectionRange),$e||($e=dt.range),!$e)return;const ot=yield We.openCodeEditor({resource:dt.uri,options:{selection:r.a.collapseToStart($e),selectionRevealType:3}},Re,Lt);if(!ot)return;if(Ht){const ce=ot.getModel(),Ve=ot.deltaDecorations([],[{range:$e,options:{description:"symbol-navigate-action-highlight",className:"symbolHighlight"}}]);setTimeout(()=>{ot.getModel()===ce&&ot.deltaDecorations(Ve,[])},350)}return ot})}_openInPeek(Re,We){let dt=u.a.get(Re);dt&&Re.hasModel()?dt.toggleWidget(Re.getSelection(),Object(x.h)(Lt=>Promise.resolve(We)),this._configuration.openInPeek):We.dispose()}}class we extends Le{_getLocationModel(Re,We,dt){return Te(this,void 0,void 0,function*(){return new c.c(yield Object(pe.b)(Re,We,dt),y.a("def.title","Definitions"))})}_getNoResultFoundMessage(Re){return Re&&Re.word?y.a("noResultWord","No definition found for '{0}'",Re.word):y.a("generic.noResults","No definition found")}_getAlternativeCommand(Re){return Re.getOption(50).alternativeDefinitionCommand}_getGoToPreference(Re){return Re.getOption(50).multipleDefinitions}}const ve=A.h&&!g.i?2048|70:70;he((Ie=class Re extends we{constructor(){super({openToSide:!1,openInPeek:!1,muteMessage:!1},{id:Re.id,label:y.a("actions.goToDecl.label","Go to Definition"),alias:"Go to Definition",precondition:O.a.and(w.a.hasDefinitionProvider,w.a.isInWalkThroughSnippet.toNegated()),kbOpts:{kbExpr:w.a.editorTextFocus,primary:ve,weight:100},contextMenuOpts:{group:"navigation",order:1.1}});G.a.registerCommandAlias("editor.action.goToDeclaration",Re.id)}},Ie.id="editor.action.revealDefinition",Ie)),he((Me=class Re extends we{constructor(){super({openToSide:!0,openInPeek:!1,muteMessage:!1},{id:Re.id,label:y.a("actions.goToDeclToSide.label","Open Definition to the Side"),alias:"Open Definition to the Side",precondition:O.a.and(w.a.hasDefinitionProvider,w.a.isInWalkThroughSnippet.toNegated()),kbOpts:{kbExpr:w.a.editorTextFocus,primary:Object(R.c)(2048|41,ve),weight:100}});G.a.registerCommandAlias("editor.action.openDeclarationToTheSide",Re.id)}},Me.id="editor.action.revealDefinitionAside",Me)),he((Oe=class Re extends we{constructor(){super({openToSide:!1,openInPeek:!0,muteMessage:!1},{id:Re.id,label:y.a("actions.previewDecl.label","Peek Definition"),alias:"Peek Definition",precondition:O.a.and(w.a.hasDefinitionProvider,ae.b.notInPeekEditor,w.a.isInWalkThroughSnippet.toNegated()),kbOpts:{kbExpr:w.a.editorTextFocus,primary:512|70,linux:{primary:2048|1024|68},weight:100},contextMenuOpts:{menuId:V.b.EditorContextPeek,group:"peek",order:2}});G.a.registerCommandAlias("editor.action.previewDeclaration",Re.id)}},Oe.id="editor.action.peekDefinition",Oe));class ie extends Le{_getLocationModel(Re,We,dt){return Te(this,void 0,void 0,function*(){return new c.c(yield Object(pe.a)(Re,We,dt),y.a("decl.title","Declarations"))})}_getNoResultFoundMessage(Re){return Re&&Re.word?y.a("decl.noResultWord","No declaration found for '{0}'",Re.word):y.a("decl.generic.noResults","No declaration found")}_getAlternativeCommand(Re){return Re.getOption(50).alternativeDeclarationCommand}_getGoToPreference(Re){return Re.getOption(50).multipleDeclarations}}he((Xe=class Re extends ie{constructor(){super({openToSide:!1,openInPeek:!1,muteMessage:!1},{id:Re.id,label:y.a("actions.goToDeclaration.label","Go to Declaration"),alias:"Go to Declaration",precondition:O.a.and(w.a.hasDeclarationProvider,w.a.isInWalkThroughSnippet.toNegated()),contextMenuOpts:{group:"navigation",order:1.3}})}_getNoResultFoundMessage(We){return We&&We.word?y.a("decl.noResultWord","No declaration found for '{0}'",We.word):y.a("decl.generic.noResults","No declaration found")}},Xe.id="editor.action.revealDeclaration",Xe)),he(class extends ie{constructor(){super({openToSide:!1,openInPeek:!0,muteMessage:!1},{id:"editor.action.peekDeclaration",label:y.a("actions.peekDecl.label","Peek Declaration"),alias:"Peek Declaration",precondition:O.a.and(w.a.hasDeclarationProvider,ae.b.notInPeekEditor,w.a.isInWalkThroughSnippet.toNegated()),contextMenuOpts:{menuId:V.b.EditorContextPeek,group:"peek",order:3}})}});class W extends Le{_getLocationModel(Re,We,dt){return Te(this,void 0,void 0,function*(){return new c.c(yield Object(pe.e)(Re,We,dt),y.a("typedef.title","Type Definitions"))})}_getNoResultFoundMessage(Re){return Re&&Re.word?y.a("goToTypeDefinition.noResultWord","No type definition found for '{0}'",Re.word):y.a("goToTypeDefinition.generic.noResults","No type definition found")}_getAlternativeCommand(Re){return Re.getOption(50).alternativeTypeDefinitionCommand}_getGoToPreference(Re){return Re.getOption(50).multipleTypeDefinitions}}he((fe=class Re extends W{constructor(){super({openToSide:!1,openInPeek:!1,muteMessage:!1},{id:Re.ID,label:y.a("actions.goToTypeDefinition.label","Go to Type Definition"),alias:"Go to Type Definition",precondition:O.a.and(w.a.hasTypeDefinitionProvider,w.a.isInWalkThroughSnippet.toNegated()),kbOpts:{kbExpr:w.a.editorTextFocus,primary:0,weight:100},contextMenuOpts:{group:"navigation",order:1.4}})}},fe.ID="editor.action.goToTypeDefinition",fe)),he((Pe=class Re extends W{constructor(){super({openToSide:!1,openInPeek:!0,muteMessage:!1},{id:Re.ID,label:y.a("actions.peekTypeDefinition.label","Peek Type Definition"),alias:"Peek Type Definition",precondition:O.a.and(w.a.hasTypeDefinitionProvider,ae.b.notInPeekEditor,w.a.isInWalkThroughSnippet.toNegated()),contextMenuOpts:{menuId:V.b.EditorContextPeek,group:"peek",order:4}})}},Pe.ID="editor.action.peekTypeDefinition",Pe));class U extends Le{_getLocationModel(Re,We,dt){return Te(this,void 0,void 0,function*(){return new c.c(yield Object(pe.c)(Re,We,dt),y.a("impl.title","Implementations"))})}_getNoResultFoundMessage(Re){return Re&&Re.word?y.a("goToImplementation.noResultWord","No implementation found for '{0}'",Re.word):y.a("goToImplementation.generic.noResults","No implementation found")}_getAlternativeCommand(Re){return Re.getOption(50).alternativeImplementationCommand}_getGoToPreference(Re){return Re.getOption(50).multipleImplementations}}he((Be=class Re extends U{constructor(){super({openToSide:!1,openInPeek:!1,muteMessage:!1},{id:Re.ID,label:y.a("actions.goToImplementation.label","Go to Implementations"),alias:"Go to Implementations",precondition:O.a.and(w.a.hasImplementationProvider,w.a.isInWalkThroughSnippet.toNegated()),kbOpts:{kbExpr:w.a.editorTextFocus,primary:2048|70,weight:100},contextMenuOpts:{group:"navigation",order:1.45}})}},Be.ID="editor.action.goToImplementation",Be)),he((Se=class Re extends U{constructor(){super({openToSide:!1,openInPeek:!0,muteMessage:!1},{id:Re.ID,label:y.a("actions.peekImplementation.label","Peek Implementations"),alias:"Peek Implementations",precondition:O.a.and(w.a.hasImplementationProvider,ae.b.notInPeekEditor,w.a.isInWalkThroughSnippet.toNegated()),kbOpts:{kbExpr:w.a.editorTextFocus,primary:2048|1024|70,weight:100},contextMenuOpts:{menuId:V.b.EditorContextPeek,group:"peek",order:5}})}},Se.ID="editor.action.peekImplementation",Se));class se extends Le{_getNoResultFoundMessage(Re){return Re?y.a("references.no","No references found for '{0}'",Re.word):y.a("references.noGeneric","No references found")}_getAlternativeCommand(Re){return Re.getOption(50).alternativeReferenceCommand}_getGoToPreference(Re){return Re.getOption(50).multipleReferences}}he(class extends se{constructor(){super({openToSide:!1,openInPeek:!1,muteMessage:!1},{id:"editor.action.goToReferences",label:y.a("goToReferences.label","Go to References"),alias:"Go to References",precondition:O.a.and(w.a.hasReferenceProvider,ae.b.notInPeekEditor,w.a.isInWalkThroughSnippet.toNegated()),kbOpts:{kbExpr:w.a.editorTextFocus,primary:1024|70,weight:100},contextMenuOpts:{group:"navigation",order:1.45}})}_getLocationModel(We,dt,Lt){return Te(this,void 0,void 0,function*(){return new c.c(yield Object(pe.d)(We,dt,!0,Lt),y.a("ref.title","References"))})}}),he(class extends se{constructor(){super({openToSide:!1,openInPeek:!0,muteMessage:!1},{id:"editor.action.referenceSearch.trigger",label:y.a("references.action.label","Peek References"),alias:"Peek References",precondition:O.a.and(w.a.hasReferenceProvider,ae.b.notInPeekEditor,w.a.isInWalkThroughSnippet.toNegated()),contextMenuOpts:{menuId:V.b.EditorContextPeek,group:"peek",order:6}})}_getLocationModel(We,dt,Lt){return Te(this,void 0,void 0,function*(){return new c.c(yield Object(pe.d)(We,dt,!1,Lt),y.a("ref.title","References"))})}});class je extends Le{constructor(Re,We,dt){super(Re,{id:"editor.action.goToLocation",label:y.a("label.generic","Go to Any Symbol"),alias:"Go to Any Symbol",precondition:O.a.and(ae.b.notInPeekEditor,w.a.isInWalkThroughSnippet.toNegated())});this._references=We,this._gotoMultipleBehaviour=dt}_getLocationModel(Re,We,dt){return Te(this,void 0,void 0,function*(){return new c.c(this._references,y.a("generic.title","Locations"))})}_getNoResultFoundMessage(Re){return Re&&y.a("generic.noResult","No results for '{0}'",Re.word)||""}_getGoToPreference(Re){var We;return(We=this._gotoMultipleBehaviour)!==null&&We!==void 0?We:Re.getOption(50).multipleReferences}_getAlternativeCommand(){return""}}G.a.registerCommand({id:"editor.action.goToLocations",description:{description:"Go to locations from a position in a file",args:[{name:"uri",description:"The text document in which to start",constraint:I.a},{name:"position",description:"The position at which to start",constraint:L.a.isIPosition},{name:"locations",description:"An array of locations.",constraint:Array},{name:"multiple",description:"Define what to do when having multiple results, either `peek`, `gotoAndPeek`, or `goto"},{name:"noResultsMessage",description:"Human readable message that shows when locations is empty."}]},handler:(Re,We,dt,Lt,Ht,$e,ot)=>Te(void 0,void 0,void 0,function*(){Object(j.c)(I.a.isUri(We)),Object(j.c)(L.a.isIPosition(dt)),Object(j.c)(Array.isArray(Lt)),Object(j.c)(typeof Ht=="undefined"||typeof Ht=="string"),Object(j.c)(typeof ot=="undefined"||typeof ot=="boolean");const ce=Re.get(d.a),Ve=yield ce.openCodeEditor({resource:We},ce.getFocusedCodeEditor());if(Object(C.b)(Ve))return Ve.setPosition(dt),Ve.revealPositionInCenterIfOutsideViewport(dt,0),Ve.invokeWithinContext(it=>{const Et=new class extends je{_getNoResultFoundMessage(It){return $e||super._getNoResultFoundMessage(It)}}({muteMessage:!Boolean($e),openInPeek:Boolean(ot),openToSide:!1},Lt,Ht);it.get(Q.a).invokeFunction(Et.run.bind(Et),Ve)})})}),G.a.registerCommand({id:"editor.action.peekLocations",description:{description:"Peek locations from a position in a file",args:[{name:"uri",description:"The text document in which to start",constraint:I.a},{name:"position",description:"The position at which to start",constraint:L.a.isIPosition},{name:"locations",description:"An array of locations.",constraint:Array},{name:"multiple",description:"Define what to do when having multiple results, either `peek`, `gotoAndPeek`, or `goto"}]},handler:(Re,We,dt,Lt,Ht)=>Te(void 0,void 0,void 0,function*(){Re.get(G.b).executeCommand("editor.action.goToLocations",We,dt,Lt,Ht,void 0,!0)})}),G.a.registerCommand({id:"editor.action.findReferences",handler:(Re,We,dt)=>{Object(j.c)(I.a.isUri(We)),Object(j.c)(L.a.isIPosition(dt));const Lt=Re.get(d.a);return Lt.openCodeEditor({resource:We},Lt.getFocusedCodeEditor()).then(Ht=>{if(!Object(C.b)(Ht)||!Ht.hasModel())return;const $e=u.a.get(Ht);if(!$e)return;const ot=Object(x.h)(Ve=>Object(pe.d)(Ht.getModel(),L.a.lift(dt),!1,Ve).then(it=>new c.c(it,y.a("ref.title","References")))),ce=new r.a(dt.lineNumber,dt.column,dt.lineNumber,dt.column);return Promise.resolve($e.toggleWidget(ce,ot,!1))})}}),G.a.registerCommandAlias("editor.action.showReferences","editor.action.peekLocations"),V.d.appendMenuItems([{id:V.b.MenubarGoMenu,item:{command:{id:"editor.action.revealDefinition",title:y.a({key:"miGotoDefinition",comment:["&& denotes a mnemonic"]},"Go to &&Definition")},group:"4_symbol_nav",order:2}},{id:V.b.MenubarGoMenu,item:{command:{id:"editor.action.revealDeclaration",title:y.a({key:"miGotoDeclaration",comment:["&& denotes a mnemonic"]},"Go to &&Declaration")},group:"4_symbol_nav",order:3}},{id:V.b.MenubarGoMenu,item:{command:{id:"editor.action.goToTypeDefinition",title:y.a({key:"miGotoTypeDefinition",comment:["&& denotes a mnemonic"]},"Go to &&Type Definition")},group:"4_symbol_nav",order:3}},{id:V.b.MenubarGoMenu,item:{command:{id:"editor.action.goToImplementation",title:y.a({key:"miGotoImplementation",comment:["&& denotes a mnemonic"]},"Go to &&Implementations")},group:"4_symbol_nav",order:4}},{id:V.b.MenubarGoMenu,item:{command:{id:"editor.action.goToReferences",title:y.a({key:"miGotoReference",comment:["&& denotes a mnemonic"]},"Go to &&References")},group:"4_symbol_nav",order:5}}])},"8gvo":function(mt,M,t){},"8tI9":function(mt,M,t){},"8z58":function(mt,M,t){"use strict";t.r(M),t.d(M,"CancellationTokenSource",function(){return Fu}),t.d(M,"Emitter",function(){return Bu}),t.d(M,"KeyCode",function(){return Wu}),t.d(M,"KeyMod",function(){return Uu}),t.d(M,"Position",function(){return Hu}),t.d(M,"Range",function(){return Vu}),t.d(M,"Selection",function(){return zu}),t.d(M,"SelectionDirection",function(){return Ku}),t.d(M,"MarkerSeverity",function(){return Gu}),t.d(M,"MarkerTag",function(){return Xu}),t.d(M,"Uri",function(){return $u}),t.d(M,"Token",function(){return Yu}),t.d(M,"editor",function(){return Zu}),t.d(M,"languages",function(){return Qu});var g=t("/UlZ"),B=t("JQT/"),x=t("MI8n"),R=t("/kV6"),A=t("bY76"),j=t("cGHE"),I=t("aokT"),v=t("gCVg"),C=t("Tcc1"),m;(function(e){e[e.Unknown=0]="Unknown",e[e.Disabled=1]="Disabled",e[e.Enabled=2]="Enabled"})(m||(m={}));var d;(function(e){e[e.KeepWhitespace=1]="KeepWhitespace",e[e.InsertAsSnippet=4]="InsertAsSnippet"})(d||(d={}));var D;(function(e){e[e.Method=0]="Method",e[e.Function=1]="Function",e[e.Constructor=2]="Constructor",e[e.Field=3]="Field",e[e.Variable=4]="Variable",e[e.Class=5]="Class",e[e.Struct=6]="Struct",e[e.Interface=7]="Interface",e[e.Module=8]="Module",e[e.Property=9]="Property",e[e.Event=10]="Event",e[e.Operator=11]="Operator",e[e.Unit=12]="Unit",e[e.Value=13]="Value",e[e.Constant=14]="Constant",e[e.Enum=15]="Enum",e[e.EnumMember=16]="EnumMember",e[e.Keyword=17]="Keyword",e[e.Text=18]="Text",e[e.Color=19]="Color",e[e.File=20]="File",e[e.Reference=21]="Reference",e[e.Customcolor=22]="Customcolor",e[e.Folder=23]="Folder",e[e.TypeParameter=24]="TypeParameter",e[e.User=25]="User",e[e.Issue=26]="Issue",e[e.Snippet=27]="Snippet"})(D||(D={}));var L;(function(e){e[e.Deprecated=1]="Deprecated"})(L||(L={}));var r;(function(e){e[e.Invoke=0]="Invoke",e[e.TriggerCharacter=1]="TriggerCharacter",e[e.TriggerForIncompleteCompletions=2]="TriggerForIncompleteCompletions"})(r||(r={}));var w;(function(e){e[e.EXACT=0]="EXACT",e[e.ABOVE=1]="ABOVE",e[e.BELOW=2]="BELOW"})(w||(w={}));var b;(function(e){e[e.NotSet=0]="NotSet",e[e.ContentFlush=1]="ContentFlush",e[e.RecoverFromMarkers=2]="RecoverFromMarkers",e[e.Explicit=3]="Explicit",e[e.Paste=4]="Paste",e[e.Undo=5]="Undo",e[e.Redo=6]="Redo"})(b||(b={}));var u;(function(e){e[e.LF=1]="LF",e[e.CRLF=2]="CRLF"})(u||(u={}));var c;(function(e){e[e.Text=0]="Text",e[e.Read=1]="Read",e[e.Write=2]="Write"})(c||(c={}));var p;(function(e){e[e.None=0]="None",e[e.Keep=1]="Keep",e[e.Brackets=2]="Brackets",e[e.Advanced=3]="Advanced",e[e.Full=4]="Full"})(p||(p={}));var S;(function(e){e[e.acceptSuggestionOnCommitCharacter=0]="acceptSuggestionOnCommitCharacter",e[e.acceptSuggestionOnEnter=1]="acceptSuggestionOnEnter",e[e.accessibilitySupport=2]="accessibilitySupport",e[e.accessibilityPageSize=3]="accessibilityPageSize",e[e.ariaLabel=4]="ariaLabel",e[e.autoClosingBrackets=5]="autoClosingBrackets",e[e.autoClosingDelete=6]="autoClosingDelete",e[e.autoClosingOvertype=7]="autoClosingOvertype",e[e.autoClosingQuotes=8]="autoClosingQuotes",e[e.autoIndent=9]="autoIndent",e[e.automaticLayout=10]="automaticLayout",e[e.autoSurround=11]="autoSurround",e[e.bracketPairColorization=12]="bracketPairColorization",e[e.guides=13]="guides",e[e.codeLens=14]="codeLens",e[e.codeLensFontFamily=15]="codeLensFontFamily",e[e.codeLensFontSize=16]="codeLensFontSize",e[e.colorDecorators=17]="colorDecorators",e[e.columnSelection=18]="columnSelection",e[e.comments=19]="comments",e[e.contextmenu=20]="contextmenu",e[e.copyWithSyntaxHighlighting=21]="copyWithSyntaxHighlighting",e[e.cursorBlinking=22]="cursorBlinking",e[e.cursorSmoothCaretAnimation=23]="cursorSmoothCaretAnimation",e[e.cursorStyle=24]="cursorStyle",e[e.cursorSurroundingLines=25]="cursorSurroundingLines",e[e.cursorSurroundingLinesStyle=26]="cursorSurroundingLinesStyle",e[e.cursorWidth=27]="cursorWidth",e[e.disableLayerHinting=28]="disableLayerHinting",e[e.disableMonospaceOptimizations=29]="disableMonospaceOptimizations",e[e.domReadOnly=30]="domReadOnly",e[e.dragAndDrop=31]="dragAndDrop",e[e.emptySelectionClipboard=32]="emptySelectionClipboard",e[e.extraEditorClassName=33]="extraEditorClassName",e[e.fastScrollSensitivity=34]="fastScrollSensitivity",e[e.find=35]="find",e[e.fixedOverflowWidgets=36]="fixedOverflowWidgets",e[e.folding=37]="folding",e[e.foldingStrategy=38]="foldingStrategy",e[e.foldingHighlight=39]="foldingHighlight",e[e.foldingImportsByDefault=40]="foldingImportsByDefault",e[e.unfoldOnClickAfterEndOfLine=41]="unfoldOnClickAfterEndOfLine",e[e.fontFamily=42]="fontFamily",e[e.fontInfo=43]="fontInfo",e[e.fontLigatures=44]="fontLigatures",e[e.fontSize=45]="fontSize",e[e.fontWeight=46]="fontWeight",e[e.formatOnPaste=47]="formatOnPaste",e[e.formatOnType=48]="formatOnType",e[e.glyphMargin=49]="glyphMargin",e[e.gotoLocation=50]="gotoLocation",e[e.hideCursorInOverviewRuler=51]="hideCursorInOverviewRuler",e[e.hover=52]="hover",e[e.inDiffEditor=53]="inDiffEditor",e[e.inlineSuggest=54]="inlineSuggest",e[e.letterSpacing=55]="letterSpacing",e[e.lightbulb=56]="lightbulb",e[e.lineDecorationsWidth=57]="lineDecorationsWidth",e[e.lineHeight=58]="lineHeight",e[e.lineNumbers=59]="lineNumbers",e[e.lineNumbersMinChars=60]="lineNumbersMinChars",e[e.linkedEditing=61]="linkedEditing",e[e.links=62]="links",e[e.matchBrackets=63]="matchBrackets",e[e.minimap=64]="minimap",e[e.mouseStyle=65]="mouseStyle",e[e.mouseWheelScrollSensitivity=66]="mouseWheelScrollSensitivity",e[e.mouseWheelZoom=67]="mouseWheelZoom",e[e.multiCursorMergeOverlapping=68]="multiCursorMergeOverlapping",e[e.multiCursorModifier=69]="multiCursorModifier",e[e.multiCursorPaste=70]="multiCursorPaste",e[e.occurrencesHighlight=71]="occurrencesHighlight",e[e.overviewRulerBorder=72]="overviewRulerBorder",e[e.overviewRulerLanes=73]="overviewRulerLanes",e[e.padding=74]="padding",e[e.parameterHints=75]="parameterHints",e[e.peekWidgetDefaultFocus=76]="peekWidgetDefaultFocus",e[e.definitionLinkOpensInPeek=77]="definitionLinkOpensInPeek",e[e.quickSuggestions=78]="quickSuggestions",e[e.quickSuggestionsDelay=79]="quickSuggestionsDelay",e[e.readOnly=80]="readOnly",e[e.renameOnType=81]="renameOnType",e[e.renderControlCharacters=82]="renderControlCharacters",e[e.renderFinalNewline=83]="renderFinalNewline",e[e.renderLineHighlight=84]="renderLineHighlight",e[e.renderLineHighlightOnlyWhenFocus=85]="renderLineHighlightOnlyWhenFocus",e[e.renderValidationDecorations=86]="renderValidationDecorations",e[e.renderWhitespace=87]="renderWhitespace",e[e.revealHorizontalRightPadding=88]="revealHorizontalRightPadding",e[e.roundedSelection=89]="roundedSelection",e[e.rulers=90]="rulers",e[e.scrollbar=91]="scrollbar",e[e.scrollBeyondLastColumn=92]="scrollBeyondLastColumn",e[e.scrollBeyondLastLine=93]="scrollBeyondLastLine",e[e.scrollPredominantAxis=94]="scrollPredominantAxis",e[e.selectionClipboard=95]="selectionClipboard",e[e.selectionHighlight=96]="selectionHighlight",e[e.selectOnLineNumbers=97]="selectOnLineNumbers",e[e.showFoldingControls=98]="showFoldingControls",e[e.showUnused=99]="showUnused",e[e.snippetSuggestions=100]="snippetSuggestions",e[e.smartSelect=101]="smartSelect",e[e.smoothScrolling=102]="smoothScrolling",e[e.stickyTabStops=103]="stickyTabStops",e[e.stopRenderingLineAfter=104]="stopRenderingLineAfter",e[e.suggest=105]="suggest",e[e.suggestFontSize=106]="suggestFontSize",e[e.suggestLineHeight=107]="suggestLineHeight",e[e.suggestOnTriggerCharacters=108]="suggestOnTriggerCharacters",e[e.suggestSelection=109]="suggestSelection",e[e.tabCompletion=110]="tabCompletion",e[e.tabIndex=111]="tabIndex",e[e.unusualLineTerminators=112]="unusualLineTerminators",e[e.useShadowDOM=113]="useShadowDOM",e[e.useTabStops=114]="useTabStops",e[e.wordSeparators=115]="wordSeparators",e[e.wordWrap=116]="wordWrap",e[e.wordWrapBreakAfterCharacters=117]="wordWrapBreakAfterCharacters",e[e.wordWrapBreakBeforeCharacters=118]="wordWrapBreakBeforeCharacters",e[e.wordWrapColumn=119]="wordWrapColumn",e[e.wordWrapOverride1=120]="wordWrapOverride1",e[e.wordWrapOverride2=121]="wordWrapOverride2",e[e.wrappingIndent=122]="wrappingIndent",e[e.wrappingStrategy=123]="wrappingStrategy",e[e.showDeprecated=124]="showDeprecated",e[e.inlayHints=125]="inlayHints",e[e.editorClassName=126]="editorClassName",e[e.pixelRatio=127]="pixelRatio",e[e.tabFocusMode=128]="tabFocusMode",e[e.layoutInfo=129]="layoutInfo",e[e.wrappingInfo=130]="wrappingInfo"})(S||(S={}));var E;(function(e){e[e.TextDefined=0]="TextDefined",e[e.LF=1]="LF",e[e.CRLF=2]="CRLF"})(E||(E={}));var y;(function(e){e[e.LF=0]="LF",e[e.CRLF=1]="CRLF"})(y||(y={}));var O;(function(e){e[e.None=0]="None",e[e.Indent=1]="Indent",e[e.IndentOutdent=2]="IndentOutdent",e[e.Outdent=3]="Outdent"})(O||(O={}));var k;(function(e){e[e.Other=0]="Other",e[e.Type=1]="Type",e[e.Parameter=2]="Parameter"})(k||(k={}));var Q;(function(e){e[e.Automatic=0]="Automatic",e[e.Explicit=1]="Explicit"})(Q||(Q={}));var q;(function(e){e[e.DependsOnKbLayout=-1]="DependsOnKbLayout",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.Digit0=21]="Digit0",e[e.Digit1=22]="Digit1",e[e.Digit2=23]="Digit2",e[e.Digit3=24]="Digit3",e[e.Digit4=25]="Digit4",e[e.Digit5=26]="Digit5",e[e.Digit6=27]="Digit6",e[e.Digit7=28]="Digit7",e[e.Digit8=29]="Digit8",e[e.Digit9=30]="Digit9",e[e.KeyA=31]="KeyA",e[e.KeyB=32]="KeyB",e[e.KeyC=33]="KeyC",e[e.KeyD=34]="KeyD",e[e.KeyE=35]="KeyE",e[e.KeyF=36]="KeyF",e[e.KeyG=37]="KeyG",e[e.KeyH=38]="KeyH",e[e.KeyI=39]="KeyI",e[e.KeyJ=40]="KeyJ",e[e.KeyK=41]="KeyK",e[e.KeyL=42]="KeyL",e[e.KeyM=43]="KeyM",e[e.KeyN=44]="KeyN",e[e.KeyO=45]="KeyO",e[e.KeyP=46]="KeyP",e[e.KeyQ=47]="KeyQ",e[e.KeyR=48]="KeyR",e[e.KeyS=49]="KeyS",e[e.KeyT=50]="KeyT",e[e.KeyU=51]="KeyU",e[e.KeyV=52]="KeyV",e[e.KeyW=53]="KeyW",e[e.KeyX=54]="KeyX",e[e.KeyY=55]="KeyY",e[e.KeyZ=56]="KeyZ",e[e.Meta=57]="Meta",e[e.ContextMenu=58]="ContextMenu",e[e.F1=59]="F1",e[e.F2=60]="F2",e[e.F3=61]="F3",e[e.F4=62]="F4",e[e.F5=63]="F5",e[e.F6=64]="F6",e[e.F7=65]="F7",e[e.F8=66]="F8",e[e.F9=67]="F9",e[e.F10=68]="F10",e[e.F11=69]="F11",e[e.F12=70]="F12",e[e.F13=71]="F13",e[e.F14=72]="F14",e[e.F15=73]="F15",e[e.F16=74]="F16",e[e.F17=75]="F17",e[e.F18=76]="F18",e[e.F19=77]="F19",e[e.NumLock=78]="NumLock",e[e.ScrollLock=79]="ScrollLock",e[e.Semicolon=80]="Semicolon",e[e.Equal=81]="Equal",e[e.Comma=82]="Comma",e[e.Minus=83]="Minus",e[e.Period=84]="Period",e[e.Slash=85]="Slash",e[e.Backquote=86]="Backquote",e[e.BracketLeft=87]="BracketLeft",e[e.Backslash=88]="Backslash",e[e.BracketRight=89]="BracketRight",e[e.Quote=90]="Quote",e[e.OEM_8=91]="OEM_8",e[e.IntlBackslash=92]="IntlBackslash",e[e.Numpad0=93]="Numpad0",e[e.Numpad1=94]="Numpad1",e[e.Numpad2=95]="Numpad2",e[e.Numpad3=96]="Numpad3",e[e.Numpad4=97]="Numpad4",e[e.Numpad5=98]="Numpad5",e[e.Numpad6=99]="Numpad6",e[e.Numpad7=100]="Numpad7",e[e.Numpad8=101]="Numpad8",e[e.Numpad9=102]="Numpad9",e[e.NumpadMultiply=103]="NumpadMultiply",e[e.NumpadAdd=104]="NumpadAdd",e[e.NUMPAD_SEPARATOR=105]="NUMPAD_SEPARATOR",e[e.NumpadSubtract=106]="NumpadSubtract",e[e.NumpadDecimal=107]="NumpadDecimal",e[e.NumpadDivide=108]="NumpadDivide",e[e.KEY_IN_COMPOSITION=109]="KEY_IN_COMPOSITION",e[e.ABNT_C1=110]="ABNT_C1",e[e.ABNT_C2=111]="ABNT_C2",e[e.AudioVolumeMute=112]="AudioVolumeMute",e[e.AudioVolumeUp=113]="AudioVolumeUp",e[e.AudioVolumeDown=114]="AudioVolumeDown",e[e.BrowserSearch=115]="BrowserSearch",e[e.BrowserHome=116]="BrowserHome",e[e.BrowserBack=117]="BrowserBack",e[e.BrowserForward=118]="BrowserForward",e[e.MediaTrackNext=119]="MediaTrackNext",e[e.MediaTrackPrevious=120]="MediaTrackPrevious",e[e.MediaStop=121]="MediaStop",e[e.MediaPlayPause=122]="MediaPlayPause",e[e.LaunchMediaPlayer=123]="LaunchMediaPlayer",e[e.LaunchMail=124]="LaunchMail",e[e.LaunchApp2=125]="LaunchApp2",e[e.MAX_VALUE=126]="MAX_VALUE"})(q||(q={}));var z;(function(e){e[e.Hint=1]="Hint",e[e.Info=2]="Info",e[e.Warning=4]="Warning",e[e.Error=8]="Error"})(z||(z={}));var J;(function(e){e[e.Unnecessary=1]="Unnecessary",e[e.Deprecated=2]="Deprecated"})(J||(J={}));var re;(function(e){e[e.Inline=1]="Inline",e[e.Gutter=2]="Gutter"})(re||(re={}));var Z;(function(e){e[e.UNKNOWN=0]="UNKNOWN",e[e.TEXTAREA=1]="TEXTAREA",e[e.GUTTER_GLYPH_MARGIN=2]="GUTTER_GLYPH_MARGIN",e[e.GUTTER_LINE_NUMBERS=3]="GUTTER_LINE_NUMBERS",e[e.GUTTER_LINE_DECORATIONS=4]="GUTTER_LINE_DECORATIONS",e[e.GUTTER_VIEW_ZONE=5]="GUTTER_VIEW_ZONE",e[e.CONTENT_TEXT=6]="CONTENT_TEXT",e[e.CONTENT_EMPTY=7]="CONTENT_EMPTY",e[e.CONTENT_VIEW_ZONE=8]="CONTENT_VIEW_ZONE",e[e.CONTENT_WIDGET=9]="CONTENT_WIDGET",e[e.OVERVIEW_RULER=10]="OVERVIEW_RULER",e[e.SCROLLBAR=11]="SCROLLBAR",e[e.OVERLAY_WIDGET=12]="OVERLAY_WIDGET",e[e.OUTSIDE_EDITOR=13]="OUTSIDE_EDITOR"})(Z||(Z={}));var ne;(function(e){e[e.TOP_RIGHT_CORNER=0]="TOP_RIGHT_CORNER",e[e.BOTTOM_RIGHT_CORNER=1]="BOTTOM_RIGHT_CORNER",e[e.TOP_CENTER=2]="TOP_CENTER"})(ne||(ne={}));var le;(function(e){e[e.Left=1]="Left",e[e.Center=2]="Center",e[e.Right=4]="Right",e[e.Full=7]="Full"})(le||(le={}));var _e;(function(e){e[e.Off=0]="Off",e[e.On=1]="On",e[e.Relative=2]="Relative",e[e.Interval=3]="Interval",e[e.Custom=4]="Custom"})(_e||(_e={}));var Ce;(function(e){e[e.None=0]="None",e[e.Text=1]="Text",e[e.Blocks=2]="Blocks"})(Ce||(Ce={}));var oe;(function(e){e[e.Smooth=0]="Smooth",e[e.Immediate=1]="Immediate"})(oe||(oe={}));var ae;(function(e){e[e.Auto=1]="Auto",e[e.Hidden=2]="Hidden",e[e.Visible=3]="Visible"})(ae||(ae={}));var V;(function(e){e[e.LTR=0]="LTR",e[e.RTL=1]="RTL"})(V||(V={}));var G;(function(e){e[e.Invoke=1]="Invoke",e[e.TriggerCharacter=2]="TriggerCharacter",e[e.ContentChange=3]="ContentChange"})(G||(G={}));var ee;(function(e){e[e.File=0]="File",e[e.Module=1]="Module",e[e.Namespace=2]="Namespace",e[e.Package=3]="Package",e[e.Class=4]="Class",e[e.Method=5]="Method",e[e.Property=6]="Property",e[e.Field=7]="Field",e[e.Constructor=8]="Constructor",e[e.Enum=9]="Enum",e[e.Interface=10]="Interface",e[e.Function=11]="Function",e[e.Variable=12]="Variable",e[e.Constant=13]="Constant",e[e.String=14]="String",e[e.Number=15]="Number",e[e.Boolean=16]="Boolean",e[e.Array=17]="Array",e[e.Object=18]="Object",e[e.Key=19]="Key",e[e.Null=20]="Null",e[e.EnumMember=21]="EnumMember",e[e.Struct=22]="Struct",e[e.Event=23]="Event",e[e.Operator=24]="Operator",e[e.TypeParameter=25]="TypeParameter"})(ee||(ee={}));var pe;(function(e){e[e.Deprecated=1]="Deprecated"})(pe||(pe={}));var Te;(function(e){e[e.Hidden=0]="Hidden",e[e.Blink=1]="Blink",e[e.Smooth=2]="Smooth",e[e.Phase=3]="Phase",e[e.Expand=4]="Expand",e[e.Solid=5]="Solid"})(Te||(Te={}));var Ie;(function(e){e[e.Line=1]="Line",e[e.Block=2]="Block",e[e.Underline=3]="Underline",e[e.LineThin=4]="LineThin",e[e.BlockOutline=5]="BlockOutline",e[e.UnderlineThin=6]="UnderlineThin"})(Ie||(Ie={}));var Me;(function(e){e[e.AlwaysGrowsWhenTypingAtEdges=0]="AlwaysGrowsWhenTypingAtEdges",e[e.NeverGrowsWhenTypingAtEdges=1]="NeverGrowsWhenTypingAtEdges",e[e.GrowsOnlyWhenTypingBefore=2]="GrowsOnlyWhenTypingBefore",e[e.GrowsOnlyWhenTypingAfter=3]="GrowsOnlyWhenTypingAfter"})(Me||(Me={}));var Oe;(function(e){e[e.None=0]="None",e[e.Same=1]="Same",e[e.Indent=2]="Indent",e[e.DeepIndent=3]="DeepIndent"})(Oe||(Oe={}));class Xe{static chord(e,i){return Object(R.c)(e,i)}}Xe.CtrlCmd=2048,Xe.Shift=1024,Xe.Alt=512,Xe.WinCtrl=256;function fe(){return{editor:void 0,languages:void 0,CancellationTokenSource:B.b,Emitter:x.b,KeyCode:q,KeyMod:Xe,Position:j.a,Range:I.a,Selection:v.a,SelectionDirection:V,MarkerSeverity:z,MarkerTag:J,Uri:A.a,Token:C.a}}var Pe=t("siPX"),Be=t("Vxe3"),Se=t("EffR"),me=t("24hK"),he=t("QDVR"),Le=t("Q4rV"),we=t("tYmi"),ve=t("gslv"),ie=t("nnTU"),W;(function(e){e[e.API=0]="API",e[e.USER=1]="USER"})(W||(W={}));var U=t("W9cx"),se=function(e,i,s,l){var P=arguments.length,H=P<3?i:l===null?l=Object.getOwnPropertyDescriptor(i,s):l,X;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")H=Reflect.decorate(e,i,s,l);else for(var ge=e.length-1;ge>=0;ge--)(X=e[ge])&&(H=(P<3?X(H):P>3?X(i,s,H):X(i,s))||H);return P>3&&H&&Object.defineProperty(i,s,H),H},je=function(e,i){return function(s,l){i(s,l,e)}},Re=function(e,i,s,l){function P(H){return H instanceof s?H:new s(function(X){X(H)})}return new(s||(s=Promise))(function(H,X){function ge(Je){try{st(l.next(Je))}catch(wt){X(wt)}}function Ue(Je){try{st(l.throw(Je))}catch(wt){X(wt)}}function st(Je){Je.done?H(Je.value):P(Je.value).then(ge,Ue)}st((l=l.apply(e,i||[])).next())})};let We=class{constructor(i){this._commandService=i}open(i,s){return Re(this,void 0,void 0,function*(){if(!Object(U.c)(i,we.c.command))return!1;if(!(s==null?void 0:s.allowCommands))return!0;typeof i=="string"&&(i=A.a.parse(i));let l=[];try{l=Object(Le.a)(decodeURIComponent(i.query))}catch(P){try{l=Object(Le.a)(i.query)}catch(H){}}return Array.isArray(l)||(l=[l]),yield this._commandService.executeCommand(i.path,...l),!0})}};We=se([je(0,ie.b)],We);let dt=class{constructor(i){this._editorService=i}open(i,s){return Re(this,void 0,void 0,function*(){typeof i=="string"&&(i=A.a.parse(i));let l;const P=/^L?(\d+)(?:,(\d+))?/.exec(i.fragment);return P&&(l={startLineNumber:parseInt(P[1]),startColumn:P[2]?parseInt(P[2]):1},i=i.with({fragment:""})),i.scheme===we.c.file&&(i=Object(ve.h)(i)),yield this._editorService.openCodeEditor({resource:i,options:Object.assign({selection:l,context:(s==null?void 0:s.fromUserGesture)?W.USER:W.API},s==null?void 0:s.editorOptions)},this._editorService.getFocusedCodeEditor(),s==null?void 0:s.openToSide),!0})}};dt=se([je(0,Be.a)],dt);let Lt=class{constructor(i,s){this._openers=new me.a,this._validators=new me.a,this._resolvers=new me.a,this._resolvedUriTargets=new he.b(l=>l.with({path:null,fragment:null,query:null}).toString()),this._externalOpeners=new me.a,this._defaultExternalOpener={openExternal:l=>Re(this,void 0,void 0,function*(){return Object(U.c)(l,we.c.http)||Object(U.c)(l,we.c.https)?Se.Z(l):window.location.href=l,!0})},this._openers.push({open:(l,P)=>Re(this,void 0,void 0,function*(){return(P==null?void 0:P.openExternal)||Object(U.c)(l,we.c.mailto)||Object(U.c)(l,we.c.http)||Object(U.c)(l,we.c.https)?(yield this._doOpenExternal(l,P),!0):!1})}),this._openers.push(new We(s)),this._openers.push(new dt(i))}registerOpener(i){const s=this._openers.unshift(i);return{dispose:s}}registerValidator(i){const s=this._validators.push(i);return{dispose:s}}registerExternalUriResolver(i){const s=this._resolvers.push(i);return{dispose:s}}setDefaultExternalOpener(i){this._defaultExternalOpener=i}registerExternalOpener(i){const s=this._externalOpeners.push(i);return{dispose:s}}open(i,s){var l;return Re(this,void 0,void 0,function*(){const P=typeof i=="string"?A.a.parse(i):i,H=(l=this._resolvedUriTargets.get(P))!==null&&l!==void 0?l:i;for(const X of this._validators)if(!(yield X.shouldOpen(H)))return!1;for(const X of this._openers){const ge=yield X.open(i,s);if(ge)return!0}return!1})}resolveExternalUri(i,s){return Re(this,void 0,void 0,function*(){for(const l of this._resolvers)try{const P=yield l.resolveExternalUri(i,s);if(P)return this._resolvedUriTargets.has(P.resolved)||this._resolvedUriTargets.set(P.resolved,i),P}catch(P){}throw new Error("Could not resolve external URI: "+i.toString())})}_doOpenExternal(i,s){return Re(this,void 0,void 0,function*(){const l=typeof i=="string"?A.a.parse(i):i;let P;try{P=(yield this.resolveExternalUri(l,s)).resolved}catch(X){P=l}let H;if(typeof i=="string"&&l.toString()===P.toString()?H=i:H=encodeURI(P.toString(!0)),s==null?void 0:s.allowContributedOpeners){const X=typeof(s==null?void 0:s.allowContributedOpeners)=="string"?s==null?void 0:s.allowContributedOpeners:void 0;for(const ge of this._externalOpeners){const Ue=yield ge.openExternal(H,{sourceUri:l,preferredOpenerId:X},B.a.None);if(Ue)return!0}}return this._defaultExternalOpener.openExternal(H,{sourceUri:l},B.a.None)})}dispose(){this._validators.clear()}};Lt=se([je(0,Be.a),je(1,ie.b)],Lt);var Ht=t("FWmy"),$e=t("pmY6"),ot=t("qj0h");const ce={followsCaret:!0,ignoreCharChanges:!0,alwaysRevealFirst:!0};class Ve extends $e.a{constructor(e,i={}){super();this._onDidUpdate=this._register(new x.b),this._editor=e,this._options=ot.f(i,ce,!1),this.disposed=!1,this.nextIdx=-1,this.ranges=[],this.ignoreSelectionChange=!1,this.revealFirst=Boolean(this._options.alwaysRevealFirst),this._register(this._editor.onDidDispose(()=>this.dispose())),this._register(this._editor.onDidUpdateDiff(()=>this._onDiffUpdated())),this._options.followsCaret&&this._register(this._editor.getModifiedEditor().onDidChangeCursorPosition(s=>{if(this.ignoreSelectionChange)return;this.nextIdx=-1})),this._options.alwaysRevealFirst&&this._register(this._editor.getModifiedEditor().onDidChangeModel(s=>{this.revealFirst=!0})),this._init()}_init(){let e=this._editor.getLineChanges();if(!e)return}_onDiffUpdated(){this._init(),this._compute(this._editor.getLineChanges()),this.revealFirst&&(this._editor.getLineChanges()!==null&&(this.revealFirst=!1,this.nextIdx=-1,this.next(1)))}_compute(e){this.ranges=[],e&&e.forEach(i=>{!this._options.ignoreCharChanges&&i.charChanges?i.charChanges.forEach(s=>{this.ranges.push({rhs:!0,range:new I.a(s.modifiedStartLineNumber,s.modifiedStartColumn,s.modifiedEndLineNumber,s.modifiedEndColumn)})}):i.modifiedEndLineNumber===0?this.ranges.push({rhs:!0,range:new I.a(i.modifiedStartLineNumber,1,i.modifiedStartLineNumber+1,1)}):this.ranges.push({rhs:!0,range:new I.a(i.modifiedStartLineNumber,1,i.modifiedEndLineNumber+1,1)})}),this.ranges.sort((i,s)=>I.a.compareRangesUsingStarts(i.range,s.range)),this._onDidUpdate.fire(this)}_initIdx(e){let i=!1,s=this._editor.getPosition();if(!s){this.nextIdx=0;return}for(let l=0,P=this.ranges.length;l<P&&!i;l++){let H=this.ranges[l].range;s.isBeforeOrEqual(H.getStartPosition())&&(this.nextIdx=l+(e?0:-1),i=!0)}i||(this.nextIdx=e?0:this.ranges.length-1),this.nextIdx<0&&(this.nextIdx=this.ranges.length-1)}_move(e,i){if(Ht.a(!this.disposed,"Illegal State - diff navigator has been disposed"),!this.canNavigate())return;this.nextIdx===-1?this._initIdx(e):e?(this.nextIdx+=1,this.nextIdx>=this.ranges.length&&(this.nextIdx=0)):(this.nextIdx-=1,this.nextIdx<0&&(this.nextIdx=this.ranges.length-1));let s=this.ranges[this.nextIdx];this.ignoreSelectionChange=!0;try{let l=s.range.getStartPosition();this._editor.setPosition(l),this._editor.revealRangeInCenter(s.range,i)}finally{this.ignoreSelectionChange=!1}}canNavigate(){return this.ranges&&this.ranges.length>0}next(e=0){this._move(!0,e)}previous(e=0){this._move(!1,e)}dispose(){super.dispose(),this.ranges=[],this.disposed=!0}}var it=t("+3Gp"),Et=t("iuje"),It=t("M1Kb"),Rt=t("twdY"),vo=t("i/Ef"),Mo=t("pAvP"),xo=t("WBhO"),Do=t("t49l"),Lo=t("X+cX"),To=t("/cxE"),Vt=t("MNsG"),xt=t("746U"),ze=t("N0LK");const ct="$initialize";let Ut=!1;function Qe(e){if(!Vt.h)return;Ut||(Ut=!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)}class tt{constructor(e,i,s,l){this.vsWorker=e,this.req=i,this.method=s,this.args=l,this.type=0}}class ut{constructor(e,i,s,l){this.vsWorker=e,this.seq=i,this.res=s,this.err=l,this.type=1}}class Dt{constructor(e,i,s,l){this.vsWorker=e,this.req=i,this.eventName=s,this.arg=l,this.type=2}}class Pt{constructor(e,i,s){this.vsWorker=e,this.req=i,this.event=s,this.type=3}}class Wt{constructor(e,i){this.vsWorker=e,this.req=i,this.type=4}}class zt{constructor(e){this._workerId=-1,this._handler=e,this._lastSentReq=0,this._pendingReplies=Object.create(null),this._pendingEmitters=new Map,this._pendingEvents=new Map}setWorkerId(e){this._workerId=e}sendMessage(e,i){const s=String(++this._lastSentReq);return new Promise((l,P)=>{this._pendingReplies[s]={resolve:l,reject:P},this._send(new tt(this._workerId,s,e,i))})}listen(e,i){let s=null;const l=new x.b({onFirstListenerAdd:()=>{s=String(++this._lastSentReq),this._pendingEmitters.set(s,l),this._send(new Dt(this._workerId,s,e,i))},onLastListenerRemove:()=>{this._pendingEmitters.delete(s),this._send(new Wt(this._workerId,s)),s=null}});return l.event}handleMessage(e){if(!e||!e.vsWorker)return;if(this._workerId!==-1&&e.vsWorker!==this._workerId)return;this._handleMessage(e)}_handleMessage(e){switch(e.type){case 1:return this._handleReplyMessage(e);case 0:return this._handleRequestMessage(e);case 2:return this._handleSubscribeEventMessage(e);case 3:return this._handleEventMessage(e);case 4:return this._handleUnsubscribeEventMessage(e)}}_handleReplyMessage(e){if(!this._pendingReplies[e.seq]){console.warn("Got reply to unknown seq");return}let i=this._pendingReplies[e.seq];if(delete this._pendingReplies[e.seq],e.err){let s=e.err;e.err.$isError&&(s=new Error,s.name=e.err.name,s.message=e.err.message,s.stack=e.err.stack),i.reject(s);return}i.resolve(e.res)}_handleRequestMessage(e){let i=e.req,s=this._handler.handleMessage(e.method,e.args);s.then(l=>{this._send(new ut(this._workerId,i,l,void 0))},l=>{l.detail instanceof Error&&(l.detail=Object(To.h)(l.detail)),this._send(new ut(this._workerId,i,void 0,Object(To.h)(l)))})}_handleSubscribeEventMessage(e){const i=e.req,s=this._handler.handleEvent(e.eventName,e.arg)(l=>{this._send(new Pt(this._workerId,i,l))});this._pendingEvents.set(i,s)}_handleEventMessage(e){if(!this._pendingEmitters.has(e.req)){console.warn("Got event for unknown req");return}this._pendingEmitters.get(e.req).fire(e.event)}_handleUnsubscribeEventMessage(e){if(!this._pendingEvents.has(e.req)){console.warn("Got unsubscribe for unknown req");return}this._pendingEvents.get(e.req).dispose(),this._pendingEvents.delete(e.req)}_send(e){let i=[];if(e.type===0)for(let s=0;s<e.args.length;s++)e.args[s]instanceof ArrayBuffer&&i.push(e.args[s]);else e.type===1&&(e.res instanceof ArrayBuffer&&i.push(e.res));this._handler.sendMessage(e,i)}}class so extends $e.a{constructor(e,i,s){super();let l=null;this._worker=this._register(e.create("vs/base/common/worker/simpleWorker",Ue=>{this._protocol.handleMessage(Ue)},Ue=>{l&&l(Ue)})),this._protocol=new zt({sendMessage:(Ue,st)=>{this._worker.postMessage(Ue,st)},handleMessage:(Ue,st)=>{if(typeof s[Ue]!="function")return Promise.reject(new Error("Missing method "+Ue+" on main thread host."));try{return Promise.resolve(s[Ue].apply(s,st))}catch(Je){return Promise.reject(Je)}},handleEvent:(Ue,st)=>{if(No(Ue)){const Je=s[Ue].call(s,st);if(typeof Je!="function")throw new Error(`Missing dynamic event ${Ue} on main thread host.`);return Je}if(wo(Ue)){const Je=s[Ue];if(typeof Je!="function")throw new Error(`Missing event ${Ue} on main thread host.`);return Je}throw new Error(`Malformed event name ${Ue}`)}}),this._protocol.setWorkerId(this._worker.getId());let P=null;typeof Vt.b.require!="undefined"&&typeof Vt.b.require.getConfig=="function"?P=Vt.b.require.getConfig():typeof Vt.b.requirejs!="undefined"&&(P=Vt.b.requirejs.s.contexts._.config);const H=xt.e(s);this._onModuleLoaded=this._protocol.sendMessage(ct,[this._worker.getId(),JSON.parse(JSON.stringify(P)),i,H]);const X=(Ue,st)=>this._request(Ue,st),ge=(Ue,st)=>this._protocol.listen(Ue,st);this._lazyProxy=new Promise((Ue,st)=>{l=st,this._onModuleLoaded.then(Je=>{Ue(di(Je,X,ge))},Je=>{st(Je),this._onError("Worker failed to load "+i,Je)})})}getProxyObject(){return this._lazyProxy}_request(e,i){return new Promise((s,l)=>{this._onModuleLoaded.then(()=>{this._protocol.sendMessage(e,i).then(s,l)},l)})}_onError(e,i){console.error(e),console.info(i)}}function wo(e){return e[0]==="o"&&e[1]==="n"&&ze.H(e.charCodeAt(2))}function No(e){return/^onDynamic/.test(e)&&ze.H(e.charCodeAt(9))}function di(e,i,s){const l=X=>function(){const ge=Array.prototype.slice.call(arguments,0);return i(X,ge)},P=X=>function(ge){return s(X,ge)};let H={};for(const X of e){if(No(X)){H[X]=P(X);continue}if(wo(X)){H[X]=s(X,void 0);continue}H[X]=l(X)}return H}class _o{constructor(e,i){this._requestHandlerFactory=i,this._requestHandler=null,this._protocol=new zt({sendMessage:(s,l)=>{e(s,l)},handleMessage:(s,l)=>this._handleMessage(s,l),handleEvent:(s,l)=>this._handleEvent(s,l)})}onmessage(e){this._protocol.handleMessage(e)}_handleMessage(e,i){if(e===ct)return this.initialize(i[0],i[1],i[2],i[3]);if(!this._requestHandler||typeof this._requestHandler[e]!="function")return Promise.reject(new Error("Missing requestHandler or method: "+e));try{return Promise.resolve(this._requestHandler[e].apply(this._requestHandler,i))}catch(s){return Promise.reject(s)}}_handleEvent(e,i){if(!this._requestHandler)throw new Error("Missing requestHandler");if(No(e)){const s=this._requestHandler[e].call(this._requestHandler,i);if(typeof s!="function")throw new Error(`Missing dynamic event ${e} on request handler.`);return s}if(wo(e)){const s=this._requestHandler[e];if(typeof s!="function")throw new Error(`Missing event ${e} on request handler.`);return s}throw new Error(`Malformed event name ${e}`)}initialize(e,i,s,l){this._protocol.setWorkerId(e);const P=(ge,Ue)=>this._protocol.sendMessage(ge,Ue),H=(ge,Ue)=>this._protocol.listen(ge,Ue),X=di(l,P,H);return this._requestHandlerFactory?(this._requestHandler=this._requestHandlerFactory(X),Promise.resolve(xt.e(this._requestHandler))):(i&&(typeof i.baseUrl!="undefined"&&delete i.baseUrl,typeof i.paths!="undefined"&&(typeof i.paths.vs!="undefined"&&delete i.paths.vs),typeof i.trustedTypesPolicy!==void 0&&delete i.trustedTypesPolicy,i.catchError=!0,Vt.b.require.config(i)),new Promise((ge,Ue)=>{const st=Vt.b.require;st([s],Je=>{if(this._requestHandler=Je.create(X),!this._requestHandler){Ue(new Error("No RequestHandler!"));return}ge(xt.e(this._requestHandler))},Ue)}))}}function no(e){return new _o(e,null)}var _t;const Tt=(_t=window.trustedTypes)===null||_t===void 0?void 0:_t.createPolicy("defaultWorkerFactory",{createScriptURL:e=>e});function Nt(e,i){if(Vt.b.MonacoEnvironment){if(typeof Vt.b.MonacoEnvironment.getWorker=="function")return Vt.b.MonacoEnvironment.getWorker(e,i);if(typeof Vt.b.MonacoEnvironment.getWorkerUrl=="function"){const s=Vt.b.MonacoEnvironment.getWorkerUrl(e,i);return new Worker(Tt?Tt.createScriptURL(s):s,{name:i})}}throw new Error("You must define a function MonacoEnvironment.getWorkerUrl or MonacoEnvironment.getWorker")}function rt(e){return typeof e.then=="function"}class lt{constructor(e,i,s,l,P){this.id=i;const H=Nt("workerMain.js",s);rt(H)?this.worker=H:this.worker=Promise.resolve(H),this.postMessage(e,[]),this.worker.then(X=>{X.onmessage=function(ge){l(ge.data)},X.onmessageerror=P,typeof X.addEventListener=="function"&&X.addEventListener("error",P)})}getId(){return this.id}postMessage(e,i){this.worker&&this.worker.then(s=>s.postMessage(e,i))}dispose(){this.worker&&this.worker.then(e=>e.terminate()),this.worker=null}}class bt{constructor(e){this._label=e,this._webWorkerFailedBeforeError=!1}create(e,i,s){let l=++bt.LAST_WORKER_ID;if(this._webWorkerFailedBeforeError)throw this._webWorkerFailedBeforeError;return new lt(e,l,this._label||"anonymous"+l,i,P=>{Qe(P),this._webWorkerFailedBeforeError=P,s(P)})}}bt.LAST_WORKER_ID=0;var St=t("cMvZ"),Qt=t("Gw4z");const bo=3;function qt(e,i,s,l){const P=new Qt.a(e,i,s);return P.ComputeDiff(l)}class Eo{constructor(e){const i=[],s=[];for(let l=0,P=e.length;l<P;l++)i[l]=ri(e[l],1),s[l]=Zo(e[l],1);this.lines=e,this._startColumns=i,this._endColumns=s}getElements(){const e=[];for(let i=0,s=this.lines.length;i<s;i++)e[i]=this.lines[i].substring(this._startColumns[i]-1,this._endColumns[i]-1);return e}getStrictElement(e){return this.lines[e]}getStartLineNumber(e){return e+1}getEndLineNumber(e){return e+1}createCharSequence(e,i,s){const l=[],P=[],H=[];let X=0;for(let ge=i;ge<=s;ge++){const Ue=this.lines[ge],st=e?this._startColumns[ge]:1,Je=e?this._endColumns[ge]:Ue.length+1;for(let wt=st;wt<Je;wt++)l[X]=Ue.charCodeAt(wt-1),P[X]=ge+1,H[X]=wt,X++}return new Ro(l,P,H)}}class Ro{constructor(e,i,s){this._charCodes=e,this._lineNumbers=i,this._columns=s}getElements(){return this._charCodes}getStartLineNumber(e){return this._lineNumbers[e]}getStartColumn(e){return this._columns[e]}getEndLineNumber(e){return this._lineNumbers[e]}getEndColumn(e){return this._columns[e]+1}}class zo{constructor(e,i,s,l,P,H,X,ge){this.originalStartLineNumber=e,this.originalStartColumn=i,this.originalEndLineNumber=s,this.originalEndColumn=l,this.modifiedStartLineNumber=P,this.modifiedStartColumn=H,this.modifiedEndLineNumber=X,this.modifiedEndColumn=ge}static createFromDiffChange(e,i,s){let l,P,H,X,ge,Ue,st,Je;return e.originalLength===0?(l=0,P=0,H=0,X=0):(l=i.getStartLineNumber(e.originalStart),P=i.getStartColumn(e.originalStart),H=i.getEndLineNumber(e.originalStart+e.originalLength-1),X=i.getEndColumn(e.originalStart+e.originalLength-1)),e.modifiedLength===0?(ge=0,Ue=0,st=0,Je=0):(ge=s.getStartLineNumber(e.modifiedStart),Ue=s.getStartColumn(e.modifiedStart),st=s.getEndLineNumber(e.modifiedStart+e.modifiedLength-1),Je=s.getEndColumn(e.modifiedStart+e.modifiedLength-1)),new zo(l,P,H,X,ge,Ue,st,Je)}}function Bo(e){if(e.length<=1)return e;const i=[e[0]];let s=i[0];for(let l=1,P=e.length;l<P;l++){const H=e[l],X=H.originalStart-(s.originalStart+s.originalLength),ge=H.modifiedStart-(s.modifiedStart+s.modifiedLength),Ue=Math.min(X,ge);Ue<bo?(s.originalLength=H.originalStart+H.originalLength-s.originalStart,s.modifiedLength=H.modifiedStart+H.modifiedLength-s.modifiedStart):(i.push(H),s=H)}return i}class Jt{constructor(e,i,s,l,P){this.originalStartLineNumber=e,this.originalEndLineNumber=i,this.modifiedStartLineNumber=s,this.modifiedEndLineNumber=l,this.charChanges=P}static createFromDiffResult(e,i,s,l,P,H,X){let ge,Ue,st,Je,wt;if(i.originalLength===0?(ge=s.getStartLineNumber(i.originalStart)-1,Ue=0):(ge=s.getStartLineNumber(i.originalStart),Ue=s.getEndLineNumber(i.originalStart+i.originalLength-1)),i.modifiedLength===0?(st=l.getStartLineNumber(i.modifiedStart)-1,Je=0):(st=l.getStartLineNumber(i.modifiedStart),Je=l.getEndLineNumber(i.modifiedStart+i.modifiedLength-1)),H&&i.originalLength>0&&i.originalLength<20&&i.modifiedLength>0&&i.modifiedLength<20&&P()){const to=s.createCharSequence(e,i.originalStart,i.originalStart+i.originalLength-1),lo=l.createCharSequence(e,i.modifiedStart,i.modifiedStart+i.modifiedLength-1);let po=qt(to,lo,P,!0).changes;X&&(po=Bo(po)),wt=[];for(let Ho=0,Vo=po.length;Ho<Vo;Ho++)wt.push(zo.createFromDiffChange(po[Ho],to,lo))}return new Jt(ge,Ue,st,Je,wt)}}class fo{constructor(e,i,s){this.shouldComputeCharChanges=s.shouldComputeCharChanges,this.shouldPostProcessCharChanges=s.shouldPostProcessCharChanges,this.shouldIgnoreTrimWhitespace=s.shouldIgnoreTrimWhitespace,this.shouldMakePrettyDiff=s.shouldMakePrettyDiff,this.originalLines=e,this.modifiedLines=i,this.original=new Eo(e),this.modified=new Eo(i),this.continueLineDiff=ci(s.maxComputationTime),this.continueCharDiff=ci(s.maxComputationTime===0?0:Math.min(s.maxComputationTime,5e3))}computeDiff(){if(this.original.lines.length===1&&this.original.lines[0].length===0)return this.modified.lines.length===1&&this.modified.lines[0].length===0?{quitEarly:!1,changes:[]}:{quitEarly:!1,changes:[{originalStartLineNumber:1,originalEndLineNumber:1,modifiedStartLineNumber:1,modifiedEndLineNumber:this.modified.lines.length,charChanges:[{modifiedEndColumn:0,modifiedEndLineNumber:0,modifiedStartColumn:0,modifiedStartLineNumber:0,originalEndColumn:0,originalEndLineNumber:0,originalStartColumn:0,originalStartLineNumber:0}]}]};if(this.modified.lines.length===1&&this.modified.lines[0].length===0)return{quitEarly:!1,changes:[{originalStartLineNumber:1,originalEndLineNumber:this.original.lines.length,modifiedStartLineNumber:1,modifiedEndLineNumber:1,charChanges:[{modifiedEndColumn:0,modifiedEndLineNumber:0,modifiedStartColumn:0,modifiedStartLineNumber:0,originalEndColumn:0,originalEndLineNumber:0,originalStartColumn:0,originalStartLineNumber:0}]}]};const e=qt(this.original,this.modified,this.continueLineDiff,this.shouldMakePrettyDiff),i=e.changes,s=e.quitEarly;if(this.shouldIgnoreTrimWhitespace){const X=[];for(let ge=0,Ue=i.length;ge<Ue;ge++)X.push(Jt.createFromDiffResult(this.shouldIgnoreTrimWhitespace,i[ge],this.original,this.modified,this.continueCharDiff,this.shouldComputeCharChanges,this.shouldPostProcessCharChanges));return{quitEarly:s,changes:X}}const l=[];let P=0,H=0;for(let X=-1,ge=i.length;X<ge;X++){const Ue=X+1<ge?i[X+1]:null,st=Ue?Ue.originalStart:this.originalLines.length,Je=Ue?Ue.modifiedStart:this.modifiedLines.length;for(;P<st&&H<Je;){const wt=this.originalLines[P],to=this.modifiedLines[H];if(wt!==to){{let lo=ri(wt,1),po=ri(to,1);for(;lo>1&&po>1;){const Ho=wt.charCodeAt(lo-2),Vo=to.charCodeAt(po-2);if(Ho!==Vo)break;lo--,po--}(lo>1||po>1)&&this._pushTrimWhitespaceCharChange(l,P+1,1,lo,H+1,1,po)}{let lo=Zo(wt,1),po=Zo(to,1);const Ho=wt.length+1,Vo=to.length+1;for(;lo<Ho&&po<Vo;){const ii=wt.charCodeAt(lo-1),Jo=wt.charCodeAt(po-1);if(ii!==Jo)break;lo++,po++}(lo<Ho||po<Vo)&&this._pushTrimWhitespaceCharChange(l,P+1,lo,Ho,H+1,po,Vo)}}P++,H++}Ue&&(l.push(Jt.createFromDiffResult(this.shouldIgnoreTrimWhitespace,Ue,this.original,this.modified,this.continueCharDiff,this.shouldComputeCharChanges,this.shouldPostProcessCharChanges)),P+=Ue.originalLength,H+=Ue.modifiedLength)}return{quitEarly:s,changes:l}}_pushTrimWhitespaceCharChange(e,i,s,l,P,H,X){if(this._mergeTrimWhitespaceCharChange(e,i,s,l,P,H,X))return;let ge;this.shouldComputeCharChanges&&(ge=[new zo(i,s,i,l,P,H,P,X)]),e.push(new Jt(i,i,P,P,ge))}_mergeTrimWhitespaceCharChange(e,i,s,l,P,H,X){const ge=e.length;if(ge===0)return!1;const Ue=e[ge-1];return Ue.originalEndLineNumber===0||Ue.modifiedEndLineNumber===0?!1:Ue.originalEndLineNumber+1===i&&Ue.modifiedEndLineNumber+1===P?(Ue.originalEndLineNumber=i,Ue.modifiedEndLineNumber=P,this.shouldComputeCharChanges&&Ue.charChanges&&Ue.charChanges.push(new zo(i,s,i,l,P,H,P,X)),!0):!1}}function ri(e,i){const s=ze.u(e);return s===-1?i:s+1}function Zo(e,i){const s=ze.I(e);return s===-1?i:s+2}function ci(e){if(e===0)return()=>!0;const i=Date.now();return()=>Date.now()-i<e}var ki=t("LeU+");class wi{constructor(e,i,s,l){this._uri=e,this._lines=i,this._eol=s,this._versionId=l,this._lineStarts=null,this._cachedTextValue=null}dispose(){this._lines.length=0}get version(){return this._versionId}getText(){return this._cachedTextValue===null&&(this._cachedTextValue=this._lines.join(this._eol)),this._cachedTextValue}onEvents(e){e.eol&&e.eol!==this._eol&&(this._eol=e.eol,this._lineStarts=null);const i=e.changes;for(const s of i)this._acceptDeleteRange(s.range),this._acceptInsertText(new j.a(s.range.startLineNumber,s.range.startColumn),s.text);this._versionId=e.versionId,this._cachedTextValue=null}_ensureLineStarts(){if(!this._lineStarts){const e=this._eol.length,i=this._lines.length,s=new Uint32Array(i);for(let l=0;l<i;l++)s[l]=this._lines[l].length+e;this._lineStarts=new ki.a(s)}}_setLineText(e,i){this._lines[e]=i,this._lineStarts&&this._lineStarts.changeValue(e,this._lines[e].length+this._eol.length)}_acceptDeleteRange(e){if(e.startLineNumber===e.endLineNumber){if(e.startColumn===e.endColumn)return;this._setLineText(e.startLineNumber-1,this._lines[e.startLineNumber-1].substring(0,e.startColumn-1)+this._lines[e.startLineNumber-1].substring(e.endColumn-1));return}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)}_acceptInsertText(e,i){if(i.length===0)return;let s=Object(ze.Q)(i);if(s.length===1){this._setLineText(e.lineNumber-1,this._lines[e.lineNumber-1].substring(0,e.column-1)+s[0]+this._lines[e.lineNumber-1].substring(e.column-1));return}s[s.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)+s[0]);let l=new Uint32Array(s.length-1);for(let P=1;P<s.length;P++)this._lines.splice(e.lineNumber+P-1,0,s[P]),l[P-1]=s[P].length+this._eol.length;this._lineStarts&&this._lineStarts.insertValues(e.lineNumber,l)}}var Zi=t("0JNc"),Vi=t("MXAL");class vi{constructor(e,i,s){const l=new Uint8Array(e*i);for(let P=0,H=e*i;P<H;P++)l[P]=s;this._data=l,this.rows=e,this.cols=i}get(e,i){return this._data[e*this.cols+i]}set(e,i,s){this._data[e*this.cols+i]=s}}class sn{constructor(e){let i=0,s=0;for(let P=0,H=e.length;P<H;P++){let[X,ge,Ue]=e[P];ge>i&&(i=ge),X>s&&(s=X),Ue>s&&(s=Ue)}i++,s++;let l=new vi(s,i,0);for(let P=0,H=e.length;P<H;P++){let[X,ge,Ue]=e[P];l.set(X,ge,Ue)}this._states=l,this._maxCharCode=i}nextState(e,i){return i<0||i>=this._maxCharCode?0:this._states.get(e,i)}}let en=null;function on(){return en===null&&(en=new sn([[1,104,2],[1,72,2],[1,102,6],[1,70,6],[2,116,3],[2,84,3],[3,116,4],[3,84,4],[4,112,5],[4,80,5],[5,115,9],[5,83,9],[5,58,10],[6,105,7],[6,73,7],[7,108,8],[7,76,8],[8,101,9],[8,69,9],[9,58,10],[10,47,11],[11,47,12]])),en}let cn=null;function Bi(){if(cn===null){cn=new Vi.a(0);const e=` <>'"\u3001\u3002\uFF61\uFF64\uFF0C\uFF0E\uFF1A\uFF1B\u2018\u3008\u300C\u300E\u3014\uFF08\uFF3B\uFF5B\uFF62\uFF63\uFF5D\uFF3D\uFF09\u3015\u300F\u300D\u3009\u2019\uFF40\uFF5E\u2026`;for(let s=0;s<e.length;s++)cn.set(e.charCodeAt(s),1);const i=".,;";for(let s=0;s<i.length;s++)cn.set(i.charCodeAt(s),2)}return cn}class zi{static _createLink(e,i,s,l,P){let H=P-1;do{const X=i.charCodeAt(H),ge=e.get(X);if(ge!==2)break;H--}while(H>l);if(l>0){const X=i.charCodeAt(l-1),ge=i.charCodeAt(H);(X===40&&ge===41||X===91&&ge===93||X===123&&ge===125)&&H--}return{range:{startLineNumber:s,startColumn:l+1,endLineNumber:s,endColumn:H+2},url:i.substring(l,H+1)}}static computeLinks(e,i=on()){const s=Bi();let l=[];for(let P=1,H=e.getLineCount();P<=H;P++){const X=e.getLineContent(P),ge=X.length;let Ue=0,st=0,Je=0,wt=1,to=!1,lo=!1,po=!1,Ho=!1;for(;Ue<ge;){let Vo=!1;const ii=X.charCodeAt(Ue);if(wt===13){let Jo;switch(ii){case 40:to=!0,Jo=0;break;case 41:Jo=to?0:1;break;case 91:po=!0,lo=!0,Jo=0;break;case 93:po=!1,Jo=lo?0:1;break;case 123:Ho=!0,Jo=0;break;case 125:Jo=Ho?0:1;break;case 39:Jo=Je===34||Je===96?0:1;break;case 34:Jo=Je===39||Je===96?0:1;break;case 96:Jo=Je===39||Je===34?0:1;break;case 42:Jo=Je===42?1:0;break;case 124:Jo=Je===124?1:0;break;case 32:Jo=po?0:1;break;default:Jo=s.get(ii)}Jo===1&&(l.push(zi._createLink(s,X,P,st,Ue)),Vo=!0)}else if(wt===12){let Jo;ii===91?(lo=!0,Jo=0):Jo=s.get(ii),Jo===1?Vo=!0:wt=13}else wt=i.nextState(wt,ii),wt===0&&(Vo=!0);Vo&&(wt=1,to=!1,lo=!1,Ho=!1,st=Ue+1,Je=ii),Ue++}wt===13&&l.push(zi._createLink(s,X,P,st,ge))}return l}}function Ji(e){return!e||typeof e.getLineCount!="function"||typeof e.getLineContent!="function"?[]:zi.computeLinks(e)}class ui{constructor(){this._defaultValueSet=[["true","false"],["True","False"],["Private","Public","Friend","ReadOnly","Partial","Protected","WriteOnly"],["public","protected","private"]]}navigateValueSet(e,i,s,l,P){if(e&&i){let H=this.doNavigateValueSet(i,P);if(H)return{range:e,value:H}}if(s&&l){let H=this.doNavigateValueSet(l,P);if(H)return{range:s,value:H}}return null}doNavigateValueSet(e,i){let s=this.numberReplace(e,i);return s!==null?s:this.textReplace(e,i)}numberReplace(e,i){let s=Math.pow(10,e.length-(e.lastIndexOf(".")+1)),l=Number(e),P=parseFloat(e);return!isNaN(l)&&!isNaN(P)&&l===P?l===0&&!i?null:(l=Math.floor(l*s),l+=i?s:-s,String(l/s)):null}textReplace(e,i){return this.valueSetsReplace(this._defaultValueSet,e,i)}valueSetsReplace(e,i,s){let l=null;for(let P=0,H=e.length;l===null&&P<H;P++)l=this.valueSetReplace(e[P],i,s);return l}valueSetReplace(e,i,s){let l=e.indexOf(i);return l>=0?(l+=s?1:-1,l<0?l=e.length-1:l%=e.length,e[l]):null}}ui.INSTANCE=new ui;var pn=t("5Y4S"),Hi=function(e,i,s,l){function P(H){return H instanceof s?H:new s(function(X){X(H)})}return new(s||(s=Promise))(function(H,X){function ge(Je){try{st(l.next(Je))}catch(wt){X(wt)}}function Ue(Je){try{st(l.throw(Je))}catch(wt){X(wt)}}function st(Je){Je.done?H(Je.value):P(Je.value).then(ge,Ue)}st((l=l.apply(e,i||[])).next())})};class Oi extends wi{get uri(){return this._uri}get eol(){return this._eol}getValue(){return this.getText()}getLinesContent(){return this._lines.slice(0)}getLineCount(){return this._lines.length}getLineContent(e){return this._lines[e-1]}getWordAtPosition(e,i){let s=Object(Zi.d)(e.column,Object(Zi.c)(i),this._lines[e.lineNumber-1],0);return s?new I.a(e.lineNumber,s.startColumn,e.lineNumber,s.endColumn):null}words(e){const i=this._lines,s=this._wordenize.bind(this);let l=0,P="",H=0,X=[];return{*[Symbol.iterator](){for(;;)if(H<X.length){const ge=P.substring(X[H].start,X[H].end);H+=1,yield ge}else if(l<i.length)P=i[l],X=s(P,e),H=0,l+=1;else break}}}getLineWords(e,i){let s=this._lines[e-1],l=this._wordenize(s,i),P=[];for(const H of l)P.push({word:s.substring(H.start,H.end),startColumn:H.start+1,endColumn:H.end+1});return P}_wordenize(e,i){const s=[];let l;for(i.lastIndex=0;(l=i.exec(e))&&!(l[0].length===0);)s.push({start:l.index,end:l.index+l[0].length});return s}getValueInRange(e){if(e=this._validateRange(e),e.startLineNumber===e.endLineNumber)return this._lines[e.startLineNumber-1].substring(e.startColumn-1,e.endColumn-1);let i=this._eol,s=e.startLineNumber-1,l=e.endLineNumber-1,P=[];P.push(this._lines[s].substring(e.startColumn-1));for(let H=s+1;H<l;H++)P.push(this._lines[H]);return P.push(this._lines[l].substring(0,e.endColumn-1)),P.join(i)}offsetAt(e){return e=this._validatePosition(e),this._ensureLineStarts(),this._lineStarts.getPrefixSum(e.lineNumber-2)+(e.column-1)}positionAt(e){e=Math.floor(e),e=Math.max(0,e),this._ensureLineStarts();let i=this._lineStarts.getIndexOf(e),s=this._lines[i.index].length;return{lineNumber:1+i.index,column:1+Math.min(i.remainder,s)}}_validateRange(e){const i=this._validatePosition({lineNumber:e.startLineNumber,column:e.startColumn}),s=this._validatePosition({lineNumber:e.endLineNumber,column:e.endColumn});return i.lineNumber!==e.startLineNumber||i.column!==e.startColumn||s.lineNumber!==e.endLineNumber||s.column!==e.endColumn?{startLineNumber:i.lineNumber,startColumn:i.column,endLineNumber:s.lineNumber,endColumn:s.column}:e}_validatePosition(e){if(!j.a.isIPosition(e))throw new Error("bad position");let{lineNumber:i,column:s}=e,l=!1;if(i<1)i=1,s=1,l=!0;else if(i>this._lines.length)i=this._lines.length,s=this._lines[i-1].length+1,l=!0;else{let P=this._lines[i-1].length+1;s<1?(s=1,l=!0):s>P&&(s=P,l=!0)}return l?{lineNumber:i,column:s}:e}}class Ii{constructor(e,i){this._host=e,this._models=Object.create(null),this._foreignModuleFactory=i,this._foreignModule=null}dispose(){this._models=Object.create(null)}_getModel(e){return this._models[e]}_getModels(){let e=[];return Object.keys(this._models).forEach(i=>e.push(this._models[i])),e}acceptNewModel(e){this._models[e.url]=new Oi(A.a.parse(e.url),e.lines,e.EOL,e.versionId)}acceptModelChanged(e,i){if(!this._models[e])return;let s=this._models[e];s.onEvents(i)}acceptRemovedModel(e){if(!this._models[e])return;delete this._models[e]}computeDiff(e,i,s,l){return Hi(this,void 0,void 0,function*(){const P=this._getModel(e),H=this._getModel(i);if(!P||!H)return null;const X=P.getLinesContent(),ge=H.getLinesContent(),Ue=new fo(X,ge,{shouldComputeCharChanges:!0,shouldPostProcessCharChanges:!0,shouldIgnoreTrimWhitespace:s,shouldMakePrettyDiff:!0,maxComputationTime:l}),st=Ue.computeDiff(),Je=st.changes.length>0?!1:this._modelsAreIdentical(P,H);return{quitEarly:st.quitEarly,identical:Je,changes:st.changes}})}_modelsAreIdentical(e,i){const s=e.getLineCount(),l=i.getLineCount();if(s!==l)return!1;for(let P=1;P<=s;P++){const H=e.getLineContent(P),X=i.getLineContent(P);if(H!==X)return!1}return!0}computeMoreMinimalEdits(e,i){return Hi(this,void 0,void 0,function*(){const s=this._getModel(e);if(!s)return i;const l=[];let P;i=i.slice(0).sort((H,X)=>{if(H.range&&X.range)return I.a.compareRangesUsingStarts(H.range,X.range);let ge=H.range?0:1,Ue=X.range?0:1;return ge-Ue});for(let{range:H,text:X,eol:ge}of i){if(typeof ge=="number"&&(P=ge),I.a.isEmpty(H)&&!X)continue;const Ue=s.getValueInRange(H);if(X=X.replace(/\r\n|\n|\r/g,s.eol),Ue===X)continue;if(Math.max(X.length,Ue.length)>Ii._diffLimit){l.push({range:H,text:X});continue}const st=Object(Qt.b)(Ue,X,!1),Je=s.offsetAt(I.a.lift(H).getStartPosition());for(const wt of st){const to=s.positionAt(Je+wt.originalStart),lo=s.positionAt(Je+wt.originalStart+wt.originalLength),po={text:X.substr(wt.modifiedStart,wt.modifiedLength),range:{startLineNumber:to.lineNumber,startColumn:to.column,endLineNumber:lo.lineNumber,endColumn:lo.column}};s.getValueInRange(po.range)!==po.text&&l.push(po)}}return typeof P=="number"&&l.push({eol:P,text:"",range:{startLineNumber:0,startColumn:0,endLineNumber:0,endColumn:0}}),l})}computeLinks(e){return Hi(this,void 0,void 0,function*(){let i=this._getModel(e);return i?Ji(i):null})}textualSuggest(e,i,s,l){return Hi(this,void 0,void 0,function*(){const P=new pn.a(!0),H=new RegExp(s,l),X=new Set;e:for(let ge of e){const Ue=this._getModel(ge);if(!Ue)continue;for(let st of Ue.words(H)){if(st===i||!isNaN(Number(st)))continue;if(X.add(st),X.size>Ii._suggestionsLimit)break e}}return{words:Array.from(X),duration:P.elapsed()}})}computeWordRanges(e,i,s,l){return Hi(this,void 0,void 0,function*(){let P=this._getModel(e);if(!P)return Object.create(null);const H=new RegExp(s,l),X=Object.create(null);for(let ge=i.startLineNumber;ge<i.endLineNumber;ge++){let Ue=P.getLineWords(ge,H);for(const st of Ue){if(!isNaN(Number(st.word)))continue;let Je=X[st.word];Je||(Je=[],X[st.word]=Je),Je.push({startLineNumber:ge,startColumn:st.startColumn,endLineNumber:ge,endColumn:st.endColumn})}}return X})}navigateValueSet(e,i,s,l,P){return Hi(this,void 0,void 0,function*(){let H=this._getModel(e);if(!H)return null;let X=new RegExp(l,P);i.startColumn===i.endColumn&&(i={startLineNumber:i.startLineNumber,startColumn:i.startColumn,endLineNumber:i.endLineNumber,endColumn:i.endColumn+1});let ge=H.getValueInRange(i),Ue=H.getWordAtPosition({lineNumber:i.startLineNumber,column:i.startColumn},X);if(!Ue)return null;let st=H.getValueInRange(Ue),Je=ui.INSTANCE.navigateValueSet(i,ge,Ue,st,s);return Je})}loadForeignModule(e,i,s){const l=(X,ge)=>this._host.fhr(X,ge),P=xt.d(s,l);let H={host:P,getMirrorModels:()=>this._getModels()};return this._foreignModuleFactory?(this._foreignModule=this._foreignModuleFactory(H,i),Promise.resolve(xt.e(this._foreignModule))):Promise.reject(new Error("Unexpected usage"))}fmr(e,i){if(!this._foreignModule||typeof this._foreignModule[e]!="function")return Promise.reject(new Error("Missing requestHandler or method: "+e));try{return Promise.resolve(this._foreignModule[e].apply(this._foreignModule,i))}catch(s){return Promise.reject(s)}}}Ii._diffLimit=1e5,Ii._suggestionsLimit=1e4;function Qi(e){return new Ii(e,null)}typeof importScripts=="function"&&(Vt.b.monaco=fe());var Li=t("G2kB"),Ui=t("e0rL"),fi=t("6OMU"),$i=t("09fa"),rn=function(e,i,s,l){var P=arguments.length,H=P<3?i:l===null?l=Object.getOwnPropertyDescriptor(i,s):l,X;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")H=Reflect.decorate(e,i,s,l);else for(var ge=e.length-1;ge>=0;ge--)(X=e[ge])&&(H=(P<3?X(H):P>3?X(i,s,H):X(i,s))||H);return P>3&&H&&Object.defineProperty(i,s,H),H},_i=function(e,i){return function(s,l){i(s,l,e)}},Pi=function(e,i,s,l){function P(H){return H instanceof s?H:new s(function(X){X(H)})}return new(s||(s=Promise))(function(H,X){function ge(Je){try{st(l.next(Je))}catch(wt){X(wt)}}function Ue(Je){try{st(l.throw(Je))}catch(wt){X(wt)}}function st(Je){Je.done?H(Je.value):P(Je.value).then(ge,Ue)}st((l=l.apply(e,i||[])).next())})};const gt=60*1e3,Ge=5*60*1e3;function $(e,i){let s=e.getModel(i);return s?!s.isTooLargeForSyncing():!1}let Ee=class extends $e.a{constructor(i,s,l){super();this._modelService=i,this._workerManager=this._register(new He(this._modelService)),this._logService=l,this._register(Rt.u.register({language:"*",hasAccessToAllModels:!0},{provideLinks:(P,H)=>$(this._modelService,P.uri)?this._workerManager.withWorker().then(X=>X.computeLinks(P.uri)).then(X=>X&&{links:X}):Promise.resolve({links:[]})})),this._register(Rt.d.register("*",new Ne(this._workerManager,s,this._modelService)))}dispose(){super.dispose()}computeDiff(i,s,l,P){return this._workerManager.withWorker().then(H=>H.computeDiff(i,s,l,P))}computeMoreMinimalEdits(i,s){if(Object(fi.n)(s)){if(!$(this._modelService,i))return Promise.resolve(s);const l=pn.a.create(!0),P=this._workerManager.withWorker().then(H=>H.computeMoreMinimalEdits(i,s));return P.finally(()=>this._logService.trace("FORMAT#computeMoreMinimalEdits",i.toString(!0),l.elapsed())),Promise.race([P,Object(Lo.n)(1e3).then(()=>s)])}else return Promise.resolve(void 0)}canNavigateValueSet(i){return $(this._modelService,i)}navigateValueSet(i,s,l){return this._workerManager.withWorker().then(P=>P.navigateValueSet(i,s,l))}canComputeWordRanges(i){return $(this._modelService,i)}computeWordRanges(i,s){return this._workerManager.withWorker().then(l=>l.computeWordRanges(i,s))}};Ee=rn([_i(0,Li.a),_i(1,Ui.a),_i(2,$i.b)],Ee);class Ne{constructor(e,i,s){this._debugDisplayName="wordbasedCompletions",this._workerManager=e,this._configurationService=i,this._modelService=s}provideCompletionItems(e,i){return Pi(this,void 0,void 0,function*(){const s=this._configurationService.getValue(e.uri,i,"editor");if(!s.wordBasedSuggestions)return;const l=[];if(s.wordBasedSuggestionsMode==="currentDocument")$(this._modelService,e.uri)&&l.push(e.uri);else for(const Je of this._modelService.getModels()){if(!$(this._modelService,Je.uri))continue;Je===e?l.unshift(Je.uri):(s.wordBasedSuggestionsMode==="allDocuments"||Je.getLanguageId()===e.getLanguageId())&&l.push(Je.uri)}if(l.length===0)return;const P=St.b.getWordDefinition(e.getLanguageId()),H=e.getWordAtPosition(i),X=H?new I.a(i.lineNumber,H.startColumn,i.lineNumber,H.endColumn):I.a.fromPositions(i),ge=X.setEndPosition(i.lineNumber,i.column),Ue=yield this._workerManager.withWorker(),st=yield Ue.textualSuggest(l,H==null?void 0:H.word,P);return st?{duration:st.duration,suggestions:st.words.map(Je=>({kind:18,label:Je,insertText:Je,range:{insert:ge,replace:X}}))}:void 0})}}class He extends $e.a{constructor(e){super();this._modelService=e,this._editorWorkerClient=null,this._lastWorkerUsedTime=new Date().getTime();let i=this._register(new Lo.c);i.cancelAndSet(()=>this._checkStopIdleWorker(),Math.round(Ge/2)),this._register(this._modelService.onModelRemoved(s=>this._checkStopEmptyWorker()))}dispose(){this._editorWorkerClient&&(this._editorWorkerClient.dispose(),this._editorWorkerClient=null),super.dispose()}_checkStopEmptyWorker(){if(!this._editorWorkerClient)return;let e=this._modelService.getModels();e.length===0&&(this._editorWorkerClient.dispose(),this._editorWorkerClient=null)}_checkStopIdleWorker(){if(!this._editorWorkerClient)return;let e=new Date().getTime()-this._lastWorkerUsedTime;e>Ge&&(this._editorWorkerClient.dispose(),this._editorWorkerClient=null)}withWorker(){return this._lastWorkerUsedTime=new Date().getTime(),this._editorWorkerClient||(this._editorWorkerClient=new Bt(this._modelService,!1,"editorWorkerService")),Promise.resolve(this._editorWorkerClient)}}class at extends $e.a{constructor(e,i,s){super();if(this._syncedModels=Object.create(null),this._syncedModelsLastUsedTime=Object.create(null),this._proxy=e,this._modelService=i,!s){let l=new Lo.c;l.cancelAndSet(()=>this._checkStopModelSync(),Math.round(gt/2)),this._register(l)}}dispose(){for(let e in this._syncedModels)Object($e.f)(this._syncedModels[e]);this._syncedModels=Object.create(null),this._syncedModelsLastUsedTime=Object.create(null),super.dispose()}ensureSyncedResources(e,i){for(const s of e){let l=s.toString();this._syncedModels[l]||this._beginModelSync(s,i),this._syncedModels[l]&&(this._syncedModelsLastUsedTime[l]=new Date().getTime())}}_checkStopModelSync(){let e=new Date().getTime(),i=[];for(let s in this._syncedModelsLastUsedTime){let l=e-this._syncedModelsLastUsedTime[s];l>gt&&i.push(s)}for(const s of i)this._stopModelSync(s)}_beginModelSync(e,i){let s=this._modelService.getModel(e);if(!s)return;if(!i&&s.isTooLargeForSyncing())return;let l=e.toString();this._proxy.acceptNewModel({url:s.uri.toString(),lines:s.getLinesContent(),EOL:s.getEOL(),versionId:s.getVersionId()});const P=new $e.b;P.add(s.onDidChangeContent(H=>{this._proxy.acceptModelChanged(l.toString(),H)})),P.add(s.onWillDispose(()=>{this._stopModelSync(l)})),P.add(Object($e.i)(()=>{this._proxy.acceptRemovedModel(l)})),this._syncedModels[l]=P}_stopModelSync(e){let i=this._syncedModels[e];delete this._syncedModels[e],delete this._syncedModelsLastUsedTime[e],Object($e.f)(i)}}class vt{constructor(e){this._instance=e,this._proxyObj=Promise.resolve(this._instance)}dispose(){this._instance.dispose()}getProxyObject(){return this._proxyObj}}class Xt{constructor(e){this._workerClient=e}fhr(e,i){return this._workerClient.fhr(e,i)}}class Bt extends $e.a{constructor(e,i,s){super();this._disposed=!1,this._modelService=e,this._keepIdleModels=i,this._workerFactory=new bt(s),this._worker=null,this._modelManager=null}fhr(e,i){throw new Error("Not implemented!")}_getOrCreateWorker(){if(!this._worker)try{this._worker=this._register(new so(this._workerFactory,"vs/editor/common/services/editorSimpleWorker",new Xt(this)))}catch(e){Qe(e),this._worker=new vt(new Ii(new Xt(this),null))}return this._worker}_getProxy(){return this._getOrCreateWorker().getProxyObject().then(void 0,e=>(Qe(e),this._worker=new vt(new Ii(new Xt(this),null)),this._getOrCreateWorker().getProxyObject()))}_getOrCreateModelManager(e){return this._modelManager||(this._modelManager=this._register(new at(e,this._modelService,this._keepIdleModels))),this._modelManager}_withSyncedResources(e,i=!1){return Pi(this,void 0,void 0,function*(){return this._disposed?Promise.reject(Object(To.b)()):this._getProxy().then(s=>(this._getOrCreateModelManager(s).ensureSyncedResources(e,i),s))})}computeDiff(e,i,s,l){return this._withSyncedResources([e,i],!0).then(P=>P.computeDiff(e.toString(),i.toString(),s,l))}computeMoreMinimalEdits(e,i){return this._withSyncedResources([e]).then(s=>s.computeMoreMinimalEdits(e.toString(),i))}computeLinks(e){return this._withSyncedResources([e]).then(i=>i.computeLinks(e.toString()))}textualSuggest(e,i,s){return Pi(this,void 0,void 0,function*(){const l=yield this._withSyncedResources(e),P=s.source,H=Object(ze.M)(s);return l.textualSuggest(e.map(X=>X.toString()),i,P,H)})}computeWordRanges(e,i){return this._withSyncedResources([e]).then(s=>{let l=this._modelService.getModel(e);if(!l)return Promise.resolve(null);let P=St.b.getWordDefinition(l.getLanguageId()),H=P.source,X=Object(ze.M)(P);return s.computeWordRanges(e.toString(),i,H,X)})}navigateValueSet(e,i,s){return this._withSyncedResources([e]).then(l=>{let P=this._modelService.getModel(e);if(!P)return null;let H=St.b.getWordDefinition(P.getLanguageId()),X=H.source,ge=Object(ze.M)(H);return l.navigateValueSet(e.toString(),i,s,X,ge)})}dispose(){super.dispose(),this._disposed=!0}}function Kt(e,i){return new ro(e,i)}class ro extends Bt{constructor(e,i){super(e,i.keepIdleModels||!1,i.label);this._foreignModuleId=i.moduleId,this._foreignModuleCreateData=i.createData||null,this._foreignModuleHost=i.host||null,this._foreignProxy=null}fhr(e,i){if(!this._foreignModuleHost||typeof this._foreignModuleHost[e]!="function")return Promise.reject(new Error("Missing method "+e+" or missing main thread foreign host."));try{return Promise.resolve(this._foreignModuleHost[e].apply(this._foreignModuleHost,i))}catch(s){return Promise.reject(s)}}_getForeignProxy(){return this._foreignProxy||(this._foreignProxy=this._getProxy().then(e=>{const i=this._foreignModuleHost?xt.e(this._foreignModuleHost):[];return e.loadForeignModule(this._foreignModuleId,this._foreignModuleCreateData,i).then(s=>{this._foreignModuleCreateData=null;const l=(X,ge)=>e.fmr(X,ge),P=(X,ge)=>function(){const Ue=Array.prototype.slice.call(arguments,0);return ge(X,Ue)};let H={};for(const X of s)H[X]=P(X,l);return H})})),this._foreignProxy}getProxy(){return this._getForeignProxy()}withSyncedResources(e){return this._withSyncedResources(e).then(i=>this.getProxy())}}var F=t("4bUh"),te=t("baJR"),Ae=t("qNAo");function Ye(e){return Array.isArray(e)}function pt(e){return!Ye(e)}function Mt(e){return typeof e=="string"}function jt(e){return!Mt(e)}function $t(e){return!e}function uo(e,i){return e.ignoreCase&&i?i.toLowerCase():i}function io(e){return e.replace(/[&<>'"_]/g,"-")}function ho(e,i){console.log(`${e.languageId}: ${i}`)}function mo(e,i){return new Error(`${e.languageId}: ${i}`)}function Io(e,i,s,l,P){const H=/\$((\$)|(#)|(\d\d?)|[sS](\d\d?)|@(\w+))/g;let X=null;return i.replace(H,function(ge,Ue,st,Je,wt,to,lo,po,Ho){return $t(st)?$t(Je)?!$t(wt)&&wt<l.length?uo(e,l[wt]):!$t(lo)&&e&&typeof e[lo]=="string"?e[lo]:(X===null&&(X=P.split("."),X.unshift(P)),!$t(to)&&to<X.length?uo(e,X[to]):""):uo(e,s):"$"})}function Ao(e,i){let s=i;for(;s&&s.length>0;){const l=e.tokenizer[s];if(l)return l;const P=s.lastIndexOf(".");P<0?s=null:s=s.substr(0,P)}return null}function Oo(e,i){let s=i;for(;s&&s.length>0;){const l=e.stateNames[s];if(l)return!0;const P=s.lastIndexOf(".");P<0?s=null:s=s.substr(0,P)}return!1}const Wo=5;class si{constructor(e){this._maxCacheDepth=e,this._entries=Object.create(null)}static create(e,i){return this._INSTANCE.create(e,i)}create(e,i){if(e!==null&&e.depth>=this._maxCacheDepth)return new hi(e,i);let s=hi.getStackElementId(e);s.length>0&&(s+="|"),s+=i;let l=this._entries[s];return l||(l=new hi(e,i),this._entries[s]=l,l)}}si._INSTANCE=new si(Wo);class hi{constructor(e,i){this.parent=e,this.state=i,this.depth=(this.parent?this.parent.depth:0)+1}static getStackElementId(e){let i="";for(;e!==null;)i.length>0&&(i+="|"),i+=e.state,e=e.parent;return i}static _equals(e,i){for(;e!==null&&i!==null;){if(e===i)return!0;if(e.state!==i.state)return!1;e=e.parent,i=i.parent}return e===null&&i===null}equals(e){return hi._equals(this,e)}push(e){return si.create(this,e)}pop(){return this.parent}popall(){let e=this;for(;e.parent;)e=e.parent;return e}switchTo(e){return si.create(this.parent,e)}}class Uo{constructor(e,i){this.languageId=e,this.state=i}equals(e){return this.languageId===e.languageId&&this.state.equals(e.state)}clone(){let e=this.state.clone();return e===this.state?this:new Uo(this.languageId,this.state)}}class mi{constructor(e){this._maxCacheDepth=e,this._entries=Object.create(null)}static create(e,i){return this._INSTANCE.create(e,i)}create(e,i){if(i!==null)return new Ri(e,i);if(e!==null&&e.depth>=this._maxCacheDepth)return new Ri(e,i);let s=hi.getStackElementId(e),l=this._entries[s];return l||(l=new Ri(e,null),this._entries[s]=l,l)}}mi._INSTANCE=new mi(Wo);class Ri{constructor(e,i){this.stack=e,this.embeddedModeData=i}clone(){let e=this.embeddedModeData?this.embeddedModeData.clone():null;return e===this.embeddedModeData?this:mi.create(this.stack,this.embeddedModeData)}equals(e){return e instanceof Ri&&this.stack.equals(e.stack)?this.embeddedModeData===null&&e.embeddedModeData===null?!0:this.embeddedModeData===null||e.embeddedModeData===null?!1:this.embeddedModeData.equals(e.embeddedModeData):!1}}class Di{constructor(){this._tokens=[],this._languageId=null,this._lastTokenType=null,this._lastTokenLanguage=null}enterMode(e,i){this._languageId=i}emit(e,i){if(this._lastTokenType===i&&this._lastTokenLanguage===this._languageId)return;this._lastTokenType=i,this._lastTokenLanguage=this._languageId,this._tokens.push(new C.a(e,i,this._languageId))}nestedModeTokenize(e,i,s,l){const P=s.languageId,H=s.state,X=Rt.E.get(P);if(!X)return this.enterMode(l,P),this.emit(l,""),H;let ge=X.tokenize(e,i,H,l);return this._tokens=this._tokens.concat(ge.tokens),this._lastTokenType=null,this._lastTokenLanguage=null,this._languageId=null,ge.endState}finalize(e){return new C.b(this._tokens,e)}}class pi{constructor(e,i){this._modeService=e,this._theme=i,this._prependTokens=null,this._tokens=[],this._currentLanguageId=0,this._lastTokenMetadata=0}enterMode(e,i){this._currentLanguageId=this._modeService.languageIdCodec.encodeLanguageId(i)}emit(e,i){let s=this._theme.match(this._currentLanguageId,i);if(this._lastTokenMetadata===s)return;this._lastTokenMetadata=s,this._tokens.push(e),this._tokens.push(s)}static _merge(e,i,s){let l=e!==null?e.length:0,P=i.length,H=s!==null?s.length:0;if(l===0&&P===0&&H===0)return new Uint32Array(0);if(l===0&&P===0)return s;if(P===0&&H===0)return e;let X=new Uint32Array(l+P+H);e!==null&&X.set(e);for(let ge=0;ge<P;ge++)X[l+ge]=i[ge];return s!==null&&X.set(s,l+P),X}nestedModeTokenize(e,i,s,l){const P=s.languageId,H=s.state,X=Rt.E.get(P);if(!X)return this.enterMode(l,P),this.emit(l,""),H;let ge=X.tokenize2(e,i,H,l);return this._prependTokens=pi._merge(this._prependTokens,this._tokens,ge.tokens),this._tokens=[],this._currentLanguageId=0,this._lastTokenMetadata=0,ge.endState}finalize(e){return new C.c(pi._merge(this._prependTokens,this._tokens,null),e)}}class Wi{constructor(e,i,s,l){this._modeService=e,this._standaloneThemeService=i,this._languageId=s,this._lexer=l,this._embeddedModes=Object.create(null),this.embeddedLoaded=Promise.resolve(void 0);let P=!1;this._tokenizationRegistryListener=Rt.E.onDidChange(H=>{if(P)return;let X=!1;for(let ge=0,Ue=H.changedLanguages.length;ge<Ue;ge++){let st=H.changedLanguages[ge];if(this._embeddedModes[st]){X=!0;break}}X&&(P=!0,Rt.E.fire([this._languageId]),P=!1)})}dispose(){this._tokenizationRegistryListener.dispose()}getLoadStatus(){let e=[];for(let i in this._embeddedModes){const s=Rt.E.get(i);if(s){if(s instanceof Wi){const P=s.getLoadStatus();P.loaded===!1&&e.push(P.promise)}continue}const l=Rt.E.getPromise(i);l&&e.push(l)}return e.length===0?{loaded:!0}:{loaded:!1,promise:Promise.all(e).then(i=>{})}}getInitialState(){let e=si.create(null,this._lexer.start);return mi.create(e,null)}tokenize(e,i,s,l){let P=new Di,H=this._tokenize(e,i,s,l,P);return P.finalize(H)}tokenize2(e,i,s,l){let P=new pi(this._modeService,this._standaloneThemeService.getColorTheme().tokenTheme),H=this._tokenize(e,i,s,l,P);return P.finalize(H)}_tokenize(e,i,s,l,P){return s.embeddedModeData?this._nestedTokenize(e,i,s,l,P):this._myTokenize(e,i,s,l,P)}_findLeavingNestedModeOffset(e,i){let s=this._lexer.tokenizer[i.stack.state];if(!s&&(s=Ao(this._lexer,i.stack.state),!s))throw mo(this._lexer,"tokenizer state is not defined: "+i.stack.state);let l=-1,P=!1;for(const H of s){if(!jt(H.action)||H.action.nextEmbedded!=="@pop")continue;P=!0;let X=H.regex,ge=H.regex.source;if(ge.substr(0,4)==="^(?:"&&ge.substr(ge.length-1,1)===")"){let st=(X.ignoreCase?"i":"")+(X.unicode?"u":"");X=new RegExp(ge.substr(4,ge.length-5),st)}let Ue=e.search(X);if(Ue===-1||Ue!==0&&H.matchOnlyAtLineStart)continue;(l===-1||Ue<l)&&(l=Ue)}if(!P)throw mo(this._lexer,'no rule containing nextEmbedded: "@pop" in tokenizer embedded state: '+i.stack.state);return l}_nestedTokenize(e,i,s,l,P){let H=this._findLeavingNestedModeOffset(e,s);if(H===-1){let Ue=P.nestedModeTokenize(e,i,s.embeddedModeData,l);return mi.create(s.stack,new Uo(s.embeddedModeData.languageId,Ue))}let X=e.substring(0,H);X.length>0&&P.nestedModeTokenize(X,!1,s.embeddedModeData,l);let ge=e.substring(H);return this._myTokenize(ge,i,s,l+H,P)}_safeRuleName(e){return e?e.name:"(unknown)"}_myTokenize(e,i,s,l,P){P.enterMode(l,this._languageId);const H=e.length,X=i&&this._lexer.includeLF?e+`
|
|
|
`:e,ge=X.length;let Ue=s.embeddedModeData,st=s.stack,Je=0,wt=null,to=!0;for(;to||Je<ge;){const lo=Je,po=st.depth,Ho=wt?wt.groups.length:0,Vo=st.state;let ii=null,Jo=null,Go=null,Si=null,Ai=null;if(wt){ii=wt.matches;const Xo=wt.groups.shift();Jo=Xo.matched,Go=Xo.action,Si=wt.rule,wt.groups.length===0&&(wt=null)}else{if(!to&&Je>=ge)break;to=!1;let Xo=this._lexer.tokenizer[Vo];if(!Xo&&(Xo=Ao(this._lexer,Vo),!Xo))throw mo(this._lexer,"tokenizer state is not defined: "+Vo);let ei=X.substr(Je);for(const Mi of Xo)if((Je===0||!Mi.matchOnlyAtLineStart)&&(ii=ei.match(Mi.regex),ii)){Jo=ii[0],Go=Mi.action;break}}if(ii||(ii=[""],Jo=""),Go||(Je<ge&&(ii=[X.charAt(Je)],Jo=ii[0]),Go=this._lexer.defaultToken),Jo===null)break;for(Je+=Jo.length;pt(Go)&&jt(Go)&&Go.test;)Go=Go.test(Jo,ii,Vo,Je===ge);let ai=null;if(typeof Go=="string"||Array.isArray(Go))ai=Go;else if(Go.group)ai=Go.group;else if(Go.token!==null&&Go.token!==void 0){if(Go.tokenSubst?ai=Io(this._lexer,Go.token,Jo,ii,Vo):ai=Go.token,Go.nextEmbedded)if(Go.nextEmbedded==="@pop"){if(!Ue)throw mo(this._lexer,"cannot pop embedded mode if not inside one");Ue=null}else{if(Ue)throw mo(this._lexer,"cannot enter embedded mode from within an embedded mode");Ai=Io(this._lexer,Go.nextEmbedded,Jo,ii,Vo)}if(Go.goBack&&(Je=Math.max(0,Je-Go.goBack)),Go.switchTo&&typeof Go.switchTo=="string"){let Xo=Io(this._lexer,Go.switchTo,Jo,ii,Vo);if(Xo[0]==="@"&&(Xo=Xo.substr(1)),Ao(this._lexer,Xo))st=st.switchTo(Xo);else throw mo(this._lexer,"trying to switch to a state '"+Xo+"' that is undefined in rule: "+this._safeRuleName(Si))}else{if(Go.transform&&typeof Go.transform=="function")throw mo(this._lexer,"action.transform not supported");if(Go.next)if(Go.next==="@push"){if(st.depth>=this._lexer.maxStack)throw mo(this._lexer,"maximum tokenizer stack size reached: ["+st.state+","+st.parent.state+",...]");st=st.push(Vo)}else if(Go.next==="@pop"){if(st.depth<=1)throw mo(this._lexer,"trying to pop an empty stack in rule: "+this._safeRuleName(Si));st=st.pop()}else if(Go.next==="@popall")st=st.popall();else{let Xo=Io(this._lexer,Go.next,Jo,ii,Vo);if(Xo[0]==="@"&&(Xo=Xo.substr(1)),Ao(this._lexer,Xo))st=st.push(Xo);else throw mo(this._lexer,"trying to set a next state '"+Xo+"' that is undefined in rule: "+this._safeRuleName(Si))}}Go.log&&typeof Go.log=="string"&&ho(this._lexer,this._lexer.languageId+": "+Io(this._lexer,Go.log,Jo,ii,Vo))}if(ai===null)throw mo(this._lexer,"lexer rule has no well-defined action in rule: "+this._safeRuleName(Si));const Fo=Xo=>{let ei=this._modeService.getModeIdForLanguageName(Xo);ei&&(Xo=ei);const Mi=this._getNestedEmbeddedModeData(Xo);if(Je<ge){const qi=e.substr(Je);return this._nestedTokenize(qi,i,mi.create(st,Mi),l+Je,P)}else return mi.create(st,Mi)};if(Array.isArray(ai)){if(wt&&wt.groups.length>0)throw mo(this._lexer,"groups cannot be nested: "+this._safeRuleName(Si));if(ii.length!==ai.length+1)throw mo(this._lexer,"matched number of groups does not match the number of actions in rule: "+this._safeRuleName(Si));let Xo=0;for(let ei=1;ei<ii.length;ei++)Xo+=ii[ei].length;if(Xo!==Jo.length)throw mo(this._lexer,"with groups, all characters should be matched in consecutive groups in rule: "+this._safeRuleName(Si));wt={rule:Si,matches:ii,groups:[]};for(let ei=0;ei<ai.length;ei++)wt.groups[ei]={action:ai[ei],matched:ii[ei+1]};Je-=Jo.length;continue}else{if(ai==="@rematch"&&(Je-=Jo.length,Jo="",ii=null,ai="",Ai!==null))return Fo(Ai);if(Jo.length===0){if(ge===0||po!==st.depth||Vo!==st.state||(wt?wt.groups.length:0)!==Ho)continue;throw mo(this._lexer,"no progress in tokenizer in rule: "+this._safeRuleName(Si))}let Xo=null;if(Mt(ai)&&ai.indexOf("@brackets")===0){let ei=ai.substr("@brackets".length),Mi=fn(this._lexer,Jo);if(!Mi)throw mo(this._lexer,"@brackets token returned but no bracket defined as: "+Jo);Xo=io(Mi.token+ei)}else{let ei=ai===""?"":ai+this._lexer.tokenPostfix;Xo=io(ei)}lo<H&&P.emit(lo+l,Xo)}if(Ai!==null)return Fo(Ai)}return mi.create(st,Ue)}_getNestedEmbeddedModeData(e){let i=this._locateMode(e);if(i){let s=Rt.E.get(i);if(s)return new Uo(i,s.getInitialState())}return new Uo(i||vo.a,vo.b)}_locateMode(e){if(!e||!this._modeService.isRegisteredMode(e))return null;if(e===this._languageId)return e;const i=this._modeService.getModeId(e);return i&&(this._modeService.triggerMode(i),this._embeddedModes[i]=!0),i}}function fn(e,i){if(!i)return null;i=uo(e,i);let s=e.brackets;for(const l of s){if(l.open===i)return{token:l.token,bracketType:1};if(l.close===i)return{token:l.token,bracketType:-1}}return null}function In(e,i,s,l){return new Wi(e,i,s,l)}var an;const bn=(an=window.trustedTypes)===null||an===void 0?void 0:an.createPolicy("standaloneColorizer",{createHTML:e=>e});class Wn{static colorizeElement(e,i,s,l){l=l||{};let P=l.theme||"vs",H=l.mimeType||s.getAttribute("lang")||s.getAttribute("data-lang");if(!H)return console.error("Mode not detected"),Promise.resolve();e.setTheme(P);let X=s.firstChild?s.firstChild.nodeValue:"";s.className+=" "+P;let ge=Ue=>{var st;const Je=(st=bn==null?void 0:bn.createHTML(Ue))!==null&&st!==void 0?st:Ue;s.innerHTML=Je};return this.colorize(i,X||"",H,l).then(ge,Ue=>console.error(Ue))}static colorize(e,i,s,l){const P=e.languageIdCodec;let H=4;l&&typeof l.tabSize=="number"&&(H=l.tabSize),ze.S(i)&&(i=i.substr(1));let X=ze.Q(i),ge=e.getModeId(s);if(!ge)return Promise.resolve($n(X,H,P));e.triggerMode(ge);const Ue=Rt.E.get(ge);if(Ue)return gn(X,H,Ue,P);const st=Rt.E.getPromise(ge);return st?new Promise((Je,wt)=>{st.then(to=>{gn(X,H,to,P).then(Je,wt)},wt)}):new Promise((Je,wt)=>{let to=null,lo=null;const po=()=>{to&&(to.dispose(),to=null),lo&&(lo.dispose(),lo=null);const Ho=Rt.E.get(ge);if(Ho){gn(X,H,Ho,P).then(Je,wt);return}Je($n(X,H,P))};lo=new Lo.g,lo.cancelAndSet(po,500),to=Rt.E.onDidChange(Ho=>{Ho.changedLanguages.indexOf(ge)>=0&&po()})})}static colorizeLine(e,i,s,l,P=4){const H=Ae.g.isBasicASCII(e,i),X=Ae.g.containsRTL(e,H,s);let ge=Object(te.e)(new te.c(!1,!0,e,!1,H,X,0,l,[],P,0,0,0,0,-1,"none",!1,!1,null));return ge.html}static colorizeModelLine(e,i,s=4){let l=e.getLineContent(i);e.forceTokenization(i);let P=e.getLineTokens(i),H=P.inflate();return this.colorizeLine(l,e.mightContainNonBasicASCII(),e.mightContainRTL(),H,s)}}function gn(e,i,s,l){return new Promise((P,H)=>{const X=()=>{const ge=Un(e,i,s,l);if(s instanceof Wi){const Ue=s.getLoadStatus();if(Ue.loaded===!1){Ue.promise.then(X,H);return}}P(ge)};X()})}function $n(e,i,s){let l=[];const P=(0<<11|1<<14|2<<23)>>>0,H=new Uint32Array(2);H[0]=0,H[1]=P;for(let X=0,ge=e.length;X<ge;X++){let Ue=e[X];H[0]=Ue.length;const st=new F.a(H,Ue,s),Je=Ae.g.isBasicASCII(Ue,!0),wt=Ae.g.containsRTL(Ue,Je,!0);let to=Object(te.e)(new te.c(!1,!0,Ue,!1,Je,wt,0,st,[],i,0,0,0,0,-1,"none",!1,!1,null));l=l.concat(to.html),l.push("<br/>")}return l.join("")}function Un(e,i,s,l){let P=[],H=s.getInitialState();for(let X=0,ge=e.length;X<ge;X++){let Ue=e[X],st=s.tokenize2(Ue,!0,H,0);F.a.convertToEndOffset(st.tokens,Ue.length);let Je=new F.a(st.tokens,Ue,l);const wt=Ae.g.isBasicASCII(Ue,!0),to=Ae.g.containsRTL(Ue,wt,!0);let lo=Object(te.e)(new te.c(!1,!0,Ue,!1,wt,to,0,Je.inflate(),[],i,0,0,0,0,-1,"none",!1,!1,null));P=P.concat(lo.html),P.push("<br/>"),H=st.endState}return P.join("")}var qo=t("uDWl"),oo=t("Szf2"),So=t("S3by"),ke=t("sFUC"),ue=t("x/UI"),Fe=t("iDAx"),et=t("0/Sa"),f=t("+7oY"),h=t("CRAX");class _{constructor(e={},i=[],s=[]){this._contents=e,this._keys=i,this._overrides=s,this.isFrozen=!1,this.overrideConfigurations=new Map}get contents(){return this.checkAndFreeze(this._contents)}get overrides(){return this.checkAndFreeze(this._overrides)}get keys(){return this.checkAndFreeze(this._keys)}isEmpty(){return this._keys.length===0&&Object.keys(this._contents).length===0&&this._overrides.length===0}getValue(e){return e?Object(f.d)(this.contents,e):this.contents}override(e){let i=this.overrideConfigurations.get(e);return i||(i=this.createOverrideConfigurationModel(e),this.overrideConfigurations.set(e,i)),i}merge(...e){const i=ot.b(this.contents),s=ot.b(this.overrides),l=[...this.keys];for(const P of e){this.mergeContents(i,P.contents);for(const H of P.overrides){const[X]=s.filter(ge=>fi.g(ge.identifiers,H.identifiers));X?this.mergeContents(X.contents,H.contents):s.push(ot.b(H))}for(const H of P.keys)l.indexOf(H)===-1&&l.push(H)}return new _(i,l,s)}freeze(){return this.isFrozen=!0,this}createOverrideConfigurationModel(e){const i=this.getContentsForOverrideIdentifer(e);if(!i||typeof i!="object"||!Object.keys(i).length)return this;let s={};for(const l of fi.f([...Object.keys(this.contents),...Object.keys(i)])){let P=this.contents[l],H=i[l];H&&(typeof P=="object"&&typeof H=="object"?(P=ot.b(P),this.mergeContents(P,H)):P=H),s[l]=P}return new _(s,this.keys,this.overrides)}mergeContents(e,i){for(const s of Object.keys(i)){if(s in e&&(xt.k(e[s])&&xt.k(i[s]))){this.mergeContents(e[s],i[s]);continue}e[s]=ot.b(i[s])}}checkAndFreeze(e){return this.isFrozen&&!Object.isFrozen(e)?ot.c(e):e}getContentsForOverrideIdentifer(e){for(const i of this.overrides)if(i.identifiers.indexOf(e)!==-1)return i.contents;return null}toJSON(){return{contents:this.contents,overrides:this.overrides,keys:this.keys}}setValue(e,i){this.addKey(e),Object(f.b)(this.contents,e,i,s=>{throw new Error(s)})}removeValue(e){this.removeKey(e)&&Object(f.f)(this.contents,e)}addKey(e){let i=this.keys.length;for(let s=0;s<i;s++)e.indexOf(this.keys[s])===0&&(i=s);this.keys.splice(i,1,e)}removeKey(e){let i=this.keys.indexOf(e);return i!==-1?(this.keys.splice(i,1),!0):!1}}class K extends _{constructor(){const e=Object(f.e)(),i=Object(f.c)(),s=[];for(const l of Object.keys(e))h.b.test(l)&&s.push({identifiers:[Object(h.c)(l).trim()],keys:Object.keys(e[l]),contents:Object(f.g)(e[l],P=>console.error(`Conflict in default settings file: ${P}`))});super(e,i,s)}}class de{constructor(e,i,s=new _,l=new _,P=new he.b,H=new _,X=new he.b,ge=!0){this._defaultConfiguration=e,this._localUserConfiguration=i,this._remoteUserConfiguration=s,this._workspaceConfiguration=l,this._folderConfigurations=P,this._memoryConfiguration=H,this._memoryConfigurationByResource=X,this._freeze=ge,this._workspaceConsolidatedConfiguration=null,this._foldersConsolidatedConfigurations=new he.b,this._userConfiguration=null}getValue(e,i,s){const l=this.getConsolidateConfigurationModel(i,s);return l.getValue(e)}updateValue(e,i,s={}){let l;s.resource?(l=this._memoryConfigurationByResource.get(s.resource),l||(l=new _,this._memoryConfigurationByResource.set(s.resource,l))):l=this._memoryConfiguration,i===void 0?l.removeValue(e):l.setValue(e,i),s.resource||(this._workspaceConsolidatedConfiguration=null)}get userConfiguration(){return this._userConfiguration||(this._userConfiguration=this._remoteUserConfiguration.isEmpty()?this._localUserConfiguration:this._localUserConfiguration.merge(this._remoteUserConfiguration),this._freeze&&this._userConfiguration.freeze()),this._userConfiguration}getConsolidateConfigurationModel(e,i){let s=this.getConsolidatedConfigurationModelForResource(e,i);return e.overrideIdentifier?s.override(e.overrideIdentifier):s}getConsolidatedConfigurationModelForResource({resource:e},i){let s=this.getWorkspaceConsolidatedConfiguration();if(i&&e){const l=i.getFolder(e);l&&(s=this.getFolderConsolidatedConfiguration(l.uri)||s);const P=this._memoryConfigurationByResource.get(e);P&&(s=s.merge(P))}return s}getWorkspaceConsolidatedConfiguration(){return this._workspaceConsolidatedConfiguration||(this._workspaceConsolidatedConfiguration=this._defaultConfiguration.merge(this.userConfiguration,this._workspaceConfiguration,this._memoryConfiguration),this._freeze&&(this._workspaceConfiguration=this._workspaceConfiguration.freeze())),this._workspaceConsolidatedConfiguration}getFolderConsolidatedConfiguration(e){let i=this._foldersConsolidatedConfigurations.get(e);if(!i){const s=this.getWorkspaceConsolidatedConfiguration(),l=this._folderConfigurations.get(e);l?(i=s.merge(l),this._freeze&&(i=i.freeze()),this._foldersConsolidatedConfigurations.set(e,i)):i=s}return i}toData(){return{defaults:{contents:this._defaultConfiguration.contents,overrides:this._defaultConfiguration.overrides,keys:this._defaultConfiguration.keys},user:{contents:this.userConfiguration.contents,overrides:this.userConfiguration.overrides,keys:this.userConfiguration.keys},workspace:{contents:this._workspaceConfiguration.contents,overrides:this._workspaceConfiguration.overrides,keys:this._workspaceConfiguration.keys},folders:[...this._folderConfigurations.keys()].reduce((e,i)=>{const{contents:s,overrides:l,keys:P}=this._folderConfigurations.get(i);return e.push([i,{contents:s,overrides:l,keys:P}]),e},[])}}static parse(e){const i=this.parseConfigurationModel(e.defaults),s=this.parseConfigurationModel(e.user),l=this.parseConfigurationModel(e.workspace),P=e.folders.reduce((H,X)=>(H.set(A.a.revive(X[0]),this.parseConfigurationModel(X[1])),H),new he.b);return new de(i,s,new _,l,P,new _,new he.b,!1)}static parseConfigurationModel(e){return new _(e.contents,e.keys,e.overrides).freeze()}}class ye{constructor(e,i,s,l){this.change=e,this.previous=i,this.currentConfiguraiton=s,this.currentWorkspace=l,this._previousConfiguration=void 0;const P=new Set;e.keys.forEach(X=>P.add(X)),e.overrides.forEach(([,X])=>X.forEach(ge=>P.add(ge))),this.affectedKeys=[...P.values()];const H=new _;this.affectedKeys.forEach(X=>H.setValue(X,{})),this.affectedKeysTree=H.contents}get previousConfiguration(){return!this._previousConfiguration&&this.previous&&(this._previousConfiguration=de.parse(this.previous.data)),this._previousConfiguration}affectsConfiguration(e,i){var s;if(this.doesAffectedKeysTreeContains(this.affectedKeysTree,e)){if(i){const l=this.previousConfiguration?this.previousConfiguration.getValue(e,i,(s=this.previous)===null||s===void 0?void 0:s.workspace):void 0,P=this.currentConfiguraiton.getValue(e,i,this.currentWorkspace);return!ot.d(l,P)}return!0}return!1}doesAffectedKeysTreeContains(e,i){let s=Object(f.g)({[i]:!0},()=>{}),l;for(;typeof s=="object"&&(l=Object.keys(s)[0]);){if(e=e[l],!e)return!1;s=s[l]}return!0}}var De=t("3/fG");const qe=/^(cursor|delete)/;class ht extends $e.a{constructor(e,i,s,l,P){super();this._contextKeyService=e,this._commandService=i,this._telemetryService=s,this._notificationService=l,this._logService=P,this._onDidUpdateKeybindings=this._register(new x.b),this._currentChord=null,this._currentChordChecker=new Lo.c,this._currentChordStatusMessage=null,this._ignoreSingleModifiers=yt.EMPTY,this._currentSingleModifier=null,this._currentSingleModifierClearTimeout=new Lo.g,this._logging=!1}get onDidUpdateKeybindings(){return this._onDidUpdateKeybindings?this._onDidUpdateKeybindings.event:x.c.None}dispose(){super.dispose()}_log(e){this._logging&&this._logService.info(`[KeybindingService]: ${e}`)}getKeybindings(){return this._getResolver().getKeybindings()}lookupKeybinding(e,i){const s=this._getResolver().lookupPrimaryKeybinding(e,i||this._contextKeyService);return s?s.resolvedKeybinding:void 0}dispatchEvent(e,i){return this._dispatch(e,i)}softDispatch(e,i){const s=this.resolveKeyboardEvent(e);if(s.isChord())return console.warn("Unexpected keyboard event mapped to a chord"),null;const[l]=s.getDispatchParts();if(l===null)return null;const P=this._contextKeyService.getContext(i),H=this._currentChord?this._currentChord.keypress:null;return this._getResolver().resolve(P,H,l)}_enterChordMode(e,i){this._currentChord={keypress:e,label:i},this._currentChordStatusMessage=this._notificationService.status(De.a("first.chord","({0}) was pressed. Waiting for second key of chord...",i));const s=Date.now();this._currentChordChecker.cancelAndSet(()=>{if(!this._documentHasFocus()){this._leaveChordMode();return}Date.now()-s>5e3&&this._leaveChordMode()},500)}_leaveChordMode(){this._currentChordStatusMessage&&(this._currentChordStatusMessage.dispose(),this._currentChordStatusMessage=null),this._currentChordChecker.cancel(),this._currentChord=null}_dispatch(e,i){return this._doDispatch(this.resolveKeyboardEvent(e),i,!1)}_singleModifierDispatch(e,i){const s=this.resolveKeyboardEvent(e),[l]=s.getSingleModifierDispatchParts();if(l)return this._ignoreSingleModifiers.has(l)?(this._log(`+ Ignoring single modifier ${l} due to it being pressed together with other keys.`),this._ignoreSingleModifiers=yt.EMPTY,this._currentSingleModifierClearTimeout.cancel(),this._currentSingleModifier=null,!1):(this._ignoreSingleModifiers=yt.EMPTY,this._currentSingleModifier===null?(this._log(`+ Storing single modifier for possible chord ${l}.`),this._currentSingleModifier=l,this._currentSingleModifierClearTimeout.cancelAndSet(()=>{this._log("+ Clearing single modifier due to 300ms elapsed."),this._currentSingleModifier=null},300),!1):l===this._currentSingleModifier?(this._log(`/ Dispatching single modifier chord ${l} ${l}`),this._currentSingleModifierClearTimeout.cancel(),this._currentSingleModifier=null,this._doDispatch(s,i,!0)):(this._log(`+ Clearing single modifier due to modifier mismatch: ${this._currentSingleModifier} ${l}`),this._currentSingleModifierClearTimeout.cancel(),this._currentSingleModifier=null,!1));const[P]=s.getParts();return this._ignoreSingleModifiers=new yt(P),this._currentSingleModifier!==null&&this._log("+ Clearing single modifier due to other key up."),this._currentSingleModifierClearTimeout.cancel(),this._currentSingleModifier=null,!1}_doDispatch(e,i,s=!1){let l=!1;if(e.isChord())return console.warn("Unexpected keyboard event mapped to a chord"),!1;let P=null,H=null;if(s){const[st]=e.getSingleModifierDispatchParts();P=st,H=st}else[P]=e.getDispatchParts(),H=this._currentChord?this._currentChord.keypress:null;if(P===null)return this._log("\\ Keyboard event cannot be dispatched in keydown phase."),l;const X=this._contextKeyService.getContext(i),ge=e.getLabel(),Ue=this._getResolver().resolve(X,H,P);return this._logService.trace("KeybindingService#dispatch",ge,Ue==null?void 0:Ue.commandId),Ue&&Ue.enterChord?(l=!0,this._enterChordMode(P,ge),l):(this._currentChord&&((!Ue||!Ue.commandId)&&(this._notificationService.status(De.a("missing.chord","The key combination ({0}, {1}) is not a command.",this._currentChord.label,ge),{hideAfter:10*1e3}),l=!0)),this._leaveChordMode(),Ue&&Ue.commandId&&(Ue.bubble||(l=!0),typeof Ue.commandArgs=="undefined"?this._commandService.executeCommand(Ue.commandId).then(void 0,st=>this._notificationService.warn(st)):this._commandService.executeCommand(Ue.commandId,Ue.commandArgs).then(void 0,st=>this._notificationService.warn(st)),qe.test(Ue.commandId)||this._telemetryService.publicLog2("workbenchActionExecuted",{id:Ue.commandId,from:"keybinding"})),l)}mightProducePrintableCharacter(e){return e.ctrlKey||e.metaKey?!1:e.keyCode>=31&&e.keyCode<=56||e.keyCode>=21&&e.keyCode<=30}}class yt{constructor(e){this._ctrlKey=e?e.ctrlKey:!1,this._shiftKey=e?e.shiftKey:!1,this._altKey=e?e.altKey:!1,this._metaKey=e?e.metaKey:!1}has(e){switch(e){case"ctrl":return this._ctrlKey;case"shift":return this._shiftKey;case"alt":return this._altKey;case"meta":return this._metaKey}}}yt.EMPTY=new yt(null);var Ct=t("T8No");class At{constructor(e,i,s){this._log=s,this._defaultKeybindings=e,this._defaultBoundCommands=new Map;for(let l=0,P=e.length;l<P;l++){const H=e[l].command;H&&this._defaultBoundCommands.set(H,!0)}this._map=new Map,this._lookupMap=new Map,this._keybindings=At.combine(e,i);for(let l=0,P=this._keybindings.length;l<P;l++){let H=this._keybindings[l];if(H.keypressParts.length===0)continue;if(H.when&&H.when.type===0)continue;this._addKeyPress(H.keypressParts[0],H)}}static _isTargetedForRemoval(e,i,s,l,P){if(e.command!==l)return!1;if(i&&e.keypressParts[0]!==i)return!1;if(s&&e.keypressParts[1]!==s)return!1;if(P){if(!e.when)return!1;if(!Object(Ct.e)(P,e.when))return!1}return!0}static combine(e,i){e=e.slice(0);let s=[];for(const l of i){if(!l.command||l.command.length===0||l.command.charAt(0)!=="-"){s.push(l);continue}const P=l.command.substr(1),H=l.keypressParts[0],X=l.keypressParts[1],ge=l.when;for(let Ue=e.length-1;Ue>=0;Ue--)this._isTargetedForRemoval(e[Ue],H,X,P,ge)&&e.splice(Ue,1)}return e.concat(s)}_addKeyPress(e,i){const s=this._map.get(e);if(typeof s=="undefined"){this._map.set(e,[i]),this._addToLookupMap(i);return}for(let l=s.length-1;l>=0;l--){let P=s[l];if(P.command===i.command)continue;const H=P.keypressParts.length>1,X=i.keypressParts.length>1;if(H&&X&&P.keypressParts[1]!==i.keypressParts[1])continue;At.whenIsEntirelyIncluded(P.when,i.when)&&this._removeFromLookupMap(P)}s.push(i),this._addToLookupMap(i)}_addToLookupMap(e){if(!e.command)return;let i=this._lookupMap.get(e.command);typeof i=="undefined"?(i=[e],this._lookupMap.set(e.command,i)):i.push(e)}_removeFromLookupMap(e){if(!e.command)return;let i=this._lookupMap.get(e.command);if(typeof i=="undefined")return;for(let s=0,l=i.length;s<l;s++)if(i[s]===e){i.splice(s,1);return}}static whenIsEntirelyIncluded(e,i){return!i||i.type===1?!0:!e||e.type===1?!1:Object(Ct.f)(e,i)}getKeybindings(){return this._keybindings}lookupPrimaryKeybinding(e,i){const s=this._lookupMap.get(e);if(typeof s=="undefined"||s.length===0)return null;if(s.length===1)return s[0];for(let l=s.length-1;l>=0;l--){const P=s[l];if(i.contextMatchesRules(P.when))return P}return s[s.length-1]}resolve(e,i,s){this._log(`| Resolving ${s}${i?` chorded from ${i}`:""}`);let l=null;if(i!==null){const H=this._map.get(i);if(typeof H=="undefined")return this._log("\\ No keybinding entries."),null;l=[];for(let X=0,ge=H.length;X<ge;X++){let Ue=H[X];Ue.keypressParts[1]===s&&l.push(Ue)}}else{const H=this._map.get(s);if(typeof H=="undefined")return this._log("\\ No keybinding entries."),null;l=H}let P=this._findCommand(e,l);return P?i===null&&P.keypressParts.length>1&&P.keypressParts[1]!==null?(this._log(`\\ From ${l.length} keybinding entries, matched chord, when: ${Ft(P.when)}, source: ${Zt(P)}.`),{enterChord:!0,leaveChord:!1,commandId:null,commandArgs:null,bubble:!1}):(this._log(`\\ From ${l.length} keybinding entries, matched ${P.command}, when: ${Ft(P.when)}, source: ${Zt(P)}.`),{enterChord:!1,leaveChord:P.keypressParts.length>1,commandId:P.command,commandArgs:P.commandArgs,bubble:P.bubble}):(this._log(`\\ From ${l.length} keybinding entries, no when clauses matched the context.`),null)}_findCommand(e,i){for(let s=i.length-1;s>=0;s--){let l=i[s];if(!At.contextMatchesRules(e,l.when))continue;return l}return null}static contextMatchesRules(e,i){return i?i.evaluate(e):!0}}function Ft(e){return e?`${e.serialize()}`:"no when condition"}function Zt(e){return e.extensionId?e.isBuiltinExtension?`built-in extension ${e.extensionId}`:`user extension ${e.extensionId}`:e.isDefault?"built-in":"user"}var Yt=t("nrhi");class ao{constructor(e,i,s,l,P,H,X){this._resolvedKeybindingItemBrand=void 0,this.resolvedKeybinding=e,this.keypressParts=e?Co(e.getDispatchParts()):[],e&&this.keypressParts.length===0&&(this.keypressParts=Co(e.getSingleModifierDispatchParts())),this.bubble=i?i.charCodeAt(0)===94:!1,this.command=this.bubble?i.substr(1):i,this.commandArgs=s,this.when=l,this.isDefault=P,this.extensionId=H,this.isBuiltinExtension=X}}function Co(e){let i=[];for(let s=0,l=e.length;s<l;s++){const P=e[s];if(!P)return i;i.push(P)}return i}var ko=t("i04g");class Qo extends oo.b{constructor(e,i){super();if(i.length===0)throw Object(To.c)("parts");this._os=e,this._parts=i}getLabel(){return ko.c.toLabel(this._os,this._parts,e=>this._getLabel(e))}getAriaLabel(){return ko.a.toLabel(this._os,this._parts,e=>this._getAriaLabel(e))}getElectronAccelerator(){return this._parts.length>1||this._parts[0].isDuplicateModifierCase()?null:ko.b.toLabel(this._os,this._parts,e=>this._getElectronAccelerator(e))}isChord(){return this._parts.length>1}getParts(){return this._parts.map(e=>this._getPart(e))}_getPart(e){return new oo.c(e.ctrlKey,e.shiftKey,e.altKey,e.metaKey,this._getLabel(e),this._getAriaLabel(e))}getDispatchParts(){return this._parts.map(e=>this._getDispatchPart(e))}getSingleModifierDispatchParts(){return this._parts.map(e=>this._getSingleModifierDispatchPart(e))}}class yi extends Qo{constructor(e,i){super(i,e.parts)}_keyCodeToUILabel(e){if(this._os===2)switch(e){case 15:return"\u2190";case 16:return"\u2191";case 17:return"\u2192";case 18:return"\u2193"}return R.d.toString(e)}_getLabel(e){return e.isDuplicateModifierCase()?"":this._keyCodeToUILabel(e.keyCode)}_getAriaLabel(e){return e.isDuplicateModifierCase()?"":R.d.toString(e.keyCode)}_getElectronAccelerator(e){return R.d.toElectronAccelerator(e.keyCode)}_getDispatchPart(e){return yi.getDispatchStr(e)}static getDispatchStr(e){if(e.isModifierKey())return null;let i="";return e.ctrlKey&&(i+="ctrl+"),e.shiftKey&&(i+="shift+"),e.altKey&&(i+="alt+"),e.metaKey&&(i+="meta+"),i+=R.d.toString(e.keyCode),i}_getSingleModifierDispatchPart(e){return e.keyCode===5&&!e.shiftKey&&!e.altKey&&!e.metaKey?"ctrl":e.keyCode===4&&!e.ctrlKey&&!e.altKey&&!e.metaKey?"shift":e.keyCode===6&&!e.ctrlKey&&!e.shiftKey&&!e.metaKey?"alt":e.keyCode===57&&!e.ctrlKey&&!e.shiftKey&&!e.altKey?"meta":null}static _scanCodeToKeyCode(e){const i=R.b[e];if(i!==-1)return i;switch(e){case 10:return 31;case 11:return 32;case 12:return 33;case 13:return 34;case 14:return 35;case 15:return 36;case 16:return 37;case 17:return 38;case 18:return 39;case 19:return 40;case 20:return 41;case 21:return 42;case 22:return 43;case 23:return 44;case 24:return 45;case 25:return 46;case 26:return 47;case 27:return 48;case 28:return 49;case 29:return 50;case 30:return 51;case 31:return 52;case 32:return 53;case 33:return 54;case 34:return 55;case 35:return 56;case 36:return 22;case 37:return 23;case 38:return 24;case 39:return 25;case 40:return 26;case 41:return 27;case 42:return 28;case 43:return 29;case 44:return 30;case 45:return 21;case 51:return 83;case 52:return 81;case 53:return 87;case 54:return 89;case 55:return 88;case 56:return 0;case 57:return 80;case 58:return 90;case 59:return 86;case 60:return 82;case 61:return 84;case 62:return 85;case 106:return 92}return 0}static _resolveSimpleUserBinding(e){if(!e)return null;if(e instanceof oo.d)return e;const i=this._scanCodeToKeyCode(e.scanCode);return i===0?null:new oo.d(e.ctrlKey,e.shiftKey,e.altKey,e.metaKey,i)}static resolveUserBinding(e,i){const s=Co(e.map(l=>this._resolveSimpleUserBinding(l)));return s.length>0?[new yi(new oo.a(s),i)]:[]}}var Ko=t("sM1p"),li=t("EWX2"),Ki=t("A9l+"),xi=function(e,i,s,l){var P=arguments.length,H=P<3?i:l===null?l=Object.getOwnPropertyDescriptor(i,s):l,X;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")H=Reflect.decorate(e,i,s,l);else for(var ge=e.length-1;ge>=0;ge--)(X=e[ge])&&(H=(P<3?X(H):P>3?X(i,s,H):X(i,s))||H);return P>3&&H&&Object.defineProperty(i,s,H),H},Ni=function(e,i){return function(s,l){i(s,l,e)}},Ti=function(e,i,s,l){function P(H){return H instanceof s?H:new s(function(X){X(H)})}return new(s||(s=Promise))(function(H,X){function ge(Je){try{st(l.next(Je))}catch(wt){X(wt)}}function Ue(Je){try{st(l.throw(Je))}catch(wt){X(wt)}}function st(Je){Je.done?H(Je.value):P(Je.value).then(ge,Ue)}st((l=l.apply(e,i||[])).next())})};class wn{constructor(e){this.disposed=!1,this.model=e,this._onWillDispose=new x.b}get textEditorModel(){return this.model}dispose(){this.disposed=!0,this._onWillDispose.fire()}}function yn(e,i,s){return Object(ke.b)(e)?i(e):s(e)}let En=class{constructor(i){this.modelService=i}setEditor(i){this.editor=i}createModelReference(i){let s=null;return this.editor&&(s=yn(this.editor,l=>this.findModel(l,i),l=>this.findModel(l.getOriginalEditor(),i)||this.findModel(l.getModifiedEditor(),i))),s?Promise.resolve(new $e.c(new wn(s))):Promise.reject(new Error("Model not found"))}findModel(i,s){let l=this.modelService.getModel(s);return l&&l.uri.toString()!==s.toString()?null:l}};En=xi([Ni(0,Li.a)],En);class Mn{show(){return Mn.NULL_PROGRESS_RUNNER}showWhile(e,i){return Ti(this,void 0,void 0,function*(){yield e})}}Mn.NULL_PROGRESS_RUNNER={done:()=>{},total:()=>{},worked:()=>{}};class Os{confirm(e){return this.doConfirm(e).then(i=>({confirmed:i,checkboxChecked:!1}))}doConfirm(e){let i=e.message;return e.detail&&(i=i+`
|
|
|
|
|
|
`+e.detail),Promise.resolve(window.confirm(i))}show(e,i,s,l){return Promise.resolve({choice:0})}}class Yn{info(e){return this.notify({severity:So.a.Info,message:e})}warn(e){return this.notify({severity:So.a.Warning,message:e})}error(e){return this.notify({severity:So.a.Error,message:e})}notify(e){switch(e.severity){case So.a.Error:console.error(e.message);break;case So.a.Warning:console.warn(e.message);break;default:console.log(e.message);break}return Yn.NO_OP}status(e,i){return $e.a.None}}Yn.NO_OP=new Ko.b;class vs{constructor(e){this._onWillExecuteCommand=new x.b,this._onDidExecuteCommand=new x.b,this.onDidExecuteCommand=this._onDidExecuteCommand.event,this._instantiationService=e}executeCommand(e,...i){const s=ie.a.getCommand(e);if(!s)return Promise.reject(new Error(`command '${e}' not found`));try{this._onWillExecuteCommand.fire({commandId:e,args:i});const l=this._instantiationService.invokeFunction.apply(this._instantiationService,[s.handler,...i]);return this._onDidExecuteCommand.fire({commandId:e,args:i}),Promise.resolve(l)}catch(l){return Promise.reject(l)}}}class ns extends ht{constructor(e,i,s,l,P,H){super(e,i,s,l,P);this._cachedResolver=null,this._dynamicKeybindings=[],this._register(Se.i(H,Se.d.KEY_DOWN,X=>{const ge=new qo.a(X),Ue=this._dispatch(ge,ge.target);Ue&&(ge.preventDefault(),ge.stopPropagation())})),this._register(Se.i(window,Se.d.KEY_UP,X=>{const ge=new qo.a(X),Ue=this._singleModifierDispatch(ge,ge.target);Ue&&ge.preventDefault()}))}addDynamicKeybinding(e,i,s,l){const P=Object(oo.e)(i,Vt.a),H=new $e.b;return P&&(this._dynamicKeybindings.push({keybinding:P.parts,command:e,when:l,weight1:1e3,weight2:0,extensionId:null,isBuiltinExtension:!1}),H.add(Object($e.i)(()=>{for(let X=0;X<this._dynamicKeybindings.length;X++){let ge=this._dynamicKeybindings[X];if(ge.command===e){this._dynamicKeybindings.splice(X,1),this.updateResolver({source:1});return}}}))),H.add(ie.a.registerCommand(e,s)),this.updateResolver({source:1}),H}updateResolver(e){this._cachedResolver=null,this._onDidUpdateKeybindings.fire(e)}_getResolver(){if(!this._cachedResolver){const e=this._toNormalizedKeybindingItems(Yt.a.getDefaultKeybindings(),!0),i=this._toNormalizedKeybindingItems(this._dynamicKeybindings,!1);this._cachedResolver=new At(e,i,s=>this._log(s))}return this._cachedResolver}_documentHasFocus(){return document.hasFocus()}_toNormalizedKeybindingItems(e,i){let s=[],l=0;for(const P of e){const H=P.when||void 0,X=P.keybinding;if(!X)s[l++]=new ao(void 0,P.command,P.commandArgs,H,i,null,!1);else{const ge=yi.resolveUserBinding(X,Vt.a);for(const Ue of ge)s[l++]=new ao(Ue,P.command,P.commandArgs,H,i,null,!1)}}return s}resolveKeyboardEvent(e){let i=new oo.d(e.ctrlKey,e.shiftKey,e.altKey,e.metaKey,e.keyCode).toChord();return new yi(i,Vt.a)}}function pr(e){return e&&typeof e=="object"&&(!e.overrideIdentifier||typeof e.overrideIdentifier=="string")&&(!e.resource||e.resource instanceof A.a)}class br{constructor(){this._onDidChangeConfiguration=new x.b,this.onDidChangeConfiguration=this._onDidChangeConfiguration.event,this._configuration=new de(new K,new _)}getValue(e,i){const s=typeof e=="string"?e:void 0,l=pr(e)?e:pr(i)?i:{};return this._configuration.getValue(s,l,void 0)}updateValues(e){const i={data:this._configuration.toData()};let s=[];for(const l of e){const[P,H]=l;if(this.getValue(P)===H)continue;this._configuration.updateValue(P,H),s.push(P)}if(s.length>0){const l=new ye({keys:s,overrides:[]},i,this._configuration);l.source=7,l.sourceConfig=null,this._onDidChangeConfiguration.fire(l)}return Promise.resolve()}}class zr{constructor(e){this.configurationService=e,this._onDidChangeConfiguration=new x.b,this.configurationService.onDidChangeConfiguration(i=>{this._onDidChangeConfiguration.fire({affectedKeys:i.affectedKeys,affectsConfiguration:(s,l)=>i.affectsConfiguration(l)})})}getValue(e,i,s){const l=j.a.isIPosition(i)?i:null,P=l?typeof s=="string"?s:void 0:typeof i=="string"?i:void 0;return typeof P=="undefined"?this.configurationService.getValue():this.configurationService.getValue(P)}}let Is=class{constructor(i){this.configurationService=i}getEOL(i,s){const l=this.configurationService.getValue("files.eol",{overrideIdentifier:s,resource:i});return l&&typeof l=="string"&&l!=="auto"?l:Vt.d||Vt.f?`
|
|
|
`:`\r
|
|
|
`}};Is=xi([Ni(0,f.a)],Is);class vr{publicLog(e,i){return Promise.resolve(void 0)}publicLog2(e,i){return this.publicLog(e,i)}}class As{constructor(){const e=A.a.from({scheme:As.SCHEME,authority:"model",path:"/"});this.workspace={id:"4064f6ec-cb38-4ad0-af64-ee6467e63c82",folders:[new li.b({uri:e,name:"",index:0})]}}getWorkspace(){return this.workspace}}As.SCHEME="inmemory";function Cs(e,i,s){if(!i)return;if(!(e instanceof br))return;let l=[];Object.keys(i).forEach(P=>{Object(Fe.d)(P)&&l.push([`editor.${P}`,i[P]]),s&&Object(Fe.c)(P)&&l.push([`diffEditor.${P}`,i[P]])}),l.length>0&&e.updateValues(l)}class $a{constructor(e){this._modelService=e}hasPreviewHandler(){return!1}apply(e,i){return Ti(this,void 0,void 0,function*(){const s=new Map;for(let H of e){if(!(H instanceof ue.c))throw new Error("bad edit - only text edits are supported");const X=this._modelService.getModel(H.resource);if(!X)throw new Error("bad edit - model not found");if(typeof H.versionId=="number"&&X.getVersionId()!==H.versionId)throw new Error("bad state - model changed in the meantime");let ge=s.get(X);ge||(ge=[],s.set(X,ge)),ge.push(et.a.replaceMove(I.a.lift(H.textEdit.range),H.textEdit.text))}let l=0,P=0;for(const[H,X]of s)H.pushStackElement(),H.pushEditOperations([],X,()=>[]),H.pushStackElement(),P+=1,l+=X.length;return{ariaSummary:ze.v(Ki.f.bulkEditServiceSummary,l,P)}})}}class er{getUriLabel(e,i){return e.scheme==="file"?e.fsPath:e.path}}class Kr{constructor(e,i){this._codeEditorService=e,this._container=i,this.onDidLayout=x.c.None}get dimension(){return this._dimension||(this._dimension=Se.z(window.document.body)),this._dimension}get container(){return this._container}focus(){var e;(e=this._codeEditorService.getFocusedCodeEditor())===null||e===void 0||e.focus()}}var tr=t("OBOq"),or=t("nB0o"),Rs=t("lKfe"),ys=t("ZlPH"),Gr=t("cMOf"),Ns=t("HdwC"),Gi=t("vATl"),Ya=t("DTDp"),Es=t("WqXY"),Cr=t("GJhM"),An=t("8HAY"),Zn=t("sswD"),Hn=t("kYye"),ni=t("MD5Z"),nn=t("t9D7"),xn=t("Vhoy"),ss=t("v1vZ"),Xr=function(e,i,s,l){var P=arguments.length,H=P<3?i:l===null?l=Object.getOwnPropertyDescriptor(i,s):l,X;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")H=Reflect.decorate(e,i,s,l);else for(var ge=e.length-1;ge>=0;ge--)(X=e[ge])&&(H=(P<3?X(H):P>3?X(i,s,H):X(i,s))||H);return P>3&&H&&Object.defineProperty(i,s,H),H},$r=function(e,i){return function(s,l){i(s,l,e)}},Yr=function(e,i,s,l){function P(H){return H instanceof s?H:new s(function(X){X(H)})}return new(s||(s=Promise))(function(H,X){function ge(Je){try{st(l.next(Je))}catch(wt){X(wt)}}function Ue(Je){try{st(l.throw(Je))}catch(wt){X(wt)}}function st(Je){Je.done?H(Je.value):P(Je.value).then(ge,Ue)}st((l=l.apply(e,i||[])).next())})},ir;const Ss=3;class rs{constructor(e,i,s,l){this.originalLineStart=e,this.originalLineEnd=i,this.modifiedLineStart=s,this.modifiedLineEnd=l}getType(){return this.originalLineStart===0?1:this.modifiedLineStart===0?2:0}}class as{constructor(e){this.entries=e}}const ks=Object(ss.b)("diff-review-insert",xn.b.add,De.a("diffReviewInsertIcon","Icon for 'Insert' in diff review.")),Zr=Object(ss.b)("diff-review-remove",xn.b.remove,De.a("diffReviewRemoveIcon","Icon for 'Remove' in diff review.")),nr=Object(ss.b)("diff-review-close",xn.b.close,De.a("diffReviewCloseIcon","Icon for 'Close' in diff review."));let ws=class e extends $e.a{constructor(i,s){super();this._modeService=s,this._width=0,this._diffEditor=i,this._isVisible=!1,this.shadow=Object(ys.b)(document.createElement("div")),this.shadow.setClassName("diff-review-shadow"),this.actionBarContainer=Object(ys.b)(document.createElement("div")),this.actionBarContainer.setClassName("diff-review-actions"),this._actionBar=this._register(new Es.a(this.actionBarContainer.domNode)),this._actionBar.push(new An.a("diffreview.close",De.a("label.close","Close"),"close-diff-review "+nn.d.asClassName(nr),!0,()=>Yr(this,void 0,void 0,function*(){return this.hide()})),{label:!1,icon:!0}),this.domNode=Object(ys.b)(document.createElement("div")),this.domNode.setClassName("diff-review monaco-editor-background"),this._content=Object(ys.b)(document.createElement("div")),this._content.setClassName("diff-review-content"),this._content.setAttribute("role","code"),this.scrollbar=this._register(new Cr.a(this._content.domNode,{})),this.domNode.domNode.appendChild(this.scrollbar.getDomNode()),this._register(i.onDidUpdateDiff(()=>{if(!this._isVisible)return;this._diffs=this._compute(),this._render()})),this._register(i.getModifiedEditor().onDidChangeCursorPosition(()=>{if(!this._isVisible)return;this._render()})),this._register(Se.o(this.domNode.domNode,"click",l=>{l.preventDefault();let P=Se.x(l.target,"diff-review-row");P&&this._goToRow(P)})),this._register(Se.o(this.domNode.domNode,"keydown",l=>{(l.equals(18)||l.equals(2048|18)||l.equals(512|18))&&(l.preventDefault(),this._goToRow(this._getNextRow())),(l.equals(16)||l.equals(2048|16)||l.equals(512|16))&&(l.preventDefault(),this._goToRow(this._getPrevRow())),(l.equals(9)||l.equals(2048|9)||l.equals(512|9)||l.equals(1024|9))&&(l.preventDefault(),this.hide()),(l.equals(10)||l.equals(3))&&(l.preventDefault(),this.accept())})),this._diffs=[],this._currentDiff=null}prev(){let i=0;if(this._isVisible||(this._diffs=this._compute()),this._isVisible){let l=-1;for(let P=0,H=this._diffs.length;P<H;P++)if(this._diffs[P]===this._currentDiff){l=P;break}i=this._diffs.length+l-1}else i=this._findDiffIndex(this._diffEditor.getPosition());if(this._diffs.length===0)return;i=i%this._diffs.length;const s=this._diffs[i].entries;this._diffEditor.setPosition(new j.a(s[0].modifiedLineStart,1)),this._diffEditor.setSelection({startColumn:1,startLineNumber:s[0].modifiedLineStart,endColumn:1073741824,endLineNumber:s[s.length-1].modifiedLineEnd}),this._isVisible=!0,this._diffEditor.doLayout(),this._render(),this._goToRow(this._getNextRow())}next(){let i=0;if(this._isVisible||(this._diffs=this._compute()),this._isVisible){let l=-1;for(let P=0,H=this._diffs.length;P<H;P++)if(this._diffs[P]===this._currentDiff){l=P;break}i=l+1}else i=this._findDiffIndex(this._diffEditor.getPosition());if(this._diffs.length===0)return;i=i%this._diffs.length;const s=this._diffs[i].entries;this._diffEditor.setPosition(new j.a(s[0].modifiedLineStart,1)),this._diffEditor.setSelection({startColumn:1,startLineNumber:s[0].modifiedLineStart,endColumn:1073741824,endLineNumber:s[s.length-1].modifiedLineEnd}),this._isVisible=!0,this._diffEditor.doLayout(),this._render(),this._goToRow(this._getNextRow())}accept(){let i=-1,s=this._getCurrentFocusedRow();if(s){let l=parseInt(s.getAttribute("data-line"),10);isNaN(l)||(i=l)}this.hide(),i!==-1&&(this._diffEditor.setPosition(new j.a(i,1)),this._diffEditor.revealPosition(new j.a(i,1),1))}hide(){this._isVisible=!1,this._diffEditor.updateOptions({readOnly:!1}),this._diffEditor.focus(),this._diffEditor.doLayout(),this._render()}_getPrevRow(){let i=this._getCurrentFocusedRow();return i?i.previousElementSibling?i.previousElementSibling:i:this._getFirstRow()}_getNextRow(){let i=this._getCurrentFocusedRow();return i?i.nextElementSibling?i.nextElementSibling:i:this._getFirstRow()}_getFirstRow(){return this.domNode.domNode.querySelector(".diff-review-row")}_getCurrentFocusedRow(){let i=document.activeElement;return i&&/diff-review-row/.test(i.className)?i:null}_goToRow(i){let s=this._getCurrentFocusedRow();i.tabIndex=0,i.focus(),s&&s!==i&&(s.tabIndex=-1),this.scrollbar.scanDomNode()}isVisible(){return this._isVisible}layout(i,s,l){this._width=s,this.shadow.setTop(i-6),this.shadow.setWidth(s),this.shadow.setHeight(this._isVisible?6:0),this.domNode.setTop(i),this.domNode.setWidth(s),this.domNode.setHeight(l),this._content.setHeight(l),this._content.setWidth(s),this._isVisible?(this.actionBarContainer.setAttribute("aria-hidden","false"),this.actionBarContainer.setDisplay("block")):(this.actionBarContainer.setAttribute("aria-hidden","true"),this.actionBarContainer.setDisplay("none"))}_compute(){const i=this._diffEditor.getLineChanges();if(!i||i.length===0)return[];const s=this._diffEditor.getOriginalEditor().getModel(),l=this._diffEditor.getModifiedEditor().getModel();return!s||!l?[]:e._mergeAdjacent(i,s.getLineCount(),l.getLineCount())}static _mergeAdjacent(i,s,l){if(!i||i.length===0)return[];let P=[],H=0;for(let st=0,Je=i.length;st<Je;st++){const wt=i[st],to=wt.originalStartLineNumber,lo=wt.originalEndLineNumber,po=wt.modifiedStartLineNumber,Ho=wt.modifiedEndLineNumber;let Vo=[],ii=0;{const Jo=lo===0?to:to-1,Go=Ho===0?po:po-1;let Si=1,Ai=1;if(st>0){const Xo=i[st-1];Xo.originalEndLineNumber===0?Si=Xo.originalStartLineNumber+1:Si=Xo.originalEndLineNumber+1,Xo.modifiedEndLineNumber===0?Ai=Xo.modifiedStartLineNumber+1:Ai=Xo.modifiedEndLineNumber+1}let ai=Jo-Ss+1,Fo=Go-Ss+1;if(ai<Si){const Xo=Si-ai;ai=ai+Xo,Fo=Fo+Xo}if(Fo<Ai){const Xo=Ai-Fo;ai=ai+Xo,Fo=Fo+Xo}Vo[ii++]=new rs(ai,Jo,Fo,Go)}lo!==0&&(Vo[ii++]=new rs(to,lo,0,0)),Ho!==0&&(Vo[ii++]=new rs(0,0,po,Ho));{const Jo=lo===0?to+1:lo+1,Go=Ho===0?po+1:Ho+1;let Si=s,Ai=l;if(st+1<Je){const Xo=i[st+1];Xo.originalEndLineNumber===0?Si=Xo.originalStartLineNumber:Si=Xo.originalStartLineNumber-1,Xo.modifiedEndLineNumber===0?Ai=Xo.modifiedStartLineNumber:Ai=Xo.modifiedStartLineNumber-1}let ai=Jo+Ss-1,Fo=Go+Ss-1;if(ai>Si){const Xo=Si-ai;ai=ai+Xo,Fo=Fo+Xo}if(Fo>Ai){const Xo=Ai-Fo;ai=ai+Xo,Fo=Fo+Xo}Vo[ii++]=new rs(Jo,ai,Go,Fo)}P[H++]=new as(Vo)}let X=P[0].entries,ge=[],Ue=0;for(let st=1,Je=P.length;st<Je;st++){const wt=P[st].entries,to=X[X.length-1],lo=wt[0];if(to.getType()===0&&lo.getType()===0&&lo.originalLineStart<=to.originalLineEnd){X[X.length-1]=new rs(to.originalLineStart,lo.originalLineEnd,to.modifiedLineStart,lo.modifiedLineEnd),X=X.concat(wt.slice(1));continue}ge[Ue++]=new as(X),X=wt}return ge[Ue++]=new as(X),ge}_findDiffIndex(i){const s=i.lineNumber;for(let l=0,P=this._diffs.length;l<P;l++){const H=this._diffs[l].entries,X=H[H.length-1].modifiedLineEnd;if(s<=X)return l}return 0}_render(){const i=this._diffEditor.getOriginalEditor().getOptions(),s=this._diffEditor.getModifiedEditor().getOptions(),l=this._diffEditor.getOriginalEditor().getModel(),P=this._diffEditor.getModifiedEditor().getModel(),H=l.getOptions(),X=P.getOptions();if(!this._isVisible||!l||!P){Se.t(this._content.domNode),this._currentDiff=null,this.scrollbar.scanDomNode();return}this._diffEditor.updateOptions({readOnly:!0});const ge=this._findDiffIndex(this._diffEditor.getPosition());if(this._diffs[ge]===this._currentDiff)return;this._currentDiff=this._diffs[ge];const Ue=this._diffs[ge].entries;let st=document.createElement("div");st.className="diff-review-table",st.setAttribute("role","list"),st.setAttribute("aria-label",'Difference review. Use "Stage | Unstage | Revert Selected Ranges" commands'),Ns.a.applyFontInfoSlow(st,s.get(43));let Je=0,wt=0,to=0,lo=0;for(let Fo=0,Xo=Ue.length;Fo<Xo;Fo++){const ei=Ue[Fo],Mi=ei.originalLineStart,qi=ei.originalLineEnd,gi=ei.modifiedLineStart,Yi=ei.modifiedLineEnd;Mi!==0&&(Je===0||Mi<Je)&&(Je=Mi),qi!==0&&(wt===0||qi>wt)&&(wt=qi),gi!==0&&(to===0||gi<to)&&(to=gi),Yi!==0&&(lo===0||Yi>lo)&&(lo=Yi)}let po=document.createElement("div");po.className="diff-review-row";let Ho=document.createElement("div");Ho.className="diff-review-cell diff-review-summary";const Vo=wt-Je+1,ii=lo-to+1;Ho.appendChild(document.createTextNode(`${ge+1}/${this._diffs.length}: @@ -${Je},${Vo} +${to},${ii} @@`)),po.setAttribute("data-line",String(to));const Jo=Fo=>Fo===0?De.a("no_lines_changed","no lines changed"):Fo===1?De.a("one_line_changed","1 line changed"):De.a("more_lines_changed","{0} lines changed",Fo),Go=Jo(Vo),Si=Jo(ii);po.setAttribute("aria-label",De.a({key:"header",comment:["This is the ARIA label for a git diff header.","A git diff header looks like this: @@ -154,12 +159,39 @@.","That encodes that at original line 154 (which is now line 159), 12 lines were removed/changed with 39 lines.","Variables 0 and 1 refer to the diff index out of total number of diffs.","Variables 2 and 4 will be numbers (a line number).",'Variables 3 and 5 will be "no lines changed", "1 line changed" or "X lines changed", localized separately.']},"Difference {0} of {1}: original line {2}, {3}, modified line {4}, {5}",ge+1,this._diffs.length,Je,Go,to,Si)),po.appendChild(Ho),po.setAttribute("role","listitem"),st.appendChild(po);const Ai=s.get(58);let ai=to;for(let Fo=0,Xo=Ue.length;Fo<Xo;Fo++){const ei=Ue[Fo];e._renderSection(st,ei,ai,Ai,this._width,i,l,H,s,P,X,this._modeService.languageIdCodec),ei.modifiedLineStart!==0&&(ai=ei.modifiedLineEnd)}Se.t(this._content.domNode),this._content.domNode.appendChild(st),this.scrollbar.scanDomNode()}static _renderSection(i,s,l,P,H,X,ge,Ue,st,Je,wt,to){const lo=s.getType();let po="diff-review-row",Ho="";const Vo="diff-review-spacer";let ii=null;switch(lo){case 1:po="diff-review-row line-insert",Ho=" char-insert",ii=ks;break;case 2:po="diff-review-row line-delete",Ho=" char-delete",ii=Zr;break}const Jo=s.originalLineStart,Go=s.originalLineEnd,Si=s.modifiedLineStart,Ai=s.modifiedLineEnd,ai=Math.max(Ai-Si,Go-Jo),Fo=X.get(129),Xo=Fo.glyphMarginWidth+Fo.lineNumbersWidth,ei=st.get(129),Mi=10+ei.glyphMarginWidth+ei.lineNumbersWidth;for(let qi=0;qi<=ai;qi++){const gi=Jo===0?0:Jo+qi,Yi=Si===0?0:Si+qi,On=document.createElement("div");On.style.minWidth=H+"px",On.className=po,On.setAttribute("role","listitem"),Yi!==0&&(l=Yi),On.setAttribute("data-line",String(l));let tn=document.createElement("div");tn.className="diff-review-cell",tn.style.height=`${P}px`,On.appendChild(tn);const jn=document.createElement("span");jn.style.width=Xo+"px",jn.style.minWidth=Xo+"px",jn.className="diff-review-line-number"+Ho,gi!==0?jn.appendChild(document.createTextNode(String(gi))):jn.innerText="\xA0",tn.appendChild(jn);const _n=document.createElement("span");_n.style.width=Mi+"px",_n.style.minWidth=Mi+"px",_n.style.paddingRight="10px",_n.className="diff-review-line-number"+Ho,Yi!==0?_n.appendChild(document.createTextNode(String(Yi))):_n.innerText="\xA0",tn.appendChild(_n);const ps=document.createElement("span");if(ps.className=Vo,ii){const Dn=document.createElement("span");Dn.className=nn.d.asClassName(ii),Dn.innerText="\xA0\xA0",ps.appendChild(Dn)}else ps.innerText="\xA0\xA0";tn.appendChild(ps);let Pn;if(Yi!==0){let Dn=this._renderLine(Je,st,wt.tabSize,Yi,to);e._ttPolicy&&(Dn=e._ttPolicy.createHTML(Dn)),tn.insertAdjacentHTML("beforeend",Dn),Pn=Je.getLineContent(Yi)}else{let Dn=this._renderLine(ge,X,Ue.tabSize,gi,to);e._ttPolicy&&(Dn=e._ttPolicy.createHTML(Dn)),tn.insertAdjacentHTML("beforeend",Dn),Pn=ge.getLineContent(gi)}Pn.length===0&&(Pn=De.a("blankLine","blank"));let bs="";switch(lo){case 0:gi===Yi?bs=De.a({key:"unchangedLine",comment:["The placeholders are contents of the line and should not be translated."]},"{0} unchanged line {1}",Pn,gi):bs=De.a("equalLine","{0} original line {1} modified line {2}",Pn,gi,Yi);break;case 1:bs=De.a("insertLine","+ {0} modified line {1}",Pn,Yi);break;case 2:bs=De.a("deleteLine","- {0} original line {1}",Pn,gi);break}On.setAttribute("aria-label",bs),i.appendChild(On)}}static _renderLine(i,s,l,P,H){const X=i.getLineContent(P),ge=s.get(43),Ue=F.a.createEmpty(X,H),st=Ae.g.isBasicASCII(X,i.mightContainNonBasicASCII()),Je=Ae.g.containsRTL(X,st,i.mightContainRTL()),wt=Object(te.e)(new te.c(ge.isMonospace&&!s.get(29),ge.canUseHalfwidthRightwardsArrow,X,!1,st,Je,0,Ue,[],l,0,ge.spaceWidth,ge.middotWidth,ge.wsmiddotWidth,s.get(104),s.get(87),s.get(82),s.get(44)!==g.e.OFF,null));return wt.html}};ws._ttPolicy=(ir=window.trustedTypes)===null||ir===void 0?void 0:ir.createPolicy("diffReview",{createHTML:e=>e}),ws=Xr([$r(1,xo.a)],ws),Object(nn.f)((e,i)=>{const s=e.getColor(Hn.D);s&&i.addRule(`.monaco-diff-editor .diff-review-line-number { color: ${s}; }`);const l=e.getColor(ni.yc);l&&i.addRule(`.monaco-diff-editor .diff-review-shadow { box-shadow: ${l} 0 -6px 6px -6px inset; }`)});class Qr extends Zn.b{constructor(){super({id:"editor.action.diffReview.next",label:De.a("editor.action.diffReview.next","Go to Next Difference"),alias:"Go to Next Difference",precondition:Ct.a.has("isInDiffEditor"),kbOpts:{kbExpr:null,primary:65,weight:100}})}run(e,i){const s=yr(e);s&&s.diffReviewNext()}}class sr extends Zn.b{constructor(){super({id:"editor.action.diffReview.prev",label:De.a("editor.action.diffReview.prev","Go to Previous Difference"),alias:"Go to Previous Difference",precondition:Ct.a.has("isInDiffEditor"),kbOpts:{kbExpr:null,primary:1024|65,weight:100}})}run(e,i){const s=yr(e);s&&s.diffReviewPrev()}}function yr(e){const i=e.get(Be.a),s=i.listDiffEditors(),l=i.getActiveCodeEditor();if(!l)return null;for(let P=0,H=s.length;P<H;P++){const X=s[P];if(X.getModifiedEditor().getId()===l.getId()||X.getOriginalEditor().getId()===l.getId())return X}return null}Object(Zn.j)(Qr),Object(Zn.j)(sr);var Jr=t("erNZ"),Vn=t("tX9W"),js=t("MvK1"),Er=t("dBaI"),vn=t("Cg/j"),Ps=t("8HsV"),zn=t("Uzvx"),Fs=function(e,i,s,l){function P(H){return H instanceof s?H:new s(function(X){X(H)})}return new(s||(s=Promise))(function(H,X){function ge(Je){try{st(l.next(Je))}catch(wt){X(wt)}}function Ue(Je){try{st(l.throw(Je))}catch(wt){X(wt)}}function st(Je){Je.done?H(Je.value):P(Je.value).then(ge,Ue)}st((l=l.apply(e,i||[])).next())})};class qr extends $e.a{constructor(e,i,s,l,P,H){super();this._viewZoneId=e,this._marginDomNode=i,this.editor=s,this.diff=l,this._contextMenuService=P,this._clipboardService=H,this._visibility=!1,this._marginDomNode.style.zIndex="10",this._diffActions=document.createElement("div"),this._diffActions.className=xn.b.lightBulb.classNames+" lightbulb-glyph",this._diffActions.style.position="absolute";const X=s.getOption(58),ge=s.getModel().getEOL();this._diffActions.style.right="0px",this._diffActions.style.visibility="hidden",this._diffActions.style.height=`${X}px`,this._diffActions.style.lineHeight=`${X}px`,this._marginDomNode.appendChild(this._diffActions);const Ue=[],st=l.modifiedEndLineNumber===0;Ue.push(new An.a("diff.clipboard.copyDeletedContent",st?l.originalEndLineNumber>l.modifiedStartLineNumber?De.a("diff.clipboard.copyDeletedLinesContent.label","Copy deleted lines"):De.a("diff.clipboard.copyDeletedLinesContent.single.label","Copy deleted line"):l.originalEndLineNumber>l.modifiedStartLineNumber?De.a("diff.clipboard.copyChangedLinesContent.label","Copy changed lines"):De.a("diff.clipboard.copyChangedLinesContent.single.label","Copy changed line"),void 0,!0,()=>Fs(this,void 0,void 0,function*(){const po=new I.a(l.originalStartLineNumber,1,l.originalEndLineNumber+1,1),Ho=l.originalModel.getValueInRange(po);yield this._clipboardService.writeText(Ho)})));let Je=0,wt;l.originalEndLineNumber>l.modifiedStartLineNumber&&(wt=new An.a("diff.clipboard.copyDeletedLineContent",st?De.a("diff.clipboard.copyDeletedLineContent.label","Copy deleted line ({0})",l.originalStartLineNumber):De.a("diff.clipboard.copyChangedLineContent.label","Copy changed line ({0})",l.originalStartLineNumber),void 0,!0,()=>Fs(this,void 0,void 0,function*(){const po=l.originalModel.getLineContent(l.originalStartLineNumber+Je);if(po===""){const Ho=l.originalModel.getEndOfLineSequence();yield this._clipboardService.writeText(Ho===0?`
|
|
|
`:`\r
|
|
|
`)}else yield this._clipboardService.writeText(po)})),Ue.push(wt));const to=s.getOption(80);to||Ue.push(new An.a("diff.inline.revertChange",De.a("diff.inline.revertChange.label","Revert this change"),void 0,!0,()=>Fs(this,void 0,void 0,function*(){const po=new I.a(l.originalStartLineNumber,1,l.originalEndLineNumber,l.originalModel.getLineMaxColumn(l.originalEndLineNumber)),Ho=l.originalModel.getValueInRange(po);if(l.modifiedEndLineNumber===0){const Vo=s.getModel().getLineMaxColumn(l.modifiedStartLineNumber);s.executeEdits("diffEditor",[{range:new I.a(l.modifiedStartLineNumber,Vo,l.modifiedStartLineNumber,Vo),text:ge+Ho}])}else{const Vo=s.getModel().getLineMaxColumn(l.modifiedEndLineNumber);s.executeEdits("diffEditor",[{range:new I.a(l.modifiedStartLineNumber,1,l.modifiedEndLineNumber,Vo),text:Ho}])}})));const lo=(po,Ho)=>{this._contextMenuService.showContextMenu({getAnchor:()=>({x:po,y:Ho}),getActions:()=>(wt&&(wt.label=st?De.a("diff.clipboard.copyDeletedLineContent.label","Copy deleted line ({0})",l.originalStartLineNumber+Je):De.a("diff.clipboard.copyChangedLineContent.label","Copy changed line ({0})",l.originalStartLineNumber+Je)),Ue),autoSelectFirstItem:!0})};this._register(Se.o(this._diffActions,"mousedown",po=>{const{top:Ho,height:Vo}=Se.D(this._diffActions);let ii=Math.floor(X/3);po.preventDefault(),lo(po.posx,Ho+Vo+ii)})),this._register(s.onMouseMove(po=>{if(po.target.type===8||po.target.type===5){const Ho=po.target.detail.viewZoneId;Ho===this._viewZoneId?(this.visibility=!0,Je=this._updateLightBulbPosition(this._marginDomNode,po.event.browserEvent.y,X)):this.visibility=!1}else this.visibility=!1})),this._register(s.onMouseDown(po=>{if(!po.event.rightButton)return;if(po.target.type===8||po.target.type===5){const Ho=po.target.detail.viewZoneId;Ho===this._viewZoneId&&(po.event.preventDefault(),Je=this._updateLightBulbPosition(this._marginDomNode,po.event.browserEvent.y,X),lo(po.event.posx,po.event.posy+X))}}))}get visibility(){return this._visibility}set visibility(e){this._visibility!==e&&(this._visibility=e,e?this._diffActions.style.visibility="visible":this._diffActions.style.visibility="hidden")}_updateLightBulbPosition(e,i,s){const{top:l}=Se.D(e),P=i-l,H=Math.floor(P/s),X=H*s;if(this._diffActions.style.top=`${X}px`,this.diff.viewLineCounts){let ge=0;for(let Ue=0;Ue<this.diff.viewLineCounts.length;Ue++)if(ge+=this.diff.viewLineCounts[Ue],H<ge)return Ue}return H}}var Bs=t("9XeP"),Ws=t("tTk5"),ea=t("o39E"),ta=t("51su"),oa=function(e,i,s,l){var P=arguments.length,H=P<3?i:l===null?l=Object.getOwnPropertyDescriptor(i,s):l,X;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")H=Reflect.decorate(e,i,s,l);else for(var ge=e.length-1;ge>=0;ge--)(X=e[ge])&&(H=(P<3?X(H):P>3?X(i,s,H):X(i,s))||H);return P>3&&H&&Object.defineProperty(i,s,H),H},Fn=function(e,i){return function(s,l){i(s,l,e)}},Ls;class rr{constructor(e,i){this._contextMenuService=e,this._clipboardService=i,this._zones=[],this._inlineDiffMargins=[],this._zonesMap={},this._decorations=[]}getForeignViewZones(e){return e.filter(i=>!this._zonesMap[String(i.id)])}clean(e){this._zones.length>0&&e.changeViewZones(i=>{for(const s of this._zones)i.removeZone(s)}),this._zones=[],this._zonesMap={},this._decorations=e.deltaDecorations(this._decorations,[])}apply(e,i,s,l){const P=l?Gi.c.capture(e):null;e.changeViewZones(H=>{var X;for(const ge of this._zones)H.removeZone(ge);for(const ge of this._inlineDiffMargins)ge.dispose();this._zones=[],this._zonesMap={},this._inlineDiffMargins=[];for(let ge=0,Ue=s.zones.length;ge<Ue;ge++){const st=s.zones[ge];st.suppressMouseDown=!0;const Je=H.addZone(st);this._zones.push(Je),this._zonesMap[String(Je)]=!0,s.zones[ge].diff&&st.marginDomNode&&(st.suppressMouseDown=!1,((X=s.zones[ge].diff)===null||X===void 0?void 0:X.originalModel.getValueLength())!==0&&this._inlineDiffMargins.push(new qr(Je,st.marginDomNode,e,s.zones[ge].diff,this._contextMenuService,this._clipboardService)))}}),P&&P.restore(e),this._decorations=e.deltaDecorations(this._decorations,s.decorations),i&&i.setZones(s.overviewZones)}}let ia=0;const na=Object(ss.b)("diff-insert",xn.b.add,De.a("diffInsertIcon","Line decoration for inserts in the diff editor.")),ls=Object(ss.b)("diff-remove",xn.b.remove,De.a("diffRemoveIcon","Line decoration for removals in the diff editor.")),ar=(Ls=window.trustedTypes)===null||Ls===void 0?void 0:Ls.createPolicy("diffEditorWidget",{createHTML:e=>e});let Kn=class e extends $e.a{constructor(i,s,l,P,H,X,ge,Ue,st,Je,wt,to){super();this._editorProgressService=to,this._onDidDispose=this._register(new x.b),this.onDidDispose=this._onDidDispose.event,this._onDidUpdateDiff=this._register(new x.b),this.onDidUpdateDiff=this._onDidUpdateDiff.event,this._onDidContentSizeChange=this._register(new x.b),this._lastOriginalWarning=null,this._lastModifiedWarning=null,this._editorWorkerService=H,this._codeEditorService=Ue,this._contextKeyService=this._register(X.createScoped(i)),this._instantiationService=ge.createChild(new Ps.a([Ct.b,this._contextKeyService])),this._contextKeyService.createKey("isInDiffEditor",!0),this._themeService=st,this._notificationService=Je,this._id=++ia,this._state=0,this._updatingDiffProgress=null,this._domElement=i,s=s||{},this._options=Vs(s,{enableSplitViewResizing:!0,renderSideBySide:!0,maxComputationTime:5e3,maxFileSize:50,ignoreTrimWhitespace:!0,renderIndicators:!0,originalEditable:!1,diffCodeLens:!1,renderOverviewRuler:!0,diffWordWrap:"inherit"}),typeof s.isInEmbeddedEditor!="undefined"?this._contextKeyService.createKey("isInEmbeddedDiffEditor",s.isInEmbeddedEditor):this._contextKeyService.createKey("isInEmbeddedDiffEditor",!1),this._updateDecorationsRunner=this._register(new Lo.e(()=>this._updateDecorations(),0)),this._containerDomElement=document.createElement("div"),this._containerDomElement.className=e._getClassName(this._themeService.getColorTheme(),this._options.renderSideBySide),this._containerDomElement.style.position="relative",this._containerDomElement.style.height="100%",this._domElement.appendChild(this._containerDomElement),this._overviewViewportDomElement=Object(ys.b)(document.createElement("div")),this._overviewViewportDomElement.setClassName("diffViewport"),this._overviewViewportDomElement.setPosition("absolute"),this._overviewDomElement=document.createElement("div"),this._overviewDomElement.className="diffOverview",this._overviewDomElement.style.position="absolute",this._overviewDomElement.appendChild(this._overviewViewportDomElement.domNode),this._register(Se.o(this._overviewDomElement,"mousedown",po=>{this._modifiedEditor.delegateVerticalScrollbarMouseDown(po)})),this._options.renderOverviewRuler&&this._containerDomElement.appendChild(this._overviewDomElement),this._originalDomNode=document.createElement("div"),this._originalDomNode.className="editor original",this._originalDomNode.style.position="absolute",this._originalDomNode.style.height="100%",this._containerDomElement.appendChild(this._originalDomNode),this._modifiedDomNode=document.createElement("div"),this._modifiedDomNode.className="editor modified",this._modifiedDomNode.style.position="absolute",this._modifiedDomNode.style.height="100%",this._containerDomElement.appendChild(this._modifiedDomNode),this._beginUpdateDecorationsTimeout=-1,this._currentlyChangingViewZones=!1,this._diffComputationToken=0,this._originalEditorState=new rr(wt,P),this._modifiedEditorState=new rr(wt,P),this._isVisible=!0,this._isHandlingScrollEvent=!1,this._elementSizeObserver=this._register(new ea.a(this._containerDomElement,s.dimension,()=>this._onDidContainerSizeChanged())),s.automaticLayout&&this._elementSizeObserver.startObserving(),this._diffComputationResult=null,this._originalEditor=this._createLeftHandSideEditor(s,l.originalEditor||{}),this._modifiedEditor=this._createRightHandSideEditor(s,l.modifiedEditor||{}),this._originalOverviewRuler=null,this._modifiedOverviewRuler=null,this._reviewPane=ge.createInstance(ws,this),this._containerDomElement.appendChild(this._reviewPane.domNode.domNode),this._containerDomElement.appendChild(this._reviewPane.shadow.domNode),this._containerDomElement.appendChild(this._reviewPane.actionBarContainer.domNode),this._options.renderSideBySide?this._setStrategy(new Jn(this._createDataSource(),this._options.enableSplitViewResizing)):this._setStrategy(new Hs(this._createDataSource(),this._options.enableSplitViewResizing)),this._register(st.onDidColorThemeChange(po=>{this._strategy&&this._strategy.applyColors(po)&&this._updateDecorationsRunner.schedule(),this._containerDomElement.className=e._getClassName(this._themeService.getColorTheme(),this._options.renderSideBySide)}));const lo=Zn.d.getDiffEditorContributions();for(const po of lo)try{this._register(ge.createInstance(po.ctor,this))}catch(Ho){Object(To.f)(Ho)}this._codeEditorService.addDiffEditor(this)}_setState(i){if(this._state===i)return;this._state=i,this._updatingDiffProgress&&(this._updatingDiffProgress.done(),this._updatingDiffProgress=null),this._state===1&&(this._updatingDiffProgress=this._editorProgressService.show(!0,1e3))}diffReviewNext(){this._reviewPane.next()}diffReviewPrev(){this._reviewPane.prev()}static _getClassName(i,s){let l="monaco-diff-editor monaco-editor-background ";return s&&(l+="side-by-side "),l+=Object(nn.e)(i.type),l}_recreateOverviewRulers(){if(!this._options.renderOverviewRuler)return;this._originalOverviewRuler&&(this._overviewDomElement.removeChild(this._originalOverviewRuler.getDomNode()),this._originalOverviewRuler.dispose()),this._originalEditor.hasModel()&&(this._originalOverviewRuler=this._originalEditor.createOverviewRuler("original diffOverviewRuler"),this._overviewDomElement.appendChild(this._originalOverviewRuler.getDomNode())),this._modifiedOverviewRuler&&(this._overviewDomElement.removeChild(this._modifiedOverviewRuler.getDomNode()),this._modifiedOverviewRuler.dispose()),this._modifiedEditor.hasModel()&&(this._modifiedOverviewRuler=this._modifiedEditor.createOverviewRuler("modified diffOverviewRuler"),this._overviewDomElement.appendChild(this._modifiedOverviewRuler.getDomNode())),this._layoutOverviewRulers()}_createLeftHandSideEditor(i,s){const l=this._createInnerEditor(this._instantiationService,this._originalDomNode,this._adjustOptionsForLeftHandSide(i),s);this._register(l.onDidScrollChange(H=>{if(this._isHandlingScrollEvent)return;if(!H.scrollTopChanged&&!H.scrollLeftChanged&&!H.scrollHeightChanged)return;this._isHandlingScrollEvent=!0,this._modifiedEditor.setScrollPosition({scrollLeft:H.scrollLeft,scrollTop:H.scrollTop}),this._isHandlingScrollEvent=!1,this._layoutOverviewViewport()})),this._register(l.onDidChangeViewZones(()=>{this._onViewZonesChanged()})),this._register(l.onDidChangeConfiguration(H=>{if(!l.getModel())return;H.hasChanged(43)&&this._updateDecorationsRunner.schedule(),H.hasChanged(130)&&(this._updateDecorationsRunner.cancel(),this._updateDecorations())})),this._register(l.onDidChangeHiddenAreas(()=>{this._updateDecorationsRunner.cancel(),this._updateDecorations()})),this._register(l.onDidChangeModelContent(()=>{this._isVisible&&this._beginUpdateDecorationsSoon()}));const P=this._contextKeyService.createKey("isInDiffLeftEditor",l.hasWidgetFocus());return this._register(l.onDidFocusEditorWidget(()=>P.set(!0))),this._register(l.onDidBlurEditorWidget(()=>P.set(!1))),this._register(l.onDidContentSizeChange(H=>{const X=this._originalEditor.getContentWidth()+this._modifiedEditor.getContentWidth()+e.ONE_OVERVIEW_WIDTH,ge=Math.max(this._modifiedEditor.getContentHeight(),this._originalEditor.getContentHeight());this._onDidContentSizeChange.fire({contentHeight:ge,contentWidth:X,contentHeightChanged:H.contentHeightChanged,contentWidthChanged:H.contentWidthChanged})})),l}_createRightHandSideEditor(i,s){const l=this._createInnerEditor(this._instantiationService,this._modifiedDomNode,this._adjustOptionsForRightHandSide(i),s);this._register(l.onDidScrollChange(H=>{if(this._isHandlingScrollEvent)return;if(!H.scrollTopChanged&&!H.scrollLeftChanged&&!H.scrollHeightChanged)return;this._isHandlingScrollEvent=!0,this._originalEditor.setScrollPosition({scrollLeft:H.scrollLeft,scrollTop:H.scrollTop}),this._isHandlingScrollEvent=!1,this._layoutOverviewViewport()})),this._register(l.onDidChangeViewZones(()=>{this._onViewZonesChanged()})),this._register(l.onDidChangeConfiguration(H=>{if(!l.getModel())return;H.hasChanged(43)&&this._updateDecorationsRunner.schedule(),H.hasChanged(130)&&(this._updateDecorationsRunner.cancel(),this._updateDecorations())})),this._register(l.onDidChangeHiddenAreas(()=>{this._updateDecorationsRunner.cancel(),this._updateDecorations()})),this._register(l.onDidChangeModelContent(()=>{this._isVisible&&this._beginUpdateDecorationsSoon()})),this._register(l.onDidChangeModelOptions(H=>{H.tabSize&&this._updateDecorationsRunner.schedule()}));const P=this._contextKeyService.createKey("isInDiffRightEditor",l.hasWidgetFocus());return this._register(l.onDidFocusEditorWidget(()=>P.set(!0))),this._register(l.onDidBlurEditorWidget(()=>P.set(!1))),this._register(l.onDidContentSizeChange(H=>{const X=this._originalEditor.getContentWidth()+this._modifiedEditor.getContentWidth()+e.ONE_OVERVIEW_WIDTH,ge=Math.max(this._modifiedEditor.getContentHeight(),this._originalEditor.getContentHeight());this._onDidContentSizeChange.fire({contentHeight:ge,contentWidth:X,contentHeightChanged:H.contentHeightChanged,contentWidthChanged:H.contentWidthChanged})})),l}_createInnerEditor(i,s,l,P){return i.createInstance(or.a,s,l,P)}dispose(){this._codeEditorService.removeDiffEditor(this),this._beginUpdateDecorationsTimeout!==-1&&(window.clearTimeout(this._beginUpdateDecorationsTimeout),this._beginUpdateDecorationsTimeout=-1),this._cleanViewZonesAndDecorations(),this._originalOverviewRuler&&(this._overviewDomElement.removeChild(this._originalOverviewRuler.getDomNode()),this._originalOverviewRuler.dispose()),this._modifiedOverviewRuler&&(this._overviewDomElement.removeChild(this._modifiedOverviewRuler.getDomNode()),this._modifiedOverviewRuler.dispose()),this._overviewDomElement.removeChild(this._overviewViewportDomElement.domNode),this._options.renderOverviewRuler&&this._containerDomElement.removeChild(this._overviewDomElement),this._containerDomElement.removeChild(this._originalDomNode),this._originalEditor.dispose(),this._containerDomElement.removeChild(this._modifiedDomNode),this._modifiedEditor.dispose(),this._strategy.dispose(),this._containerDomElement.removeChild(this._reviewPane.domNode.domNode),this._containerDomElement.removeChild(this._reviewPane.shadow.domNode),this._containerDomElement.removeChild(this._reviewPane.actionBarContainer.domNode),this._reviewPane.dispose(),this._domElement.removeChild(this._containerDomElement),this._onDidDispose.fire(),super.dispose()}getId(){return this.getEditorType()+":"+this._id}getEditorType(){return Et.a.IDiffEditor}getLineChanges(){return this._diffComputationResult?this._diffComputationResult.changes:null}getOriginalEditor(){return this._originalEditor}getModifiedEditor(){return this._modifiedEditor}updateOptions(i){const s=Vs(i,this._options),l=wr(this._options,s);this._options=s;const P=l.ignoreTrimWhitespace||l.renderIndicators,H=this._isVisible&&(l.maxComputationTime||l.maxFileSize);P?this._beginUpdateDecorations():H&&this._beginUpdateDecorationsSoon(),this._modifiedEditor.updateOptions(this._adjustOptionsForRightHandSide(i)),this._originalEditor.updateOptions(this._adjustOptionsForLeftHandSide(i)),this._strategy.setEnableSplitViewResizing(this._options.enableSplitViewResizing),l.renderSideBySide&&(this._options.renderSideBySide?this._setStrategy(new Jn(this._createDataSource(),this._options.enableSplitViewResizing)):this._setStrategy(new Hs(this._createDataSource(),this._options.enableSplitViewResizing)),this._containerDomElement.className=e._getClassName(this._themeService.getColorTheme(),this._options.renderSideBySide)),l.renderOverviewRuler&&(this._options.renderOverviewRuler?this._containerDomElement.appendChild(this._overviewDomElement):this._containerDomElement.removeChild(this._overviewDomElement))}getModel(){return{original:this._originalEditor.getModel(),modified:this._modifiedEditor.getModel()}}setModel(i){if(i&&(!i.original||!i.modified))throw new Error(i.original?"DiffEditorWidget.setModel: Modified model is null":"DiffEditorWidget.setModel: Original model is null");this._cleanViewZonesAndDecorations(),this._originalEditor.setModel(i?i.original:null),this._modifiedEditor.setModel(i?i.modified:null),this._updateDecorationsRunner.cancel(),i&&(this._originalEditor.setScrollTop(0),this._modifiedEditor.setScrollTop(0)),this._diffComputationResult=null,this._diffComputationToken++,this._setState(0),i&&(this._recreateOverviewRulers(),this._beginUpdateDecorations()),this._layoutOverviewViewport()}getDomNode(){return this._domElement}getVisibleColumnFromPosition(i){return this._modifiedEditor.getVisibleColumnFromPosition(i)}getPosition(){return this._modifiedEditor.getPosition()}setPosition(i){this._modifiedEditor.setPosition(i)}revealLine(i,s=0){this._modifiedEditor.revealLine(i,s)}revealLineInCenter(i,s=0){this._modifiedEditor.revealLineInCenter(i,s)}revealLineInCenterIfOutsideViewport(i,s=0){this._modifiedEditor.revealLineInCenterIfOutsideViewport(i,s)}revealLineNearTop(i,s=0){this._modifiedEditor.revealLineNearTop(i,s)}revealPosition(i,s=0){this._modifiedEditor.revealPosition(i,s)}revealPositionInCenter(i,s=0){this._modifiedEditor.revealPositionInCenter(i,s)}revealPositionInCenterIfOutsideViewport(i,s=0){this._modifiedEditor.revealPositionInCenterIfOutsideViewport(i,s)}revealPositionNearTop(i,s=0){this._modifiedEditor.revealPositionNearTop(i,s)}getSelection(){return this._modifiedEditor.getSelection()}getSelections(){return this._modifiedEditor.getSelections()}setSelection(i){this._modifiedEditor.setSelection(i)}setSelections(i){this._modifiedEditor.setSelections(i)}revealLines(i,s,l=0){this._modifiedEditor.revealLines(i,s,l)}revealLinesInCenter(i,s,l=0){this._modifiedEditor.revealLinesInCenter(i,s,l)}revealLinesInCenterIfOutsideViewport(i,s,l=0){this._modifiedEditor.revealLinesInCenterIfOutsideViewport(i,s,l)}revealLinesNearTop(i,s,l=0){this._modifiedEditor.revealLinesNearTop(i,s,l)}revealRange(i,s=0,l=!1,P=!0){this._modifiedEditor.revealRange(i,s,l,P)}revealRangeInCenter(i,s=0){this._modifiedEditor.revealRangeInCenter(i,s)}revealRangeInCenterIfOutsideViewport(i,s=0){this._modifiedEditor.revealRangeInCenterIfOutsideViewport(i,s)}revealRangeNearTop(i,s=0){this._modifiedEditor.revealRangeNearTop(i,s)}revealRangeNearTopIfOutsideViewport(i,s=0){this._modifiedEditor.revealRangeNearTopIfOutsideViewport(i,s)}revealRangeAtTop(i,s=0){this._modifiedEditor.revealRangeAtTop(i,s)}getSupportedActions(){return this._modifiedEditor.getSupportedActions()}saveViewState(){const i=this._originalEditor.saveViewState(),s=this._modifiedEditor.saveViewState();return{original:i,modified:s}}restoreViewState(i){if(i&&i.original&&i.modified){const s=i;this._originalEditor.restoreViewState(s.original),this._modifiedEditor.restoreViewState(s.modified)}}layout(i){this._elementSizeObserver.observe(i)}focus(){this._modifiedEditor.focus()}hasTextFocus(){return this._originalEditor.hasTextFocus()||this._modifiedEditor.hasTextFocus()}trigger(i,s,l){this._modifiedEditor.trigger(i,s,l)}changeDecorations(i){return this._modifiedEditor.changeDecorations(i)}_onDidContainerSizeChanged(){this._doLayout()}_getReviewHeight(){return this._reviewPane.isVisible()?this._elementSizeObserver.getHeight():0}_layoutOverviewRulers(){if(!this._options.renderOverviewRuler)return;if(!this._originalOverviewRuler||!this._modifiedOverviewRuler)return;const i=this._elementSizeObserver.getHeight(),s=this._getReviewHeight(),l=e.ENTIRE_DIFF_OVERVIEW_WIDTH-2*e.ONE_OVERVIEW_WIDTH,P=this._modifiedEditor.getLayoutInfo();P&&(this._originalOverviewRuler.setLayout({top:0,width:e.ONE_OVERVIEW_WIDTH,right:l+e.ONE_OVERVIEW_WIDTH,height:i-s}),this._modifiedOverviewRuler.setLayout({top:0,right:0,width:e.ONE_OVERVIEW_WIDTH,height:i-s}))}_onViewZonesChanged(){if(this._currentlyChangingViewZones)return;this._updateDecorationsRunner.schedule()}_beginUpdateDecorationsSoon(){this._beginUpdateDecorationsTimeout!==-1&&(window.clearTimeout(this._beginUpdateDecorationsTimeout),this._beginUpdateDecorationsTimeout=-1),this._beginUpdateDecorationsTimeout=window.setTimeout(()=>this._beginUpdateDecorations(),e.UPDATE_DIFF_DECORATIONS_DELAY)}static _equals(i,s){return!i&&!s?!0:!i||!s?!1:i.toString()===s.toString()}_beginUpdateDecorations(){this._beginUpdateDecorationsTimeout=-1;const i=this._originalEditor.getModel(),s=this._modifiedEditor.getModel();if(!i||!s)return;this._diffComputationToken++;const l=this._diffComputationToken,P=this._options.maxFileSize*1024*1024,H=X=>{const ge=X.getValueLength();return P===0||ge<=P};if(!H(i)||!H(s)){(!e._equals(i.uri,this._lastOriginalWarning)||!e._equals(s.uri,this._lastModifiedWarning))&&(this._lastOriginalWarning=i.uri,this._lastModifiedWarning=s.uri,this._notificationService.warn(De.a("diff.tooLarge","Cannot compare files because one file is too large.")));return}this._setState(1),this._editorWorkerService.computeDiff(i.uri,s.uri,this._options.ignoreTrimWhitespace,this._options.maxComputationTime).then(X=>{l===this._diffComputationToken&&i===this._originalEditor.getModel()&&s===this._modifiedEditor.getModel()&&(this._setState(2),this._diffComputationResult=X,this._updateDecorationsRunner.schedule(),this._onDidUpdateDiff.fire())},X=>{l===this._diffComputationToken&&i===this._originalEditor.getModel()&&s===this._modifiedEditor.getModel()&&(this._setState(2),this._diffComputationResult=null,this._updateDecorationsRunner.schedule())})}_cleanViewZonesAndDecorations(){this._originalEditorState.clean(this._originalEditor),this._modifiedEditorState.clean(this._modifiedEditor)}_updateDecorations(){if(!this._originalEditor.getModel()||!this._modifiedEditor.getModel())return;const i=this._diffComputationResult?this._diffComputationResult.changes:[],s=this._originalEditorState.getForeignViewZones(this._originalEditor.getWhitespaces()),l=this._modifiedEditorState.getForeignViewZones(this._modifiedEditor.getWhitespaces()),P=this._strategy.getEditorsDiffDecorations(i,this._options.ignoreTrimWhitespace,this._options.renderIndicators,s,l);try{this._currentlyChangingViewZones=!0,this._originalEditorState.apply(this._originalEditor,this._originalOverviewRuler,P.original,!1),this._modifiedEditorState.apply(this._modifiedEditor,this._modifiedOverviewRuler,P.modified,!0)}finally{this._currentlyChangingViewZones=!1}}_adjustOptionsForSubEditor(i){const s=Object.assign({},i);return s.inDiffEditor=!0,s.automaticLayout=!1,s.scrollbar=Object.assign({},s.scrollbar||{}),s.scrollbar.vertical="visible",s.folding=!1,s.codeLens=this._options.diffCodeLens,s.fixedOverflowWidgets=!0,s.minimap=Object.assign({},s.minimap||{}),s.minimap.enabled=!1,s}_adjustOptionsForLeftHandSide(i){const s=this._adjustOptionsForSubEditor(i);return this._options.renderSideBySide?s.wordWrapOverride1=this._options.diffWordWrap:s.wordWrapOverride1="off",i.originalAriaLabel&&(s.ariaLabel=i.originalAriaLabel),s.readOnly=!this._options.originalEditable,s.extraEditorClassName="original-in-monaco-diff-editor",Object.assign(Object.assign({},s),{dimension:{height:0,width:0}})}_adjustOptionsForRightHandSide(i){const s=this._adjustOptionsForSubEditor(i);return i.modifiedAriaLabel&&(s.ariaLabel=i.modifiedAriaLabel),s.wordWrapOverride1=this._options.diffWordWrap,s.revealHorizontalRightPadding=g.g.revealHorizontalRightPadding.defaultValue+e.ENTIRE_DIFF_OVERVIEW_WIDTH,s.scrollbar.verticalHasArrows=!1,s.extraEditorClassName="modified-in-monaco-diff-editor",Object.assign(Object.assign({},s),{dimension:{height:0,width:0}})}doLayout(){this._elementSizeObserver.observe(),this._doLayout()}_doLayout(){const i=this._elementSizeObserver.getWidth(),s=this._elementSizeObserver.getHeight(),l=this._getReviewHeight(),P=this._strategy.layout();this._originalDomNode.style.width=P+"px",this._originalDomNode.style.left="0px",this._modifiedDomNode.style.width=i-P+"px",this._modifiedDomNode.style.left=P+"px",this._overviewDomElement.style.top="0px",this._overviewDomElement.style.height=s-l+"px",this._overviewDomElement.style.width=e.ENTIRE_DIFF_OVERVIEW_WIDTH+"px",this._overviewDomElement.style.left=i-e.ENTIRE_DIFF_OVERVIEW_WIDTH+"px",this._overviewViewportDomElement.setWidth(e.ENTIRE_DIFF_OVERVIEW_WIDTH),this._overviewViewportDomElement.setHeight(30),this._originalEditor.layout({width:P,height:s-l}),this._modifiedEditor.layout({width:i-P-(this._options.renderOverviewRuler?e.ENTIRE_DIFF_OVERVIEW_WIDTH:0),height:s-l}),(this._originalOverviewRuler||this._modifiedOverviewRuler)&&this._layoutOverviewRulers(),this._reviewPane.layout(s-l,i,l),this._layoutOverviewViewport()}_layoutOverviewViewport(){const i=this._computeOverviewViewport();i?(this._overviewViewportDomElement.setTop(i.top),this._overviewViewportDomElement.setHeight(i.height)):(this._overviewViewportDomElement.setTop(0),this._overviewViewportDomElement.setHeight(0))}_computeOverviewViewport(){const i=this._modifiedEditor.getLayoutInfo();if(!i)return null;const s=this._modifiedEditor.getScrollTop(),l=this._modifiedEditor.getScrollHeight(),P=Math.max(0,i.height),H=Math.max(0,P-2*0),X=l>0?H/l:0,ge=Math.max(0,Math.floor(i.height*X)),Ue=Math.floor(s*X);return{height:ge,top:Ue}}_createDataSource(){return{getWidth:()=>this._elementSizeObserver.getWidth(),getHeight:()=>this._elementSizeObserver.getHeight()-this._getReviewHeight(),getOptions:()=>({renderOverviewRuler:this._options.renderOverviewRuler}),getContainerDomNode:()=>this._containerDomElement,relayoutEditors:()=>{this._doLayout()},getOriginalEditor:()=>this._originalEditor,getModifiedEditor:()=>this._modifiedEditor}}_setStrategy(i){this._strategy&&this._strategy.dispose(),this._strategy=i,i.applyColors(this._themeService.getColorTheme()),this._diffComputationResult&&this._updateDecorations(),this._doLayout()}_getLineChangeAtOrBeforeLineNumber(i,s){const l=this._diffComputationResult?this._diffComputationResult.changes:[];if(l.length===0||i<s(l[0]))return null;let P=0,H=l.length-1;for(;P<H;){const X=Math.floor((P+H)/2),ge=s(l[X]),Ue=X+1<=H?s(l[X+1]):1073741824;i<ge?H=X-1:i>=Ue?P=X+1:(P=X,H=X)}return l[P]}_getEquivalentLineForOriginalLineNumber(i){const s=this._getLineChangeAtOrBeforeLineNumber(i,Ue=>Ue.originalStartLineNumber);if(!s)return i;const l=s.originalStartLineNumber+(s.originalEndLineNumber>0?-1:0),P=s.modifiedStartLineNumber+(s.modifiedEndLineNumber>0?-1:0),H=s.originalEndLineNumber>0?s.originalEndLineNumber-s.originalStartLineNumber+1:0,X=s.modifiedEndLineNumber>0?s.modifiedEndLineNumber-s.modifiedStartLineNumber+1:0,ge=i-l;return ge<=H?P+Math.min(ge,X):P+X-H+ge}_getEquivalentLineForModifiedLineNumber(i){const s=this._getLineChangeAtOrBeforeLineNumber(i,Ue=>Ue.modifiedStartLineNumber);if(!s)return i;const l=s.originalStartLineNumber+(s.originalEndLineNumber>0?-1:0),P=s.modifiedStartLineNumber+(s.modifiedEndLineNumber>0?-1:0),H=s.originalEndLineNumber>0?s.originalEndLineNumber-s.originalStartLineNumber+1:0,X=s.modifiedEndLineNumber>0?s.modifiedEndLineNumber-s.modifiedStartLineNumber+1:0,ge=i-P;return ge<=X?l+Math.min(ge,H):l+H-X+ge}getDiffLineInformationForOriginal(i){return this._diffComputationResult?{equivalentLineNumber:this._getEquivalentLineForOriginalLineNumber(i)}:null}getDiffLineInformationForModified(i){return this._diffComputationResult?{equivalentLineNumber:this._getEquivalentLineForModifiedLineNumber(i)}:null}};Kn.ONE_OVERVIEW_WIDTH=15,Kn.ENTIRE_DIFF_OVERVIEW_WIDTH=30,Kn.UPDATE_DIFF_DECORATIONS_DELAY=200,Kn=oa([Fn(3,Bs.a),Fn(4,Mo.a),Fn(5,Ct.b),Fn(6,vn.a),Fn(7,Be.a),Fn(8,nn.b),Fn(9,Ko.a),Fn(10,zn.a),Fn(11,Ws.a)],Kn);class lr extends $e.a{constructor(e){super();this._dataSource=e,this._insertColor=null,this._removeColor=null}applyColors(e){const i=(e.getColor(ni.m)||ni.i).transparent(2),s=(e.getColor(ni.o)||ni.j).transparent(2),l=!i.equals(this._insertColor)||!s.equals(this._removeColor);return this._insertColor=i,this._removeColor=s,l}getEditorsDiffDecorations(e,i,s,l,P){P=P.sort((Ue,st)=>Ue.afterLineNumber-st.afterLineNumber),l=l.sort((Ue,st)=>Ue.afterLineNumber-st.afterLineNumber);const H=this._getViewZones(e,l,P,s),X=this._getOriginalEditorDecorations(e,i,s),ge=this._getModifiedEditorDecorations(e,i,s);return{original:{decorations:X.decorations,overviewZones:X.overviewZones,zones:H.original},modified:{decorations:ge.decorations,overviewZones:ge.overviewZones,zones:H.modified}}}}class Us{constructor(e){this._source=e,this._index=-1,this.current=null,this.advance()}advance(){this._index++,this._index<this._source.length?this.current=this._source[this._index]:this.current=null}}class Qn{constructor(e,i,s,l,P){this._lineChanges=e,this._originalForeignVZ=i,this._modifiedForeignVZ=s,this._originalEditor=l,this._modifiedEditor=P}static _getViewLineCount(e,i,s){const l=e.getModel(),P=e._getViewModel();if(l&&P){const H=_s(l,P,i,s);return H.endLineNumber-H.startLineNumber+1}return s-i+1}getViewZones(){const e=this._originalEditor.getOption(58),i=this._modifiedEditor.getOption(58),s=this._originalEditor.getOption(130).wrappingColumn!==-1,l=this._modifiedEditor.getOption(130).wrappingColumn!==-1,P=s||l,H=this._originalEditor.getModel(),X=this._originalEditor._getViewModel().coordinatesConverter,ge=this._modifiedEditor._getViewModel().coordinatesConverter,Ue={original:[],modified:[]};let st=0,Je=0,wt=0,to=0,lo=0,po=0;const Ho=(Ai,ai)=>Ai.afterLineNumber-ai.afterLineNumber,Vo=(Ai,ai)=>{if(ai.domNode===null&&Ai.length>0){const Fo=Ai[Ai.length-1];if(Fo.afterLineNumber===ai.afterLineNumber&&Fo.domNode===null){Fo.heightInLines+=ai.heightInLines;return}}Ai.push(ai)},ii=new Us(this._modifiedForeignVZ),Jo=new Us(this._originalForeignVZ);let Go=1,Si=1;for(let Ai=0,ai=this._lineChanges.length;Ai<=ai;Ai++){const Fo=Ai<ai?this._lineChanges[Ai]:null;Fo!==null?(wt=Fo.originalStartLineNumber+(Fo.originalEndLineNumber>0?-1:0),to=Fo.modifiedStartLineNumber+(Fo.modifiedEndLineNumber>0?-1:0),Je=Fo.originalEndLineNumber>0?Qn._getViewLineCount(this._originalEditor,Fo.originalStartLineNumber,Fo.originalEndLineNumber):0,st=Fo.modifiedEndLineNumber>0?Qn._getViewLineCount(this._modifiedEditor,Fo.modifiedStartLineNumber,Fo.modifiedEndLineNumber):0,lo=Math.max(Fo.originalStartLineNumber,Fo.originalEndLineNumber),po=Math.max(Fo.modifiedStartLineNumber,Fo.modifiedEndLineNumber)):(wt+=1e7+Je,to+=1e7+st,lo=wt,po=to);let Xo=[],ei=[];if(P){let gi;Fo?Fo.originalEndLineNumber>0?gi=Fo.originalStartLineNumber-Go:gi=Fo.modifiedStartLineNumber-Si:gi=H.getLineCount()-Go;for(let Yi=0;Yi<gi;Yi++){const On=Go+Yi,tn=Si+Yi,jn=X.getModelLineViewLineCount(On),_n=ge.getModelLineViewLineCount(tn);jn<_n?Xo.push({afterLineNumber:On,heightInLines:_n-jn,domNode:null,marginDomNode:null}):jn>_n&&ei.push({afterLineNumber:tn,heightInLines:jn-_n,domNode:null,marginDomNode:null})}Fo&&(Go=(Fo.originalEndLineNumber>0?Fo.originalEndLineNumber:Fo.originalStartLineNumber)+1,Si=(Fo.modifiedEndLineNumber>0?Fo.modifiedEndLineNumber:Fo.modifiedStartLineNumber)+1)}for(;ii.current&&ii.current.afterLineNumber<=po;){let gi;ii.current.afterLineNumber<=to?gi=wt-to+ii.current.afterLineNumber:gi=lo;let Yi=null;Fo&&Fo.modifiedStartLineNumber<=ii.current.afterLineNumber&&ii.current.afterLineNumber<=Fo.modifiedEndLineNumber&&(Yi=this._createOriginalMarginDomNodeForModifiedForeignViewZoneInAddedRegion()),Xo.push({afterLineNumber:gi,heightInLines:ii.current.height/i,domNode:null,marginDomNode:Yi}),ii.advance()}for(;Jo.current&&Jo.current.afterLineNumber<=lo;){let gi;Jo.current.afterLineNumber<=wt?gi=to-wt+Jo.current.afterLineNumber:gi=po,ei.push({afterLineNumber:gi,heightInLines:Jo.current.height/e,domNode:null}),Jo.advance()}if(Fo!==null&&ds(Fo)){const gi=this._produceOriginalFromDiff(Fo,Je,st);gi&&Xo.push(gi)}if(Fo!==null&&Rn(Fo)){const gi=this._produceModifiedFromDiff(Fo,Je,st);gi&&ei.push(gi)}let Mi=0,qi=0;for(Xo=Xo.sort(Ho),ei=ei.sort(Ho);Mi<Xo.length&&qi<ei.length;){const gi=Xo[Mi],Yi=ei[qi],On=gi.afterLineNumber-wt,tn=Yi.afterLineNumber-to;On<tn?(Vo(Ue.original,gi),Mi++):tn<On?(Vo(Ue.modified,Yi),qi++):gi.shouldNotShrink?(Vo(Ue.original,gi),Mi++):Yi.shouldNotShrink?(Vo(Ue.modified,Yi),qi++):gi.heightInLines>=Yi.heightInLines?(gi.heightInLines-=Yi.heightInLines,qi++):(Yi.heightInLines-=gi.heightInLines,Mi++)}for(;Mi<Xo.length;)Vo(Ue.original,Xo[Mi]),Mi++;for(;qi<ei.length;)Vo(Ue.modified,ei[qi]),qi++}return{original:Qn._ensureDomNodes(Ue.original),modified:Qn._ensureDomNodes(Ue.modified)}}static _ensureDomNodes(e){return e.map(i=>(i.domNode||(i.domNode=Sr()),i))}}function Gn(e,i,s,l,P){return{range:new I.a(e,i,s,l),options:P}}const Sn={charDelete:Vn.b.register({description:"diff-editor-char-delete",className:"char-delete"}),charDeleteWholeLine:Vn.b.register({description:"diff-editor-char-delete-whole-line",className:"char-delete",isWholeLine:!0}),charInsert:Vn.b.register({description:"diff-editor-char-insert",className:"char-insert"}),charInsertWholeLine:Vn.b.register({description:"diff-editor-char-insert-whole-line",className:"char-insert",isWholeLine:!0}),lineInsert:Vn.b.register({description:"diff-editor-line-insert",className:"line-insert",marginClassName:"line-insert",isWholeLine:!0}),lineInsertWithSign:Vn.b.register({description:"diff-editor-line-insert-with-sign",className:"line-insert",linesDecorationsClassName:"insert-sign "+nn.d.asClassName(na),marginClassName:"line-insert",isWholeLine:!0}),lineDelete:Vn.b.register({description:"diff-editor-line-delete",className:"line-delete",marginClassName:"line-delete",isWholeLine:!0}),lineDeleteWithSign:Vn.b.register({description:"diff-editor-line-delete-with-sign",className:"line-delete",linesDecorationsClassName:"delete-sign "+nn.d.asClassName(ls),marginClassName:"line-delete",isWholeLine:!0}),lineDeleteMargin:Vn.b.register({description:"diff-editor-line-delete-margin",marginClassName:"line-delete"})};class Jn extends lr{constructor(e,i){super(e);this._disableSash=i===!1,this._sashRatio=null,this._sashPosition=null,this._startSashPosition=null,this._sash=this._register(new Gr.b(this._dataSource.getContainerDomNode(),this,{orientation:0})),this._disableSash&&(this._sash.state=0),this._sash.onDidStart(()=>this._onSashDragStart()),this._sash.onDidChange(s=>this._onSashDrag(s)),this._sash.onDidEnd(()=>this._onSashDragEnd()),this._sash.onDidReset(()=>this._onSashReset())}setEnableSplitViewResizing(e){const i=e===!1;this._disableSash!==i&&(this._disableSash=i,this._sash.state=this._disableSash?0:3)}layout(e=this._sashRatio){const i=this._dataSource.getWidth(),s=i-(this._dataSource.getOptions().renderOverviewRuler?Kn.ENTIRE_DIFF_OVERVIEW_WIDTH:0);let l=Math.floor((e||.5)*s);const P=Math.floor(.5*s);return l=this._disableSash?P:l||P,s>Jn.MINIMUM_EDITOR_WIDTH*2?(l<Jn.MINIMUM_EDITOR_WIDTH&&(l=Jn.MINIMUM_EDITOR_WIDTH),l>s-Jn.MINIMUM_EDITOR_WIDTH&&(l=s-Jn.MINIMUM_EDITOR_WIDTH)):l=P,this._sashPosition!==l&&(this._sashPosition=l,this._sash.layout()),this._sashPosition}_onSashDragStart(){this._startSashPosition=this._sashPosition}_onSashDrag(e){const i=this._dataSource.getWidth(),s=i-(this._dataSource.getOptions().renderOverviewRuler?Kn.ENTIRE_DIFF_OVERVIEW_WIDTH:0),l=this.layout((this._startSashPosition+(e.currentX-e.startX))/s);this._sashRatio=l/s,this._dataSource.relayoutEditors()}_onSashDragEnd(){this._sash.layout()}_onSashReset(){this._sashRatio=.5,this._dataSource.relayoutEditors(),this._sash.layout()}getVerticalSashTop(e){return 0}getVerticalSashLeft(e){return this._sashPosition}getVerticalSashHeight(e){return this._dataSource.getHeight()}_getViewZones(e,i,s){const l=this._dataSource.getOriginalEditor(),P=this._dataSource.getModifiedEditor(),H=new sa(e,i,s,l,P);return H.getViewZones()}_getOriginalEditorDecorations(e,i,s){const l=this._dataSource.getOriginalEditor(),P=String(this._removeColor),H={decorations:[],overviewZones:[]},X=l.getModel(),ge=l._getViewModel();for(const Ue of e)if(Rn(Ue)){H.decorations.push({range:new I.a(Ue.originalStartLineNumber,1,Ue.originalEndLineNumber,1073741824),options:s?Sn.lineDeleteWithSign:Sn.lineDelete}),(!ds(Ue)||!Ue.charChanges)&&H.decorations.push(Gn(Ue.originalStartLineNumber,1,Ue.originalEndLineNumber,1073741824,Sn.charDeleteWholeLine));const st=_s(X,ge,Ue.originalStartLineNumber,Ue.originalEndLineNumber);if(H.overviewZones.push(new js.a(st.startLineNumber,st.endLineNumber,P)),Ue.charChanges){for(const Je of Ue.charChanges)if(Rn(Je))if(i)for(let wt=Je.originalStartLineNumber;wt<=Je.originalEndLineNumber;wt++){let to,lo;wt===Je.originalStartLineNumber?to=Je.originalStartColumn:to=X.getLineFirstNonWhitespaceColumn(wt),wt===Je.originalEndLineNumber?lo=Je.originalEndColumn:lo=X.getLineLastNonWhitespaceColumn(wt),H.decorations.push(Gn(wt,to,wt,lo,Sn.charDelete))}else H.decorations.push(Gn(Je.originalStartLineNumber,Je.originalStartColumn,Je.originalEndLineNumber,Je.originalEndColumn,Sn.charDelete))}}return H}_getModifiedEditorDecorations(e,i,s){const l=this._dataSource.getModifiedEditor(),P=String(this._insertColor),H={decorations:[],overviewZones:[]},X=l.getModel(),ge=l._getViewModel();for(const Ue of e)if(ds(Ue)){H.decorations.push({range:new I.a(Ue.modifiedStartLineNumber,1,Ue.modifiedEndLineNumber,1073741824),options:s?Sn.lineInsertWithSign:Sn.lineInsert}),(!Rn(Ue)||!Ue.charChanges)&&H.decorations.push(Gn(Ue.modifiedStartLineNumber,1,Ue.modifiedEndLineNumber,1073741824,Sn.charInsertWholeLine));const st=_s(X,ge,Ue.modifiedStartLineNumber,Ue.modifiedEndLineNumber);if(H.overviewZones.push(new js.a(st.startLineNumber,st.endLineNumber,P)),Ue.charChanges){for(const Je of Ue.charChanges)if(ds(Je))if(i)for(let wt=Je.modifiedStartLineNumber;wt<=Je.modifiedEndLineNumber;wt++){let to,lo;wt===Je.modifiedStartLineNumber?to=Je.modifiedStartColumn:to=X.getLineFirstNonWhitespaceColumn(wt),wt===Je.modifiedEndLineNumber?lo=Je.modifiedEndColumn:lo=X.getLineLastNonWhitespaceColumn(wt),H.decorations.push(Gn(wt,to,wt,lo,Sn.charInsert))}else H.decorations.push(Gn(Je.modifiedStartLineNumber,Je.modifiedStartColumn,Je.modifiedEndLineNumber,Je.modifiedEndColumn,Sn.charInsert))}}return H}}Jn.MINIMUM_EDITOR_WIDTH=100;class sa extends Qn{constructor(e,i,s,l,P){super(e,i,s,l,P)}_createOriginalMarginDomNodeForModifiedForeignViewZoneInAddedRegion(){return null}_produceOriginalFromDiff(e,i,s){return s>i?{afterLineNumber:Math.max(e.originalStartLineNumber,e.originalEndLineNumber),heightInLines:s-i,domNode:null}:null}_produceModifiedFromDiff(e,i,s){return i>s?{afterLineNumber:Math.max(e.modifiedStartLineNumber,e.modifiedEndLineNumber),heightInLines:i-s,domNode:null}:null}}class Hs extends lr{constructor(e,i){super(e);this._decorationsLeft=e.getOriginalEditor().getLayoutInfo().decorationsLeft,this._register(e.getOriginalEditor().onDidLayoutChange(s=>{this._decorationsLeft!==s.decorationsLeft&&(this._decorationsLeft=s.decorationsLeft,e.relayoutEditors())}))}setEnableSplitViewResizing(e){}_getViewZones(e,i,s,l){const P=this._dataSource.getOriginalEditor(),H=this._dataSource.getModifiedEditor(),X=new dr(e,i,s,P,H,l);return X.getViewZones()}_getOriginalEditorDecorations(e,i,s){const l=String(this._removeColor),P={decorations:[],overviewZones:[]},H=this._dataSource.getOriginalEditor(),X=H.getModel(),ge=H._getViewModel();for(const Ue of e)if(Rn(Ue)){P.decorations.push({range:new I.a(Ue.originalStartLineNumber,1,Ue.originalEndLineNumber,1073741824),options:Sn.lineDeleteMargin});const st=_s(X,ge,Ue.originalStartLineNumber,Ue.originalEndLineNumber);P.overviewZones.push(new js.a(st.startLineNumber,st.endLineNumber,l))}return P}_getModifiedEditorDecorations(e,i,s){const l=this._dataSource.getModifiedEditor(),P=String(this._insertColor),H={decorations:[],overviewZones:[]},X=l.getModel(),ge=l._getViewModel();for(const Ue of e)if(ds(Ue)){H.decorations.push({range:new I.a(Ue.modifiedStartLineNumber,1,Ue.modifiedEndLineNumber,1073741824),options:s?Sn.lineInsertWithSign:Sn.lineInsert});const st=_s(X,ge,Ue.modifiedStartLineNumber,Ue.modifiedEndLineNumber);if(H.overviewZones.push(new js.a(st.startLineNumber,st.endLineNumber,P)),Ue.charChanges){for(const Je of Ue.charChanges)if(ds(Je))if(i)for(let wt=Je.modifiedStartLineNumber;wt<=Je.modifiedEndLineNumber;wt++){let to,lo;wt===Je.modifiedStartLineNumber?to=Je.modifiedStartColumn:to=X.getLineFirstNonWhitespaceColumn(wt),wt===Je.modifiedEndLineNumber?lo=Je.modifiedEndColumn:lo=X.getLineLastNonWhitespaceColumn(wt),H.decorations.push(Gn(wt,to,wt,lo,Sn.charInsert))}else H.decorations.push(Gn(Je.modifiedStartLineNumber,Je.modifiedStartColumn,Je.modifiedEndLineNumber,Je.modifiedEndColumn,Sn.charInsert))}else H.decorations.push(Gn(Ue.modifiedStartLineNumber,1,Ue.modifiedEndLineNumber,1073741824,Sn.charInsertWholeLine))}return H}layout(){return Math.max(5,this._decorationsLeft)}}class dr extends Qn{constructor(e,i,s,l,P,H){super(e,i,s,l,P);this._originalModel=l.getModel(),this._renderIndicators=H,this._pendingLineChange=[],this._pendingViewZones=[],this._lineBreaksComputer=this._modifiedEditor._getViewModel().createLineBreaksComputer()}getViewZones(){const e=super.getViewZones();return this._finalize(e),e}_createOriginalMarginDomNodeForModifiedForeignViewZoneInAddedRegion(){const e=document.createElement("div");return e.className="inline-added-margin-view-zone",e}_produceOriginalFromDiff(e,i,s){const l=document.createElement("div");return l.className="inline-added-margin-view-zone",{afterLineNumber:Math.max(e.originalStartLineNumber,e.originalEndLineNumber),heightInLines:s,domNode:document.createElement("div"),marginDomNode:l}}_produceModifiedFromDiff(e,i,s){const l=document.createElement("div");l.className=`view-lines line-delete ${ta.a}`;const P=document.createElement("div");P.className="inline-deleted-margin-view-zone";const H={shouldNotShrink:!0,afterLineNumber:e.modifiedEndLineNumber===0?e.modifiedStartLineNumber:e.modifiedStartLineNumber-1,heightInLines:i,minWidthInPx:0,domNode:l,marginDomNode:P,diff:{originalStartLineNumber:e.originalStartLineNumber,originalEndLineNumber:e.originalEndLineNumber,modifiedStartLineNumber:e.modifiedStartLineNumber,modifiedEndLineNumber:e.modifiedEndLineNumber,originalModel:this._originalModel,viewLineCounts:null}};for(let X=e.originalStartLineNumber;X<=e.originalEndLineNumber;X++)this._lineBreaksComputer.addRequest(this._originalModel.getLineContent(X),null,null);return this._pendingLineChange.push(e),this._pendingViewZones.push(H),H}_finalize(e){const i=this._modifiedEditor.getOptions(),s=this._modifiedEditor.getModel().getOptions().tabSize,l=i.get(43),P=i.get(29),H=l.typicalHalfwidthCharacterWidth,X=i.get(92),ge=this._originalModel.mightContainNonBasicASCII(),Ue=this._originalModel.mightContainRTL(),st=i.get(58),Je=i.get(129),wt=Je.decorationsWidth,to=i.get(104),lo=i.get(87),po=i.get(82),Ho=i.get(44),Vo=this._lineBreaksComputer.finalize();let ii=0;for(let Jo=0;Jo<this._pendingLineChange.length;Jo++){const Go=this._pendingLineChange[Jo],Si=this._pendingViewZones[Jo],Ai=Si.domNode;Ns.a.applyFontInfoSlow(Ai,l);const ai=Si.marginDomNode;Ns.a.applyFontInfoSlow(ai,l);const Fo=[];if(Go.charChanges)for(const tn of Go.charChanges)Rn(tn)&&Fo.push(new Ae.a(new I.a(tn.originalStartLineNumber,tn.originalStartColumn,tn.originalEndLineNumber,tn.originalEndColumn),"char-delete",0));const Xo=Fo.length>0,ei=Object(Jr.a)(1e4);let Mi=0,qi=0,gi=null;for(let tn=Go.originalStartLineNumber;tn<=Go.originalEndLineNumber;tn++){const jn=tn-Go.originalStartLineNumber,_n=this._originalModel.getLineTokens(tn),ps=_n.getLineContent(),Pn=Vo[ii++],bs=Er.a.filter(Fo,tn,1,ps.length+1);if(Pn){let Dn=0;for(const Vr of Pn.breakOffsets){const Ju=_n.sliceAndInflate(Dn,Vr,0),qu=ps.substring(Dn,Vr);Mi=Math.max(Mi,this._renderOriginalLine(qi++,qu,Ju,Er.a.extractWrapped(bs,Dn,Vr),Xo,ge,Ue,l,P,st,wt,to,lo,po,Ho,s,ei,ai)),Dn=Vr}for(gi||(gi=[]);gi.length<jn;)gi[gi.length]=1;gi[jn]=Pn.breakOffsets.length,Si.heightInLines+=Pn.breakOffsets.length-1;const Ql=document.createElement("div");Ql.className="line-delete",e.original.push({afterLineNumber:tn,afterColumn:0,heightInLines:Pn.breakOffsets.length-1,domNode:Sr(),marginDomNode:Ql})}else Mi=Math.max(Mi,this._renderOriginalLine(qi++,ps,_n,bs,Xo,ge,Ue,l,P,st,wt,to,lo,po,Ho,s,ei,ai))}Mi+=X;const Yi=ei.build(),On=ar?ar.createHTML(Yi):Yi;if(Ai.innerHTML=On,Si.minWidthInPx=Mi*H,gi){const tn=Go.originalEndLineNumber-Go.originalStartLineNumber;for(;gi.length<=tn;)gi[gi.length]=1}Si.diff.viewLineCounts=gi}e.original.sort((Jo,Go)=>Jo.afterLineNumber-Go.afterLineNumber)}_renderOriginalLine(e,i,s,l,P,H,X,ge,Ue,st,Je,wt,to,lo,po,Ho,Vo,ii){Vo.appendASCIIString('<div class="view-line'),P||Vo.appendASCIIString(" char-delete"),Vo.appendASCIIString('" style="top:'),Vo.appendASCIIString(String(e*st)),Vo.appendASCIIString('px;width:1000000px;">');const Jo=Ae.g.isBasicASCII(i,H),Go=Ae.g.containsRTL(i,Jo,X),Si=Object(te.d)(new te.c(ge.isMonospace&&!Ue,ge.canUseHalfwidthRightwardsArrow,i,!1,Jo,Go,0,s,l,Ho,0,ge.spaceWidth,ge.middotWidth,ge.wsmiddotWidth,wt,to,lo,po!==g.e.OFF,null),Vo);if(Vo.appendASCIIString("</div>"),this._renderIndicators){const Ai=document.createElement("div");Ai.className=`delete-sign ${nn.d.asClassName(ls)}`,Ai.setAttribute("style",`position:absolute;top:${e*st}px;width:${Je}px;height:${st}px;right:0;`),ii.appendChild(Ai)}return Si.characterMapping.getAbsoluteOffset(Si.characterMapping.length)}}function ra(e,i){return Object(g.o)(e,i,["off","on","inherit"])}function ds(e){return e.modifiedEndLineNumber>0}function Rn(e){return e.originalEndLineNumber>0}function Sr(){const e=document.createElement("div");return e.className="diagonal-fill",e}function _s(e,i,s,l){const P=e.getLineCount();return s=Math.min(P,Math.max(1,s)),l=Math.min(P,Math.max(1,l)),i.coordinatesConverter.convertModelRangeToViewRange(new I.a(s,e.getLineMinColumn(s),l,e.getLineMaxColumn(l)))}function Vs(e,i){return{enableSplitViewResizing:Object(g.k)(e.enableSplitViewResizing,i.enableSplitViewResizing),renderSideBySide:Object(g.k)(e.renderSideBySide,i.renderSideBySide),maxComputationTime:Object(g.l)(e.maxComputationTime,i.maxComputationTime,0,1073741824),maxFileSize:Object(g.l)(e.maxFileSize,i.maxFileSize,0,1073741824),ignoreTrimWhitespace:Object(g.k)(e.ignoreTrimWhitespace,i.ignoreTrimWhitespace),renderIndicators:Object(g.k)(e.renderIndicators,i.renderIndicators),originalEditable:Object(g.k)(e.originalEditable,i.originalEditable),diffCodeLens:Object(g.k)(e.diffCodeLens,i.diffCodeLens),renderOverviewRuler:Object(g.k)(e.renderOverviewRuler,i.renderOverviewRuler),diffWordWrap:ra(e.diffWordWrap,i.diffWordWrap)}}function wr(e,i){return{enableSplitViewResizing:e.enableSplitViewResizing!==i.enableSplitViewResizing,renderSideBySide:e.renderSideBySide!==i.renderSideBySide,maxComputationTime:e.maxComputationTime!==i.maxComputationTime,maxFileSize:e.maxFileSize!==i.maxFileSize,ignoreTrimWhitespace:e.ignoreTrimWhitespace!==i.ignoreTrimWhitespace,renderIndicators:e.renderIndicators!==i.renderIndicators,originalEditable:e.originalEditable!==i.originalEditable,diffCodeLens:e.diffCodeLens!==i.diffCodeLens,renderOverviewRuler:e.renderOverviewRuler!==i.renderOverviewRuler,diffWordWrap:e.diffWordWrap!==i.diffWordWrap}}Object(nn.f)((e,i)=>{const s=e.getColor(ni.m);s&&(i.addRule(`.monaco-editor .line-insert, .monaco-editor .char-insert { background-color: ${s}; }`),i.addRule(`.monaco-diff-editor .line-insert, .monaco-diff-editor .char-insert { background-color: ${s}; }`),i.addRule(`.monaco-editor .inline-added-margin-view-zone { background-color: ${s}; }`));const l=e.getColor(ni.o);l&&(i.addRule(`.monaco-editor .line-delete, .monaco-editor .char-delete { background-color: ${l}; }`),i.addRule(`.monaco-diff-editor .line-delete, .monaco-diff-editor .char-delete { background-color: ${l}; }`),i.addRule(`.monaco-editor .inline-deleted-margin-view-zone { background-color: ${l}; }`));const P=e.getColor(ni.n);P&&i.addRule(`.monaco-editor .line-insert, .monaco-editor .char-insert { border: 1px ${e.type==="hc"?"dashed":"solid"} ${P}; }`);const H=e.getColor(ni.p);H&&i.addRule(`.monaco-editor .line-delete, .monaco-editor .char-delete { border: 1px ${e.type==="hc"?"dashed":"solid"} ${H}; }`);const X=e.getColor(ni.yc);X&&i.addRule(`.monaco-diff-editor.side-by-side .editor.modified { box-shadow: -6px 0 5px -5px ${X}; }`);const ge=e.getColor(ni.k);ge&&i.addRule(`.monaco-diff-editor.side-by-side .editor.modified { border-left: 1px solid ${ge}; }`);const Ue=e.getColor(ni.Ac);Ue&&i.addRule(`
|
|
|
.monaco-diff-editor .diffViewport {
|
|
|
background: ${Ue};
|
|
|
}
|
|
|
`);const st=e.getColor(ni.Bc);st&&i.addRule(`
|
|
|
.monaco-diff-editor .diffViewport:hover {
|
|
|
background: ${st};
|
|
|
}
|
|
|
`);const Je=e.getColor(ni.zc);Je&&i.addRule(`
|
|
|
.monaco-diff-editor .diffViewport:active {
|
|
|
background: ${Je};
|
|
|
}
|
|
|
`);const wt=e.getColor(ni.l);i.addRule(`
|
|
|
.monaco-editor .diagonal-fill {
|
|
|
background-image: linear-gradient(
|
|
|
-45deg,
|
|
|
${wt} 12.5%,
|
|
|
#0000 12.5%, #0000 50%,
|
|
|
${wt} 50%, ${wt} 62.5%,
|
|
|
#0000 62.5%, #0000 100%
|
|
|
);
|
|
|
background-size: 8px 8px;
|
|
|
}
|
|
|
`)});var aa=t("9Y+e"),Ds=t("scqD"),Tn=t("fjLI"),ts=t("bexQ"),os=t("R3nR");class cr extends $e.a{constructor(){super();this._onCodeEditorAdd=this._register(new x.b),this.onCodeEditorAdd=this._onCodeEditorAdd.event,this._onCodeEditorRemove=this._register(new x.b),this.onCodeEditorRemove=this._onCodeEditorRemove.event,this._onDiffEditorAdd=this._register(new x.b),this._onDiffEditorRemove=this._register(new x.b),this._onDecorationTypeRegistered=this._register(new x.b),this._modelProperties=new Map,this._codeEditors=Object.create(null),this._diffEditors=Object.create(null)}addCodeEditor(e){this._codeEditors[e.getId()]=e,this._onCodeEditorAdd.fire(e)}removeCodeEditor(e){delete this._codeEditors[e.getId()]&&this._onCodeEditorRemove.fire(e)}listCodeEditors(){return Object.keys(this._codeEditors).map(e=>this._codeEditors[e])}addDiffEditor(e){this._diffEditors[e.getId()]=e,this._onDiffEditorAdd.fire(e)}removeDiffEditor(e){delete this._diffEditors[e.getId()]&&this._onDiffEditorRemove.fire(e)}listDiffEditors(){return Object.keys(this._diffEditors).map(e=>this._diffEditors[e])}getFocusedCodeEditor(){let e=null;const i=this.listCodeEditors();for(const s of i){if(s.hasTextFocus())return s;s.hasWidgetFocus()&&(e=s)}return e}setModelProperty(e,i,s){const l=e.toString();let P;this._modelProperties.has(l)?P=this._modelProperties.get(l):(P=new Map,this._modelProperties.set(l,P)),P.set(i,s)}getModelProperty(e,i){const s=e.toString();if(this._modelProperties.has(s)){const l=this._modelProperties.get(s);return l.get(i)}return}}var la=function(e,i,s,l){var P=arguments.length,H=P<3?i:l===null?l=Object.getOwnPropertyDescriptor(i,s):l,X;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")H=Reflect.decorate(e,i,s,l);else for(var ge=e.length-1;ge>=0;ge--)(X=e[ge])&&(H=(P<3?X(H):P>3?X(i,s,H):X(i,s))||H);return P>3&&H&&Object.defineProperty(i,s,H),H},da=function(e,i){return function(s,l){i(s,l,e)}};class ca{constructor(e,i,s){this._parent=e,this._editorId=i,this._styleSheet=s,this._refCount=0}ref(){this._refCount++}unref(){var e;this._refCount--,this._refCount===0&&((e=this._styleSheet.parentNode)===null||e===void 0||e.removeChild(this._styleSheet),this._parent._removeEditorStyleSheets(this._editorId))}insertRule(e,i){const s=this._styleSheet.sheet;s.insertRule(e,i)}removeRulesContainingSelector(e){Se.Q(e,this._styleSheet)}}class o{constructor(e){this._styleSheet=e}ref(){}unref(){}insertRule(e,i){const s=this._styleSheet.sheet;s.insertRule(e,i)}removeRulesContainingSelector(e){Se.Q(e,this._styleSheet)}}let n=class extends cr{constructor(i,s){super();this._decorationOptionProviders=new Map,this._editorStyleSheets=new Map,this._globalStyleSheet=i||null,this._themeService=s}_getOrCreateGlobalStyleSheet(){return this._globalStyleSheet||(this._globalStyleSheet=new o(Se.w())),this._globalStyleSheet}_getOrCreateStyleSheet(i){if(!i)return this._getOrCreateGlobalStyleSheet();const s=i.getContainerDomNode();if(!Se.O(s))return this._getOrCreateGlobalStyleSheet();const l=i.getId();if(!this._editorStyleSheets.has(l)){const P=new ca(this,l,Se.w(s));this._editorStyleSheets.set(l,P)}return this._editorStyleSheets.get(l)}_removeEditorStyleSheets(i){this._editorStyleSheets.delete(i)}registerDecorationType(i,s,l,P,H){let X=this._decorationOptionProviders.get(s);if(!X){const ge=this._getOrCreateStyleSheet(H),Ue={styleSheet:ge,key:s,parentTypeKey:P,options:l||Object.create(null)};P?X=new a(this._themeService,ge,Ue):X=new T(i,this._themeService,ge,Ue),this._decorationOptionProviders.set(s,X),this._onDecorationTypeRegistered.fire(s)}X.refCount++}removeDecorationType(i){const s=this._decorationOptionProviders.get(i);s&&(s.refCount--,s.refCount<=0&&(this._decorationOptionProviders.delete(i),s.dispose(),this.listCodeEditors().forEach(l=>l.removeDecorations(i))))}resolveDecorationOptions(i,s){const l=this._decorationOptionProviders.get(i);if(!l)throw new Error("Unknown decoration type key: "+i);return l.getOptions(this,s)}};n=la([da(1,nn.b)],n);class a{constructor(e,i,s){this._styleSheet=i,this._styleSheet.ref(),this._parentTypeKey=s.parentTypeKey,this.refCount=0,this._beforeContentRules=new Y(3,s,e),this._afterContentRules=new Y(4,s,e)}getOptions(e,i){const s=e.resolveDecorationOptions(this._parentTypeKey,!0);return this._beforeContentRules&&(s.beforeContentClassName=this._beforeContentRules.className),this._afterContentRules&&(s.afterContentClassName=this._afterContentRules.className),s}dispose(){this._beforeContentRules&&(this._beforeContentRules.dispose(),this._beforeContentRules=null),this._afterContentRules&&(this._afterContentRules.dispose(),this._afterContentRules=null),this._styleSheet.unref()}}class T{constructor(e,i,s,l){this._disposables=new $e.b,this.description=e,this._styleSheet=s,this._styleSheet.ref(),this.refCount=0;const P=Je=>{const wt=new Y(Je,l,i);return this._disposables.add(wt),wt.hasContent?wt.className:void 0},H=Je=>{const wt=new Y(Je,l,i);return this._disposables.add(wt),wt.hasContent?{className:wt.className,hasLetterSpacing:wt.hasLetterSpacing}:null};this.className=P(0);const X=H(1);if(X&&(this.inlineClassName=X.className,this.inlineClassNameAffectsLetterSpacing=X.hasLetterSpacing),this.beforeContentClassName=P(3),this.afterContentClassName=P(4),l.options.beforeInjectedText&&l.options.beforeInjectedText.contentText){const Je=H(5);this.beforeInjectedText={content:l.options.beforeInjectedText.contentText,inlineClassName:Je==null?void 0:Je.className,inlineClassNameAffectsLetterSpacing:(Je==null?void 0:Je.hasLetterSpacing)||l.options.beforeInjectedText.affectsLetterSpacing}}if(l.options.afterInjectedText&&l.options.afterInjectedText.contentText){const Je=H(6);this.afterInjectedText={content:l.options.afterInjectedText.contentText,inlineClassName:Je==null?void 0:Je.className,inlineClassNameAffectsLetterSpacing:(Je==null?void 0:Je.hasLetterSpacing)||l.options.afterInjectedText.affectsLetterSpacing}}this.glyphMarginClassName=P(2);const ge=l.options;this.isWholeLine=Boolean(ge.isWholeLine),this.stickiness=ge.rangeBehavior;const Ue=ge.light&&ge.light.overviewRulerColor||ge.overviewRulerColor,st=ge.dark&&ge.dark.overviewRulerColor||ge.overviewRulerColor;(typeof Ue!="undefined"||typeof st!="undefined")&&(this.overviewRuler={color:Ue||st,darkColor:st||Ue,position:ge.overviewRulerLane||It.g.Center})}getOptions(e,i){return i?{description:this.description,inlineClassName:this.inlineClassName,beforeContentClassName:this.beforeContentClassName,afterContentClassName:this.afterContentClassName,className:this.className,glyphMarginClassName:this.glyphMarginClassName,isWholeLine:this.isWholeLine,overviewRuler:this.overviewRuler,stickiness:this.stickiness,before:this.beforeInjectedText,after:this.afterInjectedText}:this}dispose(){this._disposables.dispose(),this._styleSheet.unref()}}const N={color:"color:{0} !important;",opacity:"opacity:{0};",backgroundColor:"background-color:{0};",outline:"outline:{0};",outlineColor:"outline-color:{0};",outlineStyle:"outline-style:{0};",outlineWidth:"outline-width:{0};",border:"border:{0};",borderColor:"border-color:{0};",borderRadius:"border-radius:{0};",borderSpacing:"border-spacing:{0};",borderStyle:"border-style:{0};",borderWidth:"border-width:{0};",fontStyle:"font-style:{0};",fontWeight:"font-weight:{0};",fontSize:"font-size:{0};",fontFamily:"font-family:{0};",textDecoration:"text-decoration:{0};",cursor:"cursor:{0};",letterSpacing:"letter-spacing:{0};",gutterIconPath:"background:{0} center center no-repeat;",gutterIconSize:"background-size:{0};",contentText:"content:'{0}';",contentIconPath:"content:{0};",margin:"margin:{0};",padding:"padding:{0};",width:"width:{0};",height:"height:{0};",verticalAlign:"vertical-align:{0};"};class Y{constructor(e,i,s){this._theme=s.getColorTheme(),this._ruleType=e,this._providerArgs=i,this._usesThemeColors=!1,this._hasContent=!1,this._hasLetterSpacing=!1;let l=be.getClassName(this._providerArgs.key,e);this._providerArgs.parentTypeKey&&(l=l+" "+be.getClassName(this._providerArgs.parentTypeKey,e)),this._className=l,this._unThemedSelector=be.getSelector(this._providerArgs.key,this._providerArgs.parentTypeKey,e),this._buildCSS(),this._usesThemeColors?this._themeListener=s.onDidColorThemeChange(P=>{this._theme=s.getColorTheme(),this._removeCSS(),this._buildCSS()}):this._themeListener=null}dispose(){this._hasContent&&(this._removeCSS(),this._hasContent=!1),this._themeListener&&(this._themeListener.dispose(),this._themeListener=null)}get hasContent(){return this._hasContent}get hasLetterSpacing(){return this._hasLetterSpacing}get className(){return this._className}_buildCSS(){const e=this._providerArgs.options;let i,s,l;switch(this._ruleType){case 0:i=this.getCSSTextForModelDecorationClassName(e),s=this.getCSSTextForModelDecorationClassName(e.light),l=this.getCSSTextForModelDecorationClassName(e.dark);break;case 1:i=this.getCSSTextForModelDecorationInlineClassName(e),s=this.getCSSTextForModelDecorationInlineClassName(e.light),l=this.getCSSTextForModelDecorationInlineClassName(e.dark);break;case 2:i=this.getCSSTextForModelDecorationGlyphMarginClassName(e),s=this.getCSSTextForModelDecorationGlyphMarginClassName(e.light),l=this.getCSSTextForModelDecorationGlyphMarginClassName(e.dark);break;case 3:i=this.getCSSTextForModelDecorationContentClassName(e.before),s=this.getCSSTextForModelDecorationContentClassName(e.light&&e.light.before),l=this.getCSSTextForModelDecorationContentClassName(e.dark&&e.dark.before);break;case 4:i=this.getCSSTextForModelDecorationContentClassName(e.after),s=this.getCSSTextForModelDecorationContentClassName(e.light&&e.light.after),l=this.getCSSTextForModelDecorationContentClassName(e.dark&&e.dark.after);break;case 5:i=this.getCSSTextForModelDecorationContentClassName(e.beforeInjectedText),s=this.getCSSTextForModelDecorationContentClassName(e.light&&e.light.beforeInjectedText),l=this.getCSSTextForModelDecorationContentClassName(e.dark&&e.dark.beforeInjectedText);break;case 6:i=this.getCSSTextForModelDecorationContentClassName(e.afterInjectedText),s=this.getCSSTextForModelDecorationContentClassName(e.light&&e.light.afterInjectedText),l=this.getCSSTextForModelDecorationContentClassName(e.dark&&e.dark.afterInjectedText);break;default:throw new Error("Unknown rule type: "+this._ruleType)}const P=this._providerArgs.styleSheet;let H=!1;i.length>0&&(P.insertRule(`${this._unThemedSelector} {${i}}`,0),H=!0),s.length>0&&(P.insertRule(`.vs${this._unThemedSelector} {${s}}`,0),H=!0),l.length>0&&(P.insertRule(`.vs-dark${this._unThemedSelector}, .hc-black${this._unThemedSelector} {${l}}`,0),H=!0),this._hasContent=H}_removeCSS(){this._providerArgs.styleSheet.removeRulesContainingSelector(this._unThemedSelector)}getCSSTextForModelDecorationClassName(e){if(!e)return"";const i=[];return this.collectCSSText(e,["backgroundColor"],i),this.collectCSSText(e,["outline","outlineColor","outlineStyle","outlineWidth"],i),this.collectBorderSettingsCSSText(e,i),i.join("")}getCSSTextForModelDecorationInlineClassName(e){if(!e)return"";const i=[];return this.collectCSSText(e,["fontStyle","fontWeight","textDecoration","cursor","color","opacity","letterSpacing"],i),e.letterSpacing&&(this._hasLetterSpacing=!0),i.join("")}getCSSTextForModelDecorationContentClassName(e){if(!e)return"";const i=[];if(typeof e!="undefined"){if(this.collectBorderSettingsCSSText(e,i),typeof e.contentIconPath!="undefined"&&i.push(ze.v(N.contentIconPath,Se.s(A.a.revive(e.contentIconPath)))),typeof e.contentText=="string"){const s=e.contentText.match(/^.*$/m)[0],l=s.replace(/['\\]/g,"\\$&");i.push(ze.v(N.contentText,l))}this.collectCSSText(e,["verticalAlign","fontStyle","fontWeight","fontSize","fontFamily","textDecoration","color","opacity","backgroundColor","margin","padding"],i),this.collectCSSText(e,["width","height"],i)&&i.push("display:inline-block;")}return i.join("")}getCSSTextForModelDecorationGlyphMarginClassName(e){if(!e)return"";const i=[];return typeof e.gutterIconPath!="undefined"&&(i.push(ze.v(N.gutterIconPath,Se.s(A.a.revive(e.gutterIconPath)))),typeof e.gutterIconSize!="undefined"&&i.push(ze.v(N.gutterIconSize,e.gutterIconSize))),i.join("")}collectBorderSettingsCSSText(e,i){return this.collectCSSText(e,["border","borderColor","borderRadius","borderSpacing","borderStyle","borderWidth"],i)?(i.push(ze.v("box-sizing: border-box;")),!0):!1}collectCSSText(e,i,s){const l=s.length;for(let P of i){const H=this.resolveValue(e[P]);typeof H=="string"&&s.push(ze.v(N[P],H))}return s.length!==l}resolveValue(e){if(Object(Et.b)(e)){this._usesThemeColors=!0;const i=this._theme.getColor(e.id);return i?i.toString():"transparent"}return e}}class be{static getClassName(e,i){return"ced-"+e+"-"+i}static getSelector(e,i,s){let l=".monaco-editor ."+this.getClassName(e,s);return i&&(l=l+"."+this.getClassName(i,s)),s===3?l+="::before":s===4&&(l+="::after"),l}}var xe=function(e,i,s,l){var P=arguments.length,H=P<3?i:l===null?l=Object.getOwnPropertyDescriptor(i,s):l,X;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")H=Reflect.decorate(e,i,s,l);else for(var ge=e.length-1;ge>=0;ge--)(X=e[ge])&&(H=(P<3?X(H):P>3?X(i,s,H):X(i,s))||H);return P>3&&H&&Object.defineProperty(i,s,H),H},Ke=function(e,i){return function(s,l){i(s,l,e)}};let Ze=class extends n{constructor(i,s,l){super(i,l);this.onCodeEditorAdd(()=>this._checkContextKey()),this.onCodeEditorRemove(()=>this._checkContextKey()),this._editorIsOpen=s.createKey("editorIsOpen",!1),this._activeCodeEditor=null}_checkContextKey(){let i=!1;for(const s of this.listCodeEditors())if(!s.isSimpleWidget){i=!0;break}this._editorIsOpen.set(i)}setActiveCodeEditor(i){this._activeCodeEditor=i}getActiveCodeEditor(){return this._activeCodeEditor}openCodeEditor(i,s,l){return s?Promise.resolve(this.doOpenEditor(s,i)):Promise.resolve(null)}doOpenEditor(i,s){const l=this.findModel(i,s.resource);if(!l){if(s.resource){const H=s.resource.scheme;if(H===we.c.http||H===we.c.https)return Object(Se.Z)(s.resource.toString()),i}return null}const P=s.options?s.options.selection:null;if(P)if(typeof P.endLineNumber=="number"&&typeof P.endColumn=="number")i.setSelection(P),i.revealRangeInCenter(P,1);else{const H={lineNumber:P.startLineNumber,column:P.startColumn};i.setPosition(H),i.revealPositionInCenter(H,1)}return i}findModel(i,s){const l=i.getModel();return l&&l.uri.toString()!==s.toString()?null:l}};Ze=xe([Ke(1,Ct.b),Ke(2,nn.b)],Ze);var nt=t("ubTv"),Ot=function(e,i,s,l){var P=arguments.length,H=P<3?i:l===null?l=Object.getOwnPropertyDescriptor(i,s):l,X;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")H=Reflect.decorate(e,i,s,l);else for(var ge=e.length-1;ge>=0;ge--)(X=e[ge])&&(H=(P<3?X(H):P>3?X(i,s,H):X(i,s))||H);return P>3&&H&&Object.defineProperty(i,s,H),H},ft=function(e,i){return function(s,l){i(s,l,e)}};let kt=0,Gt=!1;function eo(e){if(!e){if(Gt)return;Gt=!0}tr.b(e||document.body)}let co=class extends or.a{constructor(i,s,l,P,H,X,ge,Ue,st,Je){const wt=Object.assign({},s);wt.ariaLabel=wt.ariaLabel||Ki.g.editorViewAccessibleLabel,wt.ariaLabel=wt.ariaLabel+";"+Ki.g.accessibilityHelpMessage,super(i,wt,{},l,P,H,X,Ue,st,Je),ge instanceof ns?this._standaloneKeybindingService=ge:this._standaloneKeybindingService=null,eo(wt.ariaContainerElement)}addCommand(i,s,l){if(!this._standaloneKeybindingService)return console.warn("Cannot add command because the editor is configured with an unrecognized KeybindingService"),null;let P="DYNAMIC_"+ ++kt,H=Ct.a.deserialize(l);return this._standaloneKeybindingService.addDynamicKeybinding(P,i,s,H),P}createContextKey(i,s){return this._contextKeyService.createKey(i,s)}addAction(i){if(typeof i.id!="string"||typeof i.label!="string"||typeof i.run!="function")throw new Error("Invalid action descriptor, `id`, `label` and `run` are required properties!");if(!this._standaloneKeybindingService)return console.warn("Cannot add keybinding because the editor is configured with an unrecognized KeybindingService"),$e.a.None;const s=i.id,l=i.label,P=Ct.a.and(Ct.a.equals("editorId",this.getId()),Ct.a.deserialize(i.precondition)),H=i.keybindings,X=Ct.a.and(P,Ct.a.deserialize(i.keybindingContext)),ge=i.contextMenuGroupId||null,Ue=i.contextMenuOrder||0,st=(lo,...po)=>Promise.resolve(i.run(this,...po)),Je=new $e.b,wt=this.getId()+":"+s;if(Je.add(ie.a.registerCommand(wt,st)),ge){let lo={command:{id:wt,title:l},when:P,group:ge,order:Ue};Je.add(Tn.d.appendMenuItem(Tn.b.EditorContext,lo))}if(Array.isArray(H))for(const lo of H)Je.add(this._standaloneKeybindingService.addDynamicKeybinding(wt,lo,st,X));let to=new aa.a(wt,l,l,P,st,this._contextKeyService);return this._actions[s]=to,Je.add(Object($e.i)(()=>{delete this._actions[s]})),Je}_triggerCommand(i,s){if(this._codeEditorService instanceof Ze)try{this._codeEditorService.setActiveCodeEditor(this),super._triggerCommand(i,s)}finally{this._codeEditorService.setActiveCodeEditor(null)}else super._triggerCommand(i,s)}};co=Ot([ft(2,vn.a),ft(3,Be.a),ft(4,ie.b),ft(5,Ct.b),ft(6,ts.a),ft(7,nn.b),ft(8,Ko.a),ft(9,os.b)],co);let go=class extends co{constructor(i,s,l,P,H,X,ge,Ue,st,Je,wt,to,lo,po,Ho){const Vo=Object.assign({},s);Cs(to,Vo,!1);const ii=Je.registerEditorContainer(i);typeof Vo.theme=="string"&&Je.setTheme(Vo.theme),typeof Vo.autoDetectHighContrast!="undefined"&&Je.setAutoDetectHighContrast(Boolean(Vo.autoDetectHighContrast));let Jo=Vo.model;delete Vo.model,super(i,Vo,P,H,X,ge,Ue,Je,wt,lo),this._contextViewService=st,this._configurationService=to,this._standaloneThemeService=Je,this._register(l),this._register(ii);let Go;if(typeof Jo=="undefined"?(Go=jo(po,Ho,Vo.value||"",Vo.language||nt.a.text,void 0),this._ownsModel=!0):(Go=Jo,this._ownsModel=!1),this._attachModel(Go),Go){let Si={oldModelUrl:null,newModelUrl:Go.uri};this._onDidChangeModel.fire(Si)}}dispose(){super.dispose()}updateOptions(i){Cs(this._configurationService,i,!1),typeof i.theme=="string"&&this._standaloneThemeService.setTheme(i.theme),typeof i.autoDetectHighContrast!="undefined"&&this._standaloneThemeService.setAutoDetectHighContrast(Boolean(i.autoDetectHighContrast)),super.updateOptions(i)}_attachModel(i){super._attachModel(i),this._modelData&&this._contextViewService.setContainer(this._modelData.view.domNode.domNode)}_postDetachModelCleanup(i){super._postDetachModelCleanup(i),i&&this._ownsModel&&(i.dispose(),this._ownsModel=!1)}};go=Ot([ft(3,vn.a),ft(4,Be.a),ft(5,ie.b),ft(6,Ct.b),ft(7,ts.a),ft(8,zn.b),ft(9,Ds.a),ft(10,Ko.a),ft(11,f.a),ft(12,os.b),ft(13,Li.a),ft(14,xo.a)],go);let yo=class extends Kn{constructor(i,s,l,P,H,X,ge,Ue,st,Je,wt,to,lo,po,Ho){const Vo=Object.assign({},s);Cs(to,Vo,!0);const ii=Je.registerEditorContainer(i);typeof Vo.theme=="string"&&Je.setTheme(Vo.theme),typeof Vo.autoDetectHighContrast!="undefined"&&Je.setAutoDetectHighContrast(Boolean(Vo.autoDetectHighContrast)),super(i,Vo,{},Ho,Ue,H,P,st,Je,wt,lo,po),this._contextViewService=ge,this._configurationService=to,this._standaloneThemeService=Je,this._register(l),this._register(ii),this._contextViewService.setContainer(this._containerDomElement)}dispose(){super.dispose()}updateOptions(i){Cs(this._configurationService,i,!0),typeof i.theme=="string"&&this._standaloneThemeService.setTheme(i.theme),typeof i.autoDetectHighContrast!="undefined"&&this._standaloneThemeService.setAutoDetectHighContrast(Boolean(i.autoDetectHighContrast)),super.updateOptions(i)}_createInnerEditor(i,s,l){return i.createInstance(co,s,l)}getOriginalEditor(){return super.getOriginalEditor()}getModifiedEditor(){return super.getModifiedEditor()}addCommand(i,s,l){return this.getModifiedEditor().addCommand(i,s,l)}createContextKey(i,s){return this.getModifiedEditor().createContextKey(i,s)}addAction(i){return this.getModifiedEditor().addAction(i)}};yo=Ot([ft(3,vn.a),ft(4,Ct.b),ft(5,ts.a),ft(6,zn.b),ft(7,Mo.a),ft(8,Be.a),ft(9,Ds.a),ft(10,Ko.a),ft(11,f.a),ft(12,zn.a),ft(13,Ws.a),ft(14,Bs.a)],yo);function jo(e,i,s,l,P){if(s=s||"",!l){const H=s.indexOf(`
|
|
|
`);let X=s;return H!==-1&&(X=s.substring(0,H)),Po(e,s,i.createByFilepathOrFirstLine(P||null,X),P)}return Po(e,s,i.create(l),P)}function Po(e,i,s,l){return e.createModel(i,s,l)}var ti=t("MqQJ"),oi=t("ic2d");const $o=Object.prototype.hasOwnProperty;class Yo{constructor(){this._languageIdToLanguage=[],this._languageToLanguageId=new Map,this._register(vo.a,0),this._register(ti.b,1),this._nextLanguageId=2}_register(e,i){this._languageIdToLanguage[i]=e,this._languageToLanguageId.set(e,i)}register(e){if(this._languageToLanguageId.has(e))return;const i=this._nextLanguageId++;this._register(e,i)}encodeLanguageId(e){return this._languageToLanguageId.get(e)||0}decodeLanguageId(e){return this._languageIdToLanguage[e]||vo.a}}class Ei extends $e.a{constructor(e=!0,i=!1){super();this._onDidChange=this._register(new x.b),this.onDidChange=this._onDidChange.event,Ei.instanceCount++,this._warnOnOverwrite=i,this.languageIdCodec=new Yo,this._languages={},this._mimeTypesMap={},this._nameMap={},this._lowercaseNameMap={},e&&(this._initializeFromRegistry(),this._register(ti.a.onDidChangeLanguages(s=>{this._initializeFromRegistry()})))}dispose(){Ei.instanceCount--,super.dispose()}_initializeFromRegistry(){this._languages={},this._mimeTypesMap={},this._nameMap={},this._lowercaseNameMap={},nt.b();const e=ti.a.getLanguages();this._registerLanguages(e)}_registerLanguages(e){for(const i of e)this._registerLanguage(i);this._mimeTypesMap={},this._nameMap={},this._lowercaseNameMap={},Object.keys(this._languages).forEach(i=>{let s=this._languages[i];s.name&&(this._nameMap[s.name]=s.identifier),s.aliases.forEach(l=>{this._lowercaseNameMap[l.toLowerCase()]=s.identifier}),s.mimetypes.forEach(l=>{this._mimeTypesMap[l]=s.identifier})}),oi.a.as(h.a.Configuration).registerOverrideIdentifiers(ti.a.getLanguages().map(i=>i.id)),this._onDidChange.fire()}_registerLanguage(e){const i=e.id;let s;$o.call(this._languages,i)?s=this._languages[i]:(this.languageIdCodec.register(i),s={identifier:i,name:null,mimetypes:[],aliases:[],extensions:[],filenames:[],configurationFiles:[]},this._languages[i]=s),this._mergeLanguage(s,e)}_mergeLanguage(e,i){const s=i.id;let l=null;if(Array.isArray(i.mimetypes)&&i.mimetypes.length>0&&(e.mimetypes.push(...i.mimetypes),l=i.mimetypes[0]),l||(l=`text/x-${s}`,e.mimetypes.push(l)),Array.isArray(i.extensions)){i.configuration?e.extensions=i.extensions.concat(e.extensions):e.extensions=e.extensions.concat(i.extensions);for(let X of i.extensions)nt.d({id:s,mime:l,extension:X},this._warnOnOverwrite)}if(Array.isArray(i.filenames))for(let X of i.filenames)nt.d({id:s,mime:l,filename:X},this._warnOnOverwrite),e.filenames.push(X);if(Array.isArray(i.filenamePatterns))for(let X of i.filenamePatterns)nt.d({id:s,mime:l,filepattern:X},this._warnOnOverwrite);if(typeof i.firstLine=="string"&&i.firstLine.length>0){let X=i.firstLine;X.charAt(0)!=="^"&&(X="^"+X);try{let ge=new RegExp(X);ze.N(ge)||nt.d({id:s,mime:l,firstline:ge},this._warnOnOverwrite)}catch(ge){Object(To.f)(ge)}}e.aliases.push(s);let P=null;if(typeof i.aliases!="undefined"&&Array.isArray(i.aliases)&&(i.aliases.length===0?P=[null]:P=i.aliases),P!==null)for(const X of P){if(!X||X.length===0)continue;e.aliases.push(X)}let H=P!==null&&P.length>0;if(!(H&&P[0]===null)){let X=(H?P[0]:null)||s;(H||!e.name)&&(e.name=X)}i.configuration&&e.configurationFiles.push(i.configuration)}isRegisteredMode(e){return $o.call(this._mimeTypesMap,e)?!0:$o.call(this._languages,e)}getModeIdForLanguageNameLowercase(e){return $o.call(this._lowercaseNameMap,e)?this._lowercaseNameMap[e]:null}extractModeIds(e){return e?e.split(",").map(i=>i.trim()).map(i=>$o.call(this._mimeTypesMap,i)?this._mimeTypesMap[i]:i).filter(i=>$o.call(this._languages,i)):[]}validateLanguageId(e){return!e||e===vo.a?vo.a:$o.call(this._languages,e)?e:null}getModeIdsFromFilepathOrFirstLine(e,i){if(!e&&!i)return[];let s=nt.c(e,i);return this.extractModeIds(s.join(","))}}Ei.instanceCount=0;class Ci{constructor(e,i){this._selector=i,this.languageId=this._selector();let s;this._onDidChange=new x.b({onFirstListenerAdd:()=>{s=e(()=>this._evaluate())},onLastListenerRemove:()=>{s.dispose()}}),this.onDidChange=this._onDidChange.event}_evaluate(){const e=this._selector();if(e===this.languageId)return;this.languageId=e,this._onDidChange.fire(this.languageId)}}class bi extends $e.a{constructor(e=!1){super();this._onDidEncounterLanguage=this._register(new x.b),this.onDidEncounterLanguage=this._onDidEncounterLanguage.event,this._onLanguagesMaybeChanged=this._register(new x.b({leakWarningThreshold:200})),this.onLanguagesMaybeChanged=this._onLanguagesMaybeChanged.event,bi.instanceCount++,this._encounteredLanguages=new Set,this._registry=this._register(new Ei(!0,e)),this.languageIdCodec=this._registry.languageIdCodec,this._register(this._registry.onDidChange(()=>this._onLanguagesMaybeChanged.fire()))}dispose(){bi.instanceCount--,super.dispose()}isRegisteredMode(e){return this._registry.isRegisteredMode(e)}getModeIdForLanguageName(e){return this._registry.getModeIdForLanguageNameLowercase(e)}getModeIdByFilepathOrFirstLine(e,i){const s=this._registry.getModeIdsFromFilepathOrFirstLine(e,i);return Object(fi.j)(s,null)}getModeId(e){const i=this._registry.extractModeIds(e);return Object(fi.j)(i,null)}validateLanguageId(e){return this._registry.validateLanguageId(e)}create(e){return new Ci(this.onLanguagesMaybeChanged,()=>{const i=this.getModeId(e);return this._createModeAndGetLanguageIdentifier(i)})}createByFilepathOrFirstLine(e,i){return new Ci(this.onLanguagesMaybeChanged,()=>{const s=this.getModeIdByFilepathOrFirstLine(e,i);return this._createModeAndGetLanguageIdentifier(s)})}_createModeAndGetLanguageIdentifier(e){const i=this.validateLanguageId(e||"plaintext")||vo.a;return this._getOrCreateMode(i),i}triggerMode(e){const i=this.getModeId(e);this._getOrCreateMode(i||"plaintext")}_getOrCreateMode(e){if(!this._encounteredLanguages.has(e)){this._encounteredLanguages.add(e);const i=this.validateLanguageId(e)||vo.a;this._onDidEncounterLanguage.fire(i)}}}bi.instanceCount=0;var ji=t("OAO6"),ln=t("7afs"),Xi=t("oFSf"),dn=t("QRHv"),Cn=function(e,i,s,l){var P=arguments.length,H=P<3?i:l===null?l=Object.getOwnPropertyDescriptor(i,s):l,X;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")H=Reflect.decorate(e,i,s,l);else for(var ge=e.length-1;ge>=0;ge--)(X=e[ge])&&(H=(P<3?X(H):P>3?X(i,s,H):X(i,s))||H);return P>3&&H&&Object.defineProperty(i,s,H),H},un=function(e,i){return function(s,l){i(s,l,e)}};let hn=class{constructor(i,s,l,P){this._legend=i,this._themeService=s,this._modeService=l,this._logService=P,this._hashTable=new cs,this._hasWarnedOverlappingTokens=!1}getMetadata(i,s,l){const P=this._modeService.languageIdCodec.encodeLanguageId(l),H=this._hashTable.get(i,s,P);let X;if(H)X=H.metadata,this._logService.getLevel()===$i.c.Trace&&this._logService.trace(`SemanticTokensProviderStyling [CACHED] ${i} / ${s}: foreground ${Rt.D.getForeground(X)}, fontStyle ${Rt.D.getFontStyle(X).toString(2)}`);else{let ge=this._legend.tokenTypes[i];const Ue=[];if(ge){let st=s;for(let wt=0;st>0&&wt<this._legend.tokenModifiers.length;wt++)st&1&&Ue.push(this._legend.tokenModifiers[wt]),st=st>>1;st>0&&this._logService.getLevel()===$i.c.Trace&&(this._logService.trace(`SemanticTokensProviderStyling: unknown token modifier index: ${s.toString(2)} for legend: ${JSON.stringify(this._legend.tokenModifiers)}`),Ue.push("not-in-legend"));const Je=this._themeService.getColorTheme().getTokenStyleMetadata(ge,Ue,l);if(typeof Je=="undefined")X=2147483647;else{if(X=0,typeof Je.italic!="undefined"){const wt=(Je.italic?1:0)<<11;X|=wt|1}if(typeof Je.bold!="undefined"){const wt=(Je.bold?2:0)<<11;X|=wt|2}if(typeof Je.underline!="undefined"){const wt=(Je.underline?4:0)<<11;X|=wt|4}if(Je.foreground){const wt=Je.foreground<<14;X|=wt|8}X===0&&(X=2147483647)}}else this._logService.getLevel()===$i.c.Trace&&this._logService.trace(`SemanticTokensProviderStyling: unknown token type index: ${i} for legend: ${JSON.stringify(this._legend.tokenTypes)}`),X=2147483647,ge="not-in-legend";this._hashTable.add(i,s,P,X),this._logService.getLevel()===$i.c.Trace&&this._logService.trace(`SemanticTokensProviderStyling ${i} (${ge}) / ${s} (${Ue.join(" ")}): foreground ${Rt.D.getForeground(X)}, fontStyle ${Rt.D.getFontStyle(X).toString(2)}`)}return X}warnOverlappingSemanticTokens(i,s){this._hasWarnedOverlappingTokens||(this._hasWarnedOverlappingTokens=!0,console.warn(`Overlapping semantic tokens detected at lineNumber ${i}, column ${s}`))}};hn=Cn([un(1,nn.b),un(2,xo.a),un(3,$i.b)],hn);function Nn(e,i,s){const l=e.data,P=e.data.length/5|0,H=Math.max(Math.ceil(P/1024),400),X=[];let ge=0,Ue=1,st=0;for(;ge<P;){const Je=ge;let wt=Math.min(Je+H,P);if(wt<P){let Go=wt;for(;Go-1>Je&&l[5*Go]===0;)Go--;if(Go-1===Je){let Si=wt;for(;Si+1<P&&l[5*Si]===0;)Si++;wt=Si}else wt=Go}let to=new Uint32Array((wt-Je)*4),lo=0,po=0,Ho=0,Vo=0,ii=0;for(;ge<wt;){const Go=5*ge,Si=l[Go],Ai=l[Go+1],ai=Ue+Si|0,Fo=Si===0?st+Ai|0:Ai,Xo=l[Go+2],ei=l[Go+3],Mi=l[Go+4],qi=i.getMetadata(ei,Mi,s);qi!==2147483647&&(po===0&&(po=ai),Ho===ai&&ii>Fo&&(i.warnOverlappingSemanticTokens(ai,Fo+1),Vo<Fo?to[lo-4+2]=Fo:lo-=4),to[lo]=ai-po,to[lo+1]=Fo,to[lo+2]=Fo+Xo,to[lo+3]=qi,lo+=4,Ho=ai,Vo=Fo,ii=Fo+Xo),Ue=ai,st=Fo,ge++}lo!==to.length&&(to=to.subarray(0,lo));const Jo=new dn.a(po,new dn.c(to));X.push(Jo)}return X}class Jl{constructor(e,i,s,l){this.tokenTypeIndex=e,this.tokenModifierSet=i,this.languageId=s,this.metadata=l,this.next=null}}class cs{constructor(){this._elementsCount=0,this._currentLengthIndex=0,this._currentLength=cs._SIZES[this._currentLengthIndex],this._growCount=Math.round(this._currentLengthIndex+1<cs._SIZES.length?2/3*this._currentLength:0),this._elements=[],cs._nullOutEntries(this._elements,this._currentLength)}static _nullOutEntries(e,i){for(let s=0;s<i;s++)e[s]=null}_hash2(e,i){return(e<<5)-e+i|0}_hashFunc(e,i,s){return this._hash2(this._hash2(e,i),s)%this._currentLength}get(e,i,s){const l=this._hashFunc(e,i,s);let P=this._elements[l];for(;P;){if(P.tokenTypeIndex===e&&P.tokenModifierSet===i&&P.languageId===s)return P;P=P.next}return null}add(e,i,s,l){if(this._elementsCount++,this._growCount!==0&&this._elementsCount>=this._growCount){const P=this._elements;this._currentLengthIndex++,this._currentLength=cs._SIZES[this._currentLengthIndex],this._growCount=Math.round(this._currentLengthIndex+1<cs._SIZES.length?2/3*this._currentLength:0),this._elements=[],cs._nullOutEntries(this._elements,this._currentLength);for(const H of P){let X=H;for(;X;){const ge=X.next;X.next=null,this._add(X),X=ge}}}this._add(new Jl(e,i,s,l))}_add(e){const i=this._hashFunc(e.tokenTypeIndex,e.tokenModifierSet,e.languageId);e.next=this._elements[i],this._elements[i]=e}}cs._SIZES=[3,7,13,31,61,127,251,509,1021,2039,4093,8191,16381,32749,65521,131071,262139,524287,1048573,2097143];var ql=t("HpOR");function ed(e){for(let i=0,s=e.length;i<s;i+=4){const l=e[i+0],P=e[i+1],H=e[i+2],X=e[i+3];e[i+0]=X,e[i+1]=H,e[i+2]=P,e[i+3]=l}}function td(e){const i=new Uint8Array(e.buffer,e.byteOffset,e.length*4);return Vt.e()||ed(i),ql.a.wrap(i)}function Za(e){const i=new Uint32Array(od(e));let s=0;if(i[s++]=e.id,e.type==="full")i[s++]=1,i[s++]=e.data.length,i.set(e.data,s),s+=e.data.length;else{i[s++]=2,i[s++]=e.deltas.length;for(const l of e.deltas)i[s++]=l.start,i[s++]=l.deleteCount,l.data?(i[s++]=l.data.length,i.set(l.data,s),s+=l.data.length):i[s++]=0}return td(i)}function od(e){let i=0;if(i+=1+1,e.type==="full")i+=1+e.data.length;else{i+=1,i+=(1+1+1)*e.deltas.length;for(const s of e.deltas)s.data&&(i+=s.data.length)}return i}var us=function(e,i,s,l){function P(H){return H instanceof s?H:new s(function(X){X(H)})}return new(s||(s=Promise))(function(H,X){function ge(Je){try{st(l.next(Je))}catch(wt){X(wt)}}function Ue(Je){try{st(l.throw(Je))}catch(wt){X(wt)}}function st(Je){Je.done?H(Je.value):P(Je.value).then(ge,Ue)}st((l=l.apply(e,i||[])).next())})};function Lr(e){return e&&!!e.data}function Qa(e){return e&&Array.isArray(e.edits)}class id{constructor(e,i){this.provider=e,this.tokens=i}}function Ja(e){return Rt.l.has(e)}function nd(e){const i=Rt.l.orderedGroups(e);return i.length>0?i[0]:[]}function qa(e,i,s,l){return us(this,void 0,void 0,function*(){const P=nd(e),H=yield Promise.all(P.map(X=>us(this,void 0,void 0,function*(){let ge;try{ge=yield X.provideDocumentSemanticTokens(e,X===i?s:null,l)}catch(Ue){Object(To.g)(Ue),ge=null}return(!ge||!Lr(ge)&&!Qa(ge))&&(ge=null),new id(X,ge)})));for(const X of H)if(X.tokens)return X;return H.length>0?H[0]:null})}function sd(e){const i=Rt.l.orderedGroups(e);return i.length>0?i[0]:null}class rd{constructor(e,i){this.provider=e,this.tokens=i}}function eh(e){return Rt.k.has(e)}function el(e){const i=Rt.k.orderedGroups(e);return i.length>0?i[0]:[]}function tl(e,i,s){return us(this,void 0,void 0,function*(){const l=el(e),P=yield Promise.all(l.map(H=>us(this,void 0,void 0,function*(){let X;try{X=yield H.provideDocumentRangeSemanticTokens(e,i,s)}catch(ge){Object(To.g)(ge),X=null}return(!X||!Lr(X))&&(X=null),new rd(H,X)})));for(const H of P)if(H.tokens)return H;return P.length>0?P[0]:null})}ie.a.registerCommand("_provideDocumentSemanticTokensLegend",(e,...i)=>us(void 0,void 0,void 0,function*(){const[s]=i;Object(xt.c)(s instanceof A.a);const l=e.get(Li.a).getModel(s);if(!l)return;const P=sd(l);return P?P[0].getLegend():e.get(ie.b).executeCommand("_provideDocumentRangeSemanticTokensLegend",s)})),ie.a.registerCommand("_provideDocumentSemanticTokens",(e,...i)=>us(void 0,void 0,void 0,function*(){const[s]=i;Object(xt.c)(s instanceof A.a);const l=e.get(Li.a).getModel(s);if(!l)return;if(!Ja(l))return e.get(ie.b).executeCommand("_provideDocumentRangeSemanticTokens",s,l.getFullModelRange());const P=yield qa(l,null,null,B.a.None);if(!P)return;const{provider:H,tokens:X}=P;if(!X||!Lr(X))return;const ge=Za({id:0,type:"full",data:X.data});return X.resultId&&H.releaseDocumentSemanticTokens(X.resultId),ge})),ie.a.registerCommand("_provideDocumentRangeSemanticTokensLegend",(e,...i)=>us(void 0,void 0,void 0,function*(){const[s,l]=i;Object(xt.c)(s instanceof A.a);const P=e.get(Li.a).getModel(s);if(!P)return;const H=el(P);if(H.length===0)return;if(H.length===1)return H[0].getLegend();if(!l||!I.a.isIRange(l))return console.warn("provideDocumentRangeSemanticTokensLegend might be out-of-sync with provideDocumentRangeSemanticTokens unless a range argument is passed in"),H[0].getLegend();const X=yield tl(P,I.a.lift(l),B.a.None);return X?X.provider.getLegend():void 0})),ie.a.registerCommand("_provideDocumentRangeSemanticTokens",(e,...i)=>us(void 0,void 0,void 0,function*(){const[s,l]=i;Object(xt.c)(s instanceof A.a),Object(xt.c)(I.a.isIRange(l));const P=e.get(Li.a).getModel(s);if(!P)return;const H=yield tl(P,I.a.lift(l),B.a.None);return!H||!H.tokens?void 0:Za({id:0,type:"full",data:H.tokens.data})}));var ad=function(e,i,s,l){var P=arguments.length,H=P<3?i:l===null?l=Object.getOwnPropertyDescriptor(i,s):l,X;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")H=Reflect.decorate(e,i,s,l);else for(var ge=e.length-1;ge>=0;ge--)(X=e[ge])&&(H=(P<3?X(H):P>3?X(i,s,H):X(i,s))||H);return P>3&&H&&Object.defineProperty(i,s,H),H},Ms=function(e,i){return function(s,l){i(s,l,e)}};function hs(e){return e.toString()}function ol(e){const i=new ln.a,s=e.createSnapshot();let l;for(;l=s.read();)i.update(l);return i.digest()}class ld{constructor(e,i,s){this._modelEventListeners=new $e.b,this.model=e,this._languageSelection=null,this._languageSelectionListener=null,this._modelEventListeners.add(e.onWillDispose(()=>i(e))),this._modelEventListeners.add(e.onDidChangeLanguage(l=>s(e,l)))}_disposeLanguageSelection(){this._languageSelectionListener&&(this._languageSelectionListener.dispose(),this._languageSelectionListener=null)}dispose(){this._modelEventListeners.dispose(),this._disposeLanguageSelection()}setLanguage(e){this._disposeLanguageSelection(),this._languageSelection=e,this._languageSelectionListener=this._languageSelection.onDidChange(()=>this.model.setMode(e.languageId)),this.model.setMode(e.languageId)}}const dd=Vt.d||Vt.f?1:2;class cd{constructor(e,i,s,l,P,H,X,ge){this.uri=e,this.initialUndoRedoSnapshot=i,this.time=s,this.sharesUndoRedoStack=l,this.heapSize=P,this.sha1=H,this.versionId=X,this.alternativeVersionId=ge}}let _r=class e extends $e.a{constructor(i,s,l,P,H,X,ge){super();this._configurationService=i,this._resourcePropertiesService=s,this._themeService=l,this._logService=P,this._undoRedoService=H,this._modeService=X,this._languageConfigurationService=ge,this._onModelAdded=this._register(new x.b),this.onModelAdded=this._onModelAdded.event,this._onModelRemoved=this._register(new x.b),this.onModelRemoved=this._onModelRemoved.event,this._onModelModeChanged=this._register(new x.b),this.onModelModeChanged=this._onModelModeChanged.event,this._modelCreationOptionsByLanguageAndResource=Object.create(null),this._models={},this._disposedModels=new Map,this._disposedModelsHeapSize=0,this._semanticStyling=this._register(new hd(this._themeService,this._modeService,this._logService)),this._register(this._configurationService.onDidChangeConfiguration(()=>this._updateModelOptions())),this._updateModelOptions(),this._register(new ud(this,this._themeService,this._configurationService,this._semanticStyling))}static _readModelOptions(i,s){var l;let P=g.d.tabSize;if(i.editor&&typeof i.editor.tabSize!="undefined"){const lo=parseInt(i.editor.tabSize,10);isNaN(lo)||(P=lo),P<1&&(P=1)}let H=P;if(i.editor&&typeof i.editor.indentSize!="undefined"&&i.editor.indentSize!=="tabSize"){const lo=parseInt(i.editor.indentSize,10);isNaN(lo)||(H=lo),H<1&&(H=1)}let X=g.d.insertSpaces;i.editor&&typeof i.editor.insertSpaces!="undefined"&&(X=i.editor.insertSpaces==="false"?!1:Boolean(i.editor.insertSpaces));let ge=dd;const Ue=i.eol;Ue===`\r
|
|
|
`?ge=2:Ue===`
|
|
|
`&&(ge=1);let st=g.d.trimAutoWhitespace;i.editor&&typeof i.editor.trimAutoWhitespace!="undefined"&&(st=i.editor.trimAutoWhitespace==="false"?!1:Boolean(i.editor.trimAutoWhitespace));let Je=g.d.detectIndentation;i.editor&&typeof i.editor.detectIndentation!="undefined"&&(Je=i.editor.detectIndentation==="false"?!1:Boolean(i.editor.detectIndentation));let wt=g.d.largeFileOptimizations;i.editor&&typeof i.editor.largeFileOptimizations!="undefined"&&(wt=i.editor.largeFileOptimizations==="false"?!1:Boolean(i.editor.largeFileOptimizations));let to=g.d.bracketPairColorizationOptions;return((l=i.editor)===null||l===void 0?void 0:l.bracketPairColorization)&&typeof i.editor.bracketPairColorization=="object"&&(to={enabled:!!i.editor.bracketPairColorization.enabled}),{isForSimpleWidget:s,tabSize:P,indentSize:H,insertSpaces:X,detectIndentation:Je,defaultEOL:ge,trimAutoWhitespace:st,largeFileOptimizations:wt,bracketPairColorizationOptions:to}}_getEOL(i,s){if(i)return this._resourcePropertiesService.getEOL(i,s);const l=this._configurationService.getValue("files.eol",{overrideIdentifier:s});return l&&typeof l=="string"&&l!=="auto"?l:Vt.a===3||Vt.a===2?`
|
|
|
`:`\r
|
|
|
`}_shouldRestoreUndoStack(){const i=this._configurationService.getValue("files.restoreUndoStack");return typeof i=="boolean"?i:!0}getCreationOptions(i,s,l){let P=this._modelCreationOptionsByLanguageAndResource[i+s];if(!P){const H=this._configurationService.getValue("editor",{overrideIdentifier:i,resource:s}),X=this._getEOL(s,i);P=e._readModelOptions({editor:H,eol:X},l),this._modelCreationOptionsByLanguageAndResource[i+s]=P}return P}_updateModelOptions(){const i=this._modelCreationOptionsByLanguageAndResource;this._modelCreationOptionsByLanguageAndResource=Object.create(null);const s=Object.keys(this._models);for(let l=0,P=s.length;l<P;l++){const H=s[l],X=this._models[H],ge=X.model.getLanguageId(),Ue=X.model.uri,st=i[ge+Ue],Je=this.getCreationOptions(ge,Ue,X.model.isForSimpleWidget);e._setModelOptionsForModel(X.model,Je,st)}}static _setModelOptionsForModel(i,s,l){if(l&&l.defaultEOL!==s.defaultEOL&&i.getLineCount()===1&&i.setEOL(s.defaultEOL===1?0:1),l&&l.detectIndentation===s.detectIndentation&&l.insertSpaces===s.insertSpaces&&l.tabSize===s.tabSize&&l.indentSize===s.indentSize&&l.trimAutoWhitespace===s.trimAutoWhitespace&&Object(ot.d)(l.bracketPairColorizationOptions,s.bracketPairColorizationOptions))return;s.detectIndentation?(i.detectIndentation(s.insertSpaces,s.tabSize),i.updateOptions({trimAutoWhitespace:s.trimAutoWhitespace,bracketColorizationOptions:s.bracketPairColorizationOptions})):i.updateOptions({insertSpaces:s.insertSpaces,tabSize:s.tabSize,indentSize:s.indentSize,trimAutoWhitespace:s.trimAutoWhitespace,bracketColorizationOptions:s.bracketPairColorizationOptions})}_insertDisposedModel(i){this._disposedModels.set(hs(i.uri),i),this._disposedModelsHeapSize+=i.heapSize}_removeDisposedModel(i){const s=this._disposedModels.get(hs(i));return s&&(this._disposedModelsHeapSize-=s.heapSize),this._disposedModels.delete(hs(i)),s}_ensureDisposedModelsHeapSize(i){if(this._disposedModelsHeapSize>i){const s=[];for(this._disposedModels.forEach(l=>{l.sharesUndoRedoStack||s.push(l)}),s.sort((l,P)=>l.time-P.time);s.length>0&&this._disposedModelsHeapSize>i;){const l=s.shift();this._removeDisposedModel(l.uri),l.initialUndoRedoSnapshot!==null&&this._undoRedoService.restoreSnapshot(l.initialUndoRedoSnapshot)}}}_createModelData(i,s,l,P){const H=this.getCreationOptions(s,l,P),X=new Vn.c(i,H,s,l,this._undoRedoService,this._modeService,this._languageConfigurationService);if(l&&this._disposedModels.has(hs(l))){const st=this._removeDisposedModel(l),Je=this._undoRedoService.getElements(l),wt=ol(X)===st.sha1;if(wt||st.sharesUndoRedoStack){for(const to of Je.past)Object(Xi.b)(to)&&to.matchesResource(l)&&to.setModel(X);for(const to of Je.future)Object(Xi.b)(to)&&to.matchesResource(l)&&to.setModel(X);this._undoRedoService.setElementsValidFlag(l,!0,to=>Object(Xi.b)(to)&&to.matchesResource(l)),wt&&(X._overwriteVersionId(st.versionId),X._overwriteAlternativeVersionId(st.alternativeVersionId),X._overwriteInitialUndoRedoSnapshot(st.initialUndoRedoSnapshot))}else st.initialUndoRedoSnapshot!==null&&this._undoRedoService.restoreSnapshot(st.initialUndoRedoSnapshot)}const ge=hs(X.uri);if(this._models[ge])throw new Error("ModelService: Cannot add model because it already exists!");const Ue=new ld(X,st=>this._onWillDispose(st),(st,Je)=>this._onDidChangeLanguage(st,Je));return this._models[ge]=Ue,Ue}createModel(i,s,l,P=!1){let H;return s?(H=this._createModelData(i,s.languageId,l,P),this.setMode(H.model,s)):H=this._createModelData(i,ti.b,l,P),this._onModelAdded.fire(H.model),H.model}setMode(i,s){if(!s)return;const l=this._models[hs(i.uri)];if(!l)return;l.setLanguage(s)}getModels(){const i=[],s=Object.keys(this._models);for(let l=0,P=s.length;l<P;l++){const H=s[l];i.push(this._models[H].model)}return i}getModel(i){const s=hs(i),l=this._models[s];return l?l.model:null}getSemanticTokensProviderStyling(i){return this._semanticStyling.get(i)}_schemaShouldMaintainUndoRedoElements(i){return i.scheme===we.c.file||i.scheme===we.c.vscodeRemote||i.scheme===we.c.userData||i.scheme===we.c.vscodeNotebookCell||i.scheme==="fake-fs"}_onWillDispose(i){const s=hs(i.uri),l=this._models[s],P=this._undoRedoService.getUriComparisonKey(i.uri)!==i.uri.toString();let H=!1,X=0;if(P||this._shouldRestoreUndoStack()&&this._schemaShouldMaintainUndoRedoElements(i.uri)){const Ue=this._undoRedoService.getElements(i.uri);if(Ue.past.length>0||Ue.future.length>0){for(const st of Ue.past)Object(Xi.b)(st)&&st.matchesResource(i.uri)&&(H=!0,X+=st.heapSize(i.uri),st.setModel(i.uri));for(const st of Ue.future)Object(Xi.b)(st)&&st.matchesResource(i.uri)&&(H=!0,X+=st.heapSize(i.uri),st.setModel(i.uri))}}const ge=e.MAX_MEMORY_FOR_CLOSED_FILES_UNDO_STACK;if(H)if(!P&&X>ge){const Ue=l.model.getInitialUndoRedoSnapshot();Ue!==null&&this._undoRedoService.restoreSnapshot(Ue)}else this._ensureDisposedModelsHeapSize(ge-X),this._undoRedoService.setElementsValidFlag(i.uri,!1,Ue=>Object(Xi.b)(Ue)&&Ue.matchesResource(i.uri)),this._insertDisposedModel(new cd(i.uri,l.model.getInitialUndoRedoSnapshot(),Date.now(),P,X,ol(i),i.getVersionId(),i.getAlternativeVersionId()));else if(!P){const Ue=l.model.getInitialUndoRedoSnapshot();Ue!==null&&this._undoRedoService.restoreSnapshot(Ue)}delete this._models[s],l.dispose(),delete this._modelCreationOptionsByLanguageAndResource[i.getLanguageId()+i.uri],this._onModelRemoved.fire(i)}_onDidChangeLanguage(i,s){const l=s.oldLanguage,P=i.getLanguageId(),H=this.getCreationOptions(l,i.uri,i.isForSimpleWidget),X=this.getCreationOptions(P,i.uri,i.isForSimpleWidget);e._setModelOptionsForModel(i,X,H),this._onModelModeChanged.fire({model:i,oldModeId:l})}};_r.MAX_MEMORY_FOR_CLOSED_FILES_UNDO_STACK=20*1024*1024,_r=ad([Ms(0,f.a),Ms(1,Ui.b),Ms(2,nn.b),Ms(3,$i.b),Ms(4,ji.a),Ms(5,xo.a),Ms(6,St.a)],_r);const il="editor.semanticHighlighting";function nl(e,i,s){var l;const P=(l=s.getValue(il,{overrideIdentifier:e.getLanguageId(),resource:e.uri}))===null||l===void 0?void 0:l.enabled;return typeof P=="boolean"?P:i.getColorTheme().semanticHighlighting}class ud extends $e.a{constructor(e,i,s,l){super();this._watchers=Object.create(null),this._semanticStyling=l;const P=ge=>{this._watchers[ge.uri.toString()]=new zs(ge,i,this._semanticStyling)},H=(ge,Ue)=>{Ue.dispose(),delete this._watchers[ge.uri.toString()]},X=()=>{for(let ge of e.getModels()){const Ue=this._watchers[ge.uri.toString()];nl(ge,i,s)?Ue||P(ge):Ue&&H(ge,Ue)}};this._register(e.onModelAdded(ge=>{nl(ge,i,s)&&P(ge)})),this._register(e.onModelRemoved(ge=>{const Ue=this._watchers[ge.uri.toString()];Ue&&H(ge,Ue)})),this._register(s.onDidChangeConfiguration(ge=>{ge.affectsConfiguration(il)&&X()})),this._register(i.onDidColorThemeChange(X))}}class hd extends $e.a{constructor(e,i,s){super();this._themeService=e,this._modeService=i,this._logService=s,this._caches=new WeakMap,this._register(this._themeService.onDidColorThemeChange(()=>{this._caches=new WeakMap}))}get(e){return this._caches.has(e)||this._caches.set(e,new hn(e.getLegend(),this._themeService,this._modeService,this._logService)),this._caches.get(e)}}class md{constructor(e,i,s){this.provider=e,this.resultId=i,this.data=s}dispose(){this.provider.releaseDocumentSemanticTokens(this.resultId)}}class zs extends $e.a{constructor(e,i,s){super();this._isDisposed=!1,this._model=e,this._semanticStyling=s,this._fetchDocumentSemanticTokens=this._register(new Lo.e(()=>this._fetchDocumentSemanticTokensNow(),zs.FETCH_DOCUMENT_SEMANTIC_TOKENS_DELAY)),this._currentDocumentResponse=null,this._currentDocumentRequestCancellationTokenSource=null,this._documentProvidersChangeListeners=[],this._register(this._model.onDidChangeContent(()=>{this._fetchDocumentSemanticTokens.isScheduled()||this._fetchDocumentSemanticTokens.schedule()})),this._register(this._model.onDidChangeLanguage(()=>{this._currentDocumentResponse&&(this._currentDocumentResponse.dispose(),this._currentDocumentResponse=null),this._currentDocumentRequestCancellationTokenSource&&(this._currentDocumentRequestCancellationTokenSource.cancel(),this._currentDocumentRequestCancellationTokenSource=null),this._setDocumentSemanticTokens(null,null,null,[]),this._fetchDocumentSemanticTokens.schedule(0)}));const l=()=>{Object($e.f)(this._documentProvidersChangeListeners),this._documentProvidersChangeListeners=[];for(const P of Rt.l.all(e))typeof P.onDidChange=="function"&&this._documentProvidersChangeListeners.push(P.onDidChange(()=>this._fetchDocumentSemanticTokens.schedule(0)))};l(),this._register(Rt.l.onDidChange(()=>{l(),this._fetchDocumentSemanticTokens.schedule()})),this._register(i.onDidColorThemeChange(P=>{this._setDocumentSemanticTokens(null,null,null,[]),this._fetchDocumentSemanticTokens.schedule()})),this._fetchDocumentSemanticTokens.schedule(0)}dispose(){this._currentDocumentResponse&&(this._currentDocumentResponse.dispose(),this._currentDocumentResponse=null),this._currentDocumentRequestCancellationTokenSource&&(this._currentDocumentRequestCancellationTokenSource.cancel(),this._currentDocumentRequestCancellationTokenSource=null),this._setDocumentSemanticTokens(null,null,null,[]),this._isDisposed=!0,super.dispose()}_fetchDocumentSemanticTokensNow(){if(this._currentDocumentRequestCancellationTokenSource)return;if(!Ja(this._model)){this._currentDocumentResponse&&this._model.setSemanticTokens(null,!1);return}const e=new B.b,i=this._currentDocumentResponse?this._currentDocumentResponse.provider:null,s=this._currentDocumentResponse&&this._currentDocumentResponse.resultId||null,l=qa(this._model,i,s,e.token);this._currentDocumentRequestCancellationTokenSource=e;const P=[],H=this._model.onDidChangeContent(X=>{P.push(X)});l.then(X=>{if(this._currentDocumentRequestCancellationTokenSource=null,H.dispose(),!X)this._setDocumentSemanticTokens(null,null,null,P);else{const{provider:ge,tokens:Ue}=X,st=this._semanticStyling.get(ge);this._setDocumentSemanticTokens(ge,Ue||null,st,P)}},X=>{const ge=X&&(To.e(X)||typeof X.message=="string"&&X.message.indexOf("busy")!==-1);ge||To.f(X),this._currentDocumentRequestCancellationTokenSource=null,H.dispose(),P.length>0&&(this._fetchDocumentSemanticTokens.isScheduled()||this._fetchDocumentSemanticTokens.schedule())})}static _copy(e,i,s,l,P){for(let H=0;H<P;H++)s[l+H]=e[i+H]}_setDocumentSemanticTokens(e,i,s,l){const P=this._currentDocumentResponse,H=()=>{l.length>0&&!this._fetchDocumentSemanticTokens.isScheduled()&&this._fetchDocumentSemanticTokens.schedule()};if(this._currentDocumentResponse&&(this._currentDocumentResponse.dispose(),this._currentDocumentResponse=null),this._isDisposed){e&&i&&e.releaseDocumentSemanticTokens(i.resultId);return}if(!e||!s){this._model.setSemanticTokens(null,!1);return}if(!i){this._model.setSemanticTokens(null,!0),H();return}if(Qa(i)){if(!P){this._model.setSemanticTokens(null,!0);return}if(i.edits.length===0)i={resultId:i.resultId,data:P.data};else{let X=0;for(const wt of i.edits)X+=(wt.data?wt.data.length:0)-wt.deleteCount;const ge=P.data,Ue=new Uint32Array(ge.length+X);let st=ge.length,Je=Ue.length;for(let wt=i.edits.length-1;wt>=0;wt--){const to=i.edits[wt],lo=st-(to.start+to.deleteCount);lo>0&&(zs._copy(ge,st-lo,Ue,Je-lo,lo),Je-=lo),to.data&&(zs._copy(to.data,0,Ue,Je-to.data.length,to.data.length),Je-=to.data.length),st=to.start}st>0&&zs._copy(ge,0,Ue,0,st),i={resultId:i.resultId,data:Ue}}}if(Lr(i)){this._currentDocumentResponse=new md(e,i.resultId,i.data);const X=Nn(i,s,this._model.getLanguageId());if(l.length>0)for(const ge of l)for(const Ue of X)for(const st of ge.changes)Ue.applyEdit(st.range,st.text);this._model.setSemanticTokens(X,!0)}else this._model.setSemanticTokens(null,!0);H()}}zs.FETCH_DOCUMENT_SEMANTIC_TOKENS_DELAY=300;var ms=t("zrhQ");class gd{constructor(e,i,s,l,P){this._parsedThemeRuleBrand=void 0,this.token=e,this.index=i,this.fontStyle=s,this.foreground=l,this.background=P}}function fd(e){if(!e||!Array.isArray(e))return[];let i=[],s=0;for(let l=0,P=e.length;l<P;l++){let H=e[l],X=-1;if(typeof H.fontStyle=="string"){X=0;let st=H.fontStyle.split(" ");for(let Je=0,wt=st.length;Je<wt;Je++){let to=st[Je];switch(to){case"italic":X=X|1;break;case"bold":X=X|2;break;case"underline":X=X|4;break}}}let ge=null;typeof H.foreground=="string"&&(ge=H.foreground);let Ue=null;typeof H.background=="string"&&(Ue=H.background),i[s++]=new gd(H.token||"",l,X,ge,Ue)}return i}function pd(e,i){e.sort((Je,wt)=>{let to=Ed(Je.token,wt.token);return to!==0?to:Je.index-wt.index});let s=0,l="000000",P="ffffff";for(;e.length>=1&&e[0].token==="";){let Je=e.shift();Je.fontStyle!==-1&&(s=Je.fontStyle),Je.foreground!==null&&(l=Je.foreground),Je.background!==null&&(P=Je.background)}let H=new vd;for(let Je of i)H.getId(Je);let X=H.getId(l),ge=H.getId(P),Ue=new rl(s,X,ge),st=new al(Ue);for(let Je=0,wt=e.length;Je<wt;Je++){let to=e[Je];st.insert(to.token,to.fontStyle,H.getId(to.foreground),H.getId(to.background))}return new sl(H,st)}const bd=/^#?([0-9A-Fa-f]{6})([0-9A-Fa-f]{2})?$/;class vd{constructor(){this._lastColorId=0,this._id2color=[],this._color2id=new Map}getId(e){if(e===null)return 0;const i=e.match(bd);if(!i)throw new Error("Illegal value for token color: "+e);e=i[1].toUpperCase();let s=this._color2id.get(e);return s||(s=++this._lastColorId,this._color2id.set(e,s),this._id2color[s]=ms.a.fromHex("#"+e),s)}getColorMap(){return this._id2color.slice(0)}}class sl{constructor(e,i){this._colorMap=e,this._root=i,this._cache=new Map}static createFromRawTokenTheme(e,i){return this.createFromParsedTokenTheme(fd(e),i)}static createFromParsedTokenTheme(e,i){return pd(e,i)}getColorMap(){return this._colorMap.getColorMap()}_match(e){return this._root.match(e)}match(e,i){let s=this._cache.get(i);if(typeof s=="undefined"){let l=this._match(i),P=yd(i);s=(l.metadata|P<<8)>>>0,this._cache.set(i,s)}return(s|e<<0)>>>0}}const Cd=/\b(comment|string|regex|regexp)\b/;function yd(e){let i=e.match(Cd);if(!i)return 0;switch(i[1]){case"comment":return 1;case"string":return 2;case"regex":return 4;case"regexp":return 4}throw new Error("Unexpected match for standard token type!")}function Ed(e,i){return e<i?-1:e>i?1:0}class rl{constructor(e,i,s){this._themeTrieElementRuleBrand=void 0,this._fontStyle=e,this._foreground=i,this._background=s,this.metadata=(this._fontStyle<<11|this._foreground<<14|this._background<<23)>>>0}clone(){return new rl(this._fontStyle,this._foreground,this._background)}acceptOverwrite(e,i,s){e!==-1&&(this._fontStyle=e),i!==0&&(this._foreground=i),s!==0&&(this._background=s),this.metadata=(this._fontStyle<<11|this._foreground<<14|this._background<<23)>>>0}}class al{constructor(e){this._themeTrieElementBrand=void 0,this._mainRule=e,this._children=new Map}match(e){if(e==="")return this._mainRule;let i=e.indexOf("."),s,l;i===-1?(s=e,l=""):(s=e.substring(0,i),l=e.substring(i+1));let P=this._children.get(s);return typeof P!="undefined"?P.match(l):this._mainRule}insert(e,i,s,l){if(e===""){this._mainRule.acceptOverwrite(i,s,l);return}let P=e.indexOf("."),H,X;P===-1?(H=e,X=""):(H=e.substring(0,P),X=e.substring(P+1));let ge=this._children.get(H);typeof ge=="undefined"&&(ge=new al(this._mainRule.clone()),this._children.set(H,ge)),ge.insert(X,i,s,l)}}function Sd(e){let i=[];for(let s=1,l=e.length;s<l;s++){let P=e[s];i[s]=`.mtk${s} { color: ${P}; }`}return i.push(".mtki { font-style: italic; }"),i.push(".mtkb { font-weight: bold; }"),i.push(".mtku { text-decoration: underline; text-underline-position: under; }"),i.join(`
|
|
|
`)}const wd={base:"vs",inherit:!1,rules:[{token:"",foreground:"000000",background:"fffffe"},{token:"invalid",foreground:"cd3131"},{token:"emphasis",fontStyle:"italic"},{token:"strong",fontStyle:"bold"},{token:"variable",foreground:"001188"},{token:"variable.predefined",foreground:"4864AA"},{token:"constant",foreground:"dd0000"},{token:"comment",foreground:"008000"},{token:"number",foreground:"098658"},{token:"number.hex",foreground:"3030c0"},{token:"regexp",foreground:"800000"},{token:"annotation",foreground:"808080"},{token:"type",foreground:"008080"},{token:"delimiter",foreground:"000000"},{token:"delimiter.html",foreground:"383838"},{token:"delimiter.xml",foreground:"0000FF"},{token:"tag",foreground:"800000"},{token:"tag.id.pug",foreground:"4F76AC"},{token:"tag.class.pug",foreground:"4F76AC"},{token:"meta.scss",foreground:"800000"},{token:"metatag",foreground:"e00000"},{token:"metatag.content.html",foreground:"FF0000"},{token:"metatag.html",foreground:"808080"},{token:"metatag.xml",foreground:"808080"},{token:"metatag.php",fontStyle:"bold"},{token:"key",foreground:"863B00"},{token:"string.key.json",foreground:"A31515"},{token:"string.value.json",foreground:"0451A5"},{token:"attribute.name",foreground:"FF0000"},{token:"attribute.value",foreground:"0451A5"},{token:"attribute.value.number",foreground:"098658"},{token:"attribute.value.unit",foreground:"098658"},{token:"attribute.value.html",foreground:"0000FF"},{token:"attribute.value.xml",foreground:"0000FF"},{token:"string",foreground:"A31515"},{token:"string.html",foreground:"0000FF"},{token:"string.sql",foreground:"FF0000"},{token:"string.yaml",foreground:"0451A5"},{token:"keyword",foreground:"0000FF"},{token:"keyword.json",foreground:"0451A5"},{token:"keyword.flow",foreground:"AF00DB"},{token:"keyword.flow.scss",foreground:"0000FF"},{token:"operator.scss",foreground:"666666"},{token:"operator.sql",foreground:"778899"},{token:"operator.swift",foreground:"666666"},{token:"predefined.sql",foreground:"C700C7"}],colors:{[ni.r]:"#FFFFFE",[ni.B]:"#000000",[ni.J]:"#E5EBF1",[Hn.A]:"#D3D3D3",[Hn.a]:"#939393",[ni.R]:"#ADD6FF4D"}},Ld={base:"vs-dark",inherit:!1,rules:[{token:"",foreground:"D4D4D4",background:"1E1E1E"},{token:"invalid",foreground:"f44747"},{token:"emphasis",fontStyle:"italic"},{token:"strong",fontStyle:"bold"},{token:"variable",foreground:"74B0DF"},{token:"variable.predefined",foreground:"4864AA"},{token:"variable.parameter",foreground:"9CDCFE"},{token:"constant",foreground:"569CD6"},{token:"comment",foreground:"608B4E"},{token:"number",foreground:"B5CEA8"},{token:"number.hex",foreground:"5BB498"},{token:"regexp",foreground:"B46695"},{token:"annotation",foreground:"cc6666"},{token:"type",foreground:"3DC9B0"},{token:"delimiter",foreground:"DCDCDC"},{token:"delimiter.html",foreground:"808080"},{token:"delimiter.xml",foreground:"808080"},{token:"tag",foreground:"569CD6"},{token:"tag.id.pug",foreground:"4F76AC"},{token:"tag.class.pug",foreground:"4F76AC"},{token:"meta.scss",foreground:"A79873"},{token:"meta.tag",foreground:"CE9178"},{token:"metatag",foreground:"DD6A6F"},{token:"metatag.content.html",foreground:"9CDCFE"},{token:"metatag.html",foreground:"569CD6"},{token:"metatag.xml",foreground:"569CD6"},{token:"metatag.php",fontStyle:"bold"},{token:"key",foreground:"9CDCFE"},{token:"string.key.json",foreground:"9CDCFE"},{token:"string.value.json",foreground:"CE9178"},{token:"attribute.name",foreground:"9CDCFE"},{token:"attribute.value",foreground:"CE9178"},{token:"attribute.value.number.css",foreground:"B5CEA8"},{token:"attribute.value.unit.css",foreground:"B5CEA8"},{token:"attribute.value.hex.css",foreground:"D4D4D4"},{token:"string",foreground:"CE9178"},{token:"string.sql",foreground:"FF0000"},{token:"keyword",foreground:"569CD6"},{token:"keyword.flow",foreground:"C586C0"},{token:"keyword.json",foreground:"CE9178"},{token:"keyword.flow.scss",foreground:"569CD6"},{token:"operator.scss",foreground:"909090"},{token:"operator.sql",foreground:"778899"},{token:"operator.swift",foreground:"909090"},{token:"predefined.sql",foreground:"FF00FF"}],colors:{[ni.r]:"#1E1E1E",[ni.B]:"#D4D4D4",[ni.J]:"#3A3D41",[Hn.A]:"#404040",[Hn.a]:"#707070",[ni.R]:"#ADD6FF26"}},_d={base:"hc-black",inherit:!1,rules:[{token:"",foreground:"FFFFFF",background:"000000"},{token:"invalid",foreground:"f44747"},{token:"emphasis",fontStyle:"italic"},{token:"strong",fontStyle:"bold"},{token:"variable",foreground:"1AEBFF"},{token:"variable.parameter",foreground:"9CDCFE"},{token:"constant",foreground:"569CD6"},{token:"comment",foreground:"608B4E"},{token:"number",foreground:"FFFFFF"},{token:"regexp",foreground:"C0C0C0"},{token:"annotation",foreground:"569CD6"},{token:"type",foreground:"3DC9B0"},{token:"delimiter",foreground:"FFFF00"},{token:"delimiter.html",foreground:"FFFF00"},{token:"tag",foreground:"569CD6"},{token:"tag.id.pug",foreground:"4F76AC"},{token:"tag.class.pug",foreground:"4F76AC"},{token:"meta",foreground:"D4D4D4"},{token:"meta.tag",foreground:"CE9178"},{token:"metatag",foreground:"569CD6"},{token:"metatag.content.html",foreground:"1AEBFF"},{token:"metatag.html",foreground:"569CD6"},{token:"metatag.xml",foreground:"569CD6"},{token:"metatag.php",fontStyle:"bold"},{token:"key",foreground:"9CDCFE"},{token:"string.key",foreground:"9CDCFE"},{token:"string.value",foreground:"CE9178"},{token:"attribute.name",foreground:"569CD6"},{token:"attribute.value",foreground:"3FF23F"},{token:"string",foreground:"CE9178"},{token:"string.sql",foreground:"FF0000"},{token:"keyword",foreground:"569CD6"},{token:"keyword.flow",foreground:"C586C0"},{token:"operator.sql",foreground:"778899"},{token:"operator.swift",foreground:"909090"},{token:"predefined.sql",foreground:"FF00FF"}],colors:{[ni.r]:"#000000",[ni.B]:"#FFFFFF",[Hn.A]:"#FFFFFF",[Hn.a]:"#FFFFFF"}};var ua=t("nEHx");function Dd(){const e=new x.b,i=Object(ss.a)();return i.onDidChange(()=>e.fire()),{onDidChange:e.event,getCSS(){const s={},l=H=>{let X=H.defaults;for(;nn.d.isThemeIcon(X);){const Ue=i.getIcon(X.id);if(!Ue)return;X=Ue.defaults}const ge=X.fontId;if(ge){const Ue=i.getIconFont(ge);if(Ue)return s[ge]=Ue,`.codicon-${H.id}:before { content: '${X.fontCharacter}'; font-family: ${Object(Se.r)(ge)}; }`}return`.codicon-${H.id}:before { content: '${X.fontCharacter}'; }`},P=[];for(let H of i.getIcons()){const X=l(H);X&&P.push(X)}for(let H in s){const X=s[H],ge=X.definition.src.map(Ue=>`${Object(Se.s)(Ue.location)} format('${Ue.format}')`).join(", ");P.push(`@font-face { src: ${ge}; font-family: ${Object(Se.r)(H)}; font-display: block; }`)}return P.join(`
|
|
|
`)}}}const xs="vs",Dr="vs-dark",Ks="hc-black",Md=oi.a.as(ni.a.ColorContribution),xd=oi.a.as(nn.a.ThemingContribution);class ll{constructor(e,i){this.semanticHighlighting=!1,this.themeData=i;let s=i.base;e.length>0?(Mr(e)?this.id=e:this.id=s+" "+e,this.themeName=e):(this.id=s,this.themeName=s),this.colors=null,this.defaultColors=Object.create(null),this._tokenTheme=null}get base(){return this.themeData.base}notifyBaseUpdated(){this.themeData.inherit&&(this.colors=null,this._tokenTheme=null)}getColors(){if(!this.colors){const e=new Map;for(let i in this.themeData.colors)e.set(i,ms.a.fromHex(this.themeData.colors[i]));if(this.themeData.inherit){let i=ha(this.themeData.base);for(let s in i.colors)e.has(s)||e.set(s,ms.a.fromHex(i.colors[s]))}this.colors=e}return this.colors}getColor(e,i){const s=this.getColors().get(e);return s||(i!==!1?this.getDefault(e):void 0)}getDefault(e){let i=this.defaultColors[e];return i||(i=Md.resolveDefaultColor(e,this),this.defaultColors[e]=i,i)}defines(e){return Object.prototype.hasOwnProperty.call(this.getColors(),e)}get type(){switch(this.base){case xs:return ua.a.LIGHT;case Ks:return ua.a.HIGH_CONTRAST;default:return ua.a.DARK}}get tokenTheme(){if(!this._tokenTheme){let e=[],i=[];if(this.themeData.inherit){let P=ha(this.themeData.base);e=P.rules,P.encodedTokensColors&&(i=P.encodedTokensColors)}const s=this.themeData.colors["editor.foreground"],l=this.themeData.colors["editor.background"];if(s||l){const P={token:""};s&&(P.foreground=s),l&&(P.background=l),e.push(P)}e=e.concat(this.themeData.rules),this.themeData.encodedTokensColors&&(i=this.themeData.encodedTokensColors),this._tokenTheme=sl.createFromRawTokenTheme(e,i)}return this._tokenTheme}getTokenStyleMetadata(e,i,s){const l=this.tokenTheme._match([e].concat(i).join(".")),P=l.metadata,H=Rt.D.getForeground(P),X=Rt.D.getFontStyle(P);return{foreground:H,italic:Boolean(X&1),bold:Boolean(X&2),underline:Boolean(X&4)}}}function Mr(e){return e===xs||e===Dr||e===Ks}function ha(e){switch(e){case xs:return wd;case Dr:return Ld;case Ks:return _d}}function ma(e){let i=ha(e);return new ll(e,i)}class Td extends $e.a{constructor(){super();this._onColorThemeChange=this._register(new x.b),this.onDidColorThemeChange=this._onColorThemeChange.event,this._environment=Object.create(null),this._autoDetectHighContrast=!0,this._knownThemes=new Map,this._knownThemes.set(xs,ma(xs)),this._knownThemes.set(Dr,ma(Dr)),this._knownThemes.set(Ks,ma(Ks));const e=Dd();this._codiconCSS=e.getCSS(),this._themeCSS="",this._allCSS=`${this._codiconCSS}
|
|
|
${this._themeCSS}`,this._globalStyleElement=null,this._styleElements=[],this._colorMapOverride=null,this.setTheme(xs),e.onDidChange(()=>{this._codiconCSS=e.getCSS(),this._updateCSS()}),Se.m("(forced-colors: active)",()=>{this._updateActualTheme()})}registerEditorContainer(e){return Se.O(e)?this._registerShadowDomContainer(e):this._registerRegularEditorContainer()}_registerRegularEditorContainer(){return this._globalStyleElement||(this._globalStyleElement=Se.w(),this._globalStyleElement.className="monaco-colors",this._globalStyleElement.textContent=this._allCSS,this._styleElements.push(this._globalStyleElement)),$e.a.None}_registerShadowDomContainer(e){const i=Se.w(e);return i.className="monaco-colors",i.textContent=this._allCSS,this._styleElements.push(i),{dispose:()=>{for(let s=0;s<this._styleElements.length;s++)if(this._styleElements[s]===i){this._styleElements.splice(s,1);return}}}}defineTheme(e,i){if(!/^[a-z0-9\-]+$/i.test(e))throw new Error("Illegal theme name!");if(!Mr(i.base)&&!Mr(e))throw new Error("Illegal theme base!");this._knownThemes.set(e,new ll(e,i)),Mr(e)&&this._knownThemes.forEach(s=>{s.base===e&&s.notifyBaseUpdated()}),this._theme.themeName===e&&this.setTheme(e)}getColorTheme(){return this._theme}setColorMapOverride(e){this._colorMapOverride=e,this._updateThemeOrColorMap()}setTheme(e){let i;this._knownThemes.has(e)?i=this._knownThemes.get(e):i=this._knownThemes.get(xs),this._desiredTheme=i,this._updateActualTheme()}_updateActualTheme(){const e=this._autoDetectHighContrast&&window.matchMedia("(forced-colors: active)").matches?this._knownThemes.get(Ks):this._desiredTheme;if(this._theme===e)return;this._theme=e,this._updateThemeOrColorMap()}setAutoDetectHighContrast(e){this._autoDetectHighContrast=e,this._updateActualTheme()}_updateThemeOrColorMap(){let e=[],i={},s={addRule:P=>{i[P]||(e.push(P),i[P]=!0)}};xd.getThemingParticipants().forEach(P=>P(this._theme,s,this._environment));const l=this._colorMapOverride||this._theme.tokenTheme.getColorMap();s.addRule(Sd(l)),this._themeCSS=e.join(`
|
|
|
`),this._updateCSS(),Rt.E.setColorMap(l),this._onColorThemeChange.fire(this._theme)}_updateCSS(){this._allCSS=`${this._codiconCSS}
|
|
|
${this._themeCSS}`,this._styleElements.forEach(e=>e.textContent=this._allCSS)}getFileIconTheme(){return{hasFileIcons:!1,hasFolderIcons:!1,hidesExplorerArrows:!1}}}var Gs=t("JYp7"),Od=function(e,i,s,l){var P=arguments.length,H=P<3?i:l===null?l=Object.getOwnPropertyDescriptor(i,s):l,X;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")H=Reflect.decorate(e,i,s,l);else for(var ge=e.length-1;ge>=0;ge--)(X=e[ge])&&(H=(P<3?X(H):P>3?X(i,s,H):X(i,s))||H);return P>3&&H&&Object.defineProperty(i,s,H),H},Id=function(e,i){return function(s,l){i(s,l,e)}};const ur="data-keybinding-context";class ga{constructor(e,i){this._id=e,this._parent=i,this._value=Object.create(null),this._value._contextId=e}setValue(e,i){return this._value[e]!==i?(this._value[e]=i,!0):!1}removeValue(e){return e in this._value?(delete this._value[e],!0):!1}getValue(e){const i=this._value[e];return typeof i=="undefined"&&this._parent?this._parent.getValue(e):i}}class Xs extends ga{constructor(){super(-1,null)}setValue(e,i){return!1}removeValue(e){return!1}getValue(e){return}}Xs.INSTANCE=new Xs;class xr extends ga{constructor(e,i,s){super(e,null);this._configurationService=i,this._values=he.c.forConfigKeys(),this._listener=this._configurationService.onDidChangeConfiguration(l=>{if(l.source===6){const P=Array.from(Gs.a.map(this._values,([H])=>H));this._values.clear(),s.fire(new cl(P))}else{const P=[];for(const H of l.affectedKeys){const X=`config.${H}`,ge=this._values.findSuperstr(X);ge!==void 0&&(P.push(...Gs.a.map(ge,([Ue])=>Ue)),this._values.deleteSuperstr(X)),this._values.has(X)&&(P.push(X),this._values.delete(X))}s.fire(new cl(P))}})}dispose(){this._listener.dispose()}getValue(e){if(e.indexOf(xr._keyPrefix)!==0)return super.getValue(e);if(this._values.has(e))return this._values.get(e);const i=e.substr(xr._keyPrefix.length),s=this._configurationService.getValue(i);let l;switch(typeof s){case"number":case"boolean":case"string":l=s;break;default:Array.isArray(s)?l=JSON.stringify(s):l=s}return this._values.set(e,l),l}setValue(e,i){return super.setValue(e,i)}removeValue(e){return super.removeValue(e)}}xr._keyPrefix="config.";class Ad{constructor(e,i,s){this._service=e,this._key=i,this._defaultValue=s,this.reset()}set(e){this._service.setContext(this._key,e)}reset(){typeof this._defaultValue=="undefined"?this._service.removeContext(this._key):this._service.setContext(this._key,this._defaultValue)}get(){return this._service.getContextKeyValue(this._key)}}class dl{constructor(e){this.key=e}affectsSome(e){return e.has(this.key)}}class cl{constructor(e){this.keys=e}affectsSome(e){for(const i of this.keys)if(e.has(i))return!0;return!1}}class Rd{constructor(e){this.events=e}affectsSome(e){for(const i of this.events)if(i.affectsSome(e))return!0;return!1}}class ul{constructor(e){this._onDidChangeContext=new x.e({merge:i=>new Rd(i)}),this.onDidChangeContext=this._onDidChangeContext.event,this._isDisposed=!1,this._myContextId=e}createKey(e,i){if(this._isDisposed)throw new Error("AbstractContextKeyService has been disposed");return new Ad(this,e,i)}bufferChangeEvents(e){this._onDidChangeContext.pause();try{e()}finally{this._onDidChangeContext.resume()}}createScoped(e){if(this._isDisposed)throw new Error("AbstractContextKeyService has been disposed");return new Nd(this,e)}contextMatchesRules(e){if(this._isDisposed)throw new Error("AbstractContextKeyService has been disposed");const i=this.getContextValuesContainer(this._myContextId),s=At.contextMatchesRules(i,e);return s}getContextKeyValue(e){return this._isDisposed?void 0:this.getContextValuesContainer(this._myContextId).getValue(e)}setContext(e,i){if(this._isDisposed)return;const s=this.getContextValuesContainer(this._myContextId);if(!s)return;s.setValue(e,i)&&this._onDidChangeContext.fire(new dl(e))}removeContext(e){if(this._isDisposed)return;this.getContextValuesContainer(this._myContextId).removeValue(e)&&this._onDidChangeContext.fire(new dl(e))}getContext(e){return this._isDisposed?Xs.INSTANCE:this.getContextValuesContainer(kd(e))}}let fa=class extends ul{constructor(i){super(0);this._contexts=new Map,this._toDispose=new $e.b,this._lastContextId=0;const s=new xr(this._myContextId,i,this._onDidChangeContext);this._contexts.set(this._myContextId,s),this._toDispose.add(s)}dispose(){this._onDidChangeContext.dispose(),this._isDisposed=!0,this._toDispose.dispose()}getContextValuesContainer(i){return this._isDisposed?Xs.INSTANCE:this._contexts.get(i)||Xs.INSTANCE}createChildContext(i=this._myContextId){if(this._isDisposed)throw new Error("ContextKeyService has been disposed");let s=++this._lastContextId;return this._contexts.set(s,new ga(s,this.getContextValuesContainer(i))),s}disposeContext(i){this._isDisposed||this._contexts.delete(i)}};fa=Od([Id(0,f.a)],fa);class Nd extends ul{constructor(e,i){super(e.createChildContext());if(this._parentChangeListener=new $e.d,this._parent=e,this._updateParentChangeListener(),this._domNode=i,this._domNode.hasAttribute(ur)){let s="";this._domNode.classList&&(s=Array.from(this._domNode.classList.values()).join(", ")),console.error(`Element already has context attribute${s?": "+s:""}`)}this._domNode.setAttribute(ur,String(this._myContextId))}_updateParentChangeListener(){this._parentChangeListener.value=this._parent.onDidChangeContext(this._onDidChangeContext.fire,this._onDidChangeContext)}dispose(){if(this._isDisposed)return;this._onDidChangeContext.dispose(),this._parent.disposeContext(this._myContextId),this._parentChangeListener.dispose(),this._domNode.removeAttribute(ur),this._isDisposed=!0}getContextValuesContainer(e){return this._isDisposed?Xs.INSTANCE:this._parent.getContextValuesContainer(e)}createChildContext(e=this._myContextId){if(this._isDisposed)throw new Error("ScopedContextKeyService has been disposed");return this._parent.createChildContext(e)}disposeContext(e){if(this._isDisposed)return;this._parent.disposeContext(e)}}function kd(e){for(;e;){if(e.hasAttribute(ur)){const i=e.getAttribute(ur);return i?parseInt(i,10):NaN}e=e.parentElement}return 0}ie.a.registerCommand(Ct.d,function(e,i,s){e.get(Ct.b).createKey(String(i),s)}),ie.a.registerCommand({id:"getContextKeyInfo",handler(){return[...Ct.c.all()].sort((e,i)=>e.key.localeCompare(i.key))},description:{description:Object(De.a)("getContextKeyInfo","A command that returns information about context keys"),args:[]}}),ie.a.registerCommand("_generateContextKeyInfo",function(){const e=[],i=new Set;for(let s of Ct.c.all())i.has(s.key)||(i.add(s.key),e.push(s));e.sort((s,l)=>s.key.localeCompare(l.key)),console.log(JSON.stringify(e,void 0,2))});var pa=t("XXUj"),ba=t("XSiN"),jd=t("D3Dy"),$s=t("pg8w"),hl=t("7/Ik"),ml=t("udvx"),Pd=t("CjF5"),gl=t("nuFA"),th=t("TT2d"),gs;(function(e){e[e.AVOID=0]="AVOID",e[e.ALIGN=1]="ALIGN"})(gs||(gs={}));function Ys(e,i,s){const l=s.mode===gs.ALIGN?s.offset:s.offset+s.size,P=s.mode===gs.ALIGN?s.offset+s.size:s.offset;return s.position===0?i<=e-l?l:i<=P?P-i:Math.max(e-i,0):i<=P?P-i:i<=e-l?l:0}class hr extends $e.a{constructor(e,i){super();this.container=null,this.delegate=null,this.toDisposeOnClean=$e.a.None,this.toDisposeOnSetContainer=$e.a.None,this.shadowRoot=null,this.shadowRootHostElement=null,this.view=Se.a(".context-view"),this.useFixedPosition=!1,this.useShadowDOM=!1,Se.K(this.view),this.setContainer(e,i),this._register(Object($e.i)(()=>this.setContainer(null,1)))}setContainer(e,i){var s;if(this.container&&(this.toDisposeOnSetContainer.dispose(),this.shadowRoot?(this.shadowRoot.removeChild(this.view),this.shadowRoot=null,(s=this.shadowRootHostElement)===null||s===void 0||s.remove(),this.shadowRootHostElement=null):this.container.removeChild(this.view),this.container=null),e){if(this.container=e,this.useFixedPosition=i!==1,this.useShadowDOM=i===3,this.useShadowDOM){this.shadowRootHostElement=Se.a(".shadow-root-host"),this.container.appendChild(this.shadowRootHostElement),this.shadowRoot=this.shadowRootHostElement.attachShadow({mode:"open"});const P=document.createElement("style");P.textContent=Fd,this.shadowRoot.appendChild(P),this.shadowRoot.appendChild(this.view),this.shadowRoot.appendChild(Se.a("slot"))}else this.container.appendChild(this.view);const l=new $e.b;hr.BUBBLE_UP_EVENTS.forEach(P=>{l.add(Se.o(this.container,P,H=>{this.onDOMEvent(H,!1)}))}),hr.BUBBLE_DOWN_EVENTS.forEach(P=>{l.add(Se.o(this.container,P,H=>{this.onDOMEvent(H,!0)},!0))}),this.toDisposeOnSetContainer=l}}show(e){this.isVisible()&&this.hide(),Se.t(this.view),this.view.className="context-view",this.view.style.top="0px",this.view.style.left="0px",this.view.style.zIndex="2500",this.view.style.position=this.useFixedPosition?"fixed":"absolute",Se.W(this.view),this.toDisposeOnClean=e.render(this.view)||$e.a.None,this.delegate=e,this.doLayout(),this.delegate.focus&&this.delegate.focus()}getViewElement(){return this.view}layout(){if(!this.isVisible())return;if(this.delegate.canRelayout===!1&&!(Vt.c&&Pd.a.pointerEvents)){this.hide();return}this.delegate.layout&&this.delegate.layout(),this.doLayout()}doLayout(){if(!this.isVisible())return;let e=this.delegate.getAnchor(),i;if(Se.M(e)){let Je=Se.D(e);i={top:Je.top,left:Je.left,width:Je.width,height:Je.height}}else i={top:e.y,left:e.x,width:e.width||1,height:e.height||2};const s=Se.I(this.view),l=Se.H(this.view),P=this.delegate.anchorPosition||0,H=this.delegate.anchorAlignment||0,X=this.delegate.anchorAxisAlignment||0;let ge,Ue;if(X===0){const Je={offset:i.top-window.pageYOffset,size:i.height,position:P===0?0:1},wt={offset:i.left,size:i.width,position:H===0?0:1,mode:gs.ALIGN};ge=Ys(window.innerHeight,l,Je)+window.pageYOffset,gl.a.intersects({start:ge,end:ge+l},{start:Je.offset,end:Je.offset+Je.size})&&(wt.mode=gs.AVOID),Ue=Ys(window.innerWidth,s,wt)}else{const Je={offset:i.left,size:i.width,position:H===0?0:1},wt={offset:i.top,size:i.height,position:P===0?0:1,mode:gs.ALIGN};Ue=Ys(window.innerWidth,s,Je),gl.a.intersects({start:Ue,end:Ue+s},{start:Je.offset,end:Je.offset+Je.size})&&(wt.mode=gs.AVOID),ge=Ys(window.innerHeight,l,wt)+window.pageYOffset}this.view.classList.remove("top","bottom","left","right"),this.view.classList.add(P===0?"bottom":"top"),this.view.classList.add(H===0?"left":"right"),this.view.classList.toggle("fixed",this.useFixedPosition);const st=Se.D(this.container);this.view.style.top=`${ge-(this.useFixedPosition?Se.D(this.view).top:st.top)}px`,this.view.style.left=`${Ue-(this.useFixedPosition?Se.D(this.view).left:st.left)}px`,this.view.style.width="initial"}hide(e){const i=this.delegate;this.delegate=null,(i==null?void 0:i.onHide)&&i.onHide(e),this.toDisposeOnClean.dispose(),Se.K(this.view)}isVisible(){return!!this.delegate}onDOMEvent(e,i){this.delegate&&(this.delegate.onDOMEvent?this.delegate.onDOMEvent(e,document.activeElement):i&&!Se.L(e.target,this.container)&&this.hide())}dispose(){this.hide(),super.dispose()}}hr.BUBBLE_UP_EVENTS=["click","keydown","focus","blur"],hr.BUBBLE_DOWN_EVENTS=["click"];let Fd=`
|
|
|
:host {
|
|
|
all: initial; /* 1st rule so subsequent properties are reset. */
|
|
|
}
|
|
|
|
|
|
@font-face {
|
|
|
font-family: "codicon";
|
|
|
font-display: block;
|
|
|
src: url("./codicon.ttf?5d4d76ab2ce5108968ad644d591a16a6") format("truetype");
|
|
|
}
|
|
|
|
|
|
.codicon[class*='codicon-'] {
|
|
|
font: normal normal normal 16px/1 codicon;
|
|
|
display: inline-block;
|
|
|
text-decoration: none;
|
|
|
text-rendering: auto;
|
|
|
text-align: center;
|
|
|
-webkit-font-smoothing: antialiased;
|
|
|
-moz-osx-font-smoothing: grayscale;
|
|
|
user-select: none;
|
|
|
-webkit-user-select: none;
|
|
|
-ms-user-select: none;
|
|
|
}
|
|
|
|
|
|
:host {
|
|
|
font-family: -apple-system, BlinkMacSystemFont, "Segoe WPC", "Segoe UI", "HelveticaNeue-Light", system-ui, "Ubuntu", "Droid Sans", sans-serif;
|
|
|
}
|
|
|
|
|
|
:host-context(.mac) { font-family: -apple-system, BlinkMacSystemFont, sans-serif; }
|
|
|
:host-context(.mac:lang(zh-Hans)) { font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", sans-serif; }
|
|
|
:host-context(.mac:lang(zh-Hant)) { font-family: -apple-system, BlinkMacSystemFont, "PingFang TC", sans-serif; }
|
|
|
:host-context(.mac:lang(ja)) { font-family: -apple-system, BlinkMacSystemFont, "Hiragino Kaku Gothic Pro", sans-serif; }
|
|
|
:host-context(.mac:lang(ko)) { font-family: -apple-system, BlinkMacSystemFont, "Nanum Gothic", "Apple SD Gothic Neo", "AppleGothic", sans-serif; }
|
|
|
|
|
|
:host-context(.windows) { font-family: "Segoe WPC", "Segoe UI", sans-serif; }
|
|
|
:host-context(.windows:lang(zh-Hans)) { font-family: "Segoe WPC", "Segoe UI", "Microsoft YaHei", sans-serif; }
|
|
|
:host-context(.windows:lang(zh-Hant)) { font-family: "Segoe WPC", "Segoe UI", "Microsoft Jhenghei", sans-serif; }
|
|
|
:host-context(.windows:lang(ja)) { font-family: "Segoe WPC", "Segoe UI", "Yu Gothic UI", "Meiryo UI", sans-serif; }
|
|
|
:host-context(.windows:lang(ko)) { font-family: "Segoe WPC", "Segoe UI", "Malgun Gothic", "Dotom", sans-serif; }
|
|
|
|
|
|
:host-context(.linux) { font-family: system-ui, "Ubuntu", "Droid Sans", sans-serif; }
|
|
|
:host-context(.linux:lang(zh-Hans)) { font-family: system-ui, "Ubuntu", "Droid Sans", "Source Han Sans SC", "Source Han Sans CN", "Source Han Sans", sans-serif; }
|
|
|
:host-context(.linux:lang(zh-Hant)) { font-family: system-ui, "Ubuntu", "Droid Sans", "Source Han Sans TC", "Source Han Sans TW", "Source Han Sans", sans-serif; }
|
|
|
:host-context(.linux:lang(ja)) { font-family: system-ui, "Ubuntu", "Droid Sans", "Source Han Sans J", "Source Han Sans JP", "Source Han Sans", sans-serif; }
|
|
|
:host-context(.linux:lang(ko)) { font-family: system-ui, "Ubuntu", "Droid Sans", "Source Han Sans K", "Source Han Sans JR", "Source Han Sans", "UnDotum", "FBaekmuk Gulim", sans-serif; }
|
|
|
`;var is=t("EJc0");const va=/\(&([^\s&])\)|(^|[^&])&([^\s&])/,Ca=/(&)?(&)([^\s&])/g,fl=Object(xn.e)("menu-selection",xn.b.check),pl=Object(xn.e)("menu-submenu",xn.b.chevronRight);var Tr;(function(e){e[e.Right=0]="Right",e[e.Left=1]="Left"})(Tr||(Tr={}));class Zs extends Es.a{constructor(e,i,s={}){e.classList.add("monaco-menu-container"),e.setAttribute("role","presentation");const l=document.createElement("div");l.classList.add("monaco-menu"),l.setAttribute("role","presentation"),super(l,{orientation:1,actionViewItemProvider:X=>this.doGetActionViewItem(X,s,P),context:s.context,actionRunner:s.actionRunner,ariaLabel:s.ariaLabel,focusOnlyEnabledItems:!0,triggerKeys:{keys:[3,...Vt.f||Vt.d?[10]:[]],keyDown:!0}}),this.menuElement=l,this.actionsList.setAttribute("role","menu"),this.actionsList.tabIndex=0,this.menuDisposables=this._register(new $e.b),this.initializeStyleSheet(e),this._register($s.b.addTarget(l)),Object(Se.i)(l,Se.d.KEY_DOWN,X=>{const ge=new qo.a(X);ge.equals(2)&&X.preventDefault()}),s.enableMnemonics&&this.menuDisposables.add(Object(Se.i)(l,Se.d.KEY_DOWN,X=>{const ge=X.key.toLocaleLowerCase();if(this.mnemonics.has(ge)){Se.c.stop(X,!0);const Ue=this.mnemonics.get(ge);if(Ue.length===1&&(Ue[0]instanceof bl&&Ue[0].container&&this.focusItemByElement(Ue[0].container),Ue[0].onClick(X)),Ue.length>1){const st=Ue.shift();st&&st.container&&(this.focusItemByElement(st.container),Ue.push(st)),this.mnemonics.set(ge,Ue)}}})),Vt.d&&this._register(Object(Se.i)(l,Se.d.KEY_DOWN,X=>{const ge=new qo.a(X);ge.equals(14)||ge.equals(11)?(this.focusedItem=this.viewItems.length-1,this.focusNext(),Se.c.stop(X,!0)):(ge.equals(13)||ge.equals(12))&&(this.focusedItem=0,this.focusPrevious(),Se.c.stop(X,!0))})),this._register(Object(Se.i)(this.domNode,Se.d.MOUSE_OUT,X=>{let ge=X.relatedTarget;Object(Se.L)(ge,this.domNode)||(this.focusedItem=void 0,this.updateFocus(),X.stopPropagation())})),this._register(Object(Se.i)(this.actionsList,Se.d.MOUSE_OVER,X=>{let ge=X.target;if(!ge||!Object(Se.L)(ge,this.actionsList)||ge===this.actionsList)return;for(;ge.parentElement!==this.actionsList&&ge.parentElement!==null;)ge=ge.parentElement;if(ge.classList.contains("action-item")){const Ue=this.focusedItem;this.setFocusedItem(ge),Ue!==this.focusedItem&&this.updateFocus()}})),this._register($s.b.addTarget(this.actionsList)),this._register(Object(Se.i)(this.actionsList,$s.a.Tap,X=>{let ge=X.initialTarget;if(!ge||!Object(Se.L)(ge,this.actionsList)||ge===this.actionsList)return;for(;ge.parentElement!==this.actionsList&&ge.parentElement!==null;)ge=ge.parentElement;if(ge.classList.contains("action-item")){const Ue=this.focusedItem;this.setFocusedItem(ge),Ue!==this.focusedItem&&this.updateFocus()}}));let P={parent:this};this.mnemonics=new Map,this.scrollableElement=this._register(new Cr.a(l,{alwaysConsumeMouseWheel:!0,horizontal:2,vertical:3,verticalScrollbarSize:7,handleMouseWheel:!0,useShadows:!0}));const H=this.scrollableElement.getDomNode();H.style.position="",this._register(Object(Se.i)(l,$s.a.Change,X=>{Se.c.stop(X,!0);const ge=this.scrollableElement.getScrollPosition().scrollTop;this.scrollableElement.setScrollPosition({scrollTop:ge-X.translationY})})),this._register(Object(Se.i)(H,Se.d.MOUSE_UP,X=>{X.preventDefault()})),l.style.maxHeight=`${Math.max(10,window.innerHeight-e.getBoundingClientRect().top-35)}px`,i=i.filter(X=>{var ge;return((ge=s.submenuIds)===null||ge===void 0?void 0:ge.has(X.id))?(console.warn(`Found submenu cycle: ${X.id}`),!1):!0}),this.push(i,{icon:!0,label:!0,isMenu:!0}),e.appendChild(this.scrollableElement.getDomNode()),this.scrollableElement.scanDomNode(),this.viewItems.filter(X=>!(X instanceof Ea)).forEach((X,ge,Ue)=>{X.updatePositionInSet(ge+1,Ue.length)})}initializeStyleSheet(e){Object(Se.O)(e)?(this.styleSheet=Object(Se.w)(e),this.styleSheet.textContent=vl):(Zs.globalStyleSheet||(Zs.globalStyleSheet=Object(Se.w)(),Zs.globalStyleSheet.textContent=vl),this.styleSheet=Zs.globalStyleSheet)}style(e){const i=this.getContainer(),s=e.foregroundColor?`${e.foregroundColor}`:"",l=e.backgroundColor?`${e.backgroundColor}`:"",P=e.borderColor?`1px solid ${e.borderColor}`:"",H=e.shadowColor?`0 2px 4px ${e.shadowColor}`:"";i.style.border=P,this.domNode.style.color=s,this.domNode.style.backgroundColor=l,i.style.boxShadow=H,this.viewItems&&this.viewItems.forEach(X=>{(X instanceof ya||X instanceof Ea)&&X.style(e)})}getContainer(){return this.scrollableElement.getDomNode()}get onScroll(){return this.scrollableElement.onScroll}focusItemByElement(e){const i=this.focusedItem;this.setFocusedItem(e),i!==this.focusedItem&&this.updateFocus()}setFocusedItem(e){for(let i=0;i<this.actionsList.children.length;i++){let s=this.actionsList.children[i];if(e===s){this.focusedItem=i;break}}}updateFocus(e){super.updateFocus(e,!0),typeof this.focusedItem!="undefined"&&this.scrollableElement.setScrollPosition({scrollTop:Math.round(this.menuElement.scrollTop)})}doGetActionViewItem(e,i,s){if(e instanceof An.d)return new Ea(i.context,e,{icon:!0});if(e instanceof An.e){const l=new bl(e,e.actions,s,Object.assign(Object.assign({},i),{submenuIds:new Set([...i.submenuIds||[],e.id])}));if(i.enableMnemonics){const P=l.getMnemonic();if(P&&l.isEnabled()){let H=[];this.mnemonics.has(P)&&(H=this.mnemonics.get(P)),H.push(l),this.mnemonics.set(P,H)}}return l}else{const l={enableMnemonics:i.enableMnemonics,useEventAsContext:i.useEventAsContext};if(i.getKeyBinding){const H=i.getKeyBinding(e);if(H){const X=H.getLabel();X&&(l.keybinding=X)}}const P=new ya(i.context,e,l);if(i.enableMnemonics){const H=P.getMnemonic();if(H&&P.isEnabled()){let X=[];this.mnemonics.has(H)&&(X=this.mnemonics.get(H)),X.push(P),this.mnemonics.set(H,X)}}return P}}}class ya extends hl.b{constructor(e,i,s={}){if(s.isMenu=!0,super(i,i,s),this.options=s,this.options.icon=s.icon!==void 0?s.icon:!1,this.options.label=s.label!==void 0?s.label:!0,this.cssClass="",this.options.label&&s.enableMnemonics){let l=this.getAction().label;if(l){let P=va.exec(l);P&&(this.mnemonic=(P[1]?P[1]:P[3]).toLocaleLowerCase())}}this.runOnceToEnableMouseUp=new Lo.e(()=>{if(!this.element)return;this._register(Object(Se.i)(this.element,Se.d.MOUSE_UP,l=>{if(Se.c.stop(l,!0),jd.g){const P=new ba.a(l);if(P.rightButton)return;this.onClick(l)}else setTimeout(()=>{this.onClick(l)},0)})),this._register(Object(Se.i)(this.element,Se.d.CONTEXT_MENU,l=>{Se.c.stop(l,!0)}))},100),this._register(this.runOnceToEnableMouseUp)}render(e){if(super.render(e),!this.element)return;this.container=e,this.item=Object(Se.q)(this.element,Object(Se.a)("a.action-menu-item")),this._action.id===An.d.ID?this.item.setAttribute("role","presentation"):(this.item.setAttribute("role","menuitem"),this.mnemonic&&this.item.setAttribute("aria-keyshortcuts",`${this.mnemonic}`)),this.check=Object(Se.q)(this.item,Object(Se.a)("span.menu-item-check"+fl.cssSelector)),this.check.setAttribute("role","none"),this.label=Object(Se.q)(this.item,Object(Se.a)("span.action-label")),this.options.label&&this.options.keybinding&&(Object(Se.q)(this.item,Object(Se.a)("span.keybinding")).textContent=this.options.keybinding),this.runOnceToEnableMouseUp.schedule(),this.updateClass(),this.updateLabel(),this.updateTooltip(),this.updateEnabled(),this.updateChecked()}blur(){super.blur(),this.applyStyle()}focus(){super.focus(),this.item&&this.item.focus(),this.applyStyle()}updatePositionInSet(e,i){this.item&&(this.item.setAttribute("aria-posinset",`${e}`),this.item.setAttribute("aria-setsize",`${i}`))}updateLabel(){if(!this.label)return;if(this.options.label){Object(Se.t)(this.label);let e=Object(is.e)(this.getAction().label);if(e){const i=Bd(e);this.options.enableMnemonics||(e=i),this.label.setAttribute("aria-label",i.replace(/&&/g,"&"));const s=va.exec(e);if(s){e=ze.s(e),Ca.lastIndex=0;let l=Ca.exec(e);for(;l&&l[1];)l=Ca.exec(e);const P=H=>H.replace(/&&/g,"&");l?this.label.append(ze.J(P(e.substr(0,l.index))," "),Object(Se.a)("u",{"aria-hidden":"true"},l[3]),ze.O(P(e.substr(l.index+l[0].length))," ")):this.label.innerText=P(e).trim(),this.item&&this.item.setAttribute("aria-keyshortcuts",(s[1]?s[1]:s[3]).toLocaleLowerCase())}else this.label.innerText=e.replace(/&&/g,"&").trim()}}}updateTooltip(){let e=null;this.getAction().tooltip?e=this.getAction().tooltip:!this.options.label&&this.getAction().label&&this.options.icon&&(e=this.getAction().label,this.options.keybinding&&(e=De.a({key:"titleLabel",comment:["action title","action keybinding"]},"{0} ({1})",e,this.options.keybinding))),e&&this.item&&(this.item.title=e)}updateClass(){this.cssClass&&this.item&&this.item.classList.remove(...this.cssClass.split(" ")),this.options.icon&&this.label?(this.cssClass=this.getAction().class||"",this.label.classList.add("icon"),this.cssClass&&this.label.classList.add(...this.cssClass.split(" ")),this.updateEnabled()):this.label&&this.label.classList.remove("icon")}updateEnabled(){this.getAction().enabled?(this.element&&(this.element.classList.remove("disabled"),this.element.removeAttribute("aria-disabled")),this.item&&(this.item.classList.remove("disabled"),this.item.removeAttribute("aria-disabled"),this.item.tabIndex=0)):(this.element&&(this.element.classList.add("disabled"),this.element.setAttribute("aria-disabled","true")),this.item&&(this.item.classList.add("disabled"),this.item.setAttribute("aria-disabled","true")))}updateChecked(){if(!this.item)return;const e=this.getAction().checked;this.item.classList.toggle("checked",!!e),e!==void 0?(this.item.setAttribute("role","menuitemcheckbox"),this.item.setAttribute("aria-checked",e?"true":"false")):(this.item.setAttribute("role","menuitem"),this.item.setAttribute("aria-checked",""))}getMnemonic(){return this.mnemonic}applyStyle(){if(!this.menuStyle)return;const e=this.element&&this.element.classList.contains("focused"),i=e&&this.menuStyle.selectionForegroundColor?this.menuStyle.selectionForegroundColor:this.menuStyle.foregroundColor,s=e&&this.menuStyle.selectionBackgroundColor?this.menuStyle.selectionBackgroundColor:void 0,l=e&&this.menuStyle.selectionBorderColor?`thin solid ${this.menuStyle.selectionBorderColor}`:"";this.item&&(this.item.style.color=i?i.toString():"",this.item.style.backgroundColor=s?s.toString():""),this.check&&(this.check.style.color=i?i.toString():""),this.container&&(this.container.style.border=l)}style(e){this.menuStyle=e,this.applyStyle()}}class bl extends ya{constructor(e,i,s,l){super(e,e,l);this.submenuActions=i,this.parentData=s,this.submenuOptions=l,this.mysubmenu=null,this.submenuDisposables=this._register(new $e.b),this.mouseOver=!1,this.expandDirection=l&&l.expandDirection!==void 0?l.expandDirection:Tr.Right,this.showScheduler=new Lo.e(()=>{this.mouseOver&&(this.cleanupExistingSubmenu(!1),this.createSubmenu(!1))},250),this.hideScheduler=new Lo.e(()=>{this.element&&!Object(Se.L)(Object(Se.y)(),this.element)&&this.parentData.submenu===this.mysubmenu&&(this.parentData.parent.focus(!1),this.cleanupExistingSubmenu(!0))},750)}render(e){if(super.render(e),!this.element)return;this.item&&(this.item.classList.add("monaco-submenu-item"),this.item.tabIndex=0,this.item.setAttribute("aria-haspopup","true"),this.updateAriaExpanded("false"),this.submenuIndicator=Object(Se.q)(this.item,Object(Se.a)("span.submenu-indicator"+pl.cssSelector)),this.submenuIndicator.setAttribute("aria-hidden","true")),this._register(Object(Se.i)(this.element,Se.d.KEY_UP,i=>{let s=new qo.a(i);(s.equals(17)||s.equals(3))&&(Se.c.stop(i,!0),this.createSubmenu(!0))})),this._register(Object(Se.i)(this.element,Se.d.KEY_DOWN,i=>{let s=new qo.a(i);Object(Se.y)()===this.item&&((s.equals(17)||s.equals(3))&&Se.c.stop(i,!0))})),this._register(Object(Se.i)(this.element,Se.d.MOUSE_OVER,i=>{this.mouseOver||(this.mouseOver=!0,this.showScheduler.schedule())})),this._register(Object(Se.i)(this.element,Se.d.MOUSE_LEAVE,i=>{this.mouseOver=!1})),this._register(Object(Se.i)(this.element,Se.d.FOCUS_OUT,i=>{this.element&&!Object(Se.L)(Object(Se.y)(),this.element)&&this.hideScheduler.schedule()})),this._register(this.parentData.parent.onScroll(()=>{this.parentData.parent.focus(!1),this.cleanupExistingSubmenu(!1)}))}updateEnabled(){}onClick(e){Se.c.stop(e,!0),this.cleanupExistingSubmenu(!1),this.createSubmenu(!0)}cleanupExistingSubmenu(e){if(this.parentData.submenu&&(e||this.parentData.submenu!==this.mysubmenu)){try{this.parentData.submenu.dispose()}catch(i){}this.parentData.submenu=void 0,this.updateAriaExpanded("false"),this.submenuContainer&&(this.submenuDisposables.clear(),this.submenuContainer=void 0)}}calculateSubmenuMenuLayout(e,i,s,l){const P={top:0,left:0};return P.left=Ys(e.width,i.width,{position:l===Tr.Right?0:1,offset:s.left,size:s.width}),P.left>=s.left&&P.left<s.left+s.width&&(s.left+10+i.width<=e.width&&(P.left=s.left+10),s.top+=10,s.height=0),P.top=Ys(e.height,i.height,{position:0,offset:s.top,size:0}),P.top+i.height===s.top&&P.top+s.height+i.height<=e.height&&(P.top+=s.height),P}createSubmenu(e=!0){if(!this.element)return;if(this.parentData.submenu)this.parentData.submenu.focus(!1);else{this.updateAriaExpanded("true"),this.submenuContainer=Object(Se.q)(this.element,Object(Se.a)("div.monaco-submenu")),this.submenuContainer.classList.add("menubar-menu-items-holder","context-view");const i=getComputedStyle(this.parentData.parent.domNode),s=parseFloat(i.paddingTop||"0")||0;this.submenuContainer.style.zIndex="1",this.submenuContainer.style.position="fixed",this.submenuContainer.style.top="0",this.submenuContainer.style.left="0",this.parentData.submenu=new Zs(this.submenuContainer,this.submenuActions.length?this.submenuActions:[new An.c],this.submenuOptions),this.menuStyle&&this.parentData.submenu.style(this.menuStyle);const l=this.element.getBoundingClientRect(),P={top:l.top-s,left:l.left,height:l.height+2*s,width:l.width},H=this.submenuContainer.getBoundingClientRect(),{top:X,left:ge}=this.calculateSubmenuMenuLayout(new Se.b(window.innerWidth,window.innerHeight),Se.b.lift(H),P,this.expandDirection);this.submenuContainer.style.left=`${ge-H.left}px`,this.submenuContainer.style.top=`${X-H.top}px`,this.submenuDisposables.add(Object(Se.i)(this.submenuContainer,Se.d.KEY_UP,Ue=>{let st=new qo.a(Ue);st.equals(15)&&(Se.c.stop(Ue,!0),this.parentData.parent.focus(),this.cleanupExistingSubmenu(!0))})),this.submenuDisposables.add(Object(Se.i)(this.submenuContainer,Se.d.KEY_DOWN,Ue=>{let st=new qo.a(Ue);st.equals(15)&&Se.c.stop(Ue,!0)})),this.submenuDisposables.add(this.parentData.submenu.onDidCancel(()=>{this.parentData.parent.focus(),this.cleanupExistingSubmenu(!0)})),this.parentData.submenu.focus(e),this.mysubmenu=this.parentData.submenu}}updateAriaExpanded(e){var i;this.item&&((i=this.item)===null||i===void 0||i.setAttribute("aria-expanded",e))}applyStyle(){if(super.applyStyle(),!this.menuStyle)return;const e=this.element&&this.element.classList.contains("focused"),i=e&&this.menuStyle.selectionForegroundColor?this.menuStyle.selectionForegroundColor:this.menuStyle.foregroundColor;this.submenuIndicator&&(this.submenuIndicator.style.color=i?`${i}`:""),this.parentData.submenu&&this.parentData.submenu.style(this.menuStyle)}dispose(){super.dispose(),this.hideScheduler.dispose(),this.mysubmenu&&(this.mysubmenu.dispose(),this.mysubmenu=null),this.submenuContainer&&(this.submenuContainer=void 0)}}class Ea extends hl.a{style(e){this.label&&(this.label.style.borderBottomColor=e.separatorColor?`${e.separatorColor}`:"")}}function Bd(e){const i=va,s=i.exec(e);if(!s)return e;const l=!s[1];return e.replace(i,l?"$2$3":"").trim()}let vl=`
|
|
|
.monaco-menu {
|
|
|
font-size: 13px;
|
|
|
|
|
|
}
|
|
|
|
|
|
${Object(ml.a)(fl)}
|
|
|
${Object(ml.a)(pl)}
|
|
|
|
|
|
.monaco-menu .monaco-action-bar {
|
|
|
text-align: right;
|
|
|
overflow: hidden;
|
|
|
white-space: nowrap;
|
|
|
}
|
|
|
|
|
|
.monaco-menu .monaco-action-bar .actions-container {
|
|
|
display: flex;
|
|
|
margin: 0 auto;
|
|
|
padding: 0;
|
|
|
width: 100%;
|
|
|
justify-content: flex-end;
|
|
|
}
|
|
|
|
|
|
.monaco-menu .monaco-action-bar.vertical .actions-container {
|
|
|
display: inline-block;
|
|
|
}
|
|
|
|
|
|
.monaco-menu .monaco-action-bar.reverse .actions-container {
|
|
|
flex-direction: row-reverse;
|
|
|
}
|
|
|
|
|
|
.monaco-menu .monaco-action-bar .action-item {
|
|
|
cursor: pointer;
|
|
|
display: inline-block;
|
|
|
transition: transform 50ms ease;
|
|
|
position: relative; /* DO NOT REMOVE - this is the key to preventing the ghosting icon bug in Chrome 42 */
|
|
|
}
|
|
|
|
|
|
.monaco-menu .monaco-action-bar .action-item.disabled {
|
|
|
cursor: default;
|
|
|
}
|
|
|
|
|
|
.monaco-menu .monaco-action-bar.animated .action-item.active {
|
|
|
transform: scale(1.272019649, 1.272019649); /* 1.272019649 = \u221A\u03C6 */
|
|
|
}
|
|
|
|
|
|
.monaco-menu .monaco-action-bar .action-item .icon,
|
|
|
.monaco-menu .monaco-action-bar .action-item .codicon {
|
|
|
display: inline-block;
|
|
|
}
|
|
|
|
|
|
.monaco-menu .monaco-action-bar .action-item .codicon {
|
|
|
display: flex;
|
|
|
align-items: center;
|
|
|
}
|
|
|
|
|
|
.monaco-menu .monaco-action-bar .action-label {
|
|
|
font-size: 11px;
|
|
|
margin-right: 4px;
|
|
|
}
|
|
|
|
|
|
.monaco-menu .monaco-action-bar .action-item.disabled .action-label,
|
|
|
.monaco-menu .monaco-action-bar .action-item.disabled .action-label:hover {
|
|
|
opacity: 0.4;
|
|
|
}
|
|
|
|
|
|
/* Vertical actions */
|
|
|
|
|
|
.monaco-menu .monaco-action-bar.vertical {
|
|
|
text-align: left;
|
|
|
}
|
|
|
|
|
|
.monaco-menu .monaco-action-bar.vertical .action-item {
|
|
|
display: block;
|
|
|
}
|
|
|
|
|
|
.monaco-menu .monaco-action-bar.vertical .action-label.separator {
|
|
|
display: block;
|
|
|
border-bottom: 1px solid #bbb;
|
|
|
padding-top: 1px;
|
|
|
margin-left: .8em;
|
|
|
margin-right: .8em;
|
|
|
}
|
|
|
|
|
|
.monaco-menu .secondary-actions .monaco-action-bar .action-label {
|
|
|
margin-left: 6px;
|
|
|
}
|
|
|
|
|
|
/* Action Items */
|
|
|
.monaco-menu .monaco-action-bar .action-item.select-container {
|
|
|
overflow: hidden; /* somehow the dropdown overflows its container, we prevent it here to not push */
|
|
|
flex: 1;
|
|
|
max-width: 170px;
|
|
|
min-width: 60px;
|
|
|
display: flex;
|
|
|
align-items: center;
|
|
|
justify-content: center;
|
|
|
margin-right: 10px;
|
|
|
}
|
|
|
|
|
|
.monaco-menu .monaco-action-bar.vertical {
|
|
|
margin-left: 0;
|
|
|
overflow: visible;
|
|
|
}
|
|
|
|
|
|
.monaco-menu .monaco-action-bar.vertical .actions-container {
|
|
|
display: block;
|
|
|
}
|
|
|
|
|
|
.monaco-menu .monaco-action-bar.vertical .action-item {
|
|
|
padding: 0;
|
|
|
transform: none;
|
|
|
display: flex;
|
|
|
}
|
|
|
|
|
|
.monaco-menu .monaco-action-bar.vertical .action-item.active {
|
|
|
transform: none;
|
|
|
}
|
|
|
|
|
|
.monaco-menu .monaco-action-bar.vertical .action-menu-item {
|
|
|
flex: 1 1 auto;
|
|
|
display: flex;
|
|
|
height: 2em;
|
|
|
align-items: center;
|
|
|
position: relative;
|
|
|
}
|
|
|
|
|
|
.monaco-menu .monaco-action-bar.vertical .action-label {
|
|
|
flex: 1 1 auto;
|
|
|
text-decoration: none;
|
|
|
padding: 0 1em;
|
|
|
background: none;
|
|
|
font-size: 12px;
|
|
|
line-height: 1;
|
|
|
}
|
|
|
|
|
|
.monaco-menu .monaco-action-bar.vertical .keybinding,
|
|
|
.monaco-menu .monaco-action-bar.vertical .submenu-indicator {
|
|
|
display: inline-block;
|
|
|
flex: 2 1 auto;
|
|
|
padding: 0 1em;
|
|
|
text-align: right;
|
|
|
font-size: 12px;
|
|
|
line-height: 1;
|
|
|
}
|
|
|
|
|
|
.monaco-menu .monaco-action-bar.vertical .submenu-indicator {
|
|
|
height: 100%;
|
|
|
}
|
|
|
|
|
|
.monaco-menu .monaco-action-bar.vertical .submenu-indicator.codicon {
|
|
|
font-size: 16px !important;
|
|
|
display: flex;
|
|
|
align-items: center;
|
|
|
}
|
|
|
|
|
|
.monaco-menu .monaco-action-bar.vertical .submenu-indicator.codicon::before {
|
|
|
margin-left: auto;
|
|
|
margin-right: -20px;
|
|
|
}
|
|
|
|
|
|
.monaco-menu .monaco-action-bar.vertical .action-item.disabled .keybinding,
|
|
|
.monaco-menu .monaco-action-bar.vertical .action-item.disabled .submenu-indicator {
|
|
|
opacity: 0.4;
|
|
|
}
|
|
|
|
|
|
.monaco-menu .monaco-action-bar.vertical .action-label:not(.separator) {
|
|
|
display: inline-block;
|
|
|
box-sizing: border-box;
|
|
|
margin: 0;
|
|
|
}
|
|
|
|
|
|
.monaco-menu .monaco-action-bar.vertical .action-item {
|
|
|
position: static;
|
|
|
overflow: visible;
|
|
|
}
|
|
|
|
|
|
.monaco-menu .monaco-action-bar.vertical .action-item .monaco-submenu {
|
|
|
position: absolute;
|
|
|
}
|
|
|
|
|
|
.monaco-menu .monaco-action-bar.vertical .action-label.separator {
|
|
|
padding: 0.5em 0 0 0;
|
|
|
margin-bottom: 0.5em;
|
|
|
width: 100%;
|
|
|
height: 0px !important;
|
|
|
margin-left: .8em !important;
|
|
|
margin-right: .8em !important;
|
|
|
}
|
|
|
|
|
|
.monaco-menu .monaco-action-bar.vertical .action-label.separator.text {
|
|
|
padding: 0.7em 1em 0.1em 1em;
|
|
|
font-weight: bold;
|
|
|
opacity: 1;
|
|
|
}
|
|
|
|
|
|
.monaco-menu .monaco-action-bar.vertical .action-label:hover {
|
|
|
color: inherit;
|
|
|
}
|
|
|
|
|
|
.monaco-menu .monaco-action-bar.vertical .menu-item-check {
|
|
|
position: absolute;
|
|
|
visibility: hidden;
|
|
|
width: 1em;
|
|
|
height: 100%;
|
|
|
}
|
|
|
|
|
|
.monaco-menu .monaco-action-bar.vertical .action-menu-item.checked .menu-item-check {
|
|
|
visibility: visible;
|
|
|
display: flex;
|
|
|
align-items: center;
|
|
|
justify-content: center;
|
|
|
}
|
|
|
|
|
|
/* Context Menu */
|
|
|
|
|
|
.context-view.monaco-menu-container {
|
|
|
outline: 0;
|
|
|
border: none;
|
|
|
animation: fadeIn 0.083s linear;
|
|
|
-webkit-app-region: no-drag;
|
|
|
}
|
|
|
|
|
|
.context-view.monaco-menu-container :focus,
|
|
|
.context-view.monaco-menu-container .monaco-action-bar.vertical:focus,
|
|
|
.context-view.monaco-menu-container .monaco-action-bar.vertical :focus {
|
|
|
outline: 0;
|
|
|
}
|
|
|
|
|
|
.monaco-menu .monaco-action-bar.vertical .action-item {
|
|
|
border: thin solid transparent; /* prevents jumping behaviour on hover or focus */
|
|
|
}
|
|
|
|
|
|
|
|
|
/* High Contrast Theming */
|
|
|
:host-context(.hc-black) .context-view.monaco-menu-container {
|
|
|
box-shadow: none;
|
|
|
}
|
|
|
|
|
|
:host-context(.hc-black) .monaco-menu .monaco-action-bar.vertical .action-item.focused {
|
|
|
background: none;
|
|
|
}
|
|
|
|
|
|
/* Vertical Action Bar Styles */
|
|
|
|
|
|
.monaco-menu .monaco-action-bar.vertical {
|
|
|
padding: .5em 0;
|
|
|
}
|
|
|
|
|
|
.monaco-menu .monaco-action-bar.vertical .action-menu-item {
|
|
|
height: 1.8em;
|
|
|
}
|
|
|
|
|
|
.monaco-menu .monaco-action-bar.vertical .action-label:not(.separator),
|
|
|
.monaco-menu .monaco-action-bar.vertical .keybinding {
|
|
|
font-size: inherit;
|
|
|
padding: 0 2em;
|
|
|
}
|
|
|
|
|
|
.monaco-menu .monaco-action-bar.vertical .menu-item-check {
|
|
|
font-size: inherit;
|
|
|
width: 2em;
|
|
|
}
|
|
|
|
|
|
.monaco-menu .monaco-action-bar.vertical .action-label.separator {
|
|
|
font-size: inherit;
|
|
|
padding: 0.2em 0 0 0;
|
|
|
margin-bottom: 0.2em;
|
|
|
}
|
|
|
|
|
|
:host-context(.linux) .monaco-menu .monaco-action-bar.vertical .action-label.separator {
|
|
|
margin-left: 0;
|
|
|
margin-right: 0;
|
|
|
}
|
|
|
|
|
|
.monaco-menu .monaco-action-bar.vertical .submenu-indicator {
|
|
|
font-size: 60%;
|
|
|
padding: 0 1.8em;
|
|
|
}
|
|
|
|
|
|
:host-context(.linux) .monaco-menu .monaco-action-bar.vertical .submenu-indicator {
|
|
|
height: 100%;
|
|
|
mask-size: 10px 10px;
|
|
|
-webkit-mask-size: 10px 10px;
|
|
|
}
|
|
|
|
|
|
.monaco-menu .action-item {
|
|
|
cursor: default;
|
|
|
}
|
|
|
|
|
|
/* Arrows */
|
|
|
.monaco-scrollable-element > .scrollbar > .scra {
|
|
|
cursor: pointer;
|
|
|
font-size: 11px !important;
|
|
|
}
|
|
|
|
|
|
.monaco-scrollable-element > .visible {
|
|
|
opacity: 1;
|
|
|
|
|
|
/* Background rule added for IE9 - to allow clicks on dom node */
|
|
|
background:rgba(0,0,0,0);
|
|
|
|
|
|
transition: opacity 100ms linear;
|
|
|
}
|
|
|
.monaco-scrollable-element > .invisible {
|
|
|
opacity: 0;
|
|
|
pointer-events: none;
|
|
|
}
|
|
|
.monaco-scrollable-element > .invisible.fade {
|
|
|
transition: opacity 800ms linear;
|
|
|
}
|
|
|
|
|
|
/* Scrollable Content Inset Shadow */
|
|
|
.monaco-scrollable-element > .shadow {
|
|
|
position: absolute;
|
|
|
display: none;
|
|
|
}
|
|
|
.monaco-scrollable-element > .shadow.top {
|
|
|
display: block;
|
|
|
top: 0;
|
|
|
left: 3px;
|
|
|
height: 3px;
|
|
|
width: 100%;
|
|
|
box-shadow: #DDD 0 6px 6px -6px inset;
|
|
|
}
|
|
|
.monaco-scrollable-element > .shadow.left {
|
|
|
display: block;
|
|
|
top: 3px;
|
|
|
left: 0;
|
|
|
height: 100%;
|
|
|
width: 3px;
|
|
|
box-shadow: #DDD 6px 0 6px -6px inset;
|
|
|
}
|
|
|
.monaco-scrollable-element > .shadow.top-left-corner {
|
|
|
display: block;
|
|
|
top: 0;
|
|
|
left: 0;
|
|
|
height: 3px;
|
|
|
width: 3px;
|
|
|
}
|
|
|
.monaco-scrollable-element > .shadow.top.left {
|
|
|
box-shadow: #DDD 6px 6px 6px -6px inset;
|
|
|
}
|
|
|
|
|
|
/* ---------- Default Style ---------- */
|
|
|
|
|
|
:host-context(.vs) .monaco-scrollable-element > .scrollbar > .slider {
|
|
|
background: rgba(100, 100, 100, .4);
|
|
|
}
|
|
|
:host-context(.vs-dark) .monaco-scrollable-element > .scrollbar > .slider {
|
|
|
background: rgba(121, 121, 121, .4);
|
|
|
}
|
|
|
:host-context(.hc-black) .monaco-scrollable-element > .scrollbar > .slider {
|
|
|
background: rgba(111, 195, 223, .6);
|
|
|
}
|
|
|
|
|
|
.monaco-scrollable-element > .scrollbar > .slider:hover {
|
|
|
background: rgba(100, 100, 100, .7);
|
|
|
}
|
|
|
:host-context(.hc-black) .monaco-scrollable-element > .scrollbar > .slider:hover {
|
|
|
background: rgba(111, 195, 223, .8);
|
|
|
}
|
|
|
|
|
|
.monaco-scrollable-element > .scrollbar > .slider.active {
|
|
|
background: rgba(0, 0, 0, .6);
|
|
|
}
|
|
|
:host-context(.vs-dark) .monaco-scrollable-element > .scrollbar > .slider.active {
|
|
|
background: rgba(191, 191, 191, .4);
|
|
|
}
|
|
|
:host-context(.hc-black) .monaco-scrollable-element > .scrollbar > .slider.active {
|
|
|
background: rgba(111, 195, 223, 1);
|
|
|
}
|
|
|
|
|
|
:host-context(.vs-dark) .monaco-scrollable-element .shadow.top {
|
|
|
box-shadow: none;
|
|
|
}
|
|
|
|
|
|
:host-context(.vs-dark) .monaco-scrollable-element .shadow.left {
|
|
|
box-shadow: #000 6px 0 6px -6px inset;
|
|
|
}
|
|
|
|
|
|
:host-context(.vs-dark) .monaco-scrollable-element .shadow.top.left {
|
|
|
box-shadow: #000 6px 6px 6px -6px inset;
|
|
|
}
|
|
|
|
|
|
:host-context(.hc-black) .monaco-scrollable-element .shadow.top {
|
|
|
box-shadow: none;
|
|
|
}
|
|
|
|
|
|
:host-context(.hc-black) .monaco-scrollable-element .shadow.left {
|
|
|
box-shadow: none;
|
|
|
}
|
|
|
|
|
|
:host-context(.hc-black) .monaco-scrollable-element .shadow.top.left {
|
|
|
box-shadow: none;
|
|
|
}
|
|
|
`;var oh=t("eizg"),fs=t("ptcw");class Wd{constructor(e,i,s,l,P){this.contextViewService=e,this.telemetryService=i,this.notificationService=s,this.keybindingService=l,this.themeService=P,this.focusToReturn=null,this.block=null,this.options={blockMouse:!0}}configure(e){this.options=e}showContextMenu(e){const i=e.getActions();if(!i.length)return;this.focusToReturn=document.activeElement;let s,l=Object(Se.M)(e.domForShadowRoot)?e.domForShadowRoot:void 0;this.contextViewService.showContextView({getAnchor:()=>e.getAnchor(),canRelayout:!1,anchorAlignment:e.anchorAlignment,anchorAxisAlignment:e.anchorAxisAlignment,render:P=>{let H=e.getMenuClassName?e.getMenuClassName():"";H&&(P.className+=" "+H),this.options.blockMouse&&(this.block=P.appendChild(Object(Se.a)(".context-view-block")),this.block.style.position="fixed",this.block.style.cursor="initial",this.block.style.left="0",this.block.style.top="0",this.block.style.width="100%",this.block.style.height="100%",this.block.style.zIndex="-1",Object(Se.i)(this.block,Se.d.MOUSE_DOWN,Ue=>Ue.stopPropagation()));const X=new $e.b,ge=e.actionRunner||new An.b;return ge.onBeforeRun(this.onActionRun,this,X),ge.onDidRun(this.onDidActionRun,this,X),s=new Zs(P,i,{actionViewItemProvider:e.getActionViewItem,context:e.getActionsContext?e.getActionsContext():null,actionRunner:ge,getKeyBinding:e.getKeyBinding?e.getKeyBinding:Ue=>this.keybindingService.lookupKeybinding(Ue.id)}),X.add(Object(fs.c)(s,this.themeService)),s.onDidCancel(()=>this.contextViewService.hideContextView(!0),null,X),s.onDidBlur(()=>this.contextViewService.hideContextView(!0),null,X),X.add(Object(Se.i)(window,Se.d.BLUR,()=>this.contextViewService.hideContextView(!0))),X.add(Object(Se.i)(window,Se.d.MOUSE_DOWN,Ue=>{if(Ue.defaultPrevented)return;let st=new ba.a(Ue),Je=st.target;if(st.rightButton)return;for(;Je;){if(Je===P)return;Je=Je.parentElement}this.contextViewService.hideContextView(!0)})),Object($e.e)(X,s)},focus:()=>{s&&s.focus(!!e.autoSelectFirstItem)},onHide:P=>{e.onHide&&e.onHide(!!P),this.block&&(this.block.remove(),this.block=null),this.focusToReturn&&this.focusToReturn.focus()}},l,!!l)}onActionRun(e){this.telemetryService.publicLog2("workbenchActionExecuted",{id:e.action.id,from:"contextMenu"}),this.contextViewService.hideContextView(!1),this.focusToReturn&&this.focusToReturn.focus()}onDidActionRun(e){e.error&&!Object(To.e)(e.error)&&this.notificationService.error(e.error)}}var Ud=function(e,i,s,l){var P=arguments.length,H=P<3?i:l===null?l=Object.getOwnPropertyDescriptor(i,s):l,X;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")H=Reflect.decorate(e,i,s,l);else for(var ge=e.length-1;ge>=0;ge--)(X=e[ge])&&(H=(P<3?X(H):P>3?X(i,s,H):X(i,s))||H);return P>3&&H&&Object.defineProperty(i,s,H),H},mr=function(e,i){return function(s,l){i(s,l,e)}};let Sa=class extends $e.a{constructor(i,s,l,P,H){super();this.contextMenuHandler=new Wd(l,i,s,P,H)}configure(i){this.contextMenuHandler.configure(i)}showContextMenu(i){this.contextMenuHandler.showContextMenu(i),Se.e.getInstance().resetKeyStatus()}};Sa=Ud([mr(0,pa.a),mr(1,Ko.a),mr(2,zn.b),mr(3,ts.a),mr(4,nn.b)],Sa);const Or=Object(vn.c)("layoutService");var Hd=function(e,i,s,l){var P=arguments.length,H=P<3?i:l===null?l=Object.getOwnPropertyDescriptor(i,s):l,X;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")H=Reflect.decorate(e,i,s,l);else for(var ge=e.length-1;ge>=0;ge--)(X=e[ge])&&(H=(P<3?X(H):P>3?X(i,s,H):X(i,s))||H);return P>3&&H&&Object.defineProperty(i,s,H),H},Vd=function(e,i){return function(s,l){i(s,l,e)}};let wa=class extends $e.a{constructor(i){super();this.layoutService=i,this.currentViewDisposable=$e.a.None,this.container=i.container,this.contextView=this._register(new hr(this.container,1)),this.layout(),this._register(i.onDidLayout(()=>this.layout()))}setContainer(i,s){this.contextView.setContainer(i,s||1)}showContextView(i,s,l){s?s!==this.container&&(this.container=s,this.setContainer(s,l?3:2)):this.container!==this.layoutService.container&&(this.container=this.layoutService.container,this.setContainer(this.container,1)),this.contextView.show(i);const P=Object($e.i)(()=>{this.currentViewDisposable===P&&this.hideContextView()});return this.currentViewDisposable=P,P}getContextViewElement(){return this.contextView.getViewElement()}layout(){this.contextView.layout()}hideContextView(i){this.contextView.hide(i)}};wa=Hd([Vd(0,Or)],wa);var Cl=t("6vuP"),Qs=t("r0BQ");class zd{constructor(e){this.incoming=new Map,this.outgoing=new Map,this.data=e}}class Kd{constructor(e){this._hashFn=e,this._nodes=new Map}roots(){const e=[];for(let i of this._nodes.values())i.outgoing.size===0&&e.push(i);return e}insertEdge(e,i){const s=this.lookupOrInsertNode(e),l=this.lookupOrInsertNode(i);s.outgoing.set(this._hashFn(i),l),l.incoming.set(this._hashFn(e),s)}removeNode(e){const i=this._hashFn(e);this._nodes.delete(i);for(let s of this._nodes.values())s.outgoing.delete(i),s.incoming.delete(i)}lookupOrInsertNode(e){const i=this._hashFn(e);let s=this._nodes.get(i);return s||(s=new zd(e),this._nodes.set(i,s)),s}isEmpty(){return this._nodes.size===0}toString(){let e=[];for(let[i,s]of this._nodes)e.push(`${i}, (incoming)[${[...s.incoming.keys()].join(", ")}], (outgoing)[${[...s.outgoing.keys()].join(",")}]`);return e.join(`
|
|
|
`)}findCycleSlow(){for(let[e,i]of this._nodes){const s=new Set([e]),l=this._findCycle(i,s);if(l)return l}return}_findCycle(e,i){for(let[s,l]of e.outgoing){if(i.has(s))return[...i,s].join(" -> ");i.add(s);const P=this._findCycle(l,i);if(P)return P;i.delete(s)}return}}const yl=!1;class El extends Error{constructor(e){var i;super("cyclic dependency between services");this.message=(i=e.findCycleSlow())!==null&&i!==void 0?i:`UNABLE to detect cycle, dumping graph:
|
|
|
${e.toString()}`}}class La{constructor(e=new Ps.a,i=!1,s){this._activeInstantiations=new Set,this._services=e,this._strict=i,this._parent=s,this._services.set(vn.a,this)}createChild(e){return new La(e,this._strict,this)}invokeFunction(e,...i){let s=Bn.traceInvocation(e),l=!1;try{const P={get:(H,X)=>{if(l)throw Object(To.d)("service accessor is only valid during the invocation of its target method");const ge=this._getOrCreateServiceInstance(H,s);if(!ge&&X!==vn.d)throw new Error(`[invokeFunction] unknown service '${H}'`);return ge}};return e(P,...i)}finally{l=!0,s.stop()}}createInstance(e,...i){let s,l;return e instanceof Qs.a?(s=Bn.traceCreation(e.ctor),l=this._createInstance(e.ctor,e.staticArguments.concat(i),s)):(s=Bn.traceCreation(e),l=this._createInstance(e,i,s)),s.stop(),l}_createInstance(e,i=[],s){let l=vn.b.getServiceDependencies(e).sort((X,ge)=>X.index-ge.index),P=[];for(const X of l){let ge=this._getOrCreateServiceInstance(X.id,s);if(!ge&&this._strict&&!X.optional)throw new Error(`[createInstance] ${e.name} depends on UNKNOWN service ${X.id}.`);P.push(ge)}let H=l.length>0?l[0].index:i.length;if(i.length!==H){console.warn(`[createInstance] First service dependency of ${e.name} at position ${H+1} conflicts with ${i.length} static arguments`);let X=H-i.length;X>0?i=i.concat(new Array(X)):i=i.slice(0,H)}return new e(...[...i,...P])}_setServiceInstance(e,i){if(this._services.get(e)instanceof Qs.a)this._services.set(e,i);else if(this._parent)this._parent._setServiceInstance(e,i);else throw new Error("illegalState - setting UNKNOWN service instance")}_getServiceInstanceOrDescriptor(e){let i=this._services.get(e);return!i&&this._parent?this._parent._getServiceInstanceOrDescriptor(e):i}_getOrCreateServiceInstance(e,i){let s=this._getServiceInstanceOrDescriptor(e);return s instanceof Qs.a?this._safeCreateAndCacheServiceInstance(e,s,i.branch(e,!0)):(i.branch(e,!1),s)}_safeCreateAndCacheServiceInstance(e,i,s){if(this._activeInstantiations.has(e))throw new Error(`illegal state - RECURSIVELY instantiating service '${e}'`);this._activeInstantiations.add(e);try{return this._createAndCacheServiceInstance(e,i,s)}finally{this._activeInstantiations.delete(e)}}_createAndCacheServiceInstance(e,i,s){const l=new Kd(X=>X.id.toString());let P=0;const H=[{id:e,desc:i,_trace:s}];for(;H.length;){const X=H.pop();if(l.lookupOrInsertNode(X),P++>1e3)throw new El(l);for(let ge of vn.b.getServiceDependencies(X.desc.ctor)){let Ue=this._getServiceInstanceOrDescriptor(ge.id);if(!Ue&&!ge.optional&&console.warn(`[createInstance] ${e} depends on ${ge.id} which is NOT registered.`),Ue instanceof Qs.a){const st={id:ge.id,desc:Ue,_trace:X._trace.branch(ge.id,!0)};l.insertEdge(X,st),H.push(st)}}}for(;;){const X=l.roots();if(X.length===0){if(!l.isEmpty())throw new El(l);break}for(const{data:ge}of X){const Ue=this._getServiceInstanceOrDescriptor(ge.id);if(Ue instanceof Qs.a){const st=this._createServiceInstanceWithOwner(ge.id,ge.desc.ctor,ge.desc.staticArguments,ge.desc.supportsDelayedInstantiation,ge._trace);this._setServiceInstance(ge.id,st)}l.removeNode(ge)}}return this._getServiceInstanceOrDescriptor(e)}_createServiceInstanceWithOwner(e,i,s=[],l,P){if(this._services.get(e)instanceof Qs.a)return this._createServiceInstance(i,s,l,P);if(this._parent)return this._parent._createServiceInstanceWithOwner(e,i,s,l,P);throw new Error(`illegalState - creating UNKNOWN service instance ${i.name}`)}_createServiceInstance(e,i=[],s,l){if(s){const P=new Lo.b(()=>this._createInstance(e,i,l));return new Proxy(Object.create(null),{get(H,X){if(X in H)return H[X];let ge=P.value,Ue=ge[X];return typeof Ue!="function"||(Ue=Ue.bind(ge),H[X]=Ue),Ue},set(H,X,ge){return P.value[X]=ge,!0}})}else return this._createInstance(e,i,l)}}class Bn{constructor(e,i){this.type=e,this.name=i,this._start=Date.now(),this._dep=[]}static traceInvocation(e){return yl?new Bn(1,e.name||e.toString().substring(0,42).replace(/\n/g,"")):Bn._None}static traceCreation(e){return yl?new Bn(0,e.name):Bn._None}branch(e,i){let s=new Bn(2,e.toString());return this._dep.push([e,i,s]),s}stop(){let e=Date.now()-this._start;Bn._totals+=e;let i=!1;function s(P,H){let X=[],ge=new Array(P+1).join(" ");for(const[Ue,st,Je]of H._dep)if(st&&Je){i=!0,X.push(`${ge}CREATES -> ${Ue}`);let wt=s(P+1,Je);wt&&X.push(wt)}else X.push(`${ge}uses -> ${Ue}`);return X.join(`
|
|
|
`)}let l=[`${this.type===0?"CREATE":"CALL"} ${this.name}`,`${s(1,this)}`,`DONE, took ${e.toFixed(2)}ms (grand total ${Bn._totals.toFixed(2)}ms)`];(e>2||i)&&console.log(l.join(`
|
|
|
`))}}Bn._None=new class extends Bn{constructor(){super(-1,null)}stop(){}branch(){return this}},Bn._totals=0;var Gd=t("R8sh"),_a=t("k9mg"),qn=t("tADe");class Xd{constructor(){this._byResource=new he.b,this._byOwner=new Map}set(e,i,s){let l=this._byResource.get(e);l||(l=new Map,this._byResource.set(e,l)),l.set(i,s);let P=this._byOwner.get(i);P||(P=new he.b,this._byOwner.set(i,P)),P.set(e,s)}get(e,i){let s=this._byResource.get(e);return s==null?void 0:s.get(i)}delete(e,i){let s=!1,l=!1,P=this._byResource.get(e);P&&(s=P.delete(i));let H=this._byOwner.get(i);if(H&&(l=H.delete(e)),s!==l)throw new Error("illegal state");return s&&l}values(e){var i,s,l,P;return typeof e=="string"?(s=(i=this._byOwner.get(e))===null||i===void 0?void 0:i.values())!==null&&s!==void 0?s:Gs.a.empty():A.a.isUri(e)?(P=(l=this._byResource.get(e))===null||l===void 0?void 0:l.values())!==null&&P!==void 0?P:Gs.a.empty():Gs.a.map(Gs.a.concat(...this._byOwner.values()),H=>H[1])}}class $d{constructor(e){this.errors=0,this.infos=0,this.warnings=0,this.unknowns=0,this._data=new he.b,this._service=e,this._subscription=e.onMarkerChanged(this._update,this)}dispose(){this._subscription.dispose()}_update(e){for(const i of e){const s=this._data.get(i);s&&this._substract(s);const l=this._resourceStats(i);this._add(l),this._data.set(i,l)}}_resourceStats(e){const i={errors:0,warnings:0,infos:0,unknowns:0};if(e.scheme===we.c.inMemory||e.scheme===we.c.walkThrough||e.scheme===we.c.walkThroughSnippet)return i;for(const{severity:s}of this._service.read({resource:e}))s===qn.c.Error?i.errors+=1:s===qn.c.Warning?i.warnings+=1:s===qn.c.Info?i.infos+=1:i.unknowns+=1;return i}_substract(e){this.errors-=e.errors,this.warnings-=e.warnings,this.infos-=e.infos,this.unknowns-=e.unknowns}_add(e){this.errors+=e.errors,this.warnings+=e.warnings,this.infos+=e.infos,this.unknowns+=e.unknowns}}class Js{constructor(){this._onMarkerChanged=new x.a({delay:0,merge:Js._merge}),this.onMarkerChanged=this._onMarkerChanged.event,this._data=new Xd,this._stats=new $d(this)}dispose(){this._stats.dispose(),this._onMarkerChanged.dispose()}remove(e,i){for(const s of i||[])this.changeOne(e,s,[])}changeOne(e,i,s){if(Object(fi.m)(s)){const l=this._data.delete(i,e);l&&this._onMarkerChanged.fire([i])}else{const l=[];for(const P of s){const H=Js._toMarker(e,i,P);H&&l.push(H)}this._data.set(i,e,l),this._onMarkerChanged.fire([i])}}static _toMarker(e,i,s){let{code:l,severity:P,message:H,source:X,startLineNumber:ge,startColumn:Ue,endLineNumber:st,endColumn:Je,relatedInformation:wt,tags:to}=s;return H?(ge=ge>0?ge:1,Ue=Ue>0?Ue:1,st=st>=ge?st:ge,Je=Je>0?Je:Ue,{resource:i,owner:e,code:l,severity:P,message:H,source:X,startLineNumber:ge,startColumn:Ue,endLineNumber:st,endColumn:Je,relatedInformation:wt,tags:to}):void 0}read(e=Object.create(null)){let{owner:i,resource:s,severities:l,take:P}=e;if((!P||P<0)&&(P=-1),i&&s){const H=this._data.get(s,i);if(H){const X=[];for(const ge of H)if(Js._accept(ge,l)){const Ue=X.push(ge);if(P>0&&Ue===P)break}return X}else return[]}else if(!i&&!s){const H=[];for(let X of this._data.values())for(let ge of X)if(Js._accept(ge,l)){const Ue=H.push(ge);if(P>0&&Ue===P)return H}return H}else{const H=this._data.values(s!=null?s:i),X=[];for(const ge of H)for(const Ue of ge)if(Js._accept(Ue,l)){const st=X.push(Ue);if(P>0&&st===P)return X}return X}}static _accept(e,i){return i===void 0||(i&e.severity)===e.severity}static _merge(e){const i=new he.b;for(let s of e)for(let l of s)i.set(l,!0);return Array.from(i.keys())}}var Sl=t("A+jI"),wl=function(e,i,s,l){var P=arguments.length,H=P<3?i:l===null?l=Object.getOwnPropertyDescriptor(i,s):l,X;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")H=Reflect.decorate(e,i,s,l);else for(var ge=e.length-1;ge>=0;ge--)(X=e[ge])&&(H=(P<3?X(H):P>3?X(i,s,H):X(i,s))||H);return P>3&&H&&Object.defineProperty(i,s,H),H},Ir=function(e,i){return function(s,l){i(s,l,e)}};let Da=class{constructor(i){this._commandService=i}createMenu(i,s,l){return new Ma(i,Object.assign({emitEventsForSubmenuChanges:!1,eventDebounceDelay:50},l),this._commandService,s,this)}};Da=wl([Ir(0,ie.b)],Da);let Ma=class e{constructor(i,s,l,P,H){this._id=i,this._options=s,this._commandService=l,this._contextKeyService=P,this._menuService=H,this._disposables=new $e.b,this._menuGroups=[],this._contextKeys=new Set,this._build();const X=new Lo.e(()=>{this._build(),this._onDidChange.fire(this)},s.eventDebounceDelay);this._disposables.add(X),this._disposables.add(Tn.d.onDidChangeMenu(st=>{st.has(i)&&X.schedule()}));const ge=this._disposables.add(new $e.b),Ue=()=>{const st=new Lo.e(()=>this._onDidChange.fire(this),s.eventDebounceDelay);ge.add(st),ge.add(P.onDidChangeContext(Je=>{Je.affectsSome(this._contextKeys)&&st.schedule()}))};this._onDidChange=new x.b({onFirstListenerAdd:Ue,onLastListenerRemove:ge.clear.bind(ge)}),this.onDidChange=this._onDidChange.event}dispose(){this._disposables.dispose(),this._onDidChange.dispose()}_build(){this._menuGroups.length=0,this._contextKeys.clear();const i=Tn.d.getMenuItems(this._id);let s;i.sort(e._compareMenuItems);for(const l of i){const P=l.group||"";(!s||s[0]!==P)&&(s=[P,[]],this._menuGroups.push(s)),s[1].push(l),this._collectContextKeys(l)}}_collectContextKeys(i){if(e._fillInKbExprKeys(i.when,this._contextKeys),Object(Tn.f)(i)){if(i.command.precondition&&e._fillInKbExprKeys(i.command.precondition,this._contextKeys),i.command.toggled){const s=i.command.toggled.condition||i.command.toggled;e._fillInKbExprKeys(s,this._contextKeys)}}else this._options.emitEventsForSubmenuChanges&&Tn.d.getMenuItems(i.submenu).forEach(this._collectContextKeys,this)}getActions(i){const s=[];for(let l of this._menuGroups){const[P,H]=l,X=[];for(const ge of H)if(this._contextKeyService.contextMatchesRules(ge.when)){const Ue=Object(Tn.f)(ge)?new Tn.c(ge.command,ge.alt,i,this._contextKeyService,this._commandService):new Tn.e(ge,this._menuService,this._contextKeyService,i);X.push(Ue)}X.length>0&&s.push([P,X])}return s}static _fillInKbExprKeys(i,s){if(i)for(let l of i.keys())s.add(l)}static _compareMenuItems(i,s){let l=i.group,P=s.group;if(l!==P){if(l){if(!P)return-1}else return 1;if(l==="navigation")return-1;if(P==="navigation")return 1;let ge=l.localeCompare(P);if(ge!==0)return ge}let H=i.order||0,X=s.order||0;return H<X?-1:H>X?1:e._compareTitles(Object(Tn.f)(i)?i.command.title:i.title,Object(Tn.f)(s)?s.command.title:s.title)}static _compareTitles(i,s){const l=typeof i=="string"?i:i.original,P=typeof s=="string"?s:s.original;return l.localeCompare(P)}};Ma=wl([Ir(2,ie.b),Ir(3,Ct.b),Ir(4,Tn.a)],Ma);var Yd=t("79sc"),Zd=function(e,i,s,l){var P=arguments.length,H=P<3?i:l===null?l=Object.getOwnPropertyDescriptor(i,s):l,X;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")H=Reflect.decorate(e,i,s,l);else for(var ge=e.length-1;ge>=0;ge--)(X=e[ge])&&(H=(P<3?X(H):P>3?X(i,s,H):X(i,s))||H);return P>3&&H&&Object.defineProperty(i,s,H),H},Ll=function(e,i){return function(s,l){i(s,l,e)}};class Qd extends $e.a{constructor(e){super();this.model=e,this._markersData=new Map,this._register(Object($e.i)(()=>{this.model.deltaDecorations([...this._markersData.keys()],[]),this._markersData.clear()}))}update(e,i){const s=[...this._markersData.keys()];this._markersData.clear();const l=this.model.deltaDecorations(s,i);for(let P=0;P<l.length;P++)this._markersData.set(l[P],e[P]);return s.length!==0||l.length!==0}getMarker(e){return this._markersData.get(e.id)}}let xa=class extends $e.a{constructor(i,s){super();this._markerService=s,this._onDidChangeMarker=this._register(new x.b),this._markerDecorations=new he.b,i.getModels().forEach(l=>this._onModelAdded(l)),this._register(i.onModelAdded(this._onModelAdded,this)),this._register(i.onModelRemoved(this._onModelRemoved,this)),this._register(this._markerService.onMarkerChanged(this._handleMarkerChange,this))}dispose(){super.dispose(),this._markerDecorations.forEach(i=>i.dispose()),this._markerDecorations.clear()}getMarker(i,s){const l=this._markerDecorations.get(i);return l&&l.getMarker(s)||null}_handleMarkerChange(i){i.forEach(s=>{const l=this._markerDecorations.get(s);l&&this._updateDecorations(l)})}_onModelAdded(i){const s=new Qd(i);this._markerDecorations.set(i.uri,s),this._updateDecorations(s)}_onModelRemoved(i){const s=this._markerDecorations.get(i.uri);s&&(s.dispose(),this._markerDecorations.delete(i.uri)),(i.uri.scheme===we.c.inMemory||i.uri.scheme===we.c.internal||i.uri.scheme===we.c.vscode)&&(this._markerService&&this._markerService.read({resource:i.uri}).map(l=>l.owner).forEach(l=>this._markerService.remove(l,[i.uri])))}_updateDecorations(i){const s=this._markerService.read({resource:i.model.uri,take:500});let l=s.map(P=>({range:this._createDecorationRange(i.model,P),options:this._createDecorationOption(P)}));i.update(s,l)&&this._onDidChangeMarker.fire(i.model)}_createDecorationRange(i,s){let l=I.a.lift(s);return s.severity===qn.c.Hint&&!this._hasMarkerTag(s,1)&&!this._hasMarkerTag(s,2)&&(l=l.setEndPosition(l.startLineNumber,l.startColumn+2)),i.validateRange(l)}_createDecorationOption(i){let s,l,P,H,X;switch(i.severity){case qn.c.Hint:this._hasMarkerTag(i,2)?s=void 0:this._hasMarkerTag(i,1)?s="squiggly-unnecessary":s="squiggly-hint",P=0;break;case qn.c.Warning:s="squiggly-warning",l=Object(nn.g)(Hn.O),P=20,X={color:Object(nn.g)(ni.gc),position:It.f.Inline};break;case qn.c.Info:s="squiggly-info",l=Object(nn.g)(Hn.M),P=10;break;case qn.c.Error:default:s="squiggly-error",l=Object(nn.g)(Hn.L),P=30,X={color:Object(nn.g)(ni.Yb),position:It.f.Inline};break}return i.tags&&(i.tags.indexOf(1)!==-1&&(H="squiggly-inline-unnecessary"),i.tags.indexOf(2)!==-1&&(H="squiggly-inline-deprecated")),{description:"marker-decoration",stickiness:1,className:s,showIfCollapsed:!0,overviewRuler:{color:l,position:It.g.Right},minimap:X,zIndex:P,inlineClassName:H}}_hasMarkerTag(i,s){return i.tags?i.tags.indexOf(s)>=0:!1}};xa=Zd([Ll(0,Li.a),Ll(1,qn.b)],xa);var _l=t("9fML"),Jd=function(e,i,s,l){var P=arguments.length,H=P<3?i:l===null?l=Object.getOwnPropertyDescriptor(i,s):l,X;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")H=Reflect.decorate(e,i,s,l);else for(var ge=e.length-1;ge>=0;ge--)(X=e[ge])&&(H=(P<3?X(H):P>3?X(i,s,H):X(i,s))||H);return P>3&&H&&Object.defineProperty(i,s,H),H},Dl=function(e,i){return function(s,l){i(s,l,e)}};let Ta=class extends $e.a{constructor(i,s){super();this._contextKeyService=i,this._configurationService=s,this._accessibilitySupport=0,this._onDidChangeScreenReaderOptimized=new x.b,this._accessibilityModeEnabledContext=os.a.bindTo(this._contextKeyService);const l=()=>this._accessibilityModeEnabledContext.set(this.isScreenReaderOptimized());this._register(this._configurationService.onDidChangeConfiguration(P=>{P.affectsConfiguration("editor.accessibilitySupport")&&(l(),this._onDidChangeScreenReaderOptimized.fire())})),l(),this.onDidChangeScreenReaderOptimized(()=>l())}get onDidChangeScreenReaderOptimized(){return this._onDidChangeScreenReaderOptimized.event}isScreenReaderOptimized(){const i=this._configurationService.getValue("editor.accessibilitySupport");return i==="on"||i==="auto"&&this._accessibilitySupport===2}getAccessibilitySupport(){return this._accessibilitySupport}};Ta=Jd([Dl(0,Ct.b),Dl(1,f.a)],Ta);var Ar=function(e,i,s,l){function P(H){return H instanceof s?H:new s(function(X){X(H)})}return new(s||(s=Promise))(function(H,X){function ge(Je){try{st(l.next(Je))}catch(wt){X(wt)}}function Ue(Je){try{st(l.throw(Je))}catch(wt){X(wt)}}function st(Je){Je.done?H(Je.value):P(Je.value).then(ge,Ue)}st((l=l.apply(e,i||[])).next())})};class qd{constructor(){this.mapTextToType=new Map,this.findText=""}writeText(e,i){return Ar(this,void 0,void 0,function*(){if(i){this.mapTextToType.set(i,e);return}try{return yield navigator.clipboard.writeText(e)}catch(P){console.error(P)}const s=document.activeElement,l=document.body.appendChild(Object(Se.a)("textarea",{"aria-hidden":!0}));l.style.height="1px",l.style.width="1px",l.style.position="absolute",l.value=e,l.focus(),l.select(),document.execCommand("copy"),s instanceof HTMLElement&&s.focus(),document.body.removeChild(l);return})}readText(e){return Ar(this,void 0,void 0,function*(){if(e)return this.mapTextToType.get(e)||"";try{return yield navigator.clipboard.readText()}catch(i){return console.error(i),""}})}readFindText(){return Ar(this,void 0,void 0,function*(){return this.findText})}writeFindText(e){return Ar(this,void 0,void 0,function*(){this.findText=e})}}var ec=function(e,i,s,l){var P=arguments.length,H=P<3?i:l===null?l=Object.getOwnPropertyDescriptor(i,s):l,X;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")H=Reflect.decorate(e,i,s,l);else for(var ge=e.length-1;ge>=0;ge--)(X=e[ge])&&(H=(P<3?X(H):P>3?X(i,s,H):X(i,s))||H);return P>3&&H&&Object.defineProperty(i,s,H),H},Ml=function(e,i){return function(s,l){i(s,l,e)}},Rr=function(e,i,s,l){function P(H){return H instanceof s?H:new s(function(X){X(H)})}return new(s||(s=Promise))(function(H,X){function ge(Je){try{st(l.next(Je))}catch(wt){X(wt)}}function Ue(Je){try{st(l.throw(Je))}catch(wt){X(wt)}}function st(Je){Je.done?H(Je.value):P(Je.value).then(ge,Ue)}st((l=l.apply(e,i||[])).next())})};const qs=!1;function Nr(e){return e.scheme===we.c.file?e.fsPath:e.path}let xl=0;class kr{constructor(e,i,s,l,P,H,X){this.id=++xl,this.type=0,this.actual=e,this.label=e.label,this.confirmBeforeUndo=e.confirmBeforeUndo||!1,this.resourceLabel=i,this.strResource=s,this.resourceLabels=[this.resourceLabel],this.strResources=[this.strResource],this.groupId=l,this.groupOrder=P,this.sourceId=H,this.sourceOrder=X,this.isValid=!0}setValid(e){this.isValid=e}toString(){return`[id:${this.id}] [group:${this.groupId}] [${this.isValid?" VALID":"INVALID"}] ${this.actual.constructor.name} - ${this.actual}`}}class Tl{constructor(e,i){this.resourceLabel=e,this.reason=i}}class Ol{constructor(){this.elements=new Map}createMessage(){const e=[],i=[];for(const[,l]of this.elements){const P=l.reason===0?e:i;P.push(l.resourceLabel)}let s=[];return e.length>0&&s.push(De.a({key:"externalRemoval",comment:["{0} is a list of filenames"]},"The following files have been closed and modified on disk: {0}.",e.join(", "))),i.length>0&&s.push(De.a({key:"noParallelUniverses",comment:["{0} is a list of filenames"]},"The following files have been modified in an incompatible way: {0}.",i.join(", "))),s.join(`
|
|
|
`)}get size(){return this.elements.size}has(e){return this.elements.has(e)}set(e,i){this.elements.set(e,i)}delete(e){return this.elements.delete(e)}}class tc{constructor(e,i,s,l,P,H,X){this.id=++xl,this.type=1,this.actual=e,this.label=e.label,this.confirmBeforeUndo=e.confirmBeforeUndo||!1,this.resourceLabels=i,this.strResources=s,this.groupId=l,this.groupOrder=P,this.sourceId=H,this.sourceOrder=X,this.removedResources=null,this.invalidatedResources=null}canSplit(){return typeof this.actual.split=="function"}removeResource(e,i,s){this.removedResources||(this.removedResources=new Ol),this.removedResources.has(i)||this.removedResources.set(i,new Tl(e,s))}setValid(e,i,s){s?this.invalidatedResources&&(this.invalidatedResources.delete(i),this.invalidatedResources.size===0&&(this.invalidatedResources=null)):(this.invalidatedResources||(this.invalidatedResources=new Ol),this.invalidatedResources.has(i)||this.invalidatedResources.set(i,new Tl(e,0)))}toString(){return`[id:${this.id}] [group:${this.groupId}] [${this.invalidatedResources?"INVALID":" VALID"}] ${this.actual.constructor.name} - ${this.actual}`}}class Il{constructor(e,i){this.resourceLabel=e,this.strResource=i,this._past=[],this._future=[],this.locked=!1,this.versionId=1}dispose(){for(const e of this._past)e.type===1&&e.removeResource(this.resourceLabel,this.strResource,0);for(const e of this._future)e.type===1&&e.removeResource(this.resourceLabel,this.strResource,0);this.versionId++}toString(){let e=[];e.push(`* ${this.strResource}:`);for(let i=0;i<this._past.length;i++)e.push(` * [UNDO] ${this._past[i]}`);for(let i=this._future.length-1;i>=0;i--)e.push(` * [REDO] ${this._future[i]}`);return e.join(`
|
|
|
`)}flushAllElements(){this._past=[],this._future=[],this.versionId++}_setElementValidFlag(e,i){e.type===1?e.setValid(this.resourceLabel,this.strResource,i):e.setValid(i)}setElementsValidFlag(e,i){for(const s of this._past)i(s.actual)&&this._setElementValidFlag(s,e);for(const s of this._future)i(s.actual)&&this._setElementValidFlag(s,e)}pushElement(e){for(const i of this._future)i.type===1&&i.removeResource(this.resourceLabel,this.strResource,1);this._future=[],this._past.push(e),this.versionId++}createSnapshot(e){const i=[];for(let s=0,l=this._past.length;s<l;s++)i.push(this._past[s].id);for(let s=this._future.length-1;s>=0;s--)i.push(this._future[s].id);return new ji.b(e,i)}restoreSnapshot(e){const i=e.elements.length;let s=!0,l=0,P=-1;for(let X=0,ge=this._past.length;X<ge;X++,l++){const Ue=this._past[X];s&&(l>=i||Ue.id!==e.elements[l])&&(s=!1,P=0),!s&&Ue.type===1&&Ue.removeResource(this.resourceLabel,this.strResource,0)}let H=-1;for(let X=this._future.length-1;X>=0;X--,l++){const ge=this._future[X];s&&(l>=i||ge.id!==e.elements[l])&&(s=!1,H=X),!s&&ge.type===1&&ge.removeResource(this.resourceLabel,this.strResource,0)}P!==-1&&(this._past=this._past.slice(0,P)),H!==-1&&(this._future=this._future.slice(H+1)),this.versionId++}getElements(){const e=[],i=[];for(const s of this._past)e.push(s.actual);for(const s of this._future)i.push(s.actual);return{past:e,future:i}}getClosestPastElement(){return this._past.length===0?null:this._past[this._past.length-1]}getSecondClosestPastElement(){return this._past.length<2?null:this._past[this._past.length-2]}getClosestFutureElement(){return this._future.length===0?null:this._future[this._future.length-1]}hasPastElements(){return this._past.length>0}hasFutureElements(){return this._future.length>0}splitPastWorkspaceElement(e,i){for(let s=this._past.length-1;s>=0;s--)if(this._past[s]===e){i.has(this.strResource)?this._past[s]=i.get(this.strResource):this._past.splice(s,1);break}this.versionId++}splitFutureWorkspaceElement(e,i){for(let s=this._future.length-1;s>=0;s--)if(this._future[s]===e){i.has(this.strResource)?this._future[s]=i.get(this.strResource):this._future.splice(s,1);break}this.versionId++}moveBackward(e){this._past.pop(),this._future.push(e),this.versionId++}moveForward(e){this._future.pop(),this._past.push(e),this.versionId++}}class Oa{constructor(e){this.editStacks=e,this._versionIds=[];for(let i=0,s=this.editStacks.length;i<s;i++)this._versionIds[i]=this.editStacks[i].versionId}isValid(){for(let e=0,i=this.editStacks.length;e<i;e++)if(this._versionIds[e]!==this.editStacks[e].versionId)return!1;return!0}}const Al=new Il("","");Al.locked=!0;let jr=class{constructor(i,s){this._dialogService=i,this._notificationService=s,this._editStacks=new Map,this._uriComparisonKeyComputers=[]}getUriComparisonKey(i){for(const s of this._uriComparisonKeyComputers)if(s[0]===i.scheme)return s[1].getComparisonKey(i);return i.toString()}_print(i){console.log("------------------------------------"),console.log(`AFTER ${i}: `);let s=[];for(const l of this._editStacks)s.push(l[1].toString());console.log(s.join(`
|
|
|
`))}pushElement(i,s=ji.c.None,l=ji.d.None){if(i.type===0){const P=Nr(i.resource),H=this.getUriComparisonKey(i.resource);this._pushElement(new kr(i,P,H,s.id,s.nextOrder(),l.id,l.nextOrder()))}else{const P=new Set,H=[],X=[];for(const ge of i.resources){const Ue=Nr(ge),st=this.getUriComparisonKey(ge);if(P.has(st))continue;P.add(st),H.push(Ue),X.push(st)}H.length===1?this._pushElement(new kr(i,H[0],X[0],s.id,s.nextOrder(),l.id,l.nextOrder())):this._pushElement(new tc(i,H,X,s.id,s.nextOrder(),l.id,l.nextOrder()))}qs&&this._print("pushElement")}_pushElement(i){for(let s=0,l=i.strResources.length;s<l;s++){const P=i.resourceLabels[s],H=i.strResources[s];let X;this._editStacks.has(H)?X=this._editStacks.get(H):(X=new Il(P,H),this._editStacks.set(H,X)),X.pushElement(i)}}getLastElement(i){const s=this.getUriComparisonKey(i);if(this._editStacks.has(s)){const l=this._editStacks.get(s);if(l.hasFutureElements())return null;const P=l.getClosestPastElement();return P?P.actual:null}return null}_splitPastWorkspaceElement(i,s){const l=i.actual.split(),P=new Map;for(const H of l){const X=Nr(H.resource),ge=this.getUriComparisonKey(H.resource),Ue=new kr(H,X,ge,0,0,0,0);P.set(Ue.strResource,Ue)}for(const H of i.strResources){if(s&&s.has(H))continue;const X=this._editStacks.get(H);X.splitPastWorkspaceElement(i,P)}}_splitFutureWorkspaceElement(i,s){const l=i.actual.split(),P=new Map;for(const H of l){const X=Nr(H.resource),ge=this.getUriComparisonKey(H.resource),Ue=new kr(H,X,ge,0,0,0,0);P.set(Ue.strResource,Ue)}for(const H of i.strResources){if(s&&s.has(H))continue;const X=this._editStacks.get(H);X.splitFutureWorkspaceElement(i,P)}}removeElements(i){const s=typeof i=="string"?i:this.getUriComparisonKey(i);if(this._editStacks.has(s)){const l=this._editStacks.get(s);l.dispose(),this._editStacks.delete(s)}qs&&this._print("removeElements")}setElementsValidFlag(i,s,l){const P=this.getUriComparisonKey(i);if(this._editStacks.has(P)){const H=this._editStacks.get(P);H.setElementsValidFlag(s,l)}qs&&this._print("setElementsValidFlag")}createSnapshot(i){const s=this.getUriComparisonKey(i);if(this._editStacks.has(s)){const l=this._editStacks.get(s);return l.createSnapshot(i)}return new ji.b(i,[])}restoreSnapshot(i){const s=this.getUriComparisonKey(i.resource);if(this._editStacks.has(s)){const l=this._editStacks.get(s);l.restoreSnapshot(i),!l.hasPastElements()&&!l.hasFutureElements()&&(l.dispose(),this._editStacks.delete(s))}qs&&this._print("restoreSnapshot")}getElements(i){const s=this.getUriComparisonKey(i);if(this._editStacks.has(s)){const l=this._editStacks.get(s);return l.getElements()}return{past:[],future:[]}}_findClosestUndoElementWithSource(i){if(!i)return[null,null];let s=null,l=null;for(const[P,H]of this._editStacks){const X=H.getClosestPastElement();if(!X)continue;X.sourceId===i&&((!s||X.sourceOrder>s.sourceOrder)&&(s=X,l=P))}return[s,l]}canUndo(i){if(i instanceof ji.d){const[,l]=this._findClosestUndoElementWithSource(i.id);return!!l}const s=this.getUriComparisonKey(i);if(this._editStacks.has(s)){const l=this._editStacks.get(s);return l.hasPastElements()}return!1}_onError(i,s){Object(To.f)(i);for(const l of s.strResources)this.removeElements(l);this._notificationService.error(i)}_acquireLocks(i){for(const s of i.editStacks)if(s.locked)throw new Error("Cannot acquire edit stack lock");for(const s of i.editStacks)s.locked=!0;return()=>{for(const s of i.editStacks)s.locked=!1}}_safeInvokeWithLocks(i,s,l,P,H){const X=this._acquireLocks(l);let ge;try{ge=s()}catch(Ue){return X(),P.dispose(),this._onError(Ue,i)}return ge?ge.then(()=>(X(),P.dispose(),H()),Ue=>(X(),P.dispose(),this._onError(Ue,i))):(X(),P.dispose(),H())}_invokeWorkspacePrepare(i){return Rr(this,void 0,void 0,function*(){if(typeof i.actual.prepareUndoRedo=="undefined")return $e.a.None;const s=i.actual.prepareUndoRedo();return typeof s=="undefined"?$e.a.None:s})}_invokeResourcePrepare(i,s){if(i.actual.type!==1||typeof i.actual.prepareUndoRedo=="undefined")return s($e.a.None);const l=i.actual.prepareUndoRedo();return l?Object($e.g)(l)?s(l):l.then(P=>s(P)):s($e.a.None)}_getAffectedEditStacks(i){const s=[];for(const l of i.strResources)s.push(this._editStacks.get(l)||Al);return new Oa(s)}_tryToSplitAndUndo(i,s,l,P){if(s.canSplit())return this._splitPastWorkspaceElement(s,l),this._notificationService.warn(P),new Pr(this._undo(i,0,!0));for(const H of s.strResources)this.removeElements(H);return this._notificationService.warn(P),new Pr}_checkWorkspaceUndo(i,s,l,P){if(s.removedResources)return this._tryToSplitAndUndo(i,s,s.removedResources,De.a({key:"cannotWorkspaceUndo",comment:["{0} is a label for an operation. {1} is another message."]},"Could not undo '{0}' across all files. {1}",s.label,s.removedResources.createMessage()));if(P&&s.invalidatedResources)return this._tryToSplitAndUndo(i,s,s.invalidatedResources,De.a({key:"cannotWorkspaceUndo",comment:["{0} is a label for an operation. {1} is another message."]},"Could not undo '{0}' across all files. {1}",s.label,s.invalidatedResources.createMessage()));const H=[];for(const ge of l.editStacks)ge.getClosestPastElement()!==s&&H.push(ge.resourceLabel);if(H.length>0)return this._tryToSplitAndUndo(i,s,null,De.a({key:"cannotWorkspaceUndoDueToChanges",comment:["{0} is a label for an operation. {1} is a list of filenames."]},"Could not undo '{0}' across all files because changes were made to {1}",s.label,H.join(", ")));const X=[];for(const ge of l.editStacks)ge.locked&&X.push(ge.resourceLabel);return X.length>0?this._tryToSplitAndUndo(i,s,null,De.a({key:"cannotWorkspaceUndoDueToInProgressUndoRedo",comment:["{0} is a label for an operation. {1} is a list of filenames."]},"Could not undo '{0}' across all files because there is already an undo or redo operation running on {1}",s.label,X.join(", "))):l.isValid()?null:this._tryToSplitAndUndo(i,s,null,De.a({key:"cannotWorkspaceUndoDueToInMeantimeUndoRedo",comment:["{0} is a label for an operation. {1} is a list of filenames."]},"Could not undo '{0}' across all files because an undo or redo operation occurred in the meantime",s.label))}_workspaceUndo(i,s,l){const P=this._getAffectedEditStacks(s),H=this._checkWorkspaceUndo(i,s,P,!1);return H?H.returnValue:this._confirmAndExecuteWorkspaceUndo(i,s,P,l)}_isPartOfUndoGroup(i){if(!i.groupId)return!1;for(const[,s]of this._editStacks){const l=s.getClosestPastElement();if(!l)continue;if(l===i){const P=s.getSecondClosestPastElement();if(P&&P.groupId===i.groupId)return!0}if(l.groupId===i.groupId)return!0}return!1}_confirmAndExecuteWorkspaceUndo(i,s,l,P){return Rr(this,void 0,void 0,function*(){if(s.canSplit()&&!this._isPartOfUndoGroup(s)){const ge=yield this._dialogService.show(So.a.Info,De.a("confirmWorkspace","Would you like to undo '{0}' across all files?",s.label),[De.a({key:"ok",comment:["{0} denotes a number that is > 1"]},"Undo in {0} Files",l.editStacks.length),De.a("nok","Undo this File"),De.a("cancel","Cancel")],{cancelId:2});if(ge.choice===2)return;if(ge.choice===1)return this._splitPastWorkspaceElement(s,null),this._undo(i,0,!0);const Ue=this._checkWorkspaceUndo(i,s,l,!1);if(Ue)return Ue.returnValue;P=!0}let H;try{H=yield this._invokeWorkspacePrepare(s)}catch(ge){return this._onError(ge,s)}const X=this._checkWorkspaceUndo(i,s,l,!0);if(X)return H.dispose(),X.returnValue;for(const ge of l.editStacks)ge.moveBackward(s);return this._safeInvokeWithLocks(s,()=>s.actual.undo(),l,H,()=>this._continueUndoInGroup(s.groupId,P))})}_resourceUndo(i,s,l){if(!s.isValid){i.flushAllElements();return}if(i.locked){const P=De.a({key:"cannotResourceUndoDueToInProgressUndoRedo",comment:["{0} is a label for an operation."]},"Could not undo '{0}' because there is already an undo or redo operation running.",s.label);this._notificationService.warn(P);return}return this._invokeResourcePrepare(s,P=>(i.moveBackward(s),this._safeInvokeWithLocks(s,()=>s.actual.undo(),new Oa([i]),P,()=>this._continueUndoInGroup(s.groupId,l))))}_findClosestUndoElementInGroup(i){if(!i)return[null,null];let s=null,l=null;for(const[P,H]of this._editStacks){const X=H.getClosestPastElement();if(!X)continue;X.groupId===i&&((!s||X.groupOrder>s.groupOrder)&&(s=X,l=P))}return[s,l]}_continueUndoInGroup(i,s){if(!i)return;const[,l]=this._findClosestUndoElementInGroup(i);if(l)return this._undo(l,0,s)}undo(i){if(i instanceof ji.d){const[,s]=this._findClosestUndoElementWithSource(i.id);return s?this._undo(s,i.id,!1):void 0}return typeof i=="string"?this._undo(i,0,!1):this._undo(this.getUriComparisonKey(i),0,!1)}_undo(i,s=0,l){if(!this._editStacks.has(i))return;const P=this._editStacks.get(i),H=P.getClosestPastElement();if(!H)return;if(H.groupId){const[ge,Ue]=this._findClosestUndoElementInGroup(H.groupId);if(H!==ge&&Ue)return this._undo(Ue,s,l)}const X=H.sourceId!==s||H.confirmBeforeUndo;if(X&&!l)return this._confirmAndContinueUndo(i,s,H);try{return H.type===1?this._workspaceUndo(i,H,l):this._resourceUndo(P,H,l)}finally{qs&&this._print("undo")}}_confirmAndContinueUndo(i,s,l){return Rr(this,void 0,void 0,function*(){const P=yield this._dialogService.show(So.a.Info,De.a("confirmDifferentSource","Would you like to undo '{0}'?",l.label),[De.a("confirmDifferentSource.yes","Yes"),De.a("cancel","Cancel")],{cancelId:1});return P.choice===1?void 0:this._undo(i,s,!0)})}_findClosestRedoElementWithSource(i){if(!i)return[null,null];let s=null,l=null;for(const[P,H]of this._editStacks){const X=H.getClosestFutureElement();if(!X)continue;X.sourceId===i&&((!s||X.sourceOrder<s.sourceOrder)&&(s=X,l=P))}return[s,l]}canRedo(i){if(i instanceof ji.d){const[,l]=this._findClosestRedoElementWithSource(i.id);return!!l}const s=this.getUriComparisonKey(i);if(this._editStacks.has(s)){const l=this._editStacks.get(s);return l.hasFutureElements()}return!1}_tryToSplitAndRedo(i,s,l,P){if(s.canSplit())return this._splitFutureWorkspaceElement(s,l),this._notificationService.warn(P),new Pr(this._redo(i));for(const H of s.strResources)this.removeElements(H);return this._notificationService.warn(P),new Pr}_checkWorkspaceRedo(i,s,l,P){if(s.removedResources)return this._tryToSplitAndRedo(i,s,s.removedResources,De.a({key:"cannotWorkspaceRedo",comment:["{0} is a label for an operation. {1} is another message."]},"Could not redo '{0}' across all files. {1}",s.label,s.removedResources.createMessage()));if(P&&s.invalidatedResources)return this._tryToSplitAndRedo(i,s,s.invalidatedResources,De.a({key:"cannotWorkspaceRedo",comment:["{0} is a label for an operation. {1} is another message."]},"Could not redo '{0}' across all files. {1}",s.label,s.invalidatedResources.createMessage()));const H=[];for(const ge of l.editStacks)ge.getClosestFutureElement()!==s&&H.push(ge.resourceLabel);if(H.length>0)return this._tryToSplitAndRedo(i,s,null,De.a({key:"cannotWorkspaceRedoDueToChanges",comment:["{0} is a label for an operation. {1} is a list of filenames."]},"Could not redo '{0}' across all files because changes were made to {1}",s.label,H.join(", ")));const X=[];for(const ge of l.editStacks)ge.locked&&X.push(ge.resourceLabel);return X.length>0?this._tryToSplitAndRedo(i,s,null,De.a({key:"cannotWorkspaceRedoDueToInProgressUndoRedo",comment:["{0} is a label for an operation. {1} is a list of filenames."]},"Could not redo '{0}' across all files because there is already an undo or redo operation running on {1}",s.label,X.join(", "))):l.isValid()?null:this._tryToSplitAndRedo(i,s,null,De.a({key:"cannotWorkspaceRedoDueToInMeantimeUndoRedo",comment:["{0} is a label for an operation. {1} is a list of filenames."]},"Could not redo '{0}' across all files because an undo or redo operation occurred in the meantime",s.label))}_workspaceRedo(i,s){const l=this._getAffectedEditStacks(s),P=this._checkWorkspaceRedo(i,s,l,!1);return P?P.returnValue:this._executeWorkspaceRedo(i,s,l)}_executeWorkspaceRedo(i,s,l){return Rr(this,void 0,void 0,function*(){let P;try{P=yield this._invokeWorkspacePrepare(s)}catch(X){return this._onError(X,s)}const H=this._checkWorkspaceRedo(i,s,l,!0);if(H)return P.dispose(),H.returnValue;for(const X of l.editStacks)X.moveForward(s);return this._safeInvokeWithLocks(s,()=>s.actual.redo(),l,P,()=>this._continueRedoInGroup(s.groupId))})}_resourceRedo(i,s){if(!s.isValid){i.flushAllElements();return}if(i.locked){const l=De.a({key:"cannotResourceRedoDueToInProgressUndoRedo",comment:["{0} is a label for an operation."]},"Could not redo '{0}' because there is already an undo or redo operation running.",s.label);this._notificationService.warn(l);return}return this._invokeResourcePrepare(s,l=>(i.moveForward(s),this._safeInvokeWithLocks(s,()=>s.actual.redo(),new Oa([i]),l,()=>this._continueRedoInGroup(s.groupId))))}_findClosestRedoElementInGroup(i){if(!i)return[null,null];let s=null,l=null;for(const[P,H]of this._editStacks){const X=H.getClosestFutureElement();if(!X)continue;X.groupId===i&&((!s||X.groupOrder<s.groupOrder)&&(s=X,l=P))}return[s,l]}_continueRedoInGroup(i){if(!i)return;const[,s]=this._findClosestRedoElementInGroup(i);if(s)return this._redo(s)}redo(i){if(i instanceof ji.d){const[,s]=this._findClosestRedoElementWithSource(i.id);return s?this._redo(s):void 0}return typeof i=="string"?this._redo(i):this._redo(this.getUriComparisonKey(i))}_redo(i){if(!this._editStacks.has(i))return;const s=this._editStacks.get(i),l=s.getClosestFutureElement();if(!l)return;if(l.groupId){const[P,H]=this._findClosestRedoElementInGroup(l.groupId);if(l!==P&&H)return this._redo(H)}try{return l.type===1?this._workspaceRedo(i,l):this._resourceRedo(s,l)}finally{qs&&this._print("redo")}}};jr=ec([Ml(0,Cl.a),Ml(1,Ko.a)],jr);class Pr{constructor(e){this.returnValue=e}}Object(_l.b)(ji.a,jr);var ih=t("Z1pP"),Rl=t("fdyd"),nh=t("/6w4");const oc={buttonBackground:ms.a.fromHex("#0E639C"),buttonHoverBackground:ms.a.fromHex("#006BB3"),buttonForeground:ms.a.white};class Nl extends $e.a{constructor(e,i){super();this._onDidClick=this._register(new x.b),this.options=i||Object.create(null),Object(ot.f)(this.options,oc,!1),this.buttonForeground=this.options.buttonForeground,this.buttonBackground=this.options.buttonBackground,this.buttonHoverBackground=this.options.buttonHoverBackground,this.buttonSecondaryForeground=this.options.buttonSecondaryForeground,this.buttonSecondaryBackground=this.options.buttonSecondaryBackground,this.buttonSecondaryHoverBackground=this.options.buttonSecondaryHoverBackground,this.buttonBorder=this.options.buttonBorder,this._element=document.createElement("a"),this._element.classList.add("monaco-button"),this._element.tabIndex=0,this._element.setAttribute("role","button"),e.appendChild(this._element),this._register($s.b.addTarget(this._element)),[Se.d.CLICK,$s.a.Tap].forEach(s=>{this._register(Object(Se.i)(this._element,s,l=>{if(!this.enabled){Se.c.stop(l);return}this._onDidClick.fire(l)}))}),this._register(Object(Se.i)(this._element,Se.d.KEY_DOWN,s=>{const l=new qo.a(s);let P=!1;this.enabled&&(l.equals(3)||l.equals(10))?(this._onDidClick.fire(s),P=!0):l.equals(9)&&(this._element.blur(),P=!0),P&&Se.c.stop(l,!0)})),this._register(Object(Se.i)(this._element,Se.d.MOUSE_OVER,s=>{this._element.classList.contains("disabled")||this.setHoverBackground()})),this._register(Object(Se.i)(this._element,Se.d.MOUSE_OUT,s=>{this.applyStyles()})),this.focusTracker=this._register(Object(Se.Y)(this._element)),this._register(this.focusTracker.onDidFocus(()=>this.setHoverBackground())),this._register(this.focusTracker.onDidBlur(()=>this.applyStyles())),this.applyStyles()}get onDidClick(){return this._onDidClick.event}setHoverBackground(){let e;this.options.secondary?e=this.buttonSecondaryHoverBackground?this.buttonSecondaryHoverBackground.toString():null:e=this.buttonHoverBackground?this.buttonHoverBackground.toString():null,e&&(this._element.style.backgroundColor=e)}style(e){this.buttonForeground=e.buttonForeground,this.buttonBackground=e.buttonBackground,this.buttonHoverBackground=e.buttonHoverBackground,this.buttonSecondaryForeground=e.buttonSecondaryForeground,this.buttonSecondaryBackground=e.buttonSecondaryBackground,this.buttonSecondaryHoverBackground=e.buttonSecondaryHoverBackground,this.buttonBorder=e.buttonBorder,this.applyStyles()}applyStyles(){if(this._element){let e,i;this.options.secondary?(i=this.buttonSecondaryForeground?this.buttonSecondaryForeground.toString():"",e=this.buttonSecondaryBackground?this.buttonSecondaryBackground.toString():""):(i=this.buttonForeground?this.buttonForeground.toString():"",e=this.buttonBackground?this.buttonBackground.toString():"");const s=this.buttonBorder?this.buttonBorder.toString():"";this._element.style.color=i,this._element.style.backgroundColor=e,this._element.style.borderWidth=s?"1px":"",this._element.style.borderStyle=s?"solid":"",this._element.style.borderColor=s}}get element(){return this._element}set label(e){this._element.classList.add("monaco-text-button"),this.options.supportIcons?Object(Se.R)(this._element,...Object(Rl.a)(e)):this._element.textContent=e,typeof this.options.title=="string"?this._element.title=this.options.title:this.options.title&&(this._element.title=e)}set enabled(e){e?(this._element.classList.remove("disabled"),this._element.setAttribute("aria-disabled",String(!1)),this._element.tabIndex=0):(this._element.classList.add("disabled"),this._element.setAttribute("aria-disabled",String(!0)))}get enabled(){return!this._element.classList.contains("disabled")}}var kl=t("O/se"),sh=t("HyZH");const jl="done",Pl="active",Ia="infinite",Fl="discrete",ic={progressBarBackground:ms.a.fromHex("#0E70C0")};class nc extends $e.a{constructor(e,i){super();this.options=i||Object.create(null),Object(ot.f)(this.options,ic,!1),this.workedVal=0,this.progressBarBackground=this.options.progressBarBackground,this._register(this.showDelayedScheduler=new Lo.e(()=>Object(Se.W)(this.element),0)),this.create(e)}create(e){this.element=document.createElement("div"),this.element.classList.add("monaco-progress-container"),this.element.setAttribute("role","progressbar"),this.element.setAttribute("aria-valuemin","0"),e.appendChild(this.element),this.bit=document.createElement("div"),this.bit.classList.add("progress-bit"),this.element.appendChild(this.bit),this.applyStyles()}off(){this.bit.style.width="inherit",this.bit.style.opacity="1",this.element.classList.remove(Pl,Ia,Fl),this.workedVal=0,this.totalWork=void 0}stop(){return this.doDone(!1)}doDone(e){return this.element.classList.add(jl),this.element.classList.contains(Ia)?(this.bit.style.opacity="0",e?setTimeout(()=>this.off(),200):this.off()):(this.bit.style.width="inherit",e?setTimeout(()=>this.off(),200):this.off()),this}infinite(){return this.bit.style.width="2%",this.bit.style.opacity="1",this.element.classList.remove(Fl,jl),this.element.classList.add(Pl,Ia),this}getContainer(){return this.element}style(e){this.progressBarBackground=e.progressBarBackground,this.applyStyles()}applyStyles(){if(this.bit){const e=this.progressBarBackground?this.progressBarBackground.toString():"";this.bit.style.backgroundColor=e}}}var sc=t("nD70"),rh=t("CDaH");const Aa={},rc=new sc.a("quick-input-button-icon-");function Ra(e){if(!e)return;let i;const s=e.dark.toString();return Aa[s]?i=Aa[s]:(i=rc.nextId(),Se.v(`.${i}`,`background-image: ${Se.s(e.light||e.dark)}`),Se.v(`.vs-dark .${i}, .hc-black .${i}`,`background-image: ${Se.s(e.dark)}`),Aa[s]=i),i}var Xn=t("zdb4"),ac=t("0+8E");const lc=Se.a;class dc extends $e.a{constructor(e){super();this.parent=e,this.onKeyDown=i=>Se.i(this.inputBox.inputElement,Se.d.KEY_DOWN,s=>{i(new qo.a(s))}),this.onMouseDown=i=>Se.i(this.inputBox.inputElement,Se.d.MOUSE_DOWN,s=>{i(new ba.a(s))}),this.onDidChange=i=>this.inputBox.onDidChange(i),this.container=Se.q(this.parent,lc(".quick-input-box")),this.inputBox=this._register(new ac.b(this.container,void 0))}get value(){return this.inputBox.value}set value(e){this.inputBox.value=e}select(e=null){this.inputBox.select(e)}isSelectionAtEnd(){return this.inputBox.isSelectionAtEnd()}get placeholder(){return this.inputBox.inputElement.getAttribute("placeholder")||""}set placeholder(e){this.inputBox.setPlaceHolder(e)}get ariaLabel(){return this.inputBox.getAriaLabel()}set ariaLabel(e){this.inputBox.setAriaLabel(e)}get password(){return this.inputBox.inputElement.type==="password"}set password(e){this.inputBox.inputElement.type=e?"password":"text"}setAttribute(e,i){this.inputBox.inputElement.setAttribute(e,i)}removeAttribute(e){this.inputBox.inputElement.removeAttribute(e)}showDecoration(e){e===So.a.Ignore?this.inputBox.hideMessage():this.inputBox.showMessage({type:e===So.a.Info?1:e===So.a.Warning?2:3,content:""})}stylesForType(e){return this.inputBox.stylesForType(e===So.a.Info?1:e===So.a.Warning?2:3)}setFocus(){this.inputBox.focus()}layout(){this.inputBox.layout()}style(e){this.inputBox.style(e)}}var cc=t("7lZ/"),uc=t("xONI"),ah=t("q/I2");const Fr=Se.a;class Bl{constructor(e,i,s){this.os=i,this.keyElements=new Set,this.options=s||Object.create(null),this.labelBackground=this.options.keybindingLabelBackground,this.labelForeground=this.options.keybindingLabelForeground,this.labelBorder=this.options.keybindingLabelBorder,this.labelBottomBorder=this.options.keybindingLabelBottomBorder,this.labelShadow=this.options.keybindingLabelShadow,this.domNode=Se.q(e,Fr(".monaco-keybinding")),this.didEverRender=!1,e.appendChild(this.domNode)}get element(){return this.domNode}set(e,i){if(this.didEverRender&&this.keybinding===e&&Bl.areSame(this.matches,i))return;this.keybinding=e,this.matches=i,this.render()}render(){if(this.clear(),this.keybinding){let[e,i]=this.keybinding.getParts();e&&this.renderPart(this.domNode,e,this.matches?this.matches.firstPart:null),i&&(Se.q(this.domNode,Fr("span.monaco-keybinding-key-chord-separator",void 0," ")),this.renderPart(this.domNode,i,this.matches?this.matches.chordPart:null)),this.domNode.title=this.keybinding.getAriaLabel()||""}else this.options&&this.options.renderUnboundKeybindings&&this.renderUnbound(this.domNode);this.applyStyles(),this.didEverRender=!0}clear(){Se.t(this.domNode),this.keyElements.clear()}renderPart(e,i,s){const l=ko.c.modifierLabels[this.os];i.ctrlKey&&this.renderKey(e,l.ctrlKey,Boolean(s==null?void 0:s.ctrlKey),l.separator),i.shiftKey&&this.renderKey(e,l.shiftKey,Boolean(s==null?void 0:s.shiftKey),l.separator),i.altKey&&this.renderKey(e,l.altKey,Boolean(s==null?void 0:s.altKey),l.separator),i.metaKey&&this.renderKey(e,l.metaKey,Boolean(s==null?void 0:s.metaKey),l.separator);const P=i.keyLabel;P&&this.renderKey(e,P,Boolean(s==null?void 0:s.keyCode),"")}renderKey(e,i,s,l){Se.q(e,this.createKeyElement(i,s?".highlight":"")),l&&Se.q(e,Fr("span.monaco-keybinding-key-separator",void 0,l))}renderUnbound(e){Se.q(e,this.createKeyElement(Object(De.a)("unbound","Unbound")))}createKeyElement(e,i=""){const s=Fr("span.monaco-keybinding-key"+i,void 0,e);return this.keyElements.add(s),s}style(e){this.labelBackground=e.keybindingLabelBackground,this.labelForeground=e.keybindingLabelForeground,this.labelBorder=e.keybindingLabelBorder,this.labelBottomBorder=e.keybindingLabelBottomBorder,this.labelShadow=e.keybindingLabelShadow,this.applyStyles()}applyStyles(){var e;if(this.element){for(const i of this.keyElements)this.labelBackground&&(i.style.backgroundColor=(e=this.labelBackground)===null||e===void 0?void 0:e.toString()),this.labelBorder&&(i.style.borderColor=this.labelBorder.toString()),this.labelBottomBorder&&(i.style.borderBottomColor=this.labelBottomBorder.toString()),this.labelShadow&&(i.style.boxShadow=`inset 0 -1px 0 ${this.labelShadow}`);this.labelForeground&&(this.element.style.color=this.labelForeground.toString())}}static areSame(e,i){return e===i||!e&&!i?!0:!!e&&!!i&&Object(ot.d)(e.firstPart,i.firstPart)&&Object(ot.d)(e.chordPart,i.chordPart)}}const Wl=new Lo.b(()=>{const e=new Intl.Collator(void 0,{numeric:!0,sensitivity:"base"});return{collator:e,collatorIsNumeric:e.resolvedOptions().numeric}});function hc(e,i,s=!1){const l=e||"",P=i||"",H=Wl.value.collator.compare(l,P);return Wl.value.collatorIsNumeric&&H===0&&l!==P?l<P?-1:1:H}function mc(e,i,s){const l=e.toLowerCase(),P=i.toLowerCase(),H=gc(e,i,s);if(H)return H;const X=l.endsWith(s),ge=P.endsWith(s);if(X!==ge)return X?-1:1;const Ue=hc(l,P);return Ue!==0?Ue:l.localeCompare(P)}function gc(e,i,s){const l=e.toLowerCase(),P=i.toLowerCase(),H=l.startsWith(s),X=P.startsWith(s);if(H!==X)return H?-1:1;if(H&&X){if(l.length<P.length)return-1;if(l.length>P.length)return 1}return 0}var Ul=t("ZCR3"),Hl=function(e,i,s,l){var P=arguments.length,H=P<3?i:l===null?l=Object.getOwnPropertyDescriptor(i,s):l,X;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")H=Reflect.decorate(e,i,s,l);else for(var ge=e.length-1;ge>=0;ge--)(X=e[ge])&&(H=(P<3?X(H):P>3?X(i,s,H):X(i,s))||H);return P>3&&H&&Object.defineProperty(i,s,H),H},fc=function(e,i,s,l){function P(H){return H instanceof s?H:new s(function(X){X(H)})}return new(s||(s=Promise))(function(H,X){function ge(Je){try{st(l.next(Je))}catch(wt){X(wt)}}function Ue(Je){try{st(l.throw(Je))}catch(wt){X(wt)}}function st(Je){Je.done?H(Je.value):P(Je.value).then(ge,Ue)}st((l=l.apply(e,i||[])).next())})};const es=Se.a;class pc{constructor(e){this.hidden=!1,this._onChecked=new x.b,this.onChecked=this._onChecked.event,Object.assign(this,e)}get checked(){return!!this._checked}set checked(e){e!==this._checked&&(this._checked=e,this._onChecked.fire(e))}dispose(){this._onChecked.dispose()}}class Br{get templateId(){return Br.ID}renderTemplate(e){const i=Object.create(null);i.toDisposeElement=[],i.toDisposeTemplate=[],i.entry=Se.q(e,es(".quick-input-list-entry"));const s=Se.q(i.entry,es("label.quick-input-list-label"));i.toDisposeTemplate.push(Se.o(s,Se.d.CLICK,Ue=>{i.checkbox.offsetParent||Ue.preventDefault()})),i.checkbox=Se.q(s,es("input.quick-input-list-checkbox")),i.checkbox.type="checkbox",i.toDisposeTemplate.push(Se.o(i.checkbox,Se.d.CHANGE,Ue=>{i.element.checked=i.checkbox.checked}));const l=Se.q(s,es(".quick-input-list-rows")),P=Se.q(l,es(".quick-input-list-row")),H=Se.q(l,es(".quick-input-list-row"));i.label=new uc.a(P,{supportHighlights:!0,supportDescriptionHighlights:!0,supportIcons:!0});const X=Se.q(P,es(".quick-input-list-entry-keybinding"));i.keybinding=new Bl(X,Vt.a);const ge=Se.q(H,es(".quick-input-list-label-meta"));return i.detail=new cc.a(ge,!0),i.separator=Se.q(i.entry,es(".quick-input-list-separator")),i.actionBar=new Es.a(i.entry),i.actionBar.domNode.classList.add("quick-input-list-entry-action-bar"),i.toDisposeTemplate.push(i.actionBar),i}renderElement(e,i,s){s.toDisposeElement=Object($e.f)(s.toDisposeElement),s.element=e,s.checkbox.checked=e.checked,s.toDisposeElement.push(e.onChecked(Ue=>s.checkbox.checked=Ue));const{labelHighlights:l,descriptionHighlights:P,detailHighlights:H}=e,X=Object.create(null);X.matches=l||[],X.descriptionTitle=e.saneDescription,X.descriptionMatches=P||[],X.extraClasses=e.item.iconClasses,X.italic=e.item.italic,X.strikethrough=e.item.strikethrough,s.label.setLabel(e.saneLabel,e.saneDescription,X),s.keybinding.set(e.item.keybinding),s.detail.set(e.saneDetail,H),e.separator&&e.separator.label?(s.separator.textContent=e.separator.label,s.separator.style.display=""):s.separator.style.display="none",s.entry.classList.toggle("quick-input-list-separator-border",!!e.separator),s.actionBar.clear();const ge=e.item.buttons;ge&&ge.length?(s.actionBar.push(ge.map((Ue,st)=>{let Je=Ue.iconClass||(Ue.iconPath?Ra(Ue.iconPath):void 0);Ue.alwaysVisible&&(Je=Je?`${Je} always-visible`:"always-visible");const wt=new An.a(`id-${st}`,"",Je,!0,()=>fc(this,void 0,void 0,function*(){e.fireButtonTriggered({button:Ue,item:e.item})}));return wt.tooltip=Ue.tooltip||"",wt}),{icon:!0,label:!1}),s.entry.classList.add("has-actions")):s.entry.classList.remove("has-actions")}disposeElement(e,i,s){s.toDisposeElement=Object($e.f)(s.toDisposeElement)}disposeTemplate(e){e.toDisposeElement=Object($e.f)(e.toDisposeElement),e.toDisposeTemplate=Object($e.f)(e.toDisposeTemplate)}}Br.ID="listelement";class bc{getHeight(e){return e.saneDetail?44:22}getTemplateId(e){return Br.ID}}var mn;(function(e){e[e.First=1]="First",e[e.Second=2]="Second",e[e.Last=3]="Last",e[e.Next=4]="Next",e[e.Previous=5]="Previous",e[e.NextPage=6]="NextPage",e[e.PreviousPage=7]="PreviousPage"})(mn||(mn={}));class Na{constructor(e,i,s){this.parent=e,this.inputElements=[],this.elements=[],this.elementsToIndexes=new Map,this.matchOnDescription=!1,this.matchOnDetail=!1,this.matchOnLabel=!0,this.matchOnMeta=!0,this.sortByLabel=!0,this._onChangedAllVisibleChecked=new x.b,this.onChangedAllVisibleChecked=this._onChangedAllVisibleChecked.event,this._onChangedCheckedCount=new x.b,this.onChangedCheckedCount=this._onChangedCheckedCount.event,this._onChangedVisibleCount=new x.b,this.onChangedVisibleCount=this._onChangedVisibleCount.event,this._onChangedCheckedElements=new x.b,this.onChangedCheckedElements=this._onChangedCheckedElements.event,this._onButtonTriggered=new x.b,this.onButtonTriggered=this._onButtonTriggered.event,this._onKeyDown=new x.b,this.onKeyDown=this._onKeyDown.event,this._onLeave=new x.b,this.onLeave=this._onLeave.event,this._fireCheckedEvents=!0,this.elementDisposables=[],this.disposables=[],this.id=i,this.container=Se.q(this.parent,es(".quick-input-list"));const l=new bc,P=new Cc;this.list=s.createList("QuickInput",this.container,l,[new Br],{identityProvider:{getId:H=>H.saneLabel},setRowLineHeight:!1,multipleSelectionSupport:!1,horizontalScrolling:!1,accessibilityProvider:P}),this.list.getHTMLElement().id=i,this.disposables.push(this.list),this.disposables.push(this.list.onKeyDown(H=>{const X=new qo.a(H);switch(X.keyCode){case 10:this.toggleCheckbox();break;case 31:(Vt.f?H.metaKey:H.ctrlKey)&&this.list.setFocus(Object(fi.r)(this.list.length));break;case 16:const ge=this.list.getFocus();ge.length===1&&ge[0]===0&&this._onLeave.fire();break;case 18:const Ue=this.list.getFocus();Ue.length===1&&Ue[0]===this.list.length-1&&this._onLeave.fire();break}this._onKeyDown.fire(X)})),this.disposables.push(this.list.onMouseDown(H=>{H.browserEvent.button!==2&&H.browserEvent.preventDefault()})),this.disposables.push(Se.i(this.container,Se.d.CLICK,H=>{(H.x||H.y)&&this._onLeave.fire()})),this.disposables.push(this.list.onMouseMiddleClick(H=>{this._onLeave.fire()})),this.disposables.push(this.list.onContextMenu(H=>{typeof H.index=="number"&&(H.browserEvent.preventDefault(),this.list.setSelection([H.index]))})),this.disposables.push(this._onChangedAllVisibleChecked,this._onChangedCheckedCount,this._onChangedVisibleCount,this._onChangedCheckedElements,this._onButtonTriggered,this._onLeave,this._onKeyDown)}get onDidChangeFocus(){return x.c.map(this.list.onDidChangeFocus,e=>e.elements.map(i=>i.item))}get onDidChangeSelection(){return x.c.map(this.list.onDidChangeSelection,e=>({items:e.elements.map(i=>i.item),event:e.browserEvent}))}get scrollTop(){return this.list.scrollTop}set scrollTop(e){this.list.scrollTop=e}getAllVisibleChecked(){return this.allVisibleChecked(this.elements,!1)}allVisibleChecked(e,i=!0){for(let s=0,l=e.length;s<l;s++){const P=e[s];if(!P.hidden)if(P.checked)i=!0;else return!1}return i}getCheckedCount(){let e=0;const i=this.elements;for(let s=0,l=i.length;s<l;s++)i[s].checked&&e++;return e}getVisibleCount(){let e=0;const i=this.elements;for(let s=0,l=i.length;s<l;s++)i[s].hidden||e++;return e}setAllVisibleChecked(e){try{this._fireCheckedEvents=!1,this.elements.forEach(i=>{i.hidden||(i.checked=e)})}finally{this._fireCheckedEvents=!0,this.fireCheckedEvents()}}setElements(e){this.elementDisposables=Object($e.f)(this.elementDisposables);const i=s=>this.fireButtonTriggered(s);this.inputElements=e,this.elements=e.reduce((s,l,P)=>{var H,X,ge;if(l.type!=="separator"){const Ue=P&&e[P-1],st=l.label&&l.label.replace(/\r?\n/g," "),Je=l.meta&&l.meta.replace(/\r?\n/g," "),wt=l.description&&l.description.replace(/\r?\n/g," "),to=l.detail&&l.detail.replace(/\r?\n/g," "),lo=l.ariaLabel||[st,wt,to].map(po=>Object(xn.c)(po)).filter(po=>!!po).join(", ");s.push(new pc({index:P,item:l,saneLabel:st,saneMeta:Je,saneAriaLabel:lo,saneDescription:wt,saneDetail:to,labelHighlights:(H=l.highlights)===null||H===void 0?void 0:H.label,descriptionHighlights:(X=l.highlights)===null||X===void 0?void 0:X.description,detailHighlights:(ge=l.highlights)===null||ge===void 0?void 0:ge.detail,checked:!1,separator:Ue&&Ue.type==="separator"?Ue:void 0,fireButtonTriggered:i}))}return s},[]),this.elementDisposables.push(...this.elements),this.elementDisposables.push(...this.elements.map(s=>s.onChecked(()=>this.fireCheckedEvents()))),this.elementsToIndexes=this.elements.reduce((s,l,P)=>(s.set(l.item,P),s),new Map),this.list.splice(0,this.list.length),this.list.splice(0,this.list.length,this.elements),this._onChangedVisibleCount.fire(this.elements.length)}getFocusedElements(){return this.list.getFocusedElements().map(e=>e.item)}setFocusedElements(e){if(this.list.setFocus(e.filter(i=>this.elementsToIndexes.has(i)).map(i=>this.elementsToIndexes.get(i))),e.length>0){const i=this.list.getFocus()[0];typeof i=="number"&&this.list.reveal(i)}}getActiveDescendant(){return this.list.getHTMLElement().getAttribute("aria-activedescendant")}setSelectedElements(e){this.list.setSelection(e.filter(i=>this.elementsToIndexes.has(i)).map(i=>this.elementsToIndexes.get(i)))}getCheckedElements(){return this.elements.filter(e=>e.checked).map(e=>e.item)}setCheckedElements(e){try{this._fireCheckedEvents=!1;const i=new Set;for(const s of e)i.add(s);for(const s of this.elements)s.checked=i.has(s.item)}finally{this._fireCheckedEvents=!0,this.fireCheckedEvents()}}set enabled(e){this.list.getHTMLElement().style.pointerEvents=e?"":"none"}focus(e){if(!this.list.length)return;e===mn.Next&&this.list.getFocus()[0]===this.list.length-1&&(e=mn.First),e===mn.Previous&&this.list.getFocus()[0]===0&&(e=mn.Last),e===mn.Second&&this.list.length<2&&(e=mn.First);switch(e){case mn.First:this.list.focusFirst();break;case mn.Second:this.list.focusNth(1);break;case mn.Last:this.list.focusLast();break;case mn.Next:this.list.focusNext();break;case mn.Previous:this.list.focusPrevious();break;case mn.NextPage:this.list.focusNextPage();break;case mn.PreviousPage:this.list.focusPreviousPage();break}const i=this.list.getFocus()[0];typeof i=="number"&&this.list.reveal(i)}clearFocus(){this.list.setFocus([])}domFocus(){this.list.domFocus()}layout(e){this.list.getHTMLElement().style.maxHeight=e?`calc(${Math.floor(e/44)*44}px)`:"",this.list.layout()}filter(e){if(!(this.sortByLabel||this.matchOnLabel||this.matchOnDescription||this.matchOnDetail))return this.list.layout(),!1;if(e=e.trim(),!e||!(this.matchOnLabel||this.matchOnDescription||this.matchOnDetail))this.elements.forEach(s=>{s.labelHighlights=void 0,s.descriptionHighlights=void 0,s.detailHighlights=void 0,s.hidden=!1;const l=s.index&&this.inputElements[s.index-1];s.separator=l&&l.type==="separator"?l:void 0});else{let s;this.elements.forEach(l=>{const P=this.matchOnLabel?Object(xt.p)(Object(is.c)(e,Object(is.d)(l.saneLabel))):void 0,H=this.matchOnDescription?Object(xt.p)(Object(is.c)(e,Object(is.d)(l.saneDescription||""))):void 0,X=this.matchOnDetail?Object(xt.p)(Object(is.c)(e,Object(is.d)(l.saneDetail||""))):void 0,ge=this.matchOnMeta?Object(xt.p)(Object(is.c)(e,Object(is.d)(l.saneMeta||""))):void 0;if(P||H||X||ge?(l.labelHighlights=P,l.descriptionHighlights=H,l.detailHighlights=X,l.hidden=!1):(l.labelHighlights=void 0,l.descriptionHighlights=void 0,l.detailHighlights=void 0,l.hidden=!l.item.alwaysShow),l.separator=void 0,!this.sortByLabel){const Ue=l.index&&this.inputElements[l.index-1];s=Ue&&Ue.type==="separator"?Ue:s,s&&!l.hidden&&(l.separator=s,s=void 0)}})}const i=this.elements.filter(s=>!s.hidden);if(this.sortByLabel&&e){const s=e.toLowerCase();i.sort((l,P)=>vc(l,P,s))}return this.elementsToIndexes=i.reduce((s,l,P)=>(s.set(l.item,P),s),new Map),this.list.splice(0,this.list.length,i),this.list.setFocus([]),this.list.layout(),this._onChangedAllVisibleChecked.fire(this.getAllVisibleChecked()),this._onChangedVisibleCount.fire(i.length),!0}toggleCheckbox(){try{this._fireCheckedEvents=!1;const e=this.list.getFocusedElements(),i=this.allVisibleChecked(e);for(const s of e)s.checked=!i}finally{this._fireCheckedEvents=!0,this.fireCheckedEvents()}}display(e){this.container.style.display=e?"":"none"}isDisplayed(){return this.container.style.display!=="none"}dispose(){this.elementDisposables=Object($e.f)(this.elementDisposables),this.disposables=Object($e.f)(this.disposables)}fireCheckedEvents(){this._fireCheckedEvents&&(this._onChangedAllVisibleChecked.fire(this.getAllVisibleChecked()),this._onChangedCheckedCount.fire(this.getCheckedCount()),this._onChangedCheckedElements.fire(this.getCheckedElements()))}fireButtonTriggered(e){this._onButtonTriggered.fire(e)}style(e){this.list.style(e)}}Hl([Ul.a],Na.prototype,"onDidChangeFocus",null),Hl([Ul.a],Na.prototype,"onDidChangeSelection",null);function vc(e,i,s){const l=e.labelHighlights||[],P=i.labelHighlights||[];return l.length&&!P.length?-1:!l.length&&P.length?1:l.length===0&&P.length===0?0:mc(e.saneLabel,i.saneLabel,s)}class Cc{getWidgetAriaLabel(){return Object(De.a)("quickInput","Quick Input")}getAriaLabel(e){return e.saneAriaLabel}getWidgetRole(){return"listbox"}getRole(){return"option"}}var Vl=function(e,i,s,l){function P(H){return H instanceof s?H:new s(function(X){X(H)})}return new(s||(s=Promise))(function(H,X){function ge(Je){try{st(l.next(Je))}catch(wt){X(wt)}}function Ue(Je){try{st(l.throw(Je))}catch(wt){X(wt)}}function st(Je){Je.done?H(Je.value):P(Je.value).then(ge,Ue)}st((l=l.apply(e,i||[])).next())})};const kn=Se.a,yc=Object(xn.e)("quick-input-back",xn.b.arrowLeft),ka={iconClass:yc.classNames,tooltip:Object(De.a)("quickInput.back","Back"),handle:-1};class ja extends $e.a{constructor(e){super();this.ui=e,this.visible=!1,this._enabled=!0,this._busy=!1,this._ignoreFocusOut=!1,this._buttons=[],this.noValidationMessage=ja.noPromptMessage,this._severity=So.a.Ignore,this.buttonsUpdated=!1,this.onDidTriggerButtonEmitter=this._register(new x.b),this.onDidHideEmitter=this._register(new x.b),this.onDisposeEmitter=this._register(new x.b),this.visibleDisposables=this._register(new $e.b),this.onDidHide=this.onDidHideEmitter.event}get title(){return this._title}set title(e){this._title=e,this.update()}get description(){return this._description}set description(e){this._description=e,this.update()}get step(){return this._steps}set step(e){this._steps=e,this.update()}get totalSteps(){return this._totalSteps}set totalSteps(e){this._totalSteps=e,this.update()}get enabled(){return this._enabled}set enabled(e){this._enabled=e,this.update()}get contextKey(){return this._contextKey}set contextKey(e){this._contextKey=e,this.update()}get busy(){return this._busy}set busy(e){this._busy=e,this.update()}get ignoreFocusOut(){return this._ignoreFocusOut}set ignoreFocusOut(e){const i=this._ignoreFocusOut!==e&&!Vt.c;this._ignoreFocusOut=e&&!Vt.c,i&&this.update()}get buttons(){return this._buttons}set buttons(e){this._buttons=e,this.buttonsUpdated=!0,this.update()}get validationMessage(){return this._validationMessage}set validationMessage(e){this._validationMessage=e,this.update()}get severity(){return this._severity}set severity(e){this._severity=e,this.update()}show(){if(this.visible)return;this.visibleDisposables.add(this.ui.onDidTriggerButton(e=>{this.buttons.indexOf(e)!==-1&&this.onDidTriggerButtonEmitter.fire(e)})),this.ui.show(this),this.visible=!0,this._lastValidationMessage=void 0,this._lastSeverity=void 0,this.buttons.length&&(this.buttonsUpdated=!0),this.update()}hide(){if(!this.visible)return;this.ui.hide()}didHide(e=Xn.c.Other){this.visible=!1,this.visibleDisposables.clear(),this.onDidHideEmitter.fire({reason:e})}update(){if(!this.visible)return;const e=this.getTitle();e&&this.ui.title.textContent!==e?this.ui.title.textContent=e:!e&&this.ui.title.innerHTML!==" "&&(this.ui.title.innerText="\xA0");const i=this.getDescription();if(this.ui.description1.textContent!==i&&(this.ui.description1.textContent=i),this.ui.description2.textContent!==i&&(this.ui.description2.textContent=i),this.busy&&!this.busyDelay&&(this.busyDelay=new Lo.g,this.busyDelay.setIfNotSet(()=>{this.visible&&this.ui.progressBar.infinite()},800)),!this.busy&&this.busyDelay&&(this.ui.progressBar.stop(),this.busyDelay.cancel(),this.busyDelay=void 0),this.buttonsUpdated){this.buttonsUpdated=!1,this.ui.leftActionBar.clear();const l=this.buttons.filter(H=>H===ka);this.ui.leftActionBar.push(l.map((H,X)=>{const ge=new An.a(`id-${X}`,"",H.iconClass||Ra(H.iconPath),!0,()=>Vl(this,void 0,void 0,function*(){this.onDidTriggerButtonEmitter.fire(H)}));return ge.tooltip=H.tooltip||"",ge}),{icon:!0,label:!1}),this.ui.rightActionBar.clear();const P=this.buttons.filter(H=>H!==ka);this.ui.rightActionBar.push(P.map((H,X)=>{const ge=new An.a(`id-${X}`,"",H.iconClass||Ra(H.iconPath),!0,()=>Vl(this,void 0,void 0,function*(){this.onDidTriggerButtonEmitter.fire(H)}));return ge.tooltip=H.tooltip||"",ge}),{icon:!0,label:!1})}this.ui.ignoreFocusOut=this.ignoreFocusOut,this.ui.setEnabled(this.enabled),this.ui.setContextKey(this.contextKey);const s=this.validationMessage||this.noValidationMessage;this._lastValidationMessage!==s&&(this._lastValidationMessage=s,Se.R(this.ui.message,...Object(Rl.a)(s))),this._lastSeverity!==this.severity&&(this._lastSeverity=this.severity,this.showMessageDecoration(this.severity))}getTitle(){return this.title&&this.step?`${this.title} (${this.getSteps()})`:this.title?this.title:this.step?this.getSteps():""}getDescription(){return this.description||""}getSteps(){return this.step&&this.totalSteps?Object(De.a)("quickInput.steps","{0}/{1}",this.step,this.totalSteps):this.step?String(this.step):""}showMessageDecoration(e){if(this.ui.inputBox.showDecoration(e),e!==So.a.Ignore){const i=this.ui.inputBox.stylesForType(e);this.ui.message.style.color=i.foreground?`${i.foreground}`:"",this.ui.message.style.backgroundColor=i.background?`${i.background}`:"",this.ui.message.style.border=i.border?`1px solid ${i.border}`:"",this.ui.message.style.paddingBottom="4px"}else this.ui.message.style.color="",this.ui.message.style.backgroundColor="",this.ui.message.style.border="",this.ui.message.style.paddingBottom=""}dispose(){this.hide(),this.onDisposeEmitter.fire(),super.dispose()}}ja.noPromptMessage=Object(De.a)("inputModeEntry","Press 'Enter' to confirm your input or 'Escape' to cancel");class Wr extends ja{constructor(){super(...arguments);this._value="",this.onDidChangeValueEmitter=this._register(new x.b),this.onWillAcceptEmitter=this._register(new x.b),this.onDidAcceptEmitter=this._register(new x.b),this.onDidCustomEmitter=this._register(new x.b),this._items=[],this.itemsUpdated=!1,this._canSelectMany=!1,this._canAcceptInBackground=!1,this._matchOnDescription=!1,this._matchOnDetail=!1,this._matchOnLabel=!0,this._sortByLabel=!0,this._autoFocusOnList=!0,this._keepScrollPosition=!1,this._itemActivation=this.ui.isScreenReaderOptimized()?Xn.a.NONE:Xn.a.FIRST,this._activeItems=[],this.activeItemsUpdated=!1,this.activeItemsToConfirm=[],this.onDidChangeActiveEmitter=this._register(new x.b),this._selectedItems=[],this.selectedItemsUpdated=!1,this.selectedItemsToConfirm=[],this.onDidChangeSelectionEmitter=this._register(new x.b),this.onDidTriggerItemButtonEmitter=this._register(new x.b),this.valueSelectionUpdated=!0,this._ok="default",this._customButton=!1,this.filterValue=e=>e,this.onDidChangeValue=this.onDidChangeValueEmitter.event,this.onWillAccept=this.onWillAcceptEmitter.event,this.onDidAccept=this.onDidAcceptEmitter.event,this.onDidChangeActive=this.onDidChangeActiveEmitter.event,this.onDidChangeSelection=this.onDidChangeSelectionEmitter.event,this.onDidTriggerItemButton=this.onDidTriggerItemButtonEmitter.event}get quickNavigate(){return this._quickNavigate}set quickNavigate(e){this._quickNavigate=e,this.update()}get value(){return this._value}set value(e){this._value!==e&&(this._value=e||"",this.update(),this.onDidChangeValueEmitter.fire(this._value))}set ariaLabel(e){this._ariaLabel=e,this.update()}get ariaLabel(){return this._ariaLabel}get placeholder(){return this._placeholder}set placeholder(e){this._placeholder=e,this.update()}get items(){return this._items}get scrollTop(){return this.ui.list.scrollTop}set scrollTop(e){this.ui.list.scrollTop=e}set items(e){this._items=e,this.itemsUpdated=!0,this.update()}get canSelectMany(){return this._canSelectMany}set canSelectMany(e){this._canSelectMany=e,this.update()}get canAcceptInBackground(){return this._canAcceptInBackground}set canAcceptInBackground(e){this._canAcceptInBackground=e}get matchOnDescription(){return this._matchOnDescription}set matchOnDescription(e){this._matchOnDescription=e,this.update()}get matchOnDetail(){return this._matchOnDetail}set matchOnDetail(e){this._matchOnDetail=e,this.update()}get matchOnLabel(){return this._matchOnLabel}set matchOnLabel(e){this._matchOnLabel=e,this.update()}get sortByLabel(){return this._sortByLabel}set sortByLabel(e){this._sortByLabel=e,this.update()}get autoFocusOnList(){return this._autoFocusOnList}set autoFocusOnList(e){this._autoFocusOnList=e,this.update()}get keepScrollPosition(){return this._keepScrollPosition}set keepScrollPosition(e){this._keepScrollPosition=e}get itemActivation(){return this._itemActivation}set itemActivation(e){this._itemActivation=e}get activeItems(){return this._activeItems}set activeItems(e){this._activeItems=e,this.activeItemsUpdated=!0,this.update()}get selectedItems(){return this._selectedItems}set selectedItems(e){this._selectedItems=e,this.selectedItemsUpdated=!0,this.update()}get keyMods(){return this._quickNavigate?Xn.b:this.ui.keyMods}set valueSelection(e){this._valueSelection=e,this.valueSelectionUpdated=!0,this.update()}get customButton(){return this._customButton}set customButton(e){this._customButton=e,this.update()}get customLabel(){return this._customButtonLabel}set customLabel(e){this._customButtonLabel=e,this.update()}get customHover(){return this._customButtonHover}set customHover(e){this._customButtonHover=e,this.update()}get ok(){return this._ok}set ok(e){this._ok=e,this.update()}get hideInput(){return!!this._hideInput}set hideInput(e){this._hideInput=e,this.update()}trySelectFirst(){this.autoFocusOnList&&(this.canSelectMany||this.ui.list.focus(mn.First))}show(){this.visible||(this.visibleDisposables.add(this.ui.inputBox.onDidChange(e=>{if(e===this.value)return;this._value=e;const i=this.ui.list.filter(this.filterValue(this.ui.inputBox.value));i&&this.trySelectFirst(),this.onDidChangeValueEmitter.fire(e)})),this.visibleDisposables.add(this.ui.inputBox.onMouseDown(e=>{this.autoFocusOnList||this.ui.list.clearFocus()})),this.visibleDisposables.add((this._hideInput?this.ui.list:this.ui.inputBox).onKeyDown(e=>{switch(e.keyCode){case 18:this.ui.list.focus(mn.Next),this.canSelectMany&&this.ui.list.domFocus(),Se.c.stop(e,!0);break;case 16:this.ui.list.getFocusedElements().length?this.ui.list.focus(mn.Previous):this.ui.list.focus(mn.Last),this.canSelectMany&&this.ui.list.domFocus(),Se.c.stop(e,!0);break;case 12:this.ui.list.focus(mn.NextPage),this.canSelectMany&&this.ui.list.domFocus(),Se.c.stop(e,!0);break;case 11:this.ui.list.focus(mn.PreviousPage),this.canSelectMany&&this.ui.list.domFocus(),Se.c.stop(e,!0);break;case 17:if(!this._canAcceptInBackground)return;if(!this.ui.inputBox.isSelectionAtEnd())return;this.activeItems[0]&&(this._selectedItems=[this.activeItems[0]],this.onDidChangeSelectionEmitter.fire(this.selectedItems),this.handleAccept(!0));break;case 14:(e.ctrlKey||e.metaKey)&&!e.shiftKey&&!e.altKey&&(this.ui.list.focus(mn.First),Se.c.stop(e,!0));break;case 13:(e.ctrlKey||e.metaKey)&&!e.shiftKey&&!e.altKey&&(this.ui.list.focus(mn.Last),Se.c.stop(e,!0));break}})),this.visibleDisposables.add(this.ui.onDidAccept(()=>{this.canSelectMany?this.ui.list.getCheckedElements().length||(this._selectedItems=[],this.onDidChangeSelectionEmitter.fire(this.selectedItems)):this.activeItems[0]&&(this._selectedItems=[this.activeItems[0]],this.onDidChangeSelectionEmitter.fire(this.selectedItems)),this.handleAccept(!1)})),this.visibleDisposables.add(this.ui.onDidCustom(()=>{this.onDidCustomEmitter.fire()})),this.visibleDisposables.add(this.ui.list.onDidChangeFocus(e=>{if(this.activeItemsUpdated)return;if(this.activeItemsToConfirm!==this._activeItems&&Object(fi.g)(e,this._activeItems,(i,s)=>i===s))return;this._activeItems=e,this.onDidChangeActiveEmitter.fire(e)})),this.visibleDisposables.add(this.ui.list.onDidChangeSelection(({items:e,event:i})=>{if(this.canSelectMany){e.length&&this.ui.list.setSelectedElements([]);return}if(this.selectedItemsToConfirm!==this._selectedItems&&Object(fi.g)(e,this._selectedItems,(s,l)=>s===l))return;this._selectedItems=e,this.onDidChangeSelectionEmitter.fire(e),e.length&&this.handleAccept(i instanceof MouseEvent&&i.button===1)})),this.visibleDisposables.add(this.ui.list.onChangedCheckedElements(e=>{if(!this.canSelectMany)return;if(this.selectedItemsToConfirm!==this._selectedItems&&Object(fi.g)(e,this._selectedItems,(i,s)=>i===s))return;this._selectedItems=e,this.onDidChangeSelectionEmitter.fire(e)})),this.visibleDisposables.add(this.ui.list.onButtonTriggered(e=>this.onDidTriggerItemButtonEmitter.fire(e))),this.visibleDisposables.add(this.registerQuickNavigation()),this.valueSelectionUpdated=!0),super.show()}handleAccept(e){let i=!1;this.onWillAcceptEmitter.fire({veto:()=>i=!0}),i||this.onDidAcceptEmitter.fire({inBackground:e})}registerQuickNavigation(){return Se.i(this.ui.container,Se.d.KEY_UP,e=>{if(this.canSelectMany||!this._quickNavigate)return;const i=new qo.a(e),s=i.keyCode,l=this._quickNavigate.keybindings,P=l.some(H=>{const[X,ge]=H.getParts();return ge?!1:X.shiftKey&&s===4?!(i.ctrlKey||i.altKey||i.metaKey):X.altKey&&s===6||X.ctrlKey&&s===5?!0:!!(X.metaKey&&s===57)});P&&(this.activeItems[0]&&(this._selectedItems=[this.activeItems[0]],this.onDidChangeSelectionEmitter.fire(this.selectedItems),this.handleAccept(!1)),this._quickNavigate=void 0)})}update(){if(!this.visible)return;const e=this.keepScrollPosition?this.scrollTop:0,i=!!this._hideInput&&this._items.length>0;this.ui.container.classList.toggle("hidden-input",i&&!this.description);const s={title:!!this.title||!!this.step||!!this.buttons.length,description:!!this.description,checkAll:this.canSelectMany&&!this._hideCheckAll,checkBox:this.canSelectMany,inputBox:!i,progressBar:!i,visibleCount:!0,count:this.canSelectMany,ok:this.ok==="default"?this.canSelectMany:this.ok,list:!0,message:!!this.validationMessage,customButton:this.customButton};this.ui.setVisibilities(s),super.update(),this.ui.inputBox.value!==this.value&&(this.ui.inputBox.value=this.value),this.valueSelectionUpdated&&(this.valueSelectionUpdated=!1,this.ui.inputBox.select(this._valueSelection&&{start:this._valueSelection[0],end:this._valueSelection[1]})),this.ui.inputBox.placeholder!==(this.placeholder||"")&&(this.ui.inputBox.placeholder=this.placeholder||"");const l=this.ariaLabel||this.placeholder||Wr.DEFAULT_ARIA_LABEL;if(this.ui.inputBox.ariaLabel!==l&&(this.ui.inputBox.ariaLabel=l),this.ui.list.matchOnDescription=this.matchOnDescription,this.ui.list.matchOnDetail=this.matchOnDetail,this.ui.list.matchOnLabel=this.matchOnLabel,this.ui.list.sortByLabel=this.sortByLabel,this.itemsUpdated){this.itemsUpdated=!1,this.ui.list.setElements(this.items),this.ui.list.filter(this.filterValue(this.ui.inputBox.value)),this.ui.checkAll.checked=this.ui.list.getAllVisibleChecked(),this.ui.visibleCount.setCount(this.ui.list.getVisibleCount()),this.ui.count.setCount(this.ui.list.getCheckedCount());switch(this._itemActivation){case Xn.a.NONE:this._itemActivation=Xn.a.FIRST;break;case Xn.a.SECOND:this.ui.list.focus(mn.Second),this._itemActivation=Xn.a.FIRST;break;case Xn.a.LAST:this.ui.list.focus(mn.Last),this._itemActivation=Xn.a.FIRST;break;default:this.trySelectFirst();break}}this.ui.container.classList.contains("show-checkboxes")!==!!this.canSelectMany&&(this.canSelectMany?this.ui.list.clearFocus():this.trySelectFirst()),this.activeItemsUpdated&&(this.activeItemsUpdated=!1,this.activeItemsToConfirm=this._activeItems,this.ui.list.setFocusedElements(this.activeItems),this.activeItemsToConfirm===this._activeItems&&(this.activeItemsToConfirm=null)),this.selectedItemsUpdated&&(this.selectedItemsUpdated=!1,this.selectedItemsToConfirm=this._selectedItems,this.canSelectMany?this.ui.list.setCheckedElements(this.selectedItems):this.ui.list.setSelectedElements(this.selectedItems),this.selectedItemsToConfirm===this._selectedItems&&(this.selectedItemsToConfirm=null)),this.ui.customButton.label=this.customLabel||"",this.ui.customButton.element.title=this.customHover||"",this.ui.setComboboxAccessibility(!0),s.inputBox||(this.ui.list.domFocus(),this.canSelectMany&&this.ui.list.focus(mn.First)),this.keepScrollPosition&&(this.scrollTop=e)}}Wr.DEFAULT_ARIA_LABEL=Object(De.a)("quickInputBox.ariaLabel","Type to narrow down results.");class Pa extends $e.a{constructor(e){super();this.options=e,this.comboboxAccessibility=!1,this.enabled=!0,this.onDidAcceptEmitter=this._register(new x.b),this.onDidCustomEmitter=this._register(new x.b),this.onDidTriggerButtonEmitter=this._register(new x.b),this.keyMods={ctrlCmd:!1,alt:!1},this.controller=null,this.onShowEmitter=this._register(new x.b),this.onShow=this.onShowEmitter.event,this.onHideEmitter=this._register(new x.b),this.onHide=this.onHideEmitter.event,this.idPrefix=e.idPrefix,this.parentElement=e.container,this.styles=e.styles,this.registerKeyModsListeners()}registerKeyModsListeners(){const e=i=>{this.keyMods.ctrlCmd=i.ctrlKey||i.metaKey,this.keyMods.alt=i.altKey};this._register(Se.i(window,Se.d.KEY_DOWN,e,!0)),this._register(Se.i(window,Se.d.KEY_UP,e,!0)),this._register(Se.i(window,Se.d.MOUSE_DOWN,e,!0))}getUI(){if(this.ui)return this.ui;const e=Se.q(this.parentElement,kn(".quick-input-widget.show-file-icons"));e.tabIndex=-1,e.style.display="none";const i=Se.w(e),s=Se.q(e,kn(".quick-input-titlebar")),l=this._register(new Es.a(s));l.domNode.classList.add("quick-input-left-action-bar");const P=Se.q(s,kn(".quick-input-title")),H=this._register(new Es.a(s));H.domNode.classList.add("quick-input-right-action-bar");const X=Se.q(e,kn(".quick-input-description")),ge=Se.q(e,kn(".quick-input-header")),Ue=Se.q(ge,kn("input.quick-input-check-all"));Ue.type="checkbox",this._register(Se.o(Ue,Se.d.CHANGE,ei=>{const Mi=Ue.checked;ai.setAllVisibleChecked(Mi)})),this._register(Se.i(Ue,Se.d.CLICK,ei=>{(ei.x||ei.y)&&to.setFocus()}));const st=Se.q(ge,kn(".quick-input-description")),Je=Se.q(ge,kn(".quick-input-and-message")),wt=Se.q(Je,kn(".quick-input-filter")),to=this._register(new dc(wt));to.setAttribute("aria-describedby",`${this.idPrefix}message`);const lo=Se.q(wt,kn(".quick-input-visible-count"));lo.setAttribute("aria-live","polite"),lo.setAttribute("aria-atomic","true");const po=new kl.a(lo,{countFormat:Object(De.a)({key:"quickInput.visibleCount",comment:["This tells the user how many items are shown in a list of items to select from. The items can be anything. Currently not visible, but read by screen readers."]},"{0} Results")}),Ho=Se.q(wt,kn(".quick-input-count"));Ho.setAttribute("aria-live","polite");const Vo=new kl.a(Ho,{countFormat:Object(De.a)({key:"quickInput.countSelected",comment:["This tells the user how many items are selected in a list of items to select from. The items can be anything."]},"{0} Selected")}),ii=Se.q(ge,kn(".quick-input-action")),Jo=new Nl(ii);Jo.label=Object(De.a)("ok","OK"),this._register(Jo.onDidClick(ei=>{this.onDidAcceptEmitter.fire()}));const Go=Se.q(ge,kn(".quick-input-action")),Si=new Nl(Go);Si.label=Object(De.a)("custom","Custom"),this._register(Si.onDidClick(ei=>{this.onDidCustomEmitter.fire()}));const Ai=Se.q(Je,kn(`#${this.idPrefix}message.quick-input-message`)),ai=this._register(new Na(e,this.idPrefix+"list",this.options));this._register(ai.onChangedAllVisibleChecked(ei=>{Ue.checked=ei})),this._register(ai.onChangedVisibleCount(ei=>{po.setCount(ei)})),this._register(ai.onChangedCheckedCount(ei=>{Vo.setCount(ei)})),this._register(ai.onLeave(()=>{setTimeout(()=>{to.setFocus(),this.controller instanceof Wr&&this.controller.canSelectMany&&ai.clearFocus()},0)})),this._register(ai.onDidChangeFocus(()=>{this.comboboxAccessibility&&this.getUI().inputBox.setAttribute("aria-activedescendant",this.getUI().list.getActiveDescendant()||"")}));const Fo=new nc(e);Fo.getContainer().classList.add("quick-input-progress");const Xo=Se.Y(e);return this._register(Xo),this._register(Se.i(e,Se.d.FOCUS,ei=>{this.previousFocusElement=ei.relatedTarget instanceof HTMLElement?ei.relatedTarget:void 0},!0)),this._register(Xo.onDidBlur(()=>{!this.getUI().ignoreFocusOut&&!this.options.ignoreFocusOut()&&this.hide(Xn.c.Blur),this.previousFocusElement=void 0})),this._register(Se.i(e,Se.d.FOCUS,ei=>{to.setFocus()})),this._register(Se.i(e,Se.d.KEY_DOWN,ei=>{const Mi=new qo.a(ei);switch(Mi.keyCode){case 3:Se.c.stop(ei,!0),this.onDidAcceptEmitter.fire();break;case 9:Se.c.stop(ei,!0),this.hide(Xn.c.Gesture);break;case 2:if(!Mi.altKey&&!Mi.ctrlKey&&!Mi.metaKey){const qi=[".action-label.codicon"];e.classList.contains("show-checkboxes")?qi.push("input"):qi.push("input[type=text]"),this.getUI().list.isDisplayed()&&qi.push(".monaco-list");const gi=e.querySelectorAll(qi.join(", "));Mi.shiftKey&&Mi.target===gi[0]?(Se.c.stop(ei,!0),gi[gi.length-1].focus()):!Mi.shiftKey&&Mi.target===gi[gi.length-1]&&(Se.c.stop(ei,!0),gi[0].focus())}break}})),this.ui={container:e,styleSheet:i,leftActionBar:l,titleBar:s,title:P,description1:X,description2:st,rightActionBar:H,checkAll:Ue,filterContainer:wt,inputBox:to,visibleCountContainer:lo,visibleCount:po,countContainer:Ho,count:Vo,okContainer:ii,ok:Jo,message:Ai,customButtonContainer:Go,customButton:Si,list:ai,progressBar:Fo,onDidAccept:this.onDidAcceptEmitter.event,onDidCustom:this.onDidCustomEmitter.event,onDidTriggerButton:this.onDidTriggerButtonEmitter.event,ignoreFocusOut:!1,keyMods:this.keyMods,isScreenReaderOptimized:()=>this.options.isScreenReaderOptimized(),show:ei=>this.show(ei),hide:()=>this.hide(),setVisibilities:ei=>this.setVisibilities(ei),setComboboxAccessibility:ei=>this.setComboboxAccessibility(ei),setEnabled:ei=>this.setEnabled(ei),setContextKey:ei=>this.options.setContextKey(ei)},this.updateStyles(),this.ui}pick(e,i={},s=B.a.None){return new Promise((l,P)=>{let H=st=>{H=l,i.onKeyMods&&i.onKeyMods(X.keyMods),l(st)};if(s.isCancellationRequested){H(void 0);return}const X=this.createQuickPick();let ge;const Ue=[X,X.onDidAccept(()=>{if(X.canSelectMany)H(X.selectedItems.slice()),X.hide();else{const st=X.activeItems[0];st&&(H(st),X.hide())}}),X.onDidChangeActive(st=>{const Je=st[0];Je&&i.onDidFocus&&i.onDidFocus(Je)}),X.onDidChangeSelection(st=>{if(!X.canSelectMany){const Je=st[0];Je&&(H(Je),X.hide())}}),X.onDidTriggerItemButton(st=>i.onDidTriggerItemButton&&i.onDidTriggerItemButton(Object.assign(Object.assign({},st),{removeItem:()=>{const Je=X.items.indexOf(st.item);if(Je!==-1){const wt=X.items.slice(),to=wt.splice(Je,1),lo=X.activeItems.filter(Ho=>Ho!==to[0]),po=X.keepScrollPosition;X.keepScrollPosition=!0,X.items=wt,lo&&(X.activeItems=lo),X.keepScrollPosition=po}}}))),X.onDidChangeValue(st=>{ge&&!st&&(X.activeItems.length!==1||X.activeItems[0]!==ge)&&(X.activeItems=[ge])}),s.onCancellationRequested(()=>{X.hide()}),X.onDidHide(()=>{Object($e.f)(Ue),H(void 0)})];X.title=i.title,X.canSelectMany=!!i.canPickMany,X.placeholder=i.placeHolder,X.ignoreFocusOut=!!i.ignoreFocusLost,X.matchOnDescription=!!i.matchOnDescription,X.matchOnDetail=!!i.matchOnDetail,X.matchOnLabel=i.matchOnLabel===void 0||i.matchOnLabel,X.autoFocusOnList=i.autoFocusOnList===void 0||i.autoFocusOnList,X.quickNavigate=i.quickNavigate,X.contextKey=i.contextKey,X.busy=!0,Promise.all([e,i.activeItem]).then(([st,Je])=>{ge=Je,X.busy=!1,X.items=st,X.canSelectMany&&(X.selectedItems=st.filter(wt=>wt.type!=="separator"&&wt.picked)),ge&&(X.activeItems=[ge])}),X.show(),Promise.resolve(e).then(void 0,st=>{P(st),X.hide()})})}createQuickPick(){const e=this.getUI();return new Wr(e)}show(e){const i=this.getUI();this.onShowEmitter.fire();const s=this.controller;this.controller=e,s&&s.didHide(),this.setEnabled(!0),i.leftActionBar.clear(),i.title.textContent="",i.description1.textContent="",i.description2.textContent="",i.rightActionBar.clear(),i.checkAll.checked=!1,i.inputBox.placeholder="",i.inputBox.password=!1,i.inputBox.showDecoration(So.a.Ignore),i.visibleCount.setCount(0),i.count.setCount(0),Se.R(i.message),i.progressBar.stop(),i.list.setElements([]),i.list.matchOnDescription=!1,i.list.matchOnDetail=!1,i.list.matchOnLabel=!0,i.list.sortByLabel=!0,i.ignoreFocusOut=!1,this.setComboboxAccessibility(!1),i.inputBox.ariaLabel="";const l=this.options.backKeybindingLabel();ka.tooltip=l?Object(De.a)("quickInput.backWithKeybinding","Back ({0})",l):Object(De.a)("quickInput.back","Back"),i.container.style.display="",this.updateLayout(),i.inputBox.setFocus()}setVisibilities(e){const i=this.getUI();i.title.style.display=e.title?"":"none",i.description1.style.display=e.description&&(e.inputBox||e.checkAll)?"":"none",i.description2.style.display=e.description&&!(e.inputBox||e.checkAll)?"":"none",i.checkAll.style.display=e.checkAll?"":"none",i.filterContainer.style.display=e.inputBox?"":"none",i.visibleCountContainer.style.display=e.visibleCount?"":"none",i.countContainer.style.display=e.count?"":"none",i.okContainer.style.display=e.ok?"":"none",i.customButtonContainer.style.display=e.customButton?"":"none",i.message.style.display=e.message?"":"none",i.progressBar.getContainer().style.display=e.progressBar?"":"none",i.list.display(!!e.list),i.container.classList[e.checkBox?"add":"remove"]("show-checkboxes"),this.updateLayout()}setComboboxAccessibility(e){if(e!==this.comboboxAccessibility){const i=this.getUI();this.comboboxAccessibility=e,this.comboboxAccessibility?(i.inputBox.setAttribute("role","combobox"),i.inputBox.setAttribute("aria-haspopup","true"),i.inputBox.setAttribute("aria-autocomplete","list"),i.inputBox.setAttribute("aria-activedescendant",i.list.getActiveDescendant()||"")):(i.inputBox.removeAttribute("role"),i.inputBox.removeAttribute("aria-haspopup"),i.inputBox.removeAttribute("aria-autocomplete"),i.inputBox.removeAttribute("aria-activedescendant"))}}setEnabled(e){if(e!==this.enabled){this.enabled=e;for(const i of this.getUI().leftActionBar.viewItems)i.getAction().enabled=e;for(const i of this.getUI().rightActionBar.viewItems)i.getAction().enabled=e;this.getUI().checkAll.disabled=!e,this.getUI().ok.enabled=e,this.getUI().list.enabled=e}}hide(e){var i;const s=this.controller;if(s){const l=!((i=this.ui)===null||i===void 0?void 0:i.container.contains(document.activeElement));this.controller=null,this.onHideEmitter.fire(),this.getUI().container.style.display="none",l||(this.previousFocusElement&&this.previousFocusElement.offsetParent?(this.previousFocusElement.focus(),this.previousFocusElement=void 0):this.options.returnFocus()),s.didHide(e)}}layout(e,i){this.dimension=e,this.titleBarOffset=i,this.updateLayout()}updateLayout(){if(this.ui){this.ui.container.style.top=`${this.titleBarOffset}px`;const e=this.ui.container.style,i=Math.min(this.dimension.width*.62,Pa.MAX_WIDTH);e.width=i+"px",e.marginLeft="-"+i/2+"px",this.ui.inputBox.layout(),this.ui.list.layout(this.dimension&&this.dimension.height*.4)}}applyStyles(e){this.styles=e,this.updateStyles()}updateStyles(){if(this.ui){const{quickInputTitleBackground:e,quickInputBackground:i,quickInputForeground:s,contrastBorder:l,widgetShadow:P}=this.styles.widget;this.ui.titleBar.style.backgroundColor=e?e.toString():"",this.ui.container.style.backgroundColor=i?i.toString():"",this.ui.container.style.color=s?s.toString():"",this.ui.container.style.border=l?`1px solid ${l}`:"",this.ui.container.style.boxShadow=P?`0 0 8px 2px ${P}`:"",this.ui.inputBox.style(this.styles.inputBox),this.ui.count.style(this.styles.countBadge),this.ui.ok.style(this.styles.button),this.ui.customButton.style(this.styles.button),this.ui.progressBar.style(this.styles.progressBar),this.ui.list.style(this.styles.list);const H=[];this.styles.list.pickerGroupBorder&&H.push(`.quick-input-list .quick-input-list-entry { border-top-color: ${this.styles.list.pickerGroupBorder}; }`),this.styles.list.pickerGroupForeground&&H.push(`.quick-input-list .quick-input-list-separator { color: ${this.styles.list.pickerGroupForeground}; }`),(this.styles.keybindingLabel.keybindingLabelBackground||this.styles.keybindingLabel.keybindingLabelBorder||this.styles.keybindingLabel.keybindingLabelBottomBorder||this.styles.keybindingLabel.keybindingLabelShadow||this.styles.keybindingLabel.keybindingLabelForeground)&&(H.push(".quick-input-list .monaco-keybinding > .monaco-keybinding-key {"),this.styles.keybindingLabel.keybindingLabelBackground&&H.push(`background-color: ${this.styles.keybindingLabel.keybindingLabelBackground};`),this.styles.keybindingLabel.keybindingLabelBorder&&H.push(`border-color: ${this.styles.keybindingLabel.keybindingLabelBorder};`),this.styles.keybindingLabel.keybindingLabelBottomBorder&&H.push(`border-bottom-color: ${this.styles.keybindingLabel.keybindingLabelBottomBorder};`),this.styles.keybindingLabel.keybindingLabelShadow&&H.push(`box-shadow: inset 0 -1px 0 ${this.styles.keybindingLabel.keybindingLabelShadow};`),this.styles.keybindingLabel.keybindingLabelForeground&&H.push(`color: ${this.styles.keybindingLabel.keybindingLabelForeground};`),H.push("}"));const X=H.join(`
|
|
|
`);X!==this.ui.styleSheet.textContent&&(this.ui.styleSheet.textContent=X)}}}Pa.MAX_WIDTH=600;var Fa=t("C/vA"),zl=t("Lx4V"),Ba=t("Zr1c"),Ec=function(e,i,s,l){var P=arguments.length,H=P<3?i:l===null?l=Object.getOwnPropertyDescriptor(i,s):l,X;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")H=Reflect.decorate(e,i,s,l);else for(var ge=e.length-1;ge>=0;ge--)(X=e[ge])&&(H=(P<3?X(H):P>3?X(i,s,H):X(i,s))||H);return P>3&&H&&Object.defineProperty(i,s,H),H},Kl=function(e,i){return function(s,l){i(s,l,e)}};let Wa=class extends $e.a{constructor(i,s){super();this.quickInputService=i,this.instantiationService=s,this.registry=oi.a.as(zl.b.Quickaccess),this.mapProviderToDescriptor=new Map,this.lastAcceptedPickerValues=new Map,this.visibleQuickAccess=void 0}show(i="",s){this.doShowOrPick(i,!1,s)}doShowOrPick(i,s,l){var P;const[H,X]=this.getOrInstantiateProvider(i),ge=this.visibleQuickAccess,Ue=ge==null?void 0:ge.descriptor;if(ge&&X&&Ue===X){i!==X.prefix&&!(l==null?void 0:l.preserveValue)&&(ge.picker.value=i),this.adjustValueSelection(ge.picker,X,l);return}if(X&&!(l==null?void 0:l.preserveValue)){let po;if(ge&&Ue&&Ue!==X){const Ho=ge.value.substr(Ue.prefix.length);Ho&&(po=`${X.prefix}${Ho}`)}if(!po){const Ho=H==null?void 0:H.defaultFilterValue;Ho===zl.a.LAST?po=this.lastAcceptedPickerValues.get(X):typeof Ho=="string"&&(po=`${X.prefix}${Ho}`)}typeof po=="string"&&(i=po)}const st=new $e.b,Je=st.add(this.quickInputService.createQuickPick());Je.value=i,this.adjustValueSelection(Je,X,l),Je.placeholder=X==null?void 0:X.placeholder,Je.quickNavigate=l==null?void 0:l.quickNavigateConfiguration,Je.hideInput=!!Je.quickNavigate&&!ge,(typeof(l==null?void 0:l.itemActivation)=="number"||(l==null?void 0:l.quickNavigateConfiguration))&&(Je.itemActivation=(P=l==null?void 0:l.itemActivation)!==null&&P!==void 0?P:Ba.b.SECOND),Je.contextKey=X==null?void 0:X.contextKey,Je.filterValue=po=>po.substring(X?X.prefix.length:0),(X==null?void 0:X.placeholder)&&(Je.ariaLabel=X==null?void 0:X.placeholder);let wt,to;s&&(wt=new Promise(po=>to=po),st.add(Object(Fa.a)(Je.onWillAccept)(po=>{po.veto(),Je.hide()}))),st.add(this.registerPickerListeners(Je,H,X,i));const lo=st.add(new B.b);if(H&&st.add(H.provide(Je,lo.token)),Object(Fa.a)(Je.onDidHide)(()=>{Je.selectedItems.length===0&&lo.cancel(),st.dispose(),to==null||to(Je.selectedItems)}),Je.show(),s)return wt}adjustValueSelection(i,s,l){var P;let H;(l==null?void 0:l.preserveValue)?H=[i.value.length,i.value.length]:H=[(P=s==null?void 0:s.prefix.length)!==null&&P!==void 0?P:0,i.value.length],i.valueSelection=H}registerPickerListeners(i,s,l,P){const H=new $e.b,X=this.visibleQuickAccess={picker:i,descriptor:l,value:P};return H.add(Object($e.i)(()=>{X===this.visibleQuickAccess&&(this.visibleQuickAccess=void 0)})),H.add(i.onDidChangeValue(ge=>{const[Ue]=this.getOrInstantiateProvider(ge);Ue!==s?this.show(ge,{preserveValue:!0}):X.value=ge})),l&&H.add(i.onDidAccept(()=>{this.lastAcceptedPickerValues.set(l,i.value)})),H}getOrInstantiateProvider(i){const s=this.registry.getQuickAccessProvider(i);if(!s)return[void 0,void 0];let l=this.mapProviderToDescriptor.get(s);return l||(l=this.instantiationService.createInstance(s.ctor),this.mapProviderToDescriptor.set(s,l)),[l,s]}};Wa=Ec([Kl(0,Ba.a),Kl(1,vn.a)],Wa);var Sc=function(e,i,s,l){var P=arguments.length,H=P<3?i:l===null?l=Object.getOwnPropertyDescriptor(i,s):l,X;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")H=Reflect.decorate(e,i,s,l);else for(var ge=e.length-1;ge>=0;ge--)(X=e[ge])&&(H=(P<3?X(H):P>3?X(i,s,H):X(i,s))||H);return P>3&&H&&Object.defineProperty(i,s,H),H},gr=function(e,i){return function(s,l){i(s,l,e)}};let Ua=class extends nn.c{constructor(i,s,l,P,H){super(l);this.instantiationService=i,this.contextKeyService=s,this.accessibilityService=P,this.layoutService=H,this.contexts=new Map}get controller(){return this._controller||(this._controller=this._register(this.createController())),this._controller}get quickAccess(){return this._quickAccess||(this._quickAccess=this._register(this.instantiationService.createInstance(Wa))),this._quickAccess}createController(i=this.layoutService,s){var l,P;const H={idPrefix:"quickInput_",container:i.container,ignoreFocusOut:()=>!1,isScreenReaderOptimized:()=>this.accessibilityService.isScreenReaderOptimized(),backKeybindingLabel:()=>{},setContextKey:ge=>this.setContextKey(ge),returnFocus:()=>i.focus(),createList:(ge,Ue,st,Je,wt)=>this.instantiationService.createInstance(_a.d,ge,Ue,st,Je,wt),styles:this.computeStyles()},X=this._register(new Pa(Object.assign(Object.assign({},H),s)));return X.layout(i.dimension,(P=(l=i.offset)===null||l===void 0?void 0:l.top)!==null&&P!==void 0?P:0),this._register(i.onDidLayout(ge=>{var Ue,st;return X.layout(ge,(st=(Ue=i.offset)===null||Ue===void 0?void 0:Ue.top)!==null&&st!==void 0?st:0)})),this._register(X.onShow(()=>this.resetContextKeys())),this._register(X.onHide(()=>this.resetContextKeys())),X}setContextKey(i){let s;if(i&&(s=this.contexts.get(i),s||(s=new Ct.c(i,!1).bindTo(this.contextKeyService),this.contexts.set(i,s))),s&&s.get())return;this.resetContextKeys(),s&&s.set(!0)}resetContextKeys(){this.contexts.forEach(i=>{i.get()&&i.reset()})}pick(i,s={},l=B.a.None){return this.controller.pick(i,s,l)}createQuickPick(){return this.controller.createQuickPick()}updateStyles(){this.controller.applyStyles(this.computeStyles())}computeStyles(){return{widget:Object.assign({},Object(fs.d)(this.theme,{quickInputBackground:ni.qc,quickInputForeground:ni.rc,quickInputTitleBackground:ni.vc,contrastBorder:ni.h,widgetShadow:ni.Nc})),inputBox:Object(fs.d)(this.theme,{inputForeground:ni.jb,inputBackground:ni.hb,inputBorder:ni.ib,inputValidationInfoBackground:ni.nb,inputValidationInfoForeground:ni.pb,inputValidationInfoBorder:ni.ob,inputValidationWarningBackground:ni.qb,inputValidationWarningForeground:ni.sb,inputValidationWarningBorder:ni.rb,inputValidationErrorBackground:ni.kb,inputValidationErrorForeground:ni.mb,inputValidationErrorBorder:ni.lb}),countBadge:Object(fs.d)(this.theme,{badgeBackground:ni.c,badgeForeground:ni.d,badgeBorder:ni.h}),button:Object(fs.d)(this.theme,{buttonForeground:ni.f,buttonBackground:ni.e,buttonHoverBackground:ni.g,buttonBorder:ni.h}),progressBar:Object(fs.d)(this.theme,{progressBarBackground:ni.pc}),keybindingLabel:Object(fs.d)(this.theme,{keybindingLabelBackground:ni.tb,keybindingLabelForeground:ni.wb,keybindingLabelBorder:ni.ub,keybindingLabelBottomBorder:ni.vb,keybindingLabelShadow:ni.Nc}),list:Object(fs.d)(this.theme,{listBackground:ni.qc,listInactiveFocusForeground:ni.tc,listInactiveSelectionIconForeground:ni.uc,listInactiveFocusBackground:ni.sc,listFocusOutline:ni.b,listInactiveFocusOutline:ni.b,pickerGroupBorder:ni.kc,pickerGroupForeground:ni.lc})}}};Ua=Sc([gr(0,vn.a),gr(1,Ct.b),gr(2,nn.b),gr(3,os.b),gr(4,Or)],Ua);var Gl=function(e,i,s,l){var P=arguments.length,H=P<3?i:l===null?l=Object.getOwnPropertyDescriptor(i,s):l,X;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")H=Reflect.decorate(e,i,s,l);else for(var ge=e.length-1;ge>=0;ge--)(X=e[ge])&&(H=(P<3?X(H):P>3?X(i,s,H):X(i,s))||H);return P>3&&H&&Object.defineProperty(i,s,H),H},Ts=function(e,i){return function(s,l){i(s,l,e)}};let Ha=class extends Ua{constructor(i,s,l,P,H,X){super(s,l,P,H,X);this.host=void 0;const ge=fr.get(i);this.host={_serviceBrand:void 0,get container(){return ge.widget.getDomNode()},get dimension(){return i.getLayoutInfo()},get onDidLayout(){return i.onDidLayoutChange},focus:()=>i.focus()}}createController(){return super.createController(this.host)}};Ha=Gl([Ts(1,vn.a),Ts(2,Ct.b),Ts(3,nn.b),Ts(4,os.b),Ts(5,Or)],Ha);let Va=class{constructor(i,s){this.instantiationService=i,this.codeEditorService=s,this.mapEditorToService=new Map}get activeService(){const i=this.codeEditorService.getFocusedCodeEditor();if(!i)throw new Error("Quick input service needs a focused editor to work.");let s=this.mapEditorToService.get(i);if(!s){const l=s=this.instantiationService.createInstance(Ha,i);this.mapEditorToService.set(i,s),Object(Fa.a)(i.onDidDispose)(()=>{l.dispose(),this.mapEditorToService.delete(i)})}return s}get quickAccess(){return this.activeService.quickAccess}pick(i,s={},l=B.a.None){return this.activeService.pick(i,s,l)}createQuickPick(){return this.activeService.createQuickPick()}};Va=Gl([Ts(0,vn.a),Ts(1,Be.a)],Va);class fr{constructor(e){this.editor=e,this.widget=new za(this.editor)}static get(e){return e.getContribution(fr.ID)}dispose(){this.widget.dispose()}}fr.ID="editor.controller.quickInput";class za{constructor(e){this.codeEditor=e,this.domNode=document.createElement("div"),this.codeEditor.addOverlayWidget(this)}getId(){return za.ID}getDomNode(){return this.domNode}getPosition(){return{preference:2}}dispose(){this.codeEditor.removeOverlayWidget(this)}}za.ID="editor.contrib.quickInputWidget",Object(Zn.l)(fr.ID,fr);var Fi;(function(e){const i=new Ps.a;class s{constructor(ge,Ue){this._serviceId=ge,this._factory=Ue,this._value=null}get id(){return this._serviceId}get(ge){if(!this._value){if(ge&&(this._value=ge[this._serviceId.toString()]),this._value||(this._value=this._factory(ge)),!this._value)throw new Error("Service "+this._serviceId+" is missing!");i.set(this._serviceId,this._value)}return this._value}}e.LazyStaticService=s;let l=[];function P(ge,Ue){let st=new s(ge,Ue);return l.push(st),st}function H(ge){let Ue=new Ps.a;for(const[Je,wt]of Object(_l.a)())Ue.set(Je,wt);for(let Je in ge)ge.hasOwnProperty(Je)&&Ue.set(Object(vn.c)(Je),ge[Je]);l.forEach(Je=>Ue.set(Je.id,Je.get(ge)));let st=new La(Ue,!0);return Ue.set(vn.a,st),[Ue,st]}e.init=H,e.instantiationService=P(vn.a,()=>new La(i,!0));const X=new br;e.configurationService=P(f.a,()=>X),e.resourceConfigurationService=P(Ui.a,()=>new zr(X)),e.resourcePropertiesService=P(Ui.b,()=>new Is(X)),e.contextService=P(li.a,()=>new As),e.labelService=P(Gd.a,()=>new er),e.telemetryService=P(pa.a,()=>new vr),e.dialogService=P(Cl.a,()=>new Os),e.notificationService=P(Ko.a,()=>new Yn),e.markerService=P(qn.b,()=>new Js),e.modeService=P(xo.a,ge=>new bi),e.standaloneThemeService=P(Ds.a,()=>new Td),e.logService=P($i.b,()=>new $i.d(new $i.a)),e.undoRedoService=P(ji.a,ge=>new jr(e.dialogService.get(ge),e.notificationService.get(ge))),e.languageConfigurationService=P(St.a,ge=>new St.c(e.configurationService.get(ge),e.modeService.get(ge))),e.modelService=P(Li.a,ge=>new _r(e.configurationService.get(ge),e.resourcePropertiesService.get(ge),e.standaloneThemeService.get(ge),e.logService.get(ge),e.undoRedoService.get(ge),e.modeService.get(ge),e.languageConfigurationService.get(ge))),e.markerDecorationsService=P(Yd.a,ge=>new xa(e.modelService.get(ge),e.markerService.get(ge))),e.contextKeyService=P(Ct.b,ge=>new fa(e.configurationService.get(ge))),e.codeEditorService=P(Be.a,ge=>new Ze(null,e.contextKeyService.get(ge),e.standaloneThemeService.get(ge))),e.editorProgressService=P(Ws.a,()=>new Mn),e.storageService=P(Sl.a,()=>new Sl.b),e.editorWorkerService=P(Mo.a,ge=>new Ee(e.modelService.get(ge),e.resourceConfigurationService.get(ge),e.logService.get(ge)))})(Fi||(Fi={}));class wc extends $e.a{constructor(e,i){super();const[s,l]=Fi.init(i);this._serviceCollection=s,this._instantiationService=l;const P=this.get(f.a),H=this.get(Ko.a),X=this.get(pa.a),ge=this.get(nn.b),Ue=this.get($i.b),st=this.get(Ct.b);let Je=(Ho,Vo)=>{let ii=null;return i&&(ii=i[Ho.toString()]),ii||(ii=Vo()),this._serviceCollection.set(Ho,ii),ii};Je(os.b,()=>new Ta(st,P)),Je(_a.a,()=>new _a.b(ge));let wt=Je(ie.b,()=>new vs(this._instantiationService)),to=Je(ts.a,()=>this._register(new ns(st,wt,X,H,Ue,e))),lo=Je(Or,()=>new Kr(Fi.codeEditorService.get(Be.a),e));Je(Ba.a,()=>new Va(l,Fi.codeEditorService.get(Be.a)));let po=Je(zn.b,()=>this._register(new wa(lo)));Je(Bs.a,()=>new qd),Je(zn.a,()=>{const Ho=new Sa(X,H,po,to,ge);return Ho.configure({blockMouse:!1}),this._register(Ho)}),Je(Tn.a,()=>new Da(wt)),Je(ue.a,()=>new $a(Fi.modelService.get(Li.a)))}get(e){let i=this._serviceCollection.get(e);if(!i)throw new Error("Missing service "+e);return i}set(e,i){this._serviceCollection.set(e,i)}has(e){return this._serviceCollection.has(e)}}function Xl(e,i,s){let l=new wc(e,i),P=null;l.has(Do.a)||(P=new En(Fi.modelService.get()),l.set(Do.a,P)),l.has(U.a)||l.set(U.a,new Lt(l.get(Be.a),l.get(ie.b)));let H=s(l);return P&&P.setEditor(H),H}function Lc(e,i,s){return Xl(e,s||{},l=>new go(e,i,l,l.get(vn.a),l.get(Be.a),l.get(ie.b),l.get(Ct.b),l.get(ts.a),l.get(zn.b),l.get(Ds.a),l.get(Ko.a),l.get(f.a),l.get(os.b),l.get(Li.a),l.get(xo.a)))}function _c(e){return Fi.codeEditorService.get().onCodeEditorAdd(i=>{e(i)})}function Dc(e,i,s){return Xl(e,s||{},l=>new yo(e,i,l,l.get(vn.a),l.get(Ct.b),l.get(ts.a),l.get(zn.b),l.get(Mo.a),l.get(Be.a),l.get(Ds.a),l.get(Ko.a),l.get(f.a),l.get(zn.a),l.get(Ws.a),l.get(Bs.a)))}function Mc(e,i){return new Ve(e,i)}function xc(e,i,s){return jo(Fi.modelService.get(),Fi.modeService.get(),e,i,s)}function Tc(e,i){Fi.modelService.get().setMode(e,Fi.modeService.get().create(i))}function Oc(e,i,s){e&&Fi.markerService.get().changeOne(i,e.uri,s)}function Ic(e){return Fi.markerService.get().read(e)}function Ac(e){return Fi.markerService.get().onMarkerChanged(e)}function Rc(e){return Fi.modelService.get().getModel(e)}function Nc(){return Fi.modelService.get().getModels()}function kc(e){return Fi.modelService.get().onModelAdded(e)}function jc(e){return Fi.modelService.get().onModelRemoved(e)}function Pc(e){return Fi.modelService.get().onModelModeChanged(i=>{e({model:i.model,oldLanguage:i.oldModeId})})}function Fc(e){return Kt(Fi.modelService.get(),e)}function Bc(e,i){const s=Fi.standaloneThemeService.get();return s.registerEditorContainer(e),Wn.colorizeElement(s,Fi.modeService.get(),e,i)}function Wc(e,i,s){const l=Fi.standaloneThemeService.get();return l.registerEditorContainer(document.body),Wn.colorize(Fi.modeService.get(),e,i,s)}function Uc(e,i,s=4){const l=Fi.standaloneThemeService.get();return l.registerEditorContainer(document.body),Wn.colorizeModelLine(e,i,s)}function Hc(e){let i=Rt.E.get(e);return i||{getInitialState:()=>vo.b,tokenize:(s,l,P,H)=>Object(vo.c)(e,s,P,H)}}function Vc(e,i){let s=Fi.modeService.get();s.triggerMode(i);let l=Hc(i),P=Object(ze.Q)(e),H=[],X=l.getInitialState();for(let ge=0,Ue=P.length;ge<Ue;ge++){let st=P[ge],Je=l.tokenize(st,!0,X,0);H[ge]=Je.tokens,X=Je.endState}return H}function zc(e,i){Fi.standaloneThemeService.get().defineTheme(e,i)}function Kc(e){Fi.standaloneThemeService.get().setTheme(e)}function Gc(){Object(Ns.b)()}function Xc(e,i){return ie.a.registerCommand({id:e,handler:i})}function $c(){return{create:Lc,onDidCreateEditor:_c,createDiffEditor:Dc,createDiffNavigator:Mc,createModel:xc,setModelLanguage:Tc,setModelMarkers:Oc,getModelMarkers:Ic,onDidChangeMarkers:Ac,getModels:Nc,getModel:Rc,onDidCreateModel:kc,onWillDisposeModel:jc,onDidChangeModelLanguage:Pc,createWebWorker:Fc,colorizeElement:Bc,colorize:Wc,colorizeModelLine:Uc,tokenize:Vc,defineTheme:zc,setTheme:Kc,remeasureFonts:Gc,registerCommand:Xc,AccessibilitySupport:m,ContentWidgetPositionPreference:w,CursorChangeReason:b,DefaultEndOfLine:u,EditorAutoIndentStrategy:p,EditorOption:S,EndOfLinePreference:E,EndOfLineSequence:y,MinimapPosition:re,MouseTargetType:Z,OverlayWidgetPositionPreference:ne,OverviewRulerLane:le,RenderLineNumbersType:_e,RenderMinimap:Ce,ScrollbarVisibility:ae,ScrollType:oe,TextEditorCursorBlinkingStyle:Te,TextEditorCursorStyle:Ie,TrackedRangeStickiness:Me,WrappingIndent:Oe,ConfigurationChangedEvent:g.b,BareFontInfo:it.a,FontInfo:it.b,TextModelResolvedOptions:It.h,FindMatch:It.b,EditorType:Et.a,EditorOptions:g.g}}function Yc(e,i){if(!i)return!1;if(!Array.isArray(i))return!1;for(const s of i)if(!e(s))return!1;return!0}function Ur(e,i){return typeof e=="boolean"?e:i}function $l(e,i){return typeof e=="string"?e:i}function Zc(e){const i={};for(const s of e)i[s]=!0;return i}function Yl(e,i=!1){i&&(e=e.map(function(l){return l.toLowerCase()}));const s=Zc(e);return i?function(l){return s[l.toLowerCase()]!==void 0&&s.hasOwnProperty(l.toLowerCase())}:function(l){return s[l]!==void 0&&s.hasOwnProperty(l)}}function Ka(e,i){i=i.replace(/@@/g,"");let s=0,l;do l=!1,i=i.replace(/@(\w+)/g,function(H,X){l=!0;let ge="";if(typeof e[X]=="string")ge=e[X];else if(e[X]&&e[X]instanceof RegExp)ge=e[X].source;else throw e[X]===void 0?mo(e,"language definition does not contain attribute '"+X+"', used at: "+i):mo(e,"attribute reference '"+X+"' must be a string, used at: "+i);return $t(ge)?"":"(?:"+ge+")"}),s++;while(l&&s<5);i=i.replace(/\x01/g,"@");let P=(e.ignoreCase?"i":"")+(e.unicode?"u":"");return new RegExp(i,P)}function Qc(e,i,s,l){if(l<0)return e;if(l<i.length)return i[l];if(l>=100){l=l-100;let P=s.split(".");if(P.unshift(s),l<P.length)return P[l]}return null}function Jc(e,i,s,l){let P=-1,H=s,X=s.match(/^\$(([sS]?)(\d\d?)|#)(.*)$/);X&&(X[3]&&(P=parseInt(X[3]),X[2]&&(P=P+100)),H=X[4]);let ge="~",Ue=H;!H||H.length===0?(ge="!=",Ue=""):/^\w*$/.test(Ue)?ge="==":(X=H.match(/^(@|!@|~|!~|==|!=)(.*)$/),X&&(ge=X[1],Ue=X[2]));let st;if((ge==="~"||ge==="!~")&&/^(\w|\|)*$/.test(Ue)){let Je=Yl(Ue.split("|"),e.ignoreCase);st=function(wt){return ge==="~"?Je(wt):!Je(wt)}}else if(ge==="@"||ge==="!@"){let Je=e[Ue];if(!Je)throw mo(e,"the @ match target '"+Ue+"' is not defined, in rule: "+i);if(!Yc(function(to){return typeof to=="string"},Je))throw mo(e,"the @ match target '"+Ue+"' must be an array of strings, in rule: "+i);let wt=Yl(Je,e.ignoreCase);st=function(to){return ge==="@"?wt(to):!wt(to)}}else if(ge==="~"||ge==="!~")if(Ue.indexOf("$")<0){let Je=Ka(e,"^"+Ue+"$");st=function(wt){return ge==="~"?Je.test(wt):!Je.test(wt)}}else st=function(Je,wt,to,lo){let po=Ka(e,"^"+Io(e,Ue,wt,to,lo)+"$");return po.test(Je)};else if(Ue.indexOf("$")<0){let Je=uo(e,Ue);st=function(wt){return ge==="=="?wt===Je:wt!==Je}}else{let Je=uo(e,Ue);st=function(wt,to,lo,po,Ho){let Vo=Io(e,Je,to,lo,po);return ge==="=="?wt===Vo:wt!==Vo}}return P===-1?{name:s,value:l,test:function(Je,wt,to,lo){return st(Je,Je,wt,to,lo)}}:{name:s,value:l,test:function(Je,wt,to,lo){let po=Qc(Je,wt,to,P);return st(po||"",Je,wt,to,lo)}}}function Ga(e,i,s){if(s){if(typeof s=="string")return s;if(s.token||s.token===""){if(typeof s.token!="string")throw mo(e,"a 'token' attribute must be of type string, in rule: "+i);{let l={token:s.token};if(s.token.indexOf("$")>=0&&(l.tokenSubst=!0),typeof s.bracket=="string")if(s.bracket==="@open")l.bracket=1;else if(s.bracket==="@close")l.bracket=-1;else throw mo(e,"a 'bracket' attribute must be either '@open' or '@close', in rule: "+i);if(s.next){if(typeof s.next!="string")throw mo(e,"the next state must be a string value in rule: "+i);{let P=s.next;if(!/^(@pop|@push|@popall)$/.test(P)&&(P[0]==="@"&&(P=P.substr(1)),P.indexOf("$")<0&&!Oo(e,Io(e,P,"",[],""))))throw mo(e,"the next state '"+s.next+"' is not defined in rule: "+i);l.next=P}}return typeof s.goBack=="number"&&(l.goBack=s.goBack),typeof s.switchTo=="string"&&(l.switchTo=s.switchTo),typeof s.log=="string"&&(l.log=s.log),typeof s.nextEmbedded=="string"&&(l.nextEmbedded=s.nextEmbedded,e.usesEmbedded=!0),l}}else if(Array.isArray(s)){let l=[];for(let P=0,H=s.length;P<H;P++)l[P]=Ga(e,i,s[P]);return{group:l}}else if(s.cases){let l=[];for(let H in s.cases)if(s.cases.hasOwnProperty(H)){const X=Ga(e,i,s.cases[H]);H==="@default"||H==="@"||H===""?l.push({test:void 0,value:X,name:H}):H==="@eos"?l.push({test:function(ge,Ue,st,Je){return Je},value:X,name:H}):l.push(Jc(e,i,H,X))}const P=e.defaultToken;return{test:function(H,X,ge,Ue){for(const st of l){const Je=!st.test||st.test(H,X,ge,Ue);if(Je)return st.value}return P}}}else throw mo(e,"an action must be a string, an object with a 'token' or 'cases' attribute, or an array of actions; in rule: "+i)}else return{token:""}}class qc{constructor(e){this.regex=new RegExp(""),this.action={token:""},this.matchOnlyAtLineStart=!1,this.name="",this.name=e}setRegex(e,i){let s;if(typeof i=="string")s=i;else if(i instanceof RegExp)s=i.source;else throw mo(e,"rules must start with a match string or regular expression: "+this.name);this.matchOnlyAtLineStart=s.length>0&&s[0]==="^",this.name=this.name+": "+s,this.regex=Ka(e,"^(?:"+(this.matchOnlyAtLineStart?s.substr(1):s)+")")}setAction(e,i){this.action=Ga(e,this.name,i)}}function eu(e,i){if(!i||typeof i!="object")throw new Error("Monarch: expecting a language definition object");let s={};s.languageId=e,s.includeLF=Ur(i.includeLF,!1),s.noThrow=!1,s.maxStack=100,s.start=typeof i.start=="string"?i.start:null,s.ignoreCase=Ur(i.ignoreCase,!1),s.unicode=Ur(i.unicode,!1),s.tokenPostfix=$l(i.tokenPostfix,"."+s.languageId),s.defaultToken=$l(i.defaultToken,"source"),s.usesEmbedded=!1;let l=i;l.languageId=e,l.includeLF=s.includeLF,l.ignoreCase=s.ignoreCase,l.unicode=s.unicode,l.noThrow=s.noThrow,l.usesEmbedded=s.usesEmbedded,l.stateNames=i.tokenizer,l.defaultToken=s.defaultToken;function P(X,ge,Ue){for(const st of Ue){let Je=st.include;if(Je){if(typeof Je!="string")throw mo(s,"an 'include' attribute must be a string at: "+X);if(Je[0]==="@"&&(Je=Je.substr(1)),!i.tokenizer[Je])throw mo(s,"include target '"+Je+"' is not defined at: "+X);P(X+"."+Je,ge,i.tokenizer[Je])}else{const wt=new qc(X);if(Array.isArray(st)&&st.length>=1&&st.length<=3)if(wt.setRegex(l,st[0]),st.length>=3)if(typeof st[1]=="string")wt.setAction(l,{token:st[1],next:st[2]});else if(typeof st[1]=="object"){const to=st[1];to.next=st[2],wt.setAction(l,to)}else throw mo(s,"a next state as the last element of a rule can only be given if the action is either an object or a string, at: "+X);else wt.setAction(l,st[1]);else{if(!st.regex)throw mo(s,"a rule must either be an array, or an object with a 'regex' or 'include' field at: "+X);st.name&&(typeof st.name=="string"&&(wt.name=st.name)),st.matchOnlyAtStart&&(wt.matchOnlyAtLineStart=Ur(st.matchOnlyAtLineStart,!1)),wt.setRegex(l,st.regex),wt.setAction(l,st.action)}ge.push(wt)}}}if(!i.tokenizer||typeof i.tokenizer!="object")throw mo(s,"a language definition must define the 'tokenizer' attribute as an object");s.tokenizer=[];for(let X in i.tokenizer)if(i.tokenizer.hasOwnProperty(X)){s.start||(s.start=X);const ge=i.tokenizer[X];s.tokenizer[X]=new Array,P("tokenizer."+X,s.tokenizer[X],ge)}if(s.usesEmbedded=l.usesEmbedded,i.brackets){if(!Array.isArray(i.brackets))throw mo(s,"the 'brackets' attribute must be defined as an array")}else i.brackets=[{open:"{",close:"}",token:"delimiter.curly"},{open:"[",close:"]",token:"delimiter.square"},{open:"(",close:")",token:"delimiter.parenthesis"},{open:"<",close:">",token:"delimiter.angle"}];let H=[];for(let X of i.brackets){let ge=X;if(ge&&Array.isArray(ge)&&ge.length===3&&(ge={token:ge[2],open:ge[0],close:ge[1]}),ge.open===ge.close)throw mo(s,"open and close brackets in a 'brackets' attribute must be different: "+ge.open+`
|
|
|
hint: use the 'bracket' attribute if matching on equal brackets is required.`);if(typeof ge.open=="string"&&typeof ge.token=="string"&&typeof ge.close=="string")H.push({token:ge.token+s.tokenPostfix,open:uo(s,ge.open),close:uo(s,ge.close)});else throw mo(s,"every element in the 'brackets' array must be a '{open,close,token}' object or array")}return s.brackets=H,s.noThrow=!0,s}function tu(e){ti.a.registerLanguage(e)}function ou(){let e=[];return e=e.concat(ti.a.getLanguages()),e}function iu(e){const i=Fi.modeService.get();return i.languageIdCodec.encodeLanguageId(e)}function nu(e,i){let s=Fi.modeService.get().onDidEncounterLanguage(l=>{l===l&&(s.dispose(),i())});return s}function su(e,i){const s=Fi.modeService.get().validateLanguageId(e);if(!s)throw new Error(`Cannot set configuration for unknown language ${e}`);return St.b.register(s,i,100)}class ru{constructor(e,i){this._languageId=e,this._actual=i}getInitialState(){return this._actual.getInitialState()}tokenize(e,i,s,l){if(typeof this._actual.tokenize=="function")return Hr.adaptTokenize(this._languageId,this._actual,e,s,l);throw new Error("Not supported!")}tokenize2(e,i,s){let l=this._actual.tokenizeEncoded(e,s);return new C.c(l.tokens,l.endState)}}class Hr{constructor(e,i,s,l){this._languageId=e,this._actual=i,this._modeService=s,this._standaloneThemeService=l}getInitialState(){return this._actual.getInitialState()}static _toClassicTokens(e,i,s){let l=[],P=0;for(let H=0,X=e.length;H<X;H++){const ge=e[H];let Ue=ge.startIndex;H===0?Ue=0:Ue<P&&(Ue=P),l[H]=new C.a(Ue+s,ge.scopes,i),P=Ue}return l}static adaptTokenize(e,i,s,l,P){let H=i.tokenize(s,l),X=Hr._toClassicTokens(H.tokens,e,P),ge;return H.endState.equals(l)?ge=l:ge=H.endState,new C.b(X,ge)}tokenize(e,i,s,l){return Hr.adaptTokenize(this._languageId,this._actual,e,s,l)}_toBinaryTokens(e,i,s){const l=e.encodeLanguageId(this._languageId),P=this._standaloneThemeService.getColorTheme().tokenTheme;let H=[],X=0,ge=0;for(let st=0,Je=i.length;st<Je;st++){const wt=i[st],to=P.match(l,wt.scopes);if(X>0&&H[X-1]===to)continue;let lo=wt.startIndex;st===0?lo=0:lo<ge&&(lo=ge),H[X++]=lo+s,H[X++]=to,ge=lo}let Ue=new Uint32Array(X);for(let st=0;st<X;st++)Ue[st]=H[st];return Ue}tokenize2(e,i,s,l){let P=this._actual.tokenize(e,s),H=this._toBinaryTokens(this._modeService.languageIdCodec,P.tokens,l),X;return P.endState.equals(s)?X=s:X=P.endState,new C.c(H,X)}}function au(e){return"tokenizeEncoded"in e}function Zl(e){return e&&typeof e.then=="function"}function lu(e){if(e){const i=[null];for(let s=1,l=e.length;s<l;s++)i[s]=ms.a.fromHex(e[s]);Fi.standaloneThemeService.get().setColorMapOverride(i)}else Fi.standaloneThemeService.get().setColorMapOverride(null)}function du(e,i){const s=Fi.modeService.get().validateLanguageId(e);if(!s)throw new Error(`Cannot set tokens provider for unknown language ${e}`);const l=P=>au(P)?new ru(s,P):new Hr(s,P,Fi.modeService.get(),Fi.standaloneThemeService.get());return Zl(i)?Rt.E.registerPromise(e,i.then(P=>l(P))):Rt.E.register(e,l(i))}function cu(e,i){const s=l=>In(Fi.modeService.get(),Fi.standaloneThemeService.get(),e,eu(e,l));return Zl(i)?Rt.E.registerPromise(e,i.then(l=>s(l))):Rt.E.register(e,s(i))}function uu(e,i){return Rt.x.register(e,i)}function hu(e,i){return Rt.y.register(e,i)}function mu(e,i){return Rt.A.register(e,i)}function gu(e,i){return Rt.p.register(e,{provideHover:(s,l,P)=>{let H=s.getWordAtPosition(l);return Promise.resolve(i.provideHover(s,l,P)).then(X=>X?(!X.range&&H&&(X.range=new I.a(l.lineNumber,H.startColumn,l.lineNumber,H.endColumn)),X.range||(X.range=new I.a(l.lineNumber,l.column,l.lineNumber,l.column)),X):void 0)}})}function fu(e,i){return Rt.m.register(e,i)}function pu(e,i){return Rt.i.register(e,i)}function bu(e,i){return Rt.v.register(e,i)}function vu(e,i){return Rt.f.register(e,i)}function Cu(e,i){return Rt.q.register(e,i)}function yu(e,i){return Rt.F.register(e,i)}function Eu(e,i){return Rt.b.register(e,i)}function Su(e,i,s){return Rt.a.register(e,{providedCodeActionKinds:s==null?void 0:s.providedCodeActionKinds,provideCodeActions:(l,P,H,X)=>{let ge=Fi.markerService.get().read({resource:l.uri}).filter(Ue=>I.a.areIntersectingOrTouching(Ue,P));return i.provideCodeActions(l,P,{markers:ge,only:H.only},X)},resolveCodeAction:i.resolveCodeAction})}function wu(e,i){return Rt.g.register(e,i)}function Lu(e,i){return Rt.j.register(e,i)}function _u(e,i){return Rt.w.register(e,i)}function Du(e,i){return Rt.u.register(e,i)}function Mu(e,i){return Rt.d.register(e,i)}function xu(e,i){return Rt.c.register(e,i)}function Tu(e,i){return Rt.o.register(e,i)}function Ou(e,i){return Rt.e.register(e,i)}function Iu(e,i){return Rt.z.register(e,i)}function Au(e,i){return Rt.l.register(e,i)}function Ru(e,i){return Rt.k.register(e,i)}function Nu(e,i){return Rt.t.register(e,i)}function ku(e,i){return Rt.r.register(e,i)}function ju(){return{register:tu,getLanguages:ou,onLanguage:nu,getEncodedLanguageId:iu,setLanguageConfiguration:su,setColorMap:lu,setTokensProvider:du,setMonarchTokensProvider:cu,registerReferenceProvider:uu,registerRenameProvider:hu,registerCompletionItemProvider:Mu,registerSignatureHelpProvider:mu,registerHoverProvider:gu,registerDocumentSymbolProvider:fu,registerDocumentHighlightProvider:pu,registerLinkedEditingRangeProvider:bu,registerDefinitionProvider:vu,registerImplementationProvider:Cu,registerTypeDefinitionProvider:yu,registerCodeLensProvider:Eu,registerCodeActionProvider:Su,registerDocumentFormattingEditProvider:wu,registerDocumentRangeFormattingEditProvider:Lu,registerOnTypeFormattingEditProvider:_u,registerLinkProvider:Du,registerColorProvider:xu,registerFoldingRangeProvider:Tu,registerDeclarationProvider:Ou,registerSelectionRangeProvider:Iu,registerDocumentSemanticTokensProvider:Au,registerDocumentRangeSemanticTokensProvider:Ru,registerInlineCompletionsProvider:Nu,registerInlayHintsProvider:ku,DocumentHighlightKind:c,CompletionItemKind:D,CompletionItemTag:L,CompletionItemInsertTextRule:d,SymbolKind:ee,SymbolTag:pe,IndentAction:O,CompletionTriggerKind:r,SignatureHelpTriggerKind:G,InlayHintKind:k,InlineCompletionTriggerKind:Q,FoldingRangeKind:Rt.n}}var Pu=t("hN88"),Xa;g.g.wrappingIndent.defaultValue=0,g.g.glyphMargin.defaultValue=!1,g.g.autoIndent.defaultValue=3,g.g.overviewRulerLanes.defaultValue=2,Pu.a.setFormatterSelector((e,i,s)=>Promise.resolve(e[0]));const Ln=fe();Ln.editor=$c(),Ln.languages=ju();const Fu=Ln.CancellationTokenSource,Bu=Ln.Emitter,Wu=Ln.KeyCode,Uu=Ln.KeyMod,Hu=Ln.Position,Vu=Ln.Range,zu=Ln.Selection,Ku=Ln.SelectionDirection,Gu=Ln.MarkerSeverity,Xu=Ln.MarkerTag,$u=Ln.Uri,Yu=Ln.Token,Zu=Ln.editor,Qu=Ln.languages;(((Xa=Vt.b.MonacoEnvironment)===null||Xa===void 0?void 0:Xa.globalAPI)||typeof define=="function"&&t("/yTO"))&&(self.monaco=Ln),typeof self.require!="undefined"&&typeof self.require.config=="function"&&self.require.config({ignoreDuplicateModules:["vscode-languageserver-types","vscode-languageserver-types/main","vscode-languageserver-textdocument","vscode-languageserver-textdocument/main","vscode-nls","vscode-nls/vscode-nls","jsonc-parser","jsonc-parser/main","vscode-uri","vscode-uri/index","vs/basic-languages/typescript/typescript"]})},"9B1q":function(mt,M,t){"use strict";t.r(M);var g=t("+hIS");Object(g.a)({id:"css",extensions:[".css"],aliases:["CSS","css"],mimetypes:["text/css"],loader:function(){return t.e(330).then(t.bind(null,"v7Iz"))}})},"9XAT":function(mt,M,t){"use strict";t.r(M),t.d(M,"cssDefaults",function(){return I}),t.d(M,"scssDefaults",function(){return v}),t.d(M,"lessDefaults",function(){return C});var g=t("M/lh"),B=t.n(g),x=t("CzyV"),R=function(){function d(D,L,r){this._onDidChange=new x.Emitter,this._languageId=D,this.setOptions(L),this.setModeConfiguration(r)}return Object.defineProperty(d.prototype,"onDidChange",{get:function(){return this._onDidChange.event},enumerable:!1,configurable:!0}),Object.defineProperty(d.prototype,"languageId",{get:function(){return this._languageId},enumerable:!1,configurable:!0}),Object.defineProperty(d.prototype,"modeConfiguration",{get:function(){return this._modeConfiguration},enumerable:!1,configurable:!0}),Object.defineProperty(d.prototype,"diagnosticsOptions",{get:function(){return this.options},enumerable:!1,configurable:!0}),Object.defineProperty(d.prototype,"options",{get:function(){return this._options},enumerable:!1,configurable:!0}),d.prototype.setOptions=function(D){this._options=D||Object.create(null),this._onDidChange.fire(this)},d.prototype.setDiagnosticsOptions=function(D){this.setOptions(D)},d.prototype.setModeConfiguration=function(D){this._modeConfiguration=D||Object.create(null),this._onDidChange.fire(this)},d}(),A={validate:!0,lint:{compatibleVendorPrefixes:"ignore",vendorPrefix:"warning",duplicateProperties:"warning",emptyRules:"warning",importStatement:"ignore",boxModel:"ignore",universalSelector:"ignore",zeroUnits:"ignore",fontFaceProperties:"warning",hexColorLength:"error",argumentsInColorFunction:"error",unknownProperties:"warning",ieHack:"ignore",unknownVendorSpecificProperties:"ignore",propertyIgnoredDueToDisplay:"warning",important:"ignore",float:"ignore",idSelector:"ignore"},data:{useDefaultDataProvider:!0}},j={completionItems:!0,hovers:!0,documentSymbols:!0,definitions:!0,references:!0,documentHighlights:!0,rename:!0,colors:!0,foldingRanges:!0,diagnostics:!0,selectionRanges:!0},I=new R("css",A,j),v=new R("scss",A,j),C=new R("less",A,j);x.languages.css={cssDefaults:I,lessDefaults:C,scssDefaults:v};function m(){return t.e(318).then(t.bind(null,"20/g"))}x.languages.onLanguage("less",function(){m().then(function(d){return d.setupMode(C)})}),x.languages.onLanguage("scss",function(){m().then(function(d){return d.setupMode(v)})}),x.languages.onLanguage("css",function(){m().then(function(d){return d.setupMode(I)})})},"9XeP":function(mt,M,t){"use strict";t.d(M,"a",function(){return B});var g=t("Cg/j");const B=Object(g.c)("clipboardService")},"9Y+e":function(mt,M,t){"use strict";t.d(M,"a",function(){return g});class g{constructor(B,x,R,A,j,I){this.id=B,this.label=x,this.alias=R,this._precondition=A,this._run=j,this._contextKeyService=I}isSupported(){return this._contextKeyService.contextMatchesRules(this._precondition)}run(){return this.isSupported()?this._run():Promise.resolve(void 0)}}},"9fML":function(mt,M,t){"use strict";t.d(M,"b",function(){return x}),t.d(M,"a",function(){return R});var g=t("r0BQ");const B=[];function x(A,j,I){j instanceof g.a||(j=new g.a(j,[],I)),B.push([A,j])}function R(){return B}},"9o5J":function(mt,M,t){"use strict";t.d(M,"b",function(){return d}),t.d(M,"a",function(){return L}),t.d(M,"c",function(){return r});var g=t("/cxE"),B=t("MI8n"),x=t("nD70"),R=t("pmY6"),A=t("QDVR"),j=t("gslv"),I=t("N0LK"),v=t("aokT"),C=t("3/fG"),m=function(w,b,u,c){function p(S){return S instanceof u?S:new u(function(E){E(S)})}return new(u||(u=Promise))(function(S,E){function y(Q){try{k(c.next(Q))}catch(q){E(q)}}function O(Q){try{k(c.throw(Q))}catch(q){E(q)}}function k(Q){Q.done?S(Q.value):p(Q.value).then(y,O)}k((c=c.apply(w,b||[])).next())})};class d{constructor(w,b,u,c){this.isProviderFirst=w,this.parent=b,this.link=u,this._rangeCallback=c,this.id=x.b.nextId()}get uri(){return this.link.uri}get range(){var w,b;return(b=(w=this._range)!==null&&w!==void 0?w:this.link.targetSelectionRange)!==null&&b!==void 0?b:this.link.range}set range(w){this._range=w,this._rangeCallback(this)}get ariaMessage(){var w;const b=(w=this.parent.getPreview(this))===null||w===void 0?void 0:w.preview(this.range);return b?Object(C.a)({key:"aria.oneReference.preview",comment:["Placeholders are: 0: filename, 1:line number, 2: column number, 3: preview snippet of source code"]},"symbol in {0} on line {1} at column {2}, {3}",Object(j.b)(this.uri),this.range.startLineNumber,this.range.startColumn,b.value):Object(C.a)("aria.oneReference","symbol in {0} on line {1} at column {2}",Object(j.b)(this.uri),this.range.startLineNumber,this.range.startColumn)}}class D{constructor(w){this._modelReference=w}dispose(){this._modelReference.dispose()}preview(w,b=8){const u=this._modelReference.object.textEditorModel;if(!u)return;const{startLineNumber:c,startColumn:p,endLineNumber:S,endColumn:E}=w,y=u.getWordUntilPosition({lineNumber:c,column:p-b}),O=new v.a(c,y.startColumn,c,p),k=new v.a(S,E,S,1073741824),Q=u.getValueInRange(O).replace(/^\s+/,""),q=u.getValueInRange(w),z=u.getValueInRange(k).replace(/\s+$/,"");return{value:Q+q+z,highlight:{start:Q.length,end:Q.length+q.length}}}}class L{constructor(w,b){this.parent=w,this.uri=b,this.children=[],this._previews=new A.b}dispose(){Object(R.f)(this._previews.values()),this._previews.clear()}getPreview(w){return this._previews.get(w.uri)}get ariaMessage(){const w=this.children.length;return w===1?Object(C.a)("aria.fileReferences.1","1 symbol in {0}, full path {1}",Object(j.b)(this.uri),this.uri.fsPath):Object(C.a)("aria.fileReferences.N","{0} symbols in {1}, full path {2}",w,Object(j.b)(this.uri),this.uri.fsPath)}resolve(w){return m(this,void 0,void 0,function*(){if(this._previews.size!==0)return this;for(let b of this.children){if(this._previews.has(b.uri))continue;try{const u=yield w.createModelReference(b.uri);this._previews.set(b.uri,new D(u))}catch(u){Object(g.f)(u)}}return this})}}class r{constructor(w,b){this.groups=[],this.references=[],this._onDidChangeReferenceRange=new B.b,this.onDidChangeReferenceRange=this._onDidChangeReferenceRange.event,this._links=w,this._title=b;const[u]=w;w.sort(r._compareReferences);let c;for(let p of w)if((!c||!j.e.isEqual(c.uri,p.uri,!0))&&(c=new L(this,p.uri),this.groups.push(c)),c.children.length===0||r._compareReferences(p,c.children[c.children.length-1])!==0){const S=new d(u===p,c,p,E=>this._onDidChangeReferenceRange.fire(E));this.references.push(S),c.children.push(S)}}dispose(){Object(R.f)(this.groups),this._onDidChangeReferenceRange.dispose(),this.groups.length=0}clone(){return new r(this._links,this._title)}get title(){return this._title}get isEmpty(){return this.groups.length===0}get ariaMessage(){return this.isEmpty?Object(C.a)("aria.result.0","No results found"):this.references.length===1?Object(C.a)("aria.result.1","Found 1 symbol in {0}",this.references[0].uri.fsPath):this.groups.length===1?Object(C.a)("aria.result.n1","Found {0} symbols in {1}",this.references.length,this.groups[0].uri.fsPath):Object(C.a)("aria.result.nm","Found {0} symbols in {1} files",this.references.length,this.groups.length)}nextOrPreviousReference(w,b){let{parent:u}=w,c=u.children.indexOf(w),p=u.children.length,S=u.parent.groups.length;return S===1||b&&c+1<p||!b&&c>0?(b?c=(c+1)%p:c=(c+p-1)%p,u.children[c]):(c=u.parent.groups.indexOf(u),b?(c=(c+1)%S,u.parent.groups[c].children[0]):(c=(c+S-1)%S,u.parent.groups[c].children[u.parent.groups[c].children.length-1]))}nearestReference(w,b){const u=this.references.map((c,p)=>({idx:p,prefixLen:I.d(c.uri.toString(),w.toString()),offsetDist:Math.abs(c.range.startLineNumber-b.lineNumber)*100+Math.abs(c.range.startColumn-b.column)})).sort((c,p)=>c.prefixLen>p.prefixLen?-1:c.prefixLen<p.prefixLen?1:c.offsetDist<p.offsetDist?-1:c.offsetDist>p.offsetDist?1:0)[0];return u?this.references[u.idx]:void 0}referenceAt(w,b){for(const u of this.references)if(u.uri.toString()===w.toString()&&v.a.containsPosition(u.range,b))return u;return}firstReference(){for(const w of this.references)if(w.isProviderFirst)return w;return this.references[0]}static _compareReferences(w,b){return j.e.compare(w.uri,b.uri)||v.a.compareRangesUsingStarts(w.range,b.range)}}},"A+jI":function(mt,M,t){"use strict";t.d(M,"a",function(){return d}),t.d(M,"c",function(){return D}),t.d(M,"b",function(){return r});var g=t("MI8n"),B=t("pmY6"),x=t("746U"),R=t("X+cX"),A=function(w,b,u,c){function p(S){return S instanceof u?S:new u(function(E){E(S)})}return new(u||(u=Promise))(function(S,E){function y(Q){try{k(c.next(Q))}catch(q){E(q)}}function O(Q){try{k(c.throw(Q))}catch(q){E(q)}}function k(Q){Q.done?S(Q.value):p(Q.value).then(y,O)}k((c=c.apply(w,b||[])).next())})},j;(function(w){w[w.None=0]="None",w[w.Initialized=1]="Initialized",w[w.Closed=2]="Closed"})(j||(j={}));class I extends B.a{constructor(w,b=Object.create(null)){super();this.database=w,this.options=b,this._onDidChangeStorage=this._register(new g.b),this.onDidChangeStorage=this._onDidChangeStorage.event,this.state=j.None,this.cache=new Map,this.flushDelayer=new R.f(I.DEFAULT_FLUSH_DELAY),this.pendingDeletes=new Set,this.pendingInserts=new Map,this.whenFlushedCallbacks=[],this.registerListeners()}registerListeners(){this._register(this.database.onDidChangeItemsExternal(w=>this.onDidChangeItemsExternal(w)))}onDidChangeItemsExternal(w){var b,u;(b=w.changed)===null||b===void 0||b.forEach((c,p)=>this.accept(p,c)),(u=w.deleted)===null||u===void 0||u.forEach(c=>this.accept(c,void 0))}accept(w,b){if(this.state===j.Closed)return;let u=!1;if(Object(x.n)(b))u=this.cache.delete(w);else{const c=this.cache.get(w);c!==b&&(this.cache.set(w,b),u=!0)}u&&this._onDidChangeStorage.fire(w)}get(w,b){const u=this.cache.get(w);return Object(x.n)(u)?b:u}getBoolean(w,b){const u=this.get(w);return Object(x.n)(u)?b:u==="true"}getNumber(w,b){const u=this.get(w);return Object(x.n)(u)?b:parseInt(u,10)}set(w,b){return A(this,void 0,void 0,function*(){if(this.state===j.Closed)return;if(Object(x.n)(b))return this.delete(w);const u=String(b),c=this.cache.get(w);return c===u?void 0:(this.cache.set(w,u),this.pendingInserts.set(w,u),this.pendingDeletes.delete(w),this._onDidChangeStorage.fire(w),this.flushDelayer.trigger(()=>this.flushPending()))})}delete(w){return A(this,void 0,void 0,function*(){if(this.state===j.Closed)return;const b=this.cache.delete(w);return b?(this.pendingDeletes.has(w)||this.pendingDeletes.add(w),this.pendingInserts.delete(w),this._onDidChangeStorage.fire(w),this.flushDelayer.trigger(()=>this.flushPending())):void 0})}get hasPending(){return this.pendingInserts.size>0||this.pendingDeletes.size>0}flushPending(){return A(this,void 0,void 0,function*(){if(!this.hasPending)return;const w={insert:this.pendingInserts,delete:this.pendingDeletes};return this.pendingDeletes=new Set,this.pendingInserts=new Map,this.database.updateItems(w).finally(()=>{var b;if(!this.hasPending)for(;this.whenFlushedCallbacks.length;)(b=this.whenFlushedCallbacks.pop())===null||b===void 0||b()})})}dispose(){this.flushDelayer.dispose(),super.dispose()}}I.DEFAULT_FLUSH_DELAY=100;class v{constructor(){this.onDidChangeItemsExternal=g.c.None,this.items=new Map}updateItems(w){return A(this,void 0,void 0,function*(){w.insert&&w.insert.forEach((b,u)=>this.items.set(u,b)),w.delete&&w.delete.forEach(b=>this.items.delete(b))})}}var C=t("Cg/j");const m="__$__targetStorageMarker",d=Object(C.c)("storageService");var D;(function(w){w[w.NONE=0]="NONE",w[w.SHUTDOWN=1]="SHUTDOWN"})(D||(D={}));class L extends B.a{constructor(w={flushInterval:L.DEFAULT_FLUSH_INTERVAL}){super();this.options=w,this._onDidChangeValue=this._register(new g.e),this._onDidChangeTarget=this._register(new g.e),this._onWillSaveState=this._register(new g.b),this.onWillSaveState=this._onWillSaveState.event,this._workspaceKeyTargets=void 0,this._globalKeyTargets=void 0}emitDidChangeValue(w,b){b===m?(w===0?this._globalKeyTargets=void 0:w===1&&(this._workspaceKeyTargets=void 0),this._onDidChangeTarget.fire({scope:w})):this._onDidChangeValue.fire({scope:w,key:b,target:this.getKeyTargets(w)[b]})}get(w,b,u){var c;return(c=this.getStorage(b))===null||c===void 0?void 0:c.get(w,u)}getBoolean(w,b,u){var c;return(c=this.getStorage(b))===null||c===void 0?void 0:c.getBoolean(w,u)}getNumber(w,b,u){var c;return(c=this.getStorage(b))===null||c===void 0?void 0:c.getNumber(w,u)}store(w,b,u,c){if(Object(x.n)(b)){this.remove(w,u);return}this.withPausedEmitters(()=>{var p;this.updateKeyTarget(w,u,c),(p=this.getStorage(u))===null||p===void 0||p.set(w,b)})}remove(w,b){this.withPausedEmitters(()=>{var u;this.updateKeyTarget(w,b,void 0),(u=this.getStorage(b))===null||u===void 0||u.delete(w)})}withPausedEmitters(w){this._onDidChangeValue.pause(),this._onDidChangeTarget.pause();try{w()}finally{this._onDidChangeValue.resume(),this._onDidChangeTarget.resume()}}updateKeyTarget(w,b,u){var c,p;const S=this.getKeyTargets(b);typeof u=="number"?S[w]!==u&&(S[w]=u,(c=this.getStorage(b))===null||c===void 0||c.set(m,JSON.stringify(S))):typeof S[w]=="number"&&(delete S[w],(p=this.getStorage(b))===null||p===void 0||p.set(m,JSON.stringify(S)))}get workspaceKeyTargets(){return this._workspaceKeyTargets||(this._workspaceKeyTargets=this.loadKeyTargets(1)),this._workspaceKeyTargets}get globalKeyTargets(){return this._globalKeyTargets||(this._globalKeyTargets=this.loadKeyTargets(0)),this._globalKeyTargets}getKeyTargets(w){return w===0?this.globalKeyTargets:this.workspaceKeyTargets}loadKeyTargets(w){const b=this.get(m,w);if(b)try{return JSON.parse(b)}catch(u){}return Object.create(null)}}L.DEFAULT_FLUSH_INTERVAL=60*1e3;class r extends L{constructor(){super();this.globalStorage=this._register(new I(new v)),this.workspaceStorage=this._register(new I(new v)),this._register(this.workspaceStorage.onDidChangeStorage(w=>this.emitDidChangeValue(1,w))),this._register(this.globalStorage.onDidChangeStorage(w=>this.emitDidChangeValue(0,w)))}getStorage(w){return w===0?this.globalStorage:this.workspaceStorage}}},"A9l+":function(mt,M,t){"use strict";t.d(M,"a",function(){return B}),t.d(M,"c",function(){return x}),t.d(M,"b",function(){return R}),t.d(M,"d",function(){return j}),t.d(M,"e",function(){return I}),t.d(M,"g",function(){return v}),t.d(M,"h",function(){return C}),t.d(M,"f",function(){return m});var g=t("3/fG"),B;(function(d){d.noSelection=g.a("noSelection","No selection"),d.singleSelectionRange=g.a("singleSelectionRange","Line {0}, Column {1} ({2} selected)"),d.singleSelection=g.a("singleSelection","Line {0}, Column {1}"),d.multiSelectionRange=g.a("multiSelectionRange","{0} selections ({1} characters selected)"),d.multiSelection=g.a("multiSelection","{0} selections"),d.emergencyConfOn=g.a("emergencyConfOn","Now changing the setting `accessibilitySupport` to 'on'."),d.openingDocs=g.a("openingDocs","Now opening the Editor Accessibility documentation page."),d.readonlyDiffEditor=g.a("readonlyDiffEditor"," in a read-only pane of a diff editor."),d.editableDiffEditor=g.a("editableDiffEditor"," in a pane of a diff editor."),d.readonlyEditor=g.a("readonlyEditor"," in a read-only code editor"),d.editableEditor=g.a("editableEditor"," in a code editor"),d.changeConfigToOnMac=g.a("changeConfigToOnMac","To configure the editor to be optimized for usage with a Screen Reader press Command+E now."),d.changeConfigToOnWinLinux=g.a("changeConfigToOnWinLinux","To configure the editor to be optimized for usage with a Screen Reader press Control+E now."),d.auto_on=g.a("auto_on","The editor is configured to be optimized for usage with a Screen Reader."),d.auto_off=g.a("auto_off","The editor is configured to never be optimized for usage with a Screen Reader, which is not the case at this time."),d.tabFocusModeOnMsg=g.a("tabFocusModeOnMsg","Pressing Tab in the current editor will move focus to the next focusable element. Toggle this behavior by pressing {0}."),d.tabFocusModeOnMsgNoKb=g.a("tabFocusModeOnMsgNoKb","Pressing Tab in the current editor will move focus to the next focusable element. The command {0} is currently not triggerable by a keybinding."),d.tabFocusModeOffMsg=g.a("tabFocusModeOffMsg","Pressing Tab in the current editor will insert the tab character. Toggle this behavior by pressing {0}."),d.tabFocusModeOffMsgNoKb=g.a("tabFocusModeOffMsgNoKb","Pressing Tab in the current editor will insert the tab character. The command {0} is currently not triggerable by a keybinding."),d.openDocMac=g.a("openDocMac","Press Command+H now to open a browser window with more information related to editor accessibility."),d.openDocWinLinux=g.a("openDocWinLinux","Press Control+H now to open a browser window with more information related to editor accessibility."),d.outroMsg=g.a("outroMsg","You can dismiss this tooltip and return to the editor by pressing Escape or Shift+Escape."),d.showAccessibilityHelpAction=g.a("showAccessibilityHelpAction","Show Accessibility Help")})(B||(B={}));var x;(function(d){d.inspectTokensAction=g.a("inspectTokens","Developer: Inspect Tokens")})(x||(x={}));var R;(function(d){d.gotoLineActionLabel=g.a("gotoLineActionLabel","Go to Line/Column...")})(R||(R={}));var A;(function(d){d.helpQuickAccessActionLabel=g.a("helpQuickAccess","Show all Quick Access Providers")})(A||(A={}));var j;(function(d){d.quickCommandActionLabel=g.a("quickCommandActionLabel","Command Palette"),d.quickCommandHelp=g.a("quickCommandActionHelp","Show And Run Commands")})(j||(j={}));var I;(function(d){d.quickOutlineActionLabel=g.a("quickOutlineActionLabel","Go to Symbol..."),d.quickOutlineByCategoryActionLabel=g.a("quickOutlineByCategoryActionLabel","Go to Symbol by Category...")})(I||(I={}));var v;(function(d){d.editorViewAccessibleLabel=g.a("editorViewAccessibleLabel","Editor content"),d.accessibilityHelpMessage=g.a("accessibilityHelpMessage","Press Alt+F1 for Accessibility Options.")})(v||(v={}));var C;(function(d){d.toggleHighContrast=g.a("toggleHighContrast","Toggle High Contrast Theme")})(C||(C={}));var m;(function(d){d.bulkEditServiceSummary=g.a("bulkEditServiceSummary","Made {0} edits in {1} files")})(m||(m={}))},AKMP:function(mt,M,t){"use strict";t.d(M,"b",function(){return j}),t.d(M,"a",function(){return I});var g=t("EffR"),B=t("51f4"),x=t("XSiN"),R=t("pmY6"),A=t("MNsG");function j(v,C){let m=new x.a(C);return m.preventDefault(),{leftButton:m.leftButton,buttons:m.buttons,posx:m.posx,posy:m.posy}}class I{constructor(){this._hooks=new R.b,this._mouseMoveEventMerger=null,this._mouseMoveCallback=null,this._onStopCallback=null}dispose(){this.stopMonitoring(!1),this._hooks.dispose()}stopMonitoring(v,C){if(!this.isMonitoring())return;this._hooks.clear(),this._mouseMoveEventMerger=null,this._mouseMoveCallback=null;const m=this._onStopCallback;this._onStopCallback=null,v&&m&&m(C)}isMonitoring(){return!!this._mouseMoveEventMerger}startMonitoring(v,C,m,d,D){if(this.isMonitoring())return;this._mouseMoveEventMerger=m,this._mouseMoveCallback=d,this._onStopCallback=D;const L=B.a.getSameOriginWindowChain(),r=A.c?"pointermove":"mousemove",w="mouseup",b=L.map(c=>c.window.document),u=g.F(v);u&&b.unshift(u);for(const c of b)this._hooks.add(g.l(c,r,p=>{if(p.buttons!==C){this.stopMonitoring(!0);return}this._mouseMoveCallback(p)},(p,S)=>this._mouseMoveEventMerger(p,S))),this._hooks.add(g.i(c,w,p=>this.stopMonitoring(!0)));if(B.a.hasDifferentOriginAncestor()){let c=L[L.length-1];this._hooks.add(g.i(c.window.document,"mouseout",p=>{let S=new x.a(p);S.target.tagName.toLowerCase()==="html"&&this.stopMonitoring(!0)})),this._hooks.add(g.i(c.window.document,"mouseover",p=>{let S=new x.a(p);S.target.tagName.toLowerCase()==="html"&&this.stopMonitoring(!0)})),this._hooks.add(g.i(c.window.document.body,"mouseleave",p=>{this.stopMonitoring(!0)}))}}}},AbCa:function(mt,M,t){},ApJL:function(mt,M,t){"use strict";t.r(M);var g=t("+hIS");Object(g.a)({id:"clojure",extensions:[".clj",".cljs",".cljc",".edn"],aliases:["clojure","Clojure"],loader:function(){return t.e(326).then(t.bind(null,"AoeA"))}})},Apug:function(mt,M,t){"use strict";t.d(M,"a",function(){return B});var g=t("N0LK");class B{static visibleColumnFromColumn(x,R,A){const j=x.length,I=R-1<j?R-1:j;let v=0,C=0;for(;C<I;){const m=g.z(x,I,C);if(C+=m>=65536?2:1,m===9)v=B.nextRenderTabStop(v,A);else{let d=g.w(m);for(;C<I;){const D=g.z(x,I,C),L=g.w(D);if(g.c(d,L))break;C+=D>=65536?2:1,d=L}g.D(m)||g.B(m)?v=v+2:v=v+1}}return v}static visibleColumnsByColumns(x,R){const A=x.length;let j=new Array;j.push(-1);let I=0,v=0;for(;v<A;){const C=g.z(x,A,v);if(v+=C>=65536?2:1,j.push(I),C>=65536&&j.push(I),C===9)I=B.nextRenderTabStop(I,R);else{let m=g.w(C);for(;v<A;){const d=g.z(x,A,v),D=g.w(d);if(g.c(m,D))break;v+=d>=65536?2:1,j.push(I),C>=65536&&j.push(I),m=D}g.D(C)||g.B(C)?I=I+2:I=I+1}}return j.push(I),j}static visibleColumnFromColumn2(x,R,A){return this.visibleColumnFromColumn(R.getLineContent(A.lineNumber),A.column,x.tabSize)}static columnFromVisibleColumn(x,R,A){if(R<=0)return 1;const j=x.length;let I=0,v=1,C=0;for(;C<j;){const m=g.z(x,j,C);C+=m>=65536?2:1;let d;if(m===9)d=B.nextRenderTabStop(I,A);else{let L=g.w(m);for(;C<j;){const r=g.z(x,j,C),w=g.w(r);if(g.c(L,w))break;C+=r>=65536?2:1,L=w}g.D(m)||g.B(m)?d=I+2:d=I+1}const D=C+1;if(d>=R){const L=R-I,r=d-R;return r<L?D:v}I=d,v=D}return j+1}static columnFromVisibleColumn2(x,R,A,j){let I=this.columnFromVisibleColumn(R.getLineContent(A),j,x.tabSize),v=R.getLineMinColumn(A);if(I<v)return v;let C=R.getLineMaxColumn(A);return I>C?C:I}static nextRenderTabStop(x,R){return x+R-x%R}static nextIndentTabStop(x,R){return x+R-x%R}static prevRenderTabStop(x,R){return Math.max(0,x-1-(x-1)%R)}static prevIndentTabStop(x,R){return Math.max(0,x-1-(x-1)%R)}}},BEdG:function(mt,M,t){"use strict";t.r(M);var g=t("+hIS");Object(g.a)({id:"xml",extensions:[".xml",".dtd",".ascx",".csproj",".config",".wxi",".wxl",".wxs",".xaml",".svg",".svgz",".opf",".xsl"],firstLine:"(\\<\\?xml.*)|(\\<svg)|(\\<\\!doctype\\s+svg)",aliases:["XML","xml"],mimetypes:["text/xml","application/xml","application/xaml+xml","application/xml-dtd"],loader:function(){return t.e(377).then(t.bind(null,"aH2L"))}})},BFtn:function(mt,M,t){"use strict";t.d(M,"a",function(){return g}),t.d(M,"b",function(){return x});function g(R,A){let j=R.getCount(),I=R.findTokenIndexAtOffset(A),v=R.getLanguageId(I),C=I;for(;C+1<j&&R.getLanguageId(C+1)===v;)C++;let m=I;for(;m>0&&R.getLanguageId(m-1)===v;)m--;return new B(R,v,m,C+1,R.getStartOffset(m),R.getEndOffset(C))}class B{constructor(R,A,j,I,v,C){this._scopedLineTokensBrand=void 0,this._actual=R,this.languageId=A,this._firstTokenIndex=j,this._lastTokenIndex=I,this.firstCharOffset=v,this._lastCharOffset=C}getLineContent(){const R=this._actual.getLineContent();return R.substring(this.firstCharOffset,this._lastCharOffset)}getActualLineContentBefore(R){const A=this._actual.getLineContent();return A.substring(0,this.firstCharOffset+R)}getTokenCount(){return this._lastTokenIndex-this._firstTokenIndex}findTokenIndexAtOffset(R){return this._actual.findTokenIndexAtOffset(R+this.firstCharOffset)-this._firstTokenIndex}getStandardTokenType(R){return this._actual.getStandardTokenType(R+this._firstTokenIndex)}}function x(R){return(R&7)!==0}},BUKB:function(mt,M,t){"use strict";t.r(M);var g=t("+hIS");Object(g.a)({id:"tcl",extensions:[".tcl"],aliases:["tcl","Tcl","tcltk","TclTk","tcl/tk","Tcl/Tk"],loader:function(){return t.e(373).then(t.bind(null,"xT+r"))}})},BjKj:function(mt,M,t){},"C1Q+":function(mt,M,t){"use strict";t.d(M,"f",function(){return Ve}),t.d(M,"e",function(){return Rt}),t.d(M,"b",function(){return vo}),t.d(M,"g",function(){return Mo}),t.d(M,"h",function(){return xo}),t.d(M,"d",function(){return Do}),t.d(M,"c",function(){return Lo}),t.d(M,"a",function(){return To});var g=t("JQT/");class B{constructor(Vt){this.executor=Vt,this._didRun=!1}getValue(){if(!this._didRun)try{this._value=this.executor()}catch(Vt){this._error=Vt}finally{this._didRun=!0}if(this._error)throw this._error;return this._value}get rawValue(){return this._value}}var x=t("pmY6"),R=t("N0LK"),A=t("sswD"),j=t("x/UI"),I=t("wQH0"),v=t("hJVp"),C=t("/cxE"),m=t("NR8r"),d=t("Cg/j"),D=t("EffR"),L=t("8HAY"),r=t("cGHE"),w=t("twdY"),b=t("nlbu"),u=t("Uzvx"),c=t("bexQ"),p=function(Vt,xt,ze,ct){var Ut=arguments.length,Qe=Ut<3?xt:ct===null?ct=Object.getOwnPropertyDescriptor(xt,ze):ct,tt;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")Qe=Reflect.decorate(Vt,xt,ze,ct);else for(var ut=Vt.length-1;ut>=0;ut--)(tt=Vt[ut])&&(Qe=(Ut<3?tt(Qe):Ut>3?tt(xt,ze,Qe):tt(xt,ze))||Qe);return Ut>3&&Qe&&Object.defineProperty(xt,ze,Qe),Qe},S=function(Vt,xt){return function(ze,ct){xt(ze,ct,Vt)}},E=function(Vt,xt,ze,ct){function Ut(Qe){return Qe instanceof ze?Qe:new ze(function(tt){tt(Qe)})}return new(ze||(ze=Promise))(function(Qe,tt){function ut(Wt){try{Pt(ct.next(Wt))}catch(zt){tt(zt)}}function Dt(Wt){try{Pt(ct.throw(Wt))}catch(zt){tt(zt)}}function Pt(Wt){Wt.done?Qe(Wt.value):Ut(Wt.value).then(ut,Dt)}Pt((ct=ct.apply(Vt,xt||[])).next())})};class y extends L.a{constructor(Vt,xt){super(Vt.command?Vt.command.id:Vt.title,O(Vt.title),void 0,!Vt.disabled,xt);this.action=Vt}}function O(Vt){return Vt.replace(/\r\n|\r|\n/g," ")}let k=class extends x.a{constructor(xt,ze,ct,Ut){super();this._editor=xt,this._delegate=ze,this._contextMenuService=ct,this._visible=!1,this._showingActions=this._register(new x.d),this._keybindingResolver=new Q({getKeybindings:()=>Ut.getKeybindings()})}get isVisible(){return this._visible}show(xt,ze,ct,Ut){return E(this,void 0,void 0,function*(){const Qe=Ut.includeDisabledActions?ze.allActions:ze.validActions;if(!Qe.length){this._visible=!1;return}if(!this._editor.getDomNode())throw this._visible=!1,Object(C.b)();this._visible=!0,this._showingActions.value=ze;const tt=this.getMenuActions(xt,Qe,ze.documentation),ut=r.a.isIPosition(ct)?this._toCoords(ct):ct||{x:0,y:0},Dt=this._keybindingResolver.getResolver(),Pt=this._editor.getOption(113);this._contextMenuService.showContextMenu({domForShadowRoot:Pt?this._editor.getDomNode():void 0,getAnchor:()=>ut,getActions:()=>tt,onHide:()=>{this._visible=!1,this._editor.focus()},autoSelectFirstItem:!0,getKeyBinding:Wt=>Wt instanceof y?Dt(Wt.action):void 0})})}getMenuActions(xt,ze,ct){var Ut,Qe;const tt=Wt=>new y(Wt.action,()=>this._delegate.onSelectCodeAction(Wt)),ut=ze.map(tt),Dt=[...ct],Pt=this._editor.getModel();if(Pt&&ut.length)for(const Wt of w.a.all(Pt))Wt._getAdditionalMenuItems&&Dt.push(...Wt._getAdditionalMenuItems({trigger:xt.type,only:(Qe=(Ut=xt.filter)===null||Ut===void 0?void 0:Ut.include)===null||Qe===void 0?void 0:Qe.value},ze.map(zt=>zt.action)));return Dt.length&&ut.push(new L.d,...Dt.map(Wt=>tt(new v.a({title:Wt.title,command:Wt},void 0)))),ut}_toCoords(xt){if(!this._editor.hasModel())return{x:0,y:0};this._editor.revealPosition(xt,1),this._editor.render();const ze=this._editor.getScrolledVisiblePosition(xt),ct=Object(D.D)(this._editor.getDomNode()),Ut=ct.left+ze.left,Qe=ct.top+ze.top+ze.height;return{x:Ut,y:Qe}}};k=p([S(2,u.a),S(3,c.a)],k);class Q{constructor(Vt){this._keybindingProvider=Vt}getResolver(){const Vt=new B(()=>this._keybindingProvider.getKeybindings().filter(xt=>Q.codeActionCommands.indexOf(xt.command)>=0).filter(xt=>xt.resolvedKeybinding).map(xt=>{let ze=xt.commandArgs;return xt.command===v.e?ze={kind:b.b.SourceOrganizeImports.value}:xt.command===v.c&&(ze={kind:b.b.SourceFixAll.value}),Object.assign({resolvedKeybinding:xt.resolvedKeybinding},b.a.fromUser(ze,{kind:b.b.None,apply:"never"}))}));return xt=>{if(xt.kind){const ze=this.bestKeybindingForCodeAction(xt,Vt.getValue());return ze==null?void 0:ze.resolvedKeybinding}return}}bestKeybindingForCodeAction(Vt,xt){if(!Vt.kind)return;const ze=new b.b(Vt.kind);return xt.filter(ct=>ct.kind.contains(ze)).filter(ct=>ct.preferred?Vt.isPreferred:!0).reduceRight((ct,Ut)=>ct?ct.kind.contains(Ut.kind)?Ut:ct:Ut,void 0)}}Q.codeActionCommands=[v.f,v.b,v.g,v.e,v.c];var q=t("AKMP"),z=t("pg8w"),J=t("Vhoy"),re=t("MI8n"),Z=t("MNXI"),ne=t("tX9W"),le=t("3/fG"),_e=t("MD5Z"),Ce=t("t9D7"),oe=function(Vt,xt,ze,ct){var Ut=arguments.length,Qe=Ut<3?xt:ct===null?ct=Object.getOwnPropertyDescriptor(xt,ze):ct,tt;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")Qe=Reflect.decorate(Vt,xt,ze,ct);else for(var ut=Vt.length-1;ut>=0;ut--)(tt=Vt[ut])&&(Qe=(Ut<3?tt(Qe):Ut>3?tt(xt,ze,Qe):tt(xt,ze))||Qe);return Ut>3&&Qe&&Object.defineProperty(xt,ze,Qe),Qe},ae=function(Vt,xt){return function(ze,ct){xt(ze,ct,Vt)}},V;(function(Vt){Vt.Hidden={type:0};class xt{constructor(ze,ct,Ut,Qe){this.actions=ze,this.trigger=ct,this.editorPosition=Ut,this.widgetPosition=Qe,this.type=1}}Vt.Showing=xt})(V||(V={}));let G=class Vt extends x.a{constructor(xt,ze,ct,Ut){super();this._editor=xt,this._quickFixActionId=ze,this._preferredFixActionId=ct,this._keybindingService=Ut,this._onClick=this._register(new re.b),this.onClick=this._onClick.event,this._state=V.Hidden,this._domNode=document.createElement("div"),this._domNode.className=J.b.lightBulb.classNames,this._editor.addContentWidget(this),this._register(this._editor.onDidChangeModelContent(Qe=>{const tt=this._editor.getModel();(this.state.type!==1||!tt||this.state.editorPosition.lineNumber>=tt.getLineCount())&&this.hide()})),z.b.ignoreTarget(this._domNode),this._register(D.n(this._domNode,Qe=>{if(this.state.type!==1)return;this._editor.focus(),Qe.preventDefault();const{top:tt,height:ut}=D.D(this._domNode),Dt=this._editor.getOption(58);let Pt=Math.floor(Dt/3);this.state.widgetPosition.position!==null&&this.state.widgetPosition.position.lineNumber<this.state.editorPosition.lineNumber&&(Pt+=Dt),this._onClick.fire({x:Qe.posx,y:tt+ut+Pt,actions:this.state.actions,trigger:this.state.trigger})})),this._register(D.i(this._domNode,"mouseenter",Qe=>{if((Qe.buttons&1)!==1)return;this.hide();const tt=new q.a;tt.startMonitoring(Qe.target,Qe.buttons,q.b,()=>{},()=>{tt.dispose()})})),this._register(this._editor.onDidChangeConfiguration(Qe=>{Qe.hasChanged(56)&&!this._editor.getOption(56).enabled&&this.hide()})),this._updateLightBulbTitleAndIcon(),this._register(this._keybindingService.onDidUpdateKeybindings(this._updateLightBulbTitleAndIcon,this))}dispose(){super.dispose(),this._editor.removeContentWidget(this)}getId(){return"LightBulbWidget"}getDomNode(){return this._domNode}getPosition(){return this._state.type===1?this._state.widgetPosition:null}update(xt,ze,ct){if(xt.validActions.length<=0)return this.hide();const Ut=this._editor.getOptions();if(!Ut.get(56).enabled)return this.hide();const Qe=this._editor.getModel();if(!Qe)return this.hide();const{lineNumber:tt,column:ut}=Qe.validatePosition(ct),Dt=Qe.getOptions().tabSize,Pt=Ut.get(43),Wt=Qe.getLineContent(tt),zt=ne.c.computeIndentLevel(Wt,Dt),so=Pt.spaceWidth*zt>22,wo=di=>di>2&&this._editor.getTopForLineNumber(di)===this._editor.getTopForLineNumber(di-1);let No=tt;if(!so){if(tt>1&&!wo(tt-1))No-=1;else if(!wo(tt+1))No+=1;else if(ut*Pt.spaceWidth<22)return this.hide()}this.state=new V.Showing(xt,ze,ct,{position:{lineNumber:No,column:1},preference:Vt._posPref}),this._editor.layoutContentWidget(this)}hide(){this.state=V.Hidden,this._editor.layoutContentWidget(this)}get state(){return this._state}set state(xt){this._state=xt,this._updateLightBulbTitleAndIcon()}_updateLightBulbTitleAndIcon(){if(this.state.type===1&&this.state.actions.hasAutoFix){this._domNode.classList.remove(...J.b.lightBulb.classNamesArray),this._domNode.classList.add(...J.b.lightbulbAutofix.classNamesArray);const ze=this._keybindingService.lookupKeybinding(this._preferredFixActionId);if(ze){this.title=le.a("preferredcodeActionWithKb","Show Code Actions. Preferred Quick Fix Available ({0})",ze.getLabel());return}}this._domNode.classList.remove(...J.b.lightbulbAutofix.classNamesArray),this._domNode.classList.add(...J.b.lightBulb.classNamesArray);const xt=this._keybindingService.lookupKeybinding(this._quickFixActionId);xt?this.title=le.a("codeActionWithKb","Show Code Actions ({0})",xt.getLabel()):this.title=le.a("codeAction","Show Code Actions")}set title(xt){this._domNode.title=xt}};G._posPref=[0],G=oe([ae(3,c.a)],G),Object(Ce.f)((Vt,xt)=>{var ze;const ct=(ze=Vt.getColor(_e.r))===null||ze===void 0?void 0:ze.transparent(.7),Ut=Vt.getColor(_e.O);Ut&&xt.addRule(`
|
|
|
.monaco-editor .contentWidgets ${J.b.lightBulb.cssSelector} {
|
|
|
color: ${Ut};
|
|
|
background-color: ${ct};
|
|
|
}`);const Qe=Vt.getColor(_e.N);Qe&&xt.addRule(`
|
|
|
.monaco-editor .contentWidgets ${J.b.lightbulbAutofix.cssSelector} {
|
|
|
color: ${Qe};
|
|
|
background-color: ${ct};
|
|
|
}`)});var ee=function(Vt,xt,ze,ct){var Ut=arguments.length,Qe=Ut<3?xt:ct===null?ct=Object.getOwnPropertyDescriptor(xt,ze):ct,tt;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")Qe=Reflect.decorate(Vt,xt,ze,ct);else for(var ut=Vt.length-1;ut>=0;ut--)(tt=Vt[ut])&&(Qe=(Ut<3?tt(Qe):Ut>3?tt(xt,ze,Qe):tt(xt,ze))||Qe);return Ut>3&&Qe&&Object.defineProperty(xt,ze,Qe),Qe},pe=function(Vt,xt){return function(ze,ct){xt(ze,ct,Vt)}},Te=function(Vt,xt,ze,ct){function Ut(Qe){return Qe instanceof ze?Qe:new ze(function(tt){tt(Qe)})}return new(ze||(ze=Promise))(function(Qe,tt){function ut(Wt){try{Pt(ct.next(Wt))}catch(zt){tt(zt)}}function Dt(Wt){try{Pt(ct.throw(Wt))}catch(zt){tt(zt)}}function Pt(Wt){Wt.done?Qe(Wt.value):Ut(Wt.value).then(ut,Dt)}Pt((ct=ct.apply(Vt,xt||[])).next())})},Ie=function(Vt,xt,ze,ct,Ut){if(ct==="m")throw new TypeError("Private method is not writable");if(ct==="a"&&!Ut)throw new TypeError("Private accessor was defined without a setter");if(typeof xt=="function"?Vt!==xt||!Ut:!xt.has(Vt))throw new TypeError("Cannot write private member to an object whose class did not declare it");return ct==="a"?Ut.call(Vt,ze):Ut?Ut.value=ze:xt.set(Vt,ze),ze},Me=function(Vt,xt,ze,ct){if(ze==="a"&&!ct)throw new TypeError("Private accessor was defined without a getter");if(typeof xt=="function"?Vt!==xt||!ct:!xt.has(Vt))throw new TypeError("Cannot read private member from an object whose class did not declare it");return ze==="m"?ct:ze==="a"?ct.call(Vt):ct?ct.value:xt.get(Vt)},Oe;let Xe=class extends x.a{constructor(xt,ze,ct,Ut,Qe){super();this._editor=xt,this.delegate=Ut,this._activeCodeActions=this._register(new x.d),Oe.set(this,!1),this._codeActionWidget=new B(()=>this._register(Qe.createInstance(k,this._editor,{onSelectCodeAction:tt=>Te(this,void 0,void 0,function*(){this.delegate.applyCodeAction(tt,!0)})}))),this._lightBulbWidget=new B(()=>{const tt=this._register(Qe.createInstance(G,this._editor,ze,ct));return this._register(tt.onClick(ut=>this.showCodeActionList(ut.trigger,ut.actions,ut,{includeDisabledActions:!1}))),tt})}dispose(){Ie(this,Oe,!0,"f"),super.dispose()}update(xt){var ze,ct,Ut;return Te(this,void 0,void 0,function*(){if(xt.type!==1){(ze=this._lightBulbWidget.rawValue)===null||ze===void 0||ze.hide();return}let Qe;try{Qe=yield xt.actions}catch(tt){Object(C.f)(tt);return}if(Me(this,Oe,"f"))return;if(this._lightBulbWidget.getValue().update(Qe,xt.trigger,xt.position),xt.trigger.type===1){if((ct=xt.trigger.filter)===null||ct===void 0?void 0:ct.include){const ut=this.tryGetValidActionToApply(xt.trigger,Qe);if(ut){try{this._lightBulbWidget.getValue().hide(),yield this.delegate.applyCodeAction(ut,!1)}finally{Qe.dispose()}return}if(xt.trigger.context){const Dt=this.getInvalidActionThatWouldHaveBeenApplied(xt.trigger,Qe);if(Dt&&Dt.action.disabled){m.a.get(this._editor).showMessage(Dt.action.disabled,xt.trigger.context.position),Qe.dispose();return}}}const tt=!!((Ut=xt.trigger.filter)===null||Ut===void 0?void 0:Ut.include);if(xt.trigger.context&&(!Qe.allActions.length||!tt&&!Qe.validActions.length)){m.a.get(this._editor).showMessage(xt.trigger.context.notAvailableMessage,xt.trigger.context.position),this._activeCodeActions.value=Qe,Qe.dispose();return}this._activeCodeActions.value=Qe,this._codeActionWidget.getValue().show(xt.trigger,Qe,xt.position,{includeDisabledActions:tt})}else this._codeActionWidget.getValue().isVisible?Qe.dispose():this._activeCodeActions.value=Qe})}getInvalidActionThatWouldHaveBeenApplied(xt,ze){return ze.allActions.length&&(xt.autoApply==="first"&&ze.validActions.length===0||xt.autoApply==="ifSingle"&&ze.allActions.length===1)?ze.allActions.find(({action:ct})=>ct.disabled):void 0}tryGetValidActionToApply(xt,ze){return ze.validActions.length&&(xt.autoApply==="first"&&ze.validActions.length>0||xt.autoApply==="ifSingle"&&ze.validActions.length===1)?ze.validActions[0]:void 0}showCodeActionList(xt,ze,ct,Ut){return Te(this,void 0,void 0,function*(){this._codeActionWidget.getValue().show(xt,ze,ct,Ut)})}};Oe=new WeakMap,Xe=ee([pe(4,d.a)],Xe);var fe=t("nnTU"),Pe=t("T8No"),Be=t("tADe"),Se=t("sM1p"),me=t("tTk5"),he=t("XXUj"),Le=t("X+cX"),we=t("gslv"),ve=t("aokT"),ie=function(Vt,xt,ze,ct){if(ze==="a"&&!ct)throw new TypeError("Private accessor was defined without a getter");if(typeof xt=="function"?Vt!==xt||!ct:!xt.has(Vt))throw new TypeError("Cannot read private member from an object whose class did not declare it");return ze==="m"?ct:ze==="a"?ct.call(Vt):ct?ct.value:xt.get(Vt)},W=function(Vt,xt,ze,ct,Ut){if(ct==="m")throw new TypeError("Private method is not writable");if(ct==="a"&&!Ut)throw new TypeError("Private accessor was defined without a setter");if(typeof xt=="function"?Vt!==xt||!Ut:!xt.has(Vt))throw new TypeError("Cannot write private member to an object whose class did not declare it");return ct==="a"?Ut.call(Vt,ze):Ut?Ut.value=ze:xt.set(Vt,ze),ze},U;const se=new Pe.c("supportedCodeAction","");class je extends x.a{constructor(Vt,xt,ze,ct=250){super();this._editor=Vt,this._markerService=xt,this._signalChange=ze,this._delay=ct,this._autoTriggerTimer=this._register(new Le.g),this._register(this._markerService.onMarkerChanged(Ut=>this._onMarkerChanges(Ut))),this._register(this._editor.onDidChangeCursorPosition(()=>this._onCursorChange()))}trigger(Vt){const xt=this._getRangeOfSelectionUnlessWhitespaceEnclosed(Vt);return this._createEventAndSignalChange(Vt,xt)}_onMarkerChanges(Vt){const xt=this._editor.getModel();if(!xt)return;Vt.some(ze=>Object(we.f)(ze,xt.uri))&&this._autoTriggerTimer.cancelAndSet(()=>{this.trigger({type:2})},this._delay)}_onCursorChange(){this._autoTriggerTimer.cancelAndSet(()=>{this.trigger({type:2})},this._delay)}_getRangeOfMarker(Vt){const xt=this._editor.getModel();if(!xt)return;for(const ze of this._markerService.read({resource:xt.uri})){const ct=xt.validateRange(ze);if(ve.a.intersectRanges(ct,Vt))return ve.a.lift(ct)}return}_getRangeOfSelectionUnlessWhitespaceEnclosed(Vt){if(!this._editor.hasModel())return;const xt=this._editor.getModel(),ze=this._editor.getSelection();if(ze.isEmpty()&&Vt.type===2){const{lineNumber:ct,column:Ut}=ze.getPosition(),Qe=xt.getLineContent(ct);if(Qe.length===0)return;if(Ut===1){if(/\s/.test(Qe[0]))return}else if(Ut===xt.getLineMaxColumn(ct)){if(/\s/.test(Qe[Qe.length-1]))return}else if(/\s/.test(Qe[Ut-2])&&/\s/.test(Qe[Ut-1]))return}return ze}_createEventAndSignalChange(Vt,xt){const ze=this._editor.getModel();if(!xt||!ze){this._signalChange(void 0);return}const ct=this._getRangeOfMarker(xt),Ut=ct?ct.getStartPosition():xt.getStartPosition(),Qe={trigger:Vt,selection:xt,position:Ut};return this._signalChange(Qe),Qe}}var Re;(function(Vt){Vt.Empty={type:0};class xt{constructor(ze,ct,Ut,Qe){this.trigger=ze,this.rangeOrSelection=ct,this.position=Ut,this._cancellablePromise=Qe,this.type=1,this.actions=Qe.catch(tt=>{if(Object(C.e)(tt))return We;throw tt})}cancel(){this._cancellablePromise.cancel()}}Vt.Triggered=xt})(Re||(Re={}));const We={allActions:[],validActions:[],dispose:()=>{},documentation:[],hasAutoFix:!1};class dt extends x.a{constructor(Vt,xt,ze,ct){super();this._editor=Vt,this._markerService=xt,this._progressService=ct,this._codeActionOracle=this._register(new x.d),this._state=Re.Empty,this._onDidChangeState=this._register(new re.b),this.onDidChangeState=this._onDidChangeState.event,U.set(this,!1),this._supportedCodeActions=se.bindTo(ze),this._register(this._editor.onDidChangeModel(()=>this._update())),this._register(this._editor.onDidChangeModelLanguage(()=>this._update())),this._register(w.a.onDidChange(()=>this._update())),this._update()}dispose(){if(ie(this,U,"f"))return;W(this,U,!0,"f"),super.dispose(),this.setState(Re.Empty,!0)}_update(){if(ie(this,U,"f"))return;this._codeActionOracle.value=void 0,this.setState(Re.Empty);const Vt=this._editor.getModel();if(Vt&&w.a.has(Vt)&&!this._editor.getOption(80)){const xt=[];for(const ze of w.a.all(Vt))Array.isArray(ze.providedCodeActionKinds)&&xt.push(...ze.providedCodeActionKinds);this._supportedCodeActions.set(xt.join(" ")),this._codeActionOracle.value=new je(this._editor,this._markerService,ze=>{var ct;if(!ze){this.setState(Re.Empty);return}const Ut=Object(Le.h)(Qe=>Object(v.d)(Vt,ze.selection,ze.trigger,me.b.None,Qe));ze.trigger.type===1&&((ct=this._progressService)===null||ct===void 0||ct.showWhile(Ut,250)),this.setState(new Re.Triggered(ze.trigger,ze.selection,ze.position,Ut))},void 0),this._codeActionOracle.value.trigger({type:2})}else this._supportedCodeActions.reset()}trigger(Vt){this._codeActionOracle.value&&this._codeActionOracle.value.trigger(Vt)}setState(Vt,xt){if(Vt===this._state)return;this._state.type===1&&this._state.cancel(),this._state=Vt,!xt&&!ie(this,U,"f")&&this._onDidChangeState.fire(Vt)}}U=new WeakMap;var Lt=function(Vt,xt,ze,ct){var Ut=arguments.length,Qe=Ut<3?xt:ct===null?ct=Object.getOwnPropertyDescriptor(xt,ze):ct,tt;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")Qe=Reflect.decorate(Vt,xt,ze,ct);else for(var ut=Vt.length-1;ut>=0;ut--)(tt=Vt[ut])&&(Qe=(Ut<3?tt(Qe):Ut>3?tt(xt,ze,Qe):tt(xt,ze))||Qe);return Ut>3&&Qe&&Object.defineProperty(xt,ze,Qe),Qe},Ht=function(Vt,xt){return function(ze,ct){xt(ze,ct,Vt)}},$e=function(Vt,xt,ze,ct){function Ut(Qe){return Qe instanceof ze?Qe:new ze(function(tt){tt(Qe)})}return new(ze||(ze=Promise))(function(Qe,tt){function ut(Wt){try{Pt(ct.next(Wt))}catch(zt){tt(zt)}}function Dt(Wt){try{Pt(ct.throw(Wt))}catch(zt){tt(zt)}}function Pt(Wt){Wt.done?Qe(Wt.value):Ut(Wt.value).then(ut,Dt)}Pt((ct=ct.apply(Vt,xt||[])).next())})};function ot(Vt){return Pe.a.regex(se.keys()[0],new RegExp("(\\s|^)"+Object(R.t)(Vt.value)+"\\b"))}const ce={type:"object",defaultSnippets:[{body:{kind:""}}],properties:{kind:{type:"string",description:le.a("args.schema.kind","Kind of the code action to run.")},apply:{type:"string",description:le.a("args.schema.apply","Controls when the returned actions are applied."),default:"ifSingle",enum:["first","ifSingle","never"],enumDescriptions:[le.a("args.schema.apply.first","Always apply the first returned code action."),le.a("args.schema.apply.ifSingle","Apply the first returned code action if it is the only one."),le.a("args.schema.apply.never","Do not apply the returned code actions.")]},preferred:{type:"boolean",default:!1,description:le.a("args.schema.preferred","Controls if only preferred code actions should be returned.")}}};let Ve=class Vt extends x.a{constructor(xt,ze,ct,Ut,Qe){super();this._instantiationService=Qe,this._editor=xt,this._model=this._register(new dt(this._editor,ze,ct,Ut)),this._register(this._model.onDidChangeState(tt=>this.update(tt))),this._ui=new B(()=>this._register(new Xe(xt,Rt.Id,To.Id,{applyCodeAction:(tt,ut)=>$e(this,void 0,void 0,function*(){try{yield this._applyCodeAction(tt)}finally{ut&&this._trigger({type:2,filter:{}})}})},this._instantiationService)))}static get(xt){return xt.getContribution(Vt.ID)}update(xt){this._ui.getValue().update(xt)}showCodeActions(xt,ze,ct){return this._ui.getValue().showCodeActionList(xt,ze,ct,{includeDisabledActions:!1})}manualTriggerAtCurrentPosition(xt,ze,ct){if(!this._editor.hasModel())return;m.a.get(this._editor).closeMessage();const Ut=this._editor.getPosition();this._trigger({type:1,filter:ze,autoApply:ct,context:{notAvailableMessage:xt,position:Ut}})}_trigger(xt){return this._model.trigger(xt)}_applyCodeAction(xt){return this._instantiationService.invokeFunction(it,xt,this._editor)}};Ve.ID="editor.contrib.quickFixController",Ve=Lt([Ht(1,Be.b),Ht(2,Pe.b),Ht(3,me.a),Ht(4,d.a)],Ve);function it(Vt,xt,ze){return $e(this,void 0,void 0,function*(){const ct=Vt.get(j.a),Ut=Vt.get(fe.b),Qe=Vt.get(he.a),tt=Vt.get(Se.a);if(Qe.publicLog2("codeAction.applyCodeAction",{codeActionTitle:xt.action.title,codeActionKind:xt.action.kind,codeActionIsPreferred:!!xt.action.isPreferred}),yield xt.resolve(g.a.None),xt.action.edit&&(yield ct.apply(j.b.convert(xt.action.edit),{editor:ze,label:xt.action.title})),xt.action.command)try{yield Ut.executeCommand(xt.action.command.id,...xt.action.command.arguments||[])}catch(ut){const Dt=Et(ut);tt.error(typeof Dt=="string"?Dt:le.a("applyCodeActionFailed","An unknown error occurred while applying the code action"))}})}function Et(Vt){return typeof Vt=="string"?Vt:Vt instanceof Error&&typeof Vt.message=="string"?Vt.message:void 0}function It(Vt,xt,ze,ct){if(Vt.hasModel()){const Ut=Ve.get(Vt);Ut&&Ut.manualTriggerAtCurrentPosition(xt,ze,ct)}}class Rt extends A.b{constructor(){super({id:Rt.Id,label:le.a("quickfix.trigger.label","Quick Fix..."),alias:"Quick Fix...",precondition:Pe.a.and(I.a.writable,I.a.hasCodeActionsProvider),kbOpts:{kbExpr:I.a.editorTextFocus,primary:2048|84,weight:100}})}run(Vt,xt){return It(xt,le.a("editor.action.quickFix.noneMessage","No code actions available"),void 0,void 0)}}Rt.Id="editor.action.quickFix";class vo extends A.c{constructor(){super({id:v.b,precondition:Pe.a.and(I.a.writable,I.a.hasCodeActionsProvider),description:{description:"Trigger a code action",args:[{name:"args",schema:ce}]}})}runEditorCommand(Vt,xt,ze){const ct=b.a.fromUser(ze,{kind:b.b.Empty,apply:"ifSingle"});return It(xt,typeof(ze==null?void 0:ze.kind)=="string"?ct.preferred?le.a("editor.action.codeAction.noneMessage.preferred.kind","No preferred code actions for '{0}' available",ze.kind):le.a("editor.action.codeAction.noneMessage.kind","No code actions for '{0}' available",ze.kind):ct.preferred?le.a("editor.action.codeAction.noneMessage.preferred","No preferred code actions available"):le.a("editor.action.codeAction.noneMessage","No code actions available"),{include:ct.kind,includeSourceActions:!0,onlyIncludePreferredActions:ct.preferred},ct.apply)}}class Mo extends A.b{constructor(){super({id:v.f,label:le.a("refactor.label","Refactor..."),alias:"Refactor...",precondition:Pe.a.and(I.a.writable,I.a.hasCodeActionsProvider),kbOpts:{kbExpr:I.a.editorTextFocus,primary:2048|1024|48,mac:{primary:256|1024|48},weight:100},contextMenuOpts:{group:"1_modification",order:2,when:Pe.a.and(I.a.writable,ot(b.b.Refactor))},description:{description:"Refactor...",args:[{name:"args",schema:ce}]}})}run(Vt,xt,ze){const ct=b.a.fromUser(ze,{kind:b.b.Refactor,apply:"never"});return It(xt,typeof(ze==null?void 0:ze.kind)=="string"?ct.preferred?le.a("editor.action.refactor.noneMessage.preferred.kind","No preferred refactorings for '{0}' available",ze.kind):le.a("editor.action.refactor.noneMessage.kind","No refactorings for '{0}' available",ze.kind):ct.preferred?le.a("editor.action.refactor.noneMessage.preferred","No preferred refactorings available"):le.a("editor.action.refactor.noneMessage","No refactorings available"),{include:b.b.Refactor.contains(ct.kind)?ct.kind:b.b.None,onlyIncludePreferredActions:ct.preferred},ct.apply)}}class xo extends A.b{constructor(){super({id:v.g,label:le.a("source.label","Source Action..."),alias:"Source Action...",precondition:Pe.a.and(I.a.writable,I.a.hasCodeActionsProvider),contextMenuOpts:{group:"1_modification",order:2.1,when:Pe.a.and(I.a.writable,ot(b.b.Source))},description:{description:"Source Action...",args:[{name:"args",schema:ce}]}})}run(Vt,xt,ze){const ct=b.a.fromUser(ze,{kind:b.b.Source,apply:"never"});return It(xt,typeof(ze==null?void 0:ze.kind)=="string"?ct.preferred?le.a("editor.action.source.noneMessage.preferred.kind","No preferred source actions for '{0}' available",ze.kind):le.a("editor.action.source.noneMessage.kind","No source actions for '{0}' available",ze.kind):ct.preferred?le.a("editor.action.source.noneMessage.preferred","No preferred source actions available"):le.a("editor.action.source.noneMessage","No source actions available"),{include:b.b.Source.contains(ct.kind)?ct.kind:b.b.None,includeSourceActions:!0,onlyIncludePreferredActions:ct.preferred},ct.apply)}}class Do extends A.b{constructor(){super({id:v.e,label:le.a("organizeImports.label","Organize Imports"),alias:"Organize Imports",precondition:Pe.a.and(I.a.writable,ot(b.b.SourceOrganizeImports)),kbOpts:{kbExpr:I.a.editorTextFocus,primary:1024|512|45,weight:100}})}run(Vt,xt){return It(xt,le.a("editor.action.organize.noneMessage","No organize imports action available"),{include:b.b.SourceOrganizeImports,includeSourceActions:!0},"ifSingle")}}class Lo extends A.b{constructor(){super({id:v.c,label:le.a("fixAll.label","Fix All"),alias:"Fix All",precondition:Pe.a.and(I.a.writable,ot(b.b.SourceFixAll))})}run(Vt,xt){return It(xt,le.a("fixAll.noneMessage","No fix all action available"),{include:b.b.SourceFixAll,includeSourceActions:!0},"ifSingle")}}class To extends A.b{constructor(){super({id:To.Id,label:le.a("autoFix.label","Auto Fix..."),alias:"Auto Fix...",precondition:Pe.a.and(I.a.writable,ot(b.b.QuickFix)),kbOpts:{kbExpr:I.a.editorTextFocus,primary:512|1024|84,mac:{primary:2048|512|84},weight:100}})}run(Vt,xt){return It(xt,le.a("editor.action.autoFix.noneMessage","No auto fixes available"),{include:b.b.QuickFix,onlyIncludePreferredActions:!0},"ifSingle")}}To.Id="editor.action.autoFix"},C6rC:function(mt,M,t){},CClx:function(mt,M,t){},CDaH:function(mt,M,t){},CRAX:function(mt,M,t){"use strict";t.d(M,"a",function(){return j}),t.d(M,"b",function(){return u}),t.d(M,"c",function(){return c});var g=t("MI8n"),B=t("746U"),x=t("3/fG"),R=t("3Rsk"),A=t("ic2d");const j={Configuration:"base.contributions.configuration"},I={properties:{},patternProperties:{}},v={properties:{},patternProperties:{}},C={properties:{},patternProperties:{}},m={properties:{},patternProperties:{}},d={properties:{},patternProperties:{}},D={properties:{},patternProperties:{}},L="vscode://schemas/settings/resourceLanguage",r=A.a.as(R.a.JSONContribution);class w{constructor(){this.overrideIdentifiers=new Set,this._onDidSchemaChange=new g.b,this._onDidUpdateConfiguration=new g.b,this.defaultValues={},this.defaultLanguageConfigurationOverridesNode={id:"defaultOverrides",title:x.a("defaultLanguageConfigurationOverrides.title","Default Language Configuration Overrides"),properties:{}},this.configurationContributors=[this.defaultLanguageConfigurationOverridesNode],this.resourceLanguageSettingsSchema={properties:{},patternProperties:{},additionalProperties:!1,errorMessage:"Unknown editor configuration setting",allowTrailingCommas:!0,allowComments:!0},this.configurationProperties={},this.excludedConfigurationProperties={},r.registerSchema(L,this.resourceLanguageSettingsSchema)}registerConfiguration(y,O=!0){this.registerConfigurations([y],O)}registerConfigurations(y,O=!0){const k=this.doRegisterConfigurations(y,O);r.registerSchema(L,this.resourceLanguageSettingsSchema),this._onDidSchemaChange.fire(),this._onDidUpdateConfiguration.fire(k)}registerOverrideIdentifiers(y){for(const O of y)this.overrideIdentifiers.add(O);this.updateOverridePropertyPatternKey()}doRegisterConfigurations(y,O){const k=[];return y.forEach(Q=>{k.push(...this.validateAndRegisterProperties(Q,O,Q.extensionInfo)),this.configurationContributors.push(Q),this.registerJSONConfiguration(Q)}),k}validateAndRegisterProperties(y,O=!0,k,Q=3){var q;Q=B.n(y.scope)?Q:y.scope;let z=[],J=y.properties;if(J)for(let Z in J){if(O&&E(Z)){delete J[Z];continue}const ne=J[Z];if(this.updatePropertyDefaultValue(Z,ne),u.test(Z)?ne.scope=void 0:(ne.scope=B.n(ne.scope)?Q:ne.scope,ne.restricted=B.n(ne.restricted)?!!((q=k==null?void 0:k.restrictedConfigurations)===null||q===void 0?void 0:q.includes(Z)):ne.restricted),J[Z].hasOwnProperty("included")&&!J[Z].included){this.excludedConfigurationProperties[Z]=J[Z],delete J[Z];continue}else this.configurationProperties[Z]=J[Z];!J[Z].deprecationMessage&&J[Z].markdownDeprecationMessage&&(J[Z].deprecationMessage=J[Z].markdownDeprecationMessage),z.push(Z)}let re=y.allOf;if(re)for(let Z of re)z.push(...this.validateAndRegisterProperties(Z,O,k,Q));return z}getConfigurationProperties(){return this.configurationProperties}registerJSONConfiguration(y){const O=k=>{let Q=k.properties;if(Q)for(const z in Q)this.updateSchema(z,Q[z]);let q=k.allOf;q&&q.forEach(O)};O(y)}updateSchema(y,O){I.properties[y]=O;switch(O.scope){case 1:v.properties[y]=O;break;case 2:C.properties[y]=O;break;case 6:m.properties[y]=O;break;case 3:d.properties[y]=O;break;case 4:D.properties[y]=O;break;case 5:D.properties[y]=O,this.resourceLanguageSettingsSchema.properties[y]=O;break}}updateOverridePropertyPatternKey(){for(const y of this.overrideIdentifiers.values()){const O=`[${y}]`,k={type:"object",description:x.a("overrideSettings.defaultDescription","Configure editor settings to be overridden for a language."),errorMessage:x.a("overrideSettings.errorMessage","This setting does not support per-language configuration."),$ref:L};this.updatePropertyDefaultValue(O,k),I.properties[O]=k,v.properties[O]=k,C.properties[O]=k,m.properties[O]=k,d.properties[O]=k,D.properties[O]=k}this._onDidSchemaChange.fire()}updatePropertyDefaultValue(y,O){let k=this.defaultValues[y];B.m(k)&&(k=O.default),B.m(k)&&(k=p(O.type)),O.default=k}}const b="\\[.*\\]$",u=new RegExp(b);function c(y){return y.substring(1,y.length-1)}function p(y){const O=Array.isArray(y)?y[0]:y;switch(O){case"boolean":return!1;case"integer":case"number":return 0;case"string":return"";case"array":return[];case"object":return{};default:return null}}const S=new w;A.a.add(j.Configuration,S);function E(y){return y.trim()?u.test(y)?x.a("config.property.languageDefault","Cannot register '{0}'. This matches property pattern '\\\\[.*\\\\]$' for describing language specific editor settings. Use 'configurationDefaults' contribution.",y):S.getConfigurationProperties()[y]!==void 0?x.a("config.property.duplicate","Cannot register '{0}'. This property is already registered.",y):null:x.a("config.property.empty","Cannot register an empty property")}},CZ1j:function(mt,M,t){"use strict";t.d(M,"b",function(){return g}),t.d(M,"a",function(){return B});function g(x){return x<0?0:x>255?255:x|0}function B(x){return x<0?0:x>4294967295?4294967295:x|0}},CdFp:function(mt,M,t){"use strict";t.r(M);var g=t("+hIS");Object(g.a)({id:"abap",extensions:[".abap"],aliases:["abap","ABAP"],loader:function(){return t.e(321).then(t.bind(null,"6Xso"))}})},Cduo:function(mt,M,t){"use strict";t.d(M,"a",function(){return x});var g=t("0/Sa"),B=t("aokT");class x{static _handleEolEdits(R,A){let j,I=[];for(let v of A)typeof v.eol=="number"&&(j=v.eol),v.range&&typeof v.text=="string"&&I.push(v);return typeof j=="number"&&(R.hasModel()&&R.getModel().pushEOL(j)),I}static _isFullModelReplaceEdit(R,A){if(!R.hasModel())return!1;const j=R.getModel(),I=j.validateRange(A.range),v=j.getFullModelRange();return v.equalsRange(I)}static execute(R,A,j){j&&R.pushUndoStop();const I=x._handleEolEdits(R,A);I.length===1&&x._isFullModelReplaceEdit(R,I[0])?R.executeEdits("formatEditsCommand",I.map(v=>g.a.replace(B.a.lift(v.range),v.text))):R.executeEdits("formatEditsCommand",I.map(v=>g.a.replaceMove(B.a.lift(v.range),v.text))),j&&R.pushUndoStop()}}},CjF5:function(mt,M,t){"use strict";t.d(M,"a",function(){return x});var g=t("D3Dy"),B=t("MNsG");const x={clipboard:{writeText:B.g||document.queryCommandSupported&&document.queryCommandSupported("copy")||!!(navigator&&navigator.clipboard&&navigator.clipboard.writeText),readText:B.g||!!(navigator&&navigator.clipboard&&navigator.clipboard.readText)},keyboard:(()=>B.g||g.i?0:navigator.keyboard||g.h?1:2)(),touch:"ontouchstart"in window||navigator.maxTouchPoints>0,pointerEvents:window.PointerEvent&&("ontouchstart"in window||window.navigator.maxTouchPoints>0||navigator.maxTouchPoints>0)}},CjOT:function(mt,M,t){},Comh:function(mt,M,t){"use strict";t.d(M,"c",function(){return R}),t.d(M,"b",function(){return A}),t.d(M,"a",function(){return j});var g=t("N0LK"),B=t("cGHE"),x=t("aokT");const R=!1;class A{constructor(I,v,C,m,d){this.value=I,this.selectionStart=v,this.selectionEnd=C,this.selectionStartPosition=m,this.selectionEndPosition=d}toString(){return"[ <"+this.value+">, selectionStart: "+this.selectionStart+", selectionEnd: "+this.selectionEnd+"]"}static readFromTextArea(I){return new A(I.getValue(),I.getSelectionStart(),I.getSelectionEnd(),null,null)}collapseSelection(){return new A(this.value,this.value.length,this.value.length,null,null)}writeToTextArea(I,v,C){R&&console.log("writeToTextArea "+I+": "+this.toString()),v.setValue(I,this.value),C&&v.setSelectionRange(I,this.selectionStart,this.selectionEnd)}deduceEditorPosition(I){if(I<=this.selectionStart){const m=this.value.substring(I,this.selectionStart);return this._finishDeduceEditorPosition(this.selectionStartPosition,m,-1)}if(I>=this.selectionEnd){const m=this.value.substring(this.selectionEnd,I);return this._finishDeduceEditorPosition(this.selectionEndPosition,m,1)}const v=this.value.substring(this.selectionStart,I);if(v.indexOf(String.fromCharCode(8230))===-1)return this._finishDeduceEditorPosition(this.selectionStartPosition,v,1);const C=this.value.substring(I,this.selectionEnd);return this._finishDeduceEditorPosition(this.selectionEndPosition,C,-1)}_finishDeduceEditorPosition(I,v,C){let m=0,d=-1;for(;(d=v.indexOf(`
|
|
|
`,d+1))!==-1;)m++;return[I,C*v.length,m]}static selectedText(I){return new A(I,0,I.length,null,null)}static deduceInput(I,v,C){if(!I)return{text:"",replacePrevCharCnt:0,replaceNextCharCnt:0,positionDelta:0};R&&(console.log("------------------------deduceInput"),console.log("PREVIOUS STATE: "+I.toString()),console.log("CURRENT STATE: "+v.toString()));let m=I.value,d=I.selectionStart,D=I.selectionEnd,L=v.value,r=v.selectionStart,w=v.selectionEnd;const b=m.substring(D),u=L.substring(w),c=g.e(b,u);L=L.substring(0,L.length-c),m=m.substring(0,m.length-c);const p=m.substring(0,d),S=L.substring(0,r),E=g.d(p,S);if(L=L.substring(E),m=m.substring(E),r-=E,d-=E,w-=E,D-=E,R&&(console.log("AFTER DIFFING PREVIOUS STATE: <"+m+">, selectionStart: "+d+", selectionEnd: "+D),console.log("AFTER DIFFING CURRENT STATE: <"+L+">, selectionStart: "+r+", selectionEnd: "+w)),C&&r===w&&m.length>0){let O=null;if(r===L.length?L.startsWith(m)&&(O=L.substring(m.length)):L.endsWith(m)&&(O=L.substring(0,L.length-m.length)),O!==null&&O.length>0&&(/\uFE0F/.test(O)||g.k(O)))return{text:O,replacePrevCharCnt:0,replaceNextCharCnt:0,positionDelta:0}}if(r===w){if(m===L&&d===0&&D===m.length&&r===L.length&&L.indexOf(`
|
|
|
`)===-1&&g.l(L))return{text:"",replacePrevCharCnt:0,replaceNextCharCnt:0,positionDelta:0};const O=p.length-E;return R&&console.log("REMOVE PREVIOUS: "+(p.length-E)+" chars"),{text:L,replacePrevCharCnt:O,replaceNextCharCnt:0,positionDelta:0}}const y=D-d;return{text:L,replacePrevCharCnt:y,replaceNextCharCnt:0,positionDelta:0}}static deduceAndroidCompositionInput(I,v){if(!I)return{text:"",replacePrevCharCnt:0,replaceNextCharCnt:0,positionDelta:0};if(R&&(console.log("------------------------deduceAndroidCompositionInput"),console.log("PREVIOUS STATE: "+I.toString()),console.log("CURRENT STATE: "+v.toString())),I.value===v.value)return{text:"",replacePrevCharCnt:0,replaceNextCharCnt:0,positionDelta:v.selectionEnd-I.selectionEnd};const C=Math.min(g.d(I.value,v.value),I.selectionEnd),m=Math.min(g.e(I.value,v.value),I.value.length-I.selectionEnd),d=I.value.substring(C,I.value.length-m),D=v.value.substring(C,v.value.length-m),L=I.selectionStart-C,r=I.selectionEnd-C,w=v.selectionStart-C,b=v.selectionEnd-C;return R&&(console.log("AFTER DIFFING PREVIOUS STATE: <"+d+">, selectionStart: "+L+", selectionEnd: "+r),console.log("AFTER DIFFING CURRENT STATE: <"+D+">, selectionStart: "+w+", selectionEnd: "+b)),{text:D,replacePrevCharCnt:r,replaceNextCharCnt:d.length-r,positionDelta:b-D.length}}}A.EMPTY=new A("",0,0,null,null);class j{static _getPageOfLine(I,v){return Math.floor((I-1)/v)}static _getRangeForPage(I,v){const C=I*v,m=C+1,d=C+v;return new x.a(m,1,d+1,1)}static fromEditorSelection(I,v,C,m,d){const D=j._getPageOfLine(C.startLineNumber,m),L=j._getRangeForPage(D,m),r=j._getPageOfLine(C.endLineNumber,m),w=j._getRangeForPage(r,m),b=L.intersectRanges(new x.a(1,1,C.startLineNumber,C.startColumn));let u=v.getValueInRange(b,1);const c=v.getLineCount(),p=v.getLineMaxColumn(c),S=w.intersectRanges(new x.a(C.endLineNumber,C.endColumn,c,p));let E=v.getValueInRange(S,1),y;if(D===r||D+1===r)y=v.getValueInRange(C,1);else{const O=L.intersectRanges(C),k=w.intersectRanges(C);y=v.getValueInRange(O,1)+String.fromCharCode(8230)+v.getValueInRange(k,1)}if(d){const O=500;u.length>O&&(u=u.substring(u.length-O,u.length)),E.length>O&&(E=E.substring(0,O)),y.length>2*O&&(y=y.substring(0,O)+String.fromCharCode(8230)+y.substring(y.length-O,y.length))}return new A(u+y+E,u.length,u.length+y.length,new B.a(C.startLineNumber,C.startColumn),new B.a(C.endLineNumber,C.endColumn))}}},CriS:function(mt,M,t){"use strict";var g=t("M/lh"),B=t.n(g);t.o(g,"Emitter")&&t.d(M,"Emitter",function(){return g.Emitter}),t.o(g,"MarkerSeverity")&&t.d(M,"MarkerSeverity",function(){return g.MarkerSeverity}),t.o(g,"Range")&&t.d(M,"Range",function(){return g.Range}),t.o(g,"Uri")&&t.d(M,"Uri",function(){return g.Uri}),t.o(g,"editor")&&t.d(M,"editor",function(){return g.editor}),t.o(g,"languages")&&t.d(M,"languages",function(){return g.languages})},CxEt:function(mt,M,t){"use strict";t.r(M);var g=t("sswD"),B=t("C1Q+");Object(g.l)(B.f.ID,B.f),Object(g.j)(B.e),Object(g.j)(B.g),Object(g.j)(B.h),Object(g.j)(B.d),Object(g.j)(B.a),Object(g.j)(B.c),Object(g.k)(new B.b)},CzyV:function(mt,M,t){"use strict";var g=t("M/lh"),B=t.n(g);t.o(g,"Emitter")&&t.d(M,"Emitter",function(){return g.Emitter}),t.o(g,"MarkerSeverity")&&t.d(M,"MarkerSeverity",function(){return g.MarkerSeverity}),t.o(g,"Range")&&t.d(M,"Range",function(){return g.Range}),t.o(g,"Uri")&&t.d(M,"Uri",function(){return g.Uri}),t.o(g,"editor")&&t.d(M,"editor",function(){return g.editor}),t.o(g,"languages")&&t.d(M,"languages",function(){return g.languages})},D3Dy:function(mt,M,t){"use strict";t.d(M,"d",function(){return x}),t.d(M,"b",function(){return R}),t.d(M,"l",function(){return A}),t.d(M,"c",function(){return j}),t.d(M,"a",function(){return I}),t.d(M,"g",function(){return C}),t.d(M,"j",function(){return m}),t.d(M,"f",function(){return d}),t.d(M,"h",function(){return D}),t.d(M,"k",function(){return L}),t.d(M,"e",function(){return r}),t.d(M,"i",function(){return w});var g=t("MI8n");class B{constructor(){this._zoomLevel=0,this._lastZoomLevelChangeTime=0,this._onDidChangeZoomLevel=new g.b,this.onDidChangeZoomLevel=this._onDidChangeZoomLevel.event,this._zoomFactor=1}getZoomLevel(){return this._zoomLevel}getTimeSinceLastZoomLevelChanged(){return Date.now()-this._lastZoomLevelChangeTime}getZoomFactor(){return this._zoomFactor}getPixelRatio(){let b=document.createElement("canvas").getContext("2d"),u=window.devicePixelRatio||1,c=b.webkitBackingStorePixelRatio||b.mozBackingStorePixelRatio||b.msBackingStorePixelRatio||b.oBackingStorePixelRatio||b.backingStorePixelRatio||1;return u/c}}B.INSTANCE=new B;function x(){return B.INSTANCE.getZoomLevel()}function R(){return B.INSTANCE.getTimeSinceLastZoomLevelChanged()}function A(b){return B.INSTANCE.onDidChangeZoomLevel(b)}function j(){return B.INSTANCE.getZoomFactor()}function I(){return B.INSTANCE.getPixelRatio()}const v=navigator.userAgent,C=v.indexOf("Firefox")>=0,m=v.indexOf("AppleWebKit")>=0,d=v.indexOf("Chrome")>=0,D=!d&&v.indexOf("Safari")>=0,L=!d&&!D&&m,r=v.indexOf("Android")>=0,w=window.matchMedia&&window.matchMedia("(display-mode: standalone)").matches},DTDp:function(mt,M,t){},Dvnd:function(mt,M,t){"use strict";t.r(M);var g=t("+hIS");Object(g.a)({id:"kotlin",extensions:[".kt"],aliases:["Kotlin","kotlin"],mimetypes:["text/x-kotlin-source","text/x-kotlin"],loader:function(){return t.e(339).then(t.bind(null,"y0OK"))}})},"E+ie":function(mt,M,t){"use strict";t.r(M);var g=t("+hIS");Object(g.a)({id:"csp",extensions:[],aliases:["CSP","csp"],loader:function(){return t.e(329).then(t.bind(null,"p+q7"))}})},E4kL:function(mt,M,t){"use strict";t.r(M);var g=t("+hIS");Object(g.a)({id:"yaml",extensions:[".yaml",".yml"],aliases:["YAML","yaml","YML","yml"],mimetypes:["application/x-yaml","text/x-yaml"],loader:function(){return t.e(378).then(t.bind(null,"EaLm"))}})},EIAu:function(mt,M,t){"use strict";t.d(M,"b",function(){return j}),t.d(M,"a",function(){return u});var g=t("N0LK"),B=t("erNZ"),x=t("aokT");class R{constructor(c,p,S,E,y,O){this._richEditBracketBrand=void 0,this.languageId=c,this.index=p,this.open=S,this.close=E,this.forwardRegex=y,this.reversedRegex=O,this._openSet=R._toSet(this.open),this._closeSet=R._toSet(this.close)}isOpen(c){return this._openSet.has(c)}isClose(c){return this._closeSet.has(c)}static _toSet(c){const p=new Set;for(const S of c)p.add(S);return p}}function A(c){const p=c.length;c=c.map(k=>[k[0].toLowerCase(),k[1].toLowerCase()]);const S=[];for(let k=0;k<p;k++)S[k]=k;const E=(k,Q)=>{const[q,z]=k,[J,re]=Q;return q===J||q===re||z===J||z===re},y=(k,Q)=>{const q=Math.min(k,Q),z=Math.max(k,Q);for(let J=0;J<p;J++)S[J]===z&&(S[J]=q)};for(let k=0;k<p;k++){const Q=c[k];for(let q=k+1;q<p;q++){const z=c[q];E(Q,z)&&y(S[k],S[q])}}const O=[];for(let k=0;k<p;k++){let Q=[],q=[];for(let z=0;z<p;z++)if(S[z]===k){const[J,re]=c[z];Q.push(J),q.push(re)}Q.length>0&&O.push({open:Q,close:q})}return O}class j{constructor(c,p){this._richEditBracketsBrand=void 0;const S=A(p);this.brackets=S.map((E,y)=>new R(c,y,E.open,E.close,m(E.open,E.close,S,y),d(E.open,E.close,S,y))),this.forwardRegex=D(this.brackets),this.reversedRegex=L(this.brackets),this.textIsBracket={},this.textIsOpenBracket={},this.maxBracketLength=0;for(const E of this.brackets){for(const y of E.open)this.textIsBracket[y]=E,this.textIsOpenBracket[y]=!0,this.maxBracketLength=Math.max(this.maxBracketLength,y.length);for(const y of E.close)this.textIsBracket[y]=E,this.textIsOpenBracket[y]=!1,this.maxBracketLength=Math.max(this.maxBracketLength,y.length)}}}function I(c,p,S,E){for(let y=0,O=p.length;y<O;y++){if(y===S)continue;const k=p[y];for(const Q of k.open)Q.indexOf(c)>=0&&E.push(Q);for(const Q of k.close)Q.indexOf(c)>=0&&E.push(Q)}}function v(c,p){return c.length-p.length}function C(c){if(c.length<=1)return c;const p=[],S=new Set;for(const E of c){if(S.has(E))continue;p.push(E),S.add(E)}return p}function m(c,p,S,E){let y=[];y=y.concat(c),y=y.concat(p);for(let O=0,k=y.length;O<k;O++)I(y[O],S,E,y);return y=C(y),y.sort(v),y.reverse(),w(y)}function d(c,p,S,E){let y=[];y=y.concat(c),y=y.concat(p);for(let O=0,k=y.length;O<k;O++)I(y[O],S,E,y);return y=C(y),y.sort(v),y.reverse(),w(y.map(b))}function D(c){let p=[];for(const S of c){for(const E of S.open)p.push(E);for(const E of S.close)p.push(E)}return p=C(p),w(p)}function L(c){let p=[];for(const S of c){for(const E of S.open)p.push(E);for(const E of S.close)p.push(E)}return p=C(p),w(p.map(b))}function r(c){const p=/^[\w ]+$/.test(c);return c=g.t(c),p?`\\b${c}\\b`:c}function w(c){let p=`(${c.map(r).join(")|(")})`;return g.q(p,!0)}const b=function(){function c(E){if(B.d){const y=new Uint16Array(E.length);let O=0;for(let k=E.length-1;k>=0;k--)y[O++]=E.charCodeAt(k);return B.c().decode(y)}else{let y=[],O=0;for(let k=E.length-1;k>=0;k--)y[O++]=E.charAt(k);return y.join("")}}let p=null,S=null;return function(y){return p!==y&&(p=y,S=c(p)),S}}();class u{static _findPrevBracketInText(c,p,S,E){let y=S.match(c);if(!y)return null;let O=S.length-(y.index||0),k=y[0].length,Q=E+O;return new x.a(p,Q-k+1,p,Q+1)}static findPrevBracketInRange(c,p,S,E,y){const O=b(S),k=O.substring(S.length-y,S.length-E);return this._findPrevBracketInText(c,p,k,E)}static findNextBracketInText(c,p,S,E){let y=S.match(c);if(!y)return null;let O=y.index||0,k=y[0].length;if(k===0)return null;let Q=E+O;return new x.a(p,Q+1,p,Q+1+k)}static findNextBracketInRange(c,p,S,E,y){const O=S.substring(E,y);return this.findNextBracketInText(c,p,O,E)}}},EJc0:function(mt,M,t){"use strict";t.d(M,"a",function(){return I}),t.d(M,"b",function(){return C}),t.d(M,"e",function(){return d}),t.d(M,"d",function(){return D}),t.d(M,"c",function(){return r});var g=t("Vhoy"),B=t("fpMC"),x=t("N0LK");const R="$(",A=new RegExp(`\\$\\(${g.a.iconNameExpression}(?:${g.a.iconModifierExpression})?\\)`,"g"),j=new RegExp(`(\\\\)?${A.source}`,"g");function I(w){return w.replace(j,(b,u)=>u?b:`\\${b}`)}const v=new RegExp(`\\\\${A.source}`,"g");function C(w){return w.replace(v,b=>`\\${b}`)}const m=new RegExp(`(\\s)?(\\\\)?${A.source}(\\s)?`,"g");function d(w){return w.indexOf(R)===-1?w:w.replace(m,(b,u,c,p)=>c?b:u||p||"")}function D(w){const b=w.indexOf(R);return b===-1?{text:w}:L(w,b)}function L(w,b){const u=[];let c="";function p(z){if(z){c+=z;for(const J of z)u.push(y)}}let S=-1,E="",y=0,O,k,Q=b;const q=w.length;for(p(w.substr(0,b));Q<q;){if(O=w[Q],k=w[Q+1],O===R[0]&&k===R[1])S=Q,p(E),E=R,Q++;else if(O===")"&&S!==-1){const z=Q-S+1;y+=z,S=-1,E=""}else S!==-1?/^[a-z0-9\-]$/i.test(O)?E+=O:(p(E),S=-1,E=""):p(O);Q++}return p(E),{text:c,iconOffsets:u}}function r(w,b,u=!1){const{text:c,iconOffsets:p}=b;if(!p||p.length===0)return Object(B.g)(w,c,u);const S=Object(x.J)(c," "),E=c.length-S.length,y=Object(B.g)(w,S,u);if(y)for(const O of y){const k=p[O.start+E]+E;O.start+=k,O.end+=k}return y}},EOst:function(mt,M,t){"use strict";t.r(M);var g=t("+hIS");Object(g.a)({id:"typescript",extensions:[".ts",".tsx"],aliases:["TypeScript","ts","typescript"],mimetypes:["text/typescript"],loader:function(){return t.e(375).then(t.bind(null,"87dK"))}})},"EPS+":function(mt,M,t){},EWX2:function(mt,M,t){"use strict";t.d(M,"a",function(){return x}),t.d(M,"b",function(){return A});var g=t("QDVR"),B=t("Cg/j");const x=Object(B.c)("contextService");class R{constructor(j,I,v,C,m){this._id=j,this._transient=v,this._configuration=C,this._ignorePathCasing=m,this._foldersMap=g.c.forUris(this._ignorePathCasing),this.folders=I}get folders(){return this._folders}set folders(j){this._folders=j,this.updateFoldersMap()}get id(){return this._id}get transient(){return this._transient}get configuration(){return this._configuration}set configuration(j){this._configuration=j}getFolder(j){return j&&this._foldersMap.findSubstr(j.with({scheme:j.scheme,authority:j.authority,path:j.path}))||null}updateFoldersMap(){this._foldersMap=g.c.forUris(this._ignorePathCasing);for(const j of this.folders)this._foldersMap.set(j.uri,j)}toJSON(){return{id:this.id,folders:this.folders,transient:this.transient,configuration:this.configuration}}}class A{constructor(j,I){this.raw=I,this.uri=j.uri,this.index=j.index,this.name=j.name}toJSON(){return{uri:this.uri,name:this.name,index:this.index}}}},EffR:function(mt,M,t){"use strict";t.d(M,"t",function(){return d}),t.d(M,"N",function(){return D}),t.d(M,"i",function(){return r}),t.d(M,"o",function(){return u}),t.d(M,"n",function(){return c}),t.d(M,"g",function(){return p}),t.d(M,"h",function(){return S}),t.d(M,"j",function(){return E}),t.d(M,"k",function(){return y}),t.d(M,"T",function(){return Q}),t.d(M,"V",function(){return q}),t.d(M,"l",function(){return ne}),t.d(M,"A",function(){return le}),t.d(M,"z",function(){return _e}),t.d(M,"b",function(){return oe}),t.d(M,"G",function(){return ae}),t.d(M,"X",function(){return V}),t.d(M,"D",function(){return G}),t.d(M,"f",function(){return ee}),t.d(M,"I",function(){return pe}),t.d(M,"C",function(){return Te}),t.d(M,"B",function(){return Ie}),t.d(M,"H",function(){return Me}),t.d(M,"L",function(){return Oe}),t.d(M,"x",function(){return Xe}),t.d(M,"J",function(){return fe}),t.d(M,"O",function(){return Be}),t.d(M,"F",function(){return Se}),t.d(M,"y",function(){return me}),t.d(M,"w",function(){return he}),t.d(M,"v",function(){return ie}),t.d(M,"Q",function(){return W}),t.d(M,"M",function(){return U}),t.d(M,"d",function(){return se}),t.d(M,"c",function(){return je}),t.d(M,"U",function(){return Re}),t.d(M,"S",function(){return We}),t.d(M,"Y",function(){return Lt}),t.d(M,"q",function(){return Ht}),t.d(M,"P",function(){return $e}),t.d(M,"R",function(){return ot}),t.d(M,"a",function(){return Et}),t.d(M,"W",function(){return It}),t.d(M,"K",function(){return Rt}),t.d(M,"E",function(){return vo}),t.d(M,"u",function(){return Mo}),t.d(M,"Z",function(){return xo}),t.d(M,"p",function(){return Do}),t.d(M,"s",function(){return Lo}),t.d(M,"r",function(){return To}),t.d(M,"e",function(){return Vt}),t.d(M,"m",function(){return xt});var g=t("D3Dy"),B=t("CjF5"),x=t("uDWl"),R=t("XSiN"),A=t("X+cX"),j=t("/cxE"),I=t("MI8n"),v=t("pmY6"),C=t("tYmi"),m=t("MNsG");function d(ze){for(;ze.firstChild;)ze.firstChild.remove()}function D(ze){var ct;return(ct=ze==null?void 0:ze.isConnected)!==null&&ct!==void 0?ct:!1}class L{constructor(ze,ct,Ut,Qe){this._node=ze,this._type=ct,this._handler=Ut,this._options=Qe||!1,this._node.addEventListener(this._type,this._handler,this._options)}dispose(){if(!this._handler)return;this._node.removeEventListener(this._type,this._handler,this._options),this._node=null,this._handler=null}}function r(ze,ct,Ut,Qe){return new L(ze,ct,Ut,Qe)}function w(ze){return function(ct){return ze(new R.a(ct))}}function b(ze){return function(ct){return ze(new x.a(ct))}}let u=function(ct,Ut,Qe,tt){let ut=Qe;return Ut==="click"||Ut==="mousedown"?ut=w(Qe):(Ut==="keydown"||Ut==="keypress"||Ut==="keyup")&&(ut=b(Qe)),r(ct,Ut,ut,tt)},c=function(ct,Ut,Qe){let tt=w(Ut);return p(ct,tt,Qe)};function p(ze,ct,Ut){return r(ze,m.c&&B.a.pointerEvents?se.POINTER_DOWN:se.MOUSE_DOWN,ct,Ut)}function S(ze,ct,Ut){return r(ze,m.c&&B.a.pointerEvents?se.POINTER_UP:se.MOUSE_UP,ct,Ut)}function E(ze,ct){return r(ze,"mouseout",Ut=>{let Qe=Ut.relatedTarget;for(;Qe&&Qe!==ze;)Qe=Qe.parentNode;if(Qe===ze)return;ct(Ut)})}function y(ze,ct){return r(ze,"pointerout",Ut=>{let Qe=Ut.relatedTarget;for(;Qe&&Qe!==ze;)Qe=Qe.parentNode;if(Qe===ze)return;ct(Ut)})}let O=null;function k(ze){if(!O){const ct=Ut=>setTimeout(()=>Ut(new Date().getTime()),0);O=self.requestAnimationFrame||self.msRequestAnimationFrame||self.webkitRequestAnimationFrame||self.mozRequestAnimationFrame||self.oRequestAnimationFrame||ct}return O.call(self,ze)}let Q,q;class z{constructor(ze,ct=0){this._runner=ze,this.priority=ct,this._canceled=!1}dispose(){this._canceled=!0}execute(){if(this._canceled)return;try{this._runner()}catch(ze){Object(j.f)(ze)}}static sort(ze,ct){return ct.priority-ze.priority}}(function(){let ze=[],ct=null,Ut=!1,Qe=!1,tt=()=>{for(Ut=!1,ct=ze,ze=[],Qe=!0;ct.length>0;){ct.sort(z.sort);let ut=ct.shift();ut.execute()}Qe=!1};q=(ut,Dt=0)=>{let Pt=new z(ut,Dt);return ze.push(Pt),Ut||(Ut=!0,k(tt)),Pt},Q=(ut,Dt)=>{if(Qe){let Pt=new z(ut,Dt);return ct.push(Pt),Pt}else return q(ut,Dt)}})();const J=8,re=function(ze,ct){return ct};class Z extends v.a{constructor(ze,ct,Ut,Qe=re,tt=J){super();let ut=null,Dt=0,Pt=this._register(new A.g),Wt=()=>{Dt=new Date().getTime(),Ut(ut),ut=null};this._register(r(ze,ct,zt=>{ut=Qe(ut,zt);let so=new Date().getTime()-Dt;so>=tt?(Pt.cancel(),Wt()):Pt.setIfNotSet(Wt,tt-so)}))}}function ne(ze,ct,Ut,Qe,tt){return new Z(ze,ct,Ut,Qe,tt)}function le(ze){return document.defaultView.getComputedStyle(ze,null)}function _e(ze){if(ze!==document.body)return new oe(ze.clientWidth,ze.clientHeight);if(m.c&&window.visualViewport)return new oe(window.visualViewport.width,window.visualViewport.height);if(window.innerWidth&&window.innerHeight)return new oe(window.innerWidth,window.innerHeight);if(document.body&&document.body.clientWidth&&document.body.clientHeight)return new oe(document.body.clientWidth,document.body.clientHeight);if(document.documentElement&&document.documentElement.clientWidth&&document.documentElement.clientHeight)return new oe(document.documentElement.clientWidth,document.documentElement.clientHeight);throw new Error("Unable to figure out browser width and height")}class Ce{static convertToPixels(ze,ct){return parseFloat(ct)||0}static getDimension(ze,ct,Ut){let Qe=le(ze),tt="0";return Qe&&(Qe.getPropertyValue?tt=Qe.getPropertyValue(ct):tt=Qe.getAttribute(Ut)),Ce.convertToPixels(ze,tt)}static getBorderLeftWidth(ze){return Ce.getDimension(ze,"border-left-width","borderLeftWidth")}static getBorderRightWidth(ze){return Ce.getDimension(ze,"border-right-width","borderRightWidth")}static getBorderTopWidth(ze){return Ce.getDimension(ze,"border-top-width","borderTopWidth")}static getBorderBottomWidth(ze){return Ce.getDimension(ze,"border-bottom-width","borderBottomWidth")}static getPaddingLeft(ze){return Ce.getDimension(ze,"padding-left","paddingLeft")}static getPaddingRight(ze){return Ce.getDimension(ze,"padding-right","paddingRight")}static getPaddingTop(ze){return Ce.getDimension(ze,"padding-top","paddingTop")}static getPaddingBottom(ze){return Ce.getDimension(ze,"padding-bottom","paddingBottom")}static getMarginLeft(ze){return Ce.getDimension(ze,"margin-left","marginLeft")}static getMarginTop(ze){return Ce.getDimension(ze,"margin-top","marginTop")}static getMarginRight(ze){return Ce.getDimension(ze,"margin-right","marginRight")}static getMarginBottom(ze){return Ce.getDimension(ze,"margin-bottom","marginBottom")}}class oe{constructor(ze,ct){this.width=ze,this.height=ct}with(ze=this.width,ct=this.height){return ze!==this.width||ct!==this.height?new oe(ze,ct):this}static is(ze){return typeof ze=="object"&&typeof ze.height=="number"&&typeof ze.width=="number"}static lift(ze){return ze instanceof oe?ze:new oe(ze.width,ze.height)}static equals(ze,ct){return ze===ct?!0:!ze||!ct?!1:ze.width===ct.width&&ze.height===ct.height}}function ae(ze){let ct=ze.offsetParent,Ut=ze.offsetTop,Qe=ze.offsetLeft;for(;(ze=ze.parentNode)!==null&&ze!==document.body&&ze!==document.documentElement;){Ut-=ze.scrollTop;const tt=Pe(ze)?null:le(ze);tt&&(Qe-=tt.direction!=="rtl"?ze.scrollLeft:-ze.scrollLeft),ze===ct&&(Qe+=Ce.getBorderLeftWidth(ze),Ut+=Ce.getBorderTopWidth(ze),Ut+=ze.offsetTop,Qe+=ze.offsetLeft,ct=ze.offsetParent)}return{left:Qe,top:Ut}}function V(ze,ct,Ut){typeof ct=="number"&&(ze.style.width=`${ct}px`),typeof Ut=="number"&&(ze.style.height=`${Ut}px`)}function G(ze){let ct=ze.getBoundingClientRect();return{left:ct.left+ee.scrollX,top:ct.top+ee.scrollY,width:ct.width,height:ct.height}}const ee=new class{get scrollX(){return typeof window.scrollX=="number"?window.scrollX:document.body.scrollLeft+document.documentElement.scrollLeft}get scrollY(){return typeof window.scrollY=="number"?window.scrollY:document.body.scrollTop+document.documentElement.scrollTop}};function pe(ze){let ct=Ce.getMarginLeft(ze)+Ce.getMarginRight(ze);return ze.offsetWidth+ct}function Te(ze){let ct=Ce.getBorderLeftWidth(ze)+Ce.getBorderRightWidth(ze),Ut=Ce.getPaddingLeft(ze)+Ce.getPaddingRight(ze);return ze.offsetWidth-ct-Ut}function Ie(ze){let ct=Ce.getBorderTopWidth(ze)+Ce.getBorderBottomWidth(ze),Ut=Ce.getPaddingTop(ze)+Ce.getPaddingBottom(ze);return ze.offsetHeight-ct-Ut}function Me(ze){let ct=Ce.getMarginTop(ze)+Ce.getMarginBottom(ze);return ze.offsetHeight+ct}function Oe(ze,ct){for(;ze;){if(ze===ct)return!0;ze=ze.parentNode}return!1}function Xe(ze,ct,Ut){for(;ze&&ze.nodeType===ze.ELEMENT_NODE;){if(ze.classList.contains(ct))return ze;if(Ut){if(typeof Ut=="string"){if(ze.classList.contains(Ut))return null}else if(ze===Ut)return null}ze=ze.parentNode}return null}function fe(ze,ct,Ut){return!!Xe(ze,ct,Ut)}function Pe(ze){return ze&&!!ze.host&&!!ze.mode}function Be(ze){return!!Se(ze)}function Se(ze){for(;ze.parentNode;){if(ze===document.body)return null;ze=ze.parentNode}return Pe(ze)?ze:null}function me(){let ze=document.activeElement;for(;ze==null?void 0:ze.shadowRoot;)ze=ze.shadowRoot.activeElement;return ze}function he(ze=document.getElementsByTagName("head")[0]){let ct=document.createElement("style");return ct.type="text/css",ct.media="screen",ze.appendChild(ct),ct}let Le=null;function we(){return Le||(Le=he()),Le}function ve(ze){var ct,Ut;return((ct=ze==null?void 0:ze.sheet)===null||ct===void 0?void 0:ct.rules)?ze.sheet.rules:((Ut=ze==null?void 0:ze.sheet)===null||Ut===void 0?void 0:Ut.cssRules)?ze.sheet.cssRules:[]}function ie(ze,ct,Ut=we()){if(!Ut||!ct)return;Ut.sheet.insertRule(ze+"{"+ct+"}",0)}function W(ze,ct=we()){if(!ct)return;let Ut=ve(ct),Qe=[];for(let tt=0;tt<Ut.length;tt++){let ut=Ut[tt];ut.selectorText.indexOf(ze)!==-1&&Qe.push(tt)}for(let tt=Qe.length-1;tt>=0;tt--)ct.sheet.deleteRule(Qe[tt])}function U(ze){return typeof HTMLElement=="object"?ze instanceof HTMLElement:ze&&typeof ze=="object"&&ze.nodeType===1&&typeof ze.nodeName=="string"}const se={CLICK:"click",AUXCLICK:"auxclick",DBLCLICK:"dblclick",MOUSE_UP:"mouseup",MOUSE_DOWN:"mousedown",MOUSE_OVER:"mouseover",MOUSE_MOVE:"mousemove",MOUSE_OUT:"mouseout",MOUSE_ENTER:"mouseenter",MOUSE_LEAVE:"mouseleave",MOUSE_WHEEL:"wheel",POINTER_UP:"pointerup",POINTER_DOWN:"pointerdown",POINTER_MOVE:"pointermove",CONTEXT_MENU:"contextmenu",WHEEL:"wheel",KEY_DOWN:"keydown",KEY_PRESS:"keypress",KEY_UP:"keyup",LOAD:"load",BEFORE_UNLOAD:"beforeunload",UNLOAD:"unload",ABORT:"abort",ERROR:"error",RESIZE:"resize",SCROLL:"scroll",FULLSCREEN_CHANGE:"fullscreenchange",WK_FULLSCREEN_CHANGE:"webkitfullscreenchange",SELECT:"select",CHANGE:"change",SUBMIT:"submit",RESET:"reset",FOCUS:"focus",FOCUS_IN:"focusin",FOCUS_OUT:"focusout",BLUR:"blur",INPUT:"input",STORAGE:"storage",DRAG_START:"dragstart",DRAG:"drag",DRAG_ENTER:"dragenter",DRAG_LEAVE:"dragleave",DRAG_OVER:"dragover",DROP:"drop",DRAG_END:"dragend",ANIMATION_START:g.j?"webkitAnimationStart":"animationstart",ANIMATION_END:g.j?"webkitAnimationEnd":"animationend",ANIMATION_ITERATION:g.j?"webkitAnimationIteration":"animationiteration"},je={stop:function(ze,ct){ze.preventDefault?ze.preventDefault():ze.returnValue=!1,ct&&(ze.stopPropagation?ze.stopPropagation():ze.cancelBubble=!0)}};function Re(ze){let ct=[];for(let Ut=0;ze&&ze.nodeType===ze.ELEMENT_NODE;Ut++)ct[Ut]=ze.scrollTop,ze=ze.parentNode;return ct}function We(ze,ct){for(let Ut=0;ze&&ze.nodeType===ze.ELEMENT_NODE;Ut++)ze.scrollTop!==ct[Ut]&&(ze.scrollTop=ct[Ut]),ze=ze.parentNode}class dt extends v.a{constructor(ze){super();this._onDidFocus=this._register(new I.b),this.onDidFocus=this._onDidFocus.event,this._onDidBlur=this._register(new I.b),this.onDidBlur=this._onDidBlur.event;let ct=Oe(document.activeElement,ze),Ut=!1;const Qe=()=>{Ut=!1,ct||(ct=!0,this._onDidFocus.fire())},tt=()=>{ct&&(Ut=!0,window.setTimeout(()=>{Ut&&(Ut=!1,ct=!1,this._onDidBlur.fire())},0))};this._refreshStateHandler=()=>{let ut=Oe(document.activeElement,ze);ut!==ct&&(ct?tt():Qe())},this._register(r(ze,se.FOCUS,Qe,!0)),this._register(r(ze,se.BLUR,tt,!0))}}function Lt(ze){return new dt(ze)}function Ht(ze,...ct){if(ze.append(...ct),ct.length===1&&typeof ct[0]!="string")return ct[0]}function $e(ze,ct){return ze.insertBefore(ct,ze.firstChild),ct}function ot(ze,...ct){ze.innerText="",Ht(ze,...ct)}const ce=/([\w\-]+)?(#([\w\-]+))?((\.([\w\-]+))*)/;var Ve;(function(ze){ze.HTML="http://www.w3.org/1999/xhtml",ze.SVG="http://www.w3.org/2000/svg"})(Ve||(Ve={}));function it(ze,ct,Ut,...Qe){let tt=ce.exec(ct);if(!tt)throw new Error("Bad use of emmet");Ut=Object.assign({},Ut||{});let ut=tt[1]||"div",Dt;return ze!==Ve.HTML?Dt=document.createElementNS(ze,ut):Dt=document.createElement(ut),tt[3]&&(Dt.id=tt[3]),tt[4]&&(Dt.className=tt[4].replace(/\./g," ").trim()),Object.keys(Ut).forEach(Pt=>{const Wt=Ut[Pt];if(typeof Wt=="undefined")return;/^on\w+$/.test(Pt)?Dt[Pt]=Wt:Pt==="selected"?Wt&&Dt.setAttribute(Pt,"true"):Dt.setAttribute(Pt,Wt)}),Dt.append(...Qe),Dt}function Et(ze,ct,...Ut){return it(Ve.HTML,ze,ct,...Ut)}Et.SVG=function(ze,ct,...Ut){return it(Ve.SVG,ze,ct,...Ut)};function It(...ze){for(let ct of ze)ct.style.display="",ct.removeAttribute("aria-hidden")}function Rt(...ze){for(let ct of ze)ct.style.display="none",ct.setAttribute("aria-hidden","true")}function vo(ze){return Array.prototype.slice.call(document.getElementsByTagName(ze),0)}function Mo(ze){const ct=window.devicePixelRatio*ze;return Math.max(1,Math.floor(ct))/window.devicePixelRatio}function xo(ze){window.open(ze,"_blank","noopener")}function Do(ze){const ct=()=>{ze(),Ut=q(ct)};let Ut=q(ct);return Object(v.i)(()=>Ut.dispose())}C.b.setPreferredWebSchema(/^https:/.test(window.location.href)?"https":"http");function Lo(ze){return ze?`url('${C.a.asBrowserUri(ze).toString(!0).replace(/'/g,"%27")}')`:"url('')"}function To(ze){return`'${ze.replace(/'/g,"%27")}'`}class Vt extends I.b{constructor(){super();this._subscriptions=new v.b,this._keyStatus={altKey:!1,shiftKey:!1,ctrlKey:!1,metaKey:!1},this._subscriptions.add(r(window,"keydown",ze=>{if(ze.defaultPrevented)return;const ct=new x.a(ze);if(ct.keyCode===6&&ze.repeat)return;if(ze.altKey&&!this._keyStatus.altKey)this._keyStatus.lastKeyPressed="alt";else if(ze.ctrlKey&&!this._keyStatus.ctrlKey)this._keyStatus.lastKeyPressed="ctrl";else if(ze.metaKey&&!this._keyStatus.metaKey)this._keyStatus.lastKeyPressed="meta";else if(ze.shiftKey&&!this._keyStatus.shiftKey)this._keyStatus.lastKeyPressed="shift";else if(ct.keyCode!==6)this._keyStatus.lastKeyPressed=void 0;else return;this._keyStatus.altKey=ze.altKey,this._keyStatus.ctrlKey=ze.ctrlKey,this._keyStatus.metaKey=ze.metaKey,this._keyStatus.shiftKey=ze.shiftKey,this._keyStatus.lastKeyPressed&&(this._keyStatus.event=ze,this.fire(this._keyStatus))},!0)),this._subscriptions.add(r(window,"keyup",ze=>{if(ze.defaultPrevented)return;!ze.altKey&&this._keyStatus.altKey?this._keyStatus.lastKeyReleased="alt":!ze.ctrlKey&&this._keyStatus.ctrlKey?this._keyStatus.lastKeyReleased="ctrl":!ze.metaKey&&this._keyStatus.metaKey?this._keyStatus.lastKeyReleased="meta":!ze.shiftKey&&this._keyStatus.shiftKey?this._keyStatus.lastKeyReleased="shift":this._keyStatus.lastKeyReleased=void 0,this._keyStatus.lastKeyPressed!==this._keyStatus.lastKeyReleased&&(this._keyStatus.lastKeyPressed=void 0),this._keyStatus.altKey=ze.altKey,this._keyStatus.ctrlKey=ze.ctrlKey,this._keyStatus.metaKey=ze.metaKey,this._keyStatus.shiftKey=ze.shiftKey,this._keyStatus.lastKeyReleased&&(this._keyStatus.event=ze,this.fire(this._keyStatus))},!0)),this._subscriptions.add(r(document.body,"mousedown",()=>{this._keyStatus.lastKeyPressed=void 0},!0)),this._subscriptions.add(r(document.body,"mouseup",()=>{this._keyStatus.lastKeyPressed=void 0},!0)),this._subscriptions.add(r(document.body,"mousemove",ze=>{ze.buttons&&(this._keyStatus.lastKeyPressed=void 0)},!0)),this._subscriptions.add(r(window,"blur",()=>{this.resetKeyStatus()}))}get keyStatus(){return this._keyStatus}resetKeyStatus(){this.doResetKeyStatus(),this.fire(this._keyStatus)}doResetKeyStatus(){this._keyStatus={altKey:!1,shiftKey:!1,ctrlKey:!1,metaKey:!1}}static getInstance(){return Vt.instance||(Vt.instance=new Vt),Vt.instance}dispose(){super.dispose(),this._subscriptions.dispose()}}function xt(ze,ct){const Ut=window.matchMedia(ze);typeof Ut.addEventListener=="function"?Ut.addEventListener("change",ct):Ut.addListener(ct)}},EzsQ:function(mt,M,t){},FmXZ:function(mt,M,t){"use strict";t.d(M,"b",function(){return R}),t.d(M,"a",function(){return A});var g=t("MNsG"),B=t("3/fG"),x=t("T8No");const R=new x.c("isWindows",g.i,Object(B.a)("isWindows","Whether the operating system is Windows")),A="inputFocus"},FvUK:function(mt,M,t){"use strict";t.r(M);var g=t("+hIS");Object(g.a)({id:"less",extensions:[".less"],aliases:["Less","less"],mimetypes:["text/x-less","text/less"],loader:function(){return t.e(340).then(t.bind(null,"OfHX"))}})},G2kB:function(mt,M,t){"use strict";t.d(M,"a",function(){return B}),t.d(M,"b",function(){return x});var g=t("Cg/j");const B=Object(g.c)("modelService");function x(R){return!R.isTooLargeForSyncing()&&!R.isForSimpleWidget}},G300:function(mt,M,t){"use strict";t.d(M,"a",function(){return j});var g=t("EffR"),B=t("uDWl"),x=t("XSiN"),R=t("pg8w"),A=t("pmY6");class j extends A.a{onclick(I,v){this._register(g.i(I,g.d.CLICK,C=>v(new x.a(C))))}onmousedown(I,v){this._register(g.i(I,g.d.MOUSE_DOWN,C=>v(new x.a(C))))}onmouseover(I,v){this._register(g.i(I,g.d.MOUSE_OVER,C=>v(new x.a(C))))}onnonbubblingmouseout(I,v){this._register(g.j(I,C=>v(new x.a(C))))}onkeydown(I,v){this._register(g.i(I,g.d.KEY_DOWN,C=>v(new B.a(C))))}onkeyup(I,v){this._register(g.i(I,g.d.KEY_UP,C=>v(new B.a(C))))}oninput(I,v){this._register(g.i(I,g.d.INPUT,v))}onblur(I,v){this._register(g.i(I,g.d.BLUR,v))}onfocus(I,v){this._register(g.i(I,g.d.FOCUS,v))}ignoreGesture(I){R.b.ignoreTarget(I)}}},GJhM:function(mt,M,t){"use strict";t.d(M,"b",function(){return _e}),t.d(M,"c",function(){return Ce}),t.d(M,"a",function(){return oe});var g=t("D3Dy"),B=t("EffR"),x=t("ZlPH"),R=t("XSiN"),A=t("AKMP"),j=t("G300"),I=t("X+cX");const v=11;class C extends j.a{constructor(V){super();this._onActivate=V.onActivate,this.bgDomNode=document.createElement("div"),this.bgDomNode.className="arrow-background",this.bgDomNode.style.position="absolute",this.bgDomNode.style.width=V.bgWidth+"px",this.bgDomNode.style.height=V.bgHeight+"px",typeof V.top!="undefined"&&(this.bgDomNode.style.top="0px"),typeof V.left!="undefined"&&(this.bgDomNode.style.left="0px"),typeof V.bottom!="undefined"&&(this.bgDomNode.style.bottom="0px"),typeof V.right!="undefined"&&(this.bgDomNode.style.right="0px"),this.domNode=document.createElement("div"),this.domNode.className=V.className,this.domNode.classList.add(...V.icon.classNamesArray),this.domNode.style.position="absolute",this.domNode.style.width=v+"px",this.domNode.style.height=v+"px",typeof V.top!="undefined"&&(this.domNode.style.top=V.top+"px"),typeof V.left!="undefined"&&(this.domNode.style.left=V.left+"px"),typeof V.bottom!="undefined"&&(this.domNode.style.bottom=V.bottom+"px"),typeof V.right!="undefined"&&(this.domNode.style.right=V.right+"px"),this._mouseMoveMonitor=this._register(new A.a),this.onmousedown(this.bgDomNode,G=>this._arrowMouseDown(G)),this.onmousedown(this.domNode,G=>this._arrowMouseDown(G)),this._mousedownRepeatTimer=this._register(new I.c),this._mousedownScheduleRepeatTimer=this._register(new I.g)}_arrowMouseDown(V){const G=()=>{this._mousedownRepeatTimer.cancelAndSet(()=>this._onActivate(),1e3/24)};this._onActivate(),this._mousedownRepeatTimer.cancel(),this._mousedownScheduleRepeatTimer.cancelAndSet(G,200),this._mouseMoveMonitor.startMonitoring(V.target,V.buttons,A.b,ee=>{},()=>{this._mousedownRepeatTimer.cancel(),this._mousedownScheduleRepeatTimer.cancel()}),V.preventDefault()}}var m=t("pmY6");class d extends m.a{constructor(V,G,ee){super();this._visibility=V,this._visibleClassName=G,this._invisibleClassName=ee,this._domNode=null,this._isVisible=!1,this._isNeeded=!1,this._rawShouldBeVisible=!1,this._shouldBeVisible=!1,this._revealTimer=this._register(new I.g)}setVisibility(V){this._visibility!==V&&(this._visibility=V,this._updateShouldBeVisible())}setShouldBeVisible(V){this._rawShouldBeVisible=V,this._updateShouldBeVisible()}_applyVisibilitySetting(){return this._visibility===2?!1:this._visibility===3?!0:this._rawShouldBeVisible}_updateShouldBeVisible(){const V=this._applyVisibilitySetting();this._shouldBeVisible!==V&&(this._shouldBeVisible=V,this.ensureVisibility())}setIsNeeded(V){this._isNeeded!==V&&(this._isNeeded=V,this.ensureVisibility())}setDomNode(V){this._domNode=V,this._domNode.setClassName(this._invisibleClassName),this.setShouldBeVisible(!1)}ensureVisibility(){if(!this._isNeeded){this._hide(!1);return}this._shouldBeVisible?this._reveal():this._hide(!0)}_reveal(){if(this._isVisible)return;this._isVisible=!0,this._revealTimer.setIfNotSet(()=>{this._domNode&&this._domNode.setClassName(this._visibleClassName)},0)}_hide(V){if(this._revealTimer.cancel(),!this._isVisible)return;this._isVisible=!1,this._domNode&&this._domNode.setClassName(this._invisibleClassName+(V?" fade":""))}}var D=t("MNsG");const L=140;class r extends j.a{constructor(V){super();this._lazyRender=V.lazyRender,this._host=V.host,this._scrollable=V.scrollable,this._scrollByPage=V.scrollByPage,this._scrollbarState=V.scrollbarState,this._visibilityController=this._register(new d(V.visibility,"visible scrollbar "+V.extraScrollbarClassName,"invisible scrollbar "+V.extraScrollbarClassName)),this._visibilityController.setIsNeeded(this._scrollbarState.isNeeded()),this._mouseMoveMonitor=this._register(new A.a),this._shouldRender=!0,this.domNode=Object(x.b)(document.createElement("div")),this.domNode.setAttribute("role","presentation"),this.domNode.setAttribute("aria-hidden","true"),this._visibilityController.setDomNode(this.domNode),this.domNode.setPosition("absolute"),this.onmousedown(this.domNode.domNode,G=>this._domNodeMouseDown(G))}_createArrow(V){const G=this._register(new C(V));this.domNode.domNode.appendChild(G.bgDomNode),this.domNode.domNode.appendChild(G.domNode)}_createSlider(V,G,ee,pe){this.slider=Object(x.b)(document.createElement("div")),this.slider.setClassName("slider"),this.slider.setPosition("absolute"),this.slider.setTop(V),this.slider.setLeft(G),typeof ee=="number"&&this.slider.setWidth(ee),typeof pe=="number"&&this.slider.setHeight(pe),this.slider.setLayerHinting(!0),this.slider.setContain("strict"),this.domNode.domNode.appendChild(this.slider.domNode),this.onmousedown(this.slider.domNode,Te=>{Te.leftButton&&(Te.preventDefault(),this._sliderMouseDown(Te,()=>{}))}),this.onclick(this.slider.domNode,Te=>{Te.leftButton&&Te.stopPropagation()})}_onElementSize(V){return this._scrollbarState.setVisibleSize(V)&&(this._visibilityController.setIsNeeded(this._scrollbarState.isNeeded()),this._shouldRender=!0,this._lazyRender||this.render()),this._shouldRender}_onElementScrollSize(V){return this._scrollbarState.setScrollSize(V)&&(this._visibilityController.setIsNeeded(this._scrollbarState.isNeeded()),this._shouldRender=!0,this._lazyRender||this.render()),this._shouldRender}_onElementScrollPosition(V){return this._scrollbarState.setScrollPosition(V)&&(this._visibilityController.setIsNeeded(this._scrollbarState.isNeeded()),this._shouldRender=!0,this._lazyRender||this.render()),this._shouldRender}beginReveal(){this._visibilityController.setShouldBeVisible(!0)}beginHide(){this._visibilityController.setShouldBeVisible(!1)}render(){if(!this._shouldRender)return;this._shouldRender=!1,this._renderDomNode(this._scrollbarState.getRectangleLargeSize(),this._scrollbarState.getRectangleSmallSize()),this._updateSlider(this._scrollbarState.getSliderSize(),this._scrollbarState.getArrowSize()+this._scrollbarState.getSliderPosition())}_domNodeMouseDown(V){if(V.target!==this.domNode.domNode)return;this._onMouseDown(V)}delegateMouseDown(V){const G=this.domNode.domNode.getClientRects()[0].top,ee=G+this._scrollbarState.getSliderPosition(),pe=G+this._scrollbarState.getSliderPosition()+this._scrollbarState.getSliderSize(),Te=this._sliderMousePosition(V);ee<=Te&&Te<=pe?V.leftButton&&(V.preventDefault(),this._sliderMouseDown(V,()=>{})):this._onMouseDown(V)}_onMouseDown(V){let G,ee;if(V.target===this.domNode.domNode&&typeof V.browserEvent.offsetX=="number"&&typeof V.browserEvent.offsetY=="number")G=V.browserEvent.offsetX,ee=V.browserEvent.offsetY;else{const Te=B.D(this.domNode.domNode);G=V.posx-Te.left,ee=V.posy-Te.top}const pe=this._mouseDownRelativePosition(G,ee);this._setDesiredScrollPositionNow(this._scrollByPage?this._scrollbarState.getDesiredScrollPositionFromOffsetPaged(pe):this._scrollbarState.getDesiredScrollPositionFromOffset(pe)),V.leftButton&&(V.preventDefault(),this._sliderMouseDown(V,()=>{}))}_sliderMouseDown(V,G){const ee=this._sliderMousePosition(V),pe=this._sliderOrthogonalMousePosition(V),Te=this._scrollbarState.clone();this.slider.toggleClassName("active",!0),this._mouseMoveMonitor.startMonitoring(V.target,V.buttons,A.b,Ie=>{const Me=this._sliderOrthogonalMousePosition(Ie),Oe=Math.abs(Me-pe);if(D.i&&Oe>L){this._setDesiredScrollPositionNow(Te.getScrollPosition());return}const Xe=this._sliderMousePosition(Ie),fe=Xe-ee;this._setDesiredScrollPositionNow(Te.getDesiredScrollPositionFromDelta(fe))},()=>{this.slider.toggleClassName("active",!1),this._host.onDragEnd(),G()}),this._host.onDragStart()}_setDesiredScrollPositionNow(V){const G={};this.writeScrollPosition(G,V),this._scrollable.setScrollPositionNow(G)}updateScrollbarSize(V){this._updateScrollbarSize(V),this._scrollbarState.setScrollbarSize(V),this._shouldRender=!0,this._lazyRender||this.render()}isNeeded(){return this._scrollbarState.isNeeded()}}const w=20;class b{constructor(V,G,ee,pe,Te,Ie){this._scrollbarSize=Math.round(G),this._oppositeScrollbarSize=Math.round(ee),this._arrowSize=Math.round(V),this._visibleSize=pe,this._scrollSize=Te,this._scrollPosition=Ie,this._computedAvailableSize=0,this._computedIsNeeded=!1,this._computedSliderSize=0,this._computedSliderRatio=0,this._computedSliderPosition=0,this._refreshComputedValues()}clone(){return new b(this._arrowSize,this._scrollbarSize,this._oppositeScrollbarSize,this._visibleSize,this._scrollSize,this._scrollPosition)}setVisibleSize(V){const G=Math.round(V);return this._visibleSize!==G?(this._visibleSize=G,this._refreshComputedValues(),!0):!1}setScrollSize(V){const G=Math.round(V);return this._scrollSize!==G?(this._scrollSize=G,this._refreshComputedValues(),!0):!1}setScrollPosition(V){const G=Math.round(V);return this._scrollPosition!==G?(this._scrollPosition=G,this._refreshComputedValues(),!0):!1}setScrollbarSize(V){this._scrollbarSize=Math.round(V)}setOppositeScrollbarSize(V){this._oppositeScrollbarSize=Math.round(V)}static _computeValues(V,G,ee,pe,Te){const Ie=Math.max(0,ee-V),Me=Math.max(0,Ie-2*G),Oe=pe>0&&pe>ee;if(!Oe)return{computedAvailableSize:Math.round(Ie),computedIsNeeded:Oe,computedSliderSize:Math.round(Me),computedSliderRatio:0,computedSliderPosition:0};const Xe=Math.round(Math.max(w,Math.floor(ee*Me/pe))),fe=(Me-Xe)/(pe-ee),Pe=Te*fe;return{computedAvailableSize:Math.round(Ie),computedIsNeeded:Oe,computedSliderSize:Math.round(Xe),computedSliderRatio:fe,computedSliderPosition:Math.round(Pe)}}_refreshComputedValues(){const V=b._computeValues(this._oppositeScrollbarSize,this._arrowSize,this._visibleSize,this._scrollSize,this._scrollPosition);this._computedAvailableSize=V.computedAvailableSize,this._computedIsNeeded=V.computedIsNeeded,this._computedSliderSize=V.computedSliderSize,this._computedSliderRatio=V.computedSliderRatio,this._computedSliderPosition=V.computedSliderPosition}getArrowSize(){return this._arrowSize}getScrollPosition(){return this._scrollPosition}getRectangleLargeSize(){return this._computedAvailableSize}getRectangleSmallSize(){return this._scrollbarSize}isNeeded(){return this._computedIsNeeded}getSliderSize(){return this._computedSliderSize}getSliderPosition(){return this._computedSliderPosition}getDesiredScrollPositionFromOffset(V){if(!this._computedIsNeeded)return 0;const G=V-this._arrowSize-this._computedSliderSize/2;return Math.round(G/this._computedSliderRatio)}getDesiredScrollPositionFromOffsetPaged(V){if(!this._computedIsNeeded)return 0;const G=V-this._arrowSize;let ee=this._scrollPosition;return G<this._computedSliderPosition?ee-=this._visibleSize:ee+=this._visibleSize,ee}getDesiredScrollPositionFromDelta(V){if(!this._computedIsNeeded)return 0;const G=this._computedSliderPosition+V;return Math.round(G/this._computedSliderRatio)}}var u=t("Vhoy");const c=Object(u.e)("scrollbar-button-left",u.b.triangleLeft),p=Object(u.e)("scrollbar-button-right",u.b.triangleRight);class S extends r{constructor(V,G,ee){const pe=V.getScrollDimensions(),Te=V.getCurrentScrollPosition();super({lazyRender:G.lazyRender,host:ee,scrollbarState:new b(G.horizontalHasArrows?G.arrowSize:0,G.horizontal===2?0:G.horizontalScrollbarSize,G.vertical===2?0:G.verticalScrollbarSize,pe.width,pe.scrollWidth,Te.scrollLeft),visibility:G.horizontal,extraScrollbarClassName:"horizontal",scrollable:V,scrollByPage:G.scrollByPage});if(G.horizontalHasArrows){const Ie=(G.arrowSize-v)/2,Me=(G.horizontalScrollbarSize-v)/2;this._createArrow({className:"scra",icon:c,top:Me,left:Ie,bottom:void 0,right:void 0,bgWidth:G.arrowSize,bgHeight:G.horizontalScrollbarSize,onActivate:()=>this._host.onMouseWheel(new R.b(null,1,0))}),this._createArrow({className:"scra",icon:p,top:Me,left:void 0,bottom:void 0,right:Ie,bgWidth:G.arrowSize,bgHeight:G.horizontalScrollbarSize,onActivate:()=>this._host.onMouseWheel(new R.b(null,-1,0))})}this._createSlider(Math.floor((G.horizontalScrollbarSize-G.horizontalSliderSize)/2),0,void 0,G.horizontalSliderSize)}_updateSlider(V,G){this.slider.setWidth(V),this.slider.setLeft(G)}_renderDomNode(V,G){this.domNode.setWidth(V),this.domNode.setHeight(G),this.domNode.setLeft(0),this.domNode.setBottom(0)}onDidScroll(V){return this._shouldRender=this._onElementScrollSize(V.scrollWidth)||this._shouldRender,this._shouldRender=this._onElementScrollPosition(V.scrollLeft)||this._shouldRender,this._shouldRender=this._onElementSize(V.width)||this._shouldRender,this._shouldRender}_mouseDownRelativePosition(V,G){return V}_sliderMousePosition(V){return V.posx}_sliderOrthogonalMousePosition(V){return V.posy}_updateScrollbarSize(V){this.slider.setHeight(V)}writeScrollPosition(V,G){V.scrollLeft=G}updateOptions(V){this.updateScrollbarSize(V.horizontal===2?0:V.horizontalScrollbarSize),this._scrollbarState.setOppositeScrollbarSize(V.vertical===2?0:V.verticalScrollbarSize),this._visibilityController.setVisibility(V.horizontal),this._scrollByPage=V.scrollByPage}}const E=Object(u.e)("scrollbar-button-up",u.b.triangleUp),y=Object(u.e)("scrollbar-button-down",u.b.triangleDown);class O extends r{constructor(V,G,ee){const pe=V.getScrollDimensions(),Te=V.getCurrentScrollPosition();super({lazyRender:G.lazyRender,host:ee,scrollbarState:new b(G.verticalHasArrows?G.arrowSize:0,G.vertical===2?0:G.verticalScrollbarSize,0,pe.height,pe.scrollHeight,Te.scrollTop),visibility:G.vertical,extraScrollbarClassName:"vertical",scrollable:V,scrollByPage:G.scrollByPage});if(G.verticalHasArrows){const Ie=(G.arrowSize-v)/2,Me=(G.verticalScrollbarSize-v)/2;this._createArrow({className:"scra",icon:E,top:Ie,left:Me,bottom:void 0,right:void 0,bgWidth:G.verticalScrollbarSize,bgHeight:G.arrowSize,onActivate:()=>this._host.onMouseWheel(new R.b(null,0,1))}),this._createArrow({className:"scra",icon:y,top:void 0,left:Me,bottom:Ie,right:void 0,bgWidth:G.verticalScrollbarSize,bgHeight:G.arrowSize,onActivate:()=>this._host.onMouseWheel(new R.b(null,0,-1))})}this._createSlider(0,Math.floor((G.verticalScrollbarSize-G.verticalSliderSize)/2),G.verticalSliderSize,void 0)}_updateSlider(V,G){this.slider.setHeight(V),this.slider.setTop(G)}_renderDomNode(V,G){this.domNode.setWidth(G),this.domNode.setHeight(V),this.domNode.setRight(0),this.domNode.setTop(0)}onDidScroll(V){return this._shouldRender=this._onElementScrollSize(V.scrollHeight)||this._shouldRender,this._shouldRender=this._onElementScrollPosition(V.scrollTop)||this._shouldRender,this._shouldRender=this._onElementSize(V.height)||this._shouldRender,this._shouldRender}_mouseDownRelativePosition(V,G){return G}_sliderMousePosition(V){return V.posy}_sliderOrthogonalMousePosition(V){return V.posx}_updateScrollbarSize(V){this.slider.setWidth(V)}writeScrollPosition(V,G){V.scrollTop=G}updateOptions(V){this.updateScrollbarSize(V.vertical===2?0:V.verticalScrollbarSize),this._scrollbarState.setOppositeScrollbarSize(0),this._visibilityController.setVisibility(V.vertical),this._scrollByPage=V.scrollByPage}}var k=t("MI8n"),Q=t("QuOb"),q=t("eq1K");const z=500,J=50,re=!0;class Z{constructor(V,G,ee){this.timestamp=V,this.deltaX=G,this.deltaY=ee,this.score=0}}class ne{constructor(){this._capacity=5,this._memory=[],this._front=-1,this._rear=-1}isPhysicalMouseWheel(){if(this._front===-1&&this._rear===-1)return!1;let V=1,G=0,ee=1,pe=this._rear;do{const Te=pe===this._front?V:Math.pow(2,-ee);if(V-=Te,G+=this._memory[pe].score*Te,pe===this._front)break;pe=(this._capacity+pe-1)%this._capacity,ee++}while(!0);return G<=.5}accept(V,G,ee){const pe=new Z(V,G,ee);pe.score=this._computeScore(pe),this._front===-1&&this._rear===-1?(this._memory[0]=pe,this._front=0,this._rear=0):(this._rear=(this._rear+1)%this._capacity,this._rear===this._front&&(this._front=(this._front+1)%this._capacity),this._memory[this._rear]=pe)}_computeScore(V){if(Math.abs(V.deltaX)>0&&Math.abs(V.deltaY)>0)return 1;let G=.5;const ee=this._front===-1&&this._rear===-1?null:this._memory[this._rear];return(!this._isAlmostInt(V.deltaX)||!this._isAlmostInt(V.deltaY))&&(G+=.25),Math.min(Math.max(G,0),1)}_isAlmostInt(V){const G=Math.abs(Math.round(V)-V);return G<.01}}ne.INSTANCE=new ne;class le extends j.a{constructor(V,G,ee){super();this._onScroll=this._register(new k.b),this.onScroll=this._onScroll.event,this._onWillScroll=this._register(new k.b),V.style.overflow="hidden",this._options=ae(G),this._scrollable=ee,this._register(this._scrollable.onScroll(Te=>{this._onWillScroll.fire(Te),this._onDidScroll(Te),this._onScroll.fire(Te)}));const pe={onMouseWheel:Te=>this._onMouseWheel(Te),onDragStart:()=>this._onDragStart(),onDragEnd:()=>this._onDragEnd()};this._verticalScrollbar=this._register(new O(this._scrollable,this._options,pe)),this._horizontalScrollbar=this._register(new S(this._scrollable,this._options,pe)),this._domNode=document.createElement("div"),this._domNode.className="monaco-scrollable-element "+this._options.className,this._domNode.setAttribute("role","presentation"),this._domNode.style.position="relative",this._domNode.style.overflow="hidden",this._domNode.appendChild(V),this._domNode.appendChild(this._horizontalScrollbar.domNode.domNode),this._domNode.appendChild(this._verticalScrollbar.domNode.domNode),this._options.useShadows?(this._leftShadowDomNode=Object(x.b)(document.createElement("div")),this._leftShadowDomNode.setClassName("shadow"),this._domNode.appendChild(this._leftShadowDomNode.domNode),this._topShadowDomNode=Object(x.b)(document.createElement("div")),this._topShadowDomNode.setClassName("shadow"),this._domNode.appendChild(this._topShadowDomNode.domNode),this._topLeftShadowDomNode=Object(x.b)(document.createElement("div")),this._topLeftShadowDomNode.setClassName("shadow"),this._domNode.appendChild(this._topLeftShadowDomNode.domNode)):(this._leftShadowDomNode=null,this._topShadowDomNode=null,this._topLeftShadowDomNode=null),this._listenOnDomNode=this._options.listenOnDomNode||this._domNode,this._mouseWheelToDispose=[],this._setListeningToMouseWheel(this._options.handleMouseWheel),this.onmouseover(this._listenOnDomNode,Te=>this._onMouseOver(Te)),this.onnonbubblingmouseout(this._listenOnDomNode,Te=>this._onMouseOut(Te)),this._hideTimeout=this._register(new I.g),this._isDragging=!1,this._mouseIsOver=!1,this._shouldRender=!0,this._revealOnScroll=!0}dispose(){this._mouseWheelToDispose=Object(m.f)(this._mouseWheelToDispose),super.dispose()}getDomNode(){return this._domNode}getOverviewRulerLayoutInfo(){return{parent:this._domNode,insertBefore:this._verticalScrollbar.domNode.domNode}}delegateVerticalScrollbarMouseDown(V){this._verticalScrollbar.delegateMouseDown(V)}getScrollDimensions(){return this._scrollable.getScrollDimensions()}setScrollDimensions(V){this._scrollable.setScrollDimensions(V,!1)}updateClassName(V){this._options.className=V,D.f&&(this._options.className+=" mac"),this._domNode.className="monaco-scrollable-element "+this._options.className}updateOptions(V){typeof V.handleMouseWheel!="undefined"&&(this._options.handleMouseWheel=V.handleMouseWheel,this._setListeningToMouseWheel(this._options.handleMouseWheel)),typeof V.mouseWheelScrollSensitivity!="undefined"&&(this._options.mouseWheelScrollSensitivity=V.mouseWheelScrollSensitivity),typeof V.fastScrollSensitivity!="undefined"&&(this._options.fastScrollSensitivity=V.fastScrollSensitivity),typeof V.scrollPredominantAxis!="undefined"&&(this._options.scrollPredominantAxis=V.scrollPredominantAxis),typeof V.horizontal!="undefined"&&(this._options.horizontal=V.horizontal),typeof V.vertical!="undefined"&&(this._options.vertical=V.vertical),typeof V.horizontalScrollbarSize!="undefined"&&(this._options.horizontalScrollbarSize=V.horizontalScrollbarSize),typeof V.verticalScrollbarSize!="undefined"&&(this._options.verticalScrollbarSize=V.verticalScrollbarSize),typeof V.scrollByPage!="undefined"&&(this._options.scrollByPage=V.scrollByPage),this._horizontalScrollbar.updateOptions(this._options),this._verticalScrollbar.updateOptions(this._options),this._options.lazyRender||this._render()}_setListeningToMouseWheel(V){const G=this._mouseWheelToDispose.length>0;if(G===V)return;if(this._mouseWheelToDispose=Object(m.f)(this._mouseWheelToDispose),V){const ee=pe=>{this._onMouseWheel(new R.b(pe))};this._mouseWheelToDispose.push(B.i(this._listenOnDomNode,B.d.MOUSE_WHEEL,ee,{passive:!1}))}}_onMouseWheel(V){const G=ne.INSTANCE;if(re){const Te=window.devicePixelRatio/Object(g.c)();D.i||D.d?G.accept(Date.now(),V.deltaX/Te,V.deltaY/Te):G.accept(Date.now(),V.deltaX,V.deltaY)}let ee=!1;if(V.deltaY||V.deltaX){let Te=V.deltaY*this._options.mouseWheelScrollSensitivity,Ie=V.deltaX*this._options.mouseWheelScrollSensitivity;this._options.scrollPredominantAxis&&(Math.abs(Te)>=Math.abs(Ie)?Ie=0:Te=0),this._options.flipAxes&&([Te,Ie]=[Ie,Te]);const Me=!D.f&&V.browserEvent&&V.browserEvent.shiftKey;(this._options.scrollYToX||Me)&&!Ie&&(Ie=Te,Te=0),V.browserEvent&&V.browserEvent.altKey&&(Ie=Ie*this._options.fastScrollSensitivity,Te=Te*this._options.fastScrollSensitivity);const Oe=this._scrollable.getFutureScrollPosition();let Xe={};if(Te){const fe=J*Te,Pe=Oe.scrollTop-(fe<0?Math.floor(fe):Math.ceil(fe));this._verticalScrollbar.writeScrollPosition(Xe,Pe)}if(Ie){const fe=J*Ie,Pe=Oe.scrollLeft-(fe<0?Math.floor(fe):Math.ceil(fe));this._horizontalScrollbar.writeScrollPosition(Xe,Pe)}if(Xe=this._scrollable.validateScrollPosition(Xe),Oe.scrollLeft!==Xe.scrollLeft||Oe.scrollTop!==Xe.scrollTop){const fe=re&&this._options.mouseWheelSmoothScroll&&G.isPhysicalMouseWheel();fe?this._scrollable.setScrollPositionSmooth(Xe):this._scrollable.setScrollPositionNow(Xe),ee=!0}}let pe=ee;!pe&&this._options.alwaysConsumeMouseWheel&&(pe=!0),!pe&&this._options.consumeMouseWheelIfScrollbarIsNeeded&&(this._verticalScrollbar.isNeeded()||this._horizontalScrollbar.isNeeded())&&(pe=!0),pe&&(V.preventDefault(),V.stopPropagation())}_onDidScroll(V){this._shouldRender=this._horizontalScrollbar.onDidScroll(V)||this._shouldRender,this._shouldRender=this._verticalScrollbar.onDidScroll(V)||this._shouldRender,this._options.useShadows&&(this._shouldRender=!0),this._revealOnScroll&&this._reveal(),this._options.lazyRender||this._render()}renderNow(){if(!this._options.lazyRender)throw new Error("Please use `lazyRender` together with `renderNow`!");this._render()}_render(){if(!this._shouldRender)return;if(this._shouldRender=!1,this._horizontalScrollbar.render(),this._verticalScrollbar.render(),this._options.useShadows){const V=this._scrollable.getCurrentScrollPosition(),G=V.scrollTop>0,ee=V.scrollLeft>0,pe=ee?" left":"",Te=G?" top":"",Ie=ee||G?" top-left-corner":"";this._leftShadowDomNode.setClassName(`shadow${pe}`),this._topShadowDomNode.setClassName(`shadow${Te}`),this._topLeftShadowDomNode.setClassName(`shadow${Ie}${Te}${pe}`)}}_onDragStart(){this._isDragging=!0,this._reveal()}_onDragEnd(){this._isDragging=!1,this._hide()}_onMouseOut(V){this._mouseIsOver=!1,this._hide()}_onMouseOver(V){this._mouseIsOver=!0,this._reveal()}_reveal(){this._verticalScrollbar.beginReveal(),this._horizontalScrollbar.beginReveal(),this._scheduleHide()}_hide(){!this._mouseIsOver&&!this._isDragging&&(this._verticalScrollbar.beginHide(),this._horizontalScrollbar.beginHide())}_scheduleHide(){!this._mouseIsOver&&!this._isDragging&&this._hideTimeout.cancelAndSet(()=>this._hide(),z)}}class _e extends le{constructor(V,G){G=G||{},G.mouseWheelSmoothScroll=!1;const ee=new Q.a(0,pe=>B.V(pe));super(V,G,ee);this._register(ee)}setScrollPosition(V){this._scrollable.setScrollPositionNow(V)}getScrollPosition(){return this._scrollable.getCurrentScrollPosition()}}class Ce extends le{constructor(V,G,ee){super(V,G,ee)}setScrollPosition(V){V.reuseAnimation?this._scrollable.setScrollPositionSmooth(V,V.reuseAnimation):this._scrollable.setScrollPositionNow(V)}getScrollPosition(){return this._scrollable.getCurrentScrollPosition()}}class oe extends _e{constructor(V,G){super(V,G);this._element=V,this.onScroll(ee=>{ee.scrollTopChanged&&(this._element.scrollTop=ee.scrollTop),ee.scrollLeftChanged&&(this._element.scrollLeft=ee.scrollLeft)}),this.scanDomNode()}scanDomNode(){this.setScrollDimensions({width:this._element.clientWidth,scrollWidth:this._element.scrollWidth,height:this._element.clientHeight,scrollHeight:this._element.scrollHeight}),this.setScrollPosition({scrollLeft:this._element.scrollLeft,scrollTop:this._element.scrollTop})}}function ae(V){const G={lazyRender:typeof V.lazyRender!="undefined"?V.lazyRender:!1,className:typeof V.className!="undefined"?V.className:"",useShadows:typeof V.useShadows!="undefined"?V.useShadows:!0,handleMouseWheel:typeof V.handleMouseWheel!="undefined"?V.handleMouseWheel:!0,flipAxes:typeof V.flipAxes!="undefined"?V.flipAxes:!1,consumeMouseWheelIfScrollbarIsNeeded:typeof V.consumeMouseWheelIfScrollbarIsNeeded!="undefined"?V.consumeMouseWheelIfScrollbarIsNeeded:!1,alwaysConsumeMouseWheel:typeof V.alwaysConsumeMouseWheel!="undefined"?V.alwaysConsumeMouseWheel:!1,scrollYToX:typeof V.scrollYToX!="undefined"?V.scrollYToX:!1,mouseWheelScrollSensitivity:typeof V.mouseWheelScrollSensitivity!="undefined"?V.mouseWheelScrollSensitivity:1,fastScrollSensitivity:typeof V.fastScrollSensitivity!="undefined"?V.fastScrollSensitivity:5,scrollPredominantAxis:typeof V.scrollPredominantAxis!="undefined"?V.scrollPredominantAxis:!0,mouseWheelSmoothScroll:typeof V.mouseWheelSmoothScroll!="undefined"?V.mouseWheelSmoothScroll:!0,arrowSize:typeof V.arrowSize!="undefined"?V.arrowSize:11,listenOnDomNode:typeof V.listenOnDomNode!="undefined"?V.listenOnDomNode:null,horizontal:typeof V.horizontal!="undefined"?V.horizontal:1,horizontalScrollbarSize:typeof V.horizontalScrollbarSize!="undefined"?V.horizontalScrollbarSize:10,horizontalSliderSize:typeof V.horizontalSliderSize!="undefined"?V.horizontalSliderSize:0,horizontalHasArrows:typeof V.horizontalHasArrows!="undefined"?V.horizontalHasArrows:!1,vertical:typeof V.vertical!="undefined"?V.vertical:1,verticalScrollbarSize:typeof V.verticalScrollbarSize!="undefined"?V.verticalScrollbarSize:10,verticalHasArrows:typeof V.verticalHasArrows!="undefined"?V.verticalHasArrows:!1,verticalSliderSize:typeof V.verticalSliderSize!="undefined"?V.verticalSliderSize:0,scrollByPage:typeof V.scrollByPage!="undefined"?V.scrollByPage:!1};return G.horizontalSliderSize=typeof V.horizontalSliderSize!="undefined"?V.horizontalSliderSize:G.horizontalScrollbarSize,G.verticalSliderSize=typeof V.verticalSliderSize!="undefined"?V.verticalSliderSize:G.verticalScrollbarSize,D.f&&(G.className+=" mac"),G}},"GR/f":function(mt,M,t){"use strict";t.d(M,"a",function(){return D}),t.d(M,"b",function(){return L});var g=t("/cxE"),B=t("N0LK"),x=t("LCkn"),R=t("zN7H"),A=t("aokT"),j=t("gCVg");class I{constructor(c,p,S){this._range=c,this._charBeforeSelection=p,this._charAfterSelection=S}getEditOperations(c,p){p.addTrackedEditOperation(new A.a(this._range.startLineNumber,this._range.startColumn,this._range.startLineNumber,this._range.startColumn),this._charBeforeSelection),p.addTrackedEditOperation(new A.a(this._range.endLineNumber,this._range.endColumn,this._range.endLineNumber,this._range.endColumn),this._charAfterSelection)}computeCursorState(c,p){let S=p.getInverseEditOperations(),E=S[0].range,y=S[1].range;return new j.a(E.endLineNumber,E.endColumn,y.endLineNumber,y.endColumn-this._charAfterSelection.length)}}var v=t("Ll0s"),C=t("5v8Y"),m=t("KDc4"),d=t("cMvZ");class D{static indent(c,p,S){if(p===null||S===null)return[];let E=[];for(let y=0,O=S.length;y<O;y++)E[y]=new R.a(S[y],{isUnshift:!1,tabSize:c.tabSize,indentSize:c.indentSize,insertSpaces:c.insertSpaces,useTabStops:c.useTabStops,autoIndent:c.autoIndent});return E}static outdent(c,p,S){let E=[];for(let y=0,O=S.length;y<O;y++)E[y]=new R.a(S[y],{isUnshift:!0,tabSize:c.tabSize,indentSize:c.indentSize,insertSpaces:c.insertSpaces,useTabStops:c.useTabStops,autoIndent:c.autoIndent});return E}static shiftIndent(c,p,S){return S=S||1,R.a.shiftIndent(p,p.length+S,c.tabSize,c.indentSize,c.insertSpaces)}static unshiftIndent(c,p,S){return S=S||1,R.a.unshiftIndent(p,p.length+S,c.tabSize,c.indentSize,c.insertSpaces)}static _distributedPaste(c,p,S,E){let y=[];for(let O=0,k=S.length;O<k;O++)y[O]=new x.a(S[O],E[O]);return new v.e(0,y,{shouldPushStackElementBefore:!0,shouldPushStackElementAfter:!0})}static _simplePaste(c,p,S,E,y){let O=[];for(let k=0,Q=S.length;k<Q;k++){const q=S[k];let z=q.getPosition();if(y&&!q.isEmpty()&&(y=!1),y&&E.indexOf(`
|
|
|
`)!==E.length-1&&(y=!1),y){let J=new A.a(z.lineNumber,1,z.lineNumber,1);O[k]=new x.b(J,E,q,!0)}else O[k]=new x.a(q,E)}return new v.e(0,O,{shouldPushStackElementBefore:!0,shouldPushStackElementAfter:!0})}static _distributePasteToCursors(c,p,S,E,y){if(E)return null;if(p.length===1)return null;if(y&&y.length===p.length)return y;if(c.multiCursorPaste==="spread"){S.charCodeAt(S.length-1)===10&&(S=S.substr(0,S.length-1)),S.charCodeAt(S.length-1)===13&&(S=S.substr(0,S.length-1));let O=B.Q(S);if(O.length===p.length)return O}return null}static paste(c,p,S,E,y,O){const k=this._distributePasteToCursors(c,S,E,y,O);return k?(S=S.sort(A.a.compareRangesUsingStarts),this._distributedPaste(c,p,S,k)):this._simplePaste(c,p,S,E,y)}static _goodIndentForLine(c,p,S){let E=null,y="";const O=d.b.getInheritIndentForLine(c.autoIndent,p,S,!1);if(O)E=O.action,y=O.indentation;else if(S>1){let k;for(k=S-1;k>=1;k--){const z=p.getLineContent(k),J=B.I(z);if(J>=0)break}if(k<1)return null;const Q=p.getLineMaxColumn(k),q=d.b.getEnterAction(c.autoIndent,p,new A.a(k,Q,k,Q));q&&(y=q.indentation+q.appendText)}return E&&(E===m.b.Indent&&(y=D.shiftIndent(c,y)),E===m.b.Outdent&&(y=D.unshiftIndent(c,y)),y=c.normalizeIndentation(y)),y||null}static _replaceJumpToNextIndent(c,p,S,E){let y="",O=S.getStartPosition();if(c.insertSpaces){let k=v.a.visibleColumnFromColumn2(c,p,O),Q=c.indentSize,q=Q-k%Q;for(let z=0;z<q;z++)y+=" "}else y=" ";return new x.a(S,y,E)}static tab(c,p,S){let E=[];for(let y=0,O=S.length;y<O;y++){const k=S[y];if(k.isEmpty()){let Q=p.getLineContent(k.startLineNumber);if(/^\s*$/.test(Q)&&p.isCheapToTokenize(k.startLineNumber)){let q=this._goodIndentForLine(c,p,k.startLineNumber);q=q||" ";let z=c.normalizeIndentation(q);if(!Q.startsWith(z)){E[y]=new x.a(new A.a(k.startLineNumber,1,k.startLineNumber,Q.length+1),z,!0);continue}}E[y]=this._replaceJumpToNextIndent(c,p,k,!0)}else{if(k.startLineNumber===k.endLineNumber){let Q=p.getLineMaxColumn(k.startLineNumber);if(k.startColumn!==1||k.endColumn!==Q){E[y]=this._replaceJumpToNextIndent(c,p,k,!1);continue}}E[y]=new R.a(k,{isUnshift:!1,tabSize:c.tabSize,indentSize:c.indentSize,insertSpaces:c.insertSpaces,useTabStops:c.useTabStops,autoIndent:c.autoIndent})}}return E}static compositionType(c,p,S,E,y,O,k,Q){const q=E.map(z=>this._compositionType(S,z,y,O,k,Q));return new v.e(4,q,{shouldPushStackElementBefore:w(c,4),shouldPushStackElementAfter:!1})}static _compositionType(c,p,S,E,y,O){if(!p.isEmpty())return null;const k=p.getPosition(),Q=Math.max(1,k.column-E),q=Math.min(c.getLineMaxColumn(k.lineNumber),k.column+y),z=new A.a(k.lineNumber,Q,k.lineNumber,q),J=c.getValueInRange(z);return J===S&&O===0?null:new x.d(z,S,0,O)}static _typeCommand(c,p,S){return S?new x.e(c,p,!0):new x.a(c,p,!0)}static _enter(c,p,S,E){if(c.autoIndent===0)return D._typeCommand(E,`
|
|
|
`,S);if(!p.isCheapToTokenize(E.getStartPosition().lineNumber)||c.autoIndent===1){let Q=p.getLineContent(E.startLineNumber),q=B.x(Q).substring(0,E.startColumn-1);return D._typeCommand(E,`
|
|
|
`+c.normalizeIndentation(q),S)}const y=d.b.getEnterAction(c.autoIndent,p,E);if(y){if(y.indentAction===m.b.None)return D._typeCommand(E,`
|
|
|
`+c.normalizeIndentation(y.indentation+y.appendText),S);if(y.indentAction===m.b.Indent)return D._typeCommand(E,`
|
|
|
`+c.normalizeIndentation(y.indentation+y.appendText),S);if(y.indentAction===m.b.IndentOutdent){const Q=c.normalizeIndentation(y.indentation),q=c.normalizeIndentation(y.indentation+y.appendText),z=`
|
|
|
`+q+`
|
|
|
`+Q;return S?new x.e(E,z,!0):new x.d(E,z,-1,q.length-Q.length,!0)}else if(y.indentAction===m.b.Outdent){const Q=D.unshiftIndent(c,y.indentation);return D._typeCommand(E,`
|
|
|
`+c.normalizeIndentation(Q+y.appendText),S)}}const O=p.getLineContent(E.startLineNumber),k=B.x(O).substring(0,E.startColumn-1);if(c.autoIndent>=4){const Q=d.b.getIndentForEnter(c.autoIndent,p,E,{unshiftIndent:q=>D.unshiftIndent(c,q),shiftIndent:q=>D.shiftIndent(c,q),normalizeIndentation:q=>c.normalizeIndentation(q)});if(Q){let q=v.a.visibleColumnFromColumn2(c,p,E.getEndPosition());const z=E.endColumn,J=p.getLineContent(E.endLineNumber),re=B.u(J);if(re>=0?E=E.setEndPosition(E.endLineNumber,Math.max(E.endColumn,re+1)):E=E.setEndPosition(E.endLineNumber,p.getLineMaxColumn(E.endLineNumber)),S)return new x.e(E,`
|
|
|
`+c.normalizeIndentation(Q.afterEnter),!0);{let Z=0;return z<=re+1&&(c.insertSpaces||(q=Math.ceil(q/c.indentSize)),Z=Math.min(q+1-c.normalizeIndentation(Q.afterEnter).length-1,0)),new x.d(E,`
|
|
|
`+c.normalizeIndentation(Q.afterEnter),0,Z,!0)}}}return D._typeCommand(E,`
|
|
|
`+c.normalizeIndentation(k),S)}static _isAutoIndentType(c,p,S){if(c.autoIndent<4)return!1;for(let E=0,y=S.length;E<y;E++)if(!p.isCheapToTokenize(S[E].getEndPosition().lineNumber))return!1;return!0}static _runAutoIndentType(c,p,S,E){const y=d.b.getIndentationAtPosition(p,S.startLineNumber,S.startColumn),O=d.b.getIndentActionForType(c.autoIndent,p,S,E,{shiftIndent:k=>D.shiftIndent(c,k),unshiftIndent:k=>D.unshiftIndent(c,k)});if(O===null)return null;if(O!==c.normalizeIndentation(y)){const k=p.getLineFirstNonWhitespaceColumn(S.startLineNumber);return k===0?D._typeCommand(new A.a(S.startLineNumber,1,S.endLineNumber,S.endColumn),c.normalizeIndentation(O)+E,!1):D._typeCommand(new A.a(S.startLineNumber,1,S.endLineNumber,S.endColumn),c.normalizeIndentation(O)+p.getLineContent(S.startLineNumber).substring(k-1,S.startColumn-1)+E,!1)}return null}static _isAutoClosingOvertype(c,p,S,E,y){if(c.autoClosingOvertype==="never")return!1;if(!c.autoClosingPairs.autoClosingPairsCloseSingleChar.has(y))return!1;for(let O=0,k=S.length;O<k;O++){const Q=S[O];if(!Q.isEmpty())return!1;const q=Q.getPosition(),z=p.getLineContent(q.lineNumber),J=z.charAt(q.column-1);if(J!==y)return!1;const re=Object(v.g)(y),Z=q.column>2?z.charCodeAt(q.column-2):0;if(Z===92&&re)return!1;if(c.autoClosingOvertype==="auto"){let ne=!1;for(let le=0,_e=E.length;le<_e;le++){const Ce=E[le];if(q.lineNumber===Ce.startLineNumber&&q.column===Ce.startColumn){ne=!0;break}}if(!ne)return!1}}return!0}static _runAutoClosingOvertype(c,p,S,E,y){let O=[];for(let k=0,Q=E.length;k<Q;k++){const q=E[k],z=q.getPosition(),J=new A.a(z.lineNumber,z.column,z.lineNumber,z.column+1);O[k]=new x.a(J,y)}return new v.e(4,O,{shouldPushStackElementBefore:w(c,4),shouldPushStackElementAfter:!1})}static _isBeforeClosingBrace(c,p){const S=p.charAt(0),E=c.autoClosingPairs.autoClosingPairsOpenByStart.get(S)||[],y=c.autoClosingPairs.autoClosingPairsCloseByStart.get(S)||[],O=E.some(Q=>p.startsWith(Q.open)),k=y.some(Q=>p.startsWith(Q.close));return!O&&k}static _findAutoClosingPairOpen(c,p,S,E){const y=c.autoClosingPairs.autoClosingPairsOpenByEnd.get(E);if(!y)return null;let O=null;for(const k of y)if(O===null||k.open.length>O.open.length){let Q=!0;for(const q of S){const z=p.getValueInRange(new A.a(q.lineNumber,q.column-k.open.length+1,q.lineNumber,q.column));if(z+E!==k.open){Q=!1;break}}Q&&(O=k)}return O}static _findSubAutoClosingPairClose(c,p){if(p.open.length<=1)return"";const S=p.close.charAt(p.close.length-1),E=c.autoClosingPairs.autoClosingPairsCloseByEnd.get(S)||[];let y=null;for(const O of E)O.open!==p.open&&p.open.includes(O.open)&&p.close.endsWith(O.close)&&((!y||O.open.length>y.open.length)&&(y=O));return y?y.close:""}static _getAutoClosingPairClose(c,p,S,E,y){const O=Object(v.g)(E),k=O?c.autoClosingQuotes:c.autoClosingBrackets;if(k==="never")return null;const Q=this._findAutoClosingPairOpen(c,p,S.map(re=>re.getPosition()),E);if(!Q)return null;const q=this._findSubAutoClosingPairClose(c,Q);let z=!0;const J=O?c.shouldAutoCloseBefore.quote:c.shouldAutoCloseBefore.bracket;for(let re=0,Z=S.length;re<Z;re++){const ne=S[re];if(!ne.isEmpty())return null;const le=ne.getPosition(),_e=p.getLineContent(le.lineNumber),Ce=_e.substring(le.column-1);if(Ce.startsWith(q)||(z=!1),_e.length>le.column-1){const V=_e.charAt(le.column-1),G=D._isBeforeClosingBrace(c,Ce);if(!G&&!J(V))return null}if(!p.isCheapToTokenize(le.lineNumber))return null;if(Q.open.length===1&&(E==="'"||E==='"')&&k!=="always"){const V=Object(C.a)(c.wordSeparators);if(y&&le.column>1&&V.get(_e.charCodeAt(le.column-2))===0)return null;if(!y&&le.column>2&&V.get(_e.charCodeAt(le.column-3))===0)return null}p.forceTokenization(le.lineNumber);const oe=p.getLineTokens(le.lineNumber);let ae=!1;try{ae=d.b.shouldAutoClosePair(Q,oe,y?le.column:le.column-1)}catch(V){Object(g.f)(V)}if(!ae)return null}return z?Q.close.substring(0,Q.close.length-q.length):Q.close}static _runAutoClosingOpenCharType(c,p,S,E,y,O,k){let Q=[];for(let q=0,z=E.length;q<z;q++){const J=E[q];Q[q]=new L(J,y,O,k)}return new v.e(4,Q,{shouldPushStackElementBefore:!0,shouldPushStackElementAfter:!1})}static _shouldSurroundChar(c,p){return Object(v.g)(p)?c.autoSurround==="quotes"||c.autoSurround==="languageDefined":c.autoSurround==="brackets"||c.autoSurround==="languageDefined"}static _isSurroundSelectionType(c,p,S,E){if(!D._shouldSurroundChar(c,E)||!c.surroundingPairs.hasOwnProperty(E))return!1;const y=Object(v.g)(E);for(let O=0,k=S.length;O<k;O++){const Q=S[O];if(Q.isEmpty())return!1;let q=!0;for(let z=Q.startLineNumber;z<=Q.endLineNumber;z++){const J=p.getLineContent(z),re=z===Q.startLineNumber?Q.startColumn-1:0,Z=z===Q.endLineNumber?Q.endColumn-1:J.length,ne=J.substring(re,Z);if(/[^ \t]/.test(ne)){q=!1;break}}if(q)return!1;if(y&&Q.startLineNumber===Q.endLineNumber&&Q.startColumn+1===Q.endColumn){const z=p.getValueInRange(Q);if(Object(v.g)(z))return!1}}return!0}static _runSurroundSelectionType(c,p,S,E,y){let O=[];for(let k=0,Q=E.length;k<Q;k++){const q=E[k],z=p.surroundingPairs[y];O[k]=new I(q,y,z)}return new v.e(0,O,{shouldPushStackElementBefore:!0,shouldPushStackElementAfter:!0})}static _isTypeInterceptorElectricChar(c,p,S){return!!(S.length===1&&p.isCheapToTokenize(S[0].getEndPosition().lineNumber))}static _typeInterceptorElectricChar(c,p,S,E,y){if(!p.electricChars.hasOwnProperty(y)||!E.isEmpty())return null;let O=E.getPosition();S.forceTokenization(O.lineNumber);let k=S.getLineTokens(O.lineNumber),Q;try{Q=d.b.onElectricCharacter(y,k,O.column)}catch(q){return Object(g.f)(q),null}if(!Q)return null;if(Q.matchOpenBracket){let q=(k.getLineContent()+y).lastIndexOf(Q.matchOpenBracket)+1,z=S.findMatchingBracketUp(Q.matchOpenBracket,{lineNumber:O.lineNumber,column:q});if(z){if(z.startLineNumber===O.lineNumber)return null;let J=S.getLineContent(z.startLineNumber),re=B.x(J),Z=p.normalizeIndentation(re),ne=S.getLineContent(O.lineNumber),le=S.getLineFirstNonWhitespaceColumn(O.lineNumber)||O.column,_e=ne.substring(le-1,O.column-1),Ce=Z+_e+y,oe=new A.a(O.lineNumber,1,O.lineNumber,O.column);const ae=new x.a(oe,Ce);return new v.e(r(Ce,c),[ae],{shouldPushStackElementBefore:!1,shouldPushStackElementAfter:!0})}}return null}static compositionEndWithInterceptors(c,p,S,E,y,O){if(!E||j.a.selectionsArrEqual(E,y))return null;let k=null;for(const q of y){if(!q.isEmpty())return null;const z=q.getPosition(),J=S.getValueInRange(new A.a(z.lineNumber,z.column-1,z.lineNumber,z.column));if(k===null)k=J;else if(k!==J)return null}if(!k)return null;if(this._isAutoClosingOvertype(p,S,y,O,k)){const q=y.map(z=>new x.a(new A.a(z.positionLineNumber,z.positionColumn,z.positionLineNumber,z.positionColumn+1),"",!1));return new v.e(4,q,{shouldPushStackElementBefore:!0,shouldPushStackElementAfter:!1})}const Q=this._getAutoClosingPairClose(p,S,y,k,!1);return Q!==null?this._runAutoClosingOpenCharType(c,p,S,y,k,!1,Q):null}static typeWithInterceptors(c,p,S,E,y,O,k){if(!c&&k===`
|
|
|
`){let z=[];for(let J=0,re=y.length;J<re;J++)z[J]=D._enter(S,E,!1,y[J]);return new v.e(4,z,{shouldPushStackElementBefore:!0,shouldPushStackElementAfter:!1})}if(!c&&this._isAutoIndentType(S,E,y)){let z=[],J=!1;for(let re=0,Z=y.length;re<Z;re++)if(z[re]=this._runAutoIndentType(S,E,y[re],k),!z[re]){J=!0;break}if(!J)return new v.e(4,z,{shouldPushStackElementBefore:!0,shouldPushStackElementAfter:!1})}if(!c&&this._isAutoClosingOvertype(S,E,y,O,k))return this._runAutoClosingOvertype(p,S,E,y,k);if(!c){const z=this._getAutoClosingPairClose(S,E,y,k,!0);if(z)return this._runAutoClosingOpenCharType(p,S,E,y,k,!0,z)}if(this._isSurroundSelectionType(S,E,y,k))return this._runSurroundSelectionType(p,S,E,y,k);if(!c&&this._isTypeInterceptorElectricChar(S,E,y)){const z=this._typeInterceptorElectricChar(p,S,E,y[0],k);if(z)return z}let Q=[];for(let z=0,J=y.length;z<J;z++)Q[z]=new x.a(y[z],k);const q=r(k,p);return new v.e(q,Q,{shouldPushStackElementBefore:w(p,q),shouldPushStackElementAfter:!1})}static typeWithoutInterceptors(c,p,S,E,y){let O=[];for(let Q=0,q=E.length;Q<q;Q++)O[Q]=new x.a(E[Q],y);const k=r(y,c);return new v.e(k,O,{shouldPushStackElementBefore:w(c,k),shouldPushStackElementAfter:!1})}static lineInsertBefore(c,p,S){if(p===null||S===null)return[];let E=[];for(let y=0,O=S.length;y<O;y++){let k=S[y].positionLineNumber;if(k===1)E[y]=new x.e(new A.a(1,1,1,1),`
|
|
|
`);else{k--;let Q=p.getLineMaxColumn(k);E[y]=this._enter(c,p,!1,new A.a(k,Q,k,Q))}}return E}static lineInsertAfter(c,p,S){if(p===null||S===null)return[];let E=[];for(let y=0,O=S.length;y<O;y++){const k=S[y].positionLineNumber;let Q=p.getLineMaxColumn(k);E[y]=this._enter(c,p,!1,new A.a(k,Q,k,Q))}return E}static lineBreakInsert(c,p,S){let E=[];for(let y=0,O=S.length;y<O;y++)E[y]=this._enter(c,p,!0,S[y]);return E}}class L extends x.d{constructor(c,p,S,E){super(c,(S?p:"")+E,0,-E.length);this._openCharacter=p,this._closeCharacter=E,this.closeCharacterRange=null,this.enclosingRange=null}computeCursorState(c,p){let S=p.getInverseEditOperations(),E=S[0].range;return this.closeCharacterRange=new A.a(E.startLineNumber,E.endColumn-this._closeCharacter.length,E.endLineNumber,E.endColumn),this.enclosingRange=new A.a(E.startLineNumber,E.endColumn-this._openCharacter.length-this._closeCharacter.length,E.endLineNumber,E.endColumn),super.computeCursorState(c,p)}}function r(c,p){return c===" "?p===5||p===6?6:5:4}function w(c,p){return u(c)&&!u(p)?!0:c===5?!1:b(c)!==b(p)}function b(c){return c===6||c===5?"space":c}function u(c){return c===4||c===5||c===6}},GZrW:function(mt,M,t){"use strict";t.r(M);var g=t("+hIS");Object(g.a)({id:"sol",extensions:[".sol"],aliases:["sol","solidity","Solidity"],loader:function(){return t.e(368).then(t.bind(null,"Csoz"))}})},Gb1F:function(mt,M,t){"use strict";t.r(M);var g=t("+hIS");Object(g.a)({id:"sb",extensions:[".sb"],aliases:["Small Basic","sb"],loader:function(){return t.e(364).then(t.bind(null,"ynbn"))}})},GvMn:function(mt,M,t){"use strict";t.r(M);var g=t("X+cX"),B=t("/cxE"),x=t("vATl"),R=t("sswD"),A=t("aokT"),j=t("gCVg"),I=t("wQH0"),v=t("tX9W"),C=t("pAvP"),m=t("kYye"),d=t("3/fG"),D=t("t9D7");class L{constructor(p,S,E){this._editRange=p,this._originalSelection=S,this._text=E}getEditOperations(p,S){S.addTrackedEditOperation(this._editRange,this._text)}computeCursorState(p,S){const E=S.getInverseEditOperations(),y=E[0].range;return this._originalSelection.isEmpty()?new j.a(y.endLineNumber,Math.min(this._originalSelection.positionColumn,y.endColumn),y.endLineNumber,Math.min(this._originalSelection.positionColumn,y.endColumn)):new j.a(y.endLineNumber,y.endColumn-this._text.length,y.endLineNumber,y.endColumn)}}var r=function(p,S,E,y){var O=arguments.length,k=O<3?S:y===null?y=Object.getOwnPropertyDescriptor(S,E):y,Q;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")k=Reflect.decorate(p,S,E,y);else for(var q=p.length-1;q>=0;q--)(Q=p[q])&&(k=(O<3?Q(k):O>3?Q(S,E,k):Q(S,E))||k);return O>3&&k&&Object.defineProperty(S,E,k),k},w=function(p,S){return function(E,y){S(E,y,p)}};let b=class p{constructor(S,E){this.decorationIds=[],this.editor=S,this.editorWorkerService=E}static get(S){return S.getContribution(p.ID)}dispose(){}run(S,E){this.currentRequest&&this.currentRequest.cancel();const y=this.editor.getSelection(),O=this.editor.getModel();if(!O||!y)return;let k=y;if(k.startLineNumber!==k.endLineNumber)return;const Q=new x.a(this.editor,1|4),q=O.uri;return this.editorWorkerService.canNavigateValueSet(q)?(this.currentRequest=Object(g.h)(z=>this.editorWorkerService.navigateValueSet(q,k,E)),this.currentRequest.then(z=>{if(!z||!z.range||!z.value)return;if(!Q.validate(this.editor))return;let J=A.a.lift(z.range),re=z.range,Z=z.value.length-(k.endColumn-k.startColumn);re={startLineNumber:re.startLineNumber,startColumn:re.startColumn,endLineNumber:re.endLineNumber,endColumn:re.startColumn+z.value.length},Z>1&&(k=new j.a(k.startLineNumber,k.startColumn,k.endLineNumber,k.endColumn+Z-1));const ne=new L(J,k,z.value);this.editor.pushUndoStop(),this.editor.executeCommand(S,ne),this.editor.pushUndoStop(),this.decorationIds=this.editor.deltaDecorations(this.decorationIds,[{range:re,options:p.DECORATION}]),this.decorationRemover&&this.decorationRemover.cancel(),this.decorationRemover=Object(g.n)(350),this.decorationRemover.then(()=>this.decorationIds=this.editor.deltaDecorations(this.decorationIds,[])).catch(B.f)}).catch(B.f)):Promise.resolve(void 0)}};b.ID="editor.contrib.inPlaceReplaceController",b.DECORATION=v.b.register({description:"in-place-replace",className:"valueSetReplacement"}),b=r([w(1,C.a)],b);class u extends R.b{constructor(){super({id:"editor.action.inPlaceReplace.up",label:d.a("InPlaceReplaceAction.previous.label","Replace with Previous Value"),alias:"Replace with Previous Value",precondition:I.a.writable,kbOpts:{kbExpr:I.a.editorTextFocus,primary:2048|1024|82,weight:100}})}run(p,S){const E=b.get(S);return E?E.run(this.id,!0):Promise.resolve(void 0)}}class c extends R.b{constructor(){super({id:"editor.action.inPlaceReplace.down",label:d.a("InPlaceReplaceAction.next.label","Replace with Next Value"),alias:"Replace with Next Value",precondition:I.a.writable,kbOpts:{kbExpr:I.a.editorTextFocus,primary:2048|1024|84,weight:100}})}run(p,S){const E=b.get(S);return E?E.run(this.id,!1):Promise.resolve(void 0)}}Object(R.l)(b.ID,b),Object(R.j)(u),Object(R.j)(c),Object(D.f)((p,S)=>{const E=p.getColor(m.k);E&&S.addRule(`.monaco-editor.vs .valueSetReplacement { outline: solid 2px ${E}; }`)})},Gw4z:function(mt,M,t){"use strict";t.d(M,"b",function(){return R}),t.d(M,"a",function(){return v});class g{constructor(C,m,d,D){this.originalStart=C,this.originalLength=m,this.modifiedStart=d,this.modifiedLength=D}getOriginalEnd(){return this.originalStart+this.originalLength}getModifiedEnd(){return this.modifiedStart+this.modifiedLength}}var B=t("7afs");class x{constructor(C){this.source=C}getElements(){const C=this.source,m=new Int32Array(C.length);for(let d=0,D=C.length;d<D;d++)m[d]=C.charCodeAt(d);return m}}function R(C,m,d){return new v(new x(C),new x(m)).ComputeDiff(d).changes}class A{static Assert(C,m){if(!C)throw new Error(m)}}class j{static Copy(C,m,d,D,L){for(let r=0;r<L;r++)d[D+r]=C[m+r]}static Copy2(C,m,d,D,L){for(let r=0;r<L;r++)d[D+r]=C[m+r]}}class I{constructor(){this.m_changes=[],this.m_originalStart=1073741824,this.m_modifiedStart=1073741824,this.m_originalCount=0,this.m_modifiedCount=0}MarkNextChange(){(this.m_originalCount>0||this.m_modifiedCount>0)&&this.m_changes.push(new g(this.m_originalStart,this.m_originalCount,this.m_modifiedStart,this.m_modifiedCount)),this.m_originalCount=0,this.m_modifiedCount=0,this.m_originalStart=1073741824,this.m_modifiedStart=1073741824}AddOriginalElement(C,m){this.m_originalStart=Math.min(this.m_originalStart,C),this.m_modifiedStart=Math.min(this.m_modifiedStart,m),this.m_originalCount++}AddModifiedElement(C,m){this.m_originalStart=Math.min(this.m_originalStart,C),this.m_modifiedStart=Math.min(this.m_modifiedStart,m),this.m_modifiedCount++}getChanges(){return(this.m_originalCount>0||this.m_modifiedCount>0)&&this.MarkNextChange(),this.m_changes}getReverseChanges(){return(this.m_originalCount>0||this.m_modifiedCount>0)&&this.MarkNextChange(),this.m_changes.reverse(),this.m_changes}}class v{constructor(C,m,d=null){this.ContinueProcessingPredicate=d,this._originalSequence=C,this._modifiedSequence=m;const[D,L,r]=v._getElements(C),[w,b,u]=v._getElements(m);this._hasStrings=r&&u,this._originalStringElements=D,this._originalElementsOrHash=L,this._modifiedStringElements=w,this._modifiedElementsOrHash=b,this.m_forwardHistory=[],this.m_reverseHistory=[]}static _isStringArray(C){return C.length>0&&typeof C[0]=="string"}static _getElements(C){const m=C.getElements();if(v._isStringArray(m)){const d=new Int32Array(m.length);for(let D=0,L=m.length;D<L;D++)d[D]=Object(B.d)(m[D],0);return[m,d,!0]}return m instanceof Int32Array?[[],m,!1]:[[],new Int32Array(m),!1]}ElementsAreEqual(C,m){return this._originalElementsOrHash[C]!==this._modifiedElementsOrHash[m]?!1:this._hasStrings?this._originalStringElements[C]===this._modifiedStringElements[m]:!0}ElementsAreStrictEqual(C,m){if(!this.ElementsAreEqual(C,m))return!1;const d=v._getStrictElement(this._originalSequence,C),D=v._getStrictElement(this._modifiedSequence,m);return d===D}static _getStrictElement(C,m){return typeof C.getStrictElement=="function"?C.getStrictElement(m):null}OriginalElementsAreEqual(C,m){return this._originalElementsOrHash[C]!==this._originalElementsOrHash[m]?!1:this._hasStrings?this._originalStringElements[C]===this._originalStringElements[m]:!0}ModifiedElementsAreEqual(C,m){return this._modifiedElementsOrHash[C]!==this._modifiedElementsOrHash[m]?!1:this._hasStrings?this._modifiedStringElements[C]===this._modifiedStringElements[m]:!0}ComputeDiff(C){return this._ComputeDiff(0,this._originalElementsOrHash.length-1,0,this._modifiedElementsOrHash.length-1,C)}_ComputeDiff(C,m,d,D,L){const r=[!1];let w=this.ComputeDiffRecursive(C,m,d,D,r);return L&&(w=this.PrettifyChanges(w)),{quitEarly:r[0],changes:w}}ComputeDiffRecursive(C,m,d,D,L){for(L[0]=!1;C<=m&&d<=D&&this.ElementsAreEqual(C,d);)C++,d++;for(;m>=C&&D>=d&&this.ElementsAreEqual(m,D);)m--,D--;if(C>m||d>D){let p;return d<=D?(A.Assert(C===m+1,"originalStart should only be one more than originalEnd"),p=[new g(C,0,d,D-d+1)]):C<=m?(A.Assert(d===D+1,"modifiedStart should only be one more than modifiedEnd"),p=[new g(C,m-C+1,d,0)]):(A.Assert(C===m+1,"originalStart should only be one more than originalEnd"),A.Assert(d===D+1,"modifiedStart should only be one more than modifiedEnd"),p=[]),p}const r=[0],w=[0],b=this.ComputeRecursionPoint(C,m,d,D,r,w,L),u=r[0],c=w[0];if(b!==null)return b;if(!L[0]){const p=this.ComputeDiffRecursive(C,u,d,c,L);let S=[];return L[0]?S=[new g(u+1,m-(u+1)+1,c+1,D-(c+1)+1)]:S=this.ComputeDiffRecursive(u+1,m,c+1,D,L),this.ConcatenateChanges(p,S)}return[new g(C,m-C+1,d,D-d+1)]}WALKTRACE(C,m,d,D,L,r,w,b,u,c,p,S,E,y,O,k,Q,q){let z=null,J=null,re=new I,Z=m,ne=d,le=E[0]-k[0]-D,_e=-1073741824,Ce=this.m_forwardHistory.length-1;do{const oe=le+C;oe===Z||oe<ne&&u[oe-1]<u[oe+1]?(p=u[oe+1],y=p-le-D,p<_e&&re.MarkNextChange(),_e=p,re.AddModifiedElement(p+1,y),le=oe+1-C):(p=u[oe-1]+1,y=p-le-D,p<_e&&re.MarkNextChange(),_e=p-1,re.AddOriginalElement(p,y+1),le=oe-1-C),Ce>=0&&(u=this.m_forwardHistory[Ce],C=u[0],Z=1,ne=u.length-1)}while(--Ce>=-1);if(z=re.getReverseChanges(),q[0]){let oe=E[0]+1,ae=k[0]+1;if(z!==null&&z.length>0){const V=z[z.length-1];oe=Math.max(oe,V.getOriginalEnd()),ae=Math.max(ae,V.getModifiedEnd())}J=[new g(oe,S-oe+1,ae,O-ae+1)]}else{re=new I,Z=r,ne=w,le=E[0]-k[0]-b,_e=1073741824,Ce=Q?this.m_reverseHistory.length-1:this.m_reverseHistory.length-2;do{const oe=le+L;oe===Z||oe<ne&&c[oe-1]>=c[oe+1]?(p=c[oe+1]-1,y=p-le-b,p>_e&&re.MarkNextChange(),_e=p+1,re.AddOriginalElement(p+1,y+1),le=oe+1-L):(p=c[oe-1],y=p-le-b,p>_e&&re.MarkNextChange(),_e=p,re.AddModifiedElement(p+1,y+1),le=oe-1-L),Ce>=0&&(c=this.m_reverseHistory[Ce],L=c[0],Z=1,ne=c.length-1)}while(--Ce>=-1);J=re.getChanges()}return this.ConcatenateChanges(z,J)}ComputeRecursionPoint(C,m,d,D,L,r,w){let b=0,u=0,c=0,p=0,S=0,E=0;C--,d--,L[0]=0,r[0]=0,this.m_forwardHistory=[],this.m_reverseHistory=[];const y=m-C+(D-d),O=y+1,k=new Int32Array(O),Q=new Int32Array(O),q=D-d,z=m-C,J=C-d,re=m-D,Z=z-q,ne=Z%2===0;k[q]=C,Q[z]=m,w[0]=!1;for(let le=1;le<=y/2+1;le++){let _e=0,Ce=0;c=this.ClipDiagonalBound(q-le,le,q,O),p=this.ClipDiagonalBound(q+le,le,q,O);for(let ae=c;ae<=p;ae+=2){ae===c||ae<p&&k[ae-1]<k[ae+1]?b=k[ae+1]:b=k[ae-1]+1,u=b-(ae-q)-J;const V=b;for(;b<m&&u<D&&this.ElementsAreEqual(b+1,u+1);)b++,u++;if(k[ae]=b,b+u>_e+Ce&&(_e=b,Ce=u),!ne&&Math.abs(ae-z)<=le-1&&b>=Q[ae])return L[0]=b,r[0]=u,V<=Q[ae]&&1447>0&&le<=1447+1?this.WALKTRACE(q,c,p,J,z,S,E,re,k,Q,b,m,L,u,D,r,ne,w):null}const oe=(_e-C+(Ce-d)-le)/2;if(this.ContinueProcessingPredicate!==null&&!this.ContinueProcessingPredicate(_e,oe))return w[0]=!0,L[0]=_e,r[0]=Ce,oe>0&&1447>0&&le<=1447+1?this.WALKTRACE(q,c,p,J,z,S,E,re,k,Q,b,m,L,u,D,r,ne,w):(C++,d++,[new g(C,m-C+1,d,D-d+1)]);S=this.ClipDiagonalBound(z-le,le,z,O),E=this.ClipDiagonalBound(z+le,le,z,O);for(let ae=S;ae<=E;ae+=2){ae===S||ae<E&&Q[ae-1]>=Q[ae+1]?b=Q[ae+1]-1:b=Q[ae-1],u=b-(ae-z)-re;const V=b;for(;b>C&&u>d&&this.ElementsAreEqual(b,u);)b--,u--;if(Q[ae]=b,ne&&Math.abs(ae-q)<=le&&b<=k[ae])return L[0]=b,r[0]=u,V>=k[ae]&&1447>0&&le<=1447+1?this.WALKTRACE(q,c,p,J,z,S,E,re,k,Q,b,m,L,u,D,r,ne,w):null}if(le<=1447){let ae=new Int32Array(p-c+2);ae[0]=q-c+1,j.Copy2(k,c,ae,1,p-c+1),this.m_forwardHistory.push(ae),ae=new Int32Array(E-S+2),ae[0]=z-S+1,j.Copy2(Q,S,ae,1,E-S+1),this.m_reverseHistory.push(ae)}}return this.WALKTRACE(q,c,p,J,z,S,E,re,k,Q,b,m,L,u,D,r,ne,w)}PrettifyChanges(C){for(let m=0;m<C.length;m++){const d=C[m],D=m<C.length-1?C[m+1].originalStart:this._originalElementsOrHash.length,L=m<C.length-1?C[m+1].modifiedStart:this._modifiedElementsOrHash.length,r=d.originalLength>0,w=d.modifiedLength>0;for(;d.originalStart+d.originalLength<D&&d.modifiedStart+d.modifiedLength<L&&(!r||this.OriginalElementsAreEqual(d.originalStart,d.originalStart+d.originalLength))&&(!w||this.ModifiedElementsAreEqual(d.modifiedStart,d.modifiedStart+d.modifiedLength));){const u=this.ElementsAreStrictEqual(d.originalStart,d.modifiedStart),c=this.ElementsAreStrictEqual(d.originalStart+d.originalLength,d.modifiedStart+d.modifiedLength);if(c&&!u)break;d.originalStart++,d.modifiedStart++}let b=[null];if(m<C.length-1&&this.ChangesOverlap(C[m],C[m+1],b)){C[m]=b[0],C.splice(m+1,1),m--;continue}}for(let m=C.length-1;m>=0;m--){const d=C[m];let D=0,L=0;if(m>0){const p=C[m-1];D=p.originalStart+p.originalLength,L=p.modifiedStart+p.modifiedLength}const r=d.originalLength>0,w=d.modifiedLength>0;let b=0,u=this._boundaryScore(d.originalStart,d.originalLength,d.modifiedStart,d.modifiedLength);for(let p=1;;p++){const S=d.originalStart-p,E=d.modifiedStart-p;if(S<D||E<L)break;if(r&&!this.OriginalElementsAreEqual(S,S+d.originalLength))break;if(w&&!this.ModifiedElementsAreEqual(E,E+d.modifiedLength))break;const y=S===D&&E===L,O=(y?5:0)+this._boundaryScore(S,d.originalLength,E,d.modifiedLength);O>u&&(u=O,b=p)}d.originalStart-=b,d.modifiedStart-=b;const c=[null];if(m>0&&this.ChangesOverlap(C[m-1],C[m],c)){C[m-1]=c[0],C.splice(m,1),m++;continue}}if(this._hasStrings)for(let m=1,d=C.length;m<d;m++){const D=C[m-1],L=C[m],r=L.originalStart-D.originalStart-D.originalLength,w=D.originalStart,b=L.originalStart+L.originalLength,u=b-w,c=D.modifiedStart,p=L.modifiedStart+L.modifiedLength,S=p-c;if(r<5&&u<20&&S<20){const E=this._findBetterContiguousSequence(w,u,c,S,r);if(E){const[y,O]=E;(y!==D.originalStart+D.originalLength||O!==D.modifiedStart+D.modifiedLength)&&(D.originalLength=y-D.originalStart,D.modifiedLength=O-D.modifiedStart,L.originalStart=y+r,L.modifiedStart=O+r,L.originalLength=b-L.originalStart,L.modifiedLength=p-L.modifiedStart)}}}return C}_findBetterContiguousSequence(C,m,d,D,L){if(m<L||D<L)return null;const r=C+m-L+1,w=d+D-L+1;let b=0,u=0,c=0;for(let p=C;p<r;p++)for(let S=d;S<w;S++){const E=this._contiguousSequenceScore(p,S,L);E>0&&E>b&&(b=E,u=p,c=S)}return b>0?[u,c]:null}_contiguousSequenceScore(C,m,d){let D=0;for(let L=0;L<d;L++){if(!this.ElementsAreEqual(C+L,m+L))return 0;D+=this._originalStringElements[C+L].length}return D}_OriginalIsBoundary(C){return C<=0||C>=this._originalElementsOrHash.length-1?!0:this._hasStrings&&/^\s*$/.test(this._originalStringElements[C])}_OriginalRegionIsBoundary(C,m){if(this._OriginalIsBoundary(C)||this._OriginalIsBoundary(C-1))return!0;if(m>0){const d=C+m;if(this._OriginalIsBoundary(d-1)||this._OriginalIsBoundary(d))return!0}return!1}_ModifiedIsBoundary(C){return C<=0||C>=this._modifiedElementsOrHash.length-1?!0:this._hasStrings&&/^\s*$/.test(this._modifiedStringElements[C])}_ModifiedRegionIsBoundary(C,m){if(this._ModifiedIsBoundary(C)||this._ModifiedIsBoundary(C-1))return!0;if(m>0){const d=C+m;if(this._ModifiedIsBoundary(d-1)||this._ModifiedIsBoundary(d))return!0}return!1}_boundaryScore(C,m,d,D){const L=this._OriginalRegionIsBoundary(C,m)?1:0,r=this._ModifiedRegionIsBoundary(d,D)?1:0;return L+r}ConcatenateChanges(C,m){let d=[];if(C.length===0||m.length===0)return m.length>0?m:C;if(this.ChangesOverlap(C[C.length-1],m[0],d)){const D=new Array(C.length+m.length-1);return j.Copy(C,0,D,0,C.length-1),D[C.length-1]=d[0],j.Copy(m,1,D,C.length,m.length-1),D}else{const D=new Array(C.length+m.length);return j.Copy(C,0,D,0,C.length),j.Copy(m,0,D,C.length,m.length),D}}ChangesOverlap(C,m,d){if(A.Assert(C.originalStart<=m.originalStart,"Left change is not less than or equal to right change"),A.Assert(C.modifiedStart<=m.modifiedStart,"Left change is not less than or equal to right change"),C.originalStart+C.originalLength>=m.originalStart||C.modifiedStart+C.modifiedLength>=m.modifiedStart){const D=C.originalStart;let L=C.originalLength;const r=C.modifiedStart;let w=C.modifiedLength;return C.originalStart+C.originalLength>=m.originalStart&&(L=m.originalStart+m.originalLength-C.originalStart),C.modifiedStart+C.modifiedLength>=m.modifiedStart&&(w=m.modifiedStart+m.modifiedLength-C.modifiedStart),d[0]=new g(D,L,r,w),!0}else return d[0]=null,!1}ClipDiagonalBound(C,m,d,D){if(C>=0&&C<D)return C;const L=d,r=D-d-1,w=m%2===0;if(C<0){const b=L%2===0;return w===b?0:1}else{const b=r%2===0;return w===b?D-1:D-2}}}},"H+DO":function(mt,M,t){"use strict";t.d(M,"a",function(){return v});var g=t("C/vA"),B=t("pmY6"),x=t("746U"),R=t("sFUC"),A=t("M1Kb"),j=t("kYye"),I=t("t9D7");class v{constructor(C){this.options=C,this.rangeHighlightDecorationId=void 0}provide(C,m){var d;const D=new B.b;C.canAcceptInBackground=!!((d=this.options)===null||d===void 0?void 0:d.canAcceptInBackground),C.matchOnLabel=C.matchOnDescription=C.matchOnDetail=C.sortByLabel=!1;const L=D.add(new B.d);return L.value=this.doProvide(C,m),D.add(this.onDidActiveTextEditorControlChange(()=>{L.value=void 0,L.value=this.doProvide(C,m)})),D}doProvide(C,m){const d=new B.b,D=this.activeTextEditorControl;if(D&&this.canProvideWithTextEditor(D)){const L={editor:D},r=Object(R.a)(D);if(r){let w=Object(x.p)(D.saveViewState());d.add(r.onDidChangeCursorPosition(()=>{w=Object(x.p)(D.saveViewState())})),L.restoreViewState=()=>{w&&D===this.activeTextEditorControl&&D.restoreViewState(w)},d.add(Object(g.a)(m.onCancellationRequested)(()=>{var b;return(b=L.restoreViewState)===null||b===void 0?void 0:b.call(L)}))}d.add(Object(B.i)(()=>this.clearDecorations(D))),d.add(this.provideWithTextEditor(L,C,m))}else d.add(this.provideWithoutTextEditor(C,m));return d}canProvideWithTextEditor(C){return!0}gotoLocation({editor:C},m){C.setSelection(m.range),C.revealRangeInCenter(m.range,0),m.preserveFocus||C.focus()}getModel(C){var m;return Object(R.c)(C)?(m=C.getModel())===null||m===void 0?void 0:m.modified:C.getModel()}addDecorations(C,m){C.changeDecorations(d=>{const D=[];this.rangeHighlightDecorationId&&(D.push(this.rangeHighlightDecorationId.overviewRulerDecorationId),D.push(this.rangeHighlightDecorationId.rangeHighlightId),this.rangeHighlightDecorationId=void 0);const L=[{range:m,options:{description:"quick-access-range-highlight",className:"rangeHighlight",isWholeLine:!0}},{range:m,options:{description:"quick-access-range-highlight-overview",overviewRuler:{color:Object(I.g)(j.N),position:A.g.Full}}}],[r,w]=d.deltaDecorations(D,L);this.rangeHighlightDecorationId={rangeHighlightId:r,overviewRulerDecorationId:w}})}clearDecorations(C){const m=this.rangeHighlightDecorationId;m&&(C.changeDecorations(d=>{d.deltaDecorations([m.overviewRulerDecorationId,m.rangeHighlightId],[])}),this.rangeHighlightDecorationId=void 0)}}},H4T2:function(mt,M,t){"use strict";t.r(M),t.d(M,"GotoDefinitionAtPositionEditorContribution",function(){return Q});var g=t("X+cX"),B=t("/cxE"),x=t("eLzo"),R=t("pmY6"),A=t("746U"),j=t("62hx"),I=t.n(j),v=t("vATl"),C=t("sswD"),m=t("cGHE"),d=t("aokT"),D=t("twdY"),L=t("WBhO"),r=t("t49l"),w=t("aBYw"),b=t("iNS8"),u=t("3/fG"),c=t("T8No"),p=t("MD5Z"),S=t("t9D7"),E=t("8Ydt"),y=t("vRMv"),O=function(q,z,J,re){var Z=arguments.length,ne=Z<3?z:re===null?re=Object.getOwnPropertyDescriptor(z,J):re,le;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")ne=Reflect.decorate(q,z,J,re);else for(var _e=q.length-1;_e>=0;_e--)(le=q[_e])&&(ne=(Z<3?le(ne):Z>3?le(z,J,ne):le(z,J))||ne);return Z>3&&ne&&Object.defineProperty(z,J,ne),ne},k=function(q,z){return function(J,re){z(J,re,q)}};let Q=class q{constructor(z,J,re){this.textModelResolverService=J,this.modeService=re,this.toUnhook=new R.b,this.toUnhookForKeyboard=new R.b,this.linkDecorations=[],this.currentWordAtPosition=null,this.previousPromise=null,this.editor=z;let Z=new w.a(z);this.toUnhook.add(Z),this.toUnhook.add(Z.onMouseMoveOrRelevantKeyDown(([ne,le])=>{this.startFindDefinitionFromMouse(ne,Object(A.p)(le))})),this.toUnhook.add(Z.onExecute(ne=>{this.isEnabled(ne)&&this.gotoDefinition(ne.target.position,ne.hasSideBySideModifier).then(()=>{this.removeLinkDecorations()},le=>{this.removeLinkDecorations(),Object(B.f)(le)})})),this.toUnhook.add(Z.onCancel(()=>{this.removeLinkDecorations(),this.currentWordAtPosition=null}))}static get(z){return z.getContribution(q.ID)}startFindDefinitionFromCursor(z){return this.startFindDefinition(z).then(()=>{this.toUnhookForKeyboard.add(this.editor.onDidChangeCursorPosition(()=>{this.currentWordAtPosition=null,this.removeLinkDecorations(),this.toUnhookForKeyboard.clear()})),this.toUnhookForKeyboard.add(this.editor.onKeyDown(J=>{J&&(this.currentWordAtPosition=null,this.removeLinkDecorations(),this.toUnhookForKeyboard.clear())}))})}startFindDefinitionFromMouse(z,J){if(z.target.type===9&&this.linkDecorations.length>0)return;if(!this.editor.hasModel()||!this.isEnabled(z,J)){this.currentWordAtPosition=null,this.removeLinkDecorations();return}const re=z.target.position;this.startFindDefinition(re)}startFindDefinition(z){var J;this.toUnhookForKeyboard.clear();const re=z?(J=this.editor.getModel())===null||J===void 0?void 0:J.getWordAtPosition(z):null;if(!re)return this.currentWordAtPosition=null,this.removeLinkDecorations(),Promise.resolve(0);if(this.currentWordAtPosition&&this.currentWordAtPosition.startColumn===re.startColumn&&this.currentWordAtPosition.endColumn===re.endColumn&&this.currentWordAtPosition.word===re.word)return Promise.resolve(0);this.currentWordAtPosition=re;let Z=new v.a(this.editor,4|1|2|8);return this.previousPromise&&(this.previousPromise.cancel(),this.previousPromise=null),this.previousPromise=Object(g.h)(ne=>this.findDefinition(z,ne)),this.previousPromise.then(ne=>{if(!ne||!ne.length||!Z.validate(this.editor)){this.removeLinkDecorations();return}if(ne.length>1)this.addDecoration(new d.a(z.lineNumber,re.startColumn,z.lineNumber,re.endColumn),new x.a().appendText(u.a("multipleResults","Click to show {0} definitions.",ne.length)));else{let le=ne[0];if(!le.uri)return;this.textModelResolverService.createModelReference(le.uri).then(_e=>{if(!_e.object||!_e.object.textEditorModel){_e.dispose();return}const{object:{textEditorModel:Ce}}=_e,{startLineNumber:oe}=le.range;if(oe<1||oe>Ce.getLineCount()){_e.dispose();return}const ae=this.getPreviewValue(Ce,oe,le);let V;le.originSelectionRange?V=d.a.lift(le.originSelectionRange):V=new d.a(z.lineNumber,re.startColumn,z.lineNumber,re.endColumn);const G=this.modeService.getModeIdByFilepathOrFirstLine(Ce.uri);this.addDecoration(V,new x.a().appendCodeblock(G||"",ae)),_e.dispose()})}}).then(void 0,B.f)}getPreviewValue(z,J,re){let Z=re.targetSelectionRange?re.range:this.getPreviewRangeBasedOnBrackets(z,J);const ne=Z.endLineNumber-Z.startLineNumber;ne>=q.MAX_SOURCE_PREVIEW_LINES&&(Z=this.getPreviewRangeBasedOnIndentation(z,J));const le=this.stripIndentationFromPreviewRange(z,J,Z);return le}stripIndentationFromPreviewRange(z,J,re){const Z=z.getLineFirstNonWhitespaceColumn(J);let ne=Z;for(let _e=J+1;_e<re.endLineNumber;_e++){const Ce=z.getLineFirstNonWhitespaceColumn(_e);ne=Math.min(ne,Ce)}const le=z.getValueInRange(re).replace(new RegExp(`^\\s{${ne-1}}`,"gm"),"").trim();return le}getPreviewRangeBasedOnIndentation(z,J){const re=z.getLineFirstNonWhitespaceColumn(J),Z=Math.min(z.getLineCount(),J+q.MAX_SOURCE_PREVIEW_LINES);let ne=J+1;for(;ne<Z;ne++){let le=z.getLineFirstNonWhitespaceColumn(ne);if(re===le)break}return new d.a(J,1,ne+1,1)}getPreviewRangeBasedOnBrackets(z,J){const re=Math.min(z.getLineCount(),J+q.MAX_SOURCE_PREVIEW_LINES),Z=[];let ne=!0,le=z.findNextBracket(new m.a(J,1));for(;le!==null;){if(Z.length===0)Z.push(le);else{const ae=Z[Z.length-1];if(ae.open[0]===le.open[0]&&ae.isOpen&&!le.isOpen?Z.pop():Z.push(le),Z.length===0)if(ne)ne=!1;else return new d.a(J,1,le.range.endLineNumber+1,1)}const _e=z.getLineMaxColumn(J);let Ce=le.range.endLineNumber,oe=le.range.endColumn;if(_e===le.range.endColumn&&(Ce++,oe=1),Ce>re)return new d.a(J,1,re+1,1);le=z.findNextBracket(new m.a(Ce,oe))}return new d.a(J,1,re+1,1)}addDecoration(z,J){const re={range:z,options:{description:"goto-definition-link",inlineClassName:"goto-definition-link",hoverMessage:J}};this.linkDecorations=this.editor.deltaDecorations(this.linkDecorations,[re])}removeLinkDecorations(){this.linkDecorations.length>0&&(this.linkDecorations=this.editor.deltaDecorations(this.linkDecorations,[]))}isEnabled(z,J){return this.editor.hasModel()&&z.isNoneOrSingleMouseDown&&z.target.type===6&&(z.hasTriggerModifier||(J?J.keyCodeIsTriggerKey:!1))&&D.f.has(this.editor.getModel())}findDefinition(z,J){const re=this.editor.getModel();return re?Object(y.b)(re,z,J):Promise.resolve(null)}gotoDefinition(z,J){return this.editor.setPosition(z),this.editor.invokeWithinContext(re=>{const Z=!J&&this.editor.getOption(77)&&!this.isInPeekEditor(re),ne=new E.DefinitionAction({openToSide:J,openInPeek:Z,muteMessage:!0},{alias:"",label:"",id:"",precondition:void 0});return ne.run(re,this.editor)})}isInPeekEditor(z){const J=z.get(c.b);return b.b.inPeekEditor.getValue(J)}dispose(){this.toUnhook.dispose()}};Q.ID="editor.contrib.gotodefinitionatposition",Q.MAX_SOURCE_PREVIEW_LINES=8,Q=O([k(1,r.a),k(2,L.a)],Q),Object(C.l)(Q.ID,Q),Object(S.f)((q,z)=>{const J=q.getColor(p.q);J&&z.addRule(`.monaco-editor .goto-definition-link { color: ${J} !important; }`)})},H6Gb:function(mt,M,t){"use strict";t.r(M);var g=t("+hIS");Object(g.a)({id:"php",extensions:[".php",".php4",".php5",".phtml",".ctp"],aliases:["PHP","php"],mimetypes:["application/x-php"],loader:function(){return t.e(351).then(t.bind(null,"lXEz"))}})},HdwC:function(mt,M,t){"use strict";t.d(M,"b",function(){return L}),t.d(M,"a",function(){return w});var g=t("D3Dy"),B=t("MI8n"),x=t("pmY6"),R=t("MNsG"),A=t("/UlZ");class j{constructor(b,u){this.chr=b,this.type=u,this.width=0}fulfill(b){this.width=b}}class I{constructor(b,u){this._bareFontInfo=b,this._requests=u,this._container=null,this._testElements=null}read(){this._createDomElements(),document.body.appendChild(this._container),this._readFromDomElements(),document.body.removeChild(this._container),this._container=null,this._testElements=null}_createDomElements(){const b=this._bareFontInfo.getMassagedFontFamily(g.h?A.c.fontFamily:null),u=document.createElement("div");u.style.position="absolute",u.style.top="-50000px",u.style.width="50000px";const c=document.createElement("div");c.style.fontFamily=b,c.style.fontWeight=this._bareFontInfo.fontWeight,c.style.fontSize=this._bareFontInfo.fontSize+"px",c.style.fontFeatureSettings=this._bareFontInfo.fontFeatureSettings,c.style.lineHeight=this._bareFontInfo.lineHeight+"px",c.style.letterSpacing=this._bareFontInfo.letterSpacing+"px",u.appendChild(c);const p=document.createElement("div");p.style.fontFamily=b,p.style.fontWeight="bold",p.style.fontSize=this._bareFontInfo.fontSize+"px",p.style.fontFeatureSettings=this._bareFontInfo.fontFeatureSettings,p.style.lineHeight=this._bareFontInfo.lineHeight+"px",p.style.letterSpacing=this._bareFontInfo.letterSpacing+"px",u.appendChild(p);const S=document.createElement("div");S.style.fontFamily=b,S.style.fontWeight=this._bareFontInfo.fontWeight,S.style.fontSize=this._bareFontInfo.fontSize+"px",S.style.fontFeatureSettings=this._bareFontInfo.fontFeatureSettings,S.style.lineHeight=this._bareFontInfo.lineHeight+"px",S.style.letterSpacing=this._bareFontInfo.letterSpacing+"px",S.style.fontStyle="italic",u.appendChild(S);const E=[];for(const y of this._requests){let O;y.type===0&&(O=c),y.type===2&&(O=p),y.type===1&&(O=S),O.appendChild(document.createElement("br"));const k=document.createElement("span");I._render(k,y),O.appendChild(k),E.push(k)}this._container=u,this._testElements=E}static _render(b,u){if(u.chr===" "){let c="\xA0";for(let p=0;p<8;p++)c+=c;b.innerText=c}else{let c=u.chr;for(let p=0;p<8;p++)c+=c;b.textContent=c}}_readFromDomElements(){for(let b=0,u=this._requests.length;b<u;b++){const c=this._requests[b],p=this._testElements[b];c.fulfill(p.offsetWidth/256)}}}function v(b,u){const c=new I(b,u);c.read()}var C=t("o39E"),m=t("iDAx"),d=t("+3Gp");class D{constructor(){this._keys=Object.create(null),this._values=Object.create(null)}has(b){const u=b.getId();return!!this._values[u]}get(b){const u=b.getId();return this._values[u]}put(b,u){const c=b.getId();this._keys[c]=b,this._values[c]=u}remove(b){const u=b.getId();delete this._keys[u],delete this._values[u]}getValues(){return Object.keys(this._keys).map(b=>this._values[b])}}function L(){r.INSTANCE.clearCache()}class r extends x.a{constructor(){super();this._onDidChange=this._register(new B.b),this.onDidChange=this._onDidChange.event,this._cache=new D,this._evictUntrustedReadingsTimeout=-1}dispose(){this._evictUntrustedReadingsTimeout!==-1&&(clearTimeout(this._evictUntrustedReadingsTimeout),this._evictUntrustedReadingsTimeout=-1),super.dispose()}clearCache(){this._cache=new D,this._onDidChange.fire()}_writeToCache(b,u){this._cache.put(b,u),!u.isTrusted&&this._evictUntrustedReadingsTimeout===-1&&(this._evictUntrustedReadingsTimeout=setTimeout(()=>{this._evictUntrustedReadingsTimeout=-1,this._evictUntrustedReadings()},5e3))}_evictUntrustedReadings(){const b=this._cache.getValues();let u=!1;for(const c of b)c.isTrusted||(u=!0,this._cache.remove(c));u&&this._onDidChange.fire()}readConfiguration(b){if(!this._cache.has(b)){let u=r._actualReadConfiguration(b);(u.typicalHalfwidthCharacterWidth<=2||u.typicalFullwidthCharacterWidth<=2||u.spaceWidth<=2||u.maxDigitWidth<=2)&&(u=new d.b({zoomLevel:g.d(),pixelRatio:g.a(),fontFamily:u.fontFamily,fontWeight:u.fontWeight,fontSize:u.fontSize,fontFeatureSettings:u.fontFeatureSettings,lineHeight:u.lineHeight,letterSpacing:u.letterSpacing,isMonospace:u.isMonospace,typicalHalfwidthCharacterWidth:Math.max(u.typicalHalfwidthCharacterWidth,5),typicalFullwidthCharacterWidth:Math.max(u.typicalFullwidthCharacterWidth,5),canUseHalfwidthRightwardsArrow:u.canUseHalfwidthRightwardsArrow,spaceWidth:Math.max(u.spaceWidth,5),middotWidth:Math.max(u.middotWidth,5),wsmiddotWidth:Math.max(u.wsmiddotWidth,5),maxDigitWidth:Math.max(u.maxDigitWidth,5)},!1)),this._writeToCache(b,u)}return this._cache.get(b)}static createRequest(b,u,c,p){const S=new j(b,u);return c.push(S),p&&p.push(S),S}static _actualReadConfiguration(b){const u=[],c=[],p=this.createRequest("n",0,u,c),S=this.createRequest("\uFF4D",0,u,null),E=this.createRequest(" ",0,u,c),y=this.createRequest("0",0,u,c),O=this.createRequest("1",0,u,c),k=this.createRequest("2",0,u,c),Q=this.createRequest("3",0,u,c),q=this.createRequest("4",0,u,c),z=this.createRequest("5",0,u,c),J=this.createRequest("6",0,u,c),re=this.createRequest("7",0,u,c),Z=this.createRequest("8",0,u,c),ne=this.createRequest("9",0,u,c),le=this.createRequest("\u2192",0,u,c),_e=this.createRequest("\uFFEB",0,u,null),Ce=this.createRequest("\xB7",0,u,c),oe=this.createRequest(String.fromCharCode(11825),0,u,null),ae="|/-_ilm%";for(let Ie=0,Me=ae.length;Ie<Me;Ie++)this.createRequest(ae.charAt(Ie),0,u,c),this.createRequest(ae.charAt(Ie),1,u,c),this.createRequest(ae.charAt(Ie),2,u,c);v(b,u);const V=Math.max(y.width,O.width,k.width,Q.width,q.width,z.width,J.width,re.width,Z.width,ne.width);let G=b.fontFeatureSettings===A.e.OFF;const ee=c[0].width;for(let Ie=1,Me=c.length;G&&Ie<Me;Ie++){const Oe=ee-c[Ie].width;if(Oe<-.001||Oe>.001){G=!1;break}}let pe=!0;G&&_e.width!==ee&&(pe=!1),_e.width>le.width&&(pe=!1);const Te=g.b()>2e3;return new d.b({zoomLevel:g.d(),pixelRatio:g.a(),fontFamily:b.fontFamily,fontWeight:b.fontWeight,fontSize:b.fontSize,fontFeatureSettings:b.fontFeatureSettings,lineHeight:b.lineHeight,letterSpacing:b.letterSpacing,isMonospace:G,typicalHalfwidthCharacterWidth:p.width,typicalFullwidthCharacterWidth:S.width,canUseHalfwidthRightwardsArrow:pe,spaceWidth:E.width,middotWidth:Ce.width,wsmiddotWidth:oe.width,maxDigitWidth:V},Te)}}r.INSTANCE=new r;class w extends m.a{constructor(b,u,c=null,p){super(b,u);this.accessibilityService=p,this._elementSizeObserver=this._register(new C.a(c,u.dimension,()=>this._recomputeOptions())),this._register(r.INSTANCE.onDidChange(()=>this._recomputeOptions())),this._validatedOptions.get(10)&&this._elementSizeObserver.startObserving(),this._register(g.l(S=>this._recomputeOptions())),this._register(this.accessibilityService.onDidChangeScreenReaderOptimized(()=>this._recomputeOptions())),this._recomputeOptions()}static applyFontInfoSlow(b,u){b.style.fontFamily=u.getMassagedFontFamily(g.h?A.c.fontFamily:null),b.style.fontWeight=u.fontWeight,b.style.fontSize=u.fontSize+"px",b.style.fontFeatureSettings=u.fontFeatureSettings,b.style.lineHeight=u.lineHeight+"px",b.style.letterSpacing=u.letterSpacing+"px"}static applyFontInfo(b,u){b.setFontFamily(u.getMassagedFontFamily(g.h?A.c.fontFamily:null)),b.setFontWeight(u.fontWeight),b.setFontSize(u.fontSize),b.setFontFeatureSettings(u.fontFeatureSettings),b.setLineHeight(u.lineHeight),b.setLetterSpacing(u.letterSpacing)}observeReferenceElement(b){this._elementSizeObserver.observe(b)}updatePixelRatio(){this._recomputeOptions()}static _getExtraEditorClassName(){let b="";return!g.h&&!g.k&&(b+="no-user-select "),g.h&&(b+="no-minimap-shadow "),R.f&&(b+="mac "),b}_getEnvConfiguration(){return{extraEditorClassName:w._getExtraEditorClassName(),outerWidth:this._elementSizeObserver.getWidth(),outerHeight:this._elementSizeObserver.getHeight(),emptySelectionClipboard:g.j||g.g,pixelRatio:g.a(),zoomLevel:g.d(),accessibilitySupport:this.accessibilityService.isScreenReaderOptimized()?2:this.accessibilityService.getAccessibilitySupport()}}readConfiguration(b){return r.INSTANCE.readConfiguration(b)}}},HgMQ:function(mt,M,t){},HpOR:function(mt,M,t){"use strict";(function(g){t.d(M,"a",function(){return R}),t.d(M,"b",function(){return A}),t.d(M,"e",function(){return j}),t.d(M,"c",function(){return I}),t.d(M,"f",function(){return v}),t.d(M,"d",function(){return C}),t.d(M,"g",function(){return m});const B=typeof g!="undefined";let x;class R{constructor(d){this.buffer=d,this.byteLength=this.buffer.byteLength}static wrap(d){return B&&!g.isBuffer(d)&&(d=g.from(d.buffer,d.byteOffset,d.byteLength)),new R(d)}toString(){return B?this.buffer.toString():(x||(x=new TextDecoder),x.decode(this.buffer))}}function A(d,D){return d[D+0]<<0>>>0|d[D+1]<<8>>>0}function j(d,D,L){d[L+0]=D&255,D=D>>>8,d[L+1]=D&255}function I(d,D){return d[D]*Math.pow(2,24)+d[D+1]*Math.pow(2,16)+d[D+2]*Math.pow(2,8)+d[D+3]}function v(d,D,L){d[L+3]=D,D=D>>>8,d[L+2]=D,D=D>>>8,d[L+1]=D,D=D>>>8,d[L]=D}function C(d,D){return d[D]}function m(d,D,L){d[L]=D}}).call(this,t("O48t").Buffer)},HyZH:function(mt,M,t){},"I/Lx":function(mt,M,t){"use strict";t.r(M);var g=t("+hIS");Object(g.a)({id:"fsharp",extensions:[".fs",".fsi",".ml",".mli",".fsx",".fsscript"],aliases:["F#","FSharp","fsharp"],loader:function(){return t.e(332).then(t.bind(null,"yswY"))}})},"J+ZK":function(mt,M,t){},"JQT/":function(mt,M,t){"use strict";t.d(M,"a",function(){return x}),t.d(M,"b",function(){return A});var g=t("MI8n");const B=Object.freeze(function(j,I){const v=setTimeout(j.bind(I),0);return{dispose(){clearTimeout(v)}}});var x;(function(j){function I(v){return v===j.None||v===j.Cancelled||v instanceof R?!0:!v||typeof v!="object"?!1:typeof v.isCancellationRequested=="boolean"&&typeof v.onCancellationRequested=="function"}j.isCancellationToken=I,j.None=Object.freeze({isCancellationRequested:!1,onCancellationRequested:g.c.None}),j.Cancelled=Object.freeze({isCancellationRequested:!0,onCancellationRequested:B})})(x||(x={}));class R{constructor(){this._isCancelled=!1,this._emitter=null}cancel(){this._isCancelled||(this._isCancelled=!0,this._emitter&&(this._emitter.fire(void 0),this.dispose()))}get isCancellationRequested(){return this._isCancelled}get onCancellationRequested(){return this._isCancelled?B:(this._emitter||(this._emitter=new g.b),this._emitter.event)}dispose(){this._emitter&&(this._emitter.dispose(),this._emitter=null)}}class A{constructor(j){this._token=void 0,this._parentListener=void 0,this._parentListener=j&&j.onCancellationRequested(this.cancel,this)}get token(){return this._token||(this._token=new R),this._token}cancel(){this._token?this._token instanceof R&&this._token.cancel():this._token=x.Cancelled}dispose(j=!1){j&&this.cancel(),this._parentListener&&this._parentListener.dispose(),this._token?this._token instanceof R&&this._token.dispose():this._token=x.None}}},JVxT:function(mt,M){(function(t){mt.exports=function(){var g={46:function(R){R.exports=function(A){if(!A.webpackPolyfill){var j=Object.create(A);j.children||(j.children=[]),Object.defineProperty(j,"loaded",{enumerable:!0,get:function(){return j.l}}),Object.defineProperty(j,"id",{enumerable:!0,get:function(){return j.i}}),Object.defineProperty(j,"exports",{enumerable:!0}),j.webpackPolyfill=1}return j}}},B={};function x(R){if(B[R])return B[R].exports;var A=B[R]={exports:{}},j=!0;try{g[R](A,A.exports,x),j=!1}finally{j&&delete B[R]}return A.exports}return x.ab=t+"/",x(46)}()}).call(this,"/")},JlLP:function(mt,M,t){"use strict";t.r(M);var g=t("+hIS");Object(g.a)({id:"powerquery",extensions:[".pq",".pqm"],aliases:["PQ","M","Power Query","Power Query M"],loader:function(){return t.e(353).then(t.bind(null,"W1QP"))}})},KDc4:function(mt,M,t){"use strict";t.d(M,"b",function(){return g}),t.d(M,"c",function(){return B}),t.d(M,"a",function(){return x});var g;(function(A){A[A.None=0]="None",A[A.Indent=1]="Indent",A[A.IndentOutdent=2]="IndentOutdent",A[A.Outdent=3]="Outdent"})(g||(g={}));class B{constructor(A){if(this._standardAutoClosingPairConditionalBrand=void 0,this.open=A.open,this.close=A.close,this._standardTokenMask=0,Array.isArray(A.notIn))for(let j=0,I=A.notIn.length;j<I;j++){const v=A.notIn[j];switch(v){case"string":this._standardTokenMask|=2;break;case"comment":this._standardTokenMask|=1;break;case"regex":this._standardTokenMask|=4;break}}}isOK(A){return(this._standardTokenMask&A)===0}}class x{constructor(A){this.autoClosingPairsOpenByStart=new Map,this.autoClosingPairsOpenByEnd=new Map,this.autoClosingPairsCloseByStart=new Map,this.autoClosingPairsCloseByEnd=new Map,this.autoClosingPairsCloseSingleChar=new Map;for(const j of A)R(this.autoClosingPairsOpenByStart,j.open.charAt(0),j),R(this.autoClosingPairsOpenByEnd,j.open.charAt(j.open.length-1),j),R(this.autoClosingPairsCloseByStart,j.close.charAt(0),j),R(this.autoClosingPairsCloseByEnd,j.close.charAt(j.close.length-1),j),j.close.length===1&&j.open.length===1&&R(this.autoClosingPairsCloseSingleChar,j.close,j)}}function R(A,j,I){A.has(j)?A.get(j).push(I):A.set(j,[I])}},KTWA:function(mt,M,t){"use strict";t.r(M);var g=t("sswD"),B=t("wQH0"),x=t("aokT"),R=t("gCVg");class A{constructor(m,d){this._selection=m,this._isMovingLeft=d}getEditOperations(m,d){if(this._selection.startLineNumber!==this._selection.endLineNumber||this._selection.isEmpty())return;const D=this._selection.startLineNumber,L=this._selection.startColumn,r=this._selection.endColumn;if(this._isMovingLeft&&L===1)return;if(!this._isMovingLeft&&r===m.getLineMaxColumn(D))return;if(this._isMovingLeft){const w=new x.a(D,L-1,D,L),b=m.getValueInRange(w);d.addEditOperation(w,null),d.addEditOperation(new x.a(D,r,D,r),b)}else{const w=new x.a(D,r,D,r+1),b=m.getValueInRange(w);d.addEditOperation(w,null),d.addEditOperation(new x.a(D,L,D,L),b)}}computeCursorState(m,d){return this._isMovingLeft?new R.a(this._selection.startLineNumber,this._selection.startColumn-1,this._selection.endLineNumber,this._selection.endColumn-1):new R.a(this._selection.startLineNumber,this._selection.startColumn+1,this._selection.endLineNumber,this._selection.endColumn+1)}}var j=t("3/fG");class I extends g.b{constructor(m,d){super(d);this.left=m}run(m,d){if(!d.hasModel())return;let D=[],L=d.getSelections();for(const r of L)D.push(new A(r,this.left));d.pushUndoStop(),d.executeCommands(this.id,D),d.pushUndoStop()}}class v extends I{constructor(){super(!0,{id:"editor.action.moveCarretLeftAction",label:j.a("caret.moveLeft","Move Selected Text Left"),alias:"Move Selected Text Left",precondition:B.a.writable})}}class C extends I{constructor(){super(!1,{id:"editor.action.moveCarretRightAction",label:j.a("caret.moveRight","Move Selected Text Right"),alias:"Move Selected Text Right",precondition:B.a.writable})}}Object(g.j)(v),Object(g.j)(C)},KaET:function(mt,M,t){},KgQ1:function(mt,M,t){},Krc3:function(mt,M,t){},LCkn:function(mt,M,t){"use strict";t.d(M,"a",function(){return B}),t.d(M,"c",function(){return x}),t.d(M,"e",function(){return R}),t.d(M,"d",function(){return A}),t.d(M,"b",function(){return j});var g=t("gCVg");class B{constructor(I,v,C=!1){this._range=I,this._text=v,this.insertsAutoWhitespace=C}getEditOperations(I,v){v.addTrackedEditOperation(this._range,this._text)}computeCursorState(I,v){let C=v.getInverseEditOperations(),m=C[0].range;return new g.a(m.endLineNumber,m.endColumn,m.endLineNumber,m.endColumn)}}class x{constructor(I,v){this._range=I,this._text=v}getEditOperations(I,v){v.addTrackedEditOperation(this._range,this._text)}computeCursorState(I,v){const C=v.getInverseEditOperations(),m=C[0].range;return new g.a(m.startLineNumber,m.startColumn,m.endLineNumber,m.endColumn)}}class R{constructor(I,v,C=!1){this._range=I,this._text=v,this.insertsAutoWhitespace=C}getEditOperations(I,v){v.addTrackedEditOperation(this._range,this._text)}computeCursorState(I,v){let C=v.getInverseEditOperations(),m=C[0].range;return new g.a(m.startLineNumber,m.startColumn,m.startLineNumber,m.startColumn)}}class A{constructor(I,v,C,m,d=!1){this._range=I,this._text=v,this._columnDeltaOffset=m,this._lineNumberDeltaOffset=C,this.insertsAutoWhitespace=d}getEditOperations(I,v){v.addTrackedEditOperation(this._range,this._text)}computeCursorState(I,v){let C=v.getInverseEditOperations(),m=C[0].range;return new g.a(m.endLineNumber+this._lineNumberDeltaOffset,m.endColumn+this._columnDeltaOffset,m.endLineNumber+this._lineNumberDeltaOffset,m.endColumn+this._columnDeltaOffset)}}class j{constructor(I,v,C,m=!1){this._range=I,this._text=v,this._initialSelection=C,this._forceMoveMarkers=m,this._selectionId=null}getEditOperations(I,v){v.addTrackedEditOperation(this._range,this._text,this._forceMoveMarkers),this._selectionId=v.trackSelection(this._initialSelection)}computeCursorState(I,v){return v.getTrackedSelection(this._selectionId)}}},LRks:function(mt,M,t){"use strict";t.r(M);var g=t("+hIS");Object(g.a)({id:"swift",aliases:["Swift","swift"],extensions:[".swift"],mimetypes:["text/swift"],loader:function(){return t.e(372).then(t.bind(null,"05+/"))}})},LUcL:function(mt,M,t){"use strict";t.r(M),t.d(M,"DeleteWordPartLeft",function(){return I}),t.d(M,"DeleteWordPartRight",function(){return v}),t.d(M,"WordPartLeftCommand",function(){return C}),t.d(M,"CursorWordPartLeft",function(){return m}),t.d(M,"CursorWordPartLeftSelect",function(){return d}),t.d(M,"WordPartRightCommand",function(){return D}),t.d(M,"CursorWordPartRight",function(){return L}),t.d(M,"CursorWordPartRightSelect",function(){return r});var g=t("sswD"),B=t("1I1M"),x=t("aokT"),R=t("wQH0"),A=t("s7Km"),j=t("nnTU");class I extends A.DeleteWordCommand{constructor(){super({whitespaceHeuristics:!0,wordNavigationType:0,id:"deleteWordPartLeft",precondition:R.a.writable,kbOpts:{kbExpr:R.a.textInputFocus,primary:0,mac:{primary:256|512|1},weight:100}})}_delete(w,b){let u=B.b.deleteWordPartLeft(w);return u||new x.a(1,1,1,1)}}class v extends A.DeleteWordCommand{constructor(){super({whitespaceHeuristics:!0,wordNavigationType:2,id:"deleteWordPartRight",precondition:R.a.writable,kbOpts:{kbExpr:R.a.textInputFocus,primary:0,mac:{primary:256|512|20},weight:100}})}_delete(w,b){let u=B.b.deleteWordPartRight(w);if(u)return u;const c=w.model.getLineCount(),p=w.model.getLineMaxColumn(c);return new x.a(c,p,c,p)}}class C extends A.MoveWordCommand{_move(w,b,u,c){return B.b.moveWordPartLeft(w,b,u)}}class m extends C{constructor(){super({inSelectionMode:!1,wordNavigationType:0,id:"cursorWordPartLeft",precondition:void 0,kbOpts:{kbExpr:R.a.textInputFocus,primary:0,mac:{primary:256|512|15},weight:100}})}}j.a.registerCommandAlias("cursorWordPartStartLeft","cursorWordPartLeft");class d extends C{constructor(){super({inSelectionMode:!0,wordNavigationType:0,id:"cursorWordPartLeftSelect",precondition:void 0,kbOpts:{kbExpr:R.a.textInputFocus,primary:0,mac:{primary:256|512|1024|15},weight:100}})}}j.a.registerCommandAlias("cursorWordPartStartLeftSelect","cursorWordPartLeftSelect");class D extends A.MoveWordCommand{_move(w,b,u,c){return B.b.moveWordPartRight(w,b,u)}}class L extends D{constructor(){super({inSelectionMode:!1,wordNavigationType:2,id:"cursorWordPartRight",precondition:void 0,kbOpts:{kbExpr:R.a.textInputFocus,primary:0,mac:{primary:256|512|17},weight:100}})}}class r extends D{constructor(){super({inSelectionMode:!0,wordNavigationType:2,id:"cursorWordPartRightSelect",precondition:void 0,kbOpts:{kbExpr:R.a.textInputFocus,primary:0,mac:{primary:256|512|1024|17},weight:100}})}}Object(g.k)(new I),Object(g.k)(new v),Object(g.k)(new m),Object(g.k)(new d),Object(g.k)(new L),Object(g.k)(new r)},"LeU+":function(mt,M,t){"use strict";t.d(M,"b",function(){return B}),t.d(M,"a",function(){return x});var g=t("CZ1j");class B{constructor(R,A){this._prefixSumIndexOfResultBrand=void 0,this.index=R,this.remainder=A}}class x{constructor(R){this.values=R,this.prefixSum=new Uint32Array(R.length),this.prefixSumValidIndex=new Int32Array(1),this.prefixSumValidIndex[0]=-1}insertValues(R,A){R=Object(g.a)(R);const j=this.values,I=this.prefixSum,v=A.length;return v===0?!1:(this.values=new Uint32Array(j.length+v),this.values.set(j.subarray(0,R),0),this.values.set(j.subarray(R),R+v),this.values.set(A,R),R-1<this.prefixSumValidIndex[0]&&(this.prefixSumValidIndex[0]=R-1),this.prefixSum=new Uint32Array(this.values.length),this.prefixSumValidIndex[0]>=0&&this.prefixSum.set(I.subarray(0,this.prefixSumValidIndex[0]+1)),!0)}changeValue(R,A){return R=Object(g.a)(R),A=Object(g.a)(A),this.values[R]===A?!1:(this.values[R]=A,R-1<this.prefixSumValidIndex[0]&&(this.prefixSumValidIndex[0]=R-1),!0)}removeValues(R,A){R=Object(g.a)(R),A=Object(g.a)(A);const j=this.values,I=this.prefixSum;if(R>=j.length)return!1;let v=j.length-R;return A>=v&&(A=v),A===0?!1:(this.values=new Uint32Array(j.length-A),this.values.set(j.subarray(0,R),0),this.values.set(j.subarray(R+A),R),this.prefixSum=new Uint32Array(this.values.length),R-1<this.prefixSumValidIndex[0]&&(this.prefixSumValidIndex[0]=R-1),this.prefixSumValidIndex[0]>=0&&this.prefixSum.set(I.subarray(0,this.prefixSumValidIndex[0]+1)),!0)}getTotalSum(){return this.values.length===0?0:this._getPrefixSum(this.values.length-1)}getPrefixSum(R){return R<0?0:(R=Object(g.a)(R),this._getPrefixSum(R))}_getPrefixSum(R){if(R<=this.prefixSumValidIndex[0])return this.prefixSum[R];let A=this.prefixSumValidIndex[0]+1;A===0&&(this.prefixSum[0]=this.values[0],A++),R>=this.values.length&&(R=this.values.length-1);for(let j=A;j<=R;j++)this.prefixSum[j]=this.prefixSum[j-1]+this.values[j];return this.prefixSumValidIndex[0]=Math.max(this.prefixSumValidIndex[0],R),this.prefixSum[R]}getIndexOf(R){R=Math.floor(R),this.getTotalSum();let A=0,j=this.values.length-1,I=0,v=0,C=0;for(;A<=j;)if(I=A+(j-A)/2|0,v=this.prefixSum[I],C=v-this.values[I],R<C)j=I-1;else if(R>=v)A=I+1;else break;return new B(I,R-C)}}},LexI:function(mt,M,t){"use strict";t.r(M);var g=t("+hIS");Object(g.a)({id:"go",extensions:[".go"],aliases:["Go"],loader:function(){return t.e(333).then(t.bind(null,"lHAa"))}})},Lkt1:function(mt,M,t){"use strict";t.r(M),t.d(M,"StandaloneCommandsQuickAccessProvider",function(){return Oe}),t.d(M,"GotoLineAction",function(){return Xe});var g=t("ic2d"),B=t("Lx4V"),x=t("A9l+"),R=t("Vxe3"),A=t("EJc0"),j=t("6OMU"),I=t("746U"),v=t("3/fG");function C(fe,Pe){return Pe&&(fe.stack||fe.stacktrace)?v.a("stackTrace.format","{0}: {1}",d(fe),m(fe.stack)||m(fe.stacktrace)):d(fe)}function m(fe){return Array.isArray(fe)?fe.join(`
|
|
|
`):fe}function d(fe){return typeof fe.code=="string"&&typeof fe.errno=="number"&&typeof fe.syscall=="string"?v.a("nodeExceptionMessage","A system error occurred ({0})",fe.message):fe.message||v.a("error.defaultMessage","An unknown error occurred. Please consult the log for more details.")}function D(fe=null,Pe=!1){if(!fe)return v.a("error.defaultMessage","An unknown error occurred. Please consult the log for more details.");if(Array.isArray(fe)){const Be=j.e(fe),Se=D(Be[0],Pe);return Be.length>1?v.a("error.moreErrors","{0} ({1} errors in total)",Se,Be.length):Se}if(I.l(fe))return fe;if(fe.detail){const Be=fe.detail;if(Be.error)return C(Be.error,Pe);if(Be.exception)return C(Be.exception,Pe)}return fe.stack?C(fe,Pe):fe.message?fe.message:v.a("error.defaultMessage","An unknown error occurred. Please consult the log for more details.")}var L=t("/cxE"),r=t("fpMC"),w=t("pmY6"),b=t("QDVR"),u=t("S3by"),c=t("nnTU"),p=t("+7oY"),S=t("6vuP"),E=t("Cg/j"),y=t("bexQ"),O=t("X+cX"),k=t("JQT/"),Q=function(fe,Pe,Be,Se){function me(he){return he instanceof Be?he:new Be(function(Le){Le(he)})}return new(Be||(Be=Promise))(function(he,Le){function we(W){try{ie(Se.next(W))}catch(U){Le(U)}}function ve(W){try{ie(Se.throw(W))}catch(U){Le(U)}}function ie(W){W.done?he(W.value):me(W.value).then(we,ve)}ie((Se=Se.apply(fe,Pe||[])).next())})},q;(function(fe){fe[fe.NO_ACTION=0]="NO_ACTION",fe[fe.CLOSE_PICKER=1]="CLOSE_PICKER",fe[fe.REFRESH_PICKER=2]="REFRESH_PICKER",fe[fe.REMOVE_ITEM=3]="REMOVE_ITEM"})(q||(q={}));function z(fe){const Pe=fe;return Array.isArray(Pe.items)}function J(fe){const Pe=fe;return!!Pe.picks&&Pe.additionalPicks instanceof Promise}class re extends w.a{constructor(fe,Pe){super();this.prefix=fe,this.options=Pe}provide(fe,Pe){var Be;const Se=new w.b;fe.canAcceptInBackground=!!((Be=this.options)===null||Be===void 0?void 0:Be.canAcceptInBackground),fe.matchOnLabel=fe.matchOnDescription=fe.matchOnDetail=fe.sortByLabel=!1;let me;const he=Se.add(new w.d),Le=()=>Q(this,void 0,void 0,function*(){const we=he.value=new w.b;me==null||me.dispose(!0),fe.busy=!1,me=new k.b(Pe);const ve=me.token,ie=fe.value.substr(this.prefix.length).trim(),W=this._getPicks(ie,we,ve),U=(se,je)=>{var Re;let We,dt;if(z(se)?(We=se.items,dt=se.active):We=se,We.length===0){if(je)return!1;ie.length>0&&((Re=this.options)===null||Re===void 0?void 0:Re.noResultsPick)&&(We=[this.options.noResultsPick])}return fe.items=We,dt&&(fe.activeItems=[dt]),!0};if(!(W===null))if(J(W)){let se=!1,je=!1;yield Promise.all([(()=>Q(this,void 0,void 0,function*(){if(yield Object(O.n)(re.FAST_PICKS_RACE_DELAY),ve.isCancellationRequested)return;je||(se=U(W.picks,!0))}))(),(()=>Q(this,void 0,void 0,function*(){fe.busy=!0;try{const Re=yield W.additionalPicks;if(ve.isCancellationRequested)return;let We,dt;z(W.picks)?(We=W.picks.items,dt=W.picks.active):We=W.picks;let Lt,Ht;if(z(Re)?(Lt=Re.items,Ht=Re.active):Lt=Re,Lt.length>0||!se){let $e;if(!dt&&!Ht){const ot=fe.activeItems[0];ot&&We.indexOf(ot)!==-1&&($e=ot)}U({items:[...We,...Lt],active:dt||Ht||$e})}}finally{ve.isCancellationRequested||(fe.busy=!1),je=!0}}))()])}else if(!(W instanceof Promise))U(W);else{fe.busy=!0;try{const se=yield W;if(ve.isCancellationRequested)return;U(se)}finally{ve.isCancellationRequested||(fe.busy=!1)}}});return Se.add(fe.onDidChangeValue(()=>Le())),Le(),Se.add(fe.onDidAccept(we=>{const[ve]=fe.selectedItems;typeof(ve==null?void 0:ve.accept)=="function"&&(we.inBackground||fe.hide(),ve.accept(fe.keyMods,we))})),Se.add(fe.onDidTriggerItemButton(({button:we,item:ve})=>Q(this,void 0,void 0,function*(){var ie,W;if(typeof ve.trigger=="function"){const U=(W=(ie=ve.buttons)===null||ie===void 0?void 0:ie.indexOf(we))!==null&&W!==void 0?W:-1;if(U>=0){const se=ve.trigger(U,fe.keyMods),je=typeof se=="number"?se:yield se;if(Pe.isCancellationRequested)return;switch(je){case q.NO_ACTION:break;case q.CLOSE_PICKER:fe.hide();break;case q.REFRESH_PICKER:Le();break;case q.REMOVE_ITEM:const Re=fe.items.indexOf(ve);if(Re!==-1){const We=fe.items.slice(),dt=We.splice(Re,1),Lt=fe.activeItems.filter($e=>$e!==dt[0]),Ht=fe.keepScrollPosition;fe.keepScrollPosition=!0,fe.items=We,Lt&&(fe.activeItems=Lt),fe.keepScrollPosition=Ht}break}}}}))),Se}}re.FAST_PICKS_RACE_DELAY=200;var Z=t("A+jI"),ne=t("XXUj"),le=function(fe,Pe,Be,Se){var me=arguments.length,he=me<3?Pe:Se===null?Se=Object.getOwnPropertyDescriptor(Pe,Be):Se,Le;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")he=Reflect.decorate(fe,Pe,Be,Se);else for(var we=fe.length-1;we>=0;we--)(Le=fe[we])&&(he=(me<3?Le(he):me>3?Le(Pe,Be,he):Le(Pe,Be))||he);return me>3&&he&&Object.defineProperty(Pe,Be,he),he},_e=function(fe,Pe){return function(Be,Se){Pe(Be,Se,fe)}},Ce=function(fe,Pe,Be,Se){function me(he){return he instanceof Be?he:new Be(function(Le){Le(he)})}return new(Be||(Be=Promise))(function(he,Le){function we(W){try{ie(Se.next(W))}catch(U){Le(U)}}function ve(W){try{ie(Se.throw(W))}catch(U){Le(U)}}function ie(W){W.done?he(W.value):me(W.value).then(we,ve)}ie((Se=Se.apply(fe,Pe||[])).next())})};let oe=class fe extends re{constructor(Pe,Be,Se,me,he,Le){super(fe.PREFIX,Pe);this.instantiationService=Be,this.keybindingService=Se,this.commandService=me,this.telemetryService=he,this.dialogService=Le,this.commandsHistory=this._register(this.instantiationService.createInstance(ae)),this.options=Pe}_getPicks(Pe,Be,Se){return Ce(this,void 0,void 0,function*(){const me=yield this.getCommandPicks(Be,Se);if(Se.isCancellationRequested)return[];const he=[];for(const ie of me){const W=Object(I.p)(fe.WORD_FILTER(Pe,ie.label)),U=ie.commandAlias?Object(I.p)(fe.WORD_FILTER(Pe,ie.commandAlias)):void 0;W||U?(ie.highlights={label:W,detail:this.options.showAlias?U:void 0},he.push(ie)):Pe===ie.commandId&&he.push(ie)}const Le=new Map;for(const ie of he){const W=Le.get(ie.label);W?(ie.description=ie.commandId,W.description=W.commandId):Le.set(ie.label,ie)}he.sort((ie,W)=>{const U=this.commandsHistory.peek(ie.commandId),se=this.commandsHistory.peek(W.commandId);return U&&se?U>se?-1:1:U?-1:se?1:ie.label.localeCompare(W.label)});const we=[];let ve=!1;for(let ie=0;ie<he.length;ie++){const W=he[ie],U=this.keybindingService.lookupKeybinding(W.commandId),se=U?Object(v.a)("commandPickAriaLabelWithKeybinding","{0}, {1}",W.label,U.getAriaLabel()):W.label;ie===0&&this.commandsHistory.peek(W.commandId)&&(we.push({type:"separator",label:Object(v.a)("recentlyUsed","recently used")}),ve=!0),ie!==0&&ve&&!this.commandsHistory.peek(W.commandId)&&(we.push({type:"separator",label:Object(v.a)("morecCommands","other commands")}),ve=!1),we.push(Object.assign(Object.assign({},W),{ariaLabel:se,detail:this.options.showAlias&&W.commandAlias!==W.label?W.commandAlias:void 0,keybinding:U,accept:()=>Ce(this,void 0,void 0,function*(){this.commandsHistory.push(W.commandId),this.telemetryService.publicLog2("workbenchActionExecuted",{id:W.commandId,from:"quick open"});try{yield this.commandService.executeCommand(W.commandId)}catch(je){Object(L.e)(je)||this.dialogService.show(u.a.Error,Object(v.a)("canNotRun","Command '{0}' resulted in an error ({1})",W.label,D(je)))}})}))}return we})}};oe.PREFIX=">",oe.WORD_FILTER=Object(r.j)(r.h,r.i,r.f),oe=le([_e(1,E.a),_e(2,y.a),_e(3,c.b),_e(4,ne.a),_e(5,S.a)],oe);let ae=class fe extends w.a{constructor(Pe,Be){super();this.storageService=Pe,this.configurationService=Be,this.configuredCommandsHistoryLength=0,this.updateConfiguration(),this.load(),this.registerListeners()}registerListeners(){this._register(this.configurationService.onDidChangeConfiguration(()=>this.updateConfiguration()))}updateConfiguration(){this.configuredCommandsHistoryLength=fe.getConfiguredCommandHistoryLength(this.configurationService),fe.cache&&fe.cache.limit!==this.configuredCommandsHistoryLength&&(fe.cache.limit=this.configuredCommandsHistoryLength,fe.saveState(this.storageService))}load(){const Pe=this.storageService.get(fe.PREF_KEY_CACHE,0);let Be;if(Pe)try{Be=JSON.parse(Pe)}catch(me){}const Se=fe.cache=new b.a(this.configuredCommandsHistoryLength,1);if(Be){let me;Be.usesLRU?me=Be.entries:me=Be.entries.sort((he,Le)=>he.value-Le.value),me.forEach(he=>Se.set(he.key,he.value))}fe.counter=this.storageService.getNumber(fe.PREF_KEY_COUNTER,0,fe.counter)}push(Pe){if(!fe.cache)return;fe.cache.set(Pe,fe.counter++),fe.saveState(this.storageService)}peek(Pe){var Be;return(Be=fe.cache)===null||Be===void 0?void 0:Be.peek(Pe)}static saveState(Pe){if(!fe.cache)return;const Be={usesLRU:!0,entries:[]};fe.cache.forEach((Se,me)=>Be.entries.push({key:me,value:Se})),Pe.store(fe.PREF_KEY_CACHE,JSON.stringify(Be),0,0),Pe.store(fe.PREF_KEY_COUNTER,fe.counter,0,0)}static getConfiguredCommandHistoryLength(Pe){var Be,Se;const me=Pe.getValue(),he=(Se=(Be=me.workbench)===null||Be===void 0?void 0:Be.commandPalette)===null||Se===void 0?void 0:Se.history;return typeof he=="number"?he:fe.DEFAULT_COMMANDS_HISTORY_LENGTH}};ae.DEFAULT_COMMANDS_HISTORY_LENGTH=50,ae.PREF_KEY_CACHE="commandPalette.mru.cache",ae.PREF_KEY_COUNTER="commandPalette.mru.counter",ae.counter=1,ae=le([_e(0,Z.a),_e(1,p.a)],ae);class V extends oe{constructor(fe,Pe,Be,Se,me,he){super(fe,Pe,Be,Se,me,he)}getCodeEditorCommandPicks(){const fe=this.activeTextEditorControl;if(!fe)return[];const Pe=[];for(const Be of fe.getSupportedActions())Pe.push({commandId:Be.id,commandAlias:Be.alias,label:Object(A.e)(Be.label)||Be.id});return Pe}}var G=t("sswD"),ee=t("wQH0"),pe=t("Zr1c"),Te=function(fe,Pe,Be,Se){var me=arguments.length,he=me<3?Pe:Se===null?Se=Object.getOwnPropertyDescriptor(Pe,Be):Se,Le;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")he=Reflect.decorate(fe,Pe,Be,Se);else for(var we=fe.length-1;we>=0;we--)(Le=fe[we])&&(he=(me<3?Le(he):me>3?Le(Pe,Be,he):Le(Pe,Be))||he);return me>3&&he&&Object.defineProperty(Pe,Be,he),he},Ie=function(fe,Pe){return function(Be,Se){Pe(Be,Se,fe)}},Me=function(fe,Pe,Be,Se){function me(he){return he instanceof Be?he:new Be(function(Le){Le(he)})}return new(Be||(Be=Promise))(function(he,Le){function we(W){try{ie(Se.next(W))}catch(U){Le(U)}}function ve(W){try{ie(Se.throw(W))}catch(U){Le(U)}}function ie(W){W.done?he(W.value):me(W.value).then(we,ve)}ie((Se=Se.apply(fe,Pe||[])).next())})};let Oe=class extends V{constructor(Pe,Be,Se,me,he,Le){super({showAlias:!1},Pe,Se,me,he,Le);this.codeEditorService=Be}get activeTextEditorControl(){return Object(I.p)(this.codeEditorService.getFocusedCodeEditor())}getCommandPicks(){return Me(this,void 0,void 0,function*(){return this.getCodeEditorCommandPicks()})}};Oe=Te([Ie(0,E.a),Ie(1,R.a),Ie(2,y.a),Ie(3,c.b),Ie(4,ne.a),Ie(5,S.a)],Oe),g.a.as(B.b.Quickaccess).registerQuickAccessProvider({ctor:Oe,prefix:Oe.PREFIX,helpEntries:[{description:x.d.quickCommandHelp,needsEditor:!0}]});class Xe extends G.b{constructor(){super({id:"editor.action.quickCommand",label:x.d.quickCommandActionLabel,alias:"Command Palette",precondition:void 0,kbOpts:{kbExpr:ee.a.focus,primary:59,weight:100},contextMenuOpts:{group:"z_commands",order:1}})}run(fe){fe.get(pe.a).quickAccess.show(Oe.PREFIX)}}Object(G.j)(Xe)},Ll0s:function(mt,M,t){"use strict";t.d(M,"b",function(){return d}),t.d(M,"f",function(){return D}),t.d(M,"c",function(){return L}),t.d(M,"d",function(){return b}),t.d(M,"e",function(){return u}),t.d(M,"g",function(){return c});var g=t("/cxE"),B=t("cGHE"),x=t("aokT"),R=t("gCVg"),A=t("tX9W"),j=t("cMvZ"),I=t("Apug");t.d(M,"a",function(){return I.a});const v=()=>!0,C=()=>!1,m=p=>p===" "||p===" ";class d{constructor(p,S,E){this._cursorMoveConfigurationBrand=void 0,this._languageId=p;const y=E.options,O=y.get(129);this.readOnly=y.get(80),this.tabSize=S.tabSize,this.indentSize=S.indentSize,this.insertSpaces=S.insertSpaces,this.stickyTabStops=y.get(103),this.lineHeight=y.get(58),this.pageSize=Math.max(1,Math.floor(O.height/this.lineHeight)-2),this.useTabStops=y.get(114),this.wordSeparators=y.get(115),this.emptySelectionClipboard=y.get(32),this.copyWithSyntaxHighlighting=y.get(21),this.multiCursorMergeOverlapping=y.get(68),this.multiCursorPaste=y.get(70),this.autoClosingBrackets=y.get(5),this.autoClosingQuotes=y.get(8),this.autoClosingDelete=y.get(6),this.autoClosingOvertype=y.get(7),this.autoSurround=y.get(11),this.autoIndent=y.get(9),this.surroundingPairs={},this._electricChars=null,this.shouldAutoCloseBefore={quote:d._getShouldAutoClose(p,this.autoClosingQuotes),bracket:d._getShouldAutoClose(p,this.autoClosingBrackets)},this.autoClosingPairs=j.b.getAutoClosingPairs(p);let k=d._getSurroundingPairs(p);if(k)for(const Q of k)this.surroundingPairs[Q.open]=Q.close}static shouldRecreate(p){return p.hasChanged(129)||p.hasChanged(115)||p.hasChanged(32)||p.hasChanged(68)||p.hasChanged(70)||p.hasChanged(5)||p.hasChanged(8)||p.hasChanged(6)||p.hasChanged(7)||p.hasChanged(11)||p.hasChanged(114)||p.hasChanged(58)||p.hasChanged(80)}get electricChars(){if(!this._electricChars){this._electricChars={};let p=d._getElectricCharacters(this._languageId);if(p)for(const S of p)this._electricChars[S]=!0}return this._electricChars}normalizeIndentation(p){return A.c.normalizeIndentation(p,this.indentSize,this.insertSpaces)}static _getElectricCharacters(p){try{return j.b.getElectricCharacters(p)}catch(S){return Object(g.f)(S),null}}static _getShouldAutoClose(p,S){switch(S){case"beforeWhitespace":return m;case"languageDefined":return d._getLanguageDefinedShouldAutoClose(p);case"always":return v;case"never":return C}}static _getLanguageDefinedShouldAutoClose(p){try{const S=j.b.getAutoCloseBeforeSet(p);return E=>S.indexOf(E)!==-1}catch(S){return Object(g.f)(S),C}}static _getSurroundingPairs(p){try{return j.b.getSurroundingPairs(p)}catch(S){return Object(g.f)(S),null}}}class D{constructor(p,S,E,y){this._singleCursorStateBrand=void 0,this.selectionStart=p,this.selectionStartLeftoverVisibleColumns=S,this.position=E,this.leftoverVisibleColumns=y,this.selection=D._computeSelection(this.selectionStart,this.position)}equals(p){return this.selectionStartLeftoverVisibleColumns===p.selectionStartLeftoverVisibleColumns&&this.leftoverVisibleColumns===p.leftoverVisibleColumns&&this.position.equals(p.position)&&this.selectionStart.equalsRange(p.selectionStart)}hasSelection(){return!this.selection.isEmpty()||!this.selectionStart.isEmpty()}move(p,S,E,y){return p?new D(this.selectionStart,this.selectionStartLeftoverVisibleColumns,new B.a(S,E),y):new D(new x.a(S,E,S,E),y,new B.a(S,E),y)}static _computeSelection(p,S){let E,y,O,k;return p.isEmpty()?(E=p.startLineNumber,y=p.startColumn,O=S.lineNumber,k=S.column):S.isBeforeOrEqual(p.getStartPosition())?(E=p.endLineNumber,y=p.endColumn,O=S.lineNumber,k=S.column):(E=p.startLineNumber,y=p.startColumn,O=S.lineNumber,k=S.column),new R.a(E,y,O,k)}}class L{constructor(p,S,E,y){this._cursorContextBrand=void 0,this.model=p,this.viewModel=S,this.coordinatesConverter=E,this.cursorConfig=y}}class r{constructor(p){this.modelState=p,this.viewState=null}}class w{constructor(p){this.modelState=null,this.viewState=p}}class b{constructor(p,S){this._cursorStateBrand=void 0,this.modelState=p,this.viewState=S}static fromModelState(p){return new r(p)}static fromViewState(p){return new w(p)}static fromModelSelection(p){const S=p.selectionStartLineNumber,E=p.selectionStartColumn,y=p.positionLineNumber,O=p.positionColumn,k=new D(new x.a(S,E,S,E),0,new B.a(y,O),0);return b.fromModelState(k)}static fromModelSelections(p){let S=[];for(let E=0,y=p.length;E<y;E++)S[E]=this.fromModelSelection(p[E]);return S}equals(p){return this.viewState.equals(p.viewState)&&this.modelState.equals(p.modelState)}}class u{constructor(p,S,E){this._editOperationResultBrand=void 0,this.type=p,this.commands=S,this.shouldPushStackElementBefore=E.shouldPushStackElementBefore,this.shouldPushStackElementAfter=E.shouldPushStackElementAfter}}function c(p){return p==="'"||p==='"'||p==="`"}},Lx4V:function(mt,M,t){"use strict";t.d(M,"a",function(){return R}),t.d(M,"b",function(){return A});var g=t("6OMU"),B=t("pmY6"),x=t("ic2d"),R;(function(I){I[I.PRESERVE=0]="PRESERVE",I[I.LAST=1]="LAST"})(R||(R={}));const A={Quickaccess:"workbench.contributions.quickaccess"};class j{constructor(){this.providers=[],this.defaultProvider=void 0}registerQuickAccessProvider(I){return I.prefix.length===0?this.defaultProvider=I:this.providers.push(I),this.providers.sort((v,C)=>C.prefix.length-v.prefix.length),Object(B.i)(()=>{this.providers.splice(this.providers.indexOf(I),1),this.defaultProvider===I&&(this.defaultProvider=void 0)})}getQuickAccessProviders(){return Object(g.e)([this.defaultProvider,...this.providers])}getQuickAccessProvider(I){const v=I&&this.providers.find(C=>I.startsWith(C.prefix))||void 0;return v||this.defaultProvider}}x.a.add(A.Quickaccess,new j)},"M/lh":function(mt,M,t){self.MonacoEnvironment=function(g){function B(x){return x.replace(/\/$/,"")}return{globalAPI:!1,getWorkerUrl:function(x,R){var A=t.p,j=(A?B(A)+"/":"")+g[R];if(/^((http:)|(https:)|(file:)|(\/\/))/.test(j)){var I=String(window.location),v=I.substr(0,I.length-window.location.hash.length-window.location.search.length-window.location.pathname.length);if(j.substring(0,v.length)!==v){/^(\/\/)/.test(j)&&(j=window.location.protocol+j);var C="/*"+R+'*/importScripts("'+j+'");',m=new Blob([C],{type:"application/javascript"});return URL.createObjectURL(m)}}return j}}}({editorWorkerService:"editor.worker.js",css:"css.worker.js",html:"html.worker.js",json:"json.worker.js",typescript:"ts.worker.js",javascript:"ts.worker.js",less:"css.worker.js",scss:"css.worker.js",handlebars:"html.worker.js",razor:"html.worker.js"}),t("SBYE"),t("bk7F"),t("KTWA"),t("w29/"),t("CxEt"),t("d6R0"),t("n01l"),t("fD5p"),t("1YUG"),t("5RaG"),t("/RFl"),t("oQaD"),t("dgXF"),t("bfR1"),t("cIJc"),t("lY/7"),t("MyPo"),t("8Ydt"),t("H4T2"),t("rugR"),t("oiKk"),t("GvMn"),t("gJAb"),t("dH+W"),t("2ESN"),t("8XyJ"),t("WwIK"),t("Lkt1"),t("hFIF"),t("4sI4"),t("Q631"),t("10Fh"),t("tXSY"),t("ep4t"),t("vVA1"),t("k7pc"),t("ba9Q"),t("XtJs"),t("s7Km"),t("LUcL"),mt.exports=t("8z58"),t("CdFp"),t("23p7"),t("OOlL"),t("li8W"),t("kdPm"),t("ApJL"),t("jrbv"),t("gqHg"),t("p3Ex"),t("E+ie"),t("9B1q"),t("9XAT"),t("SvYn"),t("I/Lx"),t("LexI"),t("0oIH"),t("+a1H"),t("hFdI"),t("c2dO"),t("zQEy"),t("k7mE"),t("cldp"),t("p5tG"),t("Dvnd"),t("FvUK"),t("ZvGG"),t("QFiB"),t("ZkA/"),t("/cAr"),t("xYNL"),t("jVwG"),t("6lNC"),t("q8qy"),t("sStQ"),t("oKJv"),t("H6Gb"),t("y3CF"),t("JlLP"),t("j2o1"),t("woZy"),t("iLY9"),t("Msxo"),t("ajgA"),t("QiAa"),t("pI2L"),t("yKqg"),t("ij/i"),t("XQgg"),t("Gb1F"),t("xmOD"),t("c9ML"),t("Mzro"),t("GZrW"),t("1lwE"),t("w9QG"),t("ufhN"),t("LRks"),t("BUKB"),t("n18v"),t("EOst"),t("z3hU"),t("nrBJ"),t("BEdG"),t("E4kL")},M1Kb:function(mt,M,t){"use strict";t.d(M,"g",function(){return B}),t.d(M,"f",function(){return x}),t.d(M,"h",function(){return R}),t.d(M,"b",function(){return A}),t.d(M,"c",function(){return j}),t.d(M,"d",function(){return I}),t.d(M,"e",function(){return v}),t.d(M,"i",function(){return C}),t.d(M,"a",function(){return m});var g=t("qj0h"),B;(function(d){d[d.Left=1]="Left",d[d.Center=2]="Center",d[d.Right=4]="Right",d[d.Full=7]="Full"})(B||(B={}));var x;(function(d){d[d.Inline=1]="Inline",d[d.Gutter=2]="Gutter"})(x||(x={}));class R{constructor(d){this._textModelResolvedOptionsBrand=void 0,this.tabSize=Math.max(1,d.tabSize|0),this.indentSize=d.tabSize|0,this.insertSpaces=Boolean(d.insertSpaces),this.defaultEOL=d.defaultEOL|0,this.trimAutoWhitespace=Boolean(d.trimAutoWhitespace),this.bracketPairColorizationOptions=d.bracketPairColorizationOptions}equals(d){return this.tabSize===d.tabSize&&this.indentSize===d.indentSize&&this.insertSpaces===d.insertSpaces&&this.defaultEOL===d.defaultEOL&&this.trimAutoWhitespace===d.trimAutoWhitespace&&Object(g.d)(this.bracketPairColorizationOptions,d.bracketPairColorizationOptions)}createChangeEvent(d){return{tabSize:this.tabSize!==d.tabSize,indentSize:this.indentSize!==d.indentSize,insertSpaces:this.insertSpaces!==d.insertSpaces,trimAutoWhitespace:this.trimAutoWhitespace!==d.trimAutoWhitespace}}}class A{constructor(d,D){this._findMatchBrand=void 0,this.range=d,this.matches=D}}var j;(function(d){d[d.Disabled=0]="Disabled",d[d.EnabledForActive=1]="EnabledForActive",d[d.Enabled=2]="Enabled"})(j||(j={}));class I{constructor(d,D,L){this.visibleColumn=d,this.className=D,this.horizontalLine=L}}class v{constructor(d,D){this.top=d,this.endColumn=D}}class C{constructor(d,D,L,r,w,b){this.identifier=d,this.range=D,this.text=L,this.forceMoveMarkers=r,this.isAutoWhitespaceEdit=w,this._isTracked=b}}class m{constructor(d,D,L){this.reverseEdits=d,this.changes=D,this.trimAutoWhitespaceLineNumbers=L}}},M46C:function(mt,M,t){"use strict";t.d(M,"f",function(){return g}),t.d(M,"b",function(){return B}),t.d(M,"g",function(){return x}),t.d(M,"h",function(){return R}),t.d(M,"i",function(){return A}),t.d(M,"e",function(){return j}),t.d(M,"d",function(){return I}),t.d(M,"c",function(){return v}),t.d(M,"a",function(){return C});class g{constructor(){this.changeType=1}}class B{constructor(m,d,D,L,r){this.ownerId=m,this.lineNumber=d,this.column=D,this.options=L,this.order=r}static applyInjectedText(m,d){if(!d||d.length===0)return m;let D="",L=0;for(const r of d)D+=m.substring(L,r.column-1),L=r.column-1,D+=r.options.content;return D+=m.substring(L),D}static fromDecorations(m){const d=[];for(const D of m)D.options.before&&D.options.before.content.length>0&&d.push(new B(D.ownerId,D.range.startLineNumber,D.range.startColumn,D.options.before,0)),D.options.after&&D.options.after.content.length>0&&d.push(new B(D.ownerId,D.range.endLineNumber,D.range.endColumn,D.options.after,1));return d.sort((D,L)=>D.lineNumber===L.lineNumber?D.column===L.column?D.order-L.order:D.column-L.column:D.lineNumber-L.lineNumber),d}}class x{constructor(m,d,D){this.changeType=2,this.lineNumber=m,this.detail=d,this.injectedText=D}}class R{constructor(m,d){this.changeType=3,this.fromLineNumber=m,this.toLineNumber=d}}class A{constructor(m,d,D,L){this.changeType=4,this.injectedTexts=L,this.fromLineNumber=m,this.toLineNumber=d,this.detail=D}}class j{constructor(){this.changeType=5}}class I{constructor(m,d,D,L){this.changes=m,this.versionId=d,this.isUndoing=D,this.isRedoing=L,this.resultingSelection=null}containsEvent(m){for(let d=0,D=this.changes.length;d<D;d++){const L=this.changes[d];if(L.changeType===m)return!0}return!1}static merge(m,d){const D=[].concat(m.changes).concat(d.changes),L=d.versionId,r=m.isUndoing||d.isUndoing,w=m.isRedoing||d.isRedoing;return new I(D,L,r,w)}}class v{constructor(m){this.changes=m}}class C{constructor(m,d){this.rawContentChangedEvent=m,this.contentChangedEvent=d}merge(m){const d=I.merge(this.rawContentChangedEvent,m.rawContentChangedEvent),D=C._mergeChangeEvents(this.contentChangedEvent,m.contentChangedEvent);return new C(d,D)}static _mergeChangeEvents(m,d){const D=[].concat(m.changes).concat(d.changes),L=d.eol,r=d.versionId,w=m.isUndoing||d.isUndoing,b=m.isRedoing||d.isRedoing,u=m.isFlush||d.isFlush;return{changes:D,eol:L,versionId:r,isUndoing:w,isRedoing:b,isFlush:u}}}},MD5Z:function(mt,M,t){"use strict";t.d(M,"a",function(){return v}),t.d(M,"wc",function(){return d}),t.d(M,"cb",function(){return D}),t.d(M,"ab",function(){return L}),t.d(M,"db",function(){return r}),t.d(M,"bb",function(){return w}),t.d(M,"h",function(){return b}),t.d(M,"b",function(){return u}),t.d(M,"Jc",function(){return c}),t.d(M,"Ic",function(){return p}),t.d(M,"Hc",function(){return S}),t.d(M,"Nc",function(){return E}),t.d(M,"hb",function(){return y}),t.d(M,"jb",function(){return O}),t.d(M,"ib",function(){return k}),t.d(M,"fb",function(){return Q}),t.d(M,"eb",function(){return q}),t.d(M,"gb",function(){return z}),t.d(M,"nb",function(){return J}),t.d(M,"pb",function(){return re}),t.d(M,"ob",function(){return Z}),t.d(M,"qb",function(){return ne}),t.d(M,"sb",function(){return le}),t.d(M,"rb",function(){return _e}),t.d(M,"kb",function(){return Ce}),t.d(M,"mb",function(){return oe}),t.d(M,"lb",function(){return ae}),t.d(M,"f",function(){return ee}),t.d(M,"e",function(){return pe}),t.d(M,"g",function(){return Te}),t.d(M,"c",function(){return Ie}),t.d(M,"d",function(){return Me}),t.d(M,"yc",function(){return Oe}),t.d(M,"Ac",function(){return Xe}),t.d(M,"Bc",function(){return fe}),t.d(M,"zc",function(){return Pe}),t.d(M,"pc",function(){return Be}),t.d(M,"s",function(){return Se}),t.d(M,"u",function(){return me}),t.d(M,"t",function(){return he}),t.d(M,"T",function(){return Le}),t.d(M,"V",function(){return we}),t.d(M,"U",function(){return ve}),t.d(M,"K",function(){return ie}),t.d(M,"M",function(){return W}),t.d(M,"L",function(){return U}),t.d(M,"D",function(){return se}),t.d(M,"C",function(){return je}),t.d(M,"r",function(){return Re}),t.d(M,"B",function(){return We}),t.d(M,"W",function(){return dt}),t.d(M,"Y",function(){return Lt}),t.d(M,"X",function(){return Ht}),t.d(M,"Z",function(){return $e}),t.d(M,"qc",function(){return ot}),t.d(M,"rc",function(){return ce}),t.d(M,"vc",function(){return Ve}),t.d(M,"lc",function(){return it}),t.d(M,"kc",function(){return Et}),t.d(M,"tb",function(){return It}),t.d(M,"wb",function(){return Rt}),t.d(M,"ub",function(){return vo}),t.d(M,"vb",function(){return Mo}),t.d(M,"P",function(){return xo}),t.d(M,"Q",function(){return Do}),t.d(M,"J",function(){return Lo}),t.d(M,"R",function(){return To}),t.d(M,"S",function(){return Vt}),t.d(M,"v",function(){return xt}),t.d(M,"x",function(){return ze}),t.d(M,"z",function(){return ct}),t.d(M,"w",function(){return Ut}),t.d(M,"y",function(){return Qe}),t.d(M,"A",function(){return tt}),t.d(M,"H",function(){return ut}),t.d(M,"E",function(){return Dt}),t.d(M,"G",function(){return Pt}),t.d(M,"F",function(){return Wt}),t.d(M,"I",function(){return zt}),t.d(M,"q",function(){return so}),t.d(M,"O",function(){return Tt}),t.d(M,"N",function(){return Nt}),t.d(M,"i",function(){return rt}),t.d(M,"j",function(){return lt}),t.d(M,"m",function(){return bt}),t.d(M,"o",function(){return St}),t.d(M,"n",function(){return Qt}),t.d(M,"p",function(){return bo}),t.d(M,"k",function(){return qt}),t.d(M,"l",function(){return Eo}),t.d(M,"Eb",function(){return Ro}),t.d(M,"Fb",function(){return zo}),t.d(M,"Hb",function(){return Bo}),t.d(M,"xb",function(){return Jt}),t.d(M,"yb",function(){return fo}),t.d(M,"zb",function(){return ri}),t.d(M,"Nb",function(){return Zo}),t.d(M,"Ob",function(){return ci}),t.d(M,"Pb",function(){return ki}),t.d(M,"Lb",function(){return wi}),t.d(M,"Mb",function(){return Zi}),t.d(M,"Jb",function(){return Vi}),t.d(M,"Kb",function(){return vi}),t.d(M,"Ab",function(){return sn}),t.d(M,"Ib",function(){return en}),t.d(M,"Gb",function(){return on}),t.d(M,"Bb",function(){return cn}),t.d(M,"Db",function(){return Bi}),t.d(M,"Cb",function(){return zi}),t.d(M,"Mc",function(){return Ji}),t.d(M,"Gc",function(){return ui}),t.d(M,"tc",function(){return Hi}),t.d(M,"uc",function(){return Oi}),t.d(M,"sc",function(){return Ii}),t.d(M,"Rb",function(){return Qi}),t.d(M,"Sb",function(){return Li}),t.d(M,"Qb",function(){return Ui}),t.d(M,"Vb",function(){return fi}),t.d(M,"Tb",function(){return $i}),t.d(M,"Ub",function(){return rn}),t.d(M,"Wb",function(){return _i}),t.d(M,"Kc",function(){return Pi}),t.d(M,"Ec",function(){return gt}),t.d(M,"Fc",function(){return Ge}),t.d(M,"Cc",function(){return $}),t.d(M,"Dc",function(){return Ee}),t.d(M,"ic",function(){return Ne}),t.d(M,"jc",function(){return He}),t.d(M,"Zb",function(){return at}),t.d(M,"cc",function(){return vt}),t.d(M,"bc",function(){return Xt}),t.d(M,"Yb",function(){return Bt}),t.d(M,"gc",function(){return Kt}),t.d(M,"Xb",function(){return ro}),t.d(M,"ac",function(){return F}),t.d(M,"ec",function(){return te}),t.d(M,"fc",function(){return Ae}),t.d(M,"dc",function(){return Ye}),t.d(M,"mc",function(){return pt}),t.d(M,"oc",function(){return Mt}),t.d(M,"nc",function(){return jt}),t.d(M,"Lc",function(){return ho}),t.d(M,"hc",function(){return mo}),t.d(M,"xc",function(){return Oo});var g=t("X+cX"),B=t("zrhQ"),x=t("MI8n"),R=t("746U"),A=t("3/fG"),j=t("3Rsk"),I=t("ic2d");const v={ColorContribution:"base.contributions.colors"};class C{constructor(){this._onDidChangeSchema=new x.b,this.onDidChangeSchema=this._onDidChangeSchema.event,this.colorSchema={type:"object",properties:{}},this.colorReferenceSchema={type:"string",enum:[],enumDescriptions:[]},this.colorsById={}}registerColor(Uo,mi,Ri,Di=!1,pi){let Wi={id:Uo,description:Ri,defaults:mi,needsTransparency:Di,deprecationMessage:pi};this.colorsById[Uo]=Wi;let fn={type:"string",description:Ri,format:"color-hex",defaultSnippets:[{body:"${1:#ff0000}"}]};return pi&&(fn.deprecationMessage=pi),this.colorSchema.properties[Uo]=fn,this.colorReferenceSchema.enum.push(Uo),this.colorReferenceSchema.enumDescriptions.push(Ri),this._onDidChangeSchema.fire(),Uo}resolveDefaultColor(Uo,mi){const Ri=this.colorsById[Uo];if(Ri&&Ri.defaults){const Di=Ri.defaults[mi.type];return Oo(Di,mi)}return}getColorSchema(){return this.colorSchema}toString(){let Uo=(mi,Ri)=>{let Di=mi.indexOf(".")===-1?0:1,pi=Ri.indexOf(".")===-1?0:1;return Di!==pi?Di-pi:mi.localeCompare(Ri)};return Object.keys(this.colorsById).sort(Uo).map(mi=>`- \`${mi}\`: ${this.colorsById[mi].description}`).join(`
|
|
|
`)}}const m=new C;I.a.add(v.ColorContribution,m);function d(Uo,mi,Ri,Di,pi){return m.registerColor(Uo,mi,Ri,Di,pi)}const D=d("foreground",{dark:"#CCCCCC",light:"#616161",hc:"#FFFFFF"},A.a("foreground","Overall foreground color. This color is only used if not overridden by a component.")),L=d("errorForeground",{dark:"#F48771",light:"#A1260D",hc:"#F48771"},A.a("errorForeground","Overall foreground color for error messages. This color is only used if not overridden by a component.")),r=d("icon.foreground",{dark:"#C5C5C5",light:"#424242",hc:"#FFFFFF"},A.a("iconForeground","The default color for icons in the workbench.")),w=d("focusBorder",{dark:"#007FD4",light:"#0090F1",hc:"#F38518"},A.a("focusBorder","Overall border color for focused elements. This color is only used if not overridden by a component.")),b=d("contrastBorder",{light:null,dark:null,hc:"#6FC3DF"},A.a("contrastBorder","An extra border around elements to separate them from others for greater contrast.")),u=d("contrastActiveBorder",{light:null,dark:null,hc:w},A.a("activeContrastBorder","An extra border around active elements to separate them from others for greater contrast.")),c=d("textLink.foreground",{light:"#006AB1",dark:"#3794FF",hc:"#3794FF"},A.a("textLinkForeground","Foreground color for links in text.")),p=d("textLink.activeForeground",{light:"#006AB1",dark:"#3794FF",hc:"#3794FF"},A.a("textLinkActiveForeground","Foreground color for links in text when clicked on and on mouse hover.")),S=d("textCodeBlock.background",{light:"#dcdcdc66",dark:"#0a0a0a66",hc:B.a.black},A.a("textCodeBlockBackground","Background color for code blocks in text.")),E=d("widget.shadow",{dark:ho(B.a.black,.36),light:ho(B.a.black,.16),hc:null},A.a("widgetShadow","Shadow color of widgets such as find/replace inside the editor.")),y=d("input.background",{dark:"#3C3C3C",light:B.a.white,hc:B.a.black},A.a("inputBoxBackground","Input box background.")),O=d("input.foreground",{dark:D,light:D,hc:D},A.a("inputBoxForeground","Input box foreground.")),k=d("input.border",{dark:null,light:null,hc:b},A.a("inputBoxBorder","Input box border.")),Q=d("inputOption.activeBorder",{dark:"#007ACC00",light:"#007ACC00",hc:b},A.a("inputBoxActiveOptionBorder","Border color of activated options in input fields.")),q=d("inputOption.activeBackground",{dark:ho(w,.4),light:ho(w,.2),hc:B.a.transparent},A.a("inputOption.activeBackground","Background color of activated options in input fields.")),z=d("inputOption.activeForeground",{dark:B.a.white,light:B.a.black,hc:null},A.a("inputOption.activeForeground","Foreground color of activated options in input fields.")),J=d("inputValidation.infoBackground",{dark:"#063B49",light:"#D6ECF2",hc:B.a.black},A.a("inputValidationInfoBackground","Input validation background color for information severity.")),re=d("inputValidation.infoForeground",{dark:null,light:null,hc:null},A.a("inputValidationInfoForeground","Input validation foreground color for information severity.")),Z=d("inputValidation.infoBorder",{dark:"#007acc",light:"#007acc",hc:b},A.a("inputValidationInfoBorder","Input validation border color for information severity.")),ne=d("inputValidation.warningBackground",{dark:"#352A05",light:"#F6F5D2",hc:B.a.black},A.a("inputValidationWarningBackground","Input validation background color for warning severity.")),le=d("inputValidation.warningForeground",{dark:null,light:null,hc:null},A.a("inputValidationWarningForeground","Input validation foreground color for warning severity.")),_e=d("inputValidation.warningBorder",{dark:"#B89500",light:"#B89500",hc:b},A.a("inputValidationWarningBorder","Input validation border color for warning severity.")),Ce=d("inputValidation.errorBackground",{dark:"#5A1D1D",light:"#F2DEDE",hc:B.a.black},A.a("inputValidationErrorBackground","Input validation background color for error severity.")),oe=d("inputValidation.errorForeground",{dark:null,light:null,hc:null},A.a("inputValidationErrorForeground","Input validation foreground color for error severity.")),ae=d("inputValidation.errorBorder",{dark:"#BE1100",light:"#BE1100",hc:b},A.a("inputValidationErrorBorder","Input validation border color for error severity.")),V=d("dropdown.background",{dark:"#3C3C3C",light:B.a.white,hc:B.a.black},A.a("dropdownBackground","Dropdown background.")),G=d("dropdown.foreground",{dark:"#F0F0F0",light:null,hc:B.a.white},A.a("dropdownForeground","Dropdown foreground.")),ee=d("button.foreground",{dark:B.a.white,light:B.a.white,hc:B.a.white},A.a("buttonForeground","Button foreground color.")),pe=d("button.background",{dark:"#0E639C",light:"#007ACC",hc:null},A.a("buttonBackground","Button background color.")),Te=d("button.hoverBackground",{dark:io(pe,.2),light:uo(pe,.2),hc:null},A.a("buttonHoverBackground","Button background color when hovering.")),Ie=d("badge.background",{dark:"#4D4D4D",light:"#C4C4C4",hc:B.a.black},A.a("badgeBackground","Badge background color. Badges are small information labels, e.g. for search results count.")),Me=d("badge.foreground",{dark:B.a.white,light:"#333",hc:B.a.white},A.a("badgeForeground","Badge foreground color. Badges are small information labels, e.g. for search results count.")),Oe=d("scrollbar.shadow",{dark:"#000000",light:"#DDDDDD",hc:null},A.a("scrollbarShadow","Scrollbar shadow to indicate that the view is scrolled.")),Xe=d("scrollbarSlider.background",{dark:B.a.fromHex("#797979").transparent(.4),light:B.a.fromHex("#646464").transparent(.4),hc:ho(b,.6)},A.a("scrollbarSliderBackground","Scrollbar slider background color.")),fe=d("scrollbarSlider.hoverBackground",{dark:B.a.fromHex("#646464").transparent(.7),light:B.a.fromHex("#646464").transparent(.7),hc:ho(b,.8)},A.a("scrollbarSliderHoverBackground","Scrollbar slider background color when hovering.")),Pe=d("scrollbarSlider.activeBackground",{dark:B.a.fromHex("#BFBFBF").transparent(.4),light:B.a.fromHex("#000000").transparent(.6),hc:b},A.a("scrollbarSliderActiveBackground","Scrollbar slider background color when clicked on.")),Be=d("progressBar.background",{dark:B.a.fromHex("#0E70C0"),light:B.a.fromHex("#0E70C0"),hc:b},A.a("progressBarBackground","Background color of the progress bar that can show for long running operations.")),Se=d("editorError.background",{dark:null,light:null,hc:null},A.a("editorError.background","Background color of error text in the editor. The color must not be opaque so as not to hide underlying decorations."),!0),me=d("editorError.foreground",{dark:"#F14C4C",light:"#E51400",hc:null},A.a("editorError.foreground","Foreground color of error squigglies in the editor.")),he=d("editorError.border",{dark:null,light:null,hc:B.a.fromHex("#E47777").transparent(.8)},A.a("errorBorder","Border color of error boxes in the editor.")),Le=d("editorWarning.background",{dark:null,light:null,hc:null},A.a("editorWarning.background","Background color of warning text in the editor. The color must not be opaque so as not to hide underlying decorations."),!0),we=d("editorWarning.foreground",{dark:"#CCA700",light:"#BF8803",hc:null},A.a("editorWarning.foreground","Foreground color of warning squigglies in the editor.")),ve=d("editorWarning.border",{dark:null,light:null,hc:B.a.fromHex("#FFCC00").transparent(.8)},A.a("warningBorder","Border color of warning boxes in the editor.")),ie=d("editorInfo.background",{dark:null,light:null,hc:null},A.a("editorInfo.background","Background color of info text in the editor. The color must not be opaque so as not to hide underlying decorations."),!0),W=d("editorInfo.foreground",{dark:"#3794FF",light:"#1a85ff",hc:"#3794FF"},A.a("editorInfo.foreground","Foreground color of info squigglies in the editor.")),U=d("editorInfo.border",{dark:null,light:null,hc:B.a.fromHex("#3794FF").transparent(.8)},A.a("infoBorder","Border color of info boxes in the editor.")),se=d("editorHint.foreground",{dark:B.a.fromHex("#eeeeee").transparent(.7),light:"#6c6c6c",hc:null},A.a("editorHint.foreground","Foreground color of hint squigglies in the editor.")),je=d("editorHint.border",{dark:null,light:null,hc:B.a.fromHex("#eeeeee").transparent(.8)},A.a("hintBorder","Border color of hint boxes in the editor.")),Re=d("editor.background",{light:"#fffffe",dark:"#1E1E1E",hc:B.a.black},A.a("editorBackground","Editor background color.")),We=d("editor.foreground",{light:"#333333",dark:"#BBBBBB",hc:B.a.white},A.a("editorForeground","Editor default foreground color.")),dt=d("editorWidget.background",{dark:"#252526",light:"#F3F3F3",hc:"#0C141F"},A.a("editorWidgetBackground","Background color of editor widgets, such as find/replace.")),Lt=d("editorWidget.foreground",{dark:D,light:D,hc:D},A.a("editorWidgetForeground","Foreground color of editor widgets, such as find/replace.")),Ht=d("editorWidget.border",{dark:"#454545",light:"#C8C8C8",hc:b},A.a("editorWidgetBorder","Border color of editor widgets. The color is only used if the widget chooses to have a border and if the color is not overridden by a widget.")),$e=d("editorWidget.resizeBorder",{light:null,dark:null,hc:null},A.a("editorWidgetResizeBorder","Border color of the resize bar of editor widgets. The color is only used if the widget chooses to have a resize border and if the color is not overridden by a widget.")),ot=d("quickInput.background",{dark:dt,light:dt,hc:dt},A.a("pickerBackground","Quick picker background color. The quick picker widget is the container for pickers like the command palette.")),ce=d("quickInput.foreground",{dark:Lt,light:Lt,hc:Lt},A.a("pickerForeground","Quick picker foreground color. The quick picker widget is the container for pickers like the command palette.")),Ve=d("quickInputTitle.background",{dark:new B.a(new B.c(255,255,255,.105)),light:new B.a(new B.c(0,0,0,.06)),hc:"#000000"},A.a("pickerTitleBackground","Quick picker title background color. The quick picker widget is the container for pickers like the command palette.")),it=d("pickerGroup.foreground",{dark:"#3794FF",light:"#0066BF",hc:B.a.white},A.a("pickerGroupForeground","Quick picker color for grouping labels.")),Et=d("pickerGroup.border",{dark:"#3F3F46",light:"#CCCEDB",hc:B.a.white},A.a("pickerGroupBorder","Quick picker color for grouping borders.")),It=d("keybindingLabel.background",{dark:new B.a(new B.c(128,128,128,.17)),light:new B.a(new B.c(221,221,221,.4)),hc:B.a.transparent},A.a("keybindingLabelBackground","Keybinding label background color. The keybinding label is used to represent a keyboard shortcut.")),Rt=d("keybindingLabel.foreground",{dark:B.a.fromHex("#CCCCCC"),light:B.a.fromHex("#555555"),hc:B.a.white},A.a("keybindingLabelForeground","Keybinding label foreground color. The keybinding label is used to represent a keyboard shortcut.")),vo=d("keybindingLabel.border",{dark:new B.a(new B.c(51,51,51,.6)),light:new B.a(new B.c(204,204,204,.4)),hc:new B.a(new B.c(111,195,223))},A.a("keybindingLabelBorder","Keybinding label border color. The keybinding label is used to represent a keyboard shortcut.")),Mo=d("keybindingLabel.bottomBorder",{dark:new B.a(new B.c(68,68,68,.6)),light:new B.a(new B.c(187,187,187,.4)),hc:new B.a(new B.c(111,195,223))},A.a("keybindingLabelBottomBorder","Keybinding label border bottom color. The keybinding label is used to represent a keyboard shortcut.")),xo=d("editor.selectionBackground",{light:"#ADD6FF",dark:"#264F78",hc:"#f3f518"},A.a("editorSelectionBackground","Color of the editor selection.")),Do=d("editor.selectionForeground",{light:null,dark:null,hc:"#000000"},A.a("editorSelectionForeground","Color of the selected text for high contrast.")),Lo=d("editor.inactiveSelectionBackground",{light:ho(xo,.5),dark:ho(xo,.5),hc:ho(xo,.5)},A.a("editorInactiveSelection","Color of the selection in an inactive editor. The color must not be opaque so as not to hide underlying decorations."),!0),To=d("editor.selectionHighlightBackground",{light:Ao(xo,Re,.3,.6),dark:Ao(xo,Re,.3,.6),hc:null},A.a("editorSelectionHighlight","Color for regions with the same content as the selection. The color must not be opaque so as not to hide underlying decorations."),!0),Vt=d("editor.selectionHighlightBorder",{light:null,dark:null,hc:u},A.a("editorSelectionHighlightBorder","Border color for regions with the same content as the selection.")),xt=d("editor.findMatchBackground",{light:"#A8AC94",dark:"#515C6A",hc:null},A.a("editorFindMatch","Color of the current search match.")),ze=d("editor.findMatchHighlightBackground",{light:"#EA5C0055",dark:"#EA5C0055",hc:null},A.a("findMatchHighlight","Color of the other search matches. The color must not be opaque so as not to hide underlying decorations."),!0),ct=d("editor.findRangeHighlightBackground",{dark:"#3a3d4166",light:"#b4b4b44d",hc:null},A.a("findRangeHighlight","Color of the range limiting the search. The color must not be opaque so as not to hide underlying decorations."),!0),Ut=d("editor.findMatchBorder",{light:null,dark:null,hc:u},A.a("editorFindMatchBorder","Border color of the current search match.")),Qe=d("editor.findMatchHighlightBorder",{light:null,dark:null,hc:u},A.a("findMatchHighlightBorder","Border color of the other search matches.")),tt=d("editor.findRangeHighlightBorder",{dark:null,light:null,hc:ho(u,.4)},A.a("findRangeHighlightBorder","Border color of the range limiting the search. The color must not be opaque so as not to hide underlying decorations."),!0),ut=d("editor.hoverHighlightBackground",{light:"#ADD6FF26",dark:"#264f7840",hc:"#ADD6FF26"},A.a("hoverHighlight","Highlight below the word for which a hover is shown. The color must not be opaque so as not to hide underlying decorations."),!0),Dt=d("editorHoverWidget.background",{light:dt,dark:dt,hc:dt},A.a("hoverBackground","Background color of the editor hover.")),Pt=d("editorHoverWidget.foreground",{light:Lt,dark:Lt,hc:Lt},A.a("hoverForeground","Foreground color of the editor hover.")),Wt=d("editorHoverWidget.border",{light:Ht,dark:Ht,hc:Ht},A.a("hoverBorder","Border color of the editor hover.")),zt=d("editorHoverWidget.statusBarBackground",{dark:io(Dt,.2),light:uo(Dt,.05),hc:dt},A.a("statusBarBackground","Background color of the editor hover status bar.")),so=d("editorLink.activeForeground",{dark:"#4E94CE",light:B.a.blue,hc:B.a.cyan},A.a("activeLinkForeground","Color of active links.")),wo=d("editorInlayHint.foreground",{dark:ho(Me,.8),light:ho(Me,.8),hc:Me},A.a("editorInlayHintForeground","Foreground color of inline hints")),No=d("editorInlayHint.background",{dark:ho(Ie,.6),light:ho(Ie,.3),hc:Ie},A.a("editorInlayHintBackground","Background color of inline hints")),di=d("editorInlayHint.typeForeground",{dark:wo,light:wo,hc:wo},A.a("editorInlayHintForegroundTypes","Foreground color of inline hints for types")),_o=d("editorInlayHint.typeBackground",{dark:No,light:No,hc:No},A.a("editorInlayHintBackgroundTypes","Background color of inline hints for types")),no=d("editorInlayHint.parameterForeground",{dark:wo,light:wo,hc:wo},A.a("editorInlayHintForegroundParameter","Foreground color of inline hints for parameters")),_t=d("editorInlayHint.parameterBackground",{dark:No,light:No,hc:No},A.a("editorInlayHintBackgroundParameter","Background color of inline hints for parameters")),Tt=d("editorLightBulb.foreground",{dark:"#FFCC00",light:"#DDB100",hc:"#FFCC00"},A.a("editorLightBulbForeground","The color used for the lightbulb actions icon.")),Nt=d("editorLightBulbAutoFix.foreground",{dark:"#75BEFF",light:"#007ACC",hc:"#75BEFF"},A.a("editorLightBulbAutoFixForeground","The color used for the lightbulb auto fix actions icon.")),rt=new B.a(new B.c(155,185,85,.2)),lt=new B.a(new B.c(255,0,0,.2)),bt=d("diffEditor.insertedTextBackground",{dark:rt,light:rt,hc:null},A.a("diffEditorInserted","Background color for text that got inserted. The color must not be opaque so as not to hide underlying decorations."),!0),St=d("diffEditor.removedTextBackground",{dark:lt,light:lt,hc:null},A.a("diffEditorRemoved","Background color for text that got removed. The color must not be opaque so as not to hide underlying decorations."),!0),Qt=d("diffEditor.insertedTextBorder",{dark:null,light:null,hc:"#33ff2eff"},A.a("diffEditorInsertedOutline","Outline color for the text that got inserted.")),bo=d("diffEditor.removedTextBorder",{dark:null,light:null,hc:"#FF008F"},A.a("diffEditorRemovedOutline","Outline color for text that got removed.")),qt=d("diffEditor.border",{dark:null,light:null,hc:b},A.a("diffEditorBorder","Border color between the two text editors.")),Eo=d("diffEditor.diagonalFill",{dark:"#cccccc33",light:"#22222233",hc:null},A.a("diffDiagonalFill","Color of the diff editor's diagonal fill. The diagonal fill is used in side-by-side diff views.")),Ro=d("list.focusBackground",{dark:null,light:null,hc:null},A.a("listFocusBackground","List/Tree background color for the focused item when the list/tree is active. An active list/tree has keyboard focus, an inactive does not.")),zo=d("list.focusForeground",{dark:null,light:null,hc:null},A.a("listFocusForeground","List/Tree foreground color for the focused item when the list/tree is active. An active list/tree has keyboard focus, an inactive does not.")),Bo=d("list.focusOutline",{dark:w,light:w,hc:u},A.a("listFocusOutline","List/Tree outline color for the focused item when the list/tree is active. An active list/tree has keyboard focus, an inactive does not.")),Jt=d("list.activeSelectionBackground",{dark:"#094771",light:"#0060C0",hc:null},A.a("listActiveSelectionBackground","List/Tree background color for the selected item when the list/tree is active. An active list/tree has keyboard focus, an inactive does not.")),fo=d("list.activeSelectionForeground",{dark:B.a.white,light:B.a.white,hc:null},A.a("listActiveSelectionForeground","List/Tree foreground color for the selected item when the list/tree is active. An active list/tree has keyboard focus, an inactive does not.")),ri=d("list.activeSelectionIconForeground",{dark:null,light:null,hc:null},A.a("listActiveSelectionIconForeground","List/Tree icon foreground color for the selected item when the list/tree is active. An active list/tree has keyboard focus, an inactive does not.")),Zo=d("list.inactiveSelectionBackground",{dark:"#37373D",light:"#E4E6F1",hc:null},A.a("listInactiveSelectionBackground","List/Tree background color for the selected item when the list/tree is inactive. An active list/tree has keyboard focus, an inactive does not.")),ci=d("list.inactiveSelectionForeground",{dark:null,light:null,hc:null},A.a("listInactiveSelectionForeground","List/Tree foreground color for the selected item when the list/tree is inactive. An active list/tree has keyboard focus, an inactive does not.")),ki=d("list.inactiveSelectionIconForeground",{dark:null,light:null,hc:null},A.a("listInactiveSelectionIconForeground","List/Tree icon foreground color for the selected item when the list/tree is inactive. An active list/tree has keyboard focus, an inactive does not.")),wi=d("list.inactiveFocusBackground",{dark:null,light:null,hc:null},A.a("listInactiveFocusBackground","List/Tree background color for the focused item when the list/tree is inactive. An active list/tree has keyboard focus, an inactive does not.")),Zi=d("list.inactiveFocusOutline",{dark:null,light:null,hc:null},A.a("listInactiveFocusOutline","List/Tree outline color for the focused item when the list/tree is inactive. An active list/tree has keyboard focus, an inactive does not.")),Vi=d("list.hoverBackground",{dark:"#2A2D2E",light:"#F0F0F0",hc:null},A.a("listHoverBackground","List/Tree background when hovering over items using the mouse.")),vi=d("list.hoverForeground",{dark:null,light:null,hc:null},A.a("listHoverForeground","List/Tree foreground when hovering over items using the mouse.")),sn=d("list.dropBackground",{dark:"#062F4A",light:"#D6EBFF",hc:null},A.a("listDropBackground","List/Tree drag and drop background when moving items around using the mouse.")),en=d("list.highlightForeground",{dark:"#18A3FF",light:"#0066BF",hc:w},A.a("highlight","List/Tree foreground color of the match highlights when searching inside the list/tree.")),on=d("list.focusHighlightForeground",{dark:en,light:Io(Jt,en,"#9DDDFF"),hc:en},A.a("listFocusHighlightForeground","List/Tree foreground color of the match highlights on actively focused items when searching inside the list/tree.")),cn=d("listFilterWidget.background",{light:"#efc1ad",dark:"#653723",hc:B.a.black},A.a("listFilterWidgetBackground","Background color of the type filter widget in lists and trees.")),Bi=d("listFilterWidget.outline",{dark:B.a.transparent,light:B.a.transparent,hc:"#f38518"},A.a("listFilterWidgetOutline","Outline color of the type filter widget in lists and trees.")),zi=d("listFilterWidget.noMatchesOutline",{dark:"#BE1100",light:"#BE1100",hc:b},A.a("listFilterWidgetNoMatchesOutline","Outline color of the type filter widget in lists and trees, when there are no matches.")),Ji=d("tree.indentGuidesStroke",{dark:"#585858",light:"#a9a9a9",hc:"#a9a9a9"},A.a("treeIndentGuidesStroke","Tree stroke color for the indentation guides.")),ui=d("tree.tableColumnsBorder",{dark:"#CCCCCC20",light:"#61616120",hc:null},A.a("treeIndentGuidesStroke","Tree stroke color for the indentation guides.")),pn=d("quickInput.list.focusBackground",{dark:null,light:null,hc:null},"",void 0,A.a("quickInput.list.focusBackground deprecation","Please use quickInputList.focusBackground instead")),Hi=d("quickInputList.focusForeground",{dark:fo,light:fo,hc:fo},A.a("quickInput.listFocusForeground","Quick picker foreground color for the focused item.")),Oi=d("quickInputList.focusIconForeground",{dark:ri,light:ri,hc:ri},A.a("quickInput.listFocusIconForeground","Quick picker icon foreground color for the focused item.")),Ii=d("quickInputList.focusBackground",{dark:mo(pn,Jt),light:mo(pn,Jt),hc:null},A.a("quickInput.listFocusBackground","Quick picker background color for the focused item.")),Qi=d("menu.border",{dark:null,light:null,hc:b},A.a("menuBorder","Border color of menus.")),Li=d("menu.foreground",{dark:G,light:D,hc:G},A.a("menuForeground","Foreground color of menu items.")),Ui=d("menu.background",{dark:V,light:V,hc:V},A.a("menuBackground","Background color of menu items.")),fi=d("menu.selectionForeground",{dark:fo,light:fo,hc:fo},A.a("menuSelectionForeground","Foreground color of the selected menu item in menus.")),$i=d("menu.selectionBackground",{dark:Jt,light:Jt,hc:Jt},A.a("menuSelectionBackground","Background color of the selected menu item in menus.")),rn=d("menu.selectionBorder",{dark:null,light:null,hc:u},A.a("menuSelectionBorder","Border color of the selected menu item in menus.")),_i=d("menu.separatorBackground",{dark:"#BBBBBB",light:"#888888",hc:b},A.a("menuSeparatorBackground","Color of a separator menu item in menus.")),Pi=d("toolbar.hoverBackground",{dark:"#5a5d5e50",light:"#b8b8b850",hc:null},A.a("toolbarHoverBackground","Toolbar background when hovering over actions using the mouse")),gt=d("editor.snippetTabstopHighlightBackground",{dark:new B.a(new B.c(124,124,124,.3)),light:new B.a(new B.c(10,50,100,.2)),hc:new B.a(new B.c(124,124,124,.3))},A.a("snippetTabstopHighlightBackground","Highlight background color of a snippet tabstop.")),Ge=d("editor.snippetTabstopHighlightBorder",{dark:null,light:null,hc:null},A.a("snippetTabstopHighlightBorder","Highlight border color of a snippet tabstop.")),$=d("editor.snippetFinalTabstopHighlightBackground",{dark:null,light:null,hc:null},A.a("snippetFinalTabstopHighlightBackground","Highlight background color of the final tabstop of a snippet.")),Ee=d("editor.snippetFinalTabstopHighlightBorder",{dark:"#525252",light:new B.a(new B.c(10,50,100,.5)),hc:"#525252"},A.a("snippetFinalTabstopHighlightBorder","Highlight border color of the final tabstop of a snippet.")),Ne=d("editorOverviewRuler.findMatchForeground",{dark:"#d186167e",light:"#d186167e",hc:"#AB5A00"},A.a("overviewRulerFindMatchForeground","Overview ruler marker color for find matches. The color must not be opaque so as not to hide underlying decorations."),!0),He=d("editorOverviewRuler.selectionHighlightForeground",{dark:"#A0A0A0CC",light:"#A0A0A0CC",hc:"#A0A0A0CC"},A.a("overviewRulerSelectionHighlightForeground","Overview ruler marker color for selection highlights. The color must not be opaque so as not to hide underlying decorations."),!0),at=d("minimap.findMatchHighlight",{light:"#d18616",dark:"#d18616",hc:"#AB5A00"},A.a("minimapFindMatchHighlight","Minimap marker color for find matches."),!0),vt=d("minimap.selectionOccurrenceHighlight",{light:"#c9c9c9",dark:"#676767",hc:"#ffffff"},A.a("minimapSelectionOccurrenceHighlight","Minimap marker color for repeating editor selections."),!0),Xt=d("minimap.selectionHighlight",{light:"#ADD6FF",dark:"#264F78",hc:"#ffffff"},A.a("minimapSelectionHighlight","Minimap marker color for the editor selection."),!0),Bt=d("minimap.errorHighlight",{dark:new B.a(new B.c(255,18,18,.7)),light:new B.a(new B.c(255,18,18,.7)),hc:new B.a(new B.c(255,50,50,1))},A.a("minimapError","Minimap marker color for errors.")),Kt=d("minimap.warningHighlight",{dark:we,light:we,hc:ve},A.a("overviewRuleWarning","Minimap marker color for warnings.")),ro=d("minimap.background",{dark:null,light:null,hc:null},A.a("minimapBackground","Minimap background color.")),F=d("minimap.foregroundOpacity",{dark:B.a.fromHex("#000f"),light:B.a.fromHex("#000f"),hc:B.a.fromHex("#000f")},A.a("minimapForegroundOpacity",'Opacity of foreground elements rendered in the minimap. For example, "#000000c0" will render the elements with 75% opacity.')),te=d("minimapSlider.background",{light:ho(Xe,.5),dark:ho(Xe,.5),hc:ho(Xe,.5)},A.a("minimapSliderBackground","Minimap slider background color.")),Ae=d("minimapSlider.hoverBackground",{light:ho(fe,.5),dark:ho(fe,.5),hc:ho(fe,.5)},A.a("minimapSliderHoverBackground","Minimap slider background color when hovering.")),Ye=d("minimapSlider.activeBackground",{light:ho(Pe,.5),dark:ho(Pe,.5),hc:ho(Pe,.5)},A.a("minimapSliderActiveBackground","Minimap slider background color when clicked on.")),pt=d("problemsErrorIcon.foreground",{dark:me,light:me,hc:me},A.a("problemsErrorIconForeground","The color used for the problems error icon.")),Mt=d("problemsWarningIcon.foreground",{dark:we,light:we,hc:we},A.a("problemsWarningIconForeground","The color used for the problems warning icon.")),jt=d("problemsInfoIcon.foreground",{dark:W,light:W,hc:W},A.a("problemsInfoIconForeground","The color used for the problems info icon."));function $t(Uo,mi){var Ri,Di,pi;switch(Uo.op){case 0:return(Ri=Oo(Uo.value,mi))===null||Ri===void 0?void 0:Ri.darken(Uo.factor);case 1:return(Di=Oo(Uo.value,mi))===null||Di===void 0?void 0:Di.lighten(Uo.factor);case 2:return(pi=Oo(Uo.value,mi))===null||pi===void 0?void 0:pi.transparent(Uo.factor);case 3:for(const In of Uo.values){const an=Oo(In,mi);if(an)return an}return;case 5:return Oo(mi.defines(Uo.if)?Uo.then:Uo.else,mi);case 4:const Wi=Oo(Uo.value,mi);if(!Wi)return;const fn=Oo(Uo.background,mi);return fn?Wi.isDarkerThan(fn)?B.a.getLighterColor(Wi,fn,Uo.factor).transparent(Uo.transparency):B.a.getDarkerColor(Wi,fn,Uo.factor).transparent(Uo.transparency):Wi.transparent(Uo.factor*Uo.transparency);default:throw Object(R.b)(Uo)}}function uo(Uo,mi){return{op:0,value:Uo,factor:mi}}function io(Uo,mi){return{op:1,value:Uo,factor:mi}}function ho(Uo,mi){return{op:2,value:Uo,factor:mi}}function mo(...Uo){return{op:3,values:Uo}}function Io(Uo,mi,Ri){return{op:5,if:Uo,then:mi,else:Ri}}function Ao(Uo,mi,Ri,Di){return{op:4,value:Uo,background:mi,factor:Ri,transparency:Di}}function Oo(Uo,mi){return Uo===null?void 0:typeof Uo=="string"?Uo[0]==="#"?B.a.fromHex(Uo):mi.getColor(Uo):Uo instanceof B.a?Uo:typeof Uo=="object"?$t(Uo,mi):void 0}const Wo="vscode://schemas/workbench-colors";let si=I.a.as(j.a.JSONContribution);si.registerSchema(Wo,m.getColorSchema());const hi=new g.e(()=>si.notifySchemaChanged(Wo),200);m.onDidChangeSchema(()=>{hi.isScheduled()||hi.schedule()})},MNXI:function(mt,M,t){},MXAL:function(mt,M,t){"use strict";t.d(M,"a",function(){return B}),t.d(M,"b",function(){return x});var g=t("CZ1j");class B{constructor(R){let A=Object(g.b)(R);this._defaultValue=A,this._asciiMap=B._createAsciiMap(A),this._map=new Map}static _createAsciiMap(R){let A=new Uint8Array(256);for(let j=0;j<256;j++)A[j]=R;return A}set(R,A){let j=Object(g.b)(A);R>=0&&R<256?this._asciiMap[R]=j:this._map.set(R,j)}get(R){return R>=0&&R<256?this._asciiMap[R]:this._map.get(R)||this._defaultValue}}class x{constructor(){this._actual=new B(0)}add(R){this._actual.set(R,1)}has(R){return this._actual.get(R)===1}}},Md8J:function(mt,M,t){"use strict";t.d(M,"c",function(){return B}),t.d(M,"b",function(){return x}),t.d(M,"a",function(){return R});var g=t("EffR");function B(m,d={}){const D=R(d);return D.textContent=m,D}function x(m,d={}){const D=R(d);return j(D,I(m,!!d.renderCodeSegments),d.actionHandler,d.renderCodeSegments),D}function R(m){const d=m.inline?"span":"div",D=document.createElement(d);return m.className&&(D.className=m.className),D}class A{constructor(m){this.source=m,this.index=0}eos(){return this.index>=this.source.length}next(){const m=this.peek();return this.advance(),m}peek(){return this.source[this.index]}advance(){this.index++}}function j(m,d,D,L){let r;if(d.type===2)r=document.createTextNode(d.content||"");else if(d.type===3)r=document.createElement("b");else if(d.type===4)r=document.createElement("i");else if(d.type===7&&L)r=document.createElement("code");else if(d.type===5&&D){const w=document.createElement("a");w.href="#",D.disposables.add(g.o(w,"click",b=>{D.callback(String(d.index),b)})),r=w}else d.type===8?r=document.createElement("br"):d.type===1&&(r=m);r&&m!==r&&m.appendChild(r),r&&Array.isArray(d.children)&&d.children.forEach(w=>{j(r,w,D,L)})}function I(m,d){const D={type:1,children:[]};let L=0,r=D;const w=[],b=new A(m);for(;!b.eos();){let u=b.next();const c=u==="\\"&&C(b.peek(),d)!==0;if(c&&(u=b.next()),!c&&v(u,d)&&u===b.peek()){b.advance(),r.type===2&&(r=w.pop());const p=C(u,d);if(r.type===p||r.type===5&&p===6)r=w.pop();else{const S={type:p,children:[]};p===5&&(S.index=L,L++),r.children.push(S),w.push(r),r=S}}else if(u===`
|
|
|
`)r.type===2&&(r=w.pop()),r.children.push({type:8});else if(r.type!==2){const p={type:2,content:u};r.children.push(p),w.push(r),r=p}else r.content+=u}return r.type===2&&(r=w.pop()),w.length,D}function v(m,d){return C(m,d)!==0}function C(m,d){switch(m){case"*":return 3;case"_":return 4;case"[":return 5;case"]":return 6;case"`":return d?7:0;default:return 0}}},MqQJ:function(mt,M,t){"use strict";t.d(M,"a",function(){return v}),t.d(M,"b",function(){return C});var g=t("3/fG"),B=t("MI8n"),x=t("cMvZ"),R=t("ic2d"),A=t("ubTv");const j={ModesRegistry:"editor.modesRegistry"};class I{constructor(){this._onDidChangeLanguages=new B.b,this.onDidChangeLanguages=this._onDidChangeLanguages.event,this._languages=[],this._dynamicLanguages=[]}registerLanguage(d){return this._languages.push(d),this._onDidChangeLanguages.fire(void 0),{dispose:()=>{for(let D=0,L=this._languages.length;D<L;D++)if(this._languages[D]===d){this._languages.splice(D,1);return}}}}getLanguages(){return[].concat(this._languages).concat(this._dynamicLanguages)}}const v=new I;R.a.add(j.ModesRegistry,v);const C="plaintext",m=".txt";v.registerLanguage({id:C,extensions:[m],aliases:[g.a("plainText.alias","Plain Text"),"text"],mimetypes:[A.a.text]}),x.b.register(C,{brackets:[["(",")"],["[","]"],["{","}"]],surroundingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:"<",close:">"},{open:'"',close:'"'},{open:"'",close:"'"},{open:"`",close:"`"}],colorizedBracketPairs:[],folding:{offSide:!0}},0)},MrjW:function(mt,M,t){"use strict";t.d(M,"i",function(){return c}),t.d(M,"e",function(){return p}),t.d(M,"d",function(){return S}),t.d(M,"g",function(){return E}),t.d(M,"f",function(){return y}),t.d(M,"b",function(){return O}),t.d(M,"a",function(){return k}),t.d(M,"c",function(){return Q}),t.d(M,"h",function(){return q});var g=t("wxcJ");const B=65,x=97,R=90,A=122,j=46,I=47,v=92,C=58,m=63;class d extends Error{constructor(z,J,re){let Z;typeof J=="string"&&J.indexOf("not ")===0?(Z="must not be",J=J.replace(/^not /,"")):Z="must be";const ne=z.indexOf(".")!==-1?"property":"argument";let le=`The "${z}" ${ne} ${Z} of type ${J}`;le+=`. Received type ${typeof re}`,super(le),this.code="ERR_INVALID_ARG_TYPE"}}function D(z,J){if(typeof z!="string")throw new d(J,"string",z)}function L(z){return z===I||z===v}function r(z){return z===I}function w(z){return z>=B&&z<=R||z>=x&&z<=A}function b(z,J,re,Z){let ne="",le=0,_e=-1,Ce=0,oe=0;for(let ae=0;ae<=z.length;++ae){if(ae<z.length)oe=z.charCodeAt(ae);else{if(Z(oe))break;oe=I}if(Z(oe)){if(!(_e===ae-1||Ce===1))if(Ce===2){if(ne.length<2||le!==2||ne.charCodeAt(ne.length-1)!==j||ne.charCodeAt(ne.length-2)!==j){if(ne.length>2){const V=ne.lastIndexOf(re);V===-1?(ne="",le=0):(ne=ne.slice(0,V),le=ne.length-1-ne.lastIndexOf(re)),_e=ae,Ce=0;continue}else if(ne.length!==0){ne="",le=0,_e=ae,Ce=0;continue}}J&&(ne+=ne.length>0?`${re}..`:"..",le=2)}else ne.length>0?ne+=`${re}${z.slice(_e+1,ae)}`:ne=z.slice(_e+1,ae),le=ae-_e-1;_e=ae,Ce=0}else oe===j&&Ce!==-1?++Ce:Ce=-1}return ne}function u(z,J){if(J===null||typeof J!="object")throw new d("pathObject","Object",J);const re=J.dir||J.root,Z=J.base||`${J.name||""}${J.ext||""}`;return re?re===J.root?`${re}${Z}`:`${re}${z}${Z}`:Z}const c={resolve(...z){let J="",re="",Z=!1;for(let ne=z.length-1;ne>=-1;ne--){let le;if(ne>=0){if(le=z[ne],D(le,"path"),le.length===0)continue}else J.length===0?le=g.a():(le=g.b[`=${J}`]||g.a(),(le===void 0||le.slice(0,2).toLowerCase()!==J.toLowerCase()&&le.charCodeAt(2)===v)&&(le=`${J}\\`));const _e=le.length;let Ce=0,oe="",ae=!1;const V=le.charCodeAt(0);if(_e===1)L(V)&&(Ce=1,ae=!0);else if(L(V))if(ae=!0,L(le.charCodeAt(1))){let G=2,ee=G;for(;G<_e&&!L(le.charCodeAt(G));)G++;if(G<_e&&G!==ee){const pe=le.slice(ee,G);for(ee=G;G<_e&&L(le.charCodeAt(G));)G++;if(G<_e&&G!==ee){for(ee=G;G<_e&&!L(le.charCodeAt(G));)G++;(G===_e||G!==ee)&&(oe=`\\\\${pe}\\${le.slice(ee,G)}`,Ce=G)}}}else Ce=1;else w(V)&&le.charCodeAt(1)===C&&(oe=le.slice(0,2),Ce=2,_e>2&&L(le.charCodeAt(2))&&(ae=!0,Ce=3));if(oe.length>0)if(J.length>0){if(oe.toLowerCase()!==J.toLowerCase())continue}else J=oe;if(Z){if(J.length>0)break}else if(re=`${le.slice(Ce)}\\${re}`,Z=ae,ae&&J.length>0)break}return re=b(re,!Z,"\\",L),Z?`${J}\\${re}`:`${J}${re}`||"."},normalize(z){D(z,"path");const J=z.length;if(J===0)return".";let re=0,Z,ne=!1;const le=z.charCodeAt(0);if(J===1)return r(le)?"\\":z;if(L(le))if(ne=!0,L(z.charCodeAt(1))){let Ce=2,oe=Ce;for(;Ce<J&&!L(z.charCodeAt(Ce));)Ce++;if(Ce<J&&Ce!==oe){const ae=z.slice(oe,Ce);for(oe=Ce;Ce<J&&L(z.charCodeAt(Ce));)Ce++;if(Ce<J&&Ce!==oe){for(oe=Ce;Ce<J&&!L(z.charCodeAt(Ce));)Ce++;if(Ce===J)return`\\\\${ae}\\${z.slice(oe)}\\`;Ce!==oe&&(Z=`\\\\${ae}\\${z.slice(oe,Ce)}`,re=Ce)}}}else re=1;else w(le)&&z.charCodeAt(1)===C&&(Z=z.slice(0,2),re=2,J>2&&L(z.charCodeAt(2))&&(ne=!0,re=3));let _e=re<J?b(z.slice(re),!ne,"\\",L):"";return _e.length===0&&!ne&&(_e="."),_e.length>0&&L(z.charCodeAt(J-1))&&(_e+="\\"),Z===void 0?ne?`\\${_e}`:_e:ne?`${Z}\\${_e}`:`${Z}${_e}`},isAbsolute(z){D(z,"path");const J=z.length;if(J===0)return!1;const re=z.charCodeAt(0);return L(re)||J>2&&w(re)&&z.charCodeAt(1)===C&&L(z.charCodeAt(2))},join(...z){if(z.length===0)return".";let J,re;for(let le=0;le<z.length;++le){const _e=z[le];D(_e,"path"),_e.length>0&&(J===void 0?J=re=_e:J+=`\\${_e}`)}if(J===void 0)return".";let Z=!0,ne=0;if(typeof re=="string"&&L(re.charCodeAt(0))){++ne;const le=re.length;le>1&&L(re.charCodeAt(1))&&(++ne,le>2&&(L(re.charCodeAt(2))?++ne:Z=!1))}if(Z){for(;ne<J.length&&L(J.charCodeAt(ne));)ne++;ne>=2&&(J=`\\${J.slice(ne)}`)}return c.normalize(J)},relative(z,J){if(D(z,"from"),D(J,"to"),z===J)return"";const re=c.resolve(z),Z=c.resolve(J);if(re===Z)return"";if(z=re.toLowerCase(),J=Z.toLowerCase(),z===J)return"";let ne=0;for(;ne<z.length&&z.charCodeAt(ne)===v;)ne++;let le=z.length;for(;le-1>ne&&z.charCodeAt(le-1)===v;)le--;const _e=le-ne;let Ce=0;for(;Ce<J.length&&J.charCodeAt(Ce)===v;)Ce++;let oe=J.length;for(;oe-1>Ce&&J.charCodeAt(oe-1)===v;)oe--;const ae=oe-Ce,V=_e<ae?_e:ae;let G=-1,ee=0;for(;ee<V;ee++){const Te=z.charCodeAt(ne+ee);if(Te!==J.charCodeAt(Ce+ee))break;Te===v&&(G=ee)}if(ee!==V){if(G===-1)return Z}else{if(ae>V){if(J.charCodeAt(Ce+ee)===v)return Z.slice(Ce+ee+1);if(ee===2)return Z.slice(Ce+ee)}_e>V&&(z.charCodeAt(ne+ee)===v?G=ee:ee===2&&(G=3)),G===-1&&(G=0)}let pe="";for(ee=ne+G+1;ee<=le;++ee)(ee===le||z.charCodeAt(ee)===v)&&(pe+=pe.length===0?"..":"\\..");return Ce+=G,pe.length>0?`${pe}${Z.slice(Ce,oe)}`:(Z.charCodeAt(Ce)===v&&++Ce,Z.slice(Ce,oe))},toNamespacedPath(z){if(typeof z!="string")return z;if(z.length===0)return"";const J=c.resolve(z);if(J.length<=2)return z;if(J.charCodeAt(0)===v){if(J.charCodeAt(1)===v){const re=J.charCodeAt(2);if(re!==m&&re!==j)return`\\\\?\\UNC\\${J.slice(2)}`}}else if(w(J.charCodeAt(0))&&J.charCodeAt(1)===C&&J.charCodeAt(2)===v)return`\\\\?\\${J}`;return z},dirname(z){D(z,"path");const J=z.length;if(J===0)return".";let re=-1,Z=0;const ne=z.charCodeAt(0);if(J===1)return L(ne)?z:".";if(L(ne)){if(re=Z=1,L(z.charCodeAt(1))){let Ce=2,oe=Ce;for(;Ce<J&&!L(z.charCodeAt(Ce));)Ce++;if(Ce<J&&Ce!==oe){for(oe=Ce;Ce<J&&L(z.charCodeAt(Ce));)Ce++;if(Ce<J&&Ce!==oe){for(oe=Ce;Ce<J&&!L(z.charCodeAt(Ce));)Ce++;if(Ce===J)return z;Ce!==oe&&(re=Z=Ce+1)}}}}else w(ne)&&z.charCodeAt(1)===C&&(re=J>2&&L(z.charCodeAt(2))?3:2,Z=re);let le=-1,_e=!0;for(let Ce=J-1;Ce>=Z;--Ce)if(L(z.charCodeAt(Ce))){if(!_e){le=Ce;break}}else _e=!1;if(le===-1){if(re===-1)return".";le=re}return z.slice(0,le)},basename(z,J){J!==void 0&&D(J,"ext"),D(z,"path");let re=0,Z=-1,ne=!0,le;if(z.length>=2&&w(z.charCodeAt(0))&&z.charCodeAt(1)===C&&(re=2),J!==void 0&&J.length>0&&J.length<=z.length){if(J===z)return"";let _e=J.length-1,Ce=-1;for(le=z.length-1;le>=re;--le){const oe=z.charCodeAt(le);if(L(oe)){if(!ne){re=le+1;break}}else Ce===-1&&(ne=!1,Ce=le+1),_e>=0&&(oe===J.charCodeAt(_e)?--_e===-1&&(Z=le):(_e=-1,Z=Ce))}return re===Z?Z=Ce:Z===-1&&(Z=z.length),z.slice(re,Z)}for(le=z.length-1;le>=re;--le)if(L(z.charCodeAt(le))){if(!ne){re=le+1;break}}else Z===-1&&(ne=!1,Z=le+1);return Z===-1?"":z.slice(re,Z)},extname(z){D(z,"path");let J=0,re=-1,Z=0,ne=-1,le=!0,_e=0;z.length>=2&&z.charCodeAt(1)===C&&w(z.charCodeAt(0))&&(J=Z=2);for(let Ce=z.length-1;Ce>=J;--Ce){const oe=z.charCodeAt(Ce);if(L(oe)){if(!le){Z=Ce+1;break}continue}ne===-1&&(le=!1,ne=Ce+1),oe===j?re===-1?re=Ce:_e!==1&&(_e=1):re!==-1&&(_e=-1)}return re===-1||ne===-1||_e===0||_e===1&&re===ne-1&&re===Z+1?"":z.slice(re,ne)},format:u.bind(null,"\\"),parse(z){D(z,"path");const J={root:"",dir:"",base:"",ext:"",name:""};if(z.length===0)return J;const re=z.length;let Z=0,ne=z.charCodeAt(0);if(re===1)return L(ne)?(J.root=J.dir=z,J):(J.base=J.name=z,J);if(L(ne)){if(Z=1,L(z.charCodeAt(1))){let G=2,ee=G;for(;G<re&&!L(z.charCodeAt(G));)G++;if(G<re&&G!==ee){for(ee=G;G<re&&L(z.charCodeAt(G));)G++;if(G<re&&G!==ee){for(ee=G;G<re&&!L(z.charCodeAt(G));)G++;G===re?Z=G:G!==ee&&(Z=G+1)}}}}else if(w(ne)&&z.charCodeAt(1)===C){if(re<=2)return J.root=J.dir=z,J;if(Z=2,L(z.charCodeAt(2))){if(re===3)return J.root=J.dir=z,J;Z=3}}Z>0&&(J.root=z.slice(0,Z));let le=-1,_e=Z,Ce=-1,oe=!0,ae=z.length-1,V=0;for(;ae>=Z;--ae){if(ne=z.charCodeAt(ae),L(ne)){if(!oe){_e=ae+1;break}continue}Ce===-1&&(oe=!1,Ce=ae+1),ne===j?le===-1?le=ae:V!==1&&(V=1):le!==-1&&(V=-1)}return Ce!==-1&&(le===-1||V===0||V===1&&le===Ce-1&&le===_e+1?J.base=J.name=z.slice(_e,Ce):(J.name=z.slice(_e,le),J.base=z.slice(_e,Ce),J.ext=z.slice(le,Ce))),_e>0&&_e!==Z?J.dir=z.slice(0,_e-1):J.dir=J.root,J},sep:"\\",delimiter:";",win32:null,posix:null},p={resolve(...z){let J="",re=!1;for(let Z=z.length-1;Z>=-1&&!re;Z--){const ne=Z>=0?z[Z]:g.a();if(D(ne,"path"),ne.length===0)continue;J=`${ne}/${J}`,re=ne.charCodeAt(0)===I}return J=b(J,!re,"/",r),re?`/${J}`:J.length>0?J:"."},normalize(z){if(D(z,"path"),z.length===0)return".";const J=z.charCodeAt(0)===I,re=z.charCodeAt(z.length-1)===I;return z=b(z,!J,"/",r),z.length===0?J?"/":re?"./":".":(re&&(z+="/"),J?`/${z}`:z)},isAbsolute(z){return D(z,"path"),z.length>0&&z.charCodeAt(0)===I},join(...z){if(z.length===0)return".";let J;for(let re=0;re<z.length;++re){const Z=z[re];D(Z,"path"),Z.length>0&&(J===void 0?J=Z:J+=`/${Z}`)}return J===void 0?".":p.normalize(J)},relative(z,J){if(D(z,"from"),D(J,"to"),z===J)return"";if(z=p.resolve(z),J=p.resolve(J),z===J)return"";const re=1,Z=z.length,ne=Z-re,le=1,_e=J.length-le,Ce=ne<_e?ne:_e;let oe=-1,ae=0;for(;ae<Ce;ae++){const G=z.charCodeAt(re+ae);if(G!==J.charCodeAt(le+ae))break;G===I&&(oe=ae)}if(ae===Ce)if(_e>Ce){if(J.charCodeAt(le+ae)===I)return J.slice(le+ae+1);if(ae===0)return J.slice(le+ae)}else ne>Ce&&(z.charCodeAt(re+ae)===I?oe=ae:ae===0&&(oe=0));let V="";for(ae=re+oe+1;ae<=Z;++ae)(ae===Z||z.charCodeAt(ae)===I)&&(V+=V.length===0?"..":"/..");return`${V}${J.slice(le+oe)}`},toNamespacedPath(z){return z},dirname(z){if(D(z,"path"),z.length===0)return".";const J=z.charCodeAt(0)===I;let re=-1,Z=!0;for(let ne=z.length-1;ne>=1;--ne)if(z.charCodeAt(ne)===I){if(!Z){re=ne;break}}else Z=!1;return re===-1?J?"/":".":J&&re===1?"//":z.slice(0,re)},basename(z,J){J!==void 0&&D(J,"ext"),D(z,"path");let re=0,Z=-1,ne=!0,le;if(J!==void 0&&J.length>0&&J.length<=z.length){if(J===z)return"";let _e=J.length-1,Ce=-1;for(le=z.length-1;le>=0;--le){const oe=z.charCodeAt(le);if(oe===I){if(!ne){re=le+1;break}}else Ce===-1&&(ne=!1,Ce=le+1),_e>=0&&(oe===J.charCodeAt(_e)?--_e===-1&&(Z=le):(_e=-1,Z=Ce))}return re===Z?Z=Ce:Z===-1&&(Z=z.length),z.slice(re,Z)}for(le=z.length-1;le>=0;--le)if(z.charCodeAt(le)===I){if(!ne){re=le+1;break}}else Z===-1&&(ne=!1,Z=le+1);return Z===-1?"":z.slice(re,Z)},extname(z){D(z,"path");let J=-1,re=0,Z=-1,ne=!0,le=0;for(let _e=z.length-1;_e>=0;--_e){const Ce=z.charCodeAt(_e);if(Ce===I){if(!ne){re=_e+1;break}continue}Z===-1&&(ne=!1,Z=_e+1),Ce===j?J===-1?J=_e:le!==1&&(le=1):J!==-1&&(le=-1)}return J===-1||Z===-1||le===0||le===1&&J===Z-1&&J===re+1?"":z.slice(J,Z)},format:u.bind(null,"/"),parse(z){D(z,"path");const J={root:"",dir:"",base:"",ext:"",name:""};if(z.length===0)return J;const re=z.charCodeAt(0)===I;let Z;re?(J.root="/",Z=1):Z=0;let ne=-1,le=0,_e=-1,Ce=!0,oe=z.length-1,ae=0;for(;oe>=Z;--oe){const V=z.charCodeAt(oe);if(V===I){if(!Ce){le=oe+1;break}continue}_e===-1&&(Ce=!1,_e=oe+1),V===j?ne===-1?ne=oe:ae!==1&&(ae=1):ne!==-1&&(ae=-1)}if(_e!==-1){const V=le===0&&re?1:le;ne===-1||ae===0||ae===1&&ne===_e-1&&ne===le+1?J.base=J.name=z.slice(V,_e):(J.name=z.slice(V,ne),J.base=z.slice(V,_e),J.ext=z.slice(ne,_e))}return le>0?J.dir=z.slice(0,le-1):re&&(J.dir="/"),J},sep:"/",delimiter:":",win32:null,posix:null};p.win32=c.win32=c,p.posix=c.posix=p;const S=g.c==="win32"?c.normalize:p.normalize,E=g.c==="win32"?c.resolve:p.resolve,y=g.c==="win32"?c.relative:p.relative,O=g.c==="win32"?c.dirname:p.dirname,k=g.c==="win32"?c.basename:p.basename,Q=g.c==="win32"?c.extname:p.extname,q=g.c==="win32"?c.sep:p.sep},Msxo:function(mt,M,t){"use strict";t.r(M);var g=t("+hIS");Object(g.a)({id:"r",extensions:[".r",".rhistory",".rmd",".rprofile",".rt"],aliases:["R","r"],loader:function(){return t.e(357).then(t.bind(null,"Qx4d"))}})},MvK1:function(mt,M,t){"use strict";t.d(M,"a",function(){return B}),t.d(M,"b",function(){return x});class g{constructor(R,A,j){this._colorZoneBrand=void 0,this.from=R|0,this.to=A|0,this.colorId=j|0}static compare(R,A){return R.colorId===A.colorId?R.from===A.from?R.to-A.to:R.from-A.from:R.colorId-A.colorId}}class B{constructor(R,A,j){this._overviewRulerZoneBrand=void 0,this.startLineNumber=R,this.endLineNumber=A,this.color=j,this._colorZone=null}static compare(R,A){return R.color===A.color?R.startLineNumber===A.startLineNumber?R.endLineNumber-A.endLineNumber:R.startLineNumber-A.startLineNumber:R.color<A.color?-1:1}setColorZone(R){this._colorZone=R}getColorZones(){return this._colorZone}}class x{constructor(R){this._getVerticalOffsetForLine=R,this._zones=[],this._colorZonesInvalid=!1,this._lineHeight=0,this._domWidth=0,this._domHeight=0,this._outerHeight=0,this._pixelRatio=1,this._lastAssignedId=0,this._color2Id=Object.create(null),this._id2Color=[]}getId2Color(){return this._id2Color}setZones(R){this._zones=R,this._zones.sort(B.compare)}setLineHeight(R){return this._lineHeight===R?!1:(this._lineHeight=R,this._colorZonesInvalid=!0,!0)}setPixelRatio(R){this._pixelRatio=R,this._colorZonesInvalid=!0}getDOMWidth(){return this._domWidth}getCanvasWidth(){return this._domWidth*this._pixelRatio}setDOMWidth(R){return this._domWidth===R?!1:(this._domWidth=R,this._colorZonesInvalid=!0,!0)}getDOMHeight(){return this._domHeight}getCanvasHeight(){return this._domHeight*this._pixelRatio}setDOMHeight(R){return this._domHeight===R?!1:(this._domHeight=R,this._colorZonesInvalid=!0,!0)}getOuterHeight(){return this._outerHeight}setOuterHeight(R){return this._outerHeight===R?!1:(this._outerHeight=R,this._colorZonesInvalid=!0,!0)}resolveColorZones(){const R=this._colorZonesInvalid,A=Math.floor(this._lineHeight),j=Math.floor(this.getCanvasHeight()),I=Math.floor(this._outerHeight),v=j/I,C=Math.floor(4*this._pixelRatio/2);let m=[];for(let d=0,D=this._zones.length;d<D;d++){const L=this._zones[d];if(!R){const E=L.getColorZones();if(E){m.push(E);continue}}const r=Math.floor(v*this._getVerticalOffsetForLine(L.startLineNumber)),w=Math.floor(v*(this._getVerticalOffsetForLine(L.endLineNumber)+A));let b=Math.floor((r+w)/2),u=w-b;u<C&&(u=C),b-u<0&&(b=u),b+u>j&&(b=j-u);const c=L.color;let p=this._color2Id[c];p||(p=++this._lastAssignedId,this._color2Id[c]=p,this._id2Color[p]=c);const S=new g(b-u,b+u,p);L.setColorZone(S),m.push(S)}return this._colorZonesInvalid=!1,m.sort(g.compare),m}}},MyPo:function(mt,M,t){"use strict";t.r(M),t.d(M,"StandaloneGotoLineQuickAccessProvider",function(){return u}),t.d(M,"GotoLineAction",function(){return c});var g=t("pmY6"),B=t("sFUC"),x=t("H+DO"),R=t("3/fG");class A extends x.a{constructor(){super({canAcceptInBackground:!0})}provideWithoutTextEditor(p){const S=Object(R.a)("cannotRunGotoLine","Open a text editor first to go to a line.");return p.items=[{label:S}],p.ariaLabel=S,g.a.None}provideWithTextEditor(p,S,E){const y=p.editor,O=new g.b;O.add(S.onDidAccept(q=>{const[z]=S.selectedItems;if(z){if(!this.isValidLineNumber(y,z.lineNumber))return;this.gotoLocation(p,{range:this.toRange(z.lineNumber,z.column),keyMods:S.keyMods,preserveFocus:q.inBackground}),q.inBackground||S.hide()}}));const k=()=>{const q=this.parsePosition(y,S.value.trim().substr(A.PREFIX.length)),z=this.getPickLabel(y,q.lineNumber,q.column);if(S.items=[{lineNumber:q.lineNumber,column:q.column,label:z}],S.ariaLabel=z,!this.isValidLineNumber(y,q.lineNumber)){this.clearDecorations(y);return}const J=this.toRange(q.lineNumber,q.column);y.revealRangeInCenter(J,0),this.addDecorations(y,J)};k(),O.add(S.onDidChangeValue(()=>k()));const Q=Object(B.a)(y);if(Q){const q=Q.getOptions(),z=q.get(59);z.renderType===2&&(Q.updateOptions({lineNumbers:"on"}),O.add(Object(g.i)(()=>Q.updateOptions({lineNumbers:"relative"}))))}return O}toRange(p=1,S=1){return{startLineNumber:p,startColumn:S,endLineNumber:p,endColumn:S}}parsePosition(p,S){const E=S.split(/,|:|#/).map(O=>parseInt(O,10)).filter(O=>!isNaN(O)),y=this.lineCount(p)+1;return{lineNumber:E[0]>0?E[0]:y+E[0],column:E[1]}}getPickLabel(p,S,E){if(this.isValidLineNumber(p,S))return this.isValidColumn(p,S,E)?Object(R.a)("gotoLineColumnLabel","Go to line {0} and character {1}.",S,E):Object(R.a)("gotoLineLabel","Go to line {0}.",S);const y=p.getPosition()||{lineNumber:1,column:1},O=this.lineCount(p);return O>1?Object(R.a)("gotoLineLabelEmptyWithLimit","Current Line: {0}, Character: {1}. Type a line number between 1 and {2} to navigate to.",y.lineNumber,y.column,O):Object(R.a)("gotoLineLabelEmpty","Current Line: {0}, Character: {1}. Type a line number to navigate to.",y.lineNumber,y.column)}isValidLineNumber(p,S){return!S||typeof S!="number"?!1:S>0&&S<=this.lineCount(p)}isValidColumn(p,S,E){if(!E||typeof E!="number")return!1;const y=this.getModel(p);if(!y)return!1;const O={lineNumber:S,column:E};return y.validatePosition(O).equals(O)}lineCount(p){var S,E;return(E=(S=this.getModel(p))===null||S===void 0?void 0:S.getLineCount())!==null&&E!==void 0?E:0}}A.PREFIX=":";var j=t("ic2d"),I=t("Lx4V"),v=t("Vxe3"),C=t("746U"),m=t("A9l+"),d=t("MI8n"),D=t("sswD"),L=t("wQH0"),r=t("Zr1c"),w=function(p,S,E,y){var O=arguments.length,k=O<3?S:y===null?y=Object.getOwnPropertyDescriptor(S,E):y,Q;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")k=Reflect.decorate(p,S,E,y);else for(var q=p.length-1;q>=0;q--)(Q=p[q])&&(k=(O<3?Q(k):O>3?Q(S,E,k):Q(S,E))||k);return O>3&&k&&Object.defineProperty(S,E,k),k},b=function(p,S){return function(E,y){S(E,y,p)}};let u=class extends A{constructor(S){super();this.editorService=S,this.onDidActiveTextEditorControlChange=d.c.None}get activeTextEditorControl(){return Object(C.p)(this.editorService.getFocusedCodeEditor())}};u=w([b(0,v.a)],u),j.a.as(I.b.Quickaccess).registerQuickAccessProvider({ctor:u,prefix:u.PREFIX,helpEntries:[{description:m.b.gotoLineActionLabel,needsEditor:!0}]});class c extends D.b{constructor(){super({id:"editor.action.gotoLine",label:m.b.gotoLineActionLabel,alias:"Go to Line/Column...",precondition:void 0,kbOpts:{kbExpr:L.a.focus,primary:2048|37,mac:{primary:256|37},weight:100}})}run(p){p.get(r.a).quickAccess.show(u.PREFIX)}}Object(D.j)(c)},Mzro:function(mt,M,t){"use strict";t.r(M);var g=t("+hIS");Object(g.a)({id:"shell",extensions:[".sh",".bash"],aliases:["Shell","sh"],loader:function(){return t.e(367).then(t.bind(null,"l/4i"))}})},NQK8:function(mt,M,t){"use strict";var g=t("M/lh"),B=t.n(g);t.o(g,"Emitter")&&t.d(M,"Emitter",function(){return g.Emitter}),t.o(g,"Range")&&t.d(M,"Range",function(){return g.Range}),t.o(g,"Uri")&&t.d(M,"Uri",function(){return g.Uri}),t.o(g,"editor")&&t.d(M,"editor",function(){return g.editor}),t.o(g,"languages")&&t.d(M,"languages",function(){return g.languages})},NR8r:function(mt,M,t){"use strict";t.d(M,"a",function(){return w});var g=t("OBOq"),B=t("X+cX"),x=t("pmY6"),R=t("synD"),A=t.n(R),j=t("sswD"),I=t("aokT"),v=t("3/fG"),C=t("T8No"),m=t("MD5Z"),d=t("nEHx"),D=t("t9D7"),L=function(c,p,S,E){var y=arguments.length,O=y<3?p:E===null?E=Object.getOwnPropertyDescriptor(p,S):E,k;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")O=Reflect.decorate(c,p,S,E);else for(var Q=c.length-1;Q>=0;Q--)(k=c[Q])&&(O=(y<3?k(O):y>3?k(p,S,O):k(p,S))||O);return y>3&&O&&Object.defineProperty(p,S,O),O},r=function(c,p){return function(S,E){p(S,E,c)}};let w=class c{constructor(p,S){this._messageWidget=new x.d,this._messageListeners=new x.b,this._editor=p,this._visible=c.MESSAGE_VISIBLE.bindTo(S),this._editorListener=this._editor.onDidAttemptReadOnlyEdit(()=>this._onDidAttemptReadOnlyEdit())}static get(p){return p.getContribution(c.ID)}dispose(){this._editorListener.dispose(),this._messageListeners.dispose(),this._messageWidget.dispose(),this._visible.reset()}showMessage(p,S){Object(g.a)(p),this._visible.set(!0),this._messageWidget.clear(),this._messageListeners.clear(),this._messageWidget.value=new u(this._editor,S,p),this._messageListeners.add(this._editor.onDidBlurEditorText(()=>this.closeMessage())),this._messageListeners.add(this._editor.onDidChangeCursorPosition(()=>this.closeMessage())),this._messageListeners.add(this._editor.onDidDispose(()=>this.closeMessage())),this._messageListeners.add(this._editor.onDidChangeModel(()=>this.closeMessage())),this._messageListeners.add(new B.g(()=>this.closeMessage(),3e3));let E;this._messageListeners.add(this._editor.onMouseMove(y=>{if(!y.target.position)return;E?E.containsPosition(y.target.position)||this.closeMessage():E=new I.a(S.lineNumber-3,1,y.target.position.lineNumber+3,1)}))}closeMessage(){this._visible.reset(),this._messageListeners.clear(),this._messageWidget.value&&this._messageListeners.add(u.fadeOut(this._messageWidget.value))}_onDidAttemptReadOnlyEdit(){this._editor.hasModel()&&this.showMessage(v.a("editor.readonly","Cannot edit in read-only editor"),this._editor.getPosition())}};w.ID="editor.contrib.messageController",w.MESSAGE_VISIBLE=new C.c("messageVisible",!1,v.a("messageVisible","Whether the editor is currently showing an inline message")),w=L([r(1,C.b)],w);const b=j.c.bindToContribution(w.get);Object(j.k)(new b({id:"leaveEditorMessage",precondition:w.MESSAGE_VISIBLE,handler:c=>c.closeMessage(),kbOpts:{weight:100+30,primary:9}}));class u{constructor(c,{lineNumber:p,column:S},E){this.allowEditorOverflow=!0,this.suppressMouseDown=!1,this._editor=c,this._editor.revealLinesInCenterIfOutsideViewport(p,p,0),this._position={lineNumber:p,column:S-1},this._domNode=document.createElement("div"),this._domNode.classList.add("monaco-editor-overlaymessage");const y=document.createElement("div");y.classList.add("anchor","top"),this._domNode.appendChild(y);const O=document.createElement("div");O.classList.add("message"),O.textContent=E,this._domNode.appendChild(O);const k=document.createElement("div");k.classList.add("anchor","below"),this._domNode.appendChild(k),this._editor.addContentWidget(this),this._domNode.classList.add("fadeIn")}static fadeOut(c){let p;const S=()=>{c.dispose(),clearTimeout(p),c.getDomNode().removeEventListener("animationend",S)};return p=setTimeout(S,110),c.getDomNode().addEventListener("animationend",S),c.getDomNode().classList.add("fadeOut"),{dispose:S}}dispose(){this._editor.removeContentWidget(this)}getId(){return"messageoverlay"}getDomNode(){return this._domNode}getPosition(){return{position:this._position,preference:[1,2]}}afterRender(c){this._domNode.classList.toggle("below",c===2)}}Object(j.l)(w.ID,w),Object(D.f)((c,p)=>{const S=c.getColor(m.ob);if(S){let O=c.type===d.a.HIGH_CONTRAST?2:1;p.addRule(`.monaco-editor .monaco-editor-overlaymessage .anchor.below { border-top-color: ${S}; }`),p.addRule(`.monaco-editor .monaco-editor-overlaymessage .anchor.top { border-bottom-color: ${S}; }`),p.addRule(`.monaco-editor .monaco-editor-overlaymessage .message { border: ${O}px solid ${S}; }`)}const E=c.getColor(m.nb);E&&p.addRule(`.monaco-editor .monaco-editor-overlaymessage .message { background-color: ${E}; }`);const y=c.getColor(m.pb);y&&p.addRule(`.monaco-editor .monaco-editor-overlaymessage .message { color: ${y}; }`)})},"O/se":function(mt,M,t){"use strict";t.d(M,"a",function(){return v});var g=t("EffR"),B=t("zrhQ"),x=t("qj0h"),R=t("N0LK"),A=t("VPJY"),j=t.n(A);const I={badgeBackground:B.a.fromHex("#4D4D4D"),badgeForeground:B.a.fromHex("#FFFFFF")};class v{constructor(C,m){this.count=0,this.options=m||Object.create(null),Object(x.f)(this.options,I,!1),this.badgeBackground=this.options.badgeBackground,this.badgeForeground=this.options.badgeForeground,this.badgeBorder=this.options.badgeBorder,this.element=Object(g.q)(C,Object(g.a)(".monaco-count-badge")),this.countFormat=this.options.countFormat||"{0}",this.titleFormat=this.options.titleFormat||"",this.setCount(this.options.count||0)}setCount(C){this.count=C,this.render()}setTitleFormat(C){this.titleFormat=C,this.render()}render(){this.element.textContent=Object(R.v)(this.countFormat,this.count),this.element.title=Object(R.v)(this.titleFormat,this.count),this.applyStyles()}style(C){this.badgeBackground=C.badgeBackground,this.badgeForeground=C.badgeForeground,this.badgeBorder=C.badgeBorder,this.applyStyles()}applyStyles(){if(this.element){const C=this.badgeBackground?this.badgeBackground.toString():"",m=this.badgeForeground?this.badgeForeground.toString():"",d=this.badgeBorder?this.badgeBorder.toString():"";this.element.style.backgroundColor=C,this.element.style.color=m,this.element.style.borderWidth=d?"1px":"",this.element.style.borderStyle=d?"solid":"",this.element.style.borderColor=d}}}},O48t:function(mt,M,t){"use strict";(function(g){/*!
|
|
|
* The buffer module from node.js, for the browser.
|
|
|
*
|
|
|
* @author Feross Aboukhadijeh <http://feross.org>
|
|
|
* @license MIT
|
|
|
*/var B=t("Ov46"),x=t("ttT4"),R=t("0nBa");M.Buffer=v,M.SlowBuffer=c,M.INSPECT_MAX_BYTES=50,v.TYPED_ARRAY_SUPPORT=g.TYPED_ARRAY_SUPPORT!==void 0?g.TYPED_ARRAY_SUPPORT:A(),M.kMaxLength=j();function A(){try{var ie=new Uint8Array(1);return ie.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},ie.foo()===42&&typeof ie.subarray=="function"&&ie.subarray(1,1).byteLength===0}catch(W){return!1}}function j(){return v.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function I(ie,W){if(j()<W)throw new RangeError("Invalid typed array length");return v.TYPED_ARRAY_SUPPORT?(ie=new Uint8Array(W),ie.__proto__=v.prototype):(ie===null&&(ie=new v(W)),ie.length=W),ie}function v(ie,W,U){if(!v.TYPED_ARRAY_SUPPORT&&!(this instanceof v))return new v(ie,W,U);if(typeof ie=="number"){if(typeof W=="string")throw new Error("If encoding is specified then the first argument must be a string");return D(this,ie)}return C(this,ie,W,U)}v.poolSize=8192,v._augment=function(ie){return ie.__proto__=v.prototype,ie};function C(ie,W,U,se){if(typeof W=="number")throw new TypeError('"value" argument must not be a number');return typeof ArrayBuffer!="undefined"&&W instanceof ArrayBuffer?w(ie,W,U,se):typeof W=="string"?L(ie,W,U):b(ie,W)}v.from=function(ie,W,U){return C(null,ie,W,U)},v.TYPED_ARRAY_SUPPORT&&(v.prototype.__proto__=Uint8Array.prototype,v.__proto__=Uint8Array,typeof Symbol!="undefined"&&Symbol.species&&v[Symbol.species]===v&&Object.defineProperty(v,Symbol.species,{value:null,configurable:!0}));function m(ie){if(typeof ie!="number")throw new TypeError('"size" argument must be a number');if(ie<0)throw new RangeError('"size" argument must not be negative')}function d(ie,W,U,se){return m(W),W<=0?I(ie,W):U!==void 0?typeof se=="string"?I(ie,W).fill(U,se):I(ie,W).fill(U):I(ie,W)}v.alloc=function(ie,W,U){return d(null,ie,W,U)};function D(ie,W){if(m(W),ie=I(ie,W<0?0:u(W)|0),!v.TYPED_ARRAY_SUPPORT)for(var U=0;U<W;++U)ie[U]=0;return ie}v.allocUnsafe=function(ie){return D(null,ie)},v.allocUnsafeSlow=function(ie){return D(null,ie)};function L(ie,W,U){if((typeof U!="string"||U==="")&&(U="utf8"),!v.isEncoding(U))throw new TypeError('"encoding" must be a valid string encoding');var se=p(W,U)|0;ie=I(ie,se);var je=ie.write(W,U);return je!==se&&(ie=ie.slice(0,je)),ie}function r(ie,W){var U=W.length<0?0:u(W.length)|0;ie=I(ie,U);for(var se=0;se<U;se+=1)ie[se]=W[se]&255;return ie}function w(ie,W,U,se){if(W.byteLength,U<0||W.byteLength<U)throw new RangeError("'offset' is out of bounds");if(W.byteLength<U+(se||0))throw new RangeError("'length' is out of bounds");return U===void 0&&se===void 0?W=new Uint8Array(W):se===void 0?W=new Uint8Array(W,U):W=new Uint8Array(W,U,se),v.TYPED_ARRAY_SUPPORT?(ie=W,ie.__proto__=v.prototype):ie=r(ie,W),ie}function b(ie,W){if(v.isBuffer(W)){var U=u(W.length)|0;return ie=I(ie,U),ie.length===0||W.copy(ie,0,0,U),ie}if(W){if(typeof ArrayBuffer!="undefined"&&W.buffer instanceof ArrayBuffer||"length"in W)return typeof W.length!="number"||ve(W.length)?I(ie,0):r(ie,W);if(W.type==="Buffer"&&R(W.data))return r(ie,W.data)}throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}function u(ie){if(ie>=j())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+j().toString(16)+" bytes");return ie|0}function c(ie){return+ie!=ie&&(ie=0),v.alloc(+ie)}v.isBuffer=function(W){return!!(W!=null&&W._isBuffer)},v.compare=function(W,U){if(!v.isBuffer(W)||!v.isBuffer(U))throw new TypeError("Arguments must be Buffers");if(W===U)return 0;for(var se=W.length,je=U.length,Re=0,We=Math.min(se,je);Re<We;++Re)if(W[Re]!==U[Re]){se=W[Re],je=U[Re];break}return se<je?-1:je<se?1:0},v.isEncoding=function(W){switch(String(W).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},v.concat=function(W,U){if(!R(W))throw new TypeError('"list" argument must be an Array of Buffers');if(W.length===0)return v.alloc(0);var se;if(U===void 0)for(U=0,se=0;se<W.length;++se)U+=W[se].length;var je=v.allocUnsafe(U),Re=0;for(se=0;se<W.length;++se){var We=W[se];if(!v.isBuffer(We))throw new TypeError('"list" argument must be an Array of Buffers');We.copy(je,Re),Re+=We.length}return je};function p(ie,W){if(v.isBuffer(ie))return ie.length;if(typeof ArrayBuffer!="undefined"&&typeof ArrayBuffer.isView=="function"&&(ArrayBuffer.isView(ie)||ie instanceof ArrayBuffer))return ie.byteLength;typeof ie!="string"&&(ie=""+ie);var U=ie.length;if(U===0)return 0;for(var se=!1;;)switch(W){case"ascii":case"latin1":case"binary":return U;case"utf8":case"utf-8":case void 0:return Se(ie).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return U*2;case"hex":return U>>>1;case"base64":return Le(ie).length;default:if(se)return Se(ie).length;W=(""+W).toLowerCase(),se=!0}}v.byteLength=p;function S(ie,W,U){var se=!1;if((W===void 0||W<0)&&(W=0),W>this.length)return"";if((U===void 0||U>this.length)&&(U=this.length),U<=0)return"";if(U>>>=0,W>>>=0,U<=W)return"";for(ie||(ie="utf8");;)switch(ie){case"hex":return ae(this,W,U);case"utf8":case"utf-8":return ne(this,W,U);case"ascii":return Ce(this,W,U);case"latin1":case"binary":return oe(this,W,U);case"base64":return Z(this,W,U);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return V(this,W,U);default:if(se)throw new TypeError("Unknown encoding: "+ie);ie=(ie+"").toLowerCase(),se=!0}}v.prototype._isBuffer=!0;function E(ie,W,U){var se=ie[W];ie[W]=ie[U],ie[U]=se}v.prototype.swap16=function(){var W=this.length;if(W%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var U=0;U<W;U+=2)E(this,U,U+1);return this},v.prototype.swap32=function(){var W=this.length;if(W%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var U=0;U<W;U+=4)E(this,U,U+3),E(this,U+1,U+2);return this},v.prototype.swap64=function(){var W=this.length;if(W%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var U=0;U<W;U+=8)E(this,U,U+7),E(this,U+1,U+6),E(this,U+2,U+5),E(this,U+3,U+4);return this},v.prototype.toString=function(){var W=this.length|0;return W===0?"":arguments.length===0?ne(this,0,W):S.apply(this,arguments)},v.prototype.equals=function(W){if(!v.isBuffer(W))throw new TypeError("Argument must be a Buffer");return this===W?!0:v.compare(this,W)===0},v.prototype.inspect=function(){var W="",U=M.INSPECT_MAX_BYTES;return this.length>0&&(W=this.toString("hex",0,U).match(/.{2}/g).join(" "),this.length>U&&(W+=" ... ")),"<Buffer "+W+">"},v.prototype.compare=function(W,U,se,je,Re){if(!v.isBuffer(W))throw new TypeError("Argument must be a Buffer");if(U===void 0&&(U=0),se===void 0&&(se=W?W.length:0),je===void 0&&(je=0),Re===void 0&&(Re=this.length),U<0||se>W.length||je<0||Re>this.length)throw new RangeError("out of range index");if(je>=Re&&U>=se)return 0;if(je>=Re)return-1;if(U>=se)return 1;if(U>>>=0,se>>>=0,je>>>=0,Re>>>=0,this===W)return 0;for(var We=Re-je,dt=se-U,Lt=Math.min(We,dt),Ht=this.slice(je,Re),$e=W.slice(U,se),ot=0;ot<Lt;++ot)if(Ht[ot]!==$e[ot]){We=Ht[ot],dt=$e[ot];break}return We<dt?-1:dt<We?1:0};function y(ie,W,U,se,je){if(ie.length===0)return-1;if(typeof U=="string"?(se=U,U=0):U>2147483647?U=2147483647:U<-2147483648&&(U=-2147483648),U=+U,isNaN(U)&&(U=je?0:ie.length-1),U<0&&(U=ie.length+U),U>=ie.length){if(je)return-1;U=ie.length-1}else if(U<0)if(je)U=0;else return-1;if(typeof W=="string"&&(W=v.from(W,se)),v.isBuffer(W))return W.length===0?-1:O(ie,W,U,se,je);if(typeof W=="number")return W=W&255,v.TYPED_ARRAY_SUPPORT&&typeof Uint8Array.prototype.indexOf=="function"?je?Uint8Array.prototype.indexOf.call(ie,W,U):Uint8Array.prototype.lastIndexOf.call(ie,W,U):O(ie,[W],U,se,je);throw new TypeError("val must be string, number or Buffer")}function O(ie,W,U,se,je){var Re=1,We=ie.length,dt=W.length;if(se!==void 0&&(se=String(se).toLowerCase(),se==="ucs2"||se==="ucs-2"||se==="utf16le"||se==="utf-16le")){if(ie.length<2||W.length<2)return-1;Re=2,We/=2,dt/=2,U/=2}function Lt(Ve,it){return Re===1?Ve[it]:Ve.readUInt16BE(it*Re)}var Ht;if(je){var $e=-1;for(Ht=U;Ht<We;Ht++)if(Lt(ie,Ht)===Lt(W,$e===-1?0:Ht-$e)){if($e===-1&&($e=Ht),Ht-$e+1===dt)return $e*Re}else $e!==-1&&(Ht-=Ht-$e),$e=-1}else for(U+dt>We&&(U=We-dt),Ht=U;Ht>=0;Ht--){for(var ot=!0,ce=0;ce<dt;ce++)if(Lt(ie,Ht+ce)!==Lt(W,ce)){ot=!1;break}if(ot)return Ht}return-1}v.prototype.includes=function(W,U,se){return this.indexOf(W,U,se)!==-1},v.prototype.indexOf=function(W,U,se){return y(this,W,U,se,!0)},v.prototype.lastIndexOf=function(W,U,se){return y(this,W,U,se,!1)};function k(ie,W,U,se){U=Number(U)||0;var je=ie.length-U;se?(se=Number(se),se>je&&(se=je)):se=je;var Re=W.length;if(Re%2!==0)throw new TypeError("Invalid hex string");se>Re/2&&(se=Re/2);for(var We=0;We<se;++We){var dt=parseInt(W.substr(We*2,2),16);if(isNaN(dt))return We;ie[U+We]=dt}return We}function Q(ie,W,U,se){return we(Se(W,ie.length-U),ie,U,se)}function q(ie,W,U,se){return we(me(W),ie,U,se)}function z(ie,W,U,se){return q(ie,W,U,se)}function J(ie,W,U,se){return we(Le(W),ie,U,se)}function re(ie,W,U,se){return we(he(W,ie.length-U),ie,U,se)}v.prototype.write=function(W,U,se,je){if(U===void 0)je="utf8",se=this.length,U=0;else if(se===void 0&&typeof U=="string")je=U,se=this.length,U=0;else if(isFinite(U))U=U|0,isFinite(se)?(se=se|0,je===void 0&&(je="utf8")):(je=se,se=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");var Re=this.length-U;if((se===void 0||se>Re)&&(se=Re),W.length>0&&(se<0||U<0)||U>this.length)throw new RangeError("Attempt to write outside buffer bounds");je||(je="utf8");for(var We=!1;;)switch(je){case"hex":return k(this,W,U,se);case"utf8":case"utf-8":return Q(this,W,U,se);case"ascii":return q(this,W,U,se);case"latin1":case"binary":return z(this,W,U,se);case"base64":return J(this,W,U,se);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return re(this,W,U,se);default:if(We)throw new TypeError("Unknown encoding: "+je);je=(""+je).toLowerCase(),We=!0}},v.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function Z(ie,W,U){return W===0&&U===ie.length?B.fromByteArray(ie):B.fromByteArray(ie.slice(W,U))}function ne(ie,W,U){U=Math.min(ie.length,U);for(var se=[],je=W;je<U;){var Re=ie[je],We=null,dt=Re>239?4:Re>223?3:Re>191?2:1;if(je+dt<=U){var Lt,Ht,$e,ot;switch(dt){case 1:Re<128&&(We=Re);break;case 2:Lt=ie[je+1],(Lt&192)===128&&(ot=(Re&31)<<6|Lt&63,ot>127&&(We=ot));break;case 3:Lt=ie[je+1],Ht=ie[je+2],(Lt&192)===128&&(Ht&192)===128&&(ot=(Re&15)<<12|(Lt&63)<<6|Ht&63,ot>2047&&(ot<55296||ot>57343)&&(We=ot));break;case 4:Lt=ie[je+1],Ht=ie[je+2],$e=ie[je+3],(Lt&192)===128&&(Ht&192)===128&&($e&192)===128&&(ot=(Re&15)<<18|(Lt&63)<<12|(Ht&63)<<6|$e&63,ot>65535&&ot<1114112&&(We=ot))}}We===null?(We=65533,dt=1):We>65535&&(We-=65536,se.push(We>>>10&1023|55296),We=56320|We&1023),se.push(We),je+=dt}return _e(se)}var le=4096;function _e(ie){var W=ie.length;if(W<=le)return String.fromCharCode.apply(String,ie);for(var U="",se=0;se<W;)U+=String.fromCharCode.apply(String,ie.slice(se,se+=le));return U}function Ce(ie,W,U){var se="";U=Math.min(ie.length,U);for(var je=W;je<U;++je)se+=String.fromCharCode(ie[je]&127);return se}function oe(ie,W,U){var se="";U=Math.min(ie.length,U);for(var je=W;je<U;++je)se+=String.fromCharCode(ie[je]);return se}function ae(ie,W,U){var se=ie.length;(!W||W<0)&&(W=0),(!U||U<0||U>se)&&(U=se);for(var je="",Re=W;Re<U;++Re)je+=Be(ie[Re]);return je}function V(ie,W,U){for(var se=ie.slice(W,U),je="",Re=0;Re<se.length;Re+=2)je+=String.fromCharCode(se[Re]+se[Re+1]*256);return je}v.prototype.slice=function(W,U){var se=this.length;W=~~W,U=U===void 0?se:~~U,W<0?(W+=se,W<0&&(W=0)):W>se&&(W=se),U<0?(U+=se,U<0&&(U=0)):U>se&&(U=se),U<W&&(U=W);var je;if(v.TYPED_ARRAY_SUPPORT)je=this.subarray(W,U),je.__proto__=v.prototype;else{var Re=U-W;je=new v(Re,void 0);for(var We=0;We<Re;++We)je[We]=this[We+W]}return je};function G(ie,W,U){if(ie%1!==0||ie<0)throw new RangeError("offset is not uint");if(ie+W>U)throw new RangeError("Trying to access beyond buffer length")}v.prototype.readUIntLE=function(W,U,se){W=W|0,U=U|0,se||G(W,U,this.length);for(var je=this[W],Re=1,We=0;++We<U&&(Re*=256);)je+=this[W+We]*Re;return je},v.prototype.readUIntBE=function(W,U,se){W=W|0,U=U|0,se||G(W,U,this.length);for(var je=this[W+--U],Re=1;U>0&&(Re*=256);)je+=this[W+--U]*Re;return je},v.prototype.readUInt8=function(W,U){return U||G(W,1,this.length),this[W]},v.prototype.readUInt16LE=function(W,U){return U||G(W,2,this.length),this[W]|this[W+1]<<8},v.prototype.readUInt16BE=function(W,U){return U||G(W,2,this.length),this[W]<<8|this[W+1]},v.prototype.readUInt32LE=function(W,U){return U||G(W,4,this.length),(this[W]|this[W+1]<<8|this[W+2]<<16)+this[W+3]*16777216},v.prototype.readUInt32BE=function(W,U){return U||G(W,4,this.length),this[W]*16777216+(this[W+1]<<16|this[W+2]<<8|this[W+3])},v.prototype.readIntLE=function(W,U,se){W=W|0,U=U|0,se||G(W,U,this.length);for(var je=this[W],Re=1,We=0;++We<U&&(Re*=256);)je+=this[W+We]*Re;return Re*=128,je>=Re&&(je-=Math.pow(2,8*U)),je},v.prototype.readIntBE=function(W,U,se){W=W|0,U=U|0,se||G(W,U,this.length);for(var je=U,Re=1,We=this[W+--je];je>0&&(Re*=256);)We+=this[W+--je]*Re;return Re*=128,We>=Re&&(We-=Math.pow(2,8*U)),We},v.prototype.readInt8=function(W,U){return U||G(W,1,this.length),this[W]&128?(255-this[W]+1)*-1:this[W]},v.prototype.readInt16LE=function(W,U){U||G(W,2,this.length);var se=this[W]|this[W+1]<<8;return se&32768?se|4294901760:se},v.prototype.readInt16BE=function(W,U){U||G(W,2,this.length);var se=this[W+1]|this[W]<<8;return se&32768?se|4294901760:se},v.prototype.readInt32LE=function(W,U){return U||G(W,4,this.length),this[W]|this[W+1]<<8|this[W+2]<<16|this[W+3]<<24},v.prototype.readInt32BE=function(W,U){return U||G(W,4,this.length),this[W]<<24|this[W+1]<<16|this[W+2]<<8|this[W+3]},v.prototype.readFloatLE=function(W,U){return U||G(W,4,this.length),x.read(this,W,!0,23,4)},v.prototype.readFloatBE=function(W,U){return U||G(W,4,this.length),x.read(this,W,!1,23,4)},v.prototype.readDoubleLE=function(W,U){return U||G(W,8,this.length),x.read(this,W,!0,52,8)},v.prototype.readDoubleBE=function(W,U){return U||G(W,8,this.length),x.read(this,W,!1,52,8)};function ee(ie,W,U,se,je,Re){if(!v.isBuffer(ie))throw new TypeError('"buffer" argument must be a Buffer instance');if(W>je||W<Re)throw new RangeError('"value" argument is out of bounds');if(U+se>ie.length)throw new RangeError("Index out of range")}v.prototype.writeUIntLE=function(W,U,se,je){if(W=+W,U=U|0,se=se|0,!je){var Re=Math.pow(2,8*se)-1;ee(this,W,U,se,Re,0)}var We=1,dt=0;for(this[U]=W&255;++dt<se&&(We*=256);)this[U+dt]=W/We&255;return U+se},v.prototype.writeUIntBE=function(W,U,se,je){if(W=+W,U=U|0,se=se|0,!je){var Re=Math.pow(2,8*se)-1;ee(this,W,U,se,Re,0)}var We=se-1,dt=1;for(this[U+We]=W&255;--We>=0&&(dt*=256);)this[U+We]=W/dt&255;return U+se},v.prototype.writeUInt8=function(W,U,se){return W=+W,U=U|0,se||ee(this,W,U,1,255,0),v.TYPED_ARRAY_SUPPORT||(W=Math.floor(W)),this[U]=W&255,U+1};function pe(ie,W,U,se){W<0&&(W=65535+W+1);for(var je=0,Re=Math.min(ie.length-U,2);je<Re;++je)ie[U+je]=(W&255<<8*(se?je:1-je))>>>(se?je:1-je)*8}v.prototype.writeUInt16LE=function(W,U,se){return W=+W,U=U|0,se||ee(this,W,U,2,65535,0),v.TYPED_ARRAY_SUPPORT?(this[U]=W&255,this[U+1]=W>>>8):pe(this,W,U,!0),U+2},v.prototype.writeUInt16BE=function(W,U,se){return W=+W,U=U|0,se||ee(this,W,U,2,65535,0),v.TYPED_ARRAY_SUPPORT?(this[U]=W>>>8,this[U+1]=W&255):pe(this,W,U,!1),U+2};function Te(ie,W,U,se){W<0&&(W=4294967295+W+1);for(var je=0,Re=Math.min(ie.length-U,4);je<Re;++je)ie[U+je]=W>>>(se?je:3-je)*8&255}v.prototype.writeUInt32LE=function(W,U,se){return W=+W,U=U|0,se||ee(this,W,U,4,4294967295,0),v.TYPED_ARRAY_SUPPORT?(this[U+3]=W>>>24,this[U+2]=W>>>16,this[U+1]=W>>>8,this[U]=W&255):Te(this,W,U,!0),U+4},v.prototype.writeUInt32BE=function(W,U,se){return W=+W,U=U|0,se||ee(this,W,U,4,4294967295,0),v.TYPED_ARRAY_SUPPORT?(this[U]=W>>>24,this[U+1]=W>>>16,this[U+2]=W>>>8,this[U+3]=W&255):Te(this,W,U,!1),U+4},v.prototype.writeIntLE=function(W,U,se,je){if(W=+W,U=U|0,!je){var Re=Math.pow(2,8*se-1);ee(this,W,U,se,Re-1,-Re)}var We=0,dt=1,Lt=0;for(this[U]=W&255;++We<se&&(dt*=256);)W<0&&Lt===0&&this[U+We-1]!==0&&(Lt=1),this[U+We]=(W/dt>>0)-Lt&255;return U+se},v.prototype.writeIntBE=function(W,U,se,je){if(W=+W,U=U|0,!je){var Re=Math.pow(2,8*se-1);ee(this,W,U,se,Re-1,-Re)}var We=se-1,dt=1,Lt=0;for(this[U+We]=W&255;--We>=0&&(dt*=256);)W<0&&Lt===0&&this[U+We+1]!==0&&(Lt=1),this[U+We]=(W/dt>>0)-Lt&255;return U+se},v.prototype.writeInt8=function(W,U,se){return W=+W,U=U|0,se||ee(this,W,U,1,127,-128),v.TYPED_ARRAY_SUPPORT||(W=Math.floor(W)),W<0&&(W=255+W+1),this[U]=W&255,U+1},v.prototype.writeInt16LE=function(W,U,se){return W=+W,U=U|0,se||ee(this,W,U,2,32767,-32768),v.TYPED_ARRAY_SUPPORT?(this[U]=W&255,this[U+1]=W>>>8):pe(this,W,U,!0),U+2},v.prototype.writeInt16BE=function(W,U,se){return W=+W,U=U|0,se||ee(this,W,U,2,32767,-32768),v.TYPED_ARRAY_SUPPORT?(this[U]=W>>>8,this[U+1]=W&255):pe(this,W,U,!1),U+2},v.prototype.writeInt32LE=function(W,U,se){return W=+W,U=U|0,se||ee(this,W,U,4,2147483647,-2147483648),v.TYPED_ARRAY_SUPPORT?(this[U]=W&255,this[U+1]=W>>>8,this[U+2]=W>>>16,this[U+3]=W>>>24):Te(this,W,U,!0),U+4},v.prototype.writeInt32BE=function(W,U,se){return W=+W,U=U|0,se||ee(this,W,U,4,2147483647,-2147483648),W<0&&(W=4294967295+W+1),v.TYPED_ARRAY_SUPPORT?(this[U]=W>>>24,this[U+1]=W>>>16,this[U+2]=W>>>8,this[U+3]=W&255):Te(this,W,U,!1),U+4};function Ie(ie,W,U,se,je,Re){if(U+se>ie.length)throw new RangeError("Index out of range");if(U<0)throw new RangeError("Index out of range")}function Me(ie,W,U,se,je){return je||Ie(ie,W,U,4,34028234663852886e22,-34028234663852886e22),x.write(ie,W,U,se,23,4),U+4}v.prototype.writeFloatLE=function(W,U,se){return Me(this,W,U,!0,se)},v.prototype.writeFloatBE=function(W,U,se){return Me(this,W,U,!1,se)};function Oe(ie,W,U,se,je){return je||Ie(ie,W,U,8,17976931348623157e292,-17976931348623157e292),x.write(ie,W,U,se,52,8),U+8}v.prototype.writeDoubleLE=function(W,U,se){return Oe(this,W,U,!0,se)},v.prototype.writeDoubleBE=function(W,U,se){return Oe(this,W,U,!1,se)},v.prototype.copy=function(W,U,se,je){if(se||(se=0),!je&&je!==0&&(je=this.length),U>=W.length&&(U=W.length),U||(U=0),je>0&&je<se&&(je=se),je===se)return 0;if(W.length===0||this.length===0)return 0;if(U<0)throw new RangeError("targetStart out of bounds");if(se<0||se>=this.length)throw new RangeError("sourceStart out of bounds");if(je<0)throw new RangeError("sourceEnd out of bounds");je>this.length&&(je=this.length),W.length-U<je-se&&(je=W.length-U+se);var Re=je-se,We;if(this===W&&se<U&&U<je)for(We=Re-1;We>=0;--We)W[We+U]=this[We+se];else if(Re<1e3||!v.TYPED_ARRAY_SUPPORT)for(We=0;We<Re;++We)W[We+U]=this[We+se];else Uint8Array.prototype.set.call(W,this.subarray(se,se+Re),U);return Re},v.prototype.fill=function(W,U,se,je){if(typeof W=="string"){if(typeof U=="string"?(je=U,U=0,se=this.length):typeof se=="string"&&(je=se,se=this.length),W.length===1){var Re=W.charCodeAt(0);Re<256&&(W=Re)}if(je!==void 0&&typeof je!="string")throw new TypeError("encoding must be a string");if(typeof je=="string"&&!v.isEncoding(je))throw new TypeError("Unknown encoding: "+je)}else typeof W=="number"&&(W=W&255);if(U<0||this.length<U||this.length<se)throw new RangeError("Out of range index");if(se<=U)return this;U=U>>>0,se=se===void 0?this.length:se>>>0,W||(W=0);var We;if(typeof W=="number")for(We=U;We<se;++We)this[We]=W;else{var dt=v.isBuffer(W)?W:Se(new v(W,je).toString()),Lt=dt.length;for(We=0;We<se-U;++We)this[We+U]=dt[We%Lt]}return this};var Xe=/[^+\/0-9A-Za-z-_]/g;function fe(ie){if(ie=Pe(ie).replace(Xe,""),ie.length<2)return"";for(;ie.length%4!==0;)ie=ie+"=";return ie}function Pe(ie){return ie.trim?ie.trim():ie.replace(/^\s+|\s+$/g,"")}function Be(ie){return ie<16?"0"+ie.toString(16):ie.toString(16)}function Se(ie,W){W=W||Infinity;for(var U,se=ie.length,je=null,Re=[],We=0;We<se;++We){if(U=ie.charCodeAt(We),U>55295&&U<57344){if(!je){if(U>56319){(W-=3)>-1&&Re.push(239,191,189);continue}else if(We+1===se){(W-=3)>-1&&Re.push(239,191,189);continue}je=U;continue}if(U<56320){(W-=3)>-1&&Re.push(239,191,189),je=U;continue}U=(je-55296<<10|U-56320)+65536}else je&&((W-=3)>-1&&Re.push(239,191,189));if(je=null,U<128){if((W-=1)<0)break;Re.push(U)}else if(U<2048){if((W-=2)<0)break;Re.push(U>>6|192,U&63|128)}else if(U<65536){if((W-=3)<0)break;Re.push(U>>12|224,U>>6&63|128,U&63|128)}else if(U<1114112){if((W-=4)<0)break;Re.push(U>>18|240,U>>12&63|128,U>>6&63|128,U&63|128)}else throw new Error("Invalid code point")}return Re}function me(ie){for(var W=[],U=0;U<ie.length;++U)W.push(ie.charCodeAt(U)&255);return W}function he(ie,W){for(var U,se,je,Re=[],We=0;We<ie.length&&!((W-=2)<0);++We)U=ie.charCodeAt(We),se=U>>8,je=U%256,Re.push(je),Re.push(se);return Re}function Le(ie){return B.toByteArray(fe(ie))}function we(ie,W,U,se){for(var je=0;je<se&&!(je+U>=W.length||je>=ie.length);++je)W[je+U]=ie[je];return je}function ve(ie){return ie!==ie}}).call(this,t("IGO8"))},OAO6:function(mt,M,t){"use strict";t.d(M,"a",function(){return B}),t.d(M,"b",function(){return x}),t.d(M,"c",function(){return R}),t.d(M,"d",function(){return A});var g=t("Cg/j");const B=Object(g.c)("undoRedoService");class x{constructor(j,I){this.resource=j,this.elements=I}}class R{constructor(){this.id=R._ID++,this.order=1}nextOrder(){return this.id===0?0:this.order++}}R._ID=0,R.None=new R;class A{constructor(){this.id=A._ID++,this.order=1}nextOrder(){return this.id===0?0:this.order++}}A._ID=0,A.None=new A},OBOq:function(mt,M,t){"use strict";t.d(M,"b",function(){return d}),t.d(M,"a",function(){return D}),t.d(M,"c",function(){return L});var g=t("EffR"),B=t("MNsG"),x=t("UCkY"),R=t.n(x);const A=2e4;let j,I,v,C,m;function d(w){j=document.createElement("div"),j.className="monaco-aria-container";const b=()=>{const c=document.createElement("div");return c.className="monaco-alert",c.setAttribute("role","alert"),c.setAttribute("aria-atomic","true"),j.appendChild(c),c};I=b(),v=b();const u=()=>{const c=document.createElement("div");return c.className="monaco-status",c.setAttribute("role","complementary"),c.setAttribute("aria-live","polite"),c.setAttribute("aria-atomic","true"),j.appendChild(c),c};C=u(),m=u(),w.appendChild(j)}function D(w){if(!j)return;I.textContent!==w?(g.t(v),r(I,w)):(g.t(I),r(v,w))}function L(w){if(!j)return;B.f?D(w):C.textContent!==w?(g.t(m),r(C,w)):(g.t(C),r(m,w))}function r(w,b){g.t(w),b.length>A&&(b=b.substr(0,A)),w.textContent=b,w.style.visibility="hidden",w.style.visibility="visible"}},OKK6:function(mt,M,t){},OOlL:function(mt,M,t){"use strict";t.r(M);var g=t("+hIS");Object(g.a)({id:"azcli",extensions:[".azcli"],aliases:["Azure CLI","azcli"],loader:function(){return t.e(323).then(t.bind(null,"NlLO"))}})},OhnE:function(mt,M,t){},Ov46:function(mt,M,t){"use strict";M.byteLength=v,M.toByteArray=m,M.fromByteArray=L;for(var g=[],B=[],x=typeof Uint8Array!="undefined"?Uint8Array:Array,R="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",A=0,j=R.length;A<j;++A)g[A]=R[A],B[R.charCodeAt(A)]=A;B["-".charCodeAt(0)]=62,B["_".charCodeAt(0)]=63;function I(r){var w=r.length;if(w%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var b=r.indexOf("=");b===-1&&(b=w);var u=b===w?0:4-b%4;return[b,u]}function v(r){var w=I(r),b=w[0],u=w[1];return(b+u)*3/4-u}function C(r,w,b){return(w+b)*3/4-b}function m(r){var w,b=I(r),u=b[0],c=b[1],p=new x(C(r,u,c)),S=0,E=c>0?u-4:u,y;for(y=0;y<E;y+=4)w=B[r.charCodeAt(y)]<<18|B[r.charCodeAt(y+1)]<<12|B[r.charCodeAt(y+2)]<<6|B[r.charCodeAt(y+3)],p[S++]=w>>16&255,p[S++]=w>>8&255,p[S++]=w&255;return c===2&&(w=B[r.charCodeAt(y)]<<2|B[r.charCodeAt(y+1)]>>4,p[S++]=w&255),c===1&&(w=B[r.charCodeAt(y)]<<10|B[r.charCodeAt(y+1)]<<4|B[r.charCodeAt(y+2)]>>2,p[S++]=w>>8&255,p[S++]=w&255),p}function d(r){return g[r>>18&63]+g[r>>12&63]+g[r>>6&63]+g[r&63]}function D(r,w,b){for(var u,c=[],p=w;p<b;p+=3)u=(r[p]<<16&16711680)+(r[p+1]<<8&65280)+(r[p+2]&255),c.push(d(u));return c.join("")}function L(r){for(var w,b=r.length,u=b%3,c=[],p=16383,S=0,E=b-u;S<E;S+=p)c.push(D(r,S,S+p>E?E:S+p));return u===1?(w=r[b-1],c.push(g[w>>2]+g[w<<4&63]+"==")):u===2&&(w=(r[b-2]<<8)+r[b-1],c.push(g[w>>10]+g[w>>4&63]+g[w<<2&63]+"=")),c.join("")}},PTeM:function(mt,M,t){"use strict";t.d(M,"d",function(){return A}),t.d(M,"b",function(){return j}),t.d(M,"c",function(){return v}),t.d(M,"a",function(){return C});var g=t("MrjW"),B=t("MNsG"),x=t("N0LK");function R(m){return m.replace(/[\\/]/g,g.e.sep)}function A(m){return m.indexOf("/")===-1&&(m=R(m)),/^[a-zA-Z]:(\/|$)/.test(m)&&(m="/"+m),m}function j(m,d,D,L=g.h){if(m===d)return!0;if(!m||!d)return!1;if(d.length>m.length)return!1;if(D){const r=Object(x.R)(m,d);if(!r)return!1;if(d.length===m.length)return!0;let w=d.length;return d.charAt(d.length-1)===L&&w--,m.charAt(w)===L}return d.charAt(d.length-1)!==L&&(d+=L),m.indexOf(d)===0}function I(m){return m>=65&&m<=90||m>=97&&m<=122}function v(m){const d=Object(g.d)(m);return B.i?m.length>3?!1:C(d)&&(m.length===2||d.charCodeAt(2)===92):d===g.e.sep}function C(m){return B.i?I(m.charCodeAt(0))&&m.charCodeAt(1)===58:!1}},Q4rV:function(mt,M,t){"use strict";t.d(M,"a",function(){return x});var g=t("HpOR"),B=t("bY76");function x(A){let j=JSON.parse(A);return j=R(j),j}function R(A,j=0){if(!A||j>200)return A;if(typeof A=="object"){switch(A.$mid){case 1:return B.a.revive(A);case 2:return new RegExp(A.source,A.flags)}if(A instanceof g.a||A instanceof Uint8Array)return A;if(Array.isArray(A))for(let I=0;I<A.length;++I)A[I]=R(A[I],j+1);else for(const I in A)Object.hasOwnProperty.call(A,I)&&(A[I]=R(A[I],j+1))}return A}},Q631:function(mt,M,t){"use strict";t.r(M),t.d(M,"rename",function(){return G}),t.d(M,"RenameAction",function(){return pe});var g=t("OBOq"),B=t("X+cX"),x=t("JQT/"),R=t("/cxE"),A=t("pmY6"),j=t("746U"),I=t("bY76"),v=t("vATl"),C=t("sswD"),m=t("x/UI"),d=t("Vxe3"),D=t("cGHE"),L=t("aokT"),r=t("wQH0"),w=t("twdY"),b=t("e0rL"),u=t("NR8r"),c=t("3/fG"),p=t("CRAX"),S=t("T8No"),E=t("Cg/j"),y=t("09fa"),O=t("sM1p"),k=t("tTk5"),Q=t("ic2d"),q=t("BjKj"),z=t("bexQ"),J=t("MD5Z"),re=t("t9D7"),Z=function(Ie,Me,Oe,Xe){var fe=arguments.length,Pe=fe<3?Me:Xe===null?Xe=Object.getOwnPropertyDescriptor(Me,Oe):Xe,Be;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")Pe=Reflect.decorate(Ie,Me,Oe,Xe);else for(var Se=Ie.length-1;Se>=0;Se--)(Be=Ie[Se])&&(Pe=(fe<3?Be(Pe):fe>3?Be(Me,Oe,Pe):Be(Me,Oe))||Pe);return fe>3&&Pe&&Object.defineProperty(Me,Oe,Pe),Pe},ne=function(Ie,Me){return function(Oe,Xe){Me(Oe,Xe,Ie)}};const le=new S.c("renameInputVisible",!1,Object(c.a)("renameInputVisible","Whether the rename input widget is visible"));let _e=class{constructor(Me,Oe,Xe,fe,Pe){this._editor=Me,this._acceptKeybindings=Oe,this._themeService=Xe,this._keybindingService=fe,this._disposables=new A.b,this.allowEditorOverflow=!0,this._visibleContextKey=le.bindTo(Pe),this._editor.addContentWidget(this),this._disposables.add(this._editor.onDidChangeConfiguration(Be=>{Be.hasChanged(43)&&this._updateFont()})),this._disposables.add(Xe.onDidColorThemeChange(this._updateStyles,this))}dispose(){this._disposables.dispose(),this._editor.removeContentWidget(this)}getId(){return"__renameInputWidget"}getDomNode(){if(!this._domNode){this._domNode=document.createElement("div"),this._domNode.className="monaco-editor rename-box",this._input=document.createElement("input"),this._input.className="rename-input",this._input.type="text",this._input.setAttribute("aria-label",Object(c.a)("renameAriaLabel","Rename input. Type new name and press Enter to commit.")),this._domNode.appendChild(this._input),this._label=document.createElement("div"),this._label.className="rename-label",this._domNode.appendChild(this._label);const Me=()=>{var Oe,Xe;const[fe,Pe]=this._acceptKeybindings;this._keybindingService.lookupKeybinding(fe),this._label.innerText=Object(c.a)({key:"label",comment:['placeholders are keybindings, e.g "F2 to Rename, Shift+F2 to Preview"']},"{0} to Rename, {1} to Preview",(Oe=this._keybindingService.lookupKeybinding(fe))===null||Oe===void 0?void 0:Oe.getLabel(),(Xe=this._keybindingService.lookupKeybinding(Pe))===null||Xe===void 0?void 0:Xe.getLabel())};Me(),this._disposables.add(this._keybindingService.onDidUpdateKeybindings(Me)),this._updateFont(),this._updateStyles(this._themeService.getColorTheme())}return this._domNode}_updateStyles(Me){var Oe,Xe,fe,Pe;if(!this._input||!this._domNode)return;const Be=Me.getColor(J.Nc);this._domNode.style.backgroundColor=String((Oe=Me.getColor(J.W))!==null&&Oe!==void 0?Oe:""),this._domNode.style.boxShadow=Be?` 0 0 8px 2px ${Be}`:"",this._domNode.style.color=String((Xe=Me.getColor(J.jb))!==null&&Xe!==void 0?Xe:""),this._input.style.backgroundColor=String((fe=Me.getColor(J.hb))!==null&&fe!==void 0?fe:"");const Se=Me.getColor(J.ib);this._input.style.borderWidth=Se?"1px":"0px",this._input.style.borderStyle=Se?"solid":"none",this._input.style.borderColor=(Pe=Se==null?void 0:Se.toString())!==null&&Pe!==void 0?Pe:"none"}_updateFont(){if(!this._input||!this._label)return;const Me=this._editor.getOption(43);this._input.style.fontFamily=Me.fontFamily,this._input.style.fontWeight=Me.fontWeight,this._input.style.fontSize=`${Me.fontSize}px`,this._label.style.fontSize=`${Me.fontSize*.8}px`}getPosition(){return this._visible?{position:this._position,preference:[2,1]}:null}afterRender(Me){Me||this.cancelInput(!0)}acceptInput(Me){this._currentAcceptInput&&this._currentAcceptInput(Me)}cancelInput(Me){this._currentCancelInput&&this._currentCancelInput(Me)}getInput(Me,Oe,Xe,fe,Pe,Be){this._domNode.classList.toggle("preview",Pe),this._position=new D.a(Me.startLineNumber,Me.startColumn),this._input.value=Oe,this._input.setAttribute("selectionStart",Xe.toString()),this._input.setAttribute("selectionEnd",fe.toString()),this._input.size=Math.max((Me.endColumn-Me.startColumn)*1.1,20);const Se=new A.b;return new Promise(me=>{this._currentCancelInput=he=>(this._currentAcceptInput=void 0,this._currentCancelInput=void 0,me(he),!0),this._currentAcceptInput=he=>{if(this._input.value.trim().length===0||this._input.value===Oe){this.cancelInput(!0);return}this._currentAcceptInput=void 0,this._currentCancelInput=void 0,me({newName:this._input.value,wantsPreview:Pe&&he})},Be.onCancellationRequested(()=>this.cancelInput(!0)),Se.add(this._editor.onDidBlurEditorWidget(()=>this.cancelInput(!1))),this._show()}).finally(()=>{Se.dispose(),this._hide()})}_show(){this._editor.revealLineInCenterIfOutsideViewport(this._position.lineNumber,0),this._visible=!0,this._visibleContextKey.set(!0),this._editor.layoutContentWidget(this),setTimeout(()=>{this._input.focus(),this._input.setSelectionRange(parseInt(this._input.getAttribute("selectionStart")),parseInt(this._input.getAttribute("selectionEnd")))},100)}_hide(){this._visible=!1,this._visibleContextKey.reset(),this._editor.layoutContentWidget(this)}};_e=Z([ne(2,re.b),ne(3,z.a),ne(4,S.b)],_e);var Ce=function(Ie,Me,Oe,Xe){var fe=arguments.length,Pe=fe<3?Me:Xe===null?Xe=Object.getOwnPropertyDescriptor(Me,Oe):Xe,Be;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")Pe=Reflect.decorate(Ie,Me,Oe,Xe);else for(var Se=Ie.length-1;Se>=0;Se--)(Be=Ie[Se])&&(Pe=(fe<3?Be(Pe):fe>3?Be(Me,Oe,Pe):Be(Me,Oe))||Pe);return fe>3&&Pe&&Object.defineProperty(Me,Oe,Pe),Pe},oe=function(Ie,Me){return function(Oe,Xe){Me(Oe,Xe,Ie)}},ae=function(Ie,Me,Oe,Xe){function fe(Pe){return Pe instanceof Oe?Pe:new Oe(function(Be){Be(Pe)})}return new(Oe||(Oe=Promise))(function(Pe,Be){function Se(Le){try{he(Xe.next(Le))}catch(we){Be(we)}}function me(Le){try{he(Xe.throw(Le))}catch(we){Be(we)}}function he(Le){Le.done?Pe(Le.value):fe(Le.value).then(Se,me)}he((Xe=Xe.apply(Ie,Me||[])).next())})};class V{constructor(Ie,Me){this.model=Ie,this.position=Me,this._providerRenameIdx=0,this._providers=w.y.ordered(Ie)}hasProvider(){return this._providers.length>0}resolveRenameLocation(Ie){return ae(this,void 0,void 0,function*(){const Me=[];for(this._providerRenameIdx=0;this._providerRenameIdx<this._providers.length;this._providerRenameIdx++){const Xe=this._providers[this._providerRenameIdx];if(!Xe.resolveRenameLocation)break;let fe=yield Xe.resolveRenameLocation(this.model,this.position,Ie);if(!fe)continue;if(fe.rejectReason){Me.push(fe.rejectReason);continue}return fe}const Oe=this.model.getWordAtPosition(this.position);return Oe?{range:new L.a(this.position.lineNumber,Oe.startColumn,this.position.lineNumber,Oe.endColumn),text:Oe.word,rejectReason:Me.length>0?Me.join(`
|
|
|
`):void 0}:{range:L.a.fromPositions(this.position),text:"",rejectReason:Me.length>0?Me.join(`
|
|
|
`):void 0}})}provideRenameEdits(Ie,Me){return ae(this,void 0,void 0,function*(){return this._provideRenameEdits(Ie,this._providerRenameIdx,[],Me)})}_provideRenameEdits(Ie,Me,Oe,Xe){return ae(this,void 0,void 0,function*(){const fe=this._providers[Me];if(!fe)return{edits:[],rejectReason:Oe.join(`
|
|
|
`)};const Pe=yield fe.provideRenameEdits(this.model,this.position,Ie,Xe);if(Pe){if(Pe.rejectReason)return this._provideRenameEdits(Ie,Me+1,Oe.concat(Pe.rejectReason),Xe)}else return this._provideRenameEdits(Ie,Me+1,Oe.concat(c.a("no result","No result.")),Xe);return Pe})}}function G(Ie,Me,Oe){return ae(this,void 0,void 0,function*(){const Xe=new V(Ie,Me),fe=yield Xe.resolveRenameLocation(x.a.None);return(fe==null?void 0:fe.rejectReason)?{edits:[],rejectReason:fe.rejectReason}:Xe.provideRenameEdits(Oe,x.a.None)})}let ee=class Ie{constructor(Me,Oe,Xe,fe,Pe,Be,Se){this.editor=Me,this._instaService=Oe,this._notificationService=Xe,this._bulkEditService=fe,this._progressService=Pe,this._logService=Be,this._configService=Se,this._dispoableStore=new A.b,this._cts=new x.b,this._renameInputField=this._dispoableStore.add(new B.b(()=>this._dispoableStore.add(this._instaService.createInstance(_e,this.editor,["acceptRenameInput","acceptRenameInputWithPreview"]))))}static get(Me){return Me.getContribution(Ie.ID)}dispose(){this._dispoableStore.dispose(),this._cts.dispose(!0)}run(){return ae(this,void 0,void 0,function*(){if(this._cts.dispose(!0),!this.editor.hasModel())return;const Me=this.editor.getPosition(),Oe=new V(this.editor.getModel(),Me);if(!Oe.hasProvider())return;this._cts=new v.b(this.editor,4|1);let Xe;try{const Le=Oe.resolveRenameLocation(this._cts.token);this._progressService.showWhile(Le,250),Xe=yield Le}catch(Le){u.a.get(this.editor).showMessage(Le||c.a("resolveRenameLocationFailed","An unknown error occurred while resolving rename location"),Me);return}if(!Xe)return;if(Xe.rejectReason){u.a.get(this.editor).showMessage(Xe.rejectReason,Me);return}if(this._cts.token.isCancellationRequested)return;this._cts.dispose(),this._cts=new v.b(this.editor,4|1,Xe.range);let fe=this.editor.getSelection(),Pe=0,Be=Xe.text.length;!L.a.isEmpty(fe)&&!L.a.spansMultipleLines(fe)&&L.a.containsRange(Xe.range,fe)&&(Pe=Math.max(0,fe.startColumn-Xe.range.startColumn),Be=Math.min(Xe.range.endColumn,fe.endColumn)-Xe.range.startColumn);const Se=this._bulkEditService.hasPreviewHandler()&&this._configService.getValue(this.editor.getModel().uri,"editor.rename.enablePreview"),me=yield this._renameInputField.value.getInput(Xe.range,Xe.text,Pe,Be,Se,this._cts.token);if(typeof me=="boolean"){me&&this.editor.focus();return}this.editor.focus();const he=Object(B.l)(Oe.provideRenameEdits(me.newName,this._cts.token),this._cts.token).then(Le=>ae(this,void 0,void 0,function*(){if(!Le||!this.editor.hasModel())return;if(Le.rejectReason){this._notificationService.info(Le.rejectReason);return}this.editor.setSelection(L.a.fromPositions(this.editor.getSelection().getPosition())),this._bulkEditService.apply(m.b.convert(Le),{editor:this.editor,showPreview:me.wantsPreview,label:c.a("label","Renaming '{0}'",Xe==null?void 0:Xe.text),quotableLabel:c.a("quotableLabel","Renaming {0}",Xe==null?void 0:Xe.text)}).then(we=>{we.ariaSummary&&Object(g.a)(c.a("aria","Successfully renamed '{0}' to '{1}'. Summary: {2}",Xe.text,me.newName,we.ariaSummary))}).catch(we=>{this._notificationService.error(c.a("rename.failedApply","Rename failed to apply edits")),this._logService.error(we)})}),Le=>{this._notificationService.error(c.a("rename.failed","Rename failed to compute edits")),this._logService.error(Le)});return this._progressService.showWhile(he,250),he})}acceptRenameInput(Me){this._renameInputField.value.acceptInput(Me)}cancelRenameInput(){this._renameInputField.value.cancelInput(!0)}};ee.ID="editor.contrib.renameController",ee=Ce([oe(1,E.a),oe(2,O.a),oe(3,m.a),oe(4,k.a),oe(5,y.b),oe(6,b.a)],ee);class pe extends C.b{constructor(){super({id:"editor.action.rename",label:c.a("rename.label","Rename Symbol"),alias:"Rename Symbol",precondition:S.a.and(r.a.writable,r.a.hasRenameProvider),kbOpts:{kbExpr:r.a.editorTextFocus,primary:60,weight:100},contextMenuOpts:{group:"1_modification",order:1.1}})}runCommand(Ie,Me){const Oe=Ie.get(d.a),[Xe,fe]=Array.isArray(Me)&&Me||[void 0,void 0];return I.a.isUri(Xe)&&D.a.isIPosition(fe)?Oe.openCodeEditor({resource:Xe},Oe.getActiveCodeEditor()).then(Pe=>{if(!Pe)return;Pe.setPosition(fe),Pe.invokeWithinContext(Be=>(this.reportTelemetry(Be,Pe),this.run(Be,Pe)))},R.f):super.runCommand(Ie,Me)}run(Ie,Me){const Oe=ee.get(Me);return Oe?Oe.run():Promise.resolve()}}Object(C.l)(ee.ID,ee),Object(C.j)(pe);const Te=C.c.bindToContribution(ee.get);Object(C.k)(new Te({id:"acceptRenameInput",precondition:le,handler:Ie=>Ie.acceptRenameInput(!1),kbOpts:{weight:100+99,kbExpr:r.a.focus,primary:3}})),Object(C.k)(new Te({id:"acceptRenameInputWithPreview",precondition:S.a.and(le,S.a.has("config.editor.rename.enablePreview")),handler:Ie=>Ie.acceptRenameInput(!0),kbOpts:{weight:100+99,kbExpr:r.a.focus,primary:1024+3}})),Object(C.k)(new Te({id:"cancelRenameInput",precondition:le,handler:Ie=>Ie.cancelRenameInput(),kbOpts:{weight:100+99,kbExpr:r.a.focus,primary:9,secondary:[1024|9]}})),Object(C.n)("_executeDocumentRenameProvider",function(Ie,Me,...Oe){const[Xe]=Oe;return Object(j.c)(typeof Xe=="string"),G(Ie,Me,Xe)}),Object(C.n)("_executePrepareRename",function(Ie,Me){return ae(this,void 0,void 0,function*(){const Oe=new V(Ie,Me),Xe=yield Oe.resolveRenameLocation(x.a.None);if(Xe==null?void 0:Xe.rejectReason)throw new Error(Xe.rejectReason);return Xe})}),Q.a.as(p.a.Configuration).registerConfiguration({id:"editor",properties:{"editor.rename.enablePreview":{scope:5,description:c.a("enablePreview","Enable/disable the ability to preview changes before renaming"),default:!0,type:"boolean"}}})},QDVR:function(mt,M,t){"use strict";t.d(M,"c",function(){return C}),t.d(M,"b",function(){return d}),t.d(M,"a",function(){return L});var g=t("N0LK"),B,x;class R{constructor(){this._value="",this._pos=0}reset(r){return this._value=r,this._pos=0,this}next(){return this._pos+=1,this}hasNext(){return this._pos<this._value.length-1}cmp(r){const w=r.charCodeAt(0),b=this._value.charCodeAt(this._pos);return w-b}value(){return this._value[this._pos]}}class A{constructor(r=!0){this._caseSensitive=r}reset(r){return this._value=r,this._from=0,this._to=0,this.next()}hasNext(){return this._to<this._value.length}next(){this._from=this._to;let r=!0;for(;this._to<this._value.length;this._to++){const w=this._value.charCodeAt(this._to);if(w===46)if(r)this._from++;else break;else r=!1}return this}cmp(r){return this._caseSensitive?Object(g.h)(r,this._value,0,r.length,this._from,this._to):Object(g.i)(r,this._value,0,r.length,this._from,this._to)}value(){return this._value.substring(this._from,this._to)}}class j{constructor(r=!0,w=!0){this._splitOnBackslash=r,this._caseSensitive=w}reset(r){return this._value=r.replace(/\\$|\/$/,""),this._from=0,this._to=0,this.next()}hasNext(){return this._to<this._value.length}next(){this._from=this._to;let r=!0;for(;this._to<this._value.length;this._to++){const w=this._value.charCodeAt(this._to);if(w===47||this._splitOnBackslash&&w===92)if(r)this._from++;else break;else r=!1}return this}cmp(r){return this._caseSensitive?Object(g.h)(r,this._value,0,r.length,this._from,this._to):Object(g.i)(r,this._value,0,r.length,this._from,this._to)}value(){return this._value.substring(this._from,this._to)}}class I{constructor(r){this._ignorePathCasing=r,this._states=[],this._stateIdx=0}reset(r){return this._value=r,this._states=[],this._value.scheme&&this._states.push(1),this._value.authority&&this._states.push(2),this._value.path&&(this._pathIterator=new j(!1,!this._ignorePathCasing(r)),this._pathIterator.reset(r.path),this._pathIterator.value()&&this._states.push(3)),this._value.query&&this._states.push(4),this._value.fragment&&this._states.push(5),this._stateIdx=0,this}next(){return this._states[this._stateIdx]===3&&this._pathIterator.hasNext()?this._pathIterator.next():this._stateIdx+=1,this}hasNext(){return this._states[this._stateIdx]===3&&this._pathIterator.hasNext()||this._stateIdx<this._states.length-1}cmp(r){if(this._states[this._stateIdx]===1)return Object(g.g)(r,this._value.scheme);if(this._states[this._stateIdx]===2)return Object(g.g)(r,this._value.authority);if(this._states[this._stateIdx]===3)return this._pathIterator.cmp(r);if(this._states[this._stateIdx]===4)return Object(g.f)(r,this._value.query);if(this._states[this._stateIdx]===5)return Object(g.f)(r,this._value.fragment);throw new Error}value(){if(this._states[this._stateIdx]===1)return this._value.scheme;if(this._states[this._stateIdx]===2)return this._value.authority;if(this._states[this._stateIdx]===3)return this._pathIterator.value();if(this._states[this._stateIdx]===4)return this._value.query;if(this._states[this._stateIdx]===5)return this._value.fragment;throw new Error}}class v{constructor(){this.height=1}rotateLeft(){const r=this.right;return this.right=r.left,r.left=this,this.updateHeight(),r.updateHeight(),r}rotateRight(){const r=this.left;return this.left=r.right,r.right=this,this.updateHeight(),r.updateHeight(),r}updateHeight(){this.height=1+Math.max(this.heightLeft,this.heightRight)}balanceFactor(){return this.heightRight-this.heightLeft}get heightLeft(){var r,w;return(w=(r=this.left)===null||r===void 0?void 0:r.height)!==null&&w!==void 0?w:0}get heightRight(){var r,w;return(w=(r=this.right)===null||r===void 0?void 0:r.height)!==null&&w!==void 0?w:0}}class C{constructor(r){this._iter=r}static forUris(r=()=>!1){return new C(new I(r))}static forStrings(){return new C(new R)}static forConfigKeys(){return new C(new A)}clear(){this._root=void 0}set(r,w){const b=this._iter.reset(r);let u;this._root||(this._root=new v,this._root.segment=b.value());const c=[];for(u=this._root;;){const S=b.cmp(u.segment);if(S>0)u.left||(u.left=new v,u.left.segment=b.value()),c.push([-1,u]),u=u.left;else if(S<0)u.right||(u.right=new v,u.right.segment=b.value()),c.push([1,u]),u=u.right;else if(b.hasNext())b.next(),u.mid||(u.mid=new v,u.mid.segment=b.value()),c.push([0,u]),u=u.mid;else break}const p=u.value;u.value=w,u.key=r;for(let S=c.length-1;S>=0;S--){const E=c[S][1];E.updateHeight();const y=E.balanceFactor();if(y<-1||y>1){const O=c[S][0],k=c[S+1][0];if(O===1&&k===1)c[S][1]=E.rotateLeft();else if(O===-1&&k===-1)c[S][1]=E.rotateRight();else if(O===1&&k===-1)E.right=c[S+1][1]=c[S+1][1].rotateRight(),c[S][1]=E.rotateLeft();else if(O===-1&&k===1)E.left=c[S+1][1]=c[S+1][1].rotateLeft(),c[S][1]=E.rotateRight();else throw new Error;if(S>0)switch(c[S-1][0]){case-1:c[S-1][1].left=c[S][1];break;case 1:c[S-1][1].right=c[S][1];break;case 0:c[S-1][1].mid=c[S][1];break}else this._root=c[0][1]}}return p}get(r){var w;return(w=this._getNode(r))===null||w===void 0?void 0:w.value}_getNode(r){const w=this._iter.reset(r);let b=this._root;for(;b;){const u=w.cmp(b.segment);if(u>0)b=b.left;else if(u<0)b=b.right;else if(w.hasNext())w.next(),b=b.mid;else break}return b}has(r){const w=this._getNode(r);return!((w==null?void 0:w.value)===void 0&&(w==null?void 0:w.mid)===void 0)}delete(r){return this._delete(r,!1)}deleteSuperstr(r){return this._delete(r,!0)}_delete(r,w){var b;const u=this._iter.reset(r),c=[];let p=this._root;for(;p;){const S=u.cmp(p.segment);if(S>0)c.push([-1,p]),p=p.left;else if(S<0)c.push([1,p]),p=p.right;else if(u.hasNext())u.next(),c.push([0,p]),p=p.mid;else break}if(!p)return;if(w?(p.left=void 0,p.mid=void 0,p.right=void 0,p.height=1):(p.key=void 0,p.value=void 0),!p.mid&&!p.value)if(p.left&&p.right){const S=this._min(p.right),{key:E,value:y,segment:O}=S;this._delete(S.key,!1),p.key=E,p.value=y,p.segment=O}else{const S=(b=p.left)!==null&&b!==void 0?b:p.right;if(c.length>0){const[E,y]=c[c.length-1];switch(E){case-1:y.left=S;break;case 0:y.mid=S;break;case 1:y.right=S;break}}else this._root=S}for(let S=c.length-1;S>=0;S--){const E=c[S][1];E.updateHeight();const y=E.balanceFactor();if(y>1?(E.right.balanceFactor()>=0||(E.right=c[S+1][1]=c[S+1][1].rotateRight()),c[S][1]=E.rotateLeft()):y<-1&&(E.left.balanceFactor()<=0||(E.left=c[S+1][1]=c[S+1][1].rotateLeft()),c[S][1]=E.rotateRight()),S>0)switch(c[S-1][0]){case-1:c[S-1][1].left=c[S][1];break;case 1:c[S-1][1].right=c[S][1];break;case 0:c[S-1][1].mid=c[S][1];break}else this._root=c[0][1]}}_min(r){for(;r.left;)r=r.left;return r}findSubstr(r){const w=this._iter.reset(r);let b=this._root,u;for(;b;){const c=w.cmp(b.segment);if(c>0)b=b.left;else if(c<0)b=b.right;else if(w.hasNext())w.next(),u=b.value||u,b=b.mid;else break}return b&&b.value||u}findSuperstr(r){const w=this._iter.reset(r);let b=this._root;for(;b;){const u=w.cmp(b.segment);if(u>0)b=b.left;else if(u<0)b=b.right;else if(w.hasNext())w.next(),b=b.mid;else return b.mid?this._entries(b.mid):void 0}return}forEach(r){for(const[w,b]of this)r(b,w)}*[Symbol.iterator](){yield*this._entries(this._root)}*_entries(r){if(!r)return;r.left&&(yield*this._entries(r.left)),r.value&&(yield[r.key,r.value]),r.mid&&(yield*this._entries(r.mid)),r.right&&(yield*this._entries(r.right))}}class m{constructor(r,w){this.uri=r,this.value=w}}class d{constructor(r,w){this[B]="ResourceMap",r instanceof d?(this.map=new Map(r.map),this.toKey=w!=null?w:d.defaultToKey):(this.map=new Map,this.toKey=r!=null?r:d.defaultToKey)}set(r,w){return this.map.set(this.toKey(r),new m(r,w)),this}get(r){var w;return(w=this.map.get(this.toKey(r)))===null||w===void 0?void 0:w.value}has(r){return this.map.has(this.toKey(r))}get size(){return this.map.size}clear(){this.map.clear()}delete(r){return this.map.delete(this.toKey(r))}forEach(r,w){typeof w!="undefined"&&(r=r.bind(w));for(let[b,u]of this.map)r(u.value,u.uri,this)}*values(){for(let r of this.map.values())yield r.value}*keys(){for(let r of this.map.values())yield r.uri}*entries(){for(let r of this.map.values())yield[r.uri,r.value]}*[(B=Symbol.toStringTag,Symbol.iterator)](){for(let[,r]of this.map)yield[r.uri,r.value]}}d.defaultToKey=r=>r.toString();class D{constructor(){this[x]="LinkedMap",this._map=new Map,this._head=void 0,this._tail=void 0,this._size=0,this._state=0}clear(){this._map.clear(),this._head=void 0,this._tail=void 0,this._size=0,this._state++}isEmpty(){return!this._head&&!this._tail}get size(){return this._size}get first(){var r;return(r=this._head)===null||r===void 0?void 0:r.value}get last(){var r;return(r=this._tail)===null||r===void 0?void 0:r.value}has(r){return this._map.has(r)}get(r,w=0){const b=this._map.get(r);return b?(w!==0&&this.touch(b,w),b.value):void 0}set(r,w,b=0){let u=this._map.get(r);if(u)u.value=w,b!==0&&this.touch(u,b);else{u={key:r,value:w,next:void 0,previous:void 0};switch(b){case 0:this.addItemLast(u);break;case 1:this.addItemFirst(u);break;case 2:this.addItemLast(u);break;default:this.addItemLast(u);break}this._map.set(r,u),this._size++}return this}delete(r){return!!this.remove(r)}remove(r){const w=this._map.get(r);return w?(this._map.delete(r),this.removeItem(w),this._size--,w.value):void 0}shift(){if(!this._head&&!this._tail)return;if(!this._head||!this._tail)throw new Error("Invalid list");const r=this._head;return this._map.delete(r.key),this.removeItem(r),this._size--,r.value}forEach(r,w){const b=this._state;let u=this._head;for(;u;){if(w?r.bind(w)(u.value,u.key,this):r(u.value,u.key,this),this._state!==b)throw new Error("LinkedMap got modified during iteration.");u=u.next}}keys(){const r=this,w=this._state;let b=this._head;const u={[Symbol.iterator](){return u},next(){if(r._state!==w)throw new Error("LinkedMap got modified during iteration.");if(b){const c={value:b.key,done:!1};return b=b.next,c}else return{value:void 0,done:!0}}};return u}values(){const r=this,w=this._state;let b=this._head;const u={[Symbol.iterator](){return u},next(){if(r._state!==w)throw new Error("LinkedMap got modified during iteration.");if(b){const c={value:b.value,done:!1};return b=b.next,c}else return{value:void 0,done:!0}}};return u}entries(){const r=this,w=this._state;let b=this._head;const u={[Symbol.iterator](){return u},next(){if(r._state!==w)throw new Error("LinkedMap got modified during iteration.");if(b){const c={value:[b.key,b.value],done:!1};return b=b.next,c}else return{value:void 0,done:!0}}};return u}[(x=Symbol.toStringTag,Symbol.iterator)](){return this.entries()}trimOld(r){if(r>=this.size)return;if(r===0){this.clear();return}let w=this._head,b=this.size;for(;w&&b>r;)this._map.delete(w.key),w=w.next,b--;this._head=w,this._size=b,w&&(w.previous=void 0),this._state++}addItemFirst(r){if(!this._head&&!this._tail)this._tail=r;else if(this._head)r.next=this._head,this._head.previous=r;else throw new Error("Invalid list");this._head=r,this._state++}addItemLast(r){if(!this._head&&!this._tail)this._head=r;else if(this._tail)r.previous=this._tail,this._tail.next=r;else throw new Error("Invalid list");this._tail=r,this._state++}removeItem(r){if(r===this._head&&r===this._tail)this._head=void 0,this._tail=void 0;else if(r===this._head){if(!r.next)throw new Error("Invalid list");r.next.previous=void 0,this._head=r.next}else if(r===this._tail){if(!r.previous)throw new Error("Invalid list");r.previous.next=void 0,this._tail=r.previous}else{const w=r.next,b=r.previous;if(!w||!b)throw new Error("Invalid list");w.previous=b,b.next=w}r.next=void 0,r.previous=void 0,this._state++}touch(r,w){if(!this._head||!this._tail)throw new Error("Invalid list");if(w!==1&&w!==2)return;if(w===1){if(r===this._head)return;const b=r.next,u=r.previous;r===this._tail?(u.next=void 0,this._tail=u):(b.previous=u,u.next=b),r.previous=void 0,r.next=this._head,this._head.previous=r,this._head=r,this._state++}else if(w===2){if(r===this._tail)return;const b=r.next,u=r.previous;r===this._head?(b.previous=void 0,this._head=b):(b.previous=u,u.next=b),r.next=void 0,r.previous=this._tail,this._tail.next=r,this._tail=r,this._state++}}toJSON(){const r=[];return this.forEach((w,b)=>{r.push([b,w])}),r}fromJSON(r){this.clear();for(const[w,b]of r)this.set(w,b)}}class L extends D{constructor(r,w=1){super();this._limit=r,this._ratio=Math.min(Math.max(0,w),1)}get limit(){return this._limit}set limit(r){this._limit=r,this.checkTrim()}get(r,w=2){return super.get(r,w)}peek(r){return super.get(r,0)}set(r,w){return super.set(r,w,2),this.checkTrim(),this}checkTrim(){this.size>this._limit&&this.trimOld(Math.round(this._limit*this._ratio))}}},QFiB:function(mt,M,t){"use strict";t.r(M);var g=t("+hIS");Object(g.a)({id:"markdown",extensions:[".md",".markdown",".mdown",".mkdn",".mkd",".mdwn",".mdtxt",".mdtext"],aliases:["Markdown","markdown"],loader:function(){return t.e(342).then(t.bind(null,"PhST"))}})},QMLA:function(mt,M,t){},QRHv:function(mt,M,t){"use strict";t.d(M,"f",function(){return j}),t.d(M,"b",function(){return C}),t.d(M,"c",function(){return m}),t.d(M,"a",function(){return D}),t.d(M,"e",function(){return w}),t.d(M,"d",function(){return b});var g=t("6OMU"),B=t("4bUh"),x=t("cGHE"),R=t("aokT"),A=t("twdY");function j(u){let c=0,p=0,S=0,E=0;for(let y=0,O=u.length;y<O;y++){const k=u.charCodeAt(y);k===13?(c===0&&(p=y),c++,y+1<O&&u.charCodeAt(y+1)===10?(E|=2,y++):E|=3,S=y+1):k===10&&(E|=1,c===0&&(p=y),c++,S=y+1)}return c===0&&(p=u.length),[c,p,u.length-S,E]}function I(u){return(u<<0|0<<8|0<<11|1<<14|2<<23)>>>0}const v=new Uint32Array(0).buffer;class C{constructor(){this.tokens=[]}add(u,c){if(this.tokens.length>0){const p=this.tokens[this.tokens.length-1],S=p.startLineNumber+p.tokens.length-1;if(S+1===u){p.tokens.push(c);return}}this.tokens.push(new L(u,[c]))}}class m{constructor(u){this._tokens=u,this._tokenCount=u.length/4}toString(u){let c=[];for(let p=0;p<this._tokenCount;p++)c.push(`(${this._getDeltaLine(p)+u},${this._getStartCharacter(p)}-${this._getEndCharacter(p)})`);return`[${c.join(",")}]`}getMaxDeltaLine(){const u=this._getTokenCount();return u===0?-1:this._getDeltaLine(u-1)}getRange(){const u=this._getTokenCount();if(u===0)return null;const c=this._getStartCharacter(0),p=this._getDeltaLine(u-1),S=this._getEndCharacter(u-1);return new R.a(0,c+1,p,S+1)}_getTokenCount(){return this._tokenCount}_getDeltaLine(u){return this._tokens[4*u]}_getStartCharacter(u){return this._tokens[4*u+1]}_getEndCharacter(u){return this._tokens[4*u+2]}isEmpty(){return this._getTokenCount()===0}getLineTokens(u){let c=0,p=this._getTokenCount()-1;for(;c<p;){const S=c+Math.floor((p-c)/2),E=this._getDeltaLine(S);if(E<u)c=S+1;else if(E>u)p=S-1;else{let y=S;for(;y>c&&this._getDeltaLine(y-1)===u;)y--;let O=S;for(;O<p&&this._getDeltaLine(O+1)===u;)O++;return new d(this._tokens.subarray(4*y,4*O+4))}}return this._getDeltaLine(c)===u?new d(this._tokens.subarray(4*c,4*c+4)):null}clear(){this._tokenCount=0}removeTokens(u,c,p,S){const E=this._tokens,y=this._tokenCount;let O=0,k=!1,Q=0;for(let q=0;q<y;q++){const z=4*q,J=E[z],re=E[z+1],Z=E[z+2],ne=E[z+3];if((J>u||J===u&&Z>=c)&&(J<p||J===p&&re<=S))k=!0;else{if(O===0&&(Q=J),k){const le=4*O;E[le]=J-Q,E[le+1]=re,E[le+2]=Z,E[le+3]=ne}O++}}return this._tokenCount=O,Q}split(u,c,p,S){const E=this._tokens,y=this._tokenCount;let O=[],k=[],Q=O,q=0,z=0;for(let J=0;J<y;J++){const re=4*J,Z=E[re],ne=E[re+1],le=E[re+2],_e=E[re+3];if(Z>u||Z===u&&le>=c){if(Z<p||Z===p&&ne<=S)continue;Q!==k&&(Q=k,q=0,z=Z)}Q[q++]=Z-z,Q[q++]=ne,Q[q++]=le,Q[q++]=_e}return[new m(new Uint32Array(O)),new m(new Uint32Array(k)),z]}acceptDeleteRange(u,c,p,S,E){const y=this._tokens,O=this._tokenCount,k=S-c;let Q=0,q=!1;for(let z=0;z<O;z++){const J=4*z;let re=y[J],Z=y[J+1],ne=y[J+2];const le=y[J+3];if(re<c||re===c&&ne<=p){Q++;continue}else if(re===c&&Z<p)re===S&&ne>E?ne-=E-p:ne=p;else if(re===c&&Z===p)if(re===S&&ne>E)ne-=E-p;else{q=!0;continue}else if(re<S||re===S&&Z<E)if(re===S&&ne>E)re===c?(Z=p,ne=Z+(ne-E)):(Z=0,ne=Z+(ne-E));else{q=!0;continue}else if(re>S){if(k===0&&!q){Q=O;break}re-=k}else if(re===S&&Z>=E)u&&re===0&&(Z+=u,ne+=u),re-=k,Z-=E-p,ne-=E-p;else throw new Error("Not possible!");const _e=4*Q;y[_e]=re,y[_e+1]=Z,y[_e+2]=ne,y[_e+3]=le,Q++}this._tokenCount=Q}acceptInsertText(u,c,p,S,E,y){const O=p===0&&S===1&&(y>=48&&y<=57||y>=65&&y<=90||y>=97&&y<=122),k=this._tokens,Q=this._tokenCount;for(let q=0;q<Q;q++){const z=4*q;let J=k[z],re=k[z+1],Z=k[z+2];if(J<u||J===u&&Z<c)continue;if(J===u&&Z===c)if(O)Z+=1;else continue;else if(J===u&&re<c&&c<Z)p===0?Z+=S:Z=c;else{if(J===u&&re===c&&O)continue;if(J===u)if(J+=p,p===0)re+=S,Z+=S;else{const ne=Z-re;re=E+(re-c),Z=re+ne}else J+=p}k[z]=J,k[z+1]=re,k[z+2]=Z}}}class d{constructor(u){this._tokens=u}getCount(){return this._tokens.length/4}getStartCharacter(u){return this._tokens[4*u+1]}getEndCharacter(u){return this._tokens[4*u+2]}getMetadata(u){return this._tokens[4*u+3]}}class D{constructor(u,c){this.startLineNumber=u,this.tokens=c,this.endLineNumber=this.startLineNumber+this.tokens.getMaxDeltaLine()}toString(){return this.tokens.toString(this.startLineNumber)}_updateEndLineNumber(){this.endLineNumber=this.startLineNumber+this.tokens.getMaxDeltaLine()}isEmpty(){return this.tokens.isEmpty()}getLineTokens(u){return this.startLineNumber<=u&&u<=this.endLineNumber?this.tokens.getLineTokens(u-this.startLineNumber):null}getRange(){const u=this.tokens.getRange();return u&&new R.a(this.startLineNumber+u.startLineNumber,u.startColumn,this.startLineNumber+u.endLineNumber,u.endColumn)}removeTokens(u){const c=u.startLineNumber-this.startLineNumber,p=u.endLineNumber-this.startLineNumber;this.startLineNumber+=this.tokens.removeTokens(c,u.startColumn-1,p,u.endColumn-1),this._updateEndLineNumber()}split(u){const c=u.startLineNumber-this.startLineNumber,p=u.endLineNumber-this.startLineNumber,[S,E,y]=this.tokens.split(c,u.startColumn-1,p,u.endColumn-1);return[new D(this.startLineNumber,S),new D(this.startLineNumber+y,E)]}applyEdit(u,c){const[p,S,E]=j(c);this.acceptEdit(u,p,S,E,c.length>0?c.charCodeAt(0):0)}acceptEdit(u,c,p,S,E){this._acceptDeleteRange(u),this._acceptInsertText(new x.a(u.startLineNumber,u.startColumn),c,p,S,E),this._updateEndLineNumber()}_acceptDeleteRange(u){if(u.startLineNumber===u.endLineNumber&&u.startColumn===u.endColumn)return;const c=u.startLineNumber-this.startLineNumber,p=u.endLineNumber-this.startLineNumber;if(p<0){const E=p-c;this.startLineNumber-=E;return}const S=this.tokens.getMaxDeltaLine();if(c>=S+1)return;if(c<0&&p>=S+1){this.startLineNumber=0,this.tokens.clear();return}if(c<0){const E=-c;this.startLineNumber-=E,this.tokens.acceptDeleteRange(u.startColumn-1,0,0,p,u.endColumn-1)}else this.tokens.acceptDeleteRange(0,c,u.startColumn-1,p,u.endColumn-1)}_acceptInsertText(u,c,p,S,E){if(c===0&&p===0)return;const y=u.lineNumber-this.startLineNumber;if(y<0){this.startLineNumber+=c;return}const O=this.tokens.getMaxDeltaLine();if(y>=O+1)return;this.tokens.acceptInsertText(y,u.column-1,c,p,S,E)}}class L{constructor(u,c){this.startLineNumber=u,this.tokens=c}}function r(u){return u instanceof Uint32Array?u:new Uint32Array(u)}class w{constructor(u){this._pieces=[],this._isComplete=!1,this._languageIdCodec=u}flush(){this._pieces=[],this._isComplete=!1}isEmpty(){return this._pieces.length===0}set(u,c){this._pieces=u||[],this._isComplete=c}setPartial(u,c){let p=u;if(c.length>0){const E=c[0].getRange(),y=c[c.length-1].getRange();if(!E||!y)return u;p=u.plusRange(E).plusRange(y)}let S=null;for(let E=0,y=this._pieces.length;E<y;E++){const O=this._pieces[E];if(O.endLineNumber<p.startLineNumber)continue;if(O.startLineNumber>p.endLineNumber){S=S||{index:E};break}if(O.removeTokens(p),O.isEmpty()){this._pieces.splice(E,1),E--,y--;continue}if(O.endLineNumber<p.startLineNumber)continue;if(O.startLineNumber>p.endLineNumber){S=S||{index:E};continue}const[k,Q]=O.split(p);if(k.isEmpty()){S=S||{index:E};continue}if(Q.isEmpty())continue;this._pieces.splice(E,1,k,Q),E++,y++,S=S||{index:E}}return S=S||{index:this._pieces.length},c.length>0&&(this._pieces=g.b(this._pieces,S.index,c)),p}isComplete(){return this._isComplete}addSemanticTokens(u,c){const p=this._pieces;if(p.length===0)return c;const S=w._findFirstPieceWithLine(p,u),E=p[S].getLineTokens(u);if(!E)return c;const y=c.getCount(),O=E.getCount();let k=0,Q=[],q=0,z=0;const J=(re,Z)=>{if(re===z)return;z=re,Q[q++]=re,Q[q++]=Z};for(let re=0;re<O;re++){const Z=E.getStartCharacter(re),ne=E.getEndCharacter(re),le=E.getMetadata(re),_e=((le&1?2048:0)|(le&2?4096:0)|(le&4?8192:0)|(le&8?8372224:0)|(le&16?4286578688:0))>>>0,Ce=~_e>>>0;for(;k<y&&c.getEndOffset(k)<=Z;)J(c.getEndOffset(k),c.getMetadata(k)),k++;for(k<y&&c.getStartOffset(k)<Z&&J(Z,c.getMetadata(k));k<y&&c.getEndOffset(k)<ne;)J(c.getEndOffset(k),c.getMetadata(k)&Ce|le&_e),k++;if(k<y)J(ne,c.getMetadata(k)&Ce|le&_e),c.getEndOffset(k)===ne&&k++;else{const oe=Math.min(Math.max(0,k-1),y-1);J(ne,c.getMetadata(oe)&Ce|le&_e)}}for(;k<y;)J(c.getEndOffset(k),c.getMetadata(k)),k++;return new B.a(new Uint32Array(Q),c.getLineContent(),this._languageIdCodec)}static _findFirstPieceWithLine(u,c){let p=0,S=u.length-1;for(;p<S;){let E=p+Math.floor((S-p)/2);if(u[E].endLineNumber<c)p=E+1;else if(u[E].startLineNumber>c)S=E-1;else{for(;E>p&&u[E-1].startLineNumber<=c&&c<=u[E-1].endLineNumber;)E--;return E}}return p}acceptEdit(u,c,p,S,E){for(const y of this._pieces)y.acceptEdit(u,c,p,S,E)}}class b{constructor(u){this._lineTokens=[],this._len=0,this._languageIdCodec=u}flush(){this._lineTokens=[],this._len=0}getTokens(u,c,p){let S=null;if(c<this._len&&(S=this._lineTokens[c]),S!==null&&S!==v)return new B.a(r(S),p,this._languageIdCodec);const E=new Uint32Array(2);return E[0]=p.length,E[1]=I(this._languageIdCodec.encodeLanguageId(u)),new B.a(E,p,this._languageIdCodec)}static _massageTokens(u,c,p){const S=p?r(p):null;if(c===0){let E=!1;if(S&&S.length>1&&(E=A.D.getLanguageId(S[1])!==u),!E)return v}if(!S||S.length===0){const E=new Uint32Array(2);return E[0]=c,E[1]=I(u),E.buffer}return S[S.length-2]=c,S.byteOffset===0&&S.byteLength===S.buffer.byteLength?S.buffer:S}_ensureLine(u){for(;u>=this._len;)this._lineTokens[this._len]=null,this._len++}_deleteLines(u,c){if(c===0)return;u+c>this._len&&(c=this._len-u),this._lineTokens.splice(u,c),this._len-=c}_insertLines(u,c){if(c===0)return;let p=[];for(let S=0;S<c;S++)p[S]=null;this._lineTokens=g.b(this._lineTokens,u,p),this._len+=c}setTokens(u,c,p,S,E){const y=b._massageTokens(this._languageIdCodec.encodeLanguageId(u),p,S);this._ensureLine(c);const O=this._lineTokens[c];return this._lineTokens[c]=y,E?!b._equals(O,y):!1}static _equals(u,c){if(!u||!c)return!u&&!c;const p=r(u),S=r(c);if(p.length!==S.length)return!1;for(let E=0,y=p.length;E<y;E++)if(p[E]!==S[E])return!1;return!0}acceptEdit(u,c,p){this._acceptDeleteRange(u),this._acceptInsertText(new x.a(u.startLineNumber,u.startColumn),c,p)}_acceptDeleteRange(u){const c=u.startLineNumber-1;if(c>=this._len)return;if(u.startLineNumber===u.endLineNumber){if(u.startColumn===u.endColumn)return;this._lineTokens[c]=b._delete(this._lineTokens[c],u.startColumn-1,u.endColumn-1);return}this._lineTokens[c]=b._deleteEnding(this._lineTokens[c],u.startColumn-1);const p=u.endLineNumber-1;let S=null;p<this._len&&(S=b._deleteBeginning(this._lineTokens[p],u.endColumn-1)),this._lineTokens[c]=b._append(this._lineTokens[c],S),this._deleteLines(u.startLineNumber,u.endLineNumber-u.startLineNumber)}_acceptInsertText(u,c,p){if(c===0&&p===0)return;const S=u.lineNumber-1;if(S>=this._len)return;if(c===0){this._lineTokens[S]=b._insert(this._lineTokens[S],u.column-1,p);return}this._lineTokens[S]=b._deleteEnding(this._lineTokens[S],u.column-1),this._lineTokens[S]=b._insert(this._lineTokens[S],u.column-1,p),this._insertLines(u.lineNumber,c)}static _deleteBeginning(u,c){return u===null||u===v?u:b._delete(u,0,c)}static _deleteEnding(u,c){if(u===null||u===v)return u;const p=r(u),S=p[p.length-2];return b._delete(u,c,S)}static _delete(u,c,p){if(u===null||u===v||c===p)return u;const S=r(u),E=S.length>>>1;if(c===0&&S[S.length-2]===p)return v;const y=B.a.findIndexInTokensArray(S,c),O=y>0?S[y-1<<1]:0,k=S[y<<1];if(p<k){const re=p-c;for(let Z=y;Z<E;Z++)S[Z<<1]-=re;return u}let Q,q;O!==c?(S[y<<1]=c,Q=y+1<<1,q=c):(Q=y<<1,q=O);const z=p-c;for(let re=y+1;re<E;re++){const Z=S[re<<1]-z;Z>q&&(S[Q++]=Z,S[Q++]=S[(re<<1)+1],q=Z)}if(Q===S.length)return u;let J=new Uint32Array(Q);return J.set(S.subarray(0,Q),0),J.buffer}static _append(u,c){if(c===v)return u;if(u===v)return c;if(u===null)return u;if(c===null)return null;const p=r(u),S=r(c),E=S.length>>>1;let y=new Uint32Array(p.length+S.length);y.set(p,0);let O=p.length;const k=p[p.length-2];for(let Q=0;Q<E;Q++)y[O++]=S[Q<<1]+k,y[O++]=S[(Q<<1)+1];return y.buffer}static _insert(u,c,p){if(u===null||u===v)return u;const S=r(u),E=S.length>>>1;let y=B.a.findIndexInTokensArray(S,c);if(y>0){const O=S[y-1<<1];O===c&&y--}for(let O=y;O<E;O++)S[O<<1]+=p;return u}}},QVNv:function(mt,M,t){"use strict";t.d(M,"b",function(){return c}),t.d(M,"g",function(){return p}),t.d(M,"a",function(){return E}),t.d(M,"c",function(){return O}),t.d(M,"e",function(){return Q}),t.d(M,"d",function(){return Z}),t.d(M,"f",function(){return le});var g=t("JQT/"),B=t("/cxE"),x=t("fpMC"),R=t("pmY6"),A=t("5Y4S"),j=t("746U"),I=t("bY76"),v=t("cGHE"),C=t("aokT"),m=t("twdY"),d=t("t49l"),D=t("uACm"),L=t("3/fG"),r=t("fjLI"),w=t("nnTU"),b=t("T8No"),u=function(_e,Ce,oe,ae){function V(G){return G instanceof oe?G:new oe(function(ee){ee(G)})}return new(oe||(oe=Promise))(function(G,ee){function pe(Me){try{Ie(ae.next(Me))}catch(Oe){ee(Oe)}}function Te(Me){try{Ie(ae.throw(Me))}catch(Oe){ee(Oe)}}function Ie(Me){Me.done?G(Me.value):V(Me.value).then(pe,Te)}Ie((ae=ae.apply(_e,Ce||[])).next())})};const c={Visible:new b.c("suggestWidgetVisible",!1,Object(L.a)("suggestWidgetVisible","Whether suggestion are visible")),DetailsVisible:new b.c("suggestWidgetDetailsVisible",!1,Object(L.a)("suggestWidgetDetailsVisible","Whether suggestion details are visible")),MultipleSuggestions:new b.c("suggestWidgetMultipleSuggestions",!1,Object(L.a)("suggestWidgetMultipleSuggestions","Whether there are multiple suggestions to pick from")),MakesTextEdit:new b.c("suggestionMakesTextEdit",!0,Object(L.a)("suggestionMakesTextEdit","Whether inserting the current suggestion yields in a change or has everything already been typed")),AcceptSuggestionsOnEnter:new b.c("acceptSuggestionOnEnter",!0,Object(L.a)("acceptSuggestionOnEnter","Whether suggestions are inserted when pressing Enter")),HasInsertAndReplaceRange:new b.c("suggestionHasInsertAndReplaceRange",!1,Object(L.a)("suggestionHasInsertAndReplaceRange","Whether the current suggestion has insert and replace behaviour")),InsertMode:new b.c("suggestionInsertMode",void 0,{type:"string",description:Object(L.a)("suggestionInsertMode","Whether the default behaviour is to insert or replace")}),CanResolve:new b.c("suggestionCanResolve",!1,Object(L.a)("suggestionCanResolve","Whether the current suggestion supports to resolve further details"))},p=new r.b("suggestWidgetStatusBar");class S{constructor(_e,Ce,oe,ae){this.position=_e,this.completion=Ce,this.container=oe,this.provider=ae,this.isInvalid=!1,this.score=x.a.Default,this.distance=0,this.textLabel=typeof Ce.label=="string"?Ce.label:Ce.label.label,this.labelLow=this.textLabel.toLowerCase(),this.isInvalid=!this.textLabel,this.sortTextLow=Ce.sortText&&Ce.sortText.toLowerCase(),this.filterTextLow=Ce.filterText&&Ce.filterText.toLowerCase(),C.a.isIRange(Ce.range)?(this.editStart=new v.a(Ce.range.startLineNumber,Ce.range.startColumn),this.editInsertEnd=new v.a(Ce.range.endLineNumber,Ce.range.endColumn),this.editReplaceEnd=new v.a(Ce.range.endLineNumber,Ce.range.endColumn),this.isInvalid=this.isInvalid||C.a.spansMultipleLines(Ce.range)||Ce.range.startLineNumber!==_e.lineNumber):(this.editStart=new v.a(Ce.range.insert.startLineNumber,Ce.range.insert.startColumn),this.editInsertEnd=new v.a(Ce.range.insert.endLineNumber,Ce.range.insert.endColumn),this.editReplaceEnd=new v.a(Ce.range.replace.endLineNumber,Ce.range.replace.endColumn),this.isInvalid=this.isInvalid||C.a.spansMultipleLines(Ce.range.insert)||C.a.spansMultipleLines(Ce.range.replace)||Ce.range.insert.startLineNumber!==_e.lineNumber||Ce.range.replace.startLineNumber!==_e.lineNumber||Ce.range.insert.startColumn!==Ce.range.replace.startColumn),typeof ae.resolveCompletionItem!="function"&&(this._resolveCache=Promise.resolve(),this._isResolved=!0)}get isResolved(){return!!this._isResolved}resolve(_e){return u(this,void 0,void 0,function*(){if(!this._resolveCache){const Ce=_e.onCancellationRequested(()=>{this._resolveCache=void 0,this._isResolved=!1});this._resolveCache=Promise.resolve(this.provider.resolveCompletionItem(this.completion,_e)).then(oe=>{Object.assign(this.completion,oe),this._isResolved=!0,Ce.dispose()},oe=>{Object(B.e)(oe)&&(this._resolveCache=void 0,this._isResolved=!1)})}return this._resolveCache})}}class E{constructor(_e=2,Ce=new Set,oe=new Set,ae=!0){this.snippetSortOrder=_e,this.kindFilter=Ce,this.providerFilter=oe,this.showDeprecated=ae}}E.default=new E;let y;function O(){return y}class k{constructor(_e,Ce,oe,ae){this.items=_e,this.needsClipboard=Ce,this.durations=oe,this.disposable=ae}}function Q(_e,Ce,oe=E.default,ae={triggerKind:0},V=g.a.None){return u(this,void 0,void 0,function*(){const G=new A.a(!0);Ce=Ce.clone();const ee=_e.getWordAtPosition(Ce),pe=ee?new C.a(Ce.lineNumber,ee.startColumn,Ce.lineNumber,ee.endColumn):C.a.fromPositions(Ce),Te={replace:pe,insert:pe.setEndPosition(Ce.lineNumber,Ce.column)},Ie=[],Me=new R.b,Oe=[];let Xe=!1;const fe=(Be,Se,me)=>{var he,Le,we;if(!Se)return;for(let ve of Se.suggestions)if(!oe.kindFilter.has(ve.kind)){if(!oe.showDeprecated&&((he=ve==null?void 0:ve.tags)===null||he===void 0?void 0:he.includes(1)))continue;ve.range||(ve.range=Te),ve.sortText||(ve.sortText=typeof ve.label=="string"?ve.label:ve.label.label),!Xe&&ve.insertTextRules&&ve.insertTextRules&4&&(Xe=D.c.guessNeedsClipboard(ve.insertText)),Ie.push(new S(Ce,ve,Se,Be))}Object(R.g)(Se)&&Me.add(Se),Oe.push({providerName:(Le=Be._debugDisplayName)!==null&&Le!==void 0?Le:"unkown_provider",elapsedProvider:(we=Se.duration)!==null&&we!==void 0?we:-1,elapsedOverall:me.elapsed()})},Pe=(()=>u(this,void 0,void 0,function*(){if(!y||oe.kindFilter.has(27))return;if(oe.providerFilter.size>0&&!oe.providerFilter.has(y))return;const Be=new A.a(!0),Se=yield y.provideCompletionItems(_e,Ce,ae,V);fe(y,Se,Be)}))();for(let Be of m.d.orderedGroups(_e)){let Se=Ie.length;if(yield Promise.all(Be.map(me=>u(this,void 0,void 0,function*(){if(oe.providerFilter.size>0&&!oe.providerFilter.has(me))return;try{const he=new A.a(!0),Le=yield me.provideCompletionItems(_e,Ce,ae,V);fe(me,Le,he)}catch(he){Object(B.g)(he)}}))),Se!==Ie.length||V.isCancellationRequested)break}return yield Pe,V.isCancellationRequested?(Me.dispose(),Promise.reject(Object(B.b)())):new k(Ie.sort(Z(oe.snippetSortOrder)),Xe,{entries:Oe,elapsed:G.elapsed()},Me)})}function q(_e,Ce){if(_e.sortTextLow&&Ce.sortTextLow){if(_e.sortTextLow<Ce.sortTextLow)return-1;if(_e.sortTextLow>Ce.sortTextLow)return 1}return _e.completion.label<Ce.completion.label?-1:_e.completion.label>Ce.completion.label?1:_e.completion.kind-Ce.completion.kind}function z(_e,Ce){if(_e.completion.kind!==Ce.completion.kind){if(_e.completion.kind===27)return-1;if(Ce.completion.kind===27)return 1}return q(_e,Ce)}function J(_e,Ce){if(_e.completion.kind!==Ce.completion.kind){if(_e.completion.kind===27)return 1;if(Ce.completion.kind===27)return-1}return q(_e,Ce)}const re=new Map;re.set(0,z),re.set(2,J),re.set(1,q);function Z(_e){return re.get(_e)}w.a.registerCommand("_executeCompletionItemProvider",(_e,...Ce)=>u(void 0,void 0,void 0,function*(){const[oe,ae,V,G]=Ce;Object(j.c)(I.a.isUri(oe)),Object(j.c)(v.a.isIPosition(ae)),Object(j.c)(typeof V=="string"||!V),Object(j.c)(typeof G=="number"||!G);const ee=yield _e.get(d.a).createModelReference(oe);try{const pe={incomplete:!1,suggestions:[]},Te=[],Ie=yield Q(ee.object.textEditorModel,v.a.lift(ae),void 0,{triggerCharacter:V,triggerKind:V?1:0});for(const Me of Ie.items)Te.length<(G!=null?G:0)&&Te.push(Me.resolve(g.a.None)),pe.incomplete=pe.incomplete||Me.container.incomplete,pe.suggestions.push(Me.completion);try{return yield Promise.all(Te),pe}finally{setTimeout(()=>Ie.disposable.dispose(),100)}}finally{ee.dispose()}}));const ne=new class{constructor(){this.onlyOnceSuggestions=[]}provideCompletionItems(){let _e=this.onlyOnceSuggestions.slice(0),Ce={suggestions:_e};return this.onlyOnceSuggestions.length=0,Ce}};m.d.register("*",ne);function le(_e,Ce){setTimeout(()=>{ne.onlyOnceSuggestions.push(...Ce),_e.getContribution("editor.contrib.suggestController").triggerSuggest(new Set().add(ne))},0)}},QY8A:function(mt,M,t){"use strict";t.d(M,"a",function(){return Ht});var g=t("X+cX"),B=t("/cxE"),x=t("/kV6"),R=t("pmY6"),A=t("Vxe3"),j=t("cGHE"),I=t("aokT"),v=t("iNS8"),C=t("3/fG"),m=t("nnTU"),d=t("+7oY"),D=t("T8No"),L=t("Cg/j"),r=t("nrhi"),w=t("k9mg"),b=t("sM1p"),u=t("A+jI"),c=t("9o5J"),p=t("EffR"),S=t("44XX"),E=t("zrhQ"),y=t("MI8n"),O=t("tYmi"),k=t("gslv"),Q=t("KaET"),q=t("03kh"),z=t("tX9W"),J=t("cMvZ"),re=t("WBhO"),Z=t("t49l"),ne=t("O/se"),le=t("7lZ/"),_e=t("xONI"),Ce=t("fpMC"),oe=t("3rx1"),ae=t("bexQ"),V=t("R8sh"),G=t("ptcw"),ee=t("t9D7"),pe=function(ot,ce,Ve,it){var Et=arguments.length,It=Et<3?ce:it===null?it=Object.getOwnPropertyDescriptor(ce,Ve):it,Rt;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")It=Reflect.decorate(ot,ce,Ve,it);else for(var vo=ot.length-1;vo>=0;vo--)(Rt=ot[vo])&&(It=(Et<3?Rt(It):Et>3?Rt(ce,Ve,It):Rt(ce,Ve))||It);return Et>3&&It&&Object.defineProperty(ce,Ve,It),It},Te=function(ot,ce){return function(Ve,it){ce(Ve,it,ot)}};let Ie=class{constructor(ce){this._resolverService=ce}hasChildren(ce){return ce instanceof c.c?!0:ce instanceof c.a}getChildren(ce){if(ce instanceof c.c)return ce.groups;if(ce instanceof c.a)return ce.resolve(this._resolverService).then(Ve=>Ve.children);throw new Error("bad tree")}};Ie=pe([Te(0,Z.a)],Ie);class Me{getHeight(){return 23}getTemplateId(ot){return ot instanceof c.a?Pe.id:Se.id}}let Oe=class{constructor(ce){this._keybindingService=ce}getKeyboardNavigationLabel(ce){var Ve;if(ce instanceof c.b){const it=(Ve=ce.parent.getPreview(ce))===null||Ve===void 0?void 0:Ve.preview(ce.range);if(it)return it.value}return Object(k.b)(ce.uri)}};Oe=pe([Te(0,ae.a)],Oe);class Xe{getId(ot){return ot instanceof c.b?ot.id:ot.uri}}let fe=class extends R.a{constructor(ce,Ve,it){super();this._uriLabel=Ve;const Et=document.createElement("div");Et.classList.add("reference-file"),this.file=this._register(new _e.a(Et,{supportHighlights:!0})),this.badge=new ne.a(p.q(Et,p.a(".count"))),this._register(Object(G.a)(this.badge,it)),ce.appendChild(Et)}set(ce,Ve){let it=Object(k.d)(ce.uri);this.file.setLabel(Object(oe.a)(ce.uri),this._uriLabel.getUriLabel(it,{relative:!0}),{title:this._uriLabel.getUriLabel(ce.uri),matches:Ve});const Et=ce.children.length;this.badge.setCount(Et),Et>1?this.badge.setTitleFormat(Object(C.a)("referencesCount","{0} references",Et)):this.badge.setTitleFormat(Object(C.a)("referenceCount","{0} reference",Et))}};fe=pe([Te(1,V.a),Te(2,ee.b)],fe);let Pe=class ot{constructor(ce){this._instantiationService=ce,this.templateId=ot.id}renderTemplate(ce){return this._instantiationService.createInstance(fe,ce)}renderElement(ce,Ve,it){it.set(ce.element,Object(Ce.c)(ce.filterData))}disposeTemplate(ce){ce.dispose()}};Pe.id="FileReferencesRenderer",Pe=pe([Te(0,L.a)],Pe);class Be{constructor(ot){this.label=new le.a(ot,!1)}set(ot,ce){var Ve;const it=(Ve=ot.parent.getPreview(ot))===null||Ve===void 0?void 0:Ve.preview(ot.range);if(!it||!it.value)this.label.set(`${Object(k.b)(ot.uri)}:${ot.range.startLineNumber+1}:${ot.range.startColumn+1}`);else{const{value:Et,highlight:It}=it;ce&&!Ce.a.isDefault(ce)?(this.label.element.classList.toggle("referenceMatch",!1),this.label.set(Et,Object(Ce.c)(ce))):(this.label.element.classList.toggle("referenceMatch",!0),this.label.set(Et,[It]))}}}class Se{constructor(){this.templateId=Se.id}renderTemplate(ot){return new Be(ot)}renderElement(ot,ce,Ve){Ve.set(ot.element,ot.filterData)}disposeTemplate(){}}Se.id="OneReferenceRenderer";class me{getWidgetAriaLabel(){return Object(C.a)("treeAriaLabel","References")}getAriaLabel(ot){return ot.ariaMessage}}var he=t("MD5Z"),Le=t("OAO6"),we=function(ot,ce,Ve,it){var Et=arguments.length,It=Et<3?ce:it===null?it=Object.getOwnPropertyDescriptor(ce,Ve):it,Rt;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")It=Reflect.decorate(ot,ce,Ve,it);else for(var vo=ot.length-1;vo>=0;vo--)(Rt=ot[vo])&&(It=(Et<3?Rt(It):Et>3?Rt(ce,Ve,It):Rt(ce,Ve))||It);return Et>3&&It&&Object.defineProperty(ce,Ve,It),It},ve=function(ot,ce){return function(Ve,it){ce(Ve,it,ot)}},ie=function(ot,ce,Ve,it){function Et(It){return It instanceof Ve?It:new Ve(function(Rt){Rt(It)})}return new(Ve||(Ve=Promise))(function(It,Rt){function vo(Do){try{xo(it.next(Do))}catch(Lo){Rt(Lo)}}function Mo(Do){try{xo(it.throw(Do))}catch(Lo){Rt(Lo)}}function xo(Do){Do.done?It(Do.value):Et(Do.value).then(vo,Mo)}xo((it=it.apply(ot,ce||[])).next())})};class W{constructor(ot,ce){this._editor=ot,this._model=ce,this._decorations=new Map,this._decorationIgnoreSet=new Set,this._callOnDispose=new R.b,this._callOnModelChange=new R.b,this._callOnDispose.add(this._editor.onDidChangeModel(()=>this._onModelChanged())),this._onModelChanged()}dispose(){this._callOnModelChange.dispose(),this._callOnDispose.dispose(),this.removeDecorations()}_onModelChanged(){this._callOnModelChange.clear();const ot=this._editor.getModel();if(!ot)return;for(let ce of this._model.references)if(ce.uri.toString()===ot.uri.toString()){this._addDecorations(ce.parent);return}}_addDecorations(ot){if(!this._editor.hasModel())return;this._callOnModelChange.add(this._editor.getModel().onDidChangeDecorations(()=>this._onDecorationChanged()));const ce=[],Ve=[];for(let Et=0,It=ot.children.length;Et<It;Et++){let Rt=ot.children[Et];if(this._decorationIgnoreSet.has(Rt.id))continue;if(Rt.uri.toString()!==this._editor.getModel().uri.toString())continue;ce.push({range:Rt.range,options:W.DecorationOptions}),Ve.push(Et)}const it=this._editor.deltaDecorations([],ce);for(let Et=0;Et<it.length;Et++)this._decorations.set(it[Et],ot.children[Ve[Et]])}_onDecorationChanged(){const ot=[],ce=this._editor.getModel();if(!ce)return;for(let[Ve,it]of this._decorations){const Et=ce.getDecorationRange(Ve);if(!Et)continue;let It=!1;if(I.a.equalsRange(Et,it.range))continue;if(I.a.spansMultipleLines(Et))It=!0;else{const Rt=it.range.endColumn-it.range.startColumn,vo=Et.endColumn-Et.startColumn;Rt!==vo&&(It=!0)}It?(this._decorationIgnoreSet.add(it.id),ot.push(Ve)):it.range=Et}for(let Ve=0,it=ot.length;Ve<it;Ve++)this._decorations.delete(ot[Ve]);this._editor.deltaDecorations(ot,[])}removeDecorations(){this._editor.deltaDecorations([...this._decorations.keys()],[]),this._decorations.clear()}}W.DecorationOptions=z.b.register({description:"reference-decoration",stickiness:1,className:"reference-decoration"});class U{constructor(){this.ratio=.7,this.heightInLines=18}static fromJSON(ot){let ce,Ve;try{const it=JSON.parse(ot);ce=it.ratio,Ve=it.heightInLines}catch(it){}return{ratio:ce||.7,heightInLines:Ve||18}}}class se extends w.c{}let je=class extends v.c{constructor(ce,Ve,it,Et,It,Rt,vo,Mo,xo,Do,Lo,To){super(ce,{showFrame:!1,showArrow:!0,isResizeable:!0,isAccessible:!0,supportOnTitleClick:!0},Rt);this._defaultTreeKeyboardSupport=Ve,this.layoutData=it,this._textModelResolverService=It,this._instantiationService=Rt,this._peekViewService=vo,this._uriLabel=Mo,this._undoRedoService=xo,this._keybindingService=Do,this._modeService=Lo,this._languageConfigurationService=To,this._disposeOnNewModel=new R.b,this._callOnDispose=new R.b,this._onDidSelectReference=new y.b,this.onDidSelectReference=this._onDidSelectReference.event,this._dim=new p.b(0,0),this._applyTheme(Et.getColorTheme()),this._callOnDispose.add(Et.onDidColorThemeChange(this._applyTheme.bind(this))),this._peekViewService.addExclusiveWidget(ce,this),this.create()}dispose(){this.setModel(void 0),this._callOnDispose.dispose(),this._disposeOnNewModel.dispose(),Object(R.f)(this._preview),Object(R.f)(this._previewNotAvailableMessage),Object(R.f)(this._tree),Object(R.f)(this._previewModelReference),this._splitView.dispose(),super.dispose()}_applyTheme(ce){const Ve=ce.getColor(v.e)||E.a.transparent;this.style({arrowColor:Ve,frameColor:Ve,headerBackgroundColor:ce.getColor(v.p)||E.a.transparent,primaryHeadingColor:ce.getColor(v.q),secondaryHeadingColor:ce.getColor(v.r)})}show(ce){this.editor.revealRangeInCenterIfOutsideViewport(ce,0),super.show(ce,this.layoutData.heightInLines||18)}focusOnReferenceTree(){this._tree.domFocus()}focusOnPreviewEditor(){this._preview.focus()}isPreviewEditorFocused(){return this._preview.hasTextFocus()}_onTitleClick(ce){this._preview&&this._preview.getModel()&&this._onDidSelectReference.fire({element:this._getFocusedReference(),kind:ce.ctrlKey||ce.metaKey||ce.altKey?"side":"open",source:"title"})}_fillBody(ce){this.setCssClass("reference-zone-widget"),this._messageContainer=p.q(ce,p.a("div.messages")),p.K(this._messageContainer),this._splitView=new S.b(ce,{orientation:1}),this._previewContainer=p.q(ce,p.a("div.preview.inline"));let Ve={scrollBeyondLastLine:!1,scrollbar:{verticalScrollbarSize:14,horizontal:"auto",useShadows:!0,verticalHasArrows:!1,horizontalHasArrows:!1,alwaysConsumeMouseWheel:!1},overviewRulerLanes:2,fixedOverflowWidgets:!0,minimap:{enabled:!1}};this._preview=this._instantiationService.createInstance(q.a,this._previewContainer,Ve,this.editor),p.K(this._previewContainer),this._previewNotAvailableMessage=new z.c(C.a("missingPreviewMessage","no preview available"),z.c.DEFAULT_CREATION_OPTIONS,null,null,this._undoRedoService,this._modeService,this._languageConfigurationService),this._treeContainer=p.q(ce,p.a("div.ref-tree.inline"));const it={keyboardSupport:this._defaultTreeKeyboardSupport,accessibilityProvider:new me,keyboardNavigationLabelProvider:this._instantiationService.createInstance(Oe),identityProvider:new Xe,openOnSingleClick:!0,selectionNavigation:!0,overrideStyles:{listBackground:v.j}};this._defaultTreeKeyboardSupport&&this._callOnDispose.add(p.o(this._treeContainer,"keydown",It=>{It.equals(9)&&(this._keybindingService.dispatchEvent(It,It.target),It.stopPropagation())},!0)),this._tree=this._instantiationService.createInstance(se,"ReferencesWidget",this._treeContainer,new Me,[this._instantiationService.createInstance(Pe),this._instantiationService.createInstance(Se)],this._instantiationService.createInstance(Ie),it),this._splitView.addView({onDidChange:y.c.None,element:this._previewContainer,minimumSize:200,maximumSize:Number.MAX_VALUE,layout:It=>{this._preview.layout({height:this._dim.height,width:It})}},S.a.Distribute),this._splitView.addView({onDidChange:y.c.None,element:this._treeContainer,minimumSize:100,maximumSize:Number.MAX_VALUE,layout:It=>{this._treeContainer.style.height=`${this._dim.height}px`,this._treeContainer.style.width=`${It}px`,this._tree.layout(this._dim.height,It)}},S.a.Distribute),this._disposables.add(this._splitView.onDidSashChange(()=>{this._dim.width&&(this.layoutData.ratio=this._splitView.getViewSize(0)/this._dim.width)},void 0));let Et=(It,Rt)=>{It instanceof c.b&&(Rt==="show"&&this._revealReference(It,!1),this._onDidSelectReference.fire({element:It,kind:Rt,source:"tree"}))};this._tree.onDidOpen(It=>{It.sideBySide?Et(It.element,"side"):It.editorOptions.pinned?Et(It.element,"goto"):Et(It.element,"show")}),p.K(this._treeContainer)}_onWidth(ce){this._dim&&this._doLayoutBody(this._dim.height,ce)}_doLayoutBody(ce,Ve){super._doLayoutBody(ce,Ve),this._dim=new p.b(Ve,ce),this.layoutData.heightInLines=this._viewZone?this._viewZone.heightInLines:this.layoutData.heightInLines,this._splitView.layout(Ve),this._splitView.resizeView(0,Ve*this.layoutData.ratio)}setSelection(ce){return this._revealReference(ce,!0).then(()=>{if(!this._model)return;this._tree.setSelection([ce]),this._tree.setFocus([ce])})}setModel(ce){return this._disposeOnNewModel.clear(),this._model=ce,this._model?this._onNewModel():Promise.resolve()}_onNewModel(){return this._model?this._model.isEmpty?(this.setTitle(""),this._messageContainer.innerText=C.a("noResults","No results"),p.W(this._messageContainer),Promise.resolve(void 0)):(p.K(this._messageContainer),this._decorationsManager=new W(this._preview,this._model),this._disposeOnNewModel.add(this._decorationsManager),this._disposeOnNewModel.add(this._model.onDidChangeReferenceRange(ce=>this._tree.rerender(ce))),this._disposeOnNewModel.add(this._preview.onMouseDown(ce=>{const{event:Ve,target:it}=ce;if(Ve.detail!==2)return;const Et=this._getFocusedReference();if(!Et)return;this._onDidSelectReference.fire({element:{uri:Et.uri,range:it.range},kind:Ve.ctrlKey||Ve.metaKey||Ve.altKey?"side":"open",source:"editor"})})),this.container.classList.add("results-loaded"),p.W(this._treeContainer),p.W(this._previewContainer),this._splitView.layout(this._dim.width),this.focusOnReferenceTree(),this._tree.setInput(this._model.groups.length===1?this._model.groups[0]:this._model)):Promise.resolve(void 0)}_getFocusedReference(){const[ce]=this._tree.getFocus();return ce instanceof c.b?ce:ce instanceof c.a&&ce.children.length>0?ce.children[0]:void 0}revealReference(ce){return ie(this,void 0,void 0,function*(){yield this._revealReference(ce,!1),this._onDidSelectReference.fire({element:ce,kind:"goto",source:"tree"})})}_revealReference(ce,Ve){return ie(this,void 0,void 0,function*(){if(this._revealedReference===ce)return;this._revealedReference=ce,ce.uri.scheme!==O.c.inMemory?this.setTitle(Object(k.c)(ce.uri),this._uriLabel.getUriLabel(Object(k.d)(ce.uri))):this.setTitle(C.a("peekView.alternateTitle","References"));const it=this._textModelResolverService.createModelReference(ce.uri);this._tree.getInput()===ce.parent?this._tree.reveal(ce):(Ve&&this._tree.reveal(ce.parent),yield this._tree.expand(ce.parent),this._tree.reveal(ce));const Et=yield it;if(!this._model){Et.dispose();return}Object(R.f)(this._previewModelReference);const It=Et.object;if(It){const Rt=this._preview.getModel()===It.textEditorModel?0:1,vo=I.a.lift(ce.range).collapseToStart();this._previewModelReference=Et,this._preview.setModel(It.textEditorModel),this._preview.setSelection(vo),this._preview.revealRangeInCenter(vo,Rt)}else this._preview.setModel(this._previewNotAvailableMessage),Et.dispose()})}};je=we([ve(3,ee.b),ve(4,Z.a),ve(5,L.a),ve(6,v.a),ve(7,V.a),ve(8,Le.a),ve(9,ae.a),ve(10,re.a),ve(11,J.a)],je),Object(ee.f)((ot,ce)=>{const Ve=ot.getColor(v.m);Ve&&ce.addRule(`.monaco-editor .reference-zone-widget .ref-tree .referenceMatch .highlight { background-color: ${Ve}; }`);const it=ot.getColor(v.h);it&&ce.addRule(`.monaco-editor .reference-zone-widget .preview .reference-decoration { background-color: ${it}; }`);const Et=ot.getColor(v.i);Et&&ce.addRule(`.monaco-editor .reference-zone-widget .preview .reference-decoration { border: 2px solid ${Et}; box-sizing: border-box; }`);const It=ot.getColor(he.b);It&&ce.addRule(`.monaco-editor .reference-zone-widget .ref-tree .referenceMatch .highlight { border: 1px dotted ${It}; box-sizing: border-box; }`);const Rt=ot.getColor(v.j);Rt&&ce.addRule(`.monaco-editor .reference-zone-widget .ref-tree { background-color: ${Rt}; }`);const vo=ot.getColor(v.l);vo&&ce.addRule(`.monaco-editor .reference-zone-widget .ref-tree { color: ${vo}; }`);const Mo=ot.getColor(v.k);Mo&&ce.addRule(`.monaco-editor .reference-zone-widget .ref-tree .reference-file { color: ${Mo}; }`);const xo=ot.getColor(v.n);xo&&ce.addRule(`.monaco-editor .reference-zone-widget .ref-tree .monaco-list:focus .monaco-list-rows > .monaco-list-row.selected:not(.highlighted) { background-color: ${xo}; }`);const Do=ot.getColor(v.o);Do&&ce.addRule(`.monaco-editor .reference-zone-widget .ref-tree .monaco-list:focus .monaco-list-rows > .monaco-list-row.selected:not(.highlighted) { color: ${Do} !important; }`);const Lo=ot.getColor(v.f);Lo&&ce.addRule(`.monaco-editor .reference-zone-widget .preview .monaco-editor .monaco-editor-background,.monaco-editor .reference-zone-widget .preview .monaco-editor .inputarea.ime-input { background-color: ${Lo};}`);const To=ot.getColor(v.g);To&&ce.addRule(`.monaco-editor .reference-zone-widget .preview .monaco-editor .margin { background-color: ${To};}`)});var Re=function(ot,ce,Ve,it){var Et=arguments.length,It=Et<3?ce:it===null?it=Object.getOwnPropertyDescriptor(ce,Ve):it,Rt;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")It=Reflect.decorate(ot,ce,Ve,it);else for(var vo=ot.length-1;vo>=0;vo--)(Rt=ot[vo])&&(It=(Et<3?Rt(It):Et>3?Rt(ce,Ve,It):Rt(ce,Ve))||It);return Et>3&&It&&Object.defineProperty(ce,Ve,It),It},We=function(ot,ce){return function(Ve,it){ce(Ve,it,ot)}},dt=function(ot,ce,Ve,it){function Et(It){return It instanceof Ve?It:new Ve(function(Rt){Rt(It)})}return new(Ve||(Ve=Promise))(function(It,Rt){function vo(Do){try{xo(it.next(Do))}catch(Lo){Rt(Lo)}}function Mo(Do){try{xo(it.throw(Do))}catch(Lo){Rt(Lo)}}function xo(Do){Do.done?It(Do.value):Et(Do.value).then(vo,Mo)}xo((it=it.apply(ot,ce||[])).next())})};const Lt=new D.c("referenceSearchVisible",!1,C.a("referenceSearchVisible","Whether reference peek is visible, like 'Peek References' or 'Peek Definition'"));let Ht=class ot{constructor(ce,Ve,it,Et,It,Rt,vo,Mo){this._defaultTreeKeyboardSupport=ce,this._editor=Ve,this._editorService=Et,this._notificationService=It,this._instantiationService=Rt,this._storageService=vo,this._configurationService=Mo,this._disposables=new R.b,this._requestIdPool=0,this._ignoreModelChangeEvent=!1,this._referenceSearchVisible=Lt.bindTo(it)}static get(ce){return ce.getContribution(ot.ID)}dispose(){var ce,Ve;this._referenceSearchVisible.reset(),this._disposables.dispose(),(ce=this._widget)===null||ce===void 0||ce.dispose(),(Ve=this._model)===null||Ve===void 0||Ve.dispose(),this._widget=void 0,this._model=void 0}toggleWidget(ce,Ve,it){let Et;if(this._widget&&(Et=this._widget.position),this.closeWidget(),!!Et&&ce.containsPosition(Et))return;this._peekMode=it,this._referenceSearchVisible.set(!0),this._disposables.add(this._editor.onDidChangeModelLanguage(()=>{this.closeWidget()})),this._disposables.add(this._editor.onDidChangeModel(()=>{this._ignoreModelChangeEvent||this.closeWidget()}));const It="peekViewLayout",Rt=U.fromJSON(this._storageService.get(It,0,"{}"));this._widget=this._instantiationService.createInstance(je,this._editor,this._defaultTreeKeyboardSupport,Rt),this._widget.setTitle(C.a("labelLoading","Loading...")),this._widget.show(ce),this._disposables.add(this._widget.onDidClose(()=>{Ve.cancel(),this._widget&&(this._storageService.store(It,JSON.stringify(this._widget.layoutData),0,1),this._widget=void 0),this.closeWidget()})),this._disposables.add(this._widget.onDidSelectReference(Mo=>{let{element:xo,kind:Do}=Mo;if(!xo)return;switch(Do){case"open":(Mo.source!=="editor"||!this._configurationService.getValue("editor.stablePeek"))&&this.openReference(xo,!1,!1);break;case"side":this.openReference(xo,!0,!1);break;case"goto":it?this._gotoReference(xo):this.openReference(xo,!1,!0);break}}));const vo=++this._requestIdPool;Ve.then(Mo=>{var xo;if(vo!==this._requestIdPool||!this._widget){Mo.dispose();return}return(xo=this._model)===null||xo===void 0||xo.dispose(),this._model=Mo,this._widget.setModel(this._model).then(()=>{if(this._widget&&this._model&&this._editor.hasModel()){this._model.isEmpty?this._widget.setMetaTitle(""):this._widget.setMetaTitle(C.a("metaTitle.N","{0} ({1})",this._model.title,this._model.references.length));let Do=this._editor.getModel().uri,Lo=new j.a(ce.startLineNumber,ce.startColumn),To=this._model.nearestReference(Do,Lo);if(To)return this._widget.setSelection(To).then(()=>{this._widget&&this._editor.getOption(76)==="editor"&&this._widget.focusOnPreviewEditor()})}return})},Mo=>{this._notificationService.error(Mo)})}changeFocusBetweenPreviewAndReferences(){if(!this._widget)return;this._widget.isPreviewEditorFocused()?this._widget.focusOnReferenceTree():this._widget.focusOnPreviewEditor()}goToNextOrPreviousReference(ce){return dt(this,void 0,void 0,function*(){if(!this._editor.hasModel()||!this._model||!this._widget)return;const Ve=this._widget.position;if(!Ve)return;const it=this._model.nearestReference(this._editor.getModel().uri,Ve);if(!it)return;const Et=this._model.nextOrPreviousReference(it,ce),It=this._editor.hasTextFocus(),Rt=this._widget.isPreviewEditorFocused();yield this._widget.setSelection(Et),yield this._gotoReference(Et),It?this._editor.focus():this._widget&&Rt&&this._widget.focusOnPreviewEditor()})}revealReference(ce){return dt(this,void 0,void 0,function*(){if(!this._editor.hasModel()||!this._model||!this._widget)return;yield this._widget.revealReference(ce)})}closeWidget(ce=!0){var Ve,it;(Ve=this._widget)===null||Ve===void 0||Ve.dispose(),(it=this._model)===null||it===void 0||it.dispose(),this._referenceSearchVisible.reset(),this._disposables.clear(),this._widget=void 0,this._model=void 0,ce&&this._editor.focus(),this._requestIdPool+=1}_gotoReference(ce){this._widget&&this._widget.hide(),this._ignoreModelChangeEvent=!0;const Ve=I.a.lift(ce.range).collapseToStart();return this._editorService.openCodeEditor({resource:ce.uri,options:{selection:Ve}},this._editor).then(it=>{var Et;if(this._ignoreModelChangeEvent=!1,!it||!this._widget){this.closeWidget();return}if(this._editor===it)this._widget.show(Ve),this._widget.focusOnReferenceTree();else{const It=ot.get(it),Rt=this._model.clone();this.closeWidget(),it.focus(),It.toggleWidget(Ve,Object(g.h)(vo=>Promise.resolve(Rt)),(Et=this._peekMode)!==null&&Et!==void 0?Et:!1)}},it=>{this._ignoreModelChangeEvent=!1,Object(B.f)(it)})}openReference(ce,Ve,it){Ve||this.closeWidget();const{uri:Et,range:It}=ce;this._editorService.openCodeEditor({resource:Et,options:{selection:It,pinned:it}},this._editor,Ve)}};Ht.ID="editor.contrib.referencesController",Ht=Re([We(2,D.b),We(3,A.a),We(4,b.a),We(5,L.a),We(6,u.a),We(7,d.a)],Ht);function $e(ot,ce){const Ve=Object(v.d)(ot);if(!Ve)return;let it=Ht.get(Ve);it&&ce(it)}r.a.registerCommandAndKeybindingRule({id:"togglePeekWidgetFocus",weight:100,primary:Object(x.c)(2048|41,60),when:D.a.or(Lt,v.b.inPeekEditor),handler(ot){$e(ot,ce=>{ce.changeFocusBetweenPreviewAndReferences()})}}),r.a.registerCommandAndKeybindingRule({id:"goToNextReference",weight:100-10,primary:62,secondary:[70],when:D.a.or(Lt,v.b.inPeekEditor),handler(ot){$e(ot,ce=>{ce.goToNextOrPreviousReference(!0)})}}),r.a.registerCommandAndKeybindingRule({id:"goToPreviousReference",weight:100-10,primary:1024|62,secondary:[1024|70],when:D.a.or(Lt,v.b.inPeekEditor),handler(ot){$e(ot,ce=>{ce.goToNextOrPreviousReference(!1)})}}),m.a.registerCommandAlias("goToNextReferenceFromEmbeddedEditor","goToNextReference"),m.a.registerCommandAlias("goToPreviousReferenceFromEmbeddedEditor","goToPreviousReference"),m.a.registerCommandAlias("closeReferenceSearchEditor","closeReferenceSearch"),m.a.registerCommand("closeReferenceSearch",ot=>$e(ot,ce=>ce.closeWidget())),r.a.registerKeybindingRule({id:"closeReferenceSearch",weight:100-101,primary:9,secondary:[1024|9],when:D.a.and(v.b.inPeekEditor,D.a.not("config.editor.stablePeek"))}),r.a.registerKeybindingRule({id:"closeReferenceSearch",weight:200+50,primary:9,secondary:[1024|9],when:D.a.and(Lt,D.a.not("config.editor.stablePeek"))}),r.a.registerCommandAndKeybindingRule({id:"revealReference",weight:200,primary:3,mac:{primary:3,secondary:[2048|18]},when:D.a.and(Lt,w.e),handler(ot){var ce;const Ve=ot.get(w.a),it=(ce=Ve.lastFocusedList)===null||ce===void 0?void 0:ce.getFocus();Array.isArray(it)&&it[0]instanceof c.b&&$e(ot,Et=>Et.revealReference(it[0]))}}),r.a.registerCommandAndKeybindingRule({id:"openReferenceToSide",weight:100,primary:2048|3,mac:{primary:256|3},when:D.a.and(Lt,w.e),handler(ot){var ce;const Ve=ot.get(w.a),it=(ce=Ve.lastFocusedList)===null||ce===void 0?void 0:ce.getFocus();Array.isArray(it)&&it[0]instanceof c.b&&$e(ot,Et=>Et.openReference(it[0],!0,!0))}}),m.a.registerCommand("openReference",ot=>{var ce;const Ve=ot.get(w.a),it=(ce=Ve.lastFocusedList)===null||ce===void 0?void 0:ce.getFocus();Array.isArray(it)&&it[0]instanceof c.b&&$e(ot,Et=>Et.openReference(it[0],!1,!0))})},QaAZ:function(mt,M,t){},QiAa:function(mt,M,t){"use strict";t.r(M);var g=t("+hIS");Object(g.a)({id:"redis",extensions:[".redis"],aliases:["redis"],loader:function(){return t.e(359).then(t.bind(null,"j6Xs"))}})},QuOb:function(mt,M,t){"use strict";t.d(M,"a",function(){return R});var g=t("MI8n"),B=t("pmY6");class x{constructor(d,D,L,r,w,b){this._scrollStateBrand=void 0,d=d|0,D=D|0,L=L|0,r=r|0,w=w|0,b=b|0,this.rawScrollLeft=L,this.rawScrollTop=b,d<0&&(d=0),L+d>D&&(L=D-d),L<0&&(L=0),r<0&&(r=0),b+r>w&&(b=w-r),b<0&&(b=0),this.width=d,this.scrollWidth=D,this.scrollLeft=L,this.height=r,this.scrollHeight=w,this.scrollTop=b}equals(d){return this.rawScrollLeft===d.rawScrollLeft&&this.rawScrollTop===d.rawScrollTop&&this.width===d.width&&this.scrollWidth===d.scrollWidth&&this.scrollLeft===d.scrollLeft&&this.height===d.height&&this.scrollHeight===d.scrollHeight&&this.scrollTop===d.scrollTop}withScrollDimensions(d,D){return new x(typeof d.width!="undefined"?d.width:this.width,typeof d.scrollWidth!="undefined"?d.scrollWidth:this.scrollWidth,D?this.rawScrollLeft:this.scrollLeft,typeof d.height!="undefined"?d.height:this.height,typeof d.scrollHeight!="undefined"?d.scrollHeight:this.scrollHeight,D?this.rawScrollTop:this.scrollTop)}withScrollPosition(d){return new x(this.width,this.scrollWidth,typeof d.scrollLeft!="undefined"?d.scrollLeft:this.rawScrollLeft,this.height,this.scrollHeight,typeof d.scrollTop!="undefined"?d.scrollTop:this.rawScrollTop)}createScrollEvent(d,D){const L=this.width!==d.width,r=this.scrollWidth!==d.scrollWidth,w=this.scrollLeft!==d.scrollLeft,b=this.height!==d.height,u=this.scrollHeight!==d.scrollHeight,c=this.scrollTop!==d.scrollTop;return{inSmoothScrolling:D,oldWidth:d.width,oldScrollWidth:d.scrollWidth,oldScrollLeft:d.scrollLeft,width:this.width,scrollWidth:this.scrollWidth,scrollLeft:this.scrollLeft,oldHeight:d.height,oldScrollHeight:d.scrollHeight,oldScrollTop:d.scrollTop,height:this.height,scrollHeight:this.scrollHeight,scrollTop:this.scrollTop,widthChanged:L,scrollWidthChanged:r,scrollLeftChanged:w,heightChanged:b,scrollHeightChanged:u,scrollTopChanged:c}}}class R extends B.a{constructor(d,D){super();this._scrollableBrand=void 0,this._onScroll=this._register(new g.b),this.onScroll=this._onScroll.event,this._smoothScrollDuration=d,this._scheduleAtNextAnimationFrame=D,this._state=new x(0,0,0,0,0,0),this._smoothScrolling=null}dispose(){this._smoothScrolling&&(this._smoothScrolling.dispose(),this._smoothScrolling=null),super.dispose()}setSmoothScrollDuration(d){this._smoothScrollDuration=d}validateScrollPosition(d){return this._state.withScrollPosition(d)}getScrollDimensions(){return this._state}setScrollDimensions(d,D){const L=this._state.withScrollDimensions(d,D);this._setState(L,Boolean(this._smoothScrolling)),this._smoothScrolling&&this._smoothScrolling.acceptScrollDimensions(this._state)}getFutureScrollPosition(){return this._smoothScrolling?this._smoothScrolling.to:this._state}getCurrentScrollPosition(){return this._state}setScrollPositionNow(d){const D=this._state.withScrollPosition(d);this._smoothScrolling&&(this._smoothScrolling.dispose(),this._smoothScrolling=null),this._setState(D,!1)}setScrollPositionSmooth(d,D){if(this._smoothScrollDuration===0)return this.setScrollPositionNow(d);if(this._smoothScrolling){d={scrollLeft:typeof d.scrollLeft=="undefined"?this._smoothScrolling.to.scrollLeft:d.scrollLeft,scrollTop:typeof d.scrollTop=="undefined"?this._smoothScrolling.to.scrollTop:d.scrollTop};const L=this._state.withScrollPosition(d);if(this._smoothScrolling.to.scrollLeft===L.scrollLeft&&this._smoothScrolling.to.scrollTop===L.scrollTop)return;let r;D?r=new v(this._smoothScrolling.from,L,this._smoothScrolling.startTime,this._smoothScrolling.duration):r=this._smoothScrolling.combine(this._state,L,this._smoothScrollDuration),this._smoothScrolling.dispose(),this._smoothScrolling=r}else{const L=this._state.withScrollPosition(d);this._smoothScrolling=v.start(this._state,L,this._smoothScrollDuration)}this._smoothScrolling.animationFrameDisposable=this._scheduleAtNextAnimationFrame(()=>{if(!this._smoothScrolling)return;this._smoothScrolling.animationFrameDisposable=null,this._performSmoothScrolling()})}_performSmoothScrolling(){if(!this._smoothScrolling)return;const d=this._smoothScrolling.tick(),D=this._state.withScrollPosition(d);if(this._setState(D,!0),!this._smoothScrolling)return;if(d.isDone){this._smoothScrolling.dispose(),this._smoothScrolling=null;return}this._smoothScrolling.animationFrameDisposable=this._scheduleAtNextAnimationFrame(()=>{if(!this._smoothScrolling)return;this._smoothScrolling.animationFrameDisposable=null,this._performSmoothScrolling()})}_setState(d,D){const L=this._state;if(L.equals(d))return;this._state=d,this._onScroll.fire(this._state.createScrollEvent(L,D))}}class A{constructor(d,D,L){this.scrollLeft=d,this.scrollTop=D,this.isDone=L}}function j(d,D){const L=D-d;return function(r){return d+L*m(r)}}function I(d,D,L){return function(r){return r<L?d(r/L):D((r-L)/(1-L))}}class v{constructor(d,D,L,r){this.from=d,this.to=D,this.duration=r,this.startTime=L,this.animationFrameDisposable=null,this._initAnimations()}_initAnimations(){this.scrollLeft=this._initAnimation(this.from.scrollLeft,this.to.scrollLeft,this.to.width),this.scrollTop=this._initAnimation(this.from.scrollTop,this.to.scrollTop,this.to.height)}_initAnimation(d,D,L){const r=Math.abs(d-D);if(r>2.5*L){let w,b;return d<D?(w=d+.75*L,b=D-.75*L):(w=d-.75*L,b=D+.75*L),I(j(d,w),j(b,D),.33)}return j(d,D)}dispose(){this.animationFrameDisposable!==null&&(this.animationFrameDisposable.dispose(),this.animationFrameDisposable=null)}acceptScrollDimensions(d){this.to=d.withScrollPosition(this.to),this._initAnimations()}tick(){return this._tick(Date.now())}_tick(d){const D=(d-this.startTime)/this.duration;if(D<1){const L=this.scrollLeft(D),r=this.scrollTop(D);return new A(L,r,!1)}return new A(this.to.scrollLeft,this.to.scrollTop,!0)}combine(d,D,L){return v.start(d,D,L)}static start(d,D,L){L=L+10;const r=Date.now()-10;return new v(d,D,r,L)}}function C(d){return Math.pow(d,3)}function m(d){return 1-C(1-d)}},R3nR:function(mt,M,t){"use strict";t.d(M,"b",function(){return x}),t.d(M,"a",function(){return R});var g=t("T8No"),B=t("Cg/j");const x=Object(B.c)("accessibilityService"),R=new g.c("accessibilityModeEnabled",!1)},R8sh:function(mt,M,t){"use strict";t.d(M,"a",function(){return B});var g=t("Cg/j");const B=Object(g.c)("labelService")},RMfO:function(mt,M,t){},S3by:function(mt,M,t){"use strict";var g=t("N0LK"),B;(function(x){x[x.Ignore=0]="Ignore",x[x.Info=1]="Info",x[x.Warning=2]="Warning",x[x.Error=3]="Error"})(B||(B={})),function(x){const R="error",A="warning",j="warn",I="info",v="ignore";function C(d){return d?g.r(R,d)?x.Error:g.r(A,d)||g.r(j,d)?x.Warning:g.r(I,d)?x.Info:x.Ignore:x.Ignore}x.fromValue=C;function m(d){switch(d){case x.Error:return R;case x.Warning:return A;case x.Info:return I;default:return v}}x.toString=m}(B||(B={})),M.a=B},SBYE:function(mt,M,t){"use strict";t.r(M);var g=t("QaAZ"),B=t.n(g),x=t("EffR"),R=t("ZlPH"),A=t("Md8J"),j=t("OBOq"),I=t("G300"),v=t("pmY6"),C=t("MNsG"),m=t("N0LK"),d=t("bY76"),D=t("sswD"),L=t("wQH0"),r=t("k7pc"),w=t("T8No"),b=t("Cg/j"),u=t("bexQ"),c=t("W9cx"),p=t("MD5Z"),S=t("t9D7"),E=t("A9l+"),y=function(Z,ne,le,_e){var Ce=arguments.length,oe=Ce<3?ne:_e===null?_e=Object.getOwnPropertyDescriptor(ne,le):_e,ae;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")oe=Reflect.decorate(Z,ne,le,_e);else for(var V=Z.length-1;V>=0;V--)(ae=Z[V])&&(oe=(Ce<3?ae(oe):Ce>3?ae(ne,le,oe):ae(ne,le))||oe);return Ce>3&&oe&&Object.defineProperty(ne,le,oe),oe},O=function(Z,ne){return function(le,_e){ne(le,_e,Z)}};const k=new w.c("accessibilityHelpWidgetVisible",!1);let Q=class Z extends v.a{constructor(ne,le){super();this._editor=ne,this._widget=this._register(le.createInstance(z,this._editor))}static get(ne){return ne.getContribution(Z.ID)}show(){this._widget.show()}hide(){this._widget.hide()}};Q.ID="editor.contrib.accessibilityHelpController",Q=y([O(1,b.a)],Q);function q(Z,ne){return!Z||Z.length===0?E.a.noSelection:Z.length===1?ne?m.v(E.a.singleSelectionRange,Z[0].positionLineNumber,Z[0].positionColumn,ne):m.v(E.a.singleSelection,Z[0].positionLineNumber,Z[0].positionColumn):ne?m.v(E.a.multiSelectionRange,Z.length,ne):Z.length>0?m.v(E.a.multiSelection,Z.length):""}let z=class Z extends I.a{constructor(ne,le,_e,Ce){super();this._contextKeyService=le,this._keybindingService=_e,this._openerService=Ce,this._editor=ne,this._isVisibleKey=k.bindTo(this._contextKeyService),this._domNode=Object(R.b)(document.createElement("div")),this._domNode.setClassName("accessibilityHelpWidget"),this._domNode.setDisplay("none"),this._domNode.setAttribute("role","dialog"),this._domNode.setAttribute("aria-hidden","true"),this._contentDomNode=Object(R.b)(document.createElement("div")),this._contentDomNode.setAttribute("role","document"),this._domNode.appendChild(this._contentDomNode),this._isVisible=!1,this._register(this._editor.onDidLayoutChange(()=>{this._isVisible&&this._layout()})),this._register(x.o(this._contentDomNode.domNode,"keydown",oe=>{if(!this._isVisible)return;if(oe.equals(2048|35)&&(Object(j.a)(E.a.emergencyConfOn),this._editor.updateOptions({accessibilitySupport:"on"}),x.t(this._contentDomNode.domNode),this._buildContent(),this._contentDomNode.domNode.focus(),oe.preventDefault(),oe.stopPropagation()),oe.equals(2048|38)){Object(j.a)(E.a.openingDocs);let ae=this._editor.getRawOptions().accessibilityHelpUrl;typeof ae=="undefined"&&(ae="https://go.microsoft.com/fwlink/?linkid=852450"),this._openerService.open(d.a.parse(ae)),oe.preventDefault(),oe.stopPropagation()}})),this.onblur(this._contentDomNode.domNode,()=>{this.hide()}),this._editor.addOverlayWidget(this)}dispose(){this._editor.removeOverlayWidget(this),super.dispose()}getId(){return Z.ID}getDomNode(){return this._domNode.domNode}getPosition(){return{preference:null}}show(){if(this._isVisible)return;this._isVisible=!0,this._isVisibleKey.set(!0),this._layout(),this._domNode.setDisplay("block"),this._domNode.setAttribute("aria-hidden","false"),this._contentDomNode.domNode.tabIndex=0,this._buildContent(),this._contentDomNode.domNode.focus()}_descriptionForCommand(ne,le,_e){let Ce=this._keybindingService.lookupKeybinding(ne);return Ce?m.v(le,Ce.getAriaLabel()):m.v(_e,ne)}_buildContent(){const ne=this._editor.getOptions(),le=this._editor.getSelections();let _e=0;if(le){const V=this._editor.getModel();V&&le.forEach(G=>{_e+=V.getValueLengthInRange(G)})}let Ce=q(le,_e);ne.get(53)?ne.get(80)?Ce+=E.a.readonlyDiffEditor:Ce+=E.a.editableDiffEditor:ne.get(80)?Ce+=E.a.readonlyEditor:Ce+=E.a.editableEditor;const oe=C.f?E.a.changeConfigToOnMac:E.a.changeConfigToOnWinLinux;switch(ne.get(2)){case 0:Ce+=`
|
|
|
|
|
|
- `+oe;break;case 2:Ce+=`
|
|
|
|
|
|
- `+E.a.auto_on;break;case 1:Ce+=`
|
|
|
|
|
|
- `+E.a.auto_off,Ce+=" "+oe;break}ne.get(128)?Ce+=`
|
|
|
|
|
|
- `+this._descriptionForCommand(r.ToggleTabFocusModeAction.ID,E.a.tabFocusModeOnMsg,E.a.tabFocusModeOnMsgNoKb):Ce+=`
|
|
|
|
|
|
- `+this._descriptionForCommand(r.ToggleTabFocusModeAction.ID,E.a.tabFocusModeOffMsg,E.a.tabFocusModeOffMsgNoKb);const ae=C.f?E.a.openDocMac:E.a.openDocWinLinux;Ce+=`
|
|
|
|
|
|
- `+ae,Ce+=`
|
|
|
|
|
|
`+E.a.outroMsg,this._contentDomNode.domNode.appendChild(Object(A.b)(Ce)),this._contentDomNode.domNode.setAttribute("aria-label",Ce)}hide(){if(!this._isVisible)return;this._isVisible=!1,this._isVisibleKey.reset(),this._domNode.setDisplay("none"),this._domNode.setAttribute("aria-hidden","true"),this._contentDomNode.domNode.tabIndex=-1,x.t(this._contentDomNode.domNode),this._editor.focus()}_layout(){let ne=this._editor.getLayoutInfo(),le=Math.max(5,Math.min(Z.WIDTH,ne.width-40)),_e=Math.max(5,Math.min(Z.HEIGHT,ne.height-40));this._domNode.setWidth(le),this._domNode.setHeight(_e);let Ce=Math.round((ne.height-_e)/2);this._domNode.setTop(Ce);let oe=Math.round((ne.width-le)/2);this._domNode.setLeft(oe)}};z.ID="editor.contrib.accessibilityHelpWidget",z.WIDTH=500,z.HEIGHT=300,z=y([O(1,w.b),O(2,u.a),O(3,c.a)],z);class J extends D.b{constructor(){super({id:"editor.action.showAccessibilityHelp",label:E.a.showAccessibilityHelpAction,alias:"Show Accessibility Help",precondition:void 0,kbOpts:{primary:512|59,weight:100,linux:{primary:512|1024|59,secondary:[512|59]}}})}run(Z,ne){let le=Q.get(ne);le&&le.show()}}Object(D.l)(Q.ID,Q),Object(D.j)(J);const re=D.c.bindToContribution(Q.get);Object(D.k)(new re({id:"closeAccessibilityHelp",precondition:k,handler:Z=>Z.hide(),kbOpts:{weight:100+100,kbExpr:L.a.focus,primary:9,secondary:[1024|9]}})),Object(S.f)((Z,ne)=>{const le=Z.getColor(p.W);le&&ne.addRule(`.monaco-editor .accessibilityHelpWidget { background-color: ${le}; }`);const _e=Z.getColor(p.Y);_e&&ne.addRule(`.monaco-editor .accessibilityHelpWidget { color: ${_e}; }`);const Ce=Z.getColor(p.Nc);Ce&&ne.addRule(`.monaco-editor .accessibilityHelpWidget { box-shadow: 0 2px 8px ${Ce}; }`);const oe=Z.getColor(p.h);oe&&ne.addRule(`.monaco-editor .accessibilityHelpWidget { border: 2px solid ${oe}; }`)})},Sdnv:function(mt,M,t){"use strict";t.d(M,"b",function(){return g}),t.d(M,"a",function(){return B});function g(x,R,A){return Math.min(Math.max(x,R),A)}class B{constructor(){this._n=1,this._val=0}update(x){return this._val=this._val+(x-this._val)/this._n,this._n+=1,this}get value(){return this._val}}},Ssw4:function(mt,M,t){"use strict";(function(g){t.d(M,"a",function(){return j}),t.d(M,"b",function(){return D});let B;(function(){function L(r){B=r()}L.amd=!0,function(r,w){typeof exports=="object"&&typeof g!="undefined"?g.exports=w():typeof L=="function"&&L.amd?L(w):(r=typeof globalThis!="undefined"?globalThis:r||self,r.marked=w())}(this,function(){"use strict";function r(_t,Tt){for(var Nt=0;Nt<Tt.length;Nt++){var rt=Tt[Nt];rt.enumerable=rt.enumerable||!1,rt.configurable=!0,"value"in rt&&(rt.writable=!0),Object.defineProperty(_t,rt.key,rt)}}function w(_t,Tt,Nt){return Tt&&r(_t.prototype,Tt),Nt&&r(_t,Nt),_t}function b(_t,Tt){if(!_t)return;if(typeof _t=="string")return u(_t,Tt);var Nt=Object.prototype.toString.call(_t).slice(8,-1);if(Nt==="Object"&&_t.constructor&&(Nt=_t.constructor.name),Nt==="Map"||Nt==="Set")return Array.from(_t);if(Nt==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(Nt))return u(_t,Tt)}function u(_t,Tt){(Tt==null||Tt>_t.length)&&(Tt=_t.length);for(var Nt=0,rt=new Array(Tt);Nt<Tt;Nt++)rt[Nt]=_t[Nt];return rt}function c(_t,Tt){var Nt=typeof Symbol!="undefined"&&_t[Symbol.iterator]||_t["@@iterator"];if(Nt)return(Nt=Nt.call(_t)).next.bind(Nt);if(Array.isArray(_t)||(Nt=b(_t))||Tt&&_t&&typeof _t.length=="number"){Nt&&(_t=Nt);var rt=0;return function(){return rt>=_t.length?{done:!0}:{done:!1,value:_t[rt++]}}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
|
|
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var p={exports:{}};function S(){return{baseUrl:null,breaks:!1,extensions:null,gfm:!0,headerIds:!0,headerPrefix:"",highlight:null,langPrefix:"language-",mangle:!0,pedantic:!1,renderer:null,sanitize:!1,sanitizer:null,silent:!1,smartLists:!1,smartypants:!1,tokenizer:null,walkTokens:null,xhtml:!1}}function E(_t){p.exports.defaults=_t}p.exports={defaults:S(),getDefaults:S,changeDefaults:E};var y=/[&<>"']/,O=/[&<>"']/g,k=/[<>"']|&(?!#?\w+;)/,Q=/[<>"']|&(?!#?\w+;)/g,q={"&":"&","<":"<",">":">",'"':""","'":"'"},z=function(Tt){return q[Tt]};function J(_t,Tt){if(Tt){if(y.test(_t))return _t.replace(O,z)}else if(k.test(_t))return _t.replace(Q,z);return _t}var re=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig;function Z(_t){return _t.replace(re,function(Tt,Nt){return Nt=Nt.toLowerCase(),Nt==="colon"?":":Nt.charAt(0)==="#"?Nt.charAt(1)==="x"?String.fromCharCode(parseInt(Nt.substring(2),16)):String.fromCharCode(+Nt.substring(1)):""})}var ne=/(^|[^\[])\^/g;function le(_t,Tt){_t=_t.source||_t,Tt=Tt||"";var Nt={replace:function(lt,bt){return bt=bt.source||bt,bt=bt.replace(ne,"$1"),_t=_t.replace(lt,bt),Nt},getRegex:function(){return new RegExp(_t,Tt)}};return Nt}var _e=/[^\w:]/g,Ce=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;function oe(_t,Tt,Nt){if(_t){var rt;try{rt=decodeURIComponent(Z(Nt)).replace(_e,"").toLowerCase()}catch(lt){return null}if(rt.indexOf("javascript:")===0||rt.indexOf("vbscript:")===0||rt.indexOf("data:")===0)return null}Tt&&!Ce.test(Nt)&&(Nt=pe(Tt,Nt));try{Nt=encodeURI(Nt).replace(/%25/g,"%")}catch(lt){return null}return Nt}var ae={},V=/^[^:]+:\/*[^/]*$/,G=/^([^:]+:)[\s\S]*$/,ee=/^([^:]+:\/*[^/]*)[\s\S]*$/;function pe(_t,Tt){ae[" "+_t]||(V.test(_t)?ae[" "+_t]=_t+"/":ae[" "+_t]=Oe(_t,"/",!0)),_t=ae[" "+_t];var Nt=_t.indexOf(":")===-1;return Tt.substring(0,2)==="//"?Nt?Tt:_t.replace(G,"$1")+Tt:Tt.charAt(0)==="/"?Nt?Tt:_t.replace(ee,"$1")+Tt:_t+Tt}var Te={exec:function(){}};function Ie(_t){for(var Tt=1,Nt,rt;Tt<arguments.length;Tt++){Nt=arguments[Tt];for(rt in Nt)Object.prototype.hasOwnProperty.call(Nt,rt)&&(_t[rt]=Nt[rt])}return _t}function Me(_t,Tt){var Nt=_t.replace(/\|/g,function(bt,St,Qt){for(var bo=!1,qt=St;--qt>=0&&Qt[qt]==="\\";)bo=!bo;return bo?"|":" |"}),rt=Nt.split(/ \|/),lt=0;if(rt[0].trim()||rt.shift(),rt[rt.length-1].trim()||rt.pop(),rt.length>Tt)rt.splice(Tt);else for(;rt.length<Tt;)rt.push("");for(;lt<rt.length;lt++)rt[lt]=rt[lt].trim().replace(/\\\|/g,"|");return rt}function Oe(_t,Tt,Nt){var rt=_t.length;if(rt===0)return"";for(var lt=0;lt<rt;){var bt=_t.charAt(rt-lt-1);if(bt===Tt&&!Nt)lt++;else if(bt!==Tt&&Nt)lt++;else break}return _t.substr(0,rt-lt)}function Xe(_t,Tt){if(_t.indexOf(Tt[1])===-1)return-1;for(var Nt=_t.length,rt=0,lt=0;lt<Nt;lt++)if(_t[lt]==="\\")lt++;else if(_t[lt]===Tt[0])rt++;else if(_t[lt]===Tt[1]&&(rt--,rt<0))return lt;return-1}function fe(_t){_t&&_t.sanitize&&!_t.silent&&console.warn("marked(): sanitize and sanitizer parameters are deprecated since version 0.7.0, should not be used and will be removed in the future. Read more here: https://marked.js.org/#/USING_ADVANCED.md#options")}function Pe(_t,Tt){if(Tt<1)return"";for(var Nt="";Tt>1;)Tt&1&&(Nt+=_t),Tt>>=1,_t+=_t;return Nt+_t}var Be={escape:J,unescape:Z,edit:le,cleanUrl:oe,resolveUrl:pe,noopTest:Te,merge:Ie,splitCells:Me,rtrim:Oe,findClosingBracket:Xe,checkSanitizeDeprecation:fe,repeatString:Pe},Se=p.exports.defaults,me=Be.rtrim,he=Be.splitCells,Le=Be.escape,we=Be.findClosingBracket;function ve(_t,Tt,Nt,rt){var lt=Tt.href,bt=Tt.title?Le(Tt.title):null,St=_t[1].replace(/\\([\[\]])/g,"$1");if(_t[0].charAt(0)!=="!"){rt.state.inLink=!0;var Qt={type:"link",raw:Nt,href:lt,title:bt,text:St,tokens:rt.inlineTokens(St,[])};return rt.state.inLink=!1,Qt}else return{type:"image",raw:Nt,href:lt,title:bt,text:Le(St)}}function ie(_t,Tt){var Nt=_t.match(/^(\s+)(?:```)/);if(Nt===null)return Tt;var rt=Nt[1];return Tt.split(`
|
|
|
`).map(function(lt){var bt=lt.match(/^\s+/);if(bt===null)return lt;var St=bt[0];return St.length>=rt.length?lt.slice(rt.length):lt}).join(`
|
|
|
`)}var W=function(){function _t(Nt){this.options=Nt||Se}var Tt=_t.prototype;return Tt.space=function(rt){var lt=this.rules.block.newline.exec(rt);if(lt)return lt[0].length>1?{type:"space",raw:lt[0]}:{raw:`
|
|
|
`}},Tt.code=function(rt){var lt=this.rules.block.code.exec(rt);if(lt){var bt=lt[0].replace(/^ {1,4}/gm,"");return{type:"code",raw:lt[0],codeBlockStyle:"indented",text:this.options.pedantic?bt:me(bt,`
|
|
|
`)}}},Tt.fences=function(rt){var lt=this.rules.block.fences.exec(rt);if(lt){var bt=lt[0],St=ie(bt,lt[3]||"");return{type:"code",raw:bt,lang:lt[2]?lt[2].trim():lt[2],text:St}}},Tt.heading=function(rt){var lt=this.rules.block.heading.exec(rt);if(lt){var bt=lt[2].trim();if(/#$/.test(bt)){var St=me(bt,"#");(this.options.pedantic||(!St||/ $/.test(St)))&&(bt=St.trim())}var Qt={type:"heading",raw:lt[0],depth:lt[1].length,text:bt,tokens:[]};return this.lexer.inline(Qt.text,Qt.tokens),Qt}},Tt.hr=function(rt){var lt=this.rules.block.hr.exec(rt);if(lt)return{type:"hr",raw:lt[0]}},Tt.blockquote=function(rt){var lt=this.rules.block.blockquote.exec(rt);if(lt){var bt=lt[0].replace(/^ *> ?/gm,"");return{type:"blockquote",raw:lt[0],tokens:this.lexer.blockTokens(bt,[]),text:bt}}},Tt.list=function(rt){var lt=this.rules.block.list.exec(rt);if(lt){var bt,St,Qt,bo,qt,Eo,Ro,zo,Bo,Jt,fo=lt[1].trim(),ri=fo.length>1,Zo={type:"list",raw:"",ordered:ri,start:ri?+fo.slice(0,-1):"",loose:!1,items:[]};fo=ri?"\\d{1,9}\\"+fo.slice(-1):"\\"+fo,this.options.pedantic&&(fo=ri?fo:"[*+-]");for(var ci=new RegExp("^( {0,3}"+fo+")((?: [^\\n]*| *)(?:\\n[^\\n]*)*(?:\\n|$))");rt&&!this.rules.block.hr.test(rt);){if(!(lt=ci.exec(rt)))break;Bo=lt[2].split(`
|
|
|
`),this.options.pedantic?(bo=2,Jt=Bo[0].trimLeft()):(bo=lt[2].search(/[^ ]/),bo=lt[1].length+(bo>4?1:bo),Jt=Bo[0].slice(bo-lt[1].length)),Eo=!1,bt=lt[0],!Bo[0]&&/^ *$/.test(Bo[1])&&(bt=lt[1]+Bo.slice(0,2).join(`
|
|
|
`)+`
|
|
|
`,Zo.loose=!0,Bo=[]);var ki=new RegExp("^ {0,"+Math.min(3,bo-1)+"}(?:[*+-]|\\d{1,9}[.)])");for(qt=1;qt<Bo.length;qt++){if(zo=Bo[qt],this.options.pedantic&&(zo=zo.replace(/^ {1,4}(?=( {4})*[^ ])/g," ")),ki.test(zo)){bt=lt[1]+Bo.slice(0,qt).join(`
|
|
|
`)+`
|
|
|
`;break}if(!Eo){zo.trim()||(Eo=!0),zo.search(/[^ ]/)>=bo?Jt+=`
|
|
|
`+zo.slice(bo):Jt+=`
|
|
|
`+zo;continue}if(zo.search(/[^ ]/)>=bo||!zo.trim()){Jt+=`
|
|
|
`+zo.slice(bo);continue}else{bt=lt[1]+Bo.slice(0,qt).join(`
|
|
|
`)+`
|
|
|
`;break}}Zo.loose||(Ro?Zo.loose=!0:/\n *\n *$/.test(bt)&&(Ro=!0)),this.options.gfm&&(St=/^\[[ xX]\] /.exec(Jt),St&&(Qt=St[0]!=="[ ] ",Jt=Jt.replace(/^\[[ xX]\] +/,""))),Zo.items.push({type:"list_item",raw:bt,task:!!St,checked:Qt,loose:!1,text:Jt}),Zo.raw+=bt,rt=rt.slice(bt.length)}Zo.items[Zo.items.length-1].raw=bt.trimRight(),Zo.items[Zo.items.length-1].text=Jt.trimRight(),Zo.raw=Zo.raw.trimRight();var wi=Zo.items.length;for(qt=0;qt<wi;qt++)this.lexer.state.top=!1,Zo.items[qt].tokens=this.lexer.blockTokens(Zo.items[qt].text,[]),Zo.items[qt].tokens.some(function(Zi){return Zi.type==="space"})&&(Zo.loose=!0,Zo.items[qt].loose=!0);return Zo}},Tt.html=function(rt){var lt=this.rules.block.html.exec(rt);if(lt){var bt={type:"html",raw:lt[0],pre:!this.options.sanitizer&&(lt[1]==="pre"||lt[1]==="script"||lt[1]==="style"),text:lt[0]};return this.options.sanitize&&(bt.type="paragraph",bt.text=this.options.sanitizer?this.options.sanitizer(lt[0]):Le(lt[0]),bt.tokens=[],this.lexer.inline(bt.text,bt.tokens)),bt}},Tt.def=function(rt){var lt=this.rules.block.def.exec(rt);if(lt){lt[3]&&(lt[3]=lt[3].substring(1,lt[3].length-1));var bt=lt[1].toLowerCase().replace(/\s+/g," ");return{type:"def",tag:bt,raw:lt[0],href:lt[2],title:lt[3]}}},Tt.table=function(rt){var lt=this.rules.block.table.exec(rt);if(lt){var bt={type:"table",header:he(lt[1]).map(function(Ro){return{text:Ro}}),align:lt[2].replace(/^ *|\| *$/g,"").split(/ *\| */),rows:lt[3]?lt[3].replace(/\n$/,"").split(`
|
|
|
`):[]};if(bt.header.length===bt.align.length){bt.raw=lt[0];var St=bt.align.length,Qt,bo,qt,Eo;for(Qt=0;Qt<St;Qt++)/^ *-+: *$/.test(bt.align[Qt])?bt.align[Qt]="right":/^ *:-+: *$/.test(bt.align[Qt])?bt.align[Qt]="center":/^ *:-+ *$/.test(bt.align[Qt])?bt.align[Qt]="left":bt.align[Qt]=null;for(St=bt.rows.length,Qt=0;Qt<St;Qt++)bt.rows[Qt]=he(bt.rows[Qt],bt.header.length).map(function(Ro){return{text:Ro}});for(St=bt.header.length,bo=0;bo<St;bo++)bt.header[bo].tokens=[],this.lexer.inlineTokens(bt.header[bo].text,bt.header[bo].tokens);for(St=bt.rows.length,bo=0;bo<St;bo++)for(Eo=bt.rows[bo],qt=0;qt<Eo.length;qt++)Eo[qt].tokens=[],this.lexer.inlineTokens(Eo[qt].text,Eo[qt].tokens);return bt}}},Tt.lheading=function(rt){var lt=this.rules.block.lheading.exec(rt);if(lt){var bt={type:"heading",raw:lt[0],depth:lt[2].charAt(0)==="="?1:2,text:lt[1],tokens:[]};return this.lexer.inline(bt.text,bt.tokens),bt}},Tt.paragraph=function(rt){var lt=this.rules.block.paragraph.exec(rt);if(lt){var bt={type:"paragraph",raw:lt[0],text:lt[1].charAt(lt[1].length-1)===`
|
|
|
`?lt[1].slice(0,-1):lt[1],tokens:[]};return this.lexer.inline(bt.text,bt.tokens),bt}},Tt.text=function(rt){var lt=this.rules.block.text.exec(rt);if(lt){var bt={type:"text",raw:lt[0],text:lt[0],tokens:[]};return this.lexer.inline(bt.text,bt.tokens),bt}},Tt.escape=function(rt){var lt=this.rules.inline.escape.exec(rt);if(lt)return{type:"escape",raw:lt[0],text:Le(lt[1])}},Tt.tag=function(rt){var lt=this.rules.inline.tag.exec(rt);if(lt)return!this.lexer.state.inLink&&/^<a /i.test(lt[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&/^<\/a>/i.test(lt[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&/^<(pre|code|kbd|script)(\s|>)/i.test(lt[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&/^<\/(pre|code|kbd|script)(\s|>)/i.test(lt[0])&&(this.lexer.state.inRawBlock=!1),{type:this.options.sanitize?"text":"html",raw:lt[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,text:this.options.sanitize?this.options.sanitizer?this.options.sanitizer(lt[0]):Le(lt[0]):lt[0]}},Tt.link=function(rt){var lt=this.rules.inline.link.exec(rt);if(lt){var bt=lt[2].trim();if(!this.options.pedantic&&/^</.test(bt)){if(!/>$/.test(bt))return;var St=me(bt.slice(0,-1),"\\");if((bt.length-St.length)%2===0)return}else{var Qt=we(lt[2],"()");if(Qt>-1){var bo=lt[0].indexOf("!")===0?5:4,qt=bo+lt[1].length+Qt;lt[2]=lt[2].substring(0,Qt),lt[0]=lt[0].substring(0,qt).trim(),lt[3]=""}}var Eo=lt[2],Ro="";if(this.options.pedantic){var zo=/^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(Eo);zo&&(Eo=zo[1],Ro=zo[3])}else Ro=lt[3]?lt[3].slice(1,-1):"";return Eo=Eo.trim(),/^</.test(Eo)&&(this.options.pedantic&&!/>$/.test(bt)?Eo=Eo.slice(1):Eo=Eo.slice(1,-1)),ve(lt,{href:Eo&&Eo.replace(this.rules.inline._escapes,"$1"),title:Ro&&Ro.replace(this.rules.inline._escapes,"$1")},lt[0],this.lexer)}},Tt.reflink=function(rt,lt){var bt;if((bt=this.rules.inline.reflink.exec(rt))||(bt=this.rules.inline.nolink.exec(rt))){var St=(bt[2]||bt[1]).replace(/\s+/g," ");if(St=lt[St.toLowerCase()],!St||!St.href){var Qt=bt[0].charAt(0);return{type:"text",raw:Qt,text:Qt}}return ve(bt,St,bt[0],this.lexer)}},Tt.emStrong=function(rt,lt,bt){bt===void 0&&(bt="");var St=this.rules.inline.emStrong.lDelim.exec(rt);if(!St)return;if(St[3]&&bt.match(/(?:[0-9A-Za-z\xAA\xB2\xB3\xB5\xB9\xBA\xBC-\xBE\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0560-\u0588\u05D0-\u05EA\u05EF-\u05F2\u0620-\u064A\u0660-\u0669\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07C0-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u0860-\u086A\u08A0-\u08B4\u08B6-\u08C7\u0904-\u0939\u093D\u0950\u0958-\u0961\u0966-\u096F\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09E6-\u09F1\u09F4-\u09F9\u09FC\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A66-\u0A6F\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AE6-\u0AEF\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B66-\u0B6F\u0B71-\u0B77\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0BE6-\u0BF2\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C60\u0C61\u0C66-\u0C6F\u0C78-\u0C7E\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CE6-\u0CEF\u0CF1\u0CF2\u0D04-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D58-\u0D61\u0D66-\u0D78\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DE6-\u0DEF\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E50-\u0E59\u0E81\u0E82\u0E84\u0E86-\u0E8A\u0E8C-\u0EA3\u0EA5\u0EA7-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00\u0F20-\u0F33\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F-\u1049\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u1090-\u1099\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1369-\u137C\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u17E0-\u17E9\u17F0-\u17F9\u1810-\u1819\u1820-\u1878\u1880-\u1884\u1887-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19DA\u1A00-\u1A16\u1A20-\u1A54\u1A80-\u1A89\u1A90-\u1A99\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B50-\u1B59\u1B83-\u1BA0\u1BAE-\u1BE5\u1C00-\u1C23\u1C40-\u1C49\u1C4D-\u1C7D\u1C80-\u1C88\u1C90-\u1CBA\u1CBD-\u1CBF\u1CE9-\u1CEC\u1CEE-\u1CF3\u1CF5\u1CF6\u1CFA\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2070\u2071\u2074-\u2079\u207F-\u2089\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2150-\u2189\u2460-\u249B\u24EA-\u24FF\u2776-\u2793\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2CFD\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312F\u3131-\u318E\u3192-\u3195\u31A0-\u31BF\u31F0-\u31FF\u3220-\u3229\u3248-\u324F\u3251-\u325F\u3280-\u3289\u32B1-\u32BF\u3400-\u4DBF\u4E00-\u9FFC\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7BF\uA7C2-\uA7CA\uA7F5-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA830-\uA835\uA840-\uA873\uA882-\uA8B3\uA8D0-\uA8D9\uA8F2-\uA8F7\uA8FB\uA8FD\uA8FE\uA900-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF-\uA9D9\uA9E0-\uA9E4\uA9E6-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA50-\uAA59\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB69\uAB70-\uABE2\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF10-\uFF19\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD07-\uDD33\uDD40-\uDD78\uDD8A\uDD8B\uDE80-\uDE9C\uDEA0-\uDED0\uDEE1-\uDEFB\uDF00-\uDF23\uDF2D-\uDF4A\uDF50-\uDF75\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCA0-\uDCA9\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC58-\uDC76\uDC79-\uDC9E\uDCA7-\uDCAF\uDCE0-\uDCF2\uDCF4\uDCF5\uDCFB-\uDD1B\uDD20-\uDD39\uDD80-\uDDB7\uDDBC-\uDDCF\uDDD2-\uDE00\uDE10-\uDE13\uDE15-\uDE17\uDE19-\uDE35\uDE40-\uDE48\uDE60-\uDE7E\uDE80-\uDE9F\uDEC0-\uDEC7\uDEC9-\uDEE4\uDEEB-\uDEEF\uDF00-\uDF35\uDF40-\uDF55\uDF58-\uDF72\uDF78-\uDF91\uDFA9-\uDFAF]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2\uDCFA-\uDD23\uDD30-\uDD39\uDE60-\uDE7E\uDE80-\uDEA9\uDEB0\uDEB1\uDF00-\uDF27\uDF30-\uDF45\uDF51-\uDF54\uDFB0-\uDFCB\uDFE0-\uDFF6]|\uD804[\uDC03-\uDC37\uDC52-\uDC6F\uDC83-\uDCAF\uDCD0-\uDCE8\uDCF0-\uDCF9\uDD03-\uDD26\uDD36-\uDD3F\uDD44\uDD47\uDD50-\uDD72\uDD76\uDD83-\uDDB2\uDDC1-\uDDC4\uDDD0-\uDDDA\uDDDC\uDDE1-\uDDF4\uDE00-\uDE11\uDE13-\uDE2B\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEDE\uDEF0-\uDEF9\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D\uDF50\uDF5D-\uDF61]|\uD805[\uDC00-\uDC34\uDC47-\uDC4A\uDC50-\uDC59\uDC5F-\uDC61\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDCD0-\uDCD9\uDD80-\uDDAE\uDDD8-\uDDDB\uDE00-\uDE2F\uDE44\uDE50-\uDE59\uDE80-\uDEAA\uDEB8\uDEC0-\uDEC9\uDF00-\uDF1A\uDF30-\uDF3B]|\uD806[\uDC00-\uDC2B\uDCA0-\uDCF2\uDCFF-\uDD06\uDD09\uDD0C-\uDD13\uDD15\uDD16\uDD18-\uDD2F\uDD3F\uDD41\uDD50-\uDD59\uDDA0-\uDDA7\uDDAA-\uDDD0\uDDE1\uDDE3\uDE00\uDE0B-\uDE32\uDE3A\uDE50\uDE5C-\uDE89\uDE9D\uDEC0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC2E\uDC40\uDC50-\uDC6C\uDC72-\uDC8F\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD30\uDD46\uDD50-\uDD59\uDD60-\uDD65\uDD67\uDD68\uDD6A-\uDD89\uDD98\uDDA0-\uDDA9\uDEE0-\uDEF2\uDFB0\uDFC0-\uDFD4]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD81C-\uD820\uD822\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879\uD880-\uD883][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDE60-\uDE69\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF50-\uDF59\uDF5B-\uDF61\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDE40-\uDE96\uDF00-\uDF4A\uDF50\uDF93-\uDF9F\uDFE0\uDFE1\uDFE3]|\uD821[\uDC00-\uDFF7]|\uD823[\uDC00-\uDCD5\uDD00-\uDD08]|\uD82C[\uDC00-\uDD1E\uDD50-\uDD52\uDD64-\uDD67\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99]|\uD834[\uDEE0-\uDEF3\uDF60-\uDF78]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB\uDFCE-\uDFFF]|\uD838[\uDD00-\uDD2C\uDD37-\uDD3D\uDD40-\uDD49\uDD4E\uDEC0-\uDEEB\uDEF0-\uDEF9]|\uD83A[\uDC00-\uDCC4\uDCC7-\uDCCF\uDD00-\uDD43\uDD4B\uDD50-\uDD59]|\uD83B[\uDC71-\uDCAB\uDCAD-\uDCAF\uDCB1-\uDCB4\uDD01-\uDD2D\uDD2F-\uDD3D\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD83C[\uDD00-\uDD0C]|\uD83E[\uDFF0-\uDFF9]|\uD869[\uDC00-\uDEDD\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]|\uD884[\uDC00-\uDF4A])/))return;var Qt=St[1]||St[2]||"";if(!Qt||Qt&&(bt===""||this.rules.inline.punctuation.exec(bt))){var bo=St[0].length-1,qt,Eo,Ro=bo,zo=0,Bo=St[0][0]==="*"?this.rules.inline.emStrong.rDelimAst:this.rules.inline.emStrong.rDelimUnd;for(Bo.lastIndex=0,lt=lt.slice(-1*rt.length+bo);(St=Bo.exec(lt))!=null;){if(qt=St[1]||St[2]||St[3]||St[4]||St[5]||St[6],!qt)continue;if(Eo=qt.length,St[3]||St[4]){Ro+=Eo;continue}else if((St[5]||St[6])&&(bo%3&&!((bo+Eo)%3))){zo+=Eo;continue}if(Ro-=Eo,Ro>0)continue;if(Eo=Math.min(Eo,Eo+Ro+zo),Math.min(bo,Eo)%2){var Jt=rt.slice(1,bo+St.index+Eo);return{type:"em",raw:rt.slice(0,bo+St.index+Eo+1),text:Jt,tokens:this.lexer.inlineTokens(Jt,[])}}var fo=rt.slice(2,bo+St.index+Eo-1);return{type:"strong",raw:rt.slice(0,bo+St.index+Eo+1),text:fo,tokens:this.lexer.inlineTokens(fo,[])}}}},Tt.codespan=function(rt){var lt=this.rules.inline.code.exec(rt);if(lt){var bt=lt[2].replace(/\n/g," "),St=/[^ ]/.test(bt),Qt=/^ /.test(bt)&&/ $/.test(bt);return St&&Qt&&(bt=bt.substring(1,bt.length-1)),bt=Le(bt,!0),{type:"codespan",raw:lt[0],text:bt}}},Tt.br=function(rt){var lt=this.rules.inline.br.exec(rt);if(lt)return{type:"br",raw:lt[0]}},Tt.del=function(rt){var lt=this.rules.inline.del.exec(rt);if(lt)return{type:"del",raw:lt[0],text:lt[2],tokens:this.lexer.inlineTokens(lt[2],[])}},Tt.autolink=function(rt,lt){var bt=this.rules.inline.autolink.exec(rt);if(bt){var St,Qt;return bt[2]==="@"?(St=Le(this.options.mangle?lt(bt[1]):bt[1]),Qt="mailto:"+St):(St=Le(bt[1]),Qt=St),{type:"link",raw:bt[0],text:St,href:Qt,tokens:[{type:"text",raw:St,text:St}]}}},Tt.url=function(rt,lt){var bt;if(bt=this.rules.inline.url.exec(rt)){var St,Qt;if(bt[2]==="@")St=Le(this.options.mangle?lt(bt[0]):bt[0]),Qt="mailto:"+St;else{var bo;do bo=bt[0],bt[0]=this.rules.inline._backpedal.exec(bt[0])[0];while(bo!==bt[0]);St=Le(bt[0]),bt[1]==="www."?Qt="http://"+St:Qt=St}return{type:"link",raw:bt[0],text:St,href:Qt,tokens:[{type:"text",raw:St,text:St}]}}},Tt.inlineText=function(rt,lt){var bt=this.rules.inline.text.exec(rt);if(bt){var St;return this.lexer.state.inRawBlock?St=this.options.sanitize?this.options.sanitizer?this.options.sanitizer(bt[0]):Le(bt[0]):bt[0]:St=Le(this.options.smartypants?lt(bt[0]):bt[0]),{type:"text",raw:bt[0],text:St}}},_t}(),U=Be.noopTest,se=Be.edit,je=Be.merge,Re={newline:/^(?: *(?:\n|$))+/,code:/^( {4}[^\n]+(?:\n(?: *(?:\n|$))*)?)+/,fences:/^ {0,3}(`{3,}(?=[^`\n]*\n)|~{3,})([^\n]*)\n(?:|([\s\S]*?)\n)(?: {0,3}\1[~`]* *(?=\n|$)|$)/,hr:/^ {0,3}((?:- *){3,}|(?:_ *){3,}|(?:\* *){3,})(?:\n+|$)/,heading:/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,blockquote:/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/,list:/^( {0,3}bull)( [^\n]+?)?(?:\n|$)/,html:"^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n *)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n *)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n *)+\\n|$))",def:/^ {0,3}\[(label)\]: *\n? *<?([^\s>]+)>?(?:(?: +\n? *| *\n *)(title))? *(?:\n+|$)/,table:U,lheading:/^([^\n]+)\n {0,3}(=+|-+) *(?:\n+|$)/,_paragraph:/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html| +\n)[^\n]+)*)/,text:/^[^\n]+/};Re._label=/(?!\s*\])(?:\\[\[\]]|[^\[\]])+/,Re._title=/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/,Re.def=se(Re.def).replace("label",Re._label).replace("title",Re._title).getRegex(),Re.bullet=/(?:[*+-]|\d{1,9}[.)])/,Re.listItemStart=se(/^( *)(bull) */).replace("bull",Re.bullet).getRegex(),Re.list=se(Re.list).replace(/bull/g,Re.bullet).replace("hr","\\n+(?=\\1?(?:(?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$))").replace("def","\\n+(?="+Re.def.source+")").getRegex(),Re._tag="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|section|source|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",Re._comment=/<!--(?!-?>)[\s\S]*?(?:-->|$)/,Re.html=se(Re.html,"i").replace("comment",Re._comment).replace("tag",Re._tag).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),Re.paragraph=se(Re._paragraph).replace("hr",Re.hr).replace("heading"," {0,3}#{1,6} ").replace("|lheading","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",Re._tag).getRegex(),Re.blockquote=se(Re.blockquote).replace("paragraph",Re.paragraph).getRegex(),Re.normal=je({},Re),Re.gfm=je({},Re.normal,{table:"^ *([^\\n ].*\\|.*)\\n {0,3}(?:\\| *)?(:?-+:? *(?:\\| *:?-+:? *)*)\\|?(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)"}),Re.gfm.table=se(Re.gfm.table).replace("hr",Re.hr).replace("heading"," {0,3}#{1,6} ").replace("blockquote"," {0,3}>").replace("code"," {4}[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",Re._tag).getRegex(),Re.pedantic=je({},Re.normal,{html:se(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",Re._comment).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:U,paragraph:se(Re.normal._paragraph).replace("hr",Re.hr).replace("heading",` *#{1,6} *[^
|
|
|
]`).replace("lheading",Re.lheading).replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").getRegex()});var We={escape:/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,autolink:/^<(scheme:[^\s\x00-\x1f<>]*|email)>/,url:U,tag:"^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>",link:/^!?\[(label)\]\(\s*(href)(?:\s+(title))?\s*\)/,reflink:/^!?\[(label)\]\[(?!\s*\])((?:\\[\[\]]?|[^\[\]\\])+)\]/,nolink:/^!?\[(?!\s*\])((?:\[[^\[\]]*\]|\\[\[\]]|[^\[\]])*)\](?:\[\])?/,reflinkSearch:"reflink|nolink(?!\\()",emStrong:{lDelim:/^(?:\*+(?:([punct_])|[^\s*]))|^_+(?:([punct*])|([^\s_]))/,rDelimAst:/\_\_[^_*]*?\*[^_*]*?\_\_|[punct_](\*+)(?=[\s]|$)|[^punct*_\s](\*+)(?=[punct_\s]|$)|[punct_\s](\*+)(?=[^punct*_\s])|[\s](\*+)(?=[punct_])|[punct_](\*+)(?=[punct_])|[^punct*_\s](\*+)(?=[^punct*_\s])/,rDelimUnd:/\*\*[^_*]*?\_[^_*]*?\*\*|[punct*](\_+)(?=[\s]|$)|[^punct*_\s](\_+)(?=[punct*\s]|$)|[punct*\s](\_+)(?=[^punct*_\s])|[\s](\_+)(?=[punct*])|[punct*](\_+)(?=[punct*])/},code:/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,br:/^( {2,}|\\)\n(?!\s*$)/,del:U,text:/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,punctuation:/^([\spunctuation])/};We._punctuation="!\"#$%&'()+\\-.,/:;<=>?@\\[\\]`^{|}~",We.punctuation=se(We.punctuation).replace(/punctuation/g,We._punctuation).getRegex(),We.blockSkip=/\[[^\]]*?\]\([^\)]*?\)|`[^`]*?`|<[^>]*?>/g,We.escapedEmSt=/\\\*|\\_/g,We._comment=se(Re._comment).replace("(?:-->|$)","-->").getRegex(),We.emStrong.lDelim=se(We.emStrong.lDelim).replace(/punct/g,We._punctuation).getRegex(),We.emStrong.rDelimAst=se(We.emStrong.rDelimAst,"g").replace(/punct/g,We._punctuation).getRegex(),We.emStrong.rDelimUnd=se(We.emStrong.rDelimUnd,"g").replace(/punct/g,We._punctuation).getRegex(),We._escapes=/\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/g,We._scheme=/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/,We._email=/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/,We.autolink=se(We.autolink).replace("scheme",We._scheme).replace("email",We._email).getRegex(),We._attribute=/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/,We.tag=se(We.tag).replace("comment",We._comment).replace("attribute",We._attribute).getRegex(),We._label=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,We._href=/<(?:\\.|[^\n<>\\])+>|[^\s\x00-\x1f]*/,We._title=/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/,We.link=se(We.link).replace("label",We._label).replace("href",We._href).replace("title",We._title).getRegex(),We.reflink=se(We.reflink).replace("label",We._label).getRegex(),We.reflinkSearch=se(We.reflinkSearch,"g").replace("reflink",We.reflink).replace("nolink",We.nolink).getRegex(),We.normal=je({},We),We.pedantic=je({},We.normal,{strong:{start:/^__|\*\*/,middle:/^__(?=\S)([\s\S]*?\S)__(?!_)|^\*\*(?=\S)([\s\S]*?\S)\*\*(?!\*)/,endAst:/\*\*(?!\*)/g,endUnd:/__(?!_)/g},em:{start:/^_|\*/,middle:/^()\*(?=\S)([\s\S]*?\S)\*(?!\*)|^_(?=\S)([\s\S]*?\S)_(?!_)/,endAst:/\*(?!\*)/g,endUnd:/_(?!_)/g},link:se(/^!?\[(label)\]\((.*?)\)/).replace("label",We._label).getRegex(),reflink:se(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",We._label).getRegex()}),We.gfm=je({},We.normal,{escape:se(We.escape).replace("])","~|])").getRegex(),_extended_email:/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/,url:/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/,_backpedal:/(?:[^?!.,:;*_~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])([\s\S]*?[^\s~])\1(?=[^~]|$)/,text:/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|https?:\/\/|ftp:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/}),We.gfm.url=se(We.gfm.url,"i").replace("email",We.gfm._extended_email).getRegex(),We.breaks=je({},We.gfm,{br:se(We.br).replace("{2,}","*").getRegex(),text:se(We.gfm.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()});var dt={block:Re,inline:We},Lt=W,Ht=p.exports.defaults,$e=dt.block,ot=dt.inline,ce=Be.repeatString;function Ve(_t){return _t.replace(/---/g,"\u2014").replace(/--/g,"\u2013").replace(/(^|[-\u2014/(\[{"\s])'/g,"$1\u2018").replace(/'/g,"\u2019").replace(/(^|[-\u2014/(\[{\u2018\s])"/g,"$1\u201C").replace(/"/g,"\u201D").replace(/\.{3}/g,"\u2026")}function it(_t){var Tt="",Nt,rt,lt=_t.length;for(Nt=0;Nt<lt;Nt++)rt=_t.charCodeAt(Nt),Math.random()>.5&&(rt="x"+rt.toString(16)),Tt+="&#"+rt+";";return Tt}var Et=function(){function _t(Nt){this.tokens=[],this.tokens.links=Object.create(null),this.options=Nt||Ht,this.options.tokenizer=this.options.tokenizer||new Lt,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,top:!0};var rt={block:$e.normal,inline:ot.normal};this.options.pedantic?(rt.block=$e.pedantic,rt.inline=ot.pedantic):this.options.gfm&&(rt.block=$e.gfm,this.options.breaks?rt.inline=ot.breaks:rt.inline=ot.gfm),this.tokenizer.rules=rt}_t.lex=function(rt,lt){var bt=new _t(lt);return bt.lex(rt)},_t.lexInline=function(rt,lt){var bt=new _t(lt);return bt.inlineTokens(rt)};var Tt=_t.prototype;return Tt.lex=function(rt){rt=rt.replace(/\r\n|\r/g,`
|
|
|
`).replace(/\t/g," "),this.blockTokens(rt,this.tokens);for(var lt;lt=this.inlineQueue.shift();)this.inlineTokens(lt.src,lt.tokens);return this.tokens},Tt.blockTokens=function(rt,lt){var bt=this;lt===void 0&&(lt=[]),this.options.pedantic&&(rt=rt.replace(/^ +$/gm,""));for(var St,Qt,bo,qt;rt;){if(this.options.extensions&&this.options.extensions.block&&this.options.extensions.block.some(function(Ro){return(St=Ro.call({lexer:bt},rt,lt))?(rt=rt.substring(St.raw.length),lt.push(St),!0):!1}))continue;if(St=this.tokenizer.space(rt)){rt=rt.substring(St.raw.length),St.type&<.push(St);continue}if(St=this.tokenizer.code(rt)){rt=rt.substring(St.raw.length),Qt=lt[lt.length-1],Qt&&(Qt.type==="paragraph"||Qt.type==="text")?(Qt.raw+=`
|
|
|
`+St.raw,Qt.text+=`
|
|
|
`+St.text,this.inlineQueue[this.inlineQueue.length-1].src=Qt.text):lt.push(St);continue}if(St=this.tokenizer.fences(rt)){rt=rt.substring(St.raw.length),lt.push(St);continue}if(St=this.tokenizer.heading(rt)){rt=rt.substring(St.raw.length),lt.push(St);continue}if(St=this.tokenizer.hr(rt)){rt=rt.substring(St.raw.length),lt.push(St);continue}if(St=this.tokenizer.blockquote(rt)){rt=rt.substring(St.raw.length),lt.push(St);continue}if(St=this.tokenizer.list(rt)){rt=rt.substring(St.raw.length),lt.push(St);continue}if(St=this.tokenizer.html(rt)){rt=rt.substring(St.raw.length),lt.push(St);continue}if(St=this.tokenizer.def(rt)){rt=rt.substring(St.raw.length),Qt=lt[lt.length-1],Qt&&(Qt.type==="paragraph"||Qt.type==="text")?(Qt.raw+=`
|
|
|
`+St.raw,Qt.text+=`
|
|
|
`+St.raw,this.inlineQueue[this.inlineQueue.length-1].src=Qt.text):this.tokens.links[St.tag]||(this.tokens.links[St.tag]={href:St.href,title:St.title});continue}if(St=this.tokenizer.table(rt)){rt=rt.substring(St.raw.length),lt.push(St);continue}if(St=this.tokenizer.lheading(rt)){rt=rt.substring(St.raw.length),lt.push(St);continue}if(bo=rt,this.options.extensions&&this.options.extensions.startBlock&&function(){var Ro=Infinity,zo=rt.slice(1),Bo=void 0;bt.options.extensions.startBlock.forEach(function(Jt){Bo=Jt.call({lexer:this},zo),typeof Bo=="number"&&Bo>=0&&(Ro=Math.min(Ro,Bo))}),Ro<Infinity&&Ro>=0&&(bo=rt.substring(0,Ro+1))}(),this.state.top&&(St=this.tokenizer.paragraph(bo))){Qt=lt[lt.length-1],qt&&Qt.type==="paragraph"?(Qt.raw+=`
|
|
|
`+St.raw,Qt.text+=`
|
|
|
`+St.text,this.inlineQueue.pop(),this.inlineQueue[this.inlineQueue.length-1].src=Qt.text):lt.push(St),qt=bo.length!==rt.length,rt=rt.substring(St.raw.length);continue}if(St=this.tokenizer.text(rt)){rt=rt.substring(St.raw.length),Qt=lt[lt.length-1],Qt&&Qt.type==="text"?(Qt.raw+=`
|
|
|
`+St.raw,Qt.text+=`
|
|
|
`+St.text,this.inlineQueue.pop(),this.inlineQueue[this.inlineQueue.length-1].src=Qt.text):lt.push(St);continue}if(rt){var Eo="Infinite loop on byte: "+rt.charCodeAt(0);if(this.options.silent){console.error(Eo);break}else throw new Error(Eo)}}return this.state.top=!0,lt},Tt.inline=function(rt,lt){this.inlineQueue.push({src:rt,tokens:lt})},Tt.inlineTokens=function(rt,lt){var bt=this;lt===void 0&&(lt=[]);var St,Qt,bo,qt=rt,Eo,Ro,zo;if(this.tokens.links){var Bo=Object.keys(this.tokens.links);if(Bo.length>0)for(;(Eo=this.tokenizer.rules.inline.reflinkSearch.exec(qt))!=null;)Bo.includes(Eo[0].slice(Eo[0].lastIndexOf("[")+1,-1))&&(qt=qt.slice(0,Eo.index)+"["+ce("a",Eo[0].length-2)+"]"+qt.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(Eo=this.tokenizer.rules.inline.blockSkip.exec(qt))!=null;)qt=qt.slice(0,Eo.index)+"["+ce("a",Eo[0].length-2)+"]"+qt.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);for(;(Eo=this.tokenizer.rules.inline.escapedEmSt.exec(qt))!=null;)qt=qt.slice(0,Eo.index)+"++"+qt.slice(this.tokenizer.rules.inline.escapedEmSt.lastIndex);for(;rt;){if(Ro||(zo=""),Ro=!1,this.options.extensions&&this.options.extensions.inline&&this.options.extensions.inline.some(function(fo){return(St=fo.call({lexer:bt},rt,lt))?(rt=rt.substring(St.raw.length),lt.push(St),!0):!1}))continue;if(St=this.tokenizer.escape(rt)){rt=rt.substring(St.raw.length),lt.push(St);continue}if(St=this.tokenizer.tag(rt)){rt=rt.substring(St.raw.length),Qt=lt[lt.length-1],Qt&&St.type==="text"&&Qt.type==="text"?(Qt.raw+=St.raw,Qt.text+=St.text):lt.push(St);continue}if(St=this.tokenizer.link(rt)){rt=rt.substring(St.raw.length),lt.push(St);continue}if(St=this.tokenizer.reflink(rt,this.tokens.links)){rt=rt.substring(St.raw.length),Qt=lt[lt.length-1],Qt&&St.type==="text"&&Qt.type==="text"?(Qt.raw+=St.raw,Qt.text+=St.text):lt.push(St);continue}if(St=this.tokenizer.emStrong(rt,qt,zo)){rt=rt.substring(St.raw.length),lt.push(St);continue}if(St=this.tokenizer.codespan(rt)){rt=rt.substring(St.raw.length),lt.push(St);continue}if(St=this.tokenizer.br(rt)){rt=rt.substring(St.raw.length),lt.push(St);continue}if(St=this.tokenizer.del(rt)){rt=rt.substring(St.raw.length),lt.push(St);continue}if(St=this.tokenizer.autolink(rt,it)){rt=rt.substring(St.raw.length),lt.push(St);continue}if(!this.state.inLink&&(St=this.tokenizer.url(rt,it))){rt=rt.substring(St.raw.length),lt.push(St);continue}if(bo=rt,this.options.extensions&&this.options.extensions.startInline&&function(){var fo=Infinity,ri=rt.slice(1),Zo=void 0;bt.options.extensions.startInline.forEach(function(ci){Zo=ci.call({lexer:this},ri),typeof Zo=="number"&&Zo>=0&&(fo=Math.min(fo,Zo))}),fo<Infinity&&fo>=0&&(bo=rt.substring(0,fo+1))}(),St=this.tokenizer.inlineText(bo,Ve)){rt=rt.substring(St.raw.length),St.raw.slice(-1)!=="_"&&(zo=St.raw.slice(-1)),Ro=!0,Qt=lt[lt.length-1],Qt&&Qt.type==="text"?(Qt.raw+=St.raw,Qt.text+=St.text):lt.push(St);continue}if(rt){var Jt="Infinite loop on byte: "+rt.charCodeAt(0);if(this.options.silent){console.error(Jt);break}else throw new Error(Jt)}}return lt},w(_t,null,[{key:"rules",get:function(){return{block:$e,inline:ot}}}]),_t}(),It=p.exports.defaults,Rt=Be.cleanUrl,vo=Be.escape,Mo=function(){function _t(Nt){this.options=Nt||It}var Tt=_t.prototype;return Tt.code=function(rt,lt,bt){var St=(lt||"").match(/\S*/)[0];if(this.options.highlight){var Qt=this.options.highlight(rt,St);Qt!=null&&Qt!==rt&&(bt=!0,rt=Qt)}return rt=rt.replace(/\n$/,"")+`
|
|
|
`,St?'<pre><code class="'+this.options.langPrefix+vo(St,!0)+'">'+(bt?rt:vo(rt,!0))+`</code></pre>
|
|
|
`:"<pre><code>"+(bt?rt:vo(rt,!0))+`</code></pre>
|
|
|
`},Tt.blockquote=function(rt){return`<blockquote>
|
|
|
`+rt+`</blockquote>
|
|
|
`},Tt.html=function(rt){return rt},Tt.heading=function(rt,lt,bt,St){return this.options.headerIds?"<h"+lt+' id="'+this.options.headerPrefix+St.slug(bt)+'">'+rt+"</h"+lt+`>
|
|
|
`:"<h"+lt+">"+rt+"</h"+lt+`>
|
|
|
`},Tt.hr=function(){return this.options.xhtml?`<hr/>
|
|
|
`:`<hr>
|
|
|
`},Tt.list=function(rt,lt,bt){var St=lt?"ol":"ul",Qt=lt&&bt!==1?' start="'+bt+'"':"";return"<"+St+Qt+`>
|
|
|
`+rt+"</"+St+`>
|
|
|
`},Tt.listitem=function(rt){return"<li>"+rt+`</li>
|
|
|
`},Tt.checkbox=function(rt){return"<input "+(rt?'checked="" ':"")+'disabled="" type="checkbox"'+(this.options.xhtml?" /":"")+"> "},Tt.paragraph=function(rt){return"<p>"+rt+`</p>
|
|
|
`},Tt.table=function(rt,lt){return lt&&(lt="<tbody>"+lt+"</tbody>"),`<table>
|
|
|
<thead>
|
|
|
`+rt+`</thead>
|
|
|
`+lt+`</table>
|
|
|
`},Tt.tablerow=function(rt){return`<tr>
|
|
|
`+rt+`</tr>
|
|
|
`},Tt.tablecell=function(rt,lt){var bt=lt.header?"th":"td",St=lt.align?"<"+bt+' align="'+lt.align+'">':"<"+bt+">";return St+rt+"</"+bt+`>
|
|
|
`},Tt.strong=function(rt){return"<strong>"+rt+"</strong>"},Tt.em=function(rt){return"<em>"+rt+"</em>"},Tt.codespan=function(rt){return"<code>"+rt+"</code>"},Tt.br=function(){return this.options.xhtml?"<br/>":"<br>"},Tt.del=function(rt){return"<del>"+rt+"</del>"},Tt.link=function(rt,lt,bt){if(rt=Rt(this.options.sanitize,this.options.baseUrl,rt),rt===null)return bt;var St='<a href="'+vo(rt)+'"';return lt&&(St+=' title="'+lt+'"'),St+=">"+bt+"</a>",St},Tt.image=function(rt,lt,bt){if(rt=Rt(this.options.sanitize,this.options.baseUrl,rt),rt===null)return bt;var St='<img src="'+rt+'" alt="'+bt+'"';return lt&&(St+=' title="'+lt+'"'),St+=this.options.xhtml?"/>":">",St},Tt.text=function(rt){return rt},_t}(),xo=function(){function _t(){}var Tt=_t.prototype;return Tt.strong=function(rt){return rt},Tt.em=function(rt){return rt},Tt.codespan=function(rt){return rt},Tt.del=function(rt){return rt},Tt.html=function(rt){return rt},Tt.text=function(rt){return rt},Tt.link=function(rt,lt,bt){return""+bt},Tt.image=function(rt,lt,bt){return""+bt},Tt.br=function(){return""},_t}(),Do=function(){function _t(){this.seen={}}var Tt=_t.prototype;return Tt.serialize=function(rt){return rt.toLowerCase().trim().replace(/<[!\/a-z].*?>/ig,"").replace(/[\u2000-\u206F\u2E00-\u2E7F\\'!"#$%&()*+,./:;<=>?@[\]^`{|}~]/g,"").replace(/\s/g,"-")},Tt.getNextSafeSlug=function(rt,lt){var bt=rt,St=0;if(this.seen.hasOwnProperty(bt)){St=this.seen[rt];do St++,bt=rt+"-"+St;while(this.seen.hasOwnProperty(bt))}return lt||(this.seen[rt]=St,this.seen[bt]=0),bt},Tt.slug=function(rt,lt){lt===void 0&&(lt={});var bt=this.serialize(rt);return this.getNextSafeSlug(bt,lt.dryrun)},_t}(),Lo=Mo,To=xo,Vt=Do,xt=p.exports.defaults,ze=Be.unescape,ct=function(){function _t(Nt){this.options=Nt||xt,this.options.renderer=this.options.renderer||new Lo,this.renderer=this.options.renderer,this.renderer.options=this.options,this.textRenderer=new To,this.slugger=new Vt}_t.parse=function(rt,lt){var bt=new _t(lt);return bt.parse(rt)},_t.parseInline=function(rt,lt){var bt=new _t(lt);return bt.parseInline(rt)};var Tt=_t.prototype;return Tt.parse=function(rt,lt){lt===void 0&&(lt=!0);var bt="",St,Qt,bo,qt,Eo,Ro,zo,Bo,Jt,fo,ri,Zo,ci,ki,wi,Zi,Vi,vi,sn,en=rt.length;for(St=0;St<en;St++){if(fo=rt[St],this.options.extensions&&this.options.extensions.renderers&&this.options.extensions.renderers[fo.type]&&(sn=this.options.extensions.renderers[fo.type].call({parser:this},fo),sn!==!1||!["space","hr","heading","code","table","blockquote","list","html","paragraph","text"].includes(fo.type))){bt+=sn||"";continue}switch(fo.type){case"space":continue;case"hr":{bt+=this.renderer.hr();continue}case"heading":{bt+=this.renderer.heading(this.parseInline(fo.tokens),fo.depth,ze(this.parseInline(fo.tokens,this.textRenderer)),this.slugger);continue}case"code":{bt+=this.renderer.code(fo.text,fo.lang,fo.escaped);continue}case"table":{for(Bo="",zo="",qt=fo.header.length,Qt=0;Qt<qt;Qt++)zo+=this.renderer.tablecell(this.parseInline(fo.header[Qt].tokens),{header:!0,align:fo.align[Qt]});for(Bo+=this.renderer.tablerow(zo),Jt="",qt=fo.rows.length,Qt=0;Qt<qt;Qt++){for(Ro=fo.rows[Qt],zo="",Eo=Ro.length,bo=0;bo<Eo;bo++)zo+=this.renderer.tablecell(this.parseInline(Ro[bo].tokens),{header:!1,align:fo.align[bo]});Jt+=this.renderer.tablerow(zo)}bt+=this.renderer.table(Bo,Jt);continue}case"blockquote":{Jt=this.parse(fo.tokens),bt+=this.renderer.blockquote(Jt);continue}case"list":{for(ri=fo.ordered,Zo=fo.start,ci=fo.loose,qt=fo.items.length,Jt="",Qt=0;Qt<qt;Qt++)wi=fo.items[Qt],Zi=wi.checked,Vi=wi.task,ki="",wi.task&&(vi=this.renderer.checkbox(Zi),ci?wi.tokens.length>0&&wi.tokens[0].type==="paragraph"?(wi.tokens[0].text=vi+" "+wi.tokens[0].text,wi.tokens[0].tokens&&wi.tokens[0].tokens.length>0&&wi.tokens[0].tokens[0].type==="text"&&(wi.tokens[0].tokens[0].text=vi+" "+wi.tokens[0].tokens[0].text)):wi.tokens.unshift({type:"text",text:vi}):ki+=vi),ki+=this.parse(wi.tokens,ci),Jt+=this.renderer.listitem(ki,Vi,Zi);bt+=this.renderer.list(Jt,ri,Zo);continue}case"html":{bt+=this.renderer.html(fo.text);continue}case"paragraph":{bt+=this.renderer.paragraph(this.parseInline(fo.tokens));continue}case"text":{for(Jt=fo.tokens?this.parseInline(fo.tokens):fo.text;St+1<en&&rt[St+1].type==="text";)fo=rt[++St],Jt+=`
|
|
|
`+(fo.tokens?this.parseInline(fo.tokens):fo.text);bt+=lt?this.renderer.paragraph(Jt):Jt;continue}default:{var on='Token with "'+fo.type+'" type was not found.';if(this.options.silent){console.error(on);return}else throw new Error(on)}}}return bt},Tt.parseInline=function(rt,lt){lt=lt||this.renderer;var bt="",St,Qt,bo,qt=rt.length;for(St=0;St<qt;St++){if(Qt=rt[St],this.options.extensions&&this.options.extensions.renderers&&this.options.extensions.renderers[Qt.type]&&(bo=this.options.extensions.renderers[Qt.type].call({parser:this},Qt),bo!==!1||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(Qt.type))){bt+=bo||"";continue}switch(Qt.type){case"escape":{bt+=lt.text(Qt.text);break}case"html":{bt+=lt.html(Qt.text);break}case"link":{bt+=lt.link(Qt.href,Qt.title,this.parseInline(Qt.tokens,lt));break}case"image":{bt+=lt.image(Qt.href,Qt.title,Qt.text);break}case"strong":{bt+=lt.strong(this.parseInline(Qt.tokens,lt));break}case"em":{bt+=lt.em(this.parseInline(Qt.tokens,lt));break}case"codespan":{bt+=lt.codespan(Qt.text);break}case"br":{bt+=lt.br();break}case"del":{bt+=lt.del(this.parseInline(Qt.tokens,lt));break}case"text":{bt+=lt.text(Qt.text);break}default:{var Eo='Token with "'+Qt.type+'" type was not found.';if(this.options.silent){console.error(Eo);return}else throw new Error(Eo)}}}return bt},_t}(),Ut=Et,Qe=ct,tt=W,ut=Mo,Dt=xo,Pt=Do,Wt=Be.merge,zt=Be.checkSanitizeDeprecation,so=Be.escape,wo=p.exports.getDefaults,No=p.exports.changeDefaults,di=p.exports.defaults;function _o(_t,Tt,Nt){if(typeof _t=="undefined"||_t===null)throw new Error("marked(): input parameter is undefined or null");if(typeof _t!="string")throw new Error("marked(): input parameter is of type "+Object.prototype.toString.call(_t)+", string expected");if(typeof Tt=="function"&&(Nt=Tt,Tt=null),Tt=Wt({},_o.defaults,Tt||{}),zt(Tt),Nt){var rt=Tt.highlight,lt;try{lt=Ut.lex(_t,Tt)}catch(bo){return Nt(bo)}var bt=function(qt){var Eo;if(!qt)try{Tt.walkTokens&&_o.walkTokens(lt,Tt.walkTokens),Eo=Qe.parse(lt,Tt)}catch(Ro){qt=Ro}return Tt.highlight=rt,qt?Nt(qt):Nt(null,Eo)};if(!rt||rt.length<3)return bt();if(delete Tt.highlight,!lt.length)return bt();var St=0;_o.walkTokens(lt,function(bo){bo.type==="code"&&(St++,setTimeout(function(){rt(bo.text,bo.lang,function(qt,Eo){if(qt)return bt(qt);Eo!=null&&Eo!==bo.text&&(bo.text=Eo,bo.escaped=!0),St--,St===0&&bt()})},0))}),St===0&&bt();return}try{var Qt=Ut.lex(_t,Tt);return Tt.walkTokens&&_o.walkTokens(Qt,Tt.walkTokens),Qe.parse(Qt,Tt)}catch(bo){if(bo.message+=`
|
|
|
Please report this to https://github.com/markedjs/marked.`,Tt.silent)return"<p>An error occurred:</p><pre>"+so(bo.message+"",!0)+"</pre>";throw bo}}_o.options=_o.setOptions=function(_t){return Wt(_o.defaults,_t),No(_o.defaults),_o},_o.getDefaults=wo,_o.defaults=di,_o.use=function(){for(var _t=this,Tt=arguments.length,Nt=new Array(Tt),rt=0;rt<Tt;rt++)Nt[rt]=arguments[rt];var lt=Wt.apply(void 0,[{}].concat(Nt)),bt=_o.defaults.extensions||{renderers:{},childTokens:{}},St;Nt.forEach(function(Qt){if(Qt.extensions&&(St=!0,Qt.extensions.forEach(function(qt){if(!qt.name)throw new Error("extension name required");if(qt.renderer){var Eo=bt.renderers?bt.renderers[qt.name]:null;Eo?bt.renderers[qt.name]=function(){for(var Ro=arguments.length,zo=new Array(Ro),Bo=0;Bo<Ro;Bo++)zo[Bo]=arguments[Bo];var Jt=qt.renderer.apply(this,zo);return Jt===!1&&(Jt=Eo.apply(this,zo)),Jt}:bt.renderers[qt.name]=qt.renderer}if(qt.tokenizer){if(!qt.level||qt.level!=="block"&&qt.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");bt[qt.level]?bt[qt.level].unshift(qt.tokenizer):bt[qt.level]=[qt.tokenizer],qt.start&&(qt.level==="block"?bt.startBlock?bt.startBlock.push(qt.start):bt.startBlock=[qt.start]:qt.level==="inline"&&(bt.startInline?bt.startInline.push(qt.start):bt.startInline=[qt.start]))}qt.childTokens&&(bt.childTokens[qt.name]=qt.childTokens)})),Qt.renderer&&function(){var qt=_o.defaults.renderer||new ut,Eo=function(Bo){var Jt=qt[Bo];qt[Bo]=function(){for(var fo=arguments.length,ri=new Array(fo),Zo=0;Zo<fo;Zo++)ri[Zo]=arguments[Zo];var ci=Qt.renderer[Bo].apply(qt,ri);return ci===!1&&(ci=Jt.apply(qt,ri)),ci}};for(var Ro in Qt.renderer)Eo(Ro);lt.renderer=qt}(),Qt.tokenizer&&function(){var qt=_o.defaults.tokenizer||new tt,Eo=function(Bo){var Jt=qt[Bo];qt[Bo]=function(){for(var fo=arguments.length,ri=new Array(fo),Zo=0;Zo<fo;Zo++)ri[Zo]=arguments[Zo];var ci=Qt.tokenizer[Bo].apply(qt,ri);return ci===!1&&(ci=Jt.apply(qt,ri)),ci}};for(var Ro in Qt.tokenizer)Eo(Ro);lt.tokenizer=qt}(),Qt.walkTokens){var bo=_o.defaults.walkTokens;lt.walkTokens=function(qt){Qt.walkTokens.call(_t,qt),bo&&bo(qt)}}St&&(lt.extensions=bt),_o.setOptions(lt)})},_o.walkTokens=function(_t,Tt){for(var Nt=function(){var St=lt.value;Tt(St);switch(St.type){case"table":{for(var Qt=c(St.header),bo;!(bo=Qt()).done;){var qt=bo.value;_o.walkTokens(qt.tokens,Tt)}for(var Eo=c(St.rows),Ro;!(Ro=Eo()).done;)for(var zo=Ro.value,Bo=c(zo),Jt;!(Jt=Bo()).done;){var fo=Jt.value;_o.walkTokens(fo.tokens,Tt)}break}case"list":{_o.walkTokens(St.items,Tt);break}default:_o.defaults.extensions&&_o.defaults.extensions.childTokens&&_o.defaults.extensions.childTokens[St.type]?_o.defaults.extensions.childTokens[St.type].forEach(function(ri){_o.walkTokens(St[ri],Tt)}):St.tokens&&_o.walkTokens(St.tokens,Tt)}},rt=c(_t),lt;!(lt=rt()).done;)Nt()},_o.parseInline=function(_t,Tt){if(typeof _t=="undefined"||_t===null)throw new Error("marked.parseInline(): input parameter is undefined or null");if(typeof _t!="string")throw new Error("marked.parseInline(): input parameter is of type "+Object.prototype.toString.call(_t)+", string expected");Tt=Wt({},_o.defaults,Tt||{}),zt(Tt);try{var Nt=Ut.lexInline(_t,Tt);return Tt.walkTokens&&_o.walkTokens(Nt,Tt.walkTokens),Qe.parseInline(Nt,Tt)}catch(rt){if(rt.message+=`
|
|
|
Please report this to https://github.com/markedjs/marked.`,Tt.silent)return"<p>An error occurred:</p><pre>"+so(rt.message+"",!0)+"</pre>";throw rt}},_o.Parser=Qe,_o.parser=Qe.parse,_o.Renderer=ut,_o.TextRenderer=Dt,_o.Lexer=Ut,_o.lexer=Ut.lex,_o.Tokenizer=tt,_o.Slugger=Pt,_o.parse=_o;var no=_o;return no})})();var x=B,R=B.Parser,A=B.parser,j=B.Renderer,I=B.TextRenderer,v=B.Lexer,C=B.lexer,m=B.Tokenizer,d=B.Slugger,D=B.parse}).call(this,t("JVxT")(mt))},SvYn:function(mt,M,t){"use strict";t.r(M);var g=t("+hIS");Object(g.a)({id:"dockerfile",extensions:[".dockerfile"],filenames:["Dockerfile"],aliases:["Dockerfile"],loader:function(){return t.e(331).then(t.bind(null,"Dsrv"))}})},Szf2:function(mt,M,t){"use strict";t.d(M,"e",function(){return B}),t.d(M,"d",function(){return R}),t.d(M,"a",function(){return A}),t.d(M,"c",function(){return I}),t.d(M,"b",function(){return v});var g=t("/cxE");function B(C,m){if(C===0)return null;const d=(C&65535)>>>0,D=(C&4294901760)>>>16;return D!==0?new A([x(d,m),x(D,m)]):new A([x(d,m)])}function x(C,m){const d=!!(C&2048),D=!!(C&256),L=m===2?D:d,r=!!(C&1024),w=!!(C&512),b=m===2?d:D,u=C&255;return new R(L,r,w,b,u)}class R{constructor(C,m,d,D,L){this.ctrlKey=C,this.shiftKey=m,this.altKey=d,this.metaKey=D,this.keyCode=L}equals(C){return this.ctrlKey===C.ctrlKey&&this.shiftKey===C.shiftKey&&this.altKey===C.altKey&&this.metaKey===C.metaKey&&this.keyCode===C.keyCode}isModifierKey(){return this.keyCode===0||this.keyCode===5||this.keyCode===57||this.keyCode===6||this.keyCode===4}toChord(){return new A([this])}isDuplicateModifierCase(){return this.ctrlKey&&this.keyCode===5||this.shiftKey&&this.keyCode===4||this.altKey&&this.keyCode===6||this.metaKey&&this.keyCode===57}}class A{constructor(C){if(C.length===0)throw Object(g.c)("parts");this.parts=C}}class j{constructor(C,m,d,D,L){this.ctrlKey=C,this.shiftKey=m,this.altKey=d,this.metaKey=D,this.scanCode=L}isDuplicateModifierCase(){return this.ctrlKey&&(this.scanCode===157||this.scanCode===161)||this.shiftKey&&(this.scanCode===158||this.scanCode===162)||this.altKey&&(this.scanCode===159||this.scanCode===163)||this.metaKey&&(this.scanCode===160||this.scanCode===164)}}class I{constructor(C,m,d,D,L,r){this.ctrlKey=C,this.shiftKey=m,this.altKey=d,this.metaKey=D,this.keyLabel=L,this.keyAriaLabel=r}}class v{}},TQUy:function(mt,M,t){"use strict";t.d(M,"b",function(){return A}),t.d(M,"a",function(){return j});var g=t("N0LK"),B=t("4bUh"),x=t("i/Ef");const R={getInitialState:()=>x.b,tokenize2:(v,C,m,d)=>Object(x.d)(0,v,m,d)};function A(v,C,m=R){return I(v,C,m||R)}function j(v,C,m,d,D,L,r){let w="<div>",b=d,u=0,c=!0;for(let p=0,S=C.getCount();p<S;p++){const E=C.getEndOffset(p);if(E<=d)continue;let y="";for(;b<E&&b<D;b++){const O=v.charCodeAt(b);switch(O){case 9:let k=L-(b+u)%L;for(u+=k-1;k>0;)r&&c?(y+=" ",c=!1):(y+=" ",c=!0),k--;break;case 60:y+="<",c=!1;break;case 62:y+=">",c=!1;break;case 38:y+="&",c=!1;break;case 0:y+="�",c=!1;break;case 65279:case 8232:case 8233:case 133:y+="\uFFFD",c=!1;break;case 13:y+="​",c=!1;break;case 32:r&&c?(y+=" ",c=!1):(y+=" ",c=!0);break;default:y+=String.fromCharCode(O),c=!1}}if(w+=`<span style="${C.getInlineStyle(p,m)}">${y}</span>`,E>D||b>=D)break}return w+="</div>",w}function I(v,C,m){let d='<div class="monaco-tokenized-source">';const D=g.Q(v);let L=m.getInitialState();for(let r=0,w=D.length;r<w;r++){const b=D[r];r>0&&(d+="<br/>");const u=m.tokenize2(b,!0,L,0);B.a.convertToEndOffset(u.tokens,b.length);const c=new B.a(u.tokens,b,C),p=c.inflate();let S=0;for(let E=0,y=p.getCount();E<y;E++){const O=p.getClassName(E),k=p.getEndOffset(E);d+=`<span class="${O}">${g.s(b.substring(S,k))}</span>`,S=k}L=u.endState}return d+="</div>",d}},TT2d:function(mt,M,t){},Tcc1:function(mt,M,t){"use strict";t.d(M,"a",function(){return g}),t.d(M,"b",function(){return B}),t.d(M,"c",function(){return x});class g{constructor(R,A,j){this._tokenBrand=void 0,this.offset=R|0,this.type=A,this.language=j}toString(){return"("+this.offset+", "+this.type+")"}}class B{constructor(R,A){this._tokenizationResultBrand=void 0,this.tokens=R,this.endState=A}}class x{constructor(R,A){this._tokenizationResult2Brand=void 0,this.tokens=R,this.endState=A}}},UCkY:function(mt,M,t){},Uzvx:function(mt,M,t){"use strict";t.d(M,"b",function(){return B}),t.d(M,"a",function(){return x});var g=t("Cg/j");const B=Object(g.c)("contextViewService"),x=Object(g.c)("contextMenuService")},VPJY:function(mt,M,t){},Vtyv:function(mt,M,t){},VvMK:function(mt,M,t){},Vxe3:function(mt,M,t){"use strict";t.d(M,"a",function(){return B});var g=t("Cg/j");const B=Object(g.c)("codeEditorService")},W9cx:function(mt,M,t){"use strict";t.d(M,"a",function(){return j}),t.d(M,"b",function(){return I}),t.d(M,"c",function(){return v});var g=t("pmY6"),B=t("N0LK"),x=t("bY76"),R=t("Cg/j"),A=function(C,m,d,D){function L(r){return r instanceof d?r:new d(function(w){w(r)})}return new(d||(d=Promise))(function(r,w){function b(p){try{c(D.next(p))}catch(S){w(S)}}function u(p){try{c(D.throw(p))}catch(S){w(S)}}function c(p){p.done?r(p.value):L(p.value).then(b,u)}c((D=D.apply(C,m||[])).next())})};const j=Object(R.c)("openerService"),I=Object.freeze({_serviceBrand:void 0,registerOpener(){return g.a.None},registerValidator(){return g.a.None},registerExternalUriResolver(){return g.a.None},setDefaultExternalOpener(){},registerExternalOpener(){return g.a.None},open(){return A(this,void 0,void 0,function*(){return!1})},resolveExternalUri(C){return A(this,void 0,void 0,function*(){return{resolved:C,dispose(){}}})}});function v(C,m){return x.a.isUri(C)?Object(B.r)(C.scheme,m):Object(B.R)(C,m+":")}},WBhO:function(mt,M,t){"use strict";t.d(M,"a",function(){return B});var g=t("Cg/j");const B=Object(g.c)("modeService")},WaSP:function(mt,M,t){"use strict";t.d(M,"a",function(){return V});var g=t("6OMU"),B=t("pmY6"),x=t("N0LK"),R=t("dFcq"),A=t("0/Sa"),j=t("aokT"),I=t("gCVg"),v=t("tX9W"),C=t("R8sh"),m=t("MD5Z"),d=t("t9D7"),D=t("EWX2"),L=t("uACm"),r=t("3rx1"),w=t("MrjW"),b=t("gslv");const u=new Uint8Array(16),c=[];for(let G=0;G<256;G++)c.push(G.toString(16).padStart(2,"0"));let p;typeof crypto=="object"&&typeof crypto.getRandomValues=="function"?p=crypto.getRandomValues.bind(crypto):p=function(G){for(let ee=0;ee<G.length;ee++)G[ee]=Math.floor(Math.random()*256);return G};function S(){p(u),u[6]=u[6]&15|64,u[8]=u[8]&63|128;let G=0,ee="";return ee+=c[u[G++]],ee+=c[u[G++]],ee+=c[u[G++]],ee+=c[u[G++]],ee+="-",ee+=c[u[G++]],ee+=c[u[G++]],ee+="-",ee+=c[u[G++]],ee+=c[u[G++]],ee+="-",ee+=c[u[G++]],ee+=c[u[G++]],ee+="-",ee+=c[u[G++]],ee+=c[u[G++]],ee+=c[u[G++]],ee+=c[u[G++]],ee+=c[u[G++]],ee+=c[u[G++]],ee}var E=t("cMvZ"),y=t("3/fG"),O=t("bY76");const k="code-workspace";function Q(G){const ee=G;return typeof(ee==null?void 0:ee.id)=="string"&&O.a.isUri(ee.uri)}function q(G){return G.configuration?{id:G.id,configPath:G.configuration}:G.folders.length===1?{id:G.id,uri:G.folders[0].uri}:void 0}class z{constructor(G){this._delegates=G}resolve(G){for(const ee of this._delegates){let pe=ee.resolve(G);if(pe!==void 0)return pe}return}}class J{constructor(G,ee,pe,Te){this._model=G,this._selection=ee,this._selectionIdx=pe,this._overtypingCapturer=Te}resolve(G){const{name:ee}=G;if(ee==="SELECTION"||ee==="TM_SELECTED_TEXT"){let pe=this._model.getValueInRange(this._selection)||void 0,Te=this._selection.startLineNumber!==this._selection.endLineNumber;if(!pe&&this._overtypingCapturer){const Ie=this._overtypingCapturer.getLastOvertypedInfo(this._selectionIdx);Ie&&(pe=Ie.value,Te=Ie.multiline)}if(pe&&Te&&G.snippet){const Ie=this._model.getLineContent(this._selection.startLineNumber),Me=Object(x.x)(Ie,0,this._selection.startColumn-1);let Oe=Me;G.snippet.walk(fe=>fe===G?!1:(fe instanceof L.d&&(Oe=Object(x.x)(Object(x.Q)(fe.value).pop())),!0));const Xe=Object(x.d)(Oe,Me);pe=pe.replace(/(\r\n|\r|\n)(.*)/g,(fe,Pe,Be)=>`${Pe}${Oe.substr(Xe)}${Be}`)}return pe}else{if(ee==="TM_CURRENT_LINE")return this._model.getLineContent(this._selection.positionLineNumber);if(ee==="TM_CURRENT_WORD"){const pe=this._model.getWordAtPosition({lineNumber:this._selection.positionLineNumber,column:this._selection.positionColumn});return pe&&pe.word||void 0}else{if(ee==="TM_LINE_INDEX")return String(this._selection.positionLineNumber-1);if(ee==="TM_LINE_NUMBER")return String(this._selection.positionLineNumber)}}return}}class re{constructor(G,ee){this._labelService=G,this._model=ee}resolve(G){const{name:ee}=G;if(ee==="TM_FILENAME")return w.a(this._model.uri.fsPath);if(ee==="TM_FILENAME_BASE"){const pe=w.a(this._model.uri.fsPath),Te=pe.lastIndexOf(".");return Te<=0?pe:pe.slice(0,Te)}else{if(ee==="TM_DIRECTORY")return w.b(this._model.uri.fsPath)==="."?"":this._labelService.getUriLabel(Object(b.d)(this._model.uri));if(ee==="TM_FILEPATH")return this._labelService.getUriLabel(this._model.uri);if(ee==="RELATIVE_FILEPATH")return this._labelService.getUriLabel(this._model.uri,{relative:!0,noPrefix:!0})}return}}class Z{constructor(G,ee,pe,Te){this._readClipboardText=G,this._selectionIdx=ee,this._selectionCount=pe,this._spread=Te}resolve(G){if(G.name!=="CLIPBOARD")return;const ee=this._readClipboardText();if(!ee)return;if(this._spread){const pe=ee.split(/\r\n|\n|\r/).filter(Te=>!Object(x.C)(Te));if(pe.length===this._selectionCount)return pe[this._selectionIdx]}return ee}}class ne{constructor(G,ee){this._model=G,this._selection=ee}resolve(G){const{name:ee}=G,pe=this._model.getLanguageIdAtPosition(this._selection.selectionStartLineNumber,this._selection.selectionStartColumn),Te=E.b.getComments(pe);return Te?ee==="LINE_COMMENT"?Te.lineCommentToken||void 0:ee==="BLOCK_COMMENT_START"?Te.blockCommentStartToken||void 0:ee==="BLOCK_COMMENT_END"&&Te.blockCommentEndToken||void 0:void 0}}class le{constructor(){this._date=new Date}resolve(G){const{name:ee}=G;return ee==="CURRENT_YEAR"?String(this._date.getFullYear()):ee==="CURRENT_YEAR_SHORT"?String(this._date.getFullYear()).slice(-2):ee==="CURRENT_MONTH"?String(this._date.getMonth().valueOf()+1).padStart(2,"0"):ee==="CURRENT_DATE"?String(this._date.getDate().valueOf()).padStart(2,"0"):ee==="CURRENT_HOUR"?String(this._date.getHours().valueOf()).padStart(2,"0"):ee==="CURRENT_MINUTE"?String(this._date.getMinutes().valueOf()).padStart(2,"0"):ee==="CURRENT_SECOND"?String(this._date.getSeconds().valueOf()).padStart(2,"0"):ee==="CURRENT_DAY_NAME"?le.dayNames[this._date.getDay()]:ee==="CURRENT_DAY_NAME_SHORT"?le.dayNamesShort[this._date.getDay()]:ee==="CURRENT_MONTH_NAME"?le.monthNames[this._date.getMonth()]:ee==="CURRENT_MONTH_NAME_SHORT"?le.monthNamesShort[this._date.getMonth()]:ee==="CURRENT_SECONDS_UNIX"?String(Math.floor(this._date.getTime()/1e3)):void 0}}le.dayNames=[y.a("Sunday","Sunday"),y.a("Monday","Monday"),y.a("Tuesday","Tuesday"),y.a("Wednesday","Wednesday"),y.a("Thursday","Thursday"),y.a("Friday","Friday"),y.a("Saturday","Saturday")],le.dayNamesShort=[y.a("SundayShort","Sun"),y.a("MondayShort","Mon"),y.a("TuesdayShort","Tue"),y.a("WednesdayShort","Wed"),y.a("ThursdayShort","Thu"),y.a("FridayShort","Fri"),y.a("SaturdayShort","Sat")],le.monthNames=[y.a("January","January"),y.a("February","February"),y.a("March","March"),y.a("April","April"),y.a("May","May"),y.a("June","June"),y.a("July","July"),y.a("August","August"),y.a("September","September"),y.a("October","October"),y.a("November","November"),y.a("December","December")],le.monthNamesShort=[y.a("JanuaryShort","Jan"),y.a("FebruaryShort","Feb"),y.a("MarchShort","Mar"),y.a("AprilShort","Apr"),y.a("MayShort","May"),y.a("JuneShort","Jun"),y.a("JulyShort","Jul"),y.a("AugustShort","Aug"),y.a("SeptemberShort","Sep"),y.a("OctoberShort","Oct"),y.a("NovemberShort","Nov"),y.a("DecemberShort","Dec")];class _e{constructor(G){this._workspaceService=G}resolve(G){if(!this._workspaceService)return;const ee=q(this._workspaceService.getWorkspace());return ee?G.name==="WORKSPACE_NAME"?this._resolveWorkspaceName(ee):G.name==="WORKSPACE_FOLDER"?this._resoveWorkspacePath(ee):void 0:void 0}_resolveWorkspaceName(G){if(Q(G))return w.a(G.uri.path);let ee=w.a(G.configPath.path);return ee.endsWith(k)&&(ee=ee.substr(0,ee.length-k.length-1)),ee}_resoveWorkspacePath(G){if(Q(G))return Object(r.b)(G.uri.fsPath);let ee=w.a(G.configPath.path),pe=G.configPath.fsPath;return pe.endsWith(ee)&&(pe=pe.substr(0,pe.length-ee.length-1)),pe?Object(r.b)(pe):"/"}}class Ce{resolve(G){const{name:ee}=G;return ee==="RANDOM"?Math.random().toString().slice(-6):ee==="RANDOM_HEX"?Math.random().toString(16).slice(-6):ee==="UUID"?S():void 0}}Object(d.f)((G,ee)=>{function pe(Te){const Ie=G.getColor(Te);return Ie?Ie.toString():"transparent"}ee.addRule(`.monaco-editor .snippet-placeholder { background-color: ${pe(m.Ec)}; outline-color: ${pe(m.Fc)}; }`),ee.addRule(`.monaco-editor .finish-snippet-placeholder { background-color: ${pe(m.Cc)}; outline-color: ${pe(m.Dc)}; }`)});class oe{constructor(G,ee,pe,Te){this._editor=G,this._snippet=ee,this._offset=pe,this._snippetLineLeadingWhitespace=Te,this._nestingLevel=1,this._placeholderGroups=Object(g.l)(ee.placeholders,L.b.compareByIndex),this._placeholderGroupsIdx=-1}dispose(){this._placeholderDecorations&&this._editor.deltaDecorations([...this._placeholderDecorations.values()],[]),this._placeholderGroups.length=0}_initDecorations(){if(this._placeholderDecorations)return;this._placeholderDecorations=new Map;const G=this._editor.getModel();this._editor.changeDecorations(ee=>{for(const pe of this._snippet.placeholders){const Te=this._snippet.offset(pe),Ie=this._snippet.fullLen(pe),Me=j.a.fromPositions(G.getPositionAt(this._offset+Te),G.getPositionAt(this._offset+Te+Ie)),Oe=pe.isFinalTabstop?oe._decor.inactiveFinal:oe._decor.inactive,Xe=ee.addDecoration(Me,Oe);this._placeholderDecorations.set(pe,Xe)}})}move(G){if(!this._editor.hasModel())return[];if(this._initDecorations(),this._placeholderGroupsIdx>=0){let Te=[];for(const Ie of this._placeholderGroups[this._placeholderGroupsIdx])if(Ie.transform){const Me=this._placeholderDecorations.get(Ie),Oe=this._editor.getModel().getDecorationRange(Me),Xe=this._editor.getModel().getValueInRange(Oe),fe=Ie.transform.resolve(Xe).split(/\r\n|\r|\n/);for(let Pe=1;Pe<fe.length;Pe++)fe[Pe]=this._editor.getModel().normalizeIndentation(this._snippetLineLeadingWhitespace+fe[Pe]);Te.push(A.a.replace(Oe,fe.join(this._editor.getModel().getEOL())))}Te.length>0&&this._editor.executeEdits("snippet.placeholderTransform",Te)}let ee=!1;G===!0&&this._placeholderGroupsIdx<this._placeholderGroups.length-1?(this._placeholderGroupsIdx+=1,ee=!0):G===!1&&this._placeholderGroupsIdx>0&&(this._placeholderGroupsIdx-=1,ee=!0);const pe=this._editor.getModel().changeDecorations(Te=>{const Ie=new Set,Me=[];for(const Oe of this._placeholderGroups[this._placeholderGroupsIdx]){const Xe=this._placeholderDecorations.get(Oe),fe=this._editor.getModel().getDecorationRange(Xe);Me.push(new I.a(fe.startLineNumber,fe.startColumn,fe.endLineNumber,fe.endColumn)),ee=ee&&this._hasPlaceholderBeenCollapsed(Oe),Te.changeDecorationOptions(Xe,Oe.isFinalTabstop?oe._decor.activeFinal:oe._decor.active),Ie.add(Oe);for(const Pe of this._snippet.enclosingPlaceholders(Oe)){const Be=this._placeholderDecorations.get(Pe);Te.changeDecorationOptions(Be,Pe.isFinalTabstop?oe._decor.activeFinal:oe._decor.active),Ie.add(Pe)}}for(const[Oe,Xe]of this._placeholderDecorations)Ie.has(Oe)||Te.changeDecorationOptions(Xe,Oe.isFinalTabstop?oe._decor.inactiveFinal:oe._decor.inactive);return Me});return ee?this.move(G):pe!=null?pe:[]}_hasPlaceholderBeenCollapsed(G){let ee=G;for(;ee;){if(ee instanceof L.b){const pe=this._placeholderDecorations.get(ee),Te=this._editor.getModel().getDecorationRange(pe);if(Te.isEmpty()&&ee.toString().length>0)return!0}ee=ee.parent}return!1}get isAtFirstPlaceholder(){return this._placeholderGroupsIdx<=0||this._placeholderGroups.length===0}get isAtLastPlaceholder(){return this._placeholderGroupsIdx===this._placeholderGroups.length-1}get hasPlaceholder(){return this._snippet.placeholders.length>0}computePossibleSelections(){const G=new Map;for(const ee of this._placeholderGroups){let pe;for(const Te of ee){if(Te.isFinalTabstop)break;pe||(pe=[],G.set(Te.index,pe));const Ie=this._placeholderDecorations.get(Te),Me=this._editor.getModel().getDecorationRange(Ie);if(!Me){G.delete(Te.index);break}pe.push(Me)}}return G}get choice(){return this._placeholderGroups[this._placeholderGroupsIdx][0].choice}merge(G){const ee=this._editor.getModel();this._nestingLevel*=10,this._editor.changeDecorations(pe=>{for(const Te of this._placeholderGroups[this._placeholderGroupsIdx]){const Ie=G.shift();console.assert(!Ie._placeholderDecorations);const Me=Ie._snippet.placeholderInfo.last.index;for(const Xe of Ie._snippet.placeholderInfo.all)Xe.isFinalTabstop?Xe.index=Te.index+(Me+1)/this._nestingLevel:Xe.index=Te.index+Xe.index/this._nestingLevel;this._snippet.replace(Te,Ie._snippet.children);const Oe=this._placeholderDecorations.get(Te);pe.removeDecoration(Oe),this._placeholderDecorations.delete(Te);for(const Xe of Ie._snippet.placeholders){const fe=Ie._snippet.offset(Xe),Pe=Ie._snippet.fullLen(Xe),Be=j.a.fromPositions(ee.getPositionAt(Ie._offset+fe),ee.getPositionAt(Ie._offset+fe+Pe)),Se=pe.addDecoration(Be,oe._decor.inactive);this._placeholderDecorations.set(Xe,Se)}}this._placeholderGroups=Object(g.l)(this._snippet.placeholders,L.b.compareByIndex)})}}oe._decor={active:v.b.register({description:"snippet-placeholder-1",stickiness:0,className:"snippet-placeholder"}),inactive:v.b.register({description:"snippet-placeholder-2",stickiness:1,className:"snippet-placeholder"}),activeFinal:v.b.register({description:"snippet-placeholder-3",stickiness:1,className:"finish-snippet-placeholder"}),inactiveFinal:v.b.register({description:"snippet-placeholder-4",stickiness:1,className:"finish-snippet-placeholder"})};const ae={overwriteBefore:0,overwriteAfter:0,adjustWhitespace:!0,clipboardText:void 0,overtypingCapturer:void 0};class V{constructor(G,ee,pe=ae){this._templateMerges=[],this._snippets=[],this._editor=G,this._template=ee,this._options=pe}static adjustWhitespace(G,ee,pe,Te,Ie){const Me=G.getLineContent(ee.lineNumber),Oe=Object(x.x)(Me,0,ee.column-1);let Xe;return pe.walk(fe=>{if(!(fe instanceof L.d)||fe.parent instanceof L.a)return!0;const Pe=fe.value.split(/\r\n|\r|\n/);if(Te){const Se=pe.offset(fe);if(Se===0)Pe[0]=G.normalizeIndentation(Pe[0]);else{Xe=Xe!=null?Xe:pe.toString();let me=Xe.charCodeAt(Se-1);(me===10||me===13)&&(Pe[0]=G.normalizeIndentation(Oe+Pe[0]))}for(let me=1;me<Pe.length;me++)Pe[me]=G.normalizeIndentation(Oe+Pe[me])}const Be=Pe.join(G.getEOL());return Be!==fe.value&&(fe.parent.replace(fe,[new L.d(Be)]),Xe=void 0),!0}),Oe}static adjustSelection(G,ee,pe,Te){if(pe!==0||Te!==0){const{positionLineNumber:Ie,positionColumn:Me}=ee,Oe=Me-pe,Xe=Me+Te,fe=G.validateRange({startLineNumber:Ie,startColumn:Oe,endLineNumber:Ie,endColumn:Xe});ee=I.a.createWithDirection(fe.startLineNumber,fe.startColumn,fe.endLineNumber,fe.endColumn,ee.getDirection())}return ee}static createEditsAndSnippets(G,ee,pe,Te,Ie,Me,Oe,Xe){const fe=[],Pe=[];if(!G.hasModel())return{edits:fe,snippets:Pe};const Be=G.getModel(),Se=G.invokeWithinContext(U=>U.get(D.a)),me=G.invokeWithinContext(U=>new re(U.get(C.a),Be)),he=()=>Oe;let Le=0,we=Be.getValueInRange(V.adjustSelection(Be,G.getSelection(),pe,0)),ve=Be.getValueInRange(V.adjustSelection(Be,G.getSelection(),0,Te)),ie=Be.getLineFirstNonWhitespaceColumn(G.getSelection().positionLineNumber);const W=G.getSelections().map((U,se)=>({selection:U,idx:se})).sort((U,se)=>j.a.compareRangesUsingStarts(U.selection,se.selection));for(const{selection:U,idx:se}of W){let je=V.adjustSelection(Be,U,pe,0),Re=V.adjustSelection(Be,U,0,Te);we!==Be.getValueInRange(je)&&(je=U),ve!==Be.getValueInRange(Re)&&(Re=U);const We=U.setStartPosition(je.startLineNumber,je.startColumn).setEndPosition(Re.endLineNumber,Re.endColumn),dt=new L.c().parse(ee,!0,Ie),Lt=We.getStartPosition(),Ht=V.adjustWhitespace(Be,Lt,dt,Me||se>0&&ie!==Be.getLineFirstNonWhitespaceColumn(U.positionLineNumber),!0);dt.resolveVariables(new z([me,new Z(he,se,W.length,G.getOption(70)==="spread"),new J(Be,U,se,Xe),new ne(Be,U),new le,new _e(Se),new Ce]));const $e=Be.getOffsetAt(Lt)+Le;Le+=dt.toString().length-Be.getValueLengthInRange(We),fe[se]=A.a.replace(We,dt.toString()),fe[se].identifier={major:se,minor:0},Pe[se]=new oe(G,dt,$e,Ht)}return{edits:fe,snippets:Pe}}dispose(){Object(B.f)(this._snippets)}_logInfo(){return`template="${this._template}", merged_templates="${this._templateMerges.join(" -> ")}"`}insert(){if(!this._editor.hasModel())return;const{edits:G,snippets:ee}=V.createEditsAndSnippets(this._editor,this._template,this._options.overwriteBefore,this._options.overwriteAfter,!1,this._options.adjustWhitespace,this._options.clipboardText,this._options.overtypingCapturer);this._snippets=ee,this._editor.executeEdits("snippet",G,pe=>this._snippets[0].hasPlaceholder?this._move(!0):pe.filter(Te=>!!Te.identifier).map(Te=>I.a.fromPositions(Te.range.getEndPosition()))),this._editor.revealRange(this._editor.getSelections()[0])}merge(G,ee=ae){if(!this._editor.hasModel())return;this._templateMerges.push([this._snippets[0]._nestingLevel,this._snippets[0]._placeholderGroupsIdx,G]);const{edits:pe,snippets:Te}=V.createEditsAndSnippets(this._editor,G,ee.overwriteBefore,ee.overwriteAfter,!0,ee.adjustWhitespace,ee.clipboardText,ee.overtypingCapturer);this._editor.executeEdits("snippet",pe,Ie=>{for(const Me of this._snippets)Me.merge(Te);return console.assert(Te.length===0),this._snippets[0].hasPlaceholder?this._move(void 0):Ie.filter(Me=>!!Me.identifier).map(Me=>I.a.fromPositions(Me.range.getEndPosition()))})}next(){const G=this._move(!0);this._editor.setSelections(G),this._editor.revealPositionInCenterIfOutsideViewport(G[0].getPosition())}prev(){const G=this._move(!1);this._editor.setSelections(G),this._editor.revealPositionInCenterIfOutsideViewport(G[0].getPosition())}_move(G){const ee=[];for(const pe of this._snippets){const Te=pe.move(G);ee.push(...Te)}return ee}get isAtFirstPlaceholder(){return this._snippets[0].isAtFirstPlaceholder}get isAtLastPlaceholder(){return this._snippets[0].isAtLastPlaceholder}get hasPlaceholder(){return this._snippets[0].hasPlaceholder}get choice(){return this._snippets[0].choice}isSelectionWithinPlaceholders(){if(!this.hasPlaceholder)return!1;const G=this._editor.getSelections();if(G.length<this._snippets.length)return!1;let ee=new Map;for(const pe of this._snippets){const Te=pe.computePossibleSelections();if(ee.size===0)for(const[Ie,Me]of Te){Me.sort(j.a.compareRangesUsingStarts);for(const Oe of G)if(Me[0].containsRange(Oe)){ee.set(Ie,[]);break}}if(ee.size===0)return!1;ee.forEach((Ie,Me)=>{Ie.push(...Te.get(Me))})}G.sort(j.a.compareRangesUsingStarts);for(let[pe,Te]of ee){if(Te.length!==G.length){ee.delete(pe);continue}Te.sort(j.a.compareRangesUsingStarts);for(let Ie=0;Ie<Te.length;Ie++)if(!Te[Ie].containsRange(G[Ie])){ee.delete(pe);continue}}return ee.size>0}}},WqXY:function(mt,M,t){"use strict";t.d(M,"a",function(){return d});var g=t("EffR"),B=t("uDWl"),x=t("7/Ik"),R=t("8HAY"),A=t("MI8n"),j=t("pmY6"),I=t("746U"),v=t("yEoX"),C=t.n(v),m=function(D,L,r,w){function b(u){return u instanceof r?u:new r(function(c){c(u)})}return new(r||(r=Promise))(function(u,c){function p(y){try{E(w.next(y))}catch(O){c(O)}}function S(y){try{E(w.throw(y))}catch(O){c(O)}}function E(y){y.done?u(y.value):b(y.value).then(p,S)}E((w=w.apply(D,L||[])).next())})};class d extends j.a{constructor(D,L={}){var r,w,b,u,c,p;super();this.triggerKeyDown=!1,this.focusable=!0,this._onDidBlur=this._register(new A.b),this.onDidBlur=this._onDidBlur.event,this._onDidCancel=this._register(new A.b({onFirstListenerAdd:()=>this.cancelHasListener=!0})),this.onDidCancel=this._onDidCancel.event,this.cancelHasListener=!1,this._onDidRun=this._register(new A.b),this.onDidRun=this._onDidRun.event,this._onBeforeRun=this._register(new A.b),this.onBeforeRun=this._onBeforeRun.event,this.options=L,this._context=(r=L.context)!==null&&r!==void 0?r:null,this._orientation=(w=this.options.orientation)!==null&&w!==void 0?w:0,this._triggerKeys={keyDown:(u=(b=this.options.triggerKeys)===null||b===void 0?void 0:b.keyDown)!==null&&u!==void 0?u:!1,keys:(p=(c=this.options.triggerKeys)===null||c===void 0?void 0:c.keys)!==null&&p!==void 0?p:[3,10]},this.options.actionRunner?this._actionRunner=this.options.actionRunner:(this._actionRunner=new R.b,this._register(this._actionRunner)),this._register(this._actionRunner.onDidRun(y=>this._onDidRun.fire(y))),this._register(this._actionRunner.onBeforeRun(y=>this._onBeforeRun.fire(y))),this._actionIds=[],this.viewItems=[],this.focusedItem=void 0,this.domNode=document.createElement("div"),this.domNode.className="monaco-action-bar",L.animated!==!1&&this.domNode.classList.add("animated");let S,E;switch(this._orientation){case 0:S=[15],E=[17];break;case 1:S=[16],E=[18],this.domNode.className+=" vertical";break}this._register(g.i(this.domNode,g.d.KEY_DOWN,y=>{const O=new B.a(y);let k=!0;const Q=typeof this.focusedItem=="number"?this.viewItems[this.focusedItem]:void 0;S&&(O.equals(S[0])||O.equals(S[1]))?k=this.focusPrevious():E&&(O.equals(E[0])||O.equals(E[1]))?k=this.focusNext():O.equals(9)&&this.cancelHasListener?this._onDidCancel.fire():O.equals(14)?k=this.focusFirst():O.equals(13)?k=this.focusLast():O.equals(2)&&Q instanceof x.b&&Q.trapsArrowNavigation?k=this.focusNext():this.isTriggerKeyEvent(O)?this._triggerKeys.keyDown?this.doTrigger(O):this.triggerKeyDown=!0:k=!1,k&&(O.preventDefault(),O.stopPropagation())})),this._register(g.i(this.domNode,g.d.KEY_UP,y=>{const O=new B.a(y);this.isTriggerKeyEvent(O)?(!this._triggerKeys.keyDown&&this.triggerKeyDown&&(this.triggerKeyDown=!1,this.doTrigger(O)),O.preventDefault(),O.stopPropagation()):(O.equals(2)||O.equals(1024|2))&&this.updateFocusedItem()})),this.focusTracker=this._register(g.Y(this.domNode)),this._register(this.focusTracker.onDidBlur(()=>{(g.y()===this.domNode||!g.L(g.y(),this.domNode))&&(this._onDidBlur.fire(),this.focusedItem=void 0,this.triggerKeyDown=!1)})),this._register(this.focusTracker.onDidFocus(()=>this.updateFocusedItem())),this.actionsList=document.createElement("ul"),this.actionsList.className="actions-container",this.actionsList.setAttribute("role","toolbar"),this.options.ariaLabel&&this.actionsList.setAttribute("aria-label",this.options.ariaLabel),this.domNode.appendChild(this.actionsList),D.appendChild(this.domNode)}isTriggerKeyEvent(D){let L=!1;return this._triggerKeys.keys.forEach(r=>{L=L||D.equals(r)}),L}updateFocusedItem(){for(let D=0;D<this.actionsList.children.length;D++){const L=this.actionsList.children[D];if(g.L(g.y(),L)){this.focusedItem=D;break}}}get context(){return this._context}set context(D){this._context=D,this.viewItems.forEach(L=>L.setActionContext(D))}get actionRunner(){return this._actionRunner}set actionRunner(D){D&&(this._actionRunner=D,this.viewItems.forEach(L=>L.actionRunner=D))}getContainer(){return this.domNode}push(D,L={}){const r=Array.isArray(D)?D:[D];let w=I.j(L.index)?L.index:null;r.forEach(b=>{const u=document.createElement("li");u.className="action-item",u.setAttribute("role","presentation"),this.options.allowContextMenu||this._register(g.i(u,g.d.CONTEXT_MENU,p=>{g.c.stop(p,!0)}));let c;this.options.actionViewItemProvider&&(c=this.options.actionViewItemProvider(b)),c||(c=new x.a(this.context,b,L)),c.actionRunner=this._actionRunner,c.setActionContext(this.context),c.render(u),this.focusable&&c instanceof x.b&&this.viewItems.length===0&&c.setFocusable(!0),w===null||w<0||w>=this.actionsList.children.length?(this.actionsList.appendChild(u),this.viewItems.push(c),this._actionIds.push(b.id)):(this.actionsList.insertBefore(u,this.actionsList.children[w]),this.viewItems.splice(w,0,c),this._actionIds.splice(w,0,b.id),w++)}),typeof this.focusedItem=="number"&&this.focus(this.focusedItem)}clear(){Object(j.f)(this.viewItems),this.viewItems=[],this._actionIds=[],g.t(this.actionsList)}length(){return this.viewItems.length}focus(D){let L=!1,r;if(D===void 0?L=!0:typeof D=="number"?r=D:typeof D=="boolean"&&(L=D),L&&typeof this.focusedItem=="undefined"){const w=this.viewItems.findIndex(b=>b.isEnabled());this.focusedItem=w===-1?void 0:w,this.updateFocus()}else r!==void 0&&(this.focusedItem=r),this.updateFocus()}focusFirst(){return this.focusedItem=this.length()>1?1:0,this.focusPrevious()}focusLast(){return this.focusedItem=this.length()<2?0:this.length()-2,this.focusNext()}focusNext(){if(typeof this.focusedItem=="undefined")this.focusedItem=this.viewItems.length-1;else if(this.viewItems.length<=1)return!1;const D=this.focusedItem;let L;do{if(this.options.preventLoopNavigation&&this.focusedItem+1>=this.viewItems.length)return this.focusedItem=D,!1;this.focusedItem=(this.focusedItem+1)%this.viewItems.length,L=this.viewItems[this.focusedItem]}while(this.focusedItem!==D&&this.options.focusOnlyEnabledItems&&!L.isEnabled());return this.updateFocus(),!0}focusPrevious(){if(typeof this.focusedItem=="undefined")this.focusedItem=0;else if(this.viewItems.length<=1)return!1;const D=this.focusedItem;let L;do{if(this.focusedItem=this.focusedItem-1,this.focusedItem<0){if(this.options.preventLoopNavigation)return this.focusedItem=D,!1;this.focusedItem=this.viewItems.length-1}L=this.viewItems[this.focusedItem]}while(this.focusedItem!==D&&this.options.focusOnlyEnabledItems&&!L.isEnabled());return this.updateFocus(!0),!0}updateFocus(D,L){typeof this.focusedItem=="undefined"&&this.actionsList.focus({preventScroll:L});for(let r=0;r<this.viewItems.length;r++){const w=this.viewItems[r],b=w;if(r===this.focusedItem){let u=!0;I.i(b.focus)||(u=!1),this.options.focusOnlyEnabledItems&&I.i(w.isEnabled)&&!w.isEnabled()&&(u=!1),u?b.focus(D):this.actionsList.focus({preventScroll:L})}else I.i(b.blur)&&b.blur()}}doTrigger(D){if(typeof this.focusedItem=="undefined")return;const L=this.viewItems[this.focusedItem];if(L instanceof x.b){const r=L._context===null||L._context===void 0?D:L._context;this.run(L._action,r)}}run(D,L){return m(this,void 0,void 0,function*(){yield this._actionRunner.run(D,L)})}dispose(){Object(j.f)(this.viewItems),this.viewItems=[],this._actionIds=[],this.getContainer().remove(),super.dispose()}}},WwIK:function(mt,M,t){"use strict";t.r(M),t.d(M,"TriggerParameterHintsAction",function(){return Be});var g=t("pmY6"),B=t("sswD"),x=t("wQH0"),R=t("twdY"),A=t("JQT/"),j=t("/cxE"),I=t("746U"),v=t("bY76"),C=t("cGHE"),m=t("t49l"),d=t("nnTU"),D=t("T8No"),L=function(he,Le,we,ve){function ie(W){return W instanceof we?W:new we(function(U){U(W)})}return new(we||(we=Promise))(function(W,U){function se(We){try{Re(ve.next(We))}catch(dt){U(dt)}}function je(We){try{Re(ve.throw(We))}catch(dt){U(dt)}}function Re(We){We.done?W(We.value):ie(We.value).then(se,je)}Re((ve=ve.apply(he,Le||[])).next())})};const r={Visible:new D.c("parameterHintsVisible",!1),MultipleSignatures:new D.c("parameterHintsMultipleSignatures",!1)};function w(he,Le,we,ve){return L(this,void 0,void 0,function*(){const ie=R.A.ordered(he);for(const W of ie)try{const U=yield W.provideSignatureHelp(he,Le,ve,we);if(U)return U}catch(U){Object(j.g)(U)}return})}d.a.registerCommand("_executeSignatureHelpProvider",(he,...Le)=>L(void 0,void 0,void 0,function*(){const[we,ve,ie]=Le;Object(I.c)(v.a.isUri(we)),Object(I.c)(C.a.isIPosition(ve)),Object(I.c)(typeof ie=="string"||!ie);const W=yield he.get(m.a).createModelReference(we);try{const U=yield w(W.object.textEditorModel,C.a.lift(ve),{triggerKind:R.B.Invoke,isRetrigger:!1,triggerCharacter:ie},A.a.None);return U?(setTimeout(()=>U.dispose(),0),U.value):void 0}finally{W.dispose()}}));var b=t("3/fG"),u=t("Cg/j"),c=t("EffR"),p=t("OBOq"),S=t("GJhM"),E=t("Vhoy"),y=t("MI8n"),O=t("N0LK"),k=t("yrU1"),Q=t("v6HE"),q=t("WBhO"),z=t("X+cX"),J=t("MXAL"),re=function(he,Le,we,ve){function ie(W){return W instanceof we?W:new we(function(U){U(W)})}return new(we||(we=Promise))(function(W,U){function se(We){try{Re(ve.next(We))}catch(dt){U(dt)}}function je(We){try{Re(ve.throw(We))}catch(dt){U(dt)}}function Re(We){We.done?W(We.value):ie(We.value).then(se,je)}Re((ve=ve.apply(he,Le||[])).next())})},Z;(function(he){he.Default={type:0};class Le{constructor(ve,ie){this.request=ve,this.previouslyActiveHints=ie,this.type=2}}he.Pending=Le;class we{constructor(ve){this.hints=ve,this.type=1}}he.Active=we})(Z||(Z={}));class ne extends g.a{constructor(he,Le=ne.DEFAULT_DELAY){super();this._onChangedHints=this._register(new y.b),this.onChangedHints=this._onChangedHints.event,this.triggerOnType=!1,this._state=Z.Default,this._pendingTriggers=[],this._lastSignatureHelpResult=this._register(new g.d),this.triggerChars=new J.b,this.retriggerChars=new J.b,this.triggerId=0,this.editor=he,this.throttledDelayer=new z.a(Le),this._register(this.editor.onDidBlurEditorWidget(()=>this.cancel())),this._register(this.editor.onDidChangeConfiguration(()=>this.onEditorConfigurationChange())),this._register(this.editor.onDidChangeModel(we=>this.onModelChanged())),this._register(this.editor.onDidChangeModelLanguage(we=>this.onModelChanged())),this._register(this.editor.onDidChangeCursorSelection(we=>this.onCursorChange(we))),this._register(this.editor.onDidChangeModelContent(we=>this.onModelContentChange())),this._register(R.A.onDidChange(this.onModelChanged,this)),this._register(this.editor.onDidType(we=>this.onDidType(we))),this.onEditorConfigurationChange(),this.onModelChanged()}get state(){return this._state}set state(he){this._state.type===2&&this._state.request.cancel(),this._state=he}cancel(he=!1){this.state=Z.Default,this.throttledDelayer.cancel(),he||this._onChangedHints.fire(void 0)}trigger(he,Le){const we=this.editor.getModel();if(!we||!R.A.has(we))return;const ve=++this.triggerId;this._pendingTriggers.push(he),this.throttledDelayer.trigger(()=>this.doTrigger(ve),Le).catch(j.f)}next(){if(this.state.type!==1)return;const he=this.state.hints.signatures.length,Le=this.state.hints.activeSignature,we=Le%he===he-1,ve=this.editor.getOption(75).cycle;if((he<2||we)&&!ve){this.cancel();return}this.updateActiveSignature(we&&ve?0:Le+1)}previous(){if(this.state.type!==1)return;const he=this.state.hints.signatures.length,Le=this.state.hints.activeSignature,we=Le===0,ve=this.editor.getOption(75).cycle;if((he<2||we)&&!ve){this.cancel();return}this.updateActiveSignature(we&&ve?he-1:Le-1)}updateActiveSignature(he){if(this.state.type!==1)return;this.state=new Z.Active(Object.assign(Object.assign({},this.state.hints),{activeSignature:he})),this._onChangedHints.fire(this.state.hints)}doTrigger(he){return re(this,void 0,void 0,function*(){const Le=this.state.type===1||this.state.type===2,we=this.getLastActiveHints();if(this.cancel(!0),this._pendingTriggers.length===0)return!1;const ve=this._pendingTriggers.reduce(le);this._pendingTriggers=[];const ie={triggerKind:ve.triggerKind,triggerCharacter:ve.triggerCharacter,isRetrigger:Le,activeSignatureHelp:we};if(!this.editor.hasModel())return!1;const W=this.editor.getModel(),U=this.editor.getPosition();this.state=new Z.Pending(Object(z.h)(se=>w(W,U,ie,se)),we);try{const se=yield this.state.request;return he!==this.triggerId?(se==null||se.dispose(),!1):!se||!se.value.signatures||se.value.signatures.length===0?(se==null||se.dispose(),this._lastSignatureHelpResult.clear(),this.cancel(),!1):(this.state=new Z.Active(se.value),this._lastSignatureHelpResult.value=se,this._onChangedHints.fire(this.state.hints),!0)}catch(se){return he===this.triggerId&&(this.state=Z.Default),Object(j.f)(se),!1}})}getLastActiveHints(){switch(this.state.type){case 1:return this.state.hints;case 2:return this.state.previouslyActiveHints;default:return}}get isTriggered(){return this.state.type===1||this.state.type===2||this.throttledDelayer.isTriggered()}onModelChanged(){this.cancel(),this.triggerChars=new J.b,this.retriggerChars=new J.b;const he=this.editor.getModel();if(!he)return;for(const Le of R.A.ordered(he)){for(const we of Le.signatureHelpTriggerCharacters||[])this.triggerChars.add(we.charCodeAt(0)),this.retriggerChars.add(we.charCodeAt(0));for(const we of Le.signatureHelpRetriggerCharacters||[])this.retriggerChars.add(we.charCodeAt(0))}}onDidType(he){if(!this.triggerOnType)return;const Le=he.length-1,we=he.charCodeAt(Le);(this.triggerChars.has(we)||this.isTriggered&&this.retriggerChars.has(we))&&this.trigger({triggerKind:R.B.TriggerCharacter,triggerCharacter:he.charAt(Le)})}onCursorChange(he){he.source==="mouse"?this.cancel():this.isTriggered&&this.trigger({triggerKind:R.B.ContentChange})}onModelContentChange(){this.isTriggered&&this.trigger({triggerKind:R.B.ContentChange})}onEditorConfigurationChange(){this.triggerOnType=this.editor.getOption(75).enabled,this.triggerOnType||this.cancel()}dispose(){this.cancel(!0),super.dispose()}}ne.DEFAULT_DELAY=120;function le(he,Le){switch(Le.triggerKind){case R.B.Invoke:return Le;case R.B.ContentChange:return he;case R.B.TriggerCharacter:default:return Le}}var _e=t("W9cx"),Ce=t("MD5Z"),oe=t("v1vZ"),ae=t("nEHx"),V=t("t9D7"),G=function(he,Le,we,ve){var ie=arguments.length,W=ie<3?Le:ve===null?ve=Object.getOwnPropertyDescriptor(Le,we):ve,U;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")W=Reflect.decorate(he,Le,we,ve);else for(var se=he.length-1;se>=0;se--)(U=he[se])&&(W=(ie<3?U(W):ie>3?U(Le,we,W):U(Le,we))||W);return ie>3&&W&&Object.defineProperty(Le,we,W),W},ee=function(he,Le){return function(we,ve){Le(we,ve,he)}};const pe=c.a,Te=Object(oe.b)("parameter-hints-next",E.b.chevronDown,b.a("parameterHintsNextIcon","Icon for show next parameter hint.")),Ie=Object(oe.b)("parameter-hints-previous",E.b.chevronUp,b.a("parameterHintsPreviousIcon","Icon for show previous parameter hint."));let Me=class he extends g.a{constructor(Le,we,ve,ie){super();this.editor=Le,this.renderDisposeables=this._register(new g.b),this.visible=!1,this.announcedLabel=null,this.allowEditorOverflow=!0,this.markdownRenderer=this._register(new Q.a({editor:Le},ie,ve)),this.model=this._register(new ne(Le)),this.keyVisible=r.Visible.bindTo(we),this.keyMultipleSignatures=r.MultipleSignatures.bindTo(we),this._register(this.model.onChangedHints(W=>{W?(this.show(),this.render(W)):this.hide()}))}createParameterHintDOMNodes(){const Le=pe(".editor-widget.parameter-hints-widget"),we=c.q(Le,pe(".phwrapper"));we.tabIndex=-1;const ve=c.q(we,pe(".controls")),ie=c.q(ve,pe(".button"+V.d.asCSSSelector(Ie))),W=c.q(ve,pe(".overloads")),U=c.q(ve,pe(".button"+V.d.asCSSSelector(Te)));this._register(c.i(ie,"click",Lt=>{c.c.stop(Lt),this.previous()})),this._register(c.i(U,"click",Lt=>{c.c.stop(Lt),this.next()}));const se=pe(".body"),je=new S.a(se,{});this._register(je),we.appendChild(je.getDomNode());const Re=c.q(se,pe(".signature")),We=c.q(se,pe(".docs"));Le.style.userSelect="text",this.domNodes={element:Le,signature:Re,overloads:W,docs:We,scrollbar:je},this.editor.addContentWidget(this),this.hide(),this._register(this.editor.onDidChangeCursorSelection(Lt=>{this.visible&&this.editor.layoutContentWidget(this)}));const dt=()=>{if(!this.domNodes)return;const Lt=this.editor.getOption(43);this.domNodes.element.style.fontSize=`${Lt.fontSize}px`,this.domNodes.element.style.lineHeight=`${Lt.lineHeight/Lt.fontSize}`};dt(),this._register(y.c.chain(this.editor.onDidChangeConfiguration.bind(this.editor)).filter(Lt=>Lt.hasChanged(43)).on(dt,null)),this._register(this.editor.onDidLayoutChange(Lt=>this.updateMaxHeight())),this.updateMaxHeight()}show(){if(this.visible)return;this.domNodes||this.createParameterHintDOMNodes(),this.keyVisible.set(!0),this.visible=!0,setTimeout(()=>{this.domNodes&&this.domNodes.element.classList.add("visible")},100),this.editor.layoutContentWidget(this)}hide(){if(this.renderDisposeables.clear(),!this.visible)return;this.keyVisible.reset(),this.visible=!1,this.announcedLabel=null,this.domNodes&&this.domNodes.element.classList.remove("visible"),this.editor.layoutContentWidget(this)}getPosition(){return this.visible?{position:this.editor.getPosition(),preference:[1,2]}:null}render(Le){var we;if(this.renderDisposeables.clear(),!this.domNodes)return;const ve=Le.signatures.length>1;this.domNodes.element.classList.toggle("multiple",ve),this.keyMultipleSignatures.set(ve),this.domNodes.signature.innerText="",this.domNodes.docs.innerText="";const ie=Le.signatures[Le.activeSignature];if(!ie)return;const W=c.q(this.domNodes.signature,pe(".code")),U=this.editor.getOption(43);W.style.fontSize=`${U.fontSize}px`,W.style.fontFamily=U.fontFamily;const se=ie.parameters.length>0,je=(we=ie.activeParameter)!==null&&we!==void 0?we:Le.activeParameter;if(se)this.renderParameters(W,ie,je);else{const dt=c.q(W,pe("span"));dt.textContent=ie.label}const Re=ie.parameters[je];if(Re==null?void 0:Re.documentation){const dt=pe("span.documentation");if(typeof Re.documentation=="string")dt.textContent=Re.documentation;else{const Lt=this.renderMarkdownDocs(Re.documentation);dt.appendChild(Lt.element)}c.q(this.domNodes.docs,pe("p",{},dt))}if(!(ie.documentation===void 0))if(typeof ie.documentation=="string")c.q(this.domNodes.docs,pe("p",{},ie.documentation));else{const dt=this.renderMarkdownDocs(ie.documentation);c.q(this.domNodes.docs,dt.element)}const We=this.hasDocs(ie,Re);if(this.domNodes.signature.classList.toggle("has-docs",We),this.domNodes.docs.classList.toggle("empty",!We),this.domNodes.overloads.textContent=String(Le.activeSignature+1).padStart(Le.signatures.length.toString().length,"0")+"/"+Le.signatures.length,Re){let dt="";const Lt=ie.parameters[je];Array.isArray(Lt.label)?dt=ie.label.substring(Lt.label[0],Lt.label[1]):dt=Lt.label,Lt.documentation&&(dt+=typeof Lt.documentation=="string"?`, ${Lt.documentation}`:`, ${Lt.documentation.value}`),ie.documentation&&(dt+=typeof ie.documentation=="string"?`, ${ie.documentation}`:`, ${ie.documentation.value}`),this.announcedLabel!==dt&&(p.a(b.a("hint","{0}, hint",dt)),this.announcedLabel=dt)}this.editor.layoutContentWidget(this),this.domNodes.scrollbar.scanDomNode()}renderMarkdownDocs(Le){const we=this.renderDisposeables.add(this.markdownRenderer.render(Le,{asyncRenderCallback:()=>{var ve;(ve=this.domNodes)===null||ve===void 0||ve.scrollbar.scanDomNode()}}));return we.element.classList.add("markdown-docs"),we}hasDocs(Le,we){return we&&typeof we.documentation=="string"&&Object(I.a)(we.documentation).length>0||(we&&typeof we.documentation=="object"&&Object(I.a)(we.documentation).value.length>0||Le.documentation&&typeof Le.documentation=="string"&&Object(I.a)(Le.documentation).length>0)?!0:!!(Le.documentation&&typeof Le.documentation=="object"&&Object(I.a)(Le.documentation.value).length>0)}renderParameters(Le,we,ve){const[ie,W]=this.getParameterLabelOffsets(we,ve),U=document.createElement("span");U.textContent=we.label.substring(0,ie);const se=document.createElement("span");se.textContent=we.label.substring(ie,W),se.className="parameter active";const je=document.createElement("span");je.textContent=we.label.substring(W),c.q(Le,U,se,je)}getParameterLabelOffsets(Le,we){const ve=Le.parameters[we];if(ve){if(Array.isArray(ve.label))return ve.label;if(ve.label.length){const ie=new RegExp(`(\\W|^)${Object(O.t)(ve.label)}(?=\\W|$)`,"g");ie.test(Le.label);const W=ie.lastIndex-ve.label.length;return W>=0?[W,ie.lastIndex]:[0,0]}else return[0,0]}else return[0,0]}next(){this.editor.focus(),this.model.next()}previous(){this.editor.focus(),this.model.previous()}cancel(){this.model.cancel()}getDomNode(){return this.domNodes||this.createParameterHintDOMNodes(),this.domNodes.element}getId(){return he.ID}trigger(Le){this.model.trigger(Le,0)}updateMaxHeight(){if(!this.domNodes)return;const Le=Math.max(this.editor.getLayoutInfo().height/4,250),we=`${Le}px`;this.domNodes.element.style.maxHeight=we;const ve=this.domNodes.element.getElementsByClassName("phwrapper");ve.length&&(ve[0].style.maxHeight=we)}};Me.ID="editor.widget.parameterHintsWidget",Me=G([ee(1,D.b),ee(2,_e.a),ee(3,q.a)],Me);const Oe=Object(Ce.wc)("editorHoverWidget.highlightForeground",{dark:Ce.Ib,light:Ce.Ib,hc:Ce.Ib},b.a("editorHoverWidgetHighlightForeground","Foreground color of the active item in the parameter hint."));Object(V.f)((he,Le)=>{const we=he.getColor(Ce.F);if(we){const Re=he.type===ae.a.HIGH_CONTRAST?2:1;Le.addRule(`.monaco-editor .parameter-hints-widget { border: ${Re}px solid ${we}; }`),Le.addRule(`.monaco-editor .parameter-hints-widget.multiple .body { border-left: 1px solid ${we.transparent(.5)}; }`),Le.addRule(`.monaco-editor .parameter-hints-widget .signature.has-docs { border-bottom: 1px solid ${we.transparent(.5)}; }`)}const ve=he.getColor(Ce.E);ve&&Le.addRule(`.monaco-editor .parameter-hints-widget { background-color: ${ve}; }`);const ie=he.getColor(Ce.Jc);ie&&Le.addRule(`.monaco-editor .parameter-hints-widget a { color: ${ie}; }`);const W=he.getColor(Ce.Ic);W&&Le.addRule(`.monaco-editor .parameter-hints-widget a:hover { color: ${W}; }`);const U=he.getColor(Ce.G);U&&Le.addRule(`.monaco-editor .parameter-hints-widget { color: ${U}; }`);const se=he.getColor(Ce.Hc);se&&Le.addRule(`.monaco-editor .parameter-hints-widget code { background-color: ${se}; }`);const je=he.getColor(Oe);je&&Le.addRule(`.monaco-editor .parameter-hints-widget .parameter.active { color: ${je}}`)});var Xe=function(he,Le,we,ve){var ie=arguments.length,W=ie<3?Le:ve===null?ve=Object.getOwnPropertyDescriptor(Le,we):ve,U;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")W=Reflect.decorate(he,Le,we,ve);else for(var se=he.length-1;se>=0;se--)(U=he[se])&&(W=(ie<3?U(W):ie>3?U(Le,we,W):U(Le,we))||W);return ie>3&&W&&Object.defineProperty(Le,we,W),W},fe=function(he,Le){return function(we,ve){Le(we,ve,he)}};let Pe=class he extends g.a{constructor(Le,we){super();this.editor=Le,this.widget=this._register(we.createInstance(Me,this.editor))}static get(Le){return Le.getContribution(he.ID)}cancel(){this.widget.cancel()}previous(){this.widget.previous()}next(){this.widget.next()}trigger(Le){this.widget.trigger(Le)}};Pe.ID="editor.controller.parameterHints",Pe=Xe([fe(1,u.a)],Pe);class Be extends B.b{constructor(){super({id:"editor.action.triggerParameterHints",label:b.a("parameterHints.trigger.label","Trigger Parameter Hints"),alias:"Trigger Parameter Hints",precondition:x.a.hasSignatureHelpProvider,kbOpts:{kbExpr:x.a.editorTextFocus,primary:2048|1024|10,weight:100}})}run(he,Le){const we=Pe.get(Le);we&&we.trigger({triggerKind:R.B.Invoke})}}Object(B.l)(Pe.ID,Pe),Object(B.j)(Be);const Se=100+75,me=B.c.bindToContribution(Pe.get);Object(B.k)(new me({id:"closeParameterHints",precondition:r.Visible,handler:he=>he.cancel(),kbOpts:{weight:Se,kbExpr:x.a.focus,primary:9,secondary:[1024|9]}})),Object(B.k)(new me({id:"showPrevParameterHint",precondition:D.a.and(r.Visible,r.MultipleSignatures),handler:he=>he.previous(),kbOpts:{weight:Se,kbExpr:x.a.focus,primary:16,secondary:[512|16],mac:{primary:16,secondary:[512|16,256|46]}}})),Object(B.k)(new me({id:"showNextParameterHint",precondition:D.a.and(r.Visible,r.MultipleSignatures),handler:he=>he.next(),kbOpts:{weight:Se,kbExpr:x.a.focus,primary:18,secondary:[512|18],mac:{primary:18,secondary:[512|18,256|44]}}}))},"X+cX":function(mt,M,t){"use strict";t.d(M,"k",function(){return A}),t.d(M,"h",function(){return j}),t.d(M,"l",function(){return I}),t.d(M,"a",function(){return C}),t.d(M,"f",function(){return m}),t.d(M,"n",function(){return d}),t.d(M,"i",function(){return D}),t.d(M,"j",function(){return L}),t.d(M,"g",function(){return r}),t.d(M,"c",function(){return w}),t.d(M,"e",function(){return b}),t.d(M,"m",function(){return u}),t.d(M,"b",function(){return c}),t.d(M,"d",function(){return p});var g=t("JQT/"),B=t("/cxE"),x=t("pmY6"),R=function(S,E,y,O){function k(Q){return Q instanceof y?Q:new y(function(q){q(Q)})}return new(y||(y=Promise))(function(Q,q){function z(Z){try{re(O.next(Z))}catch(ne){q(ne)}}function J(Z){try{re(O.throw(Z))}catch(ne){q(ne)}}function re(Z){Z.done?Q(Z.value):k(Z.value).then(z,J)}re((O=O.apply(S,E||[])).next())})};function A(S){return!!S&&typeof S.then=="function"}function j(S){const E=new g.b,y=S(E.token),O=new Promise((k,Q)=>{const q=E.token.onCancellationRequested(()=>{q.dispose(),E.dispose(),Q(Object(B.b)())});Promise.resolve(y).then(z=>{q.dispose(),E.dispose(),k(z)},z=>{q.dispose(),E.dispose(),Q(z)})});return new class{cancel(){E.cancel()}then(k,Q){return O.then(k,Q)}catch(k){return this.then(void 0,k)}finally(k){return O.finally(k)}}}function I(S,E,y){return Promise.race([S,new Promise(O=>E.onCancellationRequested(()=>O(y)))])}class v{constructor(){this.activePromise=null,this.queuedPromise=null,this.queuedPromiseFactory=null}queue(S){if(this.activePromise){if(this.queuedPromiseFactory=S,!this.queuedPromise){const E=()=>{this.queuedPromise=null;const y=this.queue(this.queuedPromiseFactory);return this.queuedPromiseFactory=null,y};this.queuedPromise=new Promise(y=>{this.activePromise.then(E,E).then(y)})}return new Promise((E,y)=>{this.queuedPromise.then(E,y)})}return this.activePromise=S(),new Promise((E,y)=>{this.activePromise.then(O=>{this.activePromise=null,E(O)},O=>{this.activePromise=null,y(O)})})}}class C{constructor(S){this.defaultDelay=S,this.timeout=null,this.completionPromise=null,this.doResolve=null,this.doReject=null,this.task=null}trigger(S,E=this.defaultDelay){return this.task=S,this.cancelTimeout(),this.completionPromise||(this.completionPromise=new Promise((y,O)=>{this.doResolve=y,this.doReject=O}).then(()=>{if(this.completionPromise=null,this.doResolve=null,this.task){const y=this.task;return this.task=null,y()}return})),this.timeout=setTimeout(()=>{this.timeout=null,this.doResolve&&this.doResolve(null)},E),this.completionPromise}isTriggered(){return this.timeout!==null}cancel(){this.cancelTimeout(),this.completionPromise&&(this.doReject&&this.doReject(Object(B.b)()),this.completionPromise=null)}cancelTimeout(){this.timeout!==null&&(clearTimeout(this.timeout),this.timeout=null)}dispose(){this.cancel()}}class m{constructor(S){this.delayer=new C(S),this.throttler=new v}trigger(S,E){return this.delayer.trigger(()=>this.throttler.queue(S),E)}dispose(){this.delayer.dispose()}}function d(S,E){return E?new Promise((y,O)=>{const k=setTimeout(()=>{Q.dispose(),y()},S),Q=E.onCancellationRequested(()=>{clearTimeout(k),Q.dispose(),O(Object(B.b)())})}):j(y=>d(S,y))}function D(S,E=0){const y=setTimeout(S,E);return Object(x.i)(()=>clearTimeout(y))}function L(S,E=O=>!!O,y=null){let O=0;const k=S.length,Q=()=>{if(O>=k)return Promise.resolve(y);const q=S[O++],z=Promise.resolve(q());return z.then(J=>E(J)?Promise.resolve(J):Q())};return Q()}class r{constructor(S,E){this._token=-1,typeof S=="function"&&typeof E=="number"&&this.setIfNotSet(S,E)}dispose(){this.cancel()}cancel(){this._token!==-1&&(clearTimeout(this._token),this._token=-1)}cancelAndSet(S,E){this.cancel(),this._token=setTimeout(()=>{this._token=-1,S()},E)}setIfNotSet(S,E){if(this._token!==-1)return;this._token=setTimeout(()=>{this._token=-1,S()},E)}}class w{constructor(){this._token=-1}dispose(){this.cancel()}cancel(){this._token!==-1&&(clearInterval(this._token),this._token=-1)}cancelAndSet(S,E){this.cancel(),this._token=setInterval(()=>{S()},E)}}class b{constructor(S,E){this.timeoutToken=-1,this.runner=S,this.timeout=E,this.timeoutHandler=this.onTimeout.bind(this)}dispose(){this.cancel(),this.runner=null}cancel(){this.isScheduled()&&(clearTimeout(this.timeoutToken),this.timeoutToken=-1)}schedule(S=this.timeout){this.cancel(),this.timeoutToken=setTimeout(this.timeoutHandler,S)}get delay(){return this.timeout}set delay(S){this.timeout=S}isScheduled(){return this.timeoutToken!==-1}onTimeout(){this.timeoutToken=-1,this.runner&&this.doRun()}doRun(){this.runner&&this.runner()}}let u;(function(){typeof requestIdleCallback!="function"||typeof cancelIdleCallback!="function"?u=S=>{const E=setTimeout(()=>{const O=Date.now()+15;S(Object.freeze({didTimeout:!0,timeRemaining(){return Math.max(0,O-Date.now())}}))});let y=!1;return{dispose(){if(y)return;y=!0,clearTimeout(E)}}}:u=(S,E)=>{const y=requestIdleCallback(S,typeof E=="number"?{timeout:E}:void 0);let O=!1;return{dispose(){if(O)return;O=!0,cancelIdleCallback(y)}}}})();class c{constructor(S){this._didRun=!1,this._executor=()=>{try{this._value=S()}catch(E){this._error=E}finally{this._didRun=!0}},this._handle=u(()=>this._executor())}dispose(){this._handle.dispose()}get value(){if(this._didRun||(this._handle.dispose(),this._executor()),this._error)throw this._error;return this._value}get isInitialized(){return this._didRun}}var p;(function(S){function E(O){return R(this,void 0,void 0,function*(){let k;const Q=yield Promise.all(O.map(q=>q.then(z=>z,z=>{k||(k=z);return})));if(typeof k!="undefined")throw k;return Q})}S.settled=E;function y(O){return new Promise((k,Q)=>R(this,void 0,void 0,function*(){try{yield O(k,Q)}catch(q){Q(q)}}))}S.withAsyncBody=y})(p||(p={}))},XQgg:function(mt,M,t){"use strict";t.r(M);var g=t("+hIS");Object(g.a)({id:"rust",extensions:[".rs",".rlib"],aliases:["Rust","rust"],loader:function(){return t.e(363).then(t.bind(null,"/0xJ"))}})},XSiN:function(mt,M,t){"use strict";t.d(M,"a",function(){return R}),t.d(M,"b",function(){return A});var g=t("D3Dy"),B=t("51f4"),x=t("MNsG");class R{constructor(j){this.timestamp=Date.now(),this.browserEvent=j,this.leftButton=j.button===0,this.middleButton=j.button===1,this.rightButton=j.button===2,this.buttons=j.buttons,this.target=j.target,this.detail=j.detail||1,j.type==="dblclick"&&(this.detail=2),this.ctrlKey=j.ctrlKey,this.shiftKey=j.shiftKey,this.altKey=j.altKey,this.metaKey=j.metaKey,typeof j.pageX=="number"?(this.posx=j.pageX,this.posy=j.pageY):(this.posx=j.clientX+document.body.scrollLeft+document.documentElement.scrollLeft,this.posy=j.clientY+document.body.scrollTop+document.documentElement.scrollTop);let I=B.a.getPositionOfChildWindowRelativeToAncestorWindow(self,j.view);this.posx-=I.left,this.posy-=I.top}preventDefault(){this.browserEvent.preventDefault()}stopPropagation(){this.browserEvent.stopPropagation()}}class A{constructor(j,I=0,v=0){if(this.browserEvent=j||null,this.target=j?j.target||j.targetNode||j.srcElement:null,this.deltaY=v,this.deltaX=I,j){let C=j,m=j;if(typeof C.wheelDeltaY!="undefined")this.deltaY=C.wheelDeltaY/120;else if(typeof m.VERTICAL_AXIS!="undefined"&&m.axis===m.VERTICAL_AXIS)this.deltaY=-m.detail/3;else if(j.type==="wheel"){const d=j;d.deltaMode===d.DOM_DELTA_LINE?g.g&&!x.f?this.deltaY=-j.deltaY/3:this.deltaY=-j.deltaY:this.deltaY=-j.deltaY/40}if(typeof C.wheelDeltaX!="undefined")g.h&&x.i?this.deltaX=-(C.wheelDeltaX/120):this.deltaX=C.wheelDeltaX/120;else if(typeof m.HORIZONTAL_AXIS!="undefined"&&m.axis===m.HORIZONTAL_AXIS)this.deltaX=-j.detail/3;else if(j.type==="wheel"){const d=j;d.deltaMode===d.DOM_DELTA_LINE?g.g&&!x.f?this.deltaX=-j.deltaX/3:this.deltaX=-j.deltaX:this.deltaX=-j.deltaX/40}this.deltaY===0&&this.deltaX===0&&j.wheelDelta&&(this.deltaY=j.wheelDelta/120)}}preventDefault(){this.browserEvent&&this.browserEvent.preventDefault()}stopPropagation(){this.browserEvent&&this.browserEvent.stopPropagation()}}},XXBq:function(mt,M,t){},XXUj:function(mt,M,t){"use strict";t.d(M,"a",function(){return B});var g=t("Cg/j");const B=Object(g.c)("telemetryService")},XtJs:function(mt,M,t){"use strict";t.r(M),t.d(M,"getOccurrencesAtPosition",function(){return q});var g=t("OBOq"),B=t("6OMU"),x=t("X+cX"),R=t("JQT/"),A=t("/cxE"),j=t("pmY6"),I=t("sswD"),v=t("aokT"),C=t("wQH0"),m=t("M1Kb"),d=t("tX9W"),D=t("twdY"),L=t("3/fG"),r=t("T8No"),w=t("MD5Z"),b=t("t9D7"),u=function(V,G,ee,pe){var Te=arguments.length,Ie=Te<3?G:pe===null?pe=Object.getOwnPropertyDescriptor(G,ee):pe,Me;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")Ie=Reflect.decorate(V,G,ee,pe);else for(var Oe=V.length-1;Oe>=0;Oe--)(Me=V[Oe])&&(Ie=(Te<3?Me(Ie):Te>3?Me(G,ee,Ie):Me(G,ee))||Ie);return Te>3&&Ie&&Object.defineProperty(G,ee,Ie),Ie},c=function(V,G){return function(ee,pe){G(ee,pe,V)}};const p=Object(w.wc)("editor.wordHighlightBackground",{dark:"#575757B8",light:"#57575740",hc:null},L.a("wordHighlight","Background color of a symbol during read-access, like reading a variable. The color must not be opaque so as not to hide underlying decorations."),!0),S=Object(w.wc)("editor.wordHighlightStrongBackground",{dark:"#004972B8",light:"#0e639c40",hc:null},L.a("wordHighlightStrong","Background color of a symbol during write-access, like writing to a variable. The color must not be opaque so as not to hide underlying decorations."),!0),E=Object(w.wc)("editor.wordHighlightBorder",{light:null,dark:null,hc:w.b},L.a("wordHighlightBorder","Border color of a symbol during read-access, like reading a variable.")),y=Object(w.wc)("editor.wordHighlightStrongBorder",{light:null,dark:null,hc:w.b},L.a("wordHighlightStrongBorder","Border color of a symbol during write-access, like writing to a variable.")),O=Object(w.wc)("editorOverviewRuler.wordHighlightForeground",{dark:"#A0A0A0CC",light:"#A0A0A0CC",hc:"#A0A0A0CC"},L.a("overviewRulerWordHighlightForeground","Overview ruler marker color for symbol highlights. The color must not be opaque so as not to hide underlying decorations."),!0),k=Object(w.wc)("editorOverviewRuler.wordHighlightStrongForeground",{dark:"#C0A0C0CC",light:"#C0A0C0CC",hc:"#C0A0C0CC"},L.a("overviewRulerWordHighlightStrongForeground","Overview ruler marker color for write-access symbol highlights. The color must not be opaque so as not to hide underlying decorations."),!0),Q=new r.c("hasWordHighlights",!1);function q(V,G,ee){const pe=D.i.ordered(V);return Object(x.j)(pe.map(Te=>()=>Promise.resolve(Te.provideDocumentHighlights(V,G,ee)).then(void 0,A.g)),B.n)}class z{constructor(V,G,ee){this._wordRange=this._getCurrentWordRange(V,G),this.result=Object(x.h)(pe=>this._compute(V,G,ee,pe))}_getCurrentWordRange(V,G){const ee=V.getWordAtPosition(G.getPosition());return ee?new v.a(G.startLineNumber,ee.startColumn,G.startLineNumber,ee.endColumn):null}isValid(V,G,ee){const pe=G.startLineNumber,Te=G.startColumn,Ie=G.endColumn,Me=this._getCurrentWordRange(V,G);let Oe=Boolean(this._wordRange&&this._wordRange.equalsRange(Me));for(let Xe=0,fe=ee.length;!Oe&&Xe<fe;Xe++){let Pe=V.getDecorationRange(ee[Xe]);Pe&&Pe.startLineNumber===pe&&(Pe.startColumn<=Te&&Pe.endColumn>=Ie&&(Oe=!0))}return Oe}cancel(){this.result.cancel()}}class J extends z{_compute(V,G,ee,pe){return q(V,G.getPosition(),pe).then(Te=>Te||[])}}class re extends z{constructor(V,G,ee){super(V,G,ee);this._selectionIsEmpty=G.isEmpty()}_compute(V,G,ee,pe){return Object(x.n)(250,pe).then(()=>{if(!G.isEmpty())return[];const Te=V.getWordAtPosition(G.getPosition());if(!Te||Te.word.length>1e3)return[];const Ie=V.findMatches(Te.word,!0,!1,!0,ee,!1);return Ie.map(Me=>({range:Me.range,kind:D.h.Text}))})}isValid(V,G,ee){const pe=G.isEmpty();return this._selectionIsEmpty!==pe?!1:super.isValid(V,G,ee)}}function Z(V,G,ee){return D.i.has(V)?new J(V,G,ee):new re(V,G,ee)}Object(I.n)("_executeDocumentHighlights",(V,G)=>q(V,G,R.a.None));class ne{constructor(V,G){this.toUnhook=new j.b,this.workerRequestTokenId=0,this.workerRequestCompleted=!1,this.workerRequestValue=[],this.lastCursorPositionChangeTime=0,this.renderDecorationsTimer=-1,this.editor=V,this._hasWordHighlights=Q.bindTo(G),this._ignorePositionChangeEvent=!1,this.occurrencesHighlight=this.editor.getOption(71),this.model=this.editor.getModel(),this.toUnhook.add(V.onDidChangeCursorPosition(ee=>{if(this._ignorePositionChangeEvent)return;if(!this.occurrencesHighlight)return;this._onPositionChanged(ee)})),this.toUnhook.add(V.onDidChangeModelContent(ee=>{this._stopAll()})),this.toUnhook.add(V.onDidChangeConfiguration(ee=>{let pe=this.editor.getOption(71);this.occurrencesHighlight!==pe&&(this.occurrencesHighlight=pe,this._stopAll())})),this._decorationIds=[],this.workerRequestTokenId=0,this.workerRequest=null,this.workerRequestCompleted=!1,this.lastCursorPositionChangeTime=0,this.renderDecorationsTimer=-1}hasDecorations(){return this._decorationIds.length>0}restore(){if(!this.occurrencesHighlight)return;this._run()}_getSortedHighlights(){return B.e(this._decorationIds.map(V=>this.model.getDecorationRange(V)).sort(v.a.compareRangesUsingStarts))}moveNext(){let V=this._getSortedHighlights(),G=V.findIndex(Te=>Te.containsPosition(this.editor.getPosition())),ee=(G+1)%V.length,pe=V[ee];try{this._ignorePositionChangeEvent=!0,this.editor.setPosition(pe.getStartPosition()),this.editor.revealRangeInCenterIfOutsideViewport(pe);const Te=this._getWord();if(Te){const Ie=this.editor.getModel().getLineContent(pe.startLineNumber);Object(g.a)(`${Ie}, ${ee+1} of ${V.length} for '${Te.word}'`)}}finally{this._ignorePositionChangeEvent=!1}}moveBack(){let V=this._getSortedHighlights(),G=V.findIndex(Te=>Te.containsPosition(this.editor.getPosition())),ee=(G-1+V.length)%V.length,pe=V[ee];try{this._ignorePositionChangeEvent=!0,this.editor.setPosition(pe.getStartPosition()),this.editor.revealRangeInCenterIfOutsideViewport(pe);const Te=this._getWord();if(Te){const Ie=this.editor.getModel().getLineContent(pe.startLineNumber);Object(g.a)(`${Ie}, ${ee+1} of ${V.length} for '${Te.word}'`)}}finally{this._ignorePositionChangeEvent=!1}}_removeDecorations(){this._decorationIds.length>0&&(this._decorationIds=this.editor.deltaDecorations(this._decorationIds,[]),this._hasWordHighlights.set(!1))}_stopAll(){this._removeDecorations(),this.renderDecorationsTimer!==-1&&(clearTimeout(this.renderDecorationsTimer),this.renderDecorationsTimer=-1),this.workerRequest!==null&&(this.workerRequest.cancel(),this.workerRequest=null),this.workerRequestCompleted||(this.workerRequestTokenId++,this.workerRequestCompleted=!0)}_onPositionChanged(V){if(!this.occurrencesHighlight){this._stopAll();return}if(V.reason!==3){this._stopAll();return}this._run()}_getWord(){let V=this.editor.getSelection(),G=V.startLineNumber,ee=V.startColumn;return this.model.getWordAtPosition({lineNumber:G,column:ee})}_run(){let V=this.editor.getSelection();if(V.startLineNumber!==V.endLineNumber){this._stopAll();return}let G=V.startColumn,ee=V.endColumn;const pe=this._getWord();if(!pe||pe.startColumn>G||pe.endColumn<ee){this._stopAll();return}const Te=this.workerRequest&&this.workerRequest.isValid(this.model,V,this._decorationIds);if(this.lastCursorPositionChangeTime=new Date().getTime(),Te)this.workerRequestCompleted&&this.renderDecorationsTimer!==-1&&(clearTimeout(this.renderDecorationsTimer),this.renderDecorationsTimer=-1,this._beginRenderDecorations());else{this._stopAll();let Ie=++this.workerRequestTokenId;this.workerRequestCompleted=!1,this.workerRequest=Z(this.model,this.editor.getSelection(),this.editor.getOption(115)),this.workerRequest.result.then(Me=>{Ie===this.workerRequestTokenId&&(this.workerRequestCompleted=!0,this.workerRequestValue=Me||[],this._beginRenderDecorations())},A.f)}}_beginRenderDecorations(){let V=new Date().getTime(),G=this.lastCursorPositionChangeTime+250;V>=G?(this.renderDecorationsTimer=-1,this.renderDecorations()):this.renderDecorationsTimer=setTimeout(()=>{this.renderDecorations()},G-V)}renderDecorations(){this.renderDecorationsTimer=-1;let V=[];for(const G of this.workerRequestValue)G.range&&V.push({range:G.range,options:ne._getDecorationOptions(G.kind)});this._decorationIds=this.editor.deltaDecorations(this._decorationIds,V),this._hasWordHighlights.set(this.hasDecorations())}static _getDecorationOptions(V){return V===D.h.Write?this._WRITE_OPTIONS:V===D.h.Text?this._TEXT_OPTIONS:this._REGULAR_OPTIONS}dispose(){this._stopAll(),this.toUnhook.dispose()}}ne._WRITE_OPTIONS=d.b.register({description:"word-highlight-strong",stickiness:1,className:"wordHighlightStrong",overviewRuler:{color:Object(b.g)(k),position:m.g.Center},minimap:{color:Object(b.g)(w.cc),position:m.f.Inline}}),ne._TEXT_OPTIONS=d.b.register({description:"selection-highlight",stickiness:1,className:"selectionHighlight",overviewRuler:{color:Object(b.g)(w.jc),position:m.g.Center},minimap:{color:Object(b.g)(w.cc),position:m.f.Inline}}),ne._REGULAR_OPTIONS=d.b.register({description:"word-highlight",stickiness:1,className:"wordHighlight",overviewRuler:{color:Object(b.g)(O),position:m.g.Center},minimap:{color:Object(b.g)(w.cc),position:m.f.Inline}});let le=class V extends j.a{constructor(G,ee){super();this.wordHighlighter=null;const pe=()=>{G.hasModel()&&(this.wordHighlighter=new ne(G,ee))};this._register(G.onDidChangeModel(Te=>{this.wordHighlighter&&(this.wordHighlighter.dispose(),this.wordHighlighter=null),pe()})),pe()}static get(G){return G.getContribution(V.ID)}saveViewState(){return!!(this.wordHighlighter&&this.wordHighlighter.hasDecorations())}moveNext(){this.wordHighlighter&&this.wordHighlighter.moveNext()}moveBack(){this.wordHighlighter&&this.wordHighlighter.moveBack()}restoreViewState(G){this.wordHighlighter&&G&&this.wordHighlighter.restore()}dispose(){this.wordHighlighter&&(this.wordHighlighter.dispose(),this.wordHighlighter=null),super.dispose()}};le.ID="editor.contrib.wordHighlighter",le=u([c(1,r.b)],le);class _e extends I.b{constructor(V,G){super(G);this._isNext=V}run(V,G){const ee=le.get(G);if(!ee)return;this._isNext?ee.moveNext():ee.moveBack()}}class Ce extends _e{constructor(){super(!0,{id:"editor.action.wordHighlight.next",label:L.a("wordHighlight.next.label","Go to Next Symbol Highlight"),alias:"Go to Next Symbol Highlight",precondition:Q,kbOpts:{kbExpr:C.a.editorTextFocus,primary:65,weight:100}})}}class oe extends _e{constructor(){super(!1,{id:"editor.action.wordHighlight.prev",label:L.a("wordHighlight.previous.label","Go to Previous Symbol Highlight"),alias:"Go to Previous Symbol Highlight",precondition:Q,kbOpts:{kbExpr:C.a.editorTextFocus,primary:1024|65,weight:100}})}}class ae extends I.b{constructor(){super({id:"editor.action.wordHighlight.trigger",label:L.a("wordHighlight.trigger.label","Trigger Symbol Highlight"),alias:"Trigger Symbol Highlight",precondition:Q.toNegated(),kbOpts:{kbExpr:C.a.editorTextFocus,primary:0,weight:100}})}run(V,G,ee){const pe=le.get(G);if(!pe)return;pe.restoreViewState(!0)}}Object(I.l)(le.ID,le),Object(I.j)(Ce),Object(I.j)(oe),Object(I.j)(ae),Object(b.f)((V,G)=>{const ee=V.getColor(w.R);ee&&(G.addRule(`.monaco-editor .focused .selectionHighlight { background-color: ${ee}; }`),G.addRule(`.monaco-editor .selectionHighlight { background-color: ${ee.transparent(.5)}; }`));const pe=V.getColor(p);pe&&G.addRule(`.monaco-editor .wordHighlight { background-color: ${pe}; }`);const Te=V.getColor(S);Te&&G.addRule(`.monaco-editor .wordHighlightStrong { background-color: ${Te}; }`);const Ie=V.getColor(w.S);Ie&&G.addRule(`.monaco-editor .selectionHighlight { border: 1px ${V.type==="hc"?"dotted":"solid"} ${Ie}; box-sizing: border-box; }`);const Me=V.getColor(E);Me&&G.addRule(`.monaco-editor .wordHighlight { border: 1px ${V.type==="hc"?"dashed":"solid"} ${Me}; box-sizing: border-box; }`);const Oe=V.getColor(y);Oe&&G.addRule(`.monaco-editor .wordHighlightStrong { border: 1px ${V.type==="hc"?"dashed":"solid"} ${Oe}; box-sizing: border-box; }`)})},YHy6:function(mt,M,t){},Yr1X:function(mt,M,t){"use strict";t.d(M,"a",function(){return B});var g=t("MI8n");const B=new class{constructor(){this._zoomLevel=0,this._onDidChangeZoomLevel=new g.b,this.onDidChangeZoomLevel=this._onDidChangeZoomLevel.event}getZoomLevel(){return this._zoomLevel}setZoomLevel(x){if(x=Math.min(Math.max(-5,x),20),this._zoomLevel===x)return;this._zoomLevel=x,this._onDidChangeZoomLevel.fire(this._zoomLevel)}}},Z1pP:function(mt,M,t){},Z7SF:function(mt,M,t){"use strict";t.d(M,"a",function(){return A});var g=t("24hK"),B=t("cGHE"),x=t("aokT"),R=function(j,I,v,C){function m(d){return d instanceof v?d:new v(function(D){D(d)})}return new(v||(v=Promise))(function(d,D){function L(b){try{w(C.next(b))}catch(u){D(u)}}function r(b){try{w(C.throw(b))}catch(u){D(u)}}function w(b){b.done?d(b.value):m(b.value).then(L,r)}w((C=C.apply(j,I||[])).next())})};class A{provideSelectionRanges(j,I){return R(this,void 0,void 0,function*(){const v=[];for(const C of I){const m=[];v.push(m);const d=new Map;yield new Promise(D=>A._bracketsRightYield(D,0,j,C,d)),yield new Promise(D=>A._bracketsLeftYield(D,0,j,C,d,m))}return v})}static _bracketsRightYield(j,I,v,C,m){const d=new Map,D=Date.now();for(;;){if(I>=A._maxRounds){j();break}if(!C){j();break}let L=v.findNextBracket(C);if(!L){j();break}let r=Date.now()-D;if(r>A._maxDuration){setTimeout(()=>A._bracketsRightYield(j,I+1,v,C,m));break}const w=L.close[0];if(L.isOpen){let b=d.has(w)?d.get(w):0;d.set(w,b+1)}else{let b=d.has(w)?d.get(w):0;if(b-=1,d.set(w,Math.max(0,b)),b<0){let u=m.get(w);u||(u=new g.a,m.set(w,u)),u.push(L.range)}}C=L.range.getEndPosition()}}static _bracketsLeftYield(j,I,v,C,m,d){const D=new Map,L=Date.now();for(;;){if(I>=A._maxRounds&&m.size===0){j();break}if(!C){j();break}let r=v.findPrevBracket(C);if(!r){j();break}let w=Date.now()-L;if(w>A._maxDuration){setTimeout(()=>A._bracketsLeftYield(j,I+1,v,C,m,d));break}const b=r.close[0];if(r.isOpen){let u=D.has(b)?D.get(b):0;if(u-=1,D.set(b,Math.max(0,u)),u<0){let c=m.get(b);if(c){let p=c.shift();c.size===0&&m.delete(b);const S=x.a.fromPositions(r.range.getEndPosition(),p.getStartPosition()),E=x.a.fromPositions(r.range.getStartPosition(),p.getEndPosition());d.push({range:S}),d.push({range:E}),A._addBracketLeading(v,E,d)}}}else{let u=D.has(b)?D.get(b):0;D.set(b,u+1)}C=r.range.getStartPosition()}}static _addBracketLeading(j,I,v){if(I.startLineNumber===I.endLineNumber)return;const C=I.startLineNumber,m=j.getLineFirstNonWhitespaceColumn(C);m!==0&&m!==I.startColumn&&(v.push({range:x.a.fromPositions(new B.a(C,m),I.getEndPosition())}),v.push({range:x.a.fromPositions(new B.a(C,1),I.getEndPosition())}));const d=C-1;if(d>0){const D=j.getLineFirstNonWhitespaceColumn(d);D===I.startColumn&&D!==j.getLineLastNonWhitespaceColumn(d)&&(v.push({range:x.a.fromPositions(new B.a(d,D),I.getEndPosition())}),v.push({range:x.a.fromPositions(new B.a(d,1),I.getEndPosition())}))}}}A._maxDuration=30,A._maxRounds=2},ZCR3:function(mt,M,t){"use strict";t.d(M,"a",function(){return g});function g(B,x,R){let A=null,j=null;if(typeof R.value=="function"?(A="value",j=R.value,j.length!==0&&console.warn("Memoize should only be used in functions with zero parameters")):typeof R.get=="function"&&(A="get",j=R.get),!j)throw new Error("not supported");const I=`$memoize$${x}`;R[A]=function(...v){return this.hasOwnProperty(I)||Object.defineProperty(this,I,{configurable:!1,enumerable:!1,writable:!1,value:j.apply(this,v)}),this[I]}}},ZQ78:function(mt,M,t){"use strict";t.d(M,"a",function(){return B}),t.d(M,"b",function(){return x}),t.d(M,"c",function(){return R});var g=t("ubTv");const B={RESOURCES:"ResourceURLs",DOWNLOAD_URL:"DownloadURL",FILES:"Files",TEXT:g.a.text,TERMINALS:"Terminals"};class x{constructor(A){this.data=A}update(){}getData(){return this.data}}const R={CurrentDragAndDropData:void 0}},"ZkA/":function(mt,M,t){"use strict";t.r(M);var g=t("+hIS");Object(g.a)({id:"mips",extensions:[".s"],aliases:["MIPS","MIPS-V"],mimetypes:["text/x-mips","text/mips","text/plaintext"],loader:function(){return t.e(343).then(t.bind(null,"DTUS"))}})},ZlPH:function(mt,M,t){"use strict";t.d(M,"a",function(){return g}),t.d(M,"b",function(){return B});class g{constructor(x){this.domNode=x,this._maxWidth=-1,this._width=-1,this._height=-1,this._top=-1,this._left=-1,this._bottom=-1,this._right=-1,this._fontFamily="",this._fontWeight="",this._fontSize=-1,this._fontFeatureSettings="",this._lineHeight=-1,this._letterSpacing=-100,this._className="",this._display="",this._position="",this._visibility="",this._backgroundColor="",this._layerHint=!1,this._contain="none",this._boxShadow=""}setMaxWidth(x){if(this._maxWidth===x)return;this._maxWidth=x,this.domNode.style.maxWidth=this._maxWidth+"px"}setWidth(x){if(this._width===x)return;this._width=x,this.domNode.style.width=this._width+"px"}setHeight(x){if(this._height===x)return;this._height=x,this.domNode.style.height=this._height+"px"}setTop(x){if(this._top===x)return;this._top=x,this.domNode.style.top=this._top+"px"}unsetTop(){if(this._top===-1)return;this._top=-1,this.domNode.style.top=""}setLeft(x){if(this._left===x)return;this._left=x,this.domNode.style.left=this._left+"px"}setBottom(x){if(this._bottom===x)return;this._bottom=x,this.domNode.style.bottom=this._bottom+"px"}setRight(x){if(this._right===x)return;this._right=x,this.domNode.style.right=this._right+"px"}setFontFamily(x){if(this._fontFamily===x)return;this._fontFamily=x,this.domNode.style.fontFamily=this._fontFamily}setFontWeight(x){if(this._fontWeight===x)return;this._fontWeight=x,this.domNode.style.fontWeight=this._fontWeight}setFontSize(x){if(this._fontSize===x)return;this._fontSize=x,this.domNode.style.fontSize=this._fontSize+"px"}setFontFeatureSettings(x){if(this._fontFeatureSettings===x)return;this._fontFeatureSettings=x,this.domNode.style.fontFeatureSettings=this._fontFeatureSettings}setLineHeight(x){if(this._lineHeight===x)return;this._lineHeight=x,this.domNode.style.lineHeight=this._lineHeight+"px"}setLetterSpacing(x){if(this._letterSpacing===x)return;this._letterSpacing=x,this.domNode.style.letterSpacing=this._letterSpacing+"px"}setClassName(x){if(this._className===x)return;this._className=x,this.domNode.className=this._className}toggleClassName(x,R){this.domNode.classList.toggle(x,R),this._className=this.domNode.className}setDisplay(x){if(this._display===x)return;this._display=x,this.domNode.style.display=this._display}setPosition(x){if(this._position===x)return;this._position=x,this.domNode.style.position=this._position}setVisibility(x){if(this._visibility===x)return;this._visibility=x,this.domNode.style.visibility=this._visibility}setBackgroundColor(x){if(this._backgroundColor===x)return;this._backgroundColor=x,this.domNode.style.backgroundColor=this._backgroundColor}setLayerHinting(x){if(this._layerHint===x)return;this._layerHint=x,this.domNode.style.transform=this._layerHint?"translate3d(0px, 0px, 0px)":""}setBoxShadow(x){if(this._boxShadow===x)return;this._boxShadow=x,this.domNode.style.boxShadow=x}setContain(x){if(this._contain===x)return;this._contain=x,this.domNode.style.contain=this._contain}setAttribute(x,R){this.domNode.setAttribute(x,R)}removeAttribute(x){this.domNode.removeAttribute(x)}appendChild(x){this.domNode.appendChild(x.domNode)}removeChild(x){this.domNode.removeChild(x.domNode)}}function B(x){return new g(x)}},Zr1c:function(mt,M,t){"use strict";t.d(M,"a",function(){return x});var g=t("Cg/j"),B=t("zdb4");t.d(M,"b",function(){return B.a});const x=Object(g.c)("quickInputService")},ZvGG:function(mt,M,t){"use strict";t.r(M);var g=t("+hIS");Object(g.a)({id:"lua",extensions:[".lua"],aliases:["Lua","lua"],loader:function(){return t.e(341).then(t.bind(null,"yUwd"))}})},aBYw:function(mt,M,t){"use strict";t.d(M,"a",function(){return C});var g=t("MI8n"),B=t("pmY6"),x=t("MNsG");function R(m,d){return!!m[d]}class A{constructor(m,d){this.target=m.target,this.hasTriggerModifier=R(m.event,d.triggerModifier),this.hasSideBySideModifier=R(m.event,d.triggerSideBySideModifier),this.isNoneOrSingleMouseDown=m.event.detail<=1}}class j{constructor(m,d){this.keyCodeIsTriggerKey=m.keyCode===d.triggerKey,this.keyCodeIsSideBySideKey=m.keyCode===d.triggerSideBySideKey,this.hasTriggerModifier=R(m,d.triggerModifier)}}class I{constructor(m,d,D,L){this.triggerKey=m,this.triggerModifier=d,this.triggerSideBySideKey=D,this.triggerSideBySideModifier=L}equals(m){return this.triggerKey===m.triggerKey&&this.triggerModifier===m.triggerModifier&&this.triggerSideBySideKey===m.triggerSideBySideKey&&this.triggerSideBySideModifier===m.triggerSideBySideModifier}}function v(m){return m==="altKey"?x.f?new I(57,"metaKey",6,"altKey"):new I(5,"ctrlKey",6,"altKey"):x.f?new I(6,"altKey",57,"metaKey"):new I(6,"altKey",5,"ctrlKey")}class C extends B.a{constructor(m){super();this._onMouseMoveOrRelevantKeyDown=this._register(new g.b),this.onMouseMoveOrRelevantKeyDown=this._onMouseMoveOrRelevantKeyDown.event,this._onExecute=this._register(new g.b),this.onExecute=this._onExecute.event,this._onCancel=this._register(new g.b),this.onCancel=this._onCancel.event,this._editor=m,this._opts=v(this._editor.getOption(69)),this._lastMouseMoveEvent=null,this._hasTriggerKeyOnMouseDown=!1,this._lineNumberOnMouseDown=0,this._register(this._editor.onDidChangeConfiguration(d=>{if(d.hasChanged(69)){const D=v(this._editor.getOption(69));if(this._opts.equals(D))return;this._opts=D,this._lastMouseMoveEvent=null,this._hasTriggerKeyOnMouseDown=!1,this._lineNumberOnMouseDown=0,this._onCancel.fire()}})),this._register(this._editor.onMouseMove(d=>this._onEditorMouseMove(new A(d,this._opts)))),this._register(this._editor.onMouseDown(d=>this._onEditorMouseDown(new A(d,this._opts)))),this._register(this._editor.onMouseUp(d=>this._onEditorMouseUp(new A(d,this._opts)))),this._register(this._editor.onKeyDown(d=>this._onEditorKeyDown(new j(d,this._opts)))),this._register(this._editor.onKeyUp(d=>this._onEditorKeyUp(new j(d,this._opts)))),this._register(this._editor.onMouseDrag(()=>this._resetHandler())),this._register(this._editor.onDidChangeCursorSelection(d=>this._onDidChangeCursorSelection(d))),this._register(this._editor.onDidChangeModel(d=>this._resetHandler())),this._register(this._editor.onDidChangeModelContent(()=>this._resetHandler())),this._register(this._editor.onDidScrollChange(d=>{(d.scrollTopChanged||d.scrollLeftChanged)&&this._resetHandler()}))}_onDidChangeCursorSelection(m){m.selection&&m.selection.startColumn!==m.selection.endColumn&&this._resetHandler()}_onEditorMouseMove(m){this._lastMouseMoveEvent=m,this._onMouseMoveOrRelevantKeyDown.fire([m,null])}_onEditorMouseDown(m){this._hasTriggerKeyOnMouseDown=m.hasTriggerModifier,this._lineNumberOnMouseDown=m.target.position?m.target.position.lineNumber:0}_onEditorMouseUp(m){const d=m.target.position?m.target.position.lineNumber:0;this._hasTriggerKeyOnMouseDown&&this._lineNumberOnMouseDown&&this._lineNumberOnMouseDown===d&&this._onExecute.fire(m)}_onEditorKeyDown(m){this._lastMouseMoveEvent&&(m.keyCodeIsTriggerKey||m.keyCodeIsSideBySideKey&&m.hasTriggerModifier)?this._onMouseMoveOrRelevantKeyDown.fire([this._lastMouseMoveEvent,m]):m.hasTriggerModifier&&this._onCancel.fire()}_onEditorKeyUp(m){m.keyCodeIsTriggerKey&&this._onCancel.fire()}_resetHandler(){this._lastMouseMoveEvent=null,this._hasTriggerKeyOnMouseDown=!1,this._onCancel.fire()}}},ajgA:function(mt,M,t){"use strict";t.r(M);var g=t("+hIS");Object(g.a)({id:"razor",extensions:[".cshtml"],aliases:["Razor","razor"],mimetypes:["text/x-cshtml"],loader:function(){return t.e(358).then(t.bind(null,"Fzfo"))}})},al33:function(mt,M,t){"use strict";t.d(M,"a",function(){return d}),t.d(M,"b",function(){return w});var g=t("MI8n"),B=t("7afs"),x=t("pmY6"),R=t("QDVR"),A=t("Sdnv"),j=t("l2gE"),I=t("MrjW");function v(b,u,c,p){if(Array.isArray(b)){let S=0;for(const E of b){const y=v(E,u,c,p);if(y===10)return y;y>S&&(S=y)}return S}else{if(typeof b=="string")return p?b==="*"?5:b===c?10:0:0;if(b){const{language:S,pattern:E,scheme:y,hasAccessToAllModels:O}=b;if(!p&&!O)return 0;let k=0;if(y)if(y===u.scheme)k=10;else if(y==="*")k=5;else return 0;if(S)if(S===c)k=10;else if(S==="*")k=Math.max(k,5);else return 0;if(E){let Q;if(typeof E=="string"?Q=E:Q=Object.assign(Object.assign({},E),{base:Object(I.d)(E.base)}),Q===u.fsPath||Object(j.a)(Q,u.fsPath))k=10;else return 0}return k}else return 0}}var C=t("G2kB");function m(b){return typeof b=="string"?!1:Array.isArray(b)?b.every(m):!!b.exclusive}class d{constructor(){this._clock=0,this._entries=[],this._onDidChange=new g.b}get onDidChange(){return this._onDidChange.event}register(b,u){let c={selector:b,provider:u,_score:-1,_time:this._clock++};return this._entries.push(c),this._lastCandidate=void 0,this._onDidChange.fire(this._entries.length),Object(x.i)(()=>{if(c){let p=this._entries.indexOf(c);p>=0&&(this._entries.splice(p,1),this._lastCandidate=void 0,this._onDidChange.fire(this._entries.length),c=void 0)}})}has(b){return this.all(b).length>0}all(b){if(!b)return[];this._updateScores(b);const u=[];for(let c of this._entries)c._score>0&&u.push(c.provider);return u}ordered(b){const u=[];return this._orderedForEach(b,c=>u.push(c.provider)),u}orderedGroups(b){const u=[];let c,p;return this._orderedForEach(b,S=>{c&&p===S._score?c.push(S.provider):(p=S._score,c=[S.provider],u.push(c))}),u}_orderedForEach(b,u){if(!b)return;this._updateScores(b);for(const c of this._entries)c._score>0&&u(c)}_updateScores(b){let u={uri:b.uri.toString(),language:b.getLanguageId()};if(this._lastCandidate&&this._lastCandidate.language===u.language&&this._lastCandidate.uri===u.uri)return;this._lastCandidate=u;for(let c of this._entries)if(c._score=v(c.selector,b.uri,b.getLanguageId(),Object(C.b)(b)),m(c.selector)&&c._score>0){for(let p of this._entries)p._score=0;c._score=1e3;break}this._entries.sort(d._compareByScoreAndTime)}static _compareByScoreAndTime(b,u){return b._score<u._score?1:b._score>u._score?-1:b._time<u._time?1:b._time>u._time?-1:0}}const D=new WeakMap;let L=0;function r(b){let u=D.get(b);return u===void 0&&(u=++L,D.set(b,u)),u}class w{constructor(b,u,c=Number.MAX_SAFE_INTEGER){this._registry=b,this.min=u,this.max=c,this._cache=new R.a(50,.7)}_key(b){return b.id+this._registry.all(b).reduce((u,c)=>Object(B.b)(r(c),u),0)}_clamp(b){return b===void 0?this.min:Math.min(this.max,Math.max(this.min,Math.floor(b*1.3)))}get(b){const u=this._key(b),c=this._cache.get(u);return this._clamp(c==null?void 0:c.value)}update(b,u){const c=this._key(b);let p=this._cache.get(c);return p||(p=new A.a,this._cache.set(c,p)),p.update(u),this.get(b)}}},aokT:function(mt,M,t){"use strict";t.d(M,"a",function(){return B});var g=t("cGHE");class B{constructor(x,R,A,j){x>A||x===A&&R>j?(this.startLineNumber=A,this.startColumn=j,this.endLineNumber=x,this.endColumn=R):(this.startLineNumber=x,this.startColumn=R,this.endLineNumber=A,this.endColumn=j)}isEmpty(){return B.isEmpty(this)}static isEmpty(x){return x.startLineNumber===x.endLineNumber&&x.startColumn===x.endColumn}containsPosition(x){return B.containsPosition(this,x)}static containsPosition(x,R){return R.lineNumber<x.startLineNumber||R.lineNumber>x.endLineNumber||R.lineNumber===x.startLineNumber&&R.column<x.startColumn?!1:!(R.lineNumber===x.endLineNumber&&R.column>x.endColumn)}containsRange(x){return B.containsRange(this,x)}static containsRange(x,R){return R.startLineNumber<x.startLineNumber||R.endLineNumber<x.startLineNumber||(R.startLineNumber>x.endLineNumber||R.endLineNumber>x.endLineNumber||R.startLineNumber===x.startLineNumber&&R.startColumn<x.startColumn)?!1:!(R.endLineNumber===x.endLineNumber&&R.endColumn>x.endColumn)}strictContainsRange(x){return B.strictContainsRange(this,x)}static strictContainsRange(x,R){return R.startLineNumber<x.startLineNumber||R.endLineNumber<x.startLineNumber||(R.startLineNumber>x.endLineNumber||R.endLineNumber>x.endLineNumber||R.startLineNumber===x.startLineNumber&&R.startColumn<=x.startColumn)?!1:!(R.endLineNumber===x.endLineNumber&&R.endColumn>=x.endColumn)}plusRange(x){return B.plusRange(this,x)}static plusRange(x,R){let A,j,I,v;return R.startLineNumber<x.startLineNumber?(A=R.startLineNumber,j=R.startColumn):R.startLineNumber===x.startLineNumber?(A=R.startLineNumber,j=Math.min(R.startColumn,x.startColumn)):(A=x.startLineNumber,j=x.startColumn),R.endLineNumber>x.endLineNumber?(I=R.endLineNumber,v=R.endColumn):R.endLineNumber===x.endLineNumber?(I=R.endLineNumber,v=Math.max(R.endColumn,x.endColumn)):(I=x.endLineNumber,v=x.endColumn),new B(A,j,I,v)}intersectRanges(x){return B.intersectRanges(this,x)}static intersectRanges(x,R){let A=x.startLineNumber,j=x.startColumn,I=x.endLineNumber,v=x.endColumn,C=R.startLineNumber,m=R.startColumn,d=R.endLineNumber,D=R.endColumn;return A<C?(A=C,j=m):A===C&&(j=Math.max(j,m)),I>d?(I=d,v=D):I===d&&(v=Math.min(v,D)),A>I||A===I&&j>v?null:new B(A,j,I,v)}equalsRange(x){return B.equalsRange(this,x)}static equalsRange(x,R){return!!x&&!!R&&x.startLineNumber===R.startLineNumber&&x.startColumn===R.startColumn&&x.endLineNumber===R.endLineNumber&&x.endColumn===R.endColumn}getEndPosition(){return B.getEndPosition(this)}static getEndPosition(x){return new g.a(x.endLineNumber,x.endColumn)}getStartPosition(){return B.getStartPosition(this)}static getStartPosition(x){return new g.a(x.startLineNumber,x.startColumn)}toString(){return"["+this.startLineNumber+","+this.startColumn+" -> "+this.endLineNumber+","+this.endColumn+"]"}setEndPosition(x,R){return new B(this.startLineNumber,this.startColumn,x,R)}setStartPosition(x,R){return new B(x,R,this.endLineNumber,this.endColumn)}collapseToStart(){return B.collapseToStart(this)}static collapseToStart(x){return new B(x.startLineNumber,x.startColumn,x.startLineNumber,x.startColumn)}static fromPositions(x,R=x){return new B(x.lineNumber,x.column,R.lineNumber,R.column)}static lift(x){return x?new B(x.startLineNumber,x.startColumn,x.endLineNumber,x.endColumn):null}static isIRange(x){return x&&typeof x.startLineNumber=="number"&&typeof x.startColumn=="number"&&typeof x.endLineNumber=="number"&&typeof x.endColumn=="number"}static areIntersectingOrTouching(x,R){return x.endLineNumber<R.startLineNumber||x.endLineNumber===R.startLineNumber&&x.endColumn<R.startColumn?!1:!(R.endLineNumber<x.startLineNumber||R.endLineNumber===x.startLineNumber&&R.endColumn<x.startColumn)}static areIntersecting(x,R){return x.endLineNumber<R.startLineNumber||x.endLineNumber===R.startLineNumber&&x.endColumn<=R.startColumn?!1:!(R.endLineNumber<x.startLineNumber||R.endLineNumber===x.startLineNumber&&R.endColumn<=x.startColumn)}static compareRangesUsingStarts(x,R){if(x&&R){const I=x.startLineNumber|0,v=R.startLineNumber|0;if(I===v){const C=x.startColumn|0,m=R.startColumn|0;if(C===m){const d=x.endLineNumber|0,D=R.endLineNumber|0;if(d===D){const L=x.endColumn|0,r=R.endColumn|0;return L-r}return d-D}return C-m}return I-v}const A=x?1:0,j=R?1:0;return A-j}static compareRangesUsingEnds(x,R){return x.endLineNumber===R.endLineNumber?x.endColumn===R.endColumn?x.startLineNumber===R.startLineNumber?x.startColumn-R.startColumn:x.startLineNumber-R.startLineNumber:x.endColumn-R.endColumn:x.endLineNumber-R.endLineNumber}static spansMultipleLines(x){return x.endLineNumber>x.startLineNumber}}},bY76:function(mt,M,t){"use strict";t.d(M,"a",function(){return D}),t.d(M,"b",function(){return c});var g=t("MrjW"),B=t("MNsG");const x=/^\w[\w\d+.-]*$/,R=/^\//,A=/^\/\//;function j(O,k){if(!O.scheme&&k)throw new Error(`[UriError]: Scheme is missing: {scheme: "", authority: "${O.authority}", path: "${O.path}", query: "${O.query}", fragment: "${O.fragment}"}`);if(O.scheme&&!x.test(O.scheme))throw new Error("[UriError]: Scheme contains illegal characters.");if(O.path){if(O.authority){if(!R.test(O.path))throw new Error('[UriError]: If a URI contains an authority component, then the path component must either be empty or begin with a slash ("/") character')}else if(A.test(O.path))throw new Error('[UriError]: If a URI does not contain an authority component, then the path cannot begin with two slash characters ("//")')}}function I(O,k){return!O&&!k?"file":O}function v(O,k){switch(O){case"https":case"http":case"file":k?k[0]!==m&&(k=m+k):k=m;break}return k}const C="",m="/",d=/^(([^:/?#]+?):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?/;class D{constructor(O,k,Q,q,z,J=!1){typeof O=="object"?(this.scheme=O.scheme||C,this.authority=O.authority||C,this.path=O.path||C,this.query=O.query||C,this.fragment=O.fragment||C):(this.scheme=I(O,J),this.authority=k||C,this.path=v(this.scheme,Q||C),this.query=q||C,this.fragment=z||C,j(this,J))}static isUri(O){return O instanceof D?!0:O?typeof O.authority=="string"&&typeof O.fragment=="string"&&typeof O.path=="string"&&typeof O.query=="string"&&typeof O.scheme=="string"&&typeof O.fsPath=="string"&&typeof O.with=="function"&&typeof O.toString=="function":!1}get fsPath(){return c(this,!1)}with(O){if(!O)return this;let{scheme:k,authority:Q,path:q,query:z,fragment:J}=O;return k===void 0?k=this.scheme:k===null&&(k=C),Q===void 0?Q=this.authority:Q===null&&(Q=C),q===void 0?q=this.path:q===null&&(q=C),z===void 0?z=this.query:z===null&&(z=C),J===void 0?J=this.fragment:J===null&&(J=C),k===this.scheme&&Q===this.authority&&q===this.path&&z===this.query&&J===this.fragment?this:new r(k,Q,q,z,J)}static parse(O,k=!1){const Q=d.exec(O);return Q?new r(Q[2]||C,y(Q[4]||C),y(Q[5]||C),y(Q[7]||C),y(Q[9]||C),k):new r(C,C,C,C,C)}static file(O){let k=C;if(B.i&&(O=O.replace(/\\/g,m)),O[0]===m&&O[1]===m){const Q=O.indexOf(m,2);Q===-1?(k=O.substring(2),O=m):(k=O.substring(2,Q),O=O.substring(Q)||m)}return new r("file",k,O,C,C)}static from(O){const k=new r(O.scheme,O.authority,O.path,O.query,O.fragment);return j(k,!0),k}static joinPath(O,...k){if(!O.path)throw new Error("[UriError]: cannot call joinPath on URI without path");let Q;return B.i&&O.scheme==="file"?Q=D.file(g.i.join(c(O,!0),...k)).path:Q=g.e.join(O.path,...k),O.with({path:Q})}toString(O=!1){return p(this,O)}toJSON(){return this}static revive(O){if(O){if(O instanceof D)return O;{const k=new r(O);return k._formatted=O.external,k._fsPath=O._sep===L?O.fsPath:null,k}}else return O}}const L=B.i?1:void 0;class r extends D{constructor(){super(...arguments);this._formatted=null,this._fsPath=null}get fsPath(){return this._fsPath||(this._fsPath=c(this,!1)),this._fsPath}toString(O=!1){return O?p(this,!0):(this._formatted||(this._formatted=p(this,!1)),this._formatted)}toJSON(){const O={$mid:1};return this._fsPath&&(O.fsPath=this._fsPath,O._sep=L),this._formatted&&(O.external=this._formatted),this.path&&(O.path=this.path),this.scheme&&(O.scheme=this.scheme),this.authority&&(O.authority=this.authority),this.query&&(O.query=this.query),this.fragment&&(O.fragment=this.fragment),O}}const w={[58]:"%3A",[47]:"%2F",[63]:"%3F",[35]:"%23",[91]:"%5B",[93]:"%5D",[64]:"%40",[33]:"%21",[36]:"%24",[38]:"%26",[39]:"%27",[40]:"%28",[41]:"%29",[42]:"%2A",[43]:"%2B",[44]:"%2C",[59]:"%3B",[61]:"%3D",[32]:"%20"};function b(O,k){let Q,q=-1;for(let z=0;z<O.length;z++){const J=O.charCodeAt(z);if(J>=97&&J<=122||J>=65&&J<=90||J>=48&&J<=57||J===45||J===46||J===95||J===126||k&&J===47)q!==-1&&(Q+=encodeURIComponent(O.substring(q,z)),q=-1),Q!==void 0&&(Q+=O.charAt(z));else{Q===void 0&&(Q=O.substr(0,z));const re=w[J];re!==void 0?(q!==-1&&(Q+=encodeURIComponent(O.substring(q,z)),q=-1),Q+=re):q===-1&&(q=z)}}return q!==-1&&(Q+=encodeURIComponent(O.substring(q))),Q!==void 0?Q:O}function u(O){let k;for(let Q=0;Q<O.length;Q++){const q=O.charCodeAt(Q);q===35||q===63?(k===void 0&&(k=O.substr(0,Q)),k+=w[q]):k!==void 0&&(k+=O[Q])}return k!==void 0?k:O}function c(O,k){let Q;return O.authority&&O.path.length>1&&O.scheme==="file"?Q=`//${O.authority}${O.path}`:O.path.charCodeAt(0)===47&&(O.path.charCodeAt(1)>=65&&O.path.charCodeAt(1)<=90||O.path.charCodeAt(1)>=97&&O.path.charCodeAt(1)<=122)&&O.path.charCodeAt(2)===58?k?Q=O.path.substr(1):Q=O.path[1].toLowerCase()+O.path.substr(2):Q=O.path,B.i&&(Q=Q.replace(/\//g,"\\")),Q}function p(O,k){const Q=k?u:b;let q="",{scheme:z,authority:J,path:re,query:Z,fragment:ne}=O;if(z&&(q+=z,q+=":"),(J||z==="file")&&(q+=m,q+=m),J){let le=J.indexOf("@");if(le!==-1){const _e=J.substr(0,le);J=J.substr(le+1),le=_e.indexOf(":"),le===-1?q+=Q(_e,!1):(q+=Q(_e.substr(0,le),!1),q+=":",q+=Q(_e.substr(le+1),!1)),q+="@"}J=J.toLowerCase(),le=J.indexOf(":"),le===-1?q+=Q(J,!1):(q+=Q(J.substr(0,le),!1),q+=J.substr(le))}if(re){if(re.length>=3&&re.charCodeAt(0)===47&&re.charCodeAt(2)===58){const le=re.charCodeAt(1);le>=65&&le<=90&&(re=`/${String.fromCharCode(le+32)}:${re.substr(3)}`)}else if(re.length>=2&&re.charCodeAt(1)===58){const le=re.charCodeAt(0);le>=65&&le<=90&&(re=`${String.fromCharCode(le+32)}:${re.substr(2)}`)}q+=Q(re,!0)}return Z&&(q+="?",q+=Q(Z,!1)),ne&&(q+="#",q+=k?ne:b(ne,!1)),q}function S(O){try{return decodeURIComponent(O)}catch(k){return O.length>3?O.substr(0,3)+S(O.substr(3)):O}}const E=/(%[0-9A-Za-z][0-9A-Za-z])+/g;function y(O){return O.match(E)?O.replace(E,k=>S(k)):O}},ba9Q:function(mt,M,t){"use strict";t.r(M);var g=t("sswD"),B=t("LCkn"),x=t("+Fos"),R=t("aokT"),A=t("wQH0"),j=t("3/fG");class I extends g.b{constructor(){super({id:"editor.action.transposeLetters",label:j.a("transposeLetters.label","Transpose Letters"),alias:"Transpose Letters",precondition:A.a.writable,kbOpts:{kbExpr:A.a.textInputFocus,primary:0,mac:{primary:256|50},weight:100}})}run(v,C){if(!C.hasModel())return;let m=C.getModel(),d=[],D=C.getSelections();for(let L of D){if(!L.isEmpty())continue;let r=L.startLineNumber,w=L.startColumn,b=m.getLineMaxColumn(r);if(r===1&&(w===1||w===2&&b===2))continue;let u=w===b?L.getPosition():x.a.rightPosition(m,L.getPosition().lineNumber,L.getPosition().column),c=x.a.leftPosition(m,u),p=x.a.leftPosition(m,c),S=m.getValueInRange(R.a.fromPositions(p,c)),E=m.getValueInRange(R.a.fromPositions(c,u)),y=R.a.fromPositions(p,u);d.push(new B.a(y,E+S))}d.length>0&&(C.pushUndoStop(),C.executeCommands(this.id,d),C.pushUndoStop())}}Object(g.j)(I)},baJR:function(mt,M,t){"use strict";t.d(M,"b",function(){return A}),t.d(M,"c",function(){return j}),t.d(M,"a",function(){return I}),t.d(M,"d",function(){return m}),t.d(M,"e",function(){return D});var g=t("N0LK"),B=t("erNZ"),x=t("dBaI");class R{constructor(O,k,Q){this._linePartBrand=void 0,this.endIndex=O,this.type=k,this.metadata=Q}isWhitespace(){return!!(this.metadata&1)}isPseudoAfter(){return!!(this.metadata&4)}}class A{constructor(O,k){this.startOffset=O,this.endOffset=k}equals(O){return this.startOffset===O.startOffset&&this.endOffset===O.endOffset}}class j{constructor(O,k,Q,q,z,J,re,Z,ne,le,_e,Ce,oe,ae,V,G,ee,pe,Te){this.useMonospaceOptimizations=O,this.canUseHalfwidthRightwardsArrow=k,this.lineContent=Q,this.continuesWithWrappedLine=q,this.isBasicASCII=z,this.containsRTL=J,this.fauxIndentLength=re,this.lineTokens=Z,this.lineDecorations=ne.sort(x.a.compare),this.tabSize=le,this.startVisibleColumn=_e,this.spaceWidth=Ce,this.stopRenderingLineAfter=V,this.renderWhitespace=G==="all"?4:G==="boundary"?1:G==="selection"?2:G==="trailing"?3:0,this.renderControlCharacters=ee,this.fontLigatures=pe,this.selectionsOnLine=Te&&Te.sort((Oe,Xe)=>Oe.startOffset<Xe.startOffset?-1:1);const Ie=Math.abs(ae-Ce),Me=Math.abs(oe-Ce);Ie<Me?(this.renderSpaceWidth=ae,this.renderSpaceCharCode=11825):(this.renderSpaceWidth=oe,this.renderSpaceCharCode=183)}sameSelection(O){if(this.selectionsOnLine===null)return O===null;if(O===null)return!1;if(O.length!==this.selectionsOnLine.length)return!1;for(let k=0;k<this.selectionsOnLine.length;k++)if(!this.selectionsOnLine[k].equals(O[k]))return!1;return!0}equals(O){return this.useMonospaceOptimizations===O.useMonospaceOptimizations&&this.canUseHalfwidthRightwardsArrow===O.canUseHalfwidthRightwardsArrow&&this.lineContent===O.lineContent&&this.continuesWithWrappedLine===O.continuesWithWrappedLine&&this.isBasicASCII===O.isBasicASCII&&this.containsRTL===O.containsRTL&&this.fauxIndentLength===O.fauxIndentLength&&this.tabSize===O.tabSize&&this.startVisibleColumn===O.startVisibleColumn&&this.spaceWidth===O.spaceWidth&&this.renderSpaceWidth===O.renderSpaceWidth&&this.renderSpaceCharCode===O.renderSpaceCharCode&&this.stopRenderingLineAfter===O.stopRenderingLineAfter&&this.renderWhitespace===O.renderWhitespace&&this.renderControlCharacters===O.renderControlCharacters&&this.fontLigatures===O.fontLigatures&&x.a.equalsArr(this.lineDecorations,O.lineDecorations)&&this.lineTokens.equals(O.lineTokens)&&this.sameSelection(O.selectionsOnLine)}}class I{constructor(O,k){this.partIndex=O,this.charIndex=k}}class v{constructor(O,k){this.length=O,this._data=new Uint32Array(this.length),this._absoluteOffsets=new Uint32Array(this.length)}static getPartIndex(O){return(O&4294901760)>>>16}static getCharIndex(O){return(O&65535)>>>0}setColumnInfo(O,k,Q,q){const z=(k<<16|Q<<0)>>>0;this._data[O-1]=z,this._absoluteOffsets[O-1]=q+Q}getAbsoluteOffset(O){return this._absoluteOffsets.length===0?0:this._absoluteOffsets[O-1]}charOffsetToPartData(O){return this.length===0?0:O<0?this._data[0]:O>=this.length?this._data[this.length-1]:this._data[O]}getDomPosition(O){const k=this.charOffsetToPartData(O-1),Q=v.getPartIndex(k),q=v.getCharIndex(k);return new I(Q,q)}getColumn(O,k){const Q=this.partDataToCharOffset(O.partIndex,k,O.charIndex);return Q+1}partDataToCharOffset(O,k,Q){if(this.length===0)return 0;let q=(O<<16|Q<<0)>>>0,z=0,J=this.length-1;for(;z+1<J;){let V=z+J>>>1,G=this._data[V];if(G===q)return V;G>q?J=V:z=V}if(z===J)return z;let re=this._data[z],Z=this._data[J];if(re===q)return z;if(Z===q)return J;let ne=v.getPartIndex(re),le=v.getCharIndex(re),_e=v.getPartIndex(Z),Ce;ne!==_e?Ce=k:Ce=v.getCharIndex(Z);let oe=Q-le,ae=Ce-Q;return oe<=ae?z:J}}class C{constructor(O,k,Q){this._renderLineOutputBrand=void 0,this.characterMapping=O,this.containsRTL=k,this.containsForeignElements=Q}}function m(O,k){if(O.lineContent.length===0){if(O.lineDecorations.length>0){k.appendASCIIString("<span>");let Q=0,q=0,z=0;for(const re of O.lineDecorations)(re.type===1||re.type===2)&&(k.appendASCIIString('<span class="'),k.appendASCIIString(re.className),k.appendASCIIString('"></span>'),re.type===1&&(z|=1,Q++),re.type===2&&(z|=2,q++));k.appendASCIIString("</span>");const J=new v(1,Q+q);return J.setColumnInfo(1,Q,0,0),new C(J,!1,z)}return k.appendASCIIString("<span><span></span></span>"),new C(new v(0,0),!1,0)}return E(r(O),k)}class d{constructor(O,k,Q,q){this.characterMapping=O,this.html=k,this.containsRTL=Q,this.containsForeignElements=q}}function D(O){let k=Object(B.a)(1e4),Q=m(O,k);return new d(Q.characterMapping,k.build(),Q.containsRTL,Q.containsForeignElements)}class L{constructor(O,k,Q,q,z,J,re,Z,ne,le,_e,Ce,oe,ae,V){this.fontIsMonospace=O,this.canUseHalfwidthRightwardsArrow=k,this.lineContent=Q,this.len=q,this.isOverflowing=z,this.parts=J,this.containsForeignElements=re,this.fauxIndentLength=Z,this.tabSize=ne,this.startVisibleColumn=le,this.containsRTL=_e,this.spaceWidth=Ce,this.renderSpaceCharCode=oe,this.renderWhitespace=ae,this.renderControlCharacters=V}}function r(O){const k=O.lineContent;let Q,q;O.stopRenderingLineAfter!==-1&&O.stopRenderingLineAfter<k.length?(Q=!0,q=O.stopRenderingLineAfter):(Q=!1,q=k.length);let z=w(O.lineTokens,O.fauxIndentLength,q);(O.renderWhitespace===4||O.renderWhitespace===1||O.renderWhitespace===2&&!!O.selectionsOnLine||O.renderWhitespace===3)&&(z=p(O,k,q,z));let J=0;if(O.lineDecorations.length>0){for(let re=0,Z=O.lineDecorations.length;re<Z;re++){const ne=O.lineDecorations[re];ne.type===3||ne.type===1?J|=1:ne.type===2&&(J|=2)}z=S(k,q,z,O.lineDecorations)}return O.containsRTL||(z=b(k,z,!O.isBasicASCII||O.fontLigatures)),O.renderControlCharacters&&!O.isBasicASCII&&(z=c(k,z)),new L(O.useMonospaceOptimizations,O.canUseHalfwidthRightwardsArrow,k,q,Q,z,J,O.fauxIndentLength,O.tabSize,O.startVisibleColumn,O.containsRTL,O.spaceWidth,O.renderSpaceCharCode,O.renderWhitespace,O.renderControlCharacters)}function w(O,k,Q){let q=[],z=0;k>0&&(q[z++]=new R(k,"",0));for(let J=0,re=O.getCount();J<re;J++){const Z=O.getEndOffset(J);if(Z<=k)continue;const ne=O.getClassName(J);if(Z>=Q){q[z++]=new R(Q,ne,0);break}q[z++]=new R(Z,ne,0)}return q}function b(O,k,Q){let q=0,z=[],J=0;if(Q)for(let re=0,Z=k.length;re<Z;re++){const ne=k[re],le=ne.endIndex;if(q+50<le){const _e=ne.type,Ce=ne.metadata;let oe=-1,ae=q;for(let V=q;V<le;V++)O.charCodeAt(V)===32&&(oe=V),oe!==-1&&V-ae>=50&&(z[J++]=new R(oe+1,_e,Ce),ae=oe+1,oe=-1);ae!==le&&(z[J++]=new R(le,_e,Ce))}else z[J++]=ne;q=le}else for(let re=0,Z=k.length;re<Z;re++){const ne=k[re],le=ne.endIndex;let _e=le-q;if(_e>50){const Ce=ne.type,oe=ne.metadata,ae=Math.ceil(_e/50);for(let V=1;V<ae;V++){let G=q+V*50;z[J++]=new R(G,Ce,oe)}z[J++]=new R(le,Ce,oe)}else z[J++]=ne;q=le}return z}function u(O){return O<32?O!==9:O===127?!0:O>=8234&&O<=8238||O>=8294&&O<=8297||O>=8206&&O<=8207||O===1564}function c(O,k){let Q=[],q=new R(0,"",0),z=0;for(const J of k){const re=J.endIndex;for(;z<re;z++){const Z=O.charCodeAt(z);u(Z)&&(z>q.endIndex&&(q=new R(z,J.type,J.metadata),Q.push(q)),q=new R(z+1,"mtkcontrol",J.metadata),Q.push(q))}z>q.endIndex&&(q=new R(re,J.type,J.metadata),Q.push(q))}return Q}function p(O,k,Q,q){const z=O.continuesWithWrappedLine,J=O.fauxIndentLength,re=O.tabSize,Z=O.startVisibleColumn,ne=O.useMonospaceOptimizations,le=O.selectionsOnLine,_e=O.renderWhitespace===1,Ce=O.renderWhitespace===3,oe=O.renderSpaceWidth!==O.spaceWidth;let ae=[],V=0,G=0,ee=q[G].type,pe=q[G].endIndex;const Te=q.length;let Ie=!1,Me=g.u(k),Oe;Me===-1?(Ie=!0,Me=Q,Oe=Q):Oe=g.I(k);let Xe=!1,fe=0,Pe=le&&le[fe],Be=Z%re;for(let me=J;me<Q;me++){const he=k.charCodeAt(me);Pe&&me>=Pe.endOffset&&(fe++,Pe=le&&le[fe]);let Le;if(me<Me||me>Oe)Le=!0;else if(he===9)Le=!0;else if(he===32)if(_e)if(Xe)Le=!0;else{const we=me+1<Q?k.charCodeAt(me+1):0;Le=we===32||we===9}else Le=!0;else Le=!1;if(Le&&le&&(Le=!!Pe&&Pe.startOffset<=me&&Pe.endOffset>me),Le&&Ce&&(Le=Ie||me>Oe),Xe){if(!Le||!ne&&Be>=re){if(oe){const we=V>0?ae[V-1].endIndex:J;for(let ve=we+1;ve<=me;ve++)ae[V++]=new R(ve,"mtkw",1)}else ae[V++]=new R(me,"mtkw",1);Be=Be%re}}else(me===pe||Le&&me>J)&&(ae[V++]=new R(me,ee,0),Be=Be%re);for(he===9?Be=re:g.D(he)?Be+=2:Be++,Xe=Le;me===pe&&(G++,G<Te);)ee=q[G].type,pe=q[G].endIndex}let Se=!1;if(Xe)if(z&&_e){let me=Q>0?k.charCodeAt(Q-1):0,he=Q>1?k.charCodeAt(Q-2):0,Le=me===32&&he!==32&&he!==9;Le||(Se=!0)}else Se=!0;if(Se)if(oe){const me=V>0?ae[V-1].endIndex:J;for(let he=me+1;he<=Q;he++)ae[V++]=new R(he,"mtkw",1)}else ae[V++]=new R(Q,"mtkw",1);else ae[V++]=new R(Q,ee,0);return ae}function S(O,k,Q,q){q.sort(x.a.compare);const z=x.b.normalize(O,q),J=z.length;let re=0,Z=[],ne=0,le=0;for(let Ce=0,oe=Q.length;Ce<oe;Ce++){const ae=Q[Ce],V=ae.endIndex,G=ae.type,ee=ae.metadata;for(;re<J&&z[re].startOffset<V;){const pe=z[re];if(pe.startOffset>le&&(le=pe.startOffset,Z[ne++]=new R(le,G,ee)),pe.endOffset+1<=V)le=pe.endOffset+1,Z[ne++]=new R(le,G+" "+pe.className,ee|pe.metadata),re++;else{le=V,Z[ne++]=new R(le,G+" "+pe.className,ee|pe.metadata);break}}V>le&&(le=V,Z[ne++]=new R(le,G,ee))}const _e=Q[Q.length-1].endIndex;if(re<J&&z[re].startOffset===_e)for(;re<J&&z[re].startOffset===_e;){const Ce=z[re];Z[ne++]=new R(le,Ce.className,Ce.metadata),re++}return Z}function E(O,k){const Q=O.fontIsMonospace,q=O.canUseHalfwidthRightwardsArrow,z=O.containsForeignElements,J=O.lineContent,re=O.len,Z=O.isOverflowing,ne=O.parts,le=O.fauxIndentLength,_e=O.tabSize,Ce=O.startVisibleColumn,oe=O.containsRTL,ae=O.spaceWidth,V=O.renderSpaceCharCode,G=O.renderWhitespace,ee=O.renderControlCharacters,pe=new v(re+1,ne.length);let Te=!1,Ie=0,Me=Ce,Oe=0,Xe=0,fe=0,Pe=0;oe?k.appendASCIIString('<span dir="ltr">'):k.appendASCIIString("<span>");for(let Be=0,Se=ne.length;Be<Se;Be++){Pe+=fe;const me=ne[Be],he=me.endIndex,Le=me.type,we=G!==0&&me.isWhitespace(),ve=we&&!Q&&(Le==="mtkw"||!z),ie=Ie===he&&me.isPseudoAfter();if(Oe=0,k.appendASCIIString('<span class="'),k.appendASCIIString(ve?"mtkz":Le),k.appendASCII(34),we){let W=0;{let U=Ie,se=Me;for(;U<he;U++){const je=J.charCodeAt(U),Re=(je===9?_e-se%_e:1)|0;W+=Re,U>=le&&(se+=Re)}}for(ve&&(k.appendASCIIString(' style="width:'),k.appendASCIIString(String(ae*W)),k.appendASCIIString('px"')),k.appendASCII(62);Ie<he;Ie++){pe.setColumnInfo(Ie+1,Be-Xe,Oe,Pe),Xe=0;const U=J.charCodeAt(Ie);let se;if(U===9){se=_e-Me%_e|0,!q||se>1?k.write1(8594):k.write1(65515);for(let je=2;je<=se;je++)k.write1(160)}else se=1,k.write1(V);Oe+=se,Ie>=le&&(Me+=se)}fe=W}else{let W=0;for(k.appendASCII(62);Ie<he;Ie++){pe.setColumnInfo(Ie+1,Be-Xe,Oe,Pe),Xe=0;const U=J.charCodeAt(Ie);let se=1,je=1;switch(U){case 9:se=_e-Me%_e,je=se;for(let Re=1;Re<=se;Re++)k.write1(160);break;case 32:k.write1(160);break;case 60:k.appendASCIIString("<");break;case 62:k.appendASCIIString(">");break;case 38:k.appendASCIIString("&");break;case 0:ee?k.write1(9216):k.appendASCIIString("�");break;case 65279:case 8232:case 8233:case 133:k.write1(65533);break;default:g.D(U)&&je++,ee&&U<32?k.write1(9216+U):ee&&U===127?k.write1(9249):ee&&u(U)?(k.appendASCIIString("[U+"),k.appendASCIIString(y(U)),k.appendASCIIString("]"),se=8):k.write1(U)}Oe+=se,W+=se,Ie>=le&&(Me+=je)}fe=W}ie?Xe++:Xe=0,Ie>=re&&!Te&&me.isPseudoAfter()&&(Te=!0,pe.setColumnInfo(Ie+1,Be,Oe,Pe)),k.appendASCIIString("</span>")}return Te||pe.setColumnInfo(re+1,ne.length-1,Oe,Pe),Z&&k.appendASCIIString("<span>…</span>"),k.appendASCIIString("</span>"),new C(pe,oe,z)}function y(O){return O.toString(16).toUpperCase().padStart(4,"0")}},bexQ:function(mt,M,t){"use strict";t.d(M,"a",function(){return B});var g=t("Cg/j");const B=Object(g.c)("keybindingService")},bfR1:function(mt,M,t){"use strict";t.r(M);var g=t("sswD"),B=t("Yr1X"),x=t("3/fG");class R extends g.b{constructor(){super({id:"editor.action.fontZoomIn",label:x.a("EditorFontZoomIn.label","Editor Font Zoom In"),alias:"Editor Font Zoom In",precondition:void 0})}run(I,v){B.a.setZoomLevel(B.a.getZoomLevel()+1)}}class A extends g.b{constructor(){super({id:"editor.action.fontZoomOut",label:x.a("EditorFontZoomOut.label","Editor Font Zoom Out"),alias:"Editor Font Zoom Out",precondition:void 0})}run(I,v){B.a.setZoomLevel(B.a.getZoomLevel()-1)}}class j extends g.b{constructor(){super({id:"editor.action.fontZoomReset",label:x.a("EditorFontZoomReset.label","Editor Font Zoom Reset"),alias:"Editor Font Zoom Reset",precondition:void 0})}run(I,v){B.a.setZoomLevel(0)}}Object(g.j)(R),Object(g.j)(A),Object(g.j)(j)},bk7F:function(mt,M,t){"use strict";t.r(M),t.d(M,"BracketMatchingController",function(){return E});var g=t("X+cX"),B=t("pmY6"),x=t("8ATB"),R=t.n(x),A=t("sswD"),j=t("cGHE"),I=t("aokT"),v=t("gCVg"),C=t("wQH0"),m=t("M1Kb"),d=t("tX9W"),D=t("kYye"),L=t("3/fG"),r=t("fjLI"),w=t("MD5Z"),b=t("t9D7");const u=Object(w.wc)("editorOverviewRuler.bracketMatchForeground",{dark:"#A0A0A0",light:"#A0A0A0",hc:"#A0A0A0"},L.a("overviewRulerBracketMatchForeground","Overview ruler marker color for matching brackets."));class c extends A.b{constructor(){super({id:"editor.action.jumpToBracket",label:L.a("smartSelect.jumpBracket","Go to Bracket"),alias:"Go to Bracket",precondition:void 0,kbOpts:{kbExpr:C.a.editorTextFocus,primary:2048|1024|88,weight:100}})}run(y,O){let k=E.get(O);if(!k)return;k.jumpToBracket()}}class p extends A.b{constructor(){super({id:"editor.action.selectToBracket",label:L.a("smartSelect.selectToBracket","Select to Bracket"),alias:"Select to Bracket",precondition:void 0,description:{description:"Select to Bracket",args:[{name:"args",schema:{type:"object",properties:{selectBrackets:{type:"boolean",default:!0}}}}]}})}run(y,O,k){const Q=E.get(O);if(!Q)return;let q=!0;k&&k.selectBrackets===!1&&(q=!1),Q.selectToBracket(q)}}class S{constructor(y,O,k){this.position=y,this.brackets=O,this.options=k}}class E extends B.a{constructor(y){super();this._editor=y,this._lastBracketsData=[],this._lastVersionId=0,this._decorations=[],this._updateBracketsSoon=this._register(new g.e(()=>this._updateBrackets(),50)),this._matchBrackets=this._editor.getOption(63),this._updateBracketsSoon.schedule(),this._register(y.onDidChangeCursorPosition(O=>{if(this._matchBrackets==="never")return;this._updateBracketsSoon.schedule()})),this._register(y.onDidChangeModelContent(O=>{this._updateBracketsSoon.schedule()})),this._register(y.onDidChangeModel(O=>{this._lastBracketsData=[],this._decorations=[],this._updateBracketsSoon.schedule()})),this._register(y.onDidChangeModelLanguageConfiguration(O=>{this._lastBracketsData=[],this._updateBracketsSoon.schedule()})),this._register(y.onDidChangeConfiguration(O=>{O.hasChanged(63)&&(this._matchBrackets=this._editor.getOption(63),this._decorations=this._editor.deltaDecorations(this._decorations,[]),this._lastBracketsData=[],this._lastVersionId=0,this._updateBracketsSoon.schedule())})),this._register(y.onDidBlurEditorWidget(()=>{this._updateBracketsSoon.schedule()})),this._register(y.onDidFocusEditorWidget(()=>{this._updateBracketsSoon.schedule()}))}static get(y){return y.getContribution(E.ID)}jumpToBracket(){if(!this._editor.hasModel())return;const y=this._editor.getModel(),O=this._editor.getSelections().map(k=>{const Q=k.getStartPosition(),q=y.matchBracket(Q);let z=null;if(q)q[0].containsPosition(Q)?z=q[1].getStartPosition():q[1].containsPosition(Q)&&(z=q[0].getStartPosition());else{const J=y.findEnclosingBrackets(Q);if(J)z=J[0].getStartPosition();else{const re=y.findNextBracket(Q);re&&re.range&&(z=re.range.getStartPosition())}}return z?new v.a(z.lineNumber,z.column,z.lineNumber,z.column):new v.a(Q.lineNumber,Q.column,Q.lineNumber,Q.column)});this._editor.setSelections(O),this._editor.revealRange(O[0])}selectToBracket(y){if(!this._editor.hasModel())return;const O=this._editor.getModel(),k=[];this._editor.getSelections().forEach(Q=>{const q=Q.getStartPosition();let z=O.matchBracket(q);if(!z&&(z=O.findEnclosingBrackets(q),!z)){const Z=O.findNextBracket(q);Z&&Z.range&&(z=O.matchBracket(Z.range.getStartPosition()))}let J=null,re=null;if(z){z.sort(I.a.compareRangesUsingStarts);const[Z,ne]=z;if(J=y?Z.getStartPosition():Z.getEndPosition(),re=y?ne.getEndPosition():ne.getStartPosition(),ne.containsPosition(q)){const le=J;J=re,re=le}}J&&re&&k.push(new v.a(J.lineNumber,J.column,re.lineNumber,re.column))}),k.length>0&&(this._editor.setSelections(k),this._editor.revealRange(k[0]))}_updateBrackets(){if(this._matchBrackets==="never")return;this._recomputeBrackets();let y=[],O=0;for(const k of this._lastBracketsData){let Q=k.brackets;Q&&(y[O++]={range:Q[0],options:k.options},y[O++]={range:Q[1],options:k.options})}this._decorations=this._editor.deltaDecorations(this._decorations,y)}_recomputeBrackets(){if(!this._editor.hasModel()||!this._editor.hasWidgetFocus()){this._lastBracketsData=[],this._lastVersionId=0;return}const y=this._editor.getSelections();if(y.length>100){this._lastBracketsData=[],this._lastVersionId=0;return}const O=this._editor.getModel(),k=O.getVersionId();let Q=[];this._lastVersionId===k&&(Q=this._lastBracketsData);let q=[],z=0;for(let le=0,_e=y.length;le<_e;le++){let Ce=y[le];Ce.isEmpty()&&(q[z++]=Ce.getStartPosition())}q.length>1&&q.sort(j.a.compare);let J=[],re=0,Z=0,ne=Q.length;for(let le=0,_e=q.length;le<_e;le++){let Ce=q[le];for(;Z<ne&&Q[Z].position.isBefore(Ce);)Z++;if(Z<ne&&Q[Z].position.equals(Ce))J[re++]=Q[Z];else{let oe=O.matchBracket(Ce),ae=E._DECORATION_OPTIONS_WITH_OVERVIEW_RULER;!oe&&this._matchBrackets==="always"&&(oe=O.findEnclosingBrackets(Ce,20),ae=E._DECORATION_OPTIONS_WITHOUT_OVERVIEW_RULER),J[re++]=new S(Ce,oe,ae)}}this._lastBracketsData=J,this._lastVersionId=k}}E.ID="editor.contrib.bracketMatchingController",E._DECORATION_OPTIONS_WITH_OVERVIEW_RULER=d.b.register({description:"bracket-match-overview",stickiness:1,className:"bracket-match",overviewRuler:{color:Object(b.g)(u),position:m.g.Center}}),E._DECORATION_OPTIONS_WITHOUT_OVERVIEW_RULER=d.b.register({description:"bracket-match-no-overview",stickiness:1,className:"bracket-match"}),Object(A.l)(E.ID,E),Object(A.j)(p),Object(A.j)(c),Object(b.f)((y,O)=>{const k=y.getColor(D.j);k&&O.addRule(`.monaco-editor .bracket-match { background-color: ${k}; }`);const Q=y.getColor(D.k);Q&&O.addRule(`.monaco-editor .bracket-match { border: 1px solid ${Q}; }`)}),r.d.appendMenuItem(r.b.MenubarGoMenu,{group:"5_infile_nav",command:{id:"editor.action.jumpToBracket",title:L.a({key:"miGoToBracket",comment:["&& denotes a mnemonic"]},"Go to &&Bracket")},order:2})},c2dO:function(mt,M,t){"use strict";t.r(M),t.d(M,"htmlLanguageService",function(){return L}),t.d(M,"htmlDefaults",function(){return r}),t.d(M,"handlebarLanguageService",function(){return w}),t.d(M,"handlebarDefaults",function(){return b}),t.d(M,"razorLanguageService",function(){return u}),t.d(M,"razorDefaults",function(){return c}),t.d(M,"registerHTMLLanguageService",function(){return S});var g=t("M/lh"),B=t.n(g),x=t("NQK8"),R=function(E,y,O,k){function Q(q){return q instanceof O?q:new O(function(z){z(q)})}return new(O||(O=Promise))(function(q,z){function J(ne){try{Z(k.next(ne))}catch(le){z(le)}}function re(ne){try{Z(k.throw(ne))}catch(le){z(le)}}function Z(ne){ne.done?q(ne.value):Q(ne.value).then(J,re)}Z((k=k.apply(E,y||[])).next())})},A=function(E,y){var O={label:0,sent:function(){if(q[0]&1)throw q[1];return q[1]},trys:[],ops:[]},k,Q,q,z;return z={next:J(0),throw:J(1),return:J(2)},typeof Symbol=="function"&&(z[Symbol.iterator]=function(){return this}),z;function J(Z){return function(ne){return re([Z,ne])}}function re(Z){if(k)throw new TypeError("Generator is already executing.");for(;O;)try{if(k=1,Q&&(q=Z[0]&2?Q.return:Z[0]?Q.throw||((q=Q.return)&&q.call(Q),0):Q.next)&&!(q=q.call(Q,Z[1])).done)return q;(Q=0,q)&&(Z=[Z[0]&2,q.value]);switch(Z[0]){case 0:case 1:q=Z;break;case 4:return O.label++,{value:Z[1],done:!1};case 5:O.label++,Q=Z[1],Z=[0];continue;case 7:Z=O.ops.pop(),O.trys.pop();continue;default:if(!(q=O.trys,q=q.length>0&&q[q.length-1])&&(Z[0]===6||Z[0]===2)){O=0;continue}if(Z[0]===3&&(!q||Z[1]>q[0]&&Z[1]<q[3])){O.label=Z[1];break}if(Z[0]===6&&O.label<q[1]){O.label=q[1],q=Z;break}if(q&&O.label<q[2]){O.label=q[2],O.ops.push(Z);break}q[2]&&O.ops.pop(),O.trys.pop();continue}Z=y.call(E,O)}catch(ne){Z=[6,ne],Q=0}finally{k=q=0}if(Z[0]&5)throw Z[1];return{value:Z[0]?Z[1]:void 0,done:!0}}},j=function(){function E(y,O,k){this._onDidChange=new x.Emitter,this._languageId=y,this.setOptions(O),this.setModeConfiguration(k)}return Object.defineProperty(E.prototype,"onDidChange",{get:function(){return this._onDidChange.event},enumerable:!1,configurable:!0}),Object.defineProperty(E.prototype,"languageId",{get:function(){return this._languageId},enumerable:!1,configurable:!0}),Object.defineProperty(E.prototype,"options",{get:function(){return this._options},enumerable:!1,configurable:!0}),Object.defineProperty(E.prototype,"modeConfiguration",{get:function(){return this._modeConfiguration},enumerable:!1,configurable:!0}),E.prototype.setOptions=function(y){this._options=y||Object.create(null),this._onDidChange.fire(this)},E.prototype.setModeConfiguration=function(y){this._modeConfiguration=y||Object.create(null),this._onDidChange.fire(this)},E}(),I={tabSize:4,insertSpaces:!1,wrapLineLength:120,unformatted:'default": "a, abbr, acronym, b, bdo, big, br, button, cite, code, dfn, em, i, img, input, kbd, label, map, object, q, samp, select, small, span, strong, sub, sup, textarea, tt, var',contentUnformatted:"pre",indentInnerHtml:!1,preserveNewLines:!0,maxPreserveNewLines:null,indentHandlebars:!1,endWithNewline:!1,extraLiners:"head, body, /html",wrapAttributes:"auto"},v={format:I,suggest:{},data:{useDefaultDataProvider:!0}};function C(E){return{completionItems:!0,hovers:!0,documentSymbols:!0,links:!0,documentHighlights:!0,rename:!0,colors:!0,foldingRanges:!0,selectionRanges:!0,diagnostics:E===m,documentFormattingEdits:E===m,documentRangeFormattingEdits:E===m}}var m="html",d="handlebars",D="razor",L=S(m,v,C(m)),r=L.defaults,w=S(d,v,C(d)),b=w.defaults,u=S(D,v,C(D)),c=u.defaults;x.languages.html={htmlDefaults:r,razorDefaults:c,handlebarDefaults:b,htmlLanguageService:L,handlebarLanguageService:w,razorLanguageService:u,registerHTMLLanguageService:S};function p(){return t.e(319).then(t.bind(null,"+lu7"))}function S(E,y,O){var k=this;y===void 0&&(y=v),O===void 0&&(O=C(E));var Q=new j(E,y,O),q,z=x.languages.onLanguage(E,function(){return R(k,void 0,void 0,function(){return A(this,function(J){switch(J.label){case 0:return[4,p()];case 1:return q=J.sent().setupMode(Q),[2]}})})});return{defaults:Q,dispose:function(){z.dispose(),q==null||q.dispose(),q=void 0}}}},c9ML:function(mt,M,t){"use strict";t.r(M);var g=t("+hIS");Object(g.a)({id:"scss",extensions:[".scss"],aliases:["Sass","sass","scss"],mimetypes:["text/x-scss","text/scss"],loader:function(){return t.e(366).then(t.bind(null,"QJnQ"))}})},cGHE:function(mt,M,t){"use strict";t.d(M,"a",function(){return g});class g{constructor(B,x){this.lineNumber=B,this.column=x}with(B=this.lineNumber,x=this.column){return B===this.lineNumber&&x===this.column?this:new g(B,x)}delta(B=0,x=0){return this.with(this.lineNumber+B,this.column+x)}equals(B){return g.equals(this,B)}static equals(B,x){return!B&&!x?!0:!!B&&!!x&&B.lineNumber===x.lineNumber&&B.column===x.column}isBefore(B){return g.isBefore(this,B)}static isBefore(B,x){return B.lineNumber<x.lineNumber?!0:x.lineNumber<B.lineNumber?!1:B.column<x.column}isBeforeOrEqual(B){return g.isBeforeOrEqual(this,B)}static isBeforeOrEqual(B,x){return B.lineNumber<x.lineNumber?!0:x.lineNumber<B.lineNumber?!1:B.column<=x.column}static compare(B,x){let R=B.lineNumber|0,A=x.lineNumber|0;if(R===A){let j=B.column|0,I=x.column|0;return j-I}return R-A}clone(){return new g(this.lineNumber,this.column)}toString(){return"("+this.lineNumber+","+this.column+")"}static lift(B){return new g(B.lineNumber,B.column)}static isIPosition(B){return B&&typeof B.lineNumber=="number"&&typeof B.column=="number"}}},cIJc:function(mt,M,t){"use strict";t.r(M);var g=t("6OMU"),B=t("JQT/"),x=t("/cxE"),R=t("/kV6"),A=t("pmY6"),j=t("sswD"),I=t("Vxe3"),v=t("MXAL"),C=t("aokT"),m=t("wQH0"),d=t("twdY"),D=t("pAvP"),L=t("hN88"),r=t("Cduo"),w=t("3/fG"),b=t("nnTU"),u=t("T8No"),c=t("Cg/j"),p=t("tTk5"),S=function(z,J,re,Z){var ne=arguments.length,le=ne<3?J:Z===null?Z=Object.getOwnPropertyDescriptor(J,re):Z,_e;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")le=Reflect.decorate(z,J,re,Z);else for(var Ce=z.length-1;Ce>=0;Ce--)(_e=z[Ce])&&(le=(ne<3?_e(le):ne>3?_e(J,re,le):_e(J,re))||le);return ne>3&&le&&Object.defineProperty(J,re,le),le},E=function(z,J){return function(re,Z){J(re,Z,z)}},y=function(z,J,re,Z){function ne(le){return le instanceof re?le:new re(function(_e){_e(le)})}return new(re||(re=Promise))(function(le,_e){function Ce(V){try{ae(Z.next(V))}catch(G){_e(G)}}function oe(V){try{ae(Z.throw(V))}catch(G){_e(G)}}function ae(V){V.done?le(V.value):ne(V.value).then(Ce,oe)}ae((Z=Z.apply(z,J||[])).next())})};let O=class{constructor(J,re){this._workerService=re,this._callOnDispose=new A.b,this._callOnModel=new A.b,this._editor=J,this._callOnDispose.add(J.onDidChangeConfiguration(()=>this._update())),this._callOnDispose.add(J.onDidChangeModel(()=>this._update())),this._callOnDispose.add(J.onDidChangeModelLanguage(()=>this._update())),this._callOnDispose.add(d.w.onDidChange(this._update,this))}dispose(){this._callOnDispose.dispose(),this._callOnModel.dispose()}_update(){if(this._callOnModel.clear(),!this._editor.getOption(48))return;if(!this._editor.hasModel())return;const J=this._editor.getModel(),[re]=d.w.ordered(J);if(!re||!re.autoFormatTriggerCharacters)return;let Z=new v.b;for(let ne of re.autoFormatTriggerCharacters)Z.add(ne.charCodeAt(0));this._callOnModel.add(this._editor.onDidType(ne=>{let le=ne.charCodeAt(ne.length-1);Z.has(le)&&this._trigger(String.fromCharCode(le))}))}_trigger(J){if(!this._editor.hasModel())return;if(this._editor.getSelections().length>1||!this._editor.getSelection().isEmpty())return;const re=this._editor.getModel(),Z=this._editor.getPosition();let ne=!1;const le=this._editor.onDidChangeModelContent(_e=>{if(_e.isFlush){ne=!0,le.dispose();return}for(let Ce=0,oe=_e.changes.length;Ce<oe;Ce++){const ae=_e.changes[Ce];if(ae.range.endLineNumber<=Z.lineNumber){ne=!0,le.dispose();return}}});Object(L.e)(this._workerService,re,Z,J,re.getFormattingOptions()).then(_e=>{if(le.dispose(),ne)return;Object(g.n)(_e)&&(r.a.execute(this._editor,_e,!0),Object(L.b)(_e))},_e=>{throw le.dispose(),_e})}};O.ID="editor.contrib.autoFormat",O=S([E(1,D.a)],O);let k=class{constructor(J,re){this.editor=J,this._instantiationService=re,this._callOnDispose=new A.b,this._callOnModel=new A.b,this._callOnDispose.add(J.onDidChangeConfiguration(()=>this._update())),this._callOnDispose.add(J.onDidChangeModel(()=>this._update())),this._callOnDispose.add(J.onDidChangeModelLanguage(()=>this._update())),this._callOnDispose.add(d.j.onDidChange(this._update,this))}dispose(){this._callOnDispose.dispose(),this._callOnModel.dispose()}_update(){if(this._callOnModel.clear(),!this.editor.getOption(47))return;if(!this.editor.hasModel())return;if(!d.j.has(this.editor.getModel()))return;this._callOnModel.add(this.editor.onDidPaste(({range:J})=>this._trigger(J)))}_trigger(J){if(!this.editor.hasModel())return;if(this.editor.getSelections().length>1)return;this._instantiationService.invokeFunction(L.c,this.editor,J,2,p.b.None,B.a.None).catch(x.f)}};k.ID="editor.contrib.formatOnPaste",k=S([E(1,c.a)],k);class Q extends j.b{constructor(){super({id:"editor.action.formatDocument",label:w.a("formatDocument.label","Format Document"),alias:"Format Document",precondition:u.a.and(m.a.notInCompositeEditor,m.a.writable,m.a.hasDocumentFormattingProvider),kbOpts:{kbExpr:m.a.editorTextFocus,primary:1024|512|36,linux:{primary:2048|1024|39},weight:100},contextMenuOpts:{group:"1_modification",order:1.3}})}run(z,J){return y(this,void 0,void 0,function*(){if(J.hasModel()){const re=z.get(c.a),Z=z.get(p.a);yield Z.showWhile(re.invokeFunction(L.d,J,1,p.b.None,B.a.None),250)}})}}class q extends j.b{constructor(){super({id:"editor.action.formatSelection",label:w.a("formatSelection.label","Format Selection"),alias:"Format Selection",precondition:u.a.and(m.a.writable,m.a.hasDocumentSelectionFormattingProvider),kbOpts:{kbExpr:m.a.editorTextFocus,primary:Object(R.c)(2048|41,2048|36),weight:100},contextMenuOpts:{when:m.a.hasNonEmptySelection,group:"1_modification",order:1.31}})}run(z,J){return y(this,void 0,void 0,function*(){if(!J.hasModel())return;const re=z.get(c.a),Z=J.getModel(),ne=J.getSelections().map(_e=>_e.isEmpty()?new C.a(_e.startLineNumber,1,_e.startLineNumber,Z.getLineMaxColumn(_e.startLineNumber)):_e),le=z.get(p.a);yield le.showWhile(re.invokeFunction(L.c,J,ne,1,p.b.None,B.a.None),250)})}}Object(j.l)(O.ID,O),Object(j.l)(k.ID,k),Object(j.j)(Q),Object(j.j)(q),b.a.registerCommand("editor.action.format",z=>y(void 0,void 0,void 0,function*(){const J=z.get(I.a).getFocusedCodeEditor();if(!J||!J.hasModel())return;const re=z.get(b.b);J.getSelection().isEmpty()?yield re.executeCommand("editor.action.formatDocument"):yield re.executeCommand("editor.action.formatSelection")}))},cIqD:function(mt,M,t){"use strict";t.d(M,"a",function(){return B});var g=t("Ll0s");class B{static whitespaceVisibleColumn(x,R,A){const j=x.length;let I=0,v=-1,C=-1;for(let m=0;m<j;m++){if(m===R)return[v,C,I];I%A===0&&(v=m,C=I);const d=x.charCodeAt(m);switch(d){case 32:I+=1;break;case 9:I=g.a.nextRenderTabStop(I,A);break;default:return[-1,-1,-1]}}return R===j?[v,C,I]:[-1,-1,-1]}static atomicPosition(x,R,A,j){const I=x.length,[v,C,m]=B.whitespaceVisibleColumn(x,R,A);if(m===-1)return-1;let d;switch(j){case 0:d=!0;break;case 1:d=!1;break;case 2:if(m%A===0)return R;d=m%A<=A/2;break}if(d){if(v===-1)return-1;let r=C;for(let w=v;w<I;++w){if(r===C+A)return v;const b=x.charCodeAt(w);switch(b){case 32:r+=1;break;case 9:r=g.a.nextRenderTabStop(r,A);break;default:return-1}}return r===C+A?v:-1}const D=g.a.nextRenderTabStop(m,A);let L=m;for(let r=R;r<I;r++){if(L===D)return r;const w=x.charCodeAt(r);switch(w){case 32:L+=1;break;case 9:L=g.a.nextRenderTabStop(L,A);break;default:return-1}}return L===D?I:-1}}},cMOf:function(mt,M,t){"use strict";t.d(M,"a",function(){return L}),t.d(M,"b",function(){return E});var g=t("EffR"),B=t("4y0V"),x=t("pg8w"),R=t("X+cX"),A=t("ZCR3"),j=t("MI8n"),I=t("pmY6"),v=t("MNsG"),C=t("undH"),m=t.n(C),d=function(y,O,k,Q){var q=arguments.length,z=q<3?O:Q===null?Q=Object.getOwnPropertyDescriptor(O,k):Q,J;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")z=Reflect.decorate(y,O,k,Q);else for(var re=y.length-1;re>=0;re--)(J=y[re])&&(z=(q<3?J(z):q>3?J(O,k,z):J(O,k))||z);return q>3&&z&&Object.defineProperty(O,k,z),z};let D=!1;var L;(function(y){y.North="north",y.South="south",y.East="east",y.West="west"})(L||(L={}));let r=4;const w=new j.b;let b=300;const u=new j.b;class c{constructor(){this.disposables=new I.b}get onPointerMove(){return this.disposables.add(new B.a(window,"mousemove")).event}get onPointerUp(){return this.disposables.add(new B.a(window,"mouseup")).event}dispose(){this.disposables.dispose()}}d([A.a],c.prototype,"onPointerMove",null),d([A.a],c.prototype,"onPointerUp",null);class p{constructor(y){this.el=y,this.disposables=new I.b}get onPointerMove(){return this.disposables.add(new B.a(this.el,x.a.Change)).event}get onPointerUp(){return this.disposables.add(new B.a(this.el,x.a.End)).event}dispose(){this.disposables.dispose()}}d([A.a],p.prototype,"onPointerMove",null),d([A.a],p.prototype,"onPointerUp",null);class S{constructor(y){this.factory=y}get onPointerMove(){return this.factory.onPointerMove}get onPointerUp(){return this.factory.onPointerUp}dispose(){}}d([A.a],S.prototype,"onPointerMove",null),d([A.a],S.prototype,"onPointerUp",null);class E extends I.a{constructor(y,O,k){super();this.hoverDelay=b,this.hoverDelayer=this._register(new R.a(this.hoverDelay)),this._state=3,this._onDidEnablementChange=this._register(new j.b),this.onDidEnablementChange=this._onDidEnablementChange.event,this._onDidStart=this._register(new j.b),this.onDidStart=this._onDidStart.event,this._onDidChange=this._register(new j.b),this.onDidChange=this._onDidChange.event,this._onDidReset=this._register(new j.b),this.onDidReset=this._onDidReset.event,this._onDidEnd=this._register(new j.b),this.onDidEnd=this._onDidEnd.event,this.linkedSash=void 0,this.orthogonalStartSashDisposables=this._register(new I.b),this.orthogonalStartDragHandleDisposables=this._register(new I.b),this.orthogonalEndSashDisposables=this._register(new I.b),this.orthogonalEndDragHandleDisposables=this._register(new I.b),this.el=Object(g.q)(y,Object(g.a)(".monaco-sash")),k.orthogonalEdge&&this.el.classList.add(`orthogonal-edge-${k.orthogonalEdge}`),v.f&&this.el.classList.add("mac");const Q=this._register(new B.a(this.el,"mousedown")).event;this._register(Q(le=>this.onPointerStart(le,new c),this));const q=this._register(new B.a(this.el,"dblclick")).event;this._register(q(this.onPointerDoublePress,this));const z=this._register(new B.a(this.el,"mouseenter")).event;this._register(z(()=>E.onMouseEnter(this)));const J=this._register(new B.a(this.el,"mouseleave")).event;this._register(J(()=>E.onMouseLeave(this))),this._register(x.b.addTarget(this.el));const re=j.c.map(this._register(new B.a(this.el,x.a.Start)).event,le=>{var _e;return Object.assign(Object.assign({},le),{target:(_e=le.initialTarget)!==null&&_e!==void 0?_e:null})});this._register(re(le=>this.onPointerStart(le,new p(this.el)),this));const Z=this._register(new B.a(this.el,x.a.Tap)).event,ne=j.c.map(j.c.filter(j.c.debounce(Z,(le,_e)=>{var Ce;return{event:_e,count:((Ce=le==null?void 0:le.count)!==null&&Ce!==void 0?Ce:0)+1}},250),({count:le})=>le===2),({event:le})=>{var _e;return Object.assign(Object.assign({},le),{target:(_e=le.initialTarget)!==null&&_e!==void 0?_e:null})});this._register(ne(this.onPointerDoublePress,this)),typeof k.size=="number"?(this.size=k.size,k.orientation===0?this.el.style.width=`${this.size}px`:this.el.style.height=`${this.size}px`):(this.size=r,this._register(w.event(le=>{this.size=le,this.layout()}))),this._register(u.event(le=>this.hoverDelay=le)),this.hidden=!1,this.layoutProvider=O,this.orthogonalStartSash=k.orthogonalStartSash,this.orthogonalEndSash=k.orthogonalEndSash,this.orientation=k.orientation||0,this.orientation===1?(this.el.classList.add("horizontal"),this.el.classList.remove("vertical")):(this.el.classList.remove("horizontal"),this.el.classList.add("vertical")),this.el.classList.toggle("debug",D),this.layout()}get state(){return this._state}set state(y){if(this._state===y)return;this.el.classList.toggle("disabled",y===0),this.el.classList.toggle("minimum",y===1),this.el.classList.toggle("maximum",y===2),this._state=y,this._onDidEnablementChange.fire(y)}get orthogonalStartSash(){return this._orthogonalStartSash}set orthogonalStartSash(y){if(this.orthogonalStartDragHandleDisposables.clear(),this.orthogonalStartSashDisposables.clear(),y){const O=k=>{this.orthogonalStartDragHandleDisposables.clear(),k!==0&&(this._orthogonalStartDragHandle=Object(g.q)(this.el,Object(g.a)(".orthogonal-drag-handle.start")),this.orthogonalStartDragHandleDisposables.add(Object(I.i)(()=>this._orthogonalStartDragHandle.remove())),this.orthogonalStartDragHandleDisposables.add(new B.a(this._orthogonalStartDragHandle,"mouseenter")).event(()=>E.onMouseEnter(y),void 0,this.orthogonalStartDragHandleDisposables),this.orthogonalStartDragHandleDisposables.add(new B.a(this._orthogonalStartDragHandle,"mouseleave")).event(()=>E.onMouseLeave(y),void 0,this.orthogonalStartDragHandleDisposables))};this.orthogonalStartSashDisposables.add(y.onDidEnablementChange(O,this)),O(y.state)}this._orthogonalStartSash=y}get orthogonalEndSash(){return this._orthogonalEndSash}set orthogonalEndSash(y){if(this.orthogonalEndDragHandleDisposables.clear(),this.orthogonalEndSashDisposables.clear(),y){const O=k=>{this.orthogonalEndDragHandleDisposables.clear(),k!==0&&(this._orthogonalEndDragHandle=Object(g.q)(this.el,Object(g.a)(".orthogonal-drag-handle.end")),this.orthogonalEndDragHandleDisposables.add(Object(I.i)(()=>this._orthogonalEndDragHandle.remove())),this.orthogonalEndDragHandleDisposables.add(new B.a(this._orthogonalEndDragHandle,"mouseenter")).event(()=>E.onMouseEnter(y),void 0,this.orthogonalEndDragHandleDisposables),this.orthogonalEndDragHandleDisposables.add(new B.a(this._orthogonalEndDragHandle,"mouseleave")).event(()=>E.onMouseLeave(y),void 0,this.orthogonalEndDragHandleDisposables))};this.orthogonalEndSashDisposables.add(y.onDidEnablementChange(O,this)),O(y.state)}this._orthogonalEndSash=y}onPointerStart(y,O){g.c.stop(y);let k=!1;if(!y.__orthogonalSashEvent){const oe=this.getOrthogonalSash(y);oe&&(k=!0,y.__orthogonalSashEvent=!0,oe.onPointerStart(y,new S(O)))}if(this.linkedSash&&!y.__linkedSashEvent&&(y.__linkedSashEvent=!0,this.linkedSash.onPointerStart(y,new S(O))),!this.state)return;const Q=Object(g.E)("iframe");for(const oe of Q)oe.style.pointerEvents="none";const q=y.pageX,z=y.pageY,J=y.altKey,re={startX:q,currentX:q,startY:z,currentY:z,altKey:J};this.el.classList.add("active"),this._onDidStart.fire(re);const Z=Object(g.w)(this.el),ne=()=>{let oe="";k?oe="all-scroll":this.orientation===1?this.state===1?oe="s-resize":this.state===2?oe="n-resize":oe=v.f?"row-resize":"ns-resize":this.state===1?oe="e-resize":this.state===2?oe="w-resize":oe=v.f?"col-resize":"ew-resize",Z.textContent=`* { cursor: ${oe} !important; }`},le=new I.b;ne(),k||this.onDidEnablementChange(ne,null,le);const _e=oe=>{g.c.stop(oe,!1);const ae={startX:q,currentX:oe.pageX,startY:z,currentY:oe.pageY,altKey:J};this._onDidChange.fire(ae)},Ce=oe=>{g.c.stop(oe,!1),this.el.removeChild(Z),this.el.classList.remove("active"),this._onDidEnd.fire(),le.dispose();for(const ae of Q)ae.style.pointerEvents="auto"};O.onPointerMove(_e,null,le),O.onPointerUp(Ce,null,le),le.add(O)}onPointerDoublePress(y){const O=this.getOrthogonalSash(y);O&&O._onDidReset.fire(),this.linkedSash&&this.linkedSash._onDidReset.fire(),this._onDidReset.fire()}static onMouseEnter(y,O=!1){y.el.classList.contains("active")?(y.hoverDelayer.cancel(),y.el.classList.add("hover")):y.hoverDelayer.trigger(()=>y.el.classList.add("hover"),y.hoverDelay).then(void 0,()=>{}),!O&&y.linkedSash&&E.onMouseEnter(y.linkedSash,!0)}static onMouseLeave(y,O=!1){y.hoverDelayer.cancel(),y.el.classList.remove("hover"),!O&&y.linkedSash&&E.onMouseLeave(y.linkedSash,!0)}clearSashHoverState(){E.onMouseLeave(this)}layout(){if(this.orientation===0){const y=this.layoutProvider;this.el.style.left=y.getVerticalSashLeft(this)-this.size/2+"px",y.getVerticalSashTop&&(this.el.style.top=y.getVerticalSashTop(this)+"px"),y.getVerticalSashHeight&&(this.el.style.height=y.getVerticalSashHeight(this)+"px")}else{const y=this.layoutProvider;this.el.style.top=y.getHorizontalSashTop(this)-this.size/2+"px",y.getHorizontalSashLeft&&(this.el.style.left=y.getHorizontalSashLeft(this)+"px"),y.getHorizontalSashWidth&&(this.el.style.width=y.getHorizontalSashWidth(this)+"px")}}hide(){this.hidden=!0,this.el.style.display="none",this.el.setAttribute("aria-hidden","true")}getOrthogonalSash(y){return!y.target||!(y.target instanceof HTMLElement)?void 0:y.target.classList.contains("orthogonal-drag-handle")?y.target.classList.contains("start")?this.orthogonalStartSash:this.orthogonalEndSash:void 0}dispose(){super.dispose(),this.el.remove()}}},cMvZ:function(mt,M,t){"use strict";t.d(M,"a",function(){return y}),t.d(M,"c",function(){return O}),t.d(M,"b",function(){return Z});var g=t("MI8n"),B=t("pmY6"),x=t("N0LK"),R=t("0JNc"),A=t("KDc4"),j=t("BFtn");class I{constructor(oe){if(oe.autoClosingPairs?this._autoClosingPairs=oe.autoClosingPairs.map(ae=>new A.c(ae)):oe.brackets?this._autoClosingPairs=oe.brackets.map(ae=>new A.c({open:ae[0],close:ae[1]})):this._autoClosingPairs=[],oe.colorizedBracketPairs?this._colorizedBracketPairs=v(oe.colorizedBracketPairs.map(ae=>[ae[0],ae[1]])):oe.brackets?this._colorizedBracketPairs=v(oe.brackets.map(ae=>[ae[0],ae[1]]).filter(ae=>!(ae[0]==="<"&&ae[1]===">"))):this._colorizedBracketPairs=[],oe.__electricCharacterSupport&&oe.__electricCharacterSupport.docComment){const ae=oe.__electricCharacterSupport.docComment;this._autoClosingPairs.push(new A.c({open:ae.open,close:ae.close||""}))}this._autoCloseBefore=typeof oe.autoCloseBefore=="string"?oe.autoCloseBefore:I.DEFAULT_AUTOCLOSE_BEFORE_LANGUAGE_DEFINED,this._surroundingPairs=oe.surroundingPairs||this._autoClosingPairs}getAutoClosingPairs(){return this._autoClosingPairs}getAutoCloseBeforeSet(){return this._autoCloseBefore}static shouldAutoClosePair(oe,ae,V){if(ae.getTokenCount()===0)return!0;const G=ae.findTokenIndexAtOffset(V-2),ee=ae.getStandardTokenType(G);return oe.isOK(ee)}getSurroundingPairs(){return this._surroundingPairs}getColorizedBrackets(){return this._colorizedBracketPairs}}I.DEFAULT_AUTOCLOSE_BEFORE_LANGUAGE_DEFINED=`;:.,=}])>
|
|
|
`;function v(oe){return oe.filter(([ae,V])=>ae!==""&&V!=="")}var C=t("EIAu");class m{constructor(oe){this._richEditBrackets=oe}getElectricCharacters(){let oe=[];if(this._richEditBrackets)for(const ae of this._richEditBrackets.brackets)for(const V of ae.close){const G=V.charAt(V.length-1);oe.push(G)}return oe=oe.filter((ae,V,G)=>G.indexOf(ae)===V),oe}onElectricCharacter(oe,ae,V){if(!this._richEditBrackets||this._richEditBrackets.brackets.length===0)return null;const G=ae.findTokenIndexAtOffset(V-1);if(Object(j.b)(ae.getStandardTokenType(G)))return null;const ee=this._richEditBrackets.reversedRegex,pe=ae.getLineContent().substring(0,V-1)+oe,Te=C.a.findPrevBracketInRange(ee,1,pe,0,pe.length);if(!Te)return null;const Ie=pe.substring(Te.startColumn-1,Te.endColumn-1).toLowerCase(),Me=this._richEditBrackets.textIsOpenBracket[Ie];if(Me)return null;const Oe=ae.getActualLineContentBefore(Te.startColumn-1);return/^\s*$/.test(Oe)?{matchOpenBracket:Ie}:null}}function d(oe){return oe.global&&(oe.lastIndex=0),!0}class D{constructor(oe){this._indentationRules=oe}shouldIncrease(oe){return!!(this._indentationRules&&(this._indentationRules.increaseIndentPattern&&d(this._indentationRules.increaseIndentPattern)&&this._indentationRules.increaseIndentPattern.test(oe)))}shouldDecrease(oe){return!!(this._indentationRules&&this._indentationRules.decreaseIndentPattern&&d(this._indentationRules.decreaseIndentPattern)&&this._indentationRules.decreaseIndentPattern.test(oe))}shouldIndentNextLine(oe){return!!(this._indentationRules&&this._indentationRules.indentNextLinePattern&&d(this._indentationRules.indentNextLinePattern)&&this._indentationRules.indentNextLinePattern.test(oe))}shouldIgnore(oe){return!!(this._indentationRules&&this._indentationRules.unIndentedLinePattern&&d(this._indentationRules.unIndentedLinePattern)&&this._indentationRules.unIndentedLinePattern.test(oe))}getIndentMetadata(oe){let ae=0;return this.shouldIncrease(oe)&&(ae+=1),this.shouldDecrease(oe)&&(ae+=2),this.shouldIndentNextLine(oe)&&(ae+=4),this.shouldIgnore(oe)&&(ae+=8),ae}}var L=t("/cxE");class r{constructor(oe){oe=oe||{},oe.brackets=oe.brackets||[["(",")"],["{","}"],["[","]"]],this._brackets=[],oe.brackets.forEach(ae=>{const V=r._createOpenBracketRegExp(ae[0]),G=r._createCloseBracketRegExp(ae[1]);V&&G&&this._brackets.push({open:ae[0],openRegExp:V,close:ae[1],closeRegExp:G})}),this._regExpRules=oe.onEnterRules||[]}onEnter(oe,ae,V,G){if(oe>=3)for(let ee=0,pe=this._regExpRules.length;ee<pe;ee++){let Te=this._regExpRules[ee];const Ie=[{reg:Te.beforeText,text:V},{reg:Te.afterText,text:G},{reg:Te.previousLineText,text:ae}].every(Me=>Me.reg?(Me.reg.lastIndex=0,Me.reg.test(Me.text)):!0);if(Ie)return Te.action}if(oe>=2&&(V.length>0&&G.length>0))for(let ee=0,pe=this._brackets.length;ee<pe;ee++){let Te=this._brackets[ee];if(Te.openRegExp.test(V)&&Te.closeRegExp.test(G))return{indentAction:A.b.IndentOutdent}}if(oe>=2&&V.length>0)for(let ee=0,pe=this._brackets.length;ee<pe;ee++){let Te=this._brackets[ee];if(Te.openRegExp.test(V))return{indentAction:A.b.Indent}}return null}static _createOpenBracketRegExp(oe){let ae=x.t(oe);return/\B/.test(ae.charAt(0))||(ae="\\b"+ae),ae+="\\s*$",r._safeRegExp(ae)}static _createCloseBracketRegExp(oe){let ae=x.t(oe);return/\B/.test(ae.charAt(ae.length-1))||(ae=ae+"\\b"),ae="^\\s*"+ae,r._safeRegExp(ae)}static _safeRegExp(oe){try{return new RegExp(oe)}catch(ae){return Object(L.f)(ae),null}}}var w=t("Cg/j"),b=t("+7oY"),u=t("WBhO"),c=t("9fML"),p=function(oe,ae,V,G){var ee=arguments.length,pe=ee<3?ae:G===null?G=Object.getOwnPropertyDescriptor(ae,V):G,Te;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")pe=Reflect.decorate(oe,ae,V,G);else for(var Ie=oe.length-1;Ie>=0;Ie--)(Te=oe[Ie])&&(pe=(ee<3?Te(pe):ee>3?Te(ae,V,pe):Te(ae,V))||pe);return ee>3&&pe&&Object.defineProperty(ae,V,pe),pe},S=function(oe,ae){return function(V,G){ae(V,G,oe)}};class E{constructor(oe){this.languageId=oe}affects(oe){return this.languageId?this.languageId===oe:!0}}const y=Object(w.c)("languageConfigurationService");let O=class extends B.a{constructor(ae,V){super();this.configurationService=ae,this.modeService=V,this.onDidChangeEmitter=this._register(new g.b),this.onDidChange=this.onDidChangeEmitter.event,this.configurations=new Map;const G=new Set(Object.values(Q));this._register(this.configurationService.onDidChangeConfiguration(ee=>{const pe=ee.change.keys.some(Ie=>G.has(Ie)),Te=ee.change.overrides.filter(([Ie,Me])=>Me.some(Oe=>G.has(Oe))).map(([Ie])=>this.modeService.validateLanguageId(Ie));if(pe)this.configurations.clear(),this.onDidChangeEmitter.fire(new E(void 0));else for(const Ie of Te)Ie&&(this.configurations.delete(Ie),this.onDidChangeEmitter.fire(new E(Ie)))})),this._register(Z.onDidChange(ee=>{this.configurations.delete(ee.languageId),this.onDidChangeEmitter.fire(new E(ee.languageId))}))}getLanguageConfiguration(ae){let V=this.configurations.get(ae);return V||(V=k(ae,this.configurationService,this.modeService),this.configurations.set(ae,V)),V}};O=p([S(0,b.a),S(1,u.a)],O);function k(oe,ae,V){let G=Z.getLanguageConfiguration(oe);if(!G){const Ie=V.validateLanguageId(oe);if(!Ie)throw new Error("Unexpected languageId");G=new Ce(Ie,{})}const ee=q(G.languageId,ae),pe=le([G.underlyingConfig,ee]),Te=new Ce(G.languageId,pe);return Te}const Q={brackets:"editor.language.brackets",colorizedBracketPairs:"editor.language.colorizedBracketPairs"};function q(oe,ae){const V=ae.getValue(Q.brackets,{overrideIdentifier:oe}),G=ae.getValue(Q.colorizedBracketPairs,{overrideIdentifier:oe});return{brackets:z(V),colorizedBracketPairs:z(G)}}function z(oe){return Array.isArray(oe)?oe.map(ae=>!Array.isArray(ae)||ae.length!==2?void 0:[ae[0],ae[1]]).filter(ae=>!!ae):void 0}class J{constructor(oe){this.languageId=oe}}class re{constructor(){this._entries=new Map,this._onDidChange=new g.b,this.onDidChange=this._onDidChange.event}register(oe,ae,V=0){let G=this._entries.get(oe);G||(G=new ne(oe),this._entries.set(oe,G));const ee=G.register(ae,V);return this._onDidChange.fire(new J(oe)),Object(B.i)(()=>{ee.dispose(),this._onDidChange.fire(new J(oe))})}getLanguageConfiguration(oe){let ae=this._entries.get(oe);return(ae==null?void 0:ae.getResolvedConfiguration())||null}getIndentationRules(oe){const ae=this.getLanguageConfiguration(oe);return ae&&ae.indentationRules||null}_getElectricCharacterSupport(oe){let ae=this.getLanguageConfiguration(oe);return ae&&ae.electricCharacter||null}getElectricCharacters(oe){let ae=this._getElectricCharacterSupport(oe);return ae?ae.getElectricCharacters():[]}onElectricCharacter(oe,ae,V){let G=Object(j.a)(ae,V-1),ee=this._getElectricCharacterSupport(G.languageId);return ee?ee.onElectricCharacter(oe,G,V-G.firstCharOffset):null}getComments(oe){let ae=this.getLanguageConfiguration(oe);return ae&&ae.comments||null}_getCharacterPairSupport(oe){let ae=this.getLanguageConfiguration(oe);return ae&&ae.characterPair||null}getAutoClosingPairs(oe){const ae=this._getCharacterPairSupport(oe);return new A.a(ae?ae.getAutoClosingPairs():[])}getAutoCloseBeforeSet(oe){let ae=this._getCharacterPairSupport(oe);return ae?ae.getAutoCloseBeforeSet():I.DEFAULT_AUTOCLOSE_BEFORE_LANGUAGE_DEFINED}getSurroundingPairs(oe){let ae=this._getCharacterPairSupport(oe);return ae?ae.getSurroundingPairs():[]}shouldAutoClosePair(oe,ae,V){const G=Object(j.a)(ae,V-1);return I.shouldAutoClosePair(oe,G,V-G.firstCharOffset)}getWordDefinition(oe){let ae=this.getLanguageConfiguration(oe);return ae?Object(R.c)(ae.wordDefinition||null):Object(R.c)(null)}getFoldingRules(oe){let ae=this.getLanguageConfiguration(oe);return ae?ae.foldingRules:{}}getIndentRulesSupport(oe){let ae=this.getLanguageConfiguration(oe);return ae&&ae.indentRulesSupport||null}getPrecedingValidLine(oe,ae,V){let G=oe.getLanguageIdAtPosition(ae,0);if(ae>1){let ee,pe=-1;for(ee=ae-1;ee>=1;ee--){if(oe.getLanguageIdAtPosition(ee,0)!==G)return pe;let Te=oe.getLineContent(ee);if(V.shouldIgnore(Te)||/^\s+$/.test(Te)||Te===""){pe=ee;continue}return ee}}return-1}getInheritIndentForLine(oe,ae,V,G=!0){if(oe<4)return null;const ee=this.getIndentRulesSupport(ae.getLanguageId());if(!ee)return null;if(V<=1)return{indentation:"",action:null};const pe=this.getPrecedingValidLine(ae,V,ee);if(pe<0)return null;if(pe<1)return{indentation:"",action:null};const Te=ae.getLineContent(pe);if(ee.shouldIncrease(Te)||ee.shouldIndentNextLine(Te))return{indentation:x.x(Te),action:A.b.Indent,line:pe};if(ee.shouldDecrease(Te))return{indentation:x.x(Te),action:null,line:pe};{if(pe===1)return{indentation:x.x(ae.getLineContent(pe)),action:null,line:pe};const Ie=pe-1,Me=ee.getIndentMetadata(ae.getLineContent(Ie));if(!(Me&(1|2))&&Me&4){let Oe=0;for(let Xe=Ie-1;Xe>0;Xe--){if(ee.shouldIndentNextLine(ae.getLineContent(Xe)))continue;Oe=Xe;break}return{indentation:x.x(ae.getLineContent(Oe+1)),action:null,line:Oe+1}}if(G)return{indentation:x.x(ae.getLineContent(pe)),action:null,line:pe};for(let Oe=pe;Oe>0;Oe--){const Xe=ae.getLineContent(Oe);if(ee.shouldIncrease(Xe))return{indentation:x.x(Xe),action:A.b.Indent,line:Oe};if(ee.shouldIndentNextLine(Xe)){let fe=0;for(let Pe=Oe-1;Pe>0;Pe--){if(ee.shouldIndentNextLine(ae.getLineContent(Oe)))continue;fe=Pe;break}return{indentation:x.x(ae.getLineContent(fe+1)),action:null,line:fe+1}}else if(ee.shouldDecrease(Xe))return{indentation:x.x(Xe),action:null,line:Oe}}return{indentation:x.x(ae.getLineContent(1)),action:null,line:1}}}getGoodIndentForLine(oe,ae,V,G,ee){if(oe<4)return null;const pe=this.getLanguageConfiguration(V);if(!pe)return null;const Te=this.getIndentRulesSupport(V);if(!Te)return null;const Ie=this.getInheritIndentForLine(oe,ae,G),Me=ae.getLineContent(G);if(Ie){const Oe=Ie.line;if(Oe!==void 0){const Xe=pe.onEnter(oe,"",ae.getLineContent(Oe),"");if(Xe){let fe=x.x(ae.getLineContent(Oe));return Xe.removeText&&(fe=fe.substring(0,fe.length-Xe.removeText)),Xe.indentAction===A.b.Indent||Xe.indentAction===A.b.IndentOutdent?fe=ee.shiftIndent(fe):Xe.indentAction===A.b.Outdent&&(fe=ee.unshiftIndent(fe)),Te.shouldDecrease(Me)&&(fe=ee.unshiftIndent(fe)),Xe.appendText&&(fe+=Xe.appendText),x.x(fe)}}return Te.shouldDecrease(Me)?Ie.action===A.b.Indent?Ie.indentation:ee.unshiftIndent(Ie.indentation):Ie.action===A.b.Indent?ee.shiftIndent(Ie.indentation):Ie.indentation}return null}getIndentForEnter(oe,ae,V,G){if(oe<4)return null;ae.forceTokenization(V.startLineNumber);const ee=ae.getLineTokens(V.startLineNumber),pe=Object(j.a)(ee,V.startColumn-1),Te=pe.getLineContent();let Ie=!1,Me;pe.firstCharOffset>0&&ee.getLanguageId(0)!==pe.languageId?(Ie=!0,Me=Te.substr(0,V.startColumn-1-pe.firstCharOffset)):Me=ee.getLineContent().substring(0,V.startColumn-1);let Oe;if(V.isEmpty())Oe=Te.substr(V.startColumn-1-pe.firstCharOffset);else{const Le=this.getScopedLineTokens(ae,V.endLineNumber,V.endColumn);Oe=Le.getLineContent().substr(V.endColumn-1-pe.firstCharOffset)}const Xe=this.getIndentRulesSupport(pe.languageId);if(!Xe)return null;const fe=Me,Pe=x.x(Me),Be={getLineTokens:Le=>ae.getLineTokens(Le),getLanguageId:()=>ae.getLanguageId(),getLanguageIdAtPosition:(Le,we)=>ae.getLanguageIdAtPosition(Le,we),getLineContent:Le=>Le===V.startLineNumber?fe:ae.getLineContent(Le)},Se=x.x(ee.getLineContent()),me=this.getInheritIndentForLine(oe,Be,V.startLineNumber+1);if(!me){const Le=Ie?Se:Pe;return{beforeEnter:Le,afterEnter:Le}}let he=Ie?Se:me.indentation;return me.action===A.b.Indent&&(he=G.shiftIndent(he)),Xe.shouldDecrease(Oe)&&(he=G.unshiftIndent(he)),{beforeEnter:Ie?Se:Pe,afterEnter:he}}getIndentActionForType(oe,ae,V,G,ee){if(oe<4)return null;const pe=this.getScopedLineTokens(ae,V.startLineNumber,V.startColumn);if(pe.firstCharOffset)return null;const Te=this.getIndentRulesSupport(pe.languageId);if(!Te)return null;const Ie=pe.getLineContent(),Me=Ie.substr(0,V.startColumn-1-pe.firstCharOffset);let Oe;if(V.isEmpty())Oe=Ie.substr(V.startColumn-1-pe.firstCharOffset);else{const Xe=this.getScopedLineTokens(ae,V.endLineNumber,V.endColumn);Oe=Xe.getLineContent().substr(V.endColumn-1-pe.firstCharOffset)}if(!Te.shouldDecrease(Me+Oe)&&Te.shouldDecrease(Me+G+Oe)){const Xe=this.getInheritIndentForLine(oe,ae,V.startLineNumber,!1);if(!Xe)return null;let fe=Xe.indentation;return Xe.action!==A.b.Indent&&(fe=ee.unshiftIndent(fe)),fe}return null}getIndentMetadata(oe,ae){const V=this.getIndentRulesSupport(oe.getLanguageId());return V?ae<1||ae>oe.getLineCount()?null:V.getIndentMetadata(oe.getLineContent(ae)):null}getEnterAction(oe,ae,V){const G=this.getScopedLineTokens(ae,V.startLineNumber,V.startColumn),ee=this.getLanguageConfiguration(G.languageId);if(!ee)return null;const pe=G.getLineContent(),Te=pe.substr(0,V.startColumn-1-G.firstCharOffset);let Ie;if(V.isEmpty())Ie=pe.substr(V.startColumn-1-G.firstCharOffset);else{const Se=this.getScopedLineTokens(ae,V.endLineNumber,V.endColumn);Ie=Se.getLineContent().substr(V.endColumn-1-G.firstCharOffset)}let Me="";if(V.startLineNumber>1&&G.firstCharOffset===0){const Se=this.getScopedLineTokens(ae,V.startLineNumber-1);Se.languageId===G.languageId&&(Me=Se.getLineContent())}const Oe=ee.onEnter(oe,Me,Te,Ie);if(!Oe)return null;const Xe=Oe.indentAction;let fe=Oe.appendText;const Pe=Oe.removeText||0;fe?Xe===A.b.Indent&&(fe=" "+fe):Xe===A.b.Indent||Xe===A.b.IndentOutdent?fe=" ":fe="";let Be=this.getIndentationAtPosition(ae,V.startLineNumber,V.startColumn);return Pe&&(Be=Be.substring(0,Be.length-Pe)),{indentAction:Xe,appendText:fe,removeText:Pe,indentation:Be}}getIndentationAtPosition(oe,ae,V){const G=oe.getLineContent(ae);let ee=x.x(G);return ee.length>V-1&&(ee=ee.substring(0,V-1)),ee}getScopedLineTokens(oe,ae,V){oe.forceTokenization(ae);const G=oe.getLineTokens(ae),ee=typeof V=="undefined"?oe.getLineMaxColumn(ae)-1:V-1;return Object(j.a)(G,ee)}}const Z=new re;class ne{constructor(oe){this.languageId=oe,this._resolved=null,this._entries=[],this._order=0,this._resolved=null}register(oe,ae){const V=new _e(oe,ae,++this._order);return this._entries.push(V),this._resolved=null,Object(B.i)(()=>{for(let G=0;G<this._entries.length;G++)if(this._entries[G]===V){this._entries.splice(G,1),this._resolved=null;break}})}getResolvedConfiguration(){if(!this._resolved){const oe=this._resolve();oe&&(this._resolved=new Ce(this.languageId,oe))}return this._resolved}_resolve(){return this._entries.length===0?null:(this._entries.sort(_e.cmp),le(this._entries.map(oe=>oe.configuration)))}}function le(oe){let ae={comments:void 0,brackets:void 0,wordPattern:void 0,indentationRules:void 0,onEnterRules:void 0,autoClosingPairs:void 0,surroundingPairs:void 0,autoCloseBefore:void 0,folding:void 0,colorizedBracketPairs:void 0,__electricCharacterSupport:void 0};for(const V of oe)ae={comments:V.comments||ae.comments,brackets:V.brackets||ae.brackets,wordPattern:V.wordPattern||ae.wordPattern,indentationRules:V.indentationRules||ae.indentationRules,onEnterRules:V.onEnterRules||ae.onEnterRules,autoClosingPairs:V.autoClosingPairs||ae.autoClosingPairs,surroundingPairs:V.surroundingPairs||ae.surroundingPairs,autoCloseBefore:V.autoCloseBefore||ae.autoCloseBefore,folding:V.folding||ae.folding,colorizedBracketPairs:V.colorizedBracketPairs||ae.colorizedBracketPairs,__electricCharacterSupport:V.__electricCharacterSupport||ae.__electricCharacterSupport};return ae}class _e{constructor(oe,ae,V){this.configuration=oe,this.priority=ae,this.order=V}static cmp(oe,ae){return oe.priority===ae.priority?oe.order-ae.order:oe.priority-ae.priority}}class Ce{constructor(oe,ae){this.languageId=oe,this.underlyingConfig=ae,this._brackets=null,this._electricCharacter=null,this._onEnterSupport=this.underlyingConfig.brackets||this.underlyingConfig.indentationRules||this.underlyingConfig.onEnterRules?new r(this.underlyingConfig):null,this.comments=Ce._handleComments(this.underlyingConfig),this.characterPair=new I(this.underlyingConfig),this.wordDefinition=this.underlyingConfig.wordPattern||R.a,this.indentationRules=this.underlyingConfig.indentationRules,this.underlyingConfig.indentationRules?this.indentRulesSupport=new D(this.underlyingConfig.indentationRules):this.indentRulesSupport=null,this.foldingRules=this.underlyingConfig.folding||{}}getWordDefinition(){return Object(R.c)(this.wordDefinition)}get brackets(){return!this._brackets&&this.underlyingConfig.brackets&&(this._brackets=new C.b(this.languageId,this.underlyingConfig.brackets)),this._brackets}get electricCharacter(){return this._electricCharacter||(this._electricCharacter=new m(this.brackets)),this._electricCharacter}onEnter(oe,ae,V,G){return this._onEnterSupport?this._onEnterSupport.onEnter(oe,ae,V,G):null}static _handleComments(oe){let ae=oe.comments;if(!ae)return null;let V={};if(ae.lineComment&&(V.lineCommentToken=ae.lineComment),ae.blockComment){let[G,ee]=ae.blockComment;V.blockCommentStartToken=G,V.blockCommentEndToken=ee}return V}}Object(c.b)(y,O)},"ci+S":function(mt,M,t){},cl4r:function(mt,M,t){},cldp:function(mt,M,t){"use strict";t.r(M);var g=t("+hIS");Object(g.a)({id:"javascript",extensions:[".js",".es6",".jsx",".mjs"],firstLine:"^#!.*\\bnode",filenames:["jakefile"],aliases:["JavaScript","javascript","js"],mimetypes:["text/javascript"],loader:function(){return t.e(317).then(t.bind(null,"7Xl7"))}})},cqdO:function(mt,M,t){"use strict";t.d(M,"e",function(){return z}),t.d(M,"f",function(){return J}),t.d(M,"a",function(){return ne}),t.d(M,"h",function(){return Ce}),t.d(M,"g",function(){return oe}),t.d(M,"d",function(){return G}),t.d(M,"b",function(){return ee}),t.d(M,"c",function(){return Se});var g=t("EffR"),B=t("4y0V"),x=t("uDWl"),R=t("pg8w"),A=t("OBOq");class j{constructor(me){this.spliceables=me}splice(me,he,Le){this.spliceables.forEach(we=>we.splice(me,he,Le))}}var I=t("6OMU"),v=t("X+cX"),C=t("zrhQ"),m=t("ZCR3"),d=t("MI8n"),D=t("fpMC"),L=t("pmY6"),r=t("Sdnv"),w=t("qj0h"),b=t("MNsG"),u=t("746U"),c=t("4rho");class p extends Error{constructor(me,he){super(`ListError [${me}] ${he}`)}}var S=t("feEw"),E=function(me,he,Le,we){var ve=arguments.length,ie=ve<3?he:we===null?we=Object.getOwnPropertyDescriptor(he,Le):we,W;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")ie=Reflect.decorate(me,he,Le,we);else for(var U=me.length-1;U>=0;U--)(W=me[U])&&(ie=(ve<3?W(ie):ve>3?W(he,Le,ie):W(he,Le))||ie);return ve>3&&ie&&Object.defineProperty(he,Le,ie),ie},y=function(me,he,Le,we){function ve(ie){return ie instanceof Le?ie:new Le(function(W){W(ie)})}return new(Le||(Le=Promise))(function(ie,W){function U(Re){try{je(we.next(Re))}catch(We){W(We)}}function se(Re){try{je(we.throw(Re))}catch(We){W(We)}}function je(Re){Re.done?ie(Re.value):ve(Re.value).then(U,se)}je((we=we.apply(me,he||[])).next())})};class O{constructor(me){this.trait=me,this.renderedElements=[]}get templateId(){return`template:${this.trait.trait}`}renderTemplate(me){return me}renderElement(me,he,Le){const we=this.renderedElements.findIndex(ve=>ve.templateData===Le);if(we>=0){const ve=this.renderedElements[we];this.trait.unrender(Le),ve.index=he}else{const ve={index:he,templateData:Le};this.renderedElements.push(ve)}this.trait.renderIndex(he,Le)}splice(me,he,Le){const we=[];for(const ve of this.renderedElements)ve.index<me?we.push(ve):ve.index>=me+he&&we.push({index:ve.index+Le-he,templateData:ve.templateData});this.renderedElements=we}renderIndexes(me){for(const{index:he,templateData:Le}of this.renderedElements)me.indexOf(he)>-1&&this.trait.renderIndex(he,Le)}disposeTemplate(me){const he=this.renderedElements.findIndex(Le=>Le.templateData===me);if(he<0)return;this.renderedElements.splice(he,1)}}class k{constructor(me){this._trait=me,this.length=0,this.indexes=[],this.sortedIndexes=[],this._onChange=new d.b,this.onChange=this._onChange.event}get trait(){return this._trait}get renderer(){return new O(this)}splice(me,he,Le){var we;he=Math.max(0,Math.min(he,this.length-me));const ve=Le.length-he,ie=me+he,W=[...this.sortedIndexes.filter(se=>se<me),...Le.map((se,je)=>se?je+me:-1).filter(se=>se!==-1),...this.sortedIndexes.filter(se=>se>=ie).map(se=>se+ve)],U=this.length+ve;if(this.sortedIndexes.length>0&&W.length===0&&U>0){const se=(we=this.sortedIndexes.find(je=>je>=me))!==null&&we!==void 0?we:U-1;W.push(Math.min(se,U-1))}this.renderer.splice(me,he,Le.length),this._set(W,W),this.length=U}renderIndex(me,he){he.classList.toggle(this._trait,this.contains(me))}unrender(me){me.classList.remove(this._trait)}set(me,he){return this._set(me,[...me].sort(Xe),he)}_set(me,he,Le){const we=this.indexes,ve=this.sortedIndexes;this.indexes=me,this.sortedIndexes=he;const ie=Me(ve,me);return this.renderer.renderIndexes(ie),this._onChange.fire({indexes:me,browserEvent:Le}),we}get(){return this.indexes}contains(me){return Object(I.d)(this.sortedIndexes,me,Xe)>=0}dispose(){Object(L.f)(this._onChange)}}E([m.a],k.prototype,"renderer",null);class Q extends k{constructor(me){super("selected");this.setAriaSelected=me}renderIndex(me,he){super.renderIndex(me,he),this.setAriaSelected&&(this.contains(me)?he.setAttribute("aria-selected","true"):he.setAttribute("aria-selected","false"))}}class q{constructor(me,he,Le){this.trait=me,this.view=he,this.identityProvider=Le}splice(me,he,Le){if(!this.identityProvider)return this.trait.splice(me,he,Le.map(()=>!1));const we=this.trait.get().map(ie=>this.identityProvider.getId(this.view.element(ie)).toString()),ve=Le.map(ie=>we.indexOf(this.identityProvider.getId(ie).toString())>-1);this.trait.splice(me,he,ve)}}function z(me){return me.tagName==="INPUT"||me.tagName==="TEXTAREA"}function J(me){return me.classList.contains("monaco-editor")?!0:me.classList.contains("monaco-list")?!1:me.parentElement?J(me.parentElement):!1}class re{constructor(me,he,Le){this.list=me,this.view=he,this.disposables=new L.b,this.multipleSelectionDisposables=new L.b,this.onKeyDown.filter(we=>we.keyCode===3).on(this.onEnter,this,this.disposables),this.onKeyDown.filter(we=>we.keyCode===16).on(this.onUpArrow,this,this.disposables),this.onKeyDown.filter(we=>we.keyCode===18).on(this.onDownArrow,this,this.disposables),this.onKeyDown.filter(we=>we.keyCode===11).on(this.onPageUpArrow,this,this.disposables),this.onKeyDown.filter(we=>we.keyCode===12).on(this.onPageDownArrow,this,this.disposables),this.onKeyDown.filter(we=>we.keyCode===9).on(this.onEscape,this,this.disposables),Le.multipleSelectionSupport!==!1&&this.onKeyDown.filter(we=>(b.f?we.metaKey:we.ctrlKey)&&we.keyCode===31).on(this.onCtrlA,this,this.multipleSelectionDisposables)}get onKeyDown(){return d.c.chain(this.disposables.add(new B.a(this.view.domNode,"keydown")).event).filter(me=>!z(me.target)).map(me=>new x.a(me))}updateOptions(me){me.multipleSelectionSupport!==void 0&&(this.multipleSelectionDisposables.clear(),me.multipleSelectionSupport&&this.onKeyDown.filter(he=>(b.f?he.metaKey:he.ctrlKey)&&he.keyCode===31).on(this.onCtrlA,this,this.multipleSelectionDisposables))}onEnter(me){me.preventDefault(),me.stopPropagation(),this.list.setSelection(this.list.getFocus(),me.browserEvent)}onUpArrow(me){me.preventDefault(),me.stopPropagation(),this.list.focusPrevious(1,!1,me.browserEvent);const he=this.list.getFocus()[0];this.list.setAnchor(he),this.list.reveal(he),this.view.domNode.focus()}onDownArrow(me){me.preventDefault(),me.stopPropagation(),this.list.focusNext(1,!1,me.browserEvent);const he=this.list.getFocus()[0];this.list.setAnchor(he),this.list.reveal(he),this.view.domNode.focus()}onPageUpArrow(me){me.preventDefault(),me.stopPropagation(),this.list.focusPreviousPage(me.browserEvent);const he=this.list.getFocus()[0];this.list.setAnchor(he),this.list.reveal(he),this.view.domNode.focus()}onPageDownArrow(me){me.preventDefault(),me.stopPropagation(),this.list.focusNextPage(me.browserEvent);const he=this.list.getFocus()[0];this.list.setAnchor(he),this.list.reveal(he),this.view.domNode.focus()}onCtrlA(me){me.preventDefault(),me.stopPropagation(),this.list.setSelection(Object(I.r)(this.list.length),me.browserEvent),this.list.setAnchor(void 0),this.view.domNode.focus()}onEscape(me){this.list.getSelection().length&&(me.preventDefault(),me.stopPropagation(),this.list.setSelection([],me.browserEvent),this.list.setAnchor(void 0),this.view.domNode.focus())}dispose(){this.disposables.dispose(),this.multipleSelectionDisposables.dispose()}}E([m.a],re.prototype,"onKeyDown",null);var Z;(function(me){me[me.Idle=0]="Idle",me[me.Typing=1]="Typing"})(Z||(Z={}));const ne=new class{mightProducePrintableCharacter(me){return me.ctrlKey||me.metaKey||me.altKey?!1:me.keyCode>=31&&me.keyCode<=56||me.keyCode>=21&&me.keyCode<=30||me.keyCode>=93&&me.keyCode<=102||me.keyCode>=80&&me.keyCode<=90}};class le{constructor(me,he,Le,we){this.list=me,this.view=he,this.keyboardNavigationLabelProvider=Le,this.delegate=we,this.enabled=!1,this.state=Z.Idle,this.automaticKeyboardNavigation=!0,this.triggered=!1,this.previouslyFocused=-1,this.enabledDisposables=new L.b,this.disposables=new L.b,this.updateOptions(me.options)}updateOptions(me){const he=typeof me.enableKeyboardNavigation=="undefined"?!0:!!me.enableKeyboardNavigation;he?this.enable():this.disable(),typeof me.automaticKeyboardNavigation!="undefined"&&(this.automaticKeyboardNavigation=me.automaticKeyboardNavigation)}enable(){if(this.enabled)return;const me=d.c.chain(this.enabledDisposables.add(new B.a(this.view.domNode,"keydown")).event).filter(we=>!z(we.target)).filter(()=>this.automaticKeyboardNavigation||this.triggered).map(we=>new x.a(we)).filter(we=>this.delegate.mightProducePrintableCharacter(we)).forEach(we=>{we.stopPropagation(),we.preventDefault()}).map(we=>we.browserEvent.key).event,he=d.c.debounce(me,()=>null,800),Le=d.c.reduce(d.c.any(me,he),(we,ve)=>ve===null?null:(we||"")+ve);Le(this.onInput,this,this.enabledDisposables),he(this.onClear,this,this.enabledDisposables),this.enabled=!0,this.triggered=!1}disable(){if(!this.enabled)return;this.enabledDisposables.clear(),this.enabled=!1,this.triggered=!1}onClear(){var me;const he=this.list.getFocus();if(he.length>0&&he[0]===this.previouslyFocused){const Le=(me=this.list.options.accessibilityProvider)===null||me===void 0?void 0:me.getAriaLabel(this.list.element(he[0]));Le&&Object(A.a)(Le)}this.previouslyFocused=-1}onInput(me){if(!me){this.state=Z.Idle,this.triggered=!1;return}const he=this.list.getFocus(),Le=he.length>0?he[0]:0,we=this.state===Z.Idle?1:0;this.state=Z.Typing;for(let ve=0;ve<this.list.length;ve++){const ie=(Le+ve+we)%this.list.length,W=this.keyboardNavigationLabelProvider.getKeyboardNavigationLabel(this.view.element(ie)),U=W&&W.toString();if(typeof U=="undefined"||Object(D.h)(me,U)){this.previouslyFocused=Le,this.list.setFocus([ie]),this.list.reveal(ie);return}}}dispose(){this.disable(),this.enabledDisposables.dispose(),this.disposables.dispose()}}class _e{constructor(me,he){this.list=me,this.view=he,this.disposables=new L.b;const Le=d.c.chain(this.disposables.add(new B.a(he.domNode,"keydown")).event).filter(we=>!z(we.target)).map(we=>new x.a(we));Le.filter(we=>we.keyCode===2&&!we.ctrlKey&&!we.metaKey&&!we.shiftKey&&!we.altKey).on(this.onTab,this,this.disposables)}onTab(me){if(me.target!==this.view.domNode)return;const he=this.list.getFocus();if(he.length===0)return;const Le=this.view.domElement(he[0]);if(!Le)return;const we=Le.querySelector("[tabIndex]");if(!we||!(we instanceof HTMLElement)||we.tabIndex===-1)return;const ve=window.getComputedStyle(we);if(ve.visibility==="hidden"||ve.display==="none")return;me.preventDefault(),me.stopPropagation(),we.focus()}dispose(){this.disposables.dispose()}}function Ce(me){return b.f?me.browserEvent.metaKey:me.browserEvent.ctrlKey}function oe(me){return me.browserEvent.shiftKey}function ae(me){return me instanceof MouseEvent&&me.button===2}const V={isSelectionSingleChangeEvent:Ce,isSelectionRangeChangeEvent:oe};class G{constructor(me){this.list=me,this.disposables=new L.b,this._onPointer=new d.b,this.onPointer=this._onPointer.event,me.options.multipleSelectionSupport!==!1&&(this.multipleSelectionController=this.list.options.multipleSelectionController||V),this.mouseSupport=typeof me.options.mouseSupport=="undefined"||!!me.options.mouseSupport,this.mouseSupport&&(me.onMouseDown(this.onMouseDown,this,this.disposables),me.onContextMenu(this.onContextMenu,this,this.disposables),me.onMouseDblClick(this.onDoubleClick,this,this.disposables),me.onTouchStart(this.onMouseDown,this,this.disposables),this.disposables.add(R.b.addTarget(me.getHTMLElement()))),d.c.any(me.onMouseClick,me.onMouseMiddleClick,me.onTap)(this.onViewPointer,this,this.disposables)}updateOptions(me){me.multipleSelectionSupport!==void 0&&(this.multipleSelectionController=void 0,me.multipleSelectionSupport&&(this.multipleSelectionController=this.list.options.multipleSelectionController||V))}isSelectionSingleChangeEvent(me){return this.multipleSelectionController?this.multipleSelectionController.isSelectionSingleChangeEvent(me):!1}isSelectionRangeChangeEvent(me){return this.multipleSelectionController?this.multipleSelectionController.isSelectionRangeChangeEvent(me):!1}isSelectionChangeEvent(me){return this.isSelectionSingleChangeEvent(me)||this.isSelectionRangeChangeEvent(me)}onMouseDown(me){if(J(me.browserEvent.target))return;document.activeElement!==me.browserEvent.target&&this.list.domFocus()}onContextMenu(me){if(J(me.browserEvent.target))return;const he=typeof me.index=="undefined"?[]:[me.index];this.list.setFocus(he,me.browserEvent)}onViewPointer(me){if(!this.mouseSupport)return;if(z(me.browserEvent.target)||J(me.browserEvent.target))return;const he=me.index;if(typeof he=="undefined"){this.list.setFocus([],me.browserEvent),this.list.setSelection([],me.browserEvent),this.list.setAnchor(void 0);return}if(this.isSelectionRangeChangeEvent(me))return this.changeSelection(me);if(this.isSelectionChangeEvent(me))return this.changeSelection(me);this.list.setFocus([he],me.browserEvent),this.list.setAnchor(he),ae(me.browserEvent)||this.list.setSelection([he],me.browserEvent),this._onPointer.fire(me)}onDoubleClick(me){if(z(me.browserEvent.target)||J(me.browserEvent.target))return;if(this.isSelectionChangeEvent(me))return;const he=this.list.getFocus();this.list.setSelection(he,me.browserEvent)}changeSelection(me){const he=me.index;let Le=this.list.getAnchor();if(this.isSelectionRangeChangeEvent(me)){if(typeof Le=="undefined"){const je=this.list.getFocus()[0];Le=je!=null?je:he,this.list.setAnchor(Le)}const we=Math.min(Le,he),ve=Math.max(Le,he),ie=Object(I.r)(we,ve+1),W=this.list.getSelection(),U=Ie(Me(W,[Le]),Le);if(U.length===0)return;const se=Me(ie,Oe(W,U));this.list.setSelection(se,me.browserEvent),this.list.setFocus([he],me.browserEvent)}else if(this.isSelectionSingleChangeEvent(me)){const we=this.list.getSelection(),ve=we.filter(ie=>ie!==he);this.list.setFocus([he]),this.list.setAnchor(he),we.length===ve.length?this.list.setSelection([...ve,he],me.browserEvent):this.list.setSelection(ve,me.browserEvent)}}dispose(){this.disposables.dispose()}}class ee{constructor(me,he){this.styleElement=me,this.selectorSuffix=he}style(me){const he=this.selectorSuffix&&`.${this.selectorSuffix}`,Le=[];me.listBackground&&(me.listBackground.isOpaque()?Le.push(`.monaco-list${he} .monaco-list-rows { background: ${me.listBackground}; }`):b.f||console.warn(`List with id '${this.selectorSuffix}' was styled with a non-opaque background color. This will break sub-pixel antialiasing.`)),me.listFocusBackground&&(Le.push(`.monaco-list${he}:focus .monaco-list-row.focused { background-color: ${me.listFocusBackground}; }`),Le.push(`.monaco-list${he}:focus .monaco-list-row.focused:hover { background-color: ${me.listFocusBackground}; }`)),me.listFocusForeground&&Le.push(`.monaco-list${he}:focus .monaco-list-row.focused { color: ${me.listFocusForeground}; }`),me.listActiveSelectionBackground&&(Le.push(`.monaco-list${he}:focus .monaco-list-row.selected { background-color: ${me.listActiveSelectionBackground}; }`),Le.push(`.monaco-list${he}:focus .monaco-list-row.selected:hover { background-color: ${me.listActiveSelectionBackground}; }`)),me.listActiveSelectionForeground&&Le.push(`.monaco-list${he}:focus .monaco-list-row.selected { color: ${me.listActiveSelectionForeground}; }`),me.listActiveSelectionIconForeground&&Le.push(`.monaco-list${he}:focus .monaco-list-row.selected .codicon { color: ${me.listActiveSelectionIconForeground}; }`),me.listFocusAndSelectionBackground&&Le.push(`
|
|
|
.monaco-drag-image,
|
|
|
.monaco-list${he}:focus .monaco-list-row.selected.focused { background-color: ${me.listFocusAndSelectionBackground}; }
|
|
|
`),me.listFocusAndSelectionForeground&&Le.push(`
|
|
|
.monaco-drag-image,
|
|
|
.monaco-list${he}:focus .monaco-list-row.selected.focused { color: ${me.listFocusAndSelectionForeground}; }
|
|
|
`),me.listInactiveFocusForeground&&(Le.push(`.monaco-list${he} .monaco-list-row.focused { color: ${me.listInactiveFocusForeground}; }`),Le.push(`.monaco-list${he} .monaco-list-row.focused:hover { color: ${me.listInactiveFocusForeground}; }`)),me.listInactiveSelectionIconForeground&&Le.push(`.monaco-list${he} .monaco-list-row.focused .codicon { color: ${me.listInactiveSelectionIconForeground}; }`),me.listInactiveFocusBackground&&(Le.push(`.monaco-list${he} .monaco-list-row.focused { background-color: ${me.listInactiveFocusBackground}; }`),Le.push(`.monaco-list${he} .monaco-list-row.focused:hover { background-color: ${me.listInactiveFocusBackground}; }`)),me.listInactiveSelectionBackground&&(Le.push(`.monaco-list${he} .monaco-list-row.selected { background-color: ${me.listInactiveSelectionBackground}; }`),Le.push(`.monaco-list${he} .monaco-list-row.selected:hover { background-color: ${me.listInactiveSelectionBackground}; }`)),me.listInactiveSelectionForeground&&Le.push(`.monaco-list${he} .monaco-list-row.selected { color: ${me.listInactiveSelectionForeground}; }`),me.listHoverBackground&&Le.push(`.monaco-list${he}:not(.drop-target) .monaco-list-row:hover:not(.selected):not(.focused) { background-color: ${me.listHoverBackground}; }`),me.listHoverForeground&&Le.push(`.monaco-list${he} .monaco-list-row:hover:not(.selected):not(.focused) { color: ${me.listHoverForeground}; }`),me.listSelectionOutline&&Le.push(`.monaco-list${he} .monaco-list-row.selected { outline: 1px dotted ${me.listSelectionOutline}; outline-offset: -1px; }`),me.listFocusOutline&&Le.push(`
|
|
|
.monaco-drag-image,
|
|
|
.monaco-list${he}:focus .monaco-list-row.focused { outline: 1px solid ${me.listFocusOutline}; outline-offset: -1px; }
|
|
|
`),me.listInactiveFocusOutline&&Le.push(`.monaco-list${he} .monaco-list-row.focused { outline: 1px dotted ${me.listInactiveFocusOutline}; outline-offset: -1px; }`),me.listHoverOutline&&Le.push(`.monaco-list${he} .monaco-list-row:hover { outline: 1px dashed ${me.listHoverOutline}; outline-offset: -1px; }`),me.listDropBackground&&Le.push(`
|
|
|
.monaco-list${he}.drop-target,
|
|
|
.monaco-list${he} .monaco-list-rows.drop-target,
|
|
|
.monaco-list${he} .monaco-list-row.drop-target { background-color: ${me.listDropBackground} !important; color: inherit !important; }
|
|
|
`),me.listFilterWidgetBackground&&Le.push(`.monaco-list-type-filter { background-color: ${me.listFilterWidgetBackground} }`),me.listFilterWidgetOutline&&Le.push(`.monaco-list-type-filter { border: 1px solid ${me.listFilterWidgetOutline}; }`),me.listFilterWidgetNoMatchesOutline&&Le.push(`.monaco-list-type-filter.no-matches { border: 1px solid ${me.listFilterWidgetNoMatchesOutline}; }`),me.listMatchesShadow&&Le.push(`.monaco-list-type-filter { box-shadow: 1px 1px 1px ${me.listMatchesShadow}; }`),me.tableColumnsBorder&&Le.push(`
|
|
|
.monaco-table:hover > .monaco-split-view2,
|
|
|
.monaco-table:hover > .monaco-split-view2 .monaco-sash.vertical::before {
|
|
|
border-color: ${me.tableColumnsBorder};
|
|
|
}`),this.styleElement.textContent=Le.join(`
|
|
|
`)}}const pe={listFocusBackground:C.a.fromHex("#7FB0D0"),listActiveSelectionBackground:C.a.fromHex("#0E639C"),listActiveSelectionForeground:C.a.fromHex("#FFFFFF"),listActiveSelectionIconForeground:C.a.fromHex("#FFFFFF"),listFocusAndSelectionBackground:C.a.fromHex("#094771"),listFocusAndSelectionForeground:C.a.fromHex("#FFFFFF"),listInactiveSelectionBackground:C.a.fromHex("#3F3F46"),listInactiveSelectionIconForeground:C.a.fromHex("#FFFFFF"),listHoverBackground:C.a.fromHex("#2A2D2E"),listDropBackground:C.a.fromHex("#383B3D"),treeIndentGuidesStroke:C.a.fromHex("#a9a9a9"),tableColumnsBorder:C.a.fromHex("#cccccc").transparent(.2)},Te={keyboardSupport:!0,mouseSupport:!0,multipleSelectionSupport:!0,dnd:{getDragURI(){return null},onDragStart(){},onDragOver(){return!1},drop(){}}};function Ie(me,he){const Le=me.indexOf(he);if(Le===-1)return[];const we=[];let ve=Le-1;for(;ve>=0&&me[ve]===he-(Le-ve);)we.push(me[ve--]);for(we.reverse(),ve=Le;ve<me.length&&me[ve]===he+(ve-Le);)we.push(me[ve++]);return we}function Me(me,he){const Le=[];let we=0,ve=0;for(;we<me.length||ve<he.length;)if(we>=me.length)Le.push(he[ve++]);else if(ve>=he.length)Le.push(me[we++]);else if(me[we]===he[ve]){Le.push(me[we]),we++,ve++;continue}else me[we]<he[ve]?Le.push(me[we++]):Le.push(he[ve++]);return Le}function Oe(me,he){const Le=[];let we=0,ve=0;for(;we<me.length||ve<he.length;)if(we>=me.length)Le.push(he[ve++]);else if(ve>=he.length)Le.push(me[we++]);else if(me[we]===he[ve]){we++,ve++;continue}else me[we]<he[ve]?Le.push(me[we++]):ve++;return Le}const Xe=(me,he)=>me-he;class fe{constructor(me,he){this._templateId=me,this.renderers=he}get templateId(){return this._templateId}renderTemplate(me){return this.renderers.map(he=>he.renderTemplate(me))}renderElement(me,he,Le,we){let ve=0;for(const ie of this.renderers)ie.renderElement(me,he,Le[ve++],we)}disposeElement(me,he,Le,we){let ve=0;for(const ie of this.renderers)ie.disposeElement&&ie.disposeElement(me,he,Le[ve],we),ve+=1}disposeTemplate(me){let he=0;for(const Le of this.renderers)Le.disposeTemplate(me[he++])}}class Pe{constructor(me){this.accessibilityProvider=me,this.templateId="a18n"}renderTemplate(me){return me}renderElement(me,he,Le){const we=this.accessibilityProvider.getAriaLabel(me);we?Le.setAttribute("aria-label",we):Le.removeAttribute("aria-label");const ve=this.accessibilityProvider.getAriaLevel&&this.accessibilityProvider.getAriaLevel(me);typeof ve=="number"?Le.setAttribute("aria-level",`${ve}`):Le.removeAttribute("aria-level")}disposeTemplate(me){}}class Be{constructor(me,he){this.list=me,this.dnd=he}getDragElements(me){const he=this.list.getSelectedElements(),Le=he.indexOf(me)>-1?he:[me];return Le}getDragURI(me){return this.dnd.getDragURI(me)}getDragLabel(me,he){return this.dnd.getDragLabel?this.dnd.getDragLabel(me,he):void 0}onDragStart(me,he){this.dnd.onDragStart&&this.dnd.onDragStart(me,he)}onDragOver(me,he,Le,we){return this.dnd.onDragOver(me,he,Le,we)}onDragLeave(me,he,Le,we){var ve,ie;(ie=(ve=this.dnd).onDragLeave)===null||ie===void 0||ie.call(ve,me,he,Le,we)}onDragEnd(me){this.dnd.onDragEnd&&this.dnd.onDragEnd(me)}drop(me,he,Le,we){this.dnd.drop(me,he,Le,we)}}class Se{constructor(me,he,Le,we,ve=Te){var ie;this.user=me,this._options=ve,this.focus=new k("focused"),this.anchor=new k("anchor"),this.eventBufferer=new d.d,this._ariaLabel="",this.disposables=new L.b,this._onDidDispose=new d.b,this.onDidDispose=this._onDidDispose.event;const W=this._options.accessibilityProvider&&this._options.accessibilityProvider.getWidgetRole?(ie=this._options.accessibilityProvider)===null||ie===void 0?void 0:ie.getWidgetRole():"list";this.selection=new Q(W!=="listbox"),Object(w.f)(ve,pe,!1);const U=[this.focus.renderer,this.selection.renderer];this.accessibilityProvider=ve.accessibilityProvider,this.accessibilityProvider&&(U.push(new Pe(this.accessibilityProvider)),this.accessibilityProvider.onDidChangeActiveDescendant&&this.accessibilityProvider.onDidChangeActiveDescendant(this.onDidChangeActiveDescendant,this,this.disposables)),we=we.map(je=>new fe(je.templateId,[...U,je]));const se=Object.assign(Object.assign({},ve),{dnd:ve.dnd&&new Be(this,ve.dnd)});if(this.view=new S.b(he,Le,we,se),this.view.domNode.setAttribute("role",W),ve.styleController)this.styleController=ve.styleController(this.view.domId);else{const je=Object(g.w)(this.view.domNode);this.styleController=new ee(je,this.view.domId)}if(this.spliceable=new j([new q(this.focus,this.view,ve.identityProvider),new q(this.selection,this.view,ve.identityProvider),new q(this.anchor,this.view,ve.identityProvider),this.view]),this.disposables.add(this.focus),this.disposables.add(this.selection),this.disposables.add(this.anchor),this.disposables.add(this.view),this.disposables.add(this._onDidDispose),this.disposables.add(new _e(this,this.view)),(typeof ve.keyboardSupport!="boolean"||ve.keyboardSupport)&&(this.keyboardController=new re(this,this.view,ve),this.disposables.add(this.keyboardController)),ve.keyboardNavigationLabelProvider){const je=ve.keyboardNavigationDelegate||ne;this.typeLabelController=new le(this,this.view,ve.keyboardNavigationLabelProvider,je),this.disposables.add(this.typeLabelController)}this.mouseController=this.createMouseController(ve),this.disposables.add(this.mouseController),this.onDidChangeFocus(this._onFocusChange,this,this.disposables),this.onDidChangeSelection(this._onSelectionChange,this,this.disposables),this.accessibilityProvider&&(this.ariaLabel=this.accessibilityProvider.getWidgetAriaLabel()),this._options.multipleSelectionSupport!==!1&&this.view.domNode.setAttribute("aria-multiselectable","true")}get onDidChangeFocus(){return d.c.map(this.eventBufferer.wrapEvent(this.focus.onChange),me=>this.toListEvent(me))}get onDidChangeSelection(){return d.c.map(this.eventBufferer.wrapEvent(this.selection.onChange),me=>this.toListEvent(me))}get domId(){return this.view.domId}get onMouseClick(){return this.view.onMouseClick}get onMouseDblClick(){return this.view.onMouseDblClick}get onMouseMiddleClick(){return this.view.onMouseMiddleClick}get onPointer(){return this.mouseController.onPointer}get onMouseDown(){return this.view.onMouseDown}get onTouchStart(){return this.view.onTouchStart}get onTap(){return this.view.onTap}get onContextMenu(){let me=!1;const he=d.c.chain(this.disposables.add(new B.a(this.view.domNode,"keydown")).event).map(ve=>new x.a(ve)).filter(ve=>me=ve.keyCode===58||ve.shiftKey&&ve.keyCode===68).map(B.b).filter(()=>!1).event,Le=d.c.chain(this.disposables.add(new B.a(this.view.domNode,"keyup")).event).forEach(()=>me=!1).map(ve=>new x.a(ve)).filter(ve=>ve.keyCode===58||ve.shiftKey&&ve.keyCode===68).map(B.b).map(({browserEvent:ve})=>{const ie=this.getFocus(),W=ie.length?ie[0]:void 0,U=typeof W!="undefined"?this.view.element(W):void 0,se=typeof W!="undefined"?this.view.domElement(W):this.view.domNode;return{index:W,element:U,anchor:se,browserEvent:ve}}).event,we=d.c.chain(this.view.onContextMenu).filter(ve=>!me).map(({element:ve,index:ie,browserEvent:W})=>({element:ve,index:ie,anchor:{x:W.pageX+1,y:W.pageY},browserEvent:W})).event;return d.c.any(he,Le,we)}get onKeyDown(){return this.disposables.add(new B.a(this.view.domNode,"keydown")).event}get onDidFocus(){return d.c.signal(this.disposables.add(new B.a(this.view.domNode,"focus",!0)).event)}createMouseController(me){return new G(this)}updateOptions(me={}){var he;this._options=Object.assign(Object.assign({},this._options),me),this.typeLabelController&&this.typeLabelController.updateOptions(this._options),this._options.multipleSelectionController!==void 0&&(this._options.multipleSelectionSupport?this.view.domNode.setAttribute("aria-multiselectable","true"):this.view.domNode.removeAttribute("aria-multiselectable")),this.mouseController.updateOptions(me),(he=this.keyboardController)===null||he===void 0||he.updateOptions(me),this.view.updateOptions(me)}get options(){return this._options}splice(me,he,Le=[]){if(me<0||me>this.view.length)throw new p(this.user,`Invalid start index: ${me}`);if(he<0)throw new p(this.user,`Invalid delete count: ${he}`);if(he===0&&Le.length===0)return;this.eventBufferer.bufferEvents(()=>this.spliceable.splice(me,he,Le))}rerender(){this.view.rerender()}element(me){return this.view.element(me)}get length(){return this.view.length}get contentHeight(){return this.view.contentHeight}get scrollTop(){return this.view.getScrollTop()}set scrollTop(me){this.view.setScrollTop(me)}get ariaLabel(){return this._ariaLabel}set ariaLabel(me){this._ariaLabel=me,this.view.domNode.setAttribute("aria-label",me)}domFocus(){this.view.domNode.focus({preventScroll:!0})}layout(me,he){this.view.layout(me,he)}setSelection(me,he){for(const Le of me)if(Le<0||Le>=this.length)throw new p(this.user,`Invalid index ${Le}`);this.selection.set(me,he)}getSelection(){return this.selection.get()}getSelectedElements(){return this.getSelection().map(me=>this.view.element(me))}setAnchor(me){if(typeof me=="undefined"){this.anchor.set([]);return}if(me<0||me>=this.length)throw new p(this.user,`Invalid index ${me}`);this.anchor.set([me])}getAnchor(){return Object(I.j)(this.anchor.get(),void 0)}getAnchorElement(){const me=this.getAnchor();return typeof me=="undefined"?void 0:this.element(me)}setFocus(me,he){for(const Le of me)if(Le<0||Le>=this.length)throw new p(this.user,`Invalid index ${Le}`);this.focus.set(me,he)}focusNext(me=1,he=!1,Le,we){if(this.length===0)return;const ve=this.focus.get(),ie=this.findNextIndex(ve.length>0?ve[0]+me:0,he,we);ie>-1&&this.setFocus([ie],Le)}focusPrevious(me=1,he=!1,Le,we){if(this.length===0)return;const ve=this.focus.get(),ie=this.findPreviousIndex(ve.length>0?ve[0]-me:0,he,we);ie>-1&&this.setFocus([ie],Le)}focusNextPage(me,he){return y(this,void 0,void 0,function*(){let Le=this.view.indexAt(this.view.getScrollTop()+this.view.renderHeight);Le=Le===0?0:Le-1;const we=this.view.element(Le),ve=this.getFocusedElements()[0];if(ve!==we){const ie=this.findPreviousIndex(Le,!1,he);ie>-1&&ve!==this.view.element(ie)?this.setFocus([ie],me):this.setFocus([Le],me)}else{const ie=this.view.getScrollTop();this.view.setScrollTop(ie+this.view.renderHeight-this.view.elementHeight(Le)),this.view.getScrollTop()!==ie&&(this.setFocus([]),yield Object(v.n)(0),yield this.focusNextPage(me,he))}})}focusPreviousPage(me,he){return y(this,void 0,void 0,function*(){let Le;const we=this.view.getScrollTop();we===0?Le=this.view.indexAt(we):Le=this.view.indexAfter(we-1);const ve=this.view.element(Le),ie=this.getFocusedElements()[0];if(ie!==ve){const W=this.findNextIndex(Le,!1,he);W>-1&&ie!==this.view.element(W)?this.setFocus([W],me):this.setFocus([Le],me)}else{const W=we;this.view.setScrollTop(we-this.view.renderHeight),this.view.getScrollTop()!==W&&(this.setFocus([]),yield Object(v.n)(0),yield this.focusPreviousPage(me,he))}})}focusLast(me,he){if(this.length===0)return;const Le=this.findPreviousIndex(this.length-1,!1,he);Le>-1&&this.setFocus([Le],me)}focusFirst(me,he){this.focusNth(0,me,he)}focusNth(me,he,Le){if(this.length===0)return;const we=this.findNextIndex(me,!1,Le);we>-1&&this.setFocus([we],he)}findNextIndex(me,he=!1,Le){for(let we=0;we<this.length;we++){if(me>=this.length&&!he)return-1;if(me=me%this.length,!Le||Le(this.element(me)))return me;me++}return-1}findPreviousIndex(me,he=!1,Le){for(let we=0;we<this.length;we++){if(me<0&&!he)return-1;if(me=(this.length+me%this.length)%this.length,!Le||Le(this.element(me)))return me;me--}return-1}getFocus(){return this.focus.get()}getFocusedElements(){return this.getFocus().map(me=>this.view.element(me))}reveal(me,he){if(me<0||me>=this.length)throw new p(this.user,`Invalid index ${me}`);const Le=this.view.getScrollTop(),we=this.view.elementTop(me),ve=this.view.elementHeight(me);if(Object(u.j)(he)){const ie=ve-this.view.renderHeight;this.view.setScrollTop(ie*Object(r.b)(he,0,1)+we)}else{const ie=we+ve,W=Le+this.view.renderHeight;we<Le&&ie>=W||(we<Le||ie>=W&&ve>=this.view.renderHeight?this.view.setScrollTop(we):ie>=W&&this.view.setScrollTop(ie-this.view.renderHeight))}}getRelativeTop(me){if(me<0||me>=this.length)throw new p(this.user,`Invalid index ${me}`);const he=this.view.getScrollTop(),Le=this.view.elementTop(me),we=this.view.elementHeight(me);if(Le<he||Le+we>he+this.view.renderHeight)return null;const ve=we-this.view.renderHeight;return Math.abs((he-Le)/ve)}getHTMLElement(){return this.view.domNode}style(me){this.styleController.style(me)}toListEvent({indexes:me,browserEvent:he}){return{indexes:me,elements:me.map(Le=>this.view.element(Le)),browserEvent:he}}_onFocusChange(){const me=this.focus.get();this.view.domNode.classList.toggle("element-focused",me.length>0),this.onDidChangeActiveDescendant()}onDidChangeActiveDescendant(){var me;const he=this.focus.get();if(he.length>0){let Le;((me=this.accessibilityProvider)===null||me===void 0?void 0:me.getActiveDescendantId)&&(Le=this.accessibilityProvider.getActiveDescendantId(this.view.element(he[0]))),this.view.domNode.setAttribute("aria-activedescendant",Le||this.view.getElementDomId(he[0]))}else this.view.domNode.removeAttribute("aria-activedescendant")}_onSelectionChange(){const me=this.selection.get();this.view.domNode.classList.toggle("selection-none",me.length===0),this.view.domNode.classList.toggle("selection-single",me.length===1),this.view.domNode.classList.toggle("selection-multiple",me.length>1)}dispose(){this._onDidDispose.fire(),this.disposables.dispose(),this._onDidDispose.dispose()}}E([m.a],Se.prototype,"onDidChangeFocus",null),E([m.a],Se.prototype,"onDidChangeSelection",null),E([m.a],Se.prototype,"onContextMenu",null),E([m.a],Se.prototype,"onKeyDown",null),E([m.a],Se.prototype,"onDidFocus",null)},d6R0:function(mt,M,t){"use strict";t.r(M),t.d(M,"CodeLensContribution",function(){return Pe});var g=t("EffR"),B=t("X+cX"),x=t("/cxE"),R=t("7afs"),A=t("pmY6"),j=t("vATl"),I=t("sswD"),v=t("/UlZ"),C=t("wQH0"),m=t("twdY"),d=t("al33"),D=t("JQT/"),L=t("746U"),r=t("bY76"),w=t("G2kB"),b=t("nnTU"),u=function(Be,Se,me,he){function Le(we){return we instanceof me?we:new me(function(ve){ve(we)})}return new(me||(me=Promise))(function(we,ve){function ie(se){try{U(he.next(se))}catch(je){ve(je)}}function W(se){try{U(he.throw(se))}catch(je){ve(je)}}function U(se){se.done?we(se.value):Le(se.value).then(ie,W)}U((he=he.apply(Be,Se||[])).next())})};class c{constructor(){this.lenses=[],this._disposables=new A.b}dispose(){this._disposables.dispose()}add(Be,Se){this._disposables.add(Be);for(const me of Be.lenses)this.lenses.push({symbol:me,provider:Se})}}function p(Be,Se){return u(this,void 0,void 0,function*(){const me=m.b.ordered(Be),he=new Map,Le=new c,we=me.map((ve,ie)=>u(this,void 0,void 0,function*(){he.set(ve,ie);try{const W=yield Promise.resolve(ve.provideCodeLenses(Be,Se));W&&Le.add(W,ve)}catch(W){Object(x.g)(W)}}));return yield Promise.all(we),Le.lenses=Le.lenses.sort((ve,ie)=>ve.symbol.range.startLineNumber<ie.symbol.range.startLineNumber?-1:ve.symbol.range.startLineNumber>ie.symbol.range.startLineNumber?1:he.get(ve.provider)<he.get(ie.provider)?-1:he.get(ve.provider)>he.get(ie.provider)?1:ve.symbol.range.startColumn<ie.symbol.range.startColumn?-1:ve.symbol.range.startColumn>ie.symbol.range.startColumn?1:0),Le})}b.a.registerCommand("_executeCodeLensProvider",function(Be,...Se){let[me,he]=Se;Object(L.c)(r.a.isUri(me)),Object(L.c)(typeof he=="number"||!he);const Le=Be.get(w.a).getModel(me);if(!Le)throw Object(x.c)();const we=[],ve=new A.b;return p(Le,D.a.None).then(ie=>{ve.add(ie);let W=[];for(const U of ie.lenses)he==null||Boolean(U.symbol.command)?we.push(U.symbol):he-- >0&&U.provider.resolveCodeLens&&W.push(Promise.resolve(U.provider.resolveCodeLens(Le,U.symbol,D.a.None)).then(se=>we.push(se||U.symbol)));return Promise.all(W)}).then(()=>we).finally(()=>{setTimeout(()=>ve.dispose(),100)})});var S=t("C/vA"),E=t("QDVR"),y=t("aokT"),O=t("9fML"),k=t("Cg/j"),Q=t("A+jI"),q=function(Be,Se,me,he){var Le=arguments.length,we=Le<3?Se:he===null?he=Object.getOwnPropertyDescriptor(Se,me):he,ve;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")we=Reflect.decorate(Be,Se,me,he);else for(var ie=Be.length-1;ie>=0;ie--)(ve=Be[ie])&&(we=(Le<3?ve(we):Le>3?ve(Se,me,we):ve(Se,me))||we);return Le>3&&we&&Object.defineProperty(Se,me,we),we},z=function(Be,Se){return function(me,he){Se(me,he,Be)}};const J=Object(k.c)("ICodeLensCache");class re{constructor(Be,Se){this.lineCount=Be,this.data=Se}}let Z=class{constructor(Se){this._fakeProvider=new class{provideCodeLenses(){throw new Error("not supported")}},this._cache=new E.a(20,.75);const me="codelens/cache";Object(B.m)(()=>Se.remove(me,1));const he="codelens/cache2",Le=Se.get(he,1,"{}");this._deserialize(Le),Object(S.a)(Se.onWillSaveState)(we=>{we.reason===Q.c.SHUTDOWN&&Se.store(he,this._serialize(),1,1)})}put(Se,me){const he=me.lenses.map(ve=>{var ie;return{range:ve.symbol.range,command:ve.symbol.command&&{id:"",title:(ie=ve.symbol.command)===null||ie===void 0?void 0:ie.title}}}),Le=new c;Le.add({lenses:he,dispose:()=>{}},this._fakeProvider);const we=new re(Se.getLineCount(),Le);this._cache.set(Se.uri.toString(),we)}get(Se){const me=this._cache.get(Se.uri.toString());return me&&me.lineCount===Se.getLineCount()?me.data:void 0}delete(Se){this._cache.delete(Se.uri.toString())}_serialize(){const Se=Object.create(null);for(const[me,he]of this._cache){const Le=new Set;for(const we of he.data.lenses)Le.add(we.symbol.range.startLineNumber);Se[me]={lineCount:he.lineCount,lines:[...Le.values()]}}return JSON.stringify(Se)}_deserialize(Se){try{const me=JSON.parse(Se);for(const he in me){const Le=me[he],we=[];for(const ie of Le.lines)we.push({range:new y.a(ie,1,ie,11)});const ve=new c;ve.add({lenses:we,dispose(){}},this._fakeProvider),this._cache.set(he,new re(Le.lineCount,ve))}}catch(me){}}};Z=q([z(0,Q.a)],Z),Object(O.b)(J,Z);var ne=t("fdyd"),le=t("RMfO"),_e=t("tX9W"),Ce=t("kYye"),oe=t("MD5Z"),ae=t("t9D7");class V{constructor(Be,Se,me){this.afterLineNumber=Be,this.heightInPx=Se,this._onHeight=me,this.suppressMouseDown=!0,this.domNode=document.createElement("div")}onComputedHeight(Be){this._lastHeight===void 0?this._lastHeight=Be:this._lastHeight!==Be&&(this._lastHeight=Be,this._onHeight())}isVisible(){return this._lastHeight!==0&&this.domNode.hasAttribute("monaco-visible-view-zone")}}class G{constructor(Be,Se,me){this.allowEditorOverflow=!1,this.suppressMouseDown=!0,this._commands=new Map,this._isEmpty=!0,this._editor=Be,this._id=`codelens.widget-${G._idPool++}`,this.updatePosition(me),this._domNode=document.createElement("span"),this._domNode.className=`codelens-decoration ${Se}`}withCommands(Be,Se){this._commands.clear();let me=[],he=!1;for(let Le=0;Le<Be.length;Le++){const we=Be[Le];if(!we)continue;if(he=!0,we.command){const ve=Object(ne.a)(we.command.title.trim());we.command.id?(me.push(g.a("a",{id:String(Le),title:we.command.tooltip},...ve)),this._commands.set(String(Le),we.command)):me.push(g.a("span",{title:we.command.tooltip},...ve)),Le+1<Be.length&&me.push(g.a("span",void 0,"\xA0|\xA0"))}}he?(g.R(this._domNode,...me),this._isEmpty&&Se&&this._domNode.classList.add("fadein"),this._isEmpty=!1):g.R(this._domNode,g.a("span",void 0,"no commands"))}getCommand(Be){return Be.parentElement===this._domNode?this._commands.get(Be.id):void 0}getId(){return this._id}getDomNode(){return this._domNode}updatePosition(Be){const Se=this._editor.getModel().getLineFirstNonWhitespaceColumn(Be);this._widgetPosition={position:{lineNumber:Be,column:Se},preference:[1]}}getPosition(){return this._widgetPosition||null}}G._idPool=0;class ee{constructor(){this._removeDecorations=[],this._addDecorations=[],this._addDecorationsCallbacks=[]}addDecoration(Be,Se){this._addDecorations.push(Be),this._addDecorationsCallbacks.push(Se)}removeDecoration(Be){this._removeDecorations.push(Be)}commit(Be){let Se=Be.deltaDecorations(this._removeDecorations,this._addDecorations);for(let me=0,he=Se.length;me<he;me++)this._addDecorationsCallbacks[me](Se[me])}}class pe{constructor(Be,Se,me,he,Le,we,ve){this._isDisposed=!1,this._editor=Se,this._className=me,this._data=Be,this._decorationIds=[];let ie,W=[];this._data.forEach((U,se)=>{U.symbol.command&&W.push(U.symbol),he.addDecoration({range:U.symbol.range,options:_e.b.EMPTY},je=>this._decorationIds[se]=je),ie?ie=y.a.plusRange(ie,U.symbol.range):ie=y.a.lift(U.symbol.range)}),this._viewZone=new V(ie.startLineNumber-1,we,ve),this._viewZoneId=Le.addZone(this._viewZone),W.length>0&&(this._createContentWidgetIfNecessary(),this._contentWidget.withCommands(W,!1))}_createContentWidgetIfNecessary(){this._contentWidget?this._editor.layoutContentWidget(this._contentWidget):(this._contentWidget=new G(this._editor,this._className,this._viewZone.afterLineNumber+1),this._editor.addContentWidget(this._contentWidget))}dispose(Be,Se){this._decorationIds.forEach(Be.removeDecoration,Be),this._decorationIds=[],Se&&Se.removeZone(this._viewZoneId),this._contentWidget&&(this._editor.removeContentWidget(this._contentWidget),this._contentWidget=void 0),this._isDisposed=!0}isDisposed(){return this._isDisposed}isValid(){return this._decorationIds.some((Be,Se)=>{const me=this._editor.getModel().getDecorationRange(Be),he=this._data[Se].symbol;return!!(me&&y.a.isEmpty(he.range)===me.isEmpty())})}updateCodeLensSymbols(Be,Se){this._decorationIds.forEach(Se.removeDecoration,Se),this._decorationIds=[],this._data=Be,this._data.forEach((me,he)=>{Se.addDecoration({range:me.symbol.range,options:_e.b.EMPTY},Le=>this._decorationIds[he]=Le)})}updateHeight(Be,Se){this._viewZone.heightInPx=Be,Se.layoutZone(this._viewZoneId),this._contentWidget&&this._editor.layoutContentWidget(this._contentWidget)}computeIfNecessary(Be){if(!this._viewZone.isVisible())return null;for(let Se=0;Se<this._decorationIds.length;Se++){const me=Be.getDecorationRange(this._decorationIds[Se]);me&&(this._data[Se].symbol.range=me)}return this._data}updateCommands(Be){this._createContentWidgetIfNecessary(),this._contentWidget.withCommands(Be,!0);for(let Se=0;Se<this._data.length;Se++){const me=Be[Se];if(me){const{symbol:he}=this._data[Se];he.command=me.command||he.command}}}getCommand(Be){var Se;return(Se=this._contentWidget)===null||Se===void 0?void 0:Se.getCommand(Be)}getLineNumber(){const Be=this._editor.getModel().getDecorationRange(this._decorationIds[0]);return Be?Be.startLineNumber:-1}update(Be){if(this.isValid()){const Se=this._editor.getModel().getDecorationRange(this._decorationIds[0]);Se&&(this._viewZone.afterLineNumber=Se.startLineNumber-1,Be.layoutZone(this._viewZoneId),this._contentWidget&&(this._contentWidget.updatePosition(Se.startLineNumber),this._editor.layoutContentWidget(this._contentWidget)))}}getItems(){return this._data}}Object(ae.f)((Be,Se)=>{const me=Be.getColor(Ce.x);me&&(Se.addRule(`.monaco-editor .codelens-decoration { color: ${me}; }`),Se.addRule(`.monaco-editor .codelens-decoration .codicon { color: ${me}; }`));const he=Be.getColor(oe.q);he&&(Se.addRule(`.monaco-editor .codelens-decoration > a:hover { color: ${he} !important; }`),Se.addRule(`.monaco-editor .codelens-decoration > a:hover .codicon { color: ${he} !important; }`))});var Te=t("3/fG"),Ie=t("sM1p"),Me=t("Zr1c"),Oe=function(Be,Se,me,he){var Le=arguments.length,we=Le<3?Se:he===null?he=Object.getOwnPropertyDescriptor(Se,me):he,ve;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")we=Reflect.decorate(Be,Se,me,he);else for(var ie=Be.length-1;ie>=0;ie--)(ve=Be[ie])&&(we=(Le<3?ve(we):Le>3?ve(Se,me,we):ve(Se,me))||we);return Le>3&&we&&Object.defineProperty(Se,me,we),we},Xe=function(Be,Se){return function(me,he){Se(me,he,Be)}},fe=function(Be,Se,me,he){function Le(we){return we instanceof me?we:new me(function(ve){ve(we)})}return new(me||(me=Promise))(function(we,ve){function ie(se){try{U(he.next(se))}catch(je){ve(je)}}function W(se){try{U(he.throw(se))}catch(je){ve(je)}}function U(se){se.done?we(se.value):Le(se.value).then(ie,W)}U((he=he.apply(Be,Se||[])).next())})};let Pe=class{constructor(Se,me,he,Le){this._editor=Se,this._commandService=me,this._notificationService=he,this._codeLensCache=Le,this._disposables=new A.b,this._localToDispose=new A.b,this._lenses=[],this._getCodeLensModelDelays=new d.b(m.b,250,2500),this._oldCodeLensModels=new A.b,this._resolveCodeLensesDelays=new d.b(m.b,250,2500),this._resolveCodeLensesScheduler=new B.e(()=>this._resolveCodeLensesInViewport(),this._resolveCodeLensesDelays.min),this._disposables.add(this._editor.onDidChangeModel(()=>this._onModelChange())),this._disposables.add(this._editor.onDidChangeModelLanguage(()=>this._onModelChange())),this._disposables.add(this._editor.onDidChangeConfiguration(we=>{(we.hasChanged(43)||we.hasChanged(16)||we.hasChanged(15))&&this._updateLensStyle(),we.hasChanged(14)&&this._onModelChange()})),this._disposables.add(m.b.onDidChange(this._onModelChange,this)),this._onModelChange(),this._styleClassName="_"+Object(R.c)(this._editor.getId()).toString(16),this._styleElement=g.w(g.O(this._editor.getContainerDomNode())?this._editor.getContainerDomNode():void 0),this._updateLensStyle()}dispose(){var Se;this._localDispose(),this._disposables.dispose(),this._oldCodeLensModels.dispose(),(Se=this._currentCodeLensModel)===null||Se===void 0||Se.dispose(),this._styleElement.remove()}_getLayoutInfo(){let Se=this._editor.getOption(16),me;return!Se||Se<5?(Se=this._editor.getOption(45)*.9|0,me=this._editor.getOption(58)):me=Se*Math.max(1.3,this._editor.getOption(58)/this._editor.getOption(45))|0,{codeLensHeight:me,fontSize:Se}}_updateLensStyle(){const{codeLensHeight:Se,fontSize:me}=this._getLayoutInfo(),he=this._editor.getOption(15),Le=this._editor.getOption(43),we=`--codelens-font-family${this._styleClassName}`,ve=`--codelens-font-features${this._styleClassName}`;let ie=`
|
|
|
.monaco-editor .codelens-decoration.${this._styleClassName} { line-height: ${Se}px; font-size: ${me}px; padding-right: ${Math.round(me*.5)}px; font-feature-settings: var(${ve}) }
|
|
|
.monaco-editor .codelens-decoration.${this._styleClassName} span.codicon { line-height: ${Se}px; font-size: ${me}px; }
|
|
|
`;he&&(ie+=`.monaco-editor .codelens-decoration.${this._styleClassName} { font-family: var(${we}), ${v.c.fontFamily}}`),this._styleElement.textContent=ie,this._editor.getContainerDomNode().style.setProperty(we,he!=null?he:"inherit"),this._editor.getContainerDomNode().style.setProperty(ve,Le.fontFeatureSettings),this._editor.changeViewZones(W=>{for(let U of this._lenses)U.updateHeight(Se,W)})}_localDispose(){var Se,me,he;(Se=this._getCodeLensModelPromise)===null||Se===void 0||Se.cancel(),this._getCodeLensModelPromise=void 0,(me=this._resolveCodeLensesPromise)===null||me===void 0||me.cancel(),this._resolveCodeLensesPromise=void 0,this._localToDispose.clear(),this._oldCodeLensModels.clear(),(he=this._currentCodeLensModel)===null||he===void 0||he.dispose()}_onModelChange(){this._localDispose();const Se=this._editor.getModel();if(!Se)return;if(!this._editor.getOption(14))return;const me=this._codeLensCache.get(Se);if(me&&this._renderCodeLensSymbols(me),!m.b.has(Se)){me&&this._localToDispose.add(Object(B.i)(()=>{const Le=this._codeLensCache.get(Se);me===Le&&(this._codeLensCache.delete(Se),this._onModelChange())},30*1e3));return}for(const Le of m.b.all(Se))if(typeof Le.onDidChange=="function"){let we=Le.onDidChange(()=>he.schedule());this._localToDispose.add(we)}const he=new B.e(()=>{var Le;const we=Date.now();(Le=this._getCodeLensModelPromise)===null||Le===void 0||Le.cancel(),this._getCodeLensModelPromise=Object(B.h)(ve=>p(Se,ve)),this._getCodeLensModelPromise.then(ve=>{this._currentCodeLensModel&&this._oldCodeLensModels.add(this._currentCodeLensModel),this._currentCodeLensModel=ve,this._codeLensCache.put(Se,ve);const ie=this._getCodeLensModelDelays.update(Se,Date.now()-we);he.delay=ie,this._renderCodeLensSymbols(ve),this._resolveCodeLensesInViewportSoon()},x.f)},this._getCodeLensModelDelays.get(Se));this._localToDispose.add(he),this._localToDispose.add(Object(A.i)(()=>this._resolveCodeLensesScheduler.cancel())),this._localToDispose.add(this._editor.onDidChangeModelContent(()=>{this._editor.changeDecorations(Le=>{this._editor.changeViewZones(we=>{let ve=[],ie=-1;this._lenses.forEach(U=>{!U.isValid()||ie===U.getLineNumber()?ve.push(U):(U.update(we),ie=U.getLineNumber())});let W=new ee;ve.forEach(U=>{U.dispose(W,we),this._lenses.splice(this._lenses.indexOf(U),1)}),W.commit(Le)})}),he.schedule()})),this._localToDispose.add(this._editor.onDidFocusEditorWidget(()=>{he.schedule()})),this._localToDispose.add(this._editor.onDidScrollChange(Le=>{Le.scrollTopChanged&&this._lenses.length>0&&this._resolveCodeLensesInViewportSoon()})),this._localToDispose.add(this._editor.onDidLayoutChange(()=>{this._resolveCodeLensesInViewportSoon()})),this._localToDispose.add(Object(A.i)(()=>{if(this._editor.getModel()){const Le=j.c.capture(this._editor);this._editor.changeDecorations(we=>{this._editor.changeViewZones(ve=>{this._disposeAllLenses(we,ve)})}),Le.restore(this._editor)}else this._disposeAllLenses(void 0,void 0)})),this._localToDispose.add(this._editor.onMouseDown(Le=>{if(Le.target.type!==9)return;let we=Le.target.element;if((we==null?void 0:we.tagName)==="SPAN"&&(we=we.parentElement),(we==null?void 0:we.tagName)==="A")for(const ve of this._lenses){let ie=ve.getCommand(we);if(ie){this._commandService.executeCommand(ie.id,...ie.arguments||[]).catch(W=>this._notificationService.error(W));break}}})),he.schedule()}_disposeAllLenses(Se,me){const he=new ee;for(const Le of this._lenses)Le.dispose(he,me);Se&&he.commit(Se),this._lenses.length=0}_renderCodeLensSymbols(Se){if(!this._editor.hasModel())return;let me=this._editor.getModel().getLineCount(),he=[],Le;for(let ie of Se.lenses){let W=ie.symbol.range.startLineNumber;if(W<1||W>me)continue;Le&&Le[Le.length-1].symbol.range.startLineNumber===W?Le.push(ie):(Le=[ie],he.push(Le))}const we=j.c.capture(this._editor),ve=this._getLayoutInfo();this._editor.changeDecorations(ie=>{this._editor.changeViewZones(W=>{const U=new ee;let se=0,je=0;for(;je<he.length&&se<this._lenses.length;){let Re=he[je][0].symbol.range.startLineNumber,We=this._lenses[se].getLineNumber();We<Re?(this._lenses[se].dispose(U,W),this._lenses.splice(se,1)):We===Re?(this._lenses[se].updateCodeLensSymbols(he[je],U),je++,se++):(this._lenses.splice(se,0,new pe(he[je],this._editor,this._styleClassName,U,W,ve.codeLensHeight,()=>this._resolveCodeLensesInViewportSoon())),se++,je++)}for(;se<this._lenses.length;)this._lenses[se].dispose(U,W),this._lenses.splice(se,1);for(;je<he.length;)this._lenses.push(new pe(he[je],this._editor,this._styleClassName,U,W,ve.codeLensHeight,()=>this._resolveCodeLensesInViewportSoon())),je++;U.commit(ie)})}),we.restore(this._editor)}_resolveCodeLensesInViewportSoon(){const Se=this._editor.getModel();Se&&this._resolveCodeLensesScheduler.schedule()}_resolveCodeLensesInViewport(){var Se;(Se=this._resolveCodeLensesPromise)===null||Se===void 0||Se.cancel(),this._resolveCodeLensesPromise=void 0;const me=this._editor.getModel();if(!me)return;const he=[],Le=[];if(this._lenses.forEach(ie=>{const W=ie.computeIfNecessary(me);W&&(he.push(W),Le.push(ie))}),he.length===0)return;const we=Date.now(),ve=Object(B.h)(ie=>{const W=he.map((U,se)=>{const je=new Array(U.length),Re=U.map((We,dt)=>!We.symbol.command&&typeof We.provider.resolveCodeLens=="function"?Promise.resolve(We.provider.resolveCodeLens(me,We.symbol,ie)).then(Lt=>{je[dt]=Lt},x.g):(je[dt]=We.symbol,Promise.resolve(void 0)));return Promise.all(Re).then(()=>{!ie.isCancellationRequested&&!Le[se].isDisposed()&&Le[se].updateCommands(je)})});return Promise.all(W)});this._resolveCodeLensesPromise=ve,this._resolveCodeLensesPromise.then(()=>{const ie=this._resolveCodeLensesDelays.update(me,Date.now()-we);this._resolveCodeLensesScheduler.delay=ie,this._currentCodeLensModel&&this._codeLensCache.put(me,this._currentCodeLensModel),this._oldCodeLensModels.clear(),ve===this._resolveCodeLensesPromise&&(this._resolveCodeLensesPromise=void 0)},ie=>{Object(x.f)(ie),ve===this._resolveCodeLensesPromise&&(this._resolveCodeLensesPromise=void 0)})}getLenses(){return this._lenses}};Pe.ID="css.editor.codeLens",Pe=Oe([Xe(1,b.b),Xe(2,Ie.a),Xe(3,J)],Pe),Object(I.l)(Pe.ID,Pe),Object(I.j)(class extends I.b{constructor(){super({id:"codelens.showLensesInCurrentLine",precondition:C.a.hasCodeLensProvider,label:Object(Te.a)("showLensOnLine","Show CodeLens Commands For Current Line"),alias:"Show CodeLens Commands For Current Line"})}run(Se,me){return fe(this,void 0,void 0,function*(){if(!me.hasModel())return;const he=Se.get(Me.a),Le=Se.get(b.b),we=Se.get(Ie.a),ve=me.getSelection().positionLineNumber,ie=me.getContribution(Pe.ID),W=[];for(let se of ie.getLenses())if(se.getLineNumber()===ve)for(let je of se.getItems()){const{command:Re}=je.symbol;Re&&W.push({label:Re.title,command:Re})}if(W.length===0)return;const U=yield he.pick(W,{canPickMany:!1});if(!U)return;try{yield Le.executeCommand(U.command.id,...U.command.arguments||[])}catch(se){we.error(se)}})}})},dBaI:function(mt,M,t){"use strict";t.d(M,"a",function(){return B}),t.d(M,"b",function(){return A});var g=t("N0LK");class B{constructor(j,I,v,C){this.startColumn=j,this.endColumn=I,this.className=v,this.type=C,this._lineDecorationBrand=void 0}static _equals(j,I){return j.startColumn===I.startColumn&&j.endColumn===I.endColumn&&j.className===I.className&&j.type===I.type}static equalsArr(j,I){const v=j.length,C=I.length;if(v!==C)return!1;for(let m=0;m<v;m++)if(!B._equals(j[m],I[m]))return!1;return!0}static extractWrapped(j,I,v){if(j.length===0)return j;const C=I+1,m=v+1,d=v-I,D=[];let L=0;for(const r of j){if(r.endColumn<=C||r.startColumn>=m)continue;D[L++]=new B(Math.max(1,r.startColumn-C+1),Math.min(d+1,r.endColumn-C+1),r.className,r.type)}return D}static filter(j,I,v,C){if(j.length===0)return[];let m=[],d=0;for(let D=0,L=j.length;D<L;D++){const r=j[D],w=r.range;if(w.endLineNumber<I||w.startLineNumber>I)continue;if(w.isEmpty()&&(r.type===0||r.type===3))continue;const b=w.startLineNumber===I?w.startColumn:v,u=w.endLineNumber===I?w.endColumn:C;m[d++]=new B(b,u,r.inlineClassName,r.type)}return m}static _typeCompare(j,I){const v=[2,0,1,3];return v[j]-v[I]}static compare(j,I){if(j.startColumn!==I.startColumn)return j.startColumn-I.startColumn;if(j.endColumn!==I.endColumn)return j.endColumn-I.endColumn;const v=B._typeCompare(j.type,I.type);return v!==0?v:j.className!==I.className?j.className<I.className?-1:1:0}}class x{constructor(j,I,v,C){this.startOffset=j,this.endOffset=I,this.className=v,this.metadata=C}}class R{constructor(){this.stopOffsets=[],this.classNames=[],this.metadata=[],this.count=0}static _metadata(j){let I=0;for(let v=0,C=j.length;v<C;v++)I|=j[v];return I}consumeLowerThan(j,I,v){for(;this.count>0&&this.stopOffsets[0]<j;){let C=0;for(;C+1<this.count&&this.stopOffsets[C]===this.stopOffsets[C+1];)C++;v.push(new x(I,this.stopOffsets[C],this.classNames.join(" "),R._metadata(this.metadata))),I=this.stopOffsets[C]+1,this.stopOffsets.splice(0,C+1),this.classNames.splice(0,C+1),this.metadata.splice(0,C+1),this.count-=C+1}return this.count>0&&I<j&&(v.push(new x(I,j-1,this.classNames.join(" "),R._metadata(this.metadata))),I=j),I}insert(j,I,v){if(this.count===0||this.stopOffsets[this.count-1]<=j)this.stopOffsets.push(j),this.classNames.push(I),this.metadata.push(v);else for(let C=0;C<this.count;C++)if(this.stopOffsets[C]>=j){this.stopOffsets.splice(C,0,j),this.classNames.splice(C,0,I),this.metadata.splice(C,0,v);break}this.count++;return}}class A{static normalize(j,I){if(I.length===0)return[];let v=[];const C=new R;let m=0;for(let d=0,D=I.length;d<D;d++){const L=I[d];let r=L.startColumn,w=L.endColumn;const b=L.className,u=L.type===1?2:L.type===2?4:0;if(r>1){const S=j.charCodeAt(r-2);g.E(S)&&r--}if(w>1){const S=j.charCodeAt(w-2);g.E(S)&&w--}const c=r-1,p=w-2;m=C.consumeLowerThan(c,m,v),C.count===0&&(m=c),C.insert(p,b,u)}return C.consumeLowerThan(1073741824,m,v),v}}},dFcq:function(mt,M,t){},"dH+W":function(mt,M,t){"use strict";t.r(M),t.d(M,"DuplicateSelectionAction",function(){return re}),t.d(M,"AbstractSortLinesAction",function(){return _e}),t.d(M,"SortLinesAscendingAction",function(){return Ce}),t.d(M,"SortLinesDescendingAction",function(){return oe}),t.d(M,"DeleteDuplicateLinesAction",function(){return ae}),t.d(M,"TrimTrailingWhitespaceAction",function(){return V}),t.d(M,"DeleteLinesAction",function(){return G}),t.d(M,"IndentLinesAction",function(){return ee}),t.d(M,"InsertLineBeforeAction",function(){return Te}),t.d(M,"InsertLineAfterAction",function(){return Ie}),t.d(M,"AbstractDeleteAllToBoundaryAction",function(){return Me}),t.d(M,"DeleteAllLeftAction",function(){return Oe}),t.d(M,"DeleteAllRightAction",function(){return Xe}),t.d(M,"JoinLinesAction",function(){return fe}),t.d(M,"TransposeAction",function(){return Pe}),t.d(M,"AbstractCaseAction",function(){return Be}),t.d(M,"UpperCaseAction",function(){return Se}),t.d(M,"LowerCaseAction",function(){return me}),t.d(M,"TitleCaseAction",function(){return Le}),t.d(M,"SnakeCaseAction",function(){return we});var g=t("/kV6"),B=t("1YUG"),x=t("sswD"),R=t("LCkn"),A=t("N0LK"),j=t("0/Sa"),I=t("aokT");class v{constructor(ve,ie){this._selection=ve,this._cursors=ie,this._selectionId=null}getEditOperations(ve,ie){let W=C(ve,this._cursors);for(let U=0,se=W.length;U<se;U++){let je=W[U];ie.addEditOperation(je.range,je.text)}this._selectionId=ie.trackSelection(this._selection)}computeCursorState(ve,ie){return ie.getTrackedSelection(this._selectionId)}}function C(ve,ie){ie.sort((Re,We)=>Re.lineNumber===We.lineNumber?Re.column-We.column:Re.lineNumber-We.lineNumber);for(let Re=ie.length-2;Re>=0;Re--)ie[Re].lineNumber===ie[Re+1].lineNumber&&ie.splice(Re,1);let W=[],U=0,se=0,je=ie.length;for(let Re=1,We=ve.getLineCount();Re<=We;Re++){let dt=ve.getLineContent(Re),Lt=dt.length+1,Ht=0;if(se<je&&ie[se].lineNumber===Re&&(Ht=ie[se].column,se++,Ht===Lt))continue;if(dt.length===0)continue;let $e=A.I(dt),ot=0;if($e===-1)ot=1;else if($e!==dt.length-1)ot=$e+2;else continue;ot=Math.max(Ht,ot),W[U++]=j.a.delete(new I.a(Re,ot,Re,Lt))}return W}var m=t("GR/f"),d=t("cGHE"),D=t("gCVg"),L=t("wQH0");class r{constructor(ve,ie,W){this._selection=ve,this._isCopyingDown=ie,this._noop=W||!1,this._selectionDirection=0,this._selectionId=null,this._startLineNumberDelta=0,this._endLineNumberDelta=0}getEditOperations(ve,ie){let W=this._selection;this._startLineNumberDelta=0,this._endLineNumberDelta=0,W.startLineNumber<W.endLineNumber&&W.endColumn===1&&(this._endLineNumberDelta=1,W=W.setEndPosition(W.endLineNumber-1,ve.getLineMaxColumn(W.endLineNumber-1)));let U=[];for(let je=W.startLineNumber;je<=W.endLineNumber;je++)U.push(ve.getLineContent(je));const se=U.join(`
|
|
|
`);se===""&&(this._isCopyingDown&&(this._startLineNumberDelta++,this._endLineNumberDelta++)),this._noop?ie.addEditOperation(new I.a(W.endLineNumber,ve.getLineMaxColumn(W.endLineNumber),W.endLineNumber+1,1),W.endLineNumber===ve.getLineCount()?"":`
|
|
|
`):this._isCopyingDown?ie.addEditOperation(new I.a(W.startLineNumber,1,W.startLineNumber,1),se+`
|
|
|
`):ie.addEditOperation(new I.a(W.endLineNumber,ve.getLineMaxColumn(W.endLineNumber),W.endLineNumber,ve.getLineMaxColumn(W.endLineNumber)),`
|
|
|
`+se),this._selectionId=ie.trackSelection(W),this._selectionDirection=this._selection.getDirection()}computeCursorState(ve,ie){let W=ie.getTrackedSelection(this._selectionId);if(this._startLineNumberDelta!==0||this._endLineNumberDelta!==0){let U=W.startLineNumber,se=W.startColumn,je=W.endLineNumber,Re=W.endColumn;this._startLineNumberDelta!==0&&(U=U+this._startLineNumberDelta,se=1),this._endLineNumberDelta!==0&&(je=je+this._endLineNumberDelta,Re=1),W=D.a.createWithDirection(U,se,je,Re,this._selectionDirection)}return W}}var w=t("zN7H"),b=t("KDc4"),u=t("cMvZ");function c(ve,ie){let W=0;for(let U=0;U<ve.length;U++)ve.charAt(U)===" "?W+=ie:W++;return W}function p(ve,ie,W){ve=ve<0?0:ve;let U="";if(!W){let se=Math.floor(ve/ie);ve=ve%ie;for(let je=0;je<se;je++)U+=" "}for(let se=0;se<ve;se++)U+=" ";return U}class S{constructor(ve,ie,W){this._selection=ve,this._isMovingDown=ie,this._autoIndent=W,this._selectionId=null,this._moveEndLineSelectionShrink=!1}getEditOperations(ve,ie){let W=ve.getLineCount();if(this._isMovingDown&&this._selection.endLineNumber===W){this._selectionId=ie.trackSelection(this._selection);return}if(!this._isMovingDown&&this._selection.startLineNumber===1){this._selectionId=ie.trackSelection(this._selection);return}this._moveEndPositionDown=!1;let U=this._selection;U.startLineNumber<U.endLineNumber&&U.endColumn===1&&(this._moveEndPositionDown=!0,U=U.setEndPosition(U.endLineNumber-1,ve.getLineMaxColumn(U.endLineNumber-1)));const{tabSize:se,indentSize:je,insertSpaces:Re}=ve.getOptions();let We=this.buildIndentConverter(se,je,Re),dt={getLineTokens:Lt=>ve.getLineTokens(Lt),getLanguageId:()=>ve.getLanguageId(),getLanguageIdAtPosition:(Lt,Ht)=>ve.getLanguageIdAtPosition(Lt,Ht),getLineContent:null};if(U.startLineNumber===U.endLineNumber&&ve.getLineMaxColumn(U.startLineNumber)===1){let Lt=U.startLineNumber,Ht=this._isMovingDown?Lt+1:Lt-1;ve.getLineMaxColumn(Ht)===1?ie.addEditOperation(new I.a(1,1,1,1),null):(ie.addEditOperation(new I.a(Lt,1,Lt,1),ve.getLineContent(Ht)),ie.addEditOperation(new I.a(Ht,1,Ht,ve.getLineMaxColumn(Ht)),null)),U=new D.a(Ht,1,Ht,1)}else{let Lt,Ht;if(this._isMovingDown){Lt=U.endLineNumber+1,Ht=ve.getLineContent(Lt),ie.addEditOperation(new I.a(Lt-1,ve.getLineMaxColumn(Lt-1),Lt,ve.getLineMaxColumn(Lt)),null);let $e=Ht;if(this.shouldAutoIndent(ve,U)){let ot=this.matchEnterRule(ve,We,se,Lt,U.startLineNumber-1);if(ot!==null){let Ve=A.x(ve.getLineContent(Lt)),it=ot+c(Ve,se),Et=p(it,se,Re);$e=Et+this.trimLeft(Ht)}else{dt.getLineContent=it=>it===U.startLineNumber?ve.getLineContent(Lt):ve.getLineContent(it);let Ve=u.b.getGoodIndentForLine(this._autoIndent,dt,ve.getLanguageIdAtPosition(Lt,1),U.startLineNumber,We);if(Ve!==null){let it=A.x(ve.getLineContent(Lt)),Et=c(Ve,se),It=c(it,se);if(Et!==It){let Rt=p(Et,se,Re);$e=Rt+this.trimLeft(Ht)}}}ie.addEditOperation(new I.a(U.startLineNumber,1,U.startLineNumber,1),$e+`
|
|
|
`);let ce=this.matchEnterRuleMovingDown(ve,We,se,U.startLineNumber,Lt,$e);if(ce!==null)ce!==0&&this.getIndentEditsOfMovingBlock(ve,ie,U,se,Re,ce);else{dt.getLineContent=it=>it===U.startLineNumber?$e:it>=U.startLineNumber+1&&it<=U.endLineNumber+1?ve.getLineContent(it-1):ve.getLineContent(it);let Ve=u.b.getGoodIndentForLine(this._autoIndent,dt,ve.getLanguageIdAtPosition(Lt,1),U.startLineNumber+1,We);if(Ve!==null){const it=A.x(ve.getLineContent(U.startLineNumber)),Et=c(Ve,se),It=c(it,se);if(Et!==It){const Rt=Et-It;this.getIndentEditsOfMovingBlock(ve,ie,U,se,Re,Rt)}}}}else ie.addEditOperation(new I.a(U.startLineNumber,1,U.startLineNumber,1),$e+`
|
|
|
`)}else if(Lt=U.startLineNumber-1,Ht=ve.getLineContent(Lt),ie.addEditOperation(new I.a(Lt,1,Lt+1,1),null),ie.addEditOperation(new I.a(U.endLineNumber,ve.getLineMaxColumn(U.endLineNumber),U.endLineNumber,ve.getLineMaxColumn(U.endLineNumber)),`
|
|
|
`+Ht),this.shouldAutoIndent(ve,U)){dt.getLineContent=ot=>ot===Lt?ve.getLineContent(U.startLineNumber):ve.getLineContent(ot);let $e=this.matchEnterRule(ve,We,se,U.startLineNumber,U.startLineNumber-2);if($e!==null)$e!==0&&this.getIndentEditsOfMovingBlock(ve,ie,U,se,Re,$e);else{let ot=u.b.getGoodIndentForLine(this._autoIndent,dt,ve.getLanguageIdAtPosition(U.startLineNumber,1),Lt,We);if(ot!==null){let ce=A.x(ve.getLineContent(U.startLineNumber)),Ve=c(ot,se),it=c(ce,se);if(Ve!==it){let Et=Ve-it;this.getIndentEditsOfMovingBlock(ve,ie,U,se,Re,Et)}}}}}this._selectionId=ie.trackSelection(U)}buildIndentConverter(ve,ie,W){return{shiftIndent:U=>w.a.shiftIndent(U,U.length+1,ve,ie,W),unshiftIndent:U=>w.a.unshiftIndent(U,U.length+1,ve,ie,W)}}parseEnterResult(ve,ie,W,U,se){if(se){let je=se.indentation;se.indentAction===b.b.None||se.indentAction===b.b.Indent?je=se.indentation+se.appendText:se.indentAction===b.b.IndentOutdent?je=se.indentation:se.indentAction===b.b.Outdent&&(je=ie.unshiftIndent(se.indentation)+se.appendText);let Re=ve.getLineContent(U);if(this.trimLeft(Re).indexOf(this.trimLeft(je))>=0){let We=A.x(ve.getLineContent(U)),dt=A.x(je),Lt=u.b.getIndentMetadata(ve,U);Lt!==null&&Lt&2&&(dt=ie.unshiftIndent(dt));let Ht=c(dt,W),$e=c(We,W);return Ht-$e}}return null}matchEnterRuleMovingDown(ve,ie,W,U,se,je){if(A.I(je)>=0){let Re=ve.getLineMaxColumn(se),We=u.b.getEnterAction(this._autoIndent,ve,new I.a(se,Re,se,Re));return this.parseEnterResult(ve,ie,W,U,We)}else{let Re=U-1;for(;Re>=1;){let Lt=ve.getLineContent(Re),Ht=A.I(Lt);if(Ht>=0)break;Re--}if(Re<1||U>ve.getLineCount())return null;let We=ve.getLineMaxColumn(Re),dt=u.b.getEnterAction(this._autoIndent,ve,new I.a(Re,We,Re,We));return this.parseEnterResult(ve,ie,W,U,dt)}}matchEnterRule(ve,ie,W,U,se,je){let Re=se;for(;Re>=1;){let Lt;Re===se&&je!==void 0?Lt=je:Lt=ve.getLineContent(Re);let Ht=A.I(Lt);if(Ht>=0)break;Re--}if(Re<1||U>ve.getLineCount())return null;let We=ve.getLineMaxColumn(Re),dt=u.b.getEnterAction(this._autoIndent,ve,new I.a(Re,We,Re,We));return this.parseEnterResult(ve,ie,W,U,dt)}trimLeft(ve){return ve.replace(/^\s+/,"")}shouldAutoIndent(ve,ie){if(this._autoIndent<4)return!1;if(!ve.isCheapToTokenize(ie.startLineNumber))return!1;let W=ve.getLanguageIdAtPosition(ie.startLineNumber,1),U=ve.getLanguageIdAtPosition(ie.endLineNumber,1);return W!==U?!1:!(u.b.getIndentRulesSupport(W)===null)}getIndentEditsOfMovingBlock(ve,ie,W,U,se,je){for(let Re=W.startLineNumber;Re<=W.endLineNumber;Re++){let We=ve.getLineContent(Re),dt=A.x(We),Lt=c(dt,U),Ht=Lt+je,$e=p(Ht,U,se);$e!==dt&&(ie.addEditOperation(new I.a(Re,1,Re,dt.length+1),$e),Re===W.endLineNumber&&W.endColumn<=dt.length+1&&$e===""&&(this._moveEndLineSelectionShrink=!0))}}computeCursorState(ve,ie){let W=ie.getTrackedSelection(this._selectionId);return this._moveEndPositionDown&&(W=W.setEndPosition(W.endLineNumber+1,1)),this._moveEndLineSelectionShrink&&W.startLineNumber<W.endLineNumber&&(W=W.setEndPosition(W.endLineNumber,2)),W}}class E{constructor(ve,ie){this.selection=ve,this.descending=ie,this.selectionId=null}static getCollator(){return E._COLLATOR||(E._COLLATOR=new Intl.Collator),E._COLLATOR}getEditOperations(ve,ie){let W=O(ve,this.selection,this.descending);W&&ie.addEditOperation(W.range,W.text),this.selectionId=ie.trackSelection(this.selection)}computeCursorState(ve,ie){return ie.getTrackedSelection(this.selectionId)}static canRun(ve,ie,W){if(ve===null)return!1;let U=y(ve,ie,W);if(!U)return!1;for(let se=0,je=U.before.length;se<je;se++)if(U.before[se]!==U.after[se])return!0;return!1}}E._COLLATOR=null;function y(ve,ie,W){let U=ie.startLineNumber,se=ie.endLineNumber;if(ie.endColumn===1&&se--,U>=se)return null;let je=[];for(let We=U;We<=se;We++)je.push(ve.getLineContent(We));let Re=je.slice(0);return Re.sort(E.getCollator().compare),W===!0&&(Re=Re.reverse()),{startLineNumber:U,endLineNumber:se,before:je,after:Re}}function O(ve,ie,W){let U=y(ve,ie,W);return U?j.a.replace(new I.a(U.startLineNumber,1,U.endLineNumber,ve.getLineMaxColumn(U.endLineNumber)),U.after.join(`
|
|
|
`)):null}var k=t("3/fG"),Q=t("fjLI");class q extends x.b{constructor(ve,ie){super(ie);this.down=ve}run(ve,ie){if(!ie.hasModel())return;const W=ie.getSelections().map((je,Re)=>({selection:je,index:Re,ignore:!1}));W.sort((je,Re)=>I.a.compareRangesUsingStarts(je.selection,Re.selection));let U=W[0];for(let je=1;je<W.length;je++){const Re=W[je];U.selection.endLineNumber===Re.selection.startLineNumber&&(U.index<Re.index?Re.ignore=!0:(U.ignore=!0,U=Re))}const se=[];for(const je of W)se.push(new r(je.selection,this.down,je.ignore));ie.pushUndoStop(),ie.executeCommands(this.id,se),ie.pushUndoStop()}}class z extends q{constructor(){super(!1,{id:"editor.action.copyLinesUpAction",label:k.a("lines.copyUp","Copy Line Up"),alias:"Copy Line Up",precondition:L.a.writable,kbOpts:{kbExpr:L.a.editorTextFocus,primary:512|1024|16,linux:{primary:2048|512|1024|16},weight:100},menuOpts:{menuId:Q.b.MenubarSelectionMenu,group:"2_line",title:k.a({key:"miCopyLinesUp",comment:["&& denotes a mnemonic"]},"&&Copy Line Up"),order:1}})}}class J extends q{constructor(){super(!0,{id:"editor.action.copyLinesDownAction",label:k.a("lines.copyDown","Copy Line Down"),alias:"Copy Line Down",precondition:L.a.writable,kbOpts:{kbExpr:L.a.editorTextFocus,primary:512|1024|18,linux:{primary:2048|512|1024|18},weight:100},menuOpts:{menuId:Q.b.MenubarSelectionMenu,group:"2_line",title:k.a({key:"miCopyLinesDown",comment:["&& denotes a mnemonic"]},"Co&&py Line Down"),order:2}})}}class re extends x.b{constructor(){super({id:"editor.action.duplicateSelection",label:k.a("duplicateSelection","Duplicate Selection"),alias:"Duplicate Selection",precondition:L.a.writable,menuOpts:{menuId:Q.b.MenubarSelectionMenu,group:"2_line",title:k.a({key:"miDuplicateSelection",comment:["&& denotes a mnemonic"]},"&&Duplicate Selection"),order:5}})}run(ve,ie,W){if(!ie.hasModel())return;const U=[],se=ie.getSelections(),je=ie.getModel();for(const Re of se)if(Re.isEmpty())U.push(new r(Re,!0));else{const We=new D.a(Re.endLineNumber,Re.endColumn,Re.endLineNumber,Re.endColumn);U.push(new R.c(We,je.getValueInRange(Re)))}ie.pushUndoStop(),ie.executeCommands(this.id,U),ie.pushUndoStop()}}class Z extends x.b{constructor(ve,ie){super(ie);this.down=ve}run(ve,ie){let W=[],U=ie.getSelections()||[];const se=ie.getOption(9);for(const je of U)W.push(new S(je,this.down,se));ie.pushUndoStop(),ie.executeCommands(this.id,W),ie.pushUndoStop()}}class ne extends Z{constructor(){super(!1,{id:"editor.action.moveLinesUpAction",label:k.a("lines.moveUp","Move Line Up"),alias:"Move Line Up",precondition:L.a.writable,kbOpts:{kbExpr:L.a.editorTextFocus,primary:512|16,linux:{primary:512|16},weight:100},menuOpts:{menuId:Q.b.MenubarSelectionMenu,group:"2_line",title:k.a({key:"miMoveLinesUp",comment:["&& denotes a mnemonic"]},"Mo&&ve Line Up"),order:3}})}}class le extends Z{constructor(){super(!0,{id:"editor.action.moveLinesDownAction",label:k.a("lines.moveDown","Move Line Down"),alias:"Move Line Down",precondition:L.a.writable,kbOpts:{kbExpr:L.a.editorTextFocus,primary:512|18,linux:{primary:512|18},weight:100},menuOpts:{menuId:Q.b.MenubarSelectionMenu,group:"2_line",title:k.a({key:"miMoveLinesDown",comment:["&& denotes a mnemonic"]},"Move &&Line Down"),order:4}})}}class _e extends x.b{constructor(ve,ie){super(ie);this.descending=ve}run(ve,ie){const W=ie.getSelections()||[];for(const se of W)if(!E.canRun(ie.getModel(),se,this.descending))return;let U=[];for(let se=0,je=W.length;se<je;se++)U[se]=new E(W[se],this.descending);ie.pushUndoStop(),ie.executeCommands(this.id,U),ie.pushUndoStop()}}class Ce extends _e{constructor(){super(!1,{id:"editor.action.sortLinesAscending",label:k.a("lines.sortAscending","Sort Lines Ascending"),alias:"Sort Lines Ascending",precondition:L.a.writable})}}class oe extends _e{constructor(){super(!0,{id:"editor.action.sortLinesDescending",label:k.a("lines.sortDescending","Sort Lines Descending"),alias:"Sort Lines Descending",precondition:L.a.writable})}}class ae extends x.b{constructor(){super({id:"editor.action.removeDuplicateLines",label:k.a("lines.deleteDuplicates","Delete Duplicate Lines"),alias:"Delete Duplicate Lines",precondition:L.a.writable})}run(ve,ie){if(!ie.hasModel())return;let W=ie.getModel();if(W.getLineCount()===1&&W.getLineMaxColumn(1)===1)return;let U=[],se=[],je=0;for(let Re of ie.getSelections()){let We=new Set,dt=[];for(let ot=Re.startLineNumber;ot<=Re.endLineNumber;ot++){let ce=W.getLineContent(ot);if(We.has(ce))continue;dt.push(ce),We.add(ce)}let Lt=new D.a(Re.startLineNumber,1,Re.endLineNumber,W.getLineMaxColumn(Re.endLineNumber)),Ht=Re.startLineNumber-je,$e=new D.a(Ht,1,Ht+dt.length-1,dt[dt.length-1].length);U.push(j.a.replace(Lt,dt.join(`
|
|
|
`))),se.push($e),je+=Re.endLineNumber-Re.startLineNumber+1-dt.length}ie.pushUndoStop(),ie.executeEdits(this.id,U,se),ie.pushUndoStop()}}class V extends x.b{constructor(){super({id:V.ID,label:k.a("lines.trimTrailingWhitespace","Trim Trailing Whitespace"),alias:"Trim Trailing Whitespace",precondition:L.a.writable,kbOpts:{kbExpr:L.a.editorTextFocus,primary:Object(g.c)(2048|41,2048|54),weight:100}})}run(ve,ie,W){let U=[];W.reason==="auto-save"&&(U=(ie.getSelections()||[]).map(Re=>new d.a(Re.positionLineNumber,Re.positionColumn)));let se=ie.getSelection();if(se===null)return;let je=new v(se,U);ie.pushUndoStop(),ie.executeCommands(this.id,[je]),ie.pushUndoStop()}}V.ID="editor.action.trimTrailingWhitespace";class G extends x.b{constructor(){super({id:"editor.action.deleteLines",label:k.a("lines.delete","Delete Line"),alias:"Delete Line",precondition:L.a.writable,kbOpts:{kbExpr:L.a.textInputFocus,primary:2048|1024|41,weight:100}})}run(ve,ie){if(!ie.hasModel())return;let W=this._getLinesToRemove(ie),U=ie.getModel();if(U.getLineCount()===1&&U.getLineMaxColumn(1)===1)return;let se=0,je=[],Re=[];for(let We=0,dt=W.length;We<dt;We++){const Lt=W[We];let Ht=Lt.startLineNumber,$e=Lt.endLineNumber,ot=1,ce=U.getLineMaxColumn($e);$e<U.getLineCount()?($e+=1,ce=1):Ht>1&&(Ht-=1,ot=U.getLineMaxColumn(Ht)),je.push(j.a.replace(new D.a(Ht,ot,$e,ce),"")),Re.push(new D.a(Ht-se,Lt.positionColumn,Ht-se,Lt.positionColumn)),se+=Lt.endLineNumber-Lt.startLineNumber+1}ie.pushUndoStop(),ie.executeEdits(this.id,je,Re),ie.pushUndoStop()}_getLinesToRemove(ve){let ie=ve.getSelections().map(se=>{let je=se.endLineNumber;return se.startLineNumber<se.endLineNumber&&se.endColumn===1&&(je-=1),{startLineNumber:se.startLineNumber,selectionStartColumn:se.selectionStartColumn,endLineNumber:je,positionColumn:se.positionColumn}});ie.sort((se,je)=>se.startLineNumber===je.startLineNumber?se.endLineNumber-je.endLineNumber:se.startLineNumber-je.startLineNumber);let W=[],U=ie[0];for(let se=1;se<ie.length;se++)U.endLineNumber+1>=ie[se].startLineNumber?U.endLineNumber=ie[se].endLineNumber:(W.push(U),U=ie[se]);return W.push(U),W}}class ee extends x.b{constructor(){super({id:"editor.action.indentLines",label:k.a("lines.indent","Indent Line"),alias:"Indent Line",precondition:L.a.writable,kbOpts:{kbExpr:L.a.editorTextFocus,primary:2048|89,weight:100}})}run(ve,ie){const W=ie._getViewModel();if(!W)return;ie.pushUndoStop(),ie.executeCommands(this.id,m.a.indent(W.cursorConfig,ie.getModel(),ie.getSelections())),ie.pushUndoStop()}}class pe extends x.b{constructor(){super({id:"editor.action.outdentLines",label:k.a("lines.outdent","Outdent Line"),alias:"Outdent Line",precondition:L.a.writable,kbOpts:{kbExpr:L.a.editorTextFocus,primary:2048|87,weight:100}})}run(ve,ie){B.CoreEditingCommands.Outdent.runEditorCommand(ve,ie,null)}}class Te extends x.b{constructor(){super({id:"editor.action.insertLineBefore",label:k.a("lines.insertBefore","Insert Line Above"),alias:"Insert Line Above",precondition:L.a.writable,kbOpts:{kbExpr:L.a.editorTextFocus,primary:2048|1024|3,weight:100}})}run(ve,ie){const W=ie._getViewModel();if(!W)return;ie.pushUndoStop(),ie.executeCommands(this.id,m.a.lineInsertBefore(W.cursorConfig,ie.getModel(),ie.getSelections()))}}class Ie extends x.b{constructor(){super({id:"editor.action.insertLineAfter",label:k.a("lines.insertAfter","Insert Line Below"),alias:"Insert Line Below",precondition:L.a.writable,kbOpts:{kbExpr:L.a.editorTextFocus,primary:2048|3,weight:100}})}run(ve,ie){const W=ie._getViewModel();if(!W)return;ie.pushUndoStop(),ie.executeCommands(this.id,m.a.lineInsertAfter(W.cursorConfig,ie.getModel(),ie.getSelections()))}}class Me extends x.b{run(ve,ie){if(!ie.hasModel())return;const W=ie.getSelection();let U=this._getRangesToDelete(ie),se=[];for(let We=0,dt=U.length-1;We<dt;We++){let Lt=U[We],Ht=U[We+1];I.a.intersectRanges(Lt,Ht)===null?se.push(Lt):U[We+1]=I.a.plusRange(Lt,Ht)}se.push(U[U.length-1]);let je=this._getEndCursorState(W,se),Re=se.map(We=>j.a.replace(We,""));ie.pushUndoStop(),ie.executeEdits(this.id,Re,je),ie.pushUndoStop()}}class Oe extends Me{constructor(){super({id:"deleteAllLeft",label:k.a("lines.deleteAllLeft","Delete All Left"),alias:"Delete All Left",precondition:L.a.writable,kbOpts:{kbExpr:L.a.textInputFocus,primary:0,mac:{primary:2048|1},weight:100}})}_getEndCursorState(ve,ie){let W=null,U=[],se=0;return ie.forEach(je=>{let Re;if(je.endColumn===1&&se>0){let We=je.startLineNumber-se;Re=new D.a(We,je.startColumn,We,je.startColumn)}else Re=new D.a(je.startLineNumber,je.startColumn,je.startLineNumber,je.startColumn);se+=je.endLineNumber-je.startLineNumber,je.intersectRanges(ve)?W=Re:U.push(Re)}),W&&U.unshift(W),U}_getRangesToDelete(ve){let ie=ve.getSelections();if(ie===null)return[];let W=ie,U=ve.getModel();return U===null?[]:(W.sort(I.a.compareRangesUsingStarts),W=W.map(se=>{if(se.isEmpty())if(se.startColumn===1){let je=Math.max(1,se.startLineNumber-1),Re=se.startLineNumber===1?1:U.getLineContent(je).length+1;return new I.a(je,Re,se.startLineNumber,1)}else return new I.a(se.startLineNumber,1,se.startLineNumber,se.startColumn);else return new I.a(se.startLineNumber,1,se.endLineNumber,se.endColumn)}),W)}}class Xe extends Me{constructor(){super({id:"deleteAllRight",label:k.a("lines.deleteAllRight","Delete All Right"),alias:"Delete All Right",precondition:L.a.writable,kbOpts:{kbExpr:L.a.textInputFocus,primary:0,mac:{primary:256|41,secondary:[2048|20]},weight:100}})}_getEndCursorState(ve,ie){let W=null,U=[];for(let se=0,je=ie.length,Re=0;se<je;se++){let We=ie[se],dt=new D.a(We.startLineNumber-Re,We.startColumn,We.startLineNumber-Re,We.startColumn);We.intersectRanges(ve)?W=dt:U.push(dt)}return W&&U.unshift(W),U}_getRangesToDelete(ve){let ie=ve.getModel();if(ie===null)return[];let W=ve.getSelections();if(W===null)return[];let U=W.map(se=>{if(se.isEmpty()){const je=ie.getLineMaxColumn(se.startLineNumber);return se.startColumn===je?new I.a(se.startLineNumber,se.startColumn,se.startLineNumber+1,1):new I.a(se.startLineNumber,se.startColumn,se.startLineNumber,je)}return se});return U.sort(I.a.compareRangesUsingStarts),U}}class fe extends x.b{constructor(){super({id:"editor.action.joinLines",label:k.a("lines.joinLines","Join Lines"),alias:"Join Lines",precondition:L.a.writable,kbOpts:{kbExpr:L.a.editorTextFocus,primary:0,mac:{primary:256|40},weight:100}})}run(ve,ie){let W=ie.getSelections();if(W===null)return;let U=ie.getSelection();if(U===null)return;W.sort(I.a.compareRangesUsingStarts);let se=[],je=W.reduce(($e,ot)=>$e.isEmpty()?$e.endLineNumber===ot.startLineNumber?(U.equalsSelection($e)&&(U=ot),ot):ot.startLineNumber>$e.endLineNumber+1?(se.push($e),ot):new D.a($e.startLineNumber,$e.startColumn,ot.endLineNumber,ot.endColumn):ot.startLineNumber>$e.endLineNumber?(se.push($e),ot):new D.a($e.startLineNumber,$e.startColumn,ot.endLineNumber,ot.endColumn));se.push(je);let Re=ie.getModel();if(Re===null)return;let We=[],dt=[],Lt=U,Ht=0;for(let $e=0,ot=se.length;$e<ot;$e++){let ce=se[$e],Ve=ce.startLineNumber,it=1,Et=0,It,Rt,vo=Re.getLineContent(ce.endLineNumber).length-ce.endColumn;if(ce.isEmpty()||ce.startLineNumber===ce.endLineNumber){let Do=ce.getStartPosition();Do.lineNumber<Re.getLineCount()?(It=Ve+1,Rt=Re.getLineMaxColumn(It)):(It=Do.lineNumber,Rt=Re.getLineMaxColumn(Do.lineNumber))}else It=ce.endLineNumber,Rt=Re.getLineMaxColumn(It);let Mo=Re.getLineContent(Ve);for(let Do=Ve+1;Do<=It;Do++){let Lo=Re.getLineContent(Do),To=Re.getLineFirstNonWhitespaceColumn(Do);if(To>=1){let Vt=!0;Mo===""&&(Vt=!1),Vt&&(Mo.charAt(Mo.length-1)===" "||Mo.charAt(Mo.length-1)===" ")&&(Vt=!1,Mo=Mo.replace(/[\s\uFEFF\xA0]+$/g," "));let xt=Lo.substr(To-1);Mo+=(Vt?" ":"")+xt,Vt?Et=xt.length+1:Et=xt.length}else Et=0}let xo=new I.a(Ve,it,It,Rt);if(!xo.isEmpty()){let Do;ce.isEmpty()?(We.push(j.a.replace(xo,Mo)),Do=new D.a(xo.startLineNumber-Ht,Mo.length-Et+1,Ve-Ht,Mo.length-Et+1)):ce.startLineNumber===ce.endLineNumber?(We.push(j.a.replace(xo,Mo)),Do=new D.a(ce.startLineNumber-Ht,ce.startColumn,ce.endLineNumber-Ht,ce.endColumn)):(We.push(j.a.replace(xo,Mo)),Do=new D.a(ce.startLineNumber-Ht,ce.startColumn,ce.startLineNumber-Ht,Mo.length-vo)),I.a.intersectRanges(xo,U)!==null?Lt=Do:dt.push(Do)}Ht+=xo.endLineNumber-xo.startLineNumber}dt.unshift(Lt),ie.pushUndoStop(),ie.executeEdits(this.id,We,dt),ie.pushUndoStop()}}class Pe extends x.b{constructor(){super({id:"editor.action.transpose",label:k.a("editor.transpose","Transpose characters around the cursor"),alias:"Transpose characters around the cursor",precondition:L.a.writable})}run(ve,ie){let W=ie.getSelections();if(W===null)return;let U=ie.getModel();if(U===null)return;let se=[];for(let je=0,Re=W.length;je<Re;je++){let We=W[je];if(!We.isEmpty())continue;let dt=We.getStartPosition(),Lt=U.getLineMaxColumn(dt.lineNumber);if(dt.column>=Lt){if(dt.lineNumber===U.getLineCount())continue;let Ht=new I.a(dt.lineNumber,Math.max(1,dt.column-1),dt.lineNumber+1,1),$e=U.getValueInRange(Ht).split("").reverse().join("");se.push(new R.a(new D.a(dt.lineNumber,Math.max(1,dt.column-1),dt.lineNumber+1,1),$e))}else{let Ht=new I.a(dt.lineNumber,Math.max(1,dt.column-1),dt.lineNumber,dt.column+1),$e=U.getValueInRange(Ht).split("").reverse().join("");se.push(new R.b(Ht,$e,new D.a(dt.lineNumber,dt.column+1,dt.lineNumber,dt.column+1)))}}ie.pushUndoStop(),ie.executeCommands(this.id,se),ie.pushUndoStop()}}class Be extends x.b{run(ve,ie){const W=ie.getSelections();if(W===null)return;const U=ie.getModel();if(U===null)return;const se=ie.getOption(115),je=[];for(const Re of W)if(Re.isEmpty()){const We=Re.getStartPosition(),dt=ie.getConfiguredWordAtPosition(We);if(!dt)continue;const Lt=new I.a(We.lineNumber,dt.startColumn,We.lineNumber,dt.endColumn),Ht=U.getValueInRange(Lt);je.push(j.a.replace(Lt,this._modifyText(Ht,se)))}else{const We=U.getValueInRange(Re);je.push(j.a.replace(Re,this._modifyText(We,se)))}ie.pushUndoStop(),ie.executeEdits(this.id,je),ie.pushUndoStop()}}class Se extends Be{constructor(){super({id:"editor.action.transformToUppercase",label:k.a("editor.transformToUppercase","Transform to Uppercase"),alias:"Transform to Uppercase",precondition:L.a.writable})}_modifyText(ve,ie){return ve.toLocaleUpperCase()}}class me extends Be{constructor(){super({id:"editor.action.transformToLowercase",label:k.a("editor.transformToLowercase","Transform to Lowercase"),alias:"Transform to Lowercase",precondition:L.a.writable})}_modifyText(ve,ie){return ve.toLocaleLowerCase()}}class he{constructor(ve,ie){this._pattern=ve,this._flags=ie,this._actual=null,this._evaluated=!1}get(){if(!this._evaluated){this._evaluated=!0;try{this._actual=new RegExp(this._pattern,this._flags)}catch(ve){}}return this._actual}isSupported(){return this.get()!==null}}class Le extends Be{constructor(){super({id:"editor.action.transformToTitlecase",label:k.a("editor.transformToTitlecase","Transform to Title Case"),alias:"Transform to Title Case",precondition:L.a.writable})}_modifyText(ve,ie){const W=Le.titleBoundary.get();return W?ve.toLocaleLowerCase().replace(W,U=>U.toLocaleUpperCase()):ve}}Le.titleBoundary=new he("(^|[^\\p{L}\\p{N}']|((^|\\P{L})'))\\p{L}","gmu");class we extends Be{constructor(){super({id:"editor.action.transformToSnakecase",label:k.a("editor.transformToSnakecase","Transform to Snake Case"),alias:"Transform to Snake Case",precondition:L.a.writable})}_modifyText(ve,ie){const W=we.caseBoundary.get(),U=we.singleLetters.get();return!W||!U?ve:ve.replace(W,"$1_$2").replace(U,"$1_$2$3").toLocaleLowerCase()}}we.caseBoundary=new he("(\\p{Ll})(\\p{Lu})","gmu"),we.singleLetters=new he("(\\p{Lu}|\\p{N})(\\p{Lu})(\\p{Ll})","gmu"),Object(x.j)(z),Object(x.j)(J),Object(x.j)(re),Object(x.j)(ne),Object(x.j)(le),Object(x.j)(Ce),Object(x.j)(oe),Object(x.j)(ae),Object(x.j)(V),Object(x.j)(G),Object(x.j)(ee),Object(x.j)(pe),Object(x.j)(Te),Object(x.j)(Ie),Object(x.j)(Oe),Object(x.j)(Xe),Object(x.j)(fe),Object(x.j)(Pe),Object(x.j)(Se),Object(x.j)(me),we.caseBoundary.isSupported()&&we.singleLetters.isSupported()&&Object(x.j)(we),Le.titleBoundary.isSupported()&&Object(x.j)(Le)},dgXF:function(mt,M,t){"use strict";t.r(M),t.d(M,"FoldingController",function(){return Lt}),t.d(M,"foldBackgroundBackground",function(){return ct}),t.d(M,"editorFoldForeground",function(){return Ut});var g=t("X+cX"),B=t("/cxE"),x=t("/kV6"),R=t("pmY6"),A=t("N0LK"),j=t("746U"),I=t("CjOT"),v=t("vATl"),C=t("sswD"),m=t("wQH0"),d=t("twdY"),D=t("cMvZ"),L=t("MI8n");const r=65535,w=16777215,b=4278190080;class u{constructor(Qe,tt,ut){if(Qe.length!==tt.length||Qe.length>r)throw new Error("invalid startIndexes or endIndexes size");this._startIndexes=Qe,this._endIndexes=tt,this._collapseStates=new Uint32Array(Math.ceil(Qe.length/32)),this._types=ut,this._parentsComputed=!1}ensureParentIndices(){if(!this._parentsComputed){this._parentsComputed=!0;let Qe=[],tt=(ut,Dt)=>{let Pt=Qe[Qe.length-1];return this.getStartLineNumber(Pt)<=ut&&this.getEndLineNumber(Pt)>=Dt};for(let ut=0,Dt=this._startIndexes.length;ut<Dt;ut++){let Pt=this._startIndexes[ut],Wt=this._endIndexes[ut];if(Pt>w||Wt>w)throw new Error("startLineNumber or endLineNumber must not exceed "+w);for(;Qe.length>0&&!tt(Pt,Wt);)Qe.pop();let zt=Qe.length>0?Qe[Qe.length-1]:-1;Qe.push(ut),this._startIndexes[ut]=Pt+((zt&255)<<24),this._endIndexes[ut]=Wt+((zt&65280)<<16)}}}get length(){return this._startIndexes.length}getStartLineNumber(Qe){return this._startIndexes[Qe]&w}getEndLineNumber(Qe){return this._endIndexes[Qe]&w}getType(Qe){return this._types?this._types[Qe]:void 0}hasTypes(){return!!this._types}isCollapsed(Qe){let tt=Qe/32|0,ut=Qe%32;return(this._collapseStates[tt]&1<<ut)!==0}setCollapsed(Qe,tt){let ut=Qe/32|0,Dt=Qe%32,Pt=this._collapseStates[ut];tt?this._collapseStates[ut]=Pt|1<<Dt:this._collapseStates[ut]=Pt&~(1<<Dt)}setCollapsedAllOfType(Qe,tt){let ut=!1;if(this._types)for(let Dt=0;Dt<this._types.length;Dt++)this._types[Dt]===Qe&&(this.setCollapsed(Dt,tt),ut=!0);return ut}toRegion(Qe){return new c(this,Qe)}getParentIndex(Qe){this.ensureParentIndices();let tt=((this._startIndexes[Qe]&b)>>>24)+((this._endIndexes[Qe]&b)>>>16);return tt===r?-1:tt}contains(Qe,tt){return this.getStartLineNumber(Qe)<=tt&&this.getEndLineNumber(Qe)>=tt}findIndex(Qe){let tt=0,ut=this._startIndexes.length;if(ut===0)return-1;for(;tt<ut;){let Dt=Math.floor((tt+ut)/2);Qe<this.getStartLineNumber(Dt)?ut=Dt:tt=Dt+1}return tt-1}findRange(Qe){let tt=this.findIndex(Qe);if(tt>=0){let ut=this.getEndLineNumber(tt);if(ut>=Qe)return tt;for(tt=this.getParentIndex(tt);tt!==-1;){if(this.contains(tt,Qe))return tt;tt=this.getParentIndex(tt)}}return-1}toString(){let Qe=[];for(let tt=0;tt<this.length;tt++)Qe[tt]=`[${this.isCollapsed(tt)?"+":"-"}] ${this.getStartLineNumber(tt)}/${this.getEndLineNumber(tt)}`;return Qe.join(", ")}}class c{constructor(Qe,tt){this.ranges=Qe,this.index=tt}get startLineNumber(){return this.ranges.getStartLineNumber(this.index)}get endLineNumber(){return this.ranges.getEndLineNumber(this.index)}get regionIndex(){return this.index}get parentIndex(){return this.ranges.getParentIndex(this.index)}get isCollapsed(){return this.ranges.isCollapsed(this.index)}containedBy(Qe){return Qe.startLineNumber<=this.startLineNumber&&Qe.endLineNumber>=this.endLineNumber}containsLine(Qe){return this.startLineNumber<=Qe&&Qe<=this.endLineNumber}}class p{constructor(Qe,tt){this._updateEventEmitter=new L.b,this.onDidChange=this._updateEventEmitter.event,this._textModel=Qe,this._decorationProvider=tt,this._regions=new u(new Uint32Array(0),new Uint32Array(0)),this._editorDecorationIds=[],this._isInitialized=!1}get regions(){return this._regions}get textModel(){return this._textModel}get isInitialized(){return this._isInitialized}toggleCollapseState(Qe){if(!Qe.length)return;Qe=Qe.sort((ut,Dt)=>ut.regionIndex-Dt.regionIndex);const tt={};this._decorationProvider.changeDecorations(ut=>{let Dt=0,Pt=-1,Wt=-1;const zt=so=>{for(;Dt<so;){const wo=this._regions.getEndLineNumber(Dt),No=this._regions.isCollapsed(Dt);wo<=Pt&&ut.changeDecorationOptions(this._editorDecorationIds[Dt],this._decorationProvider.getDecorationOption(No,wo<=Wt)),No&&wo>Wt&&(Wt=wo),Dt++}};for(let so of Qe){let wo=so.regionIndex,No=this._editorDecorationIds[wo];if(No&&!tt[No]){tt[No]=!0,zt(wo);let di=!this._regions.isCollapsed(wo);this._regions.setCollapsed(wo,di),Pt=Math.max(Pt,this._regions.getEndLineNumber(wo))}}zt(this._regions.length)}),this._updateEventEmitter.fire({model:this,collapseStateChanged:Qe})}update(Qe,tt=[]){let ut=[],Dt=(di,_o)=>{for(let no of tt)if(di<no&&no<=_o)return!0;return!1},Pt=-1,Wt=(di,_o)=>{const no=Qe.getStartLineNumber(di),_t=Qe.getEndLineNumber(di);_o||(_o=Qe.isCollapsed(di)),_o&&Dt(no,_t)&&(_o=!1),Qe.setCollapsed(di,_o);const Tt=this._textModel.getLineMaxColumn(no),Nt={startLineNumber:no,startColumn:Math.max(Tt-1,1),endLineNumber:no,endColumn:Tt};ut.push({range:Nt,options:this._decorationProvider.getDecorationOption(_o,_t<=Pt)}),_o&&_t>Pt&&(Pt=_t)},zt=0,so=()=>{for(;zt<this._regions.length;){let di=this._regions.isCollapsed(zt);if(zt++,di)return zt-1}return-1},wo=0,No=so();for(;No!==-1&&wo<Qe.length;){let di=this._textModel.getDecorationRange(this._editorDecorationIds[No]);if(di){let _o=di.startLineNumber;if(di.startColumn===Math.max(di.endColumn-1,1)&&this._textModel.getLineMaxColumn(_o)===di.endColumn)for(;wo<Qe.length;){let no=Qe.getStartLineNumber(wo);if(_o>=no)Wt(wo,_o===no),wo++;else break}}No=so()}for(;wo<Qe.length;)Wt(wo,!1),wo++;this._editorDecorationIds=this._decorationProvider.deltaDecorations(this._editorDecorationIds,ut),this._regions=Qe,this._isInitialized=!0,this._updateEventEmitter.fire({model:this})}getMemento(){let Qe=[];for(let tt=0;tt<this._regions.length;tt++)if(this._regions.isCollapsed(tt)){let ut=this._textModel.getDecorationRange(this._editorDecorationIds[tt]);if(ut){let Dt=ut.startLineNumber,Pt=ut.endLineNumber+this._regions.getEndLineNumber(tt)-this._regions.getStartLineNumber(tt);Qe.push({startLineNumber:Dt,endLineNumber:Pt})}}return Qe.length>0?Qe:void 0}applyMemento(Qe){if(!Array.isArray(Qe))return;let tt=[];for(let ut of Qe){let Dt=this.getRegionAtLine(ut.startLineNumber);Dt&&!Dt.isCollapsed&&tt.push(Dt)}this.toggleCollapseState(tt)}dispose(){this._decorationProvider.deltaDecorations(this._editorDecorationIds,[])}getAllRegionsAtLine(Qe,tt){let ut=[];if(this._regions){let Dt=this._regions.findRange(Qe),Pt=1;for(;Dt>=0;){let Wt=this._regions.toRegion(Dt);(!tt||tt(Wt,Pt))&&ut.push(Wt),Pt++,Dt=Wt.parentIndex}}return ut}getRegionAtLine(Qe){if(this._regions){let tt=this._regions.findRange(Qe);if(tt>=0)return this._regions.toRegion(tt)}return null}getRegionsInside(Qe,tt){let ut=[],Dt=Qe?Qe.regionIndex+1:0,Pt=Qe?Qe.endLineNumber:Number.MAX_VALUE;if(tt&&tt.length===2){const Wt=[];for(let zt=Dt,so=this._regions.length;zt<so;zt++){let wo=this._regions.toRegion(zt);if(this._regions.getStartLineNumber(zt)<Pt){for(;Wt.length>0&&!wo.containedBy(Wt[Wt.length-1]);)Wt.pop();Wt.push(wo),tt(wo,Wt.length)&&ut.push(wo)}else break}}else for(let Wt=Dt,zt=this._regions.length;Wt<zt;Wt++){let so=this._regions.toRegion(Wt);if(this._regions.getStartLineNumber(Wt)<Pt)(!tt||tt(so))&&ut.push(so);else break}return ut}}function S(Qe,tt,ut){let Dt=[];for(let Pt of ut){let Wt=Qe.getRegionAtLine(Pt);if(Wt){const zt=!Wt.isCollapsed;if(Dt.push(Wt),tt>1){let so=Qe.getRegionsInside(Wt,(wo,No)=>wo.isCollapsed!==zt&&No<tt);Dt.push(...so)}}}Qe.toggleCollapseState(Dt)}function E(Qe,tt,ut=Number.MAX_VALUE,Dt){let Pt=[];if(Dt&&Dt.length>0)for(let Wt of Dt){let zt=Qe.getRegionAtLine(Wt);if(zt&&(zt.isCollapsed!==tt&&Pt.push(zt),ut>1)){let so=Qe.getRegionsInside(zt,(wo,No)=>wo.isCollapsed!==tt&&No<ut);Pt.push(...so)}}else{let Wt=Qe.getRegionsInside(null,(zt,so)=>zt.isCollapsed!==tt&&so<ut);Pt.push(...Wt)}Qe.toggleCollapseState(Pt)}function y(Qe,tt,ut,Dt){let Pt=[];for(let Wt of Dt){let zt=Qe.getAllRegionsAtLine(Wt,(so,wo)=>so.isCollapsed!==tt&&wo<=ut);Pt.push(...zt)}Qe.toggleCollapseState(Pt)}function O(Qe,tt,ut){let Dt=[];for(let Pt of ut){let Wt=Qe.getAllRegionsAtLine(Pt,zt=>zt.isCollapsed!==tt);Wt.length>0&&Dt.push(Wt[0])}Qe.toggleCollapseState(Dt)}function k(Qe,tt,ut,Dt){let Pt=(zt,so)=>so===tt&&zt.isCollapsed!==ut&&!Dt.some(wo=>zt.containsLine(wo)),Wt=Qe.getRegionsInside(null,Pt);Qe.toggleCollapseState(Wt)}function Q(Qe,tt,ut){let Dt=[];for(let zt of ut)Dt.push(Qe.getAllRegionsAtLine(zt,void 0)[0]);let Pt=zt=>Dt.every(so=>!so.containedBy(zt)&&!zt.containedBy(so))&&zt.isCollapsed!==tt,Wt=Qe.getRegionsInside(null,Pt);Qe.toggleCollapseState(Wt)}function q(Qe,tt,ut){let Dt=Qe.textModel,Pt=Qe.regions,Wt=[];for(let zt=Pt.length-1;zt>=0;zt--)if(ut!==Pt.isCollapsed(zt)){let so=Pt.getStartLineNumber(zt);tt.test(Dt.getLineContent(so))&&Wt.push(Pt.toRegion(zt))}Qe.toggleCollapseState(Wt)}function z(Qe,tt,ut){let Dt=Qe.regions,Pt=[];for(let Wt=Dt.length-1;Wt>=0;Wt--)ut!==Dt.isCollapsed(Wt)&&tt===Dt.getType(Wt)&&Pt.push(Dt.toRegion(Wt));Qe.toggleCollapseState(Pt)}function J(Qe,tt){let ut=null,Dt=tt.getRegionAtLine(Qe);if(Dt!==null&&(ut=Dt.startLineNumber,Qe===ut)){let Pt=Dt.parentIndex;Pt!==-1?ut=tt.regions.getStartLineNumber(Pt):ut=null}return ut}function re(Qe,tt){let ut=tt.getRegionAtLine(Qe);if(ut!==null&&ut.startLineNumber===Qe){if(Qe!==ut.startLineNumber)return ut.startLineNumber;{let Dt=ut.parentIndex,Pt=0;for(Dt!==-1&&(Pt=tt.regions.getStartLineNumber(ut.parentIndex));ut!==null;)if(ut.regionIndex>0){if(ut=tt.regions.toRegion(ut.regionIndex-1),ut.startLineNumber<=Pt)return null;if(ut.parentIndex===Dt)return ut.startLineNumber}else return null}}else if(tt.regions.length>0)for(ut=tt.regions.toRegion(tt.regions.length-1);ut!==null;){if(ut.startLineNumber<Qe)return ut.startLineNumber;ut.regionIndex>0?ut=tt.regions.toRegion(ut.regionIndex-1):ut=null}return null}function Z(Qe,tt){let ut=tt.getRegionAtLine(Qe);if(ut!==null&&ut.startLineNumber===Qe){let Dt=ut.parentIndex,Pt=0;if(Dt!==-1)Pt=tt.regions.getEndLineNumber(ut.parentIndex);else{if(tt.regions.length===0)return null;Pt=tt.regions.getEndLineNumber(tt.regions.length-1)}for(;ut!==null;)if(ut.regionIndex<tt.regions.length){if(ut=tt.regions.toRegion(ut.regionIndex+1),ut.startLineNumber>=Pt)return null;if(ut.parentIndex===Dt)return ut.startLineNumber}else return null}else if(tt.regions.length>0)for(ut=tt.regions.toRegion(0);ut!==null;){if(ut.startLineNumber>Qe)return ut.startLineNumber;ut.regionIndex<tt.regions.length?ut=tt.regions.toRegion(ut.regionIndex+1):ut=null}return null}var ne=t("6OMU"),le=t("aokT");class _e{constructor(Qe){this._updateEventEmitter=new L.b,this._foldingModel=Qe,this._foldingModelListener=Qe.onDidChange(tt=>this.updateHiddenRanges()),this._hiddenRanges=[],Qe.regions.length&&this.updateHiddenRanges()}get onDidChange(){return this._updateEventEmitter.event}get hiddenRanges(){return this._hiddenRanges}updateHiddenRanges(){let Qe=!1,tt=[],ut=0,Dt=0,Pt=Number.MAX_VALUE,Wt=-1,zt=this._foldingModel.regions;for(;ut<zt.length;ut++){if(!zt.isCollapsed(ut))continue;let so=zt.getStartLineNumber(ut)+1,wo=zt.getEndLineNumber(ut);if(Pt<=so&&wo<=Wt)continue;!Qe&&Dt<this._hiddenRanges.length&&this._hiddenRanges[Dt].startLineNumber===so&&this._hiddenRanges[Dt].endLineNumber===wo?(tt.push(this._hiddenRanges[Dt]),Dt++):(Qe=!0,tt.push(new le.a(so,1,wo,1))),Pt=so,Wt=wo}(Qe||Dt<this._hiddenRanges.length)&&this.applyHiddenRanges(tt)}applyMemento(Qe){if(!Array.isArray(Qe)||Qe.length===0)return!1;let tt=[];for(let ut of Qe){if(!ut.startLineNumber||!ut.endLineNumber)return!1;tt.push(new le.a(ut.startLineNumber+1,1,ut.endLineNumber,1))}return this.applyHiddenRanges(tt),!0}getMemento(){return this._hiddenRanges.map(Qe=>({startLineNumber:Qe.startLineNumber-1,endLineNumber:Qe.endLineNumber}))}applyHiddenRanges(Qe){this._hiddenRanges=Qe,this._updateEventEmitter.fire(Qe)}hasRanges(){return this._hiddenRanges.length>0}isHidden(Qe){return oe(this._hiddenRanges,Qe)!==null}adjustSelections(Qe){let tt=!1,ut=this._foldingModel.textModel,Dt=null,Pt=Wt=>((!Dt||!Ce(Wt,Dt))&&(Dt=oe(this._hiddenRanges,Wt)),Dt?Dt.startLineNumber-1:null);for(let Wt=0,zt=Qe.length;Wt<zt;Wt++){let so=Qe[Wt],wo=Pt(so.startLineNumber);wo&&(so=so.setStartPosition(wo,ut.getLineMaxColumn(wo)),tt=!0);let No=Pt(so.endLineNumber);No&&(so=so.setEndPosition(No,ut.getLineMaxColumn(No)),tt=!0),Qe[Wt]=so}return tt}dispose(){this.hiddenRanges.length>0&&(this._hiddenRanges=[],this._updateEventEmitter.fire(this._hiddenRanges)),this._foldingModelListener&&(this._foldingModelListener.dispose(),this._foldingModelListener=null)}}function Ce(Qe,tt){return Qe>=tt.startLineNumber&&Qe<=tt.endLineNumber}function oe(Qe,tt){let ut=Object(ne.h)(Qe,Dt=>tt<Dt.startLineNumber)-1;return ut>=0&&Qe[ut].endLineNumber>=tt?Qe[ut]:null}var ae=t("tX9W");const V=5e3,G="indent";class ee{constructor(Qe){this.editorModel=Qe,this.id=G}dispose(){}compute(Qe){let tt=D.b.getFoldingRules(this.editorModel.getLanguageId()),ut=tt&&!!tt.offSide,Dt=tt&&tt.markers;return Promise.resolve(Te(this.editorModel,ut,Dt))}}class pe{constructor(Qe){this._startIndexes=[],this._endIndexes=[],this._indentOccurrences=[],this._length=0,this._foldingRangesLimit=Qe}insertFirst(Qe,tt,ut){if(Qe>w||tt>w)return;let Dt=this._length;this._startIndexes[Dt]=Qe,this._endIndexes[Dt]=tt,this._length++,ut<1e3&&(this._indentOccurrences[ut]=(this._indentOccurrences[ut]||0)+1)}toIndentRanges(Qe){if(this._length<=this._foldingRangesLimit){let tt=new Uint32Array(this._length),ut=new Uint32Array(this._length);for(let Dt=this._length-1,Pt=0;Dt>=0;Dt--,Pt++)tt[Pt]=this._startIndexes[Dt],ut[Pt]=this._endIndexes[Dt];return new u(tt,ut)}else{let tt=0,ut=this._indentOccurrences.length;for(let zt=0;zt<this._indentOccurrences.length;zt++){let so=this._indentOccurrences[zt];if(so){if(so+tt>this._foldingRangesLimit){ut=zt;break}tt+=so}}const Dt=Qe.getOptions().tabSize;let Pt=new Uint32Array(this._foldingRangesLimit),Wt=new Uint32Array(this._foldingRangesLimit);for(let zt=this._length-1,so=0;zt>=0;zt--){let wo=this._startIndexes[zt],No=Qe.getLineContent(wo),di=ae.c.computeIndentLevel(No,Dt);(di<ut||di===ut&&tt++<this._foldingRangesLimit)&&(Pt[so]=wo,Wt[so]=this._endIndexes[zt],so++)}return new u(Pt,Wt)}}}function Te(Qe,tt,ut,Dt=V){const Pt=Qe.getOptions().tabSize;let Wt=new pe(Dt),zt;ut&&(zt=new RegExp(`(${ut.start.source})|(?:${ut.end.source})`));let so=[],wo=Qe.getLineCount()+1;so.push({indent:-1,endAbove:wo,line:wo});for(let No=Qe.getLineCount();No>0;No--){let di=Qe.getLineContent(No),_o=ae.c.computeIndentLevel(di,Pt),no=so[so.length-1];if(_o===-1){tt&&(no.endAbove=No);continue}let _t;if(zt&&(_t=di.match(zt)))if(_t[1]){let Tt=so.length-1;for(;Tt>0&&so[Tt].indent!==-2;)Tt--;if(Tt>0){so.length=Tt+1,no=so[Tt],Wt.insertFirst(No,no.line,_o),no.line=No,no.indent=_o,no.endAbove=No;continue}}else{so.push({indent:-2,endAbove:No,line:No});continue}if(no.indent>_o){do so.pop(),no=so[so.length-1];while(no.indent>_o);let Tt=no.endAbove-1;Tt-No>=1&&Wt.insertFirst(No,Tt,_o)}no.indent===_o?no.endAbove=No:so.push({indent:_o,endAbove:No,line:No})}return Wt.toIndentRanges(Qe)}const Ie=5e3,Me={},Oe="syntax";class Xe{constructor(Qe,tt,ut,Dt=Ie){this.editorModel=Qe,this.providers=tt,this.limit=Dt,this.id=Oe;for(const Pt of tt)typeof Pt.onDidChange=="function"&&(this.disposables||(this.disposables=new R.b),this.disposables.add(Pt.onDidChange(ut)))}compute(Qe){return fe(this.providers,this.editorModel,Qe).then(tt=>{if(tt){let ut=Be(tt,this.limit);return ut}return null})}dispose(){var Qe;(Qe=this.disposables)===null||Qe===void 0||Qe.dispose()}}function fe(Qe,tt,ut){let Dt=null,Pt=Qe.map((Wt,zt)=>Promise.resolve(Wt.provideFoldingRanges(tt,Me,ut)).then(so=>{if(ut.isCancellationRequested)return;if(Array.isArray(so)){Array.isArray(Dt)||(Dt=[]);let wo=tt.getLineCount();for(let No of so)No.start>0&&No.end>No.start&&No.end<=wo&&Dt.push({start:No.start,end:No.end,rank:zt,kind:No.kind})}},B.g));return Promise.all(Pt).then(Wt=>Dt)}class Pe{constructor(Qe){this._startIndexes=[],this._endIndexes=[],this._nestingLevels=[],this._nestingLevelCounts=[],this._types=[],this._length=0,this._foldingRangesLimit=Qe}add(Qe,tt,ut,Dt){if(Qe>w||tt>w)return;let Pt=this._length;this._startIndexes[Pt]=Qe,this._endIndexes[Pt]=tt,this._nestingLevels[Pt]=Dt,this._types[Pt]=ut,this._length++,Dt<30&&(this._nestingLevelCounts[Dt]=(this._nestingLevelCounts[Dt]||0)+1)}toIndentRanges(){if(this._length<=this._foldingRangesLimit){let Qe=new Uint32Array(this._length),tt=new Uint32Array(this._length);for(let ut=0;ut<this._length;ut++)Qe[ut]=this._startIndexes[ut],tt[ut]=this._endIndexes[ut];return new u(Qe,tt,this._types)}else{let Qe=0,tt=this._nestingLevelCounts.length;for(let Wt=0;Wt<this._nestingLevelCounts.length;Wt++){let zt=this._nestingLevelCounts[Wt];if(zt){if(zt+Qe>this._foldingRangesLimit){tt=Wt;break}Qe+=zt}}let ut=new Uint32Array(this._foldingRangesLimit),Dt=new Uint32Array(this._foldingRangesLimit),Pt=[];for(let Wt=0,zt=0;Wt<this._length;Wt++){let so=this._nestingLevels[Wt];(so<tt||so===tt&&Qe++<this._foldingRangesLimit)&&(ut[zt]=this._startIndexes[Wt],Dt[zt]=this._endIndexes[Wt],Pt[zt]=this._types[Wt],zt++)}return new u(ut,Dt,Pt)}}}function Be(Qe,tt){let ut=Qe.sort((zt,so)=>{let wo=zt.start-so.start;return wo===0&&(wo=zt.rank-so.rank),wo}),Dt=new Pe(tt),Pt,Wt=[];for(let zt of ut)if(!Pt)Pt=zt,Dt.add(zt.start,zt.end,zt.kind&&zt.kind.value,Wt.length);else if(zt.start>Pt.start)if(zt.end<=Pt.end)Wt.push(Pt),Pt=zt,Dt.add(zt.start,zt.end,zt.kind&&zt.kind.value,Wt.length);else{if(zt.start>Pt.end){do Pt=Wt.pop();while(Pt&&zt.start>Pt.end);Pt&&Wt.push(Pt),Pt=zt}Dt.add(zt.start,zt.end,zt.kind&&zt.kind.value,Wt.length)}return Dt.toIndentRanges()}const Se="init";class me{constructor(Qe,tt,ut,Dt){if(this.editorModel=Qe,this.id=Se,tt.length){let Pt=Wt=>({range:{startLineNumber:Wt.startLineNumber,startColumn:0,endLineNumber:Wt.endLineNumber,endColumn:Qe.getLineLength(Wt.endLineNumber)},options:{description:"folding-initializing-range-provider",stickiness:1}});this.decorationIds=Qe.deltaDecorations([],tt.map(Pt)),this.timeout=setTimeout(ut,Dt)}}dispose(){this.decorationIds&&(this.editorModel.deltaDecorations(this.decorationIds,[]),this.decorationIds=void 0),typeof this.timeout=="number"&&(clearTimeout(this.timeout),this.timeout=void 0)}compute(Qe){let tt=[];if(this.decorationIds)for(let ut of this.decorationIds){let Dt=this.editorModel.getDecorationRange(ut);Dt&&tt.push({start:Dt.startLineNumber,end:Dt.endLineNumber,rank:1})}return Promise.resolve(Be(tt,Number.MAX_VALUE))}}var he=t("3/fG"),Le=t("T8No"),we=t("MD5Z"),ve=t("t9D7"),ie=t("Vhoy"),W=t("v1vZ");const U=Object(W.b)("folding-expanded",ie.b.chevronDown,Object(he.a)("foldingExpandedIcon","Icon for expanded ranges in the editor glyph margin.")),se=Object(W.b)("folding-collapsed",ie.b.chevronRight,Object(he.a)("foldingCollapsedIcon","Icon for collapsed ranges in the editor glyph margin."));class je{constructor(Qe){this.editor=Qe,this.autoHideFoldingControls=!0,this.showFoldingHighlights=!0}getDecorationOption(Qe,tt){return tt?je.HIDDEN_RANGE_DECORATION:Qe?this.showFoldingHighlights?je.COLLAPSED_HIGHLIGHTED_VISUAL_DECORATION:je.COLLAPSED_VISUAL_DECORATION:this.autoHideFoldingControls?je.EXPANDED_AUTO_HIDE_VISUAL_DECORATION:je.EXPANDED_VISUAL_DECORATION}deltaDecorations(Qe,tt){return this.editor.deltaDecorations(Qe,tt)}changeDecorations(Qe){return this.editor.changeDecorations(Qe)}}je.COLLAPSED_VISUAL_DECORATION=ae.b.register({description:"folding-collapsed-visual-decoration",stickiness:1,afterContentClassName:"inline-folded",isWholeLine:!0,firstLineDecorationClassName:ve.d.asClassName(se)}),je.COLLAPSED_HIGHLIGHTED_VISUAL_DECORATION=ae.b.register({description:"folding-collapsed-highlighted-visual-decoration",stickiness:1,afterContentClassName:"inline-folded",className:"folded-background",isWholeLine:!0,firstLineDecorationClassName:ve.d.asClassName(se)}),je.EXPANDED_AUTO_HIDE_VISUAL_DECORATION=ae.b.register({description:"folding-expanded-auto-hide-visual-decoration",stickiness:1,isWholeLine:!0,firstLineDecorationClassName:ve.d.asClassName(U)}),je.EXPANDED_VISUAL_DECORATION=ae.b.register({description:"folding-expanded-visual-decoration",stickiness:1,isWholeLine:!0,firstLineDecorationClassName:"alwaysShowFoldIcons "+ve.d.asClassName(U)}),je.HIDDEN_RANGE_DECORATION=ae.b.register({description:"folding-hidden-range-decoration",stickiness:1});var Re=function(Qe,tt,ut,Dt){var Pt=arguments.length,Wt=Pt<3?tt:Dt===null?Dt=Object.getOwnPropertyDescriptor(tt,ut):Dt,zt;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")Wt=Reflect.decorate(Qe,tt,ut,Dt);else for(var so=Qe.length-1;so>=0;so--)(zt=Qe[so])&&(Wt=(Pt<3?zt(Wt):Pt>3?zt(tt,ut,Wt):zt(tt,ut))||Wt);return Pt>3&&Wt&&Object.defineProperty(tt,ut,Wt),Wt},We=function(Qe,tt){return function(ut,Dt){tt(ut,Dt,Qe)}};const dt=new Le.c("foldingEnabled",!1);let Lt=class Qe extends R.a{constructor(tt,ut){super();this.contextKeyService=ut,this.localToDispose=this._register(new R.b),this.editor=tt;const Dt=this.editor.getOptions();this._isEnabled=Dt.get(37),this._useFoldingProviders=Dt.get(38)!=="indentation",this._unfoldOnClickAfterEndOfLine=Dt.get(41),this._restoringViewState=!1,this._currentModelHasFoldedImports=!1,this._foldingImportsByDefault=Dt.get(40),this.foldingModel=null,this.hiddenRangeModel=null,this.rangeProvider=null,this.foldingRegionPromise=null,this.foldingStateMemento=null,this.foldingModelPromise=null,this.updateScheduler=null,this.cursorChangedScheduler=null,this.mouseDownInfo=null,this.foldingDecorationProvider=new je(tt),this.foldingDecorationProvider.autoHideFoldingControls=Dt.get(98)==="mouseover",this.foldingDecorationProvider.showFoldingHighlights=Dt.get(39),this.foldingEnabled=dt.bindTo(this.contextKeyService),this.foldingEnabled.set(this._isEnabled),this._register(this.editor.onDidChangeModel(()=>this.onModelChanged())),this._register(this.editor.onDidChangeConfiguration(Pt=>{if(Pt.hasChanged(37)&&(this._isEnabled=this.editor.getOptions().get(37),this.foldingEnabled.set(this._isEnabled),this.onModelChanged()),Pt.hasChanged(98)||Pt.hasChanged(39)){const Wt=this.editor.getOptions();this.foldingDecorationProvider.autoHideFoldingControls=Wt.get(98)==="mouseover",this.foldingDecorationProvider.showFoldingHighlights=Wt.get(39),this.onModelContentChanged()}Pt.hasChanged(38)&&(this._useFoldingProviders=this.editor.getOptions().get(38)!=="indentation",this.onFoldingStrategyChanged()),Pt.hasChanged(41)&&(this._unfoldOnClickAfterEndOfLine=this.editor.getOptions().get(41)),Pt.hasChanged(40)&&(this._foldingImportsByDefault=this.editor.getOptions().get(40))})),this.onModelChanged()}static get(tt){return tt.getContribution(Qe.ID)}saveViewState(){let tt=this.editor.getModel();if(!tt||!this._isEnabled||tt.isTooLargeForTokenization())return{};if(this.foldingModel){let ut=this.foldingModel.isInitialized?this.foldingModel.getMemento():this.hiddenRangeModel.getMemento(),Dt=this.rangeProvider?this.rangeProvider.id:void 0;return{collapsedRegions:ut,lineCount:tt.getLineCount(),provider:Dt,foldedImports:this._currentModelHasFoldedImports}}return}restoreViewState(tt){let ut=this.editor.getModel();if(!ut||!this._isEnabled||ut.isTooLargeForTokenization()||!this.hiddenRangeModel)return;if(!tt||tt.lineCount!==ut.getLineCount())return;if(this._currentModelHasFoldedImports=!!tt.foldedImports,!tt.collapsedRegions)return;(tt.provider===Oe||tt.provider===Se)&&(this.foldingStateMemento=tt);const Dt=tt.collapsedRegions;if(this.hiddenRangeModel.applyMemento(Dt)){const Pt=this.getFoldingModel();Pt&&Pt.then(Wt=>{if(Wt){this._restoringViewState=!0;try{Wt.applyMemento(Dt)}finally{this._restoringViewState=!1}}}).then(void 0,B.f)}}onModelChanged(){this.localToDispose.clear();let tt=this.editor.getModel();if(!this._isEnabled||!tt||tt.isTooLargeForTokenization())return;this._currentModelHasFoldedImports=!1,this.foldingModel=new p(tt,this.foldingDecorationProvider),this.localToDispose.add(this.foldingModel),this.hiddenRangeModel=new _e(this.foldingModel),this.localToDispose.add(this.hiddenRangeModel),this.localToDispose.add(this.hiddenRangeModel.onDidChange(ut=>this.onHiddenRangesChanges(ut))),this.updateScheduler=new g.a(200),this.cursorChangedScheduler=new g.e(()=>this.revealCursor(),200),this.localToDispose.add(this.cursorChangedScheduler),this.localToDispose.add(d.o.onDidChange(()=>this.onFoldingStrategyChanged())),this.localToDispose.add(this.editor.onDidChangeModelLanguageConfiguration(()=>this.onFoldingStrategyChanged())),this.localToDispose.add(this.editor.onDidChangeModelContent(()=>this.onModelContentChanged())),this.localToDispose.add(this.editor.onDidChangeCursorPosition(()=>this.onCursorPositionChanged())),this.localToDispose.add(this.editor.onMouseDown(ut=>this.onEditorMouseDown(ut))),this.localToDispose.add(this.editor.onMouseUp(ut=>this.onEditorMouseUp(ut))),this.localToDispose.add({dispose:()=>{this.foldingRegionPromise&&(this.foldingRegionPromise.cancel(),this.foldingRegionPromise=null),this.updateScheduler&&this.updateScheduler.cancel(),this.updateScheduler=null,this.foldingModel=null,this.foldingModelPromise=null,this.hiddenRangeModel=null,this.cursorChangedScheduler=null,this.foldingStateMemento=null,this.rangeProvider&&this.rangeProvider.dispose(),this.rangeProvider=null}}),this.onModelContentChanged()}onFoldingStrategyChanged(){this.rangeProvider&&this.rangeProvider.dispose(),this.rangeProvider=null,this.onModelContentChanged()}getRangeProvider(tt){if(this.rangeProvider)return this.rangeProvider;if(this.rangeProvider=new ee(tt),this._useFoldingProviders&&this.foldingModel){let ut=d.o.ordered(this.foldingModel.textModel);if(ut.length===0&&this.foldingStateMemento&&this.foldingStateMemento.collapsedRegions){const Dt=this.rangeProvider=new me(tt,this.foldingStateMemento.collapsedRegions,()=>{this.foldingStateMemento=null,this.onFoldingStrategyChanged()},3e4);return Dt}else ut.length>0&&(this.rangeProvider=new Xe(tt,ut,()=>this.onModelContentChanged()))}return this.foldingStateMemento=null,this.rangeProvider}getFoldingModel(){return this.foldingModelPromise}onModelContentChanged(){this.updateScheduler&&(this.foldingRegionPromise&&(this.foldingRegionPromise.cancel(),this.foldingRegionPromise=null),this.foldingModelPromise=this.updateScheduler.trigger(()=>{const tt=this.foldingModel;if(!tt)return null;const ut=this.getRangeProvider(tt.textModel);let Dt=this.foldingRegionPromise=Object(g.h)(Pt=>ut.compute(Pt));return Dt.then(Pt=>{if(Pt&&Dt===this.foldingRegionPromise){let Wt;if(this._foldingImportsByDefault&&!this._currentModelHasFoldedImports){const wo=Pt.setCollapsedAllOfType(d.n.Imports.value,!0);wo&&(Wt=v.c.capture(this.editor),this._currentModelHasFoldedImports=wo)}let zt=this.editor.getSelections(),so=zt?zt.map(wo=>wo.startLineNumber):[];tt.update(Pt,so),Wt&&Wt.restore(this.editor)}return tt})}).then(void 0,tt=>(Object(B.f)(tt),null)))}onHiddenRangesChanges(tt){if(this.hiddenRangeModel&&tt.length&&!this._restoringViewState){let ut=this.editor.getSelections();ut&&(this.hiddenRangeModel.adjustSelections(ut)&&this.editor.setSelections(ut))}this.editor.setHiddenAreas(tt)}onCursorPositionChanged(){this.hiddenRangeModel&&this.hiddenRangeModel.hasRanges()&&this.cursorChangedScheduler.schedule()}revealCursor(){const tt=this.getFoldingModel();if(!tt)return;tt.then(ut=>{if(ut){let Dt=this.editor.getSelections();if(Dt&&Dt.length>0){let Pt=[];for(let Wt of Dt){let zt=Wt.selectionStartLineNumber;this.hiddenRangeModel&&this.hiddenRangeModel.isHidden(zt)&&Pt.push(...ut.getAllRegionsAtLine(zt,so=>so.isCollapsed&&zt>so.startLineNumber))}Pt.length&&(ut.toggleCollapseState(Pt),this.reveal(Dt[0].getPosition()))}}}).then(void 0,B.f)}onEditorMouseDown(tt){if(this.mouseDownInfo=null,!this.hiddenRangeModel||!tt.target||!tt.target.range)return;if(!tt.event.leftButton&&!tt.event.middleButton)return;const ut=tt.target.range;let Dt=!1;switch(tt.target.type){case 4:const Pt=tt.target.detail,Wt=tt.target.element.offsetLeft,zt=Pt.offsetX-Wt;if(zt<5)return;Dt=!0;break;case 7:{if(this._unfoldOnClickAfterEndOfLine&&this.hiddenRangeModel.hasRanges()){const so=tt.target.detail;if(!so.isAfterLines)break}return}case 6:{if(this.hiddenRangeModel.hasRanges()){let so=this.editor.getModel();if(so&&ut.startColumn===so.getLineMaxColumn(ut.startLineNumber))break}return}default:return}this.mouseDownInfo={lineNumber:ut.startLineNumber,iconClicked:Dt}}onEditorMouseUp(tt){const ut=this.getFoldingModel();if(!ut||!this.mouseDownInfo||!tt.target)return;let Dt=this.mouseDownInfo.lineNumber,Pt=this.mouseDownInfo.iconClicked,Wt=tt.target.range;if(!Wt||Wt.startLineNumber!==Dt)return;if(Pt){if(tt.target.type!==4)return}else{let zt=this.editor.getModel();if(!zt||Wt.startColumn!==zt.getLineMaxColumn(Dt))return}ut.then(zt=>{if(zt){let so=zt.getRegionAtLine(Dt);if(so&&so.startLineNumber===Dt){let wo=so.isCollapsed;if(Pt||wo){let No=tt.event.altKey,di=[];if(No){let _o=_t=>!_t.containedBy(so)&&!so.containedBy(_t),no=zt.getRegionsInside(null,_o);for(const _t of no)_t.isCollapsed&&di.push(_t);di.length===0&&(di=no)}else{let _o=tt.event.middleButton||tt.event.shiftKey;if(_o)for(const no of zt.getRegionsInside(so))no.isCollapsed===wo&&di.push(no);(wo||!_o||di.length===0)&&di.push(so)}zt.toggleCollapseState(di),this.reveal({lineNumber:Dt,column:1})}}}}).then(void 0,B.f)}reveal(tt){this.editor.revealPositionInCenterIfOutsideViewport(tt,0)}};Lt.ID="editor.contrib.folding",Lt=Re([We(1,Le.b)],Lt);class Ht extends C.b{runEditorCommand(Qe,tt,ut){let Dt=Lt.get(tt);if(!Dt)return;let Pt=Dt.getFoldingModel();if(Pt)return this.reportTelemetry(Qe,tt),Pt.then(Wt=>{if(Wt){this.invoke(Dt,Wt,tt,ut);const zt=tt.getSelection();zt&&Dt.reveal(zt.getStartPosition())}})}getSelectedLines(Qe){let tt=Qe.getSelections();return tt?tt.map(ut=>ut.startLineNumber):[]}getLineNumbers(Qe,tt){return Qe&&Qe.selectionLines?Qe.selectionLines.map(ut=>ut+1):this.getSelectedLines(tt)}run(Qe,tt){}}function $e(Qe){if(!j.m(Qe)){if(!j.k(Qe))return!1;const tt=Qe;if(!j.m(tt.levels)&&!j.j(tt.levels))return!1;if(!j.m(tt.direction)&&!j.l(tt.direction))return!1;if(!j.m(tt.selectionLines)&&(!j.f(tt.selectionLines)||!tt.selectionLines.every(j.j)))return!1}return!0}class ot extends Ht{constructor(){super({id:"editor.unfold",label:he.a("unfoldAction.label","Unfold"),alias:"Unfold",precondition:dt,kbOpts:{kbExpr:m.a.editorTextFocus,primary:2048|1024|89,mac:{primary:2048|512|89},weight:100},description:{description:"Unfold the content in the editor",args:[{name:"Unfold editor argument",description:`Property-value pairs that can be passed through this argument:
|
|
|
* 'levels': Number of levels to unfold. If not set, defaults to 1.
|
|
|
* 'direction': If 'up', unfold given number of levels up otherwise unfolds down.
|
|
|
* 'selectionLines': The start lines (0-based) of the editor selections to apply the unfold action to. If not set, the active selection(s) will be used.
|
|
|
`,constraint:$e,schema:{type:"object",properties:{levels:{type:"number",default:1},direction:{type:"string",enum:["up","down"],default:"down"},selectionLines:{type:"array",items:{type:"number"}}}}}]}})}invoke(Qe,tt,ut,Dt){let Pt=Dt&&Dt.levels||1,Wt=this.getLineNumbers(Dt,ut);Dt&&Dt.direction==="up"?y(tt,!1,Pt,Wt):E(tt,!1,Pt,Wt)}}class ce extends Ht{constructor(){super({id:"editor.unfoldRecursively",label:he.a("unFoldRecursivelyAction.label","Unfold Recursively"),alias:"Unfold Recursively",precondition:dt,kbOpts:{kbExpr:m.a.editorTextFocus,primary:Object(x.c)(2048|41,2048|89),weight:100}})}invoke(Qe,tt,ut,Dt){E(tt,!1,Number.MAX_VALUE,this.getSelectedLines(ut))}}class Ve extends Ht{constructor(){super({id:"editor.fold",label:he.a("foldAction.label","Fold"),alias:"Fold",precondition:dt,kbOpts:{kbExpr:m.a.editorTextFocus,primary:2048|1024|87,mac:{primary:2048|512|87},weight:100},description:{description:"Fold the content in the editor",args:[{name:"Fold editor argument",description:`Property-value pairs that can be passed through this argument:
|
|
|
* 'levels': Number of levels to fold.
|
|
|
* 'direction': If 'up', folds given number of levels up otherwise folds down.
|
|
|
* 'selectionLines': The start lines (0-based) of the editor selections to apply the fold action to. If not set, the active selection(s) will be used.
|
|
|
If no levels or direction is set, folds the region at the locations or if already collapsed, the first uncollapsed parent instead.
|
|
|
`,constraint:$e,schema:{type:"object",properties:{levels:{type:"number"},direction:{type:"string",enum:["up","down"]},selectionLines:{type:"array",items:{type:"number"}}}}}]}})}invoke(Qe,tt,ut,Dt){let Pt=this.getLineNumbers(Dt,ut);const Wt=Dt&&Dt.levels,zt=Dt&&Dt.direction;typeof Wt!="number"&&typeof zt!="string"?O(tt,!0,Pt):zt==="up"?y(tt,!0,Wt||1,Pt):E(tt,!0,Wt||1,Pt)}}class it extends Ht{constructor(){super({id:"editor.toggleFold",label:he.a("toggleFoldAction.label","Toggle Fold"),alias:"Toggle Fold",precondition:dt,kbOpts:{kbExpr:m.a.editorTextFocus,primary:Object(x.c)(2048|41,2048|42),weight:100}})}invoke(Qe,tt,ut){let Dt=this.getSelectedLines(ut);S(tt,1,Dt)}}class Et extends Ht{constructor(){super({id:"editor.foldRecursively",label:he.a("foldRecursivelyAction.label","Fold Recursively"),alias:"Fold Recursively",precondition:dt,kbOpts:{kbExpr:m.a.editorTextFocus,primary:Object(x.c)(2048|41,2048|87),weight:100}})}invoke(Qe,tt,ut){let Dt=this.getSelectedLines(ut);E(tt,!0,Number.MAX_VALUE,Dt)}}class It extends Ht{constructor(){super({id:"editor.foldAllBlockComments",label:he.a("foldAllBlockComments.label","Fold All Block Comments"),alias:"Fold All Block Comments",precondition:dt,kbOpts:{kbExpr:m.a.editorTextFocus,primary:Object(x.c)(2048|41,2048|85),weight:100}})}invoke(Qe,tt,ut){if(tt.regions.hasTypes())z(tt,d.n.Comment.value,!0);else{const Dt=ut.getModel();if(!Dt)return;const Pt=D.b.getComments(Dt.getLanguageId());if(Pt&&Pt.blockCommentStartToken){let Wt=new RegExp("^\\s*"+Object(A.t)(Pt.blockCommentStartToken));q(tt,Wt,!0)}}}}class Rt extends Ht{constructor(){super({id:"editor.foldAllMarkerRegions",label:he.a("foldAllMarkerRegions.label","Fold All Regions"),alias:"Fold All Regions",precondition:dt,kbOpts:{kbExpr:m.a.editorTextFocus,primary:Object(x.c)(2048|41,2048|29),weight:100}})}invoke(Qe,tt,ut){if(tt.regions.hasTypes())z(tt,d.n.Region.value,!0);else{const Dt=ut.getModel();if(!Dt)return;const Pt=D.b.getFoldingRules(Dt.getLanguageId());if(Pt&&Pt.markers&&Pt.markers.start){let Wt=new RegExp(Pt.markers.start);q(tt,Wt,!0)}}}}class vo extends Ht{constructor(){super({id:"editor.unfoldAllMarkerRegions",label:he.a("unfoldAllMarkerRegions.label","Unfold All Regions"),alias:"Unfold All Regions",precondition:dt,kbOpts:{kbExpr:m.a.editorTextFocus,primary:Object(x.c)(2048|41,2048|30),weight:100}})}invoke(Qe,tt,ut){if(tt.regions.hasTypes())z(tt,d.n.Region.value,!1);else{const Dt=ut.getModel();if(!Dt)return;const Pt=D.b.getFoldingRules(Dt.getLanguageId());if(Pt&&Pt.markers&&Pt.markers.start){let Wt=new RegExp(Pt.markers.start);q(tt,Wt,!1)}}}}class Mo extends Ht{constructor(){super({id:"editor.foldAllExcept",label:he.a("foldAllExcept.label","Fold All Regions Except Selected"),alias:"Fold All Regions Except Selected",precondition:dt,kbOpts:{kbExpr:m.a.editorTextFocus,primary:Object(x.c)(2048|41,2048|83),weight:100}})}invoke(Qe,tt,ut){let Dt=this.getSelectedLines(ut);Q(tt,!0,Dt)}}class xo extends Ht{constructor(){super({id:"editor.unfoldAllExcept",label:he.a("unfoldAllExcept.label","Unfold All Regions Except Selected"),alias:"Unfold All Regions Except Selected",precondition:dt,kbOpts:{kbExpr:m.a.editorTextFocus,primary:Object(x.c)(2048|41,2048|81),weight:100}})}invoke(Qe,tt,ut){let Dt=this.getSelectedLines(ut);Q(tt,!1,Dt)}}class Do extends Ht{constructor(){super({id:"editor.foldAll",label:he.a("foldAllAction.label","Fold All"),alias:"Fold All",precondition:dt,kbOpts:{kbExpr:m.a.editorTextFocus,primary:Object(x.c)(2048|41,2048|21),weight:100}})}invoke(Qe,tt,ut){E(tt,!0)}}class Lo extends Ht{constructor(){super({id:"editor.unfoldAll",label:he.a("unfoldAllAction.label","Unfold All"),alias:"Unfold All",precondition:dt,kbOpts:{kbExpr:m.a.editorTextFocus,primary:Object(x.c)(2048|41,2048|40),weight:100}})}invoke(Qe,tt,ut){E(tt,!1)}}class To extends Ht{getFoldingLevel(){return parseInt(this.id.substr(To.ID_PREFIX.length))}invoke(Qe,tt,ut){k(tt,this.getFoldingLevel(),!0,this.getSelectedLines(ut))}}To.ID_PREFIX="editor.foldLevel",To.ID=Qe=>To.ID_PREFIX+Qe;class Vt extends Ht{constructor(){super({id:"editor.gotoParentFold",label:he.a("gotoParentFold.label","Go to Parent Fold"),alias:"Go to Parent Fold",precondition:dt,kbOpts:{kbExpr:m.a.editorTextFocus,weight:100}})}invoke(Qe,tt,ut){let Dt=this.getSelectedLines(ut);if(Dt.length>0){let Pt=J(Dt[0],tt);Pt!==null&&ut.setSelection({startLineNumber:Pt,startColumn:1,endLineNumber:Pt,endColumn:1})}}}class xt extends Ht{constructor(){super({id:"editor.gotoPreviousFold",label:he.a("gotoPreviousFold.label","Go to Previous Folding Range"),alias:"Go to Previous Folding Range",precondition:dt,kbOpts:{kbExpr:m.a.editorTextFocus,weight:100}})}invoke(Qe,tt,ut){let Dt=this.getSelectedLines(ut);if(Dt.length>0){let Pt=re(Dt[0],tt);Pt!==null&&ut.setSelection({startLineNumber:Pt,startColumn:1,endLineNumber:Pt,endColumn:1})}}}class ze extends Ht{constructor(){super({id:"editor.gotoNextFold",label:he.a("gotoNextFold.label","Go to Next Folding Range"),alias:"Go to Next Folding Range",precondition:dt,kbOpts:{kbExpr:m.a.editorTextFocus,weight:100}})}invoke(Qe,tt,ut){let Dt=this.getSelectedLines(ut);if(Dt.length>0){let Pt=Z(Dt[0],tt);Pt!==null&&ut.setSelection({startLineNumber:Pt,startColumn:1,endLineNumber:Pt,endColumn:1})}}}Object(C.l)(Lt.ID,Lt),Object(C.j)(ot),Object(C.j)(ce),Object(C.j)(Ve),Object(C.j)(Et),Object(C.j)(Do),Object(C.j)(Lo),Object(C.j)(It),Object(C.j)(Rt),Object(C.j)(vo),Object(C.j)(Mo),Object(C.j)(xo),Object(C.j)(it),Object(C.j)(Vt),Object(C.j)(xt),Object(C.j)(ze);for(let Qe=1;Qe<=7;Qe++)Object(C.m)(new To({id:To.ID(Qe),label:he.a("foldLevelAction.label","Fold Level {0}",Qe),alias:`Fold Level ${Qe}`,precondition:dt,kbOpts:{kbExpr:m.a.editorTextFocus,primary:Object(x.c)(2048|41,2048|21+Qe),weight:100}}));const ct=Object(we.wc)("editor.foldBackground",{light:Object(we.Lc)(we.P,.3),dark:Object(we.Lc)(we.P,.3),hc:null},he.a("foldBackgroundBackground","Background color behind folded ranges. The color must not be opaque so as not to hide underlying decorations."),!0),Ut=Object(we.wc)("editorGutter.foldingControlForeground",{dark:we.db,light:we.db,hc:we.db},he.a("editorGutter.foldingControlForeground","Color of the folding control in the editor gutter."));Object(ve.f)((Qe,tt)=>{const ut=Qe.getColor(ct);ut&&tt.addRule(`.monaco-editor .folded-background { background-color: ${ut}; }`);const Dt=Qe.getColor(Ut);Dt&&tt.addRule(`
|
|
|
.monaco-editor .cldr${ve.d.asCSSSelector(U)},
|
|
|
.monaco-editor .cldr${ve.d.asCSSSelector(se)} {
|
|
|
color: ${Dt} !important;
|
|
|
}
|
|
|
`)})},e0rL:function(mt,M,t){"use strict";t.d(M,"a",function(){return B}),t.d(M,"b",function(){return x});var g=t("Cg/j");const B=Object(g.c)("textResourceConfigurationService"),x=Object(g.c)("textResourcePropertiesService")},e1ni:function(mt,M,t){},eC1c:function(mt,M,t){},eLzo:function(mt,M,t){"use strict";t.d(M,"a",function(){return x}),t.d(M,"b",function(){return R}),t.d(M,"c",function(){return A}),t.d(M,"e",function(){return I}),t.d(M,"d",function(){return v});var g=t("/cxE"),B=t("EJc0");class x{constructor(C="",m=!1){var d,D,L;if(this.value=C,typeof this.value!="string")throw Object(g.c)("value");typeof m=="boolean"?(this.isTrusted=m,this.supportThemeIcons=!1,this.supportHtml=!1):(this.isTrusted=(d=m.isTrusted)!==null&&d!==void 0?d:void 0,this.supportThemeIcons=(D=m.supportThemeIcons)!==null&&D!==void 0?D:!1,this.supportHtml=(L=m.supportHtml)!==null&&L!==void 0?L:!1)}appendText(C,m=0){return this.value+=j(this.supportThemeIcons?Object(B.a)(C):C).replace(/([ \t]+)/g,(d,D)=>" ".repeat(D.length)).replace(/\>/gm,"\\>").replace(/\n/g,m===1?`\\
|
|
|
`:`
|
|
|
|
|
|
`),this}appendMarkdown(C){return this.value+=C,this}appendCodeblock(C,m){return this.value+="\n```",this.value+=C,this.value+=`
|
|
|
`,this.value+=m,this.value+="\n```\n",this}}function R(C){return A(C)?!C.value:Array.isArray(C)?C.every(R):!0}function A(C){return C instanceof x?!0:C&&typeof C=="object"?typeof C.value=="string"&&(typeof C.isTrusted=="boolean"||C.isTrusted===void 0)&&(typeof C.supportThemeIcons=="boolean"||C.supportThemeIcons===void 0):!1}function j(C){return C.replace(/[\\`*_{}[\]()#+\-!]/g,"\\$&")}function I(C){return C&&C.replace(/\\([\\`*_{}[\]()#+\-.!])/g,"$1")}function v(C){const m=[],d=C.split("|").map(L=>L.trim());C=d[0];const D=d[1];if(D){const L=/height=(\d+)/.exec(D),r=/width=(\d+)/.exec(D),w=L?L[1]:"",b=r?r[1]:"",u=isFinite(parseInt(b)),c=isFinite(parseInt(w));u&&m.push(`width="${b}"`),c&&m.push(`height="${w}"`)}return{href:C,dimensions:m}}},eUTo:function(mt,M,t){"use strict";t.d(M,"c",function(){return z}),t.d(M,"a",function(){return Z}),t.d(M,"b",function(){return _e});var g=t("EffR"),B=t("uDWl"),x=t("7/Ik"),R=t("pg8w"),A=t("8HAY"),j=t("MI8n"),I=t("QMLA");class v extends A.b{constructor(Ce,oe){super();this._onDidChangeVisibility=this._register(new j.b),this.onDidChangeVisibility=this._onDidChangeVisibility.event,this._element=Object(g.q)(Ce,Object(g.a)(".monaco-dropdown")),this._label=Object(g.q)(this._element,Object(g.a)(".dropdown-label"));let ae=oe.labelRenderer;ae||(ae=G=>(G.textContent=oe.label||"",null));for(const G of[g.d.CLICK,g.d.MOUSE_DOWN,R.a.Tap])this._register(Object(g.i)(this.element,G,ee=>g.c.stop(ee,!0)));for(const G of[g.d.MOUSE_DOWN,R.a.Tap])this._register(Object(g.i)(this._label,G,ee=>{if(ee instanceof MouseEvent&&ee.detail>1)return;this.visible?this.hide():this.show()}));this._register(Object(g.i)(this._label,g.d.KEY_UP,G=>{const ee=new B.a(G);(ee.equals(3)||ee.equals(10))&&(g.c.stop(G,!0),this.visible?this.hide():this.show())}));const V=ae(this._label);V&&this._register(V),this._register(R.b.addTarget(this._label))}get element(){return this._element}show(){this.visible||(this.visible=!0,this._onDidChangeVisibility.fire(!0))}hide(){this.visible&&(this.visible=!1,this._onDidChangeVisibility.fire(!1))}dispose(){super.dispose(),this.hide(),this.boxContainer&&(this.boxContainer.remove(),this.boxContainer=void 0),this.contents&&(this.contents.remove(),this.contents=void 0),this._label&&(this._label.remove(),this._label=void 0)}}class C extends v{constructor(Ce,oe){super(Ce,oe);this._actions=[],this._contextMenuProvider=oe.contextMenuProvider,this.actions=oe.actions||[],this.actionProvider=oe.actionProvider,this.menuClassName=oe.menuClassName||"",this.menuAsChild=!!oe.menuAsChild}set menuOptions(Ce){this._menuOptions=Ce}get menuOptions(){return this._menuOptions}get actions(){return this.actionProvider?this.actionProvider.getActions():this._actions}set actions(Ce){this._actions=Ce}show(){super.show(),this.element.classList.add("active"),this._contextMenuProvider.showContextMenu({getAnchor:()=>this.element,getActions:()=>this.actions,getActionsContext:()=>this.menuOptions?this.menuOptions.context:null,getActionViewItem:Ce=>this.menuOptions&&this.menuOptions.actionViewItemProvider?this.menuOptions.actionViewItemProvider(Ce):void 0,getKeyBinding:Ce=>this.menuOptions&&this.menuOptions.getKeyBinding?this.menuOptions.getKeyBinding(Ce):void 0,getMenuClassName:()=>this.menuClassName,onHide:()=>this.onHide(),actionRunner:this.menuOptions?this.menuOptions.actionRunner:void 0,anchorAlignment:this.menuOptions?this.menuOptions.anchorAlignment:0,domForShadowRoot:this.menuAsChild?this.element:void 0})}hide(){super.hide()}onHide(){this.hide(),this.element.classList.remove("active")}}class m extends x.b{constructor(Ce,oe,ae,V=Object.create(null)){super(null,Ce,V);this.actionItem=null,this._onDidChangeVisibility=this._register(new j.b),this.menuActionsOrProvider=oe,this.contextMenuProvider=ae,this.options=V,this.options.actionRunner&&(this.actionRunner=this.options.actionRunner)}render(Ce){this.actionItem=Ce;const oe=G=>{this.element=Object(g.q)(G,Object(g.a)("a.action-label"));let ee=[];return typeof this.options.classNames=="string"?ee=this.options.classNames.split(/\s+/g).filter(pe=>!!pe):this.options.classNames&&(ee=this.options.classNames),ee.find(pe=>pe==="icon")||ee.push("codicon"),this.element.classList.add(...ee),this.element.setAttribute("role","button"),this.element.setAttribute("aria-haspopup","true"),this.element.setAttribute("aria-expanded","false"),this.element.title=this._action.label||"",null},ae=Array.isArray(this.menuActionsOrProvider),V={contextMenuProvider:this.contextMenuProvider,labelRenderer:oe,menuAsChild:this.options.menuAsChild,actions:ae?this.menuActionsOrProvider:void 0,actionProvider:ae?void 0:this.menuActionsOrProvider};if(this.dropdownMenu=this._register(new C(Ce,V)),this._register(this.dropdownMenu.onDidChangeVisibility(G=>{var ee;(ee=this.element)===null||ee===void 0||ee.setAttribute("aria-expanded",`${G}`),this._onDidChangeVisibility.fire(G)})),this.dropdownMenu.menuOptions={actionViewItemProvider:this.options.actionViewItemProvider,actionRunner:this.actionRunner,getKeyBinding:this.options.keybindingProvider,context:this._context},this.options.anchorAlignmentProvider){const G=this;this.dropdownMenu.menuOptions=Object.assign(Object.assign({},this.dropdownMenu.menuOptions),{get anchorAlignment(){return G.options.anchorAlignmentProvider()}})}this.updateEnabled()}setActionContext(Ce){super.setActionContext(Ce),this.dropdownMenu&&(this.dropdownMenu.menuOptions?this.dropdownMenu.menuOptions.context=Ce:this.dropdownMenu.menuOptions={context:Ce})}updateEnabled(){var Ce,oe;const ae=!this.getAction().enabled;(Ce=this.actionItem)===null||Ce===void 0||Ce.classList.toggle("disabled",ae),(oe=this.element)===null||oe===void 0||oe.classList.toggle("disabled",ae)}}var d=t("i04g"),D=t("pmY6"),L=t("MNsG"),r=t("r6Ki"),w=t("3/fG"),b=t("fjLI"),u=t("T8No"),c=t("Uzvx"),p=t("Cg/j"),S=t("bexQ"),E=t("sM1p"),y=t("A+jI"),O=t("t9D7"),k=function(Ce,oe,ae,V){var G=arguments.length,ee=G<3?oe:V===null?V=Object.getOwnPropertyDescriptor(oe,ae):V,pe;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")ee=Reflect.decorate(Ce,oe,ae,V);else for(var Te=Ce.length-1;Te>=0;Te--)(pe=Ce[Te])&&(ee=(G<3?pe(ee):G>3?pe(oe,ae,ee):pe(oe,ae))||ee);return G>3&&ee&&Object.defineProperty(oe,ae,ee),ee},Q=function(Ce,oe){return function(ae,V){oe(ae,V,Ce)}},q=function(Ce,oe,ae,V){function G(ee){return ee instanceof ae?ee:new ae(function(pe){pe(ee)})}return new(ae||(ae=Promise))(function(ee,pe){function Te(Oe){try{Me(V.next(Oe))}catch(Xe){pe(Xe)}}function Ie(Oe){try{Me(V.throw(Oe))}catch(Xe){pe(Xe)}}function Me(Oe){Oe.done?ee(Oe.value):G(Oe.value).then(Te,Ie)}Me((V=V.apply(Ce,oe||[])).next())})};function z(Ce,oe,ae,V,G,ee,pe){const Te=Ce.getActions(oe),Ie=typeof V=="string"?Me=>Me===V:V;return re(Te,ae,!1,Ie,G,ee,pe),J(Te)}function J(Ce){const oe=new D.b;for(const[,ae]of Ce)for(const V of ae)oe.add(V);return oe}function re(Ce,oe,ae,V=Te=>Te==="navigation",G=Number.MAX_SAFE_INTEGER,ee=()=>!1,pe=!1){let Te,Ie;Array.isArray(oe)?(Te=oe,Ie=oe):(Te=oe.primary,Ie=oe.secondary);const Me=new Set;for(const[Oe,Xe]of Ce){let fe;V(Oe)?(fe=Te,fe.length>0&&pe&&fe.push(new A.d)):(fe=Ie,fe.length>0&&fe.push(new A.d));for(let Pe of Xe){ae&&(Pe=Pe instanceof b.c&&Pe.alt?Pe.alt:Pe);const Be=fe.push(Pe);Pe instanceof A.e&&Me.add({group:Oe,action:Pe,index:Be-1})}}for(const{group:Oe,action:Xe,index:fe}of Me){const Pe=V(Oe)?Te:Ie,Be=Xe.actions;(Be.length<=1||Pe.length+Be.length-2<=G)&&ee(Xe,Oe,Pe.length)&&Pe.splice(fe,1,...Be)}if(Te!==Ie&&Te.length>G){const Oe=Te.splice(G,Te.length-G);Ie.unshift(...Oe,new A.d)}}let Z=class extends x.a{constructor(oe,ae,V,G,ee){super(void 0,oe,{icon:!!(oe.class||oe.item.icon),label:!oe.class&&!oe.item.icon,draggable:ae==null?void 0:ae.draggable});this._keybindingService=V,this._notificationService=G,this._contextKeyService=ee,this._wantsAltCommand=!1,this._itemClassDispose=this._register(new D.d),this._altKey=g.e.getInstance()}get _menuItemAction(){return this._action}get _commandAction(){return this._wantsAltCommand&&this._menuItemAction.alt||this._menuItemAction}onClick(oe){return q(this,void 0,void 0,function*(){oe.preventDefault(),oe.stopPropagation();try{yield this.actionRunner.run(this._commandAction,this._context)}catch(ae){this._notificationService.error(ae)}})}render(oe){super.render(oe),oe.classList.add("menu-entry"),this._updateItemClass(this._menuItemAction.item);let ae=!1,V=this._altKey.keyStatus.altKey||(L.i||L.d)&&this._altKey.keyStatus.shiftKey;const G=()=>{const ee=ae&&V;ee!==this._wantsAltCommand&&(this._wantsAltCommand=ee,this.updateLabel(),this.updateTooltip(),this.updateClass())};this._menuItemAction.alt&&this._register(this._altKey.event(ee=>{V=ee.altKey||(L.i||L.d)&&ee.shiftKey,G()})),this._register(Object(g.i)(oe,"mouseleave",ee=>{ae=!1,G()})),this._register(Object(g.i)(oe,"mouseenter",ee=>{ae=!0,G()}))}updateLabel(){this.options.label&&this.label&&(this.label.textContent=this._commandAction.label)}updateTooltip(){if(this.label){const oe=this._keybindingService.lookupKeybinding(this._commandAction.id,this._contextKeyService),ae=oe&&oe.getLabel(),V=this._commandAction.tooltip||this._commandAction.label;let G=ae?Object(w.a)("titleAndKb","{0} ({1})",V,ae):V;if(!this._wantsAltCommand&&this._menuItemAction.alt){const ee=this._menuItemAction.alt.tooltip||this._menuItemAction.alt.label,pe=this._keybindingService.lookupKeybinding(this._menuItemAction.alt.id,this._contextKeyService),Te=pe&&pe.getLabel(),Ie=Te?Object(w.a)("titleAndKb","{0} ({1})",ee,Te):ee;G+=`
|
|
|
[${d.c.modifierLabels[L.a].altKey}] ${Ie}`}this.label.title=G}}updateClass(){this.options.icon&&(this._commandAction!==this._menuItemAction?this._menuItemAction.alt&&this._updateItemClass(this._menuItemAction.alt.item):this._menuItemAction.alt&&this._updateItemClass(this._menuItemAction.item))}_updateItemClass(oe){var ae;this._itemClassDispose.value=void 0;const{element:V,label:G}=this;if(!V||!G)return;const ee=this._commandAction.checked&&((ae=oe.toggled)===null||ae===void 0?void 0:ae.icon)?oe.toggled.icon:oe.icon;if(!ee)return;if(O.d.isThemeIcon(ee)){const pe=O.d.asClassNameArray(ee);G.classList.add(...pe),this._itemClassDispose.value=Object(D.i)(()=>{G.classList.remove(...pe)})}else ee.light&&G.style.setProperty("--menu-entry-icon-light",Object(g.s)(ee.light)),ee.dark&&G.style.setProperty("--menu-entry-icon-dark",Object(g.s)(ee.dark)),G.classList.add("icon"),this._itemClassDispose.value=Object(D.i)(()=>{G.classList.remove("icon"),G.style.removeProperty("--menu-entry-icon-light"),G.style.removeProperty("--menu-entry-icon-dark")})}};Z=k([Q(2,S.a),Q(3,E.a),Q(4,u.b)],Z);let ne=class extends m{constructor(oe,ae,V){var G,ee;const pe=Object.assign({},ae!=null?ae:Object.create(null),{menuAsChild:(G=ae==null?void 0:ae.menuAsChild)!==null&&G!==void 0?G:!1,classNames:(ee=ae==null?void 0:ae.classNames)!==null&&ee!==void 0?ee:O.d.isThemeIcon(oe.item.icon)?O.d.asClassName(oe.item.icon):void 0});super(oe,{getActions:()=>oe.actions},V,pe)}render(oe){if(super.render(oe),this.element){oe.classList.add("menu-entry");const{icon:ae}=this._action.item;ae&&!O.d.isThemeIcon(ae)&&(this.element.classList.add("icon"),ae.light&&this.element.style.setProperty("--menu-entry-icon-light",Object(g.s)(ae.light)),ae.dark&&this.element.style.setProperty("--menu-entry-icon-dark",Object(g.s)(ae.dark)))}}};ne=k([Q(2,c.a)],ne);let le=class extends x.b{constructor(oe,ae,V,G,ee,pe,Te,Ie){var Me,Oe,Xe;super(null,oe);this._keybindingService=V,this._notificationService=G,this._contextMenuService=ee,this._menuService=pe,this._instaService=Te,this._storageService=Ie,this._container=null,this._storageKey=`${oe.item.submenu._debugName}_lastActionId`;let fe,Pe=Ie.get(this._storageKey,1);Pe&&(fe=oe.actions.find(Se=>Pe===Se.id)),fe||(fe=oe.actions[0]),this._defaultAction=this._instaService.createInstance(Z,fe,void 0);const Be=Object.assign({},ae!=null?ae:Object.create(null),{menuAsChild:(Me=ae==null?void 0:ae.menuAsChild)!==null&&Me!==void 0?Me:!0,classNames:(Oe=ae==null?void 0:ae.classNames)!==null&&Oe!==void 0?Oe:["codicon","codicon-chevron-down"],actionRunner:(Xe=ae==null?void 0:ae.actionRunner)!==null&&Xe!==void 0?Xe:new A.b});this._dropdown=new m(oe,oe.actions,this._contextMenuService,Be),this._dropdown.actionRunner.onDidRun(Se=>{Se.action instanceof b.c&&this.update(Se.action)})}update(oe){this._storageService.store(this._storageKey,oe.id,1,0),this._defaultAction.dispose(),this._defaultAction=this._instaService.createInstance(Z,oe,void 0),this._defaultAction.actionRunner=new class extends A.b{runAction(ae,V){return q(this,void 0,void 0,function*(){yield ae.run(void 0)})}},this._container&&this._defaultAction.render(Object(g.P)(this._container,Object(g.a)(".action-container")))}setActionContext(oe){super.setActionContext(oe),this._defaultAction.setActionContext(oe),this._dropdown.setActionContext(oe)}render(oe){this._container=oe,super.render(this._container),this._container.classList.add("monaco-dropdown-with-default");const ae=Object(g.a)(".action-container");this._defaultAction.render(Object(g.q)(this._container,ae)),this._register(Object(g.i)(ae,g.d.KEY_DOWN,G=>{const ee=new B.a(G);ee.equals(17)&&(this._defaultAction.element.tabIndex=-1,this._dropdown.focus(),ee.stopPropagation())}));const V=Object(g.a)(".dropdown-action-container");this._dropdown.render(Object(g.q)(this._container,V)),this._register(Object(g.i)(V,g.d.KEY_DOWN,G=>{var ee;const pe=new B.a(G);pe.equals(15)&&(this._defaultAction.element.tabIndex=0,this._dropdown.setFocusable(!1),(ee=this._defaultAction.element)===null||ee===void 0||ee.focus(),pe.stopPropagation())}))}focus(oe){oe?this._dropdown.focus():(this._defaultAction.element.tabIndex=0,this._defaultAction.element.focus())}blur(){this._defaultAction.element.tabIndex=-1,this._dropdown.blur(),this._container.blur()}setFocusable(oe){oe?this._defaultAction.element.tabIndex=0:(this._defaultAction.element.tabIndex=-1,this._dropdown.setFocusable(!1))}dispose(){this._defaultAction.dispose(),this._dropdown.dispose(),super.dispose()}};le=k([Q(2,S.a),Q(3,E.a),Q(4,c.a),Q(5,b.a),Q(6,p.a),Q(7,y.a)],le);function _e(Ce,oe,ae){return oe instanceof b.c?Ce.createInstance(Z,oe,void 0):oe instanceof b.e?oe.item.rememberDefaultAction?Ce.createInstance(le,oe,ae):Ce.createInstance(ne,oe,ae):void 0}},eizg:function(mt,M,t){},ep4t:function(mt,M,t){"use strict";t.r(M),t.d(M,"SuggestController",function(){return fi}),t.d(M,"TriggerSuggestAction",function(){return rn});var g=t("OBOq"),B=t("6OMU"),x=t("X+cX"),R=t("JQT/"),A=t("/cxE"),j=t("MI8n"),I=t("Szf2"),v=t("pmY6"),C=t("MNsG"),m=t("5Y4S"),d=t("746U"),D=t("vATl"),L=t("sswD"),r=t("0/Sa"),w=t("cGHE"),b=t("aokT"),u=t("wQH0"),c=t("tXSY"),p=t("uACm"),S=t("QDVR"),E=t("twdY"),y=t("+7oY"),O=t("9fML"),k=t("Cg/j"),Q=t("A+jI"),q=function(gt,Ge,$,Ee){var Ne=arguments.length,He=Ne<3?Ge:Ee===null?Ee=Object.getOwnPropertyDescriptor(Ge,$):Ee,at;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")He=Reflect.decorate(gt,Ge,$,Ee);else for(var vt=gt.length-1;vt>=0;vt--)(at=gt[vt])&&(He=(Ne<3?at(He):Ne>3?at(Ge,$,He):at(Ge,$))||He);return Ne>3&&He&&Object.defineProperty(Ge,$,He),He},z=function(gt,Ge){return function($,Ee){Ge($,Ee,gt)}};class J{constructor(gt){this.name=gt}select(gt,Ge,$){if($.length===0)return 0;let Ee=$[0].score[0];for(let Ne=0;Ne<$.length;Ne++){const{score:He,completion:at}=$[Ne];if(He[0]!==Ee)break;if(at.preselect)return Ne}return 0}}class re extends J{constructor(){super("first")}memorize(gt,Ge,$){}toJSON(){return}fromJSON(){}}class Z extends J{constructor(){super("recentlyUsed");this._cache=new S.a(300,.66),this._seq=0}memorize(gt,Ge,$){const Ee=`${gt.getLanguageId()}/${$.textLabel}`;this._cache.set(Ee,{touch:this._seq++,type:$.completion.kind,insertText:$.completion.insertText})}select(gt,Ge,$){if($.length===0)return 0;const Ee=gt.getLineContent(Ge.lineNumber).substr(Ge.column-10,Ge.column-1);if(/\s$/.test(Ee))return super.select(gt,Ge,$);let Ne=$[0].score[0],He=-1,at=-1,vt=-1;for(let Xt=0;Xt<$.length&&!($[Xt].score[0]!==Ne);Xt++){const Bt=`${gt.getLanguageId()}/${$[Xt].textLabel}`,Kt=this._cache.peek(Bt);if(Kt&&Kt.touch>vt&&Kt.type===$[Xt].completion.kind&&Kt.insertText===$[Xt].completion.insertText&&(vt=Kt.touch,at=Xt),$[Xt].completion.preselect&&He===-1)return He=Xt}return at!==-1?at:He!==-1?He:0}toJSON(){return this._cache.toJSON()}fromJSON(gt){this._cache.clear();let Ge=0;for(const[$,Ee]of gt)Ee.touch=Ge,Ee.type=typeof Ee.type=="number"?Ee.type:Object(E.G)(Ee.type),this._cache.set($,Ee);this._seq=this._cache.size}}class ne extends J{constructor(){super("recentlyUsedByPrefix");this._trie=S.c.forStrings(),this._seq=0}memorize(gt,Ge,$){const{word:Ee}=gt.getWordUntilPosition(Ge),Ne=`${gt.getLanguageId()}/${Ee}`;this._trie.set(Ne,{type:$.completion.kind,insertText:$.completion.insertText,touch:this._seq++})}select(gt,Ge,$){let{word:Ee}=gt.getWordUntilPosition(Ge);if(!Ee)return super.select(gt,Ge,$);let Ne=`${gt.getLanguageId()}/${Ee}`,He=this._trie.get(Ne);if(He||(He=this._trie.findSubstr(Ne)),He)for(let at=0;at<$.length;at++){let{kind:vt,insertText:Xt}=$[at].completion;if(vt===He.type&&Xt===He.insertText)return at}return super.select(gt,Ge,$)}toJSON(){let gt=[];return this._trie.forEach((Ge,$)=>gt.push([$,Ge])),gt.sort((Ge,$)=>-(Ge[1].touch-$[1].touch)).forEach((Ge,$)=>Ge[1].touch=$),gt.slice(0,200)}fromJSON(gt){if(this._trie.clear(),gt.length>0){this._seq=gt[0][1].touch+1;for(const[Ge,$]of gt)$.type=typeof $.type=="number"?$.type:Object(E.G)($.type),this._trie.set(Ge,$)}}}let le=class gt{constructor(Ge,$){this._storageService=Ge,this._configService=$,this._disposables=new v.b,this._persistSoon=new x.e(()=>this._saveState(),500),this._disposables.add(Ge.onWillSaveState(Ee=>{Ee.reason===Q.c.SHUTDOWN&&this._saveState()}))}dispose(){this._disposables.dispose(),this._persistSoon.dispose()}memorize(Ge,$,Ee){this._withStrategy(Ge,$).memorize(Ge,$,Ee),this._persistSoon.schedule()}select(Ge,$,Ee){return this._withStrategy(Ge,$).select(Ge,$,Ee)}_withStrategy(Ge,$){var Ee;const Ne=this._configService.getValue("editor.suggestSelection",{overrideIdentifier:Ge.getLanguageIdAtPosition($.lineNumber,$.column),resource:Ge.uri});if(((Ee=this._strategy)===null||Ee===void 0?void 0:Ee.name)!==Ne){this._saveState();const He=gt._strategyCtors.get(Ne)||re;this._strategy=new He;try{const at=this._configService.getValue("editor.suggest.shareSuggestSelections"),vt=at?0:1,Xt=this._storageService.get(`${gt._storagePrefix}/${Ne}`,vt);Xt&&this._strategy.fromJSON(JSON.parse(Xt))}catch(at){}}return this._strategy}_saveState(){if(this._strategy){const Ge=this._configService.getValue("editor.suggest.shareSuggestSelections"),$=Ge?0:1,Ee=JSON.stringify(this._strategy);this._storageService.store(`${gt._storagePrefix}/${this._strategy.name}`,Ee,$,1)}}};le._strategyCtors=new Map([["recentlyUsedByPrefix",ne],["recentlyUsed",Z],["first",re]]),le._storagePrefix="suggest/memories",le=q([z(0,Q.a),z(1,y.a)],le);const _e=Object(k.c)("ISuggestMemories");Object(O.b)(_e,le,!0);var Ce=t("T8No"),oe=function(gt,Ge,$,Ee){var Ne=arguments.length,He=Ne<3?Ge:Ee===null?Ee=Object.getOwnPropertyDescriptor(Ge,$):Ee,at;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")He=Reflect.decorate(gt,Ge,$,Ee);else for(var vt=gt.length-1;vt>=0;vt--)(at=gt[vt])&&(He=(Ne<3?at(He):Ne>3?at(Ge,$,He):at(Ge,$))||He);return Ne>3&&He&&Object.defineProperty(Ge,$,He),He},ae=function(gt,Ge){return function($,Ee){Ge($,Ee,gt)}};let V=class gt{constructor(Ge,$){this._editor=Ge,this._enabled=!1,this._ckAtEnd=gt.AtEnd.bindTo($),this._configListener=this._editor.onDidChangeConfiguration(Ee=>Ee.hasChanged(110)&&this._update()),this._update()}dispose(){var Ge;this._configListener.dispose(),(Ge=this._selectionListener)===null||Ge===void 0||Ge.dispose(),this._ckAtEnd.reset()}_update(){const Ge=this._editor.getOption(110)==="on";if(this._enabled===Ge)return;if(this._enabled=Ge,this._enabled){const $=()=>{if(!this._editor.hasModel()){this._ckAtEnd.set(!1);return}const Ee=this._editor.getModel(),Ne=this._editor.getSelection(),He=Ee.getWordAtPosition(Ne.getStartPosition());if(!He){this._ckAtEnd.set(!1);return}this._ckAtEnd.set(He.endColumn===Ne.getStartPosition().column)};this._selectionListener=this._editor.onDidChangeCursorSelection($),$()}else this._selectionListener&&(this._ckAtEnd.reset(),this._selectionListener.dispose(),this._selectionListener=void 0)}};V.AtEnd=new Ce.c("atEndOfWord",!1),V=oe([ae(1,Ce.b)],V);var G=t("3/fG"),ee=t("fjLI"),pe=t("nnTU"),Te=t("nrhi"),Ie=t("09fa"),Me=t("QVNv"),Oe=function(gt,Ge,$,Ee){var Ne=arguments.length,He=Ne<3?Ge:Ee===null?Ee=Object.getOwnPropertyDescriptor(Ge,$):Ee,at;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")He=Reflect.decorate(gt,Ge,$,Ee);else for(var vt=gt.length-1;vt>=0;vt--)(at=gt[vt])&&(He=(Ne<3?at(He):Ne>3?at(Ge,$,He):at(Ge,$))||He);return Ne>3&&He&&Object.defineProperty(Ge,$,He),He},Xe=function(gt,Ge){return function($,Ee){Ge($,Ee,gt)}};let fe=class gt{constructor(Ge,$){this._editor=Ge,this._index=0,this._ckOtherSuggestions=gt.OtherSuggestions.bindTo($)}dispose(){this.reset()}reset(){var Ge;this._ckOtherSuggestions.reset(),(Ge=this._listener)===null||Ge===void 0||Ge.dispose(),this._model=void 0,this._acceptNext=void 0,this._ignore=!1}set({model:Ge,index:$},Ee){if(Ge.items.length===0){this.reset();return}let Ne=gt._moveIndex(!0,Ge,$);if(Ne===$){this.reset();return}this._acceptNext=Ee,this._model=Ge,this._index=$,this._listener=this._editor.onDidChangeCursorPosition(()=>{this._ignore||this.reset()}),this._ckOtherSuggestions.set(!0)}static _moveIndex(Ge,$,Ee){let Ne=Ee;for(;!(Ne=(Ne+$.items.length+(Ge?1:-1))%$.items.length,Ne===Ee);)if(!$.items[Ne].completion.additionalTextEdits)break;return Ne}next(){this._move(!0)}prev(){this._move(!1)}_move(Ge){if(!this._model)return;try{this._ignore=!0,this._index=gt._moveIndex(Ge,this._model,this._index),this._acceptNext({index:this._index,item:this._model.items[this._index],model:this._model})}finally{this._ignore=!1}}};fe.OtherSuggestions=new Ce.c("hasOtherSuggestions",!1),fe=Oe([Xe(1,Ce.b)],fe);var Pe=t("MXAL");class Be{constructor(gt,Ge,$){this._disposables=new v.b,this._disposables.add(Ge.onDidShow(()=>this._onItem(Ge.getFocusedItem()))),this._disposables.add(Ge.onDidFocus(this._onItem,this)),this._disposables.add(Ge.onDidHide(this.reset,this)),this._disposables.add(gt.onWillType(Ee=>{if(this._active&&!Ge.isFrozen()){const Ne=Ee.charCodeAt(Ee.length-1);this._active.acceptCharacters.has(Ne)&>.getOption(0)&&$(this._active.item)}}))}_onItem(gt){if(!gt||!Object(B.n)(gt.item.completion.commitCharacters)){this.reset();return}if(this._active&&this._active.item.item===gt.item)return;const Ge=new Pe.b;for(const $ of gt.item.completion.commitCharacters)$.length>0&&Ge.add($.charCodeAt(0));this._active={acceptCharacters:Ge,item:gt}}reset(){this._active=void 0}dispose(){this._disposables.dispose()}}var Se=t("N0LK"),me=t("gCVg"),he=t("pAvP"),Le=t("Z7SF"),we=function(gt,Ge,$,Ee){function Ne(He){return He instanceof $?He:new $(function(at){at(He)})}return new($||($=Promise))(function(He,at){function vt(Kt){try{Bt(Ee.next(Kt))}catch(ro){at(ro)}}function Xt(Kt){try{Bt(Ee.throw(Kt))}catch(ro){at(ro)}}function Bt(Kt){Kt.done?He(Kt.value):Ne(Kt.value).then(vt,Xt)}Bt((Ee=Ee.apply(gt,Ge||[])).next())})};class ve{static create(gt,Ge){return we(this,void 0,void 0,function*(){if(!Ge.getOption(105).localityBonus)return ve.None;if(!Ge.hasModel())return ve.None;const $=Ge.getModel(),Ee=Ge.getPosition();if(!gt.canComputeWordRanges($.uri))return ve.None;const[Ne]=yield new Le.a().provideSelectionRanges($,[Ee]);if(Ne.length===0)return ve.None;const He=yield gt.computeWordRanges($.uri,Ne[0].range);if(!He)return ve.None;const at=$.getWordUntilPosition(Ee);return delete He[at.word],new class extends ve{distance(vt,Xt){if(!Ee.equals(Ge.getPosition()))return 0;if(Xt.kind===17)return 2<<20;let Bt=typeof Xt.label=="string"?Xt.label:Xt.label.label,Kt=He[Bt];if(Object(B.m)(Kt))return 2<<20;let ro=Object(B.d)(Kt,b.a.fromPositions(vt),b.a.compareRangesUsingStarts),F=ro>=0?Kt[ro]:Kt[Math.max(0,~ro-1)],te=Ne.length;for(const Ae of Ne){if(!b.a.containsRange(Ae.range,F))break;te-=1}return te}}})}}ve.None=new class extends ve{distance(){return 0}};var ie=t("9XeP"),W=t("XXUj"),U=t("fpMC");class se{constructor(gt,Ge){this.leadingLineContent=gt,this.characterCountDelta=Ge}}class je{constructor(gt,Ge,$,Ee,Ne,He,at){this.clipboardText=at,this._snippetCompareFn=je._compareCompletionItems,this._items=gt,this._column=Ge,this._wordDistance=Ee,this._options=Ne,this._refilterKind=1,this._lineContext=$,He==="top"?this._snippetCompareFn=je._compareCompletionItemsSnippetsUp:He==="bottom"&&(this._snippetCompareFn=je._compareCompletionItemsSnippetsDown)}get lineContext(){return this._lineContext}set lineContext(gt){(this._lineContext.leadingLineContent!==gt.leadingLineContent||this._lineContext.characterCountDelta!==gt.characterCountDelta)&&(this._refilterKind=this._lineContext.characterCountDelta<gt.characterCountDelta&&this._filteredItems?2:1,this._lineContext=gt)}get items(){return this._ensureCachedState(),this._filteredItems}get allProvider(){return this._ensureCachedState(),this._providerInfo.keys()}get incomplete(){this._ensureCachedState();const gt=new Set;for(let[Ge,$]of this._providerInfo)$&>.add(Ge);return gt}adopt(gt){let Ge=[];for(let $=0;$<this._items.length;)gt.has(this._items[$].provider)?$++:(Ge.push(this._items[$]),this._items[$]=this._items[this._items.length-1],this._items.pop());return this._refilterKind=1,Ge}get stats(){return this._ensureCachedState(),this._stats}_ensureCachedState(){this._refilterKind!==0&&this._createCachedState()}_createCachedState(){this._providerInfo=new Map;const gt=[],{leadingLineContent:Ge,characterCountDelta:$}=this._lineContext;let Ee="",Ne="";const He=this._refilterKind===1?this._items:this._filteredItems,at=[],vt=!this._options.filterGraceful||He.length>2e3?U.d:U.e;for(let Xt=0;Xt<He.length;Xt++){const Bt=He[Xt];if(Bt.isInvalid)continue;this._providerInfo.set(Bt.provider,Boolean(Bt.container.incomplete));const Kt=Bt.position.column-Bt.editStart.column,ro=Kt+$-(Bt.position.column-this._column);if(Ee.length!==ro&&(Ee=ro===0?"":Ge.slice(-ro),Ne=Ee.toLowerCase()),Bt.word=Ee,ro===0)Bt.score=U.a.Default;else{let F=0;for(;F<Kt;){const te=Ee.charCodeAt(F);if(te===32||te===9)F+=1;else break}if(F>=ro)Bt.score=U.a.Default;else if(typeof Bt.completion.filterText=="string"){let te=vt(Ee,Ne,F,Bt.completion.filterText,Bt.filterTextLow,0,!1);if(!te)continue;Object(Se.g)(Bt.completion.filterText,Bt.textLabel)===0?Bt.score=te:(Bt.score=Object(U.b)(Ee,Ne,F,Bt.textLabel,Bt.labelLow,0),Bt.score[0]=te[0])}else{let te=vt(Ee,Ne,F,Bt.textLabel,Bt.labelLow,0,!1);if(!te)continue;Bt.score=te}}Bt.idx=Xt,Bt.distance=this._wordDistance.distance(Bt.position,Bt.completion),at.push(Bt),gt.push(Bt.textLabel.length)}this._filteredItems=at.sort(this._snippetCompareFn),this._refilterKind=0,this._stats={pLabelLen:gt.length?Object(B.q)(gt.length-.85,gt,(Xt,Bt)=>Xt-Bt):0}}static _compareCompletionItems(gt,Ge){return gt.score[0]>Ge.score[0]?-1:gt.score[0]<Ge.score[0]?1:gt.distance<Ge.distance?-1:gt.distance>Ge.distance?1:gt.idx<Ge.idx?-1:gt.idx>Ge.idx?1:0}static _compareCompletionItemsSnippetsDown(gt,Ge){if(gt.completion.kind!==Ge.completion.kind){if(gt.completion.kind===27)return 1;if(Ge.completion.kind===27)return-1}return je._compareCompletionItems(gt,Ge)}static _compareCompletionItemsSnippetsUp(gt,Ge){if(gt.completion.kind!==Ge.completion.kind){if(gt.completion.kind===27)return-1;if(Ge.completion.kind===27)return 1}return je._compareCompletionItems(gt,Ge)}}var Re=function(gt,Ge,$,Ee){var Ne=arguments.length,He=Ne<3?Ge:Ee===null?Ee=Object.getOwnPropertyDescriptor(Ge,$):Ee,at;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")He=Reflect.decorate(gt,Ge,$,Ee);else for(var vt=gt.length-1;vt>=0;vt--)(at=gt[vt])&&(He=(Ne<3?at(He):Ne>3?at(Ge,$,He):at(Ge,$))||He);return Ne>3&&He&&Object.defineProperty(Ge,$,He),He},We=function(gt,Ge){return function($,Ee){Ge($,Ee,gt)}},dt=function(gt,Ge,$,Ee){function Ne(He){return He instanceof $?He:new $(function(at){at(He)})}return new($||($=Promise))(function(He,at){function vt(Kt){try{Bt(Ee.next(Kt))}catch(ro){at(ro)}}function Xt(Kt){try{Bt(Ee.throw(Kt))}catch(ro){at(ro)}}function Bt(Kt){Kt.done?He(Kt.value):Ne(Kt.value).then(vt,Xt)}Bt((Ee=Ee.apply(gt,Ge||[])).next())})};class Lt{constructor(gt,Ge,$,Ee){this.leadingLineContent=gt.getLineContent(Ge.lineNumber).substr(0,Ge.column-1),this.leadingWord=gt.getWordUntilPosition(Ge),this.lineNumber=Ge.lineNumber,this.column=Ge.column,this.auto=$,this.shy=Ee}static shouldAutoTrigger(gt){if(!gt.hasModel())return!1;const Ge=gt.getModel(),$=gt.getPosition();Ge.tokenizeIfCheap($.lineNumber);const Ee=Ge.getWordAtPosition($);return Ee?Ee.endColumn!==$.column?!1:!!isNaN(Number(Ee.word)):!1}}function Ht(gt){return gt.getOption(105).preview}function $e(gt,Ge,$){if(!Boolean(Ge.getContextKeyValue("inlineSuggestionVisible")))return!0;const Ee=$.getValue("editor.inlineSuggest.allowQuickSuggestions");return Ee!==void 0?Boolean(Ee):!1}function ot(gt,Ge,$){if(!Boolean(Ge.getContextKeyValue("inlineSuggestionVisible")))return!0;const Ee=$.getValue("editor.inlineSuggest.allowSuggestOnTriggerCharacters");return Ee!==void 0?Boolean(Ee):!1}let ce=class gt{constructor(Ge,$,Ee,Ne,He,at,vt){this._editor=Ge,this._editorWorkerService=$,this._clipboardService=Ee,this._telemetryService=Ne,this._logService=He,this._contextKeyService=at,this._configurationService=vt,this._toDispose=new v.b,this._quickSuggestDelay=10,this._triggerCharacterListener=new v.b,this._triggerQuickSuggest=new x.g,this._state=0,this._completionDisposables=new v.b,this._onDidCancel=new j.b,this._onDidTrigger=new j.b,this._onDidSuggest=new j.b,this.onDidCancel=this._onDidCancel.event,this.onDidTrigger=this._onDidTrigger.event,this.onDidSuggest=this._onDidSuggest.event,this._telemetryGate=0,this._currentSelection=this._editor.getSelection()||new me.a(1,1,1,1),this._toDispose.add(this._editor.onDidChangeModel(()=>{this._updateTriggerCharacters(),this.cancel()})),this._toDispose.add(this._editor.onDidChangeModelLanguage(()=>{this._updateTriggerCharacters(),this.cancel()})),this._toDispose.add(this._editor.onDidChangeConfiguration(()=>{this._updateTriggerCharacters(),this._updateQuickSuggest()})),this._toDispose.add(E.d.onDidChange(()=>{this._updateTriggerCharacters(),this._updateActiveSuggestSession()})),this._toDispose.add(this._editor.onDidChangeCursorSelection(Bt=>{this._onCursorChange(Bt)}));let Xt=!1;this._toDispose.add(this._editor.onDidCompositionStart(()=>{Xt=!0})),this._toDispose.add(this._editor.onDidCompositionEnd(()=>{Xt=!1,this._onCompositionEnd()})),this._toDispose.add(this._editor.onDidChangeModelContent(()=>{Xt||this._refilterCompletionItems()})),this._updateTriggerCharacters(),this._updateQuickSuggest()}dispose(){Object(v.f)(this._triggerCharacterListener),Object(v.f)([this._onDidCancel,this._onDidSuggest,this._onDidTrigger,this._triggerQuickSuggest]),this._toDispose.dispose(),this._completionDisposables.dispose(),this.cancel()}_updateQuickSuggest(){this._quickSuggestDelay=this._editor.getOption(79),(isNaN(this._quickSuggestDelay)||!this._quickSuggestDelay&&this._quickSuggestDelay!==0||this._quickSuggestDelay<0)&&(this._quickSuggestDelay=10)}_updateTriggerCharacters(){if(this._triggerCharacterListener.clear(),this._editor.getOption(80)||!this._editor.hasModel()||!this._editor.getOption(108))return;const Ge=new Map;for(const Ee of E.d.all(this._editor.getModel()))for(const Ne of Ee.triggerCharacters||[]){let He=Ge.get(Ne);He||(He=new Set,He.add(Object(Me.c)()),Ge.set(Ne,He)),He.add(Ee)}const $=Ee=>{if(!ot(this._editor,this._contextKeyService,this._configurationService))return;if(Lt.shouldAutoTrigger(this._editor))return;if(!Ee){const at=this._editor.getPosition(),vt=this._editor.getModel();Ee=vt.getLineContent(at.lineNumber).substr(0,at.column-1)}let Ne="";Object(Se.F)(Ee.charCodeAt(Ee.length-1))?Object(Se.E)(Ee.charCodeAt(Ee.length-2))&&(Ne=Ee.substr(Ee.length-2)):Ne=Ee.charAt(Ee.length-1);const He=Ge.get(Ne);if(He){const at=this._completionModel?{items:this._completionModel.adopt(He),clipboardText:this._completionModel.clipboardText}:void 0;this.trigger({auto:!0,shy:!1,triggerCharacter:Ne},Boolean(this._completionModel),He,at)}};this._triggerCharacterListener.add(this._editor.onDidType($)),this._triggerCharacterListener.add(this._editor.onDidCompositionEnd($))}get state(){return this._state}cancel(Ge=!1){var $;this._state!==0&&(this._triggerQuickSuggest.cancel(),($=this._requestToken)===null||$===void 0||$.cancel(),this._requestToken=void 0,this._state=0,this._completionModel=void 0,this._context=void 0,this._onDidCancel.fire({retrigger:Ge}))}clear(){this._completionDisposables.clear()}_updateActiveSuggestSession(){this._state!==0&&(!this._editor.hasModel()||!E.d.has(this._editor.getModel())?this.cancel():this.trigger({auto:this._state===2,shy:!1},!0))}_onCursorChange(Ge){if(!this._editor.hasModel())return;const $=this._currentSelection;if(this._currentSelection=this._editor.getSelection(),!Ge.selection.isEmpty()||Ge.reason!==0&&Ge.reason!==3||Ge.source!=="keyboard"&&Ge.source!=="deleteLeft"){this.cancel();return}this._state===0&&Ge.reason===0?($.containsRange(this._currentSelection)||$.getEndPosition().isBeforeOrEqual(this._currentSelection.getPosition()))&&this._doTriggerQuickSuggest():this._state!==0&&Ge.reason===3&&this._refilterCompletionItems()}_onCompositionEnd(){this._state===0?this._doTriggerQuickSuggest():this._refilterCompletionItems()}_doTriggerQuickSuggest(){if(this._editor.getOption(78)===!1)return;if(this._editor.getOption(105).snippetsPreventQuickSuggestions&&c.SnippetController2.get(this._editor).isInSnippet())return;this.cancel(),this._triggerQuickSuggest.cancelAndSet(()=>{if(this._state!==0)return;if(!Lt.shouldAutoTrigger(this._editor))return;if(!this._editor.hasModel())return;const Ge=this._editor.getModel(),$=this._editor.getPosition(),Ee=this._editor.getOption(78);if(Ee===!1)return;if(!(Ee===!0)){Ge.tokenizeIfCheap($.lineNumber);const Ne=Ge.getLineTokens($.lineNumber),He=Ne.getStandardTokenType(Ne.findTokenIndexAtOffset(Math.max($.column-1-1,0))),at=Ee.other&&He===0||Ee.comments&&He===1||Ee.strings&&He===2;if(!at)return}if(!$e(this._editor,this._contextKeyService,this._configurationService))return;if(!E.d.has(Ge))return;this.trigger({auto:!0,shy:!1})},this._quickSuggestDelay)}_refilterCompletionItems(){Promise.resolve().then(()=>{if(this._state===0)return;if(!this._editor.hasModel())return;const Ge=this._editor.getModel(),$=this._editor.getPosition(),Ee=new Lt(Ge,$,this._state===2,!1);this._onNewContext(Ee)})}trigger(Ge,$=!1,Ee,Ne){var He;if(!this._editor.hasModel())return;const at=this._editor.getModel(),vt=Ge.auto,Xt=new Lt(at,this._editor.getPosition(),vt,Ge.shy);this.cancel($),this._state=vt?2:1,this._onDidTrigger.fire({auto:vt,shy:Ge.shy,position:this._editor.getPosition()}),this._context=Xt;let Bt={triggerKind:(He=Ge.triggerKind)!==null&&He!==void 0?He:0};Ge.triggerCharacter&&(Bt={triggerKind:1,triggerCharacter:Ge.triggerCharacter}),this._requestToken=new R.b;const Kt=this._editor.getOption(100);let ro=1;switch(Kt){case"top":ro=0;break;case"bottom":ro=2;break}const{itemKind:F,showDeprecated:te}=gt._createSuggestFilter(this._editor),Ae=ve.create(this._editorWorkerService,this._editor),Ye=Object(Me.e)(at,this._editor.getPosition(),new Me.a(ro,F,Ee,te),Bt,this._requestToken.token);Promise.all([Ye,Ae]).then(([pt,Mt])=>dt(this,void 0,void 0,function*(){var jt;if((jt=this._requestToken)===null||jt===void 0||jt.dispose(),!this._editor.hasModel())return;let $t=Ne==null?void 0:Ne.clipboardText;if(!$t&&pt.needsClipboard&&($t=yield this._clipboardService.readText()),this._state===0)return;const uo=this._editor.getModel();let io=pt.items;if(Ne){const mo=Object(Me.d)(ro);io=io.concat(Ne.items).sort(mo)}const ho=new Lt(uo,this._editor.getPosition(),vt,Ge.shy);this._completionModel=new je(io,this._context.column,{leadingLineContent:ho.leadingLineContent,characterCountDelta:ho.column-this._context.column},Mt,this._editor.getOption(105),this._editor.getOption(100),$t),this._completionDisposables.add(pt.disposable),this._onNewContext(ho),this._reportDurationsTelemetry(pt.durations)})).catch(A.f)}_reportDurationsTelemetry(Ge){if(this._telemetryGate++%230!==0)return;setTimeout(()=>{this._telemetryService.publicLog2("suggest.durations.json",{data:JSON.stringify(Ge)}),this._logService.debug("suggest.durations.json",Ge)})}static _createSuggestFilter(Ge){const $=new Set,Ee=Ge.getOption(100);Ee==="none"&&$.add(27);const Ne=Ge.getOption(105);return Ne.showMethods||$.add(0),Ne.showFunctions||$.add(1),Ne.showConstructors||$.add(2),Ne.showFields||$.add(3),Ne.showVariables||$.add(4),Ne.showClasses||$.add(5),Ne.showStructs||$.add(6),Ne.showInterfaces||$.add(7),Ne.showModules||$.add(8),Ne.showProperties||$.add(9),Ne.showEvents||$.add(10),Ne.showOperators||$.add(11),Ne.showUnits||$.add(12),Ne.showValues||$.add(13),Ne.showConstants||$.add(14),Ne.showEnums||$.add(15),Ne.showEnumMembers||$.add(16),Ne.showKeywords||$.add(17),Ne.showWords||$.add(18),Ne.showColors||$.add(19),Ne.showFiles||$.add(20),Ne.showReferences||$.add(21),Ne.showColors||$.add(22),Ne.showFolders||$.add(23),Ne.showTypeParameters||$.add(24),Ne.showSnippets||$.add(27),Ne.showUsers||$.add(25),Ne.showIssues||$.add(26),{itemKind:$,showDeprecated:Ne.showDeprecated}}_onNewContext(Ge){if(!this._context)return;if(Ge.lineNumber!==this._context.lineNumber){this.cancel();return}if(Object(Se.x)(Ge.leadingLineContent)!==Object(Se.x)(this._context.leadingLineContent)){this.cancel();return}if(Ge.column<this._context.column){Ge.leadingWord.word?this.trigger({auto:this._context.auto,shy:!1},!0):this.cancel();return}if(!this._completionModel)return;if(Ge.leadingWord.word.length!==0&&Ge.leadingWord.startColumn>this._context.leadingWord.startColumn){const $=new Set(E.d.all(this._editor.getModel()));for(let Ne of this._completionModel.allProvider)$.delete(Ne);const Ee=this._completionModel.adopt(new Set);this.trigger({auto:this._context.auto,shy:!1},!0,$,{items:Ee,clipboardText:this._completionModel.clipboardText});return}if(Ge.column>this._context.column&&this._completionModel.incomplete.size>0&&Ge.leadingWord.word.length!==0){const{incomplete:$}=this._completionModel,Ee=this._completionModel.adopt($);this.trigger({auto:this._state===2,shy:!1,triggerKind:2},!0,$,{items:Ee,clipboardText:this._completionModel.clipboardText})}else{let $=this._completionModel.lineContext,Ee=!1;if(this._completionModel.lineContext={leadingLineContent:Ge.leadingLineContent,characterCountDelta:Ge.column-this._context.column},this._completionModel.items.length===0){if(Lt.shouldAutoTrigger(this._editor)&&this._context.leadingWord.endColumn<Ge.leadingWord.startColumn){this.trigger({auto:this._context.auto,shy:!1},!0);return}if(this._context.auto){this.cancel();return}else if(this._completionModel.lineContext=$,Ee=this._completionModel.items.length>0,Ee&&Ge.leadingWord.word.length===0){this.cancel();return}}this._onDidSuggest.fire({completionModel:this._completionModel,auto:this._context.auto,shy:this._context.shy,isFrozen:Ee})}}};ce=Re([We(1,he.a),We(2,ie.a),We(3,W.a),We(4,Ie.b),We(5,Ce.b),We(6,y.a)],ce);class Ve{constructor(gt,Ge){this._disposables=new v.b,this._lastOvertyped=[],this._empty=!0,this._disposables.add(gt.onWillType(()=>{if(!this._empty)return;if(!gt.hasModel())return;const $=gt.getSelections(),Ee=$.length;let Ne=!1;for(let at=0;at<Ee;at++)if(!$[at].isEmpty()){Ne=!0;break}if(!Ne)return;this._lastOvertyped=[];const He=gt.getModel();for(let at=0;at<Ee;at++){const vt=$[at];if(He.getValueLengthInRange(vt)>Ve._maxSelectionLength)return;this._lastOvertyped[at]={value:He.getValueInRange(vt),multiline:vt.startLineNumber!==vt.endLineNumber}}this._empty=!1})),this._disposables.add(Ge.onDidCancel($=>{!this._empty&&!$.retrigger&&(this._empty=!0)}))}getLastOvertypedInfo(gt){return!this._empty&>>=0&><this._lastOvertyped.length?this._lastOvertyped[gt]:void 0}dispose(){this._disposables.dispose()}}Ve._maxSelectionLength=51200;var it=t("EffR"),Et=t("udvx"),It=t("cqdO"),Rt=t("Sdnv"),vo=t("CClx"),Mo=t("03kh"),xo=t("WqXY"),Do=t("eUTo"),Lo=function(gt,Ge,$,Ee){var Ne=arguments.length,He=Ne<3?Ge:Ee===null?Ee=Object.getOwnPropertyDescriptor(Ge,$):Ee,at;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")He=Reflect.decorate(gt,Ge,$,Ee);else for(var vt=gt.length-1;vt>=0;vt--)(at=gt[vt])&&(He=(Ne<3?at(He):Ne>3?at(Ge,$,He):at(Ge,$))||He);return Ne>3&&He&&Object.defineProperty(Ge,$,He),He},To=function(gt,Ge){return function($,Ee){Ge($,Ee,gt)}};class Vt extends Do.a{updateLabel(){const gt=this._keybindingService.lookupKeybinding(this._action.id,this._contextKeyService);if(!gt)return super.updateLabel();this.label&&(this.label.textContent=Object(G.a)("ddd","{0} ({1})",this._action.label,Vt.symbolPrintEnter(gt)))}static symbolPrintEnter(gt){var Ge;return(Ge=gt.getLabel())===null||Ge===void 0?void 0:Ge.replace(/\benter\b/gi,"\u23CE")}}let xt=class{constructor(Ge,$,Ee,Ne){this._menuService=Ee,this._contextKeyService=Ne,this._menuDisposables=new v.b,this.element=it.q(Ge,it.a(".suggest-status-bar"));const He=at=>at instanceof ee.c?$.createInstance(Vt,at,void 0):void 0;this._leftActions=new xo.a(this.element,{actionViewItemProvider:He}),this._rightActions=new xo.a(this.element,{actionViewItemProvider:He}),this._leftActions.domNode.classList.add("left"),this._rightActions.domNode.classList.add("right")}dispose(){this._menuDisposables.dispose(),this.element.remove()}show(){const Ge=this._menuService.createMenu(Me.g,this._contextKeyService),$=()=>{const Ee=[],Ne=[];for(let[He,at]of Ge.getActions())He==="left"?Ee.push(...at):Ne.push(...at);this._leftActions.clear(),this._leftActions.push(Ee),this._rightActions.clear(),this._rightActions.push(Ne)};this._menuDisposables.add(Ge.onDidChange(()=>$())),this._menuDisposables.add(Ge)}hide(){this._menuDisposables.clear()}};xt=Lo([To(1,k.a),To(2,ee.a),To(3,Ce.b)],xt);var ze=t("28lO"),ct=t("MD5Z"),Ut=t("ptcw"),Qe=t("t9D7"),tt=t("cMOf");class ut{constructor(){this._onDidWillResize=new j.b,this.onDidWillResize=this._onDidWillResize.event,this._onDidResize=new j.b,this.onDidResize=this._onDidResize.event,this._sashListener=new v.b,this._size=new it.b(0,0),this._minSize=new it.b(0,0),this._maxSize=new it.b(Number.MAX_SAFE_INTEGER,Number.MAX_SAFE_INTEGER),this.domNode=document.createElement("div"),this._eastSash=new tt.b(this.domNode,{getVerticalSashLeft:()=>this._size.width},{orientation:0}),this._westSash=new tt.b(this.domNode,{getVerticalSashLeft:()=>0},{orientation:0}),this._northSash=new tt.b(this.domNode,{getHorizontalSashTop:()=>0},{orientation:1,orthogonalEdge:tt.a.North}),this._southSash=new tt.b(this.domNode,{getHorizontalSashTop:()=>this._size.height},{orientation:1,orthogonalEdge:tt.a.South}),this._northSash.orthogonalStartSash=this._westSash,this._northSash.orthogonalEndSash=this._eastSash,this._southSash.orthogonalStartSash=this._westSash,this._southSash.orthogonalEndSash=this._eastSash;let gt,Ge=0,$=0;this._sashListener.add(j.c.any(this._northSash.onDidStart,this._eastSash.onDidStart,this._southSash.onDidStart,this._westSash.onDidStart)(()=>{gt===void 0&&(this._onDidWillResize.fire(),gt=this._size,Ge=0,$=0)})),this._sashListener.add(j.c.any(this._northSash.onDidEnd,this._eastSash.onDidEnd,this._southSash.onDidEnd,this._westSash.onDidEnd)(()=>{gt!==void 0&&(gt=void 0,Ge=0,$=0,this._onDidResize.fire({dimension:this._size,done:!0}))})),this._sashListener.add(this._eastSash.onDidChange(Ee=>{gt&&($=Ee.currentX-Ee.startX,this.layout(gt.height+Ge,gt.width+$),this._onDidResize.fire({dimension:this._size,done:!1,east:!0}))})),this._sashListener.add(this._westSash.onDidChange(Ee=>{gt&&($=-(Ee.currentX-Ee.startX),this.layout(gt.height+Ge,gt.width+$),this._onDidResize.fire({dimension:this._size,done:!1,west:!0}))})),this._sashListener.add(this._northSash.onDidChange(Ee=>{gt&&(Ge=-(Ee.currentY-Ee.startY),this.layout(gt.height+Ge,gt.width+$),this._onDidResize.fire({dimension:this._size,done:!1,north:!0}))})),this._sashListener.add(this._southSash.onDidChange(Ee=>{gt&&(Ge=Ee.currentY-Ee.startY,this.layout(gt.height+Ge,gt.width+$),this._onDidResize.fire({dimension:this._size,done:!1,south:!0}))})),this._sashListener.add(j.c.any(this._eastSash.onDidReset,this._westSash.onDidReset)(Ee=>{this._preferredSize&&(this.layout(this._size.height,this._preferredSize.width),this._onDidResize.fire({dimension:this._size,done:!0}))})),this._sashListener.add(j.c.any(this._northSash.onDidReset,this._southSash.onDidReset)(Ee=>{this._preferredSize&&(this.layout(this._preferredSize.height,this._size.width),this._onDidResize.fire({dimension:this._size,done:!0}))}))}dispose(){this._northSash.dispose(),this._southSash.dispose(),this._eastSash.dispose(),this._westSash.dispose(),this._sashListener.dispose(),this._onDidResize.dispose(),this._onDidWillResize.dispose(),this.domNode.remove()}enableSashes(gt,Ge,$,Ee){this._northSash.state=gt?3:0,this._eastSash.state=Ge?3:0,this._southSash.state=$?3:0,this._westSash.state=Ee?3:0}layout(gt=this.size.height,Ge=this.size.width){const{height:$,width:Ee}=this._minSize,{height:Ne,width:He}=this._maxSize;gt=Math.max($,Math.min(Ne,gt)),Ge=Math.max(Ee,Math.min(He,Ge));const at=new it.b(Ge,gt);it.b.equals(at,this._size)||(this.domNode.style.height=gt+"px",this.domNode.style.width=Ge+"px",this._size=at,this._northSash.layout(),this._eastSash.layout(),this._southSash.layout(),this._westSash.layout())}clearSashHoverState(){this._eastSash.clearSashHoverState(),this._westSash.clearSashHoverState(),this._northSash.clearSashHoverState(),this._southSash.clearSashHoverState()}get size(){return this._size}set maxSize(gt){this._maxSize=gt}get maxSize(){return this._maxSize}set minSize(gt){this._minSize=gt}get minSize(){return this._minSize}set preferredSize(gt){this._preferredSize=gt}get preferredSize(){return this._preferredSize}}var Dt=t("D3Dy"),Pt=t("GJhM"),Wt=t("Vhoy"),zt=t("eLzo"),so=t("v6HE"),wo=t("/UlZ"),No=function(gt,Ge,$,Ee){var Ne=arguments.length,He=Ne<3?Ge:Ee===null?Ee=Object.getOwnPropertyDescriptor(Ge,$):Ee,at;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")He=Reflect.decorate(gt,Ge,$,Ee);else for(var vt=gt.length-1;vt>=0;vt--)(at=gt[vt])&&(He=(Ne<3?at(He):Ne>3?at(Ge,$,He):at(Ge,$))||He);return Ne>3&&He&&Object.defineProperty(Ge,$,He),He},di=function(gt,Ge){return function($,Ee){Ge($,Ee,gt)}};function _o(gt){return!!gt&&Boolean(gt.completion.documentation||gt.completion.detail&>.completion.detail!==gt.completion.label)}let no=class{constructor(Ge,$){this._editor=Ge,this._onDidClose=new j.b,this.onDidClose=this._onDidClose.event,this._onDidChangeContents=new j.b,this.onDidChangeContents=this._onDidChangeContents.event,this._disposables=new v.b,this._renderDisposeable=new v.b,this._borderWidth=1,this._size=new it.b(330,0),this.domNode=it.a(".suggest-details"),this.domNode.classList.add("no-docs"),this._markdownRenderer=$.createInstance(so.a,{editor:Ge}),this._body=it.a(".body"),this._scrollbar=new Pt.a(this._body,{}),it.q(this.domNode,this._scrollbar.getDomNode()),this._disposables.add(this._scrollbar),this._header=it.q(this._body,it.a(".header")),this._close=it.q(this._header,it.a("span"+Wt.b.close.cssSelector)),this._close.title=G.a("details.close","Close"),this._type=it.q(this._header,it.a("p.type")),this._docs=it.q(this._body,it.a("p.docs")),this._configureFont(),this._disposables.add(this._editor.onDidChangeConfiguration(Ee=>{Ee.hasChanged(43)&&this._configureFont()}))}dispose(){this._disposables.dispose(),this._renderDisposeable.dispose()}_configureFont(){const Ge=this._editor.getOptions(),$=Ge.get(43),Ee=$.getMassagedFontFamily(Dt.h?wo.c.fontFamily:null),Ne=Ge.get(106)||$.fontSize,He=Ge.get(107)||$.lineHeight,at=$.fontWeight,vt=`${Ne}px`,Xt=`${He}px`;this.domNode.style.fontSize=vt,this.domNode.style.lineHeight=`${He/Ne}`,this.domNode.style.fontWeight=at,this.domNode.style.fontFeatureSettings=$.fontFeatureSettings,this._type.style.fontFamily=Ee,this._close.style.height=Xt,this._close.style.width=Xt}getLayoutInfo(){const Ge=this._editor.getOption(107)||this._editor.getOption(43).lineHeight,$=this._borderWidth,Ee=$*2;return{lineHeight:Ge,borderWidth:$,borderHeight:Ee,verticalPadding:22,horizontalPadding:14}}renderLoading(){this._type.textContent=G.a("loading","Loading..."),this._docs.textContent="",this.domNode.classList.remove("no-docs","no-type"),this.layout(this.size.width,this.getLayoutInfo().lineHeight*2),this._onDidChangeContents.fire(this)}renderItem(Ge,$){var Ee,Ne;this._renderDisposeable.clear();let{detail:He,documentation:at}=Ge.completion;if($){let vt="";vt+=`score: ${Ge.score[0]}
|
|
|
`,vt+=`prefix: ${(Ee=Ge.word)!==null&&Ee!==void 0?Ee:"(no prefix)"}
|
|
|
`,vt+=`word: ${Ge.completion.filterText?Ge.completion.filterText+" (filterText)":Ge.textLabel}
|
|
|
`,vt+=`distance: ${Ge.distance} (localityBonus-setting)
|
|
|
`,vt+=`index: ${Ge.idx}, based on ${Ge.completion.sortText&&`sortText: "${Ge.completion.sortText}"`||"label"}
|
|
|
`,vt+=`commit_chars: ${(Ne=Ge.completion.commitCharacters)===null||Ne===void 0?void 0:Ne.join("")}
|
|
|
`,at=new zt.a().appendCodeblock("empty",vt),He=`Provider: ${Ge.provider._debugDisplayName}`}if(!$&&!_o(Ge)){this.clearContents();return}if(this.domNode.classList.remove("no-docs","no-type"),He){const vt=He.length>1e5?`${He.substr(0,1e5)}\u2026`:He;this._type.textContent=vt,this._type.title=vt,it.W(this._type),this._type.classList.toggle("auto-wrap",!/\r?\n^\s+/gmi.test(vt))}else it.t(this._type),this._type.title="",it.K(this._type),this.domNode.classList.add("no-type");if(it.t(this._docs),typeof at=="string")this._docs.classList.remove("markdown-docs"),this._docs.textContent=at;else if(at){this._docs.classList.add("markdown-docs"),it.t(this._docs);const vt=this._markdownRenderer.render(at);this._docs.appendChild(vt.element),this._renderDisposeable.add(vt),this._renderDisposeable.add(this._markdownRenderer.onDidRenderAsync(()=>{this.layout(this._size.width,this._type.clientHeight+this._docs.clientHeight),this._onDidChangeContents.fire(this)}))}this.domNode.style.userSelect="text",this.domNode.tabIndex=-1,this._close.onmousedown=vt=>{vt.preventDefault(),vt.stopPropagation()},this._close.onclick=vt=>{vt.preventDefault(),vt.stopPropagation(),this._onDidClose.fire()},this._body.scrollTop=0,this.layout(this._size.width,this._type.clientHeight+this._docs.clientHeight),this._onDidChangeContents.fire(this)}clearContents(){this.domNode.classList.add("no-docs"),this._type.textContent="",this._docs.textContent=""}get size(){return this._size}layout(Ge,$){const Ee=new it.b(Ge,$);it.b.equals(Ee,this._size)||(this._size=Ee,it.X(this.domNode,Ge,$)),this._scrollbar.scanDomNode()}scrollDown(Ge=8){this._body.scrollTop+=Ge}scrollUp(Ge=8){this._body.scrollTop-=Ge}scrollTop(){this._body.scrollTop=0}scrollBottom(){this._body.scrollTop=this._body.scrollHeight}pageDown(){this.scrollDown(80)}pageUp(){this.scrollUp(80)}set borderWidth(Ge){this._borderWidth=Ge}get borderWidth(){return this._borderWidth}};no=No([di(1,k.a)],no);class _t{constructor(gt,Ge){this.widget=gt,this._editor=Ge,this._disposables=new v.b,this._added=!1,this._resizable=new ut,this._resizable.domNode.classList.add("suggest-details-container"),this._resizable.domNode.appendChild(gt.domNode),this._resizable.enableSashes(!1,!0,!0,!1);let $,Ee,Ne=0,He=0;this._disposables.add(this._resizable.onDidWillResize(()=>{$=this._topLeft,Ee=this._resizable.size})),this._disposables.add(this._resizable.onDidResize(at=>{if($&&Ee){this.widget.layout(at.dimension.width,at.dimension.height);let vt=!1;at.west&&(He=Ee.width-at.dimension.width,vt=!0),at.north&&(Ne=Ee.height-at.dimension.height,vt=!0),vt&&this._applyTopLeft({top:$.top+Ne,left:$.left+He})}at.done&&($=void 0,Ee=void 0,Ne=0,He=0,this._userSize=at.dimension)})),this._disposables.add(this.widget.onDidChangeContents(()=>{var at;this._anchorBox&&this._placeAtAnchor(this._anchorBox,(at=this._userSize)!==null&&at!==void 0?at:this.widget.size)}))}dispose(){this._resizable.dispose(),this._disposables.dispose(),this.hide()}getId(){return"suggest.details"}getDomNode(){return this._resizable.domNode}getPosition(){return null}show(){this._added||(this._editor.addOverlayWidget(this),this.getDomNode().style.position="fixed",this._added=!0)}hide(gt=!1){this._resizable.clearSashHoverState(),this._added&&(this._editor.removeOverlayWidget(this),this._added=!1,this._anchorBox=void 0,this._topLeft=void 0),gt&&(this._userSize=void 0,this.widget.clearContents())}placeAtAnchor(gt){var Ge;const $=it.D(gt);this._anchorBox=$,this._placeAtAnchor(this._anchorBox,(Ge=this._userSize)!==null&&Ge!==void 0?Ge:this.widget.size)}_placeAtAnchor(gt,Ge){var $;const Ee=it.z(document.body),Ne=this.widget.getLayoutInfo(),He=new it.b(220,2*Ne.lineHeight),at=gt.top,vt=function(){const Mt=Ee.width-(gt.left+gt.width+Ne.borderWidth+Ne.horizontalPadding),jt=-Ne.borderWidth+gt.left+gt.width,$t=new it.b(Mt,Ee.height-gt.top-Ne.borderHeight-Ne.verticalPadding),uo=$t.with(void 0,gt.top+gt.height-Ne.borderHeight-Ne.verticalPadding);return{top:at,left:jt,fit:Mt-Ge.width,maxSizeTop:$t,maxSizeBottom:uo,minSize:He.with(Math.min(Mt,He.width))}}(),Xt=function(){const Mt=gt.left-Ne.borderWidth-Ne.horizontalPadding,jt=Math.max(Ne.horizontalPadding,gt.left-Ge.width-Ne.borderWidth),$t=new it.b(Mt,Ee.height-gt.top-Ne.borderHeight-Ne.verticalPadding),uo=$t.with(void 0,gt.top+gt.height-Ne.borderHeight-Ne.verticalPadding);return{top:at,left:jt,fit:Mt-Ge.width,maxSizeTop:$t,maxSizeBottom:uo,minSize:He.with(Math.min(Mt,He.width))}}(),Bt=function(){const Mt=gt.left,jt=-Ne.borderWidth+gt.top+gt.height,$t=new it.b(gt.width-Ne.borderHeight,Ee.height-gt.top-gt.height-Ne.verticalPadding);return{top:jt,left:Mt,fit:$t.height-Ge.height,maxSizeBottom:$t,maxSizeTop:$t,minSize:He.with($t.width)}}(),Kt=[vt,Xt,Bt],ro=($=Kt.find(Mt=>Mt.fit>=0))!==null&&$!==void 0?$:Kt.sort((Mt,jt)=>jt.fit-Mt.fit)[0],F=gt.top+gt.height-Ne.borderHeight;let te,Ae=Ge.height;const Ye=Math.max(ro.maxSizeTop.height,ro.maxSizeBottom.height);Ae>Ye&&(Ae=Ye);let pt;Ae<=ro.maxSizeTop.height?(te=!0,pt=ro.maxSizeTop):(te=!1,pt=ro.maxSizeBottom),this._applyTopLeft({left:ro.left,top:te?ro.top:F-Ae}),this.getDomNode().style.position="fixed",this._resizable.enableSashes(!te,ro===vt,te,ro!==vt),this._resizable.minSize=ro.minSize,this._resizable.maxSize=pt,this._resizable.layout(Ae,Math.min(pt.width,Ge.width)),this.widget.layout(this._resizable.size.width,this._resizable.size.height)}_applyTopLeft(gt){this._topLeft=gt,this.getDomNode().style.left=`${this._topLeft.left}px`,this.getDomNode().style.top=`${this._topLeft.top}px`}}var Tt=t("xONI"),Nt=t("bY76"),rt=t("tYmi"),lt=t("gslv"),bt=t("MqQJ"),St;(function(gt){gt[gt.FILE=0]="FILE",gt[gt.FOLDER=1]="FOLDER",gt[gt.ROOT_FOLDER=2]="ROOT_FOLDER"})(St||(St={}));function Qt(gt,Ge,$,Ee){const Ne=Ee===St.ROOT_FOLDER?["rootfolder-icon"]:Ee===St.FOLDER?["folder-icon"]:["file-icon"];if($){let He;if($.scheme===rt.c.data){const at=lt.a.parseMetaData($);He=at.get(lt.a.META_DATA_LABEL)}else He=qt(Object(lt.c)($).toLowerCase());if(Ee===St.FOLDER)Ne.push(`${He}-name-folder-icon`);else{if(He){if(Ne.push(`${He}-name-file-icon`),He.length<=255){const vt=He.split(".");for(let Xt=1;Xt<vt.length;Xt++)Ne.push(`${vt.slice(Xt).join(".")}-ext-file-icon`)}Ne.push("ext-file-icon")}const at=bo(gt,Ge,$);at&&Ne.push(`${qt(at)}-lang-file-icon`)}}return Ne}function bo(gt,Ge,$){if(!$)return null;let Ee=null;if($.scheme===rt.c.data){const Ne=lt.a.parseMetaData($),He=Ne.get(lt.a.META_DATA_MIME);He&&(Ee=Ge.getModeId(He))}else{const Ne=gt.getModel($);Ne&&(Ee=Ne.getLanguageId())}return Ee&&Ee!==bt.b?Ee:Ge.getModeIdByFilepathOrFirstLine($)}function qt(gt){return gt.replace(/[\11\12\14\15\40]/g,"/")}var Eo=t("G2kB"),Ro=t("WBhO"),zo=t("v1vZ"),Bo=function(gt,Ge,$,Ee){var Ne=arguments.length,He=Ne<3?Ge:Ee===null?Ee=Object.getOwnPropertyDescriptor(Ge,$):Ee,at;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")He=Reflect.decorate(gt,Ge,$,Ee);else for(var vt=gt.length-1;vt>=0;vt--)(at=gt[vt])&&(He=(Ne<3?at(He):Ne>3?at(Ge,$,He):at(Ge,$))||He);return Ne>3&&He&&Object.defineProperty(Ge,$,He),He},Jt=function(gt,Ge){return function($,Ee){Ge($,Ee,gt)}},fo;function ri(gt){return`suggest-aria-id:${gt}`}const Zo=Object(zo.b)("suggest-more-info",Wt.b.chevronRight,G.a("suggestMoreInfoIcon","Icon for more information in the suggest widget.")),ci=new(fo=class gt{extract(Ge,$){if(Ge.textLabel.match(gt._regexStrict))return $[0]=Ge.textLabel,!0;if(Ge.completion.detail&&Ge.completion.detail.match(gt._regexStrict))return $[0]=Ge.completion.detail,!0;if(typeof Ge.completion.documentation=="string"){const Ee=gt._regexRelaxed.exec(Ge.completion.documentation);if(Ee&&(Ee.index===0||Ee.index+Ee[0].length===Ge.completion.documentation.length))return $[0]=Ee[0],!0}return!1}},fo._regexRelaxed=/(#([\da-fA-F]{3}){1,2}|(rgb|hsl)a\(\s*(\d{1,3}%?\s*,\s*){3}(1|0?\.\d+)\)|(rgb|hsl)\(\s*\d{1,3}%?(\s*,\s*\d{1,3}%?){2}\s*\))/,fo._regexStrict=new RegExp(`^${fo._regexRelaxed.source}$`,"i"),fo);let ki=class{constructor(Ge,$,Ee,Ne){this._editor=Ge,this._modelService=$,this._modeService=Ee,this._themeService=Ne,this._onDidToggleDetails=new j.b,this.onDidToggleDetails=this._onDidToggleDetails.event,this.templateId="suggestion"}dispose(){this._onDidToggleDetails.dispose()}renderTemplate(Ge){const $=Object.create(null);$.disposables=new v.b,$.root=Ge,$.root.classList.add("show-file-icons"),$.icon=Object(it.q)(Ge,Object(it.a)(".icon")),$.colorspan=Object(it.q)($.icon,Object(it.a)("span.colorspan"));const Ee=Object(it.q)(Ge,Object(it.a)(".contents")),Ne=Object(it.q)(Ee,Object(it.a)(".main"));$.iconContainer=Object(it.q)(Ne,Object(it.a)(".icon-label.codicon")),$.left=Object(it.q)(Ne,Object(it.a)("span.left")),$.right=Object(it.q)(Ne,Object(it.a)("span.right")),$.iconLabel=new Tt.a($.left,{supportHighlights:!0,supportIcons:!0}),$.disposables.add($.iconLabel),$.parametersLabel=Object(it.q)($.left,Object(it.a)("span.signature-label")),$.qualifierLabel=Object(it.q)($.left,Object(it.a)("span.qualifier-label")),$.detailsLabel=Object(it.q)($.right,Object(it.a)("span.details-label")),$.readMore=Object(it.q)($.right,Object(it.a)("span.readMore"+Qe.d.asCSSSelector(Zo))),$.readMore.title=G.a("readMore","Read More");const He=()=>{const at=this._editor.getOptions(),vt=at.get(43),Xt=vt.getMassagedFontFamily(Dt.h?wo.c.fontFamily:null),Bt=vt.fontFeatureSettings,Kt=at.get(106)||vt.fontSize,ro=at.get(107)||vt.lineHeight,F=vt.fontWeight,te=`${Kt}px`,Ae=`${ro}px`;$.root.style.fontSize=te,$.root.style.fontWeight=F,Ne.style.fontFamily=Xt,Ne.style.fontFeatureSettings=Bt,Ne.style.lineHeight=Ae,$.icon.style.height=Ae,$.icon.style.width=Ae,$.readMore.style.height=Ae,$.readMore.style.width=Ae};return He(),$.disposables.add(this._editor.onDidChangeConfiguration(at=>{(at.hasChanged(43)||at.hasChanged(106)||at.hasChanged(107))&&He()})),$}renderElement(Ge,$,Ee){const{completion:Ne}=Ge;Ee.root.id=ri($),Ee.colorspan.style.backgroundColor="";const He={labelEscapeNewLines:!0,matches:Object(U.c)(Ge.score)};let at=[];if(Ne.kind===19&&ci.extract(Ge,at))Ee.icon.className="icon customcolor",Ee.iconContainer.className="icon hide",Ee.colorspan.style.backgroundColor=at[0];else if(Ne.kind===20&&this._themeService.getFileIconTheme().hasFileIcons){Ee.icon.className="icon hide",Ee.iconContainer.className="icon hide";const vt=Qt(this._modelService,this._modeService,Nt.a.from({scheme:"fake",path:Ge.textLabel}),St.FILE),Xt=Qt(this._modelService,this._modeService,Nt.a.from({scheme:"fake",path:Ne.detail}),St.FILE);He.extraClasses=vt.length>Xt.length?vt:Xt}else Ne.kind===23&&this._themeService.getFileIconTheme().hasFolderIcons?(Ee.icon.className="icon hide",Ee.iconContainer.className="icon hide",He.extraClasses=Object(B.k)([Qt(this._modelService,this._modeService,Nt.a.from({scheme:"fake",path:Ge.textLabel}),St.FOLDER),Qt(this._modelService,this._modeService,Nt.a.from({scheme:"fake",path:Ne.detail}),St.FOLDER)])):(Ee.icon.className="icon hide",Ee.iconContainer.className="",Ee.iconContainer.classList.add("suggest-icon",...Object(E.H)(Ne.kind).split(" ")));Ne.tags&&Ne.tags.indexOf(1)>=0&&(He.extraClasses=(He.extraClasses||[]).concat(["deprecated"]),He.matches=[]),Ee.iconLabel.setLabel(Ge.textLabel,void 0,He),typeof Ne.label=="string"?(Ee.parametersLabel.textContent="",Ee.detailsLabel.textContent=wi(Ne.detail||""),Ee.root.classList.add("string-label")):(Ee.parametersLabel.textContent=wi(Ne.label.detail||""),Ee.detailsLabel.textContent=wi(Ne.label.description||""),Ee.root.classList.remove("string-label")),this._editor.getOption(105).showInlineDetails?Object(it.W)(Ee.detailsLabel):Object(it.K)(Ee.detailsLabel),_o(Ge)?(Ee.right.classList.add("can-expand-details"),Object(it.W)(Ee.readMore),Ee.readMore.onmousedown=vt=>{vt.stopPropagation(),vt.preventDefault()},Ee.readMore.onclick=vt=>{vt.stopPropagation(),vt.preventDefault(),this._onDidToggleDetails.fire()}):(Ee.right.classList.remove("can-expand-details"),Object(it.K)(Ee.readMore),Ee.readMore.onmousedown=null,Ee.readMore.onclick=null)}disposeTemplate(Ge){Ge.disposables.dispose()}};ki=Bo([Jt(1,Eo.a),Jt(2,Ro.a),Jt(3,Qe.b)],ki);function wi(gt){return gt.replace(/\r\n|\r|\n/g,"")}var Zi=function(gt,Ge,$,Ee){var Ne=arguments.length,He=Ne<3?Ge:Ee===null?Ee=Object.getOwnPropertyDescriptor(Ge,$):Ee,at;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")He=Reflect.decorate(gt,Ge,$,Ee);else for(var vt=gt.length-1;vt>=0;vt--)(at=gt[vt])&&(He=(Ne<3?at(He):Ne>3?at(Ge,$,He):at(Ge,$))||He);return Ne>3&&He&&Object.defineProperty(Ge,$,He),He},Vi=function(gt,Ge){return function($,Ee){Ge($,Ee,gt)}},vi=function(gt,Ge,$,Ee){function Ne(He){return He instanceof $?He:new $(function(at){at(He)})}return new($||($=Promise))(function(He,at){function vt(Kt){try{Bt(Ee.next(Kt))}catch(ro){at(ro)}}function Xt(Kt){try{Bt(Ee.throw(Kt))}catch(ro){at(ro)}}function Bt(Kt){Kt.done?He(Kt.value):Ne(Kt.value).then(vt,Xt)}Bt((Ee=Ee.apply(gt,Ge||[])).next())})};const sn=Object(ct.wc)("editorSuggestWidget.background",{dark:ct.W,light:ct.W,hc:ct.W},G.a("editorSuggestWidgetBackground","Background color of the suggest widget.")),en=Object(ct.wc)("editorSuggestWidget.border",{dark:ct.X,light:ct.X,hc:ct.X},G.a("editorSuggestWidgetBorder","Border color of the suggest widget.")),on=Object(ct.wc)("editorSuggestWidget.foreground",{dark:ct.B,light:ct.B,hc:ct.B},G.a("editorSuggestWidgetForeground","Foreground color of the suggest widget.")),cn=Object(ct.wc)("editorSuggestWidget.selectedForeground",{dark:ct.tc,light:ct.tc,hc:ct.tc},G.a("editorSuggestWidgetSelectedForeground","Foreground color of the selected entry in the suggest widget.")),Bi=Object(ct.wc)("editorSuggestWidget.selectedIconForeground",{dark:ct.uc,light:ct.uc,hc:ct.uc},G.a("editorSuggestWidgetSelectedIconForeground","Icon foreground color of the selected entry in the suggest widget.")),zi=Object(ct.wc)("editorSuggestWidget.selectedBackground",{dark:ct.sc,light:ct.sc,hc:ct.sc},G.a("editorSuggestWidgetSelectedBackground","Background color of the selected entry in the suggest widget.")),Ji=Object(ct.wc)("editorSuggestWidget.highlightForeground",{dark:ct.Ib,light:ct.Ib,hc:ct.Ib},G.a("editorSuggestWidgetHighlightForeground","Color of the match highlights in the suggest widget.")),ui=Object(ct.wc)("editorSuggestWidget.focusHighlightForeground",{dark:ct.Gb,light:ct.Gb,hc:ct.Gb},G.a("editorSuggestWidgetFocusHighlightForeground","Color of the match highlights in the suggest widget when an item is focused."));class pn{constructor(gt,Ge){this._service=gt,this._key=`suggestWidget.size/${Ge.getEditorType()}/${Ge instanceof Mo.a}`}restore(){var gt;const Ge=(gt=this._service.get(this._key,0))!==null&>!==void 0?gt:"";try{const $=JSON.parse(Ge);if(it.b.is($))return it.b.lift($)}catch($){}return}store(gt){this._service.store(this._key,JSON.stringify(gt),0,1)}reset(){this._service.remove(this._key,0)}}let Hi=class gt{constructor(Ge,$,Ee,Ne,He){this.editor=Ge,this._storageService=$,this._state=0,this._isAuto=!1,this._ignoreFocusEvents=!1,this._forceRenderingAbove=!1,this._explainMode=!1,this._showTimeout=new x.g,this._disposables=new v.b,this._onDidSelect=new j.b,this._onDidFocus=new j.b,this._onDidHide=new j.b,this._onDidShow=new j.b,this.onDidSelect=this._onDidSelect.event,this.onDidFocus=this._onDidFocus.event,this.onDidHide=this._onDidHide.event,this.onDidShow=this._onDidShow.event,this._onDetailsKeydown=new j.b,this.onDetailsKeyDown=this._onDetailsKeydown.event,this.element=new ut,this.element.domNode.classList.add("editor-widget","suggest-widget"),this._contentWidget=new Oi(this,Ge),this._persistedSize=new pn($,Ge);class at{constructor(F,te,Ae=!1,Ye=!1){this.persistedSize=F,this.currentSize=te,this.persistHeight=Ae,this.persistWidth=Ye}}let vt;this._disposables.add(this.element.onDidWillResize(()=>{this._contentWidget.lockPreference(),vt=new at(this._persistedSize.restore(),this.element.size)})),this._disposables.add(this.element.onDidResize(F=>{var te,Ae,Ye,pt;if(this._resize(F.dimension.width,F.dimension.height),vt&&(vt.persistHeight=vt.persistHeight||!!F.north||!!F.south,vt.persistWidth=vt.persistWidth||!!F.east||!!F.west),!F.done)return;if(vt){const{itemHeight:Mt,defaultSize:jt}=this.getLayoutInfo(),$t=Math.round(Mt/2);let{width:uo,height:io}=this.element.size;(!vt.persistHeight||Math.abs(vt.currentSize.height-io)<=$t)&&(io=(Ae=(te=vt.persistedSize)===null||te===void 0?void 0:te.height)!==null&&Ae!==void 0?Ae:jt.height),(!vt.persistWidth||Math.abs(vt.currentSize.width-uo)<=$t)&&(uo=(pt=(Ye=vt.persistedSize)===null||Ye===void 0?void 0:Ye.width)!==null&&pt!==void 0?pt:jt.width),this._persistedSize.store(new it.b(uo,io))}this._contentWidget.unlockPreference(),vt=void 0})),this._messageElement=it.q(this.element.domNode,it.a(".message")),this._listElement=it.q(this.element.domNode,it.a(".tree"));const Xt=He.createInstance(no,this.editor);Xt.onDidClose(this.toggleDetails,this,this._disposables),this._details=new _t(Xt,this.editor);const Bt=()=>this.element.domNode.classList.toggle("no-icons",!this.editor.getOption(105).showIcons);Bt();const Kt=He.createInstance(ki,this.editor);this._disposables.add(Kt),this._disposables.add(Kt.onDidToggleDetails(()=>this.toggleDetails())),this._list=new It.c("SuggestWidget",this._listElement,{getHeight:F=>this.getLayoutInfo().itemHeight,getTemplateId:F=>"suggestion"},[Kt],{alwaysConsumeMouseWheel:!0,useShadows:!1,mouseSupport:!1,accessibilityProvider:{getRole:()=>"option",getAriaLabel:F=>{if(F.isResolved&&this._isDetailsVisible()){const{documentation:te,detail:Ae}=F.completion,Ye=Se.v("{0}{1}",Ae||"",te?typeof te=="string"?te:te.value:"");return G.a("ariaCurrenttSuggestionReadDetails","{0}, docs: {1}",F.textLabel,Ye)}else return F.textLabel},getWidgetAriaLabel:()=>G.a("suggest","Suggest"),getWidgetRole:()=>"listbox"}}),this._status=He.createInstance(xt,this.element.domNode);const ro=()=>this.element.domNode.classList.toggle("with-status-bar",this.editor.getOption(105).showStatusBar);ro(),this._disposables.add(Object(Ut.b)(this._list,Ne,{listInactiveFocusBackground:zi,listInactiveFocusOutline:ct.b})),this._disposables.add(Ne.onDidColorThemeChange(F=>this._onThemeChange(F))),this._onThemeChange(Ne.getColorTheme()),this._disposables.add(this._list.onMouseDown(F=>this._onListMouseDownOrTap(F))),this._disposables.add(this._list.onTap(F=>this._onListMouseDownOrTap(F))),this._disposables.add(this._list.onDidChangeSelection(F=>this._onListSelection(F))),this._disposables.add(this._list.onDidChangeFocus(F=>this._onListFocus(F))),this._disposables.add(this.editor.onDidChangeCursorSelection(()=>this._onCursorSelectionChanged())),this._disposables.add(this.editor.onDidChangeConfiguration(F=>{F.hasChanged(105)&&(ro(),Bt())})),this._ctxSuggestWidgetVisible=Me.b.Visible.bindTo(Ee),this._ctxSuggestWidgetDetailsVisible=Me.b.DetailsVisible.bindTo(Ee),this._ctxSuggestWidgetMultipleSuggestions=Me.b.MultipleSuggestions.bindTo(Ee),this._disposables.add(it.o(this._details.widget.domNode,"keydown",F=>{this._onDetailsKeydown.fire(F)})),this._disposables.add(this.editor.onMouseDown(F=>this._onEditorMouseDown(F)))}dispose(){var Ge;this._details.widget.dispose(),this._details.dispose(),this._list.dispose(),this._status.dispose(),this._disposables.dispose(),(Ge=this._loadingTimeout)===null||Ge===void 0||Ge.dispose(),this._showTimeout.dispose(),this._contentWidget.dispose(),this.element.dispose()}_onEditorMouseDown(Ge){this._details.widget.domNode.contains(Ge.target.element)?this._details.widget.domNode.focus():this.element.domNode.contains(Ge.target.element)&&this.editor.focus()}_onCursorSelectionChanged(){this._state!==0&&this._contentWidget.layout()}_onListMouseDownOrTap(Ge){if(typeof Ge.element=="undefined"||typeof Ge.index=="undefined")return;Ge.browserEvent.preventDefault(),Ge.browserEvent.stopPropagation(),this._select(Ge.element,Ge.index)}_onListSelection(Ge){Ge.elements.length&&this._select(Ge.elements[0],Ge.indexes[0])}_select(Ge,$){const Ee=this._completionModel;Ee&&(this._onDidSelect.fire({item:Ge,index:$,model:Ee}),this.editor.focus())}_onThemeChange(Ge){const $=Ge.getColor(sn);$&&(this.element.domNode.style.backgroundColor=$.toString(),this._messageElement.style.backgroundColor=$.toString(),this._details.widget.domNode.style.backgroundColor=$.toString());const Ee=Ge.getColor(en);Ee&&(this.element.domNode.style.borderColor=Ee.toString(),this._messageElement.style.borderColor=Ee.toString(),this._status.element.style.borderTopColor=Ee.toString(),this._details.widget.domNode.style.borderColor=Ee.toString(),this._detailsBorderColor=Ee.toString());const Ne=Ge.getColor(ct.bb);Ne&&(this._detailsFocusBorderColor=Ne.toString()),this._details.widget.borderWidth=Ge.type==="hc"?2:1}_onListFocus(Ge){var $;if(this._ignoreFocusEvents)return;if(!Ge.elements.length){this._currentSuggestionDetails&&(this._currentSuggestionDetails.cancel(),this._currentSuggestionDetails=void 0,this._focusedItem=void 0),this.editor.setAriaOptions({activeDescendant:void 0});return}if(!this._completionModel)return;const Ee=Ge.elements[0],Ne=Ge.indexes[0];Ee!==this._focusedItem&&(($=this._currentSuggestionDetails)===null||$===void 0||$.cancel(),this._currentSuggestionDetails=void 0,this._focusedItem=Ee,this._list.reveal(Ne),this._currentSuggestionDetails=Object(x.h)(He=>vi(this,void 0,void 0,function*(){const at=Object(x.i)(()=>{this._isDetailsVisible()&&this.showDetails(!0)},250);He.onCancellationRequested(()=>at.dispose());const vt=yield Ee.resolve(He);return at.dispose(),vt})),this._currentSuggestionDetails.then(()=>{if(Ne>=this._list.length||Ee!==this._list.element(Ne))return;this._ignoreFocusEvents=!0,this._list.splice(Ne,1,[Ee]),this._list.setFocus([Ne]),this._ignoreFocusEvents=!1,this._isDetailsVisible()?this.showDetails(!1):this.element.domNode.classList.remove("docs-side"),this.editor.setAriaOptions({activeDescendant:ri(Ne)})}).catch(A.f)),this._onDidFocus.fire({item:Ee,index:Ne,model:this._completionModel})}_setState(Ge){if(this._state===Ge)return;this._state=Ge,this.element.domNode.classList.toggle("frozen",Ge===4),this.element.domNode.classList.remove("message");switch(Ge){case 0:it.K(this._messageElement,this._listElement,this._status.element),this._details.hide(!0),this._status.hide(),this._contentWidget.hide(),this._ctxSuggestWidgetVisible.reset(),this._ctxSuggestWidgetMultipleSuggestions.reset(),this._showTimeout.cancel(),this.element.domNode.classList.remove("visible"),this._list.splice(0,this._list.length),this._focusedItem=void 0,this._cappedHeight=void 0,this._explainMode=!1;break;case 1:this.element.domNode.classList.add("message"),this._messageElement.textContent=gt.LOADING_MESSAGE,it.K(this._listElement,this._status.element),it.W(this._messageElement),this._details.hide(),this._show(),this._focusedItem=void 0;break;case 2:this.element.domNode.classList.add("message"),this._messageElement.textContent=gt.NO_SUGGESTIONS_MESSAGE,it.K(this._listElement,this._status.element),it.W(this._messageElement),this._details.hide(),this._show(),this._focusedItem=void 0;break;case 3:it.K(this._messageElement),it.W(this._listElement,this._status.element),this._show();break;case 4:it.K(this._messageElement),it.W(this._listElement,this._status.element),this._show();break;case 5:it.K(this._messageElement),it.W(this._listElement,this._status.element),this._details.show(),this._show();break}}_show(){this._status.show(),this._contentWidget.show(),this._layout(this._persistedSize.restore()),this._ctxSuggestWidgetVisible.set(!0),this._showTimeout.cancelAndSet(()=>{this.element.domNode.classList.add("visible"),this._onDidShow.fire(this)},100)}showTriggered(Ge,$){if(this._state!==0)return;this._contentWidget.setPosition(this.editor.getPosition()),this._isAuto=!!Ge,this._isAuto||(this._loadingTimeout=Object(x.i)(()=>this._setState(1),$))}showSuggestions(Ge,$,Ee,Ne){var He,at;if(this._contentWidget.setPosition(this.editor.getPosition()),(He=this._loadingTimeout)===null||He===void 0||He.dispose(),(at=this._currentSuggestionDetails)===null||at===void 0||at.cancel(),this._currentSuggestionDetails=void 0,this._completionModel!==Ge&&(this._completionModel=Ge),Ee&&this._state!==2&&this._state!==0){this._setState(4);return}const vt=this._completionModel.items.length,Xt=vt===0;if(this._ctxSuggestWidgetMultipleSuggestions.set(vt>1),Xt){this._setState(Ne?0:2),this._completionModel=void 0;return}this._focusedItem=void 0,this._list.splice(0,this._list.length,this._completionModel.items),this._setState(Ee?4:3),this._list.reveal($,0),this._list.setFocus([$]),this._layout(this.element.size),this._detailsBorderColor&&(this._details.widget.domNode.style.borderColor=this._detailsBorderColor)}selectNextPage(){switch(this._state){case 0:return!1;case 5:return this._details.widget.pageDown(),!0;case 1:return!this._isAuto;default:return this._list.focusNextPage(),!0}}selectNext(){switch(this._state){case 0:return!1;case 1:return!this._isAuto;default:return this._list.focusNext(1,!0),!0}}selectLast(){switch(this._state){case 0:return!1;case 5:return this._details.widget.scrollBottom(),!0;case 1:return!this._isAuto;default:return this._list.focusLast(),!0}}selectPreviousPage(){switch(this._state){case 0:return!1;case 5:return this._details.widget.pageUp(),!0;case 1:return!this._isAuto;default:return this._list.focusPreviousPage(),!0}}selectPrevious(){switch(this._state){case 0:return!1;case 1:return!this._isAuto;default:return this._list.focusPrevious(1,!0),!1}}selectFirst(){switch(this._state){case 0:return!1;case 5:return this._details.widget.scrollTop(),!0;case 1:return!this._isAuto;default:return this._list.focusFirst(),!0}}getFocusedItem(){return this._state!==0&&this._state!==2&&this._state!==1&&this._completionModel?{item:this._list.getFocusedElements()[0],index:this._list.getFocus()[0],model:this._completionModel}:void 0}toggleDetailsFocus(){this._state===5?(this._setState(3),this._detailsBorderColor&&(this._details.widget.domNode.style.borderColor=this._detailsBorderColor)):this._state===3&&this._isDetailsVisible()&&(this._setState(5),this._detailsFocusBorderColor&&(this._details.widget.domNode.style.borderColor=this._detailsFocusBorderColor))}toggleDetails(){this._isDetailsVisible()?(this._ctxSuggestWidgetDetailsVisible.set(!1),this._setDetailsVisible(!1),this._details.hide(),this.element.domNode.classList.remove("shows-details")):(_o(this._list.getFocusedElements()[0])||this._explainMode)&&(this._state===3||this._state===5||this._state===4)&&(this._ctxSuggestWidgetDetailsVisible.set(!0),this._setDetailsVisible(!0),this.showDetails(!1))}showDetails(Ge){this._details.show(),Ge?this._details.widget.renderLoading():this._details.widget.renderItem(this._list.getFocusedElements()[0],this._explainMode),this._positionDetails(),this.editor.focus(),this.element.domNode.classList.add("shows-details")}toggleExplainMode(){this._list.getFocusedElements()[0]&&(this._explainMode=!this._explainMode,this._isDetailsVisible()?this.showDetails(!1):this.toggleDetails())}resetPersistedSize(){this._persistedSize.reset()}hideWidget(){var Ge;(Ge=this._loadingTimeout)===null||Ge===void 0||Ge.dispose(),this._setState(0),this._onDidHide.fire(this),this.element.clearSashHoverState();const $=this._persistedSize.restore(),Ee=Math.ceil(this.getLayoutInfo().itemHeight*4.3);$&&$.height<Ee&&this._persistedSize.store($.with(void 0,Ee))}isFrozen(){return this._state===4}_afterRender(Ge){if(Ge===null){this._isDetailsVisible()&&this._details.hide();return}if(this._state===2||this._state===1)return;this._isDetailsVisible()&&this._details.show(),this._positionDetails()}_layout(Ge){var $,Ee,Ne;if(!this.editor.hasModel())return;if(!this.editor.getDomNode())return;const He=it.z(document.body),at=this.getLayoutInfo();Ge||(Ge=at.defaultSize);let vt=Ge.height,Xt=Ge.width;if(this._status.element.style.lineHeight=`${at.itemHeight}px`,this._state===2||this._state===1)vt=at.itemHeight+at.borderHeight,Xt=at.defaultSize.width/2,this.element.enableSashes(!1,!1,!1,!1),this.element.minSize=this.element.maxSize=new it.b(Xt,vt),this._contentWidget.setPreference(2);else{const Bt=He.width-at.borderHeight-2*at.horizontalPadding;Xt>Bt&&(Xt=Bt);const Kt=this._completionModel?this._completionModel.stats.pLabelLen*at.typicalHalfwidthCharacterWidth:Xt,ro=at.statusBarHeight+this._list.contentHeight+at.borderHeight,F=at.itemHeight+at.statusBarHeight,te=it.D(this.editor.getDomNode()),Ae=this.editor.getScrolledVisiblePosition(this.editor.getPosition()),Ye=te.top+Ae.top+Ae.height,pt=Math.min(He.height-Ye-at.verticalPadding,ro),Mt=te.top+Ae.top-at.verticalPadding,jt=Math.min(Mt,ro);let $t=Math.min(Math.max(jt,pt)+at.borderHeight,ro);vt===(($=this._cappedHeight)===null||$===void 0?void 0:$.capped)&&(vt=this._cappedHeight.wanted),vt<F&&(vt=F),vt>$t&&(vt=$t);const uo=150;vt>pt||this._forceRenderingAbove&&Mt>uo?(this._contentWidget.setPreference(1),this.element.enableSashes(!0,!0,!1,!1),$t=jt):(this._contentWidget.setPreference(2),this.element.enableSashes(!1,!0,!0,!1),$t=pt),this.element.preferredSize=new it.b(Kt,at.defaultSize.height),this.element.maxSize=new it.b(Bt,$t),this.element.minSize=new it.b(220,F),this._cappedHeight=vt===ro?{wanted:(Ne=(Ee=this._cappedHeight)===null||Ee===void 0?void 0:Ee.wanted)!==null&&Ne!==void 0?Ne:Ge.height,capped:vt}:void 0}this._resize(Xt,vt)}_resize(Ge,$){const{width:Ee,height:Ne}=this.element.maxSize;Ge=Math.min(Ee,Ge),$=Math.min(Ne,$);const{statusBarHeight:He}=this.getLayoutInfo();this._list.layout($-He,Ge),this._listElement.style.height=`${$-He}px`,this.element.layout($,Ge),this._contentWidget.layout(),this._positionDetails()}_positionDetails(){this._isDetailsVisible()&&this._details.placeAtAnchor(this.element.domNode)}getLayoutInfo(){const Ge=this.editor.getOption(43),$=Object(Rt.b)(this.editor.getOption(107)||Ge.lineHeight,8,1e3),Ee=!this.editor.getOption(105).showStatusBar||this._state===2||this._state===1?0:$,Ne=this._details.widget.borderWidth,He=2*Ne;return{itemHeight:$,statusBarHeight:Ee,borderWidth:Ne,borderHeight:He,typicalHalfwidthCharacterWidth:Ge.typicalHalfwidthCharacterWidth,verticalPadding:22,horizontalPadding:14,defaultSize:new it.b(430,Ee+12*$+He)}}_isDetailsVisible(){return this._storageService.getBoolean("expandSuggestionDocs",0,!1)}_setDetailsVisible(Ge){this._storageService.store("expandSuggestionDocs",Ge,0,0)}forceRenderingAbove(){this._forceRenderingAbove||(this._forceRenderingAbove=!0,this._layout(this._persistedSize.restore()))}stopForceRenderingAbove(){this._forceRenderingAbove=!1}};Hi.LOADING_MESSAGE=G.a("suggestWidget.loading","Loading..."),Hi.NO_SUGGESTIONS_MESSAGE=G.a("suggestWidget.noSuggestions","No suggestions."),Hi=Zi([Vi(1,Q.a),Vi(2,Ce.b),Vi(3,Qe.b),Vi(4,k.a)],Hi);class Oi{constructor(gt,Ge){this._widget=gt,this._editor=Ge,this.allowEditorOverflow=!0,this.suppressMouseDown=!1,this._preferenceLocked=!1,this._added=!1,this._hidden=!1}dispose(){this._added&&(this._added=!1,this._editor.removeContentWidget(this))}getId(){return"editor.widget.suggestWidget"}getDomNode(){return this._widget.element.domNode}show(){this._hidden=!1,this._added||(this._added=!0,this._editor.addContentWidget(this))}hide(){this._hidden||(this._hidden=!0,this.layout())}layout(){this._editor.layoutContentWidget(this)}getPosition(){return this._hidden||!this._position||!this._preference?null:{position:this._position,preference:[this._preference]}}beforeRender(){const{height:gt,width:Ge}=this._widget.element.size,{borderWidth:$,horizontalPadding:Ee}=this._widget.getLayoutInfo();return new it.b(Ge+2*$+Ee,gt+2*$)}afterRender(gt){this._widget._afterRender(gt)}setPreference(gt){this._preferenceLocked||(this._preference=gt)}lockPreference(){this._preferenceLocked=!0}unlockPreference(){this._preferenceLocked=!1}setPosition(gt){this._position=gt}}Object(Qe.f)((gt,Ge)=>{const $=gt.getColor(Ji);$&&Ge.addRule(`.monaco-editor .suggest-widget .monaco-list .monaco-list-row .monaco-highlighted-label .highlight { color: ${$}; }`);const Ee=gt.getColor(ui);$&&Ge.addRule(`.monaco-editor .suggest-widget .monaco-list .monaco-list-row.focused .monaco-highlighted-label .highlight { color: ${Ee}; }`);const Ne=gt.getColor(on);Ne&&Ge.addRule(`.monaco-editor .suggest-widget, .monaco-editor .suggest-details { color: ${Ne}; }`);const He=gt.getColor(cn);He&&Ge.addRule(`.monaco-editor .suggest-widget .monaco-list .monaco-list-row.focused { color: ${He}; }`);const at=gt.getColor(Bi);at&&Ge.addRule(`.monaco-editor .suggest-widget .monaco-list .monaco-list-row.focused .codicon { color: ${at}; }`);const vt=gt.getColor(ct.Jc);vt&&Ge.addRule(`.monaco-editor .suggest-details a { color: ${vt}; }`);const Xt=gt.getColor(ct.Ic);Xt&&Ge.addRule(`.monaco-editor .suggest-details a:hover { color: ${Xt}; }`);const Bt=gt.getColor(ct.Hc);Bt&&Ge.addRule(`.monaco-editor .suggest-details code { background-color: ${Bt}; }`)});var Ii=function(gt,Ge,$,Ee){var Ne=arguments.length,He=Ne<3?Ge:Ee===null?Ee=Object.getOwnPropertyDescriptor(Ge,$):Ee,at;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")He=Reflect.decorate(gt,Ge,$,Ee);else for(var vt=gt.length-1;vt>=0;vt--)(at=gt[vt])&&(He=(Ne<3?at(He):Ne>3?at(Ge,$,He):at(Ge,$))||He);return Ne>3&&He&&Object.defineProperty(Ge,$,He),He},Qi=function(gt,Ge){return function($,Ee){Ge($,Ee,gt)}};let Li=!1;class Ui{constructor(gt,Ge){this._model=gt,this._position=Ge;const $=gt.getLineMaxColumn(Ge.lineNumber);if($!==Ge.column){const Ee=gt.getOffsetAt(Ge),Ne=gt.getPositionAt(Ee+1);this._marker=gt.deltaDecorations([],[{range:b.a.fromPositions(Ge,Ne),options:{description:"suggest-line-suffix",stickiness:1}}])}}dispose(){this._marker&&!this._model.isDisposed()&&this._model.deltaDecorations(this._marker,[])}delta(gt){if(this._model.isDisposed()||this._position.lineNumber!==gt.lineNumber)return 0;if(this._marker){const Ge=this._model.getDecorationRange(this._marker[0]),$=this._model.getOffsetAt(Ge.getStartPosition());return $-this._model.getOffsetAt(gt)}else return this._model.getLineMaxColumn(gt.lineNumber)-gt.column}}let fi=class gt{constructor(Ge,$,Ee,Ne,He,at){this._memoryService=$,this._commandService=Ee,this._contextKeyService=Ne,this._instantiationService=He,this._logService=at,this._lineSuffix=new v.d,this._toDispose=new v.b,this._selectors=new $i(Kt=>Kt.priority),this.editor=Ge,this.model=He.createInstance(ce,this.editor);const vt=Me.b.InsertMode.bindTo(Ne);vt.set(Ge.getOption(105).insertMode),this.model.onDidTrigger(()=>vt.set(Ge.getOption(105).insertMode)),this.widget=this._toDispose.add(new x.b(()=>{const Kt=this._instantiationService.createInstance(Hi,this.editor);this._toDispose.add(Kt),this._toDispose.add(Kt.onDidSelect(Ye=>this._insertSuggestion(Ye,0),this));const ro=new Be(this.editor,Kt,Ye=>this._insertSuggestion(Ye,2));this._toDispose.add(ro),this._toDispose.add(this.model.onDidSuggest(Ye=>{Ye.completionModel.items.length===0&&ro.reset()}));const F=Me.b.MakesTextEdit.bindTo(this._contextKeyService),te=Me.b.HasInsertAndReplaceRange.bindTo(this._contextKeyService),Ae=Me.b.CanResolve.bindTo(this._contextKeyService);return this._toDispose.add(Object(v.i)(()=>{F.reset(),te.reset(),Ae.reset()})),this._toDispose.add(Kt.onDidFocus(({item:Ye})=>{const pt=this.editor.getPosition(),Mt=Ye.editStart.column,jt=pt.column;let $t=!0;if(this.editor.getOption(1)==="smart"&&this.model.state===2&&!Ye.completion.additionalTextEdits&&!(Ye.completion.insertTextRules&4)&&jt-Mt===Ye.completion.insertText.length){const uo=this.editor.getModel().getValueInRange({startLineNumber:pt.lineNumber,startColumn:Mt,endLineNumber:pt.lineNumber,endColumn:jt});$t=uo!==Ye.completion.insertText}F.set($t),te.set(!w.a.equals(Ye.editInsertEnd,Ye.editReplaceEnd)),Ae.set(Boolean(Ye.provider.resolveCompletionItem)||Boolean(Ye.completion.documentation)||Ye.completion.detail!==Ye.completion.label)})),this._toDispose.add(Kt.onDetailsKeyDown(Ye=>{if(Ye.toKeybinding().equals(new I.d(!0,!1,!1,!1,33))||C.f&&Ye.toKeybinding().equals(new I.d(!1,!1,!1,!0,33))){Ye.stopPropagation();return}Ye.toKeybinding().isModifierKey()||this.editor.focus()})),Kt})),this._overtypingCapturer=this._toDispose.add(new x.b(()=>this._toDispose.add(new Ve(this.editor,this.model)))),this._alternatives=this._toDispose.add(new x.b(()=>this._toDispose.add(new fe(this.editor,this._contextKeyService)))),this._toDispose.add(He.createInstance(V,Ge)),this._toDispose.add(this.model.onDidTrigger(Kt=>{this.widget.value.showTriggered(Kt.auto,Kt.shy?250:50),this._lineSuffix.value=new Ui(this.editor.getModel(),Kt.position)})),this._toDispose.add(this.model.onDidSuggest(Kt=>{if(!Kt.shy){let ro=-1;for(const F of this._selectors.itemsOrderedByPriorityDesc)if(ro=F.select(this.editor.getModel(),this.editor.getPosition(),Kt.completionModel.items),ro!==-1)break;ro===-1&&(ro=this._memoryService.select(this.editor.getModel(),this.editor.getPosition(),Kt.completionModel.items)),this.widget.value.showSuggestions(Kt.completionModel,ro,Kt.isFrozen,Kt.auto)}})),this._toDispose.add(this.model.onDidCancel(Kt=>{Kt.retrigger||this.widget.value.hideWidget()})),this._toDispose.add(this.editor.onDidBlurEditorWidget(()=>{Li||(this.model.cancel(),this.model.clear())}));let Xt=Me.b.AcceptSuggestionsOnEnter.bindTo(Ne),Bt=()=>{const Kt=this.editor.getOption(1);Xt.set(Kt==="on"||Kt==="smart")};this._toDispose.add(this.editor.onDidChangeConfiguration(()=>Bt())),Bt()}static get(Ge){return Ge.getContribution(gt.ID)}dispose(){this._alternatives.dispose(),this._toDispose.dispose(),this.widget.dispose(),this.model.dispose(),this._lineSuffix.dispose()}_insertSuggestion(Ge,$){if(!Ge||!Ge.item){this._alternatives.value.reset(),this.model.cancel(),this.model.clear();return}if(!this.editor.hasModel())return;const Ee=this.editor.getModel(),Ne=Ee.getAlternativeVersionId(),{item:He}=Ge,at=[],vt=new R.b;$&1||this.editor.pushUndoStop();const Xt=this.getOverwriteInfo(He,Boolean($&8));if(this._memoryService.memorize(Ee,this.editor.getPosition(),He),Array.isArray(He.completion.additionalTextEdits)){const Kt=D.c.capture(this.editor);this.editor.executeEdits("suggestController.additionalTextEdits.sync",He.completion.additionalTextEdits.map(ro=>r.a.replace(b.a.lift(ro.range),ro.text))),Kt.restoreRelativeVerticalPositionOfCursor(this.editor)}else if(!He.isResolved){const Kt=new m.a(!0);let ro;const F=Ee.onDidChangeContent(pt=>{if(pt.isFlush){vt.cancel(),F.dispose();return}for(let Mt of pt.changes){const jt=b.a.getEndPosition(Mt.range);(!ro||w.a.isBefore(jt,ro))&&(ro=jt)}});let te=$;$|=2;let Ae=!1,Ye=this.editor.onWillType(()=>{Ye.dispose(),Ae=!0,te&2||this.editor.pushUndoStop()});at.push(He.resolve(vt.token).then(()=>{if(!He.completion.additionalTextEdits||vt.token.isCancellationRequested)return!1;if(ro&&He.completion.additionalTextEdits.some(Mt=>w.a.isBefore(ro,b.a.getStartPosition(Mt.range))))return!1;Ae&&this.editor.pushUndoStop();const pt=D.c.capture(this.editor);return this.editor.executeEdits("suggestController.additionalTextEdits.async",He.completion.additionalTextEdits.map(Mt=>r.a.replace(b.a.lift(Mt.range),Mt.text))),pt.restoreRelativeVerticalPositionOfCursor(this.editor),(Ae||!(te&2))&&this.editor.pushUndoStop(),!0}).then(pt=>{this._logService.trace("[suggest] async resolving of edits DONE (ms, applied?)",Kt.elapsed(),pt),F.dispose(),Ye.dispose()}))}let{insertText:Bt}=He.completion;He.completion.insertTextRules&4||(Bt=p.c.escape(Bt)),c.SnippetController2.get(this.editor).insert(Bt,{overwriteBefore:Xt.overwriteBefore,overwriteAfter:Xt.overwriteAfter,undoStopBefore:!1,undoStopAfter:!1,adjustWhitespace:!(He.completion.insertTextRules&1),clipboardText:Ge.model.clipboardText,overtypingCapturer:this._overtypingCapturer.value}),$&2||this.editor.pushUndoStop(),He.completion.command?He.completion.command.id===rn.id?this.model.trigger({auto:!0,shy:!1},!0):(at.push(this._commandService.executeCommand(He.completion.command.id,...He.completion.command.arguments?[...He.completion.command.arguments]:[]).catch(A.f)),this.model.cancel()):this.model.cancel(),$&4&&this._alternatives.value.set(Ge,Kt=>{for(vt.cancel();Ee.canUndo();){Ne!==Ee.getAlternativeVersionId()&&Ee.undo(),this._insertSuggestion(Kt,1|2|($&8?8:0));break}}),this._alertCompletionItem(He),Promise.all(at).finally(()=>{this.model.clear(),vt.dispose()})}getOverwriteInfo(Ge,$){Object(d.c)(this.editor.hasModel());let Ee=this.editor.getOption(105).insertMode==="replace";$&&(Ee=!Ee);const Ne=Ge.position.column-Ge.editStart.column,He=(Ee?Ge.editReplaceEnd.column:Ge.editInsertEnd.column)-Ge.position.column,at=this.editor.getPosition().column-Ge.position.column,vt=this._lineSuffix.value?this._lineSuffix.value.delta(this.editor.getPosition()):0;return{overwriteBefore:Ne+at,overwriteAfter:He+vt}}_alertCompletionItem(Ge){if(Object(B.n)(Ge.completion.additionalTextEdits)){let $=G.a("aria.alert.snippet","Accepting '{0}' made {1} additional edits",Ge.textLabel,Ge.completion.additionalTextEdits.length);Object(g.a)($)}}triggerSuggest(Ge){this.editor.hasModel()&&(this.model.trigger({auto:!1,shy:!1},!1,Ge),this.editor.revealPosition(this.editor.getPosition(),0),this.editor.focus())}triggerSuggestAndAcceptBest(Ge){if(!this.editor.hasModel())return;const $=this.editor.getPosition(),Ee=()=>{$.equals(this.editor.getPosition())&&this._commandService.executeCommand(Ge.fallback)},Ne=He=>{if(He.completion.insertTextRules&4||He.completion.additionalTextEdits)return!0;const at=this.editor.getPosition(),vt=He.editStart.column,Xt=at.column;if(Xt-vt!==He.completion.insertText.length)return!0;const Bt=this.editor.getModel().getValueInRange({startLineNumber:at.lineNumber,startColumn:vt,endLineNumber:at.lineNumber,endColumn:Xt});return Bt!==He.completion.insertText};j.c.once(this.model.onDidTrigger)(He=>{let at=[];j.c.any(this.model.onDidTrigger,this.model.onDidCancel)(()=>{Object(v.f)(at),Ee()},void 0,at),this.model.onDidSuggest(({completionModel:vt})=>{if(Object(v.f)(at),vt.items.length===0){Ee();return}const Xt=this._memoryService.select(this.editor.getModel(),this.editor.getPosition(),vt.items),Bt=vt.items[Xt];if(!Ne(Bt)){Ee();return}this.editor.pushUndoStop(),this._insertSuggestion({index:Xt,item:Bt,model:vt},4|1|2)},void 0,at)}),this.model.trigger({auto:!1,shy:!0}),this.editor.revealPosition($,0),this.editor.focus()}acceptSelectedSuggestion(Ge,$){const Ee=this.widget.value.getFocusedItem();let Ne=0;Ge&&(Ne|=4),$&&(Ne|=8),this._insertSuggestion(Ee,Ne)}acceptNextSuggestion(){this._alternatives.value.next()}acceptPrevSuggestion(){this._alternatives.value.prev()}cancelSuggestWidget(){this.model.cancel(),this.model.clear(),this.widget.value.hideWidget()}selectNextSuggestion(){this.widget.value.selectNext()}selectNextPageSuggestion(){this.widget.value.selectNextPage()}selectLastSuggestion(){this.widget.value.selectLast()}selectPrevSuggestion(){this.widget.value.selectPrevious()}selectPrevPageSuggestion(){this.widget.value.selectPreviousPage()}selectFirstSuggestion(){this.widget.value.selectFirst()}toggleSuggestionDetails(){this.widget.value.toggleDetails()}toggleExplainMode(){this.widget.value.toggleExplainMode()}toggleSuggestionFocus(){this.widget.value.toggleDetailsFocus()}resetWidgetSize(){this.widget.value.resetPersistedSize()}forceRenderingAbove(){this.widget.value.forceRenderingAbove()}stopForceRenderingAbove(){if(!this.widget.isInitialized)return;this.widget.value.stopForceRenderingAbove()}registerSelector(Ge){return this._selectors.register(Ge)}};fi.ID="editor.contrib.suggestController",fi=Ii([Qi(1,_e),Qi(2,pe.b),Qi(3,Ce.b),Qi(4,k.a),Qi(5,Ie.b)],fi);class $i{constructor(gt){this.prioritySelector=gt,this._items=new Array}register(gt){if(this._items.indexOf(gt)!==-1)throw new Error("Value is already registered");return this._items.push(gt),this._items.sort((Ge,$)=>this.prioritySelector($)-this.prioritySelector(Ge)),{dispose:()=>{const Ge=this._items.indexOf(gt);Ge>=0&&this._items.splice(Ge,1)}}}get itemsOrderedByPriorityDesc(){return this._items}}class rn extends L.b{constructor(){super({id:rn.id,label:G.a("suggest.trigger.label","Trigger Suggest"),alias:"Trigger Suggest",precondition:Ce.a.and(u.a.writable,u.a.hasCompletionItemProvider),kbOpts:{kbExpr:u.a.textInputFocus,primary:2048|10,secondary:[2048|39],mac:{primary:256|10,secondary:[512|9,2048|39]},weight:100}})}run(gt,Ge){const $=fi.get(Ge);if(!$)return;$.triggerSuggest()}}rn.id="editor.action.triggerSuggest",Object(L.l)(fi.ID,fi),Object(L.j)(rn);const _i=100+90,Pi=L.c.bindToContribution(fi.get);Object(L.k)(new Pi({id:"acceptSelectedSuggestion",precondition:Me.b.Visible,handler(gt){gt.acceptSelectedSuggestion(!0,!1)}})),Te.a.registerKeybindingRule({id:"acceptSelectedSuggestion",when:Ce.a.and(Me.b.Visible,u.a.textInputFocus),primary:2,weight:_i}),Te.a.registerKeybindingRule({id:"acceptSelectedSuggestion",when:Ce.a.and(Me.b.Visible,u.a.textInputFocus,Me.b.AcceptSuggestionsOnEnter,Me.b.MakesTextEdit),primary:3,weight:_i}),ee.d.appendMenuItem(Me.g,{command:{id:"acceptSelectedSuggestion",title:G.a("accept.insert","Insert")},group:"left",order:1,when:Me.b.HasInsertAndReplaceRange.toNegated()}),ee.d.appendMenuItem(Me.g,{command:{id:"acceptSelectedSuggestion",title:G.a("accept.insert","Insert")},group:"left",order:1,when:Ce.a.and(Me.b.HasInsertAndReplaceRange,Me.b.InsertMode.isEqualTo("insert"))}),ee.d.appendMenuItem(Me.g,{command:{id:"acceptSelectedSuggestion",title:G.a("accept.replace","Replace")},group:"left",order:1,when:Ce.a.and(Me.b.HasInsertAndReplaceRange,Me.b.InsertMode.isEqualTo("replace"))}),Object(L.k)(new Pi({id:"acceptAlternativeSelectedSuggestion",precondition:Ce.a.and(Me.b.Visible,u.a.textInputFocus),kbOpts:{weight:_i,kbExpr:u.a.textInputFocus,primary:1024|3,secondary:[1024|2]},handler(gt){gt.acceptSelectedSuggestion(!1,!0)},menuOpts:[{menuId:Me.g,group:"left",order:2,when:Ce.a.and(Me.b.HasInsertAndReplaceRange,Me.b.InsertMode.isEqualTo("insert")),title:G.a("accept.replace","Replace")},{menuId:Me.g,group:"left",order:2,when:Ce.a.and(Me.b.HasInsertAndReplaceRange,Me.b.InsertMode.isEqualTo("replace")),title:G.a("accept.insert","Insert")}]})),pe.a.registerCommandAlias("acceptSelectedSuggestionOnEnter","acceptSelectedSuggestion"),Object(L.k)(new Pi({id:"hideSuggestWidget",precondition:Me.b.Visible,handler:gt=>gt.cancelSuggestWidget(),kbOpts:{weight:_i,kbExpr:u.a.textInputFocus,primary:9,secondary:[1024|9]}})),Object(L.k)(new Pi({id:"selectNextSuggestion",precondition:Ce.a.and(Me.b.Visible,Me.b.MultipleSuggestions),handler:gt=>gt.selectNextSuggestion(),kbOpts:{weight:_i,kbExpr:u.a.textInputFocus,primary:18,secondary:[2048|18],mac:{primary:18,secondary:[2048|18,256|44]}}})),Object(L.k)(new Pi({id:"selectNextPageSuggestion",precondition:Ce.a.and(Me.b.Visible,Me.b.MultipleSuggestions),handler:gt=>gt.selectNextPageSuggestion(),kbOpts:{weight:_i,kbExpr:u.a.textInputFocus,primary:12,secondary:[2048|12]}})),Object(L.k)(new Pi({id:"selectLastSuggestion",precondition:Ce.a.and(Me.b.Visible,Me.b.MultipleSuggestions),handler:gt=>gt.selectLastSuggestion()})),Object(L.k)(new Pi({id:"selectPrevSuggestion",precondition:Ce.a.and(Me.b.Visible,Me.b.MultipleSuggestions),handler:gt=>gt.selectPrevSuggestion(),kbOpts:{weight:_i,kbExpr:u.a.textInputFocus,primary:16,secondary:[2048|16],mac:{primary:16,secondary:[2048|16,256|46]}}})),Object(L.k)(new Pi({id:"selectPrevPageSuggestion",precondition:Ce.a.and(Me.b.Visible,Me.b.MultipleSuggestions),handler:gt=>gt.selectPrevPageSuggestion(),kbOpts:{weight:_i,kbExpr:u.a.textInputFocus,primary:11,secondary:[2048|11]}})),Object(L.k)(new Pi({id:"selectFirstSuggestion",precondition:Ce.a.and(Me.b.Visible,Me.b.MultipleSuggestions),handler:gt=>gt.selectFirstSuggestion()})),Object(L.k)(new Pi({id:"toggleSuggestionDetails",precondition:Me.b.Visible,handler:gt=>gt.toggleSuggestionDetails(),kbOpts:{weight:_i,kbExpr:u.a.textInputFocus,primary:2048|10,secondary:[2048|39],mac:{primary:256|10,secondary:[2048|39]}},menuOpts:[{menuId:Me.g,group:"right",order:1,when:Ce.a.and(Me.b.DetailsVisible,Me.b.CanResolve),title:G.a("detail.more","show less")},{menuId:Me.g,group:"right",order:1,when:Ce.a.and(Me.b.DetailsVisible.toNegated(),Me.b.CanResolve),title:G.a("detail.less","show more")}]})),Object(L.k)(new Pi({id:"toggleExplainMode",precondition:Me.b.Visible,handler:gt=>gt.toggleExplainMode(),kbOpts:{weight:100,primary:2048|85}})),Object(L.k)(new Pi({id:"toggleSuggestionFocus",precondition:Me.b.Visible,handler:gt=>gt.toggleSuggestionFocus(),kbOpts:{weight:_i,kbExpr:u.a.textInputFocus,primary:2048|512|10,mac:{primary:256|512|10}}})),Object(L.k)(new Pi({id:"insertBestCompletion",precondition:Ce.a.and(u.a.textInputFocus,Ce.a.equals("config.editor.tabCompletion","on"),V.AtEnd,Me.b.Visible.toNegated(),fe.OtherSuggestions.toNegated(),c.SnippetController2.InSnippetMode.toNegated()),handler:(gt,Ge)=>{gt.triggerSuggestAndAcceptBest(Object(d.k)(Ge)?Object.assign({fallback:"tab"},Ge):{fallback:"tab"})},kbOpts:{weight:_i,primary:2}})),Object(L.k)(new Pi({id:"insertNextSuggestion",precondition:Ce.a.and(u.a.textInputFocus,Ce.a.equals("config.editor.tabCompletion","on"),fe.OtherSuggestions,Me.b.Visible.toNegated(),c.SnippetController2.InSnippetMode.toNegated()),handler:gt=>gt.acceptNextSuggestion(),kbOpts:{weight:_i,kbExpr:u.a.textInputFocus,primary:2}})),Object(L.k)(new Pi({id:"insertPrevSuggestion",precondition:Ce.a.and(u.a.textInputFocus,Ce.a.equals("config.editor.tabCompletion","on"),fe.OtherSuggestions,Me.b.Visible.toNegated(),c.SnippetController2.InSnippetMode.toNegated()),handler:gt=>gt.acceptPrevSuggestion(),kbOpts:{weight:_i,kbExpr:u.a.textInputFocus,primary:1024|2}})),Object(L.j)(class extends L.b{constructor(){super({id:"editor.action.resetSuggestSize",label:G.a("suggest.reset.label","Reset Suggest Widget Size"),alias:"Reset Suggest Widget Size",precondition:void 0})}run(gt,Ge){fi.get(Ge).resetWidgetSize()}})},eq1K:function(mt,M,t){},erNZ:function(mt,M,t){"use strict";t.d(M,"c",function(){return C}),t.d(M,"d",function(){return m}),t.d(M,"a",function(){return d}),t.d(M,"b",function(){return D});var g=t("N0LK"),B=t("MNsG"),x=t("HpOR");let R;function A(){return R||(R=new TextDecoder("UTF-16LE")),R}let j;function I(){return j||(j=new TextDecoder("UTF-16BE")),j}let v;function C(){return v||(v=B.e()?A():I()),v}const m=typeof TextDecoder!="undefined";let d,D;m?(d=u=>new w(u),D=L):(d=u=>new b,D=r);function L(u,c,p){const S=new Uint16Array(u.buffer,c,p);return p>0&&(S[0]===65279||S[0]===65534)?r(u,c,p):A().decode(S)}function r(u,c,p){let S=[],E=0;for(let y=0;y<p;y++){const O=x.b(u,c);c+=2,S[E++]=String.fromCharCode(O)}return S.join("")}class w{constructor(u){this._capacity=u|0,this._buffer=new Uint16Array(this._capacity),this._completedStrings=null,this._bufferLength=0}reset(){this._completedStrings=null,this._bufferLength=0}build(){return this._completedStrings!==null?(this._flushBuffer(),this._completedStrings.join("")):this._buildBuffer()}_buildBuffer(){if(this._bufferLength===0)return"";const u=new Uint16Array(this._buffer.buffer,0,this._bufferLength);return C().decode(u)}_flushBuffer(){const u=this._buildBuffer();this._bufferLength=0,this._completedStrings===null?this._completedStrings=[u]:this._completedStrings[this._completedStrings.length]=u}write1(u){const c=this._capacity-this._bufferLength;c<=1&&((c===0||g.E(u))&&this._flushBuffer()),this._buffer[this._bufferLength++]=u}appendASCII(u){this._bufferLength===this._capacity&&this._flushBuffer(),this._buffer[this._bufferLength++]=u}appendASCIIString(u){const c=u.length;if(this._bufferLength+c>=this._capacity){this._flushBuffer(),this._completedStrings[this._completedStrings.length]=u;return}for(let p=0;p<c;p++)this._buffer[this._bufferLength++]=u.charCodeAt(p)}}class b{constructor(){this._pieces=[],this._piecesLen=0}reset(){this._pieces=[],this._piecesLen=0}build(){return this._pieces.join("")}write1(u){this._pieces[this._piecesLen++]=String.fromCharCode(u)}appendASCII(u){this._pieces[this._piecesLen++]=String.fromCharCode(u)}appendASCIIString(u){this._pieces[this._piecesLen++]=u}}},fD5p:function(mt,M,t){"use strict";t.r(M),t.d(M,"ContextMenuController",function(){return w});var g=t("EffR"),B=t("7/Ik"),x=t("8HAY"),R=t("pmY6"),A=t("MNsG"),j=t("sswD"),I=t("wQH0"),v=t("3/fG"),C=t("fjLI"),m=t("T8No"),d=t("Uzvx"),D=t("bexQ"),L=function(u,c,p,S){var E=arguments.length,y=E<3?c:S===null?S=Object.getOwnPropertyDescriptor(c,p):S,O;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")y=Reflect.decorate(u,c,p,S);else for(var k=u.length-1;k>=0;k--)(O=u[k])&&(y=(E<3?O(y):E>3?O(c,p,y):O(c,p))||y);return E>3&&y&&Object.defineProperty(c,p,y),y},r=function(u,c){return function(p,S){c(p,S,u)}};let w=class u{constructor(c,p,S,E,y,O){this._contextMenuService=p,this._contextViewService=S,this._contextKeyService=E,this._keybindingService=y,this._menuService=O,this._toDispose=new R.b,this._contextMenuIsBeingShownCount=0,this._editor=c,this._toDispose.add(this._editor.onContextMenu(k=>this._onContextMenu(k))),this._toDispose.add(this._editor.onMouseWheel(k=>{if(this._contextMenuIsBeingShownCount>0){const Q=this._contextViewService.getContextViewElement(),q=k.srcElement;q.shadowRoot&&g.F(Q)===q.shadowRoot||this._contextViewService.hideContextView()}})),this._toDispose.add(this._editor.onKeyDown(k=>{k.keyCode===58&&(k.preventDefault(),k.stopPropagation(),this.showContextMenu())}))}static get(c){return c.getContribution(u.ID)}_onContextMenu(c){if(!this._editor.hasModel())return;if(!this._editor.getOption(20)){this._editor.focus(),c.target.position&&!this._editor.getSelection().containsPosition(c.target.position)&&this._editor.setPosition(c.target.position);return}if(c.target.type===12)return;if(c.event.preventDefault(),c.event.stopPropagation(),c.target.type!==6&&c.target.type!==7&&c.target.type!==1)return;if(this._editor.focus(),c.target.position){let S=!1;for(const E of this._editor.getSelections())if(E.containsPosition(c.target.position)){S=!0;break}S||this._editor.setPosition(c.target.position)}let p=null;c.target.type!==1&&(p={x:c.event.posx-1,width:2,y:c.event.posy-1,height:2}),this.showContextMenu(p)}showContextMenu(c){if(!this._editor.getOption(20))return;if(!this._editor.hasModel())return;if(!this._contextMenuService){this._editor.focus();return}const p=this._getMenuActions(this._editor.getModel(),this._editor.isSimpleWidget?C.b.SimpleEditorContext:C.b.EditorContext);p.length>0&&this._doShowContextMenu(p,c)}_getMenuActions(c,p){const S=[],E=this._menuService.createMenu(p,this._contextKeyService),y=E.getActions({arg:c.uri});E.dispose();for(let O of y){const[,k]=O;let Q=0;for(const q of k)if(q instanceof C.e){const z=this._getMenuActions(c,q.item.submenu);z.length>0&&(S.push(new x.e(q.id,q.label,z)),Q++)}else S.push(q),Q++;Q&&S.push(new x.d)}return S.length&&S.pop(),S}_doShowContextMenu(c,p=null){if(!this._editor.hasModel())return;const S=this._editor.getOption(52);if(this._editor.updateOptions({hover:{enabled:!1}}),!p){this._editor.revealPosition(this._editor.getPosition(),1),this._editor.render();const y=this._editor.getScrolledVisiblePosition(this._editor.getPosition()),O=g.D(this._editor.getDomNode()),k=O.left+y.left,Q=O.top+y.top+y.height;p={x:k,y:Q}}const E=this._editor.getOption(113)&&!A.c;this._contextMenuIsBeingShownCount++,this._contextMenuService.showContextMenu({domForShadowRoot:E?this._editor.getDomNode():void 0,getAnchor:()=>p,getActions:()=>c,getActionViewItem:y=>{const O=this._keybindingFor(y);if(O)return new B.a(y,y,{label:!0,keybinding:O.getLabel(),isMenu:!0});const k=y;return typeof k.getActionViewItem=="function"?k.getActionViewItem():new B.a(y,y,{icon:!0,label:!0,isMenu:!0})},getKeyBinding:y=>this._keybindingFor(y),onHide:y=>{this._contextMenuIsBeingShownCount--,this._editor.focus(),this._editor.updateOptions({hover:S})}})}_keybindingFor(c){return this._keybindingService.lookupKeybinding(c.id)}dispose(){this._contextMenuIsBeingShownCount>0&&this._contextViewService.hideContextView(),this._toDispose.dispose()}};w.ID="editor.contrib.contextmenu",w=L([r(1,d.a),r(2,d.b),r(3,m.b),r(4,D.a),r(5,C.a)],w);class b extends j.b{constructor(){super({id:"editor.action.showContextMenu",label:v.a("action.showContextMenu.label","Show Editor Context Menu"),alias:"Show Editor Context Menu",precondition:void 0,kbOpts:{kbExpr:I.a.textInputFocus,primary:1024|68,weight:100}})}run(u,c){let p=w.get(c);p.showContextMenu()}}Object(j.l)(w.ID,w),Object(j.j)(b)},fdyd:function(mt,M,t){"use strict";t.d(M,"a",function(){return R});var g=t("EffR"),B=t("Vhoy");const x=new RegExp(`(\\\\)?\\$\\((${B.a.iconNameExpression}(?:${B.a.iconModifierExpression})?)\\)`,"g");function R(j){const I=new Array;let v,C=0,m=0;for(;(v=x.exec(j))!==null;){m=v.index||0,I.push(j.substring(C,m)),C=(v.index||0)+v[0].length;const[,d,D]=v;I.push(d?`$(${D})`:A({id:D}))}return C<j.length&&I.push(j.substring(C)),I}function A(j){const I=g.a("span");return I.classList.add(...B.a.asClassNameArray(j)),I}},feEw:function(mt,M,t){"use strict";t.d(M,"a",function(){return k}),t.d(M,"b",function(){return re});var g=t("D3Dy"),B=t("ZQ78"),x=t("EffR"),R=t("4y0V"),A=t("pg8w"),j=t("GJhM"),I=t("6OMU"),v=t("X+cX"),C=t("ZCR3"),m=t("MI8n"),d=t("pmY6"),D=t("qj0h"),L=t("nuFA"),r=t("QuOb");function w(Z,ne){const le=[];for(let _e of ne){if(Z.start>=_e.range.end)continue;if(Z.end<_e.range.start)break;const Ce=L.a.intersect(Z,_e.range);if(L.a.isEmpty(Ce))continue;le.push({range:Ce,size:_e.size})}return le}function b({start:Z,end:ne},le){return{start:Z+le,end:ne+le}}function u(Z){const ne=[];let le=null;for(let _e of Z){const Ce=_e.range.start,oe=_e.range.end,ae=_e.size;if(le&&ae===le.size){le.range.end=oe;continue}le={range:{start:Ce,end:oe},size:ae},ne.push(le)}return ne}function c(...Z){return u(Z.reduce((ne,le)=>ne.concat(le),[]))}class p{constructor(){this.groups=[],this._size=0}splice(Z,ne,le=[]){const _e=le.length-ne,Ce=w({start:0,end:Z},this.groups),oe=w({start:Z+ne,end:Number.POSITIVE_INFINITY},this.groups).map(V=>({range:b(V.range,_e),size:V.size})),ae=le.map((V,G)=>({range:{start:Z+G,end:Z+G+1},size:V.size}));this.groups=c(Ce,ae,oe),this._size=this.groups.reduce((V,G)=>V+G.size*(G.range.end-G.range.start),0)}get count(){const Z=this.groups.length;return Z?this.groups[Z-1].range.end:0}get size(){return this._size}indexAt(Z){if(Z<0)return-1;let ne=0,le=0;for(let _e of this.groups){const Ce=_e.range.end-_e.range.start,oe=le+Ce*_e.size;if(Z<oe)return ne+Math.floor((Z-le)/_e.size);ne+=Ce,le=oe}return ne}indexAfter(Z){return Math.min(this.indexAt(Z)+1,this.count)}positionAt(Z){if(Z<0)return-1;let ne=0,le=0;for(let _e of this.groups){const Ce=_e.range.end-_e.range.start,oe=le+Ce;if(Z<oe)return ne+(Z-le)*_e.size;ne+=Ce*_e.size,le=oe}return-1}}function S(Z){try{Z.parentElement&&Z.parentElement.removeChild(Z)}catch(ne){}}class E{constructor(Z){this.renderers=Z,this.cache=new Map}alloc(Z){let ne=this.getTemplateCache(Z).pop();if(!ne){const le=Object(x.a)(".monaco-list-row"),_e=this.getRenderer(Z),Ce=_e.renderTemplate(le);ne={domNode:le,templateId:Z,templateData:Ce}}return ne}release(Z){if(!Z)return;this.releaseRow(Z)}releaseRow(Z){const{domNode:ne,templateId:le}=Z;ne&&(ne.classList.remove("scrolling"),S(ne));const _e=this.getTemplateCache(le);_e.push(Z)}getTemplateCache(Z){let ne=this.cache.get(Z);return ne||(ne=[],this.cache.set(Z,ne)),ne}dispose(){this.cache.forEach((Z,ne)=>{for(const le of Z){const _e=this.getRenderer(ne);_e.disposeTemplate(le.templateData),le.templateData=null}}),this.cache.clear()}getRenderer(Z){const ne=this.renderers.get(Z);if(!ne)throw new Error(`No renderer found for ${Z}`);return ne}}var y=function(Z,ne,le,_e){var Ce=arguments.length,oe=Ce<3?ne:_e===null?_e=Object.getOwnPropertyDescriptor(ne,le):_e,ae;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")oe=Reflect.decorate(Z,ne,le,_e);else for(var V=Z.length-1;V>=0;V--)(ae=Z[V])&&(oe=(Ce<3?ae(oe):Ce>3?ae(ne,le,oe):ae(ne,le))||oe);return Ce>3&&oe&&Object.defineProperty(ne,le,oe),oe};const O={useShadows:!0,verticalScrollMode:1,setRowLineHeight:!0,setRowHeight:!0,supportDynamicHeights:!1,dnd:{getDragElements(Z){return[Z]},getDragURI(){return null},onDragStart(){},onDragOver(){return!1},drop(){}},horizontalScrolling:!1,transformOptimization:!0,alwaysConsumeMouseWheel:!0};class k{constructor(Z){this.elements=Z}update(){}getData(){return this.elements}}class Q{constructor(Z){this.elements=Z}update(){}getData(){return this.elements}}class q{constructor(){this.types=[],this.files=[]}update(Z){if(Z.types&&this.types.splice(0,this.types.length,...Z.types),Z.files){this.files.splice(0,this.files.length);for(let ne=0;ne<Z.files.length;ne++){const le=Z.files.item(ne);le&&(le.size||le.type)&&this.files.push(le)}}}getData(){return{types:this.types,files:this.files}}}function z(Z,ne){return Array.isArray(Z)&&Array.isArray(ne)?Object(I.g)(Z,ne):Z===ne}class J{constructor(Z){(Z==null?void 0:Z.getSetSize)?this.getSetSize=Z.getSetSize.bind(Z):this.getSetSize=(ne,le,_e)=>_e,(Z==null?void 0:Z.getPosInSet)?this.getPosInSet=Z.getPosInSet.bind(Z):this.getPosInSet=(ne,le)=>le+1,(Z==null?void 0:Z.getRole)?this.getRole=Z.getRole.bind(Z):this.getRole=ne=>"listitem",(Z==null?void 0:Z.isChecked)?this.isChecked=Z.isChecked.bind(Z):this.isChecked=ne=>{}}}class re{constructor(Z,ne,le,_e=O){if(this.virtualDelegate=ne,this.domId=`list_id_${++re.InstanceCount}`,this.renderers=new Map,this.renderWidth=0,this._scrollHeight=0,this.scrollableElementUpdateDisposable=null,this.scrollableElementWidthDelayer=new v.a(50),this.splicing=!1,this.dragOverAnimationStopDisposable=d.a.None,this.dragOverMouseY=0,this.canDrop=!1,this.currentDragFeedbackDisposable=d.a.None,this.onDragLeaveTimeout=d.a.None,this.disposables=new d.b,this._onDidChangeContentHeight=new m.b,this._horizontalScrolling=!1,_e.horizontalScrolling&&_e.supportDynamicHeights)throw new Error("Horizontal scrolling and dynamic heights not supported simultaneously");this.items=[],this.itemId=0,this.rangeMap=new p;for(const oe of le)this.renderers.set(oe.templateId,oe);this.cache=this.disposables.add(new E(this.renderers)),this.lastRenderTop=0,this.lastRenderHeight=0,this.domNode=document.createElement("div"),this.domNode.className="monaco-list",this.domNode.classList.add(this.domId),this.domNode.tabIndex=0,this.domNode.classList.toggle("mouse-support",typeof _e.mouseSupport=="boolean"?_e.mouseSupport:!0),this._horizontalScrolling=Object(D.e)(_e,oe=>oe.horizontalScrolling,O.horizontalScrolling),this.domNode.classList.toggle("horizontal-scrolling",this._horizontalScrolling),this.additionalScrollHeight=typeof _e.additionalScrollHeight=="undefined"?0:_e.additionalScrollHeight,this.accessibilityProvider=new J(_e.accessibilityProvider),this.rowsContainer=document.createElement("div"),this.rowsContainer.className="monaco-list-rows";const Ce=Object(D.e)(_e,oe=>oe.transformOptimization,O.transformOptimization);Ce&&(this.rowsContainer.style.transform="translate3d(0px, 0px, 0px)"),this.disposables.add(A.b.addTarget(this.rowsContainer)),this.scrollable=new r.a(Object(D.e)(_e,oe=>oe.smoothScrolling,!1)?125:0,oe=>Object(x.V)(oe)),this.scrollableElement=this.disposables.add(new j.c(this.rowsContainer,{alwaysConsumeMouseWheel:Object(D.e)(_e,oe=>oe.alwaysConsumeMouseWheel,O.alwaysConsumeMouseWheel),horizontal:1,vertical:Object(D.e)(_e,oe=>oe.verticalScrollMode,O.verticalScrollMode),useShadows:Object(D.e)(_e,oe=>oe.useShadows,O.useShadows),mouseWheelScrollSensitivity:_e.mouseWheelScrollSensitivity,fastScrollSensitivity:_e.fastScrollSensitivity},this.scrollable)),this.domNode.appendChild(this.scrollableElement.getDomNode()),Z.appendChild(this.domNode),this.scrollableElement.onScroll(this.onScroll,this,this.disposables),this.disposables.add(Object(x.i)(this.rowsContainer,A.a.Change,oe=>this.onTouchChange(oe))),this.disposables.add(Object(x.i)(this.scrollableElement.getDomNode(),"scroll",oe=>oe.target.scrollTop=0)),this.disposables.add(Object(x.i)(this.domNode,"dragover",oe=>this.onDragOver(this.toDragEvent(oe)))),this.disposables.add(Object(x.i)(this.domNode,"drop",oe=>this.onDrop(this.toDragEvent(oe)))),this.disposables.add(Object(x.i)(this.domNode,"dragleave",oe=>this.onDragLeave(this.toDragEvent(oe)))),this.disposables.add(Object(x.i)(this.domNode,"dragend",oe=>this.onDragEnd(oe))),this.setRowLineHeight=Object(D.e)(_e,oe=>oe.setRowLineHeight,O.setRowLineHeight),this.setRowHeight=Object(D.e)(_e,oe=>oe.setRowHeight,O.setRowHeight),this.supportDynamicHeights=Object(D.e)(_e,oe=>oe.supportDynamicHeights,O.supportDynamicHeights),this.dnd=Object(D.e)(_e,oe=>oe.dnd,O.dnd),this.layout()}get contentHeight(){return this.rangeMap.size}get horizontalScrolling(){return this._horizontalScrolling}set horizontalScrolling(Z){if(Z===this._horizontalScrolling)return;if(Z&&this.supportDynamicHeights)throw new Error("Horizontal scrolling and dynamic heights not supported simultaneously");if(this._horizontalScrolling=Z,this.domNode.classList.toggle("horizontal-scrolling",this._horizontalScrolling),this._horizontalScrolling){for(const ne of this.items)this.measureItemWidth(ne);this.updateScrollWidth(),this.scrollableElement.setScrollDimensions({width:Object(x.C)(this.domNode)}),this.rowsContainer.style.width=`${Math.max(this.scrollWidth||0,this.renderWidth)}px`}else this.scrollableElementWidthDelayer.cancel(),this.scrollableElement.setScrollDimensions({width:this.renderWidth,scrollWidth:this.renderWidth}),this.rowsContainer.style.width=""}updateOptions(Z){Z.additionalScrollHeight!==void 0&&(this.additionalScrollHeight=Z.additionalScrollHeight,this.scrollableElement.setScrollDimensions({scrollHeight:this.scrollHeight})),Z.smoothScrolling!==void 0&&this.scrollable.setSmoothScrollDuration(Z.smoothScrolling?125:0),Z.horizontalScrolling!==void 0&&(this.horizontalScrolling=Z.horizontalScrolling),Z.mouseWheelScrollSensitivity!==void 0&&this.scrollableElement.updateOptions({mouseWheelScrollSensitivity:Z.mouseWheelScrollSensitivity}),Z.fastScrollSensitivity!==void 0&&this.scrollableElement.updateOptions({fastScrollSensitivity:Z.fastScrollSensitivity})}splice(Z,ne,le=[]){if(this.splicing)throw new Error("Can't run recursive splices.");this.splicing=!0;try{return this._splice(Z,ne,le)}finally{this.splicing=!1,this._onDidChangeContentHeight.fire(this.contentHeight)}}_splice(Z,ne,le=[]){const _e=this.getRenderRange(this.lastRenderTop,this.lastRenderHeight),Ce={start:Z,end:Z+ne},oe=L.a.intersect(_e,Ce),ae=new Map;for(let he=oe.start;he<oe.end;he++){const Le=this.items[he];if(Le.dragStartDisposable.dispose(),Le.row){let we=ae.get(Le.templateId);we||(we=[],ae.set(Le.templateId,we));const ve=this.renderers.get(Le.templateId);ve&&ve.disposeElement&&ve.disposeElement(Le.element,he,Le.row.templateData,Le.size),we.push(Le.row)}Le.row=null}const V={start:Z+ne,end:this.items.length},G=L.a.intersect(V,_e),ee=L.a.relativeComplement(V,_e),pe=le.map(he=>({id:String(this.itemId++),element:he,templateId:this.virtualDelegate.getTemplateId(he),size:this.virtualDelegate.getHeight(he),width:void 0,hasDynamicHeight:!!this.virtualDelegate.hasDynamicHeight&&this.virtualDelegate.hasDynamicHeight(he),lastDynamicHeightWidth:void 0,row:null,uri:void 0,dropTarget:!1,dragStartDisposable:d.a.None}));let Te;Z===0&&ne>=this.items.length?(this.rangeMap=new p,this.rangeMap.splice(0,0,pe),Te=this.items,this.items=pe):(this.rangeMap.splice(Z,ne,pe),Te=this.items.splice(Z,ne,...pe));const Ie=le.length-ne,Me=this.getRenderRange(this.lastRenderTop,this.lastRenderHeight),Oe=b(G,Ie),Xe=L.a.intersect(Me,Oe);for(let he=Xe.start;he<Xe.end;he++)this.updateItemInDOM(this.items[he],he);const fe=L.a.relativeComplement(Oe,Me);for(const he of fe)for(let Le=he.start;Le<he.end;Le++)this.removeItemFromDOM(Le);const Pe=ee.map(he=>b(he,Ie)),Be={start:Z,end:Z+le.length},Se=[Be,...Pe].map(he=>L.a.intersect(Me,he)),me=this.getNextToLastElement(Se);for(const he of Se)for(let Le=he.start;Le<he.end;Le++){const we=this.items[Le],ve=ae.get(we.templateId),ie=ve==null?void 0:ve.pop();this.insertItemInDOM(Le,me,ie)}for(const he of ae.values())for(const Le of he)this.cache.release(Le);return this.eventuallyUpdateScrollDimensions(),this.supportDynamicHeights&&this._rerender(this.scrollTop,this.renderHeight),Te.map(he=>he.element)}eventuallyUpdateScrollDimensions(){this._scrollHeight=this.contentHeight,this.rowsContainer.style.height=`${this._scrollHeight}px`,this.scrollableElementUpdateDisposable||(this.scrollableElementUpdateDisposable=Object(x.V)(()=>{this.scrollableElement.setScrollDimensions({scrollHeight:this.scrollHeight}),this.updateScrollWidth(),this.scrollableElementUpdateDisposable=null}))}eventuallyUpdateScrollWidth(){if(!this.horizontalScrolling){this.scrollableElementWidthDelayer.cancel();return}this.scrollableElementWidthDelayer.trigger(()=>this.updateScrollWidth())}updateScrollWidth(){if(!this.horizontalScrolling)return;let Z=0;for(const ne of this.items)typeof ne.width!="undefined"&&(Z=Math.max(Z,ne.width));this.scrollWidth=Z,this.scrollableElement.setScrollDimensions({scrollWidth:Z===0?0:Z+10})}rerender(){if(!this.supportDynamicHeights)return;for(const Z of this.items)Z.lastDynamicHeightWidth=void 0;this._rerender(this.lastRenderTop,this.lastRenderHeight)}get length(){return this.items.length}get renderHeight(){const Z=this.scrollableElement.getScrollDimensions();return Z.height}element(Z){return this.items[Z].element}domElement(Z){const ne=this.items[Z].row;return ne&&ne.domNode}elementHeight(Z){return this.items[Z].size}elementTop(Z){return this.rangeMap.positionAt(Z)}indexAt(Z){return this.rangeMap.indexAt(Z)}indexAfter(Z){return this.rangeMap.indexAfter(Z)}layout(Z,ne){let le={height:typeof Z=="number"?Z:Object(x.B)(this.domNode)};this.scrollableElementUpdateDisposable&&(this.scrollableElementUpdateDisposable.dispose(),this.scrollableElementUpdateDisposable=null,le.scrollHeight=this.scrollHeight),this.scrollableElement.setScrollDimensions(le),typeof ne!="undefined"&&(this.renderWidth=ne,this.supportDynamicHeights&&this._rerender(this.scrollTop,this.renderHeight)),this.horizontalScrolling&&this.scrollableElement.setScrollDimensions({width:typeof ne=="number"?ne:Object(x.C)(this.domNode)})}render(Z,ne,le,_e,Ce,oe=!1){const ae=this.getRenderRange(ne,le),V=L.a.relativeComplement(ae,Z),G=L.a.relativeComplement(Z,ae),ee=this.getNextToLastElement(V);if(oe){const pe=L.a.intersect(Z,ae);for(let Te=pe.start;Te<pe.end;Te++)this.updateItemInDOM(this.items[Te],Te)}for(const pe of V)for(let Te=pe.start;Te<pe.end;Te++)this.insertItemInDOM(Te,ee);for(const pe of G)for(let Te=pe.start;Te<pe.end;Te++)this.removeItemFromDOM(Te);_e!==void 0&&(this.rowsContainer.style.left=`-${_e}px`),this.rowsContainer.style.top=`-${ne}px`,this.horizontalScrolling&&Ce!==void 0&&(this.rowsContainer.style.width=`${Math.max(Ce,this.renderWidth)}px`),this.lastRenderTop=ne,this.lastRenderHeight=le}insertItemInDOM(Z,ne,le){const _e=this.items[Z];_e.row||(_e.row=le!=null?le:this.cache.alloc(_e.templateId));const Ce=this.accessibilityProvider.getRole(_e.element)||"listitem";_e.row.domNode.setAttribute("role",Ce);const oe=this.accessibilityProvider.isChecked(_e.element);typeof oe!="undefined"&&_e.row.domNode.setAttribute("aria-checked",String(!!oe)),_e.row.domNode.parentElement||(ne?this.rowsContainer.insertBefore(_e.row.domNode,ne):this.rowsContainer.appendChild(_e.row.domNode)),this.updateItemInDOM(_e,Z);const ae=this.renderers.get(_e.templateId);if(!ae)throw new Error(`No renderer found for template id ${_e.templateId}`);ae&&ae.renderElement(_e.element,Z,_e.row.templateData,_e.size);const V=this.dnd.getDragURI(_e.element);_e.dragStartDisposable.dispose(),_e.row.domNode.draggable=!!V,V&&(_e.dragStartDisposable=Object(x.i)(_e.row.domNode,"dragstart",G=>this.onDragStart(_e.element,V,G))),this.horizontalScrolling&&(this.measureItemWidth(_e),this.eventuallyUpdateScrollWidth())}measureItemWidth(Z){if(!Z.row||!Z.row.domNode)return;Z.row.domNode.style.width=g.g?"-moz-fit-content":"fit-content",Z.width=Object(x.C)(Z.row.domNode);const ne=window.getComputedStyle(Z.row.domNode);ne.paddingLeft&&(Z.width+=parseFloat(ne.paddingLeft)),ne.paddingRight&&(Z.width+=parseFloat(ne.paddingRight)),Z.row.domNode.style.width=""}updateItemInDOM(Z,ne){Z.row.domNode.style.top=`${this.elementTop(ne)}px`,this.setRowHeight&&(Z.row.domNode.style.height=`${Z.size}px`),this.setRowLineHeight&&(Z.row.domNode.style.lineHeight=`${Z.size}px`),Z.row.domNode.setAttribute("data-index",`${ne}`),Z.row.domNode.setAttribute("data-last-element",ne===this.length-1?"true":"false"),Z.row.domNode.setAttribute("data-parity",ne%2===0?"even":"odd"),Z.row.domNode.setAttribute("aria-setsize",String(this.accessibilityProvider.getSetSize(Z.element,ne,this.length))),Z.row.domNode.setAttribute("aria-posinset",String(this.accessibilityProvider.getPosInSet(Z.element,ne))),Z.row.domNode.setAttribute("id",this.getElementDomId(ne)),Z.row.domNode.classList.toggle("drop-target",Z.dropTarget)}removeItemFromDOM(Z){const ne=this.items[Z];if(ne.dragStartDisposable.dispose(),ne.row){const le=this.renderers.get(ne.templateId);le&&le.disposeElement&&le.disposeElement(ne.element,Z,ne.row.templateData,ne.size),this.cache.release(ne.row),ne.row=null}this.horizontalScrolling&&this.eventuallyUpdateScrollWidth()}getScrollTop(){const Z=this.scrollableElement.getScrollPosition();return Z.scrollTop}setScrollTop(Z,ne){this.scrollableElementUpdateDisposable&&(this.scrollableElementUpdateDisposable.dispose(),this.scrollableElementUpdateDisposable=null,this.scrollableElement.setScrollDimensions({scrollHeight:this.scrollHeight})),this.scrollableElement.setScrollPosition({scrollTop:Z,reuseAnimation:ne})}get scrollTop(){return this.getScrollTop()}set scrollTop(Z){this.setScrollTop(Z)}get scrollHeight(){return this._scrollHeight+(this.horizontalScrolling?10:0)+this.additionalScrollHeight}get onMouseClick(){return m.c.map(this.disposables.add(new R.a(this.domNode,"click")).event,Z=>this.toMouseEvent(Z))}get onMouseDblClick(){return m.c.map(this.disposables.add(new R.a(this.domNode,"dblclick")).event,Z=>this.toMouseEvent(Z))}get onMouseMiddleClick(){return m.c.filter(m.c.map(this.disposables.add(new R.a(this.domNode,"auxclick")).event,Z=>this.toMouseEvent(Z)),Z=>Z.browserEvent.button===1)}get onMouseDown(){return m.c.map(this.disposables.add(new R.a(this.domNode,"mousedown")).event,Z=>this.toMouseEvent(Z))}get onContextMenu(){return m.c.any(m.c.map(this.disposables.add(new R.a(this.domNode,"contextmenu")).event,Z=>this.toMouseEvent(Z)),m.c.map(this.disposables.add(new R.a(this.domNode,A.a.Contextmenu)).event,Z=>this.toGestureEvent(Z)))}get onTouchStart(){return m.c.map(this.disposables.add(new R.a(this.domNode,"touchstart")).event,Z=>this.toTouchEvent(Z))}get onTap(){return m.c.map(this.disposables.add(new R.a(this.rowsContainer,A.a.Tap)).event,Z=>this.toGestureEvent(Z))}toMouseEvent(Z){const ne=this.getItemIndexFromEventTarget(Z.target||null),le=typeof ne=="undefined"?void 0:this.items[ne],_e=le&&le.element;return{browserEvent:Z,index:ne,element:_e}}toTouchEvent(Z){const ne=this.getItemIndexFromEventTarget(Z.target||null),le=typeof ne=="undefined"?void 0:this.items[ne],_e=le&&le.element;return{browserEvent:Z,index:ne,element:_e}}toGestureEvent(Z){const ne=this.getItemIndexFromEventTarget(Z.initialTarget||null),le=typeof ne=="undefined"?void 0:this.items[ne],_e=le&&le.element;return{browserEvent:Z,index:ne,element:_e}}toDragEvent(Z){const ne=this.getItemIndexFromEventTarget(Z.target||null),le=typeof ne=="undefined"?void 0:this.items[ne],_e=le&&le.element;return{browserEvent:Z,index:ne,element:_e}}onScroll(Z){try{const ne=this.getRenderRange(this.lastRenderTop,this.lastRenderHeight);this.render(ne,Z.scrollTop,Z.height,Z.scrollLeft,Z.scrollWidth),this.supportDynamicHeights&&this._rerender(Z.scrollTop,Z.height,Z.inSmoothScrolling)}catch(ne){throw console.error("Got bad scroll event:",Z),ne}}onTouchChange(Z){Z.preventDefault(),Z.stopPropagation(),this.scrollTop-=Z.translationY}onDragStart(Z,ne,le){if(!le.dataTransfer)return;const _e=this.dnd.getDragElements(Z);if(le.dataTransfer.effectAllowed="copyMove",le.dataTransfer.setData(B.a.TEXT,ne),le.dataTransfer.setDragImage){let Ce;this.dnd.getDragLabel&&(Ce=this.dnd.getDragLabel(_e,le)),typeof Ce=="undefined"&&(Ce=String(_e.length));const oe=Object(x.a)(".monaco-drag-image");oe.textContent=Ce,document.body.appendChild(oe),le.dataTransfer.setDragImage(oe,-10,-10),setTimeout(()=>document.body.removeChild(oe),0)}this.currentDragData=new k(_e),B.c.CurrentDragAndDropData=new Q(_e),this.dnd.onDragStart&&this.dnd.onDragStart(this.currentDragData,le)}onDragOver(Z){if(Z.browserEvent.preventDefault(),this.onDragLeaveTimeout.dispose(),B.c.CurrentDragAndDropData&&B.c.CurrentDragAndDropData.getData()==="vscode-ui")return!1;if(this.setupDragAndDropScrollTopAnimation(Z.browserEvent),!Z.browserEvent.dataTransfer)return!1;if(!this.currentDragData)if(B.c.CurrentDragAndDropData)this.currentDragData=B.c.CurrentDragAndDropData;else{if(!Z.browserEvent.dataTransfer.types)return!1;this.currentDragData=new q}const ne=this.dnd.onDragOver(this.currentDragData,Z.element,Z.index,Z.browserEvent);if(this.canDrop=typeof ne=="boolean"?ne:ne.accept,!this.canDrop)return this.currentDragFeedback=void 0,this.currentDragFeedbackDisposable.dispose(),!1;Z.browserEvent.dataTransfer.dropEffect=typeof ne!="boolean"&&ne.effect===0?"copy":"move";let le;if(typeof ne!="boolean"&&ne.feedback?le=ne.feedback:typeof Z.index=="undefined"?le=[-1]:le=[Z.index],le=Object(I.f)(le).filter(_e=>_e>=-1&&_e<this.length).sort((_e,Ce)=>_e-Ce),le=le[0]===-1?[-1]:le,z(this.currentDragFeedback,le))return!0;if(this.currentDragFeedback=le,this.currentDragFeedbackDisposable.dispose(),le[0]===-1)this.domNode.classList.add("drop-target"),this.rowsContainer.classList.add("drop-target"),this.currentDragFeedbackDisposable=Object(d.i)(()=>{this.domNode.classList.remove("drop-target"),this.rowsContainer.classList.remove("drop-target")});else{for(const _e of le){const Ce=this.items[_e];Ce.dropTarget=!0,Ce.row&&Ce.row.domNode.classList.add("drop-target")}this.currentDragFeedbackDisposable=Object(d.i)(()=>{for(const _e of le){const Ce=this.items[_e];Ce.dropTarget=!1,Ce.row&&Ce.row.domNode.classList.remove("drop-target")}})}return!0}onDragLeave(Z){var ne,le;this.onDragLeaveTimeout.dispose(),this.onDragLeaveTimeout=Object(v.i)(()=>this.clearDragOverFeedback(),100),this.currentDragData&&((le=(ne=this.dnd).onDragLeave)===null||le===void 0||le.call(ne,this.currentDragData,Z.element,Z.index,Z.browserEvent))}onDrop(Z){if(!this.canDrop)return;const ne=this.currentDragData;if(this.teardownDragAndDropScrollTopAnimation(),this.clearDragOverFeedback(),this.currentDragData=void 0,B.c.CurrentDragAndDropData=void 0,!ne||!Z.browserEvent.dataTransfer)return;Z.browserEvent.preventDefault(),ne.update(Z.browserEvent.dataTransfer),this.dnd.drop(ne,Z.element,Z.index,Z.browserEvent)}onDragEnd(Z){this.canDrop=!1,this.teardownDragAndDropScrollTopAnimation(),this.clearDragOverFeedback(),this.currentDragData=void 0,B.c.CurrentDragAndDropData=void 0,this.dnd.onDragEnd&&this.dnd.onDragEnd(Z)}clearDragOverFeedback(){this.currentDragFeedback=void 0,this.currentDragFeedbackDisposable.dispose(),this.currentDragFeedbackDisposable=d.a.None}setupDragAndDropScrollTopAnimation(Z){if(!this.dragOverAnimationDisposable){const ne=Object(x.G)(this.domNode).top;this.dragOverAnimationDisposable=Object(x.p)(this.animateDragAndDropScrollTop.bind(this,ne))}this.dragOverAnimationStopDisposable.dispose(),this.dragOverAnimationStopDisposable=Object(v.i)(()=>{this.dragOverAnimationDisposable&&(this.dragOverAnimationDisposable.dispose(),this.dragOverAnimationDisposable=void 0)},1e3),this.dragOverMouseY=Z.pageY}animateDragAndDropScrollTop(Z){if(this.dragOverMouseY===void 0)return;const ne=this.dragOverMouseY-Z,le=this.renderHeight-35;ne<35?this.scrollTop+=Math.max(-14,Math.floor(.3*(ne-35))):ne>le&&(this.scrollTop+=Math.min(14,Math.floor(.3*(ne-le))))}teardownDragAndDropScrollTopAnimation(){this.dragOverAnimationStopDisposable.dispose(),this.dragOverAnimationDisposable&&(this.dragOverAnimationDisposable.dispose(),this.dragOverAnimationDisposable=void 0)}getItemIndexFromEventTarget(Z){const ne=this.scrollableElement.getDomNode();let le=Z;for(;le instanceof HTMLElement&&le!==this.rowsContainer&&ne.contains(le);){const _e=le.getAttribute("data-index");if(_e){const Ce=Number(_e);if(!isNaN(Ce))return Ce}le=le.parentElement}return}getRenderRange(Z,ne){return{start:this.rangeMap.indexAt(Z),end:this.rangeMap.indexAfter(Z+ne-1)}}_rerender(Z,ne,le){const _e=this.getRenderRange(Z,ne);let Ce,oe;Z===this.elementTop(_e.start)?(Ce=_e.start,oe=0):_e.end-_e.start>1&&(Ce=_e.start+1,oe=this.elementTop(Ce)-Z);let ae=0;for(;;){const V=this.getRenderRange(Z,ne);let G=!1;for(let ee=V.start;ee<V.end;ee++){const pe=this.probeDynamicHeight(ee);pe!==0&&this.rangeMap.splice(ee,1,[this.items[ee]]),ae+=pe,G=G||pe!==0}if(!G){ae!==0&&this.eventuallyUpdateScrollDimensions();const ee=L.a.relativeComplement(_e,V);for(const Te of ee)for(let Ie=Te.start;Ie<Te.end;Ie++)this.items[Ie].row&&this.removeItemFromDOM(Ie);const pe=L.a.relativeComplement(V,_e);for(const Te of pe)for(let Ie=Te.start;Ie<Te.end;Ie++){const Me=Ie+1,Oe=Me<this.items.length?this.items[Me].row:null,Xe=Oe?Oe.domNode:null;this.insertItemInDOM(Ie,Xe)}for(let Te=V.start;Te<V.end;Te++)this.items[Te].row&&this.updateItemInDOM(this.items[Te],Te);if(typeof Ce=="number"){const Te=this.scrollable.getFutureScrollPosition().scrollTop-Z,Ie=this.elementTop(Ce)-oe+Te;this.setScrollTop(Ie,le)}this._onDidChangeContentHeight.fire(this.contentHeight);return}}}probeDynamicHeight(Z){const ne=this.items[Z];if(this.virtualDelegate.getDynamicHeight){const oe=this.virtualDelegate.getDynamicHeight(ne.element);if(oe!==null){const ae=ne.size;return ne.size=oe,ne.lastDynamicHeightWidth=this.renderWidth,oe-ae}}if(!ne.hasDynamicHeight||ne.lastDynamicHeightWidth===this.renderWidth)return 0;if(!!this.virtualDelegate.hasDynamicHeight&&!this.virtualDelegate.hasDynamicHeight(ne.element))return 0;const le=ne.size;if(!this.setRowHeight&&ne.row){let oe=ne.row.domNode.offsetHeight;return ne.size=oe,ne.lastDynamicHeightWidth=this.renderWidth,oe-le}const _e=this.cache.alloc(ne.templateId);_e.domNode.style.height="",this.rowsContainer.appendChild(_e.domNode);const Ce=this.renderers.get(ne.templateId);return Ce&&(Ce.renderElement(ne.element,Z,_e.templateData,void 0),Ce.disposeElement&&Ce.disposeElement(ne.element,Z,_e.templateData,void 0)),ne.size=_e.domNode.offsetHeight,this.virtualDelegate.setDynamicHeight&&this.virtualDelegate.setDynamicHeight(ne.element,ne.size),ne.lastDynamicHeightWidth=this.renderWidth,this.rowsContainer.removeChild(_e.domNode),this.cache.release(_e),ne.size-le}getNextToLastElement(Z){const ne=Z[Z.length-1];if(!ne)return null;const le=this.items[ne.end];return le&&le.row?le.row.domNode:null}getElementDomId(Z){return`${this.domId}_${Z}`}dispose(){if(this.items){for(const Z of this.items)if(Z.row){const ne=this.renderers.get(Z.row.templateId);ne&&(ne.disposeElement&&ne.disposeElement(Z.element,-1,Z.row.templateData,void 0),ne.disposeTemplate(Z.row.templateData))}this.items=[]}this.domNode&&this.domNode.parentNode&&this.domNode.parentNode.removeChild(this.domNode),Object(d.f)(this.disposables)}}re.InstanceCount=0,y([C.a],re.prototype,"onMouseClick",null),y([C.a],re.prototype,"onMouseDblClick",null),y([C.a],re.prototype,"onMouseMiddleClick",null),y([C.a],re.prototype,"onMouseDown",null),y([C.a],re.prototype,"onContextMenu",null),y([C.a],re.prototype,"onTouchStart",null),y([C.a],re.prototype,"onTap",null)},fpMC:function(mt,M,t){"use strict";t.d(M,"j",function(){return x}),t.d(M,"h",function(){return R}),t.d(M,"f",function(){return j}),t.d(M,"i",function(){return Q}),t.d(M,"g",function(){return ne}),t.d(M,"b",function(){return le}),t.d(M,"c",function(){return _e}),t.d(M,"a",function(){return Se}),t.d(M,"d",function(){return me}),t.d(M,"e",function(){return we});var g=t("QDVR"),B=t("N0LK");function x(...W){return function(U,se){for(let je=0,Re=W.length;je<Re;je++){const We=W[je](U,se);if(We)return We}return null}}const R=A.bind(void 0,!0);function A(W,U,se){if(!se||se.length<U.length)return null;let je;return W?je=B.R(se,U):je=se.indexOf(U)===0,je?U.length>0?[{start:0,end:U.length}]:[]:null}function j(W,U){const se=U.toLowerCase().indexOf(W.toLowerCase());return se===-1?null:[{start:se,end:se+W.length}]}function I(W,U){return v(W.toLowerCase(),U.toLowerCase(),0,0)}function v(W,U,se,je){if(se===W.length)return[];if(je===U.length)return null;if(W[se]===U[je]){let Re=null;return(Re=v(W,U,se+1,je+1))?u({start:je,end:je+1},Re):null}return v(W,U,se,je+1)}function C(W){return 97<=W&&W<=122}function m(W){return 65<=W&&W<=90}function d(W){return 48<=W&&W<=57}function D(W){return W===32||W===9||W===10||W===13}const L=new Set;"`~!@#$%^&*()-=+[{]}\\|;:'\",.<>/?".split("").forEach(W=>L.add(W.charCodeAt(0)));function r(W){return D(W)||L.has(W)}function w(W,U){return W===U||r(W)&&r(U)}function b(W){return C(W)||m(W)||d(W)}function u(W,U){return U.length===0?U=[W]:W.end===U[0].start?U[0].start=W.start:U.unshift(W),U}function c(W,U){for(let se=U;se<W.length;se++){const je=W.charCodeAt(se);if(m(je)||d(je)||se>0&&!b(W.charCodeAt(se-1)))return se}return W.length}function p(W,U,se,je){if(se===W.length)return[];if(je===U.length)return null;if(W[se]!==U[je].toLowerCase())return null;{let Re=null,We=je+1;for(Re=p(W,U,se+1,je+1);!Re&&(We=c(U,We))<U.length;)Re=p(W,U,se+1,We),We++;return Re===null?null:u({start:je,end:je+1},Re)}}function S(W){let U=0,se=0,je=0,Re=0,We=0;for(let ot=0;ot<W.length;ot++)We=W.charCodeAt(ot),m(We)&&U++,C(We)&&se++,b(We)&&je++,d(We)&&Re++;const dt=U/W.length,Lt=se/W.length,Ht=je/W.length,$e=Re/W.length;return{upperPercent:dt,lowerPercent:Lt,alphaPercent:Ht,numericPercent:$e}}function E(W){const{upperPercent:U,lowerPercent:se}=W;return se===0&&U>.6}function y(W){const{upperPercent:U,lowerPercent:se,alphaPercent:je,numericPercent:Re}=W;return se>.2&&U<.8&&je>.6&&Re<.2}function O(W){let U=0,se=0,je=0,Re=0;for(let We=0;We<W.length;We++)je=W.charCodeAt(We),m(je)&&U++,C(je)&&se++,D(je)&&Re++;return(U===0||se===0)&&Re===0?W.length<=30:U<=5}function k(W,U){if(!U)return null;if(U=U.trim(),U.length===0)return null;if(!O(W))return null;if(U.length>60)return null;const se=S(U);if(!y(se)){if(!E(se))return null;U=U.toLowerCase()}let je=null,Re=0;for(W=W.toLowerCase();Re<U.length&&(je=p(W,U,0,Re))===null;)Re=c(U,Re+1);return je}function Q(W,U,se=!1){if(!U||U.length===0)return null;let je=null,Re=0;for(W=W.toLowerCase(),U=U.toLowerCase();Re<U.length&&(je=q(W,U,0,Re,se))===null;)Re=z(U,Re+1);return je}function q(W,U,se,je,Re){if(se===W.length)return[];if(je===U.length)return null;if(w(W.charCodeAt(se),U.charCodeAt(je))){let We=null,dt=je+1;if(We=q(W,U,se+1,je+1,Re),!Re)for(;!We&&(dt=z(U,dt))<U.length;)We=q(W,U,se+1,dt,Re),dt++;return We===null?null:u({start:je,end:je+1},We)}else return null}function z(W,U){for(let se=U;se<W.length;se++)if(r(W.charCodeAt(se))||se>0&&r(W.charCodeAt(se-1)))return se;return W.length}const J=x(R,k,j),re=x(R,k,I),Z=new g.a(1e4);function ne(W,U,se=!1){if(typeof W!="string"||typeof U!="string")return null;let je=Z.get(W);je||(je=new RegExp(B.p(W),"i"),Z.set(W,je));const Re=je.exec(U);return Re?[{start:Re.index,end:Re.index+Re[0].length}]:se?re(W,U):J(W,U)}function le(W,U,se,je,Re,We){const dt=Math.min(13,W.length);for(;se<dt;se++){const Lt=me(W,U,se,je,Re,We,!1);if(Lt)return Lt}return[0,We]}function _e(W){if(typeof W=="undefined")return[];const U=[],se=W[1];for(let je=W.length-1;je>1;je--){const Re=W[je]+se,We=U[U.length-1];We&&We.end===Re?We.end=Re+1:U.push({start:Re,end:Re+1})}return U}const Ce=128;function oe(){const W=[],U=[];for(let se=0;se<=Ce;se++)U[se]=0;for(let se=0;se<=Ce;se++)W.push(U.slice(0));return W}function ae(W){const U=[];for(let se=0;se<=W;se++)U[se]=0;return U}const V=ae(2*Ce),G=ae(2*Ce),ee=oe(),pe=oe(),Te=oe(),Ie=!1;function Me(W,U,se,je,Re){function We(Lt,Ht,$e=" "){for(;Lt.length<Ht;)Lt=$e+Lt;return Lt}let dt=` | |${je.split("").map(Lt=>We(Lt,3)).join("|")}
|
|
|
`;for(let Lt=0;Lt<=se;Lt++)Lt===0?dt+=" |":dt+=`${U[Lt-1]}|`,dt+=W[Lt].slice(0,Re+1).map(Ht=>We(Ht.toString(),3)).join("|")+`
|
|
|
`;return dt}function Oe(W,U,se,je){W=W.substr(U),se=se.substr(je),console.log(Me(pe,W,W.length,se,se.length)),console.log(Me(Te,W,W.length,se,se.length)),console.log(Me(ee,W,W.length,se,se.length))}function Xe(W,U){if(U<0||U>=W.length)return!1;const se=W.codePointAt(U);switch(se){case 95:case 45:case 46:case 32:case 47:case 92:case 39:case 34:case 58:case 36:case 60:case 40:case 91:return!0;case void 0:return!1;default:return!!B.B(se)}}function fe(W,U){if(U<0||U>=W.length)return!1;const se=W.charCodeAt(U);switch(se){case 32:case 9:return!0;default:return!1}}function Pe(W,U,se){return U[W]!==se[W]}function Be(W,U,se,je,Re,We,dt=!1){for(;U<se&&Re<We;)W[U]===je[Re]&&(dt&&(V[U]=Re),U+=1),Re+=1;return U===se}var Se;(function(W){W.Default=[-100,0];function U(se){return!se||se.length===2&&se[0]===-100&&se[1]===0}W.isDefault=U})(Se||(Se={}));function me(W,U,se,je,Re,We,dt){const Lt=W.length>Ce?Ce:W.length,Ht=je.length>Ce?Ce:je.length;if(se>=Lt||We>=Ht||Lt-se>Ht-We)return;if(!Be(U,se,Lt,Re,We,Ht,!0))return;he(Lt,Ht,se,We,U,Re);let $e=1,ot=1,ce=se,Ve=We;const it=[!1];for($e=1,ce=se;ce<Lt;$e++,ce++){const Mo=V[ce],xo=G[ce],Do=ce+1<Lt?G[ce+1]:Ht;for(ot=Mo-We+1,Ve=Mo;Ve<Do;ot++,Ve++){let Lo=Number.MIN_SAFE_INTEGER,To=!1;Ve<=xo&&(Lo=Le(W,U,ce,se,je,Re,Ve,Ht,We,ee[$e-1][ot-1]===0,it));let Vt=0;Lo!==Number.MAX_SAFE_INTEGER&&(To=!0,Vt=Lo+pe[$e-1][ot-1]);const xt=Ve>Mo,ze=xt?pe[$e][ot-1]+(ee[$e][ot-1]>0?-5:0):0,ct=Ve>Mo+1&&ee[$e][ot-1]>0,Ut=ct?pe[$e][ot-2]+(ee[$e][ot-2]>0?-5:0):0;if(ct&&(!xt||Ut>=ze)&&(!To||Ut>=Vt))pe[$e][ot]=Ut,Te[$e][ot]=3,ee[$e][ot]=0;else if(xt&&(!To||ze>=Vt))pe[$e][ot]=ze,Te[$e][ot]=2,ee[$e][ot]=0;else if(To)pe[$e][ot]=Vt,Te[$e][ot]=1,ee[$e][ot]=ee[$e-1][ot-1]+1;else throw new Error("not possible")}}if(Ie&&Oe(W,se,je,We),!it[0]&&!dt)return;$e--,ot--;const Et=[pe[$e][ot],We];let It=0,Rt=0;for(;$e>=1;){let Mo=ot;do{const xo=Te[$e][Mo];if(xo===3)Mo=Mo-2;else if(xo===2)Mo=Mo-1;else break}while(Mo>=1);It>1&&U[se+$e-1]===Re[We+ot-1]&&!Pe(Mo+We-1,je,Re)&&It+1>ee[$e][Mo]&&(Mo=ot),Mo===ot?It++:It=1,Rt||(Rt=Mo),$e--,ot=Mo-1,Et.push(ot)}Ht===Lt&&(Et[0]+=2);const vo=Rt-Lt;return Et[0]-=vo,Et}function he(W,U,se,je,Re,We){let dt=W-1,Lt=U-1;for(;dt>=se&&Lt>=je;)Re[dt]===We[Lt]&&(G[dt]=Lt,dt--),Lt--}function Le(W,U,se,je,Re,We,dt,Lt,Ht,$e,ot){if(U[se]!==We[dt])return Number.MIN_SAFE_INTEGER;let ce=1,Ve=!1;return dt===se-je?ce=W[se]===Re[dt]?7:5:Pe(dt,Re,We)&&(dt===0||!Pe(dt-1,Re,We))?(ce=W[se]===Re[dt]?7:5,Ve=!0):Xe(We,dt)&&(dt===0||!Xe(We,dt-1))?ce=5:(Xe(We,dt-1)||fe(We,dt-1))&&(ce=5,Ve=!0),ce>1&&se===je&&(ot[0]=!0),Ve||(Ve=Pe(dt,Re,We)||Xe(We,dt-1)||fe(We,dt-1)),se===je?dt>Ht&&(ce-=Ve?3:5):$e?ce+=Ve?2:0:ce+=Ve?0:1,dt+1===Lt&&(ce-=Ve?3:5),ce}function we(W,U,se,je,Re,We,dt){return ve(W,U,se,je,Re,We,!0,dt)}function ve(W,U,se,je,Re,We,dt,Lt){let Ht=me(W,U,se,je,Re,We,Lt);if(Ht&&!dt)return Ht;if(W.length>=3){const $e=Math.min(7,W.length-1);for(let ot=se+1;ot<$e;ot++){const ce=ie(W,ot);if(ce){const Ve=me(ce,ce.toLowerCase(),se,je,Re,We,Lt);Ve&&(Ve[0]-=3,(!Ht||Ve[0]>Ht[0])&&(Ht=Ve))}}}return Ht}function ie(W,U){if(U+1>=W.length)return;const se=W[U],je=W[U+1];return se===je?void 0:W.slice(0,U)+je+se+W.slice(U+2)}},gCVg:function(mt,M,t){"use strict";t.d(M,"a",function(){return x});var g=t("cGHE"),B=t("aokT");class x extends B.a{constructor(R,A,j,I){super(R,A,j,I);this.selectionStartLineNumber=R,this.selectionStartColumn=A,this.positionLineNumber=j,this.positionColumn=I}toString(){return"["+this.selectionStartLineNumber+","+this.selectionStartColumn+" -> "+this.positionLineNumber+","+this.positionColumn+"]"}equalsSelection(R){return x.selectionsEqual(this,R)}static selectionsEqual(R,A){return R.selectionStartLineNumber===A.selectionStartLineNumber&&R.selectionStartColumn===A.selectionStartColumn&&R.positionLineNumber===A.positionLineNumber&&R.positionColumn===A.positionColumn}getDirection(){return this.selectionStartLineNumber===this.startLineNumber&&this.selectionStartColumn===this.startColumn?0:1}setEndPosition(R,A){return this.getDirection()===0?new x(this.startLineNumber,this.startColumn,R,A):new x(R,A,this.startLineNumber,this.startColumn)}getPosition(){return new g.a(this.positionLineNumber,this.positionColumn)}setStartPosition(R,A){return this.getDirection()===0?new x(R,A,this.endLineNumber,this.endColumn):new x(this.endLineNumber,this.endColumn,R,A)}static fromPositions(R,A=R){return new x(R.lineNumber,R.column,A.lineNumber,A.column)}static liftSelection(R){return new x(R.selectionStartLineNumber,R.selectionStartColumn,R.positionLineNumber,R.positionColumn)}static selectionsArrEqual(R,A){if(R&&!A||!R&&A)return!1;if(!R&&!A)return!0;if(R.length!==A.length)return!1;for(let j=0,I=R.length;j<I;j++)if(!this.selectionsEqual(R[j],A[j]))return!1;return!0}static isISelection(R){return R&&typeof R.selectionStartLineNumber=="number"&&typeof R.selectionStartColumn=="number"&&typeof R.positionLineNumber=="number"&&typeof R.positionColumn=="number"}static createWithDirection(R,A,j,I,v){return v===0?new x(R,A,j,I):new x(j,I,R,A)}}},gJAb:function(mt,M,t){"use strict";t.r(M);var g=t("EzsQ"),B=t.n(g),x=t("EffR"),R=t("zrhQ"),A=t("pmY6"),j=t("sswD"),I=t("twdY"),v=t("i/Ef"),C=t("WBhO"),m=t("scqD"),d=t("MD5Z"),D=t("t9D7"),L=t("A9l+"),r=t("nEHx"),w=function(y,O,k,Q){var q=arguments.length,z=q<3?O:Q===null?Q=Object.getOwnPropertyDescriptor(O,k):Q,J;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")z=Reflect.decorate(y,O,k,Q);else for(var re=y.length-1;re>=0;re--)(J=y[re])&&(z=(q<3?J(z):q>3?J(O,k,z):J(O,k))||z);return q>3&&z&&Object.defineProperty(O,k,z),z},b=function(y,O){return function(k,Q){O(k,Q,y)}};let u=class y extends A.a{constructor(O,k,Q){super();this._editor=O,this._modeService=Q,this._widget=null,this._register(this._editor.onDidChangeModel(q=>this.stop())),this._register(this._editor.onDidChangeModelLanguage(q=>this.stop())),this._register(I.E.onDidChange(q=>this.stop())),this._register(this._editor.onKeyUp(q=>q.keyCode===9&&this.stop()))}static get(O){return O.getContribution(y.ID)}dispose(){this.stop(),super.dispose()}launch(){if(this._widget)return;if(!this._editor.hasModel())return;this._widget=new E(this._editor,this._modeService)}stop(){this._widget&&(this._widget.dispose(),this._widget=null)}};u.ID="editor.contrib.inspectTokens",u=w([b(1,m.a),b(2,C.a)],u);class c extends j.b{constructor(){super({id:"editor.action.inspectTokens",label:L.c.inspectTokensAction,alias:"Developer: Inspect Tokens",precondition:void 0})}run(y,O){let k=u.get(O);k&&k.launch()}}function p(y){let O="";for(let k=0,Q=y.length;k<Q;k++){let q=y.charCodeAt(k);switch(q){case 9:O+="\u2192";break;case 32:O+="\xB7";break;default:O+=String.fromCharCode(q)}}return O}function S(y,O){const k=I.E.get(O);if(k)return k;const Q=y.encodeLanguageId(O);return{getInitialState:()=>v.b,tokenize:(q,z,J,re)=>Object(v.c)(O,q,J,re),tokenize2:(q,z,J,re)=>Object(v.d)(Q,q,J,re)}}class E extends A.a{constructor(y,O){super();this.allowEditorOverflow=!0,this._editor=y,this._modeService=O,this._model=this._editor.getModel(),this._domNode=document.createElement("div"),this._domNode.className="tokens-inspect-widget",this._tokenizationSupport=S(this._modeService.languageIdCodec,this._model.getLanguageId()),this._compute(this._editor.getPosition()),this._register(this._editor.onDidChangeCursorPosition(k=>this._compute(this._editor.getPosition()))),this._editor.addContentWidget(this)}dispose(){this._editor.removeContentWidget(this),super.dispose()}getId(){return E._ID}_compute(y){let O=this._getTokensAtLine(y.lineNumber),k=0;for(let re=O.tokens1.length-1;re>=0;re--){let Z=O.tokens1[re];if(y.column-1>=Z.offset){k=re;break}}let Q=0;for(let re=O.tokens2.length>>>1;re>=0;re--)if(y.column-1>=O.tokens2[re<<1]){Q=re;break}let q=this._model.getLineContent(y.lineNumber),z="";if(k<O.tokens1.length){let re=O.tokens1[k].offset,Z=k+1<O.tokens1.length?O.tokens1[k+1].offset:q.length;z=q.substring(re,Z)}Object(x.R)(this._domNode,Object(x.a)("h2.tm-token",void 0,p(z),Object(x.a)("span.tm-token-length",void 0,`${z.length} ${z.length===1?"char":"chars"}`))),Object(x.q)(this._domNode,Object(x.a)("hr.tokens-inspect-separator",{style:"clear:both"}));const J=(Q<<1)+1<O.tokens2.length?this._decodeMetadata(O.tokens2[(Q<<1)+1]):null;Object(x.q)(this._domNode,Object(x.a)("table.tm-metadata-table",void 0,Object(x.a)("tbody",void 0,Object(x.a)("tr",void 0,Object(x.a)("td.tm-metadata-key",void 0,"language"),Object(x.a)("td.tm-metadata-value",void 0,`${J?J.languageId:"-?-"}`)),Object(x.a)("tr",void 0,Object(x.a)("td.tm-metadata-key",void 0,"token type"),Object(x.a)("td.tm-metadata-value",void 0,`${J?this._tokenTypeToString(J.tokenType):"-?-"}`)),Object(x.a)("tr",void 0,Object(x.a)("td.tm-metadata-key",void 0,"font style"),Object(x.a)("td.tm-metadata-value",void 0,`${J?this._fontStyleToString(J.fontStyle):"-?-"}`)),Object(x.a)("tr",void 0,Object(x.a)("td.tm-metadata-key",void 0,"foreground"),Object(x.a)("td.tm-metadata-value",void 0,`${J?R.a.Format.CSS.formatHex(J.foreground):"-?-"}`)),Object(x.a)("tr",void 0,Object(x.a)("td.tm-metadata-key",void 0,"background"),Object(x.a)("td.tm-metadata-value",void 0,`${J?R.a.Format.CSS.formatHex(J.background):"-?-"}`))))),Object(x.q)(this._domNode,Object(x.a)("hr.tokens-inspect-separator")),k<O.tokens1.length&&Object(x.q)(this._domNode,Object(x.a)("span.tm-token-type",void 0,O.tokens1[k].type)),this._editor.layoutContentWidget(this)}_decodeMetadata(y){let O=I.E.getColorMap(),k=I.D.getLanguageId(y),Q=I.D.getTokenType(y),q=I.D.getFontStyle(y),z=I.D.getForeground(y),J=I.D.getBackground(y);return{languageId:this._modeService.languageIdCodec.decodeLanguageId(k),tokenType:Q,fontStyle:q,foreground:O[z],background:O[J]}}_tokenTypeToString(y){switch(y){case 0:return"Other";case 1:return"Comment";case 2:return"String";case 4:return"RegEx";default:return"??"}}_fontStyleToString(y){let O="";return y&1&&(O+="italic "),y&2&&(O+="bold "),y&4&&(O+="underline "),O.length===0&&(O="---"),O}_getTokensAtLine(y){let O=this._getStateBeforeLine(y),k=this._tokenizationSupport.tokenize(this._model.getLineContent(y),!0,O,0),Q=this._tokenizationSupport.tokenize2(this._model.getLineContent(y),!0,O,0);return{startState:O,tokens1:k.tokens,tokens2:Q.tokens,endState:k.endState}}_getStateBeforeLine(y){let O=this._tokenizationSupport.getInitialState();for(let k=1;k<y;k++){let Q=this._tokenizationSupport.tokenize(this._model.getLineContent(k),!0,O,0);O=Q.endState}return O}getDomNode(){return this._domNode}getPosition(){return{position:this._editor.getPosition(),preference:[2,1]}}}E._ID="editor.contrib.inspectTokensWidget",Object(j.l)(u.ID,u),Object(j.j)(c),Object(D.f)((y,O)=>{const k=y.getColor(d.F);if(k){let z=y.type===r.a.HIGH_CONTRAST?2:1;O.addRule(`.monaco-editor .tokens-inspect-widget { border: ${z}px solid ${k}; }`),O.addRule(`.monaco-editor .tokens-inspect-widget .tokens-inspect-separator { background-color: ${k}; }`)}const Q=y.getColor(d.E);Q&&O.addRule(`.monaco-editor .tokens-inspect-widget { background-color: ${Q}; }`);const q=y.getColor(d.G);q&&O.addRule(`.monaco-editor .tokens-inspect-widget { color: ${q}; }`)})},gqHg:function(mt,M,t){"use strict";t.r(M);var g=t("+hIS");Object(g.a)({id:"c",extensions:[".c",".h"],aliases:["C","c"],loader:function(){return t.e(20).then(t.bind(null,"fhwZ"))}}),Object(g.a)({id:"cpp",extensions:[".cpp",".cc",".cxx",".hpp",".hh",".hxx"],aliases:["C++","Cpp","cpp"],loader:function(){return t.e(20).then(t.bind(null,"fhwZ"))}})},gslv:function(mt,M,t){"use strict";t.d(M,"i",function(){return j}),t.d(M,"e",function(){return v}),t.d(M,"f",function(){return C}),t.d(M,"c",function(){return m}),t.d(M,"b",function(){return d}),t.d(M,"d",function(){return D}),t.d(M,"g",function(){return L}),t.d(M,"h",function(){return r}),t.d(M,"j",function(){return w}),t.d(M,"a",function(){return b});var g=t("PTeM"),B=t("tYmi"),x=t("MrjW"),R=t("N0LK"),A=t("bY76");function j(u){return Object(A.b)(u,!0)}class I{constructor(u){this._ignorePathCasing=u}compare(u,c,p=!1){return u===c?0:Object(R.f)(this.getComparisonKey(u,p),this.getComparisonKey(c,p))}isEqual(u,c,p=!1){return u===c?!0:!u||!c?!1:this.getComparisonKey(u,p)===this.getComparisonKey(c,p)}getComparisonKey(u,c=!1){return u.with({path:this._ignorePathCasing(u)?u.path.toLowerCase():void 0,fragment:c?null:void 0}).toString()}joinPath(u,...c){return A.a.joinPath(u,...c)}basenameOrAuthority(u){return d(u)||u.authority}basename(u){return x.e.basename(u.path)}dirname(u){if(u.path.length===0)return u;let c;return u.scheme===B.c.file?c=A.a.file(x.b(j(u))).path:(c=x.e.dirname(u.path),u.authority&&c.length&&c.charCodeAt(0)!==47&&(console.error(`dirname("${u.toString})) resulted in a relative path`),c="/")),u.with({path:c})}normalizePath(u){if(!u.path.length)return u;let c;return u.scheme===B.c.file?c=A.a.file(x.d(j(u))).path:c=x.e.normalize(u.path),u.with({path:c})}resolvePath(u,c){if(u.scheme===B.c.file){const p=A.a.file(x.g(j(u),c));return u.with({authority:p.authority,path:p.path})}return c=g.d(c),u.with({path:x.e.resolve(u.path,c)})}}const v=new I(()=>!1),C=v.isEqual.bind(v),m=v.basenameOrAuthority.bind(v),d=v.basename.bind(v),D=v.dirname.bind(v),L=v.joinPath.bind(v),r=v.normalizePath.bind(v),w=v.resolvePath.bind(v);var b;(function(u){u.META_DATA_LABEL="label",u.META_DATA_DESCRIPTION="description",u.META_DATA_SIZE="size",u.META_DATA_MIME="mime";function c(p){const S=new Map,E=p.path.substring(p.path.indexOf(";")+1,p.path.lastIndexOf(";"));E.split(";").forEach(O=>{const[k,Q]=O.split(":");k&&Q&&S.set(k,Q)});const y=p.path.substring(0,p.path.indexOf(";"));return y&&S.set(u.META_DATA_MIME,y),S}u.parseMetaData=c})(b||(b={}))},hFIF:function(mt,M,t){"use strict";t.r(M),t.d(M,"StandaloneGotoSymbolQuickAccessProvider",function(){return Se}),t.d(M,"GotoLineAction",function(){return me});var g=t("udvx"),B=t("28lO"),x=t("JQT/"),R=t("Vhoy"),A=t("fpMC"),j=t("MrjW"),I=t("MNsG"),v=t("N0LK");const C=[void 0,[]];function m(he,Le,we=0,ve=0){const ie=Le;return ie.values&&ie.values.length>1?d(he,ie.values,we,ve):D(he,Le,we,ve)}function d(he,Le,we,ve){let ie=0;const W=[];for(const U of Le){const[se,je]=D(he,U,we,ve);if(typeof se!="number")return C;ie+=se,W.push(...je)}return[ie,L(W)]}function D(he,Le,we,ve){const ie=Object(A.d)(Le.original,Le.originalLowercase,we,he,he.toLowerCase(),ve,!0);return ie?[ie[0],Object(A.c)(ie)]:C}function L(he){const Le=he.sort((ie,W)=>ie.start-W.start),we=[];let ve;for(const ie of Le)!ve||!r(ve,ie)?(ve=ie,we.push(ie)):(ve.start=Math.min(ve.start,ie.start),ve.end=Math.max(ve.end,ie.end));return we}function r(he,Le){return he.end<Le.start?!1:!(Le.end<he.start)}function w(he){return he.startsWith('"')&&he.endsWith('"')}const b=" ";function u(he){typeof he!="string"&&(he="");const Le=he.toLowerCase(),{pathNormalized:we,normalized:ve,normalizedLowercase:ie}=c(he),W=we.indexOf(j.h)>=0,U=w(he);let se;const je=he.split(b);if(je.length>1)for(const Re of je){const We=w(Re),{pathNormalized:dt,normalized:Lt,normalizedLowercase:Ht}=c(Re);Lt&&(se||(se=[]),se.push({original:Re,originalLowercase:Re.toLowerCase(),pathNormalized:dt,normalized:Lt,normalizedLowercase:Ht,expectContiguousMatch:We}))}return{original:he,originalLowercase:Le,pathNormalized:we,normalized:ve,normalizedLowercase:ie,values:se,containsPathSeparator:W,expectContiguousMatch:U}}function c(he){let Le;I.i?Le=he.replace(/\//g,j.h):Le=he.replace(/\\/g,j.h);const we=Object(v.T)(Le).replace(/\s|"/g,"");return{pathNormalized:Le,normalized:we,normalizedLowercase:we.toLowerCase()}}function p(he){return Array.isArray(he)?u(he.map(Le=>Le.original).join(b)):u(he.original)}var S=t("pmY6"),E=t("aokT"),y=t("twdY"),O=t("6OMU"),k=t("/cxE"),Q=t("JYp7"),q=t("QDVR"),z=t("al33");class J{remove(){this.parent&&this.parent.children.delete(this.id)}static findId(he,Le){let we;typeof he=="string"?we=`${Le.id}/${he}`:(we=`${Le.id}/${he.name}`,Le.children.get(we)!==void 0&&(we=`${Le.id}/${he.name}_${he.range.startLineNumber}_${he.range.startColumn}`));let ve=we;for(let ie=0;Le.children.get(ve)!==void 0;ie++)ve=`${we}_${ie}`;return ve}static empty(he){return he.children.size===0}}class re extends J{constructor(he,Le,we){super();this.id=he,this.parent=Le,this.symbol=we,this.children=new Map}}class Z extends J{constructor(he,Le,we,ve){super();this.id=he,this.parent=Le,this.label=we,this.order=ve,this.children=new Map}}class ne extends J{constructor(he){super();this.uri=he,this.id="root",this.parent=void 0,this._groups=new Map,this.children=new Map,this.id="root",this.parent=void 0}static create(he,Le){let we=this._keys.for(he,!0),ve=ne._requests.get(we);if(!ve){let ie=new x.b;ve={promiseCnt:0,source:ie,promise:ne._create(he,ie.token),model:void 0},ne._requests.set(we,ve);const W=Date.now();ve.promise.then(()=>{this._requestDurations.update(he,Date.now()-W)})}return ve.model?Promise.resolve(ve.model):(ve.promiseCnt+=1,Le.onCancellationRequested(()=>{--ve.promiseCnt===0&&(ve.source.cancel(),ne._requests.delete(we))}),new Promise((ie,W)=>{ve.promise.then(U=>{ve.model=U,ie(U)},U=>{ne._requests.delete(we),W(U)})}))}static _create(he,Le){const we=new x.b(Le),ve=new ne(he.uri),ie=y.m.ordered(he),W=ie.map((se,je)=>{var Re;let We=J.findId(`provider_${je}`,ve),dt=new Z(We,ve,(Re=se.displayName)!==null&&Re!==void 0?Re:"Unknown Outline Provider",je);return Promise.resolve(se.provideDocumentSymbols(he,we.token)).then(Lt=>{for(const Ht of Lt||[])ne._makeOutlineElement(Ht,dt);return dt},Lt=>(Object(k.g)(Lt),dt)).then(Lt=>{J.empty(Lt)?Lt.remove():ve._groups.set(We,Lt)})}),U=y.m.onDidChange(()=>{const se=y.m.ordered(he);Object(O.g)(se,ie)||we.cancel()});return Promise.all(W).then(()=>we.token.isCancellationRequested&&!Le.isCancellationRequested?ne._create(he,Le):ve._compact()).finally(()=>{U.dispose()})}static _makeOutlineElement(he,Le){let we=J.findId(he,Le),ve=new re(we,Le,he);if(he.children)for(const ie of he.children)ne._makeOutlineElement(ie,ve);Le.children.set(ve.id,ve)}_compact(){let he=0;for(const[Le,we]of this._groups)we.children.size===0?this._groups.delete(Le):he+=1;if(he!==1)this.children=this._groups;else{let Le=Q.a.first(this._groups.values());for(let[,we]of Le.children)we.parent=this,this.children.set(we.id,we)}return this}getTopLevelSymbols(){const he=[];for(const Le of this.children.values())Le instanceof re?he.push(Le.symbol):he.push(...Q.a.map(Le.children.values(),we=>we.symbol));return he.sort((Le,we)=>E.a.compareRangesUsingStarts(Le.range,we.range))}asListOfDocumentSymbols(){const he=this.getTopLevelSymbols(),Le=[];return ne._flattenDocumentSymbols(Le,he,""),Le.sort((we,ve)=>E.a.compareRangesUsingStarts(we.range,ve.range))}static _flattenDocumentSymbols(he,Le,we){for(const ve of Le)he.push({kind:ve.kind,tags:ve.tags,name:ve.name,detail:ve.detail,containerName:ve.containerName||we,range:ve.range,selectionRange:ve.selectionRange,children:void 0}),ve.children&&ne._flattenDocumentSymbols(he,ve.children,ve.name)}}ne._requestDurations=new z.b(y.m,350),ne._requests=new q.a(9,.75),ne._keys=new class{constructor(){this._counter=1,this._data=new WeakMap}for(he,Le){return`${he.id}/${Le?he.getVersionId():""}/${this._hash(y.m.all(he))}`}_hash(he){let Le="";for(const we of he){let ve=this._data.get(we);typeof ve=="undefined"&&(ve=this._counter++,this._data.set(we,ve)),Le+=ve}return Le}};var le=t("H+DO"),_e=t("3/fG"),Ce=function(he,Le,we,ve){function ie(W){return W instanceof we?W:new we(function(U){U(W)})}return new(we||(we=Promise))(function(W,U){function se(We){try{Re(ve.next(We))}catch(dt){U(dt)}}function je(We){try{Re(ve.throw(We))}catch(dt){U(dt)}}function Re(We){We.done?W(We.value):ie(We.value).then(se,je)}Re((ve=ve.apply(he,Le||[])).next())})};class oe extends le.a{constructor(he=Object.create(null)){super(he);this.options=he,this.options.canAcceptInBackground=!0}provideWithoutTextEditor(he){return this.provideLabelPick(he,Object(_e.a)("cannotRunGotoSymbolWithoutEditor","To go to a symbol, first open a text editor with symbol information.")),S.a.None}provideWithTextEditor(he,Le,we){const ve=he.editor,ie=this.getModel(ve);return ie?y.m.has(ie)?this.doProvideWithEditorSymbols(he,ie,Le,we):this.doProvideWithoutEditorSymbols(he,ie,Le,we):S.a.None}doProvideWithoutEditorSymbols(he,Le,we,ve){const ie=new S.b;return this.provideLabelPick(we,Object(_e.a)("cannotRunGotoSymbolWithoutSymbolProvider","The active text editor does not provide symbol information.")),(()=>Ce(this,void 0,void 0,function*(){const W=yield this.waitForLanguageSymbolRegistry(Le,ie);if(!W||ve.isCancellationRequested)return;ie.add(this.doProvideWithEditorSymbols(he,Le,we,ve))}))(),ie}provideLabelPick(he,Le){he.items=[{label:Le,index:0,kind:14}],he.ariaLabel=Le}waitForLanguageSymbolRegistry(he,Le){return Ce(this,void 0,void 0,function*(){if(y.m.has(he))return!0;let we;const ve=new Promise(W=>we=W),ie=Le.add(y.m.onDidChange(()=>{y.m.has(he)&&(ie.dispose(),we(!0))}));return Le.add(Object(S.i)(()=>we(!1))),ve})}doProvideWithEditorSymbols(he,Le,we,ve){const ie=he.editor,W=new S.b;W.add(we.onDidAccept(We=>{const[dt]=we.selectedItems;dt&&dt.range&&(this.gotoLocation(he,{range:dt.range.selection,keyMods:we.keyMods,preserveFocus:We.inBackground}),We.inBackground||we.hide())})),W.add(we.onDidTriggerItemButton(({item:We})=>{We&&We.range&&(this.gotoLocation(he,{range:We.range.selection,keyMods:we.keyMods,forceSideBySide:!0}),we.hide())}));const U=this.getDocumentSymbols(Le,ve);let se;const je=()=>Ce(this,void 0,void 0,function*(){se==null||se.dispose(!0),we.busy=!1,se=new x.b(ve),we.busy=!0;try{const We=u(we.value.substr(oe.PREFIX.length).trim()),dt=yield this.doGetSymbolPicks(U,We,void 0,se.token);if(ve.isCancellationRequested)return;dt.length>0?we.items=dt:We.original.length>0?this.provideLabelPick(we,Object(_e.a)("noMatchingSymbolResults","No matching editor symbols")):this.provideLabelPick(we,Object(_e.a)("noSymbolResults","No editor symbols"))}finally{ve.isCancellationRequested||(we.busy=!1)}});W.add(we.onDidChangeValue(()=>je())),je();let Re=!0;return W.add(we.onDidChangeActive(()=>{const[We]=we.activeItems;if(We&&We.range){if(Re){Re=!1;return}ie.revealRangeInCenter(We.range.selection,0),this.addDecorations(ie,We.range.decoration)}})),W}doGetSymbolPicks(he,Le,we,ve){return Ce(this,void 0,void 0,function*(){const ie=yield he;if(ve.isCancellationRequested)return[];const W=Le.original.indexOf(oe.SCOPE_PREFIX)===0,U=W?1:0;let se,je;Le.values&&Le.values.length>1?(se=p(Le.values[0]),je=p(Le.values.slice(1))):se=Le;const Re=[];for(let Ht=0;Ht<ie.length;Ht++){const $e=ie[Ht],ot=Object(v.U)($e.name),ce=`$(symbol-${y.C.toString($e.kind)||"property"}) ${ot}`,Ve=ce.length-ot.length;let it=$e.containerName;(we==null?void 0:we.extraContainerLabel)&&(it?it=`${we.extraContainerLabel} \u2022 ${it}`:it=we.extraContainerLabel);let Et,It,Rt,vo;if(Le.original.length>U){let xo=!1;if(se!==Le&&([Et,It]=m(ce,Object.assign(Object.assign({},Le),{values:void 0}),U,Ve),typeof Et=="number"&&(xo=!0)),typeof Et!="number"&&([Et,It]=m(ce,se,U,Ve),typeof Et!="number"))continue;if(!xo&&je){if(it&&je.original.length>0&&([Rt,vo]=m(it,je)),typeof Rt!="number")continue;typeof Et=="number"&&(Et+=Rt)}}const Mo=$e.tags&&$e.tags.indexOf(1)>=0;Re.push({index:Ht,kind:$e.kind,score:Et,label:ce,ariaLabel:ot,description:it,highlights:Mo?void 0:{label:It,description:vo},range:{selection:E.a.collapseToStart($e.selectionRange),decoration:$e.range},strikethrough:Mo,buttons:(()=>{var xo,Do;const Lo=((xo=this.options)===null||xo===void 0?void 0:xo.openSideBySideDirection)?(Do=this.options)===null||Do===void 0?void 0:Do.openSideBySideDirection():void 0;return Lo?[{iconClass:Lo==="right"?R.b.splitHorizontal.classNames:R.b.splitVertical.classNames,tooltip:Lo==="right"?Object(_e.a)("openToSide","Open to the Side"):Object(_e.a)("openToBottom","Open to the Bottom")}]:void 0})()})}const We=Re.sort((Ht,$e)=>W?this.compareByKindAndScore(Ht,$e):this.compareByScore(Ht,$e));let dt=[];if(W){let Ht,$e,ot=0;function Lt(){$e&&typeof Ht=="number"&&ot>0&&($e.label=Object(v.v)(V[Ht]||ae,ot))}for(const ce of We)Ht!==ce.kind?(Lt(),Ht=ce.kind,ot=1,$e={type:"separator"},dt.push($e)):ot++,dt.push(ce);Lt()}else We.length>0&&(dt=[{label:Object(_e.a)("symbols","symbols ({0})",Re.length),type:"separator"},...We]);return dt})}compareByScore(he,Le){if(typeof he.score!="number"&&typeof Le.score=="number")return 1;if(typeof he.score=="number"&&typeof Le.score!="number")return-1;if(typeof he.score=="number"&&typeof Le.score=="number"){if(he.score>Le.score)return-1;if(he.score<Le.score)return 1}return he.index<Le.index?-1:he.index>Le.index?1:0}compareByKindAndScore(he,Le){const we=V[he.kind]||ae,ve=V[Le.kind]||ae,ie=we.localeCompare(ve);return ie===0?this.compareByScore(he,Le):ie}getDocumentSymbols(he,Le){return Ce(this,void 0,void 0,function*(){const we=yield ne.create(he,Le);return Le.isCancellationRequested?[]:we.asListOfDocumentSymbols()})}}oe.PREFIX="@",oe.SCOPE_PREFIX=":",oe.PREFIX_BY_CATEGORY=`${oe.PREFIX}${oe.SCOPE_PREFIX}`;const ae=Object(_e.a)("property","properties ({0})"),V={[5]:Object(_e.a)("method","methods ({0})"),[11]:Object(_e.a)("function","functions ({0})"),[8]:Object(_e.a)("_constructor","constructors ({0})"),[12]:Object(_e.a)("variable","variables ({0})"),[4]:Object(_e.a)("class","classes ({0})"),[22]:Object(_e.a)("struct","structs ({0})"),[23]:Object(_e.a)("event","events ({0})"),[24]:Object(_e.a)("operator","operators ({0})"),[10]:Object(_e.a)("interface","interfaces ({0})"),[2]:Object(_e.a)("namespace","namespaces ({0})"),[3]:Object(_e.a)("package","packages ({0})"),[25]:Object(_e.a)("typeParameter","type parameters ({0})"),[1]:Object(_e.a)("modules","modules ({0})"),[6]:Object(_e.a)("property","properties ({0})"),[9]:Object(_e.a)("enum","enumerations ({0})"),[21]:Object(_e.a)("enumMember","enumeration members ({0})"),[14]:Object(_e.a)("string","strings ({0})"),[0]:Object(_e.a)("file","files ({0})"),[17]:Object(_e.a)("array","arrays ({0})"),[15]:Object(_e.a)("number","numbers ({0})"),[16]:Object(_e.a)("boolean","booleans ({0})"),[18]:Object(_e.a)("object","objects ({0})"),[19]:Object(_e.a)("key","keys ({0})"),[7]:Object(_e.a)("field","fields ({0})"),[13]:Object(_e.a)("constant","constants ({0})")};var G=t("ic2d"),ee=t("Lx4V"),pe=t("Vxe3"),Te=t("746U"),Ie=t("A9l+"),Me=t("MI8n"),Oe=t("sswD"),Xe=t("wQH0"),fe=t("Zr1c"),Pe=function(he,Le,we,ve){var ie=arguments.length,W=ie<3?Le:ve===null?ve=Object.getOwnPropertyDescriptor(Le,we):ve,U;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")W=Reflect.decorate(he,Le,we,ve);else for(var se=he.length-1;se>=0;se--)(U=he[se])&&(W=(ie<3?U(W):ie>3?U(Le,we,W):U(Le,we))||W);return ie>3&&W&&Object.defineProperty(Le,we,W),W},Be=function(he,Le){return function(we,ve){Le(we,ve,he)}};let Se=class extends oe{constructor(Le){super();this.editorService=Le,this.onDidActiveTextEditorControlChange=Me.c.None}get activeTextEditorControl(){return Object(Te.p)(this.editorService.getFocusedCodeEditor())}};Se=Pe([Be(0,pe.a)],Se),G.a.as(ee.b.Quickaccess).registerQuickAccessProvider({ctor:Se,prefix:oe.PREFIX,helpEntries:[{description:Ie.e.quickOutlineActionLabel,prefix:oe.PREFIX,needsEditor:!0},{description:Ie.e.quickOutlineByCategoryActionLabel,prefix:oe.PREFIX_BY_CATEGORY,needsEditor:!0}]});class me extends Oe.b{constructor(){super({id:"editor.action.quickOutline",label:Ie.e.quickOutlineActionLabel,alias:"Go to Symbol...",precondition:Xe.a.hasDocumentSymbolProvider,kbOpts:{kbExpr:Xe.a.focus,primary:2048|1024|45,weight:100},contextMenuOpts:{group:"navigation",order:3}})}run(he){he.get(fe.a).quickAccess.show(oe.PREFIX)}}Object(Oe.j)(me)},hFdI:function(mt,M,t){"use strict";t.r(M);var g=t("+hIS");Object(g.a)({id:"html",extensions:[".html",".htm",".shtml",".xhtml",".mdoc",".jsp",".asp",".aspx",".jshtm"],aliases:["HTML","htm","html","xhtml"],mimetypes:["text/html","text/x-jshtm","text/template","text/ng-template"],loader:function(){return t.e(336).then(t.bind(null,"tpLM"))}})},hHjc:function(mt,M,t){},hJVp:function(mt,M,t){"use strict";t.d(M,"b",function(){return w}),t.d(M,"f",function(){return b}),t.d(M,"g",function(){return u}),t.d(M,"e",function(){return c}),t.d(M,"c",function(){return p}),t.d(M,"a",function(){return S}),t.d(M,"d",function(){return O});var g=t("6OMU"),B=t("JQT/"),x=t("/cxE"),R=t("pmY6"),A=t("bY76"),j=t("vATl"),I=t("aokT"),v=t("gCVg"),C=t("twdY"),m=t("G2kB"),d=t("nnTU"),D=t("tTk5"),L=t("nlbu"),r=function(q,z,J,re){function Z(ne){return ne instanceof J?ne:new J(function(le){le(ne)})}return new(J||(J=Promise))(function(ne,le){function _e(ae){try{oe(re.next(ae))}catch(V){le(V)}}function Ce(ae){try{oe(re.throw(ae))}catch(V){le(V)}}function oe(ae){ae.done?ne(ae.value):Z(ae.value).then(_e,Ce)}oe((re=re.apply(q,z||[])).next())})};const w="editor.action.codeAction",b="editor.action.refactor",u="editor.action.sourceAction",c="editor.action.organizeImports",p="editor.action.fixAll";class S{constructor(q,z){this.action=q,this.provider=z}resolve(q){var z;return r(this,void 0,void 0,function*(){if(((z=this.provider)===null||z===void 0?void 0:z.resolveCodeAction)&&!this.action.edit){let J;try{J=yield this.provider.resolveCodeAction(this.action,q)}catch(re){Object(x.g)(re)}J&&(this.action.edit=J.edit)}return this})}}class E extends R.a{constructor(q,z,J){super();this.documentation=z,this._register(J),this.allActions=[...q].sort(E.codeActionsComparator),this.validActions=this.allActions.filter(({action:re})=>!re.disabled)}static codeActionsComparator({action:q},{action:z}){return q.isPreferred&&!z.isPreferred?-1:!q.isPreferred&&z.isPreferred?1:Object(g.n)(q.diagnostics)?Object(g.n)(z.diagnostics)?q.diagnostics[0].message.localeCompare(z.diagnostics[0].message):-1:Object(g.n)(z.diagnostics)?1:0}get hasAutoFix(){return this.validActions.some(({action:q})=>!!q.kind&&L.b.QuickFix.contains(new L.b(q.kind))&&!!q.isPreferred)}}const y={actions:[],documentation:void 0};function O(q,z,J,re,Z){var ne;const le=J.filter||{},_e={only:(ne=le.include)===null||ne===void 0?void 0:ne.value,trigger:J.type},Ce=new j.d(q,Z),oe=k(q,le),ae=new R.b,V=oe.map(ee=>r(this,void 0,void 0,function*(){try{re.report(ee);const pe=yield ee.provideCodeActions(q,z,_e,Ce.token);if(pe&&ae.add(pe),Ce.token.isCancellationRequested)return y;const Te=((pe==null?void 0:pe.actions)||[]).filter(Me=>Me&&Object(L.c)(le,Me)),Ie=Q(ee,Te,le.include);return{actions:Te.map(Me=>new S(Me,ee)),documentation:Ie}}catch(pe){if(Object(x.e)(pe))throw pe;return Object(x.g)(pe),y}})),G=C.a.onDidChange(()=>{const ee=C.a.all(q);Object(g.g)(ee,oe)||Ce.cancel()});return Promise.all(V).then(ee=>{const pe=Object(g.k)(ee.map(Ie=>Ie.actions)),Te=Object(g.e)(ee.map(Ie=>Ie.documentation));return new E(pe,Te,ae)}).finally(()=>{G.dispose(),Ce.dispose()})}function k(q,z){return C.a.all(q).filter(J=>J.providedCodeActionKinds?J.providedCodeActionKinds.some(re=>Object(L.d)(z,new L.b(re))):!0)}function Q(q,z,J){if(!q.documentation)return;const re=q.documentation.map(Z=>({kind:new L.b(Z.kind),command:Z.command}));if(J){let Z;for(const ne of re)ne.kind.contains(J)&&(Z?Z.kind.contains(ne.kind)&&(Z=ne):Z=ne);if(Z)return Z==null?void 0:Z.command}for(const Z of z){if(!Z.kind)continue;for(const ne of re)if(ne.kind.contains(new L.b(Z.kind)))return ne.command}return}d.a.registerCommand("_executeCodeActionProvider",function(q,z,J,re,Z){return r(this,void 0,void 0,function*(){if(!(z instanceof A.a))throw Object(x.c)();const ne=q.get(m.a).getModel(z);if(!ne)throw Object(x.c)();const le=v.a.isISelection(J)?v.a.liftSelection(J):I.a.isIRange(J)?ne.validateRange(J):void 0;if(!le)throw Object(x.c)();const _e=typeof re=="string"?new L.b(re):void 0,Ce=yield O(ne,le,{type:1,filter:{includeSourceActions:!0,include:_e}},D.b.None,B.a.None),oe=[],ae=Math.min(Ce.validActions.length,typeof Z=="number"?Z:0);for(let V=0;V<ae;V++)oe.push(Ce.validActions[V].resolve(B.a.None));try{return yield Promise.all(oe),Ce.validActions.map(V=>V.action)}finally{setTimeout(()=>Ce.dispose(),100)}})})},hN88:function(mt,M,t){"use strict";t.d(M,"b",function(){return O}),t.d(M,"a",function(){return Q}),t.d(M,"c",function(){return q}),t.d(M,"d",function(){return J}),t.d(M,"e",function(){return le});var g=t("OBOq"),B=t("6OMU"),x=t("JQT/"),R=t("/cxE"),A=t("JYp7"),j=t("24hK"),I=t("746U"),v=t("bY76"),C=t("vATl"),m=t("sFUC"),d=t("cGHE"),D=t("aokT"),L=t("gCVg"),r=t("twdY"),w=t("pAvP"),b=t("t49l"),u=t("Cduo"),c=t("3/fG"),p=t("nnTU");class S{constructor(_e){this.value=_e,this._lower=_e.toLowerCase()}static toKey(_e){return typeof _e=="string"?_e.toLowerCase():_e._lower}}var E=t("Cg/j"),y=function(_e,Ce,oe,ae){function V(G){return G instanceof oe?G:new oe(function(ee){ee(G)})}return new(oe||(oe=Promise))(function(G,ee){function pe(Me){try{Ie(ae.next(Me))}catch(Oe){ee(Oe)}}function Te(Me){try{Ie(ae.throw(Me))}catch(Oe){ee(Oe)}}function Ie(Me){Me.done?G(Me.value):V(Me.value).then(pe,Te)}Ie((ae=ae.apply(_e,Ce||[])).next())})};function O(_e){if(_e=_e.filter(V=>V.range),!_e.length)return;let{range:Ce}=_e[0];for(let V=1;V<_e.length;V++)Ce=D.a.plusRange(Ce,_e[V].range);const{startLineNumber:oe,endLineNumber:ae}=Ce;oe===ae?_e.length===1?Object(g.a)(c.a("hint11","Made 1 formatting edit on line {0}",oe)):Object(g.a)(c.a("hintn1","Made {0} formatting edits on line {1}",_e.length,oe)):_e.length===1?Object(g.a)(c.a("hint1n","Made 1 formatting edit between lines {0} and {1}",oe,ae)):Object(g.a)(c.a("hintnn","Made {0} formatting edits between lines {1} and {2}",_e.length,oe,ae))}function k(_e){const Ce=[],oe=new Set,ae=r.g.ordered(_e);for(const G of ae)Ce.push(G),G.extensionId&&oe.add(S.toKey(G.extensionId));const V=r.j.ordered(_e);for(const G of V){if(G.extensionId){if(oe.has(S.toKey(G.extensionId)))continue;oe.add(S.toKey(G.extensionId))}Ce.push({displayName:G.displayName,extensionId:G.extensionId,provideDocumentFormattingEdits(ee,pe,Te){return G.provideDocumentRangeFormattingEdits(ee,ee.getFullModelRange(),pe,Te)}})}return Ce}class Q{static setFormatterSelector(_e){const Ce=Q._selectors.unshift(_e);return{dispose:Ce}}static select(_e,Ce,oe){return y(this,void 0,void 0,function*(){if(_e.length===0)return;const ae=A.a.first(Q._selectors);return ae?yield ae(_e,Ce,oe):void 0})}}Q._selectors=new j.a;function q(_e,Ce,oe,ae,V,G){return y(this,void 0,void 0,function*(){const ee=_e.get(E.a),pe=Object(m.b)(Ce)?Ce.getModel():Ce,Te=r.j.ordered(pe),Ie=yield Q.select(Te,pe,ae);Ie&&(V.report(Ie),yield ee.invokeFunction(z,Ie,Ce,oe,G))})}function z(_e,Ce,oe,ae,V){return y(this,void 0,void 0,function*(){const G=_e.get(w.a);let ee,pe;Object(m.b)(oe)?(ee=oe.getModel(),pe=new C.b(oe,1|4,void 0,V)):(ee=oe,pe=new C.d(oe,V));let Te=[],Ie=0;for(let Pe of Object(B.c)(ae).sort(D.a.compareRangesUsingStarts))Ie>0&&D.a.areIntersectingOrTouching(Te[Ie-1],Pe)?Te[Ie-1]=D.a.fromPositions(Te[Ie-1].getStartPosition(),Pe.getEndPosition()):Ie=Te.push(Pe);const Me=Pe=>y(this,void 0,void 0,function*(){return(yield Ce.provideDocumentRangeFormattingEdits(ee,Pe,ee.getFormattingOptions(),pe.token))||[]}),Oe=(Pe,Be)=>{if(!Pe.length||!Be.length)return!1;const Se=Pe.reduce((me,he)=>D.a.plusRange(me,he.range),Pe[0].range);if(!Be.some(me=>D.a.intersectRanges(Se,me.range)))return!1;for(let me of Pe)for(let he of Be)if(D.a.intersectRanges(me.range,he.range))return!0;return!1},Xe=[],fe=[];try{for(let Pe of Te){if(pe.token.isCancellationRequested)return!0;fe.push(yield Me(Pe))}for(let Pe=0;Pe<Te.length;++Pe)for(let Be=Pe+1;Be<Te.length;++Be){if(pe.token.isCancellationRequested)return!0;if(Oe(fe[Pe],fe[Be])){const Se=D.a.plusRange(Te[Pe],Te[Be]),me=yield Me(Se);Te.splice(Be,1),Te.splice(Pe,1),Te.push(Se),fe.splice(Be,1),fe.splice(Pe,1),fe.push(me),Pe=0,Be=0}}for(let Pe of fe){if(pe.token.isCancellationRequested)return!0;const Be=yield G.computeMoreMinimalEdits(ee.uri,Pe);Be&&Xe.push(...Be)}}finally{pe.dispose()}if(Xe.length===0)return!1;if(Object(m.b)(oe))u.a.execute(oe,Xe,!0),O(Xe),oe.revealPositionInCenterIfOutsideViewport(oe.getPosition(),1);else{const[{range:Pe}]=Xe,Be=new L.a(Pe.startLineNumber,Pe.startColumn,Pe.endLineNumber,Pe.endColumn);ee.pushEditOperations([Be],Xe.map(Se=>({text:Se.text,range:D.a.lift(Se.range),forceMoveMarkers:!0})),Se=>{for(const{range:me}of Se)if(D.a.areIntersectingOrTouching(me,Be))return[new L.a(me.startLineNumber,me.startColumn,me.endLineNumber,me.endColumn)];return null})}return!0})}function J(_e,Ce,oe,ae,V){return y(this,void 0,void 0,function*(){const G=_e.get(E.a),ee=Object(m.b)(Ce)?Ce.getModel():Ce,pe=k(ee),Te=yield Q.select(pe,ee,oe);Te&&(ae.report(Te),yield G.invokeFunction(re,Te,Ce,oe,V))})}function re(_e,Ce,oe,ae,V){return y(this,void 0,void 0,function*(){const G=_e.get(w.a);let ee,pe;Object(m.b)(oe)?(ee=oe.getModel(),pe=new C.b(oe,1|4,void 0,V)):(ee=oe,pe=new C.d(oe,V));let Te;try{const Ie=yield Ce.provideDocumentFormattingEdits(ee,ee.getFormattingOptions(),pe.token);if(Te=yield G.computeMoreMinimalEdits(ee.uri,Ie),pe.token.isCancellationRequested)return!0}finally{pe.dispose()}if(!Te||Te.length===0)return!1;if(Object(m.b)(oe))u.a.execute(oe,Te,ae!==2),ae!==2&&(O(Te),oe.revealPositionInCenterIfOutsideViewport(oe.getPosition(),1));else{const[{range:Ie}]=Te,Me=new L.a(Ie.startLineNumber,Ie.startColumn,Ie.endLineNumber,Ie.endColumn);ee.pushEditOperations([Me],Te.map(Oe=>({text:Oe.text,range:D.a.lift(Oe.range),forceMoveMarkers:!0})),Oe=>{for(const{range:Xe}of Oe)if(D.a.areIntersectingOrTouching(Xe,Me))return[new L.a(Xe.startLineNumber,Xe.startColumn,Xe.endLineNumber,Xe.endColumn)];return null})}return!0})}function Z(_e,Ce,oe,ae,V){return y(this,void 0,void 0,function*(){const G=r.j.ordered(Ce);for(const ee of G){let pe=yield Promise.resolve(ee.provideDocumentRangeFormattingEdits(Ce,oe,ae,V)).catch(R.g);if(Object(B.n)(pe))return yield _e.computeMoreMinimalEdits(Ce.uri,pe)}return})}function ne(_e,Ce,oe,ae){return y(this,void 0,void 0,function*(){const V=k(Ce);for(const G of V){let ee=yield Promise.resolve(G.provideDocumentFormattingEdits(Ce,oe,ae)).catch(R.g);if(Object(B.n)(ee))return yield _e.computeMoreMinimalEdits(Ce.uri,ee)}return})}function le(_e,Ce,oe,ae,V){const G=r.w.ordered(Ce);return G.length===0||G[0].autoFormatTriggerCharacters.indexOf(ae)<0?Promise.resolve(void 0):Promise.resolve(G[0].provideOnTypeFormattingEdits(Ce,oe,ae,V,x.a.None)).catch(R.g).then(ee=>_e.computeMoreMinimalEdits(Ce.uri,ee))}p.a.registerCommand("_executeFormatRangeProvider",function(_e,...Ce){return y(this,void 0,void 0,function*(){const[oe,ae,V]=Ce;Object(I.c)(v.a.isUri(oe)),Object(I.c)(D.a.isIRange(ae));const G=_e.get(b.a),ee=_e.get(w.a),pe=yield G.createModelReference(oe);try{return Z(ee,pe.object.textEditorModel,D.a.lift(ae),V,x.a.None)}finally{pe.dispose()}})}),p.a.registerCommand("_executeFormatDocumentProvider",function(_e,...Ce){return y(this,void 0,void 0,function*(){const[oe,ae]=Ce;Object(I.c)(v.a.isUri(oe));const V=_e.get(b.a),G=_e.get(w.a),ee=yield V.createModelReference(oe);try{return ne(G,ee.object.textEditorModel,ae,x.a.None)}finally{ee.dispose()}})}),p.a.registerCommand("_executeFormatOnTypeProvider",function(_e,...Ce){return y(this,void 0,void 0,function*(){const[oe,ae,V,G]=Ce;Object(I.c)(v.a.isUri(oe)),Object(I.c)(d.a.isIPosition(ae)),Object(I.c)(typeof V=="string");const ee=_e.get(b.a),pe=_e.get(w.a),Te=yield ee.createModelReference(oe);try{return le(pe,Te.object.textEditorModel,d.a.lift(ae),V,G)}finally{Te.dispose()}})})},"i/Ef":function(mt,M,t){"use strict";t.d(M,"b",function(){return x}),t.d(M,"a",function(){return R}),t.d(M,"c",function(){return A}),t.d(M,"d",function(){return j});var g=t("Tcc1");class B{clone(){return this}equals(I){return this===I}}const x=new B,R="vs.editor.nullMode";function A(I,v,C,m){return new g.b([new g.a(m,"",I)],C)}function j(I,v,C,m){let d=new Uint32Array(2);return d[0]=m,d[1]=(I<<0|0<<8|0<<11|1<<14|2<<23)>>>0,new g.c(d,C===null?x:C)}},"i/Rh":function(mt,M,t){},i04g:function(mt,M,t){"use strict";t.d(M,"c",function(){return x}),t.d(M,"a",function(){return R}),t.d(M,"b",function(){return A});var g=t("3/fG");class B{constructor(I,v,C=v){this.modifierLabels=[null],this.modifierLabels[2]=I,this.modifierLabels[1]=v,this.modifierLabels[3]=C}toLabel(I,v,C){if(v.length===0)return null;const m=[];for(let d=0,D=v.length;d<D;d++){const L=v[d],r=C(L);if(r===null)return null;m[d]=j(L,r,this.modifierLabels[I])}return m.join(" ")}}const x=new B({ctrlKey:"\u2303",shiftKey:"\u21E7",altKey:"\u2325",metaKey:"\u2318",separator:""},{ctrlKey:g.a({key:"ctrlKey",comment:["This is the short form for the Control key on the keyboard"]},"Ctrl"),shiftKey:g.a({key:"shiftKey",comment:["This is the short form for the Shift key on the keyboard"]},"Shift"),altKey:g.a({key:"altKey",comment:["This is the short form for the Alt key on the keyboard"]},"Alt"),metaKey:g.a({key:"windowsKey",comment:["This is the short form for the Windows key on the keyboard"]},"Windows"),separator:"+"},{ctrlKey:g.a({key:"ctrlKey",comment:["This is the short form for the Control key on the keyboard"]},"Ctrl"),shiftKey:g.a({key:"shiftKey",comment:["This is the short form for the Shift key on the keyboard"]},"Shift"),altKey:g.a({key:"altKey",comment:["This is the short form for the Alt key on the keyboard"]},"Alt"),metaKey:g.a({key:"superKey",comment:["This is the short form for the Super key on the keyboard"]},"Super"),separator:"+"}),R=new B({ctrlKey:g.a({key:"ctrlKey.long",comment:["This is the long form for the Control key on the keyboard"]},"Control"),shiftKey:g.a({key:"shiftKey.long",comment:["This is the long form for the Shift key on the keyboard"]},"Shift"),altKey:g.a({key:"altKey.long",comment:["This is the long form for the Alt key on the keyboard"]},"Alt"),metaKey:g.a({key:"cmdKey.long",comment:["This is the long form for the Command key on the keyboard"]},"Command"),separator:"+"},{ctrlKey:g.a({key:"ctrlKey.long",comment:["This is the long form for the Control key on the keyboard"]},"Control"),shiftKey:g.a({key:"shiftKey.long",comment:["This is the long form for the Shift key on the keyboard"]},"Shift"),altKey:g.a({key:"altKey.long",comment:["This is the long form for the Alt key on the keyboard"]},"Alt"),metaKey:g.a({key:"windowsKey.long",comment:["This is the long form for the Windows key on the keyboard"]},"Windows"),separator:"+"},{ctrlKey:g.a({key:"ctrlKey.long",comment:["This is the long form for the Control key on the keyboard"]},"Control"),shiftKey:g.a({key:"shiftKey.long",comment:["This is the long form for the Shift key on the keyboard"]},"Shift"),altKey:g.a({key:"altKey.long",comment:["This is the long form for the Alt key on the keyboard"]},"Alt"),metaKey:g.a({key:"superKey.long",comment:["This is the long form for the Super key on the keyboard"]},"Super"),separator:"+"}),A=new B({ctrlKey:"Ctrl",shiftKey:"Shift",altKey:"Alt",metaKey:"Cmd",separator:"+"},{ctrlKey:"Ctrl",shiftKey:"Shift",altKey:"Alt",metaKey:"Super",separator:"+"});function j(I,v,C){if(v===null)return"";const m=[];return I.ctrlKey&&m.push(C.ctrlKey),I.shiftKey&&m.push(C.shiftKey),I.altKey&&m.push(C.altKey),I.metaKey&&m.push(C.metaKey),v!==""&&m.push(v),m.join(C.separator)}},iDAx:function(mt,M,t){"use strict";t.d(M,"b",function(){return D}),t.d(M,"a",function(){return p}),t.d(M,"d",function(){return q}),t.d(M,"c",function(){return z});var g=t("3/fG"),B=t("MI8n"),x=t("pmY6"),R=t("qj0h"),A=t("6OMU"),j=t("/UlZ"),I=t("Yr1X"),v=t("+3Gp"),C=t("CRAX"),m=t("ic2d"),d=t("vl9R");const D=new class{constructor(){this._tabFocus=!1,this._onDidChangeTabFocus=new B.b,this.onDidChangeTabFocus=this._onDidChangeTabFocus.event}getTabFocusMode(){return this._tabFocus}setTabFocusMode(J){if(this._tabFocus===J)return;this._tabFocus=J,this._onDidChangeTabFocus.fire(this._tabFocus)}},L=Object.hasOwnProperty;class r{constructor(){this._values=[]}_read(J){return this._values[J]}get(J){return this._values[J]}_write(J,re){this._values[J]=re}}class w{constructor(){this._values=[]}_read(J){return this._values[J]}_write(J,re){this._values[J]=re}}class b{static readOptions(J){const re=J,Z=new w;for(const ne of j.m){const le=ne.name==="_never_"?void 0:re[ne.name];Z._write(ne.id,le)}return Z}static validateOptions(J){const re=new j.j;for(const Z of j.m)re._write(Z.id,Z.validate(J._read(Z.id)));return re}static computeOptions(J,re){const Z=new r;for(const ne of j.m)Z._write(ne.id,ne.compute(re,Z,J._read(ne.id)));return Z}static _deepEquals(J,re){if(typeof J!="object"||typeof re!="object")return J===re;if(Array.isArray(J)||Array.isArray(re))return Array.isArray(J)&&Array.isArray(re)?A.g(J,re):!1;for(let Z in J)if(!b._deepEquals(J[Z],re[Z]))return!1;return!0}static checkEquals(J,re){const Z=[];let ne=!1;for(const le of j.m){const _e=!b._deepEquals(J._read(le.id),re._read(le.id));Z[le.id]=_e,_e&&(ne=!0)}return ne?new j.b(Z):null}}function u(J){const re=J.wordWrap;re===!0?J.wordWrap="on":re===!1&&(J.wordWrap="off");const Z=J.lineNumbers;Z===!0?J.lineNumbers="on":Z===!1&&(J.lineNumbers="off");const ne=J.autoClosingBrackets;ne===!1&&(J.autoClosingBrackets="never",J.autoClosingQuotes="never",J.autoSurround="never");const le=J.cursorBlinking;le==="visible"&&(J.cursorBlinking="solid");const _e=J.renderWhitespace;_e===!0?J.renderWhitespace="boundary":_e===!1&&(J.renderWhitespace="none");const Ce=J.renderLineHighlight;Ce===!0?J.renderLineHighlight="line":Ce===!1&&(J.renderLineHighlight="none");const oe=J.acceptSuggestionOnEnter;oe===!0?J.acceptSuggestionOnEnter="on":oe===!1&&(J.acceptSuggestionOnEnter="off");const ae=J.tabCompletion;ae===!1?J.tabCompletion="off":ae===!0&&(J.tabCompletion="onlySnippets");const V=J.suggest;if(V&&typeof V.filteredTypes=="object"&&V.filteredTypes){const Oe={};Oe.method="showMethods",Oe.function="showFunctions",Oe.constructor="showConstructors",Oe.deprecated="showDeprecated",Oe.field="showFields",Oe.variable="showVariables",Oe.class="showClasses",Oe.struct="showStructs",Oe.interface="showInterfaces",Oe.module="showModules",Oe.property="showProperties",Oe.event="showEvents",Oe.operator="showOperators",Oe.unit="showUnits",Oe.value="showValues",Oe.constant="showConstants",Oe.enum="showEnums",Oe.enumMember="showEnumMembers",Oe.keyword="showKeywords",Oe.text="showWords",Oe.color="showColors",Oe.file="showFiles",Oe.reference="showReferences",Oe.folder="showFolders",Oe.typeParameter="showTypeParameters",Oe.snippet="showSnippets",Object(d.b)(Oe,Xe=>{const fe=V.filteredTypes[Xe.key];fe===!1&&(V[Xe.value]=fe)})}const G=J.hover;G===!0?J.hover={enabled:!0}:G===!1&&(J.hover={enabled:!1});const ee=J.parameterHints;ee===!0?J.parameterHints={enabled:!0}:ee===!1&&(J.parameterHints={enabled:!1});const pe=J.autoIndent;pe===!0?J.autoIndent="full":pe===!1&&(J.autoIndent="advanced");const Te=J.matchBrackets;Te===!0?J.matchBrackets="always":Te===!1&&(J.matchBrackets="never");const{renderIndentGuides:Ie,highlightActiveIndentGuide:Me}=J;J.guides||(J.guides={}),Ie!==void 0&&(J.guides.indentation=!!Ie),Me!==void 0&&(J.guides.highlightActiveIndentation=!!Me)}function c(J){const re=R.b(J);return u(re),re}class p extends x.a{constructor(J,re){super();this._onDidChange=this._register(new B.b),this.onDidChange=this._onDidChange.event,this._onDidChangeFast=this._register(new B.b),this.onDidChangeFast=this._onDidChangeFast.event,this.isSimpleWidget=J,this._isDominatedByLongLines=!1,this._computeOptionsMemory=new j.a,this._viewLineCount=1,this._lineNumbersDigitCount=1,this._rawOptions=c(re),this._readOptions=b.readOptions(this._rawOptions),this._validatedOptions=b.validateOptions(this._readOptions),this._register(I.a.onDidChangeZoomLevel(Z=>this._recomputeOptions())),this._register(D.onDidChangeTabFocus(Z=>this._recomputeOptions()))}observeReferenceElement(J){}updatePixelRatio(){}_recomputeOptions(){const J=this.options,re=this._computeInternalOptions();if(!J)this.options=re;else{const Z=b.checkEquals(J,re);if(Z===null)return;this.options=re,this._onDidChangeFast.fire(Z),this._onDidChange.fire(Z)}}getRawOptions(){return this._rawOptions}_computeInternalOptions(){const J=this._getEnvConfiguration(),re=v.a.createFromValidatedSettings(this._validatedOptions,J.zoomLevel,J.pixelRatio,this.isSimpleWidget),Z={memory:this._computeOptionsMemory,outerWidth:J.outerWidth,outerHeight:J.outerHeight,fontInfo:this.readConfiguration(re),extraEditorClassName:J.extraEditorClassName,isDominatedByLongLines:this._isDominatedByLongLines,viewLineCount:this._viewLineCount,lineNumbersDigitCount:this._lineNumbersDigitCount,emptySelectionClipboard:J.emptySelectionClipboard,pixelRatio:J.pixelRatio,tabFocusMode:D.getTabFocusMode(),accessibilitySupport:J.accessibilitySupport};return b.computeOptions(this._validatedOptions,Z)}static _subsetEquals(J,re){for(const Z in re)if(L.call(re,Z)){const ne=re[Z],le=J[Z];if(le===ne)continue;if(Array.isArray(le)&&Array.isArray(ne)){if(!A.g(le,ne))return!1;continue}if(le&&typeof le=="object"&&ne&&typeof ne=="object"){if(!this._subsetEquals(le,ne))return!1;continue}return!1}return!0}updateOptions(J){if(typeof J=="undefined")return;const re=c(J);if(p._subsetEquals(this._rawOptions,re))return;this._rawOptions=R.f(this._rawOptions,re||{}),this._readOptions=b.readOptions(this._rawOptions),this._validatedOptions=b.validateOptions(this._readOptions),this._recomputeOptions()}setIsDominatedByLongLines(J){this._isDominatedByLongLines=J,this._recomputeOptions()}setMaxLineNumber(J){const re=p._digitCount(J);if(this._lineNumbersDigitCount===re)return;this._lineNumbersDigitCount=re,this._recomputeOptions()}setViewLineCount(J){if(this._viewLineCount===J)return;this._viewLineCount=J,this._recomputeOptions()}static _digitCount(J){let re=0;for(;J;)J=Math.floor(J/10),re++;return re||1}}const S=Object.freeze({id:"editor",order:5,type:"object",title:g.a("editorConfigurationTitle","Editor"),scope:5}),E=m.a.as(C.a.Configuration),y=Object.assign(Object.assign({},S),{properties:{"editor.tabSize":{type:"number",default:j.d.tabSize,minimum:1,markdownDescription:g.a("tabSize","The number of spaces a tab is equal to. This setting is overridden based on the file contents when `#editor.detectIndentation#` is on.")},"editor.insertSpaces":{type:"boolean",default:j.d.insertSpaces,markdownDescription:g.a("insertSpaces","Insert spaces when pressing `Tab`. This setting is overridden based on the file contents when `#editor.detectIndentation#` is on.")},"editor.detectIndentation":{type:"boolean",default:j.d.detectIndentation,markdownDescription:g.a("detectIndentation","Controls whether `#editor.tabSize#` and `#editor.insertSpaces#` will be automatically detected when a file is opened based on the file contents.")},"editor.trimAutoWhitespace":{type:"boolean",default:j.d.trimAutoWhitespace,description:g.a("trimAutoWhitespace","Remove trailing auto inserted whitespace.")},"editor.largeFileOptimizations":{type:"boolean",default:j.d.largeFileOptimizations,description:g.a("largeFileOptimizations","Special handling for large files to disable certain memory intensive features.")},"editor.wordBasedSuggestions":{type:"boolean",default:!0,description:g.a("wordBasedSuggestions","Controls whether completions should be computed based on words in the document.")},"editor.wordBasedSuggestionsMode":{enum:["currentDocument","matchingDocuments","allDocuments"],default:"matchingDocuments",enumDescriptions:[g.a("wordBasedSuggestionsMode.currentDocument","Only suggest words from the active document."),g.a("wordBasedSuggestionsMode.matchingDocuments","Suggest words from all open documents of the same language."),g.a("wordBasedSuggestionsMode.allDocuments","Suggest words from all open documents.")],description:g.a("wordBasedSuggestionsMode","Controls from which documents word based completions are computed.")},"editor.semanticHighlighting.enabled":{enum:[!0,!1,"configuredByTheme"],enumDescriptions:[g.a("semanticHighlighting.true","Semantic highlighting enabled for all color themes."),g.a("semanticHighlighting.false","Semantic highlighting disabled for all color themes."),g.a("semanticHighlighting.configuredByTheme","Semantic highlighting is configured by the current color theme's `semanticHighlighting` setting.")],default:"configuredByTheme",description:g.a("semanticHighlighting.enabled","Controls whether the semanticHighlighting is shown for the languages that support it.")},"editor.stablePeek":{type:"boolean",default:!1,markdownDescription:g.a("stablePeek","Keep peek editors open even when double clicking their content or when hitting `Escape`.")},"editor.maxTokenizationLineLength":{type:"integer",default:2e4,description:g.a("maxTokenizationLineLength","Lines above this length will not be tokenized for performance reasons")},"editor.language.brackets":{type:"array",default:!1,description:g.a("schema.brackets","Defines the bracket symbols that increase or decrease the indentation."),items:{type:"array",items:[{type:"string",description:g.a("schema.openBracket","The opening bracket character or string sequence.")},{type:"string",description:g.a("schema.closeBracket","The closing bracket character or string sequence.")}]}},"editor.language.colorizedBracketPairs":{type:"array",default:!1,description:g.a("schema.colorizedBracketPairs","Defines the bracket pairs that are colorized by their nesting level if bracket pair colorization is enabled."),items:{type:"array",items:[{type:"string",description:g.a("schema.openBracket","The opening bracket character or string sequence.")},{type:"string",description:g.a("schema.closeBracket","The closing bracket character or string sequence.")}]}},"diffEditor.maxComputationTime":{type:"number",default:5e3,description:g.a("maxComputationTime","Timeout in milliseconds after which diff computation is cancelled. Use 0 for no timeout.")},"diffEditor.maxFileSize":{type:"number",default:50,description:g.a("maxFileSize","Maximum file size in MB for which to compute diffs. Use 0 for no limit.")},"diffEditor.renderSideBySide":{type:"boolean",default:!0,description:g.a("sideBySide","Controls whether the diff editor shows the diff side by side or inline.")},"diffEditor.ignoreTrimWhitespace":{type:"boolean",default:!0,description:g.a("ignoreTrimWhitespace","When enabled, the diff editor ignores changes in leading or trailing whitespace.")},"diffEditor.renderIndicators":{type:"boolean",default:!0,description:g.a("renderIndicators","Controls whether the diff editor shows +/- indicators for added/removed changes.")},"diffEditor.codeLens":{type:"boolean",default:!1,description:g.a("codeLens","Controls whether the editor shows CodeLens.")},"diffEditor.wordWrap":{type:"string",enum:["off","on","inherit"],default:"inherit",markdownEnumDescriptions:[g.a("wordWrap.off","Lines will never wrap."),g.a("wordWrap.on","Lines will wrap at the viewport width."),g.a("wordWrap.inherit","Lines will wrap according to the `#editor.wordWrap#` setting.")]}}});function O(J){return typeof J.type!="undefined"||typeof J.anyOf!="undefined"}for(const J of j.m){const re=J.schema;if(typeof re!="undefined")if(O(re))y.properties[`editor.${J.name}`]=re;else for(let Z in re)L.call(re,Z)&&(y.properties[Z]=re[Z])}let k=null;function Q(){return k===null&&(k=Object.create(null),Object.keys(y.properties).forEach(J=>{k[J]=!0})),k}function q(J){const re=Q();return re[`editor.${J}`]||!1}function z(J){const re=Q();return re[`diffEditor.${J}`]||!1}E.registerConfiguration(y)},iJk1:function(mt,M,t){},iLY9:function(mt,M,t){"use strict";t.r(M);var g=t("+hIS");Object(g.a)({id:"python",extensions:[".py",".rpy",".pyw",".cpy",".gyp",".gypi"],aliases:["Python","py"],firstLine:"^#!/.*\\bpython[0-9.-]*\\b",loader:function(){return t.e(356).then(t.bind(null,"8ahN"))}})},iNS8:function(mt,M,t){"use strict";t.d(M,"a",function(){return _e}),t.d(M,"b",function(){return Ce}),t.d(M,"d",function(){return ae}),t.d(M,"c",function(){return G}),t.d(M,"p",function(){return ee}),t.d(M,"q",function(){return pe}),t.d(M,"r",function(){return Te}),t.d(M,"e",function(){return Ie}),t.d(M,"j",function(){return Me}),t.d(M,"l",function(){return Oe}),t.d(M,"k",function(){return Xe}),t.d(M,"n",function(){return fe}),t.d(M,"o",function(){return Pe}),t.d(M,"f",function(){return Be}),t.d(M,"g",function(){return Se}),t.d(M,"m",function(){return me}),t.d(M,"h",function(){return he}),t.d(M,"i",function(){return Le});var g=t("EffR"),B=t("WqXY"),x=t("8HAY"),R=t("Vhoy"),A=t("zrhQ"),j=t("MI8n"),I=t("qj0h"),v=t("e1ni"),C=t("sswD"),m=t("Vxe3"),d=t("03kh"),D=t("cMOf"),L=t("nD70"),r=t("pmY6"),w=t("uWgD"),b=t("aokT"),u=t("tX9W");const c=new A.a(new A.c(0,122,204)),p={showArrow:!0,showFrame:!0,className:"",frameColor:c,arrowColor:c,keepEditorSelection:!1},S="vs.editor.contrib.zoneWidget";class E{constructor(we,ve,ie,W,U,se){this.id="",this.domNode=we,this.afterLineNumber=ve,this.afterColumn=ie,this.heightInLines=W,this._onDomNodeTop=U,this._onComputedHeight=se}onDomNodeTop(we){this._onDomNodeTop(we)}onComputedHeight(we){this._onComputedHeight(we)}}class y{constructor(we,ve){this._id=we,this._domNode=ve}getId(){return this._id}getDomNode(){return this._domNode}getPosition(){return null}}class O{constructor(we){this._editor=we,this._ruleName=O._IdGenerator.nextId(),this._decorations=[],this._color=null,this._height=-1}dispose(){this.hide(),g.Q(this._ruleName)}set color(we){this._color!==we&&(this._color=we,this._updateStyle())}set height(we){this._height!==we&&(this._height=we,this._updateStyle())}_updateStyle(){g.Q(this._ruleName),g.v(`.monaco-editor ${this._ruleName}`,`border-style: solid; border-color: transparent; border-bottom-color: ${this._color}; border-width: ${this._height}px; bottom: -${this._height}px; margin-left: -${this._height}px; `)}show(we){this._decorations=this._editor.deltaDecorations(this._decorations,[{range:b.a.fromPositions(we),options:{description:"zone-widget-arrow",className:this._ruleName,stickiness:1}}])}hide(){this._editor.deltaDecorations(this._decorations,[])}}O._IdGenerator=new L.a(".arrow-decoration-");class k{constructor(we,ve={}){this._arrow=null,this._overlayWidget=null,this._resizeSash=null,this._positionMarkerId=[],this._viewZone=null,this._disposables=new r.b,this.container=null,this._isShowing=!1,this.editor=we,this.options=I.b(ve),I.f(this.options,p,!1),this.domNode=document.createElement("div"),this.options.isAccessible||(this.domNode.setAttribute("aria-hidden","true"),this.domNode.setAttribute("role","presentation")),this._disposables.add(this.editor.onDidLayoutChange(ie=>{const W=this._getWidth(ie);this.domNode.style.width=W+"px",this.domNode.style.left=this._getLeft(ie)+"px",this._onWidth(W)}))}dispose(){this._overlayWidget&&(this.editor.removeOverlayWidget(this._overlayWidget),this._overlayWidget=null),this._viewZone&&this.editor.changeViewZones(we=>{this._viewZone&&we.removeZone(this._viewZone.id),this._viewZone=null}),this.editor.deltaDecorations(this._positionMarkerId,[]),this._positionMarkerId=[],this._disposables.dispose()}create(){this.domNode.classList.add("zone-widget"),this.options.className&&this.domNode.classList.add(this.options.className),this.container=document.createElement("div"),this.container.classList.add("zone-widget-container"),this.domNode.appendChild(this.container),this.options.showArrow&&(this._arrow=new O(this.editor),this._disposables.add(this._arrow)),this._fillContainer(this.container),this._initSash(),this._applyStyles()}style(we){we.frameColor&&(this.options.frameColor=we.frameColor),we.arrowColor&&(this.options.arrowColor=we.arrowColor),this._applyStyles()}_applyStyles(){if(this.container&&this.options.frameColor){let we=this.options.frameColor.toString();this.container.style.borderTopColor=we,this.container.style.borderBottomColor=we}if(this._arrow&&this.options.arrowColor){let we=this.options.arrowColor.toString();this._arrow.color=we}}_getWidth(we){return we.width-we.minimap.minimapWidth-we.verticalScrollbarWidth}_getLeft(we){return we.minimap.minimapWidth>0&&we.minimap.minimapLeft===0?we.minimap.minimapWidth:0}_onViewZoneTop(we){this.domNode.style.top=we+"px"}_onViewZoneHeight(we){if(this.domNode.style.height=`${we}px`,this.container){let ve=we-this._decoratingElementsHeight();this.container.style.height=`${ve}px`;const ie=this.editor.getLayoutInfo();this._doLayout(ve,this._getWidth(ie))}this._resizeSash&&this._resizeSash.layout()}get position(){const[we]=this._positionMarkerId;if(!we)return;const ve=this.editor.getModel();if(!ve)return;const ie=ve.getDecorationRange(we);return ie?ie.getStartPosition():void 0}show(we,ve){const ie=b.a.isIRange(we)?b.a.lift(we):b.a.fromPositions(we);this._isShowing=!0,this._showImpl(ie,ve),this._isShowing=!1,this._positionMarkerId=this.editor.deltaDecorations(this._positionMarkerId,[{range:ie,options:u.b.EMPTY}])}hide(){this._viewZone&&(this.editor.changeViewZones(we=>{this._viewZone&&we.removeZone(this._viewZone.id)}),this._viewZone=null),this._overlayWidget&&(this.editor.removeOverlayWidget(this._overlayWidget),this._overlayWidget=null),this._arrow&&this._arrow.hide()}_decoratingElementsHeight(){let we=this.editor.getOption(58),ve=0;if(this.options.showArrow){let ie=Math.round(we/3);ve+=2*ie}if(this.options.showFrame){let ie=Math.round(we/9);ve+=2*ie}return ve}_showImpl(we,ve){const ie=we.getStartPosition(),W=this.editor.getLayoutInfo(),U=this._getWidth(W);this.domNode.style.width=`${U}px`,this.domNode.style.left=this._getLeft(W)+"px";const se=document.createElement("div");se.style.overflow="hidden";const je=this.editor.getOption(58),Re=Math.max(12,this.editor.getLayoutInfo().height/je*.8);ve=Math.min(ve,Re);let We=0,dt=0;if(this._arrow&&this.options.showArrow&&(We=Math.round(je/3),this._arrow.height=We,this._arrow.show(ie)),this.options.showFrame&&(dt=Math.round(je/9)),this.editor.changeViewZones($e=>{this._viewZone&&$e.removeZone(this._viewZone.id),this._overlayWidget&&(this.editor.removeOverlayWidget(this._overlayWidget),this._overlayWidget=null),this.domNode.style.top="-1000px",this._viewZone=new E(se,ie.lineNumber,ie.column,ve,ot=>this._onViewZoneTop(ot),ot=>this._onViewZoneHeight(ot)),this._viewZone.id=$e.addZone(this._viewZone),this._overlayWidget=new y(S+this._viewZone.id,this.domNode),this.editor.addOverlayWidget(this._overlayWidget)}),this.container&&this.options.showFrame){const $e=this.options.frameWidth?this.options.frameWidth:dt;this.container.style.borderTopWidth=$e+"px",this.container.style.borderBottomWidth=$e+"px"}let Lt=ve*je-this._decoratingElementsHeight();this.container&&(this.container.style.top=We+"px",this.container.style.height=Lt+"px",this.container.style.overflow="hidden"),this._doLayout(Lt,U),this.options.keepEditorSelection||this.editor.setSelection(we);const Ht=this.editor.getModel();if(Ht){const $e=we.endLineNumber+1;$e<=Ht.getLineCount()?this.revealLine($e,!1):this.revealLine(Ht.getLineCount(),!0)}}revealLine(we,ve){ve?this.editor.revealLineInCenter(we,0):this.editor.revealLine(we,0)}setCssClass(we,ve){if(!this.container)return;ve&&this.container.classList.remove(ve),this.container.classList.add(we)}_onWidth(we){}_doLayout(we,ve){}_relayout(we){this._viewZone&&this._viewZone.heightInLines!==we&&this.editor.changeViewZones(ve=>{this._viewZone&&(this._viewZone.heightInLines=we,ve.layoutZone(this._viewZone.id))})}_initSash(){if(this._resizeSash)return;this._resizeSash=this._disposables.add(new D.b(this.domNode,this,{orientation:1})),this.options.isResizeable||(this._resizeSash.hide(),this._resizeSash.state=0);let we;this._disposables.add(this._resizeSash.onDidStart(ve=>{this._viewZone&&(we={startY:ve.startY,heightInLines:this._viewZone.heightInLines})})),this._disposables.add(this._resizeSash.onDidEnd(()=>{we=void 0})),this._disposables.add(this._resizeSash.onDidChange(ve=>{if(we){let ie=(ve.currentY-we.startY)/this.editor.getOption(58),W=ie<0?Math.ceil(ie):Math.floor(ie),U=we.heightInLines+W;U>5&&U<35&&this._relayout(U)}}))}getHorizontalSashLeft(){return 0}getHorizontalSashTop(){return(this.domNode.style.height===null?0:parseInt(this.domNode.style.height))-this._decoratingElementsHeight()/2}getHorizontalSashWidth(){const we=this.editor.getLayoutInfo();return we.width-we.minimap.minimapWidth}}var Q=t("3/fG"),q=t("eUTo"),z=t("T8No"),J=t("9fML"),re=t("Cg/j"),Z=t("MD5Z"),ne=function(we,ve,ie,W){var U=arguments.length,se=U<3?ve:W===null?W=Object.getOwnPropertyDescriptor(ve,ie):W,je;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")se=Reflect.decorate(we,ve,ie,W);else for(var Re=we.length-1;Re>=0;Re--)(je=we[Re])&&(se=(U<3?je(se):U>3?je(ve,ie,se):je(ve,ie))||se);return U>3&&se&&Object.defineProperty(ve,ie,se),se},le=function(we,ve){return function(ie,W){ve(ie,W,we)}};const _e=Object(re.c)("IPeekViewService");Object(J.b)(_e,class{constructor(){this._widgets=new Map}addExclusiveWidget(we,ve){const ie=this._widgets.get(we);ie&&(ie.listener.dispose(),ie.widget.dispose());const W=()=>{const U=this._widgets.get(we);U&&U.widget===ve&&(U.listener.dispose(),this._widgets.delete(we))};this._widgets.set(we,{widget:ve,listener:ve.onDidClose(W)})}});var Ce;(function(we){we.inPeekEditor=new z.c("inReferenceSearchEditor",!0,Q.a("inReferenceSearchEditor","Whether the current code editor is embedded inside peek")),we.notInPeekEditor=we.inPeekEditor.toNegated()})(Ce||(Ce={}));let oe=class{constructor(ve,ie){ve instanceof d.a&&Ce.inPeekEditor.bindTo(ie)}dispose(){}};oe.ID="editor.contrib.referenceController",oe=ne([le(1,z.b)],oe),Object(C.l)(oe.ID,oe);function ae(we){let ve=we.get(m.a).getFocusedCodeEditor();return ve instanceof d.a?ve.getParentEditor():ve}const V={headerBackgroundColor:A.a.white,primaryHeadingColor:A.a.fromHex("#333333"),secondaryHeadingColor:A.a.fromHex("#6c6c6cb3")};let G=class extends k{constructor(ve,ie,W){super(ve,ie);this.instantiationService=W,this._onDidClose=new j.b,this.onDidClose=this._onDidClose.event,I.f(this.options,V,!1)}dispose(){this.disposed||(this.disposed=!0,super.dispose(),this._onDidClose.fire(this))}style(ve){let ie=this.options;ve.headerBackgroundColor&&(ie.headerBackgroundColor=ve.headerBackgroundColor),ve.primaryHeadingColor&&(ie.primaryHeadingColor=ve.primaryHeadingColor),ve.secondaryHeadingColor&&(ie.secondaryHeadingColor=ve.secondaryHeadingColor),super.style(ve)}_applyStyles(){super._applyStyles();let ve=this.options;this._headElement&&ve.headerBackgroundColor&&(this._headElement.style.backgroundColor=ve.headerBackgroundColor.toString()),this._primaryHeading&&ve.primaryHeadingColor&&(this._primaryHeading.style.color=ve.primaryHeadingColor.toString()),this._secondaryHeading&&ve.secondaryHeadingColor&&(this._secondaryHeading.style.color=ve.secondaryHeadingColor.toString()),this._bodyElement&&ve.frameColor&&(this._bodyElement.style.borderColor=ve.frameColor.toString())}_fillContainer(ve){this.setCssClass("peekview-widget"),this._headElement=g.a(".head"),this._bodyElement=g.a(".body"),this._fillHead(this._headElement),this._fillBody(this._bodyElement),ve.appendChild(this._headElement),ve.appendChild(this._bodyElement)}_fillHead(ve,ie){const W=g.a(".peekview-title");this.options.supportOnTitleClick&&(W.classList.add("clickable"),g.o(W,"click",je=>this._onTitleClick(je))),g.q(this._headElement,W),this._fillTitleIcon(W),this._primaryHeading=g.a("span.filename"),this._secondaryHeading=g.a("span.dirname"),this._metaHeading=g.a("span.meta"),g.q(W,this._primaryHeading,this._secondaryHeading,this._metaHeading);const U=g.a(".peekview-actions");g.q(this._headElement,U);const se=this._getActionBarOptions();this._actionbarWidget=new B.a(U,se),this._disposables.add(this._actionbarWidget),ie||this._actionbarWidget.push(new x.a("peekview.close",Q.a("label.close","Close"),R.b.close.classNames,!0,()=>(this.dispose(),Promise.resolve())),{label:!1,icon:!0})}_fillTitleIcon(ve){}_getActionBarOptions(){return{actionViewItemProvider:q.b.bind(void 0,this.instantiationService),orientation:0}}_onTitleClick(ve){}setTitle(ve,ie){this._primaryHeading&&this._secondaryHeading&&(this._primaryHeading.innerText=ve,this._primaryHeading.setAttribute("title",ve),ie?this._secondaryHeading.innerText=ie:g.t(this._secondaryHeading))}setMetaTitle(ve){this._metaHeading&&(ve?(this._metaHeading.innerText=ve,g.W(this._metaHeading)):g.K(this._metaHeading))}_doLayout(ve,ie){if(!this._isShowing&&ve<0){this.dispose();return}const W=Math.ceil(this.editor.getOption(58)*1.2),U=Math.round(ve-(W+2));this._doLayoutHead(W,ie),this._doLayoutBody(U,ie)}_doLayoutHead(ve,ie){this._headElement&&(this._headElement.style.height=`${ve}px`,this._headElement.style.lineHeight=this._headElement.style.height)}_doLayoutBody(ve,ie){this._bodyElement&&(this._bodyElement.style.height=`${ve}px`)}};G=ne([le(2,re.a)],G);const ee=Object(Z.wc)("peekViewTitle.background",{dark:Object(Z.Lc)(Z.M,.1),light:Object(Z.Lc)(Z.M,.1),hc:null},Q.a("peekViewTitleBackground","Background color of the peek view title area.")),pe=Object(Z.wc)("peekViewTitleLabel.foreground",{dark:A.a.white,light:A.a.black,hc:A.a.white},Q.a("peekViewTitleForeground","Color of the peek view title.")),Te=Object(Z.wc)("peekViewTitleDescription.foreground",{dark:"#ccccccb3",light:"#616161",hc:"#FFFFFF99"},Q.a("peekViewTitleInfoForeground","Color of the peek view title info.")),Ie=Object(Z.wc)("peekView.border",{dark:Z.M,light:Z.M,hc:Z.h},Q.a("peekViewBorder","Color of the peek view borders and arrow.")),Me=Object(Z.wc)("peekViewResult.background",{dark:"#252526",light:"#F3F3F3",hc:A.a.black},Q.a("peekViewResultsBackground","Background color of the peek view result list.")),Oe=Object(Z.wc)("peekViewResult.lineForeground",{dark:"#bbbbbb",light:"#646465",hc:A.a.white},Q.a("peekViewResultsMatchForeground","Foreground color for line nodes in the peek view result list.")),Xe=Object(Z.wc)("peekViewResult.fileForeground",{dark:A.a.white,light:"#1E1E1E",hc:A.a.white},Q.a("peekViewResultsFileForeground","Foreground color for file nodes in the peek view result list.")),fe=Object(Z.wc)("peekViewResult.selectionBackground",{dark:"#3399ff33",light:"#3399ff33",hc:null},Q.a("peekViewResultsSelectionBackground","Background color of the selected entry in the peek view result list.")),Pe=Object(Z.wc)("peekViewResult.selectionForeground",{dark:A.a.white,light:"#6C6C6C",hc:A.a.white},Q.a("peekViewResultsSelectionForeground","Foreground color of the selected entry in the peek view result list.")),Be=Object(Z.wc)("peekViewEditor.background",{dark:"#001F33",light:"#F2F8FC",hc:A.a.black},Q.a("peekViewEditorBackground","Background color of the peek view editor.")),Se=Object(Z.wc)("peekViewEditorGutter.background",{dark:Be,light:Be,hc:Be},Q.a("peekViewEditorGutterBackground","Background color of the gutter in the peek view editor.")),me=Object(Z.wc)("peekViewResult.matchHighlightBackground",{dark:"#ea5c004d",light:"#ea5c004d",hc:null},Q.a("peekViewResultsMatchHighlight","Match highlight color in the peek view result list.")),he=Object(Z.wc)("peekViewEditor.matchHighlightBackground",{dark:"#ff8f0099",light:"#f5d802de",hc:null},Q.a("peekViewEditorMatchHighlight","Match highlight color in the peek view editor.")),Le=Object(Z.wc)("peekViewEditor.matchHighlightBorder",{dark:null,light:null,hc:Z.b},Q.a("peekViewEditorMatchHighlightBorder","Match highlight border in the peek view editor."))},"ij/i":function(mt,M,t){"use strict";t.r(M);var g=t("+hIS");Object(g.a)({id:"ruby",extensions:[".rb",".rbx",".rjs",".gemspec",".pp"],filenames:["rakefile","Gemfile"],aliases:["Ruby","rb"],loader:function(){return t.e(362).then(t.bind(null,"3MdH"))}})},iuje:function(mt,M,t){"use strict";t.d(M,"b",function(){return g}),t.d(M,"a",function(){return B});function g(x){return x&&typeof x.id=="string"}const B={ICodeEditor:"vs.editor.ICodeEditor",IDiffEditor:"vs.editor.IDiffEditor"}},j2o1:function(mt,M,t){"use strict";t.r(M);var g=t("+hIS");Object(g.a)({id:"powershell",extensions:[".ps1",".psm1",".psd1"],aliases:["PowerShell","powershell","ps","ps1"],loader:function(){return t.e(354).then(t.bind(null,"ppMK"))}})},"jAJ/":function(mt,M,t){"use strict";t.d(M,"a",function(){return I}),t.d(M,"d",function(){return m}),t.d(M,"c",function(){return D}),t.d(M,"e",function(){return w}),t.d(M,"b",function(){return b});var g=t("N0LK"),B=t("5v8Y"),x=t("cGHE"),R=t("aokT"),A=t("M1Kb");const j=999;class I{constructor(u,c,p,S){this.searchString=u,this.isRegex=c,this.matchCase=p,this.wordSeparators=S}parseSearchRequest(){if(this.searchString==="")return null;let u;this.isRegex?u=v(this.searchString):u=this.searchString.indexOf(`
|
|
|
`)>=0;let c=null;try{c=g.q(this.searchString,this.isRegex,{matchCase:this.matchCase,wholeWord:!1,multiline:u,global:!0,unicode:!0})}catch(S){return null}if(!c)return null;let p=!this.isRegex&&!u;return p&&this.searchString.toLowerCase()!==this.searchString.toUpperCase()&&(p=this.matchCase),new C(c,this.wordSeparators?Object(B.a)(this.wordSeparators):null,p?this.searchString:null)}}function v(u){if(!u||u.length===0)return!1;for(let c=0,p=u.length;c<p;c++){const S=u.charCodeAt(c);if(S===92){if(c++,c>=p)break;const E=u.charCodeAt(c);if(E===110||E===114||E===87)return!0}}return!1}class C{constructor(u,c,p){this.regex=u,this.wordSeparators=c,this.simpleSearch=p}}function m(u,c,p){if(!p)return new A.b(u,null);let S=[];for(let E=0,y=c.length;E<y;E++)S[E]=c[E];return new A.b(u,S)}class d{constructor(u){let c=[],p=0;for(let S=0,E=u.length;S<E;S++)u.charCodeAt(S)===10&&(c[p++]=S);this._lineFeedsOffsets=c}findLineFeedCountBeforeOffset(u){const c=this._lineFeedsOffsets;let p=0,S=c.length-1;if(S===-1)return 0;if(u<=c[0])return 0;for(;p<S;){const E=p+((S-p)/2>>0);c[E]>=u?S=E-1:c[E+1]>=u?(p=E,S=E):p=E+1}return p+1}}class D{static findMatches(u,c,p,S,E){const y=c.parseSearchRequest();return y?y.regex.multiline?this._doFindMatchesMultiline(u,p,new b(y.wordSeparators,y.regex),S,E):this._doFindMatchesLineByLine(u,p,y,S,E):[]}static _getMultilineMatchRange(u,c,p,S,E,y){let O,k=0;S?(k=S.findLineFeedCountBeforeOffset(E),O=c+E+k):O=c+E;let Q;if(S){let J=S.findLineFeedCountBeforeOffset(E+y.length),re=J-k;Q=O+y.length+re}else Q=O+y.length;const q=u.getPositionAt(O),z=u.getPositionAt(Q);return new R.a(q.lineNumber,q.column,z.lineNumber,z.column)}static _doFindMatchesMultiline(u,c,p,S,E){const y=u.getOffsetAt(c.getStartPosition()),O=u.getValueInRange(c,1),k=u.getEOL()===`\r
|
|
|
`?new d(O):null,Q=[];let q=0,z;for(p.reset(0);z=p.next(O);)if(Q[q++]=m(this._getMultilineMatchRange(u,y,O,k,z.index,z[0]),z,S),q>=E)return Q;return Q}static _doFindMatchesLineByLine(u,c,p,S,E){const y=[];let O=0;if(c.startLineNumber===c.endLineNumber){const Q=u.getLineContent(c.startLineNumber).substring(c.startColumn-1,c.endColumn-1);return O=this._findMatchesInLine(p,Q,c.startLineNumber,c.startColumn-1,O,y,S,E),y}const k=u.getLineContent(c.startLineNumber).substring(c.startColumn-1);O=this._findMatchesInLine(p,k,c.startLineNumber,c.startColumn-1,O,y,S,E);for(let Q=c.startLineNumber+1;Q<c.endLineNumber&&O<E;Q++)O=this._findMatchesInLine(p,u.getLineContent(Q),Q,0,O,y,S,E);if(O<E){const Q=u.getLineContent(c.endLineNumber).substring(0,c.endColumn-1);O=this._findMatchesInLine(p,Q,c.endLineNumber,0,O,y,S,E)}return y}static _findMatchesInLine(u,c,p,S,E,y,O,k){const Q=u.wordSeparators;if(!O&&u.simpleSearch){const J=u.simpleSearch,re=J.length,Z=c.length;let ne=-re;for(;(ne=c.indexOf(J,ne+re))!==-1;)if((!Q||w(Q,c,Z,ne,re))&&(y[E++]=new A.b(new R.a(p,ne+1+S,p,ne+1+re+S),null),E>=k))return E;return E}const q=new b(u.wordSeparators,u.regex);let z;q.reset(0);do if(z=q.next(c),z&&(y[E++]=m(new R.a(p,z.index+1+S,p,z.index+1+z[0].length+S),z,O),E>=k))return E;while(z);return E}static findNextMatch(u,c,p,S){const E=c.parseSearchRequest();if(!E)return null;const y=new b(E.wordSeparators,E.regex);return E.regex.multiline?this._doFindNextMatchMultiline(u,p,y,S):this._doFindNextMatchLineByLine(u,p,y,S)}static _doFindNextMatchMultiline(u,c,p,S){const E=new x.a(c.lineNumber,1),y=u.getOffsetAt(E),O=u.getLineCount(),k=u.getValueInRange(new R.a(E.lineNumber,E.column,O,u.getLineMaxColumn(O)),1),Q=u.getEOL()===`\r
|
|
|
`?new d(k):null;p.reset(c.column-1);let q=p.next(k);return q?m(this._getMultilineMatchRange(u,y,k,Q,q.index,q[0]),q,S):c.lineNumber!==1||c.column!==1?this._doFindNextMatchMultiline(u,new x.a(1,1),p,S):null}static _doFindNextMatchLineByLine(u,c,p,S){const E=u.getLineCount(),y=c.lineNumber,O=u.getLineContent(y),k=this._findFirstMatchInLine(p,O,y,c.column,S);if(k)return k;for(let Q=1;Q<=E;Q++){const q=(y+Q-1)%E,z=u.getLineContent(q+1),J=this._findFirstMatchInLine(p,z,q+1,1,S);if(J)return J}return null}static _findFirstMatchInLine(u,c,p,S,E){u.reset(S-1);const y=u.next(c);return y?m(new R.a(p,y.index+1,p,y.index+1+y[0].length),y,E):null}static findPreviousMatch(u,c,p,S){const E=c.parseSearchRequest();if(!E)return null;const y=new b(E.wordSeparators,E.regex);return E.regex.multiline?this._doFindPreviousMatchMultiline(u,p,y,S):this._doFindPreviousMatchLineByLine(u,p,y,S)}static _doFindPreviousMatchMultiline(u,c,p,S){const E=this._doFindMatchesMultiline(u,new R.a(1,1,c.lineNumber,c.column),p,S,10*j);if(E.length>0)return E[E.length-1];const y=u.getLineCount();return c.lineNumber!==y||c.column!==u.getLineMaxColumn(y)?this._doFindPreviousMatchMultiline(u,new x.a(y,u.getLineMaxColumn(y)),p,S):null}static _doFindPreviousMatchLineByLine(u,c,p,S){const E=u.getLineCount(),y=c.lineNumber,O=u.getLineContent(y).substring(0,c.column-1),k=this._findLastMatchInLine(p,O,y,S);if(k)return k;for(let Q=1;Q<=E;Q++){const q=(E+y-Q-1)%E,z=u.getLineContent(q+1),J=this._findLastMatchInLine(p,z,q+1,S);if(J)return J}return null}static _findLastMatchInLine(u,c,p,S){let E=null,y;for(u.reset(0);y=u.next(c);)E=m(new R.a(p,y.index+1,p,y.index+1+y[0].length),y,S);return E}}function L(u,c,p,S,E){if(S===0)return!0;const y=c.charCodeAt(S-1);if(u.get(y)!==0)return!0;if(y===13||y===10)return!0;if(E>0){const O=c.charCodeAt(S);if(u.get(O)!==0)return!0}return!1}function r(u,c,p,S,E){if(S+E===p)return!0;const y=c.charCodeAt(S+E);if(u.get(y)!==0)return!0;if(y===13||y===10)return!0;if(E>0){const O=c.charCodeAt(S+E-1);if(u.get(O)!==0)return!0}return!1}function w(u,c,p,S,E){return L(u,c,p,S,E)&&r(u,c,p,S,E)}class b{constructor(u,c){this._wordSeparators=u,this._searchRegex=c,this._prevMatchStartIndex=-1,this._prevMatchLength=0}reset(u){this._searchRegex.lastIndex=u,this._prevMatchStartIndex=-1,this._prevMatchLength=0}next(u){const c=u.length;let p;do{if(this._prevMatchStartIndex+this._prevMatchLength===c)return null;if(p=this._searchRegex.exec(u),!p)return null;const S=p.index,E=p[0].length;if(S===this._prevMatchStartIndex&&E===this._prevMatchLength){if(E===0){g.z(u,c,this._searchRegex.lastIndex)>65535?this._searchRegex.lastIndex+=2:this._searchRegex.lastIndex+=1;continue}return null}if(this._prevMatchStartIndex=S,this._prevMatchLength=E,!this._wordSeparators||w(this._wordSeparators,u,c,S,E))return p}while(p);return null}}},jVwG:function(mt,M,t){"use strict";t.r(M);var g=t("+hIS");Object(g.a)({id:"objective-c",extensions:[".m"],aliases:["Objective-C"],loader:function(){return t.e(346).then(t.bind(null,"fYNN"))}})},jrbv:function(mt,M,t){"use strict";t.r(M);var g=t("+hIS");Object(g.a)({id:"coffeescript",extensions:[".coffee"],aliases:["CoffeeScript","coffeescript","coffee"],mimetypes:["text/x-coffeescript","text/coffeescript"],loader:function(){return t.e(327).then(t.bind(null,"2ZXa"))}})},k7mE:function(mt,M,t){"use strict";t.r(M);var g=t("+hIS");Object(g.a)({id:"java",extensions:[".java",".jav"],aliases:["Java","java"],mimetypes:["text/x-java-source","text/x-java"],loader:function(){return t.e(338).then(t.bind(null,"BjZ/"))}})},k7pc:function(mt,M,t){"use strict";t.r(M),t.d(M,"ToggleTabFocusModeAction",function(){return A});var g=t("OBOq"),B=t("sswD"),x=t("iDAx"),R=t("3/fG");class A extends B.b{constructor(){super({id:A.ID,label:R.a({key:"toggle.tabMovesFocus",comment:["Turn on/off use of tab key for moving focus around VS Code"]},"Toggle Tab Key Moves Focus"),alias:"Toggle Tab Key Moves Focus",precondition:void 0,kbOpts:{kbExpr:null,primary:2048|43,mac:{primary:256|1024|43},weight:100}})}run(j,I){const v=x.b.getTabFocusMode(),C=!v;x.b.setTabFocusMode(C),C?Object(g.a)(R.a("toggle.tabMovesFocus.on","Pressing Tab will now move focus to the next focusable element")):Object(g.a)(R.a("toggle.tabMovesFocus.off","Pressing Tab will now insert the tab character"))}}A.ID="editor.action.toggleTabFocusMode",Object(B.j)(A)},k9mg:function(mt,M,t){"use strict";t.d(M,"a",function(){return fo}),t.d(M,"b",function(){return ri}),t.d(M,"e",function(){return ki}),t.d(M,"d",function(){return $i}),t.d(M,"c",function(){return vt});var g=t("EffR"),B=t("6OMU"),x=t("JQT/"),R=t("MI8n"),A=t("pmY6"),j=t("4rho"),I=t("cqdO");class v{constructor(F,te){this.renderer=F,this.modelProvider=te}get templateId(){return this.renderer.templateId}renderTemplate(F){const te=this.renderer.renderTemplate(F);return{data:te,disposable:A.a.None}}renderElement(F,te,Ae,Ye){if(Ae.disposable&&Ae.disposable.dispose(),!Ae.data)return;const pt=this.modelProvider();if(pt.isResolved(F))return this.renderer.renderElement(pt.get(F),F,Ae.data,Ye);const Mt=new x.b,jt=pt.resolve(F,Mt.token);Ae.disposable={dispose:()=>Mt.cancel()},this.renderer.renderPlaceholder(F,Ae.data),jt.then($t=>this.renderer.renderElement($t,F,Ae.data,Ye))}disposeTemplate(F){F.disposable&&(F.disposable.dispose(),F.disposable=void 0),F.data&&(this.renderer.disposeTemplate(F.data),F.data=void 0)}}class C{constructor(F,te){this.modelProvider=F,this.accessibilityProvider=te}getWidgetAriaLabel(){return this.accessibilityProvider.getWidgetAriaLabel()}getAriaLabel(F){const te=this.modelProvider();return te.isResolved(F)?this.accessibilityProvider.getAriaLabel(te.get(F)):null}}function m(F,te){return Object.assign(Object.assign({},te),{accessibilityProvider:te.accessibilityProvider&&new C(F,te.accessibilityProvider)})}class d{constructor(F,te,Ae,Ye,pt={}){const Mt=()=>this.model,jt=Ye.map($t=>new v($t,Mt));this.list=new I.c(F,te,Ae,jt,m(Mt,pt))}updateOptions(F){this.list.updateOptions(F)}getHTMLElement(){return this.list.getHTMLElement()}get onDidFocus(){return this.list.onDidFocus}get onDidDispose(){return this.list.onDidDispose}get onMouseDblClick(){return R.c.map(this.list.onMouseDblClick,({element:F,index:te,browserEvent:Ae})=>({element:F===void 0?void 0:this._model.get(F),index:te,browserEvent:Ae}))}get onPointer(){return R.c.map(this.list.onPointer,({element:F,index:te,browserEvent:Ae})=>({element:F===void 0?void 0:this._model.get(F),index:te,browserEvent:Ae}))}get onDidChangeSelection(){return R.c.map(this.list.onDidChangeSelection,({elements:F,indexes:te,browserEvent:Ae})=>({elements:F.map(Ye=>this._model.get(Ye)),indexes:te,browserEvent:Ae}))}get model(){return this._model}set model(F){this._model=F,this.list.splice(0,this.list.length,Object(B.r)(F.length))}getFocus(){return this.list.getFocus()}getSelection(){return this.list.getSelection()}getSelectedElements(){return this.getSelection().map(F=>this.model.get(F))}style(F){this.list.style(F)}dispose(){this.list.dispose()}}var D=t("44XX"),L=t("7GBL");class r{constructor(F,te,Ae){this.columns=F,this.getColumnSize=Ae,this.templateId=r.TemplateId,this.renderedTemplates=new Set;const Ye=new Map(te.map(pt=>[pt.templateId,pt]));this.renderers=[];for(const pt of F){const Mt=Ye.get(pt.templateId);if(!Mt)throw new Error(`Table cell renderer for template id ${pt.templateId} not found.`);this.renderers.push(Mt)}}renderTemplate(F){const te=Object(g.q)(F,Object(g.a)(".monaco-table-tr")),Ae=[],Ye=[];for(let Mt=0;Mt<this.columns.length;Mt++){const jt=this.renderers[Mt],$t=Object(g.q)(te,Object(g.a)(".monaco-table-td",{"data-col-index":Mt}));$t.style.width=`${this.getColumnSize(Mt)}px`,Ae.push($t),Ye.push(jt.renderTemplate($t))}const pt={container:F,cellContainers:Ae,cellTemplateData:Ye};return this.renderedTemplates.add(pt),pt}renderElement(F,te,Ae,Ye){for(let pt=0;pt<this.columns.length;pt++){const Mt=this.columns[pt],jt=Mt.project(F),$t=this.renderers[pt];$t.renderElement(jt,te,Ae.cellTemplateData[pt],Ye)}}disposeElement(F,te,Ae,Ye){for(let pt=0;pt<this.columns.length;pt++){const Mt=this.renderers[pt];if(Mt.disposeElement){const jt=this.columns[pt],$t=jt.project(F);Mt.disposeElement($t,te,Ae.cellTemplateData[pt],Ye)}}}disposeTemplate(F){for(let te=0;te<this.columns.length;te++){const Ae=this.renderers[te];Ae.disposeTemplate(F.cellTemplateData[te])}Object(g.t)(F.container),this.renderedTemplates.delete(F)}layoutColumn(F,te){for(const{cellContainers:Ae}of this.renderedTemplates)Ae[F].style.width=`${te}px`}}r.TemplateId="row";function w(F){return{getHeight(te){return F.getHeight(te)},getTemplateId(){return r.TemplateId}}}class b{constructor(F,te){this.column=F,this.index=te,this._onDidLayout=new R.b,this.onDidLayout=this._onDidLayout.event,this.element=Object(g.a)(".monaco-table-th",{"data-col-index":te,title:F.tooltip},F.label)}get minimumSize(){var F;return(F=this.column.minimumWidth)!==null&&F!==void 0?F:120}get maximumSize(){var F;return(F=this.column.maximumWidth)!==null&&F!==void 0?F:Number.POSITIVE_INFINITY}get onDidChange(){var F;return(F=this.column.onDidChangeWidthConstraints)!==null&&F!==void 0?F:R.c.None}layout(F){this._onDidLayout.fire([this.index,F])}}class u{constructor(F,te,Ae,Ye,pt,Mt){this.virtualDelegate=Ae,this.domId=`table_id_${++u.InstanceCount}`,this.cachedHeight=0,this.domNode=Object(g.q)(te,Object(g.a)(`.monaco-table.${this.domId}`));const jt=Ye.map((io,ho)=>new b(io,ho)),$t={size:jt.reduce((io,ho)=>io+ho.column.weight,0),views:jt.map(io=>({size:io.column.weight,view:io}))};this.splitview=new D.b(this.domNode,{orientation:1,scrollbarVisibility:2,getSashOrthogonalSize:()=>this.cachedHeight,descriptor:$t}),this.splitview.el.style.height=`${Ae.headerRowHeight}px`,this.splitview.el.style.lineHeight=`${Ae.headerRowHeight}px`;const uo=new r(Ye,pt,io=>this.splitview.getViewSize(io));this.list=new I.c(F,this.domNode,w(Ae),[uo],Mt),this.columnLayoutDisposable=R.c.any(...jt.map(io=>io.onDidLayout))(([io,ho])=>uo.layoutColumn(io,ho)),this.styleElement=Object(g.w)(this.domNode),this.style({})}get onDidChangeFocus(){return this.list.onDidChangeFocus}get onDidChangeSelection(){return this.list.onDidChangeSelection}get onMouseDblClick(){return this.list.onMouseDblClick}get onPointer(){return this.list.onPointer}get onDidFocus(){return this.list.onDidFocus}get onDidDispose(){return this.list.onDidDispose}updateOptions(F){this.list.updateOptions(F)}splice(F,te,Ae=[]){this.list.splice(F,te,Ae)}getHTMLElement(){return this.domNode}style(F){const te=[];te.push(`.monaco-table.${this.domId} > .monaco-split-view2 .monaco-sash.vertical::before {
|
|
|
top: ${this.virtualDelegate.headerRowHeight+1}px;
|
|
|
height: calc(100% - ${this.virtualDelegate.headerRowHeight}px);
|
|
|
}`),this.styleElement.textContent=te.join(`
|
|
|
`),this.list.style(F)}getSelectedElements(){return this.list.getSelectedElements()}getSelection(){return this.list.getSelection()}getFocus(){return this.list.getFocus()}dispose(){this.splitview.dispose(),this.list.dispose(),this.columnLayoutDisposable.dispose()}}u.InstanceCount=0;var c=t("feEw"),p=t("ZQ78"),S=t("4y0V"),E=t("uDWl"),y;(function(F){F[F.Unknown=0]="Unknown",F[F.Twistie=1]="Twistie",F[F.Element=2]="Element"})(y||(y={}));class O extends Error{constructor(F,te){super(`TreeError [${F}] ${te}`)}}class k{constructor(F){this.fn=F,this._map=new WeakMap}map(F){let te=this._map.get(F);return te||(te=this.fn(F),this._map.set(F,te)),te}}var Q=t("Gw4z"),q=t("JYp7");function z(F){return typeof F=="object"&&"visibility"in F&&"data"in F}function J(F){switch(F){case!0:return 1;case!1:return 0;default:return F}}function re(F){return typeof F.collapsible=="boolean"}class Z{constructor(F,te,Ae,Ye={}){this.user=F,this.list=te,this.rootRef=[],this.eventBufferer=new R.d,this._onDidChangeCollapseState=new R.b,this.onDidChangeCollapseState=this.eventBufferer.wrapEvent(this._onDidChangeCollapseState.event),this._onDidChangeRenderNodeCount=new R.b,this.onDidChangeRenderNodeCount=this.eventBufferer.wrapEvent(this._onDidChangeRenderNodeCount.event),this._onDidSplice=new R.b,this.onDidSplice=this._onDidSplice.event,this.collapseByDefault=typeof Ye.collapseByDefault=="undefined"?!1:Ye.collapseByDefault,this.filter=Ye.filter,this.autoExpandSingleChildren=typeof Ye.autoExpandSingleChildren=="undefined"?!1:Ye.autoExpandSingleChildren,this.root={parent:void 0,element:Ae,children:[],depth:0,visibleChildrenCount:0,visibleChildIndex:-1,collapsible:!1,collapsed:!1,renderNodeCount:0,visibility:1,visible:!0,filterData:void 0}}splice(F,te,Ae=q.a.empty(),Ye={}){if(F.length===0)throw new O(this.user,"Invalid tree location");Ye.diffIdentityProvider?this.spliceSmart(Ye.diffIdentityProvider,F,te,Ae,Ye):this.spliceSimple(F,te,Ae,Ye)}spliceSmart(F,te,Ae,Ye,pt,Mt){var jt;Ye===void 0&&(Ye=q.a.empty()),Mt===void 0&&(Mt=(jt=pt.diffDepth)!==null&&jt!==void 0?jt:0);const{parentNode:$t}=this.getParentNodeWithListIndex(te);if(!$t.lastDiffIds)return this.spliceSimple(te,Ae,Ye,pt);const uo=[...Ye],io=te[te.length-1],ho=new Q.a({getElements:()=>$t.lastDiffIds},{getElements:()=>[...$t.children.slice(0,io),...uo,...$t.children.slice(io+Ae)].map(Wo=>F.getId(Wo.element).toString())}).ComputeDiff(!1);if(ho.quitEarly)return $t.lastDiffIds=void 0,this.spliceSimple(te,Ae,uo,pt);const mo=te.slice(0,-1),Io=(Wo,si,hi)=>{if(Mt>0)for(let Uo=0;Uo<hi;Uo++)Wo--,si--,this.spliceSmart(F,[...mo,Wo,0],Number.MAX_SAFE_INTEGER,uo[si].children,pt,Mt-1)};let Ao=Math.min($t.children.length,io+Ae),Oo=uo.length;for(const Wo of ho.changes.sort((si,hi)=>hi.originalStart-si.originalStart))Io(Ao,Oo,Ao-(Wo.originalStart+Wo.originalLength)),Ao=Wo.originalStart,Oo=Wo.modifiedStart-io,this.spliceSimple([...mo,Ao],Wo.originalLength,q.a.slice(uo,Oo,Oo+Wo.modifiedLength),pt);Io(Ao,Oo,Ao)}spliceSimple(F,te,Ae=q.a.empty(),{onDidCreateNode:Ye,onDidDeleteNode:pt,diffIdentityProvider:Mt}){const{parentNode:jt,listIndex:$t,revealed:uo,visible:io}=this.getParentNodeWithListIndex(F),ho=[],mo=q.a.map(Ae,pi=>this.createTreeNode(pi,jt,jt.visible?1:0,uo,ho,Ye)),Io=F[F.length-1],Ao=jt.children.length>0;let Oo=0;for(let pi=Io;pi>=0&&pi<jt.children.length;pi--){const Wi=jt.children[pi];if(Wi.visible){Oo=Wi.visibleChildIndex;break}}const Wo=[];let si=0,hi=0;for(const pi of mo)Wo.push(pi),hi+=pi.renderNodeCount,pi.visible&&(pi.visibleChildIndex=Oo+si++);const Uo=Object(B.s)(jt.children,Io,te,Wo);Mt?jt.lastDiffIds?Object(B.s)(jt.lastDiffIds,Io,te,Wo.map(pi=>Mt.getId(pi.element).toString())):jt.lastDiffIds=jt.children.map(pi=>Mt.getId(pi.element).toString()):jt.lastDiffIds=void 0;let mi=0;for(const pi of Uo)pi.visible&&mi++;if(mi!==0)for(let pi=Io+Wo.length;pi<jt.children.length;pi++){const Wi=jt.children[pi];Wi.visible&&(Wi.visibleChildIndex-=mi)}if(jt.visibleChildrenCount+=si-mi,uo&&io){const pi=Uo.reduce((Wi,fn)=>Wi+(fn.visible?fn.renderNodeCount:0),0);this._updateAncestorsRenderNodeCount(jt,hi-pi),this.list.splice($t,pi,ho)}if(Uo.length>0&&pt){const pi=Wi=>{pt(Wi),Wi.children.forEach(pi)};Uo.forEach(pi)}const Ri=jt.children.length>0;Ao!==Ri&&this.setCollapsible(F.slice(0,-1),Ri),this._onDidSplice.fire({insertedNodes:Wo,deletedNodes:Uo});let Di=jt;for(;Di;){if(Di.visibility===2){this.refilter();break}Di=Di.parent}}rerender(F){if(F.length===0)throw new O(this.user,"Invalid tree location");const{node:te,listIndex:Ae,revealed:Ye}=this.getTreeNodeWithListIndex(F);te.visible&&Ye&&this.list.splice(Ae,1,[te])}has(F){return this.hasTreeNode(F)}getListIndex(F){const{listIndex:te,visible:Ae,revealed:Ye}=this.getTreeNodeWithListIndex(F);return Ae&&Ye?te:-1}getListRenderCount(F){return this.getTreeNode(F).renderNodeCount}isCollapsible(F){return this.getTreeNode(F).collapsible}setCollapsible(F,te){const Ae=this.getTreeNode(F);typeof te=="undefined"&&(te=!Ae.collapsible);const Ye={collapsible:te};return this.eventBufferer.bufferEvents(()=>this._setCollapseState(F,Ye))}isCollapsed(F){return this.getTreeNode(F).collapsed}setCollapsed(F,te,Ae){const Ye=this.getTreeNode(F);typeof te=="undefined"&&(te=!Ye.collapsed);const pt={collapsed:te,recursive:Ae||!1};return this.eventBufferer.bufferEvents(()=>this._setCollapseState(F,pt))}_setCollapseState(F,te){const{node:Ae,listIndex:Ye,revealed:pt}=this.getTreeNodeWithListIndex(F),Mt=this._setListNodeCollapseState(Ae,Ye,pt,te);if(Ae!==this.root&&this.autoExpandSingleChildren&&Mt&&!re(te)&&Ae.collapsible&&!Ae.collapsed&&!te.recursive){let jt=-1;for(let $t=0;$t<Ae.children.length;$t++){const uo=Ae.children[$t];if(uo.visible)if(jt>-1){jt=-1;break}else jt=$t}jt>-1&&this._setCollapseState([...F,jt],te)}return Mt}_setListNodeCollapseState(F,te,Ae,Ye){const pt=this._setNodeCollapseState(F,Ye,!1);if(!Ae||!F.visible||!pt)return pt;const Mt=F.renderNodeCount,jt=this.updateNodeAfterCollapseChange(F),$t=Mt-(te===-1?0:1);return this.list.splice(te+1,$t,jt.slice(1)),pt}_setNodeCollapseState(F,te,Ae){let Ye;if(F===this.root?Ye=!1:(re(te)?(Ye=F.collapsible!==te.collapsible,F.collapsible=te.collapsible):F.collapsible?(Ye=F.collapsed!==te.collapsed,F.collapsed=te.collapsed):Ye=!1,Ye&&this._onDidChangeCollapseState.fire({node:F,deep:Ae})),!re(te)&&te.recursive)for(const pt of F.children)Ye=this._setNodeCollapseState(pt,te,!0)||Ye;return Ye}expandTo(F){this.eventBufferer.bufferEvents(()=>{let te=this.getTreeNode(F);for(;te.parent;)te=te.parent,F=F.slice(0,F.length-1),te.collapsed&&this._setCollapseState(F,{collapsed:!1,recursive:!1})})}refilter(){const F=this.root.renderNodeCount,te=this.updateNodeAfterFilterChange(this.root);this.list.splice(0,F,te)}createTreeNode(F,te,Ae,Ye,pt,Mt){const jt={parent:te,element:F.element,children:[],depth:te.depth+1,visibleChildrenCount:0,visibleChildIndex:-1,collapsible:typeof F.collapsible=="boolean"?F.collapsible:typeof F.collapsed!="undefined",collapsed:typeof F.collapsed=="undefined"?this.collapseByDefault:F.collapsed,renderNodeCount:1,visibility:1,visible:!0,filterData:void 0},$t=this._filterNode(jt,Ae);jt.visibility=$t,Ye&&pt.push(jt);const uo=F.children||q.a.empty(),io=Ye&&$t!==0&&!jt.collapsed,ho=q.a.map(uo,Ao=>this.createTreeNode(Ao,jt,$t,io,pt,Mt));let mo=0,Io=1;for(const Ao of ho)jt.children.push(Ao),Io+=Ao.renderNodeCount,Ao.visible&&(Ao.visibleChildIndex=mo++);return jt.collapsible=jt.collapsible||jt.children.length>0,jt.visibleChildrenCount=mo,jt.visible=$t===2?mo>0:$t===1,jt.visible?jt.collapsed||(jt.renderNodeCount=Io):(jt.renderNodeCount=0,Ye&&pt.pop()),Mt&&Mt(jt),jt}updateNodeAfterCollapseChange(F){const te=F.renderNodeCount,Ae=[];return this._updateNodeAfterCollapseChange(F,Ae),this._updateAncestorsRenderNodeCount(F.parent,Ae.length-te),Ae}_updateNodeAfterCollapseChange(F,te){if(F.visible===!1)return 0;if(te.push(F),F.renderNodeCount=1,!F.collapsed)for(const Ae of F.children)F.renderNodeCount+=this._updateNodeAfterCollapseChange(Ae,te);return this._onDidChangeRenderNodeCount.fire(F),F.renderNodeCount}updateNodeAfterFilterChange(F){const te=F.renderNodeCount,Ae=[];return this._updateNodeAfterFilterChange(F,F.visible?1:0,Ae),this._updateAncestorsRenderNodeCount(F.parent,Ae.length-te),Ae}_updateNodeAfterFilterChange(F,te,Ae,Ye=!0){let pt;if(F!==this.root){if(pt=this._filterNode(F,te),pt===0)return F.visible=!1,F.renderNodeCount=0,!1;Ye&&Ae.push(F)}const Mt=Ae.length;F.renderNodeCount=F===this.root?0:1;let jt=!1;if(!F.collapsed||pt!==0){let $t=0;for(const uo of F.children)jt=this._updateNodeAfterFilterChange(uo,pt,Ae,Ye&&!F.collapsed)||jt,uo.visible&&(uo.visibleChildIndex=$t++);F.visibleChildrenCount=$t}else F.visibleChildrenCount=0;return F!==this.root&&(F.visible=pt===2?jt:pt===1,F.visibility=pt),F.visible?F.collapsed||(F.renderNodeCount+=Ae.length-Mt):(F.renderNodeCount=0,Ye&&Ae.pop()),this._onDidChangeRenderNodeCount.fire(F),F.visible}_updateAncestorsRenderNodeCount(F,te){if(te===0)return;for(;F;)F.renderNodeCount+=te,this._onDidChangeRenderNodeCount.fire(F),F=F.parent}_filterNode(F,te){const Ae=this.filter?this.filter.filter(F.element,te):1;return typeof Ae=="boolean"?(F.filterData=void 0,Ae?1:0):z(Ae)?(F.filterData=Ae.data,J(Ae.visibility)):(F.filterData=void 0,J(Ae))}hasTreeNode(F,te=this.root){if(!F||F.length===0)return!0;const[Ae,...Ye]=F;return Ae<0||Ae>te.children.length?!1:this.hasTreeNode(Ye,te.children[Ae])}getTreeNode(F,te=this.root){if(!F||F.length===0)return te;const[Ae,...Ye]=F;if(Ae<0||Ae>te.children.length)throw new O(this.user,"Invalid tree location");return this.getTreeNode(Ye,te.children[Ae])}getTreeNodeWithListIndex(F){if(F.length===0)return{node:this.root,listIndex:-1,revealed:!0,visible:!1};const{parentNode:te,listIndex:Ae,revealed:Ye,visible:pt}=this.getParentNodeWithListIndex(F),Mt=F[F.length-1];if(Mt<0||Mt>te.children.length)throw new O(this.user,"Invalid tree location");const jt=te.children[Mt];return{node:jt,listIndex:Ae,revealed:Ye,visible:pt&&jt.visible}}getParentNodeWithListIndex(F,te=this.root,Ae=0,Ye=!0,pt=!0){const[Mt,...jt]=F;if(Mt<0||Mt>te.children.length)throw new O(this.user,"Invalid tree location");for(let $t=0;$t<Mt;$t++)Ae+=te.children[$t].renderNodeCount;return Ye=Ye&&!te.collapsed,pt=pt&&te.visible,jt.length===0?{parentNode:te,listIndex:Ae,revealed:Ye,visible:pt}:this.getParentNodeWithListIndex(jt,te.children[Mt],Ae+1,Ye,pt)}getNode(F=[]){return this.getTreeNode(F)}getNodeLocation(F){const te=[];let Ae=F;for(;Ae.parent;)te.push(Ae.parent.children.indexOf(Ae)),Ae=Ae.parent;return te.reverse()}getParentNodeLocation(F){return F.length===0?void 0:F.length===1?[]:Object(B.u)(F)[0]}}var ne=t("Vhoy");const le=Object(ne.e)("tree-item-expanded",ne.b.chevronDown),_e=Object(ne.e)("tree-filter-on-type-on",ne.b.listFilter),Ce=Object(ne.e)("tree-filter-on-type-off",ne.b.listSelection),oe=Object(ne.e)("tree-filter-clear",ne.b.close),ae=Object(ne.e)("tree-item-loading",ne.b.loading);var V=t("X+cX"),G=t("vl9R"),ee=t("fpMC"),pe=t("Sdnv"),Te=t("MNsG"),Ie=t("2V9f"),Me=t("3/fG");class Oe extends c.a{constructor(F){super(F.elements.map(te=>te.element));this.data=F}}function Xe(F){return F instanceof c.a?new Oe(F):F}class fe{constructor(F,te){this.modelProvider=F,this.dnd=te,this.autoExpandDisposable=A.a.None}getDragURI(F){return this.dnd.getDragURI(F.element)}getDragLabel(F,te){return this.dnd.getDragLabel?this.dnd.getDragLabel(F.map(Ae=>Ae.element),te):void 0}onDragStart(F,te){this.dnd.onDragStart&&this.dnd.onDragStart(Xe(F),te)}onDragOver(F,te,Ae,Ye,pt=!0){const Mt=this.dnd.onDragOver(Xe(F),te&&te.element,Ae,Ye),jt=this.autoExpandNode!==te;if(jt&&(this.autoExpandDisposable.dispose(),this.autoExpandNode=te),typeof te=="undefined")return Mt;if(jt&&typeof Mt!="boolean"&&Mt.autoExpand&&(this.autoExpandDisposable=Object(V.i)(()=>{const mo=this.modelProvider(),Io=mo.getNodeLocation(te);mo.isCollapsed(Io)&&mo.setCollapsed(Io,!1),this.autoExpandNode=void 0},500)),typeof Mt=="boolean"||!Mt.accept||typeof Mt.bubble=="undefined"||Mt.feedback){if(!pt){const mo=typeof Mt=="boolean"?Mt:Mt.accept,Io=typeof Mt=="boolean"?void 0:Mt.effect;return{accept:mo,effect:Io,feedback:[Ae]}}return Mt}if(Mt.bubble===1){const mo=this.modelProvider(),Io=mo.getNodeLocation(te),Ao=mo.getParentNodeLocation(Io),Oo=mo.getNode(Ao),Wo=Ao&&mo.getListIndex(Ao);return this.onDragOver(F,Oo,Wo,Ye,!1)}const $t=this.modelProvider(),uo=$t.getNodeLocation(te),io=$t.getListIndex(uo),ho=$t.getListRenderCount(uo);return Object.assign(Object.assign({},Mt),{feedback:Object(B.r)(io,io+ho)})}drop(F,te,Ae,Ye){this.autoExpandDisposable.dispose(),this.autoExpandNode=void 0,this.dnd.drop(Xe(F),te&&te.element,Ae,Ye)}onDragEnd(F){this.dnd.onDragEnd&&this.dnd.onDragEnd(F)}}function Pe(F,te){return te&&Object.assign(Object.assign({},te),{identityProvider:te.identityProvider&&{getId(Ae){return te.identityProvider.getId(Ae.element)}},dnd:te.dnd&&new fe(F,te.dnd),multipleSelectionController:te.multipleSelectionController&&{isSelectionSingleChangeEvent(Ae){return te.multipleSelectionController.isSelectionSingleChangeEvent(Object.assign(Object.assign({},Ae),{element:Ae.element}))},isSelectionRangeChangeEvent(Ae){return te.multipleSelectionController.isSelectionRangeChangeEvent(Object.assign(Object.assign({},Ae),{element:Ae.element}))}},accessibilityProvider:te.accessibilityProvider&&Object.assign(Object.assign({},te.accessibilityProvider),{getSetSize(Ae){const Ye=F(),pt=Ye.getNodeLocation(Ae),Mt=Ye.getParentNodeLocation(pt),jt=Ye.getNode(Mt);return jt.visibleChildrenCount},getPosInSet(Ae){return Ae.visibleChildIndex+1},isChecked:te.accessibilityProvider&&te.accessibilityProvider.isChecked?Ae=>te.accessibilityProvider.isChecked(Ae.element):void 0,getRole:te.accessibilityProvider&&te.accessibilityProvider.getRole?Ae=>te.accessibilityProvider.getRole(Ae.element):()=>"treeitem",getAriaLabel(Ae){return te.accessibilityProvider.getAriaLabel(Ae.element)},getWidgetAriaLabel(){return te.accessibilityProvider.getWidgetAriaLabel()},getWidgetRole:te.accessibilityProvider&&te.accessibilityProvider.getWidgetRole?()=>te.accessibilityProvider.getWidgetRole():()=>"tree",getAriaLevel:te.accessibilityProvider&&te.accessibilityProvider.getAriaLevel?Ae=>te.accessibilityProvider.getAriaLevel(Ae.element):Ae=>Ae.depth,getActiveDescendantId:te.accessibilityProvider.getActiveDescendantId&&(Ae=>te.accessibilityProvider.getActiveDescendantId(Ae.element))}),keyboardNavigationLabelProvider:te.keyboardNavigationLabelProvider&&Object.assign(Object.assign({},te.keyboardNavigationLabelProvider),{getKeyboardNavigationLabel(Ae){return te.keyboardNavigationLabelProvider.getKeyboardNavigationLabel(Ae.element)}}),enableKeyboardNavigation:te.simpleKeyboardNavigation})}class Be{constructor(F){this.delegate=F}getHeight(F){return this.delegate.getHeight(F.element)}getTemplateId(F){return this.delegate.getTemplateId(F.element)}hasDynamicHeight(F){return!!this.delegate.hasDynamicHeight&&this.delegate.hasDynamicHeight(F.element)}setDynamicHeight(F,te){this.delegate.setDynamicHeight&&this.delegate.setDynamicHeight(F.element,te)}}var Se;(function(F){F.None="none",F.OnHover="onHover",F.Always="always"})(Se||(Se={}));class me{constructor(F,te=[]){this._elements=te,this.onDidChange=R.c.forEach(F,Ae=>this._elements=Ae)}get elements(){return this._elements}}class he{constructor(F,te,Ae,Ye,pt={}){this.renderer=F,this.modelProvider=te,this.activeNodes=Ye,this.renderedElements=new Map,this.renderedNodes=new Map,this.indent=he.DefaultIndent,this.hideTwistiesOfChildlessElements=!1,this.shouldRenderIndentGuides=!1,this.renderedIndentGuides=new G.a,this.activeIndentNodes=new Set,this.indentGuidesDisposable=A.a.None,this.disposables=new A.b,this.templateId=F.templateId,this.updateOptions(pt),R.c.map(Ae,Mt=>Mt.node)(this.onDidChangeNodeTwistieState,this,this.disposables),F.onDidChangeTwistieState&&F.onDidChangeTwistieState(this.onDidChangeTwistieState,this,this.disposables)}updateOptions(F={}){if(typeof F.indent!="undefined"&&(this.indent=Object(pe.b)(F.indent,0,40)),typeof F.renderIndentGuides!="undefined"){const te=F.renderIndentGuides!==Se.None;if(te!==this.shouldRenderIndentGuides&&(this.shouldRenderIndentGuides=te,this.indentGuidesDisposable.dispose(),te)){const Ae=new A.b;this.activeNodes.onDidChange(this._onDidChangeActiveNodes,this,Ae),this.indentGuidesDisposable=Ae,this._onDidChangeActiveNodes(this.activeNodes.elements)}}typeof F.hideTwistiesOfChildlessElements!="undefined"&&(this.hideTwistiesOfChildlessElements=F.hideTwistiesOfChildlessElements)}renderTemplate(F){const te=Object(g.q)(F,Object(g.a)(".monaco-tl-row")),Ae=Object(g.q)(te,Object(g.a)(".monaco-tl-indent")),Ye=Object(g.q)(te,Object(g.a)(".monaco-tl-twistie")),pt=Object(g.q)(te,Object(g.a)(".monaco-tl-contents")),Mt=this.renderer.renderTemplate(pt);return{container:F,indent:Ae,twistie:Ye,indentGuidesDisposable:A.a.None,templateData:Mt}}renderElement(F,te,Ae,Ye){typeof Ye=="number"&&(this.renderedNodes.set(F,{templateData:Ae,height:Ye}),this.renderedElements.set(F.element,F));const pt=he.DefaultIndent+(F.depth-1)*this.indent;Ae.twistie.style.paddingLeft=`${pt}px`,Ae.indent.style.width=`${pt+this.indent-16}px`,this.renderTwistie(F,Ae),typeof Ye=="number"&&this.renderIndentGuides(F,Ae),this.renderer.renderElement(F,te,Ae.templateData,Ye)}disposeElement(F,te,Ae,Ye){Ae.indentGuidesDisposable.dispose(),this.renderer.disposeElement&&this.renderer.disposeElement(F,te,Ae.templateData,Ye),typeof Ye=="number"&&(this.renderedNodes.delete(F),this.renderedElements.delete(F.element))}disposeTemplate(F){this.renderer.disposeTemplate(F.templateData)}onDidChangeTwistieState(F){const te=this.renderedElements.get(F);if(!te)return;this.onDidChangeNodeTwistieState(te)}onDidChangeNodeTwistieState(F){const te=this.renderedNodes.get(F);if(!te)return;this.renderTwistie(F,te.templateData),this._onDidChangeActiveNodes(this.activeNodes.elements),this.renderIndentGuides(F,te.templateData)}renderTwistie(F,te){te.twistie.classList.remove(...le.classNamesArray);let Ae=!1;this.renderer.renderTwistie&&(Ae=this.renderer.renderTwistie(F.element,te.twistie)),F.collapsible&&(!this.hideTwistiesOfChildlessElements||F.visibleChildrenCount>0)?(Ae||te.twistie.classList.add(...le.classNamesArray),te.twistie.classList.add("collapsible"),te.twistie.classList.toggle("collapsed",F.collapsed)):te.twistie.classList.remove("collapsible","collapsed"),F.collapsible?te.container.setAttribute("aria-expanded",String(!F.collapsed)):te.container.removeAttribute("aria-expanded")}renderIndentGuides(F,te){if(Object(g.t)(te.indent),te.indentGuidesDisposable.dispose(),!this.shouldRenderIndentGuides)return;const Ae=new A.b,Ye=this.modelProvider();let pt=F;for(;;){const Mt=Ye.getNodeLocation(pt),jt=Ye.getParentNodeLocation(Mt);if(!jt)break;const $t=Ye.getNode(jt),uo=Object(g.a)(".indent-guide",{style:`width: ${this.indent}px`});this.activeIndentNodes.has($t)&&uo.classList.add("active"),te.indent.childElementCount===0?te.indent.appendChild(uo):te.indent.insertBefore(uo,te.indent.firstElementChild),this.renderedIndentGuides.add($t,uo),Ae.add(Object(A.i)(()=>this.renderedIndentGuides.delete($t,uo))),pt=$t}te.indentGuidesDisposable=Ae}_onDidChangeActiveNodes(F){if(!this.shouldRenderIndentGuides)return;const te=new Set,Ae=this.modelProvider();F.forEach(Ye=>{const pt=Ae.getNodeLocation(Ye);try{const Mt=Ae.getParentNodeLocation(pt);Ye.collapsible&&Ye.children.length>0&&!Ye.collapsed?te.add(Ye):Mt&&te.add(Ae.getNode(Mt))}catch(Mt){}}),this.activeIndentNodes.forEach(Ye=>{te.has(Ye)||this.renderedIndentGuides.forEach(Ye,pt=>pt.classList.remove("active"))}),te.forEach(Ye=>{this.activeIndentNodes.has(Ye)||this.renderedIndentGuides.forEach(Ye,pt=>pt.classList.add("active"))}),this.activeIndentNodes=te}dispose(){this.renderedNodes.clear(),this.renderedElements.clear(),this.indentGuidesDisposable.dispose(),Object(A.f)(this.disposables)}}he.DefaultIndent=8;class Le{constructor(F,te,Ae){this.tree=F,this.keyboardNavigationLabelProvider=te,this._filter=Ae,this._totalCount=0,this._matchCount=0,this._pattern="",this._lowercasePattern="",this.disposables=new A.b,F.onWillRefilter(this.reset,this,this.disposables)}get totalCount(){return this._totalCount}get matchCount(){return this._matchCount}set pattern(F){this._pattern=F,this._lowercasePattern=F.toLowerCase()}filter(F,te){if(this._filter){const pt=this._filter.filter(F,te);if(this.tree.options.simpleKeyboardNavigation)return pt;let Mt;if(typeof pt=="boolean"?Mt=pt?1:0:z(pt)?Mt=J(pt.visibility):Mt=pt,Mt===0)return!1}if(this._totalCount++,this.tree.options.simpleKeyboardNavigation||!this._pattern)return this._matchCount++,{data:ee.a.Default,visibility:!0};const Ae=this.keyboardNavigationLabelProvider.getKeyboardNavigationLabel(F),Ye=Array.isArray(Ae)?Ae:[Ae];for(const pt of Ye){const Mt=pt&&pt.toString();if(typeof Mt=="undefined")return{data:ee.a.Default,visibility:!0};const jt=Object(ee.d)(this._pattern,this._lowercasePattern,0,Mt,Mt.toLowerCase(),0,!0);if(jt)return this._matchCount++,Ye.length===1?{data:jt,visibility:!0}:{data:{label:Mt,score:jt},visibility:!0}}return this.tree.options.filterOnType?2:{data:ee.a.Default,visibility:!0}}reset(){this._totalCount=0,this._matchCount=0}dispose(){Object(A.f)(this.disposables)}}class we{constructor(F,te,Ae,Ye,pt){this.tree=F,this.view=Ae,this.filter=Ye,this.keyboardNavigationDelegate=pt,this._enabled=!1,this._pattern="",this._empty=!1,this._onDidChangeEmptyState=new R.b,this.positionClassName="ne",this.automaticKeyboardNavigation=!0,this.triggered=!1,this._onDidChangePattern=new R.b,this.enabledDisposables=new A.b,this.disposables=new A.b,this.domNode=Object(g.a)(`.monaco-list-type-filter.${this.positionClassName}`),this.domNode.draggable=!0,this.disposables.add(Object(g.i)(this.domNode,"dragstart",()=>this.onDragStart())),this.messageDomNode=Object(g.q)(Ae.getHTMLElement(),Object(g.a)(".monaco-list-type-filter-message")),this.labelDomNode=Object(g.q)(this.domNode,Object(g.a)("span.label"));const Mt=Object(g.q)(this.domNode,Object(g.a)(".controls"));this._filterOnType=!!F.options.filterOnType,this.filterOnTypeDomNode=Object(g.q)(Mt,Object(g.a)("input.filter")),this.filterOnTypeDomNode.type="checkbox",this.filterOnTypeDomNode.checked=this._filterOnType,this.filterOnTypeDomNode.tabIndex=-1,this.updateFilterOnTypeTitleAndIcon(),this.disposables.add(Object(g.i)(this.filterOnTypeDomNode,"input",()=>this.onDidChangeFilterOnType())),this.clearDomNode=Object(g.q)(Mt,Object(g.a)("button.clear"+oe.cssSelector)),this.clearDomNode.tabIndex=-1,this.clearDomNode.title=Object(Me.a)("clear","Clear"),this.keyboardNavigationEventFilter=F.options.keyboardNavigationEventFilter,te.onDidSplice(this.onDidSpliceModel,this,this.disposables),this.updateOptions(F.options)}get enabled(){return this._enabled}get pattern(){return this._pattern}get filterOnType(){return this._filterOnType}updateOptions(F){F.simpleKeyboardNavigation?this.disable():this.enable(),typeof F.filterOnType!="undefined"&&(this._filterOnType=!!F.filterOnType,this.filterOnTypeDomNode.checked=this._filterOnType,this.updateFilterOnTypeTitleAndIcon()),typeof F.automaticKeyboardNavigation!="undefined"&&(this.automaticKeyboardNavigation=F.automaticKeyboardNavigation),this.tree.refilter(),this.render(),this.automaticKeyboardNavigation||this.onEventOrInput("")}enable(){if(this._enabled)return;const F=this.enabledDisposables.add(new S.a(this.view.getHTMLElement(),"keydown")),te=R.c.chain(F.event).filter(Ye=>!Object(I.e)(Ye.target)||Ye.target===this.filterOnTypeDomNode).filter(Ye=>Ye.key!=="Dead"&&!/^Media/.test(Ye.key)).map(Ye=>new E.a(Ye)).filter(this.keyboardNavigationEventFilter||(()=>!0)).filter(()=>this.automaticKeyboardNavigation||this.triggered).filter(Ye=>this.keyboardNavigationDelegate.mightProducePrintableCharacter(Ye)&&!(Ye.keyCode===18||Ye.keyCode===16||Ye.keyCode===15||Ye.keyCode===17)||(this.pattern.length>0||this.triggered)&&((Ye.keyCode===9||Ye.keyCode===1)&&!Ye.altKey&&!Ye.ctrlKey)&&!Ye.metaKey||Ye.keyCode===1&&(Te.f?Ye.altKey&&!Ye.metaKey:Ye.ctrlKey)&&!Ye.shiftKey).forEach(Ye=>{Ye.stopPropagation(),Ye.preventDefault()}).event,Ae=this.enabledDisposables.add(new S.a(this.clearDomNode,"click"));R.c.chain(R.c.any(te,Ae.event)).event(this.onEventOrInput,this,this.enabledDisposables),this.filter.pattern="",this.tree.refilter(),this.render(),this._enabled=!0,this.triggered=!1}disable(){if(!this._enabled)return;this.domNode.remove(),this.enabledDisposables.clear(),this.tree.refilter(),this.render(),this._enabled=!1,this.triggered=!1}onEventOrInput(F){typeof F=="string"?this.onInput(F):F instanceof MouseEvent||F.keyCode===9||F.keyCode===1&&(Te.f?F.altKey:F.ctrlKey)?this.onInput(""):F.keyCode===1?this.onInput(this.pattern.length===0?"":this.pattern.substr(0,this.pattern.length-1)):this.onInput(this.pattern+F.browserEvent.key)}onInput(F){const te=this.view.getHTMLElement();F&&!this.domNode.parentElement?te.append(this.domNode):!F&&this.domNode.parentElement&&(this.domNode.remove(),this.tree.domFocus()),this._pattern=F,this._onDidChangePattern.fire(F),this.filter.pattern=F,this.tree.refilter(),F&&this.tree.focusNext(0,!0,void 0,Ye=>!ee.a.isDefault(Ye.filterData));const Ae=this.tree.getFocus();if(Ae.length>0){const Ye=Ae[0];this.tree.getRelativeTop(Ye)===null&&this.tree.reveal(Ye,.5)}this.render(),F||(this.triggered=!1)}onDragStart(){const F=this.view.getHTMLElement(),{left:te}=Object(g.D)(F),Ae=F.clientWidth,Ye=Ae/2,pt=this.domNode.clientWidth,Mt=new A.b;let jt=this.positionClassName;const $t=()=>{switch(jt){case"nw":this.domNode.style.top="4px",this.domNode.style.left="4px";break;case"ne":this.domNode.style.top="4px",this.domNode.style.left=`${Ae-pt-6}px`;break}},uo=ho=>{ho.preventDefault();const mo=ho.clientX-te;ho.dataTransfer&&(ho.dataTransfer.dropEffect="none"),mo<Ye?jt="nw":jt="ne",$t()},io=()=>{this.positionClassName=jt,this.domNode.className=`monaco-list-type-filter ${this.positionClassName}`,this.domNode.style.top="",this.domNode.style.left="",Object(A.f)(Mt)};$t(),this.domNode.classList.remove(jt),this.domNode.classList.add("dragging"),Mt.add(Object(A.i)(()=>this.domNode.classList.remove("dragging"))),Mt.add(Object(g.i)(document,"dragover",ho=>uo(ho))),Mt.add(Object(g.i)(this.domNode,"dragend",()=>io())),p.c.CurrentDragAndDropData=new p.b("vscode-ui"),Mt.add(Object(A.i)(()=>p.c.CurrentDragAndDropData=void 0))}onDidSpliceModel(){if(!this._enabled||this.pattern.length===0)return;this.tree.refilter(),this.render()}onDidChangeFilterOnType(){this.tree.updateOptions({filterOnType:this.filterOnTypeDomNode.checked}),this.tree.refilter(),this.tree.domFocus(),this.render(),this.updateFilterOnTypeTitleAndIcon()}updateFilterOnTypeTitleAndIcon(){this.filterOnType?(this.filterOnTypeDomNode.classList.remove(...Ce.classNamesArray),this.filterOnTypeDomNode.classList.add(..._e.classNamesArray),this.filterOnTypeDomNode.title=Object(Me.a)("disable filter on type","Disable Filter on Type")):(this.filterOnTypeDomNode.classList.remove(..._e.classNamesArray),this.filterOnTypeDomNode.classList.add(...Ce.classNamesArray),this.filterOnTypeDomNode.title=Object(Me.a)("enable filter on type","Enable Filter on Type"))}render(){const F=this.filter.totalCount>0&&this.filter.matchCount===0;this.pattern&&this.tree.options.filterOnType&&F?(this.messageDomNode.textContent=Object(Me.a)("empty","No elements found"),this._empty=!0):(this.messageDomNode.innerText="",this._empty=!1),this.domNode.classList.toggle("no-matches",F),this.domNode.title=Object(Me.a)("found","Matched {0} out of {1} elements",this.filter.matchCount,this.filter.totalCount),this.labelDomNode.textContent=this.pattern.length>16?"\u2026"+this.pattern.substr(this.pattern.length-16):this.pattern,this._onDidChangeEmptyState.fire(this._empty)}shouldAllowFocus(F){return!this.enabled||!this.pattern||this.filterOnType||this.filter.totalCount>0&&this.filter.matchCount<=1?!0:!ee.a.isDefault(F.filterData)}dispose(){this._enabled&&(this.domNode.remove(),this.enabledDisposables.dispose(),this._enabled=!1,this.triggered=!1),this._onDidChangePattern.dispose(),Object(A.f)(this.disposables)}}function ve(F){let te=y.Unknown;return Object(g.J)(F.browserEvent.target,"monaco-tl-twistie","monaco-tl-row")?te=y.Twistie:Object(g.J)(F.browserEvent.target,"monaco-tl-contents","monaco-tl-row")&&(te=y.Element),{browserEvent:F.browserEvent,element:F.element?F.element.element:null,target:te}}function ie(F,te){te(F),F.children.forEach(Ae=>ie(Ae,te))}class W{constructor(F,te){this.getFirstViewElementWithTrait=F,this.identityProvider=te,this.nodes=[],this._onDidChange=new R.b,this.onDidChange=this._onDidChange.event}get nodeSet(){return this._nodeSet||(this._nodeSet=this.createNodeSet()),this._nodeSet}set(F,te){var Ae;if(!((Ae=te)===null||Ae===void 0?void 0:Ae.__forceEvent)&&Object(B.g)(this.nodes,F))return;this._set(F,!1,te)}_set(F,te,Ae){if(this.nodes=[...F],this.elements=void 0,this._nodeSet=void 0,!te){const Ye=this;this._onDidChange.fire({get elements(){return Ye.get()},browserEvent:Ae})}}get(){return this.elements||(this.elements=this.nodes.map(F=>F.element)),[...this.elements]}getNodes(){return this.nodes}has(F){return this.nodeSet.has(F)}onDidModelSplice({insertedNodes:F,deletedNodes:te}){if(!this.identityProvider){const $t=this.createNodeSet(),uo=io=>$t.delete(io);te.forEach(io=>ie(io,uo)),this.set([...$t.values()]);return}const Ae=new Set,Ye=$t=>Ae.add(this.identityProvider.getId($t.element).toString());te.forEach($t=>ie($t,Ye));const pt=new Map,Mt=$t=>pt.set(this.identityProvider.getId($t.element).toString(),$t);F.forEach($t=>ie($t,Mt));const jt=[];for(const $t of this.nodes){const uo=this.identityProvider.getId($t.element).toString(),io=Ae.has(uo);if(!io)jt.push($t);else{const ho=pt.get(uo);ho&&jt.push(ho)}}if(this.nodes.length>0&&jt.length===0){const $t=this.getFirstViewElementWithTrait();$t&&jt.push($t)}this._set(jt,!0)}createNodeSet(){const F=new Set;for(const te of this.nodes)F.add(te);return F}}class U extends I.d{constructor(F,te){super(F);this.tree=te}onViewPointer(F){if(Object(I.e)(F.browserEvent.target)||Object(I.f)(F.browserEvent.target))return;const te=F.element;if(!te)return super.onViewPointer(F);if(this.isSelectionRangeChangeEvent(F)||this.isSelectionSingleChangeEvent(F))return super.onViewPointer(F);const Ae=F.browserEvent.target,Ye=Ae.classList.contains("monaco-tl-twistie")||Ae.classList.contains("monaco-icon-label")&&Ae.classList.contains("folder-icon")&&F.browserEvent.offsetX<16;let pt=!1;if(typeof this.tree.expandOnlyOnTwistieClick=="function"?pt=this.tree.expandOnlyOnTwistieClick(te.element):pt=!!this.tree.expandOnlyOnTwistieClick,pt&&!Ye&&F.browserEvent.detail!==2)return super.onViewPointer(F);if(!this.tree.expandOnDoubleClick&&F.browserEvent.detail===2)return super.onViewPointer(F);if(te.collapsible){const Mt=this.tree.model,jt=Mt.getNodeLocation(te),$t=F.browserEvent.altKey;if(this.tree.setFocus([jt]),Mt.setCollapsed(jt,void 0,$t),pt&&Ye)return}super.onViewPointer(F)}onDoubleClick(F){const te=F.browserEvent.target.classList.contains("monaco-tl-twistie");if(te||!this.tree.expandOnDoubleClick)return;super.onDoubleClick(F)}}class se extends I.c{constructor(F,te,Ae,Ye,pt,Mt,jt,$t){super(F,te,Ae,Ye,$t);this.focusTrait=pt,this.selectionTrait=Mt,this.anchorTrait=jt}createMouseController(F){return new U(this,F.tree)}splice(F,te,Ae=[]){if(super.splice(F,te,Ae),Ae.length===0)return;const Ye=[],pt=[];let Mt;Ae.forEach((jt,$t)=>{this.focusTrait.has(jt)&&Ye.push(F+$t),this.selectionTrait.has(jt)&&pt.push(F+$t),this.anchorTrait.has(jt)&&(Mt=F+$t)}),Ye.length>0&&super.setFocus(Object(B.f)([...super.getFocus(),...Ye])),pt.length>0&&super.setSelection(Object(B.f)([...super.getSelection(),...pt])),typeof Mt=="number"&&super.setAnchor(Mt)}setFocus(F,te,Ae=!1){super.setFocus(F,te),Ae||this.focusTrait.set(F.map(Ye=>this.element(Ye)),te)}setSelection(F,te,Ae=!1){super.setSelection(F,te),Ae||this.selectionTrait.set(F.map(Ye=>this.element(Ye)),te)}setAnchor(F,te=!1){super.setAnchor(F),te||(typeof F=="undefined"?this.anchorTrait.set([]):this.anchorTrait.set([this.element(F)]))}}class je{constructor(F,te,Ae,Ye,pt={}){this._options=pt,this.eventBufferer=new R.d,this.disposables=new A.b,this._onWillRefilter=new R.b,this.onWillRefilter=this._onWillRefilter.event,this._onDidUpdateOptions=new R.b;const Mt=new Be(Ae),jt=new R.f,$t=new R.f,uo=new me($t.event);this.renderers=Ye.map(mo=>new he(mo,()=>this.model,jt.event,uo,pt));for(let mo of this.renderers)this.disposables.add(mo);let io;pt.keyboardNavigationLabelProvider&&(io=new Le(this,pt.keyboardNavigationLabelProvider,pt.filter),pt=Object.assign(Object.assign({},pt),{filter:io}),this.disposables.add(io)),this.focus=new W(()=>this.view.getFocusedElements()[0],pt.identityProvider),this.selection=new W(()=>this.view.getSelectedElements()[0],pt.identityProvider),this.anchor=new W(()=>this.view.getAnchorElement(),pt.identityProvider),this.view=new se(F,te,Mt,this.renderers,this.focus,this.selection,this.anchor,Object.assign(Object.assign({},Pe(()=>this.model,pt)),{tree:this})),this.model=this.createModel(F,this.view,pt),jt.input=this.model.onDidChangeCollapseState;const ho=R.c.forEach(this.model.onDidSplice,mo=>{this.eventBufferer.bufferEvents(()=>{this.focus.onDidModelSplice(mo),this.selection.onDidModelSplice(mo)})});if(ho(()=>null,null,this.disposables),$t.input=R.c.chain(R.c.any(ho,this.focus.onDidChange,this.selection.onDidChange)).debounce(()=>null,0).map(()=>{const mo=new Set;for(const Io of this.focus.getNodes())mo.add(Io);for(const Io of this.selection.getNodes())mo.add(Io);return[...mo.values()]}).event,pt.keyboardSupport!==!1){const mo=R.c.chain(this.view.onKeyDown).filter(Io=>!Object(I.e)(Io.target)).map(Io=>new E.a(Io));mo.filter(Io=>Io.keyCode===15).on(this.onLeftArrow,this,this.disposables),mo.filter(Io=>Io.keyCode===17).on(this.onRightArrow,this,this.disposables),mo.filter(Io=>Io.keyCode===10).on(this.onSpace,this,this.disposables)}if(pt.keyboardNavigationLabelProvider){const mo=pt.keyboardNavigationDelegate||I.a;this.typeFilterController=new we(this,this.model,this.view,io,mo),this.focusNavigationFilter=Io=>this.typeFilterController.shouldAllowFocus(Io),this.disposables.add(this.typeFilterController)}this.styleElement=Object(g.w)(this.view.getHTMLElement()),this.getHTMLElement().classList.toggle("always",this._options.renderIndentGuides===Se.Always)}get onDidChangeFocus(){return this.eventBufferer.wrapEvent(this.focus.onDidChange)}get onDidChangeSelection(){return this.eventBufferer.wrapEvent(this.selection.onDidChange)}get onMouseDblClick(){return R.c.map(this.view.onMouseDblClick,ve)}get onPointer(){return R.c.map(this.view.onPointer,ve)}get onDidFocus(){return this.view.onDidFocus}get onDidChangeCollapseState(){return this.model.onDidChangeCollapseState}get expandOnDoubleClick(){return typeof this._options.expandOnDoubleClick=="undefined"?!0:this._options.expandOnDoubleClick}get expandOnlyOnTwistieClick(){return typeof this._options.expandOnlyOnTwistieClick=="undefined"?!0:this._options.expandOnlyOnTwistieClick}get onDidDispose(){return this.view.onDidDispose}updateOptions(F={}){this._options=Object.assign(Object.assign({},this._options),F);for(const te of this.renderers)te.updateOptions(F);this.view.updateOptions(Object.assign(Object.assign({},this._options),{enableKeyboardNavigation:this._options.simpleKeyboardNavigation})),this.typeFilterController&&this.typeFilterController.updateOptions(this._options),this._onDidUpdateOptions.fire(this._options),this.getHTMLElement().classList.toggle("always",this._options.renderIndentGuides===Se.Always)}get options(){return this._options}getHTMLElement(){return this.view.getHTMLElement()}get scrollTop(){return this.view.scrollTop}set scrollTop(F){this.view.scrollTop=F}domFocus(){this.view.domFocus()}layout(F,te){this.view.layout(F,te)}style(F){const te=`.${this.view.domId}`,Ae=[];F.treeIndentGuidesStroke&&(Ae.push(`.monaco-list${te}:hover .monaco-tl-indent > .indent-guide, .monaco-list${te}.always .monaco-tl-indent > .indent-guide { border-color: ${F.treeIndentGuidesStroke.transparent(.4)}; }`),Ae.push(`.monaco-list${te} .monaco-tl-indent > .indent-guide.active { border-color: ${F.treeIndentGuidesStroke}; }`)),this.styleElement.textContent=Ae.join(`
|
|
|
`),this.view.style(F)}collapse(F,te=!1){return this.model.setCollapsed(F,!0,te)}expand(F,te=!1){return this.model.setCollapsed(F,!1,te)}isCollapsible(F){return this.model.isCollapsible(F)}setCollapsible(F,te){return this.model.setCollapsible(F,te)}isCollapsed(F){return this.model.isCollapsed(F)}refilter(){this._onWillRefilter.fire(void 0),this.model.refilter()}setSelection(F,te){const Ae=F.map(pt=>this.model.getNode(pt));this.selection.set(Ae,te);const Ye=F.map(pt=>this.model.getListIndex(pt)).filter(pt=>pt>-1);this.view.setSelection(Ye,te,!0)}getSelection(){return this.selection.get()}setFocus(F,te){const Ae=F.map(pt=>this.model.getNode(pt));this.focus.set(Ae,te);const Ye=F.map(pt=>this.model.getListIndex(pt)).filter(pt=>pt>-1);this.view.setFocus(Ye,te,!0)}focusNext(F=1,te=!1,Ae,Ye=this.focusNavigationFilter){this.view.focusNext(F,te,Ae,Ye)}getFocus(){return this.focus.get()}reveal(F,te){this.model.expandTo(F);const Ae=this.model.getListIndex(F);if(Ae===-1)return;this.view.reveal(Ae,te)}getRelativeTop(F){const te=this.model.getListIndex(F);return te===-1?null:this.view.getRelativeTop(te)}onLeftArrow(F){F.preventDefault(),F.stopPropagation();const te=this.view.getFocusedElements();if(te.length===0)return;const Ae=te[0],Ye=this.model.getNodeLocation(Ae),pt=this.model.setCollapsed(Ye,!0);if(!pt){const Mt=this.model.getParentNodeLocation(Ye);if(!Mt)return;const jt=this.model.getListIndex(Mt);this.view.reveal(jt),this.view.setFocus([jt])}}onRightArrow(F){F.preventDefault(),F.stopPropagation();const te=this.view.getFocusedElements();if(te.length===0)return;const Ae=te[0],Ye=this.model.getNodeLocation(Ae),pt=this.model.setCollapsed(Ye,!1);if(!pt){if(!Ae.children.some($t=>$t.visible))return;const[Mt]=this.view.getFocus(),jt=Mt+1;this.view.reveal(jt),this.view.setFocus([jt])}}onSpace(F){F.preventDefault(),F.stopPropagation();const te=this.view.getFocusedElements();if(te.length===0)return;const Ae=te[0],Ye=this.model.getNodeLocation(Ae),pt=F.browserEvent.altKey;this.model.setCollapsed(Ye,void 0,pt)}dispose(){Object(A.f)(this.disposables),this.view.dispose()}}class Re{constructor(F,te,Ae={}){this.user=F,this.rootRef=null,this.nodes=new Map,this.nodesByIdentity=new Map,this.model=new Z(F,te,null,Ae),this.onDidSplice=this.model.onDidSplice,this.onDidChangeCollapseState=this.model.onDidChangeCollapseState,this.onDidChangeRenderNodeCount=this.model.onDidChangeRenderNodeCount,Ae.sorter&&(this.sorter={compare(Ye,pt){return Ae.sorter.compare(Ye.element,pt.element)}}),this.identityProvider=Ae.identityProvider}setChildren(F,te=q.a.empty(),Ae={}){const Ye=this.getElementLocation(F);this._setChildren(Ye,this.preserveCollapseState(te),Ae)}_setChildren(F,te=q.a.empty(),Ae){const Ye=new Set,pt=new Set,Mt=$t=>{var uo;if($t.element===null)return;const io=$t;if(Ye.add(io.element),this.nodes.set(io.element,io),this.identityProvider){const ho=this.identityProvider.getId(io.element).toString();pt.add(ho),this.nodesByIdentity.set(ho,io)}(uo=Ae.onDidCreateNode)===null||uo===void 0||uo.call(Ae,io)},jt=$t=>{var uo;if($t.element===null)return;const io=$t;if(Ye.has(io.element)||this.nodes.delete(io.element),this.identityProvider){const ho=this.identityProvider.getId(io.element).toString();pt.has(ho)||this.nodesByIdentity.delete(ho)}(uo=Ae.onDidDeleteNode)===null||uo===void 0||uo.call(Ae,io)};this.model.splice([...F,0],Number.MAX_VALUE,te,Object.assign(Object.assign({},Ae),{onDidCreateNode:Mt,onDidDeleteNode:jt}))}preserveCollapseState(F=q.a.empty()){return this.sorter&&(F=[...F].sort(this.sorter.compare.bind(this.sorter))),q.a.map(F,te=>{let Ae=this.nodes.get(te.element);if(!Ae&&this.identityProvider){const Mt=this.identityProvider.getId(te.element).toString();Ae=this.nodesByIdentity.get(Mt)}if(!Ae)return Object.assign(Object.assign({},te),{children:this.preserveCollapseState(te.children)});const Ye=typeof te.collapsible=="boolean"?te.collapsible:Ae.collapsible,pt=typeof te.collapsed!="undefined"?te.collapsed:Ae.collapsed;return Object.assign(Object.assign({},te),{collapsible:Ye,collapsed:pt,children:this.preserveCollapseState(te.children)})})}rerender(F){const te=this.getElementLocation(F);this.model.rerender(te)}has(F){return this.nodes.has(F)}getListIndex(F){const te=this.getElementLocation(F);return this.model.getListIndex(te)}getListRenderCount(F){const te=this.getElementLocation(F);return this.model.getListRenderCount(te)}isCollapsible(F){const te=this.getElementLocation(F);return this.model.isCollapsible(te)}setCollapsible(F,te){const Ae=this.getElementLocation(F);return this.model.setCollapsible(Ae,te)}isCollapsed(F){const te=this.getElementLocation(F);return this.model.isCollapsed(te)}setCollapsed(F,te,Ae){const Ye=this.getElementLocation(F);return this.model.setCollapsed(Ye,te,Ae)}expandTo(F){const te=this.getElementLocation(F);this.model.expandTo(te)}refilter(){this.model.refilter()}getNode(F=null){if(F===null)return this.model.getNode(this.model.rootRef);const te=this.nodes.get(F);if(!te)throw new O(this.user,`Tree element not found: ${F}`);return te}getNodeLocation(F){return F.element}getParentNodeLocation(F){if(F===null)throw new O(this.user,"Invalid getParentNodeLocation call");const te=this.nodes.get(F);if(!te)throw new O(this.user,`Tree element not found: ${F}`);const Ae=this.model.getNodeLocation(te),Ye=this.model.getParentNodeLocation(Ae),pt=this.model.getNode(Ye);return pt.element}getElementLocation(F){if(F===null)return[];const te=this.nodes.get(F);if(!te)throw new O(this.user,`Tree element not found: ${F}`);return this.model.getNodeLocation(te)}}function We(F){const te=[F.element],Ae=F.incompressible||!1;return{element:{elements:te,incompressible:Ae},children:q.a.map(q.a.from(F.children),We),collapsible:F.collapsible,collapsed:F.collapsed}}function dt(F){const te=[F.element],Ae=F.incompressible||!1;let Ye,pt;for(;!([pt,Ye]=q.a.consume(q.a.from(F.children),2),pt.length!==1);){if(pt[0].incompressible)break;F=pt[0],te.push(F.element)}return{element:{elements:te,incompressible:Ae},children:q.a.map(q.a.concat(pt,Ye),dt),collapsible:F.collapsible,collapsed:F.collapsed}}function Lt(F,te=0){let Ae;return te<F.element.elements.length-1?Ae=[Lt(F,te+1)]:Ae=q.a.map(q.a.from(F.children),Ye=>Lt(Ye,0)),te===0&&F.element.incompressible?{element:F.element.elements[te],children:Ae,incompressible:!0,collapsible:F.collapsible,collapsed:F.collapsed}:{element:F.element.elements[te],children:Ae,collapsible:F.collapsible,collapsed:F.collapsed}}function Ht(F){return Lt(F,0)}function $e(F,te,Ae){return F.element===te?Object.assign(Object.assign({},F),{children:Ae}):Object.assign(Object.assign({},F),{children:q.a.map(q.a.from(F.children),Ye=>$e(Ye,te,Ae))})}const ot=F=>({getId(te){return te.elements.map(Ae=>F.getId(Ae).toString()).join("\0")}});class ce{constructor(F,te,Ae={}){this.user=F,this.rootRef=null,this.nodes=new Map,this.model=new Re(F,te,Ae),this.enabled=typeof Ae.compressionEnabled=="undefined"?!0:Ae.compressionEnabled,this.identityProvider=Ae.identityProvider}get onDidSplice(){return this.model.onDidSplice}get onDidChangeCollapseState(){return this.model.onDidChangeCollapseState}get onDidChangeRenderNodeCount(){return this.model.onDidChangeRenderNodeCount}setChildren(F,te=q.a.empty(),Ae){const Ye=Ae.diffIdentityProvider&&ot(Ae.diffIdentityProvider);if(F===null){const Io=q.a.map(te,this.enabled?dt:We);this._setChildren(null,Io,{diffIdentityProvider:Ye,diffDepth:Infinity});return}const pt=this.nodes.get(F);if(!pt)throw new Error("Unknown compressed tree node");const Mt=this.model.getNode(pt),jt=this.model.getParentNodeLocation(pt),$t=this.model.getNode(jt),uo=Ht(Mt),io=$e(uo,F,te),ho=(this.enabled?dt:We)(io),mo=$t.children.map(Io=>Io===Mt?ho:Io);this._setChildren($t.element,mo,{diffIdentityProvider:Ye,diffDepth:Mt.depth-$t.depth})}setCompressionEnabled(F){if(F===this.enabled)return;this.enabled=F;const te=this.model.getNode(),Ae=te.children,Ye=q.a.map(Ae,Ht),pt=q.a.map(Ye,F?dt:We);this._setChildren(null,pt,{diffIdentityProvider:this.identityProvider,diffDepth:Infinity})}_setChildren(F,te,Ae){const Ye=new Set,pt=jt=>{for(const $t of jt.element.elements)Ye.add($t),this.nodes.set($t,jt.element)},Mt=jt=>{for(const $t of jt.element.elements)Ye.has($t)||this.nodes.delete($t)};this.model.setChildren(F,te,Object.assign(Object.assign({},Ae),{onDidCreateNode:pt,onDidDeleteNode:Mt}))}has(F){return this.nodes.has(F)}getListIndex(F){const te=this.getCompressedNode(F);return this.model.getListIndex(te)}getListRenderCount(F){const te=this.getCompressedNode(F);return this.model.getListRenderCount(te)}getNode(F){if(typeof F=="undefined")return this.model.getNode();const te=this.getCompressedNode(F);return this.model.getNode(te)}getNodeLocation(F){const te=this.model.getNodeLocation(F);return te===null?null:te.elements[te.elements.length-1]}getParentNodeLocation(F){const te=this.getCompressedNode(F),Ae=this.model.getParentNodeLocation(te);return Ae===null?null:Ae.elements[Ae.elements.length-1]}isCollapsible(F){const te=this.getCompressedNode(F);return this.model.isCollapsible(te)}setCollapsible(F,te){const Ae=this.getCompressedNode(F);return this.model.setCollapsible(Ae,te)}isCollapsed(F){const te=this.getCompressedNode(F);return this.model.isCollapsed(te)}setCollapsed(F,te,Ae){const Ye=this.getCompressedNode(F);return this.model.setCollapsed(Ye,te,Ae)}expandTo(F){const te=this.getCompressedNode(F);this.model.expandTo(te)}rerender(F){const te=this.getCompressedNode(F);this.model.rerender(te)}refilter(){this.model.refilter()}getCompressedNode(F){if(F===null)return null;const te=this.nodes.get(F);if(!te)throw new O(this.user,`Tree element not found: ${F}`);return te}}const Ve=F=>F[F.length-1];class it{constructor(F,te){this.unwrapper=F,this.node=te}get element(){return this.node.element===null?null:this.unwrapper(this.node.element)}get children(){return this.node.children.map(F=>new it(this.unwrapper,F))}get depth(){return this.node.depth}get visibleChildrenCount(){return this.node.visibleChildrenCount}get visibleChildIndex(){return this.node.visibleChildIndex}get collapsible(){return this.node.collapsible}get collapsed(){return this.node.collapsed}get visible(){return this.node.visible}get filterData(){return this.node.filterData}}function Et(F,te){return{splice(Ae,Ye,pt){te.splice(Ae,Ye,pt.map(Mt=>F.map(Mt)))},updateElementHeight(Ae,Ye){te.updateElementHeight(Ae,Ye)}}}function It(F,te){return Object.assign(Object.assign({},te),{identityProvider:te.identityProvider&&{getId(Ae){return te.identityProvider.getId(F(Ae))}},sorter:te.sorter&&{compare(Ae,Ye){return te.sorter.compare(Ae.elements[0],Ye.elements[0])}},filter:te.filter&&{filter(Ae,Ye){return te.filter.filter(F(Ae),Ye)}}})}class Rt{constructor(F,te,Ae={}){this.rootRef=null,this.elementMapper=Ae.elementMapper||Ve;const Ye=pt=>this.elementMapper(pt.elements);this.nodeMapper=new k(pt=>new it(Ye,pt)),this.model=new ce(F,Et(this.nodeMapper,te),It(Ye,Ae))}get onDidSplice(){return R.c.map(this.model.onDidSplice,({insertedNodes:F,deletedNodes:te})=>({insertedNodes:F.map(Ae=>this.nodeMapper.map(Ae)),deletedNodes:te.map(Ae=>this.nodeMapper.map(Ae))}))}get onDidChangeCollapseState(){return R.c.map(this.model.onDidChangeCollapseState,({node:F,deep:te})=>({node:this.nodeMapper.map(F),deep:te}))}get onDidChangeRenderNodeCount(){return R.c.map(this.model.onDidChangeRenderNodeCount,F=>this.nodeMapper.map(F))}setChildren(F,te=q.a.empty(),Ae={}){this.model.setChildren(F,te,Ae)}setCompressionEnabled(F){this.model.setCompressionEnabled(F)}has(F){return this.model.has(F)}getListIndex(F){return this.model.getListIndex(F)}getListRenderCount(F){return this.model.getListRenderCount(F)}getNode(F){return this.nodeMapper.map(this.model.getNode(F))}getNodeLocation(F){return F.element}getParentNodeLocation(F){return this.model.getParentNodeLocation(F)}isCollapsible(F){return this.model.isCollapsible(F)}setCollapsible(F,te){return this.model.setCollapsible(F,te)}isCollapsed(F){return this.model.isCollapsed(F)}setCollapsed(F,te,Ae){return this.model.setCollapsed(F,te,Ae)}expandTo(F){return this.model.expandTo(F)}rerender(F){return this.model.rerender(F)}refilter(){return this.model.refilter()}getCompressedTreeNode(F=null){return this.model.getNode(F)}}var vo=t("ZCR3"),Mo=function(F,te,Ae,Ye){var pt=arguments.length,Mt=pt<3?te:Ye===null?Ye=Object.getOwnPropertyDescriptor(te,Ae):Ye,jt;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")Mt=Reflect.decorate(F,te,Ae,Ye);else for(var $t=F.length-1;$t>=0;$t--)(jt=F[$t])&&(Mt=(pt<3?jt(Mt):pt>3?jt(te,Ae,Mt):jt(te,Ae))||Mt);return pt>3&&Mt&&Object.defineProperty(te,Ae,Mt),Mt};class xo extends je{constructor(F,te,Ae,Ye,pt={}){super(F,te,Ae,Ye,pt)}get onDidChangeCollapseState(){return this.model.onDidChangeCollapseState}setChildren(F,te=q.a.empty(),Ae){this.model.setChildren(F,te,Ae)}rerender(F){if(F===void 0){this.view.rerender();return}this.model.rerender(F)}hasElement(F){return this.model.has(F)}createModel(F,te,Ae){return new Re(F,te,Ae)}}class Do{constructor(F,te){this._compressedTreeNodeProvider=F,this.renderer=te,this.templateId=te.templateId,te.onDidChangeTwistieState&&(this.onDidChangeTwistieState=te.onDidChangeTwistieState)}get compressedTreeNodeProvider(){return this._compressedTreeNodeProvider()}renderTemplate(F){const te=this.renderer.renderTemplate(F);return{compressedTreeNode:void 0,data:te}}renderElement(F,te,Ae,Ye){const pt=this.compressedTreeNodeProvider.getCompressedTreeNode(F.element);pt.element.elements.length===1?(Ae.compressedTreeNode=void 0,this.renderer.renderElement(F,te,Ae.data,Ye)):(Ae.compressedTreeNode=pt,this.renderer.renderCompressedElements(pt,te,Ae.data,Ye))}disposeElement(F,te,Ae,Ye){Ae.compressedTreeNode?this.renderer.disposeCompressedElements&&this.renderer.disposeCompressedElements(Ae.compressedTreeNode,te,Ae.data,Ye):this.renderer.disposeElement&&this.renderer.disposeElement(F,te,Ae.data,Ye)}disposeTemplate(F){this.renderer.disposeTemplate(F.data)}renderTwistie(F,te){return this.renderer.renderTwistie?this.renderer.renderTwistie(F,te):!1}}Mo([vo.a],Do.prototype,"compressedTreeNodeProvider",null);function Lo(F,te){return te&&Object.assign(Object.assign({},te),{keyboardNavigationLabelProvider:te.keyboardNavigationLabelProvider&&{getKeyboardNavigationLabel(Ae){let Ye;try{Ye=F().getCompressedTreeNode(Ae)}catch(pt){return te.keyboardNavigationLabelProvider.getKeyboardNavigationLabel(Ae)}return Ye.element.elements.length===1?te.keyboardNavigationLabelProvider.getKeyboardNavigationLabel(Ae):te.keyboardNavigationLabelProvider.getCompressedNodeKeyboardNavigationLabel(Ye.element.elements)}}})}class To extends xo{constructor(F,te,Ae,Ye,pt={}){const Mt=()=>this,jt=Ye.map($t=>new Do(Mt,$t));super(F,te,Ae,jt,Lo(Mt,pt))}setChildren(F,te=q.a.empty(),Ae){this.model.setChildren(F,te,Ae)}createModel(F,te,Ae){return new Rt(F,te,Ae)}updateOptions(F={}){super.updateOptions(F),typeof F.compressionEnabled!="undefined"&&this.model.setCompressionEnabled(F.compressionEnabled)}getCompressedTreeNode(F=null){return this.model.getCompressedTreeNode(F)}}var Vt=t("/cxE"),xt=function(F,te,Ae,Ye){function pt(Mt){return Mt instanceof Ae?Mt:new Ae(function(jt){jt(Mt)})}return new(Ae||(Ae=Promise))(function(Mt,jt){function $t(ho){try{io(Ye.next(ho))}catch(mo){jt(mo)}}function uo(ho){try{io(Ye.throw(ho))}catch(mo){jt(mo)}}function io(ho){ho.done?Mt(ho.value):pt(ho.value).then($t,uo)}io((Ye=Ye.apply(F,te||[])).next())})};function ze(F){return Object.assign(Object.assign({},F),{children:[],refreshPromise:void 0,stale:!0,slow:!1,collapsedByDefault:void 0})}function ct(F,te){return te.parent?te.parent===F?!0:ct(F,te.parent):!1}function Ut(F,te){return F===te||ct(F,te)||ct(te,F)}class Qe{constructor(F){this.node=F}get element(){return this.node.element.element}get children(){return this.node.children.map(F=>new Qe(F))}get depth(){return this.node.depth}get visibleChildrenCount(){return this.node.visibleChildrenCount}get visibleChildIndex(){return this.node.visibleChildIndex}get collapsible(){return this.node.collapsible}get collapsed(){return this.node.collapsed}get visible(){return this.node.visible}get filterData(){return this.node.filterData}}class tt{constructor(F,te,Ae){this.renderer=F,this.nodeMapper=te,this.onDidChangeTwistieState=Ae,this.renderedNodes=new Map,this.templateId=F.templateId}renderTemplate(F){const te=this.renderer.renderTemplate(F);return{templateData:te}}renderElement(F,te,Ae,Ye){this.renderer.renderElement(this.nodeMapper.map(F),te,Ae.templateData,Ye)}renderTwistie(F,te){return F.slow?(te.classList.add(...ae.classNamesArray),!0):(te.classList.remove(...ae.classNamesArray),!1)}disposeElement(F,te,Ae,Ye){this.renderer.disposeElement&&this.renderer.disposeElement(this.nodeMapper.map(F),te,Ae.templateData,Ye)}disposeTemplate(F){this.renderer.disposeTemplate(F.templateData)}dispose(){this.renderedNodes.clear()}}function ut(F){return{browserEvent:F.browserEvent,elements:F.elements.map(te=>te.element)}}function Dt(F){return{browserEvent:F.browserEvent,element:F.element&&F.element.element,target:F.target}}class Pt extends c.a{constructor(F){super(F.elements.map(te=>te.element));this.data=F}}function Wt(F){return F instanceof c.a?new Pt(F):F}class zt{constructor(F){this.dnd=F}getDragURI(F){return this.dnd.getDragURI(F.element)}getDragLabel(F,te){return this.dnd.getDragLabel?this.dnd.getDragLabel(F.map(Ae=>Ae.element),te):void 0}onDragStart(F,te){this.dnd.onDragStart&&this.dnd.onDragStart(Wt(F),te)}onDragOver(F,te,Ae,Ye,pt=!0){return this.dnd.onDragOver(Wt(F),te&&te.element,Ae,Ye)}drop(F,te,Ae,Ye){this.dnd.drop(Wt(F),te&&te.element,Ae,Ye)}onDragEnd(F){this.dnd.onDragEnd&&this.dnd.onDragEnd(F)}}function so(F){return F&&Object.assign(Object.assign({},F),{collapseByDefault:!0,identityProvider:F.identityProvider&&{getId(te){return F.identityProvider.getId(te.element)}},dnd:F.dnd&&new zt(F.dnd),multipleSelectionController:F.multipleSelectionController&&{isSelectionSingleChangeEvent(te){return F.multipleSelectionController.isSelectionSingleChangeEvent(Object.assign(Object.assign({},te),{element:te.element}))},isSelectionRangeChangeEvent(te){return F.multipleSelectionController.isSelectionRangeChangeEvent(Object.assign(Object.assign({},te),{element:te.element}))}},accessibilityProvider:F.accessibilityProvider&&Object.assign(Object.assign({},F.accessibilityProvider),{getPosInSet:void 0,getSetSize:void 0,getRole:F.accessibilityProvider.getRole?te=>F.accessibilityProvider.getRole(te.element):()=>"treeitem",isChecked:F.accessibilityProvider.isChecked?te=>{var Ae;return!!((Ae=F.accessibilityProvider)===null||Ae===void 0?void 0:Ae.isChecked(te.element))}:void 0,getAriaLabel(te){return F.accessibilityProvider.getAriaLabel(te.element)},getWidgetAriaLabel(){return F.accessibilityProvider.getWidgetAriaLabel()},getWidgetRole:F.accessibilityProvider.getWidgetRole?()=>F.accessibilityProvider.getWidgetRole():()=>"tree",getAriaLevel:F.accessibilityProvider.getAriaLevel&&(te=>F.accessibilityProvider.getAriaLevel(te.element)),getActiveDescendantId:F.accessibilityProvider.getActiveDescendantId&&(te=>F.accessibilityProvider.getActiveDescendantId(te.element))}),filter:F.filter&&{filter(te,Ae){return F.filter.filter(te.element,Ae)}},keyboardNavigationLabelProvider:F.keyboardNavigationLabelProvider&&Object.assign(Object.assign({},F.keyboardNavigationLabelProvider),{getKeyboardNavigationLabel(te){return F.keyboardNavigationLabelProvider.getKeyboardNavigationLabel(te.element)}}),sorter:void 0,expandOnlyOnTwistieClick:typeof F.expandOnlyOnTwistieClick=="undefined"?void 0:typeof F.expandOnlyOnTwistieClick!="function"?F.expandOnlyOnTwistieClick:te=>F.expandOnlyOnTwistieClick(te.element),additionalScrollHeight:F.additionalScrollHeight})}function wo(F,te){te(F),F.children.forEach(Ae=>wo(Ae,te))}class No{constructor(F,te,Ae,Ye,pt,Mt={}){this.user=F,this.dataSource=pt,this.nodes=new Map,this.subTreeRefreshPromises=new Map,this.refreshPromises=new Map,this._onDidRender=new R.b,this._onDidChangeNodeSlowState=new R.b,this.nodeMapper=new k(jt=>new Qe(jt)),this.disposables=new A.b,this.identityProvider=Mt.identityProvider,this.autoExpandSingleChildren=typeof Mt.autoExpandSingleChildren=="undefined"?!1:Mt.autoExpandSingleChildren,this.sorter=Mt.sorter,this.collapseByDefault=Mt.collapseByDefault,this.tree=this.createTree(F,te,Ae,Ye,Mt),this.root=ze({element:void 0,parent:null,hasChildren:!0}),this.identityProvider&&(this.root=Object.assign(Object.assign({},this.root),{id:null})),this.nodes.set(null,this.root),this.tree.onDidChangeCollapseState(this._onDidChangeCollapseState,this,this.disposables)}get onDidChangeFocus(){return R.c.map(this.tree.onDidChangeFocus,ut)}get onDidChangeSelection(){return R.c.map(this.tree.onDidChangeSelection,ut)}get onMouseDblClick(){return R.c.map(this.tree.onMouseDblClick,Dt)}get onPointer(){return R.c.map(this.tree.onPointer,Dt)}get onDidFocus(){return this.tree.onDidFocus}get onDidDispose(){return this.tree.onDidDispose}createTree(F,te,Ae,Ye,pt){const Mt=new Be(Ae),jt=Ye.map(uo=>new tt(uo,this.nodeMapper,this._onDidChangeNodeSlowState.event)),$t=so(pt)||{};return new xo(F,te,Mt,jt,$t)}updateOptions(F={}){this.tree.updateOptions(F)}getHTMLElement(){return this.tree.getHTMLElement()}get scrollTop(){return this.tree.scrollTop}set scrollTop(F){this.tree.scrollTop=F}domFocus(){this.tree.domFocus()}layout(F,te){this.tree.layout(F,te)}style(F){this.tree.style(F)}getInput(){return this.root.element}setInput(F,te){return xt(this,void 0,void 0,function*(){this.refreshPromises.forEach(Ye=>Ye.cancel()),this.refreshPromises.clear(),this.root.element=F;const Ae=te&&{viewState:te,focus:[],selection:[]};yield this._updateChildren(F,!0,!1,Ae),Ae&&(this.tree.setFocus(Ae.focus),this.tree.setSelection(Ae.selection)),te&&typeof te.scrollTop=="number"&&(this.scrollTop=te.scrollTop)})}_updateChildren(F=this.root.element,te=!0,Ae=!1,Ye,pt){return xt(this,void 0,void 0,function*(){if(typeof this.root.element=="undefined")throw new O(this.user,"Tree input not set");this.root.refreshPromise&&(yield this.root.refreshPromise,yield R.c.toPromise(this._onDidRender.event));const Mt=this.getDataNode(F);if(yield this.refreshAndRenderNode(Mt,te,Ye,pt),Ae)try{this.tree.rerender(Mt)}catch(jt){}})}rerender(F){if(F===void 0||F===this.root.element){this.tree.rerender();return}const te=this.getDataNode(F);this.tree.rerender(te)}collapse(F,te=!1){const Ae=this.getDataNode(F);return this.tree.collapse(Ae===this.root?null:Ae,te)}expand(F,te=!1){return xt(this,void 0,void 0,function*(){if(typeof this.root.element=="undefined")throw new O(this.user,"Tree input not set");this.root.refreshPromise&&(yield this.root.refreshPromise,yield R.c.toPromise(this._onDidRender.event));const Ae=this.getDataNode(F);if(this.tree.hasElement(Ae)&&!this.tree.isCollapsible(Ae))return!1;if(Ae.refreshPromise&&(yield this.root.refreshPromise,yield R.c.toPromise(this._onDidRender.event)),Ae!==this.root&&!Ae.refreshPromise&&!this.tree.isCollapsed(Ae))return!1;const Ye=this.tree.expand(Ae===this.root?null:Ae,te);return Ae.refreshPromise&&(yield this.root.refreshPromise,yield R.c.toPromise(this._onDidRender.event)),Ye})}setSelection(F,te){const Ae=F.map(Ye=>this.getDataNode(Ye));this.tree.setSelection(Ae,te)}getSelection(){const F=this.tree.getSelection();return F.map(te=>te.element)}setFocus(F,te){const Ae=F.map(Ye=>this.getDataNode(Ye));this.tree.setFocus(Ae,te)}getFocus(){const F=this.tree.getFocus();return F.map(te=>te.element)}reveal(F,te){this.tree.reveal(this.getDataNode(F),te)}getDataNode(F){const te=this.nodes.get(F===this.root.element?null:F);if(!te)throw new O(this.user,`Data tree node not found: ${F}`);return te}refreshAndRenderNode(F,te,Ae,Ye){return xt(this,void 0,void 0,function*(){yield this.refreshNode(F,te,Ae),this.render(F,Ae,Ye)})}refreshNode(F,te,Ae){return xt(this,void 0,void 0,function*(){let Ye;return this.subTreeRefreshPromises.forEach((pt,Mt)=>{!Ye&&Ut(Mt,F)&&(Ye=pt.then(()=>this.refreshNode(F,te,Ae)))}),Ye||this.doRefreshSubTree(F,te,Ae)})}doRefreshSubTree(F,te,Ae){return xt(this,void 0,void 0,function*(){let Ye;F.refreshPromise=new Promise(pt=>Ye=pt),this.subTreeRefreshPromises.set(F,F.refreshPromise),F.refreshPromise.finally(()=>{F.refreshPromise=void 0,this.subTreeRefreshPromises.delete(F)});try{const pt=yield this.doRefreshNode(F,te,Ae);F.stale=!1,yield V.d.settled(pt.map(Mt=>this.doRefreshSubTree(Mt,te,Ae)))}finally{Ye()}})}doRefreshNode(F,te,Ae){return xt(this,void 0,void 0,function*(){F.hasChildren=!!this.dataSource.hasChildren(F.element);let Ye;if(!F.hasChildren)Ye=Promise.resolve(q.a.empty());else{const pt=Object(V.n)(800);pt.then(()=>{F.slow=!0,this._onDidChangeNodeSlowState.fire(F)},Mt=>null),Ye=this.doGetChildren(F).finally(()=>pt.cancel())}try{const pt=yield Ye;return this.setChildren(F,pt,te,Ae)}catch(pt){if(F!==this.root&&this.tree.hasElement(F)&&this.tree.collapse(F),Object(Vt.e)(pt))return[];throw pt}finally{F.slow&&(F.slow=!1,this._onDidChangeNodeSlowState.fire(F))}})}doGetChildren(F){let te=this.refreshPromises.get(F);return te||(te=Object(V.h)(()=>xt(this,void 0,void 0,function*(){const Ae=yield this.dataSource.getChildren(F.element);return this.processChildren(Ae)})),this.refreshPromises.set(F,te),te.finally(()=>{this.refreshPromises.delete(F)}))}_onDidChangeCollapseState({node:F,deep:te}){if(F.element===null)return;!F.collapsed&&F.element.stale&&(te?this.collapse(F.element.element):this.refreshAndRenderNode(F.element,!1).catch(Vt.f))}setChildren(F,te,Ae,Ye){const pt=[...te];if(F.children.length===0&&pt.length===0)return[];const Mt=new Map,jt=new Map;for(const io of F.children)if(Mt.set(io.element,io),this.identityProvider){const ho=this.tree.isCollapsed(io);jt.set(io.id,{node:io,collapsed:ho})}const $t=[],uo=pt.map(io=>{const ho=!!this.dataSource.hasChildren(io);if(!this.identityProvider){const Oo=ze({element:io,parent:F,hasChildren:ho});return ho&&this.collapseByDefault&&!this.collapseByDefault(io)&&(Oo.collapsedByDefault=!1,$t.push(Oo)),Oo}const mo=this.identityProvider.getId(io).toString(),Io=jt.get(mo);if(Io){const Oo=Io.node;return Mt.delete(Oo.element),this.nodes.delete(Oo.element),this.nodes.set(io,Oo),Oo.element=io,Oo.hasChildren=ho,Ae?Io.collapsed?(Oo.children.forEach(Wo=>wo(Wo,si=>this.nodes.delete(si.element))),Oo.children.splice(0,Oo.children.length),Oo.stale=!0):$t.push(Oo):ho&&this.collapseByDefault&&!this.collapseByDefault(io)&&(Oo.collapsedByDefault=!1,$t.push(Oo)),Oo}const Ao=ze({element:io,parent:F,id:mo,hasChildren:ho});return Ye&&Ye.viewState.focus&&Ye.viewState.focus.indexOf(mo)>-1&&Ye.focus.push(Ao),Ye&&Ye.viewState.selection&&Ye.viewState.selection.indexOf(mo)>-1&&Ye.selection.push(Ao),Ye&&Ye.viewState.expanded&&Ye.viewState.expanded.indexOf(mo)>-1?$t.push(Ao):ho&&this.collapseByDefault&&!this.collapseByDefault(io)&&(Ao.collapsedByDefault=!1,$t.push(Ao)),Ao});for(const io of Mt.values())wo(io,ho=>this.nodes.delete(ho.element));for(const io of uo)this.nodes.set(io.element,io);return F.children.splice(0,F.children.length,...uo),F!==this.root&&this.autoExpandSingleChildren&&uo.length===1&&$t.length===0&&(uo[0].collapsedByDefault=!1,$t.push(uo[0])),$t}render(F,te,Ae){const Ye=F.children.map(Mt=>this.asTreeElement(Mt,te)),pt=Ae&&Object.assign(Object.assign({},Ae),{diffIdentityProvider:Ae.diffIdentityProvider&&{getId(Mt){return Ae.diffIdentityProvider.getId(Mt.element)}}});this.tree.setChildren(F===this.root?null:F,Ye,pt),F!==this.root&&this.tree.setCollapsible(F,F.hasChildren),this._onDidRender.fire()}asTreeElement(F,te){if(F.stale)return{element:F,collapsible:F.hasChildren,collapsed:!0};let Ae;return te&&te.viewState.expanded&&F.id&&te.viewState.expanded.indexOf(F.id)>-1?Ae=!1:Ae=F.collapsedByDefault,F.collapsedByDefault=void 0,{element:F,children:F.hasChildren?q.a.map(F.children,Ye=>this.asTreeElement(Ye,te)):[],collapsible:F.hasChildren,collapsed:Ae}}processChildren(F){return this.sorter&&(F=[...F].sort(this.sorter.compare.bind(this.sorter))),F}dispose(){this.disposables.dispose()}}class di{constructor(F){this.node=F}get element(){return{elements:this.node.element.elements.map(F=>F.element),incompressible:this.node.element.incompressible}}get children(){return this.node.children.map(F=>new di(F))}get depth(){return this.node.depth}get visibleChildrenCount(){return this.node.visibleChildrenCount}get visibleChildIndex(){return this.node.visibleChildIndex}get collapsible(){return this.node.collapsible}get collapsed(){return this.node.collapsed}get visible(){return this.node.visible}get filterData(){return this.node.filterData}}class _o{constructor(F,te,Ae,Ye){this.renderer=F,this.nodeMapper=te,this.compressibleNodeMapperProvider=Ae,this.onDidChangeTwistieState=Ye,this.renderedNodes=new Map,this.disposables=[],this.templateId=F.templateId}renderTemplate(F){const te=this.renderer.renderTemplate(F);return{templateData:te}}renderElement(F,te,Ae,Ye){this.renderer.renderElement(this.nodeMapper.map(F),te,Ae.templateData,Ye)}renderCompressedElements(F,te,Ae,Ye){this.renderer.renderCompressedElements(this.compressibleNodeMapperProvider().map(F),te,Ae.templateData,Ye)}renderTwistie(F,te){return F.slow?(te.classList.add(...ae.classNamesArray),!0):(te.classList.remove(...ae.classNamesArray),!1)}disposeElement(F,te,Ae,Ye){this.renderer.disposeElement&&this.renderer.disposeElement(this.nodeMapper.map(F),te,Ae.templateData,Ye)}disposeCompressedElements(F,te,Ae,Ye){this.renderer.disposeCompressedElements&&this.renderer.disposeCompressedElements(this.compressibleNodeMapperProvider().map(F),te,Ae.templateData,Ye)}disposeTemplate(F){this.renderer.disposeTemplate(F.templateData)}dispose(){this.renderedNodes.clear(),this.disposables=Object(A.f)(this.disposables)}}function no(F){const te=F&&so(F);return te&&Object.assign(Object.assign({},te),{keyboardNavigationLabelProvider:te.keyboardNavigationLabelProvider&&Object.assign(Object.assign({},te.keyboardNavigationLabelProvider),{getCompressedNodeKeyboardNavigationLabel(Ae){return F.keyboardNavigationLabelProvider.getCompressedNodeKeyboardNavigationLabel(Ae.map(Ye=>Ye.element))}})})}class _t extends No{constructor(F,te,Ae,Ye,pt,Mt,jt={}){super(F,te,Ae,pt,Mt,jt);this.compressionDelegate=Ye,this.compressibleNodeMapper=new k($t=>new di($t)),this.filter=jt.filter}createTree(F,te,Ae,Ye,pt){const Mt=new Be(Ae),jt=Ye.map(uo=>new _o(uo,this.nodeMapper,()=>this.compressibleNodeMapper,this._onDidChangeNodeSlowState.event)),$t=no(pt)||{};return new To(F,te,Mt,jt,$t)}asTreeElement(F,te){return Object.assign({incompressible:this.compressionDelegate.isIncompressible(F.element)},super.asTreeElement(F,te))}updateOptions(F={}){this.tree.updateOptions(F)}render(F,te){if(!this.identityProvider)return super.render(F,te);const Ae=mo=>this.identityProvider.getId(mo).toString(),Ye=mo=>{const Io=new Set;for(const Ao of mo){const Oo=this.tree.getCompressedTreeNode(Ao===this.root?null:Ao);if(!Oo.element)continue;for(const Wo of Oo.element.elements)Io.add(Ae(Wo.element))}return Io},pt=Ye(this.tree.getSelection()),Mt=Ye(this.tree.getFocus());super.render(F,te);const jt=this.getSelection();let $t=!1;const uo=this.getFocus();let io=!1;const ho=mo=>{const Io=mo.element;if(Io)for(let Ao=0;Ao<Io.elements.length;Ao++){const Oo=Ae(Io.elements[Ao].element),Wo=Io.elements[Io.elements.length-1].element;pt.has(Oo)&&jt.indexOf(Wo)===-1&&(jt.push(Wo),$t=!0),Mt.has(Oo)&&uo.indexOf(Wo)===-1&&(uo.push(Wo),io=!0)}mo.children.forEach(ho)};ho(this.tree.getCompressedTreeNode(F===this.root?null:F)),$t&&this.setSelection(jt),io&&this.setFocus(uo)}processChildren(F){return this.filter&&(F=q.a.filter(F,te=>{const Ae=this.filter.filter(te,1),Ye=Tt(Ae);if(Ye===2)throw new Error("Recursive tree visibility not supported in async data compressed trees");return Ye===1})),super.processChildren(F)}}function Tt(F){return typeof F=="boolean"?F?1:0:z(F)?J(F.visibility):J(F)}class Nt extends je{constructor(F,te,Ae,Ye,pt,Mt={}){super(F,te,Ae,Ye,Mt);this.user=F,this.dataSource=pt,this.identityProvider=Mt.identityProvider}createModel(F,te,Ae){return new Re(F,te,Ae)}}var rt=t("R3nR"),lt=t("+7oY"),bt=t("CRAX"),St=t("T8No"),Qt=t("FmXZ"),bo=t("Cg/j"),qt=t("bexQ"),Eo=t("ic2d"),Ro=t("ptcw"),zo=t("t9D7"),Bo=function(F,te,Ae,Ye){var pt=arguments.length,Mt=pt<3?te:Ye===null?Ye=Object.getOwnPropertyDescriptor(te,Ae):Ye,jt;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")Mt=Reflect.decorate(F,te,Ae,Ye);else for(var $t=F.length-1;$t>=0;$t--)(jt=F[$t])&&(Mt=(pt<3?jt(Mt):pt>3?jt(te,Ae,Mt):jt(te,Ae))||Mt);return pt>3&&Mt&&Object.defineProperty(te,Ae,Mt),Mt},Jt=function(F,te){return function(Ae,Ye){te(Ae,Ye,F)}};const fo=Object(bo.c)("listService");let ri=class{constructor(te){this._themeService=te,this.disposables=new A.b,this.lists=[],this._lastFocusedWidget=void 0,this._hasCreatedStyleController=!1}get lastFocusedList(){return this._lastFocusedWidget}register(te,Ae){if(!this._hasCreatedStyleController){this._hasCreatedStyleController=!0;const pt=new I.b(Object(g.w)(),"");this.disposables.add(Object(Ro.b)(pt,this._themeService))}if(this.lists.some(pt=>pt.widget===te))throw new Error("Cannot register the same widget multiple times");const Ye={widget:te,extraContextKeys:Ae};return this.lists.push(Ye),te.getHTMLElement()===document.activeElement&&(this._lastFocusedWidget=te),Object(A.e)(te.onDidFocus(()=>this._lastFocusedWidget=te),Object(A.i)(()=>this.lists.splice(this.lists.indexOf(Ye),1)),te.onDidDispose(()=>{this.lists=this.lists.filter(pt=>pt!==Ye),this._lastFocusedWidget===te&&(this._lastFocusedWidget=void 0)}))}dispose(){this.disposables.dispose()}};ri=Bo([Jt(0,zo.b)],ri);const Zo=new St.c("listFocus",!0),ci=new St.c("listSupportsMultiselect",!0),ki=St.a.and(Zo,St.a.not(Qt.a)),wi=new St.c("listHasSelectionOrFocus",!1),Zi=new St.c("listDoubleSelection",!1),Vi=new St.c("listMultiSelection",!1),vi=new St.c("listSelectionNavigation",!1),sn="listAutomaticKeyboardNavigation";function en(F,te){const Ae=F.createScoped(te.getHTMLElement());return Zo.bindTo(Ae),Ae}const on="workbench.list.multiSelectModifier",cn="workbench.list.openMode",Bi="workbench.list.horizontalScrolling",zi="workbench.list.keyboardNavigation",Ji="workbench.list.automaticKeyboardNavigation",ui="workbench.tree.indent",pn="workbench.tree.renderIndentGuides",Hi="workbench.list.smoothScrolling",Oi="workbench.list.mouseWheelScrollSensitivity",Ii="workbench.list.fastScrollSensitivity",Qi="workbench.tree.expandMode";function Li(F){return F.getValue(on)==="alt"}class Ui extends A.a{constructor(F){super();this.configurationService=F,this.useAltAsMultipleSelectionModifier=Li(F),this.registerListeners()}registerListeners(){this._register(this.configurationService.onDidChangeConfiguration(F=>{F.affectsConfiguration(on)&&(this.useAltAsMultipleSelectionModifier=Li(this.configurationService))}))}isSelectionSingleChangeEvent(F){return this.useAltAsMultipleSelectionModifier?F.browserEvent.altKey:Object(I.h)(F)}isSelectionRangeChangeEvent(F){return Object(I.g)(F)}}function fi(F,te,Ae){var Ye;const pt=new A.b,Mt=Object.assign(Object.assign({},F),{keyboardNavigationDelegate:{mightProducePrintableCharacter(jt){return Ae.mightProducePrintableCharacter(jt)}},smoothScrolling:Boolean(te.getValue(Hi)),mouseWheelScrollSensitivity:te.getValue(Oi),fastScrollSensitivity:te.getValue(Ii),multipleSelectionController:(Ye=F.multipleSelectionController)!==null&&Ye!==void 0?Ye:pt.add(new Ui(te))});return[Mt,pt]}let $i=class extends I.c{constructor(te,Ae,Ye,pt,Mt,jt,$t,uo,io,ho){const mo=typeof Mt.horizontalScrolling!="undefined"?Mt.horizontalScrolling:Boolean(io.getValue(Bi)),[Io,Ao]=fi(Mt,io,ho);super(te,Ae,Ye,pt,Object.assign(Object.assign(Object.assign({keyboardSupport:!1},Object(Ro.d)(uo.getColorTheme(),Ro.e)),Io),{horizontalScrolling:mo}));this.disposables.add(Ao),this.contextKeyService=en(jt,this),this.themeService=uo,this.listSupportsMultiSelect=ci.bindTo(this.contextKeyService),this.listSupportsMultiSelect.set(Mt.multipleSelectionSupport!==!1);const Oo=vi.bindTo(this.contextKeyService);Oo.set(Boolean(Mt.selectionNavigation)),this.listHasSelectionOrFocus=wi.bindTo(this.contextKeyService),this.listDoubleSelection=Zi.bindTo(this.contextKeyService),this.listMultiSelection=Vi.bindTo(this.contextKeyService),this.horizontalScrolling=Mt.horizontalScrolling,this._useAltAsMultipleSelectionModifier=Li(io),this.disposables.add(this.contextKeyService),this.disposables.add($t.register(this)),Mt.overrideStyles&&this.updateStyles(Mt.overrideStyles),this.disposables.add(this.onDidChangeSelection(()=>{const Wo=this.getSelection(),si=this.getFocus();this.contextKeyService.bufferChangeEvents(()=>{this.listHasSelectionOrFocus.set(Wo.length>0||si.length>0),this.listMultiSelection.set(Wo.length>1),this.listDoubleSelection.set(Wo.length===2)})})),this.disposables.add(this.onDidChangeFocus(()=>{const Wo=this.getSelection(),si=this.getFocus();this.listHasSelectionOrFocus.set(Wo.length>0||si.length>0)})),this.disposables.add(io.onDidChangeConfiguration(Wo=>{Wo.affectsConfiguration(on)&&(this._useAltAsMultipleSelectionModifier=Li(io));let si={};if(Wo.affectsConfiguration(Bi)&&this.horizontalScrolling===void 0){const hi=Boolean(io.getValue(Bi));si=Object.assign(Object.assign({},si),{horizontalScrolling:hi})}if(Wo.affectsConfiguration(Hi)){const hi=Boolean(io.getValue(Hi));si=Object.assign(Object.assign({},si),{smoothScrolling:hi})}if(Wo.affectsConfiguration(Oi)){const hi=io.getValue(Oi);si=Object.assign(Object.assign({},si),{mouseWheelScrollSensitivity:hi})}if(Wo.affectsConfiguration(Ii)){const hi=io.getValue(Ii);si=Object.assign(Object.assign({},si),{fastScrollSensitivity:hi})}Object.keys(si).length>0&&this.updateOptions(si)})),this.navigator=new gt(this,Object.assign({configurationService:io},Mt)),this.disposables.add(this.navigator)}updateOptions(te){super.updateOptions(te),te.overrideStyles&&this.updateStyles(te.overrideStyles),te.multipleSelectionSupport!==void 0&&this.listSupportsMultiSelect.set(!!te.multipleSelectionSupport)}updateStyles(te){var Ae;(Ae=this._styler)===null||Ae===void 0||Ae.dispose(),this._styler=Object(Ro.b)(this,this.themeService,te)}dispose(){var te;(te=this._styler)===null||te===void 0||te.dispose(),super.dispose()}};$i=Bo([Jt(5,St.b),Jt(6,fo),Jt(7,zo.b),Jt(8,lt.a),Jt(9,qt.a)],$i);let rn=class extends d{constructor(te,Ae,Ye,pt,Mt,jt,$t,uo,io,ho){const mo=typeof Mt.horizontalScrolling!="undefined"?Mt.horizontalScrolling:Boolean(io.getValue(Bi)),[Io,Ao]=fi(Mt,io,ho);super(te,Ae,Ye,pt,Object.assign(Object.assign(Object.assign({keyboardSupport:!1},Object(Ro.d)(uo.getColorTheme(),Ro.e)),Io),{horizontalScrolling:mo}));this.disposables=new A.b,this.disposables.add(Ao),this.contextKeyService=en(jt,this),this.themeService=uo,this.horizontalScrolling=Mt.horizontalScrolling,this.listSupportsMultiSelect=ci.bindTo(this.contextKeyService),this.listSupportsMultiSelect.set(Mt.multipleSelectionSupport!==!1);const Oo=vi.bindTo(this.contextKeyService);Oo.set(Boolean(Mt.selectionNavigation)),this._useAltAsMultipleSelectionModifier=Li(io),this.disposables.add(this.contextKeyService),this.disposables.add($t.register(this)),Mt.overrideStyles&&this.updateStyles(Mt.overrideStyles),Mt.overrideStyles&&this.disposables.add(Object(Ro.b)(this,uo,Mt.overrideStyles)),this.disposables.add(io.onDidChangeConfiguration(Wo=>{Wo.affectsConfiguration(on)&&(this._useAltAsMultipleSelectionModifier=Li(io));let si={};if(Wo.affectsConfiguration(Bi)&&this.horizontalScrolling===void 0){const hi=Boolean(io.getValue(Bi));si=Object.assign(Object.assign({},si),{horizontalScrolling:hi})}if(Wo.affectsConfiguration(Hi)){const hi=Boolean(io.getValue(Hi));si=Object.assign(Object.assign({},si),{smoothScrolling:hi})}if(Wo.affectsConfiguration(Oi)){const hi=io.getValue(Oi);si=Object.assign(Object.assign({},si),{mouseWheelScrollSensitivity:hi})}if(Wo.affectsConfiguration(Ii)){const hi=io.getValue(Ii);si=Object.assign(Object.assign({},si),{fastScrollSensitivity:hi})}Object.keys(si).length>0&&this.updateOptions(si)})),this.navigator=new gt(this,Object.assign({configurationService:io},Mt)),this.disposables.add(this.navigator)}updateOptions(te){super.updateOptions(te),te.overrideStyles&&this.updateStyles(te.overrideStyles),te.multipleSelectionSupport!==void 0&&this.listSupportsMultiSelect.set(!!te.multipleSelectionSupport)}updateStyles(te){var Ae;(Ae=this._styler)===null||Ae===void 0||Ae.dispose(),this._styler=Object(Ro.b)(this,this.themeService,te)}dispose(){var te;(te=this._styler)===null||te===void 0||te.dispose(),this.disposables.dispose(),super.dispose()}};rn=Bo([Jt(5,St.b),Jt(6,fo),Jt(7,zo.b),Jt(8,lt.a),Jt(9,qt.a)],rn);let _i=class extends u{constructor(te,Ae,Ye,pt,Mt,jt,$t,uo,io,ho,mo){const Io=typeof jt.horizontalScrolling!="undefined"?jt.horizontalScrolling:Boolean(ho.getValue(Bi)),[Ao,Oo]=fi(jt,ho,mo);super(te,Ae,Ye,pt,Mt,Object.assign(Object.assign(Object.assign({keyboardSupport:!1},Object(Ro.d)(io.getColorTheme(),Ro.e)),Ao),{horizontalScrolling:Io}));this.disposables=new A.b,this.disposables.add(Oo),this.contextKeyService=en($t,this),this.themeService=io,this.listSupportsMultiSelect=ci.bindTo(this.contextKeyService),this.listSupportsMultiSelect.set(jt.multipleSelectionSupport!==!1);const Wo=vi.bindTo(this.contextKeyService);Wo.set(Boolean(jt.selectionNavigation)),this.listHasSelectionOrFocus=wi.bindTo(this.contextKeyService),this.listDoubleSelection=Zi.bindTo(this.contextKeyService),this.listMultiSelection=Vi.bindTo(this.contextKeyService),this.horizontalScrolling=jt.horizontalScrolling,this._useAltAsMultipleSelectionModifier=Li(ho),this.disposables.add(this.contextKeyService),this.disposables.add(uo.register(this)),jt.overrideStyles&&this.updateStyles(jt.overrideStyles),this.disposables.add(this.onDidChangeSelection(()=>{const si=this.getSelection(),hi=this.getFocus();this.contextKeyService.bufferChangeEvents(()=>{this.listHasSelectionOrFocus.set(si.length>0||hi.length>0),this.listMultiSelection.set(si.length>1),this.listDoubleSelection.set(si.length===2)})})),this.disposables.add(this.onDidChangeFocus(()=>{const si=this.getSelection(),hi=this.getFocus();this.listHasSelectionOrFocus.set(si.length>0||hi.length>0)})),this.disposables.add(ho.onDidChangeConfiguration(si=>{si.affectsConfiguration(on)&&(this._useAltAsMultipleSelectionModifier=Li(ho));let hi={};if(si.affectsConfiguration(Bi)&&this.horizontalScrolling===void 0){const Uo=Boolean(ho.getValue(Bi));hi=Object.assign(Object.assign({},hi),{horizontalScrolling:Uo})}if(si.affectsConfiguration(Hi)){const Uo=Boolean(ho.getValue(Hi));hi=Object.assign(Object.assign({},hi),{smoothScrolling:Uo})}if(si.affectsConfiguration(Oi)){const Uo=ho.getValue(Oi);hi=Object.assign(Object.assign({},hi),{mouseWheelScrollSensitivity:Uo})}if(si.affectsConfiguration(Ii)){const Uo=ho.getValue(Ii);hi=Object.assign(Object.assign({},hi),{fastScrollSensitivity:Uo})}Object.keys(hi).length>0&&this.updateOptions(hi)})),this.navigator=new Ge(this,Object.assign({configurationService:ho},jt)),this.disposables.add(this.navigator)}updateOptions(te){super.updateOptions(te),te.overrideStyles&&this.updateStyles(te.overrideStyles),te.multipleSelectionSupport!==void 0&&this.listSupportsMultiSelect.set(!!te.multipleSelectionSupport)}updateStyles(te){var Ae;(Ae=this._styler)===null||Ae===void 0||Ae.dispose(),this._styler=Object(Ro.b)(this,this.themeService,te)}dispose(){var te;(te=this._styler)===null||te===void 0||te.dispose(),this.disposables.dispose(),super.dispose()}};_i=Bo([Jt(6,St.b),Jt(7,fo),Jt(8,zo.b),Jt(9,lt.a),Jt(10,qt.a)],_i);class Pi extends A.a{constructor(F,te){var Ae;super();this.widget=F,this._onDidOpen=this._register(new R.b),this.onDidOpen=this._onDidOpen.event,this._register(R.c.filter(this.widget.onDidChangeSelection,Ye=>Ye.browserEvent instanceof KeyboardEvent)(Ye=>this.onSelectionFromKeyboard(Ye))),this._register(this.widget.onPointer(Ye=>this.onPointer(Ye.element,Ye.browserEvent))),this._register(this.widget.onMouseDblClick(Ye=>this.onMouseDblClick(Ye.element,Ye.browserEvent))),typeof(te==null?void 0:te.openOnSingleClick)!="boolean"&&(te==null?void 0:te.configurationService)?(this.openOnSingleClick=(te==null?void 0:te.configurationService.getValue(cn))!=="doubleClick",this._register(te==null?void 0:te.configurationService.onDidChangeConfiguration(()=>{this.openOnSingleClick=(te==null?void 0:te.configurationService.getValue(cn))!=="doubleClick"}))):this.openOnSingleClick=(Ae=te==null?void 0:te.openOnSingleClick)!==null&&Ae!==void 0?Ae:!0}onSelectionFromKeyboard(F){if(F.elements.length!==1)return;const te=F.browserEvent,Ae=typeof te.preserveFocus=="boolean"?te.preserveFocus:!0,Ye=typeof te.pinned=="boolean"?te.pinned:!Ae,pt=!1;this._open(this.getSelectedElement(),Ae,Ye,pt,F.browserEvent)}onPointer(F,te){if(!this.openOnSingleClick)return;const Ae=te.detail===2;if(Ae)return;const Ye=te.button===1,pt=!0,Mt=Ye,jt=te.ctrlKey||te.metaKey||te.altKey;this._open(F,pt,Mt,jt,te)}onMouseDblClick(F,te){if(!te)return;const Ae=te.target,Ye=Ae.classList.contains("monaco-tl-twistie")||Ae.classList.contains("monaco-icon-label")&&Ae.classList.contains("folder-icon")&&te.offsetX<16;if(Ye)return;const pt=!1,Mt=!0,jt=te.ctrlKey||te.metaKey||te.altKey;this._open(F,pt,Mt,jt,te)}_open(F,te,Ae,Ye,pt){if(!F)return;this._onDidOpen.fire({editorOptions:{preserveFocus:te,pinned:Ae,revealIfVisible:!0},sideBySide:Ye,element:F,browserEvent:pt})}}class gt extends Pi{constructor(F,te){super(F,te);this.widget=F}getSelectedElement(){return this.widget.getSelectedElements()[0]}}class Ge extends Pi{constructor(F,te){super(F,te)}getSelectedElement(){return this.widget.getSelectedElements()[0]}}class $ extends Pi{constructor(F,te){super(F,te)}getSelectedElement(){var F;return(F=this.widget.getSelection()[0])!==null&&F!==void 0?F:void 0}}function Ee(F,te){let Ae=!1;return Ye=>{if(Ae)return Ae=!1,!1;const pt=te.softDispatch(Ye,F);return pt&&pt.enterChord?(Ae=!0,!1):(Ae=!1,!0)}}let Ne=class extends xo{constructor(te,Ae,Ye,pt,Mt,jt,$t,uo,io,ho,mo){const{options:Io,getAutomaticKeyboardNavigation:Ao,disposable:Oo}=Bt(Ae,Mt,jt,io,ho,mo);super(te,Ae,Ye,pt,Io);this.disposables.add(Oo),this.internals=new Kt(this,Mt,Ao,Mt.overrideStyles,jt,$t,uo,io,mo),this.disposables.add(this.internals)}updateOptions(te){super.updateOptions(te),this.internals.updateOptions(te)}};Ne=Bo([Jt(5,St.b),Jt(6,fo),Jt(7,zo.b),Jt(8,lt.a),Jt(9,qt.a),Jt(10,rt.b)],Ne);let He=class extends To{constructor(te,Ae,Ye,pt,Mt,jt,$t,uo,io,ho,mo){const{options:Io,getAutomaticKeyboardNavigation:Ao,disposable:Oo}=Bt(Ae,Mt,jt,io,ho,mo);super(te,Ae,Ye,pt,Io);this.disposables.add(Oo),this.internals=new Kt(this,Mt,Ao,Mt.overrideStyles,jt,$t,uo,io,mo),this.disposables.add(this.internals)}updateOptions(te={}){super.updateOptions(te),te.overrideStyles&&this.internals.updateStyleOverrides(te.overrideStyles),this.internals.updateOptions(te)}};He=Bo([Jt(5,St.b),Jt(6,fo),Jt(7,zo.b),Jt(8,lt.a),Jt(9,qt.a),Jt(10,rt.b)],He);let at=class extends Nt{constructor(te,Ae,Ye,pt,Mt,jt,$t,uo,io,ho,mo,Io){const{options:Ao,getAutomaticKeyboardNavigation:Oo,disposable:Wo}=Bt(Ae,jt,$t,ho,mo,Io);super(te,Ae,Ye,pt,Mt,Ao);this.disposables.add(Wo),this.internals=new Kt(this,jt,Oo,jt.overrideStyles,$t,uo,io,ho,Io),this.disposables.add(this.internals)}updateOptions(te={}){super.updateOptions(te),te.overrideStyles&&this.internals.updateStyleOverrides(te.overrideStyles),this.internals.updateOptions(te)}};at=Bo([Jt(6,St.b),Jt(7,fo),Jt(8,zo.b),Jt(9,lt.a),Jt(10,qt.a),Jt(11,rt.b)],at);let vt=class extends No{constructor(te,Ae,Ye,pt,Mt,jt,$t,uo,io,ho,mo,Io){const{options:Ao,getAutomaticKeyboardNavigation:Oo,disposable:Wo}=Bt(Ae,jt,$t,ho,mo,Io);super(te,Ae,Ye,pt,Mt,Ao);this.disposables.add(Wo),this.internals=new Kt(this,jt,Oo,jt.overrideStyles,$t,uo,io,ho,Io),this.disposables.add(this.internals)}get onDidOpen(){return this.internals.onDidOpen}updateOptions(te={}){super.updateOptions(te),te.overrideStyles&&this.internals.updateStyleOverrides(te.overrideStyles),this.internals.updateOptions(te)}};vt=Bo([Jt(6,St.b),Jt(7,fo),Jt(8,zo.b),Jt(9,lt.a),Jt(10,qt.a),Jt(11,rt.b)],vt);let Xt=class extends _t{constructor(te,Ae,Ye,pt,Mt,jt,$t,uo,io,ho,mo,Io,Ao){const{options:Oo,getAutomaticKeyboardNavigation:Wo,disposable:si}=Bt(Ae,$t,uo,mo,Io,Ao);super(te,Ae,Ye,pt,Mt,jt,Oo);this.disposables.add(si),this.internals=new Kt(this,$t,Wo,$t.overrideStyles,uo,io,ho,mo,Ao),this.disposables.add(this.internals)}updateOptions(te){super.updateOptions(te),this.internals.updateOptions(te)}};Xt=Bo([Jt(7,St.b),Jt(8,fo),Jt(9,zo.b),Jt(10,lt.a),Jt(11,qt.a),Jt(12,rt.b)],Xt);function Bt(F,te,Ae,Ye,pt,Mt){var jt;const $t=()=>{let Oo=Boolean(Ae.getContextKeyValue(sn));return Oo&&(Oo=Boolean(Ye.getValue(Ji))),Oo},uo=Mt.isScreenReaderOptimized(),io=te.simpleKeyboardNavigation||uo?"simple":Ye.getValue(zi),ho=te.horizontalScrolling!==void 0?te.horizontalScrolling:Boolean(Ye.getValue(Bi)),[mo,Io]=fi(te,Ye,pt),Ao=te.additionalScrollHeight;return{getAutomaticKeyboardNavigation:$t,disposable:Io,options:Object.assign(Object.assign({keyboardSupport:!1},mo),{indent:typeof Ye.getValue(ui)=="number"?Ye.getValue(ui):void 0,renderIndentGuides:Ye.getValue(pn),smoothScrolling:Boolean(Ye.getValue(Hi)),automaticKeyboardNavigation:$t(),simpleKeyboardNavigation:io==="simple",filterOnType:io==="filter",horizontalScrolling:ho,keyboardNavigationEventFilter:Ee(F,pt),additionalScrollHeight:Ao,hideTwistiesOfChildlessElements:te.hideTwistiesOfChildlessElements,expandOnlyOnTwistieClick:(jt=te.expandOnlyOnTwistieClick)!==null&&jt!==void 0?jt:Ye.getValue(Qi)==="doubleClick"})}}let Kt=class{constructor(te,Ae,Ye,pt,Mt,jt,$t,uo,io){this.tree=te,this.themeService=$t,this.disposables=[],this.contextKeyService=en(Mt,te),this.listSupportsMultiSelect=ci.bindTo(this.contextKeyService),this.listSupportsMultiSelect.set(Ae.multipleSelectionSupport!==!1);const ho=vi.bindTo(this.contextKeyService);ho.set(Boolean(Ae.selectionNavigation)),this.hasSelectionOrFocus=wi.bindTo(this.contextKeyService),this.hasDoubleSelection=Zi.bindTo(this.contextKeyService),this.hasMultiSelection=Vi.bindTo(this.contextKeyService),this._useAltAsMultipleSelectionModifier=Li(uo);const mo=new Set;mo.add(sn);const Io=()=>{const Ao=io.isScreenReaderOptimized(),Oo=Ao?"simple":uo.getValue(zi);te.updateOptions({simpleKeyboardNavigation:Oo==="simple",filterOnType:Oo==="filter"})};this.updateStyleOverrides(pt),this.disposables.push(this.contextKeyService,jt.register(te),te.onDidChangeSelection(()=>{const Ao=te.getSelection(),Oo=te.getFocus();this.contextKeyService.bufferChangeEvents(()=>{this.hasSelectionOrFocus.set(Ao.length>0||Oo.length>0),this.hasMultiSelection.set(Ao.length>1),this.hasDoubleSelection.set(Ao.length===2)})}),te.onDidChangeFocus(()=>{const Ao=te.getSelection(),Oo=te.getFocus();this.hasSelectionOrFocus.set(Ao.length>0||Oo.length>0)}),uo.onDidChangeConfiguration(Ao=>{let Oo={};if(Ao.affectsConfiguration(on)&&(this._useAltAsMultipleSelectionModifier=Li(uo)),Ao.affectsConfiguration(ui)){const Wo=uo.getValue(ui);Oo=Object.assign(Object.assign({},Oo),{indent:Wo})}if(Ao.affectsConfiguration(pn)){const Wo=uo.getValue(pn);Oo=Object.assign(Object.assign({},Oo),{renderIndentGuides:Wo})}if(Ao.affectsConfiguration(Hi)){const Wo=Boolean(uo.getValue(Hi));Oo=Object.assign(Object.assign({},Oo),{smoothScrolling:Wo})}if(Ao.affectsConfiguration(zi)&&Io(),Ao.affectsConfiguration(Ji)&&(Oo=Object.assign(Object.assign({},Oo),{automaticKeyboardNavigation:Ye()})),Ao.affectsConfiguration(Bi)&&Ae.horizontalScrolling===void 0){const Wo=Boolean(uo.getValue(Bi));Oo=Object.assign(Object.assign({},Oo),{horizontalScrolling:Wo})}if(Ao.affectsConfiguration(Qi)&&Ae.expandOnlyOnTwistieClick===void 0&&(Oo=Object.assign(Object.assign({},Oo),{expandOnlyOnTwistieClick:uo.getValue(Qi)==="doubleClick"})),Ao.affectsConfiguration(Oi)){const Wo=uo.getValue(Oi);Oo=Object.assign(Object.assign({},Oo),{mouseWheelScrollSensitivity:Wo})}if(Ao.affectsConfiguration(Ii)){const Wo=uo.getValue(Ii);Oo=Object.assign(Object.assign({},Oo),{fastScrollSensitivity:Wo})}Object.keys(Oo).length>0&&te.updateOptions(Oo)}),this.contextKeyService.onDidChangeContext(Ao=>{Ao.affectsSome(mo)&&te.updateOptions({automaticKeyboardNavigation:Ye()})}),io.onDidChangeScreenReaderOptimized(()=>Io())),this.navigator=new $(te,Object.assign({configurationService:uo},Ae)),this.disposables.push(this.navigator)}get onDidOpen(){return this.navigator.onDidOpen}updateOptions(te){te.multipleSelectionSupport!==void 0&&this.listSupportsMultiSelect.set(!!te.multipleSelectionSupport)}updateStyleOverrides(te){Object(A.f)(this.styler),this.styler=te?Object(Ro.b)(this.tree,this.themeService,te):A.a.None}dispose(){this.disposables=Object(A.f)(this.disposables),Object(A.f)(this.styler),this.styler=void 0}};Kt=Bo([Jt(4,St.b),Jt(5,fo),Jt(6,zo.b),Jt(7,lt.a),Jt(8,rt.b)],Kt);const ro=Eo.a.as(bt.a.Configuration);ro.registerConfiguration({id:"workbench",order:7,title:Object(Me.a)("workbenchConfigurationTitle","Workbench"),type:"object",properties:{[on]:{type:"string",enum:["ctrlCmd","alt"],enumDescriptions:[Object(Me.a)("multiSelectModifier.ctrlCmd","Maps to `Control` on Windows and Linux and to `Command` on macOS."),Object(Me.a)("multiSelectModifier.alt","Maps to `Alt` on Windows and Linux and to `Option` on macOS.")],default:"ctrlCmd",description:Object(Me.a)({key:"multiSelectModifier",comment:["- `ctrlCmd` refers to a value the setting can take and should not be localized.","- `Control` and `Command` refer to the modifier keys Ctrl or Cmd on the keyboard and can be localized."]},"The modifier to be used to add an item in trees and lists to a multi-selection with the mouse (for example in the explorer, open editors and scm view). The 'Open to Side' mouse gestures - if supported - will adapt such that they do not conflict with the multiselect modifier.")},[cn]:{type:"string",enum:["singleClick","doubleClick"],default:"singleClick",description:Object(Me.a)({key:"openModeModifier",comment:["`singleClick` and `doubleClick` refers to a value the setting can take and should not be localized."]},"Controls how to open items in trees and lists using the mouse (if supported). Note that some trees and lists might choose to ignore this setting if it is not applicable.")},[Bi]:{type:"boolean",default:!1,description:Object(Me.a)("horizontalScrolling setting","Controls whether lists and trees support horizontal scrolling in the workbench. Warning: turning on this setting has a performance implication.")},[ui]:{type:"number",default:8,minimum:0,maximum:40,description:Object(Me.a)("tree indent setting","Controls tree indentation in pixels.")},[pn]:{type:"string",enum:["none","onHover","always"],default:"onHover",description:Object(Me.a)("render tree indent guides","Controls whether the tree should render indent guides.")},[Hi]:{type:"boolean",default:!1,description:Object(Me.a)("list smoothScrolling setting","Controls whether lists and trees have smooth scrolling.")},[Oi]:{type:"number",default:1,description:Object(Me.a)("Mouse Wheel Scroll Sensitivity","A multiplier to be used on the `deltaX` and `deltaY` of mouse wheel scroll events.")},[Ii]:{type:"number",default:5,description:Object(Me.a)("Fast Scroll Sensitivity","Scrolling speed multiplier when pressing `Alt`.")},[zi]:{type:"string",enum:["simple","highlight","filter"],enumDescriptions:[Object(Me.a)("keyboardNavigationSettingKey.simple","Simple keyboard navigation focuses elements which match the keyboard input. Matching is done only on prefixes."),Object(Me.a)("keyboardNavigationSettingKey.highlight","Highlight keyboard navigation highlights elements which match the keyboard input. Further up and down navigation will traverse only the highlighted elements."),Object(Me.a)("keyboardNavigationSettingKey.filter","Filter keyboard navigation will filter out and hide all the elements which do not match the keyboard input.")],default:"highlight",description:Object(Me.a)("keyboardNavigationSettingKey","Controls the keyboard navigation style for lists and trees in the workbench. Can be simple, highlight and filter.")},[Ji]:{type:"boolean",default:!0,markdownDescription:Object(Me.a)("automatic keyboard navigation setting","Controls whether keyboard navigation in lists and trees is automatically triggered simply by typing. If set to `false`, keyboard navigation is only triggered when executing the `list.toggleKeyboardNavigation` command, for which you can assign a keyboard shortcut.")},[Qi]:{type:"string",enum:["singleClick","doubleClick"],default:"singleClick",description:Object(Me.a)("expand mode","Controls how tree folders are expanded when clicking the folder names. Note that some trees and lists might choose to ignore this setting if it is not applicable.")}}})},kYye:function(mt,M,t){"use strict";t.d(M,"B",function(){return A}),t.d(M,"C",function(){return j}),t.d(M,"z",function(){return d}),t.d(M,"y",function(){return D}),t.d(M,"A",function(){return r}),t.d(M,"a",function(){return w}),t.d(M,"D",function(){return b}),t.d(M,"b",function(){return c}),t.d(M,"G",function(){return p}),t.d(M,"x",function(){return S}),t.d(M,"j",function(){return E}),t.d(M,"k",function(){return y}),t.d(M,"F",function(){return O}),t.d(M,"E",function(){return k}),t.d(M,"H",function(){return q}),t.d(M,"I",function(){return z}),t.d(M,"J",function(){return J}),t.d(M,"K",function(){return re}),t.d(M,"N",function(){return ne}),t.d(M,"L",function(){return le}),t.d(M,"O",function(){return _e}),t.d(M,"M",function(){return Ce}),t.d(M,"c",function(){return oe}),t.d(M,"d",function(){return ae}),t.d(M,"e",function(){return V}),t.d(M,"f",function(){return G}),t.d(M,"g",function(){return ee}),t.d(M,"h",function(){return pe}),t.d(M,"i",function(){return Te}),t.d(M,"r",function(){return Ie}),t.d(M,"s",function(){return Me}),t.d(M,"t",function(){return Oe}),t.d(M,"u",function(){return Xe}),t.d(M,"v",function(){return fe}),t.d(M,"w",function(){return Pe}),t.d(M,"l",function(){return Be}),t.d(M,"m",function(){return Se}),t.d(M,"n",function(){return me}),t.d(M,"o",function(){return he}),t.d(M,"p",function(){return Le}),t.d(M,"q",function(){return we});var g=t("3/fG"),B=t("zrhQ"),x=t("MD5Z"),R=t("t9D7");const A=Object(x.wc)("editor.lineHighlightBackground",{dark:null,light:null,hc:null},g.a("lineHighlight","Background color for the highlight of line at the cursor position.")),j=Object(x.wc)("editor.lineHighlightBorder",{dark:"#282828",light:"#eeeeee",hc:"#f38518"},g.a("lineHighlightBorderBox","Background color for the border around the line at the cursor position.")),I=Object(x.wc)("editor.rangeHighlightBackground",{dark:"#ffffff0b",light:"#fdff0033",hc:null},g.a("rangeHighlight","Background color of highlighted ranges, like by quick open and find features. The color must not be opaque so as not to hide underlying decorations."),!0),v=Object(x.wc)("editor.rangeHighlightBorder",{dark:null,light:null,hc:x.b},g.a("rangeHighlightBorder","Background color of the border around highlighted ranges."),!0),C=Object(x.wc)("editor.symbolHighlightBackground",{dark:x.x,light:x.x,hc:null},g.a("symbolHighlight","Background color of highlighted symbol, like for go to definition or go next/previous symbol. The color must not be opaque so as not to hide underlying decorations."),!0),m=Object(x.wc)("editor.symbolHighlightBorder",{dark:null,light:null,hc:x.b},g.a("symbolHighlightBorder","Background color of the border around highlighted symbols."),!0),d=Object(x.wc)("editorCursor.foreground",{dark:"#AEAFAD",light:B.a.black,hc:B.a.white},g.a("caret","Color of the editor cursor.")),D=Object(x.wc)("editorCursor.background",null,g.a("editorCursorBackground","The background color of the editor cursor. Allows customizing the color of a character overlapped by a block cursor.")),L=Object(x.wc)("editorWhitespace.foreground",{dark:"#e3e4e229",light:"#33333333",hc:"#e3e4e229"},g.a("editorWhitespaces","Color of whitespace characters in the editor.")),r=Object(x.wc)("editorIndentGuide.background",{dark:L,light:L,hc:L},g.a("editorIndentGuides","Color of the editor indentation guides.")),w=Object(x.wc)("editorIndentGuide.activeBackground",{dark:L,light:L,hc:L},g.a("editorActiveIndentGuide","Color of the active editor indentation guides.")),b=Object(x.wc)("editorLineNumber.foreground",{dark:"#858585",light:"#237893",hc:B.a.white},g.a("editorLineNumbers","Color of editor line numbers.")),u=Object(x.wc)("editorActiveLineNumber.foreground",{dark:"#c6c6c6",light:"#0B216F",hc:x.b},g.a("editorActiveLineNumber","Color of editor active line number"),!1,g.a("deprecatedEditorActiveLineNumber","Id is deprecated. Use 'editorLineNumber.activeForeground' instead.")),c=Object(x.wc)("editorLineNumber.activeForeground",{dark:u,light:u,hc:u},g.a("editorActiveLineNumber","Color of editor active line number")),p=Object(x.wc)("editorRuler.foreground",{dark:"#5A5A5A",light:B.a.lightgrey,hc:B.a.white},g.a("editorRuler","Color of the editor rulers.")),S=Object(x.wc)("editorCodeLens.foreground",{dark:"#999999",light:"#919191",hc:"#999999"},g.a("editorCodeLensForeground","Foreground color of editor CodeLens")),E=Object(x.wc)("editorBracketMatch.background",{dark:"#0064001a",light:"#0064001a",hc:"#0064001a"},g.a("editorBracketMatchBackground","Background color behind matching brackets")),y=Object(x.wc)("editorBracketMatch.border",{dark:"#888",light:"#B9B9B9",hc:x.h},g.a("editorBracketMatchBorder","Color for matching brackets boxes")),O=Object(x.wc)("editorOverviewRuler.border",{dark:"#7f7f7f4d",light:"#7f7f7f4d",hc:"#7f7f7f4d"},g.a("editorOverviewRulerBorder","Color of the overview ruler border.")),k=Object(x.wc)("editorOverviewRuler.background",null,g.a("editorOverviewRulerBackground","Background color of the editor overview ruler. Only used when the minimap is enabled and placed on the right side of the editor.")),Q=Object(x.wc)("editorGutter.background",{dark:x.r,light:x.r,hc:x.r},g.a("editorGutter","Background color of the editor gutter. The gutter contains the glyph margins and the line numbers.")),q=Object(x.wc)("editorUnnecessaryCode.border",{dark:null,light:null,hc:B.a.fromHex("#fff").transparent(.8)},g.a("unnecessaryCodeBorder","Border color of unnecessary (unused) source code in the editor.")),z=Object(x.wc)("editorUnnecessaryCode.opacity",{dark:B.a.fromHex("#000a"),light:B.a.fromHex("#0007"),hc:null},g.a("unnecessaryCodeOpacity",`Opacity of unnecessary (unused) source code in the editor. For example, "#000000c0" will render the code with 75% opacity. For high contrast themes, use the 'editorUnnecessaryCode.border' theme color to underline unnecessary code instead of fading it out.`)),J=Object(x.wc)("editorGhostText.border",{dark:null,light:null,hc:B.a.fromHex("#fff").transparent(.8)},g.a("editorGhostTextBorder","Border color of ghost text in the editor.")),re=Object(x.wc)("editorGhostText.foreground",{dark:B.a.fromHex("#ffffff56"),light:B.a.fromHex("#0007"),hc:null},g.a("editorGhostTextForeground","Foreground color of the ghost text in the editor.")),Z=new B.a(new B.c(0,122,204,.6)),ne=Object(x.wc)("editorOverviewRuler.rangeHighlightForeground",{dark:Z,light:Z,hc:Z},g.a("overviewRulerRangeHighlight","Overview ruler marker color for range highlights. The color must not be opaque so as not to hide underlying decorations."),!0),le=Object(x.wc)("editorOverviewRuler.errorForeground",{dark:new B.a(new B.c(255,18,18,.7)),light:new B.a(new B.c(255,18,18,.7)),hc:new B.a(new B.c(255,50,50,1))},g.a("overviewRuleError","Overview ruler marker color for errors.")),_e=Object(x.wc)("editorOverviewRuler.warningForeground",{dark:x.V,light:x.V,hc:x.U},g.a("overviewRuleWarning","Overview ruler marker color for warnings.")),Ce=Object(x.wc)("editorOverviewRuler.infoForeground",{dark:x.M,light:x.M,hc:x.L},g.a("overviewRuleInfo","Overview ruler marker color for infos.")),oe=Object(x.wc)("editorBracketHighlight.foreground1",{dark:"#FFD700",light:"#0431FAFF",hc:"#FFD700"},g.a("editorBracketHighlightForeground1","Foreground color of brackets (1). Requires enabling bracket pair colorization.")),ae=Object(x.wc)("editorBracketHighlight.foreground2",{dark:"#DA70D6",light:"#319331FF",hc:"#DA70D6"},g.a("editorBracketHighlightForeground2","Foreground color of brackets (2). Requires enabling bracket pair colorization.")),V=Object(x.wc)("editorBracketHighlight.foreground3",{dark:"#179FFF",light:"#7B3814FF",hc:"#87CEFA"},g.a("editorBracketHighlightForeground3","Foreground color of brackets (3). Requires enabling bracket pair colorization.")),G=Object(x.wc)("editorBracketHighlight.foreground4",{dark:"#00000000",light:"#00000000",hc:"#00000000"},g.a("editorBracketHighlightForeground4","Foreground color of brackets (4). Requires enabling bracket pair colorization.")),ee=Object(x.wc)("editorBracketHighlight.foreground5",{dark:"#00000000",light:"#00000000",hc:"#00000000"},g.a("editorBracketHighlightForeground5","Foreground color of brackets (5). Requires enabling bracket pair colorization.")),pe=Object(x.wc)("editorBracketHighlight.foreground6",{dark:"#00000000",light:"#00000000",hc:"#00000000"},g.a("editorBracketHighlightForeground6","Foreground color of brackets (6). Requires enabling bracket pair colorization.")),Te=Object(x.wc)("editorBracketHighlight.unexpectedBracket.foreground",{dark:new B.a(new B.c(255,18,18,.8)),light:new B.a(new B.c(255,18,18,.8)),hc:new B.a(new B.c(255,50,50,1))},g.a("editorBracketHighlightUnexpectedBracketForeground","Foreground color of unexpected brackets.")),Ie=Object(x.wc)("editorBracketPairGuide.background1",{dark:"#00000000",light:"#00000000",hc:"#00000000"},g.a("editorBracketPairGuide.background1","Background color of inactive bracket pair guides (1). Requires enabling bracket pair guides.")),Me=Object(x.wc)("editorBracketPairGuide.background2",{dark:"#00000000",light:"#00000000",hc:"#00000000"},g.a("editorBracketPairGuide.background2","Background color of inactive bracket pair guides (2). Requires enabling bracket pair guides.")),Oe=Object(x.wc)("editorBracketPairGuide.background3",{dark:"#00000000",light:"#00000000",hc:"#00000000"},g.a("editorBracketPairGuide.background3","Background color of inactive bracket pair guides (3). Requires enabling bracket pair guides.")),Xe=Object(x.wc)("editorBracketPairGuide.background4",{dark:"#00000000",light:"#00000000",hc:"#00000000"},g.a("editorBracketPairGuide.background4","Background color of inactive bracket pair guides (4). Requires enabling bracket pair guides.")),fe=Object(x.wc)("editorBracketPairGuide.background5",{dark:"#00000000",light:"#00000000",hc:"#00000000"},g.a("editorBracketPairGuide.background5","Background color of inactive bracket pair guides (5). Requires enabling bracket pair guides.")),Pe=Object(x.wc)("editorBracketPairGuide.background6",{dark:"#00000000",light:"#00000000",hc:"#00000000"},g.a("editorBracketPairGuide.background6","Background color of inactive bracket pair guides (6). Requires enabling bracket pair guides.")),Be=Object(x.wc)("editorBracketPairGuide.activeBackground1",{dark:"#00000000",light:"#00000000",hc:"#00000000"},g.a("editorBracketPairGuide.activeBackground1","Background color of active bracket pair guides (1). Requires enabling bracket pair guides.")),Se=Object(x.wc)("editorBracketPairGuide.activeBackground2",{dark:"#00000000",light:"#00000000",hc:"#00000000"},g.a("editorBracketPairGuide.activeBackground2","Background color of active bracket pair guides (2). Requires enabling bracket pair guides.")),me=Object(x.wc)("editorBracketPairGuide.activeBackground3",{dark:"#00000000",light:"#00000000",hc:"#00000000"},g.a("editorBracketPairGuide.activeBackground3","Background color of active bracket pair guides (3). Requires enabling bracket pair guides.")),he=Object(x.wc)("editorBracketPairGuide.activeBackground4",{dark:"#00000000",light:"#00000000",hc:"#00000000"},g.a("editorBracketPairGuide.activeBackground4","Background color of active bracket pair guides (4). Requires enabling bracket pair guides.")),Le=Object(x.wc)("editorBracketPairGuide.activeBackground5",{dark:"#00000000",light:"#00000000",hc:"#00000000"},g.a("editorBracketPairGuide.activeBackground5","Background color of active bracket pair guides (5). Requires enabling bracket pair guides.")),we=Object(x.wc)("editorBracketPairGuide.activeBackground6",{dark:"#00000000",light:"#00000000",hc:"#00000000"},g.a("editorBracketPairGuide.activeBackground6","Background color of active bracket pair guides (6). Requires enabling bracket pair guides."));Object(R.f)((ve,ie)=>{const W=ve.getColor(x.r);W&&ie.addRule(`.monaco-editor, .monaco-editor-background, .monaco-editor .inputarea.ime-input { background-color: ${W}; }`);const U=ve.getColor(x.B);U&&ie.addRule(`.monaco-editor, .monaco-editor .inputarea.ime-input { color: ${U}; }`);const se=ve.getColor(Q);se&&ie.addRule(`.monaco-editor .margin { background-color: ${se}; }`);const je=ve.getColor(I);je&&ie.addRule(`.monaco-editor .rangeHighlight { background-color: ${je}; }`);const Re=ve.getColor(v);Re&&ie.addRule(`.monaco-editor .rangeHighlight { border: 1px ${ve.type==="hc"?"dotted":"solid"} ${Re}; }`);const We=ve.getColor(C);We&&ie.addRule(`.monaco-editor .symbolHighlight { background-color: ${We}; }`);const dt=ve.getColor(m);dt&&ie.addRule(`.monaco-editor .symbolHighlight { border: 1px ${ve.type==="hc"?"dotted":"solid"} ${dt}; }`);const Lt=ve.getColor(L);Lt&&(ie.addRule(`.monaco-editor .mtkw { color: ${Lt} !important; }`),ie.addRule(`.monaco-editor .mtkz { color: ${Lt} !important; }`))})},kdPm:function(mt,M,t){"use strict";t.r(M);var g=t("+hIS");Object(g.a)({id:"cameligo",extensions:[".mligo"],aliases:["Cameligo"],loader:function(){return t.e(325).then(t.bind(null,"3VBA"))}})},"kw+w":function(mt,M,t){},l2gE:function(mt,M,t){"use strict";t.d(M,"a",function(){return Z}),t.d(M,"b",function(){return ne});var g=t("X+cX"),B=t("PTeM"),x=t("QDVR"),R=t("MrjW"),A=t("N0LK");const j="**",I="/",v="[/\\\\]",C="[^/\\\\]",m=/\//g;function d(ae){switch(ae){case 0:return"";case 1:return`${C}*?`;default:return`(?:${v}|${C}+${v}|${v}${C}+)*?`}}function D(ae,V){if(!ae)return[];const G=[];let ee=!1,pe=!1,Te="";for(const Ie of ae){switch(Ie){case V:if(!ee&&!pe){G.push(Te),Te="";continue}break;case"{":ee=!0;break;case"}":ee=!1;break;case"[":pe=!0;break;case"]":pe=!1;break}Te+=Ie}return Te&&G.push(Te),G}function L(ae){if(!ae)return"";let V="";const G=D(ae,I);if(G.every(ee=>ee===j))V=".*";else{let ee=!1;G.forEach((pe,Te)=>{if(pe===j){ee||(V+=d(2),ee=!0);return}let Ie=!1,Me="",Oe=!1,Xe="";for(const fe of pe){if(fe!=="}"&&Ie){Me+=fe;continue}if(Oe&&(fe!=="]"||!Xe)){let Pe;fe==="-"?Pe=fe:(fe==="^"||fe==="!")&&!Xe?Pe="^":fe===I?Pe="":Pe=A.t(fe),Xe+=Pe;continue}switch(fe){case"{":Ie=!0;continue;case"[":Oe=!0;continue;case"}":const Pe=D(Me,","),Be=`(?:${Pe.map(Se=>L(Se)).join("|")})`;V+=Be,Ie=!1,Me="";break;case"]":V+="["+Xe+"]",Oe=!1,Xe="";break;case"?":V+=C;continue;case"*":V+=d(1);continue;default:V+=A.t(fe)}}Te<G.length-1&&(G[Te+1]!==j||Te+2<G.length)&&(V+=v),ee=!1})}return V}const r=/^\*\*\/\*\.[\w\.-]+$/,w=/^\*\*\/([\w\.-]+)\/?$/,b=/^{\*\*\/[\*\.]?[\w\.-]+\/?(,\*\*\/[\*\.]?[\w\.-]+\/?)*}$/,u=/^{\*\*\/[\*\.]?[\w\.-]+(\/(\*\*)?)?(,\*\*\/[\*\.]?[\w\.-]+(\/(\*\*)?)?)*}$/,c=/^\*\*((\/[\w\.-]+)+)\/?$/,p=/^([\w\.-]+(\/[\w\.-]+)*)\/?$/,S=new x.a(1e4),E=function(){return!1},y=function(){return null};function O(ae,V){if(!ae)return y;let G;typeof ae!="string"?G=ae.pattern:G=ae,G=G.trim();const ee=`${G}_${!!V.trimForExclusions}`;let pe=S.get(ee);if(pe)return k(pe,ae);let Te;if(r.test(G)){const Ie=G.substr(4);pe=function(Me,Oe){return typeof Me=="string"&&Me.endsWith(Ie)?G:null}}else(Te=w.exec(Q(G,V)))?pe=q(Te[1],G):(V.trimForExclusions?u:b).test(G)?pe=z(G,V):(Te=c.exec(Q(G,V)))?pe=J(Te[1].substr(1),G,!0):(Te=p.exec(Q(G,V)))?pe=J(Te[1],G,!1):pe=re(G);return S.set(ee,pe),k(pe,ae)}function k(ae,V){return typeof V=="string"?ae:function(G,ee){return B.b(G,V.base)?ae(R.f(V.base,G),ee):null}}function Q(ae,V){return V.trimForExclusions&&ae.endsWith("/**")?ae.substr(0,ae.length-2):ae}function q(ae,V){const G=`/${ae}`,ee=`\\${ae}`,pe=function(Ie,Me){return typeof Ie!="string"?null:Me?Me===ae?V:null:Ie===ae||Ie.endsWith(G)||Ie.endsWith(ee)?V:null},Te=[ae];return pe.basenames=Te,pe.patterns=[V],pe.allBasenames=Te,pe}function z(ae,V){const G=oe(ae.slice(1,-1).split(",").map(Me=>O(Me,V)).filter(Me=>Me!==y),ae),ee=G.length;if(!ee)return y;if(ee===1)return G[0];const pe=function(Me,Oe){for(let Xe=0,fe=G.length;Xe<fe;Xe++)if(G[Xe](Me,Oe))return ae;return null},Te=G.find(Me=>!!Me.allBasenames);Te&&(pe.allBasenames=Te.allBasenames);const Ie=G.reduce((Me,Oe)=>Oe.allPaths?Me.concat(Oe.allPaths):Me,[]);return Ie.length&&(pe.allPaths=Ie),pe}function J(ae,V,G){const ee=R.h===R.e.sep,pe=ee?ae:ae.replace(m,R.h),Te=R.h+pe,Ie=R.e.sep+ae,Me=G?function(Oe,Xe){return typeof Oe=="string"&&(Oe===pe||Oe.endsWith(Te)||!ee&&(Oe===ae||Oe.endsWith(Ie)))?V:null}:function(Oe,Xe){return typeof Oe=="string"&&(Oe===pe||!ee&&Oe===ae)?V:null};return Me.allPaths=[(G?"*/":"./")+ae],Me}function re(ae){try{const V=new RegExp(`^${L(ae)}$`);return function(G){return V.lastIndex=0,typeof G=="string"&&V.test(G)?ae:null}}catch(V){return y}}function Z(ae,V,G){return!ae||typeof V!="string"?!1:ne(ae)(V,void 0,G)}function ne(ae,V={}){if(!ae)return E;if(typeof ae=="string"||le(ae)){const G=O(ae,V);if(G===y)return E;const ee=function(pe,Te){return!!G(pe,Te)};return G.allBasenames&&(ee.allBasenames=G.allBasenames),G.allPaths&&(ee.allPaths=G.allPaths),ee}return _e(ae,V)}function le(ae){const V=ae;return V&&typeof V.base=="string"&&typeof V.pattern=="string"}function _e(ae,V){const G=oe(Object.getOwnPropertyNames(ae).map(Me=>Ce(Me,ae[Me],V)).filter(Me=>Me!==y)),ee=G.length;if(!ee)return y;if(!G.some(Me=>!!Me.requiresSiblings)){if(ee===1)return G[0];const Me=function(fe,Pe){for(let Be=0,Se=G.length;Be<Se;Be++){const me=G[Be](fe,Pe);if(me)return me}return null},Oe=G.find(fe=>!!fe.allBasenames);Oe&&(Me.allBasenames=Oe.allBasenames);const Xe=G.reduce((fe,Pe)=>Pe.allPaths?fe.concat(Pe.allPaths):fe,[]);return Xe.length&&(Me.allPaths=Xe),Me}const pe=function(Me,Oe,Xe){let fe;for(let Pe=0,Be=G.length;Pe<Be;Pe++){const Se=G[Pe];Se.requiresSiblings&&Xe&&(Oe||(Oe=R.a(Me)),fe||(fe=Oe.substr(0,Oe.length-R.c(Me).length)));const me=Se(Me,Oe,fe,Xe);if(me)return me}return null},Te=G.find(Me=>!!Me.allBasenames);Te&&(pe.allBasenames=Te.allBasenames);const Ie=G.reduce((Me,Oe)=>Oe.allPaths?Me.concat(Oe.allPaths):Me,[]);return Ie.length&&(pe.allPaths=Ie),pe}function Ce(ae,V,G){if(V===!1)return y;const ee=O(ae,G);if(ee===y)return y;if(typeof V=="boolean")return ee;if(V){const pe=V.when;if(typeof pe=="string"){const Te=(Ie,Me,Oe,Xe)=>{if(!Xe||!ee(Ie,Me))return null;const fe=pe.replace("$(basename)",Oe),Pe=Xe(fe);return Object(g.k)(Pe)?Pe.then(Be=>Be?ae:null):Pe?ae:null};return Te.requiresSiblings=!0,Te}}return ee}function oe(ae,V){const G=ae.filter(Me=>!!Me.basenames);if(G.length<2)return ae;const ee=G.reduce((Me,Oe)=>{const Xe=Oe.basenames;return Xe?Me.concat(Xe):Me},[]);let pe;if(V){pe=[];for(let Me=0,Oe=ee.length;Me<Oe;Me++)pe.push(V)}else pe=G.reduce((Me,Oe)=>{const Xe=Oe.patterns;return Xe?Me.concat(Xe):Me},[]);const Te=function(Me,Oe){if(typeof Me!="string")return null;if(!Oe){let fe;for(fe=Me.length;fe>0;fe--){const Pe=Me.charCodeAt(fe-1);if(Pe===47||Pe===92)break}Oe=Me.substr(fe)}const Xe=ee.indexOf(Oe);return Xe!==-1?pe[Xe]:null};Te.basenames=ee,Te.patterns=pe,Te.allBasenames=ee;const Ie=ae.filter(Me=>!Me.basenames);return Ie.push(Te),Ie}},lKfe:function(mt,M,t){},"lY/7":function(mt,M,t){"use strict";t.r(M),t.d(M,"MarkerController",function(){return U}),t.d(M,"NextMarkerAction",function(){return je});var g=t("Vhoy"),B=t("pmY6"),x=t("sswD"),R=t("Vxe3"),A=t("cGHE"),j=t("aokT"),I=t("wQH0"),v=t("6OMU"),C=t("MI8n"),m=t("24hK"),d=t("N0LK"),D=t("bY76"),L=t("9fML"),r=t("Cg/j"),w=t("tADe"),b=function($e,ot,ce,Ve){var it=arguments.length,Et=it<3?ot:Ve===null?Ve=Object.getOwnPropertyDescriptor(ot,ce):Ve,It;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")Et=Reflect.decorate($e,ot,ce,Ve);else for(var Rt=$e.length-1;Rt>=0;Rt--)(It=$e[Rt])&&(Et=(it<3?It(Et):it>3?It(ot,ce,Et):It(ot,ce))||Et);return it>3&&Et&&Object.defineProperty(ot,ce,Et),Et},u=function($e,ot){return function(ce,Ve){ot(ce,Ve,$e)}};class c{constructor($e,ot,ce){this.marker=$e,this.index=ot,this.total=ce}}let p=class $e{constructor(ot,ce){this._markerService=ce,this._onDidChange=new C.b,this.onDidChange=this._onDidChange.event,this._dispoables=new B.b,this._markers=[],this._nextIdx=-1,D.a.isUri(ot)?this._resourceFilter=it=>it.toString()===ot.toString():ot&&(this._resourceFilter=ot);const Ve=()=>{this._markers=this._markerService.read({resource:D.a.isUri(ot)?ot:void 0,severities:w.c.Error|w.c.Warning|w.c.Info}),typeof ot=="function"&&(this._markers=this._markers.filter(it=>this._resourceFilter(it.resource))),this._markers.sort($e._compareMarker)};Ve(),this._dispoables.add(ce.onMarkerChanged(it=>{(!this._resourceFilter||it.some(Et=>this._resourceFilter(Et)))&&(Ve(),this._nextIdx=-1,this._onDidChange.fire())}))}dispose(){this._dispoables.dispose(),this._onDidChange.dispose()}matches(ot){return!this._resourceFilter&&!ot?!0:!this._resourceFilter||!ot?!1:this._resourceFilter(ot)}get selected(){const ot=this._markers[this._nextIdx];return ot&&new c(ot,this._nextIdx+1,this._markers.length)}_initIdx(ot,ce,Ve){let it=!1,Et=this._markers.findIndex(It=>It.resource.toString()===ot.uri.toString());Et<0&&(Et=Object(v.d)(this._markers,{resource:ot.uri},(It,Rt)=>Object(d.f)(It.resource.toString(),Rt.resource.toString())),Et<0&&(Et=~Et));for(let It=Et;It<this._markers.length;It++){let Rt=j.a.lift(this._markers[It]);if(Rt.isEmpty()){const vo=ot.getWordAtPosition(Rt.getStartPosition());vo&&(Rt=new j.a(Rt.startLineNumber,vo.startColumn,Rt.startLineNumber,vo.endColumn))}if(ce&&(Rt.containsPosition(ce)||ce.isBeforeOrEqual(Rt.getStartPosition()))){this._nextIdx=It,it=!0;break}if(this._markers[It].resource.toString()!==ot.uri.toString())break}it||(this._nextIdx=Ve?0:this._markers.length-1),this._nextIdx<0&&(this._nextIdx=this._markers.length-1)}resetIndex(){this._nextIdx=-1}move(ot,ce,Ve){if(this._markers.length===0)return!1;let it=this._nextIdx;return this._nextIdx===-1?this._initIdx(ce,Ve,ot):ot?this._nextIdx=(this._nextIdx+1)%this._markers.length:ot||(this._nextIdx=(this._nextIdx-1+this._markers.length)%this._markers.length),it!==this._nextIdx}find(ot,ce){let Ve=this._markers.findIndex(it=>it.resource.toString()===ot.toString());if(Ve<0)return;for(;Ve<this._markers.length;Ve++)if(j.a.containsPosition(this._markers[Ve],ce))return new c(this._markers[Ve],Ve+1,this._markers.length);return}static _compareMarker(ot,ce){let Ve=Object(d.f)(ot.resource.toString(),ce.resource.toString());return Ve===0&&(Ve=w.c.compare(ot.severity,ce.severity)),Ve===0&&(Ve=j.a.compareRangesUsingStarts(ot,ce)),Ve}};p=b([u(1,w.b)],p);const S=Object(r.c)("IMarkerNavigationService");let E=class{constructor(ot){this._markerService=ot,this._provider=new m.a}getMarkerList(ot){for(let ce of this._provider){const Ve=ce.getMarkerList(ot);if(Ve)return Ve}return new p(ot,this._markerService)}};E=b([u(0,w.b)],E),Object(L.b)(S,E,!0);var y=t("3/fG"),O=t("fjLI"),k=t("T8No"),Q=t("v1vZ"),q=t("EffR"),z=t("GJhM"),J=t("zrhQ"),re=t("3rx1"),Z=t("gslv"),ne=t("/oaI"),le=t("iNS8"),_e=t("eUTo"),Ce=t("R8sh"),oe=t("W9cx"),ae=t("S3by"),V=t("MD5Z"),G=t("t9D7"),ee;(function($e){function ot(ce){switch(ce){case ae.a.Ignore:return"severity-ignore "+g.b.info.classNames;case ae.a.Info:return g.b.info.classNames;case ae.a.Warning:return g.b.warning.classNames;case ae.a.Error:return g.b.error.classNames;default:return""}}$e.className=ot})(ee||(ee={})),Object(G.f)(($e,ot)=>{const ce=$e.getColor(V.mc);if(ce){const Et=g.b.error.cssSelector;ot.addRule(`
|
|
|
.monaco-editor .zone-widget ${Et},
|
|
|
.markers-panel .marker-icon${Et},
|
|
|
.text-search-provider-messages .providerMessage ${Et},
|
|
|
.extensions-viewlet > .extensions ${Et} {
|
|
|
color: ${ce};
|
|
|
}
|
|
|
`)}const Ve=$e.getColor(V.oc);if(Ve){const Et=g.b.warning.cssSelector;ot.addRule(`
|
|
|
.monaco-editor .zone-widget ${Et},
|
|
|
.markers-panel .marker-icon${Et},
|
|
|
.extensions-viewlet > .extensions ${Et},
|
|
|
.extension-editor ${Et},
|
|
|
.text-search-provider-messages .providerMessage ${Et},
|
|
|
.preferences-editor ${Et} {
|
|
|
color: ${Ve};
|
|
|
}
|
|
|
`)}const it=$e.getColor(V.nc);if(it){const Et=g.b.info.cssSelector;ot.addRule(`
|
|
|
.monaco-editor .zone-widget ${Et},
|
|
|
.markers-panel .marker-icon${Et},
|
|
|
.extensions-viewlet > .extensions ${Et},
|
|
|
.text-search-provider-messages .providerMessage ${Et},
|
|
|
.extension-editor ${Et} {
|
|
|
color: ${it};
|
|
|
}
|
|
|
`)}});var pe=function($e,ot,ce,Ve){var it=arguments.length,Et=it<3?ot:Ve===null?Ve=Object.getOwnPropertyDescriptor(ot,ce):Ve,It;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")Et=Reflect.decorate($e,ot,ce,Ve);else for(var Rt=$e.length-1;Rt>=0;Rt--)(It=$e[Rt])&&(Et=(it<3?It(Et):it>3?It(ot,ce,Et):It(ot,ce))||Et);return it>3&&Et&&Object.defineProperty(ot,ce,Et),Et},Te=function($e,ot){return function(ce,Ve){ot(ce,Ve,$e)}};class Ie{constructor($e,ot,ce,Ve,it){this._openerService=Ve,this._labelService=it,this._lines=0,this._longestLineLength=0,this._relatedDiagnostics=new WeakMap,this._disposables=new B.b,this._editor=ot;const Et=document.createElement("div");Et.className="descriptioncontainer",this._messageBlock=document.createElement("div"),this._messageBlock.classList.add("message"),this._messageBlock.setAttribute("aria-live","assertive"),this._messageBlock.setAttribute("role","alert"),Et.appendChild(this._messageBlock),this._relatedBlock=document.createElement("div"),Et.appendChild(this._relatedBlock),this._disposables.add(q.o(this._relatedBlock,"click",It=>{It.preventDefault();const Rt=this._relatedDiagnostics.get(It.target);Rt&&ce(Rt)})),this._scrollable=new z.b(Et,{horizontal:1,vertical:1,useShadows:!1,horizontalScrollbarSize:3,verticalScrollbarSize:3}),$e.appendChild(this._scrollable.getDomNode()),this._disposables.add(this._scrollable.onScroll(It=>{Et.style.left=`-${It.scrollLeft}px`,Et.style.top=`-${It.scrollTop}px`})),this._disposables.add(this._scrollable)}dispose(){Object(B.f)(this._disposables)}update($e){const{source:ot,message:ce,relatedInformation:Ve,code:it}=$e;let Et=((ot==null?void 0:ot.length)||0)+"()".length;it&&(typeof it=="string"?Et+=it.length:Et+=it.value.length);const It=Object(d.Q)(ce);this._lines=It.length,this._longestLineLength=0;for(const Do of It)this._longestLineLength=Math.max(Do.length+Et,this._longestLineLength);q.t(this._messageBlock),this._messageBlock.setAttribute("aria-label",this.getAriaLabel($e)),this._editor.applyFontInfo(this._messageBlock);let Rt=this._messageBlock;for(const Do of It)Rt=document.createElement("div"),Rt.innerText=Do,Do===""&&(Rt.style.height=this._messageBlock.style.lineHeight),this._messageBlock.appendChild(Rt);if(ot||it){const Do=document.createElement("span");if(Do.classList.add("details"),Rt.appendChild(Do),ot){const Lo=document.createElement("span");Lo.innerText=ot,Lo.classList.add("source"),Do.appendChild(Lo)}if(it)if(typeof it=="string"){const Lo=document.createElement("span");Lo.innerText=`(${it})`,Lo.classList.add("code"),Do.appendChild(Lo)}else{this._codeLink=q.a("a.code-link"),this._codeLink.setAttribute("href",`${it.target.toString()}`),this._codeLink.onclick=To=>{this._openerService.open(it.target,{allowCommands:!0}),To.preventDefault(),To.stopPropagation()};const Lo=q.q(this._codeLink,q.a("span"));Lo.innerText=it.value,Do.appendChild(this._codeLink)}}if(q.t(this._relatedBlock),this._editor.applyFontInfo(this._relatedBlock),Object(v.n)(Ve)){const Do=this._relatedBlock.appendChild(document.createElement("div"));Do.style.paddingTop=`${Math.floor(this._editor.getOption(58)*.66)}px`,this._lines+=1;for(const Lo of Ve){let To=document.createElement("div"),Vt=document.createElement("a");Vt.classList.add("filename"),Vt.innerText=`${Object(re.a)(Lo.resource)}(${Lo.startLineNumber}, ${Lo.startColumn}): `,Vt.title=this._labelService.getUriLabel(Lo.resource),this._relatedDiagnostics.set(Vt,Lo);let xt=document.createElement("span");xt.innerText=Lo.message,To.appendChild(Vt),To.appendChild(xt),this._lines+=1,Do.appendChild(To)}}const vo=this._editor.getOption(43),Mo=Math.ceil(vo.typicalFullwidthCharacterWidth*this._longestLineLength*.75),xo=vo.lineHeight*this._lines;this._scrollable.setScrollDimensions({scrollWidth:Mo,scrollHeight:xo})}layout($e,ot){this._scrollable.getDomNode().style.height=`${$e}px`,this._scrollable.getDomNode().style.width=`${ot}px`,this._scrollable.setScrollDimensions({width:ot,height:$e})}getHeightInLines(){return Math.min(17,this._lines)}getAriaLabel($e){let ot="";switch($e.severity){case w.c.Error:ot=y.a("Error","Error");break;case w.c.Warning:ot=y.a("Warning","Warning");break;case w.c.Info:ot=y.a("Info","Info");break;case w.c.Hint:ot=y.a("Hint","Hint");break}let ce=y.a("marker aria","{0} at {1}. ",ot,$e.startLineNumber+":"+$e.startColumn);const Ve=this._editor.getModel();if(Ve&&$e.startLineNumber<=Ve.getLineCount()&&$e.startLineNumber>=1){const it=Ve.getLineContent($e.startLineNumber);ce=`${it}, ${ce}`}return ce}}let Me=class $e extends le.c{constructor(ot,ce,Ve,it,Et,It,Rt){super(ot,{showArrow:!0,showFrame:!0,isAccessible:!0,frameWidth:1},Et);this._themeService=ce,this._openerService=Ve,this._menuService=it,this._contextKeyService=It,this._labelService=Rt,this._callOnDispose=new B.b,this._onDidSelectRelatedInformation=new C.b,this.onDidSelectRelatedInformation=this._onDidSelectRelatedInformation.event,this._severity=w.c.Warning,this._backgroundColor=J.a.white,this._applyTheme(ce.getColorTheme()),this._callOnDispose.add(ce.onDidColorThemeChange(this._applyTheme.bind(this))),this.create()}_applyTheme(ot){this._backgroundColor=ot.getColor(we);let ce=Pe,Ve=Be;this._severity===w.c.Warning?(ce=Se,Ve=me):this._severity===w.c.Info&&(ce=he,Ve=Le);const it=ot.getColor(ce),Et=ot.getColor(Ve);this.style({arrowColor:it,frameColor:it,headerBackgroundColor:Et,primaryHeadingColor:ot.getColor(le.q),secondaryHeadingColor:ot.getColor(le.r)})}_applyStyles(){this._parentContainer&&(this._parentContainer.style.backgroundColor=this._backgroundColor?this._backgroundColor.toString():""),super._applyStyles()}dispose(){this._callOnDispose.dispose(),super.dispose()}_fillHead(ot){super._fillHead(ot),this._disposables.add(this._actionbarWidget.actionRunner.onBeforeRun(it=>this.editor.focus()));const ce=[],Ve=this._menuService.createMenu($e.TitleMenu,this._contextKeyService);Object(_e.c)(Ve,void 0,ce),this._actionbarWidget.push(ce,{label:!1,icon:!0,index:0}),Ve.dispose()}_fillTitleIcon(ot){this._icon=q.q(ot,q.a(""))}_fillBody(ot){this._parentContainer=ot,ot.classList.add("marker-widget"),this._parentContainer.tabIndex=0,this._parentContainer.setAttribute("role","tooltip"),this._container=document.createElement("div"),ot.appendChild(this._container),this._message=new Ie(this._container,this.editor,ce=>this._onDidSelectRelatedInformation.fire(ce),this._openerService,this._labelService),this._disposables.add(this._message)}show(){throw new Error("call showAtMarker")}showAtMarker(ot,ce,Ve){this._container.classList.remove("stale"),this._message.update(ot),this._severity=ot.severity,this._applyTheme(this._themeService.getColorTheme());let it=j.a.lift(ot);const Et=this.editor.getPosition();let It=Et&&it.containsPosition(Et)?Et:it.getStartPosition();super.show(It,this.computeRequiredHeight());const Rt=this.editor.getModel();if(Rt){const vo=Ve>1?y.a("problems","{0} of {1} problems",ce,Ve):y.a("change","{0} of {1} problem",ce,Ve);this.setTitle(Object(Z.b)(Rt.uri),vo)}this._icon.className=`codicon ${ee.className(w.c.toSeverity(this._severity))}`,this.editor.revealPositionNearTop(It,0),this.editor.focus()}updateMarker(ot){this._container.classList.remove("stale"),this._message.update(ot)}showStale(){this._container.classList.add("stale"),this._relayout()}_doLayoutBody(ot,ce){super._doLayoutBody(ot,ce),this._heightInPixel=ot,this._message.layout(ot,ce),this._container.style.height=`${ot}px`}_onWidth(ot){this._message.layout(this._heightInPixel,ot)}_relayout(){super._relayout(this.computeRequiredHeight())}computeRequiredHeight(){return 3+this._message.getHeightInLines()}};Me.TitleMenu=new O.b("gotoErrorTitleMenu"),Me=pe([Te(1,G.b),Te(2,oe.a),Te(3,O.a),Te(4,r.a),Te(5,k.b),Te(6,Ce.a)],Me);let Oe=Object(V.hc)(V.u,V.t),Xe=Object(V.hc)(V.V,V.U),fe=Object(V.hc)(V.M,V.L);const Pe=Object(V.wc)("editorMarkerNavigationError.background",{dark:Oe,light:Oe,hc:V.h},y.a("editorMarkerNavigationError","Editor marker navigation widget error color.")),Be=Object(V.wc)("editorMarkerNavigationError.headerBackground",{dark:Object(V.Lc)(Pe,.1),light:Object(V.Lc)(Pe,.1),hc:null},y.a("editorMarkerNavigationErrorHeaderBackground","Editor marker navigation widget error heading background.")),Se=Object(V.wc)("editorMarkerNavigationWarning.background",{dark:Xe,light:Xe,hc:V.h},y.a("editorMarkerNavigationWarning","Editor marker navigation widget warning color.")),me=Object(V.wc)("editorMarkerNavigationWarning.headerBackground",{dark:Object(V.Lc)(Se,.1),light:Object(V.Lc)(Se,.1),hc:"#0C141F"},y.a("editorMarkerNavigationWarningBackground","Editor marker navigation widget warning heading background.")),he=Object(V.wc)("editorMarkerNavigationInfo.background",{dark:fe,light:fe,hc:V.h},y.a("editorMarkerNavigationInfo","Editor marker navigation widget info color.")),Le=Object(V.wc)("editorMarkerNavigationInfo.headerBackground",{dark:Object(V.Lc)(he,.1),light:Object(V.Lc)(he,.1),hc:null},y.a("editorMarkerNavigationInfoHeaderBackground","Editor marker navigation widget info heading background.")),we=Object(V.wc)("editorMarkerNavigation.background",{dark:V.r,light:V.r,hc:V.r},y.a("editorMarkerNavigationBackground","Editor marker navigation widget background."));Object(G.f)(($e,ot)=>{const ce=$e.getColor(V.Jc);ce&&ot.addRule(`.monaco-editor .marker-widget a.code-link span { color: ${ce}; }`);const Ve=$e.getColor(V.Ic);Ve&&ot.addRule(`.monaco-editor .marker-widget a.code-link span:hover { color: ${Ve}; }`)});var ve=function($e,ot,ce,Ve){var it=arguments.length,Et=it<3?ot:Ve===null?Ve=Object.getOwnPropertyDescriptor(ot,ce):Ve,It;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")Et=Reflect.decorate($e,ot,ce,Ve);else for(var Rt=$e.length-1;Rt>=0;Rt--)(It=$e[Rt])&&(Et=(it<3?It(Et):it>3?It(ot,ce,Et):It(ot,ce))||Et);return it>3&&Et&&Object.defineProperty(ot,ce,Et),Et},ie=function($e,ot){return function(ce,Ve){ot(ce,Ve,$e)}},W=function($e,ot,ce,Ve){function it(Et){return Et instanceof ce?Et:new ce(function(It){It(Et)})}return new(ce||(ce=Promise))(function(Et,It){function Rt(xo){try{Mo(Ve.next(xo))}catch(Do){It(Do)}}function vo(xo){try{Mo(Ve.throw(xo))}catch(Do){It(Do)}}function Mo(xo){xo.done?Et(xo.value):it(xo.value).then(Rt,vo)}Mo((Ve=Ve.apply($e,ot||[])).next())})};let U=class $e{constructor(ot,ce,Ve,it,Et){this._markerNavigationService=ce,this._contextKeyService=Ve,this._editorService=it,this._instantiationService=Et,this._sessionDispoables=new B.b,this._editor=ot,this._widgetVisible=Lt.bindTo(this._contextKeyService)}static get(ot){return ot.getContribution($e.ID)}dispose(){this._cleanUp(),this._sessionDispoables.dispose()}_cleanUp(){this._widgetVisible.reset(),this._sessionDispoables.clear(),this._widget=void 0,this._model=void 0}_getOrCreateModel(ot){if(this._model&&this._model.matches(ot))return this._model;let ce=!1;return this._model&&(ce=!0,this._cleanUp()),this._model=this._markerNavigationService.getMarkerList(ot),ce&&this._model.move(!0,this._editor.getModel(),this._editor.getPosition()),this._widget=this._instantiationService.createInstance(Me,this._editor),this._widget.onDidClose(()=>this.close(),this,this._sessionDispoables),this._widgetVisible.set(!0),this._sessionDispoables.add(this._model),this._sessionDispoables.add(this._widget),this._sessionDispoables.add(this._editor.onDidChangeCursorPosition(Ve=>{var it,Et,It;(!((it=this._model)===null||it===void 0?void 0:it.selected)||!j.a.containsPosition((Et=this._model)===null||Et===void 0?void 0:Et.selected.marker,Ve.position))&&((It=this._model)===null||It===void 0||It.resetIndex())})),this._sessionDispoables.add(this._model.onDidChange(()=>{if(!this._widget||!this._widget.position||!this._model)return;const Ve=this._model.find(this._editor.getModel().uri,this._widget.position);Ve?this._widget.updateMarker(Ve.marker):this._widget.showStale()})),this._sessionDispoables.add(this._widget.onDidSelectRelatedInformation(Ve=>{this._editorService.openCodeEditor({resource:Ve.resource,options:{pinned:!0,revealIfOpened:!0,selection:j.a.lift(Ve).collapseToStart()}},this._editor),this.close(!1)})),this._sessionDispoables.add(this._editor.onDidChangeModel(()=>this._cleanUp())),this._model}close(ot=!0){this._cleanUp(),ot&&this._editor.focus()}showAtMarker(ot){if(this._editor.hasModel()){const ce=this._getOrCreateModel(this._editor.getModel().uri);ce.resetIndex(),ce.move(!0,this._editor.getModel(),new A.a(ot.startLineNumber,ot.startColumn)),ce.selected&&this._widget.showAtMarker(ce.selected.marker,ce.selected.index,ce.selected.total)}}nagivate(ot,ce){return W(this,void 0,void 0,function*(){if(this._editor.hasModel()){const Ve=this._getOrCreateModel(ce?void 0:this._editor.getModel().uri);if(Ve.move(ot,this._editor.getModel(),this._editor.getPosition()),!Ve.selected)return;if(Ve.selected.marker.resource.toString()!==this._editor.getModel().uri.toString()){this._cleanUp();const it=yield this._editorService.openCodeEditor({resource:Ve.selected.marker.resource,options:{pinned:!1,revealIfOpened:!0,selectionRevealType:2,selection:Ve.selected.marker}},this._editor);it&&($e.get(it).close(),$e.get(it).nagivate(ot,ce))}else this._widget.showAtMarker(Ve.selected.marker,Ve.selected.index,Ve.selected.total)}})}};U.ID="editor.contrib.markerController",U=ve([ie(1,S),ie(2,k.b),ie(3,R.a),ie(4,r.a)],U);class se extends x.b{constructor($e,ot,ce){super(ce);this._next=$e,this._multiFile=ot}run($e,ot){return W(this,void 0,void 0,function*(){ot.hasModel()&&U.get(ot).nagivate(this._next,this._multiFile)})}}class je extends se{constructor(){super(!0,!1,{id:je.ID,label:je.LABEL,alias:"Go to Next Problem (Error, Warning, Info)",precondition:void 0,kbOpts:{kbExpr:I.a.focus,primary:512|66,weight:100},menuOpts:{menuId:Me.TitleMenu,title:je.LABEL,icon:Object(Q.b)("marker-navigation-next",g.b.arrowDown,y.a("nextMarkerIcon","Icon for goto next marker.")),group:"navigation",order:1}})}}je.ID="editor.action.marker.next",je.LABEL=y.a("markerAction.next.label","Go to Next Problem (Error, Warning, Info)");class Re extends se{constructor(){super(!1,!1,{id:Re.ID,label:Re.LABEL,alias:"Go to Previous Problem (Error, Warning, Info)",precondition:void 0,kbOpts:{kbExpr:I.a.focus,primary:1024|512|66,weight:100},menuOpts:{menuId:Me.TitleMenu,title:je.LABEL,icon:Object(Q.b)("marker-navigation-previous",g.b.arrowUp,y.a("previousMarkerIcon","Icon for goto previous marker.")),group:"navigation",order:2}})}}Re.ID="editor.action.marker.prev",Re.LABEL=y.a("markerAction.previous.label","Go to Previous Problem (Error, Warning, Info)");class We extends se{constructor(){super(!0,!0,{id:"editor.action.marker.nextInFiles",label:y.a("markerAction.nextInFiles.label","Go to Next Problem in Files (Error, Warning, Info)"),alias:"Go to Next Problem in Files (Error, Warning, Info)",precondition:void 0,kbOpts:{kbExpr:I.a.focus,primary:66,weight:100},menuOpts:{menuId:O.b.MenubarGoMenu,title:y.a({key:"miGotoNextProblem",comment:["&& denotes a mnemonic"]},"Next &&Problem"),group:"6_problem_nav",order:1}})}}class dt extends se{constructor(){super(!1,!0,{id:"editor.action.marker.prevInFiles",label:y.a("markerAction.previousInFiles.label","Go to Previous Problem in Files (Error, Warning, Info)"),alias:"Go to Previous Problem in Files (Error, Warning, Info)",precondition:void 0,kbOpts:{kbExpr:I.a.focus,primary:1024|66,weight:100},menuOpts:{menuId:O.b.MenubarGoMenu,title:y.a({key:"miGotoPreviousProblem",comment:["&& denotes a mnemonic"]},"Previous &&Problem"),group:"6_problem_nav",order:2}})}}Object(x.l)(U.ID,U),Object(x.j)(je),Object(x.j)(Re),Object(x.j)(We),Object(x.j)(dt);const Lt=new k.c("markersNavigationVisible",!1),Ht=x.c.bindToContribution(U.get);Object(x.k)(new Ht({id:"closeMarkersNavigation",precondition:Lt,handler:$e=>$e.close(),kbOpts:{weight:100+50,kbExpr:I.a.focus,primary:9,secondary:[1024|9]}}))},li8W:function(mt,M,t){"use strict";t.r(M);var g=t("+hIS");Object(g.a)({id:"bat",extensions:[".bat",".cmd"],aliases:["Batch","bat"],loader:function(){return t.e(324).then(t.bind(null,"7s2V"))}})},lrmC:function(mt,M,t){},n01l:function(mt,M,t){"use strict";t.r(M);var g=t("/kV6"),B=t("sswD"),x=t("aokT"),R=t("wQH0"),A=t("0/Sa"),j=t("cGHE"),I=t("gCVg"),v=t("cMvZ");class C{constructor(p,S){this._selection=p,this._insertSpace=S,this._usedEndToken=null}static _haystackHasNeedleAtOffset(p,S,E){if(E<0)return!1;const y=S.length,O=p.length;if(E+y>O)return!1;for(let k=0;k<y;k++){const Q=p.charCodeAt(E+k),q=S.charCodeAt(k);if(Q===q)continue;if(Q>=65&&Q<=90&&Q+32===q)continue;if(q>=65&&q<=90&&q+32===Q)continue;return!1}return!0}_createOperationsForBlockComment(p,S,E,y,O,k){const Q=p.startLineNumber,q=p.startColumn,z=p.endLineNumber,J=p.endColumn,re=O.getLineContent(Q),Z=O.getLineContent(z);let ne=re.lastIndexOf(S,q-1+S.length),le=Z.indexOf(E,J-1-E.length);if(ne!==-1&&le!==-1)if(Q===z){const Ce=re.substring(ne+S.length,le);Ce.indexOf(E)>=0&&(ne=-1,le=-1)}else{const Ce=re.substring(ne+S.length),oe=Z.substring(0,le);(Ce.indexOf(E)>=0||oe.indexOf(E)>=0)&&(ne=-1,le=-1)}let _e;ne!==-1&&le!==-1?(y&&ne+S.length<re.length&&re.charCodeAt(ne+S.length)===32&&(S=S+" "),y&&le>0&&Z.charCodeAt(le-1)===32&&(E=" "+E,le-=1),_e=C._createRemoveBlockCommentOperations(new x.a(Q,ne+S.length+1,z,le+1),S,E)):(_e=C._createAddBlockCommentOperations(p,S,E,this._insertSpace),this._usedEndToken=_e.length===1?E:null);for(const Ce of _e)k.addTrackedEditOperation(Ce.range,Ce.text)}static _createRemoveBlockCommentOperations(p,S,E){let y=[];return x.a.isEmpty(p)?y.push(A.a.delete(new x.a(p.startLineNumber,p.startColumn-S.length,p.endLineNumber,p.endColumn+E.length))):(y.push(A.a.delete(new x.a(p.startLineNumber,p.startColumn-S.length,p.startLineNumber,p.startColumn))),y.push(A.a.delete(new x.a(p.endLineNumber,p.endColumn,p.endLineNumber,p.endColumn+E.length)))),y}static _createAddBlockCommentOperations(p,S,E,y){let O=[];return x.a.isEmpty(p)?O.push(A.a.replace(new x.a(p.startLineNumber,p.startColumn,p.endLineNumber,p.endColumn),S+" "+E)):(O.push(A.a.insert(new j.a(p.startLineNumber,p.startColumn),S+(y?" ":""))),O.push(A.a.insert(new j.a(p.endLineNumber,p.endColumn),(y?" ":"")+E))),O}getEditOperations(p,S){const E=this._selection.startLineNumber,y=this._selection.startColumn;p.tokenizeIfCheap(E);const O=p.getLanguageIdAtPosition(E,y),k=v.b.getComments(O);if(!k||!k.blockCommentStartToken||!k.blockCommentEndToken)return;this._createOperationsForBlockComment(this._selection,k.blockCommentStartToken,k.blockCommentEndToken,this._insertSpace,p,S)}computeCursorState(p,S){const E=S.getInverseEditOperations();if(E.length===2){const y=E[0],O=E[1];return new I.a(y.range.endLineNumber,y.range.endColumn,O.range.startLineNumber,O.range.startColumn)}else{const y=E[0].range,O=this._usedEndToken?-this._usedEndToken.length-1:0;return new I.a(y.endLineNumber,y.endColumn+O,y.endLineNumber,y.endColumn+O)}}}var m=t("N0LK");class d{constructor(p,S,E,y,O,k){this._selection=p,this._tabSize=S,this._type=E,this._insertSpace=y,this._selectionId=null,this._deltaColumn=0,this._moveEndPositionDown=!1,this._ignoreEmptyLines=O,this._ignoreFirstLine=k||!1}static _gatherPreflightCommentStrings(p,S,E){p.tokenizeIfCheap(S);const y=p.getLanguageIdAtPosition(S,1),O=v.b.getComments(y),k=O?O.lineCommentToken:null;if(!k)return null;let Q=[];for(let q=0,z=E-S+1;q<z;q++)Q[q]={ignore:!1,commentStr:k,commentStrOffset:0,commentStrLength:k.length};return Q}static _analyzeLines(p,S,E,y,O,k,Q){let q=!0,z;p===0?z=!0:p===1?z=!1:z=!0;for(let J=0,re=y.length;J<re;J++){const Z=y[J],ne=O+J;if(ne===O&&Q){Z.ignore=!0;continue}const le=E.getLineContent(ne),_e=m.u(le);if(_e===-1){Z.ignore=k,Z.commentStrOffset=le.length;continue}if(q=!1,Z.ignore=!1,Z.commentStrOffset=_e,z&&!C._haystackHasNeedleAtOffset(le,Z.commentStr,_e)&&(p===0?z=!1:p===1||(Z.ignore=!0)),z&&S){const Ce=_e+Z.commentStrLength;Ce<le.length&&le.charCodeAt(Ce)===32&&(Z.commentStrLength+=1)}}if(p===0&&q){z=!1;for(let J=0,re=y.length;J<re;J++)y[J].ignore=!1}return{supported:!0,shouldRemoveComments:z,lines:y}}static _gatherPreflightData(p,S,E,y,O,k,Q){const q=d._gatherPreflightCommentStrings(E,y,O);return q===null?{supported:!1}:d._analyzeLines(p,S,E,q,y,k,Q)}_executeLineComments(p,S,E,y){let O;E.shouldRemoveComments?O=d._createRemoveLineCommentsOperations(E.lines,y.startLineNumber):(d._normalizeInsertionPoint(p,E.lines,y.startLineNumber,this._tabSize),O=this._createAddLineCommentsOperations(E.lines,y.startLineNumber));const k=new j.a(y.positionLineNumber,y.positionColumn);for(let Q=0,q=O.length;Q<q;Q++)if(S.addEditOperation(O[Q].range,O[Q].text),x.a.isEmpty(O[Q].range)&&x.a.getStartPosition(O[Q].range).equals(k)){const z=p.getLineContent(k.lineNumber);z.length+1===k.column&&(this._deltaColumn=(O[Q].text||"").length)}this._selectionId=S.trackSelection(y)}_attemptRemoveBlockComment(p,S,E,y){let O=S.startLineNumber,k=S.endLineNumber,Q=y.length+Math.max(p.getLineFirstNonWhitespaceColumn(S.startLineNumber),S.startColumn),q=p.getLineContent(O).lastIndexOf(E,Q-1),z=p.getLineContent(k).indexOf(y,S.endColumn-1-E.length);return q!==-1&&z===-1&&(z=p.getLineContent(O).indexOf(y,q+E.length),k=O),q===-1&&z!==-1&&(q=p.getLineContent(k).lastIndexOf(E,z),O=k),S.isEmpty()&&(q===-1||z===-1)&&(q=p.getLineContent(O).indexOf(E),q!==-1&&(z=p.getLineContent(O).indexOf(y,q+E.length))),q!==-1&&p.getLineContent(O).charCodeAt(q+E.length)===32&&(E+=" "),z!==-1&&p.getLineContent(k).charCodeAt(z-1)===32&&(y=" "+y,z-=1),q!==-1&&z!==-1?C._createRemoveBlockCommentOperations(new x.a(O,q+E.length+1,k,z+1),E,y):null}_executeBlockComment(p,S,E){p.tokenizeIfCheap(E.startLineNumber);let y=p.getLanguageIdAtPosition(E.startLineNumber,1),O=v.b.getComments(y);if(!O||!O.blockCommentStartToken||!O.blockCommentEndToken)return;const k=O.blockCommentStartToken,Q=O.blockCommentEndToken;let q=this._attemptRemoveBlockComment(p,E,k,Q);if(!q){if(E.isEmpty()){const z=p.getLineContent(E.startLineNumber);let J=m.u(z);J===-1&&(J=z.length),q=C._createAddBlockCommentOperations(new x.a(E.startLineNumber,J+1,E.startLineNumber,z.length+1),k,Q,this._insertSpace)}else q=C._createAddBlockCommentOperations(new x.a(E.startLineNumber,p.getLineFirstNonWhitespaceColumn(E.startLineNumber),E.endLineNumber,p.getLineMaxColumn(E.endLineNumber)),k,Q,this._insertSpace);q.length===1&&(this._deltaColumn=k.length+1)}this._selectionId=S.trackSelection(E);for(const z of q)S.addEditOperation(z.range,z.text)}getEditOperations(p,S){let E=this._selection;if(this._moveEndPositionDown=!1,E.startLineNumber===E.endLineNumber&&this._ignoreFirstLine){S.addEditOperation(new x.a(E.startLineNumber,p.getLineMaxColumn(E.startLineNumber),E.startLineNumber+1,1),E.startLineNumber===p.getLineCount()?"":`
|
|
|
`),this._selectionId=S.trackSelection(E);return}E.startLineNumber<E.endLineNumber&&E.endColumn===1&&(this._moveEndPositionDown=!0,E=E.setEndPosition(E.endLineNumber-1,p.getLineMaxColumn(E.endLineNumber-1)));const y=d._gatherPreflightData(this._type,this._insertSpace,p,E.startLineNumber,E.endLineNumber,this._ignoreEmptyLines,this._ignoreFirstLine);return y.supported?this._executeLineComments(p,S,y,E):this._executeBlockComment(p,S,E)}computeCursorState(p,S){let E=S.getTrackedSelection(this._selectionId);return this._moveEndPositionDown&&(E=E.setEndPosition(E.endLineNumber+1,1)),new I.a(E.selectionStartLineNumber,E.selectionStartColumn+this._deltaColumn,E.positionLineNumber,E.positionColumn+this._deltaColumn)}static _createRemoveLineCommentsOperations(p,S){let E=[];for(let y=0,O=p.length;y<O;y++){const k=p[y];if(k.ignore)continue;E.push(A.a.delete(new x.a(S+y,k.commentStrOffset+1,S+y,k.commentStrOffset+k.commentStrLength+1)))}return E}_createAddLineCommentsOperations(p,S){let E=[];const y=this._insertSpace?" ":"";for(let O=0,k=p.length;O<k;O++){const Q=p[O];if(Q.ignore)continue;E.push(A.a.insert(new j.a(S+O,Q.commentStrOffset+1),Q.commentStr+y))}return E}static nextVisibleColumn(p,S,E,y){return E?p+(S-p%S):p+y}static _normalizeInsertionPoint(p,S,E,y){let O=1073741824,k,Q;for(let q=0,z=S.length;q<z;q++){if(S[q].ignore)continue;const J=p.getLineContent(E+q);let re=0;for(let Z=0,ne=S[q].commentStrOffset;re<O&&Z<ne;Z++)re=d.nextVisibleColumn(re,y,J.charCodeAt(Z)===9,1);re<O&&(O=re)}O=Math.floor(O/y)*y;for(let q=0,z=S.length;q<z;q++){if(S[q].ignore)continue;const J=p.getLineContent(E+q);let re=0;for(k=0,Q=S[q].commentStrOffset;re<O&&k<Q;k++)re=d.nextVisibleColumn(re,y,J.charCodeAt(k)===9,1);re>O?S[q].commentStrOffset=k-1:S[q].commentStrOffset=k}}}var D=t("3/fG"),L=t("fjLI");class r extends B.b{constructor(p,S){super(S);this._type=p}run(p,S){if(!S.hasModel())return;const E=S.getModel(),y=[],O=E.getOptions(),k=S.getOption(19),Q=S.getSelections().map((z,J)=>({selection:z,index:J,ignoreFirstLine:!1}));Q.sort((z,J)=>x.a.compareRangesUsingStarts(z.selection,J.selection));let q=Q[0];for(let z=1;z<Q.length;z++){const J=Q[z];q.selection.endLineNumber===J.selection.startLineNumber&&(q.index<J.index?J.ignoreFirstLine=!0:(q.ignoreFirstLine=!0,q=J))}for(const z of Q)y.push(new d(z.selection,O.tabSize,this._type,k.insertSpace,k.ignoreEmptyLines,z.ignoreFirstLine));S.pushUndoStop(),S.executeCommands(this.id,y),S.pushUndoStop()}}class w extends r{constructor(){super(0,{id:"editor.action.commentLine",label:D.a("comment.line","Toggle Line Comment"),alias:"Toggle Line Comment",precondition:R.a.writable,kbOpts:{kbExpr:R.a.editorTextFocus,primary:2048|85,weight:100},menuOpts:{menuId:L.b.MenubarEditMenu,group:"5_insert",title:D.a({key:"miToggleLineComment",comment:["&& denotes a mnemonic"]},"&&Toggle Line Comment"),order:1}})}}class b extends r{constructor(){super(1,{id:"editor.action.addCommentLine",label:D.a("comment.line.add","Add Line Comment"),alias:"Add Line Comment",precondition:R.a.writable,kbOpts:{kbExpr:R.a.editorTextFocus,primary:Object(g.c)(2048|41,2048|33),weight:100}})}}class u extends r{constructor(){super(2,{id:"editor.action.removeCommentLine",label:D.a("comment.line.remove","Remove Line Comment"),alias:"Remove Line Comment",precondition:R.a.writable,kbOpts:{kbExpr:R.a.editorTextFocus,primary:Object(g.c)(2048|41,2048|51),weight:100}})}}class c extends B.b{constructor(){super({id:"editor.action.blockComment",label:D.a("comment.block","Toggle Block Comment"),alias:"Toggle Block Comment",precondition:R.a.writable,kbOpts:{kbExpr:R.a.editorTextFocus,primary:1024|512|31,linux:{primary:2048|1024|31},weight:100},menuOpts:{menuId:L.b.MenubarEditMenu,group:"5_insert",title:D.a({key:"miToggleBlockComment",comment:["&& denotes a mnemonic"]},"Toggle &&Block Comment"),order:2}})}run(p,S){if(!S.hasModel())return;const E=S.getOption(19),y=[],O=S.getSelections();for(const k of O)y.push(new C(k,E.insertSpace));S.pushUndoStop(),S.executeCommands(this.id,y),S.pushUndoStop()}}Object(B.j)(w),Object(B.j)(b),Object(B.j)(u),Object(B.j)(c)},n18v:function(mt,M,t){"use strict";t.r(M);var g=t("+hIS");Object(g.a)({id:"twig",extensions:[".twig"],aliases:["Twig","twig"],mimetypes:["text/x-twig"],loader:function(){return t.e(374).then(t.bind(null,"nNVF"))}})},nB0o:function(mt,M,t){"use strict";t.d(M,"a",function(){return Vs});var g=t("79sc"),B=t("sswD"),x=function(o,n,a,T){var N=arguments.length,Y=N<3?n:T===null?T=Object.getOwnPropertyDescriptor(n,a):T,be;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")Y=Reflect.decorate(o,n,a,T);else for(var xe=o.length-1;xe>=0;xe--)(be=o[xe])&&(Y=(N<3?be(Y):N>3?be(n,a,Y):be(n,a))||Y);return N>3&&Y&&Object.defineProperty(n,a,Y),Y},R=function(o,n){return function(a,T){n(a,T,o)}};let A=class{constructor(n,a){}dispose(){}};A.ID="editor.contrib.markerDecorations",A=x([R(1,g.a)],A),Object(B.l)(A.ID,A);var j=t("lrmC"),I=t("3/fG"),v=t("EffR"),C=t("/cxE"),m=t("MI8n"),d=t("pmY6"),D=t("tYmi"),L=t("HdwC"),r=t("Vxe3"),w=t("D3Dy"),b=t("gCVg"),u=t("ZlPH"),c=t("MNsG"),p=t("pg8w"),S=t("XSiN"),E=t("X+cX"),y=t("AKMP");class O{constructor(o,n){this.x=o,this.y=n,this._pageCoordinatesBrand=void 0}toClientCoordinates(){return new k(this.x-v.f.scrollX,this.y-v.f.scrollY)}}class k{constructor(o,n){this.clientX=o,this.clientY=n,this._clientCoordinatesBrand=void 0}toPageCoordinates(){return new O(this.clientX+v.f.scrollX,this.clientY+v.f.scrollY)}}class Q{constructor(o,n,a,T){this.x=o,this.y=n,this.width=a,this.height=T,this._editorPagePositionBrand=void 0}}function q(o){const n=v.D(o);return new Q(n.left,n.top,n.width,n.height)}class z extends S.a{constructor(o,n){super(o);this._editorMouseEventBrand=void 0,this.pos=new O(this.posx,this.posy),this.editorPos=q(n)}}class J{constructor(o){this._editorViewDomNode=o}_create(o){return new z(o,this._editorViewDomNode)}onContextMenu(o,n){return v.i(o,"contextmenu",a=>{n(this._create(a))})}onMouseUp(o,n){return v.i(o,"mouseup",a=>{n(this._create(a))})}onMouseDown(o,n){return v.i(o,"mousedown",a=>{n(this._create(a))})}onMouseLeave(o,n){return v.j(o,a=>{n(this._create(a))})}onMouseMoveThrottled(o,n,a,T){const N=(Y,be)=>a(Y,this._create(be));return v.l(o,"mousemove",n,N,T)}}class re{constructor(o){this._editorViewDomNode=o}_create(o){return new z(o,this._editorViewDomNode)}onPointerUp(o,n){return v.i(o,"pointerup",a=>{n(this._create(a))})}onPointerDown(o,n){return v.i(o,"pointerdown",a=>{n(this._create(a))})}onPointerLeave(o,n){return v.k(o,a=>{n(this._create(a))})}onPointerMoveThrottled(o,n,a,T){const N=(Y,be)=>a(Y,this._create(be));return v.l(o,"pointermove",n,N,T)}}class Z extends d.a{constructor(o){super();this._editorViewDomNode=o,this._globalMouseMoveMonitor=this._register(new y.a),this._keydownListener=null}startMonitoring(o,n,a,T,N){this._keydownListener=v.o(document,"keydown",be=>{const xe=be.toKeybinding();if(xe.isModifierKey())return;this._globalMouseMoveMonitor.stopMonitoring(!0,be.browserEvent)},!0);const Y=(be,xe)=>a(be,new z(xe,this._editorViewDomNode));this._globalMouseMoveMonitor.startMonitoring(o,n,Y,T,be=>{this._keydownListener.dispose(),N(be)})}stopMonitoring(){this._globalMouseMoveMonitor.stopMonitoring(!0)}}class ne extends d.a{constructor(){super();this._shouldRender=!0}shouldRender(){return this._shouldRender}forceShouldRender(){this._shouldRender=!0}setShouldRender(){this._shouldRender=!0}onDidRender(){this._shouldRender=!1}onCompositionStart(o){return!1}onCompositionEnd(o){return!1}onConfigurationChanged(o){return!1}onCursorStateChanged(o){return!1}onDecorationsChanged(o){return!1}onFlushed(o){return!1}onFocusChanged(o){return!1}onLanguageConfigurationChanged(o){return!1}onLineMappingChanged(o){return!1}onLinesChanged(o){return!1}onLinesDeleted(o){return!1}onLinesInserted(o){return!1}onRevealRangeRequest(o){return!1}onScrollChanged(o){return!1}onThemeChanged(o){return!1}onTokensChanged(o){return!1}onTokensColorsChanged(o){return!1}onZonesChanged(o){return!1}handleEvents(o){let n=!1;for(let a=0,T=o.length;a<T;a++){let N=o[a];switch(N.type){case 0:this.onCompositionStart(N)&&(n=!0);break;case 1:this.onCompositionEnd(N)&&(n=!0);break;case 2:this.onConfigurationChanged(N)&&(n=!0);break;case 3:this.onCursorStateChanged(N)&&(n=!0);break;case 4:this.onDecorationsChanged(N)&&(n=!0);break;case 5:this.onFlushed(N)&&(n=!0);break;case 6:this.onFocusChanged(N)&&(n=!0);break;case 7:this.onLanguageConfigurationChanged(N)&&(n=!0);break;case 8:this.onLineMappingChanged(N)&&(n=!0);break;case 9:this.onLinesChanged(N)&&(n=!0);break;case 10:this.onLinesDeleted(N)&&(n=!0);break;case 11:this.onLinesInserted(N)&&(n=!0);break;case 12:this.onRevealRangeRequest(N)&&(n=!0);break;case 13:this.onScrollChanged(N)&&(n=!0);break;case 15:this.onTokensChanged(N)&&(n=!0);break;case 14:this.onThemeChanged(N)&&(n=!0);break;case 16:this.onTokensColorsChanged(N)&&(n=!0);break;case 17:this.onZonesChanged(N)&&(n=!0);break;default:console.info("View received unknown event: "),console.info(N)}}n&&(this._shouldRender=!0)}}class le extends ne{constructor(o){super();this._context=o,this._context.addEventHandler(this)}dispose(){this._context.removeEventHandler(this),super.dispose()}}class _e{static write(o,n){o instanceof u.a,o.setAttribute("data-mprt",String(n))}static read(o){const n=o.getAttribute("data-mprt");return n===null?0:parseInt(n,10)}static collect(o,n){let a=[],T=0;for(;o&&o!==document.body&&!(o===n);)o.nodeType===o.ELEMENT_NODE&&(a[T++]=this.read(o)),o=o.parentElement;const N=new Uint8Array(T);for(let Y=0;Y<T;Y++)N[Y]=a[T-Y-1];return N}}class Ce{constructor(o,n){this._restrictedRenderingContextBrand=void 0,this._viewLayout=o,this.viewportData=n,this.scrollWidth=this._viewLayout.getScrollWidth(),this.scrollHeight=this._viewLayout.getScrollHeight(),this.visibleRange=this.viewportData.visibleRange,this.bigNumbersDelta=this.viewportData.bigNumbersDelta;const a=this._viewLayout.getCurrentViewport();this.scrollTop=a.top,this.scrollLeft=a.left,this.viewportWidth=a.width,this.viewportHeight=a.height}getScrolledTopFromAbsoluteTop(o){return o-this.scrollTop}getVerticalOffsetForLineNumber(o){return this._viewLayout.getVerticalOffsetForLineNumber(o)}getDecorationsInViewport(){return this.viewportData.getDecorationsInViewport()}}class oe extends Ce{constructor(o,n,a){super(o,n);this._renderingContextBrand=void 0,this._viewLines=a}linesVisibleRangesForRange(o,n){return this._viewLines.linesVisibleRangesForRange(o,n)}visibleRangeForPosition(o){return this._viewLines.visibleRangeForPosition(o)}}class ae{constructor(o,n,a){this.outsideRenderedLine=o,this.lineNumber=n,this.ranges=a}}class V{constructor(o,n){this._horizontalRangeBrand=void 0,this.left=Math.round(o),this.width=Math.round(n)}static from(o){const n=new Array(o.length);for(let a=0,T=o.length;a<T;a++){const N=o[a];n[a]=new V(N.left,N.width)}return n}toString(){return`[${this.left},${this.width}]`}}class G{constructor(o,n){this._floatHorizontalRangeBrand=void 0,this.left=o,this.width=n}toString(){return`[${this.left},${this.width}]`}static compare(o,n){return o.left-n.left}}class ee{constructor(o,n){this.outsideRenderedLine=o,this.originalLeft=n,this.left=Math.round(this.originalLeft)}}class pe{constructor(o,n){this.outsideRenderedLine=o,this.ranges=n}}class Te{static _createRange(){return this._handyReadyRange||(this._handyReadyRange=document.createRange()),this._handyReadyRange}static _detachRange(o,n){o.selectNodeContents(n)}static _readClientRects(o,n,a,T,N){const Y=this._createRange();try{return Y.setStart(o,n),Y.setEnd(a,T),Y.getClientRects()}catch(be){return null}finally{this._detachRange(Y,N)}}static _mergeAdjacentRanges(o){if(o.length===1)return o;o.sort(G.compare);let n=[],a=0,T=o[0];for(let N=1,Y=o.length;N<Y;N++){const be=o[N];T.left+T.width+.9>=be.left?T.width=Math.max(T.width,be.left+be.width-T.left):(n[a++]=T,T=be)}return n[a++]=T,n}static _createHorizontalRangesFromClientRects(o,n){if(!o||o.length===0)return null;const a=[];for(let T=0,N=o.length;T<N;T++){const Y=o[T];a[T]=new G(Math.max(0,Y.left-n),Y.width)}return this._mergeAdjacentRanges(a)}static readHorizontalRanges(o,n,a,T,N,Y,be){const xe=0,Ke=o.children.length-1;if(xe>Ke)return null;if(n=Math.min(Ke,Math.max(xe,n)),T=Math.min(Ke,Math.max(xe,T)),n===T&&a===N&&a===0&&!o.children[n].firstChild){const ft=o.children[n].getClientRects();return this._createHorizontalRangesFromClientRects(ft,Y)}n!==T&&(T>0&&N===0&&(T--,N=1073741824));let Ze=o.children[n].firstChild,nt=o.children[T].firstChild;if((!Ze||!nt)&&(!Ze&&a===0&&n>0&&(Ze=o.children[n-1].firstChild,a=1073741824),!nt&&N===0&&T>0&&(nt=o.children[T-1].firstChild,N=1073741824)),!Ze||!nt)return null;a=Math.min(Ze.textContent.length,Math.max(0,a)),N=Math.min(nt.textContent.length,Math.max(0,N));const Ot=this._readClientRects(Ze,a,nt,N,be);return this._createHorizontalRangesFromClientRects(Ot,Y)}}var Ie=t("dBaI"),Me=t("baJR"),Oe=t("nEHx"),Xe=t("/UlZ");const fe=function(){return c.g?!0:!(c.d||w.g||w.h)}();let Pe=!0;class Be{constructor(o,n){this._domNode=o,this._clientRectDeltaLeft=0,this._clientRectDeltaLeftRead=!1,this.endNode=n}get clientRectDeltaLeft(){return this._clientRectDeltaLeftRead||(this._clientRectDeltaLeftRead=!0,this._clientRectDeltaLeft=this._domNode.getBoundingClientRect().left),this._clientRectDeltaLeft}}class Se{constructor(o,n){this.themeType=n;const a=o.options,T=a.get(43);this.renderWhitespace=a.get(87),this.renderControlCharacters=a.get(82),this.spaceWidth=T.spaceWidth,this.middotWidth=T.middotWidth,this.wsmiddotWidth=T.wsmiddotWidth,this.useMonospaceOptimizations=T.isMonospace&&!a.get(29),this.canUseHalfwidthRightwardsArrow=T.canUseHalfwidthRightwardsArrow,this.lineHeight=a.get(58),this.stopRenderingLineAfter=a.get(104),this.fontLigatures=a.get(44)}equals(o){return this.themeType===o.themeType&&this.renderWhitespace===o.renderWhitespace&&this.renderControlCharacters===o.renderControlCharacters&&this.spaceWidth===o.spaceWidth&&this.middotWidth===o.middotWidth&&this.wsmiddotWidth===o.wsmiddotWidth&&this.useMonospaceOptimizations===o.useMonospaceOptimizations&&this.canUseHalfwidthRightwardsArrow===o.canUseHalfwidthRightwardsArrow&&this.lineHeight===o.lineHeight&&this.stopRenderingLineAfter===o.stopRenderingLineAfter&&this.fontLigatures===o.fontLigatures}}class me{constructor(o){this._options=o,this._isMaybeInvalid=!0,this._renderedViewLine=null}getDomNode(){return this._renderedViewLine&&this._renderedViewLine.domNode?this._renderedViewLine.domNode.domNode:null}setDomNode(o){if(this._renderedViewLine)this._renderedViewLine.domNode=Object(u.b)(o);else throw new Error("I have no rendered view line to set the dom node to...")}onContentChanged(){this._isMaybeInvalid=!0}onTokensChanged(){this._isMaybeInvalid=!0}onDecorationsChanged(){this._isMaybeInvalid=!0}onOptionsChanged(o){this._isMaybeInvalid=!0,this._options=o}onSelectionChanged(){return this._options.themeType===Oe.a.HIGH_CONTRAST||this._options.renderWhitespace==="selection"?(this._isMaybeInvalid=!0,!0):!1}renderLine(o,n,a,T){if(this._isMaybeInvalid===!1)return!1;this._isMaybeInvalid=!1;const N=a.getViewLineRenderingData(o),Y=this._options,be=Ie.a.filter(N.inlineDecorations,o,N.minColumn,N.maxColumn);let xe=null;if(Y.themeType===Oe.a.HIGH_CONTRAST||this._options.renderWhitespace==="selection"){const Ot=a.selections;for(const ft of Ot){if(ft.endLineNumber<o||ft.startLineNumber>o)continue;const kt=ft.startLineNumber===o?ft.startColumn:N.minColumn,Gt=ft.endLineNumber===o?ft.endColumn:N.maxColumn;kt<Gt&&(Y.themeType===Oe.a.HIGH_CONTRAST||this._options.renderWhitespace!=="selection"?be.push(new Ie.a(kt,Gt,"inline-selected-text",0)):(xe||(xe=[]),xe.push(new Me.b(kt-1,Gt-1))))}}const Ke=new Me.c(Y.useMonospaceOptimizations,Y.canUseHalfwidthRightwardsArrow,N.content,N.continuesWithWrappedLine,N.isBasicASCII,N.containsRTL,N.minColumn-1,N.tokens,be,N.tabSize,N.startVisibleColumn,Y.spaceWidth,Y.middotWidth,Y.wsmiddotWidth,Y.stopRenderingLineAfter,Y.renderWhitespace,Y.renderControlCharacters,Y.fontLigatures!==Xe.e.OFF,xe);if(this._renderedViewLine&&this._renderedViewLine.input.equals(Ke))return!1;T.appendASCIIString('<div style="top:'),T.appendASCIIString(String(n)),T.appendASCIIString("px;height:"),T.appendASCIIString(String(this._options.lineHeight)),T.appendASCIIString('px;" class="'),T.appendASCIIString(me.CLASS_NAME),T.appendASCIIString('">');const Ze=Object(Me.d)(Ke,T);T.appendASCIIString("</div>");let nt=null;return Pe&&fe&&N.isBasicASCII&&Y.useMonospaceOptimizations&&Ze.containsForeignElements===0&&(N.content.length<300&&Ke.lineTokens.getCount()<100&&(nt=new he(this._renderedViewLine?this._renderedViewLine.domNode:null,Ke,Ze.characterMapping))),nt||(nt=ve(this._renderedViewLine?this._renderedViewLine.domNode:null,Ke,Ze.characterMapping,Ze.containsRTL,Ze.containsForeignElements)),this._renderedViewLine=nt,!0}layoutLine(o,n){this._renderedViewLine&&this._renderedViewLine.domNode&&(this._renderedViewLine.domNode.setTop(n),this._renderedViewLine.domNode.setHeight(this._options.lineHeight))}getWidth(){return this._renderedViewLine?this._renderedViewLine.getWidth():0}getWidthIsFast(){return this._renderedViewLine?this._renderedViewLine.getWidthIsFast():!0}needsMonospaceFontCheck(){return this._renderedViewLine?this._renderedViewLine instanceof he:!1}monospaceAssumptionsAreValid(){return this._renderedViewLine&&this._renderedViewLine instanceof he?this._renderedViewLine.monospaceAssumptionsAreValid():Pe}onMonospaceAssumptionsInvalidated(){this._renderedViewLine&&this._renderedViewLine instanceof he&&(this._renderedViewLine=this._renderedViewLine.toSlowRenderedLine())}getVisibleRangesForRange(o,n,a,T){if(!this._renderedViewLine)return null;n=n|0,a=a|0,n=Math.min(this._renderedViewLine.input.lineContent.length+1,Math.max(1,n)),a=Math.min(this._renderedViewLine.input.lineContent.length+1,Math.max(1,a));const N=this._renderedViewLine.input.stopRenderingLineAfter|0;let Y=!1;N!==-1&&n>N+1&&a>N+1&&(Y=!0),N!==-1&&n>N+1&&(n=N+1),N!==-1&&a>N+1&&(a=N+1);const be=this._renderedViewLine.getVisibleRangesForRange(o,n,a,T);return be&&be.length>0?new pe(Y,be):null}getColumnOfNodeOffset(o,n,a){return this._renderedViewLine?this._renderedViewLine.getColumnOfNodeOffset(o,n,a):1}}me.CLASS_NAME="view-line";class he{constructor(o,n,a){this.domNode=o,this.input=n,this._characterMapping=a,this._charWidth=n.spaceWidth}getWidth(){return Math.round(this._getCharPosition(this._characterMapping.length))}getWidthIsFast(){return!0}monospaceAssumptionsAreValid(){if(!this.domNode)return Pe;const o=this.getWidth(),n=this.domNode.domNode.firstChild.offsetWidth;return Math.abs(o-n)>=2&&(console.warn("monospace assumptions have been violated, therefore disabling monospace optimizations!"),Pe=!1),Pe}toSlowRenderedLine(){return ve(this.domNode,this.input,this._characterMapping,!1,0)}getVisibleRangesForRange(o,n,a,T){const N=this._getCharPosition(n),Y=this._getCharPosition(a);return[new G(N,Y-N)]}_getCharPosition(o){const n=this._characterMapping.getAbsoluteOffset(o);return this._charWidth*n}getColumnOfNodeOffset(o,n,a){const T=n.textContent.length;let N=-1;for(;n;)n=n.previousSibling,N++;return this._characterMapping.getColumn(new Me.a(N,a),T)}}class Le{constructor(o,n,a,T,N){if(this.domNode=o,this.input=n,this._characterMapping=a,this._isWhitespaceOnly=/^\s*$/.test(n.lineContent),this._containsForeignElements=N,this._cachedWidth=-1,this._pixelOffsetCache=null,!T||this._characterMapping.length===0){this._pixelOffsetCache=new Float32Array(Math.max(2,this._characterMapping.length+1));for(let Y=0,be=this._characterMapping.length;Y<=be;Y++)this._pixelOffsetCache[Y]=-1}}_getReadingTarget(o){return o.domNode.firstChild}getWidth(){return this.domNode?(this._cachedWidth===-1&&(this._cachedWidth=this._getReadingTarget(this.domNode).offsetWidth),this._cachedWidth):0}getWidthIsFast(){return!(this._cachedWidth===-1)}getVisibleRangesForRange(o,n,a,T){if(!this.domNode)return null;if(this._pixelOffsetCache!==null){const N=this._readPixelOffset(this.domNode,o,n,T);if(N===-1)return null;const Y=this._readPixelOffset(this.domNode,o,a,T);return Y===-1?null:[new G(N,Y-N)]}return this._readVisibleRangesForRange(this.domNode,o,n,a,T)}_readVisibleRangesForRange(o,n,a,T,N){if(a===T){const Y=this._readPixelOffset(o,n,a,N);return Y===-1?null:[new G(Y,0)]}else return this._readRawVisibleRangesForRange(o,a,T,N)}_readPixelOffset(o,n,a,T){if(this._characterMapping.length===0){if(this._containsForeignElements===0)return 0;if(this._containsForeignElements===2)return 0;if(this._containsForeignElements===1)return this.getWidth();const N=this._getReadingTarget(o);return N.firstChild?N.firstChild.offsetWidth:0}if(this._pixelOffsetCache!==null){const N=this._pixelOffsetCache[a];if(N!==-1)return N;const Y=this._actualReadPixelOffset(o,n,a,T);return this._pixelOffsetCache[a]=Y,Y}return this._actualReadPixelOffset(o,n,a,T)}_actualReadPixelOffset(o,n,a,T){if(this._characterMapping.length===0){const xe=Te.readHorizontalRanges(this._getReadingTarget(o),0,0,0,0,T.clientRectDeltaLeft,T.endNode);return!xe||xe.length===0?-1:xe[0].left}if(a===this._characterMapping.length&&this._isWhitespaceOnly&&this._containsForeignElements===0)return this.getWidth();const N=this._characterMapping.getDomPosition(a),Y=Te.readHorizontalRanges(this._getReadingTarget(o),N.partIndex,N.charIndex,N.partIndex,N.charIndex,T.clientRectDeltaLeft,T.endNode);if(!Y||Y.length===0)return-1;const be=Y[0].left;if(this.input.isBasicASCII){const xe=this._characterMapping.getAbsoluteOffset(a),Ke=Math.round(this.input.spaceWidth*xe);if(Math.abs(Ke-be)<=1)return Ke}return be}_readRawVisibleRangesForRange(o,n,a,T){if(n===1&&a===this._characterMapping.length)return[new G(0,this.getWidth())];const N=this._characterMapping.getDomPosition(n),Y=this._characterMapping.getDomPosition(a);return Te.readHorizontalRanges(this._getReadingTarget(o),N.partIndex,N.charIndex,Y.partIndex,Y.charIndex,T.clientRectDeltaLeft,T.endNode)}getColumnOfNodeOffset(o,n,a){const T=n.textContent.length;let N=-1;for(;n;)n=n.previousSibling,N++;return this._characterMapping.getColumn(new Me.a(N,a),T)}}class we extends Le{_readVisibleRangesForRange(o,n,a,T,N){const Y=super._readVisibleRangesForRange(o,n,a,T,N);if(!Y||Y.length===0||a===T||a===1&&T===this._characterMapping.length)return Y;if(!this.input.containsRTL){const be=this._readPixelOffset(o,n,T,N);if(be!==-1){const xe=Y[Y.length-1];xe.left<be&&(xe.width=be-xe.left)}}return Y}}const ve=function(){return w.j?ie:W}();function ie(o,n,a,T,N){return new we(o,n,a,T,N)}function W(o,n,a,T,N){return new Le(o,n,a,T,N)}var U=t("cGHE"),se=t("aokT"),je=t("Ll0s"),Re=t("cIqD");class We{constructor(o=null){this.hitTarget=o,this.type=0}}class dt{constructor(o,n,a){this.position=o,this.spanNode=n,this.injectedText=a,this.type=1}}var Lt;(function(o){function n(a,T,N){const Y=a.getPositionFromDOMInfo(T,N);return Y?new dt(Y,T,null):new We(T)}o.createFromDOMInfo=n})(Lt||(Lt={}));class Ht{constructor(o,n){this.lastViewCursorsRenderData=o,this.lastTextareaPosition=n}}class $e{constructor(o,n,a=0,T=null,N=null,Y=null){this.element=o,this.type=n,this.mouseColumn=a,this.position=T,!N&&T&&(N=new se.a(T.lineNumber,T.column,T.lineNumber,T.column)),this.range=N,this.detail=Y}static _typeToString(o){return o===1?"TEXTAREA":o===2?"GUTTER_GLYPH_MARGIN":o===3?"GUTTER_LINE_NUMBERS":o===4?"GUTTER_LINE_DECORATIONS":o===5?"GUTTER_VIEW_ZONE":o===6?"CONTENT_TEXT":o===7?"CONTENT_EMPTY":o===8?"CONTENT_VIEW_ZONE":o===9?"CONTENT_WIDGET":o===10?"OVERVIEW_RULER":o===11?"SCROLLBAR":o===12?"OVERLAY_WIDGET":"UNKNOWN"}static toString(o){return this._typeToString(o.type)+": "+o.position+" - "+o.range+" - "+o.detail}toString(){return $e.toString(this)}}class ot{static isTextArea(o){return o.length===2&&o[0]===3&&o[1]===6}static isChildOfViewLines(o){return o.length>=4&&o[0]===3&&o[3]===7}static isStrictChildOfViewLines(o){return o.length>4&&o[0]===3&&o[3]===7}static isChildOfScrollableElement(o){return o.length>=2&&o[0]===3&&o[1]===5}static isChildOfMinimap(o){return o.length>=2&&o[0]===3&&o[1]===8}static isChildOfContentWidgets(o){return o.length>=4&&o[0]===3&&o[3]===1}static isChildOfOverflowingContentWidgets(o){return o.length>=1&&o[0]===2}static isChildOfOverlayWidgets(o){return o.length>=2&&o[0]===3&&o[1]===4}}class ce{constructor(o,n,a){this.model=o.model;const T=o.configuration.options;this.layoutInfo=T.get(129),this.viewDomNode=n.viewDomNode,this.lineHeight=T.get(58),this.stickyTabStops=T.get(103),this.typicalHalfwidthCharacterWidth=T.get(43).typicalHalfwidthCharacterWidth,this.lastRenderData=a,this._context=o,this._viewHelper=n}getZoneAtCoord(o){return ce.getZoneAtCoord(this._context,o)}static getZoneAtCoord(o,n){const a=o.viewLayout.getWhitespaceAtVerticalOffset(n);if(a){const T=a.verticalOffset+a.height/2,N=o.model.getLineCount();let Y=null,be,xe=null;return a.afterLineNumber!==N&&(xe=new U.a(a.afterLineNumber+1,1)),a.afterLineNumber>0&&(Y=new U.a(a.afterLineNumber,o.model.getLineMaxColumn(a.afterLineNumber))),xe===null?be=Y:Y===null?be=xe:n<T?be=Y:be=xe,{viewZoneId:a.id,afterLineNumber:a.afterLineNumber,positionBefore:Y,positionAfter:xe,position:be}}return null}getFullLineRangeAtCoord(o){if(this._context.viewLayout.isAfterLines(o)){const T=this._context.model.getLineCount(),N=this._context.model.getLineMaxColumn(T);return{range:new se.a(T,N,T,N),isAfterLines:!0}}const n=this._context.viewLayout.getLineNumberAtVerticalOffset(o),a=this._context.model.getLineMaxColumn(n);return{range:new se.a(n,1,n,a),isAfterLines:!1}}getLineNumberAtVerticalOffset(o){return this._context.viewLayout.getLineNumberAtVerticalOffset(o)}isAfterLines(o){return this._context.viewLayout.isAfterLines(o)}isInTopPadding(o){return this._context.viewLayout.isInTopPadding(o)}isInBottomPadding(o){return this._context.viewLayout.isInBottomPadding(o)}getVerticalOffsetForLineNumber(o){return this._context.viewLayout.getVerticalOffsetForLineNumber(o)}findAttribute(o,n){return ce._findAttribute(o,n,this._viewHelper.viewDomNode)}static _findAttribute(o,n,a){for(;o&&o!==document.body;){if(o.hasAttribute&&o.hasAttribute(n))return o.getAttribute(n);if(o===a)return null;o=o.parentNode}return null}getLineWidth(o){return this._viewHelper.getLineWidth(o)}visibleRangeForPosition(o,n){return this._viewHelper.visibleRangeForPosition(o,n)}getPositionFromDOMInfo(o,n){return this._viewHelper.getPositionFromDOMInfo(o,n)}getCurrentScrollTop(){return this._context.viewLayout.getCurrentScrollTop()}getCurrentScrollLeft(){return this._context.viewLayout.getCurrentScrollLeft()}}class Ve{constructor(o,n,a){this.editorPos=n,this.pos=a,this.mouseVerticalOffset=Math.max(0,o.getCurrentScrollTop()+a.y-n.y),this.mouseContentHorizontalOffset=o.getCurrentScrollLeft()+a.x-n.x-o.layoutInfo.contentLeft,this.isInMarginArea=a.x-n.x<o.layoutInfo.contentLeft&&a.x-n.x>=o.layoutInfo.glyphMarginLeft,this.isInContentArea=!this.isInMarginArea,this.mouseColumn=Math.max(0,Rt._getMouseColumn(this.mouseContentHorizontalOffset,o.typicalHalfwidthCharacterWidth))}}class it extends Ve{constructor(o,n,a,T){super(o,n,a);this._ctx=o,T?(this.target=T,this.targetPath=_e.collect(T,o.viewDomNode)):(this.target=null,this.targetPath=new Uint8Array(0))}toString(){return`pos(${this.pos.x},${this.pos.y}), editorPos(${this.editorPos.x},${this.editorPos.y}), mouseVerticalOffset: ${this.mouseVerticalOffset}, mouseContentHorizontalOffset: ${this.mouseContentHorizontalOffset}
|
|
|
target: ${this.target?this.target.outerHTML:null}`}fulfill(o,n=null,a=null,T=null){let N=this.mouseColumn;return n&&n.column<this._ctx.model.getLineMaxColumn(n.lineNumber)&&(N=je.a.visibleColumnFromColumn(this._ctx.model.getLineContent(n.lineNumber),n.column,this._ctx.model.getTextModelOptions().tabSize)+1),new $e(this.target,o,N,n,a,T)}withTarget(o){return new it(this._ctx,this.editorPos,this.pos,o)}}const Et={isAfterLines:!0};function It(o){return{isAfterLines:!1,horizontalDistanceToText:o}}class Rt{constructor(o,n){this._context=o,this._viewHelper=n}mouseTargetIsWidget(o){const n=o.target,a=_e.collect(n,this._viewHelper.viewDomNode);return ot.isChildOfContentWidgets(a)||ot.isChildOfOverflowingContentWidgets(a)?!0:!!ot.isChildOfOverlayWidgets(a)}createMouseTarget(o,n,a,T){const N=new ce(this._context,this._viewHelper,o),Y=new it(N,n,a,T);try{const be=Rt._createMouseTarget(N,Y,!1);return be}catch(be){return Y.fulfill(0)}}static _createMouseTarget(o,n,a){if(n.target===null){if(a)return n.fulfill(0);const Y=Rt._doHitTest(o,n);return Y.type===1?Rt.createMouseTargetFromHitTestPosition(o,n,Y.spanNode,Y.position,Y.injectedText):this._createMouseTarget(o,n.withTarget(Y.hitTarget),!0)}const T=n;let N=null;return N=N||Rt._hitTestContentWidget(o,T),N=N||Rt._hitTestOverlayWidget(o,T),N=N||Rt._hitTestMinimap(o,T),N=N||Rt._hitTestScrollbarSlider(o,T),N=N||Rt._hitTestViewZone(o,T),N=N||Rt._hitTestMargin(o,T),N=N||Rt._hitTestViewCursor(o,T),N=N||Rt._hitTestTextArea(o,T),N=N||Rt._hitTestViewLines(o,T,a),N=N||Rt._hitTestScrollbar(o,T),N||n.fulfill(0)}static _hitTestContentWidget(o,n){if(ot.isChildOfContentWidgets(n.targetPath)||ot.isChildOfOverflowingContentWidgets(n.targetPath)){const a=o.findAttribute(n.target,"widgetId");return a?n.fulfill(9,null,null,a):n.fulfill(0)}return null}static _hitTestOverlayWidget(o,n){if(ot.isChildOfOverlayWidgets(n.targetPath)){const a=o.findAttribute(n.target,"widgetId");return a?n.fulfill(12,null,null,a):n.fulfill(0)}return null}static _hitTestViewCursor(o,n){if(n.target){const a=o.lastRenderData.lastViewCursorsRenderData;for(const T of a)if(n.target===T.domNode)return n.fulfill(6,T.position,null,{mightBeForeignElement:!1})}if(n.isInContentArea){const a=o.lastRenderData.lastViewCursorsRenderData,T=n.mouseContentHorizontalOffset,N=n.mouseVerticalOffset;for(const Y of a){if(T<Y.contentLeft)continue;if(T>Y.contentLeft+Y.width)continue;const be=o.getVerticalOffsetForLineNumber(Y.position.lineNumber);if(be<=N&&N<=be+Y.height)return n.fulfill(6,Y.position,null,{mightBeForeignElement:!1})}}return null}static _hitTestViewZone(o,n){const a=o.getZoneAtCoord(n.mouseVerticalOffset);if(a){const T=n.isInContentArea?8:5;return n.fulfill(T,a.position,null,a)}return null}static _hitTestTextArea(o,n){return ot.isTextArea(n.targetPath)?o.lastRenderData.lastTextareaPosition?n.fulfill(6,o.lastRenderData.lastTextareaPosition,null,{mightBeForeignElement:!1}):n.fulfill(1,o.lastRenderData.lastTextareaPosition):null}static _hitTestMargin(o,n){if(n.isInMarginArea){const a=o.getFullLineRangeAtCoord(n.mouseVerticalOffset),T=a.range.getStartPosition();let N=Math.abs(n.pos.x-n.editorPos.x);const Y={isAfterLines:a.isAfterLines,glyphMarginLeft:o.layoutInfo.glyphMarginLeft,glyphMarginWidth:o.layoutInfo.glyphMarginWidth,lineNumbersWidth:o.layoutInfo.lineNumbersWidth,offsetX:N};return N-=o.layoutInfo.glyphMarginLeft,N<=o.layoutInfo.glyphMarginWidth?n.fulfill(2,T,a.range,Y):(N-=o.layoutInfo.glyphMarginWidth,N<=o.layoutInfo.lineNumbersWidth?n.fulfill(3,T,a.range,Y):(N-=o.layoutInfo.lineNumbersWidth,n.fulfill(4,T,a.range,Y)))}return null}static _hitTestViewLines(o,n,a){if(!ot.isChildOfViewLines(n.targetPath))return null;if(o.isInTopPadding(n.mouseVerticalOffset))return n.fulfill(7,new U.a(1,1),null,Et);if(o.isAfterLines(n.mouseVerticalOffset)||o.isInBottomPadding(n.mouseVerticalOffset)){const N=o.model.getLineCount(),Y=o.model.getLineMaxColumn(N);return n.fulfill(7,new U.a(N,Y),null,Et)}if(a){if(ot.isStrictChildOfViewLines(n.targetPath)){const N=o.getLineNumberAtVerticalOffset(n.mouseVerticalOffset);if(o.model.getLineLength(N)===0){const be=o.getLineWidth(N),xe=It(n.mouseContentHorizontalOffset-be);return n.fulfill(7,new U.a(N,1),null,xe)}const Y=o.getLineWidth(N);if(n.mouseContentHorizontalOffset>=Y){const be=It(n.mouseContentHorizontalOffset-Y),xe=new U.a(N,o.model.getLineMaxColumn(N));return n.fulfill(7,xe,null,be)}}return n.fulfill(0)}const T=Rt._doHitTest(o,n);return T.type===1?Rt.createMouseTargetFromHitTestPosition(o,n,T.spanNode,T.position,T.injectedText):this._createMouseTarget(o,n.withTarget(T.hitTarget),!0)}static _hitTestMinimap(o,n){if(ot.isChildOfMinimap(n.targetPath)){const a=o.getLineNumberAtVerticalOffset(n.mouseVerticalOffset),T=o.model.getLineMaxColumn(a);return n.fulfill(11,new U.a(a,T))}return null}static _hitTestScrollbarSlider(o,n){if(ot.isChildOfScrollableElement(n.targetPath)&&(n.target&&n.target.nodeType===1)){const a=n.target.className;if(a&&/\b(slider|scrollbar)\b/.test(a)){const T=o.getLineNumberAtVerticalOffset(n.mouseVerticalOffset),N=o.model.getLineMaxColumn(T);return n.fulfill(11,new U.a(T,N))}}return null}static _hitTestScrollbar(o,n){if(ot.isChildOfScrollableElement(n.targetPath)){const a=o.getLineNumberAtVerticalOffset(n.mouseVerticalOffset),T=o.model.getLineMaxColumn(a);return n.fulfill(11,new U.a(a,T))}return null}getMouseColumn(o,n){const a=this._context.configuration.options,T=a.get(129),N=this._context.viewLayout.getCurrentScrollLeft()+n.x-o.x-T.contentLeft;return Rt._getMouseColumn(N,a.get(43).typicalHalfwidthCharacterWidth)}static _getMouseColumn(o,n){if(o<0)return 1;const a=Math.round(o/n);return a+1}static createMouseTargetFromHitTestPosition(o,n,a,T,N){const Y=T.lineNumber,be=T.column,xe=o.getLineWidth(Y);if(n.mouseContentHorizontalOffset>xe){const eo=It(n.mouseContentHorizontalOffset-xe);return n.fulfill(7,T,null,eo)}const Ke=o.visibleRangeForPosition(Y,be);if(!Ke)return n.fulfill(0,T);const Ze=Ke.left;if(n.mouseContentHorizontalOffset===Ze)return n.fulfill(6,T,null,{mightBeForeignElement:!!N});const nt=[];if(nt.push({offset:Ke.left,column:be}),be>1){const eo=o.visibleRangeForPosition(Y,be-1);eo&&nt.push({offset:eo.left,column:be-1})}const Ot=o.model.getLineMaxColumn(Y);if(be<Ot){const eo=o.visibleRangeForPosition(Y,be+1);eo&&nt.push({offset:eo.left,column:be+1})}nt.sort((eo,co)=>eo.offset-co.offset);const ft=n.pos.toClientCoordinates(),kt=a.getBoundingClientRect(),Gt=kt.left<=ft.clientX&&ft.clientX<=kt.right;for(let eo=1;eo<nt.length;eo++){const co=nt[eo-1],go=nt[eo];if(co.offset<=n.mouseContentHorizontalOffset&&n.mouseContentHorizontalOffset<=go.offset){const yo=new se.a(Y,co.column,Y,go.column);return n.fulfill(6,T,yo,{mightBeForeignElement:!Gt||!!N})}}return n.fulfill(6,T,null,{mightBeForeignElement:!Gt||!!N})}static _doHitTestWithCaretRangeFromPoint(o,n){const a=o.getLineNumberAtVerticalOffset(n.mouseVerticalOffset),T=o.getVerticalOffsetForLineNumber(a),N=T+Math.floor(o.lineHeight/2);let Y=n.pos.y+(N-n.mouseVerticalOffset);Y<=n.editorPos.y&&(Y=n.editorPos.y+1),Y>=n.editorPos.y+o.layoutInfo.height&&(Y=n.editorPos.y+o.layoutInfo.height-1);const be=new O(n.pos.x,Y),xe=this._actualDoHitTestWithCaretRangeFromPoint(o,be.toClientCoordinates());return xe.type===1?xe:this._actualDoHitTestWithCaretRangeFromPoint(o,n.pos.toClientCoordinates())}static _actualDoHitTestWithCaretRangeFromPoint(o,n){const a=v.F(o.viewDomNode);let T;if(a?typeof a.caretRangeFromPoint=="undefined"?T=vo(a,n.clientX,n.clientY):T=a.caretRangeFromPoint(n.clientX,n.clientY):T=document.caretRangeFromPoint(n.clientX,n.clientY),!T||!T.startContainer)return new We;const N=T.startContainer;if(N.nodeType===N.TEXT_NODE){const Y=N.parentNode,be=Y?Y.parentNode:null,xe=be?be.parentNode:null,Ke=xe&&xe.nodeType===xe.ELEMENT_NODE?xe.className:null;return Ke===me.CLASS_NAME?Lt.createFromDOMInfo(o,Y,T.startOffset):new We(N.parentNode)}else if(N.nodeType===N.ELEMENT_NODE){const Y=N.parentNode,be=Y?Y.parentNode:null,xe=be&&be.nodeType===be.ELEMENT_NODE?be.className:null;return xe===me.CLASS_NAME?Lt.createFromDOMInfo(o,N,N.textContent.length):new We(N)}return new We}static _doHitTestWithCaretPositionFromPoint(o,n){const a=document.caretPositionFromPoint(n.clientX,n.clientY);if(a.offsetNode.nodeType===a.offsetNode.TEXT_NODE){const T=a.offsetNode.parentNode,N=T?T.parentNode:null,Y=N?N.parentNode:null,be=Y&&Y.nodeType===Y.ELEMENT_NODE?Y.className:null;return be===me.CLASS_NAME?Lt.createFromDOMInfo(o,a.offsetNode.parentNode,a.offset):new We(a.offsetNode.parentNode)}if(a.offsetNode.nodeType===a.offsetNode.ELEMENT_NODE){const T=a.offsetNode.parentNode,N=T&&T.nodeType===T.ELEMENT_NODE?T.className:null,Y=T?T.parentNode:null,be=Y&&Y.nodeType===Y.ELEMENT_NODE?Y.className:null;if(N===me.CLASS_NAME){const xe=a.offsetNode.childNodes[Math.min(a.offset,a.offsetNode.childNodes.length-1)];if(xe)return Lt.createFromDOMInfo(o,xe,0)}else if(be===me.CLASS_NAME)return Lt.createFromDOMInfo(o,a.offsetNode,0)}return new We(a.offsetNode)}static _snapToSoftTabBoundary(o,n){const a=n.getLineContent(o.lineNumber),{tabSize:T}=n.getTextModelOptions(),N=Re.a.atomicPosition(a,o.column-1,T,2);return N!==-1?new U.a(o.lineNumber,N+1):o}static _doHitTest(o,n){let a=new We;if(typeof document.caretRangeFromPoint=="function"?a=this._doHitTestWithCaretRangeFromPoint(o,n):document.caretPositionFromPoint&&(a=this._doHitTestWithCaretPositionFromPoint(o,n.pos.toClientCoordinates())),a.type===1){const T=o.model.getInjectedTextAt(a.position),N=o.model.normalizePosition(a.position,2);(T||!N.equals(a.position))&&(a=new dt(N,a.spanNode,T))}return a.type===1&&o.stickyTabStops&&(a=new dt(this._snapToSoftTabBoundary(a.position,o.model),a.spanNode,a.injectedText)),a}}function vo(o,n,a){const T=document.createRange();let N=o.elementFromPoint(n,a);if(N!==null){for(;N&&N.firstChild&&N.firstChild.nodeType!==N.firstChild.TEXT_NODE&&N.lastChild&&N.lastChild.firstChild;)N=N.lastChild;const Y=N.getBoundingClientRect(),be=window.getComputedStyle(N,null).getPropertyValue("font"),xe=N.innerText;let Ke=Y.left,Ze=0,nt;if(n>Y.left+Y.width)Ze=xe.length;else{const Ot=Mo.getInstance();for(let ft=0;ft<xe.length+1;ft++){if(nt=Ot.getCharWidth(xe.charAt(ft),be)/2,Ke+=nt,n<Ke){Ze=ft;break}Ke+=nt}}T.setStart(N.firstChild,Ze),T.setEnd(N.firstChild,Ze)}return T}class Mo{constructor(){this._cache={},this._canvas=document.createElement("canvas")}static getInstance(){return Mo._INSTANCE||(Mo._INSTANCE=new Mo),Mo._INSTANCE}getCharWidth(o,n){const a=o+n;if(this._cache[a])return this._cache[a];const T=this._canvas.getContext("2d");T.font=n;const N=T.measureText(o),Y=N.width;return this._cache[a]=Y,Y}}Mo._INSTANCE=null;var xo=t("Yr1X");function Do(o){return function(n,a){let T=!1;return o&&(T=o.mouseTargetIsWidget(a)),T||a.preventDefault(),a}}class Lo extends ne{constructor(o,n,a){super();this._context=o,this.viewController=n,this.viewHelper=a,this.mouseTargetFactory=new Rt(this._context,a),this._mouseDownOperation=this._register(new To(this._context,this.viewController,this.viewHelper,(Y,be)=>this._createMouseTarget(Y,be),Y=>this._getMouseColumn(Y))),this.lastMouseLeaveTime=-1,this._height=this._context.configuration.options.get(129).height;const T=new J(this.viewHelper.viewDomNode);this._register(T.onContextMenu(this.viewHelper.viewDomNode,Y=>this._onContextMenu(Y,!0))),this._register(T.onMouseMoveThrottled(this.viewHelper.viewDomNode,Y=>this._onMouseMove(Y),Do(this.mouseTargetFactory),Lo.MOUSE_MOVE_MINIMUM_TIME)),this._register(T.onMouseUp(this.viewHelper.viewDomNode,Y=>this._onMouseUp(Y))),this._register(T.onMouseLeave(this.viewHelper.viewDomNode,Y=>this._onMouseLeave(Y))),this._register(T.onMouseDown(this.viewHelper.viewDomNode,Y=>this._onMouseDown(Y)));const N=Y=>{if(this.viewController.emitMouseWheel(Y),!this._context.configuration.options.get(67))return;const be=new S.b(Y),xe=c.f?(Y.metaKey||Y.ctrlKey)&&!Y.shiftKey&&!Y.altKey:Y.ctrlKey&&!Y.metaKey&&!Y.shiftKey&&!Y.altKey;if(xe){const Ke=xo.a.getZoomLevel(),Ze=be.deltaY>0?1:-1;xo.a.setZoomLevel(Ke+Ze),be.preventDefault(),be.stopPropagation()}};this._register(v.i(this.viewHelper.viewDomNode,v.d.MOUSE_WHEEL,N,{capture:!0,passive:!1})),this._context.addEventHandler(this)}dispose(){this._context.removeEventHandler(this),super.dispose()}onConfigurationChanged(o){if(o.hasChanged(129)){const n=this._context.configuration.options.get(129).height;this._height!==n&&(this._height=n,this._mouseDownOperation.onHeightChanged())}return!1}onCursorStateChanged(o){return this._mouseDownOperation.onCursorStateChanged(o),!1}onFocusChanged(o){return!1}onScrollChanged(o){return this._mouseDownOperation.onScrollChanged(),!1}getTargetAtClientPoint(o,n){const a=new k(o,n),T=a.toPageCoordinates(),N=q(this.viewHelper.viewDomNode);return T.y<N.y||T.y>N.y+N.height||T.x<N.x||T.x>N.x+N.width?null:this.mouseTargetFactory.createMouseTarget(this.viewHelper.getLastRenderData(),N,T,null)}_createMouseTarget(o,n){let a=o.target;if(!this.viewHelper.viewDomNode.contains(a)){const T=v.F(this.viewHelper.viewDomNode);T&&(a=T.elementsFromPoint(o.posx,o.posy).find(N=>this.viewHelper.viewDomNode.contains(N)))}return this.mouseTargetFactory.createMouseTarget(this.viewHelper.getLastRenderData(),o.editorPos,o.pos,n?a:null)}_getMouseColumn(o){return this.mouseTargetFactory.getMouseColumn(o.editorPos,o.pos)}_onContextMenu(o,n){this.viewController.emitContextMenu({event:o,target:this._createMouseTarget(o,n)})}_onMouseMove(o){if(this._mouseDownOperation.isActive())return;const n=o.timestamp;if(n<this.lastMouseLeaveTime)return;this.viewController.emitMouseMove({event:o,target:this._createMouseTarget(o,!0)})}_onMouseLeave(o){this.lastMouseLeaveTime=new Date().getTime(),this.viewController.emitMouseLeave({event:o,target:null})}_onMouseUp(o){this.viewController.emitMouseUp({event:o,target:this._createMouseTarget(o,!0)})}_onMouseDown(o){const n=this._createMouseTarget(o,!0),a=n.type===6||n.type===7,T=n.type===2||n.type===3||n.type===4,N=n.type===3,Y=this._context.configuration.options.get(97),be=n.type===8||n.type===5,xe=n.type===9;let Ke=o.leftButton||o.middleButton;c.f&&o.leftButton&&o.ctrlKey&&(Ke=!1);const Ze=()=>{o.preventDefault(),this.viewHelper.focusTextArea()};if(Ke&&(a||N&&Y))Ze(),this._mouseDownOperation.start(n.type,o);else if(T)o.preventDefault();else if(be){const nt=n.detail;this.viewHelper.shouldSuppressMouseDownOnViewZone(nt.viewZoneId)&&(Ze(),this._mouseDownOperation.start(n.type,o),o.preventDefault())}else xe&&this.viewHelper.shouldSuppressMouseDownOnWidget(n.detail)&&(Ze(),o.preventDefault());this.viewController.emitMouseDown({event:o,target:n})}}Lo.MOUSE_MOVE_MINIMUM_TIME=100;class To extends d.a{constructor(o,n,a,T,N){super();this._context=o,this._viewController=n,this._viewHelper=a,this._createMouseTarget=T,this._getMouseColumn=N,this._mouseMoveMonitor=this._register(new Z(this._viewHelper.viewDomNode)),this._onScrollTimeout=this._register(new E.g),this._mouseState=new Vt,this._currentSelection=new b.a(1,1,1,1),this._isActive=!1,this._lastMouseEvent=null}dispose(){super.dispose()}isActive(){return this._isActive}_onMouseDownThenMove(o){this._lastMouseEvent=o,this._mouseState.setModifiers(o);const n=this._findMousePosition(o,!0);if(!n)return;this._mouseState.isDragAndDrop?this._viewController.emitMouseDrag({event:o,target:n}):this._dispatchMouse(n,!0)}start(o,n){this._lastMouseEvent=n,this._mouseState.setStartedOnLineNumbers(o===3),this._mouseState.setStartButtons(n),this._mouseState.setModifiers(n);const a=this._findMousePosition(n,!0);if(!a||!a.position)return;this._mouseState.trySetCount(n.detail,a.position),n.detail=this._mouseState.count;const T=this._context.configuration.options;if(!T.get(80)&&T.get(31)&&!T.get(18)&&!this._mouseState.altKey&&n.detail<2&&!this._isActive&&!this._currentSelection.isEmpty()&&a.type===6&&a.position&&this._currentSelection.containsPosition(a.position)){this._mouseState.isDragAndDrop=!0,this._isActive=!0,this._mouseMoveMonitor.startMonitoring(n.target,n.buttons,Do(null),N=>this._onMouseDownThenMove(N),N=>{const Y=this._findMousePosition(this._lastMouseEvent,!0);N&&N instanceof KeyboardEvent?this._viewController.emitMouseDropCanceled():this._viewController.emitMouseDrop({event:this._lastMouseEvent,target:Y?this._createMouseTarget(this._lastMouseEvent,!0):null}),this._stop()});return}this._mouseState.isDragAndDrop=!1,this._dispatchMouse(a,n.shiftKey),this._isActive||(this._isActive=!0,this._mouseMoveMonitor.startMonitoring(n.target,n.buttons,Do(null),N=>this._onMouseDownThenMove(N),()=>this._stop()))}_stop(){this._isActive=!1,this._onScrollTimeout.cancel()}onHeightChanged(){this._mouseMoveMonitor.stopMonitoring()}onScrollChanged(){if(!this._isActive)return;this._onScrollTimeout.setIfNotSet(()=>{if(!this._lastMouseEvent)return;const o=this._findMousePosition(this._lastMouseEvent,!1);if(!o)return;if(this._mouseState.isDragAndDrop)return;this._dispatchMouse(o,!0)},10)}onCursorStateChanged(o){this._currentSelection=o.selections[0]}_getPositionOutsideEditor(o){const n=o.editorPos,a=this._context.model,T=this._context.viewLayout,N=this._getMouseColumn(o);if(o.posy<n.y){const be=Math.max(T.getCurrentScrollTop()-(n.y-o.posy),0),xe=ce.getZoneAtCoord(this._context,be);if(xe){const Ze=this._helpPositionJumpOverViewZone(xe);if(Ze)return new $e(null,13,N,Ze)}const Ke=T.getLineNumberAtVerticalOffset(be);return new $e(null,13,N,new U.a(Ke,1))}if(o.posy>n.y+n.height){const be=T.getCurrentScrollTop()+(o.posy-n.y),xe=ce.getZoneAtCoord(this._context,be);if(xe){const Ze=this._helpPositionJumpOverViewZone(xe);if(Ze)return new $e(null,13,N,Ze)}const Ke=T.getLineNumberAtVerticalOffset(be);return new $e(null,13,N,new U.a(Ke,a.getLineMaxColumn(Ke)))}const Y=T.getLineNumberAtVerticalOffset(T.getCurrentScrollTop()+(o.posy-n.y));return o.posx<n.x?new $e(null,13,N,new U.a(Y,1)):o.posx>n.x+n.width?new $e(null,13,N,new U.a(Y,a.getLineMaxColumn(Y))):null}_findMousePosition(o,n){const a=this._getPositionOutsideEditor(o);if(a)return a;const T=this._createMouseTarget(o,n),N=T.position;if(!N)return null;if(T.type===8||T.type===5){const Y=this._helpPositionJumpOverViewZone(T.detail);if(Y)return new $e(T.element,T.type,T.mouseColumn,Y,null,T.detail)}return T}_helpPositionJumpOverViewZone(o){const n=new U.a(this._currentSelection.selectionStartLineNumber,this._currentSelection.selectionStartColumn),a=o.positionBefore,T=o.positionAfter;return a&&T?a.isBefore(n)?a:T:null}_dispatchMouse(o,n){if(!o.position)return;this._viewController.dispatchMouse({position:o.position,mouseColumn:o.mouseColumn,startedOnLineNumbers:this._mouseState.startedOnLineNumbers,inSelectionMode:n,mouseDownCount:this._mouseState.count,altKey:this._mouseState.altKey,ctrlKey:this._mouseState.ctrlKey,metaKey:this._mouseState.metaKey,shiftKey:this._mouseState.shiftKey,leftButton:this._mouseState.leftButton,middleButton:this._mouseState.middleButton})}}class Vt{constructor(){this._altKey=!1,this._ctrlKey=!1,this._metaKey=!1,this._shiftKey=!1,this._leftButton=!1,this._middleButton=!1,this._startedOnLineNumbers=!1,this._lastMouseDownPosition=null,this._lastMouseDownPositionEqualCount=0,this._lastMouseDownCount=0,this._lastSetMouseDownCountTime=0,this.isDragAndDrop=!1}get altKey(){return this._altKey}get ctrlKey(){return this._ctrlKey}get metaKey(){return this._metaKey}get shiftKey(){return this._shiftKey}get leftButton(){return this._leftButton}get middleButton(){return this._middleButton}get startedOnLineNumbers(){return this._startedOnLineNumbers}get count(){return this._lastMouseDownCount}setModifiers(o){this._altKey=o.altKey,this._ctrlKey=o.ctrlKey,this._metaKey=o.metaKey,this._shiftKey=o.shiftKey}setStartButtons(o){this._leftButton=o.leftButton,this._middleButton=o.middleButton}setStartedOnLineNumbers(o){this._startedOnLineNumbers=o}trySetCount(o,n){const a=new Date().getTime();a-this._lastSetMouseDownCountTime>Vt.CLEAR_MOUSE_DOWN_COUNT_TIME&&(o=1),this._lastSetMouseDownCountTime=a,o>this._lastMouseDownCount+1&&(o=this._lastMouseDownCount+1),this._lastMouseDownPosition&&this._lastMouseDownPosition.equals(n)?this._lastMouseDownPositionEqualCount++:this._lastMouseDownPositionEqualCount=1,this._lastMouseDownPosition=n,this._lastMouseDownCount=Math.min(o,this._lastMouseDownPositionEqualCount)}}Vt.CLEAR_MOUSE_DOWN_COUNT_TIME=400;var xt=t("CjF5"),ze=t("5TxY");class ct extends Lo{constructor(o,n,a){super(o,n,a);this._register(p.b.addTarget(this.viewHelper.linesContentDomNode)),this._register(v.i(this.viewHelper.linesContentDomNode,p.a.Tap,N=>this.onTap(N))),this._register(v.i(this.viewHelper.linesContentDomNode,p.a.Change,N=>this.onChange(N))),this._register(v.i(this.viewHelper.linesContentDomNode,p.a.Contextmenu,N=>this._onContextMenu(new z(N,this.viewHelper.viewDomNode),!1))),this._lastPointerType="mouse",this._register(v.i(this.viewHelper.linesContentDomNode,"pointerdown",N=>{const Y=N.pointerType;if(Y==="mouse"){this._lastPointerType="mouse";return}else Y==="touch"?this._lastPointerType="touch":this._lastPointerType="pen"}));const T=new re(this.viewHelper.viewDomNode);this._register(T.onPointerMoveThrottled(this.viewHelper.viewDomNode,N=>this._onMouseMove(N),Do(this.mouseTargetFactory),Lo.MOUSE_MOVE_MINIMUM_TIME)),this._register(T.onPointerUp(this.viewHelper.viewDomNode,N=>this._onMouseUp(N))),this._register(T.onPointerLeave(this.viewHelper.viewDomNode,N=>this._onMouseLeave(N))),this._register(T.onPointerDown(this.viewHelper.viewDomNode,N=>this._onMouseDown(N)))}onTap(o){if(!o.initialTarget||!this.viewHelper.linesContentDomNode.contains(o.initialTarget))return;o.preventDefault(),this.viewHelper.focusTextArea();const n=this._createMouseTarget(new z(o,this.viewHelper.viewDomNode),!1);n.position&&this.viewController.dispatchMouse({position:n.position,mouseColumn:n.position.column,startedOnLineNumbers:!1,mouseDownCount:o.tapCount,inSelectionMode:!1,altKey:!1,ctrlKey:!1,metaKey:!1,shiftKey:!1,leftButton:!1,middleButton:!1})}onChange(o){this._lastPointerType==="touch"&&this._context.model.deltaScrollNow(-o.translationX,-o.translationY)}_onMouseDown(o){if(o.browserEvent.pointerType==="touch")return;super._onMouseDown(o)}}class Ut extends Lo{constructor(o,n,a){super(o,n,a);this._register(p.b.addTarget(this.viewHelper.linesContentDomNode)),this._register(v.i(this.viewHelper.linesContentDomNode,p.a.Tap,T=>this.onTap(T))),this._register(v.i(this.viewHelper.linesContentDomNode,p.a.Change,T=>this.onChange(T))),this._register(v.i(this.viewHelper.linesContentDomNode,p.a.Contextmenu,T=>this._onContextMenu(new z(T,this.viewHelper.viewDomNode),!1)))}onTap(o){o.preventDefault(),this.viewHelper.focusTextArea();const n=this._createMouseTarget(new z(o,this.viewHelper.viewDomNode),!1);if(n.position){const a=document.createEvent("CustomEvent");a.initEvent(ze.d.Tap,!1,!0),this.viewHelper.dispatchTextAreaEvent(a),this.viewController.moveTo(n.position)}}onChange(o){this._context.model.deltaScrollNow(-o.translationX,-o.translationY)}}class Qe extends d.a{constructor(o,n,a){super();c.c&&xt.a.pointerEvents?this.handler=this._register(new ct(o,n,a)):window.TouchEvent?this.handler=this._register(new Ut(o,n,a)):this.handler=this._register(new Lo(o,n,a))}getTargetAtClientPoint(o,n){return this.handler.getTargetAtClientPoint(o,n)}}var tt=t("VvMK"),ut=t("N0LK"),Dt=t("Comh"),Pt=t("Krc3");class Wt extends ne{}var zt=t("kYye"),so=t("t9D7");class wo extends Wt{constructor(o){super();this._context=o,this._readConfig(),this._lastCursorModelPosition=new U.a(1,1),this._renderResult=null,this._activeLineNumber=1,this._context.addEventHandler(this)}_readConfig(){const o=this._context.configuration.options;this._lineHeight=o.get(58);const n=o.get(59);this._renderLineNumbers=n.renderType,this._renderCustomLineNumbers=n.renderFn,this._renderFinalNewline=o.get(83);const a=o.get(129);this._lineNumbersLeft=a.lineNumbersLeft,this._lineNumbersWidth=a.lineNumbersWidth}dispose(){this._context.removeEventHandler(this),this._renderResult=null,super.dispose()}onConfigurationChanged(o){return this._readConfig(),!0}onCursorStateChanged(o){const n=o.selections[0].getPosition();this._lastCursorModelPosition=this._context.model.coordinatesConverter.convertViewPositionToModelPosition(n);let a=!1;return this._activeLineNumber!==n.lineNumber&&(this._activeLineNumber=n.lineNumber,a=!0),(this._renderLineNumbers===2||this._renderLineNumbers===3)&&(a=!0),a}onFlushed(o){return!0}onLinesChanged(o){return!0}onLinesDeleted(o){return!0}onLinesInserted(o){return!0}onScrollChanged(o){return o.scrollTopChanged}onZonesChanged(o){return!0}_getLineRenderLineNumber(o){const n=this._context.model.coordinatesConverter.convertViewPositionToModelPosition(new U.a(o,1));if(n.column!==1)return"";const a=n.lineNumber;if(this._renderCustomLineNumbers)return this._renderCustomLineNumbers(a);if(this._renderLineNumbers===2){const T=Math.abs(this._lastCursorModelPosition.lineNumber-a);return T===0?'<span class="relative-current-line-number">'+a+"</span>":String(T)}return this._renderLineNumbers===3?this._lastCursorModelPosition.lineNumber===a||a%10===0?String(a):"":String(a)}prepareRender(o){if(this._renderLineNumbers===0){this._renderResult=null;return}const n=c.d?this._lineHeight%2===0?" lh-even":" lh-odd":"",a=o.visibleRange.startLineNumber,T=o.visibleRange.endLineNumber,N='<div class="'+wo.CLASS_NAME+n+'" style="left:'+this._lineNumbersLeft+"px;width:"+this._lineNumbersWidth+'px;">',Y=this._context.model.getLineCount(),be=[];for(let xe=a;xe<=T;xe++){const Ke=xe-a;if(!this._renderFinalNewline&&(xe===Y&&this._context.model.getLineLength(xe)===0)){be[Ke]="";continue}const Ze=this._getLineRenderLineNumber(xe);Ze?xe===this._activeLineNumber?be[Ke]='<div class="active-line-number '+wo.CLASS_NAME+n+'" style="left:'+this._lineNumbersLeft+"px;width:"+this._lineNumbersWidth+'px;">'+Ze+"</div>":be[Ke]=N+Ze+"</div>":be[Ke]=""}this._renderResult=be}render(o,n){if(!this._renderResult)return"";const a=n-o;return a<0||a>=this._renderResult.length?"":this._renderResult[a]}}wo.CLASS_NAME="line-numbers",Object(so.f)((o,n)=>{const a=o.getColor(zt.D);a&&n.addRule(`.monaco-editor .line-numbers { color: ${a}; }`);const T=o.getColor(zt.b);T&&n.addRule(`.monaco-editor .line-numbers.active-line-number { color: ${T}; }`)});class No extends le{constructor(o){super(o);const n=this._context.configuration.options,a=n.get(129);this._canUseLayerHinting=!n.get(28),this._contentLeft=a.contentLeft,this._glyphMarginLeft=a.glyphMarginLeft,this._glyphMarginWidth=a.glyphMarginWidth,this._domNode=Object(u.b)(document.createElement("div")),this._domNode.setClassName(No.OUTER_CLASS_NAME),this._domNode.setPosition("absolute"),this._domNode.setAttribute("role","presentation"),this._domNode.setAttribute("aria-hidden","true"),this._glyphMarginBackgroundDomNode=Object(u.b)(document.createElement("div")),this._glyphMarginBackgroundDomNode.setClassName(No.CLASS_NAME),this._domNode.appendChild(this._glyphMarginBackgroundDomNode)}dispose(){super.dispose()}getDomNode(){return this._domNode}onConfigurationChanged(o){const n=this._context.configuration.options,a=n.get(129);return this._canUseLayerHinting=!n.get(28),this._contentLeft=a.contentLeft,this._glyphMarginLeft=a.glyphMarginLeft,this._glyphMarginWidth=a.glyphMarginWidth,!0}onScrollChanged(o){return super.onScrollChanged(o)||o.scrollTopChanged}prepareRender(o){}render(o){this._domNode.setLayerHinting(this._canUseLayerHinting),this._domNode.setContain("strict");const n=o.scrollTop-o.bigNumbersDelta;this._domNode.setTop(-n);const a=Math.min(o.scrollHeight,1e6);this._domNode.setHeight(a),this._domNode.setWidth(this._contentLeft),this._glyphMarginBackgroundDomNode.setLeft(this._glyphMarginLeft),this._glyphMarginBackgroundDomNode.setWidth(this._glyphMarginWidth),this._glyphMarginBackgroundDomNode.setHeight(a)}}No.CLASS_NAME="glyph-margin",No.OUTER_CLASS_NAME="margin";var di=t("5v8Y"),_o=t("51su");class no{constructor(o,n,a){this._visibleTextAreaBrand=void 0,this.top=o,this.left=n,this.width=a}setWidth(o){return new no(this.top,this.left,o)}}const _t=w.g;class Tt extends le{constructor(o,n,a){super(o);this._primaryCursorPosition=new U.a(1,1),this._primaryCursorVisibleRange=null,this._viewController=n,this._viewHelper=a,this._scrollLeft=0,this._scrollTop=0;const T=this._context.configuration.options,N=T.get(129);this._setAccessibilityOptions(T),this._contentLeft=N.contentLeft,this._contentWidth=N.contentWidth,this._contentHeight=N.height,this._fontInfo=T.get(43),this._lineHeight=T.get(58),this._emptySelectionClipboard=T.get(32),this._copyWithSyntaxHighlighting=T.get(21),this._visibleTextArea=null,this._selections=[new b.a(1,1,1,1)],this._modelSelections=[new b.a(1,1,1,1)],this._lastRenderPosition=null,this.textArea=Object(u.b)(document.createElement("textarea")),_e.write(this.textArea,6),this.textArea.setClassName(`inputarea ${_o.a}`),this.textArea.setAttribute("wrap","off"),this.textArea.setAttribute("autocorrect","off"),this.textArea.setAttribute("autocapitalize","off"),this.textArea.setAttribute("autocomplete","off"),this.textArea.setAttribute("spellcheck","false"),this.textArea.setAttribute("aria-label",this._getAriaLabel(T)),this.textArea.setAttribute("tabindex",String(T.get(111))),this.textArea.setAttribute("role","textbox"),this.textArea.setAttribute("aria-roledescription",I.a("editor","editor")),this.textArea.setAttribute("aria-multiline","true"),this.textArea.setAttribute("aria-haspopup","false"),this.textArea.setAttribute("aria-autocomplete","both"),T.get(30)&&T.get(80)&&this.textArea.setAttribute("readonly","true"),this.textAreaCover=Object(u.b)(document.createElement("div")),this.textAreaCover.setPosition("absolute");const Y={getLineCount:()=>this._context.model.getLineCount(),getLineMaxColumn:xe=>this._context.model.getLineMaxColumn(xe),getValueInRange:(xe,Ke)=>this._context.model.getValueInRange(xe,Ke)},be={getDataToCopy:xe=>{const Ke=this._context.model.getPlainTextToCopy(this._modelSelections,this._emptySelectionClipboard,c.i),Ze=this._context.model.getEOL(),nt=this._emptySelectionClipboard&&this._modelSelections.length===1&&this._modelSelections[0].isEmpty(),Ot=Array.isArray(Ke)?Ke:null,ft=Array.isArray(Ke)?Ke.join(Ze):Ke;let kt,Gt=null;if(xe&&(ze.a.forceCopyWithSyntaxHighlighting||this._copyWithSyntaxHighlighting&&ft.length<65536)){const eo=this._context.model.getRichTextToCopy(this._modelSelections,this._emptySelectionClipboard);eo&&(kt=eo.html,Gt=eo.mode)}return{isFromEmptySelection:nt,multicursorText:Ot,text:ft,html:kt,mode:Gt}},getScreenReaderContent:xe=>{if(this._accessibilitySupport===1){if(c.f){const Ke=this._selections[0];if(Ke.isEmpty()){const Ze=Ke.getStartPosition();let nt=this._getWordBeforePosition(Ze);if(nt.length===0&&(nt=this._getCharacterBeforePosition(Ze)),nt.length>0)return new Dt.b(nt,nt.length,nt.length,Ze,Ze)}}return Dt.b.EMPTY}if(w.e){const Ke=this._selections[0];if(Ke.isEmpty()){const Ze=Ke.getStartPosition(),[nt,Ot]=this._getAndroidWordAtPosition(Ze);if(nt.length>0)return new Dt.b(nt,Ot,Ot,Ze,Ze)}return Dt.b.EMPTY}return Dt.a.fromEditorSelection(xe,Y,this._selections[0],this._accessibilityPageSize,this._accessibilitySupport===0)},deduceModelPosition:(xe,Ke,Ze)=>this._context.model.deduceModelPositionRelativeToViewPosition(xe,Ke,Ze)};this._textAreaInput=this._register(new ze.c(be,this.textArea)),this._register(this._textAreaInput.onKeyDown(xe=>{this._viewController.emitKeyDown(xe)})),this._register(this._textAreaInput.onKeyUp(xe=>{this._viewController.emitKeyUp(xe)})),this._register(this._textAreaInput.onPaste(xe=>{let Ke=!1,Ze=null,nt=null;xe.metadata&&(Ke=this._emptySelectionClipboard&&!!xe.metadata.isFromEmptySelection,Ze=typeof xe.metadata.multicursorText!="undefined"?xe.metadata.multicursorText:null,nt=xe.metadata.mode),this._viewController.paste(xe.text,Ke,Ze,nt)})),this._register(this._textAreaInput.onCut(()=>{this._viewController.cut()})),this._register(this._textAreaInput.onType(xe=>{xe.replacePrevCharCnt||xe.replaceNextCharCnt||xe.positionDelta?(Dt.c&&console.log(` => compositionType: <<${xe.text}>>, ${xe.replacePrevCharCnt}, ${xe.replaceNextCharCnt}, ${xe.positionDelta}`),this._viewController.compositionType(xe.text,xe.replacePrevCharCnt,xe.replaceNextCharCnt,xe.positionDelta)):(Dt.c&&console.log(` => type: <<${xe.text}>>`),this._viewController.type(xe.text))})),this._register(this._textAreaInput.onSelectionChangeRequest(xe=>{this._viewController.setSelection(xe)})),this._register(this._textAreaInput.onCompositionStart(xe=>{const Ke=this._selections[0].startLineNumber,Ze=this._selections[0].startColumn+xe.revealDeltaColumns;this._context.model.revealRange("keyboard",!0,new se.a(Ke,Ze,Ke,Ze),0,1);const nt=this._viewHelper.visibleRangeForPositionRelativeToEditor(Ke,Ze);nt&&(this._visibleTextArea=new no(this._context.viewLayout.getVerticalOffsetForLineNumber(Ke),nt.left,_t?0:1),this._render()),this.textArea.setClassName(`inputarea ${_o.a} ime-input`),this._viewController.compositionStart(),this._context.model.onCompositionStart()})),this._register(this._textAreaInput.onCompositionUpdate(xe=>{if(!this._visibleTextArea)return;this._visibleTextArea=this._visibleTextArea.setWidth(Nt(xe.data,this._fontInfo)),this._render()})),this._register(this._textAreaInput.onCompositionEnd(()=>{this._visibleTextArea=null,this._render(),this.textArea.setClassName(`inputarea ${_o.a}`),this._viewController.compositionEnd(),this._context.model.onCompositionEnd()})),this._register(this._textAreaInput.onFocus(()=>{this._context.model.setHasFocus(!0)})),this._register(this._textAreaInput.onBlur(()=>{this._context.model.setHasFocus(!1)}))}dispose(){super.dispose()}_getAndroidWordAtPosition(o){const n='`~!@#$%^&*()-=+[{]}\\|;:",.<>/?',a=this._context.model.getLineContent(o.lineNumber),T=Object(di.a)(n);let N=!0,Y=o.column,be=!0,xe=o.column,Ke=0;for(;Ke<50&&(N||be);){if(N&&Y<=1&&(N=!1),N){const Ze=a.charCodeAt(Y-2),nt=T.get(Ze);nt!==0?N=!1:Y--}if(be&&xe>a.length&&(be=!1),be){const Ze=a.charCodeAt(xe-1),nt=T.get(Ze);nt!==0?be=!1:xe++}Ke++}return[a.substring(Y-1,xe-1),o.column-Y]}_getWordBeforePosition(o){const n=this._context.model.getLineContent(o.lineNumber),a=Object(di.a)(this._context.configuration.options.get(115));let T=o.column,N=0;for(;T>1;){const Y=n.charCodeAt(T-2),be=a.get(Y);if(be!==0||N>50)return n.substring(T-1,o.column-1);N++,T--}return n.substring(0,o.column-1)}_getCharacterBeforePosition(o){if(o.column>1){const n=this._context.model.getLineContent(o.lineNumber),a=n.charAt(o.column-2);if(!ut.E(a.charCodeAt(0)))return a}return""}_getAriaLabel(o){const n=o.get(2);return n===1?I.a("accessibilityOffAriaLabel","The editor is not accessible at this time. Press {0} for options.",c.d?"Shift+Alt+F1":"Alt+F1"):o.get(4)}_setAccessibilityOptions(o){this._accessibilitySupport=o.get(2);const n=o.get(3);this._accessibilitySupport===2&&n===Xe.g.accessibilityPageSize.defaultValue?this._accessibilityPageSize=500:this._accessibilityPageSize=n}onConfigurationChanged(o){const n=this._context.configuration.options,a=n.get(129);return this._setAccessibilityOptions(n),this._contentLeft=a.contentLeft,this._contentWidth=a.contentWidth,this._contentHeight=a.height,this._fontInfo=n.get(43),this._lineHeight=n.get(58),this._emptySelectionClipboard=n.get(32),this._copyWithSyntaxHighlighting=n.get(21),this.textArea.setAttribute("aria-label",this._getAriaLabel(n)),this.textArea.setAttribute("tabindex",String(n.get(111))),(o.hasChanged(30)||o.hasChanged(80))&&(n.get(30)&&n.get(80)?this.textArea.setAttribute("readonly","true"):this.textArea.removeAttribute("readonly")),o.hasChanged(2)&&this._textAreaInput.writeScreenReaderContent("strategy changed"),!0}onCursorStateChanged(o){return this._selections=o.selections.slice(0),this._modelSelections=o.modelSelections.slice(0),this._textAreaInput.writeScreenReaderContent("selection changed"),!0}onDecorationsChanged(o){return!0}onFlushed(o){return!0}onLinesChanged(o){return!0}onLinesDeleted(o){return!0}onLinesInserted(o){return!0}onScrollChanged(o){return this._scrollLeft=o.scrollLeft,this._scrollTop=o.scrollTop,!0}onZonesChanged(o){return!0}isFocused(){return this._textAreaInput.isFocused()}focusTextArea(){this._textAreaInput.focusTextArea()}getLastRenderData(){return this._lastRenderPosition}setAriaOptions(o){o.activeDescendant?(this.textArea.setAttribute("aria-haspopup","true"),this.textArea.setAttribute("aria-autocomplete","list"),this.textArea.setAttribute("aria-activedescendant",o.activeDescendant)):(this.textArea.setAttribute("aria-haspopup","false"),this.textArea.setAttribute("aria-autocomplete","both"),this.textArea.removeAttribute("aria-activedescendant")),o.role&&this.textArea.setAttribute("role",o.role)}prepareRender(o){this._primaryCursorPosition=new U.a(this._selections[0].positionLineNumber,this._selections[0].positionColumn),this._primaryCursorVisibleRange=o.visibleRangeForPosition(this._primaryCursorPosition)}render(o){this._textAreaInput.writeScreenReaderContent("render"),this._render()}_render(){if(this._visibleTextArea){this._renderInsideEditor(null,this._visibleTextArea.top-this._scrollTop,this._contentLeft+this._visibleTextArea.left-this._scrollLeft,this._visibleTextArea.width,this._lineHeight);return}if(!this._primaryCursorVisibleRange){this._renderAtTopLeft();return}const o=this._contentLeft+this._primaryCursorVisibleRange.left-this._scrollLeft;if(o<this._contentLeft||o>this._contentLeft+this._contentWidth){this._renderAtTopLeft();return}const n=this._context.viewLayout.getVerticalOffsetForLineNumber(this._selections[0].positionLineNumber)-this._scrollTop;if(n<0||n>this._contentHeight){this._renderAtTopLeft();return}if(c.f){this._renderInsideEditor(this._primaryCursorPosition,n,o,_t?0:1,this._lineHeight);return}this._renderInsideEditor(this._primaryCursorPosition,n,o,_t?0:1,_t?0:1)}_renderInsideEditor(o,n,a,T,N){this._lastRenderPosition=o;const Y=this.textArea,be=this.textAreaCover;L.a.applyFontInfo(Y,this._fontInfo),Y.setTop(n),Y.setLeft(a),Y.setWidth(T),Y.setHeight(N),be.setTop(0),be.setLeft(0),be.setWidth(0),be.setHeight(0)}_renderAtTopLeft(){this._lastRenderPosition=null;const o=this.textArea,n=this.textAreaCover;if(L.a.applyFontInfo(o,this._fontInfo),o.setTop(0),o.setLeft(0),n.setTop(0),n.setLeft(0),_t){o.setWidth(0),o.setHeight(0),n.setWidth(0),n.setHeight(0);return}o.setWidth(1),o.setHeight(1),n.setWidth(1),n.setHeight(1);const a=this._context.configuration.options;a.get(49)?n.setClassName("monaco-editor-background textAreaCover "+No.OUTER_CLASS_NAME):a.get(59).renderType!==0?n.setClassName("monaco-editor-background textAreaCover "+wo.CLASS_NAME):n.setClassName("monaco-editor-background textAreaCover")}}function Nt(o,n){const a=document.createElement("canvas"),T=a.getContext("2d");T.font=rt(n);const N=T.measureText(o);return w.g?N.width+2:N.width}function rt(o){return lt("normal",o.fontWeight,o.fontSize,o.lineHeight,o.fontFamily)}function lt(o,n,a,T,N){return`${o} normal ${n} ${a}px / ${T}px ${N}`}var bt=t("1YUG");class St{constructor(o,n,a,T){this.configuration=o,this.viewModel=n,this.userInputEvents=a,this.commandDelegate=T}paste(o,n,a,T){this.commandDelegate.paste(o,n,a,T)}type(o){this.commandDelegate.type(o)}compositionType(o,n,a,T){this.commandDelegate.compositionType(o,n,a,T)}compositionStart(){this.commandDelegate.startComposition()}compositionEnd(){this.commandDelegate.endComposition()}cut(){this.commandDelegate.cut()}setSelection(o){bt.CoreNavigationCommands.SetSelection.runCoreEditorCommand(this.viewModel,{source:"keyboard",selection:o})}_validateViewColumn(o){const n=this.viewModel.getLineMinColumn(o.lineNumber);return o.column<n?new U.a(o.lineNumber,n):o}_hasMulticursorModifier(o){switch(this.configuration.options.get(69)){case"altKey":return o.altKey;case"ctrlKey":return o.ctrlKey;case"metaKey":return o.metaKey;default:return!1}}_hasNonMulticursorModifier(o){switch(this.configuration.options.get(69)){case"altKey":return o.ctrlKey||o.metaKey;case"ctrlKey":return o.altKey||o.metaKey;case"metaKey":return o.ctrlKey||o.altKey;default:return!1}}dispatchMouse(o){const n=this.configuration.options,a=c.d&&n.get(95),T=n.get(18);o.middleButton&&!a?this._columnSelect(o.position,o.mouseColumn,o.inSelectionMode):o.startedOnLineNumbers?this._hasMulticursorModifier(o)?o.inSelectionMode?this._lastCursorLineSelect(o.position):this._createCursor(o.position,!0):o.inSelectionMode?this._lineSelectDrag(o.position):this._lineSelect(o.position):o.mouseDownCount>=4?this._selectAll():o.mouseDownCount===3?this._hasMulticursorModifier(o)?o.inSelectionMode?this._lastCursorLineSelectDrag(o.position):this._lastCursorLineSelect(o.position):o.inSelectionMode?this._lineSelectDrag(o.position):this._lineSelect(o.position):o.mouseDownCount===2?this._hasMulticursorModifier(o)?this._lastCursorWordSelect(o.position):o.inSelectionMode?this._wordSelectDrag(o.position):this._wordSelect(o.position):this._hasMulticursorModifier(o)?this._hasNonMulticursorModifier(o)||(o.shiftKey?this._columnSelect(o.position,o.mouseColumn,!0):o.inSelectionMode?this._lastCursorMoveToSelect(o.position):this._createCursor(o.position,!1)):o.inSelectionMode?o.altKey?this._columnSelect(o.position,o.mouseColumn,!0):T?this._columnSelect(o.position,o.mouseColumn,!0):this._moveToSelect(o.position):this.moveTo(o.position)}_usualArgs(o){return o=this._validateViewColumn(o),{source:"mouse",position:this._convertViewToModelPosition(o),viewPosition:o}}moveTo(o){bt.CoreNavigationCommands.MoveTo.runCoreEditorCommand(this.viewModel,this._usualArgs(o))}_moveToSelect(o){bt.CoreNavigationCommands.MoveToSelect.runCoreEditorCommand(this.viewModel,this._usualArgs(o))}_columnSelect(o,n,a){o=this._validateViewColumn(o),bt.CoreNavigationCommands.ColumnSelect.runCoreEditorCommand(this.viewModel,{source:"mouse",position:this._convertViewToModelPosition(o),viewPosition:o,mouseColumn:n,doColumnSelect:a})}_createCursor(o,n){o=this._validateViewColumn(o),bt.CoreNavigationCommands.CreateCursor.runCoreEditorCommand(this.viewModel,{source:"mouse",position:this._convertViewToModelPosition(o),viewPosition:o,wholeLine:n})}_lastCursorMoveToSelect(o){bt.CoreNavigationCommands.LastCursorMoveToSelect.runCoreEditorCommand(this.viewModel,this._usualArgs(o))}_wordSelect(o){bt.CoreNavigationCommands.WordSelect.runCoreEditorCommand(this.viewModel,this._usualArgs(o))}_wordSelectDrag(o){bt.CoreNavigationCommands.WordSelectDrag.runCoreEditorCommand(this.viewModel,this._usualArgs(o))}_lastCursorWordSelect(o){bt.CoreNavigationCommands.LastCursorWordSelect.runCoreEditorCommand(this.viewModel,this._usualArgs(o))}_lineSelect(o){bt.CoreNavigationCommands.LineSelect.runCoreEditorCommand(this.viewModel,this._usualArgs(o))}_lineSelectDrag(o){bt.CoreNavigationCommands.LineSelectDrag.runCoreEditorCommand(this.viewModel,this._usualArgs(o))}_lastCursorLineSelect(o){bt.CoreNavigationCommands.LastCursorLineSelect.runCoreEditorCommand(this.viewModel,this._usualArgs(o))}_lastCursorLineSelectDrag(o){bt.CoreNavigationCommands.LastCursorLineSelectDrag.runCoreEditorCommand(this.viewModel,this._usualArgs(o))}_selectAll(){bt.CoreNavigationCommands.SelectAll.runCoreEditorCommand(this.viewModel,{source:"mouse"})}_convertViewToModelPosition(o){return this.viewModel.coordinatesConverter.convertViewPositionToModelPosition(o)}emitKeyDown(o){this.userInputEvents.emitKeyDown(o)}emitKeyUp(o){this.userInputEvents.emitKeyUp(o)}emitContextMenu(o){this.userInputEvents.emitContextMenu(o)}emitMouseMove(o){this.userInputEvents.emitMouseMove(o)}emitMouseLeave(o){this.userInputEvents.emitMouseLeave(o)}emitMouseUp(o){this.userInputEvents.emitMouseUp(o)}emitMouseDown(o){this.userInputEvents.emitMouseDown(o)}emitMouseDrag(o){this.userInputEvents.emitMouseDrag(o)}emitMouseDrop(o){this.userInputEvents.emitMouseDrop(o)}emitMouseDropCanceled(){this.userInputEvents.emitMouseDropCanceled()}emitMouseWheel(o){this.userInputEvents.emitMouseWheel(o)}}class Qt{constructor(o){this.onKeyDown=null,this.onKeyUp=null,this.onContextMenu=null,this.onMouseMove=null,this.onMouseLeave=null,this.onMouseDown=null,this.onMouseUp=null,this.onMouseDrag=null,this.onMouseDrop=null,this.onMouseDropCanceled=null,this.onMouseWheel=null,this._coordinatesConverter=o}emitKeyDown(o){this.onKeyDown&&this.onKeyDown(o)}emitKeyUp(o){this.onKeyUp&&this.onKeyUp(o)}emitContextMenu(o){this.onContextMenu&&this.onContextMenu(this._convertViewToModelMouseEvent(o))}emitMouseMove(o){this.onMouseMove&&this.onMouseMove(this._convertViewToModelMouseEvent(o))}emitMouseLeave(o){this.onMouseLeave&&this.onMouseLeave(this._convertViewToModelMouseEvent(o))}emitMouseDown(o){this.onMouseDown&&this.onMouseDown(this._convertViewToModelMouseEvent(o))}emitMouseUp(o){this.onMouseUp&&this.onMouseUp(this._convertViewToModelMouseEvent(o))}emitMouseDrag(o){this.onMouseDrag&&this.onMouseDrag(this._convertViewToModelMouseEvent(o))}emitMouseDrop(o){this.onMouseDrop&&this.onMouseDrop(this._convertViewToModelMouseEvent(o))}emitMouseDropCanceled(){this.onMouseDropCanceled&&this.onMouseDropCanceled()}emitMouseWheel(o){this.onMouseWheel&&this.onMouseWheel(o)}_convertViewToModelMouseEvent(o){return o.target?{event:o.event,target:this._convertViewToModelMouseTarget(o.target)}:o}_convertViewToModelMouseTarget(o){return Qt.convertViewToModelMouseTarget(o,this._coordinatesConverter)}static convertViewToModelMouseTarget(o,n){return new bo(o.element,o.type,o.mouseColumn,o.position?n.convertViewPositionToModelPosition(o.position):null,o.range?n.convertViewRangeToModelRange(o.range):null,o.detail)}}class bo{constructor(o,n,a,T,N,Y){this.element=o,this.type=n,this.mouseColumn=a,this.position=T,this.range=N,this.detail=Y}toString(){return $e.toString(this)}}var qt=t("erNZ"),Eo;class Ro{constructor(o){this._createLine=o,this._set(1,[])}flush(){this._set(1,[])}_set(o,n){this._lines=n,this._rendLineNumberStart=o}_get(){return{rendLineNumberStart:this._rendLineNumberStart,lines:this._lines}}getStartLineNumber(){return this._rendLineNumberStart}getEndLineNumber(){return this._rendLineNumberStart+this._lines.length-1}getCount(){return this._lines.length}getLine(o){const n=o-this._rendLineNumberStart;if(n<0||n>=this._lines.length)throw new Error("Illegal value for lineNumber");return this._lines[n]}onLinesDeleted(o,n){if(this.getCount()===0)return null;const a=this.getStartLineNumber(),T=this.getEndLineNumber();if(n<a){const xe=n-o+1;return this._rendLineNumberStart-=xe,null}if(o>T)return null;let N=0,Y=0;for(let xe=a;xe<=T;xe++){const Ke=xe-this._rendLineNumberStart;o<=xe&&xe<=n&&(Y===0?(N=Ke,Y=1):Y++)}if(o<a){let xe=0;n<a?xe=n-o+1:xe=a-o,this._rendLineNumberStart-=xe}const be=this._lines.splice(N,Y);return be}onLinesChanged(o,n){if(this.getCount()===0)return!1;const a=this.getStartLineNumber(),T=this.getEndLineNumber();let N=!1;for(let Y=o;Y<=n;Y++)Y>=a&&Y<=T&&(this._lines[Y-this._rendLineNumberStart].onContentChanged(),N=!0);return N}onLinesInserted(o,n){if(this.getCount()===0)return null;const a=n-o+1,T=this.getStartLineNumber(),N=this.getEndLineNumber();if(o<=T)return this._rendLineNumberStart+=a,null;if(o>N)return null;if(a+o>N){const nt=this._lines.splice(o-this._rendLineNumberStart,N-o+1);return nt}const Y=[];for(let nt=0;nt<a;nt++)Y[nt]=this._createLine();const be=o-this._rendLineNumberStart,xe=this._lines.slice(0,be),Ke=this._lines.slice(be,this._lines.length-a),Ze=this._lines.slice(this._lines.length-a,this._lines.length);return this._lines=xe.concat(Y).concat(Ke),Ze}onTokensChanged(o){if(this.getCount()===0)return!1;const n=this.getStartLineNumber(),a=this.getEndLineNumber();let T=!1;for(let N=0,Y=o.length;N<Y;N++){const be=o[N];if(be.toLineNumber<n||be.fromLineNumber>a)continue;const xe=Math.max(n,be.fromLineNumber),Ke=Math.min(a,be.toLineNumber);for(let Ze=xe;Ze<=Ke;Ze++){const nt=Ze-this._rendLineNumberStart;this._lines[nt].onTokensChanged(),T=!0}}return T}}class zo{constructor(o){this._host=o,this.domNode=this._createDomNode(),this._linesCollection=new Ro(()=>this._host.createVisibleLine())}_createDomNode(){const o=Object(u.b)(document.createElement("div"));return o.setClassName("view-layer"),o.setPosition("absolute"),o.domNode.setAttribute("role","presentation"),o.domNode.setAttribute("aria-hidden","true"),o}onConfigurationChanged(o){return!!o.hasChanged(129)}onFlushed(o){return this._linesCollection.flush(),!0}onLinesChanged(o){return this._linesCollection.onLinesChanged(o.fromLineNumber,o.toLineNumber)}onLinesDeleted(o){const n=this._linesCollection.onLinesDeleted(o.fromLineNumber,o.toLineNumber);if(n)for(let a=0,T=n.length;a<T;a++){const N=n[a].getDomNode();N&&this.domNode.domNode.removeChild(N)}return!0}onLinesInserted(o){const n=this._linesCollection.onLinesInserted(o.fromLineNumber,o.toLineNumber);if(n)for(let a=0,T=n.length;a<T;a++){const N=n[a].getDomNode();N&&this.domNode.domNode.removeChild(N)}return!0}onScrollChanged(o){return o.scrollTopChanged}onTokensChanged(o){return this._linesCollection.onTokensChanged(o.ranges)}onZonesChanged(o){return!0}getStartLineNumber(){return this._linesCollection.getStartLineNumber()}getEndLineNumber(){return this._linesCollection.getEndLineNumber()}getVisibleLine(o){return this._linesCollection.getLine(o)}renderLines(o){const n=this._linesCollection._get(),a=new Bo(this.domNode.domNode,this._host,o),T={rendLineNumberStart:n.rendLineNumberStart,lines:n.lines,linesLength:n.lines.length},N=a.render(T,o.startLineNumber,o.endLineNumber,o.relativeVerticalOffset);this._linesCollection._set(N.rendLineNumberStart,N.lines)}}class Bo{constructor(o,n,a){this.domNode=o,this.host=n,this.viewportData=a}render(o,n,a,T){const N={rendLineNumberStart:o.rendLineNumberStart,lines:o.lines.slice(0),linesLength:o.linesLength};if(N.rendLineNumberStart+N.linesLength-1<n||a<N.rendLineNumberStart){N.rendLineNumberStart=n,N.linesLength=a-n+1,N.lines=[];for(let Y=n;Y<=a;Y++)N.lines[Y-n]=this.host.createVisibleLine();return this._finishRendering(N,!0,T),N}if(this._renderUntouchedLines(N,Math.max(n-N.rendLineNumberStart,0),Math.min(a-N.rendLineNumberStart,N.linesLength-1),T,n),N.rendLineNumberStart>n){const Y=n,be=Math.min(a,N.rendLineNumberStart-1);Y<=be&&(this._insertLinesBefore(N,Y,be,T,n),N.linesLength+=be-Y+1)}else if(N.rendLineNumberStart<n){const Y=Math.min(N.linesLength,n-N.rendLineNumberStart);Y>0&&(this._removeLinesBefore(N,Y),N.linesLength-=Y)}if(N.rendLineNumberStart=n,N.rendLineNumberStart+N.linesLength-1<a){const Y=N.rendLineNumberStart+N.linesLength,be=a;Y<=be&&(this._insertLinesAfter(N,Y,be,T,n),N.linesLength+=be-Y+1)}else if(N.rendLineNumberStart+N.linesLength-1>a){const Y=Math.max(0,a-N.rendLineNumberStart+1),be=N.linesLength-1,xe=be-Y+1;xe>0&&(this._removeLinesAfter(N,xe),N.linesLength-=xe)}return this._finishRendering(N,!1,T),N}_renderUntouchedLines(o,n,a,T,N){const Y=o.rendLineNumberStart,be=o.lines;for(let xe=n;xe<=a;xe++){const Ke=Y+xe;be[xe].layoutLine(Ke,T[Ke-N])}}_insertLinesBefore(o,n,a,T,N){const Y=[];let be=0;for(let xe=n;xe<=a;xe++)Y[be++]=this.host.createVisibleLine();o.lines=Y.concat(o.lines)}_removeLinesBefore(o,n){for(let a=0;a<n;a++){const T=o.lines[a].getDomNode();T&&this.domNode.removeChild(T)}o.lines.splice(0,n)}_insertLinesAfter(o,n,a,T,N){const Y=[];let be=0;for(let xe=n;xe<=a;xe++)Y[be++]=this.host.createVisibleLine();o.lines=o.lines.concat(Y)}_removeLinesAfter(o,n){const a=o.linesLength-n;for(let T=0;T<n;T++){const N=o.lines[a+T].getDomNode();N&&this.domNode.removeChild(N)}o.lines.splice(a,n)}_finishRenderingNewLines(o,n,a,T){Bo._ttPolicy&&(a=Bo._ttPolicy.createHTML(a));const N=this.domNode.lastChild;n||!N?this.domNode.innerHTML=a:N.insertAdjacentHTML("afterend",a);let Y=this.domNode.lastChild;for(let be=o.linesLength-1;be>=0;be--){const xe=o.lines[be];T[be]&&(xe.setDomNode(Y),Y=Y.previousSibling)}}_finishRenderingInvalidLines(o,n,a){const T=document.createElement("div");Bo._ttPolicy&&(n=Bo._ttPolicy.createHTML(n)),T.innerHTML=n;for(let N=0;N<o.linesLength;N++){const Y=o.lines[N];if(a[N]){const be=T.firstChild,xe=Y.getDomNode();xe.parentNode.replaceChild(be,xe),Y.setDomNode(be)}}}_finishRendering(o,n,a){const T=Bo._sb,N=o.linesLength,Y=o.lines,be=o.rendLineNumberStart,xe=[];{T.reset();let Ke=!1;for(let Ze=0;Ze<N;Ze++){const nt=Y[Ze];xe[Ze]=!1;const Ot=nt.getDomNode();if(Ot)continue;const ft=nt.renderLine(Ze+be,a[Ze],this.viewportData,T);if(!ft)continue;xe[Ze]=!0,Ke=!0}Ke&&this._finishRenderingNewLines(o,n,T.build(),xe)}{T.reset();let Ke=!1;const Ze=[];for(let nt=0;nt<N;nt++){const Ot=Y[nt];if(Ze[nt]=!1,xe[nt])continue;const ft=Ot.renderLine(nt+be,a[nt],this.viewportData,T);if(!ft)continue;Ze[nt]=!0,Ke=!0}Ke&&this._finishRenderingInvalidLines(o,T.build(),Ze)}}}Bo._ttPolicy=(Eo=window.trustedTypes)===null||Eo===void 0?void 0:Eo.createPolicy("editorViewLayer",{createHTML:o=>o}),Bo._sb=Object(qt.a)(1e5);class Jt extends le{constructor(o){super(o);this._visibleLines=new zo(this),this.domNode=this._visibleLines.domNode,this._dynamicOverlays=[],this._isFocused=!1,this.domNode.setClassName("view-overlays")}shouldRender(){if(super.shouldRender())return!0;for(let o=0,n=this._dynamicOverlays.length;o<n;o++){const a=this._dynamicOverlays[o];if(a.shouldRender())return!0}return!1}dispose(){super.dispose();for(let o=0,n=this._dynamicOverlays.length;o<n;o++){const a=this._dynamicOverlays[o];a.dispose()}this._dynamicOverlays=[]}getDomNode(){return this.domNode}createVisibleLine(){return new fo(this._context.configuration,this._dynamicOverlays)}addDynamicOverlay(o){this._dynamicOverlays.push(o)}onConfigurationChanged(o){this._visibleLines.onConfigurationChanged(o);const n=this._visibleLines.getStartLineNumber(),a=this._visibleLines.getEndLineNumber();for(let T=n;T<=a;T++){const N=this._visibleLines.getVisibleLine(T);N.onConfigurationChanged(o)}return!0}onFlushed(o){return this._visibleLines.onFlushed(o)}onFocusChanged(o){return this._isFocused=o.isFocused,!0}onLinesChanged(o){return this._visibleLines.onLinesChanged(o)}onLinesDeleted(o){return this._visibleLines.onLinesDeleted(o)}onLinesInserted(o){return this._visibleLines.onLinesInserted(o)}onScrollChanged(o){return this._visibleLines.onScrollChanged(o)||!0}onTokensChanged(o){return this._visibleLines.onTokensChanged(o)}onZonesChanged(o){return this._visibleLines.onZonesChanged(o)}prepareRender(o){const n=this._dynamicOverlays.filter(a=>a.shouldRender());for(let a=0,T=n.length;a<T;a++){const N=n[a];N.prepareRender(o),N.onDidRender()}}render(o){this._viewOverlaysRender(o),this.domNode.toggleClassName("focused",this._isFocused)}_viewOverlaysRender(o){this._visibleLines.renderLines(o.viewportData)}}class fo{constructor(o,n){this._configuration=o,this._lineHeight=this._configuration.options.get(58),this._dynamicOverlays=n,this._domNode=null,this._renderedContent=null}getDomNode(){return this._domNode?this._domNode.domNode:null}setDomNode(o){this._domNode=Object(u.b)(o)}onContentChanged(){}onTokensChanged(){}onConfigurationChanged(o){this._lineHeight=this._configuration.options.get(58)}renderLine(o,n,a,T){let N="";for(let Y=0,be=this._dynamicOverlays.length;Y<be;Y++){const xe=this._dynamicOverlays[Y];N+=xe.render(a.startLineNumber,o)}return this._renderedContent===N?!1:(this._renderedContent=N,T.appendASCIIString('<div style="position:absolute;top:'),T.appendASCIIString(String(n)),T.appendASCIIString("px;width:100%;height:"),T.appendASCIIString(String(this._lineHeight)),T.appendASCIIString('px;">'),T.appendASCIIString(N),T.appendASCIIString("</div>"),!0)}layoutLine(o,n){this._domNode&&(this._domNode.setTop(n),this._domNode.setHeight(this._lineHeight))}}class ri extends Jt{constructor(o){super(o);const n=this._context.configuration.options,a=n.get(129);this._contentWidth=a.contentWidth,this.domNode.setHeight(0)}onConfigurationChanged(o){const n=this._context.configuration.options,a=n.get(129);return this._contentWidth=a.contentWidth,super.onConfigurationChanged(o)||!0}onScrollChanged(o){return super.onScrollChanged(o)||o.scrollWidthChanged}_viewOverlaysRender(o){super._viewOverlaysRender(o),this.domNode.setWidth(Math.max(o.scrollWidth,this._contentWidth))}}class Zo extends Jt{constructor(o){super(o);const n=this._context.configuration.options,a=n.get(129);this._contentLeft=a.contentLeft,this.domNode.setClassName("margin-view-overlays"),this.domNode.setWidth(1),L.a.applyFontInfo(this.domNode,n.get(43))}onConfigurationChanged(o){const n=this._context.configuration.options;L.a.applyFontInfo(this.domNode,n.get(43));const a=n.get(129);return this._contentLeft=a.contentLeft,super.onConfigurationChanged(o)||!0}onScrollChanged(o){return super.onScrollChanged(o)||o.scrollHeightChanged}_viewOverlaysRender(o){super._viewOverlaysRender(o);const n=Math.min(o.scrollHeight,1e6);this.domNode.setHeight(n),this.domNode.setWidth(this._contentLeft)}}class ci{constructor(o,n){this._coordinateBrand=void 0,this.top=o,this.left=n}}class ki extends le{constructor(o,n){super(o);this._viewDomNode=n,this._widgets={},this.domNode=Object(u.b)(document.createElement("div")),_e.write(this.domNode,1),this.domNode.setClassName("contentWidgets"),this.domNode.setPosition("absolute"),this.domNode.setTop(0),this.overflowingContentWidgetsDomNode=Object(u.b)(document.createElement("div")),_e.write(this.overflowingContentWidgetsDomNode,2),this.overflowingContentWidgetsDomNode.setClassName("overflowingContentWidgets")}dispose(){super.dispose(),this._widgets={}}onConfigurationChanged(o){const n=Object.keys(this._widgets);for(const a of n)this._widgets[a].onConfigurationChanged(o);return!0}onDecorationsChanged(o){return!0}onFlushed(o){return!0}onLineMappingChanged(o){const n=Object.keys(this._widgets);for(const a of n)this._widgets[a].onLineMappingChanged(o);return!0}onLinesChanged(o){return!0}onLinesDeleted(o){return!0}onLinesInserted(o){return!0}onScrollChanged(o){return!0}onZonesChanged(o){return!0}addWidget(o){const n=new wi(this._context,this._viewDomNode,o);this._widgets[n.id]=n,n.allowEditorOverflow?this.overflowingContentWidgetsDomNode.appendChild(n.domNode):this.domNode.appendChild(n.domNode),this.setShouldRender()}setWidgetPosition(o,n,a){const T=this._widgets[o.getId()];T.setPosition(n,a),this.setShouldRender()}removeWidget(o){const n=o.getId();if(this._widgets.hasOwnProperty(n)){const a=this._widgets[n];delete this._widgets[n];const T=a.domNode.domNode;T.parentNode.removeChild(T),T.removeAttribute("monaco-visible-content-widget"),this.setShouldRender()}}shouldSuppressMouseDownOnWidget(o){return this._widgets.hasOwnProperty(o)?this._widgets[o].suppressMouseDown:!1}onBeforeRender(o){const n=Object.keys(this._widgets);for(const a of n)this._widgets[a].onBeforeRender(o)}prepareRender(o){const n=Object.keys(this._widgets);for(const a of n)this._widgets[a].prepareRender(o)}render(o){const n=Object.keys(this._widgets);for(const a of n)this._widgets[a].render(o)}}class wi{constructor(o,n,a){this._context=o,this._viewDomNode=n,this._actual=a,this.domNode=Object(u.b)(this._actual.getDomNode()),this.id=this._actual.getId(),this.allowEditorOverflow=this._actual.allowEditorOverflow||!1,this.suppressMouseDown=this._actual.suppressMouseDown||!1;const T=this._context.configuration.options,N=T.get(129);this._fixedOverflowWidgets=T.get(36),this._contentWidth=N.contentWidth,this._contentLeft=N.contentLeft,this._lineHeight=T.get(58),this._range=null,this._viewRange=null,this._preference=[],this._cachedDomNodeClientWidth=-1,this._cachedDomNodeClientHeight=-1,this._maxWidth=this._getMaxWidth(),this._isVisible=!1,this._renderData=null,this.domNode.setPosition(this._fixedOverflowWidgets&&this.allowEditorOverflow?"fixed":"absolute"),this.domNode.setVisibility("hidden"),this.domNode.setAttribute("widgetId",this.id),this.domNode.setMaxWidth(this._maxWidth)}onConfigurationChanged(o){const n=this._context.configuration.options;if(this._lineHeight=n.get(58),o.hasChanged(129)){const a=n.get(129);this._contentLeft=a.contentLeft,this._contentWidth=a.contentWidth,this._maxWidth=this._getMaxWidth()}}onLineMappingChanged(o){this._setPosition(this._range)}_setPosition(o){if(this._range=o,this._viewRange=null,this._range){const n=this._context.model.validateModelRange(this._range);(this._context.model.coordinatesConverter.modelPositionIsVisible(n.getStartPosition())||this._context.model.coordinatesConverter.modelPositionIsVisible(n.getEndPosition()))&&(this._viewRange=this._context.model.coordinatesConverter.convertModelRangeToViewRange(n))}}_getMaxWidth(){return this.allowEditorOverflow?window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth:this._contentWidth}setPosition(o,n){this._setPosition(o),this._preference=n,this._cachedDomNodeClientWidth=-1,this._cachedDomNodeClientHeight=-1}_layoutBoxInViewport(o,n,a,T,N){const Y=o.top,be=Y,xe=n.top+this._lineHeight,Ke=N.viewportHeight-xe,Ze=Y-T,nt=be>=T,Ot=xe,ft=Ke>=T;let kt=o.left,Gt=n.left;return kt+a>N.scrollLeft+N.viewportWidth&&(kt=N.scrollLeft+N.viewportWidth-a),Gt+a>N.scrollLeft+N.viewportWidth&&(Gt=N.scrollLeft+N.viewportWidth-a),kt<N.scrollLeft&&(kt=N.scrollLeft),Gt<N.scrollLeft&&(Gt=N.scrollLeft),{fitsAbove:nt,aboveTop:Ze,aboveLeft:kt,fitsBelow:ft,belowTop:Ot,belowLeft:Gt}}_layoutHorizontalSegmentInPage(o,n,a,T){const N=Math.max(0,n.left-T),Y=Math.min(n.left+n.width+T,o.width);let be=n.left+a-v.f.scrollX;if(be+T>Y){const xe=be-(Y-T);be-=xe,a-=xe}if(be<N){const xe=be-N;be-=xe,a-=xe}return[a,be]}_layoutBoxInPage(o,n,a,T,N){const Y=o.top-T,be=n.top+this._lineHeight,xe=v.D(this._viewDomNode.domNode),Ke=xe.top+Y-v.f.scrollY,Ze=xe.top+be-v.f.scrollY,nt=v.z(document.body),[Ot,ft]=this._layoutHorizontalSegmentInPage(nt,xe,o.left-N.scrollLeft+this._contentLeft,a),[kt,Gt]=this._layoutHorizontalSegmentInPage(nt,xe,n.left-N.scrollLeft+this._contentLeft,a),eo=22,co=22,go=Ke>=eo,yo=Ze+T<=nt.height-co;return this._fixedOverflowWidgets?{fitsAbove:go,aboveTop:Math.max(Ke,eo),aboveLeft:ft,fitsBelow:yo,belowTop:Ze,belowLeft:Gt}:{fitsAbove:go,aboveTop:Y,aboveLeft:Ot,fitsBelow:yo,belowTop:be,belowLeft:kt}}_prepareRenderWidgetAtExactPositionOverflowing(o){return new ci(o.top,o.left+this._contentLeft)}_getTopAndBottomLeft(o){if(!this._viewRange)return[null,null];const n=o.linesVisibleRangesForRange(this._viewRange,!1);if(!n||n.length===0)return[null,null];let a=n[0],T=n[0];for(const nt of n)nt.lineNumber<a.lineNumber&&(a=nt),nt.lineNumber>T.lineNumber&&(T=nt);let N=1073741824;for(const nt of a.ranges)nt.left<N&&(N=nt.left);let Y=1073741824;for(const nt of T.ranges)nt.left<Y&&(Y=nt.left);const be=o.getVerticalOffsetForLineNumber(a.lineNumber)-o.scrollTop,xe=new ci(be,N),Ke=o.getVerticalOffsetForLineNumber(T.lineNumber)-o.scrollTop,Ze=new ci(Ke,Y);return[xe,Ze]}_prepareRenderWidget(o){const[n,a]=this._getTopAndBottomLeft(o);if(!n||!a)return null;if(this._cachedDomNodeClientWidth===-1||this._cachedDomNodeClientHeight===-1){let N=null;if(typeof this._actual.beforeRender=="function"&&(N=Zi(this._actual.beforeRender,this._actual)),N)this._cachedDomNodeClientWidth=N.width,this._cachedDomNodeClientHeight=N.height;else{const Y=this.domNode.domNode;this._cachedDomNodeClientWidth=Y.clientWidth,this._cachedDomNodeClientHeight=Y.clientHeight}}let T;if(this.allowEditorOverflow?T=this._layoutBoxInPage(n,a,this._cachedDomNodeClientWidth,this._cachedDomNodeClientHeight,o):T=this._layoutBoxInViewport(n,a,this._cachedDomNodeClientWidth,this._cachedDomNodeClientHeight,o),this._preference)for(let N=1;N<=2;N++)for(const Y of this._preference)if(Y===1){if(!T)return null;if(N===2||T.fitsAbove)return{coordinate:new ci(T.aboveTop,T.aboveLeft),position:1}}else if(Y===2){if(!T)return null;if(N===2||T.fitsBelow)return{coordinate:new ci(T.belowTop,T.belowLeft),position:2}}else return this.allowEditorOverflow?{coordinate:this._prepareRenderWidgetAtExactPositionOverflowing(n),position:0}:{coordinate:n,position:0};return null}onBeforeRender(o){if(!this._viewRange||!this._preference)return;if(this._viewRange.endLineNumber<o.startLineNumber||this._viewRange.startLineNumber>o.endLineNumber)return;this.domNode.setMaxWidth(this._maxWidth)}prepareRender(o){this._renderData=this._prepareRenderWidget(o)}render(o){if(!this._renderData){this._isVisible&&(this.domNode.removeAttribute("monaco-visible-content-widget"),this._isVisible=!1,this.domNode.setVisibility("hidden")),typeof this._actual.afterRender=="function"&&Zi(this._actual.afterRender,this._actual,null);return}this.allowEditorOverflow?(this.domNode.setTop(this._renderData.coordinate.top),this.domNode.setLeft(this._renderData.coordinate.left)):(this.domNode.setTop(this._renderData.coordinate.top+o.scrollTop-o.bigNumbersDelta),this.domNode.setLeft(this._renderData.coordinate.left)),this._isVisible||(this.domNode.setVisibility("inherit"),this.domNode.setAttribute("monaco-visible-content-widget","true"),this._isVisible=!0),typeof this._actual.afterRender=="function"&&Zi(this._actual.afterRender,this._actual,this._renderData.position)}}function Zi(o,n,...a){try{return o.call(n,...a)}catch(T){return null}}var Vi=t("kw+w"),vi=t("6OMU");let sn=!0;class en extends Wt{constructor(o){super();this._context=o;const n=this._context.configuration.options,a=n.get(129);this._lineHeight=n.get(58),this._renderLineHighlight=n.get(84),this._renderLineHighlightOnlyWhenFocus=n.get(85),this._contentLeft=a.contentLeft,this._contentWidth=a.contentWidth,this._selectionIsEmpty=!0,this._focused=!1,this._cursorLineNumbers=[1],this._selections=[new b.a(1,1,1,1)],this._renderData=null,this._context.addEventHandler(this)}dispose(){this._context.removeEventHandler(this),super.dispose()}_readFromSelections(){let o=!1;const n=sn?this._selections.slice(0,1):this._selections,a=n.map(N=>N.positionLineNumber);a.sort((N,Y)=>N-Y),vi.g(this._cursorLineNumbers,a)||(this._cursorLineNumbers=a,o=!0);const T=n.every(N=>N.isEmpty());return this._selectionIsEmpty!==T&&(this._selectionIsEmpty=T,o=!0),o}onThemeChanged(o){return this._readFromSelections()}onConfigurationChanged(o){const n=this._context.configuration.options,a=n.get(129);return this._lineHeight=n.get(58),this._renderLineHighlight=n.get(84),this._renderLineHighlightOnlyWhenFocus=n.get(85),this._contentLeft=a.contentLeft,this._contentWidth=a.contentWidth,!0}onCursorStateChanged(o){return this._selections=o.selections,this._readFromSelections()}onFlushed(o){return!0}onLinesDeleted(o){return!0}onLinesInserted(o){return!0}onScrollChanged(o){return o.scrollWidthChanged||o.scrollTopChanged}onZonesChanged(o){return!0}onFocusChanged(o){return this._renderLineHighlightOnlyWhenFocus?(this._focused=o.isFocused,!0):!1}prepareRender(o){if(!this._shouldRenderThis()){this._renderData=null;return}const n=this._renderOne(o),a=o.visibleRange.startLineNumber,T=o.visibleRange.endLineNumber,N=this._cursorLineNumbers.length;let Y=0;const be=[];for(let xe=a;xe<=T;xe++){const Ke=xe-a;for(;Y<N&&this._cursorLineNumbers[Y]<xe;)Y++;Y<N&&this._cursorLineNumbers[Y]===xe?be[Ke]=n:be[Ke]=""}this._renderData=be}render(o,n){if(!this._renderData)return"";const a=n-o;return a>=this._renderData.length?"":this._renderData[a]}}class on extends en{_renderOne(o){const n="current-line"+(this._shouldRenderOther()?" current-line-both":"");return`<div class="${n}" style="width:${Math.max(o.scrollWidth,this._contentWidth)}px; height:${this._lineHeight}px;"></div>`}_shouldRenderThis(){return(this._renderLineHighlight==="line"||this._renderLineHighlight==="all")&&this._selectionIsEmpty&&(!this._renderLineHighlightOnlyWhenFocus||this._focused)}_shouldRenderOther(){return(this._renderLineHighlight==="gutter"||this._renderLineHighlight==="all")&&(!this._renderLineHighlightOnlyWhenFocus||this._focused)}}class cn extends en{_renderOne(o){const n="current-line"+(this._shouldRenderMargin()?" current-line-margin":"")+(this._shouldRenderOther()?" current-line-margin-both":"");return`<div class="${n}" style="width:${this._contentLeft}px; height:${this._lineHeight}px;"></div>`}_shouldRenderMargin(){return(this._renderLineHighlight==="gutter"||this._renderLineHighlight==="all")&&(!this._renderLineHighlightOnlyWhenFocus||this._focused)}_shouldRenderThis(){return!0}_shouldRenderOther(){return(this._renderLineHighlight==="line"||this._renderLineHighlight==="all")&&this._selectionIsEmpty&&(!this._renderLineHighlightOnlyWhenFocus||this._focused)}}Object(so.f)((o,n)=>{sn=!1;const a=o.getColor(zt.B);if(a&&(n.addRule(`.monaco-editor .view-overlays .current-line { background-color: ${a}; }`),n.addRule(`.monaco-editor .margin-view-overlays .current-line-margin { background-color: ${a}; border: none; }`)),!a||a.isTransparent()||o.defines(zt.C)){const T=o.getColor(zt.C);T&&(sn=!0,n.addRule(`.monaco-editor .view-overlays .current-line { border: 2px solid ${T}; }`),n.addRule(`.monaco-editor .margin-view-overlays .current-line-margin { border: 2px solid ${T}; }`),o.type==="hc"&&(n.addRule(".monaco-editor .view-overlays .current-line { border-width: 1px; }"),n.addRule(".monaco-editor .margin-view-overlays .current-line-margin { border-width: 1px; }")))}});var Bi=t("Vtyv");class zi extends Wt{constructor(o){super();this._context=o;const n=this._context.configuration.options;this._lineHeight=n.get(58),this._typicalHalfwidthCharacterWidth=n.get(43).typicalHalfwidthCharacterWidth,this._renderResult=null,this._context.addEventHandler(this)}dispose(){this._context.removeEventHandler(this),this._renderResult=null,super.dispose()}onConfigurationChanged(o){const n=this._context.configuration.options;return this._lineHeight=n.get(58),this._typicalHalfwidthCharacterWidth=n.get(43).typicalHalfwidthCharacterWidth,!0}onDecorationsChanged(o){return!0}onFlushed(o){return!0}onLinesChanged(o){return!0}onLinesDeleted(o){return!0}onLinesInserted(o){return!0}onScrollChanged(o){return o.scrollTopChanged||o.scrollWidthChanged}onZonesChanged(o){return!0}prepareRender(o){const n=o.getDecorationsInViewport();let a=[],T=0;for(let xe=0,Ke=n.length;xe<Ke;xe++){const Ze=n[xe];Ze.options.className&&(a[T++]=Ze)}a=a.sort((xe,Ke)=>{if(xe.options.zIndex<Ke.options.zIndex)return-1;if(xe.options.zIndex>Ke.options.zIndex)return 1;const Ze=xe.options.className,nt=Ke.options.className;return Ze<nt?-1:Ze>nt?1:se.a.compareRangesUsingStarts(xe.range,Ke.range)});const N=o.visibleRange.startLineNumber,Y=o.visibleRange.endLineNumber,be=[];for(let xe=N;xe<=Y;xe++){const Ke=xe-N;be[Ke]=""}this._renderWholeLineDecorations(o,a,be),this._renderNormalDecorations(o,a,be),this._renderResult=be}_renderWholeLineDecorations(o,n,a){const T=String(this._lineHeight),N=o.visibleRange.startLineNumber,Y=o.visibleRange.endLineNumber;for(let be=0,xe=n.length;be<xe;be++){const Ke=n[be];if(!Ke.options.isWholeLine)continue;const Ze='<div class="cdr '+Ke.options.className+'" style="left:0;width:100%;height:'+T+'px;"></div>',nt=Math.max(Ke.range.startLineNumber,N),Ot=Math.min(Ke.range.endLineNumber,Y);for(let ft=nt;ft<=Ot;ft++){const kt=ft-N;a[kt]+=Ze}}}_renderNormalDecorations(o,n,a){const T=String(this._lineHeight),N=o.visibleRange.startLineNumber;let Y=null,be=!1,xe=null;for(let Ke=0,Ze=n.length;Ke<Ze;Ke++){const nt=n[Ke];if(nt.options.isWholeLine)continue;const Ot=nt.options.className,ft=Boolean(nt.options.showIfCollapsed);let kt=nt.range;if(ft&&kt.endColumn===1&&kt.endLineNumber!==kt.startLineNumber&&(kt=new se.a(kt.startLineNumber,kt.startColumn,kt.endLineNumber-1,this._context.model.getLineMaxColumn(kt.endLineNumber-1))),Y===Ot&&be===ft&&se.a.areIntersectingOrTouching(xe,kt)){xe=se.a.plusRange(xe,kt);continue}Y!==null&&this._renderNormalDecoration(o,xe,Y,be,T,N,a),Y=Ot,be=ft,xe=kt}Y!==null&&this._renderNormalDecoration(o,xe,Y,be,T,N,a)}_renderNormalDecoration(o,n,a,T,N,Y,be){const xe=o.linesVisibleRangesForRange(n,a==="findMatch");if(!xe)return;for(let Ke=0,Ze=xe.length;Ke<Ze;Ke++){const nt=xe[Ke];if(nt.outsideRenderedLine)continue;const Ot=nt.lineNumber-Y;if(T&&nt.ranges.length===1){const ft=nt.ranges[0];ft.width===0&&(nt.ranges[0]=new V(ft.left,this._typicalHalfwidthCharacterWidth))}for(let ft=0,kt=nt.ranges.length;ft<kt;ft++){const Gt=nt.ranges[ft],eo='<div class="cdr '+a+'" style="left:'+String(Gt.left)+"px;width:"+String(Gt.width)+"px;height:"+N+'px;"></div>';be[Ot]+=eo}}}render(o,n){if(!this._renderResult)return"";const a=n-o;return a<0||a>=this._renderResult.length?"":this._renderResult[a]}}var Ji=t("GJhM"),ui=t("MD5Z");class pn extends le{constructor(o,n,a,T){super(o);const N=this._context.configuration.options,Y=N.get(91),be=N.get(66),xe=N.get(34),Ke=N.get(94),Ze={listenOnDomNode:a.domNode,className:"editor-scrollable "+Object(so.e)(o.theme.type),useShadows:!1,lazyRender:!0,vertical:Y.vertical,horizontal:Y.horizontal,verticalHasArrows:Y.verticalHasArrows,horizontalHasArrows:Y.horizontalHasArrows,verticalScrollbarSize:Y.verticalScrollbarSize,verticalSliderSize:Y.verticalSliderSize,horizontalScrollbarSize:Y.horizontalScrollbarSize,horizontalSliderSize:Y.horizontalSliderSize,handleMouseWheel:Y.handleMouseWheel,alwaysConsumeMouseWheel:Y.alwaysConsumeMouseWheel,arrowSize:Y.arrowSize,mouseWheelScrollSensitivity:be,fastScrollSensitivity:xe,scrollPredominantAxis:Ke,scrollByPage:Y.scrollByPage};this.scrollbar=this._register(new Ji.c(n.domNode,Ze,this._context.viewLayout.getScrollable())),_e.write(this.scrollbar.getDomNode(),5),this.scrollbarDomNode=Object(u.b)(this.scrollbar.getDomNode()),this.scrollbarDomNode.setPosition("absolute"),this._setLayout();const nt=(Ot,ft,kt)=>{const Gt={};if(ft){const eo=Ot.scrollTop;eo&&(Gt.scrollTop=this._context.viewLayout.getCurrentScrollTop()+eo,Ot.scrollTop=0)}if(kt){const eo=Ot.scrollLeft;eo&&(Gt.scrollLeft=this._context.viewLayout.getCurrentScrollLeft()+eo,Ot.scrollLeft=0)}this._context.model.setScrollPosition(Gt,1)};this._register(v.i(a.domNode,"scroll",Ot=>nt(a.domNode,!0,!0))),this._register(v.i(n.domNode,"scroll",Ot=>nt(n.domNode,!0,!1))),this._register(v.i(T.domNode,"scroll",Ot=>nt(T.domNode,!0,!1))),this._register(v.i(this.scrollbarDomNode.domNode,"scroll",Ot=>nt(this.scrollbarDomNode.domNode,!0,!1)))}dispose(){super.dispose()}_setLayout(){const o=this._context.configuration.options,n=o.get(129);this.scrollbarDomNode.setLeft(n.contentLeft);const a=o.get(64),T=a.side;T==="right"?this.scrollbarDomNode.setWidth(n.contentWidth+n.minimap.minimapWidth):this.scrollbarDomNode.setWidth(n.contentWidth),this.scrollbarDomNode.setHeight(n.height)}getOverviewRulerLayoutInfo(){return this.scrollbar.getOverviewRulerLayoutInfo()}getDomNode(){return this.scrollbarDomNode}delegateVerticalScrollbarMouseDown(o){this.scrollbar.delegateVerticalScrollbarMouseDown(o)}onConfigurationChanged(o){if(o.hasChanged(91)||o.hasChanged(66)||o.hasChanged(34)){const n=this._context.configuration.options,a=n.get(91),T=n.get(66),N=n.get(34),Y=n.get(94),be={vertical:a.vertical,horizontal:a.horizontal,verticalScrollbarSize:a.verticalScrollbarSize,horizontalScrollbarSize:a.horizontalScrollbarSize,scrollByPage:a.scrollByPage,handleMouseWheel:a.handleMouseWheel,mouseWheelScrollSensitivity:T,fastScrollSensitivity:N,scrollPredominantAxis:Y};this.scrollbar.updateOptions(be)}return o.hasChanged(129)&&this._setLayout(),!0}onScrollChanged(o){return!0}onThemeChanged(o){return this.scrollbar.updateClassName("editor-scrollable "+Object(so.e)(this._context.theme.type)),!0}prepareRender(o){}render(o){this.scrollbar.renderNow()}}Object(so.f)((o,n)=>{const a=o.getColor(ui.yc);a&&n.addRule(`
|
|
|
.monaco-scrollable-element > .shadow.top {
|
|
|
box-shadow: ${a} 0 6px 6px -6px inset;
|
|
|
}
|
|
|
|
|
|
.monaco-scrollable-element > .shadow.left {
|
|
|
box-shadow: ${a} 6px 0 6px -6px inset;
|
|
|
}
|
|
|
|
|
|
.monaco-scrollable-element > .shadow.top.left {
|
|
|
box-shadow: ${a} 6px 6px 6px -6px inset;
|
|
|
}
|
|
|
`);const T=o.getColor(ui.Ac);T&&n.addRule(`
|
|
|
.monaco-scrollable-element > .scrollbar > .slider {
|
|
|
background: ${T};
|
|
|
}
|
|
|
`);const N=o.getColor(ui.Bc);N&&n.addRule(`
|
|
|
.monaco-scrollable-element > .scrollbar > .slider:hover {
|
|
|
background: ${N};
|
|
|
}
|
|
|
`);const Y=o.getColor(ui.zc);Y&&n.addRule(`
|
|
|
.monaco-scrollable-element > .scrollbar > .slider.active {
|
|
|
background: ${Y};
|
|
|
}
|
|
|
`)});var Hi=t("hHjc");class Oi{constructor(o,n,a){this._decorationToRenderBrand=void 0,this.startLineNumber=+o,this.endLineNumber=+n,this.className=String(a)}}class Ii extends Wt{_render(o,n,a){const T=[];for(let be=o;be<=n;be++){const xe=be-o;T[xe]=[]}if(a.length===0)return T;a.sort((be,xe)=>be.className===xe.className?be.startLineNumber===xe.startLineNumber?be.endLineNumber-xe.endLineNumber:be.startLineNumber-xe.startLineNumber:be.className<xe.className?-1:1);let N=null,Y=0;for(let be=0,xe=a.length;be<xe;be++){const Ke=a[be],Ze=Ke.className;let nt=Math.max(Ke.startLineNumber,o)-o;const Ot=Math.min(Ke.endLineNumber,n)-o;N===Ze?(nt=Math.max(Y+1,nt),Y=Math.max(Y,Ot)):(N=Ze,Y=Ot);for(let ft=nt;ft<=Y;ft++)T[ft].push(N)}return T}}class Qi extends Ii{constructor(o){super();this._context=o;const n=this._context.configuration.options,a=n.get(129);this._lineHeight=n.get(58),this._glyphMargin=n.get(49),this._glyphMarginLeft=a.glyphMarginLeft,this._glyphMarginWidth=a.glyphMarginWidth,this._renderResult=null,this._context.addEventHandler(this)}dispose(){this._context.removeEventHandler(this),this._renderResult=null,super.dispose()}onConfigurationChanged(o){const n=this._context.configuration.options,a=n.get(129);return this._lineHeight=n.get(58),this._glyphMargin=n.get(49),this._glyphMarginLeft=a.glyphMarginLeft,this._glyphMarginWidth=a.glyphMarginWidth,!0}onDecorationsChanged(o){return!0}onFlushed(o){return!0}onLinesChanged(o){return!0}onLinesDeleted(o){return!0}onLinesInserted(o){return!0}onScrollChanged(o){return o.scrollTopChanged}onZonesChanged(o){return!0}_getDecorations(o){const n=o.getDecorationsInViewport();let a=[],T=0;for(let N=0,Y=n.length;N<Y;N++){const be=n[N],xe=be.options.glyphMarginClassName;xe&&(a[T++]=new Oi(be.range.startLineNumber,be.range.endLineNumber,xe))}return a}prepareRender(o){if(!this._glyphMargin){this._renderResult=null;return}const n=o.visibleRange.startLineNumber,a=o.visibleRange.endLineNumber,T=this._render(n,a,this._getDecorations(o)),N=this._lineHeight.toString(),Y=this._glyphMarginLeft.toString(),be=this._glyphMarginWidth.toString(),xe='" style="left:'+Y+"px;width:"+be+"px;height:"+N+'px;"></div>',Ke=[];for(let Ze=n;Ze<=a;Ze++){const nt=Ze-n,Ot=T[nt];Ot.length===0?Ke[nt]="":Ke[nt]='<div class="cgmr codicon '+Ot.join(" ")+xe}this._renderResult=Ke}render(o,n){if(!this._renderResult)return"";const a=n-o;return a<0||a>=this._renderResult.length?"":this._renderResult[a]}}var Li=t("C6rC"),Ui=t("M1Kb"),fi=t("tX9W"),$i=t("746U");class rn extends Wt{constructor(o){super();this._context=o,this._primaryPosition=null;const n=this._context.configuration.options,a=n.get(130),T=n.get(43);this._lineHeight=n.get(58),this._spaceWidth=T.spaceWidth,this._maxIndentLeft=a.wrappingColumn===-1?-1:a.wrappingColumn*T.typicalHalfwidthCharacterWidth,this._bracketPairGuideOptions=n.get(13),this._renderResult=null,this._context.addEventHandler(this)}dispose(){this._context.removeEventHandler(this),this._renderResult=null,super.dispose()}onConfigurationChanged(o){const n=this._context.configuration.options,a=n.get(130),T=n.get(43);return this._lineHeight=n.get(58),this._spaceWidth=T.spaceWidth,this._maxIndentLeft=a.wrappingColumn===-1?-1:a.wrappingColumn*T.typicalHalfwidthCharacterWidth,this._bracketPairGuideOptions=n.get(13),!0}onCursorStateChanged(o){var n;const a=o.selections[0],T=a.getPosition();return((n=this._primaryPosition)===null||n===void 0?void 0:n.equals(T))?!1:(this._primaryPosition=T,!0)}onDecorationsChanged(o){return!0}onFlushed(o){return!0}onLinesChanged(o){return!0}onLinesDeleted(o){return!0}onLinesInserted(o){return!0}onScrollChanged(o){return o.scrollTopChanged}onZonesChanged(o){return!0}onLanguageConfigurationChanged(o){return!0}prepareRender(o){var n,a,T,N;if(!this._bracketPairGuideOptions.indentation&&this._bracketPairGuideOptions.bracketPairs===!1){this._renderResult=null;return}const Y=o.visibleRange.startLineNumber,be=o.visibleRange.endLineNumber,xe=o.scrollWidth,Ke=this._lineHeight,Ze=this._primaryPosition,nt=this.getGuidesByLine(Y,be,Ze),Ot=[];for(let ft=Y;ft<=be;ft++){const kt=ft-Y,Gt=nt[kt];let eo="";const co=(a=(n=o.visibleRangeForPosition(new U.a(ft,1)))===null||n===void 0?void 0:n.left)!==null&&a!==void 0?a:0;for(const go of Gt){const yo=co+(go.visibleColumn-1)*this._spaceWidth;if(yo>xe||this._maxIndentLeft>0&&yo>this._maxIndentLeft)break;const jo=go.horizontalLine?go.horizontalLine.top?"horizontal-top":"horizontal-bottom":"vertical",Po=go.horizontalLine?((N=(T=o.visibleRangeForPosition(new U.a(ft,go.horizontalLine.endColumn)))===null||T===void 0?void 0:T.left)!==null&&N!==void 0?N:yo+this._spaceWidth)-yo:this._spaceWidth;eo+=`<div class="core-guide ${go.className} ${jo}" style="left:${yo}px;height:${Ke}px;width:${Po}px"></div>`}Ot[kt]=eo}this._renderResult=Ot}getGuidesByLine(o,n,a){const T=this._bracketPairGuideOptions.bracketPairs!==!1?this._context.model.getBracketGuidesInRangeByLine(o,n,a,{highlightActive:this._bracketPairGuideOptions.highlightActiveBracketPair,horizontalGuides:this._bracketPairGuideOptions.bracketPairsHorizontal===!0?Ui.c.Enabled:this._bracketPairGuideOptions.bracketPairsHorizontal==="active"?Ui.c.EnabledForActive:Ui.c.Disabled,includeInactive:this._bracketPairGuideOptions.bracketPairs===!0}):null,N=this._bracketPairGuideOptions.indentation?this._context.model.getLinesIndentGuides(o,n):null;let Y=0,be=0,xe=0;if(this._bracketPairGuideOptions.highlightActiveIndentation&&a){const nt=this._context.model.getActiveIndentGuide(a.lineNumber,o,n);Y=nt.startLineNumber,be=nt.endLineNumber,xe=nt.indent}const{indentSize:Ke}=this._context.model.getTextModelOptions(),Ze=[];for(let nt=o;nt<=n;nt++){const Ot=new Array;Ze.push(Ot);const ft=T?T[nt-o]:[],kt=new vi.a(ft),Gt=N?N[nt-o]:[];for(let eo=1;eo<=Gt;eo++){const co=(eo-1)*Ke+1,go=ft.length===0&&Y<=nt&&nt<=be&&eo===xe;Ot.push(...kt.takeWhile(jo=>jo.visibleColumn<co)||[]);const yo=kt.peek();(!yo||yo.visibleColumn!==co||yo.horizontalLine)&&Ot.push(new Ui.d(co,go?"core-guide-indent-active":"core-guide-indent",null))}Ot.push(...kt.takeWhile(eo=>!0)||[])}return Ze}render(o,n){if(!this._renderResult)return"";const a=n-o;return a<0||a>=this._renderResult.length?"":this._renderResult[a]}}function _i(o){return o&&o.isTransparent()?void 0:o}Object(so.f)((o,n)=>{const a=o.getColor(zt.A);a&&n.addRule(`.monaco-editor .lines-content .core-guide-indent { box-shadow: 1px 0 0 0 ${a} inset; }`);const T=o.getColor(zt.a)||a;T&&n.addRule(`.monaco-editor .lines-content .core-guide-indent-active { box-shadow: 1px 0 0 0 ${T} inset; }`);const N=[{bracketColor:zt.c,guideColor:zt.r,guideColorActive:zt.l},{bracketColor:zt.d,guideColor:zt.s,guideColorActive:zt.m},{bracketColor:zt.e,guideColor:zt.t,guideColorActive:zt.n},{bracketColor:zt.f,guideColor:zt.u,guideColorActive:zt.o},{bracketColor:zt.g,guideColor:zt.v,guideColorActive:zt.p},{bracketColor:zt.h,guideColor:zt.w,guideColorActive:zt.q}],Y=new fi.a;let be=N.map(xe=>{var Ke,Ze;const nt=o.getColor(xe.bracketColor),Ot=o.getColor(xe.guideColor),ft=o.getColor(xe.guideColorActive),kt=_i((Ke=_i(Ot))!==null&&Ke!==void 0?Ke:nt==null?void 0:nt.transparent(.3)),Gt=_i((Ze=_i(ft))!==null&&Ze!==void 0?Ze:nt);return!kt||!Gt?void 0:{guideColor:kt,guideColorActive:Gt}}).filter($i.h);if(be.length>0){for(let xe=0;xe<30;xe++){const Ke=be[xe%be.length];n.addRule(`.monaco-editor .${Y.getInlineClassNameOfLevel(xe).replace(/ /g,".")} { --guide-color: ${Ke.guideColor}; --guide-color-active: ${Ke.guideColorActive}; }`)}n.addRule(".monaco-editor .vertical { box-shadow: 1px 0 0 0 var(--guide-color) inset; }"),n.addRule(".monaco-editor .horizontal-top { border-top: 1px solid var(--guide-color); }"),n.addRule(".monaco-editor .horizontal-bottom { border-bottom: 1px solid var(--guide-color); }"),n.addRule(`.monaco-editor .vertical.${Y.activeClassName} { box-shadow: 1px 0 0 0 var(--guide-color-active) inset; }`),n.addRule(`.monaco-editor .horizontal-top.${Y.activeClassName} { border-top: 1px solid var(--guide-color-active); }`),n.addRule(`.monaco-editor .horizontal-bottom.${Y.activeClassName} { border-bottom: 1px solid var(--guide-color-active); }`)}});var Pi=t("OKK6");class gt{constructor(){this._currentVisibleRange=new se.a(1,1,1,1)}getCurrentVisibleRange(){return this._currentVisibleRange}setCurrentVisibleRange(o){this._currentVisibleRange=o}}class Ge{constructor(o,n,a,T,N,Y){this.lineNumber=o,this.startColumn=n,this.endColumn=a,this.startScrollTop=T,this.stopScrollTop=N,this.scrollType=Y,this.type="range",this.minLineNumber=o,this.maxLineNumber=o}}class ${constructor(o,n,a,T){this.selections=o,this.startScrollTop=n,this.stopScrollTop=a,this.scrollType=T,this.type="selections";let N=o[0].startLineNumber,Y=o[0].endLineNumber;for(let be=1,xe=o.length;be<xe;be++){const Ke=o[be];N=Math.min(N,Ke.startLineNumber),Y=Math.max(Y,Ke.endLineNumber)}this.minLineNumber=N,this.maxLineNumber=Y}}class Ee extends le{constructor(o,n){super(o);this._linesContent=n,this._textRangeRestingSpot=document.createElement("div"),this._visibleLines=new zo(this),this.domNode=this._visibleLines.domNode;const a=this._context.configuration,T=this._context.configuration.options,N=T.get(43),Y=T.get(130);this._lineHeight=T.get(58),this._typicalHalfwidthCharacterWidth=N.typicalHalfwidthCharacterWidth,this._isViewportWrapping=Y.isViewportWrapping,this._revealHorizontalRightPadding=T.get(88),this._cursorSurroundingLines=T.get(25),this._cursorSurroundingLinesStyle=T.get(26),this._canUseLayerHinting=!T.get(28),this._viewLineOptions=new Se(a,this._context.theme.type),_e.write(this.domNode,7),this.domNode.setClassName(`view-lines ${_o.a}`),L.a.applyFontInfo(this.domNode,N),this._maxLineWidth=0,this._asyncUpdateLineWidths=new E.e(()=>{this._updateLineWidthsSlow()},200),this._asyncCheckMonospaceFontAssumptions=new E.e(()=>{this._checkMonospaceFontAssumptions()},2e3),this._lastRenderedData=new gt,this._horizontalRevealRequest=null}dispose(){this._asyncUpdateLineWidths.dispose(),this._asyncCheckMonospaceFontAssumptions.dispose(),super.dispose()}getDomNode(){return this.domNode}createVisibleLine(){return new me(this._viewLineOptions)}onConfigurationChanged(o){this._visibleLines.onConfigurationChanged(o),o.hasChanged(130)&&(this._maxLineWidth=0);const n=this._context.configuration.options,a=n.get(43),T=n.get(130);return this._lineHeight=n.get(58),this._typicalHalfwidthCharacterWidth=a.typicalHalfwidthCharacterWidth,this._isViewportWrapping=T.isViewportWrapping,this._revealHorizontalRightPadding=n.get(88),this._cursorSurroundingLines=n.get(25),this._cursorSurroundingLinesStyle=n.get(26),this._canUseLayerHinting=!n.get(28),L.a.applyFontInfo(this.domNode,a),this._onOptionsMaybeChanged(),o.hasChanged(129)&&(this._maxLineWidth=0),!0}_onOptionsMaybeChanged(){const o=this._context.configuration,n=new Se(o,this._context.theme.type);if(!this._viewLineOptions.equals(n)){this._viewLineOptions=n;const a=this._visibleLines.getStartLineNumber(),T=this._visibleLines.getEndLineNumber();for(let N=a;N<=T;N++){const Y=this._visibleLines.getVisibleLine(N);Y.onOptionsChanged(this._viewLineOptions)}return!0}return!1}onCursorStateChanged(o){const n=this._visibleLines.getStartLineNumber(),a=this._visibleLines.getEndLineNumber();let T=!1;for(let N=n;N<=a;N++)T=this._visibleLines.getVisibleLine(N).onSelectionChanged()||T;return T}onDecorationsChanged(o){{const n=this._visibleLines.getStartLineNumber(),a=this._visibleLines.getEndLineNumber();for(let T=n;T<=a;T++)this._visibleLines.getVisibleLine(T).onDecorationsChanged()}return!0}onFlushed(o){const n=this._visibleLines.onFlushed(o);return this._maxLineWidth=0,n}onLinesChanged(o){return this._visibleLines.onLinesChanged(o)}onLinesDeleted(o){return this._visibleLines.onLinesDeleted(o)}onLinesInserted(o){return this._visibleLines.onLinesInserted(o)}onRevealRangeRequest(o){const n=this._computeScrollTopToRevealRange(this._context.viewLayout.getFutureViewport(),o.source,o.range,o.selections,o.verticalType);if(n===-1)return!1;let a=this._context.viewLayout.validateScrollPosition({scrollTop:n});o.revealHorizontal?o.range&&o.range.startLineNumber!==o.range.endLineNumber?a={scrollTop:a.scrollTop,scrollLeft:0}:o.range?this._horizontalRevealRequest=new Ge(o.range.startLineNumber,o.range.startColumn,o.range.endColumn,this._context.viewLayout.getCurrentScrollTop(),a.scrollTop,o.scrollType):o.selections&&o.selections.length>0&&(this._horizontalRevealRequest=new $(o.selections,this._context.viewLayout.getCurrentScrollTop(),a.scrollTop,o.scrollType)):this._horizontalRevealRequest=null;const T=Math.abs(this._context.viewLayout.getCurrentScrollTop()-a.scrollTop),N=T<=this._lineHeight?1:o.scrollType;return this._context.model.setScrollPosition(a,N),!0}onScrollChanged(o){if(this._horizontalRevealRequest&&o.scrollLeftChanged&&(this._horizontalRevealRequest=null),this._horizontalRevealRequest&&o.scrollTopChanged){const n=Math.min(this._horizontalRevealRequest.startScrollTop,this._horizontalRevealRequest.stopScrollTop),a=Math.max(this._horizontalRevealRequest.startScrollTop,this._horizontalRevealRequest.stopScrollTop);(o.scrollTop<n||o.scrollTop>a)&&(this._horizontalRevealRequest=null)}return this.domNode.setWidth(o.scrollWidth),this._visibleLines.onScrollChanged(o)||!0}onTokensChanged(o){return this._visibleLines.onTokensChanged(o)}onZonesChanged(o){return this._context.model.setMaxLineWidth(this._maxLineWidth),this._visibleLines.onZonesChanged(o)}onThemeChanged(o){return this._onOptionsMaybeChanged()}getPositionFromDOMInfo(o,n){const a=this._getViewLineDomNode(o);if(a===null)return null;const T=this._getLineNumberFor(a);if(T===-1)return null;if(T<1||T>this._context.model.getLineCount())return null;if(this._context.model.getLineMaxColumn(T)===1)return new U.a(T,1);const N=this._visibleLines.getStartLineNumber(),Y=this._visibleLines.getEndLineNumber();if(T<N||T>Y)return null;let be=this._visibleLines.getVisibleLine(T).getColumnOfNodeOffset(T,o,n);const xe=this._context.model.getLineMinColumn(T);return be<xe&&(be=xe),new U.a(T,be)}_getViewLineDomNode(o){for(;o&&o.nodeType===1;){if(o.className===me.CLASS_NAME)return o;o=o.parentElement}return null}_getLineNumberFor(o){const n=this._visibleLines.getStartLineNumber(),a=this._visibleLines.getEndLineNumber();for(let T=n;T<=a;T++){const N=this._visibleLines.getVisibleLine(T);if(o===N.getDomNode())return T}return-1}getLineWidth(o){const n=this._visibleLines.getStartLineNumber(),a=this._visibleLines.getEndLineNumber();return o<n||o>a?-1:this._visibleLines.getVisibleLine(o).getWidth()}linesVisibleRangesForRange(o,n){if(this.shouldRender())return null;const a=o.endLineNumber,T=se.a.intersectRanges(o,this._lastRenderedData.getCurrentVisibleRange());if(!T)return null;let N=[],Y=0;const be=new Be(this.domNode.domNode,this._textRangeRestingSpot);let xe=0;n&&(xe=this._context.model.coordinatesConverter.convertViewPositionToModelPosition(new U.a(T.startLineNumber,1)).lineNumber);const Ke=this._visibleLines.getStartLineNumber(),Ze=this._visibleLines.getEndLineNumber();for(let nt=T.startLineNumber;nt<=T.endLineNumber;nt++){if(nt<Ke||nt>Ze)continue;const Ot=nt===T.startLineNumber?T.startColumn:1,ft=nt===T.endLineNumber?T.endColumn:this._context.model.getLineMaxColumn(nt),kt=this._visibleLines.getVisibleLine(nt).getVisibleRangesForRange(nt,Ot,ft,be);if(!kt)continue;if(n&&nt<a){const Gt=xe;xe=this._context.model.coordinatesConverter.convertViewPositionToModelPosition(new U.a(nt+1,1)).lineNumber,Gt!==xe&&(kt.ranges[kt.ranges.length-1].width+=this._typicalHalfwidthCharacterWidth)}N[Y++]=new ae(kt.outsideRenderedLine,nt,V.from(kt.ranges))}return Y===0?null:N}_visibleRangesForLineRange(o,n,a){return this.shouldRender()||(o<this._visibleLines.getStartLineNumber()||o>this._visibleLines.getEndLineNumber())?null:this._visibleLines.getVisibleLine(o).getVisibleRangesForRange(o,n,a,new Be(this.domNode.domNode,this._textRangeRestingSpot))}visibleRangeForPosition(o){const n=this._visibleRangesForLineRange(o.lineNumber,o.column,o.column);return n?new ee(n.outsideRenderedLine,n.ranges[0].left):null}updateLineWidths(){this._updateLineWidths(!1)}_updateLineWidthsFast(){return this._updateLineWidths(!0)}_updateLineWidthsSlow(){this._updateLineWidths(!1)}_updateLineWidths(o){const n=this._visibleLines.getStartLineNumber(),a=this._visibleLines.getEndLineNumber();let T=1,N=!0;for(let Y=n;Y<=a;Y++){const be=this._visibleLines.getVisibleLine(Y);if(o&&!be.getWidthIsFast()){N=!1;continue}T=Math.max(T,be.getWidth())}return N&&n===1&&a===this._context.model.getLineCount()&&(this._maxLineWidth=0),this._ensureMaxLineWidth(T),N}_checkMonospaceFontAssumptions(){let o=-1,n=-1;const a=this._visibleLines.getStartLineNumber(),T=this._visibleLines.getEndLineNumber();for(let N=a;N<=T;N++){const Y=this._visibleLines.getVisibleLine(N);if(Y.needsMonospaceFontCheck()){const be=Y.getWidth();be>n&&(n=be,o=N)}}if(o===-1)return;if(!this._visibleLines.getVisibleLine(o).monospaceAssumptionsAreValid())for(let N=a;N<=T;N++){const Y=this._visibleLines.getVisibleLine(N);Y.onMonospaceAssumptionsInvalidated()}}prepareRender(){throw new Error("Not supported")}render(){throw new Error("Not supported")}renderText(o){if(this._visibleLines.renderLines(o),this._lastRenderedData.setCurrentVisibleRange(o.visibleRange),this.domNode.setWidth(this._context.viewLayout.getScrollWidth()),this.domNode.setHeight(Math.min(this._context.viewLayout.getScrollHeight(),1e6)),this._horizontalRevealRequest){const a=this._horizontalRevealRequest;if(o.startLineNumber<=a.minLineNumber&&a.maxLineNumber<=o.endLineNumber){this._horizontalRevealRequest=null,this.onDidRender();const T=this._computeScrollLeftToReveal(a);T&&(this._isViewportWrapping||this._ensureMaxLineWidth(T.maxHorizontalOffset),this._context.model.setScrollPosition({scrollLeft:T.scrollLeft},a.scrollType))}}if(this._updateLineWidthsFast()||this._asyncUpdateLineWidths.schedule(),c.d&&!this._asyncCheckMonospaceFontAssumptions.isScheduled()){const a=this._visibleLines.getStartLineNumber(),T=this._visibleLines.getEndLineNumber();for(let N=a;N<=T;N++){const Y=this._visibleLines.getVisibleLine(N);if(Y.needsMonospaceFontCheck()){this._asyncCheckMonospaceFontAssumptions.schedule();break}}}this._linesContent.setLayerHinting(this._canUseLayerHinting),this._linesContent.setContain("strict");const n=this._context.viewLayout.getCurrentScrollTop()-o.bigNumbersDelta;this._linesContent.setTop(-n),this._linesContent.setLeft(-this._context.viewLayout.getCurrentScrollLeft())}_ensureMaxLineWidth(o){const n=Math.ceil(o);this._maxLineWidth<n&&(this._maxLineWidth=n,this._context.model.setMaxLineWidth(this._maxLineWidth))}_computeScrollTopToRevealRange(o,n,a,T,N){const Y=o.top,be=o.height,xe=Y+be;let Ke,Ze,nt;if(T&&T.length>0){let kt=T[0].startLineNumber,Gt=T[0].endLineNumber;for(let eo=1,co=T.length;eo<co;eo++){const go=T[eo];kt=Math.min(kt,go.startLineNumber),Gt=Math.max(Gt,go.endLineNumber)}Ke=!1,Ze=this._context.viewLayout.getVerticalOffsetForLineNumber(kt),nt=this._context.viewLayout.getVerticalOffsetForLineNumber(Gt)+this._lineHeight}else if(a)Ke=!0,Ze=this._context.viewLayout.getVerticalOffsetForLineNumber(a.startLineNumber),nt=this._context.viewLayout.getVerticalOffsetForLineNumber(a.endLineNumber)+this._lineHeight;else return-1;const Ot=n==="mouse"&&this._cursorSurroundingLinesStyle==="default";if(!Ot){const kt=Math.min(be/this._lineHeight/2,this._cursorSurroundingLines);Ze-=kt*this._lineHeight,nt+=Math.max(0,kt-1)*this._lineHeight}(N===0||N===4)&&(nt+=this._lineHeight);let ft;if(nt-Ze>be){if(!Ke)return-1;ft=Ze}else if(N===5||N===6)if(N===6&&Y<=Ze&&nt<=xe)ft=Y;else{const kt=Math.max(5*this._lineHeight,be*.2),Gt=Ze-kt,eo=nt-be;ft=Math.max(eo,Gt)}else if(N===1||N===2)if(N===2&&Y<=Ze&&nt<=xe)ft=Y;else{const kt=(Ze+nt)/2;ft=Math.max(0,kt-be/2)}else ft=this._computeMinimumScrolling(Y,xe,Ze,nt,N===3,N===4);return ft}_computeScrollLeftToReveal(o){const n=this._context.viewLayout.getCurrentViewport(),a=n.left,T=a+n.width;let N=1073741824,Y=0;if(o.type==="range"){const xe=this._visibleRangesForLineRange(o.lineNumber,o.startColumn,o.endColumn);if(!xe)return null;for(const Ke of xe.ranges)N=Math.min(N,Math.round(Ke.left)),Y=Math.max(Y,Math.round(Ke.left+Ke.width))}else for(const xe of o.selections){if(xe.startLineNumber!==xe.endLineNumber)return null;const Ke=this._visibleRangesForLineRange(xe.startLineNumber,xe.startColumn,xe.endColumn);if(!Ke)return null;for(const Ze of Ke.ranges)N=Math.min(N,Math.round(Ze.left)),Y=Math.max(Y,Math.round(Ze.left+Ze.width))}if(N=Math.max(0,N-Ee.HORIZONTAL_EXTRA_PX),Y+=this._revealHorizontalRightPadding,o.type==="selections"&&Y-N>n.width)return null;const be=this._computeMinimumScrolling(a,T,N,Y);return{scrollLeft:be,maxHorizontalOffset:Y}}_computeMinimumScrolling(o,n,a,T,N,Y){o=o|0,n=n|0,a=a|0,T=T|0,N=!!N,Y=!!Y;const be=n-o,xe=T-a;if(xe<be){if(N)return a;if(Y)return Math.max(0,T-be);if(a<o)return a;if(T>n)return Math.max(0,T-be)}else return a;return o}}Ee.HORIZONTAL_EXTRA_PX=30;var Ne=t("J+ZK");class He extends Ii{constructor(o){super();this._context=o;const n=this._context.configuration.options,a=n.get(129);this._decorationsLeft=a.decorationsLeft,this._decorationsWidth=a.decorationsWidth,this._renderResult=null,this._context.addEventHandler(this)}dispose(){this._context.removeEventHandler(this),this._renderResult=null,super.dispose()}onConfigurationChanged(o){const n=this._context.configuration.options,a=n.get(129);return this._decorationsLeft=a.decorationsLeft,this._decorationsWidth=a.decorationsWidth,!0}onDecorationsChanged(o){return!0}onFlushed(o){return!0}onLinesChanged(o){return!0}onLinesDeleted(o){return!0}onLinesInserted(o){return!0}onScrollChanged(o){return o.scrollTopChanged}onZonesChanged(o){return!0}_getDecorations(o){const n=o.getDecorationsInViewport();let a=[],T=0;for(let N=0,Y=n.length;N<Y;N++){const be=n[N],xe=be.options.linesDecorationsClassName;xe&&(a[T++]=new Oi(be.range.startLineNumber,be.range.endLineNumber,xe));const Ke=be.options.firstLineDecorationClassName;Ke&&(a[T++]=new Oi(be.range.startLineNumber,be.range.startLineNumber,Ke))}return a}prepareRender(o){const n=o.visibleRange.startLineNumber,a=o.visibleRange.endLineNumber,T=this._render(n,a,this._getDecorations(o)),N=this._decorationsLeft.toString(),Y=this._decorationsWidth.toString(),be='" style="left:'+N+"px;width:"+Y+'px;"></div>',xe=[];for(let Ke=n;Ke<=a;Ke++){const Ze=Ke-n,nt=T[Ze];let Ot="";for(let ft=0,kt=nt.length;ft<kt;ft++)Ot+='<div class="cldr '+nt[ft]+be;xe[Ze]=Ot}this._renderResult=xe}render(o,n){return this._renderResult?this._renderResult[n-o]:""}}var at=t("XXBq");class vt extends Ii{constructor(o){super();this._context=o,this._renderResult=null,this._context.addEventHandler(this)}dispose(){this._context.removeEventHandler(this),this._renderResult=null,super.dispose()}onConfigurationChanged(o){return!0}onDecorationsChanged(o){return!0}onFlushed(o){return!0}onLinesChanged(o){return!0}onLinesDeleted(o){return!0}onLinesInserted(o){return!0}onScrollChanged(o){return o.scrollTopChanged}onZonesChanged(o){return!0}_getDecorations(o){const n=o.getDecorationsInViewport();let a=[],T=0;for(let N=0,Y=n.length;N<Y;N++){const be=n[N],xe=be.options.marginClassName;xe&&(a[T++]=new Oi(be.range.startLineNumber,be.range.endLineNumber,xe))}return a}prepareRender(o){const n=o.visibleRange.startLineNumber,a=o.visibleRange.endLineNumber,T=this._render(n,a,this._getDecorations(o)),N=[];for(let Y=n;Y<=a;Y++){const be=Y-n,xe=T[be];let Ke="";for(let Ze=0,nt=xe.length;Ze<nt;Ze++)Ke+='<div class="cmdr '+xe[Ze]+'" style=""></div>';N[be]=Ke}this._renderResult=N}render(o,n){return this._renderResult?this._renderResult[n-o]:""}}var Xt=t("8gvo");class Bt{constructor(o,n,a,T){this._rgba8Brand=void 0,this.r=Bt._clamp(o),this.g=Bt._clamp(n),this.b=Bt._clamp(a),this.a=Bt._clamp(T)}equals(o){return this.r===o.r&&this.g===o.g&&this.b===o.b&&this.a===o.a}static _clamp(o){return o<0?0:o>255?255:o|0}}Bt.Empty=new Bt(0,0,0,0);var Kt=t("twdY");class ro extends d.a{constructor(){super();this._onDidChange=new m.b,this.onDidChange=this._onDidChange.event,this._updateColorMap(),this._register(Kt.E.onDidChange(o=>{o.changedColorMap&&this._updateColorMap()}))}static getInstance(){return this._INSTANCE||(this._INSTANCE=Object(d.h)(new ro)),this._INSTANCE}_updateColorMap(){const o=Kt.E.getColorMap();if(!o){this._colors=[Bt.Empty],this._backgroundIsLight=!0;return}this._colors=[Bt.Empty];for(let a=1;a<o.length;a++){const T=o[a].rgba;this._colors[a]=new Bt(T.r,T.g,T.b,Math.round(T.a*255))}let n=o[2].getRelativeLuminance();this._backgroundIsLight=n>=.5,this._onDidChange.fire(void 0)}getColor(o){return(o<1||o>=this._colors.length)&&(o=2),this._colors[o]}backgroundIsLight(){return this._backgroundIsLight}}ro._INSTANCE=null;var F=t("qNAo");const te=(()=>{const o=[];for(let n=32;n<=126;n++)o.push(n);return o.push(65533),o})(),Ae=(o,n)=>(o-=32,o<0||o>96?n<=2?(o+96)%96:96-1:o);var Ye=t("CZ1j");class pt{constructor(o,n){this.scale=n,this._minimapCharRendererBrand=void 0,this.charDataNormal=pt.soften(o,12/15),this.charDataLight=pt.soften(o,50/60)}static soften(o,n){let a=new Uint8ClampedArray(o.length);for(let T=0,N=o.length;T<N;T++)a[T]=Object(Ye.b)(o[T]*n);return a}renderChar(o,n,a,T,N,Y,be,xe,Ke,Ze,nt){const Ot=1*this.scale,ft=2*this.scale,kt=nt?1:ft;if(n+Ot>o.width||a+kt>o.height){console.warn("bad render request outside image data");return}const Gt=Ze?this.charDataLight:this.charDataNormal,eo=Ae(T,Ke),co=o.width*4,go=be.r,yo=be.g,jo=be.b,Po=N.r-go,ti=N.g-yo,oi=N.b-jo,$o=Math.max(Y,xe),Yo=o.data;let Ei=eo*Ot*ft,Ci=a*co+n*4;for(let bi=0;bi<kt;bi++){let ji=Ci;for(let ln=0;ln<Ot;ln++){const Xi=Gt[Ei++]/255*(Y/255);Yo[ji++]=go+Po*Xi,Yo[ji++]=yo+ti*Xi,Yo[ji++]=jo+oi*Xi,Yo[ji++]=$o}Ci+=co}}blockRenderChar(o,n,a,T,N,Y,be,xe){const Ke=1*this.scale,Ze=2*this.scale,nt=xe?1:Ze;if(n+Ke>o.width||a+nt>o.height){console.warn("bad render request outside image data");return}const Ot=o.width*4,ft=.5*(N/255),kt=Y.r,Gt=Y.g,eo=Y.b,co=T.r-kt,go=T.g-Gt,yo=T.b-eo,jo=kt+co*ft,Po=Gt+go*ft,ti=eo+yo*ft,oi=Math.max(N,be),$o=o.data;let Yo=a*Ot+n*4;for(let Ei=0;Ei<nt;Ei++){let Ci=Yo;for(let bi=0;bi<Ke;bi++)$o[Ci++]=jo,$o[Ci++]=Po,$o[Ci++]=ti,$o[Ci++]=oi;Yo+=Ot}}}var Mt=t("C/vA");const jt={"0":0,"1":1,"2":2,"3":3,"4":4,"5":5,"6":6,"7":7,"8":8,"9":9,A:10,B:11,C:12,D:13,E:14,F:15},$t=o=>{const n=new Uint8ClampedArray(o.length/2);for(let a=0;a<o.length;a+=2)n[a>>1]=jt[o[a]]<<4|jt[o[a+1]]&15;return n},uo={1:Object(Mt.a)(()=>$t("0000511D6300CF609C709645A78432005642574171487021003C451900274D35D762755E8B629C5BA856AF57BA649530C167D1512A272A3F6038604460398526BCA2A968DB6F8957C768BE5FBE2FB467CF5D8D5B795DC7625B5DFF50DE64C466DB2FC47CD860A65E9A2EB96CB54CE06DA763AB2EA26860524D3763536601005116008177A8705E53AB738E6A982F88BAA35B5F5B626D9C636B449B737E5B7B678598869A662F6B5B8542706C704C80736A607578685B70594A49715A4522E792")),2:Object(Mt.a)(()=>$t("000000000000000055394F383D2800008B8B1F210002000081B1CBCBCC820000847AAF6B9AAF2119BE08B8881AD60000A44FD07DCCF107015338130C00000000385972265F390B406E2437634B4B48031B12B8A0847000001E15B29A402F0000000000004B33460B00007A752C2A0000000000004D3900000084394B82013400ABA5CFC7AD9C0302A45A3E5A98AB000089A43382D97900008BA54AA087A70A0248A6A7AE6DBE0000BF6F94987EA40A01A06DCFA7A7A9030496C32F77891D0000A99FB1A0AFA80603B29AB9CA75930D010C0948354D3900000C0948354F37460D0028BE673D8400000000AF9D7B6E00002B007AA8933400007AA642675C2700007984CFB9C3985B768772A8A6B7B20000CAAECAAFC4B700009F94A6009F840009D09F9BA4CA9C0000CC8FC76DC87F0000C991C472A2000000A894A48CA7B501079BA2C9C69BA20000B19A5D3FA89000005CA6009DA2960901B0A7F0669FB200009D009E00B7890000DAD0F5D092820000D294D4C48BD10000B5A7A4A3B1A50402CAB6CBA6A2000000B5A7A4A3B1A8044FCDADD19D9CB00000B7778F7B8AAE0803C9AB5D3F5D3F00009EA09EA0BAB006039EA0989A8C7900009B9EF4D6B7C00000A9A7816CACA80000ABAC84705D3F000096DA635CDC8C00006F486F266F263D4784006124097B00374F6D2D6D2D6D4A3A95872322000000030000000000008D8939130000000000002E22A5C9CBC70600AB25C0B5C9B400061A2DB04CA67001082AA6BEBEBFC606002321DACBC19E03087AA08B6768380000282FBAC0B8CA7A88AD25BBA5A29900004C396C5894A6000040485A6E356E9442A32CD17EADA70000B4237923628600003E2DE9C1D7B500002F25BBA5A2990000231DB6AFB4A804023025C0B5CAB588062B2CBDBEC0C706882435A75CA20000002326BD6A82A908048B4B9A5A668000002423A09CB4BB060025259C9D8A7900001C1FCAB2C7C700002A2A9387ABA200002626A4A47D6E9D14333163A0C87500004B6F9C2D643A257049364936493647358A34438355497F1A0000A24C1D590000D38DFFBDD4CD3126"))};class io{static create(o,n){if(this.lastCreated&&o===this.lastCreated.scale&&n===this.lastFontFamily)return this.lastCreated;let a;return uo[o]?a=new pt(uo[o](),o):a=io.createFromSampleData(io.createSampleData(n).data,o),this.lastFontFamily=n,this.lastCreated=a,a}static createSampleData(o){const n=document.createElement("canvas"),a=n.getContext("2d");n.style.height=`${16}px`,n.height=16,n.width=96*10,n.style.width=96*10+"px",a.fillStyle="#ffffff",a.font=`bold ${16}px ${o}`,a.textBaseline="middle";let T=0;for(const N of te)a.fillText(String.fromCharCode(N),T,16/2),T+=10;return a.getImageData(0,0,96*10,16)}static createFromSampleData(o,n){const a=16*10*4*96;if(o.length!==a)throw new Error("Unexpected source in MinimapCharRenderer");let T=io._downsample(o,n);return new pt(T,n)}static _downsampleChar(o,n,a,T,N){const Y=1*N,be=2*N;let xe=T,Ke=0;for(let Ze=0;Ze<be;Ze++){const nt=Ze/be*16,Ot=(Ze+1)/be*16;for(let ft=0;ft<Y;ft++){const kt=ft/Y*10,Gt=(ft+1)/Y*10;let eo=0,co=0;for(let yo=nt;yo<Ot;yo++){const jo=n+Math.floor(yo)*3840,Po=1-(yo-Math.floor(yo));for(let ti=kt;ti<Gt;ti++){const oi=1-(ti-Math.floor(ti)),$o=jo+Math.floor(ti)*4,Yo=oi*Po;co+=Yo,eo+=o[$o]*o[$o+3]/255*Yo}}const go=eo/co;Ke=Math.max(Ke,go),a[xe++]=Object(Ye.b)(go)}}return Ke}static _downsample(o,n){const a=2*n*1*n,T=a*96,N=new Uint8ClampedArray(T);let Y=0,be=0,xe=0;for(let Ke=0;Ke<96;Ke++)xe=Math.max(xe,this._downsampleChar(o,be,N,Y,n)),Y+=a,be+=10*4;if(xe>0){const Ke=255/xe;for(let Ze=0;Ze<T;Ze++)N[Ze]*=Ke}return N}}const ho=140,mo=2;class Io{constructor(o,n,a){const T=o.options,N=T.get(127),Y=T.get(129),be=Y.minimap,xe=T.get(43),Ke=T.get(64);this.renderMinimap=be.renderMinimap,this.size=Ke.size,this.minimapHeightIsEditorHeight=be.minimapHeightIsEditorHeight,this.scrollBeyondLastLine=T.get(93),this.showSlider=Ke.showSlider,this.pixelRatio=N,this.typicalHalfwidthCharacterWidth=xe.typicalHalfwidthCharacterWidth,this.lineHeight=T.get(58),this.minimapLeft=be.minimapLeft,this.minimapWidth=be.minimapWidth,this.minimapHeight=Y.height,this.canvasInnerWidth=be.minimapCanvasInnerWidth,this.canvasInnerHeight=be.minimapCanvasInnerHeight,this.canvasOuterWidth=be.minimapCanvasOuterWidth,this.canvasOuterHeight=be.minimapCanvasOuterHeight,this.isSampling=be.minimapIsSampling,this.editorHeight=Y.height,this.fontScale=be.minimapScale,this.minimapLineHeight=be.minimapLineHeight,this.minimapCharWidth=1*this.fontScale,this.charRenderer=Object(Mt.a)(()=>io.create(this.fontScale,xe.fontFamily)),this.defaultBackgroundColor=a.getColor(2),this.backgroundColor=Io._getMinimapBackground(n,this.defaultBackgroundColor),this.foregroundAlpha=Io._getMinimapForegroundOpacity(n)}static _getMinimapBackground(o,n){const a=o.getColor(ui.Xb);return a?new Bt(a.rgba.r,a.rgba.g,a.rgba.b,Math.round(255*a.rgba.a)):n}static _getMinimapForegroundOpacity(o){const n=o.getColor(ui.ac);return n?Bt._clamp(Math.round(255*n.rgba.a)):255}equals(o){return this.renderMinimap===o.renderMinimap&&this.size===o.size&&this.minimapHeightIsEditorHeight===o.minimapHeightIsEditorHeight&&this.scrollBeyondLastLine===o.scrollBeyondLastLine&&this.showSlider===o.showSlider&&this.pixelRatio===o.pixelRatio&&this.typicalHalfwidthCharacterWidth===o.typicalHalfwidthCharacterWidth&&this.lineHeight===o.lineHeight&&this.minimapLeft===o.minimapLeft&&this.minimapWidth===o.minimapWidth&&this.minimapHeight===o.minimapHeight&&this.canvasInnerWidth===o.canvasInnerWidth&&this.canvasInnerHeight===o.canvasInnerHeight&&this.canvasOuterWidth===o.canvasOuterWidth&&this.canvasOuterHeight===o.canvasOuterHeight&&this.isSampling===o.isSampling&&this.editorHeight===o.editorHeight&&this.fontScale===o.fontScale&&this.minimapLineHeight===o.minimapLineHeight&&this.minimapCharWidth===o.minimapCharWidth&&this.defaultBackgroundColor&&this.defaultBackgroundColor.equals(o.defaultBackgroundColor)&&this.backgroundColor&&this.backgroundColor.equals(o.backgroundColor)&&this.foregroundAlpha===o.foregroundAlpha}}class Ao{constructor(o,n,a,T,N,Y,be,xe){this.scrollTop=o,this.scrollHeight=n,this.sliderNeeded=a,this._computedSliderRatio=T,this.sliderTop=N,this.sliderHeight=Y,this.startLineNumber=be,this.endLineNumber=xe}getDesiredScrollTopFromDelta(o){return Math.round(this.scrollTop+o/this._computedSliderRatio)}getDesiredScrollTopFromTouchLocation(o){return Math.round((o-this.sliderHeight/2)/this._computedSliderRatio)}static create(o,n,a,T,N,Y,be,xe,Ke,Ze,nt){const Ot=o.pixelRatio,ft=o.minimapLineHeight,kt=Math.floor(o.canvasInnerHeight/ft),Gt=o.lineHeight;if(o.minimapHeightIsEditorHeight){const Po=xe*o.lineHeight+(o.scrollBeyondLastLine?N-o.lineHeight:0),ti=Math.max(1,Math.floor(N*N/Po)),oi=Math.max(0,o.minimapHeight-ti),$o=oi/(Ze-N),Yo=Ke*$o,Ei=oi>0,Ci=Math.floor(o.canvasInnerHeight/o.minimapLineHeight);return new Ao(Ke,Ze,Ei,$o,Yo,ti,1,Math.min(be,Ci))}let eo;if(Y&&a!==be){const Po=a-n+1;eo=Math.floor(Po*ft/Ot)}else{const Po=N/Gt;eo=Math.floor(Po*ft/Ot)}let co;o.scrollBeyondLastLine?co=(be-1)*ft/Ot:co=Math.max(0,be*ft/Ot-eo),co=Math.min(o.minimapHeight-eo,co);const go=co/(Ze-N),yo=Ke*go;let jo=0;if(o.scrollBeyondLastLine){const Po=N/Gt;jo=Po-1}if(kt>=be+jo){const Po=1,ti=be,oi=co>0;return new Ao(Ke,Ze,oi,go,yo,eo,Po,ti)}else{let Po=Math.max(1,Math.floor(n-yo*Ot/ft));nt&&nt.scrollHeight===Ze&&(nt.scrollTop>Ke&&(Po=Math.min(Po,nt.startLineNumber)),nt.scrollTop<Ke&&(Po=Math.max(Po,nt.startLineNumber)));const ti=Math.min(be,Po+kt-1),oi=(Ke-T)/Gt,$o=(n-Po+oi)*ft/Ot;return new Ao(Ke,Ze,!0,go,$o,eo,Po,ti)}}}class Oo{constructor(o){this.dy=o}onContentChanged(){this.dy=-1}onTokensChanged(){this.dy=-1}}Oo.INVALID=new Oo(-1);class Wo{constructor(o,n,a){this.renderedLayout=o,this._imageData=n,this._renderedLines=new Ro(()=>Oo.INVALID),this._renderedLines._set(o.startLineNumber,a)}linesEquals(o){if(!this.scrollEquals(o))return!1;const n=this._renderedLines._get(),a=n.lines;for(let T=0,N=a.length;T<N;T++)if(a[T].dy===-1)return!1;return!0}scrollEquals(o){return this.renderedLayout.startLineNumber===o.startLineNumber&&this.renderedLayout.endLineNumber===o.endLineNumber}_get(){const o=this._renderedLines._get();return{imageData:this._imageData,rendLineNumberStart:o.rendLineNumberStart,lines:o.lines}}onLinesChanged(o,n){return this._renderedLines.onLinesChanged(o,n)}onLinesDeleted(o,n){this._renderedLines.onLinesDeleted(o,n)}onLinesInserted(o,n){this._renderedLines.onLinesInserted(o,n)}onTokensChanged(o){return this._renderedLines.onTokensChanged(o)}}class si{constructor(o,n,a,T){this._backgroundFillData=si._createBackgroundFillData(n,a,T),this._buffers=[o.createImageData(n,a),o.createImageData(n,a)],this._lastUsedBuffer=0}getBuffer(){this._lastUsedBuffer=1-this._lastUsedBuffer;const o=this._buffers[this._lastUsedBuffer];return o.data.set(this._backgroundFillData),o}static _createBackgroundFillData(o,n,a){const T=a.r,N=a.g,Y=a.b,be=a.a,xe=new Uint8ClampedArray(o*n*4);let Ke=0;for(let Ze=0;Ze<n;Ze++)for(let nt=0;nt<o;nt++)xe[Ke]=T,xe[Ke+1]=N,xe[Ke+2]=Y,xe[Ke+3]=be,Ke+=4;return xe}}class hi{constructor(o,n){this.samplingRatio=o,this.minimapLines=n}static compute(o,n,a){if(o.renderMinimap===0||!o.isSampling)return[null,[]];const T=o.pixelRatio,N=o.lineHeight,Y=o.scrollBeyondLastLine,{minimapLineCount:be}=Xe.f.computeContainedMinimapLineCount({viewLineCount:n,scrollBeyondLastLine:Y,height:o.editorHeight,lineHeight:N,pixelRatio:T}),xe=n/be,Ke=xe/2;if(!a||a.minimapLines.length===0){let yo=[];if(yo[0]=1,be>1){for(let jo=0,Po=be-1;jo<Po;jo++)yo[jo]=Math.round(jo*xe+Ke);yo[be-1]=n}return[new hi(xe,yo),[]]}const Ze=a.minimapLines,nt=Ze.length;let Ot=[],ft=0,kt=0,Gt=1;const eo=10;let co=[],go=null;for(let yo=0;yo<be;yo++){const jo=Math.max(Gt,Math.round(yo*xe)),Po=Math.max(jo,Math.round((yo+1)*xe));for(;ft<nt&&Ze[ft]<jo;){if(co.length<eo){const oi=ft+1+kt;go&&go.type==="deleted"&&go._oldIndex===ft-1?go.deleteToLineNumber++:(go={type:"deleted",_oldIndex:ft,deleteFromLineNumber:oi,deleteToLineNumber:oi},co.push(go)),kt--}ft++}let ti;if(ft<nt&&Ze[ft]<=Po)ti=Ze[ft],ft++;else if(yo===0?ti=1:yo+1===be?ti=n:ti=Math.round(yo*xe+Ke),co.length<eo){const oi=ft+1+kt;go&&go.type==="inserted"&&go._i===yo-1?go.insertToLineNumber++:(go={type:"inserted",_i:yo,insertFromLineNumber:oi,insertToLineNumber:oi},co.push(go)),kt++}Ot[yo]=ti,Gt=ti}if(co.length<eo)for(;ft<nt;){const yo=ft+1+kt;go&&go.type==="deleted"&&go._oldIndex===ft-1?go.deleteToLineNumber++:(go={type:"deleted",_oldIndex:ft,deleteFromLineNumber:yo,deleteToLineNumber:yo},co.push(go)),kt--,ft++}else co=[{type:"flush"}];return[new hi(xe,Ot),co]}modelLineToMinimapLine(o){return Math.min(this.minimapLines.length,Math.max(1,Math.round(o/this.samplingRatio)))}modelLineRangeToMinimapLineRange(o,n){let a=this.modelLineToMinimapLine(o)-1;for(;a>0&&this.minimapLines[a-1]>=o;)a--;let T=this.modelLineToMinimapLine(n)-1;for(;T+1<this.minimapLines.length&&this.minimapLines[T+1]<=n;)T++;if(a===T){const N=this.minimapLines[a];if(N<o||N>n)return null}return[a+1,T+1]}decorationLineRangeToMinimapLineRange(o,n){let a=this.modelLineToMinimapLine(o),T=this.modelLineToMinimapLine(n);return o!==n&&T===a&&(T===this.minimapLines.length?a>1&&a--:T++),[a,T]}onLinesDeleted(o){const n=o.toLineNumber-o.fromLineNumber+1;let a=this.minimapLines.length,T=0;for(let N=this.minimapLines.length-1;N>=0&&!(this.minimapLines[N]<o.fromLineNumber);N--)this.minimapLines[N]<=o.toLineNumber?(this.minimapLines[N]=Math.max(1,o.fromLineNumber-1),a=Math.min(a,N),T=Math.max(T,N)):this.minimapLines[N]-=n;return[a,T]}onLinesInserted(o){const n=o.toLineNumber-o.fromLineNumber+1;for(let a=this.minimapLines.length-1;a>=0&&!(this.minimapLines[a]<o.fromLineNumber);a--)this.minimapLines[a]+=n}}class Uo extends le{constructor(o){super(o);this.tokensColorTracker=ro.getInstance(),this._selections=[],this._minimapSelections=null,this.options=new Io(this._context.configuration,this._context.theme,this.tokensColorTracker);const[n]=hi.compute(this.options,this._context.model.getLineCount(),null);this._samplingState=n,this._shouldCheckSampling=!1,this._actual=new mi(o.theme,this)}dispose(){this._actual.dispose(),super.dispose()}getDomNode(){return this._actual.getDomNode()}_onOptionsMaybeChanged(){const o=new Io(this._context.configuration,this._context.theme,this.tokensColorTracker);return this.options.equals(o)?!1:(this.options=o,this._recreateLineSampling(),this._actual.onDidChangeOptions(),!0)}onConfigurationChanged(o){return this._onOptionsMaybeChanged()}onCursorStateChanged(o){return this._selections=o.selections,this._minimapSelections=null,this._actual.onSelectionChanged()}onDecorationsChanged(o){return o.affectsMinimap?this._actual.onDecorationsChanged():!1}onFlushed(o){return this._samplingState&&(this._shouldCheckSampling=!0),this._actual.onFlushed()}onLinesChanged(o){if(this._samplingState){const n=this._samplingState.modelLineRangeToMinimapLineRange(o.fromLineNumber,o.toLineNumber);return n?this._actual.onLinesChanged(n[0],n[1]):!1}else return this._actual.onLinesChanged(o.fromLineNumber,o.toLineNumber)}onLinesDeleted(o){if(this._samplingState){const[n,a]=this._samplingState.onLinesDeleted(o);return n<=a&&this._actual.onLinesChanged(n+1,a+1),this._shouldCheckSampling=!0,!0}else return this._actual.onLinesDeleted(o.fromLineNumber,o.toLineNumber)}onLinesInserted(o){return this._samplingState?(this._samplingState.onLinesInserted(o),this._shouldCheckSampling=!0,!0):this._actual.onLinesInserted(o.fromLineNumber,o.toLineNumber)}onScrollChanged(o){return this._actual.onScrollChanged()}onThemeChanged(o){return this._context.model.invalidateMinimapColorCache(),this._actual.onThemeChanged(),this._onOptionsMaybeChanged(),!0}onTokensChanged(o){if(this._samplingState){let n=[];for(const a of o.ranges){const T=this._samplingState.modelLineRangeToMinimapLineRange(a.fromLineNumber,a.toLineNumber);T&&n.push({fromLineNumber:T[0],toLineNumber:T[1]})}return n.length?this._actual.onTokensChanged(n):!1}else return this._actual.onTokensChanged(o.ranges)}onTokensColorsChanged(o){return this._onOptionsMaybeChanged(),this._actual.onTokensColorsChanged()}onZonesChanged(o){return this._actual.onZonesChanged()}prepareRender(o){this._shouldCheckSampling&&(this._shouldCheckSampling=!1,this._recreateLineSampling())}render(o){let n=o.visibleRange.startLineNumber,a=o.visibleRange.endLineNumber;this._samplingState&&(n=this._samplingState.modelLineToMinimapLine(n),a=this._samplingState.modelLineToMinimapLine(a));const T={viewportContainsWhitespaceGaps:o.viewportData.whitespaceViewportData.length>0,scrollWidth:o.scrollWidth,scrollHeight:o.scrollHeight,viewportStartLineNumber:n,viewportEndLineNumber:a,viewportStartLineNumberVerticalOffset:o.getVerticalOffsetForLineNumber(n),scrollTop:o.scrollTop,scrollLeft:o.scrollLeft,viewportWidth:o.viewportWidth,viewportHeight:o.viewportHeight};this._actual.render(T)}_recreateLineSampling(){this._minimapSelections=null;const o=Boolean(this._samplingState),[n,a]=hi.compute(this.options,this._context.model.getLineCount(),this._samplingState);if(this._samplingState=n,o&&this._samplingState)for(const T of a)switch(T.type){case"deleted":this._actual.onLinesDeleted(T.deleteFromLineNumber,T.deleteToLineNumber);break;case"inserted":this._actual.onLinesInserted(T.insertFromLineNumber,T.insertToLineNumber);break;case"flush":this._actual.onFlushed();break}}getLineCount(){return this._samplingState?this._samplingState.minimapLines.length:this._context.model.getLineCount()}getRealLineCount(){return this._context.model.getLineCount()}getLineContent(o){return this._samplingState?this._context.model.getLineContent(this._samplingState.minimapLines[o-1]):this._context.model.getLineContent(o)}getLineMaxColumn(o){return this._samplingState?this._context.model.getLineMaxColumn(this._samplingState.minimapLines[o-1]):this._context.model.getLineMaxColumn(o)}getMinimapLinesRenderingData(o,n,a){if(this._samplingState){let T=[];for(let N=0,Y=n-o+1;N<Y;N++)a[N]?T[N]=this._context.model.getViewLineData(this._samplingState.minimapLines[o+N-1]):T[N]=null;return T}return this._context.model.getMinimapLinesRenderingData(o,n,a).data}getSelections(){if(this._minimapSelections===null)if(this._samplingState){this._minimapSelections=[];for(const o of this._selections){const[n,a]=this._samplingState.decorationLineRangeToMinimapLineRange(o.startLineNumber,o.endLineNumber);this._minimapSelections.push(new b.a(n,o.startColumn,a,o.endColumn))}}else this._minimapSelections=this._selections;return this._minimapSelections}getMinimapDecorationsInViewport(o,n){let a;if(this._samplingState){const N=this._samplingState.minimapLines[o-1],Y=this._samplingState.minimapLines[n-1];a=new se.a(N,1,Y,this._context.model.getLineMaxColumn(Y))}else a=new se.a(o,1,n,this._context.model.getLineMaxColumn(n));const T=this._context.model.getDecorationsInViewport(a);if(this._samplingState){let N=[];for(const Y of T){if(!Y.options.minimap)continue;const be=Y.range,xe=this._samplingState.modelLineToMinimapLine(be.startLineNumber),Ke=this._samplingState.modelLineToMinimapLine(be.endLineNumber);N.push(new F.h(new se.a(xe,be.startColumn,Ke,be.endColumn),Y.options))}return N}return T}getOptions(){return this._context.model.getTextModelOptions()}revealLineNumber(o){this._samplingState&&(o=this._samplingState.minimapLines[o-1]),this._context.model.revealRange("mouse",!1,new se.a(o,1,o,1),1,0)}setScrollTop(o){this._context.model.setScrollPosition({scrollTop:o},1)}}class mi extends d.a{constructor(o,n){super();this._renderDecorations=!1,this._gestureInProgress=!1,this._theme=o,this._model=n,this._lastRenderData=null,this._buffers=null,this._selectionColor=this._theme.getColor(ui.bc),this._domNode=Object(u.b)(document.createElement("div")),_e.write(this._domNode,8),this._domNode.setClassName(this._getMinimapDomNodeClassName()),this._domNode.setPosition("absolute"),this._domNode.setAttribute("role","presentation"),this._domNode.setAttribute("aria-hidden","true"),this._shadow=Object(u.b)(document.createElement("div")),this._shadow.setClassName("minimap-shadow-hidden"),this._domNode.appendChild(this._shadow),this._canvas=Object(u.b)(document.createElement("canvas")),this._canvas.setPosition("absolute"),this._canvas.setLeft(0),this._domNode.appendChild(this._canvas),this._decorationsCanvas=Object(u.b)(document.createElement("canvas")),this._decorationsCanvas.setPosition("absolute"),this._decorationsCanvas.setClassName("minimap-decorations-layer"),this._decorationsCanvas.setLeft(0),this._domNode.appendChild(this._decorationsCanvas),this._slider=Object(u.b)(document.createElement("div")),this._slider.setPosition("absolute"),this._slider.setClassName("minimap-slider"),this._slider.setLayerHinting(!0),this._slider.setContain("strict"),this._domNode.appendChild(this._slider),this._sliderHorizontal=Object(u.b)(document.createElement("div")),this._sliderHorizontal.setPosition("absolute"),this._sliderHorizontal.setClassName("minimap-slider-horizontal"),this._slider.appendChild(this._sliderHorizontal),this._applyLayout(),this._mouseDownListener=v.o(this._domNode.domNode,"mousedown",a=>{a.preventDefault();const T=this._model.options.renderMinimap;if(T===0)return;if(!this._lastRenderData)return;if(this._model.options.size!=="proportional"){if(a.leftButton&&this._lastRenderData){const Ke=v.D(this._slider.domNode),Ze=Ke.top+Ke.height/2;this._startSliderDragging(a.buttons,a.posx,Ze,a.posy,this._lastRenderData.renderedLayout)}return}const N=this._model.options.minimapLineHeight,Y=this._model.options.canvasInnerHeight/this._model.options.canvasOuterHeight*a.browserEvent.offsetY,be=Math.floor(Y/N);let xe=be+this._lastRenderData.renderedLayout.startLineNumber;xe=Math.min(xe,this._model.getLineCount()),this._model.revealLineNumber(xe)}),this._sliderMouseMoveMonitor=new y.a,this._sliderMouseDownListener=v.o(this._slider.domNode,"mousedown",a=>{a.preventDefault(),a.stopPropagation(),a.leftButton&&this._lastRenderData&&this._startSliderDragging(a.buttons,a.posx,a.posy,a.posy,this._lastRenderData.renderedLayout)}),this._gestureDisposable=p.b.addTarget(this._domNode.domNode),this._sliderTouchStartListener=v.i(this._domNode.domNode,p.a.Start,a=>{a.preventDefault(),a.stopPropagation(),this._lastRenderData&&(this._slider.toggleClassName("active",!0),this._gestureInProgress=!0,this.scrollDueToTouchEvent(a))},{passive:!1}),this._sliderTouchMoveListener=v.i(this._domNode.domNode,p.a.Change,a=>{a.preventDefault(),a.stopPropagation(),this._lastRenderData&&this._gestureInProgress&&this.scrollDueToTouchEvent(a)},{passive:!1}),this._sliderTouchEndListener=v.o(this._domNode.domNode,p.a.End,a=>{a.preventDefault(),a.stopPropagation(),this._gestureInProgress=!1,this._slider.toggleClassName("active",!1)})}_startSliderDragging(o,n,a,T,N){this._slider.toggleClassName("active",!0);const Y=(be,xe)=>{const Ke=Math.abs(xe-n);if(c.i&&Ke>ho){this._model.setScrollTop(N.scrollTop);return}const Ze=be-a;this._model.setScrollTop(N.getDesiredScrollTopFromDelta(Ze))};T!==a&&Y(T,n),this._sliderMouseMoveMonitor.startMonitoring(this._slider.domNode,o,y.b,be=>Y(be.posy,be.posx),()=>{this._slider.toggleClassName("active",!1)})}scrollDueToTouchEvent(o){const n=this._domNode.domNode.getBoundingClientRect().top,a=this._lastRenderData.renderedLayout.getDesiredScrollTopFromTouchLocation(o.pageY-n);this._model.setScrollTop(a)}dispose(){this._mouseDownListener.dispose(),this._sliderMouseMoveMonitor.dispose(),this._sliderMouseDownListener.dispose(),this._gestureDisposable.dispose(),this._sliderTouchStartListener.dispose(),this._sliderTouchMoveListener.dispose(),this._sliderTouchEndListener.dispose(),super.dispose()}_getMinimapDomNodeClassName(){return this._model.options.showSlider==="always"?"minimap slider-always":"minimap slider-mouseover"}getDomNode(){return this._domNode}_applyLayout(){this._domNode.setLeft(this._model.options.minimapLeft),this._domNode.setWidth(this._model.options.minimapWidth),this._domNode.setHeight(this._model.options.minimapHeight),this._shadow.setHeight(this._model.options.minimapHeight),this._canvas.setWidth(this._model.options.canvasOuterWidth),this._canvas.setHeight(this._model.options.canvasOuterHeight),this._canvas.domNode.width=this._model.options.canvasInnerWidth,this._canvas.domNode.height=this._model.options.canvasInnerHeight,this._decorationsCanvas.setWidth(this._model.options.canvasOuterWidth),this._decorationsCanvas.setHeight(this._model.options.canvasOuterHeight),this._decorationsCanvas.domNode.width=this._model.options.canvasInnerWidth,this._decorationsCanvas.domNode.height=this._model.options.canvasInnerHeight,this._slider.setWidth(this._model.options.minimapWidth)}_getBuffer(){return this._buffers||this._model.options.canvasInnerWidth>0&&this._model.options.canvasInnerHeight>0&&(this._buffers=new si(this._canvas.domNode.getContext("2d"),this._model.options.canvasInnerWidth,this._model.options.canvasInnerHeight,this._model.options.backgroundColor)),this._buffers?this._buffers.getBuffer():null}onDidChangeOptions(){this._lastRenderData=null,this._buffers=null,this._applyLayout(),this._domNode.setClassName(this._getMinimapDomNodeClassName())}onSelectionChanged(){return this._renderDecorations=!0,!0}onDecorationsChanged(){return this._renderDecorations=!0,!0}onFlushed(){return this._lastRenderData=null,!0}onLinesChanged(o,n){return this._lastRenderData?this._lastRenderData.onLinesChanged(o,n):!1}onLinesDeleted(o,n){return this._lastRenderData&&this._lastRenderData.onLinesDeleted(o,n),!0}onLinesInserted(o,n){return this._lastRenderData&&this._lastRenderData.onLinesInserted(o,n),!0}onScrollChanged(){return this._renderDecorations=!0,!0}onThemeChanged(){return this._selectionColor=this._theme.getColor(ui.bc),this._renderDecorations=!0,!0}onTokensChanged(o){return this._lastRenderData?this._lastRenderData.onTokensChanged(o):!1}onTokensColorsChanged(){return this._lastRenderData=null,this._buffers=null,!0}onZonesChanged(){return this._lastRenderData=null,!0}render(o){const n=this._model.options.renderMinimap;if(n===0){this._shadow.setClassName("minimap-shadow-hidden"),this._sliderHorizontal.setWidth(0),this._sliderHorizontal.setHeight(0);return}o.scrollLeft+o.viewportWidth>=o.scrollWidth?this._shadow.setClassName("minimap-shadow-hidden"):this._shadow.setClassName("minimap-shadow-visible");const a=Ao.create(this._model.options,o.viewportStartLineNumber,o.viewportEndLineNumber,o.viewportStartLineNumberVerticalOffset,o.viewportHeight,o.viewportContainsWhitespaceGaps,this._model.getLineCount(),this._model.getRealLineCount(),o.scrollTop,o.scrollHeight,this._lastRenderData?this._lastRenderData.renderedLayout:null);this._slider.setDisplay(a.sliderNeeded?"block":"none"),this._slider.setTop(a.sliderTop),this._slider.setHeight(a.sliderHeight),this._sliderHorizontal.setLeft(0),this._sliderHorizontal.setWidth(this._model.options.minimapWidth),this._sliderHorizontal.setTop(0),this._sliderHorizontal.setHeight(a.sliderHeight),this.renderDecorations(a),this._lastRenderData=this.renderLines(a)}renderDecorations(o){if(this._renderDecorations){this._renderDecorations=!1;const n=this._model.getSelections();n.sort(se.a.compareRangesUsingStarts);const a=this._model.getMinimapDecorationsInViewport(o.startLineNumber,o.endLineNumber);a.sort((Ot,ft)=>(Ot.options.zIndex||0)-(ft.options.zIndex||0));const{canvasInnerWidth:T,canvasInnerHeight:N}=this._model.options,Y=this._model.options.minimapLineHeight,be=this._model.options.minimapCharWidth,xe=this._model.getOptions().tabSize,Ke=this._decorationsCanvas.domNode.getContext("2d");Ke.clearRect(0,0,T,N);const Ze=new Ri(o.startLineNumber,o.endLineNumber,!1);this._renderSelectionLineHighlights(Ke,n,Ze,o,Y),this._renderDecorationsLineHighlights(Ke,a,Ze,o,Y);const nt=new Ri(o.startLineNumber,o.endLineNumber,null);this._renderSelectionsHighlights(Ke,n,nt,o,Y,xe,be,T),this._renderDecorationsHighlights(Ke,a,nt,o,Y,xe,be,T)}}_renderSelectionLineHighlights(o,n,a,T,N){if(!this._selectionColor||this._selectionColor.isTransparent())return;o.fillStyle=this._selectionColor.transparent(.5).toString();let Y=0,be=0;for(const xe of n){const Ke=Math.max(T.startLineNumber,xe.startLineNumber),Ze=Math.min(T.endLineNumber,xe.endLineNumber);if(Ke>Ze)continue;for(let ft=Ke;ft<=Ze;ft++)a.set(ft,!0);const nt=(Ke-T.startLineNumber)*N,Ot=(Ze-T.startLineNumber)*N+N;be>=nt||(be>Y&&o.fillRect(Xe.h,Y,o.canvas.width,be-Y),Y=nt),be=Ot}be>Y&&o.fillRect(Xe.h,Y,o.canvas.width,be-Y)}_renderDecorationsLineHighlights(o,n,a,T,N){const Y=new Map;for(let be=n.length-1;be>=0;be--){const xe=n[be],Ke=xe.options.minimap;if(!Ke||Ke.position!==Ui.f.Inline)continue;const Ze=Math.max(T.startLineNumber,xe.range.startLineNumber),nt=Math.min(T.endLineNumber,xe.range.endLineNumber);if(Ze>nt)continue;const Ot=Ke.getColor(this._theme);if(!Ot||Ot.isTransparent())continue;let ft=Y.get(Ot.toString());ft||(ft=Ot.transparent(.5).toString(),Y.set(Ot.toString(),ft)),o.fillStyle=ft;for(let kt=Ze;kt<=nt;kt++){if(a.has(kt))continue;a.set(kt,!0);const Gt=(Ze-T.startLineNumber)*N;o.fillRect(Xe.h,Gt,o.canvas.width,N)}}}_renderSelectionsHighlights(o,n,a,T,N,Y,be,xe){if(!this._selectionColor||this._selectionColor.isTransparent())return;for(const Ke of n){const Ze=Math.max(T.startLineNumber,Ke.startLineNumber),nt=Math.min(T.endLineNumber,Ke.endLineNumber);if(Ze>nt)continue;for(let Ot=Ze;Ot<=nt;Ot++)this.renderDecorationOnLine(o,a,Ke,this._selectionColor,T,Ot,N,N,Y,be,xe)}}_renderDecorationsHighlights(o,n,a,T,N,Y,be,xe){for(const Ke of n){const Ze=Ke.options.minimap;if(!Ze)continue;const nt=Math.max(T.startLineNumber,Ke.range.startLineNumber),Ot=Math.min(T.endLineNumber,Ke.range.endLineNumber);if(nt>Ot)continue;const ft=Ze.getColor(this._theme);if(!ft||ft.isTransparent())continue;for(let kt=nt;kt<=Ot;kt++)switch(Ze.position){case Ui.f.Inline:this.renderDecorationOnLine(o,a,Ke.range,ft,T,kt,N,N,Y,be,xe);continue;case Ui.f.Gutter:const Gt=(kt-T.startLineNumber)*N,eo=2;this.renderDecoration(o,ft,eo,Gt,mo,N);continue}}}renderDecorationOnLine(o,n,a,T,N,Y,be,xe,Ke,Ze,nt){const Ot=(Y-N.startLineNumber)*xe;if(Ot+be<0||Ot>this._model.options.canvasInnerHeight)return;const{startLineNumber:ft,endLineNumber:kt}=a,Gt=ft===Y?a.startColumn:1,eo=kt===Y?a.endColumn:this._model.getLineMaxColumn(Y),co=this.getXOffsetForPosition(n,Y,Gt,Ke,Ze,nt),go=this.getXOffsetForPosition(n,Y,eo,Ke,Ze,nt);this.renderDecoration(o,T,co,Ot,go-co,be)}getXOffsetForPosition(o,n,a,T,N,Y){if(a===1)return Xe.h;const be=(a-1)*N;if(be>=Y)return Y;let xe=o.get(n);if(!xe){const Ke=this._model.getLineContent(n);xe=[Xe.h];let Ze=Xe.h;for(let nt=1;nt<Ke.length+1;nt++){const Ot=Ke.charCodeAt(nt-1),ft=Ot===9?T*N:ut.D(Ot)?2*N:N,kt=Ze+ft;if(kt>=Y){xe[nt]=Y;break}xe[nt]=kt,Ze=kt}o.set(n,xe)}return a-1<xe.length?xe[a-1]:Y}renderDecoration(o,n,a,T,N,Y){o.fillStyle=n&&n.toString()||"",o.fillRect(a,T,N,Y)}renderLines(o){const n=o.startLineNumber,a=o.endLineNumber,T=this._model.options.minimapLineHeight;if(this._lastRenderData&&this._lastRenderData.linesEquals(o)){const Xi=this._lastRenderData._get();return new Wo(o,Xi.imageData,Xi.lines)}const N=this._getBuffer();if(!N)return null;let[Y,be,xe]=mi._renderUntouchedLines(N,n,a,T,this._lastRenderData);const Ke=this._model.getMinimapLinesRenderingData(n,a,xe),Ze=this._model.getOptions().tabSize,nt=this._model.options.defaultBackgroundColor,Ot=this._model.options.backgroundColor,ft=this._model.options.foregroundAlpha,kt=this._model.tokensColorTracker,Gt=kt.backgroundIsLight(),eo=this._model.options.renderMinimap,co=this._model.options.charRenderer(),go=this._model.options.fontScale,yo=this._model.options.minimapCharWidth,jo=eo===1?2:2+1,Po=jo*go,ti=T>Po?Math.floor((T-Po)/2):0,oi=Ot.a/255,$o=new Bt(Math.round((Ot.r-nt.r)*oi+nt.r),Math.round((Ot.g-nt.g)*oi+nt.g),Math.round((Ot.b-nt.b)*oi+nt.b),255);let Yo=0;const Ei=[];for(let Xi=0,dn=a-n+1;Xi<dn;Xi++)xe[Xi]&&mi._renderLine(N,$o,Ot.a,Gt,eo,yo,kt,ft,co,Yo,ti,Ze,Ke[Xi],go,T),Ei[Xi]=new Oo(Yo),Yo+=T;const Ci=Y===-1?0:Y,bi=be===-1?N.height:be,ji=bi-Ci,ln=this._canvas.domNode.getContext("2d");return ln.putImageData(N,0,0,0,Ci,N.width,ji),new Wo(o,N,Ei)}static _renderUntouchedLines(o,n,a,T,N){const Y=[];if(!N){for(let $o=0,Yo=a-n+1;$o<Yo;$o++)Y[$o]=!0;return[-1,-1,Y]}const be=N._get(),xe=be.imageData.data,Ke=be.rendLineNumberStart,Ze=be.lines,nt=Ze.length,Ot=o.width,ft=o.data,kt=(a-n+1)*T*Ot*4;let Gt=-1,eo=-1,co=-1,go=-1,yo=-1,jo=-1,Po=0;for(let $o=n;$o<=a;$o++){const Yo=$o-n,Ei=$o-Ke,Ci=Ei>=0&&Ei<nt?Ze[Ei].dy:-1;if(Ci===-1){Y[Yo]=!0,Po+=T;continue}const bi=Ci*Ot*4,ji=(Ci+T)*Ot*4,ln=Po*Ot*4,Xi=(Po+T)*Ot*4;go===bi&&jo===ln?(go=ji,jo=Xi):(co!==-1&&(ft.set(xe.subarray(co,go),yo),Gt===-1&&co===0&&co===yo&&(Gt=go),eo===-1&&go===kt&&co===yo&&(eo=co)),co=bi,go=ji,yo=ln,jo=Xi),Y[Yo]=!1,Po+=T}co!==-1&&(ft.set(xe.subarray(co,go),yo),Gt===-1&&co===0&&co===yo&&(Gt=go),eo===-1&&go===kt&&co===yo&&(eo=co));const ti=Gt===-1?-1:Gt/(Ot*4),oi=eo===-1?-1:eo/(Ot*4);return[ti,oi,Y]}static _renderLine(o,n,a,T,N,Y,be,xe,Ke,Ze,nt,Ot,ft,kt,Gt){const eo=ft.content,co=ft.tokens,go=o.width-Y,yo=Gt===1;let jo=Xe.h,Po=0,ti=0;for(let oi=0,$o=co.getCount();oi<$o;oi++){const Yo=co.getEndOffset(oi),Ei=co.getForeground(oi),Ci=be.getColor(Ei);for(;Po<Yo;Po++){if(jo>go)return;const bi=eo.charCodeAt(Po);if(bi===9){const ji=Ot-(Po+ti)%Ot;ti+=ji-1,jo+=ji*Y}else if(bi===32)jo+=Y;else{const ji=ut.D(bi)?2:1;for(let ln=0;ln<ji;ln++)if(N===2?Ke.blockRenderChar(o,jo,Ze+nt,Ci,xe,n,a,yo):Ke.renderChar(o,jo,Ze+nt,bi,Ci,xe,n,a,kt,T,yo),jo+=Y,jo>go)return}}}}}class Ri{constructor(o,n,a){this._startLineNumber=o,this._endLineNumber=n,this._defaultValue=a,this._values=[];for(let T=0,N=this._endLineNumber-this._startLineNumber+1;T<N;T++)this._values[T]=a}has(o){return this.get(o)!==this._defaultValue}set(o,n){if(o<this._startLineNumber||o>this._endLineNumber)return;this._values[o-this._startLineNumber]=n}get(o){return o<this._startLineNumber||o>this._endLineNumber?this._defaultValue:this._values[o-this._startLineNumber]}}Object(so.f)((o,n)=>{const a=o.getColor(ui.ec);a&&n.addRule(`.monaco-editor .minimap-slider .minimap-slider-horizontal { background: ${a}; }`);const T=o.getColor(ui.fc);T&&n.addRule(`.monaco-editor .minimap-slider:hover .minimap-slider-horizontal { background: ${T}; }`);const N=o.getColor(ui.dc);N&&n.addRule(`.monaco-editor .minimap-slider.active .minimap-slider-horizontal { background: ${N}; }`);const Y=o.getColor(ui.yc);Y&&n.addRule(`.monaco-editor .minimap-shadow-visible { box-shadow: ${Y} -6px 0 6px -6px inset; }`)});var Di=t("cl4r");class pi extends le{constructor(o){super(o);const n=this._context.configuration.options,a=n.get(129);this._widgets={},this._verticalScrollbarWidth=a.verticalScrollbarWidth,this._minimapWidth=a.minimap.minimapWidth,this._horizontalScrollbarHeight=a.horizontalScrollbarHeight,this._editorHeight=a.height,this._editorWidth=a.width,this._domNode=Object(u.b)(document.createElement("div")),_e.write(this._domNode,4),this._domNode.setClassName("overlayWidgets")}dispose(){super.dispose(),this._widgets={}}getDomNode(){return this._domNode}onConfigurationChanged(o){const n=this._context.configuration.options,a=n.get(129);return this._verticalScrollbarWidth=a.verticalScrollbarWidth,this._minimapWidth=a.minimap.minimapWidth,this._horizontalScrollbarHeight=a.horizontalScrollbarHeight,this._editorHeight=a.height,this._editorWidth=a.width,!0}addWidget(o){const n=Object(u.b)(o.getDomNode());this._widgets[o.getId()]={widget:o,preference:null,domNode:n},n.setPosition("absolute"),n.setAttribute("widgetId",o.getId()),this._domNode.appendChild(n),this.setShouldRender()}setWidgetPosition(o,n){const a=this._widgets[o.getId()];return a.preference===n?!1:(a.preference=n,this.setShouldRender(),!0)}removeWidget(o){const n=o.getId();if(this._widgets.hasOwnProperty(n)){const a=this._widgets[n],T=a.domNode.domNode;delete this._widgets[n],T.parentNode.removeChild(T),this.setShouldRender()}}_renderWidget(o){const n=o.domNode;if(o.preference===null){n.unsetTop();return}if(o.preference===0)n.setTop(0),n.setRight(2*this._verticalScrollbarWidth+this._minimapWidth);else if(o.preference===1){const a=n.domNode.clientHeight;n.setTop(this._editorHeight-a-2*this._horizontalScrollbarHeight),n.setRight(2*this._verticalScrollbarWidth+this._minimapWidth)}else o.preference===2&&(n.setTop(0),n.domNode.style.right="50%")}prepareRender(o){}render(o){this._domNode.setWidth(this._editorWidth);const n=Object.keys(this._widgets);for(let a=0,T=n.length;a<T;a++){const N=n[a];this._renderWidget(this._widgets[N])}}}var Wi=t("zrhQ");class fn{constructor(o,n){const a=o.options;this.lineHeight=a.get(58),this.pixelRatio=a.get(127),this.overviewRulerLanes=a.get(73),this.renderBorder=a.get(72);const T=n.getColor(zt.F);this.borderColor=T?T.toString():null,this.hideCursor=a.get(51);const N=n.getColor(zt.z);this.cursorColor=N?N.transparent(.7).toString():null,this.themeType=n.type;const Y=a.get(64),be=Y.enabled,xe=Y.side,Ke=be?n.getColor(zt.E)||Kt.E.getDefaultBackground():null;Ke===null||xe==="left"?this.backgroundColor=null:this.backgroundColor=Wi.a.Format.CSS.formatHex(Ke);const Ze=a.get(129),nt=Ze.overviewRuler;this.top=nt.top,this.right=nt.right,this.domWidth=nt.width,this.domHeight=nt.height,this.overviewRulerLanes===0?(this.canvasWidth=0,this.canvasHeight=0):(this.canvasWidth=this.domWidth*this.pixelRatio|0,this.canvasHeight=this.domHeight*this.pixelRatio|0);const[Ot,ft]=this._initLanes(1,this.canvasWidth,this.overviewRulerLanes);this.x=Ot,this.w=ft}_initLanes(o,n,a){const T=n-o;if(a>=3){const N=Math.floor(T/3),Y=Math.floor(T/3),be=T-N-Y,xe=o,Ke=xe+N,Ze=xe+N+be;return[[0,xe,Ke,xe,Ze,xe,Ke,xe],[0,N,be,N+be,Y,N+be+Y,be+Y,N+be+Y]]}else if(a===2){const N=Math.floor(T/2),Y=T-N,be=o,xe=be+N;return[[0,be,be,be,xe,be,be,be],[0,N,N,N,Y,N+Y,N+Y,N+Y]]}else{const N=o,Y=T;return[[0,N,N,N,N,N,N,N],[0,Y,Y,Y,Y,Y,Y,Y]]}}equals(o){return this.lineHeight===o.lineHeight&&this.pixelRatio===o.pixelRatio&&this.overviewRulerLanes===o.overviewRulerLanes&&this.renderBorder===o.renderBorder&&this.borderColor===o.borderColor&&this.hideCursor===o.hideCursor&&this.cursorColor===o.cursorColor&&this.themeType===o.themeType&&this.backgroundColor===o.backgroundColor&&this.top===o.top&&this.right===o.right&&this.domWidth===o.domWidth&&this.domHeight===o.domHeight&&this.canvasWidth===o.canvasWidth&&this.canvasHeight===o.canvasHeight}}class In extends le{constructor(o){super(o);this._domNode=Object(u.b)(document.createElement("canvas")),this._domNode.setClassName("decorationsOverviewRuler"),this._domNode.setPosition("absolute"),this._domNode.setLayerHinting(!0),this._domNode.setContain("strict"),this._domNode.setAttribute("aria-hidden","true"),this._updateSettings(!1),this._tokensColorTrackerListener=Kt.E.onDidChange(n=>{n.changedColorMap&&this._updateSettings(!0)}),this._cursorPositions=[]}dispose(){super.dispose(),this._tokensColorTrackerListener.dispose()}_updateSettings(o){const n=new fn(this._context.configuration,this._context.theme);return this._settings&&this._settings.equals(n)?!1:(this._settings=n,this._domNode.setTop(this._settings.top),this._domNode.setRight(this._settings.right),this._domNode.setWidth(this._settings.domWidth),this._domNode.setHeight(this._settings.domHeight),this._domNode.domNode.width=this._settings.canvasWidth,this._domNode.domNode.height=this._settings.canvasHeight,o&&this._render(),!0)}onConfigurationChanged(o){return this._updateSettings(!1)}onCursorStateChanged(o){this._cursorPositions=[];for(let n=0,a=o.selections.length;n<a;n++)this._cursorPositions[n]=o.selections[n].getPosition();return this._cursorPositions.sort(U.a.compare),!0}onDecorationsChanged(o){return!!o.affectsOverviewRuler}onFlushed(o){return!0}onScrollChanged(o){return o.scrollHeightChanged}onZonesChanged(o){return!0}onThemeChanged(o){return this._context.model.invalidateOverviewRulerColorCache(),this._updateSettings(!1)}getDomNode(){return this._domNode.domNode}prepareRender(o){}render(o){this._render()}_render(){if(this._settings.overviewRulerLanes===0){this._domNode.setBackgroundColor(this._settings.backgroundColor?this._settings.backgroundColor:"");return}const o=this._settings.canvasWidth,n=this._settings.canvasHeight,a=this._settings.lineHeight,T=this._context.viewLayout,N=this._context.viewLayout.getScrollHeight(),Y=n/N,be=this._context.model.getAllOverviewRulerDecorations(this._context.theme),xe=6*this._settings.pixelRatio|0,Ke=xe/2|0,Ze=this._domNode.domNode.getContext("2d");this._settings.backgroundColor===null?Ze.clearRect(0,0,o,n):(Ze.fillStyle=this._settings.backgroundColor,Ze.fillRect(0,0,o,n));const nt=this._settings.x,Ot=this._settings.w;be.sort(F.d.cmp);for(const ft of be){const kt=ft.color,Gt=ft.data;Ze.fillStyle=kt;let eo=0,co=0,go=0;for(let yo=0,jo=Gt.length/3;yo<jo;yo++){const Po=Gt[3*yo],ti=Gt[3*yo+1],oi=Gt[3*yo+2];let $o=T.getVerticalOffsetForLineNumber(ti)*Y|0,Yo=(T.getVerticalOffsetForLineNumber(oi)+a)*Y|0;const Ei=Yo-$o;if(Ei<xe){let Ci=($o+Yo)/2|0;Ci<Ke?Ci=Ke:Ci+Ke>n&&(Ci=n-Ke),$o=Ci-Ke,Yo=Ci+Ke}$o>go+1||Po!==eo?(yo!==0&&Ze.fillRect(nt[eo],co,Ot[eo],go-co),eo=Po,co=$o,go=Yo):Yo>go&&(go=Yo)}Ze.fillRect(nt[eo],co,Ot[eo],go-co)}if(!this._settings.hideCursor&&this._settings.cursorColor){const ft=2*this._settings.pixelRatio|0,kt=ft/2|0,Gt=this._settings.x[7],eo=this._settings.w[7];Ze.fillStyle=this._settings.cursorColor;let co=-100,go=-100;for(let yo=0,jo=this._cursorPositions.length;yo<jo;yo++){const Po=this._cursorPositions[yo];let ti=T.getVerticalOffsetForLineNumber(Po.lineNumber)*Y|0;ti<kt?ti=kt:ti+kt>n&&(ti=n-kt);const oi=ti-kt,$o=oi+ft;oi>go+1?(yo!==0&&Ze.fillRect(Gt,co,eo,go-co),co=oi,go=$o):$o>go&&(go=$o)}Ze.fillRect(Gt,co,eo,go-co)}this._settings.renderBorder&&this._settings.borderColor&&this._settings.overviewRulerLanes>0&&(Ze.beginPath(),Ze.lineWidth=1,Ze.strokeStyle=this._settings.borderColor,Ze.moveTo(0,0),Ze.lineTo(0,n),Ze.stroke(),Ze.moveTo(0,0),Ze.lineTo(o,0),Ze.stroke())}}var an=t("MvK1");class bn extends ne{constructor(o,n){super();this._context=o;const a=this._context.configuration.options;this._domNode=Object(u.b)(document.createElement("canvas")),this._domNode.setClassName(n),this._domNode.setPosition("absolute"),this._domNode.setLayerHinting(!0),this._domNode.setContain("strict"),this._zoneManager=new an.b(T=>this._context.viewLayout.getVerticalOffsetForLineNumber(T)),this._zoneManager.setDOMWidth(0),this._zoneManager.setDOMHeight(0),this._zoneManager.setOuterHeight(this._context.viewLayout.getScrollHeight()),this._zoneManager.setLineHeight(a.get(58)),this._zoneManager.setPixelRatio(a.get(127)),this._context.addEventHandler(this)}dispose(){this._context.removeEventHandler(this),super.dispose()}onConfigurationChanged(o){const n=this._context.configuration.options;return o.hasChanged(58)&&(this._zoneManager.setLineHeight(n.get(58)),this._render()),o.hasChanged(127)&&(this._zoneManager.setPixelRatio(n.get(127)),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}onFlushed(o){return this._render(),!0}onScrollChanged(o){return o.scrollHeightChanged&&(this._zoneManager.setOuterHeight(o.scrollHeight),this._render()),!0}onZonesChanged(o){return this._render(),!0}getDomNode(){return this._domNode.domNode}setLayout(o){this._domNode.setTop(o.top),this._domNode.setRight(o.right);let n=!1;n=this._zoneManager.setDOMWidth(o.width)||n,n=this._zoneManager.setDOMHeight(o.height)||n,n&&(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())}setZones(o){this._zoneManager.setZones(o),this._render()}_render(){if(this._zoneManager.getOuterHeight()===0)return!1;const o=this._zoneManager.getCanvasWidth(),n=this._zoneManager.getCanvasHeight(),a=this._zoneManager.resolveColorZones(),T=this._zoneManager.getId2Color(),N=this._domNode.domNode.getContext("2d");return N.clearRect(0,0,o,n),a.length>0&&this._renderOneLane(N,a,T,o),!0}_renderOneLane(o,n,a,T){let N=0,Y=0,be=0;for(const xe of n){const Ke=xe.colorId,Ze=xe.from,nt=xe.to;Ke!==N?(o.fillRect(0,Y,T,be-Y),N=Ke,o.fillStyle=a[N],Y=Ze,be=nt):be>=Ze?be=Math.max(be,nt):(o.fillRect(0,Y,T,be-Y),Y=Ze,be=nt)}o.fillRect(0,Y,T,be-Y)}}var Wn=t("7zd4");class gn extends le{constructor(o){super(o);this.domNode=Object(u.b)(document.createElement("div")),this.domNode.setAttribute("role","presentation"),this.domNode.setAttribute("aria-hidden","true"),this.domNode.setClassName("view-rulers"),this._renderedRulers=[];const n=this._context.configuration.options;this._rulers=n.get(90),this._typicalHalfwidthCharacterWidth=n.get(43).typicalHalfwidthCharacterWidth}dispose(){super.dispose()}onConfigurationChanged(o){const n=this._context.configuration.options;return this._rulers=n.get(90),this._typicalHalfwidthCharacterWidth=n.get(43).typicalHalfwidthCharacterWidth,!0}onScrollChanged(o){return o.scrollHeightChanged}prepareRender(o){}_ensureRulersCount(){const o=this._renderedRulers.length,n=this._rulers.length;if(o===n)return;if(o<n){const{tabSize:T}=this._context.model.getTextModelOptions(),N=T;let Y=n-o;for(;Y>0;){const be=Object(u.b)(document.createElement("div"));be.setClassName("view-ruler"),be.setWidth(N),this.domNode.appendChild(be),this._renderedRulers.push(be),Y--}return}let a=o-n;for(;a>0;){const T=this._renderedRulers.pop();this.domNode.removeChild(T),a--}}render(o){this._ensureRulersCount();for(let n=0,a=this._rulers.length;n<a;n++){const T=this._renderedRulers[n],N=this._rulers[n];T.setBoxShadow(N.color?`1px 0 0 0 ${N.color} inset`:""),T.setHeight(Math.min(o.scrollHeight,1e6)),T.setLeft(N.column*this._typicalHalfwidthCharacterWidth)}}}Object(so.f)((o,n)=>{const a=o.getColor(zt.G);a&&n.addRule(`.monaco-editor .view-ruler { box-shadow: 1px 0 0 0 ${a} inset; }`)});var $n=t("2MPD");class Un extends le{constructor(o){super(o);this._scrollTop=0,this._width=0,this._updateWidth(),this._shouldShow=!1;const n=this._context.configuration.options,a=n.get(91);this._useShadows=a.useShadows,this._domNode=Object(u.b)(document.createElement("div")),this._domNode.setAttribute("role","presentation"),this._domNode.setAttribute("aria-hidden","true")}dispose(){super.dispose()}_updateShouldShow(){const o=this._useShadows&&this._scrollTop>0;return this._shouldShow!==o?(this._shouldShow=o,!0):!1}getDomNode(){return this._domNode}_updateWidth(){const o=this._context.configuration.options,n=o.get(129);n.minimap.renderMinimap===0||n.minimap.minimapWidth>0&&n.minimap.minimapLeft===0?this._width=n.width:this._width=n.width-n.minimap.minimapWidth-n.verticalScrollbarWidth}onConfigurationChanged(o){const n=this._context.configuration.options,a=n.get(91);return this._useShadows=a.useShadows,this._updateWidth(),this._updateShouldShow(),!0}onScrollChanged(o){return this._scrollTop=o.scrollTop,this._updateShouldShow()}prepareRender(o){}render(o){this._domNode.setWidth(this._width),this._domNode.setClassName(this._shouldShow?"scroll-decoration":"")}}Object(so.f)((o,n)=>{const a=o.getColor(ui.yc);a&&n.addRule(`.monaco-editor .scroll-decoration { box-shadow: ${a} 0 6px 6px -6px inset; }`)});var qo=t("eC1c");class oo{constructor(o){this.left=o.left,this.width=o.width,this.startStyle=null,this.endStyle=null}}class So{constructor(o,n){this.lineNumber=o,this.ranges=n}}function ke(o){return new oo(o)}function ue(o){return new So(o.lineNumber,o.ranges.map(ke))}class Fe extends Wt{constructor(o){super();this._previousFrameVisibleRangesWithStyle=[],this._context=o;const n=this._context.configuration.options;this._lineHeight=n.get(58),this._roundedSelection=n.get(89),this._typicalHalfwidthCharacterWidth=n.get(43).typicalHalfwidthCharacterWidth,this._selections=[],this._renderResult=null,this._context.addEventHandler(this)}dispose(){this._context.removeEventHandler(this),this._renderResult=null,super.dispose()}onConfigurationChanged(o){const n=this._context.configuration.options;return this._lineHeight=n.get(58),this._roundedSelection=n.get(89),this._typicalHalfwidthCharacterWidth=n.get(43).typicalHalfwidthCharacterWidth,!0}onCursorStateChanged(o){return this._selections=o.selections.slice(0),!0}onDecorationsChanged(o){return!0}onFlushed(o){return!0}onLinesChanged(o){return!0}onLinesDeleted(o){return!0}onLinesInserted(o){return!0}onScrollChanged(o){return o.scrollTopChanged}onZonesChanged(o){return!0}_visibleRangesHaveGaps(o){for(let n=0,a=o.length;n<a;n++){const T=o[n];if(T.ranges.length>1)return!0}return!1}_enrichVisibleRangesWithStyle(o,n,a){const T=this._typicalHalfwidthCharacterWidth/4;let N=null,Y=null;if(a&&a.length>0&&n.length>0){const be=n[0].lineNumber;if(be===o.startLineNumber)for(let Ke=0;!N&&Ke<a.length;Ke++)a[Ke].lineNumber===be&&(N=a[Ke].ranges[0]);const xe=n[n.length-1].lineNumber;if(xe===o.endLineNumber)for(let Ke=a.length-1;!Y&&Ke>=0;Ke--)a[Ke].lineNumber===xe&&(Y=a[Ke].ranges[0]);N&&!N.startStyle&&(N=null),Y&&!Y.startStyle&&(Y=null)}for(let be=0,xe=n.length;be<xe;be++){const Ke=n[be].ranges[0],Ze=Ke.left,nt=Ke.left+Ke.width,Ot={top:0,bottom:0},ft={top:0,bottom:0};if(be>0){const kt=n[be-1].ranges[0].left,Gt=n[be-1].ranges[0].left+n[be-1].ranges[0].width;et(Ze-kt)<T?Ot.top=2:Ze>kt&&(Ot.top=1),et(nt-Gt)<T?ft.top=2:kt<nt&&nt<Gt&&(ft.top=1)}else N&&(Ot.top=N.startStyle.top,ft.top=N.endStyle.top);if(be+1<xe){const kt=n[be+1].ranges[0].left,Gt=n[be+1].ranges[0].left+n[be+1].ranges[0].width;et(Ze-kt)<T?Ot.bottom=2:kt<Ze&&Ze<Gt&&(Ot.bottom=1),et(nt-Gt)<T?ft.bottom=2:nt<Gt&&(ft.bottom=1)}else Y&&(Ot.bottom=Y.startStyle.bottom,ft.bottom=Y.endStyle.bottom);Ke.startStyle=Ot,Ke.endStyle=ft}}_getVisibleRangesWithStyle(o,n,a){const T=n.linesVisibleRangesForRange(o,!0)||[],N=T.map(ue),Y=this._visibleRangesHaveGaps(N);return!Y&&this._roundedSelection&&this._enrichVisibleRangesWithStyle(n.visibleRange,N,a),N}_createSelectionPiece(o,n,a,T,N){return'<div class="cslr '+a+'" style="top:'+o.toString()+"px;left:"+T.toString()+"px;width:"+N.toString()+"px;height:"+n+'px;"></div>'}_actualRenderOneSelection(o,n,a,T){if(T.length===0)return;const N=!!T[0].ranges[0].startStyle,Y=this._lineHeight.toString(),be=(this._lineHeight-1).toString(),xe=T[0].lineNumber,Ke=T[T.length-1].lineNumber;for(let Ze=0,nt=T.length;Ze<nt;Ze++){const Ot=T[Ze],ft=Ot.lineNumber,kt=ft-n,Gt=a&&(ft===Ke||ft===xe)?be:Y,eo=a&&ft===xe?1:0;let co="",go="";for(let yo=0,jo=Ot.ranges.length;yo<jo;yo++){const Po=Ot.ranges[yo];if(N){const oi=Po.startStyle,$o=Po.endStyle;if(oi.top===1||oi.bottom===1){co+=this._createSelectionPiece(eo,Gt,Fe.SELECTION_CLASS_NAME,Po.left-Fe.ROUNDED_PIECE_WIDTH,Fe.ROUNDED_PIECE_WIDTH);let Yo=Fe.EDITOR_BACKGROUND_CLASS_NAME;oi.top===1&&(Yo+=" "+Fe.SELECTION_TOP_RIGHT),oi.bottom===1&&(Yo+=" "+Fe.SELECTION_BOTTOM_RIGHT),co+=this._createSelectionPiece(eo,Gt,Yo,Po.left-Fe.ROUNDED_PIECE_WIDTH,Fe.ROUNDED_PIECE_WIDTH)}if($o.top===1||$o.bottom===1){co+=this._createSelectionPiece(eo,Gt,Fe.SELECTION_CLASS_NAME,Po.left+Po.width,Fe.ROUNDED_PIECE_WIDTH);let Yo=Fe.EDITOR_BACKGROUND_CLASS_NAME;$o.top===1&&(Yo+=" "+Fe.SELECTION_TOP_LEFT),$o.bottom===1&&(Yo+=" "+Fe.SELECTION_BOTTOM_LEFT),co+=this._createSelectionPiece(eo,Gt,Yo,Po.left+Po.width,Fe.ROUNDED_PIECE_WIDTH)}}let ti=Fe.SELECTION_CLASS_NAME;if(N){const oi=Po.startStyle,$o=Po.endStyle;oi.top===0&&(ti+=" "+Fe.SELECTION_TOP_LEFT),oi.bottom===0&&(ti+=" "+Fe.SELECTION_BOTTOM_LEFT),$o.top===0&&(ti+=" "+Fe.SELECTION_TOP_RIGHT),$o.bottom===0&&(ti+=" "+Fe.SELECTION_BOTTOM_RIGHT)}go+=this._createSelectionPiece(eo,Gt,ti,Po.left,Po.width)}o[kt][0]+=co,o[kt][1]+=go}}prepareRender(o){const n=[],a=o.visibleRange.startLineNumber,T=o.visibleRange.endLineNumber;for(let Y=a;Y<=T;Y++){const be=Y-a;n[be]=["",""]}const N=[];for(let Y=0,be=this._selections.length;Y<be;Y++){const xe=this._selections[Y];if(xe.isEmpty()){N[Y]=null;continue}const Ke=this._getVisibleRangesWithStyle(xe,o,this._previousFrameVisibleRangesWithStyle[Y]);N[Y]=Ke,this._actualRenderOneSelection(n,a,this._selections.length>1,Ke)}this._previousFrameVisibleRangesWithStyle=N,this._renderResult=n.map(([Y,be])=>Y+be)}render(o,n){if(!this._renderResult)return"";const a=n-o;return a<0||a>=this._renderResult.length?"":this._renderResult[a]}}Fe.SELECTION_CLASS_NAME="selected-text",Fe.SELECTION_TOP_LEFT="top-left-radius",Fe.SELECTION_BOTTOM_LEFT="bottom-left-radius",Fe.SELECTION_TOP_RIGHT="top-right-radius",Fe.SELECTION_BOTTOM_RIGHT="bottom-right-radius",Fe.EDITOR_BACKGROUND_CLASS_NAME="monaco-editor-background",Fe.ROUNDED_PIECE_WIDTH=10,Object(so.f)((o,n)=>{const a=o.getColor(ui.P);a&&n.addRule(`.monaco-editor .focused .selected-text { background-color: ${a}; }`);const T=o.getColor(ui.J);T&&n.addRule(`.monaco-editor .selected-text { background-color: ${T}; }`);const N=o.getColor(ui.Q);N&&!N.isTransparent()&&n.addRule(`.monaco-editor .view-line span.inline-selected-text { color: ${N}; }`)});function et(o){return o<0?-o:o}var f=t("2Tsy");class h{constructor(o,n,a,T,N,Y){this.top=o,this.left=n,this.width=a,this.height=T,this.textContent=N,this.textContentClassName=Y}}class _{constructor(o){this._context=o;const n=this._context.configuration.options,a=n.get(43);this._cursorStyle=n.get(24),this._lineHeight=n.get(58),this._typicalHalfwidthCharacterWidth=a.typicalHalfwidthCharacterWidth,this._lineCursorWidth=Math.min(n.get(27),this._typicalHalfwidthCharacterWidth),this._isVisible=!0,this._domNode=Object(u.b)(document.createElement("div")),this._domNode.setClassName(`cursor ${_o.a}`),this._domNode.setHeight(this._lineHeight),this._domNode.setTop(0),this._domNode.setLeft(0),L.a.applyFontInfo(this._domNode,a),this._domNode.setDisplay("none"),this._position=new U.a(1,1),this._lastRenderedContent="",this._renderData=null}getDomNode(){return this._domNode}getPosition(){return this._position}show(){this._isVisible||(this._domNode.setVisibility("inherit"),this._isVisible=!0)}hide(){this._isVisible&&(this._domNode.setVisibility("hidden"),this._isVisible=!1)}onConfigurationChanged(o){const n=this._context.configuration.options,a=n.get(43);return this._cursorStyle=n.get(24),this._lineHeight=n.get(58),this._typicalHalfwidthCharacterWidth=a.typicalHalfwidthCharacterWidth,this._lineCursorWidth=Math.min(n.get(27),this._typicalHalfwidthCharacterWidth),L.a.applyFontInfo(this._domNode,a),!0}onCursorPositionChanged(o){return this._position=o,!0}_prepareRender(o){let n="";if(this._cursorStyle===Xe.i.Line||this._cursorStyle===Xe.i.LineThin){const Ot=o.visibleRangeForPosition(this._position);if(!Ot||Ot.outsideRenderedLine)return null;let ft;if(this._cursorStyle===Xe.i.Line){if(ft=v.u(this._lineCursorWidth>0?this._lineCursorWidth:2),ft>2){const eo=this._context.model.getLineContent(this._position.lineNumber),co=ut.K(eo,this._position.column-1);n=eo.substr(this._position.column-1,co)}}else ft=v.u(1);let kt=Ot.left;ft>=2&&kt>=1&&(kt-=1);const Gt=o.getVerticalOffsetForLineNumber(this._position.lineNumber)-o.bigNumbersDelta;return new h(Gt,kt,ft,this._lineHeight,n,"")}const a=this._context.model.getLineContent(this._position.lineNumber),T=ut.K(a,this._position.column-1),N=o.linesVisibleRangesForRange(new se.a(this._position.lineNumber,this._position.column,this._position.lineNumber,this._position.column+T),!1);if(!N||N.length===0)return null;const Y=N[0];if(Y.outsideRenderedLine||Y.ranges.length===0)return null;const be=Y.ranges[0],xe=be.width<1?this._typicalHalfwidthCharacterWidth:be.width;let Ke="";if(this._cursorStyle===Xe.i.Block){const Ot=this._context.model.getViewLineData(this._position.lineNumber);n=a.substr(this._position.column-1,T);const ft=Ot.tokens.findTokenIndexAtOffset(this._position.column-1);Ke=Ot.tokens.getClassName(ft)}let Ze=o.getVerticalOffsetForLineNumber(this._position.lineNumber)-o.bigNumbersDelta,nt=this._lineHeight;return(this._cursorStyle===Xe.i.Underline||this._cursorStyle===Xe.i.UnderlineThin)&&(Ze+=this._lineHeight-2,nt=2),new h(Ze,be.left,xe,nt,n,Ke)}prepareRender(o){this._renderData=this._prepareRender(o)}render(o){return this._renderData?(this._lastRenderedContent!==this._renderData.textContent&&(this._lastRenderedContent=this._renderData.textContent,this._domNode.domNode.textContent=this._lastRenderedContent),this._domNode.setClassName(`cursor ${_o.a} ${this._renderData.textContentClassName}`),this._domNode.setDisplay("block"),this._domNode.setTop(this._renderData.top),this._domNode.setLeft(this._renderData.left),this._domNode.setWidth(this._renderData.width),this._domNode.setLineHeight(this._renderData.height),this._domNode.setHeight(this._renderData.height),{domNode:this._domNode.domNode,position:this._position,contentLeft:this._renderData.left,height:this._renderData.height,width:2}):(this._domNode.setDisplay("none"),null)}}class K extends le{constructor(o){super(o);const n=this._context.configuration.options;this._readOnly=n.get(80),this._cursorBlinking=n.get(22),this._cursorStyle=n.get(24),this._cursorSmoothCaretAnimation=n.get(23),this._selectionIsEmpty=!0,this._isComposingInput=!1,this._isVisible=!1,this._primaryCursor=new _(this._context),this._secondaryCursors=[],this._renderData=[],this._domNode=Object(u.b)(document.createElement("div")),this._domNode.setAttribute("role","presentation"),this._domNode.setAttribute("aria-hidden","true"),this._updateDomClassName(),this._domNode.appendChild(this._primaryCursor.getDomNode()),this._startCursorBlinkAnimation=new E.g,this._cursorFlatBlinkInterval=new E.c,this._blinkingEnabled=!1,this._editorHasFocus=!1,this._updateBlinking()}dispose(){super.dispose(),this._startCursorBlinkAnimation.dispose(),this._cursorFlatBlinkInterval.dispose()}getDomNode(){return this._domNode}onCompositionStart(o){return this._isComposingInput=!0,this._updateBlinking(),!0}onCompositionEnd(o){return this._isComposingInput=!1,this._updateBlinking(),!0}onConfigurationChanged(o){const n=this._context.configuration.options;this._readOnly=n.get(80),this._cursorBlinking=n.get(22),this._cursorStyle=n.get(24),this._cursorSmoothCaretAnimation=n.get(23),this._updateBlinking(),this._updateDomClassName(),this._primaryCursor.onConfigurationChanged(o);for(let a=0,T=this._secondaryCursors.length;a<T;a++)this._secondaryCursors[a].onConfigurationChanged(o);return!0}_onCursorPositionChanged(o,n){if(this._primaryCursor.onCursorPositionChanged(o),this._updateBlinking(),this._secondaryCursors.length<n.length){const a=n.length-this._secondaryCursors.length;for(let T=0;T<a;T++){const N=new _(this._context);this._domNode.domNode.insertBefore(N.getDomNode().domNode,this._primaryCursor.getDomNode().domNode.nextSibling),this._secondaryCursors.push(N)}}else if(this._secondaryCursors.length>n.length){const a=this._secondaryCursors.length-n.length;for(let T=0;T<a;T++)this._domNode.removeChild(this._secondaryCursors[0].getDomNode()),this._secondaryCursors.splice(0,1)}for(let a=0;a<n.length;a++)this._secondaryCursors[a].onCursorPositionChanged(n[a])}onCursorStateChanged(o){const n=[];for(let T=0,N=o.selections.length;T<N;T++)n[T]=o.selections[T].getPosition();this._onCursorPositionChanged(n[0],n.slice(1));const a=o.selections[0].isEmpty();return this._selectionIsEmpty!==a&&(this._selectionIsEmpty=a,this._updateDomClassName()),!0}onDecorationsChanged(o){return!0}onFlushed(o){return!0}onFocusChanged(o){return this._editorHasFocus=o.isFocused,this._updateBlinking(),!1}onLinesChanged(o){return!0}onLinesDeleted(o){return!0}onLinesInserted(o){return!0}onScrollChanged(o){return!0}onTokensChanged(o){const n=a=>{for(let T=0,N=o.ranges.length;T<N;T++)if(o.ranges[T].fromLineNumber<=a.lineNumber&&a.lineNumber<=o.ranges[T].toLineNumber)return!0;return!1};if(n(this._primaryCursor.getPosition()))return!0;for(const a of this._secondaryCursors)if(n(a.getPosition()))return!0;return!1}onZonesChanged(o){return!0}_getCursorBlinking(){return this._isComposingInput?0:this._editorHasFocus?this._readOnly?5:this._cursorBlinking:0}_updateBlinking(){this._startCursorBlinkAnimation.cancel(),this._cursorFlatBlinkInterval.cancel();const o=this._getCursorBlinking(),n=o===0,a=o===5;n?this._hide():this._show(),this._blinkingEnabled=!1,this._updateDomClassName(),!n&&!a&&(o===1?this._cursorFlatBlinkInterval.cancelAndSet(()=>{this._isVisible?this._hide():this._show()},K.BLINK_INTERVAL):this._startCursorBlinkAnimation.setIfNotSet(()=>{this._blinkingEnabled=!0,this._updateDomClassName()},K.BLINK_INTERVAL))}_updateDomClassName(){this._domNode.setClassName(this._getClassName())}_getClassName(){let o="cursors-layer";this._selectionIsEmpty||(o+=" has-selection");switch(this._cursorStyle){case Xe.i.Line:o+=" cursor-line-style";break;case Xe.i.Block:o+=" cursor-block-style";break;case Xe.i.Underline:o+=" cursor-underline-style";break;case Xe.i.LineThin:o+=" cursor-line-thin-style";break;case Xe.i.BlockOutline:o+=" cursor-block-outline-style";break;case Xe.i.UnderlineThin:o+=" cursor-underline-thin-style";break;default:o+=" cursor-line-style"}if(this._blinkingEnabled)switch(this._getCursorBlinking()){case 1:o+=" cursor-blink";break;case 2:o+=" cursor-smooth";break;case 3:o+=" cursor-phase";break;case 4:o+=" cursor-expand";break;case 5:o+=" cursor-solid";break;default:o+=" cursor-solid"}else o+=" cursor-solid";return this._cursorSmoothCaretAnimation&&(o+=" cursor-smooth-caret-animation"),o}_show(){this._primaryCursor.show();for(let o=0,n=this._secondaryCursors.length;o<n;o++)this._secondaryCursors[o].show();this._isVisible=!0}_hide(){this._primaryCursor.hide();for(let o=0,n=this._secondaryCursors.length;o<n;o++)this._secondaryCursors[o].hide();this._isVisible=!1}prepareRender(o){this._primaryCursor.prepareRender(o);for(let n=0,a=this._secondaryCursors.length;n<a;n++)this._secondaryCursors[n].prepareRender(o)}render(o){let n=[],a=0;const T=this._primaryCursor.render(o);T&&(n[a++]=T);for(let N=0,Y=this._secondaryCursors.length;N<Y;N++){const be=this._secondaryCursors[N].render(o);be&&(n[a++]=be)}this._renderData=n}getLastRenderData(){return this._renderData}}K.BLINK_INTERVAL=500,Object(so.f)((o,n)=>{const a=o.getColor(zt.z);if(a){let T=o.getColor(zt.y);T||(T=a.opposite()),n.addRule(`.monaco-editor .cursors-layer .cursor { background-color: ${a}; border-color: ${a}; color: ${T}; }`),o.type==="hc"&&n.addRule(`.monaco-editor .cursors-layer.has-selection .cursor { border-left: 1px solid ${T}; border-right: 1px solid ${T}; }`)}});const de=()=>{throw new Error("Invalid change accessor")};class ye extends le{constructor(o){super(o);const n=this._context.configuration.options,a=n.get(129);this._lineHeight=n.get(58),this._contentWidth=a.contentWidth,this._contentLeft=a.contentLeft,this.domNode=Object(u.b)(document.createElement("div")),this.domNode.setClassName("view-zones"),this.domNode.setPosition("absolute"),this.domNode.setAttribute("role","presentation"),this.domNode.setAttribute("aria-hidden","true"),this.marginDomNode=Object(u.b)(document.createElement("div")),this.marginDomNode.setClassName("margin-view-zones"),this.marginDomNode.setPosition("absolute"),this.marginDomNode.setAttribute("role","presentation"),this.marginDomNode.setAttribute("aria-hidden","true"),this._zones={}}dispose(){super.dispose(),this._zones={}}_recomputeWhitespacesProps(){const o=this._context.viewLayout.getWhitespaces(),n=new Map;for(const T of o)n.set(T.id,T);let a=!1;return this._context.model.changeWhitespace(T=>{const N=Object.keys(this._zones);for(let Y=0,be=N.length;Y<be;Y++){const xe=N[Y],Ke=this._zones[xe],Ze=this._computeWhitespaceProps(Ke.delegate);Ke.isInHiddenArea=Ze.isInHiddenArea;const nt=n.get(xe);nt&&(nt.afterLineNumber!==Ze.afterViewLineNumber||nt.height!==Ze.heightInPx)&&(T.changeOneWhitespace(xe,Ze.afterViewLineNumber,Ze.heightInPx),this._safeCallOnComputedHeight(Ke.delegate,Ze.heightInPx),a=!0)}}),a}onConfigurationChanged(o){const n=this._context.configuration.options,a=n.get(129);return this._lineHeight=n.get(58),this._contentWidth=a.contentWidth,this._contentLeft=a.contentLeft,o.hasChanged(58)&&this._recomputeWhitespacesProps(),!0}onLineMappingChanged(o){return this._recomputeWhitespacesProps()}onLinesDeleted(o){return!0}onScrollChanged(o){return o.scrollTopChanged||o.scrollWidthChanged}onZonesChanged(o){return!0}onLinesInserted(o){return!0}_getZoneOrdinal(o){return typeof o.afterColumn!="undefined"?o.afterColumn:1e4}_computeWhitespaceProps(o){if(o.afterLineNumber===0)return{isInHiddenArea:!1,afterViewLineNumber:0,heightInPx:this._heightInPixels(o),minWidthInPx:this._minWidthInPixels(o)};let n;if(typeof o.afterColumn!="undefined")n=this._context.model.validateModelPosition({lineNumber:o.afterLineNumber,column:o.afterColumn});else{const Y=this._context.model.validateModelPosition({lineNumber:o.afterLineNumber,column:1}).lineNumber;n=new U.a(Y,this._context.model.getModelLineMaxColumn(Y))}let a;n.column===this._context.model.getModelLineMaxColumn(n.lineNumber)?a=this._context.model.validateModelPosition({lineNumber:n.lineNumber+1,column:1}):a=this._context.model.validateModelPosition({lineNumber:n.lineNumber,column:n.column+1});const T=this._context.model.coordinatesConverter.convertModelPositionToViewPosition(n),N=this._context.model.coordinatesConverter.modelPositionIsVisible(a);return{isInHiddenArea:!N,afterViewLineNumber:T.lineNumber,heightInPx:N?this._heightInPixels(o):0,minWidthInPx:this._minWidthInPixels(o)}}changeViewZones(o){let n=!1;return this._context.model.changeWhitespace(a=>{const T={addZone:N=>(n=!0,this._addZone(a,N)),removeZone:N=>{if(!N)return;n=this._removeZone(a,N)||n},layoutZone:N=>{if(!N)return;n=this._layoutZone(a,N)||n}};De(o,T),T.addZone=de,T.removeZone=de,T.layoutZone=de}),n}_addZone(o,n){const a=this._computeWhitespaceProps(n),T=o.insertWhitespace(a.afterViewLineNumber,this._getZoneOrdinal(n),a.heightInPx,a.minWidthInPx),N={whitespaceId:T,delegate:n,isInHiddenArea:a.isInHiddenArea,isVisible:!1,domNode:Object(u.b)(n.domNode),marginDomNode:n.marginDomNode?Object(u.b)(n.marginDomNode):null};return this._safeCallOnComputedHeight(N.delegate,a.heightInPx),N.domNode.setPosition("absolute"),N.domNode.domNode.style.width="100%",N.domNode.setDisplay("none"),N.domNode.setAttribute("monaco-view-zone",N.whitespaceId),this.domNode.appendChild(N.domNode),N.marginDomNode&&(N.marginDomNode.setPosition("absolute"),N.marginDomNode.domNode.style.width="100%",N.marginDomNode.setDisplay("none"),N.marginDomNode.setAttribute("monaco-view-zone",N.whitespaceId),this.marginDomNode.appendChild(N.marginDomNode)),this._zones[N.whitespaceId]=N,this.setShouldRender(),N.whitespaceId}_removeZone(o,n){if(this._zones.hasOwnProperty(n)){const a=this._zones[n];return delete this._zones[n],o.removeWhitespace(a.whitespaceId),a.domNode.removeAttribute("monaco-visible-view-zone"),a.domNode.removeAttribute("monaco-view-zone"),a.domNode.domNode.parentNode.removeChild(a.domNode.domNode),a.marginDomNode&&(a.marginDomNode.removeAttribute("monaco-visible-view-zone"),a.marginDomNode.removeAttribute("monaco-view-zone"),a.marginDomNode.domNode.parentNode.removeChild(a.marginDomNode.domNode)),this.setShouldRender(),!0}return!1}_layoutZone(o,n){if(this._zones.hasOwnProperty(n)){const a=this._zones[n],T=this._computeWhitespaceProps(a.delegate);return a.isInHiddenArea=T.isInHiddenArea,o.changeOneWhitespace(a.whitespaceId,T.afterViewLineNumber,T.heightInPx),this._safeCallOnComputedHeight(a.delegate,T.heightInPx),this.setShouldRender(),!0}return!1}shouldSuppressMouseDownOnViewZone(o){if(this._zones.hasOwnProperty(o)){const n=this._zones[o];return Boolean(n.delegate.suppressMouseDown)}return!1}_heightInPixels(o){return typeof o.heightInPx=="number"?o.heightInPx:typeof o.heightInLines=="number"?this._lineHeight*o.heightInLines:this._lineHeight}_minWidthInPixels(o){return typeof o.minWidthInPx=="number"?o.minWidthInPx:0}_safeCallOnComputedHeight(o,n){if(typeof o.onComputedHeight=="function")try{o.onComputedHeight(n)}catch(a){Object(C.f)(a)}}_safeCallOnDomNodeTop(o,n){if(typeof o.onDomNodeTop=="function")try{o.onDomNodeTop(n)}catch(a){Object(C.f)(a)}}prepareRender(o){}render(o){const n=o.viewportData.whitespaceViewportData,a={};let T=!1;for(const Y of n){if(this._zones[Y.id].isInHiddenArea)continue;a[Y.id]=Y,T=!0}const N=Object.keys(this._zones);for(let Y=0,be=N.length;Y<be;Y++){const xe=N[Y],Ke=this._zones[xe];let Ze=0,nt=0,Ot="none";a.hasOwnProperty(xe)?(Ze=a[xe].verticalOffset-o.bigNumbersDelta,nt=a[xe].height,Ot="block",Ke.isVisible||(Ke.domNode.setAttribute("monaco-visible-view-zone","true"),Ke.isVisible=!0),this._safeCallOnDomNodeTop(Ke.delegate,o.getScrolledTopFromAbsoluteTop(a[xe].verticalOffset))):(Ke.isVisible&&(Ke.domNode.removeAttribute("monaco-visible-view-zone"),Ke.isVisible=!1),this._safeCallOnDomNodeTop(Ke.delegate,o.getScrolledTopFromAbsoluteTop(-1e6))),Ke.domNode.setTop(Ze),Ke.domNode.setHeight(nt),Ke.domNode.setDisplay(Ot),Ke.marginDomNode&&(Ke.marginDomNode.setTop(Ze),Ke.marginDomNode.setHeight(nt),Ke.marginDomNode.setDisplay(Ot))}T&&(this.domNode.setWidth(Math.max(o.scrollWidth,this._contentWidth)),this.marginDomNode.setWidth(this._contentLeft))}}function De(o,n){try{return o(n)}catch(a){Object(C.f)(a)}}class qe{constructor(o){this._theme=o}get type(){return this._theme.type}update(o){this._theme=o}getColor(o){return this._theme.getColor(o)}}class ht{constructor(o,n,a){this.configuration=o,this.theme=new qe(n),this.model=a,this.viewLayout=a.viewLayout}addEventHandler(o){this.model.addViewEventHandler(o)}removeEventHandler(o){this.model.removeViewEventHandler(o)}}class yt{constructor(o,n,a,T){this.selections=o,this.startLineNumber=n.startLineNumber|0,this.endLineNumber=n.endLineNumber|0,this.relativeVerticalOffset=n.relativeVerticalOffset,this.bigNumbersDelta=n.bigNumbersDelta|0,this.whitespaceViewportData=a,this._model=T,this.visibleRange=new se.a(n.startLineNumber,this._model.getLineMinColumn(n.startLineNumber),n.endLineNumber,this._model.getLineMaxColumn(n.endLineNumber))}getViewLineRenderingData(o){return this._model.getViewLineRenderingData(this.visibleRange,o)}getDecorationsInViewport(){return this._model.getDecorationsInViewport(this.visibleRange)}}class Ct extends ne{constructor(o,n,a,T,N,Y){super();this._selections=[new b.a(1,1,1,1)],this._renderAnimationFrame=null;const be=new St(n,T,N,o);this._context=new ht(n,a.getColorTheme(),T),this._configPixelRatio=this._context.configuration.options.get(127),this._context.addEventHandler(this),this._register(a.onDidColorThemeChange(Gt=>{this._context.theme.update(Gt),this._context.model.onDidColorThemeChange(),this.render(!0,!1)})),this._viewParts=[],this._textAreaHandler=new Tt(this._context,be,this._createTextAreaHandlerHelper()),this._viewParts.push(this._textAreaHandler),this._linesContent=Object(u.b)(document.createElement("div")),this._linesContent.setClassName("lines-content monaco-editor-background"),this._linesContent.setPosition("absolute"),this.domNode=Object(u.b)(document.createElement("div")),this.domNode.setClassName(this._getEditorClassName()),this.domNode.setAttribute("role","code"),this._overflowGuardContainer=Object(u.b)(document.createElement("div")),_e.write(this._overflowGuardContainer,3),this._overflowGuardContainer.setClassName("overflow-guard"),this._scrollbar=new pn(this._context,this._linesContent,this.domNode,this._overflowGuardContainer),this._viewParts.push(this._scrollbar),this._viewLines=new Ee(this._context,this._linesContent),this._viewZones=new ye(this._context),this._viewParts.push(this._viewZones);const xe=new In(this._context);this._viewParts.push(xe);const Ke=new Un(this._context);this._viewParts.push(Ke);const Ze=new ri(this._context);this._viewParts.push(Ze),Ze.addDynamicOverlay(new on(this._context)),Ze.addDynamicOverlay(new Fe(this._context)),Ze.addDynamicOverlay(new rn(this._context)),Ze.addDynamicOverlay(new zi(this._context));const nt=new Zo(this._context);this._viewParts.push(nt),nt.addDynamicOverlay(new cn(this._context)),nt.addDynamicOverlay(new Qi(this._context)),nt.addDynamicOverlay(new vt(this._context)),nt.addDynamicOverlay(new He(this._context)),nt.addDynamicOverlay(new wo(this._context));const Ot=new No(this._context);Ot.getDomNode().appendChild(this._viewZones.marginDomNode),Ot.getDomNode().appendChild(nt.getDomNode()),this._viewParts.push(Ot),this._contentWidgets=new ki(this._context,this.domNode),this._viewParts.push(this._contentWidgets),this._viewCursors=new K(this._context),this._viewParts.push(this._viewCursors),this._overlayWidgets=new pi(this._context),this._viewParts.push(this._overlayWidgets);const ft=new gn(this._context);this._viewParts.push(ft);const kt=new Uo(this._context);if(this._viewParts.push(kt),xe){const Gt=this._scrollbar.getOverviewRulerLayoutInfo();Gt.parent.insertBefore(xe.getDomNode(),Gt.insertBefore)}this._linesContent.appendChild(Ze.getDomNode()),this._linesContent.appendChild(ft.domNode),this._linesContent.appendChild(this._viewZones.domNode),this._linesContent.appendChild(this._viewLines.getDomNode()),this._linesContent.appendChild(this._contentWidgets.domNode),this._linesContent.appendChild(this._viewCursors.getDomNode()),this._overflowGuardContainer.appendChild(Ot.getDomNode()),this._overflowGuardContainer.appendChild(this._scrollbar.getDomNode()),this._overflowGuardContainer.appendChild(Ke.getDomNode()),this._overflowGuardContainer.appendChild(this._textAreaHandler.textArea),this._overflowGuardContainer.appendChild(this._textAreaHandler.textAreaCover),this._overflowGuardContainer.appendChild(this._overlayWidgets.getDomNode()),this._overflowGuardContainer.appendChild(kt.getDomNode()),this.domNode.appendChild(this._overflowGuardContainer),Y?Y.appendChild(this._contentWidgets.overflowingContentWidgetsDomNode.domNode):this.domNode.appendChild(this._contentWidgets.overflowingContentWidgetsDomNode),this._applyLayout(),this._pointerHandler=this._register(new Qe(this._context,be,this._createPointerHandlerHelper()))}_flushAccumulatedAndRenderNow(){this._renderNow()}_createPointerHandlerHelper(){return{viewDomNode:this.domNode.domNode,linesContentDomNode:this._linesContent.domNode,focusTextArea:()=>{this.focus()},dispatchTextAreaEvent:o=>{this._textAreaHandler.textArea.domNode.dispatchEvent(o)},getLastRenderData:()=>{const o=this._viewCursors.getLastRenderData()||[],n=this._textAreaHandler.getLastRenderData();return new Ht(o,n)},shouldSuppressMouseDownOnViewZone:o=>this._viewZones.shouldSuppressMouseDownOnViewZone(o),shouldSuppressMouseDownOnWidget:o=>this._contentWidgets.shouldSuppressMouseDownOnWidget(o),getPositionFromDOMInfo:(o,n)=>(this._flushAccumulatedAndRenderNow(),this._viewLines.getPositionFromDOMInfo(o,n)),visibleRangeForPosition:(o,n)=>(this._flushAccumulatedAndRenderNow(),this._viewLines.visibleRangeForPosition(new U.a(o,n))),getLineWidth:o=>(this._flushAccumulatedAndRenderNow(),this._viewLines.getLineWidth(o))}}_createTextAreaHandlerHelper(){return{visibleRangeForPositionRelativeToEditor:(o,n)=>(this._flushAccumulatedAndRenderNow(),this._viewLines.visibleRangeForPosition(new U.a(o,n)))}}_applyLayout(){const o=this._context.configuration.options,n=o.get(129);this.domNode.setWidth(n.width),this.domNode.setHeight(n.height),this._overflowGuardContainer.setWidth(n.width),this._overflowGuardContainer.setHeight(n.height),this._linesContent.setWidth(1e6),this._linesContent.setHeight(1e6)}_getEditorClassName(){const o=this._textAreaHandler.isFocused()?" focused":"";return this._context.configuration.options.get(126)+" "+Object(so.e)(this._context.theme.type)+o}handleEvents(o){super.handleEvents(o),this._scheduleRender()}onConfigurationChanged(o){return this._configPixelRatio=this._context.configuration.options.get(127),this.domNode.setClassName(this._getEditorClassName()),this._applyLayout(),!1}onCursorStateChanged(o){return this._selections=o.selections,!1}onFocusChanged(o){return this.domNode.setClassName(this._getEditorClassName()),!1}onThemeChanged(o){return this.domNode.setClassName(this._getEditorClassName()),!1}dispose(){this._renderAnimationFrame!==null&&(this._renderAnimationFrame.dispose(),this._renderAnimationFrame=null),this._contentWidgets.overflowingContentWidgetsDomNode.domNode.remove(),this._context.removeEventHandler(this),this._viewLines.dispose();for(const o of this._viewParts)o.dispose();super.dispose()}_scheduleRender(){this._renderAnimationFrame===null&&(this._renderAnimationFrame=v.T(this._onRenderScheduled.bind(this),100))}_onRenderScheduled(){this._renderAnimationFrame=null,this._flushAccumulatedAndRenderNow()}_renderNow(){At(()=>this._actualRender())}_getViewPartsToRender(){let o=[],n=0;for(const a of this._viewParts)a.shouldRender()&&(o[n++]=a);return o}_actualRender(){if(!v.N(this.domNode.domNode))return;let o=this._getViewPartsToRender();if(!this._viewLines.shouldRender()&&o.length===0)return;const n=this._context.viewLayout.getLinesViewportData();this._context.model.setViewport(n.startLineNumber,n.endLineNumber,n.centeredLineNumber);const a=new yt(this._selections,n,this._context.viewLayout.getWhitespaceViewportData(),this._context.model);this._contentWidgets.shouldRender()&&this._contentWidgets.onBeforeRender(a),this._viewLines.shouldRender()&&(this._viewLines.renderText(a),this._viewLines.onDidRender(),o=this._getViewPartsToRender());const T=new oe(this._context.viewLayout,a,this._viewLines);for(const N of o)N.prepareRender(T);for(const N of o)N.render(T),N.onDidRender();Math.abs(w.a()-this._configPixelRatio)>.001&&this._context.configuration.updatePixelRatio()}delegateVerticalScrollbarMouseDown(o){this._scrollbar.delegateVerticalScrollbarMouseDown(o)}restoreState(o){this._context.model.setScrollPosition({scrollTop:o.scrollTop},1),this._context.model.tokenizeViewport(),this._renderNow(),this._viewLines.updateLineWidths(),this._context.model.setScrollPosition({scrollLeft:o.scrollLeft},1)}getOffsetForColumn(o,n){const a=this._context.model.validateModelPosition({lineNumber:o,column:n}),T=this._context.model.coordinatesConverter.convertModelPositionToViewPosition(a);this._flushAccumulatedAndRenderNow();const N=this._viewLines.visibleRangeForPosition(new U.a(T.lineNumber,T.column));return N?N.left:-1}getTargetAtClientPoint(o,n){const a=this._pointerHandler.getTargetAtClientPoint(o,n);return a?Qt.convertViewToModelMouseTarget(a,this._context.model.coordinatesConverter):null}createOverviewRuler(o){return new bn(this._context,o)}change(o){this._viewZones.changeViewZones(o),this._scheduleRender()}render(o,n){if(n){this._viewLines.forceShouldRender();for(const a of this._viewParts)a.forceShouldRender()}o?this._flushAccumulatedAndRenderNow():this._scheduleRender()}focus(){this._textAreaHandler.focusTextArea()}isFocused(){return this._textAreaHandler.isFocused()}setAriaOptions(o){this._textAreaHandler.setAriaOptions(o)}addContentWidget(o){this._contentWidgets.addWidget(o.widget),this.layoutContentWidget(o),this._scheduleRender()}layoutContentWidget(o){let n=o.position&&o.position.range||null;if(n===null){const T=o.position?o.position.position:null;T!==null&&(n=new se.a(T.lineNumber,T.column,T.lineNumber,T.column))}const a=o.position?o.position.preference:null;this._contentWidgets.setWidgetPosition(o.widget,n,a),this._scheduleRender()}removeContentWidget(o){this._contentWidgets.removeWidget(o.widget),this._scheduleRender()}addOverlayWidget(o){this._overlayWidgets.addWidget(o.widget),this.layoutOverlayWidget(o),this._scheduleRender()}layoutOverlayWidget(o){const n=o.position?o.position.preference:null,a=this._overlayWidgets.setWidgetPosition(o.widget,n);a&&this._scheduleRender()}removeOverlayWidget(o){this._overlayWidgets.removeWidget(o.widget),this._scheduleRender()}}function At(o){try{return o()}catch(n){Object(C.f)(n)}}class Ft{constructor(o){this._selTrackedRange=null,this._trackSelection=!0,this._setState(o,new je.f(new se.a(1,1,1,1),0,new U.a(1,1),0),new je.f(new se.a(1,1,1,1),0,new U.a(1,1),0))}dispose(o){this._removeTrackedRange(o)}startTrackingSelection(o){this._trackSelection=!0,this._updateTrackedRange(o)}stopTrackingSelection(o){this._trackSelection=!1,this._removeTrackedRange(o)}_updateTrackedRange(o){if(!this._trackSelection)return;this._selTrackedRange=o.model._setTrackedRange(this._selTrackedRange,this.modelState.selection,0)}_removeTrackedRange(o){this._selTrackedRange=o.model._setTrackedRange(this._selTrackedRange,null,0)}asCursorState(){return new je.d(this.modelState,this.viewState)}readSelectionFromMarkers(o){const n=o.model._getTrackedRange(this._selTrackedRange);return this.modelState.selection.getDirection()===0?new b.a(n.startLineNumber,n.startColumn,n.endLineNumber,n.endColumn):new b.a(n.endLineNumber,n.endColumn,n.startLineNumber,n.startColumn)}ensureValidState(o){this._setState(o,this.modelState,this.viewState)}setState(o,n,a){this._setState(o,n,a)}static _validatePositionWithCache(o,n,a,T){return n.equals(a)?T:o.normalizePosition(n,2)}static _validateViewState(o,n){const a=n.position,T=n.selectionStart.getStartPosition(),N=n.selectionStart.getEndPosition(),Y=o.normalizePosition(a,2),be=this._validatePositionWithCache(o,T,a,Y),xe=this._validatePositionWithCache(o,N,T,be);return a.equals(Y)&&T.equals(be)&&N.equals(xe)?n:new je.f(se.a.fromPositions(be,xe),n.selectionStartLeftoverVisibleColumns+T.column-be.column,Y,n.leftoverVisibleColumns+a.column-Y.column)}_setState(o,n,a){if(a&&(a=Ft._validateViewState(o.viewModel,a)),n){const T=o.model.validateRange(n.selectionStart),N=n.selectionStart.equalsRange(T)?n.selectionStartLeftoverVisibleColumns:0,Y=o.model.validatePosition(n.position),be=n.position.equals(Y)?n.leftoverVisibleColumns:0;n=new je.f(T,N,Y,be)}else{if(!a)return;const T=o.model.validateRange(o.coordinatesConverter.convertViewRangeToModelRange(a.selectionStart)),N=o.model.validatePosition(o.coordinatesConverter.convertViewPositionToModelPosition(a.position));n=new je.f(T,a.selectionStartLeftoverVisibleColumns,N,a.leftoverVisibleColumns)}if(a){const T=o.coordinatesConverter.validateViewRange(a.selectionStart,n.selectionStart),N=o.coordinatesConverter.validateViewPosition(a.position,n.position);a=new je.f(T,n.selectionStartLeftoverVisibleColumns,N,n.leftoverVisibleColumns)}else{const T=o.coordinatesConverter.convertModelPositionToViewPosition(new U.a(n.selectionStart.startLineNumber,n.selectionStart.startColumn)),N=o.coordinatesConverter.convertModelPositionToViewPosition(new U.a(n.selectionStart.endLineNumber,n.selectionStart.endColumn)),Y=new se.a(T.lineNumber,T.column,N.lineNumber,N.column),be=o.coordinatesConverter.convertModelPositionToViewPosition(n.position);a=new je.f(Y,n.selectionStartLeftoverVisibleColumns,be,n.leftoverVisibleColumns)}this.modelState=n,this.viewState=a,this._updateTrackedRange(o)}}class Zt{constructor(o){this.context=o,this.primaryCursor=new Ft(o),this.secondaryCursors=[],this.lastAddedCursorIndex=0}dispose(){this.primaryCursor.dispose(this.context),this.killSecondaryCursors()}startTrackingSelections(){this.primaryCursor.startTrackingSelection(this.context);for(let o=0,n=this.secondaryCursors.length;o<n;o++)this.secondaryCursors[o].startTrackingSelection(this.context)}stopTrackingSelections(){this.primaryCursor.stopTrackingSelection(this.context);for(let o=0,n=this.secondaryCursors.length;o<n;o++)this.secondaryCursors[o].stopTrackingSelection(this.context)}updateContext(o){this.context=o}ensureValidState(){this.primaryCursor.ensureValidState(this.context);for(let o=0,n=this.secondaryCursors.length;o<n;o++)this.secondaryCursors[o].ensureValidState(this.context)}readSelectionFromMarkers(){let o=[];o[0]=this.primaryCursor.readSelectionFromMarkers(this.context);for(let n=0,a=this.secondaryCursors.length;n<a;n++)o[n+1]=this.secondaryCursors[n].readSelectionFromMarkers(this.context);return o}getAll(){let o=[];o[0]=this.primaryCursor.asCursorState();for(let n=0,a=this.secondaryCursors.length;n<a;n++)o[n+1]=this.secondaryCursors[n].asCursorState();return o}getViewPositions(){let o=[];o[0]=this.primaryCursor.viewState.position;for(let n=0,a=this.secondaryCursors.length;n<a;n++)o[n+1]=this.secondaryCursors[n].viewState.position;return o}getTopMostViewPosition(){let o=this.primaryCursor.viewState.position;for(let n=0,a=this.secondaryCursors.length;n<a;n++){const T=this.secondaryCursors[n].viewState.position;T.isBefore(o)&&(o=T)}return o}getBottomMostViewPosition(){let o=this.primaryCursor.viewState.position;for(let n=0,a=this.secondaryCursors.length;n<a;n++){const T=this.secondaryCursors[n].viewState.position;o.isBeforeOrEqual(T)&&(o=T)}return o}getSelections(){let o=[];o[0]=this.primaryCursor.modelState.selection;for(let n=0,a=this.secondaryCursors.length;n<a;n++)o[n+1]=this.secondaryCursors[n].modelState.selection;return o}getViewSelections(){let o=[];o[0]=this.primaryCursor.viewState.selection;for(let n=0,a=this.secondaryCursors.length;n<a;n++)o[n+1]=this.secondaryCursors[n].viewState.selection;return o}setSelections(o){this.setStates(je.d.fromModelSelections(o))}getPrimaryCursor(){return this.primaryCursor.asCursorState()}setStates(o){if(o===null)return;this.primaryCursor.setState(this.context,o[0].modelState,o[0].viewState),this._setSecondaryStates(o.slice(1))}_setSecondaryStates(o){const n=this.secondaryCursors.length,a=o.length;if(n<a){let T=a-n;for(let N=0;N<T;N++)this._addSecondaryCursor()}else if(n>a){let T=n-a;for(let N=0;N<T;N++)this._removeSecondaryCursor(this.secondaryCursors.length-1)}for(let T=0;T<a;T++)this.secondaryCursors[T].setState(this.context,o[T].modelState,o[T].viewState)}killSecondaryCursors(){this._setSecondaryStates([])}_addSecondaryCursor(){this.secondaryCursors.push(new Ft(this.context)),this.lastAddedCursorIndex=this.secondaryCursors.length}getLastAddedCursorIndex(){return this.secondaryCursors.length===0||this.lastAddedCursorIndex===0?0:this.lastAddedCursorIndex}_removeSecondaryCursor(o){this.lastAddedCursorIndex>=o+1&&this.lastAddedCursorIndex--,this.secondaryCursors[o].dispose(this.context),this.secondaryCursors.splice(o,1)}_getAll(){let o=[];o[0]=this.primaryCursor;for(let n=0,a=this.secondaryCursors.length;n<a;n++)o[n+1]=this.secondaryCursors[n];return o}normalize(){if(this.secondaryCursors.length===0)return;let o=this._getAll(),n=[];for(let a=0,T=o.length;a<T;a++)n.push({index:a,selection:o[a].modelState.selection});n.sort((a,T)=>a.selection.startLineNumber===T.selection.startLineNumber?a.selection.startColumn-T.selection.startColumn:a.selection.startLineNumber-T.selection.startLineNumber);for(let a=0;a<n.length-1;a++){const T=n[a],N=n[a+1],Y=T.selection,be=N.selection;if(!this.context.cursorConfig.multiCursorMergeOverlapping)continue;let xe;if(be.isEmpty()||Y.isEmpty()?xe=be.getStartPosition().isBeforeOrEqual(Y.getEndPosition()):xe=be.getStartPosition().isBefore(Y.getEndPosition()),xe){const Ke=T.index<N.index?a:a+1,Ze=T.index<N.index?a+1:a,nt=n[Ze].index,Ot=n[Ke].index,ft=n[Ze].selection,kt=n[Ke].selection;if(!ft.equalsSelection(kt)){const Gt=ft.plusRange(kt),eo=ft.selectionStartLineNumber===ft.startLineNumber&&ft.selectionStartColumn===ft.startColumn,co=kt.selectionStartLineNumber===kt.startLineNumber&&kt.selectionStartColumn===kt.startColumn;let go;nt===this.lastAddedCursorIndex?(go=eo,this.lastAddedCursorIndex=Ot):go=co;let yo;go?yo=new b.a(Gt.startLineNumber,Gt.startColumn,Gt.endLineNumber,Gt.endColumn):yo=new b.a(Gt.endLineNumber,Gt.endColumn,Gt.startLineNumber,Gt.startColumn),n[Ke].selection=yo;const jo=je.d.fromModelSelection(yo);o[Ot].setState(this.context,jo.modelState,jo.viewState)}for(const Gt of n)Gt.index>nt&&Gt.index--;o.splice(nt,1),n.splice(Ze,1),this._removeSecondaryCursor(nt-1),a--}}}}var Yt=t("snIX"),ao=t("GR/f"),Co=t("M46C");class ko{constructor(){this.type=0}}class Qo{constructor(){this.type=1}}class yi{constructor(o){this.type=2,this._source=o}hasChanged(o){return this._source.hasChanged(o)}}class Ko{constructor(o,n){this.type=3,this.selections=o,this.modelSelections=n}}class li{constructor(o){this.type=4,o?(this.affectsMinimap=o.affectsMinimap,this.affectsOverviewRuler=o.affectsOverviewRuler):(this.affectsMinimap=!0,this.affectsOverviewRuler=!0)}}class Ki{constructor(){this.type=5}}class xi{constructor(o){this.type=6,this.isFocused=o}}class Ni{constructor(){this.type=7}}class Ti{constructor(){this.type=8}}class wn{constructor(o,n){this.type=9,this.fromLineNumber=o,this.toLineNumber=n}}class yn{constructor(o,n){this.type=10,this.fromLineNumber=o,this.toLineNumber=n}}class En{constructor(o,n){this.type=11,this.fromLineNumber=o,this.toLineNumber=n}}class Mn{constructor(o,n,a,T,N,Y){this.type=12,this.source=o,this.range=n,this.selections=a,this.verticalType=T,this.revealHorizontal=N,this.scrollType=Y}}class Os{constructor(o){this.type=13,this.scrollWidth=o.scrollWidth,this.scrollLeft=o.scrollLeft,this.scrollHeight=o.scrollHeight,this.scrollTop=o.scrollTop,this.scrollWidthChanged=o.scrollWidthChanged,this.scrollLeftChanged=o.scrollLeftChanged,this.scrollHeightChanged=o.scrollHeightChanged,this.scrollTopChanged=o.scrollTopChanged}}class Yn{constructor(){this.type=14}}class vs{constructor(o){this.type=15,this.ranges=o}}class ns{constructor(){this.type=16}}class pr{constructor(){this.type=17}}class br extends d.a{constructor(){super();this._onEvent=this._register(new m.b),this.onEvent=this._onEvent.event,this._eventHandlers=[],this._viewEventQueue=null,this._isConsumingViewEventQueue=!1,this._collector=null,this._collectorCnt=0,this._outgoingEvents=[]}emitOutgoingEvent(o){this._addOutgoingEvent(o),this._emitOutgoingEvents()}_addOutgoingEvent(o){for(let n=0,a=this._outgoingEvents.length;n<a;n++)if(this._outgoingEvents[n].kind===o.kind){this._outgoingEvents[n]=this._outgoingEvents[n].merge(o);return}this._outgoingEvents.push(o)}_emitOutgoingEvents(){for(;this._outgoingEvents.length>0;){if(this._collector||this._isConsumingViewEventQueue)return;const o=this._outgoingEvents.shift();if(o.isNoOp())continue;this._onEvent.fire(o)}}addViewEventHandler(o){for(let n=0,a=this._eventHandlers.length;n<a;n++)this._eventHandlers[n]===o&&console.warn("Detected duplicate listener in ViewEventDispatcher",o);this._eventHandlers.push(o)}removeViewEventHandler(o){for(let n=0;n<this._eventHandlers.length;n++)if(this._eventHandlers[n]===o){this._eventHandlers.splice(n,1);break}}beginEmitViewEvents(){return this._collectorCnt++,this._collectorCnt===1&&(this._collector=new zr),this._collector}endEmitViewEvents(){if(this._collectorCnt--,this._collectorCnt===0){const o=this._collector.outgoingEvents,n=this._collector.viewEvents;this._collector=null;for(const a of o)this._addOutgoingEvent(a);n.length>0&&this._emitMany(n)}this._emitOutgoingEvents()}emitSingleViewEvent(o){try{const n=this.beginEmitViewEvents();n.emitViewEvent(o)}finally{this.endEmitViewEvents()}}_emitMany(o){this._viewEventQueue?this._viewEventQueue=this._viewEventQueue.concat(o):this._viewEventQueue=o,this._isConsumingViewEventQueue||this._consumeViewEventQueue()}_consumeViewEventQueue(){try{this._isConsumingViewEventQueue=!0,this._doConsumeQueue()}finally{this._isConsumingViewEventQueue=!1}}_doConsumeQueue(){for(;this._viewEventQueue;){const o=this._viewEventQueue;this._viewEventQueue=null;const n=this._eventHandlers.slice(0);for(const a of n)a.handleEvents(o)}}}class zr{constructor(){this.viewEvents=[],this.outgoingEvents=[]}emitViewEvent(o){this.viewEvents.push(o)}emitOutgoingEvent(o){this.outgoingEvents.push(o)}}class Is{constructor(o,n,a,T){this.kind=0,this._oldContentWidth=o,this._oldContentHeight=n,this.contentWidth=a,this.contentHeight=T,this.contentWidthChanged=this._oldContentWidth!==this.contentWidth,this.contentHeightChanged=this._oldContentHeight!==this.contentHeight}isNoOp(){return!this.contentWidthChanged&&!this.contentHeightChanged}merge(o){return o.kind!==0?this:new Is(this._oldContentWidth,this._oldContentHeight,o.contentWidth,o.contentHeight)}}class vr{constructor(o,n){this.kind=1,this.oldHasFocus=o,this.hasFocus=n}isNoOp(){return this.oldHasFocus===this.hasFocus}merge(o){return o.kind!==1?this:new vr(this.oldHasFocus,o.hasFocus)}}class As{constructor(o,n,a,T,N,Y,be,xe){this.kind=2,this._oldScrollWidth=o,this._oldScrollLeft=n,this._oldScrollHeight=a,this._oldScrollTop=T,this.scrollWidth=N,this.scrollLeft=Y,this.scrollHeight=be,this.scrollTop=xe,this.scrollWidthChanged=this._oldScrollWidth!==this.scrollWidth,this.scrollLeftChanged=this._oldScrollLeft!==this.scrollLeft,this.scrollHeightChanged=this._oldScrollHeight!==this.scrollHeight,this.scrollTopChanged=this._oldScrollTop!==this.scrollTop}isNoOp(){return!this.scrollWidthChanged&&!this.scrollLeftChanged&&!this.scrollHeightChanged&&!this.scrollTopChanged}merge(o){return o.kind!==2?this:new As(this._oldScrollWidth,this._oldScrollLeft,this._oldScrollHeight,this._oldScrollTop,o.scrollWidth,o.scrollLeft,o.scrollHeight,o.scrollTop)}}class Cs{constructor(){this.kind=3}isNoOp(){return!1}merge(o){return this}}class $a{constructor(){this.kind=4}isNoOp(){return!1}merge(o){return this}}class er{constructor(o,n,a,T,N,Y,be){this.kind=6,this.oldSelections=o,this.selections=n,this.oldModelVersionId=a,this.modelVersionId=T,this.source=N,this.reason=Y,this.reachedMaxCursorCount=be}static _selectionsAreEqual(o,n){if(!o&&!n)return!0;if(!o||!n)return!1;const a=o.length,T=n.length;if(a!==T)return!1;for(let N=0;N<a;N++)if(!o[N].equalsSelection(n[N]))return!1;return!0}isNoOp(){return er._selectionsAreEqual(this.oldSelections,this.selections)&&this.oldModelVersionId===this.modelVersionId}merge(o){return o.kind!==6?this:new er(this.oldSelections,o.selections,this.oldModelVersionId,o.modelVersionId,o.source,o.reason,this.reachedMaxCursorCount||o.reachedMaxCursorCount)}}class Kr{constructor(){this.kind=5}isNoOp(){return!1}merge(o){return this}}class tr{constructor(o,n){this.modelVersionId=o.getVersionId(),this.cursorState=n.getCursorStates()}equals(o){if(!o)return!1;if(this.modelVersionId!==o.modelVersionId)return!1;if(this.cursorState.length!==o.cursorState.length)return!1;for(let n=0,a=this.cursorState.length;n<a;n++)if(!this.cursorState[n].equals(o.cursorState[n]))return!1;return!0}}class or{constructor(o,n,a){this._model=o,this._autoClosedCharactersDecorations=n,this._autoClosedEnclosingDecorations=a}static getAllAutoClosedCharacters(o){let n=[];for(const a of o)n=n.concat(a.getAutoClosedCharactersRanges());return n}dispose(){this._autoClosedCharactersDecorations=this._model.deltaDecorations(this._autoClosedCharactersDecorations,[]),this._autoClosedEnclosingDecorations=this._model.deltaDecorations(this._autoClosedEnclosingDecorations,[])}getAutoClosedCharactersRanges(){let o=[];for(let n=0;n<this._autoClosedCharactersDecorations.length;n++){const a=this._model.getDecorationRange(this._autoClosedCharactersDecorations[n]);a&&o.push(a)}return o}isValid(o){let n=[];for(let a=0;a<this._autoClosedEnclosingDecorations.length;a++){const T=this._model.getDecorationRange(this._autoClosedEnclosingDecorations[a]);if(T&&(n.push(T),T.startLineNumber!==T.endLineNumber))return!1}n.sort(se.a.compareRangesUsingStarts),o.sort(se.a.compareRangesUsingStarts);for(let a=0;a<o.length;a++){if(a>=n.length)return!1;if(!n[a].strictContainsRange(o[a]))return!1}return!0}}class Rs extends d.a{constructor(o,n,a,T){super();this._model=o,this._knownModelVersionId=this._model.getVersionId(),this._viewModel=n,this._coordinatesConverter=a,this.context=new je.c(this._model,this._viewModel,this._coordinatesConverter,T),this._cursors=new Zt(this.context),this._hasFocus=!1,this._isHandling=!1,this._isDoingComposition=!1,this._selectionsWhenCompositionStarted=null,this._columnSelectData=null,this._autoClosedActions=[],this._prevEditOperationType=0}dispose(){this._cursors.dispose(),this._autoClosedActions=Object(d.f)(this._autoClosedActions),super.dispose()}updateConfiguration(o){this.context=new je.c(this._model,this._viewModel,this._coordinatesConverter,o),this._cursors.updateContext(this.context)}onLineMappingChanged(o){if(this._knownModelVersionId!==this._model.getVersionId())return;this.setStates(o,"viewModel",0,this.getCursorStates())}setHasFocus(o){this._hasFocus=o}_validateAutoClosedActions(){if(this._autoClosedActions.length>0){let o=this._cursors.getSelections();for(let n=0;n<this._autoClosedActions.length;n++){const a=this._autoClosedActions[n];a.isValid(o)||(a.dispose(),this._autoClosedActions.splice(n,1),n--)}}}getPrimaryCursorState(){return this._cursors.getPrimaryCursor()}getLastAddedCursorIndex(){return this._cursors.getLastAddedCursorIndex()}getCursorStates(){return this._cursors.getAll()}setStates(o,n,a,T){let N=!1;T!==null&&T.length>Rs.MAX_CURSOR_COUNT&&(T=T.slice(0,Rs.MAX_CURSOR_COUNT),N=!0);const Y=new tr(this._model,this);return this._cursors.setStates(T),this._cursors.normalize(),this._columnSelectData=null,this._validateAutoClosedActions(),this._emitStateChangedIfNecessary(o,n,a,Y,N)}setCursorColumnSelectData(o){this._columnSelectData=o}revealPrimary(o,n,a,T){const N=this._cursors.getViewPositions();if(N.length>1){this._emitCursorRevealRange(o,n,null,this._cursors.getViewSelections(),0,a,T);return}else{const Y=N[0],be=new se.a(Y.lineNumber,Y.column,Y.lineNumber,Y.column);this._emitCursorRevealRange(o,n,be,null,0,a,T)}}_revealPrimaryCursor(o,n,a,T,N){const Y=this._cursors.getViewPositions();if(Y.length>1)this._emitCursorRevealRange(o,n,null,this._cursors.getViewSelections(),a,T,N);else{const be=Y[0],xe=new se.a(be.lineNumber,be.column,be.lineNumber,be.column);this._emitCursorRevealRange(o,n,xe,null,a,T,N)}}_emitCursorRevealRange(o,n,a,T,N,Y,be){o.emitViewEvent(new Mn(n,a,T,N,Y,be))}saveState(){let o=[];const n=this._cursors.getSelections();for(let a=0,T=n.length;a<T;a++){const N=n[a];o.push({inSelectionMode:!N.isEmpty(),selectionStart:{lineNumber:N.selectionStartLineNumber,column:N.selectionStartColumn},position:{lineNumber:N.positionLineNumber,column:N.positionColumn}})}return o}restoreState(o,n){let a=[];for(let T=0,N=n.length;T<N;T++){const Y=n[T];let be=1,xe=1;Y.position&&Y.position.lineNumber&&(be=Y.position.lineNumber),Y.position&&Y.position.column&&(xe=Y.position.column);let Ke=be,Ze=xe;Y.selectionStart&&Y.selectionStart.lineNumber&&(Ke=Y.selectionStart.lineNumber),Y.selectionStart&&Y.selectionStart.column&&(Ze=Y.selectionStart.column),a.push({selectionStartLineNumber:Ke,selectionStartColumn:Ze,positionLineNumber:be,positionColumn:xe})}this.setStates(o,"restoreState",0,je.d.fromModelSelections(a)),this.revealPrimary(o,"restoreState",!0,1)}onModelContentChanged(o,n){if(n instanceof Co.c){if(this._isHandling)return;this._isHandling=!0;try{this.setStates(o,"modelChange",0,this.getCursorStates())}finally{this._isHandling=!1}}else{if(this._knownModelVersionId=n.versionId,this._isHandling)return;const a=n.containsEvent(1);if(this._prevEditOperationType=0,a)this._cursors.dispose(),this._cursors=new Zt(this.context),this._validateAutoClosedActions(),this._emitStateChangedIfNecessary(o,"model",1,null,!1);else if(this._hasFocus&&n.resultingSelection&&n.resultingSelection.length>0){const T=je.d.fromModelSelections(n.resultingSelection);this.setStates(o,"modelChange",n.isUndoing?5:n.isRedoing?6:2,T)&&this._revealPrimaryCursor(o,"modelChange",0,!0,0)}else{const T=this._cursors.readSelectionFromMarkers();this.setStates(o,"modelChange",2,je.d.fromModelSelections(T))}}}getSelection(){return this._cursors.getPrimaryCursor().modelState.selection}getTopMostViewPosition(){return this._cursors.getTopMostViewPosition()}getBottomMostViewPosition(){return this._cursors.getBottomMostViewPosition()}getCursorColumnSelectData(){if(this._columnSelectData)return this._columnSelectData;const o=this._cursors.getPrimaryCursor(),n=o.viewState.selectionStart.getStartPosition(),a=o.viewState.position;return{isReal:!1,fromViewLineNumber:n.lineNumber,fromViewVisualColumn:je.a.visibleColumnFromColumn2(this.context.cursorConfig,this._viewModel,n),toViewLineNumber:a.lineNumber,toViewVisualColumn:je.a.visibleColumnFromColumn2(this.context.cursorConfig,this._viewModel,a)}}getSelections(){return this._cursors.getSelections()}setSelections(o,n,a,T){this.setStates(o,n,T,je.d.fromModelSelections(a))}getPrevEditOperationType(){return this._prevEditOperationType}setPrevEditOperationType(o){this._prevEditOperationType=o}_pushAutoClosedAction(o,n){let a=[],T=[];for(let be=0,xe=o.length;be<xe;be++)a.push({range:o[be],options:{description:"auto-closed-character",inlineClassName:"auto-closed-character",stickiness:1}}),T.push({range:n[be],options:{description:"auto-closed-enclosing",stickiness:1}});const N=this._model.deltaDecorations([],a),Y=this._model.deltaDecorations([],T);this._autoClosedActions.push(new or(this._model,N,Y))}_executeEditOperation(o){if(!o)return;o.shouldPushStackElementBefore&&this._model.pushStackElement();const n=ys.executeCommands(this._model,this._cursors.getSelections(),o.commands);if(n){this._interpretCommandResult(n);let a=[],T=[];for(let N=0;N<o.commands.length;N++){const Y=o.commands[N];Y instanceof ao.b&&Y.enclosingRange&&Y.closeCharacterRange&&(a.push(Y.closeCharacterRange),T.push(Y.enclosingRange))}a.length>0&&this._pushAutoClosedAction(a,T),this._prevEditOperationType=o.type}o.shouldPushStackElementAfter&&this._model.pushStackElement()}_interpretCommandResult(o){(!o||o.length===0)&&(o=this._cursors.readSelectionFromMarkers()),this._columnSelectData=null,this._cursors.setSelections(o),this._cursors.normalize()}_emitStateChangedIfNecessary(o,n,a,T,N){const Y=new tr(this._model,this);if(Y.equals(T))return!1;const be=this._cursors.getSelections(),xe=this._cursors.getViewSelections();if(o.emitViewEvent(new Ko(xe,be)),!T||T.cursorState.length!==Y.cursorState.length||Y.cursorState.some((Ke,Ze)=>!Ke.modelState.equals(T.cursorState[Ze].modelState))){const Ke=T?T.cursorState.map(nt=>nt.modelState.selection):null,Ze=T?T.modelVersionId:0;o.emitOutgoingEvent(new er(Ke,be,Ze,Y.modelVersionId,n||"keyboard",a,N))}return!0}_findAutoClosingPairs(o){if(!o.length)return null;let n=[];for(let a=0,T=o.length;a<T;a++){const N=o[a];if(!N.text||N.text.indexOf(`
|
|
|
`)>=0)return null;const Y=N.text.match(/([)\]}>'"`])([^)\]}>'"`]*)$/);if(!Y)return null;const be=Y[1],xe=this.context.cursorConfig.autoClosingPairs.autoClosingPairsCloseSingleChar.get(be);if(!xe||xe.length!==1)return null;const Ke=xe[0].open,Ze=N.text.length-Y[2].length-1,nt=N.text.lastIndexOf(Ke,Ze-1);if(nt===-1)return null;n.push([nt,Ze])}return n}executeEdits(o,n,a,T){let N=null;n==="snippet"&&(N=this._findAutoClosingPairs(a)),N&&(a[0]._isTracked=!0);let Y=[],be=[];const xe=this._model.pushEditOperations(this.getSelections(),a,Ke=>{if(N)for(let nt=0,Ot=N.length;nt<Ot;nt++){const[ft,kt]=N[nt],Gt=Ke[nt],eo=Gt.range.startLineNumber,co=Gt.range.startColumn-1+ft,go=Gt.range.startColumn-1+kt;Y.push(new se.a(eo,go+1,eo,go+2)),be.push(new se.a(eo,co+1,eo,go+2))}const Ze=T(Ke);return Ze&&(this._isHandling=!0),Ze});xe&&(this._isHandling=!1,this.setSelections(o,n,xe,0)),Y.length>0&&this._pushAutoClosedAction(Y,be)}_executeEdit(o,n,a,T=0){if(this.context.cursorConfig.readOnly)return;const N=new tr(this._model,this);this._cursors.stopTrackingSelections(),this._isHandling=!0;try{this._cursors.ensureValidState(),o()}catch(Y){Object(C.f)(Y)}this._isHandling=!1,this._cursors.startTrackingSelections(),this._validateAutoClosedActions(),this._emitStateChangedIfNecessary(n,a,T,N,!1)&&this._revealPrimaryCursor(n,a,0,!0,0)}setIsDoingComposition(o){this._isDoingComposition=o}getAutoClosedCharacters(){return or.getAllAutoClosedCharacters(this._autoClosedActions)}startComposition(o){this._selectionsWhenCompositionStarted=this.getSelections().slice(0)}endComposition(o,n){this._executeEdit(()=>{n==="keyboard"&&(this._executeEditOperation(ao.a.compositionEndWithInterceptors(this._prevEditOperationType,this.context.cursorConfig,this._model,this._selectionsWhenCompositionStarted,this.getSelections(),this.getAutoClosedCharacters())),this._selectionsWhenCompositionStarted=null)},o,n)}type(o,n,a){this._executeEdit(()=>{if(a==="keyboard"){const T=n.length;let N=0;for(;N<T;){const Y=ut.K(n,N),be=n.substr(N,Y);this._executeEditOperation(ao.a.typeWithInterceptors(this._isDoingComposition,this._prevEditOperationType,this.context.cursorConfig,this._model,this.getSelections(),this.getAutoClosedCharacters(),be)),N+=Y}}else this._executeEditOperation(ao.a.typeWithoutInterceptors(this._prevEditOperationType,this.context.cursorConfig,this._model,this.getSelections(),n))},o,a)}compositionType(o,n,a,T,N,Y){if(n.length===0&&a===0&&T===0){if(N!==0){const be=this.getSelections().map(xe=>{const Ke=xe.getPosition();return new b.a(Ke.lineNumber,Ke.column+N,Ke.lineNumber,Ke.column+N)});this.setSelections(o,Y,be,0)}return}this._executeEdit(()=>{this._executeEditOperation(ao.a.compositionType(this._prevEditOperationType,this.context.cursorConfig,this._model,this.getSelections(),n,a,T,N))},o,Y)}paste(o,n,a,T,N){this._executeEdit(()=>{this._executeEditOperation(ao.a.paste(this.context.cursorConfig,this._model,this.getSelections(),n,a,T||[]))},o,N,4)}cut(o,n){this._executeEdit(()=>{this._executeEditOperation(Yt.a.cut(this.context.cursorConfig,this._model,this.getSelections()))},o,n)}executeCommand(o,n,a){this._executeEdit(()=>{this._cursors.killSecondaryCursors(),this._executeEditOperation(new je.e(0,[n],{shouldPushStackElementBefore:!1,shouldPushStackElementAfter:!1}))},o,a)}executeCommands(o,n,a){this._executeEdit(()=>{this._executeEditOperation(new je.e(0,n,{shouldPushStackElementBefore:!1,shouldPushStackElementAfter:!1}))},o,a)}}Rs.MAX_CURSOR_COUNT=1e4;class ys{static executeCommands(o,n,a){const T={model:o,selectionsBefore:n,trackedRanges:[],trackedRangesDirection:[]},N=this._innerExecuteCommands(T,a);for(let Y=0,be=T.trackedRanges.length;Y<be;Y++)T.model._setTrackedRange(T.trackedRanges[Y],null,0);return N}static _innerExecuteCommands(o,n){if(this._arrayIsEmpty(n))return null;const a=this._getEditOperations(o,n);if(a.operations.length===0)return null;const T=a.operations,N=this._getLoserCursorMap(T);if(N.hasOwnProperty("0"))return console.warn("Ignoring commands"),null;let Y=[];for(let Ke=0,Ze=T.length;Ke<Ze;Ke++)N.hasOwnProperty(T[Ke].identifier.major.toString())||Y.push(T[Ke]);a.hadTrackedEditOperation&&Y.length>0&&(Y[0]._isTracked=!0);let be=o.model.pushEditOperations(o.selectionsBefore,Y,Ke=>{let Ze=[];for(let ft=0;ft<o.selectionsBefore.length;ft++)Ze[ft]=[];for(const ft of Ke){if(!ft.identifier)continue;Ze[ft.identifier.major].push(ft)}const nt=(ft,kt)=>ft.identifier.minor-kt.identifier.minor;let Ot=[];for(let ft=0;ft<o.selectionsBefore.length;ft++)Ze[ft].length>0?(Ze[ft].sort(nt),Ot[ft]=n[ft].computeCursorState(o.model,{getInverseEditOperations:()=>Ze[ft],getTrackedSelection:kt=>{const Gt=parseInt(kt,10),eo=o.model._getTrackedRange(o.trackedRanges[Gt]);return o.trackedRangesDirection[Gt]===0?new b.a(eo.startLineNumber,eo.startColumn,eo.endLineNumber,eo.endColumn):new b.a(eo.endLineNumber,eo.endColumn,eo.startLineNumber,eo.startColumn)}})):Ot[ft]=o.selectionsBefore[ft];return Ot});be||(be=o.selectionsBefore);let xe=[];for(let Ke in N)N.hasOwnProperty(Ke)&&xe.push(parseInt(Ke,10));xe.sort((Ke,Ze)=>Ze-Ke);for(const Ke of xe)be.splice(Ke,1);return be}static _arrayIsEmpty(o){for(let n=0,a=o.length;n<a;n++)if(o[n])return!1;return!0}static _getEditOperations(o,n){let a=[],T=!1;for(let N=0,Y=n.length;N<Y;N++){const be=n[N];if(be){const xe=this._getEditOperationsFromCommand(o,N,be);a=a.concat(xe.operations),T=T||xe.hadTrackedEditOperation}}return{operations:a,hadTrackedEditOperation:T}}static _getEditOperationsFromCommand(o,n,a){let T=[],N=0;const Y=(nt,Ot,ft=!1)=>{if(se.a.isEmpty(nt)&&Ot==="")return;T.push({identifier:{major:n,minor:N++},range:nt,text:Ot,forceMoveMarkers:ft,isAutoWhitespaceEdit:a.insertsAutoWhitespace})};let be=!1;const xe=(nt,Ot,ft)=>{be=!0,Y(nt,Ot,ft)},Ke=(nt,Ot)=>{const ft=b.a.liftSelection(nt);let kt;if(ft.isEmpty())if(typeof Ot=="boolean")Ot?kt=2:kt=3;else{const co=o.model.getLineMaxColumn(ft.startLineNumber);ft.startColumn===co?kt=2:kt=3}else kt=1;const Gt=o.trackedRanges.length,eo=o.model._setTrackedRange(null,ft,kt);return o.trackedRanges[Gt]=eo,o.trackedRangesDirection[Gt]=ft.getDirection(),Gt.toString()},Ze={addEditOperation:Y,addTrackedEditOperation:xe,trackSelection:Ke};try{a.getEditOperations(o.model,Ze)}catch(nt){return Object(C.f)(nt),{operations:[],hadTrackedEditOperation:!1}}return{operations:T,hadTrackedEditOperation:be}}static _getLoserCursorMap(o){o=o.slice(0),o.sort((a,T)=>-se.a.compareRangesUsingEnds(a.range,T.range));let n={};for(let a=1;a<o.length;a++){const T=o[a-1],N=o[a];if(se.a.getStartPosition(T.range).isBefore(se.a.getEndPosition(N.range))){let Y;T.identifier.major>N.identifier.major?Y=T.identifier.major:Y=N.identifier.major,n[Y.toString()]=!0;for(let be=0;be<o.length;be++)o[be].identifier.major===Y&&(o.splice(be,1),be<a&&a--,be--);a>0&&a--}}return n}}var Gr=t("9Y+e"),Ns=t("iuje"),Gi=t("wQH0"),Ya=t("TQUy"),Es=t("QuOb");class Cr{constructor(){this._hasPending=!1,this._inserts=[],this._changes=[],this._removes=[]}insert(o){this._hasPending=!0,this._inserts.push(o)}change(o){this._hasPending=!0,this._changes.push(o)}remove(o){this._hasPending=!0,this._removes.push(o)}mustCommit(){return this._hasPending}commit(o){if(!this._hasPending)return;const n=this._inserts,a=this._changes,T=this._removes;this._hasPending=!1,this._inserts=[],this._changes=[],this._removes=[],o._commitPendingChanges(n,a,T)}}class An{constructor(o,n,a,T,N){this.id=o,this.afterLineNumber=n,this.ordinal=a,this.height=T,this.minWidth=N,this.prefixSum=0}}class Zn{constructor(o,n,a,T){this._instanceId=ut.P(++Zn.INSTANCE_COUNT),this._pendingChanges=new Cr,this._lastWhitespaceId=0,this._arr=[],this._prefixSumValidIndex=-1,this._minWidth=-1,this._lineCount=o,this._lineHeight=n,this._paddingTop=a,this._paddingBottom=T}static findInsertionIndex(o,n,a){let T=0,N=o.length;for(;T<N;){const Y=T+N>>>1;n===o[Y].afterLineNumber?a<o[Y].ordinal?N=Y:T=Y+1:n<o[Y].afterLineNumber?N=Y:T=Y+1}return T}setLineHeight(o){this._checkPendingChanges(),this._lineHeight=o}setPadding(o,n){this._paddingTop=o,this._paddingBottom=n}onFlushed(o){this._checkPendingChanges(),this._lineCount=o}changeWhitespace(o){let n=!1;try{const a={insertWhitespace:(T,N,Y,be)=>{n=!0,T=T|0,N=N|0,Y=Y|0,be=be|0;const xe=this._instanceId+ ++this._lastWhitespaceId;return this._pendingChanges.insert(new An(xe,T,N,Y,be)),xe},changeOneWhitespace:(T,N,Y)=>{n=!0,N=N|0,Y=Y|0,this._pendingChanges.change({id:T,newAfterLineNumber:N,newHeight:Y})},removeWhitespace:T=>{n=!0,this._pendingChanges.remove({id:T})}};o(a)}finally{this._pendingChanges.commit(this)}return n}_commitPendingChanges(o,n,a){if((o.length>0||a.length>0)&&(this._minWidth=-1),o.length+n.length+a.length<=1){for(const xe of o)this._insertWhitespace(xe);for(const xe of n)this._changeOneWhitespace(xe.id,xe.newAfterLineNumber,xe.newHeight);for(const xe of a){const Ke=this._findWhitespaceIndex(xe.id);if(Ke===-1)continue;this._removeWhitespace(Ke)}return}const T=new Set;for(const xe of a)T.add(xe.id);const N=new Map;for(const xe of n)N.set(xe.id,xe);const Y=xe=>{let Ke=[];for(const Ze of xe){if(T.has(Ze.id))continue;if(N.has(Ze.id)){const nt=N.get(Ze.id);Ze.afterLineNumber=nt.newAfterLineNumber,Ze.height=nt.newHeight}Ke.push(Ze)}return Ke},be=Y(this._arr).concat(Y(o));be.sort((xe,Ke)=>xe.afterLineNumber===Ke.afterLineNumber?xe.ordinal-Ke.ordinal:xe.afterLineNumber-Ke.afterLineNumber),this._arr=be,this._prefixSumValidIndex=-1}_checkPendingChanges(){this._pendingChanges.mustCommit()&&this._pendingChanges.commit(this)}_insertWhitespace(o){const n=Zn.findInsertionIndex(this._arr,o.afterLineNumber,o.ordinal);this._arr.splice(n,0,o),this._prefixSumValidIndex=Math.min(this._prefixSumValidIndex,n-1)}_findWhitespaceIndex(o){const n=this._arr;for(let a=0,T=n.length;a<T;a++)if(n[a].id===o)return a;return-1}_changeOneWhitespace(o,n,a){const T=this._findWhitespaceIndex(o);if(T===-1)return;if(this._arr[T].height!==a&&(this._arr[T].height=a,this._prefixSumValidIndex=Math.min(this._prefixSumValidIndex,T-1)),this._arr[T].afterLineNumber!==n){const N=this._arr[T];this._removeWhitespace(T),N.afterLineNumber=n,this._insertWhitespace(N)}}_removeWhitespace(o){this._arr.splice(o,1),this._prefixSumValidIndex=Math.min(this._prefixSumValidIndex,o-1)}onLinesDeleted(o,n){this._checkPendingChanges(),o=o|0,n=n|0,this._lineCount-=n-o+1;for(let a=0,T=this._arr.length;a<T;a++){const N=this._arr[a].afterLineNumber;o<=N&&N<=n?this._arr[a].afterLineNumber=o-1:N>n&&(this._arr[a].afterLineNumber-=n-o+1)}}onLinesInserted(o,n){this._checkPendingChanges(),o=o|0,n=n|0,this._lineCount+=n-o+1;for(let a=0,T=this._arr.length;a<T;a++){const N=this._arr[a].afterLineNumber;o<=N&&(this._arr[a].afterLineNumber+=n-o+1)}}getWhitespacesTotalHeight(){return this._checkPendingChanges(),this._arr.length===0?0:this.getWhitespacesAccumulatedHeight(this._arr.length-1)}getWhitespacesAccumulatedHeight(o){this._checkPendingChanges(),o=o|0;let n=Math.max(0,this._prefixSumValidIndex+1);n===0&&(this._arr[0].prefixSum=this._arr[0].height,n++);for(let a=n;a<=o;a++)this._arr[a].prefixSum=this._arr[a-1].prefixSum+this._arr[a].height;return this._prefixSumValidIndex=Math.max(this._prefixSumValidIndex,o),this._arr[o].prefixSum}getLinesTotalHeight(){this._checkPendingChanges();const o=this._lineHeight*this._lineCount,n=this.getWhitespacesTotalHeight();return o+n+this._paddingTop+this._paddingBottom}getWhitespaceAccumulatedHeightBeforeLineNumber(o){this._checkPendingChanges(),o=o|0;const n=this._findLastWhitespaceBeforeLineNumber(o);return n===-1?0:this.getWhitespacesAccumulatedHeight(n)}_findLastWhitespaceBeforeLineNumber(o){o=o|0;const n=this._arr;let a=0,T=n.length-1;for(;a<=T;){const N=T-a|0,Y=N/2|0,be=a+Y|0;if(n[be].afterLineNumber<o){if(be+1>=n.length||n[be+1].afterLineNumber>=o)return be;a=be+1|0}else T=be-1|0}return-1}_findFirstWhitespaceAfterLineNumber(o){o=o|0;const n=this._findLastWhitespaceBeforeLineNumber(o),a=n+1;return a<this._arr.length?a:-1}getFirstWhitespaceIndexAfterLineNumber(o){return this._checkPendingChanges(),o=o|0,this._findFirstWhitespaceAfterLineNumber(o)}getVerticalOffsetForLineNumber(o){this._checkPendingChanges(),o=o|0;let n;o>1?n=this._lineHeight*(o-1):n=0;const a=this.getWhitespaceAccumulatedHeightBeforeLineNumber(o);return n+a+this._paddingTop}getWhitespaceMinWidth(){if(this._checkPendingChanges(),this._minWidth===-1){let o=0;for(let n=0,a=this._arr.length;n<a;n++)o=Math.max(o,this._arr[n].minWidth);this._minWidth=o}return this._minWidth}isAfterLines(o){this._checkPendingChanges();const n=this.getLinesTotalHeight();return o>n}isInTopPadding(o){return this._paddingTop===0?!1:(this._checkPendingChanges(),o<this._paddingTop)}isInBottomPadding(o){if(this._paddingBottom===0)return!1;this._checkPendingChanges();const n=this.getLinesTotalHeight();return o>=n-this._paddingBottom}getLineNumberAtOrAfterVerticalOffset(o){if(this._checkPendingChanges(),o=o|0,o<0)return 1;const n=this._lineCount|0,a=this._lineHeight;let T=1,N=n;for(;T<N;){const Y=(T+N)/2|0,be=this.getVerticalOffsetForLineNumber(Y)|0;if(o>=be+a)T=Y+1;else{if(o>=be)return Y;N=Y}}return T>n?n:T}getLinesViewportData(o,n){this._checkPendingChanges(),o=o|0,n=n|0;const a=this._lineHeight,T=this.getLineNumberAtOrAfterVerticalOffset(o)|0,N=this.getVerticalOffsetForLineNumber(T)|0;let Y=this._lineCount|0,be=this.getFirstWhitespaceIndexAfterLineNumber(T)|0;const xe=this.getWhitespacesCount()|0;let Ke,Ze;be===-1?(be=xe,Ze=Y+1,Ke=0):(Ze=this.getAfterLineNumberForWhitespaceIndex(be)|0,Ke=this.getHeightForWhitespaceIndex(be)|0);let nt=N,Ot=nt;const ft=5e5;let kt=0;N>=ft&&(kt=Math.floor(N/ft)*ft,kt=Math.floor(kt/a)*a,Ot-=kt);const Gt=[],eo=o+(n-o)/2;let co=-1;for(let Po=T;Po<=Y;Po++){if(co===-1){const ti=nt,oi=nt+a;(ti<=eo&&eo<oi||ti>eo)&&(co=Po)}for(nt+=a,Gt[Po-T]=Ot,Ot+=a;Ze===Po;)Ot+=Ke,nt+=Ke,be++,be>=xe?Ze=Y+1:(Ze=this.getAfterLineNumberForWhitespaceIndex(be)|0,Ke=this.getHeightForWhitespaceIndex(be)|0);if(nt>=n){Y=Po;break}}co===-1&&(co=Y);const go=this.getVerticalOffsetForLineNumber(Y)|0;let yo=T,jo=Y;return yo<jo&&(N<o&&yo++),yo<jo&&(go+a>n&&jo--),{bigNumbersDelta:kt,startLineNumber:T,endLineNumber:Y,relativeVerticalOffset:Gt,centeredLineNumber:co,completelyVisibleStartLineNumber:yo,completelyVisibleEndLineNumber:jo}}getVerticalOffsetForWhitespaceIndex(o){this._checkPendingChanges(),o=o|0;const n=this.getAfterLineNumberForWhitespaceIndex(o);let a;n>=1?a=this._lineHeight*n:a=0;let T;return o>0?T=this.getWhitespacesAccumulatedHeight(o-1):T=0,a+T+this._paddingTop}getWhitespaceIndexAtOrAfterVerticallOffset(o){this._checkPendingChanges(),o=o|0;let n=0,a=this.getWhitespacesCount()-1;if(a<0)return-1;const T=this.getVerticalOffsetForWhitespaceIndex(a),N=this.getHeightForWhitespaceIndex(a);if(o>=T+N)return-1;for(;n<a;){const Y=Math.floor((n+a)/2),be=this.getVerticalOffsetForWhitespaceIndex(Y),xe=this.getHeightForWhitespaceIndex(Y);if(o>=be+xe)n=Y+1;else{if(o>=be)return Y;a=Y}}return n}getWhitespaceAtVerticalOffset(o){this._checkPendingChanges(),o=o|0;const n=this.getWhitespaceIndexAtOrAfterVerticallOffset(o);if(n<0)return null;if(n>=this.getWhitespacesCount())return null;const a=this.getVerticalOffsetForWhitespaceIndex(n);if(a>o)return null;const T=this.getHeightForWhitespaceIndex(n),N=this.getIdForWhitespaceIndex(n),Y=this.getAfterLineNumberForWhitespaceIndex(n);return{id:N,afterLineNumber:Y,verticalOffset:a,height:T}}getWhitespaceViewportData(o,n){this._checkPendingChanges(),o=o|0,n=n|0;const a=this.getWhitespaceIndexAtOrAfterVerticallOffset(o),T=this.getWhitespacesCount()-1;if(a<0)return[];let N=[];for(let Y=a;Y<=T;Y++){const be=this.getVerticalOffsetForWhitespaceIndex(Y),xe=this.getHeightForWhitespaceIndex(Y);if(be>=n)break;N.push({id:this.getIdForWhitespaceIndex(Y),afterLineNumber:this.getAfterLineNumberForWhitespaceIndex(Y),verticalOffset:be,height:xe})}return N}getWhitespaces(){return this._checkPendingChanges(),this._arr.slice(0)}getWhitespacesCount(){return this._checkPendingChanges(),this._arr.length}getIdForWhitespaceIndex(o){return this._checkPendingChanges(),o=o|0,this._arr[o].id}getAfterLineNumberForWhitespaceIndex(o){return this._checkPendingChanges(),o=o|0,this._arr[o].afterLineNumber}getHeightForWhitespaceIndex(o){return this._checkPendingChanges(),o=o|0,this._arr[o].height}}Zn.INSTANCE_COUNT=0;const Hn=125;class ni{constructor(o,n,a,T){o=o|0,n=n|0,a=a|0,T=T|0,o<0&&(o=0),n<0&&(n=0),a<0&&(a=0),T<0&&(T=0),this.width=o,this.contentWidth=n,this.scrollWidth=Math.max(o,n),this.height=a,this.contentHeight=T,this.scrollHeight=Math.max(a,T)}equals(o){return this.width===o.width&&this.contentWidth===o.contentWidth&&this.height===o.height&&this.contentHeight===o.contentHeight}}class nn extends d.a{constructor(o,n){super();this._onDidContentSizeChange=this._register(new m.b),this.onDidContentSizeChange=this._onDidContentSizeChange.event,this._dimensions=new ni(0,0,0,0),this._scrollable=this._register(new Es.a(o,n)),this.onDidScroll=this._scrollable.onScroll}getScrollable(){return this._scrollable}setSmoothScrollDuration(o){this._scrollable.setSmoothScrollDuration(o)}validateScrollPosition(o){return this._scrollable.validateScrollPosition(o)}getScrollDimensions(){return this._dimensions}setScrollDimensions(o){if(this._dimensions.equals(o))return;const n=this._dimensions;this._dimensions=o,this._scrollable.setScrollDimensions({width:o.width,scrollWidth:o.scrollWidth,height:o.height,scrollHeight:o.scrollHeight},!0);const a=n.contentWidth!==o.contentWidth,T=n.contentHeight!==o.contentHeight;(a||T)&&this._onDidContentSizeChange.fire(new Is(n.contentWidth,n.contentHeight,o.contentWidth,o.contentHeight))}getFutureScrollPosition(){return this._scrollable.getFutureScrollPosition()}getCurrentScrollPosition(){return this._scrollable.getCurrentScrollPosition()}setScrollPositionNow(o){this._scrollable.setScrollPositionNow(o)}setScrollPositionSmooth(o){this._scrollable.setScrollPositionSmooth(o)}}class xn extends d.a{constructor(o,n,a){super();this._configuration=o;const T=this._configuration.options,N=T.get(129),Y=T.get(74);this._linesLayout=new Zn(n,T.get(58),Y.top,Y.bottom),this._scrollable=this._register(new nn(0,a)),this._configureSmoothScrollDuration(),this._scrollable.setScrollDimensions(new ni(N.contentWidth,0,N.height,0)),this.onDidScroll=this._scrollable.onDidScroll,this.onDidContentSizeChange=this._scrollable.onDidContentSizeChange,this._updateHeight()}dispose(){super.dispose()}getScrollable(){return this._scrollable.getScrollable()}onHeightMaybeChanged(){this._updateHeight()}_configureSmoothScrollDuration(){this._scrollable.setSmoothScrollDuration(this._configuration.options.get(102)?Hn:0)}onConfigurationChanged(o){const n=this._configuration.options;if(o.hasChanged(58)&&this._linesLayout.setLineHeight(n.get(58)),o.hasChanged(74)){const a=n.get(74);this._linesLayout.setPadding(a.top,a.bottom)}if(o.hasChanged(129)){const a=n.get(129),T=a.contentWidth,N=a.height,Y=this._scrollable.getScrollDimensions(),be=Y.contentWidth;this._scrollable.setScrollDimensions(new ni(T,Y.contentWidth,N,this._getContentHeight(T,N,be)))}else this._updateHeight();o.hasChanged(102)&&this._configureSmoothScrollDuration()}onFlushed(o){this._linesLayout.onFlushed(o)}onLinesDeleted(o,n){this._linesLayout.onLinesDeleted(o,n)}onLinesInserted(o,n){this._linesLayout.onLinesInserted(o,n)}_getHorizontalScrollbarHeight(o,n){const a=this._configuration.options,T=a.get(91);return T.horizontal===2||o>=n?0:T.horizontalScrollbarSize}_getContentHeight(o,n,a){const T=this._configuration.options;let N=this._linesLayout.getLinesTotalHeight();return T.get(93)?N+=Math.max(0,n-T.get(58)-T.get(74).bottom):N+=this._getHorizontalScrollbarHeight(o,a),N}_updateHeight(){const o=this._scrollable.getScrollDimensions(),n=o.width,a=o.height,T=o.contentWidth;this._scrollable.setScrollDimensions(new ni(n,o.contentWidth,a,this._getContentHeight(n,a,T)))}getCurrentViewport(){const o=this._scrollable.getScrollDimensions(),n=this._scrollable.getCurrentScrollPosition();return new F.i(n.scrollTop,n.scrollLeft,o.width,o.height)}getFutureViewport(){const o=this._scrollable.getScrollDimensions(),n=this._scrollable.getFutureScrollPosition();return new F.i(n.scrollTop,n.scrollLeft,o.width,o.height)}_computeContentWidth(o){const n=this._configuration.options,a=n.get(130),T=n.get(43);if(a.isViewportWrapping){const N=n.get(129),Y=n.get(64);return o>N.contentWidth+T.typicalHalfwidthCharacterWidth&&(Y.enabled&&Y.side==="right")?o+N.verticalScrollbarWidth:o}else{const N=n.get(92)*T.typicalHalfwidthCharacterWidth,Y=this._linesLayout.getWhitespaceMinWidth();return Math.max(o+N,Y)}}setMaxLineWidth(o){const n=this._scrollable.getScrollDimensions();this._scrollable.setScrollDimensions(new ni(n.width,this._computeContentWidth(o),n.height,n.contentHeight)),this._updateHeight()}saveState(){const o=this._scrollable.getFutureScrollPosition();let n=o.scrollTop,a=this._linesLayout.getLineNumberAtOrAfterVerticalOffset(n),T=this._linesLayout.getWhitespaceAccumulatedHeightBeforeLineNumber(a);return{scrollTop:n,scrollTopWithoutViewZones:n-T,scrollLeft:o.scrollLeft}}changeWhitespace(o){const n=this._linesLayout.changeWhitespace(o);return n&&this.onHeightMaybeChanged(),n}getVerticalOffsetForLineNumber(o){return this._linesLayout.getVerticalOffsetForLineNumber(o)}isAfterLines(o){return this._linesLayout.isAfterLines(o)}isInTopPadding(o){return this._linesLayout.isInTopPadding(o)}isInBottomPadding(o){return this._linesLayout.isInBottomPadding(o)}getLineNumberAtVerticalOffset(o){return this._linesLayout.getLineNumberAtOrAfterVerticalOffset(o)}getWhitespaceAtVerticalOffset(o){return this._linesLayout.getWhitespaceAtVerticalOffset(o)}getLinesViewportData(){const o=this.getCurrentViewport();return this._linesLayout.getLinesViewportData(o.top,o.top+o.height)}getLinesViewportDataAtScrollTop(o){const n=this._scrollable.getScrollDimensions();return o+n.height>n.scrollHeight&&(o=n.scrollHeight-n.height),o<0&&(o=0),this._linesLayout.getLinesViewportData(o,o+n.height)}getWhitespaceViewportData(){const o=this.getCurrentViewport();return this._linesLayout.getWhitespaceViewportData(o.top,o.top+o.height)}getWhitespaces(){return this._linesLayout.getWhitespaces()}getContentWidth(){const o=this._scrollable.getScrollDimensions();return o.contentWidth}getScrollWidth(){const o=this._scrollable.getScrollDimensions();return o.scrollWidth}getContentHeight(){const o=this._scrollable.getScrollDimensions();return o.contentHeight}getScrollHeight(){const o=this._scrollable.getScrollDimensions();return o.scrollHeight}getCurrentScrollLeft(){const o=this._scrollable.getCurrentScrollPosition();return o.scrollLeft}getCurrentScrollTop(){const o=this._scrollable.getCurrentScrollPosition();return o.scrollTop}validateScrollPosition(o){return this._scrollable.validateScrollPosition(o)}setScrollPosition(o,n){n===1?this._scrollable.setScrollPositionNow(o):this._scrollable.setScrollPositionSmooth(o)}deltaScrollNow(o,n){const a=this._scrollable.getCurrentScrollPosition();this._scrollable.setScrollPositionNow({scrollLeft:a.scrollLeft+o,scrollTop:a.scrollTop+n})}}var ss=t("4bUh"),Xr=t("LeU+");class $r{constructor(o){this._lines=o}convertViewPositionToModelPosition(o){return this._lines.convertViewPositionToModelPosition(o.lineNumber,o.column)}convertViewRangeToModelRange(o){return this._lines.convertViewRangeToModelRange(o)}validateViewPosition(o,n){return this._lines.validateViewPosition(o.lineNumber,o.column,n)}validateViewRange(o,n){return this._lines.validateViewRange(o,n)}convertModelPositionToViewPosition(o,n){return this._lines.convertModelPositionToViewPosition(o.lineNumber,o.column,n)}convertModelRangeToViewRange(o,n){return this._lines.convertModelRangeToViewRange(o,n)}modelPositionIsVisible(o){return this._lines.modelPositionIsVisible(o.lineNumber,o.column)}getModelLineViewLineCount(o){return this._lines.getModelLineViewLineCount(o)}getViewLineNumberOfModelPosition(o,n){return this._lines.getViewLineNumberOfModelPosition(o,n)}}class Yr{constructor(o){this._counts=o,this._isValid=!1,this._validEndIndex=-1,this._modelToView=[],this._viewToModel=[]}_invalidate(o){this._isValid=!1,this._validEndIndex=Math.min(this._validEndIndex,o-1)}_ensureValid(){if(this._isValid)return;for(let o=this._validEndIndex+1,n=this._counts.length;o<n;o++){const a=this._counts[o],T=o>0?this._modelToView[o-1]:0;this._modelToView[o]=T+a;for(let N=0;N<a;N++)this._viewToModel[T+N]=o}this._modelToView.length=this._counts.length,this._viewToModel.length=this._modelToView[this._modelToView.length-1],this._isValid=!0,this._validEndIndex=this._counts.length-1}changeValue(o,n){if(this._counts[o]===n)return;this._counts[o]=n,this._invalidate(o)}removeValues(o,n){this._counts.splice(o,n),this._invalidate(o)}insertValues(o,n){this._counts=vi.b(this._counts,o,n),this._invalidate(o)}getTotalValue(){return this._ensureValid(),this._viewToModel.length}getAccumulatedValue(o){return this._ensureValid(),this._modelToView[o]}getIndexOf(o){this._ensureValid();const n=this._viewToModel[o],a=n>0?this._modelToView[n-1]:0;return new Xr.b(n,o-a)}}class ir{constructor(o,n,a,T,N,Y,be,xe,Ke){this._editorId=o,this.model=n,this._validModelVersionId=-1,this._domLineBreaksComputerFactory=a,this._monospaceLineBreaksComputerFactory=T,this.fontInfo=N,this.tabSize=Y,this.wrappingStrategy=be,this.wrappingColumn=xe,this.wrappingIndent=Ke,this._constructLines(!0,null)}dispose(){this.hiddenAreasIds=this.model.deltaDecorations(this.hiddenAreasIds,[])}createCoordinatesConverter(){return new $r(this)}_constructLines(o,n){this.lines=[],o&&(this.hiddenAreasIds=[]);const a=this.model.getLinesContent(),T=this.model.getInjectedTextDecorations(this._editorId),N=a.length,Y=this.createLineBreaksComputer(),be=new vi.a(Co.b.fromDecorations(T));for(let Gt=0;Gt<N;Gt++){const eo=be.takeWhile(co=>co.lineNumber===Gt+1);Y.addRequest(a[Gt],eo,n?n[Gt]:null)}const xe=Y.finalize();let Ke=[],Ze=this.hiddenAreasIds.map(Gt=>this.model.getDecorationRange(Gt)).sort(se.a.compareRangesUsingStarts),nt=1,Ot=0,ft=-1,kt=ft+1<Ze.length?Ot+1:N+2;for(let Gt=0;Gt<N;Gt++){let eo=Gt+1;eo===kt&&(ft++,nt=Ze[ft].startLineNumber,Ot=Ze[ft].endLineNumber,kt=ft+1<Ze.length?Ot+1:N+2);let co=eo>=nt&&eo<=Ot,go=sr(xe[Gt],!co);Ke[Gt]=go.getViewLineCount(),this.lines[Gt]=go}this._validModelVersionId=this.model.getVersionId(),this.prefixSumComputer=new Yr(Ke)}getHiddenAreas(){return this.hiddenAreasIds.map(o=>this.model.getDecorationRange(o))}_reduceRanges(o){if(o.length===0)return[];let n=o.map(Y=>this.model.validateRange(Y)).sort(se.a.compareRangesUsingStarts),a=[],T=n[0].startLineNumber,N=n[0].endLineNumber;for(let Y=1,be=n.length;Y<be;Y++){let xe=n[Y];xe.startLineNumber>N+1?(a.push(new se.a(T,1,N,1)),T=xe.startLineNumber,N=xe.endLineNumber):xe.endLineNumber>N&&(N=xe.endLineNumber)}return a.push(new se.a(T,1,N,1)),a}setHiddenAreas(o){let n=this._reduceRanges(o),a=this.hiddenAreasIds.map(nt=>this.model.getDecorationRange(nt)).sort(se.a.compareRangesUsingStarts);if(n.length===a.length){let nt=!1;for(let Ot=0;Ot<n.length;Ot++)if(!n[Ot].equalsRange(a[Ot])){nt=!0;break}if(!nt)return!1}let T=[];for(const nt of n)T.push({range:nt,options:fi.b.EMPTY});this.hiddenAreasIds=this.model.deltaDecorations(this.hiddenAreasIds,T);let N=n,Y=1,be=0,xe=-1,Ke=xe+1<N.length?be+1:this.lines.length+2,Ze=!1;for(let nt=0;nt<this.lines.length;nt++){let Ot=nt+1;Ot===Ke&&(xe++,Y=N[xe].startLineNumber,be=N[xe].endLineNumber,Ke=xe+1<N.length?be+1:this.lines.length+2);let ft=!1;if(Ot>=Y&&Ot<=be?this.lines[nt].isVisible()&&(this.lines[nt]=this.lines[nt].setVisible(!1),ft=!0):(Ze=!0,this.lines[nt].isVisible()||(this.lines[nt]=this.lines[nt].setVisible(!0),ft=!0)),ft){let kt=this.lines[nt].getViewLineCount();this.prefixSumComputer.changeValue(nt,kt)}}return Ze||this.setHiddenAreas([]),!0}modelPositionIsVisible(o,n){return o<1||o>this.lines.length?!1:this.lines[o-1].isVisible()}getModelLineViewLineCount(o){return o<1||o>this.lines.length?1:this.lines[o-1].getViewLineCount()}setTabSize(o){return this.tabSize===o?!1:(this.tabSize=o,this._constructLines(!1,null),!0)}setWrappingSettings(o,n,a,T){const N=this.fontInfo.equals(o),Y=this.wrappingStrategy===n,be=this.wrappingColumn===a,xe=this.wrappingIndent===T;if(N&&Y&&be&&xe)return!1;const Ke=N&&Y&&!be&&xe;this.fontInfo=o,this.wrappingStrategy=n,this.wrappingColumn=a,this.wrappingIndent=T;let Ze=null;if(Ke){Ze=[];for(let nt=0,Ot=this.lines.length;nt<Ot;nt++)Ze[nt]=this.lines[nt].getLineBreakData()}return this._constructLines(!1,Ze),!0}createLineBreaksComputer(){const o=this.wrappingStrategy==="advanced"?this._domLineBreaksComputerFactory:this._monospaceLineBreaksComputerFactory;return o.createLineBreaksComputer(this.fontInfo,this.tabSize,this.wrappingColumn,this.wrappingIndent)}onModelFlushed(){this._constructLines(!0,null)}onModelLinesDeleted(o,n,a){if(!o||o<=this._validModelVersionId)return null;let T=n===1?1:this.prefixSumComputer.getAccumulatedValue(n-2)+1,N=this.prefixSumComputer.getAccumulatedValue(a-1);return this.lines.splice(n-1,a-n+1),this.prefixSumComputer.removeValues(n-1,a-n+1),new yn(T,N)}onModelLinesInserted(o,n,a,T){if(!o||o<=this._validModelVersionId)return null;const N=n>2&&!this.lines[n-2].isVisible();let Y=n===1?1:this.prefixSumComputer.getAccumulatedValue(n-2)+1,be=0,xe=[],Ke=[];for(let Ze=0,nt=T.length;Ze<nt;Ze++){let Ot=sr(T[Ze],!N);xe.push(Ot);let ft=Ot.getViewLineCount();be+=ft,Ke[Ze]=ft}return this.lines=this.lines.slice(0,n-1).concat(xe).concat(this.lines.slice(n-1)),this.prefixSumComputer.insertValues(n-1,Ke),new En(Y,Y+be-1)}onModelLineChanged(o,n,a){if(o!==null&&o<=this._validModelVersionId)return[!1,null,null,null];let T=n-1,N=this.lines[T].getViewLineCount(),Y=this.lines[T].isVisible(),be=sr(a,Y);this.lines[T]=be;let xe=this.lines[T].getViewLineCount(),Ke=!1,Ze=0,nt=-1,Ot=0,ft=-1,kt=0,Gt=-1;N>xe?(Ze=n===1?1:this.prefixSumComputer.getAccumulatedValue(n-2)+1,nt=Ze+xe-1,kt=nt+1,Gt=kt+(N-xe)-1,Ke=!0):N<xe?(Ze=n===1?1:this.prefixSumComputer.getAccumulatedValue(n-2)+1,nt=Ze+N-1,Ot=nt+1,ft=Ot+(xe-N)-1,Ke=!0):(Ze=n===1?1:this.prefixSumComputer.getAccumulatedValue(n-2)+1,nt=Ze+xe-1),this.prefixSumComputer.changeValue(T,xe);const eo=Ze<=nt?new wn(Ze,nt):null,co=Ot<=ft?new En(Ot,ft):null,go=kt<=Gt?new yn(kt,Gt):null;return[Ke,eo,co,go]}acceptVersionId(o){this._validModelVersionId=o,this.lines.length===1&&!this.lines[0].isVisible()&&this.setHiddenAreas([])}getViewLineCount(){return this.prefixSumComputer.getTotalValue()}_toValidViewLineNumber(o){if(o<1)return 1;const n=this.getViewLineCount();return o>n?n:o|0}getActiveIndentGuide(o,n,a){o=this._toValidViewLineNumber(o),n=this._toValidViewLineNumber(n),a=this._toValidViewLineNumber(a);const T=this.convertViewPositionToModelPosition(o,this.getViewLineMinColumn(o)),N=this.convertViewPositionToModelPosition(n,this.getViewLineMinColumn(n)),Y=this.convertViewPositionToModelPosition(a,this.getViewLineMinColumn(a)),be=this.model.getActiveIndentGuide(T.lineNumber,N.lineNumber,Y.lineNumber),xe=this.convertModelPositionToViewPosition(be.startLineNumber,1),Ke=this.convertModelPositionToViewPosition(be.endLineNumber,this.model.getLineMaxColumn(be.endLineNumber));return{startLineNumber:xe.lineNumber,endLineNumber:Ke.lineNumber,indent:be.indent}}getViewLineInfo(o){o=this._toValidViewLineNumber(o);let n=this.prefixSumComputer.getIndexOf(o-1),a=n.index,T=n.remainder;return new Ss(a+1,T)}getMinColumnOfViewLine(o){return this.lines[o.modelLineNumber-1].getViewLineMinColumn(this.model,o.modelLineNumber,o.modelLineWrappedLineIdx)}getModelStartPositionOfViewLine(o){const n=this.lines[o.modelLineNumber-1],a=n.getViewLineMinColumn(this.model,o.modelLineNumber,o.modelLineWrappedLineIdx),T=n.getModelColumnOfViewPosition(o.modelLineWrappedLineIdx,a);return new U.a(o.modelLineNumber,T)}getModelEndPositionOfViewLine(o){const n=this.lines[o.modelLineNumber-1],a=n.getViewLineMaxColumn(this.model,o.modelLineNumber,o.modelLineWrappedLineIdx),T=n.getModelColumnOfViewPosition(o.modelLineWrappedLineIdx,a);return new U.a(o.modelLineNumber,T)}getViewLineInfosGroupedByModelRanges(o,n){const a=this.getViewLineInfo(o),T=this.getViewLineInfo(n),N=new Array;let Y=this.getModelStartPositionOfViewLine(a),be=new Array;for(let xe=a.modelLineNumber;xe<=T.modelLineNumber;xe++){const Ke=this.lines[xe-1];if(Ke.isVisible()){let Ze=xe===a.modelLineNumber?a.modelLineWrappedLineIdx:0,nt=xe===T.modelLineNumber?T.modelLineWrappedLineIdx+1:Ke.getViewLineCount();for(let Ot=Ze;Ot<nt;Ot++)be.push(new Ss(xe,Ot))}if(!Ke.isVisible()&&Y){const Ze=new U.a(xe-1,this.model.getLineMaxColumn(xe-1)+1),nt=se.a.fromPositions(Y,Ze);N.push(new rs(nt,be)),be=[],Y=null}else Ke.isVisible()&&!Y&&(Y=new U.a(xe,1))}if(Y){const xe=se.a.fromPositions(Y,this.getModelEndPositionOfViewLine(T));N.push(new rs(xe,be))}return N}getViewLinesBracketGuides(o,n,a,T){const N=a?this.convertViewPositionToModelPosition(a.lineNumber,a.column):null,Y=[];for(const be of this.getViewLineInfosGroupedByModelRanges(o,n)){const xe=be.modelRange.startLineNumber,Ke=this.model.getLinesBracketGuides(xe,be.modelRange.endLineNumber,N,T);for(const Ze of be.viewLines)if(Ze.isWrappedLineContinuation&&this.getMinColumnOfViewLine(Ze)===1)Y.push([]);else{let nt=Ke[Ze.modelLineNumber-xe];nt=nt.map(Ot=>Ot.horizontalLine?new Ui.d(Ot.visibleColumn,Ot.className,new Ui.e(Ot.horizontalLine.top,this.convertModelPositionToViewPosition(Ze.modelLineNumber,Ot.horizontalLine.endColumn).column)):Ot),Y.push(nt)}}return Y}getViewLinesIndentGuides(o,n){o=this._toValidViewLineNumber(o),n=this._toValidViewLineNumber(n);const a=this.convertViewPositionToModelPosition(o,this.getViewLineMinColumn(o)),T=this.convertViewPositionToModelPosition(n,this.getViewLineMaxColumn(n));let N=[],Y=[],be=[];const xe=a.lineNumber-1,Ke=T.lineNumber-1;let Ze=null;for(let kt=xe;kt<=Ke;kt++){const Gt=this.lines[kt];if(Gt.isVisible()){let eo=Gt.getViewLineNumberOfModelPosition(0,kt===xe?a.column:1),co=Gt.getViewLineNumberOfModelPosition(0,this.model.getLineMaxColumn(kt+1)),go=co-eo+1,yo=0;go>1&&Gt.getViewLineMinColumn(this.model,kt+1,co)===1&&(yo=eo===0?1:2),Y.push(go),be.push(yo),Ze===null&&(Ze=new U.a(kt+1,0))}else Ze!==null&&(N=N.concat(this.model.getLinesIndentGuides(Ze.lineNumber,kt)),Ze=null)}Ze!==null&&(N=N.concat(this.model.getLinesIndentGuides(Ze.lineNumber,T.lineNumber)),Ze=null);const nt=n-o+1;let Ot=new Array(nt),ft=0;for(let kt=0,Gt=N.length;kt<Gt;kt++){let eo=N[kt],co=Math.min(nt-ft,Y[kt]),go=be[kt],yo;go===2?yo=0:go===1?yo=1:yo=co;for(let jo=0;jo<co;jo++)jo===yo&&(eo=0),Ot[ft++]=eo}return Ot}getViewLineContent(o){o=this._toValidViewLineNumber(o);let n=this.prefixSumComputer.getIndexOf(o-1),a=n.index,T=n.remainder;return this.lines[a].getViewLineContent(this.model,a+1,T)}getViewLineLength(o){o=this._toValidViewLineNumber(o);let n=this.prefixSumComputer.getIndexOf(o-1),a=n.index,T=n.remainder;return this.lines[a].getViewLineLength(this.model,a+1,T)}getViewLineMinColumn(o){o=this._toValidViewLineNumber(o);let n=this.prefixSumComputer.getIndexOf(o-1),a=n.index,T=n.remainder;return this.lines[a].getViewLineMinColumn(this.model,a+1,T)}getViewLineMaxColumn(o){o=this._toValidViewLineNumber(o);let n=this.prefixSumComputer.getIndexOf(o-1),a=n.index,T=n.remainder;return this.lines[a].getViewLineMaxColumn(this.model,a+1,T)}getViewLineData(o){o=this._toValidViewLineNumber(o);let n=this.prefixSumComputer.getIndexOf(o-1),a=n.index,T=n.remainder;return this.lines[a].getViewLineData(this.model,a+1,T)}getViewLinesData(o,n,a){o=this._toValidViewLineNumber(o),n=this._toValidViewLineNumber(n);let T=this.prefixSumComputer.getIndexOf(o-1),N=o,Y=T.index,be=T.remainder,xe=[];for(let Ke=Y,Ze=this.model.getLineCount();Ke<Ze;Ke++){let nt=this.lines[Ke];if(!nt.isVisible())continue;let Ot=Ke===Y?be:0,ft=nt.getViewLineCount()-Ot,kt=!1;N+ft>n&&(kt=!0,ft=n-N+1);let Gt=Ot+ft;if(nt.getViewLinesData(this.model,Ke+1,Ot,Gt,N-o,a,xe),N+=ft,kt)break}return xe}validateViewPosition(o,n,a){o=this._toValidViewLineNumber(o);let T=this.prefixSumComputer.getIndexOf(o-1),N=T.index,Y=T.remainder,be=this.lines[N],xe=be.getViewLineMinColumn(this.model,N+1,Y),Ke=be.getViewLineMaxColumn(this.model,N+1,Y);n<xe&&(n=xe),n>Ke&&(n=Ke);let Ze=be.getModelColumnOfViewPosition(Y,n),nt=this.model.validatePosition(new U.a(N+1,Ze));return nt.equals(a)?new U.a(o,n):this.convertModelPositionToViewPosition(a.lineNumber,a.column)}validateViewRange(o,n){const a=this.validateViewPosition(o.startLineNumber,o.startColumn,n.getStartPosition()),T=this.validateViewPosition(o.endLineNumber,o.endColumn,n.getEndPosition());return new se.a(a.lineNumber,a.column,T.lineNumber,T.column)}convertViewPositionToModelPosition(o,n){o=this._toValidViewLineNumber(o);let a=this.prefixSumComputer.getIndexOf(o-1),T=a.index,N=a.remainder,Y=this.lines[T].getModelColumnOfViewPosition(N,n);return this.model.validatePosition(new U.a(T+1,Y))}convertViewRangeToModelRange(o){const n=this.convertViewPositionToModelPosition(o.startLineNumber,o.startColumn),a=this.convertViewPositionToModelPosition(o.endLineNumber,o.endColumn);return new se.a(n.lineNumber,n.column,a.lineNumber,a.column)}convertModelPositionToViewPosition(o,n,a=2){const T=this.model.validatePosition(new U.a(o,n)),N=T.lineNumber,Y=T.column;let be=N-1,xe=!1;for(;be>0&&!this.lines[be].isVisible();)be--,xe=!0;if(be===0&&!this.lines[be].isVisible())return new U.a(1,1);const Ke=1+(be===0?0:this.prefixSumComputer.getAccumulatedValue(be-1));let Ze;return xe?Ze=this.lines[be].getViewPositionOfModelPosition(Ke,this.model.getLineMaxColumn(be+1),a):Ze=this.lines[N-1].getViewPositionOfModelPosition(Ke,Y,a),Ze}convertModelRangeToViewRange(o,n=0){if(o.isEmpty()){const a=this.convertModelPositionToViewPosition(o.startLineNumber,o.startColumn,n);return se.a.fromPositions(a)}else{const a=this.convertModelPositionToViewPosition(o.startLineNumber,o.startColumn,1),T=this.convertModelPositionToViewPosition(o.endLineNumber,o.endColumn,0);return new se.a(a.lineNumber,a.column,T.lineNumber,T.column)}}getViewLineNumberOfModelPosition(o,n){let a=o-1;if(this.lines[a].isVisible()){const N=1+(a===0?0:this.prefixSumComputer.getAccumulatedValue(a-1));return this.lines[a].getViewLineNumberOfModelPosition(N,n)}for(;a>0&&!this.lines[a].isVisible();)a--;if(a===0&&!this.lines[a].isVisible())return 1;const T=1+(a===0?0:this.prefixSumComputer.getAccumulatedValue(a-1));return this.lines[a].getViewLineNumberOfModelPosition(T,this.model.getLineMaxColumn(a+1))}getDecorationsInRange(o,n,a){const T=this.convertViewPositionToModelPosition(o.startLineNumber,o.startColumn),N=this.convertViewPositionToModelPosition(o.endLineNumber,o.endColumn);if(N.lineNumber-T.lineNumber<=o.endLineNumber-o.startLineNumber)return this.model.getDecorationsInRange(new se.a(T.lineNumber,1,N.lineNumber,N.column),n,a);let Y=[];const be=T.lineNumber-1,xe=N.lineNumber-1;let Ke=null;for(let ft=be;ft<=xe;ft++){const kt=this.lines[ft];if(kt.isVisible())Ke===null&&(Ke=new U.a(ft+1,ft===be?T.column:1));else if(Ke!==null){const Gt=this.model.getLineMaxColumn(ft);Y=Y.concat(this.model.getDecorationsInRange(new se.a(Ke.lineNumber,Ke.column,ft,Gt),n,a)),Ke=null}}Ke!==null&&(Y=Y.concat(this.model.getDecorationsInRange(new se.a(Ke.lineNumber,Ke.column,N.lineNumber,N.column),n,a)),Ke=null),Y.sort((ft,kt)=>{const Gt=se.a.compareRangesUsingStarts(ft.range,kt.range);return Gt===0?ft.id<kt.id?-1:ft.id>kt.id?1:0:Gt});let Ze=[],nt=0,Ot=null;for(const ft of Y){const kt=ft.id;if(Ot===kt)continue;Ot=kt,Ze[nt++]=ft}return Ze}getInjectedTextAt(o){const n=this._toValidViewLineNumber(o.lineNumber),a=this.prefixSumComputer.getIndexOf(n-1),T=a.index,N=a.remainder;return this.lines[T].getInjectedTextAt(N,o.column)}normalizePosition(o,n){const a=this._toValidViewLineNumber(o.lineNumber),T=this.prefixSumComputer.getIndexOf(a-1),N=T.index,Y=T.remainder;return this.lines[N].normalizePosition(this.model,N+1,Y,o,n)}getLineIndentColumn(o){const n=this._toValidViewLineNumber(o),a=this.prefixSumComputer.getIndexOf(n-1),T=a.index,N=a.remainder;return N===0?this.model.getLineIndentColumn(T+1):0}}class Ss{constructor(o,n){this.modelLineNumber=o,this.modelLineWrappedLineIdx=n}get isWrappedLineContinuation(){return this.modelLineWrappedLineIdx>0}}class rs{constructor(o,n){this.modelRange=o,this.viewLines=n}}class as{constructor(){}isVisible(){return!0}setVisible(o){return o?this:ks.INSTANCE}getLineBreakData(){return null}getViewLineCount(){return 1}getViewLineContent(o,n,a){return o.getLineContent(n)}getViewLineLength(o,n,a){return o.getLineLength(n)}getViewLineMinColumn(o,n,a){return o.getLineMinColumn(n)}getViewLineMaxColumn(o,n,a){return o.getLineMaxColumn(n)}getViewLineData(o,n,a){let T=o.getLineTokens(n),N=T.getLineContent();return new F.f(N,!1,1,N.length+1,0,T.inflate(),null)}getViewLinesData(o,n,a,T,N,Y,be){if(!Y[N]){be[N]=null;return}be[N]=this.getViewLineData(o,n,0)}getModelColumnOfViewPosition(o,n){return n}getViewPositionOfModelPosition(o,n){return new U.a(o,n)}getViewLineNumberOfModelPosition(o,n){return o}normalizePosition(o,n,a,T,N){return T}getInjectedTextAt(o,n){return null}}as.INSTANCE=new as;class ks{constructor(){}isVisible(){return!1}setVisible(o){return o?as.INSTANCE:this}getLineBreakData(){return null}getViewLineCount(){return 0}getViewLineContent(o,n,a){throw new Error("Not supported")}getViewLineLength(o,n,a){throw new Error("Not supported")}getViewLineMinColumn(o,n,a){throw new Error("Not supported")}getViewLineMaxColumn(o,n,a){throw new Error("Not supported")}getViewLineData(o,n,a){throw new Error("Not supported")}getViewLinesData(o,n,a,T,N,Y,be){throw new Error("Not supported")}getModelColumnOfViewPosition(o,n){throw new Error("Not supported")}getViewPositionOfModelPosition(o,n){throw new Error("Not supported")}getViewLineNumberOfModelPosition(o,n){throw new Error("Not supported")}normalizePosition(o,n,a,T,N){throw new Error("Not supported")}getInjectedTextAt(o,n){throw new Error("Not supported")}}ks.INSTANCE=new ks;class Zr{constructor(o,n){this._lineBreakData=o,this._isVisible=n}isVisible(){return this._isVisible}setVisible(o){return this._isVisible=o,this}getLineBreakData(){return this._lineBreakData}getViewLineCount(){return this._isVisible?this._lineBreakData.breakOffsets.length:0}getInputStartOffsetOfOutputLineIndex(o){return this._lineBreakData.getInputOffsetOfOutputPosition(o,0)}getInputEndOffsetOfOutputLineIndex(o,n,a){return a+1===this._lineBreakData.breakOffsets.length?o.getLineMaxColumn(n)-1:this._lineBreakData.getInputOffsetOfOutputPosition(a+1,0)}getViewLineContent(o,n,a){if(!this._isVisible)throw new Error("Not supported");const T=a>0?this._lineBreakData.breakOffsets[a-1]:0,N=a<this._lineBreakData.breakOffsets.length?this._lineBreakData.breakOffsets[a]:this._lineBreakData.breakOffsets[this._lineBreakData.breakOffsets.length-1];let Y;if(this._lineBreakData.injectionOffsets!==null){const be=this._lineBreakData.injectionOffsets.map((xe,Ke)=>new Co.b(0,0,xe+1,this._lineBreakData.injectionOptions[Ke],0));Y=Co.b.applyInjectedText(o.getLineContent(n),be).substring(T,N)}else Y=o.getValueInRange({startLineNumber:n,startColumn:T+1,endLineNumber:n,endColumn:N+1});return a>0&&(Y=ws(this._lineBreakData.wrappedTextIndentLength)+Y),Y}getViewLineLength(o,n,a){if(!this._isVisible)throw new Error("Not supported");const T=a>0?this._lineBreakData.breakOffsets[a-1]:0,N=a<this._lineBreakData.breakOffsets.length?this._lineBreakData.breakOffsets[a]:this._lineBreakData.breakOffsets[this._lineBreakData.breakOffsets.length-1];let Y=N-T;return a>0&&(Y=this._lineBreakData.wrappedTextIndentLength+Y),Y}getViewLineMinColumn(o,n,a){if(!this._isVisible)throw new Error("Not supported");return this._getViewLineMinColumn(a)}_getViewLineMinColumn(o){return o>0?this._lineBreakData.wrappedTextIndentLength+1:1}getViewLineMaxColumn(o,n,a){if(!this._isVisible)throw new Error("Not supported");return this.getViewLineLength(o,n,a)+1}getViewLineData(o,n,a){if(!this._isVisible)throw new Error("Not supported");const T=this._lineBreakData,N=a>0?T.wrappedTextIndentLength:0,Y=T.injectionOffsets,be=T.injectionOptions;let xe,Ke,Ze;if(Y){const Gt=o.getLineTokens(n).withInserted(Y.map((yo,jo)=>({offset:yo,text:be[jo].content,tokenMetadata:ss.a.defaultTokenMetadata}))),eo=a>0?T.breakOffsets[a-1]:0,co=T.breakOffsets[a];xe=Gt.getLineContent().substring(eo,co),Ke=Gt.sliceAndInflate(eo,co,N),Ze=new Array;let go=0;for(let yo=0;yo<Y.length;yo++){const jo=be[yo].content.length,Po=Y[yo]+go,ti=Y[yo]+go+jo;if(Po>co)break;if(eo<ti){const oi=be[yo];if(oi.inlineClassName){const $o=a>0?T.wrappedTextIndentLength:0,Yo=$o+Math.max(Po-eo,0),Ei=$o+Math.min(ti-eo,co);Yo!==Ei&&Ze.push(new F.e(Yo,Ei,oi.inlineClassName,oi.inlineClassNameAffectsLetterSpacing))}}go+=jo}}else{const Gt=this.getInputStartOffsetOfOutputLineIndex(a),eo=this.getInputEndOffsetOfOutputLineIndex(o,n,a),co=o.getLineTokens(n);xe=o.getValueInRange({startLineNumber:n,startColumn:Gt+1,endLineNumber:n,endColumn:eo+1}),Ke=co.sliceAndInflate(Gt,eo,N),Ze=null}a>0&&(xe=ws(T.wrappedTextIndentLength)+xe);const nt=a>0?T.wrappedTextIndentLength+1:1,Ot=xe.length+1,ft=a+1<this.getViewLineCount(),kt=a===0?0:T.breakOffsetsVisibleColumn[a-1];return new F.f(xe,ft,nt,Ot,kt,Ke,Ze)}getViewLinesData(o,n,a,T,N,Y,be){if(!this._isVisible)throw new Error("Not supported");for(let xe=a;xe<T;xe++){let Ke=N+xe-a;if(!Y[Ke]){be[Ke]=null;continue}be[Ke]=this.getViewLineData(o,n,xe)}}getModelColumnOfViewPosition(o,n){if(!this._isVisible)throw new Error("Not supported");let a=n-1;return o>0&&(a<this._lineBreakData.wrappedTextIndentLength?a=0:a-=this._lineBreakData.wrappedTextIndentLength),this._lineBreakData.getInputOffsetOfOutputPosition(o,a)+1}getViewPositionOfModelPosition(o,n,a=2){if(!this._isVisible)throw new Error("Not supported");let T=this._lineBreakData.getOutputPositionOfInputOffset(n-1,a),N=T.outputLineIndex,Y=T.outputOffset+1;return N>0&&(Y+=this._lineBreakData.wrappedTextIndentLength),new U.a(o+N,Y)}getViewLineNumberOfModelPosition(o,n){if(!this._isVisible)throw new Error("Not supported");const a=this._lineBreakData.getOutputPositionOfInputOffset(n-1);return o+a.outputLineIndex}normalizePosition(o,n,a,T,N){if(this._lineBreakData.injectionOffsets!==null){const Y=T.lineNumber-a,be=this._lineBreakData.outputPositionToOffsetInUnwrappedLine(a,T.column-1),xe=this._lineBreakData.normalizeOffsetAroundInjections(be,N);if(xe!==be)return this._lineBreakData.getOutputPositionOfOffsetInUnwrappedLine(xe,N).toPosition(Y,this._lineBreakData.wrappedTextIndentLength)}if(N===0){if(a>0&&T.column===this._getViewLineMinColumn(a))return new U.a(T.lineNumber-1,this.getViewLineMaxColumn(o,n,a-1))}else if(N===1){const Y=this.getViewLineCount()-1;if(a<Y&&T.column===this.getViewLineMaxColumn(o,n,a))return new U.a(T.lineNumber+1,this._getViewLineMinColumn(a+1))}return T}getInjectedTextAt(o,n){return this._lineBreakData.getInjectedText(o,n-1)}}let nr=[""];function ws(o){if(o>=nr.length)for(let n=1;n<=o;n++)nr[n]=Qr(n);return nr[o]}function Qr(o){return new Array(o+1).join(" ")}function sr(o,n){return o===null?n?as.INSTANCE:ks.INSTANCE:new Zr(o,n)}class yr{constructor(o){this._lines=o}_validPosition(o){return this._lines.model.validatePosition(o)}_validRange(o){return this._lines.model.validateRange(o)}convertViewPositionToModelPosition(o){return this._validPosition(o)}convertViewRangeToModelRange(o){return this._validRange(o)}validateViewPosition(o,n){return this._validPosition(n)}validateViewRange(o,n){return this._validRange(n)}convertModelPositionToViewPosition(o){return this._validPosition(o)}convertModelRangeToViewRange(o){return this._validRange(o)}modelPositionIsVisible(o){const n=this._lines.model.getLineCount();return!(o.lineNumber<1||o.lineNumber>n)}getModelLineViewLineCount(o){return 1}getViewLineNumberOfModelPosition(o,n){return o}}class Jr{constructor(o){this.model=o}dispose(){}createCoordinatesConverter(){return new yr(this)}getHiddenAreas(){return[]}setHiddenAreas(o){return!1}setTabSize(o){return!1}setWrappingSettings(o,n,a,T){return!1}createLineBreaksComputer(){let o=[];return{addRequest:(n,a,T)=>{o.push(null)},finalize:()=>o}}onModelFlushed(){}onModelLinesDeleted(o,n,a){return new yn(n,a)}onModelLinesInserted(o,n,a,T){return new En(n,a)}onModelLineChanged(o,n,a){return[!1,new wn(n,n),null,null]}acceptVersionId(o){}getViewLineCount(){return this.model.getLineCount()}getActiveIndentGuide(o,n,a){return{startLineNumber:o,endLineNumber:o,indent:0}}getViewLinesBracketGuides(o,n,a){return new Array(n-o+1).fill([])}getViewLinesIndentGuides(o,n){const a=n-o+1;let T=new Array(a);for(let N=0;N<a;N++)T[N]=0;return T}getViewLineContent(o){return this.model.getLineContent(o)}getViewLineLength(o){return this.model.getLineLength(o)}getViewLineMinColumn(o){return this.model.getLineMinColumn(o)}getViewLineMaxColumn(o){return this.model.getLineMaxColumn(o)}getViewLineData(o){let n=this.model.getLineTokens(o),a=n.getLineContent();return new F.f(a,!1,1,a.length+1,0,n.inflate(),null)}getViewLinesData(o,n,a){const T=this.model.getLineCount();o=Math.min(Math.max(1,o),T),n=Math.min(Math.max(1,n),T);let N=[];for(let Y=o;Y<=n;Y++){let be=Y-o;a[be]||(N[be]=null),N[be]=this.getViewLineData(Y)}return N}getDecorationsInRange(o,n,a){return this.model.getDecorationsInRange(o,n,a)}normalizePosition(o,n){return this.model.normalizePosition(o,n)}getLineIndentColumn(o){return this.model.getLineIndentColumn(o)}getInjectedTextAt(o){return null}}class Vn{constructor(o,n,a,T,N){this.editorId=o,this.model=n,this.configuration=a,this._linesCollection=T,this._coordinatesConverter=N,this._decorationsCache=Object.create(null),this._cachedModelDecorationsResolver=null,this._cachedModelDecorationsResolverViewRange=null}_clearCachedModelDecorationsResolver(){this._cachedModelDecorationsResolver=null,this._cachedModelDecorationsResolverViewRange=null}dispose(){this._decorationsCache=Object.create(null),this._clearCachedModelDecorationsResolver()}reset(){this._decorationsCache=Object.create(null),this._clearCachedModelDecorationsResolver()}onModelDecorationsChanged(){this._decorationsCache=Object.create(null),this._clearCachedModelDecorationsResolver()}onLineMappingChanged(){this._decorationsCache=Object.create(null),this._clearCachedModelDecorationsResolver()}_getOrCreateViewModelDecoration(o){const n=o.id;let a=this._decorationsCache[n];if(!a){const T=o.range,N=o.options;let Y;if(N.isWholeLine){const be=this._coordinatesConverter.convertModelPositionToViewPosition(new U.a(T.startLineNumber,1),0),xe=this._coordinatesConverter.convertModelPositionToViewPosition(new U.a(T.endLineNumber,this.model.getLineMaxColumn(T.endLineNumber)),1);Y=new se.a(be.lineNumber,be.column,xe.lineNumber,xe.column)}else Y=this._coordinatesConverter.convertModelRangeToViewRange(T,1);a=new F.h(Y,N),this._decorationsCache[n]=a}return a}getDecorationsViewportData(o){let n=this._cachedModelDecorationsResolver!==null;return n=n&&o.equalsRange(this._cachedModelDecorationsResolverViewRange),n||(this._cachedModelDecorationsResolver=this._getDecorationsViewportData(o),this._cachedModelDecorationsResolverViewRange=o),this._cachedModelDecorationsResolver}_getDecorationsViewportData(o){const n=this._linesCollection.getDecorationsInRange(o,this.editorId,Object(Xe.n)(this.configuration.options)),a=o.startLineNumber,T=o.endLineNumber;let N=[],Y=0,be=[];for(let xe=a;xe<=T;xe++)be[xe-a]=[];for(let xe=0,Ke=n.length;xe<Ke;xe++){let Ze=n[xe],nt=Ze.options,Ot=this._getOrCreateViewModelDecoration(Ze),ft=Ot.range;if(N[Y++]=Ot,nt.inlineClassName){let kt=new F.a(ft,nt.inlineClassName,nt.inlineClassNameAffectsLetterSpacing?3:0),Gt=Math.max(a,ft.startLineNumber),eo=Math.min(T,ft.endLineNumber);for(let co=Gt;co<=eo;co++)be[co-a].push(kt)}if(nt.beforeContentClassName&&(a<=ft.startLineNumber&&ft.startLineNumber<=T)){let kt=new F.a(new se.a(ft.startLineNumber,ft.startColumn,ft.startLineNumber,ft.startColumn),nt.beforeContentClassName,1);be[ft.startLineNumber-a].push(kt)}if(nt.afterContentClassName&&(a<=ft.endLineNumber&&ft.endLineNumber<=T)){let kt=new F.a(new se.a(ft.endLineNumber,ft.endColumn,ft.endLineNumber,ft.endColumn),nt.afterContentClassName,2);be[ft.endLineNumber-a].push(kt)}}return{decorations:N,inlineDecorations:be}}}var js=t("MqQJ");const Er=!0;class vn extends d.a{constructor(o,n,a,T,N,Y){super();if(this._editorId=o,this._configuration=n,this.model=a,this._eventDispatcher=new br,this.onEvent=this._eventDispatcher.onEvent,this.cursorConfig=new je.b(this.model.getLanguageId(),this.model.getOptions(),this._configuration),this._tokenizeViewportSoon=this._register(new E.e(()=>this.tokenizeViewport(),50)),this._updateConfigurationViewLineCount=this._register(new E.e(()=>this._updateConfigurationViewLineCountNow(),0)),this._hasFocus=!1,this._viewportStartLine=-1,this._viewportStartLineTrackedRange=null,this._viewportStartLineDelta=0,Er&&this.model.isTooLargeForTokenization())this._lines=new Jr(this.model);else{const be=this._configuration.options,xe=be.get(43),Ke=be.get(123),Ze=be.get(130),nt=be.get(122);this._lines=new ir(this._editorId,this.model,T,N,xe,this.model.getOptions().tabSize,Ke,Ze.wrappingColumn,nt)}this.coordinatesConverter=this._lines.createCoordinatesConverter(),this._cursor=this._register(new Rs(a,this,this.coordinatesConverter,this.cursorConfig)),this.viewLayout=this._register(new xn(this._configuration,this.getLineCount(),Y)),this._register(this.viewLayout.onDidScroll(be=>{be.scrollTopChanged&&this._tokenizeViewportSoon.schedule(),this._eventDispatcher.emitSingleViewEvent(new Os(be)),this._eventDispatcher.emitOutgoingEvent(new As(be.oldScrollWidth,be.oldScrollLeft,be.oldScrollHeight,be.oldScrollTop,be.scrollWidth,be.scrollLeft,be.scrollHeight,be.scrollTop))})),this._register(this.viewLayout.onDidContentSizeChange(be=>{this._eventDispatcher.emitOutgoingEvent(be)})),this._decorations=new Vn(this._editorId,this.model,this._configuration,this._lines,this.coordinatesConverter),this._registerModelEvents(),this._register(this._configuration.onDidChangeFast(be=>{try{const xe=this._eventDispatcher.beginEmitViewEvents();this._onConfigurationChanged(xe,be)}finally{this._eventDispatcher.endEmitViewEvents()}})),this._register(ro.getInstance().onDidChange(()=>{this._eventDispatcher.emitSingleViewEvent(new ns)})),this._updateConfigurationViewLineCountNow()}dispose(){super.dispose(),this._decorations.dispose(),this._lines.dispose(),this.invalidateMinimapColorCache(),this._viewportStartLineTrackedRange=this.model._setTrackedRange(this._viewportStartLineTrackedRange,null,1),this._eventDispatcher.dispose()}createLineBreaksComputer(){return this._lines.createLineBreaksComputer()}addViewEventHandler(o){this._eventDispatcher.addViewEventHandler(o)}removeViewEventHandler(o){this._eventDispatcher.removeViewEventHandler(o)}_updateConfigurationViewLineCountNow(){this._configuration.setViewLineCount(this._lines.getViewLineCount())}tokenizeViewport(){const o=this.viewLayout.getLinesViewportData(),n=new se.a(o.startLineNumber,this.getLineMinColumn(o.startLineNumber),o.endLineNumber,this.getLineMaxColumn(o.endLineNumber)),a=this._toModelVisibleRanges(n);for(const T of a)this.model.tokenizeViewport(T.startLineNumber,T.endLineNumber)}setHasFocus(o){this._hasFocus=o,this._cursor.setHasFocus(o),this._eventDispatcher.emitSingleViewEvent(new xi(o)),this._eventDispatcher.emitOutgoingEvent(new vr(!o,o))}onCompositionStart(){this._eventDispatcher.emitSingleViewEvent(new ko)}onCompositionEnd(){this._eventDispatcher.emitSingleViewEvent(new Qo)}onDidColorThemeChange(){this._eventDispatcher.emitSingleViewEvent(new Yn)}_onConfigurationChanged(o,n){let a=null;if(this._viewportStartLine!==-1){let Ze=new U.a(this._viewportStartLine,this.getLineMinColumn(this._viewportStartLine));a=this.coordinatesConverter.convertViewPositionToModelPosition(Ze)}let T=!1;const N=this._configuration.options,Y=N.get(43),be=N.get(123),xe=N.get(130),Ke=N.get(122);if(this._lines.setWrappingSettings(Y,be,xe.wrappingColumn,Ke)&&(o.emitViewEvent(new Ki),o.emitViewEvent(new Ti),o.emitViewEvent(new li(null)),this._cursor.onLineMappingChanged(o),this._decorations.onLineMappingChanged(),this.viewLayout.onFlushed(this.getLineCount()),this.viewLayout.getCurrentScrollTop()!==0&&(T=!0),this._updateConfigurationViewLineCount.schedule()),n.hasChanged(80)&&(this._decorations.reset(),o.emitViewEvent(new li(null))),o.emitViewEvent(new yi(n)),this.viewLayout.onConfigurationChanged(n),T&&a){const Ze=this.coordinatesConverter.convertModelPositionToViewPosition(a),nt=this.viewLayout.getVerticalOffsetForLineNumber(Ze.lineNumber);this.viewLayout.setScrollPosition({scrollTop:nt+this._viewportStartLineDelta},1)}je.b.shouldRecreate(n)&&(this.cursorConfig=new je.b(this.model.getLanguageId(),this.model.getOptions(),this._configuration),this._cursor.updateConfiguration(this.cursorConfig))}_registerModelEvents(){this._register(this.model.onDidChangeContentOrInjectedText(o=>{try{const n=this._eventDispatcher.beginEmitViewEvents();let a=!1,T=!1;const N=o.changes,Y=o instanceof Co.d?o.versionId:null,be=this._lines.createLineBreaksComputer();for(const Ze of N)switch(Ze.changeType){case 4:{for(let nt=0;nt<Ze.detail.length;nt++){const Ot=Ze.detail[nt];let ft=Ze.injectedTexts[nt];ft&&(ft=ft.filter(kt=>!kt.ownerId||kt.ownerId===this._editorId)),be.addRequest(Ot,ft,null)}break}case 2:{let nt=null;Ze.injectedText&&(nt=Ze.injectedText.filter(Ot=>!Ot.ownerId||Ot.ownerId===this._editorId)),be.addRequest(Ze.detail,nt,null);break}}const xe=be.finalize();let Ke=0;for(const Ze of N)switch(Ze.changeType){case 1:{this._lines.onModelFlushed(),n.emitViewEvent(new Ki),this._decorations.reset(),this.viewLayout.onFlushed(this.getLineCount()),a=!0;break}case 3:{const nt=this._lines.onModelLinesDeleted(Y,Ze.fromLineNumber,Ze.toLineNumber);nt!==null&&(n.emitViewEvent(nt),this.viewLayout.onLinesDeleted(nt.fromLineNumber,nt.toLineNumber)),a=!0;break}case 4:{const nt=xe.slice(Ke,Ke+Ze.detail.length);Ke+=Ze.detail.length;const Ot=this._lines.onModelLinesInserted(Y,Ze.fromLineNumber,Ze.toLineNumber,nt);Ot!==null&&(n.emitViewEvent(Ot),this.viewLayout.onLinesInserted(Ot.fromLineNumber,Ot.toLineNumber)),a=!0;break}case 2:{const nt=xe[Ke];Ke++;const[Ot,ft,kt,Gt]=this._lines.onModelLineChanged(Y,Ze.lineNumber,nt);T=Ot,ft&&n.emitViewEvent(ft),kt&&(n.emitViewEvent(kt),this.viewLayout.onLinesInserted(kt.fromLineNumber,kt.toLineNumber)),Gt&&(n.emitViewEvent(Gt),this.viewLayout.onLinesDeleted(Gt.fromLineNumber,Gt.toLineNumber));break}case 5:break}Y!==null&&this._lines.acceptVersionId(Y),this.viewLayout.onHeightMaybeChanged(),!a&&T&&(n.emitViewEvent(new Ti),n.emitViewEvent(new li(null)),this._cursor.onLineMappingChanged(n),this._decorations.onLineMappingChanged())}finally{this._eventDispatcher.endEmitViewEvents()}if(this._viewportStartLine=-1,this._configuration.setMaxLineNumber(this.model.getLineCount()),this._updateConfigurationViewLineCountNow(),!this._hasFocus&&this.model.getAttachedEditorCount()>=2&&this._viewportStartLineTrackedRange){const n=this.model._getTrackedRange(this._viewportStartLineTrackedRange);if(n){const a=this.coordinatesConverter.convertModelPositionToViewPosition(n.getStartPosition()),T=this.viewLayout.getVerticalOffsetForLineNumber(a.lineNumber);this.viewLayout.setScrollPosition({scrollTop:T+this._viewportStartLineDelta},1)}}try{const n=this._eventDispatcher.beginEmitViewEvents();this._cursor.onModelContentChanged(n,o)}finally{this._eventDispatcher.endEmitViewEvents()}})),this._register(this.model.onDidChangeTokens(o=>{let n=[];for(let a=0,T=o.ranges.length;a<T;a++){const N=o.ranges[a],Y=this.coordinatesConverter.convertModelPositionToViewPosition(new U.a(N.fromLineNumber,1)).lineNumber,be=this.coordinatesConverter.convertModelPositionToViewPosition(new U.a(N.toLineNumber,this.model.getLineMaxColumn(N.toLineNumber))).lineNumber;n[a]={fromLineNumber:Y,toLineNumber:be}}this._eventDispatcher.emitSingleViewEvent(new vs(n)),o.tokenizationSupportChanged&&this._tokenizeViewportSoon.schedule()})),this._register(this.model.onDidChangeLanguageConfiguration(o=>{this._eventDispatcher.emitSingleViewEvent(new Ni),this.cursorConfig=new je.b(this.model.getLanguageId(),this.model.getOptions(),this._configuration),this._cursor.updateConfiguration(this.cursorConfig)})),this._register(this.model.onDidChangeLanguage(o=>{this.cursorConfig=new je.b(this.model.getLanguageId(),this.model.getOptions(),this._configuration),this._cursor.updateConfiguration(this.cursorConfig)})),this._register(this.model.onDidChangeOptions(o=>{if(this._lines.setTabSize(this.model.getOptions().tabSize)){try{const n=this._eventDispatcher.beginEmitViewEvents();n.emitViewEvent(new Ki),n.emitViewEvent(new Ti),n.emitViewEvent(new li(null)),this._cursor.onLineMappingChanged(n),this._decorations.onLineMappingChanged(),this.viewLayout.onFlushed(this.getLineCount())}finally{this._eventDispatcher.endEmitViewEvents()}this._updateConfigurationViewLineCount.schedule()}this.cursorConfig=new je.b(this.model.getLanguageId(),this.model.getOptions(),this._configuration),this._cursor.updateConfiguration(this.cursorConfig)})),this._register(this.model.onDidChangeDecorations(o=>{this._decorations.onModelDecorationsChanged(),this._eventDispatcher.emitSingleViewEvent(new li(o))}))}setHiddenAreas(o){let n=!1;try{const a=this._eventDispatcher.beginEmitViewEvents();n=this._lines.setHiddenAreas(o),n&&(a.emitViewEvent(new Ki),a.emitViewEvent(new Ti),a.emitViewEvent(new li(null)),this._cursor.onLineMappingChanged(a),this._decorations.onLineMappingChanged(),this.viewLayout.onFlushed(this.getLineCount()),this.viewLayout.onHeightMaybeChanged())}finally{this._eventDispatcher.endEmitViewEvents()}this._updateConfigurationViewLineCount.schedule(),n&&this._eventDispatcher.emitOutgoingEvent(new Cs)}getVisibleRangesPlusViewportAboveBelow(){const o=this._configuration.options.get(129),n=this._configuration.options.get(58),a=Math.max(20,Math.round(o.height/n)),T=this.viewLayout.getLinesViewportData(),N=Math.max(1,T.completelyVisibleStartLineNumber-a),Y=Math.min(this.getLineCount(),T.completelyVisibleEndLineNumber+a);return this._toModelVisibleRanges(new se.a(N,this.getLineMinColumn(N),Y,this.getLineMaxColumn(Y)))}getVisibleRanges(){const o=this.getCompletelyVisibleViewRange();return this._toModelVisibleRanges(o)}_toModelVisibleRanges(o){const n=this.coordinatesConverter.convertViewRangeToModelRange(o),a=this._lines.getHiddenAreas();if(a.length===0)return[n];let T=[],N=0,Y=n.startLineNumber,be=n.startColumn,xe=n.endLineNumber,Ke=n.endColumn;for(let Ze=0,nt=a.length;Ze<nt;Ze++){const Ot=a[Ze].startLineNumber,ft=a[Ze].endLineNumber;if(ft<Y)continue;if(Ot>xe)continue;Y<Ot&&(T[N++]=new se.a(Y,be,Ot-1,this.model.getLineMaxColumn(Ot-1))),Y=ft+1,be=1}return(Y<xe||Y===xe&&be<Ke)&&(T[N++]=new se.a(Y,be,xe,Ke)),T}getCompletelyVisibleViewRange(){const o=this.viewLayout.getLinesViewportData(),n=o.completelyVisibleStartLineNumber,a=o.completelyVisibleEndLineNumber;return new se.a(n,this.getLineMinColumn(n),a,this.getLineMaxColumn(a))}getCompletelyVisibleViewRangeAtScrollTop(o){const n=this.viewLayout.getLinesViewportDataAtScrollTop(o),a=n.completelyVisibleStartLineNumber,T=n.completelyVisibleEndLineNumber;return new se.a(a,this.getLineMinColumn(a),T,this.getLineMaxColumn(T))}saveState(){const o=this.viewLayout.saveState(),n=o.scrollTop,a=this.viewLayout.getLineNumberAtVerticalOffset(n),T=this.coordinatesConverter.convertViewPositionToModelPosition(new U.a(a,this.getLineMinColumn(a))),N=this.viewLayout.getVerticalOffsetForLineNumber(a)-n;return{scrollLeft:o.scrollLeft,firstPosition:T,firstPositionDeltaTop:N}}reduceRestoreState(o){if(typeof o.firstPosition=="undefined")return this._reduceRestoreStateCompatibility(o);const n=this.model.validatePosition(o.firstPosition),a=this.coordinatesConverter.convertModelPositionToViewPosition(n),T=this.viewLayout.getVerticalOffsetForLineNumber(a.lineNumber)-o.firstPositionDeltaTop;return{scrollLeft:o.scrollLeft,scrollTop:T}}_reduceRestoreStateCompatibility(o){return{scrollLeft:o.scrollLeft,scrollTop:o.scrollTopWithoutViewZones}}getTabSize(){return this.model.getOptions().tabSize}getTextModelOptions(){return this.model.getOptions()}getLineCount(){return this._lines.getViewLineCount()}setViewport(o,n,a){this._viewportStartLine=o;let T=this.coordinatesConverter.convertViewPositionToModelPosition(new U.a(o,this.getLineMinColumn(o)));this._viewportStartLineTrackedRange=this.model._setTrackedRange(this._viewportStartLineTrackedRange,new se.a(T.lineNumber,T.column,T.lineNumber,T.column),1);const N=this.viewLayout.getVerticalOffsetForLineNumber(o),Y=this.viewLayout.getCurrentScrollTop();this._viewportStartLineDelta=Y-N}getActiveIndentGuide(o,n,a){return this._lines.getActiveIndentGuide(o,n,a)}getLinesIndentGuides(o,n){return this._lines.getViewLinesIndentGuides(o,n)}getBracketGuidesInRangeByLine(o,n,a,T){return this._lines.getViewLinesBracketGuides(o,n,a,T)}getLineContent(o){return this._lines.getViewLineContent(o)}getLineLength(o){return this._lines.getViewLineLength(o)}getLineMinColumn(o){return this._lines.getViewLineMinColumn(o)}getLineMaxColumn(o){return this._lines.getViewLineMaxColumn(o)}getLineFirstNonWhitespaceColumn(o){const n=ut.u(this.getLineContent(o));return n===-1?0:n+1}getLineLastNonWhitespaceColumn(o){const n=ut.I(this.getLineContent(o));return n===-1?0:n+2}getDecorationsInViewport(o){return this._decorations.getDecorationsViewportData(o).decorations}getInjectedTextAt(o){return this._lines.getInjectedTextAt(o)}getViewLineRenderingData(o,n){let a=this.model.mightContainRTL(),T=this.model.mightContainNonBasicASCII(),N=this.getTabSize(),Y=this._lines.getViewLineData(n),be=this._decorations.getDecorationsViewportData(o).inlineDecorations,xe=be[n-o.startLineNumber];return Y.inlineDecorations&&(xe=[...xe,...Y.inlineDecorations.map(Ke=>Ke.toInlineDecoration(n))]),new F.g(Y.minColumn,Y.maxColumn,Y.content,Y.continuesWithWrappedLine,a,T,Y.tokens,xe,N,Y.startVisibleColumn)}getViewLineData(o){return this._lines.getViewLineData(o)}getMinimapLinesRenderingData(o,n,a){let T=this._lines.getViewLinesData(o,n,a);return new F.c(this.getTabSize(),T)}getAllOverviewRulerDecorations(o){const n=this.model.getOverviewRulerDecorations(this._editorId,Object(Xe.n)(this._configuration.options)),a=new Ps;for(const T of n){const N=T.options,Y=N.overviewRuler;if(!Y)continue;const be=Y.position;if(be===0)continue;const xe=Y.getColor(o),Ke=this.coordinatesConverter.getViewLineNumberOfModelPosition(T.range.startLineNumber,T.range.startColumn),Ze=this.coordinatesConverter.getViewLineNumberOfModelPosition(T.range.endLineNumber,T.range.endColumn);a.accept(xe,N.zIndex,Ke,Ze,be)}return a.asArray}invalidateOverviewRulerColorCache(){const o=this.model.getOverviewRulerDecorations();for(const n of o){const a=n.options.overviewRuler;a&&a.invalidateCachedColor()}}invalidateMinimapColorCache(){const o=this.model.getAllDecorations();for(const n of o){const a=n.options.minimap;a&&a.invalidateCachedColor()}}getValueInRange(o,n){const a=this.coordinatesConverter.convertViewRangeToModelRange(o);return this.model.getValueInRange(a,n)}getModelLineMaxColumn(o){return this.model.getLineMaxColumn(o)}validateModelPosition(o){return this.model.validatePosition(o)}validateModelRange(o){return this.model.validateRange(o)}deduceModelPositionRelativeToViewPosition(o,n,a){const T=this.coordinatesConverter.convertViewPositionToModelPosition(o);this.model.getEOL().length===2&&(n<0?n-=a:n+=a);const N=this.model.getOffsetAt(T),Y=N+n;return this.model.getPositionAt(Y)}getEOL(){return this.model.getEOL()}getPlainTextToCopy(o,n,a){const T=a?`\r
|
|
|
`:this.model.getEOL();o=o.slice(0),o.sort(se.a.compareRangesUsingStarts);let N=!1,Y=!1;for(const xe of o)xe.isEmpty()?N=!0:Y=!0;if(!Y){if(!n)return"";const xe=o.map(Ze=>Ze.startLineNumber);let Ke="";for(let Ze=0;Ze<xe.length;Ze++){if(Ze>0&&xe[Ze-1]===xe[Ze])continue;Ke+=this.model.getLineContent(xe[Ze])+T}return Ke}if(N&&n){let xe=[],Ke=0;for(const Ze of o){const nt=Ze.startLineNumber;Ze.isEmpty()?nt!==Ke&&xe.push(this.model.getLineContent(nt)):xe.push(this.model.getValueInRange(Ze,a?2:0)),Ke=nt}return xe.length===1?xe[0]:xe}let be=[];for(const xe of o)xe.isEmpty()||be.push(this.model.getValueInRange(xe,a?2:0));return be.length===1?be[0]:be}getRichTextToCopy(o,n){const a=this.model.getLanguageId();if(a===js.b)return null;if(o.length!==1)return null;let T=o[0];if(T.isEmpty()){if(!n)return null;const Ze=T.startLineNumber;T=new se.a(Ze,this.model.getLineMinColumn(Ze),Ze,this.model.getLineMaxColumn(Ze))}const N=this._configuration.options.get(43),Y=this._getColorMap(),be=/[:;\\\/<>]/.test(N.fontFamily),xe=be||N.fontFamily===Xe.c.fontFamily;let Ke;if(xe)Ke=Xe.c.fontFamily;else{Ke=N.fontFamily,Ke=Ke.replace(/"/g,"'");const Ze=/[,']/.test(Ke);if(!Ze){const nt=/[+ ]/.test(Ke);nt&&(Ke=`'${Ke}'`)}Ke=`${Ke}, ${Xe.c.fontFamily}`}return{mode:a,html:`<div style="color: ${Y[1]};background-color: ${Y[2]};font-family: ${Ke};font-weight: ${N.fontWeight};font-size: ${N.fontSize}px;line-height: ${N.lineHeight}px;white-space: pre;">`+this._getHTMLToCopy(T,Y)+"</div>"}}_getHTMLToCopy(o,n){const a=o.startLineNumber,T=o.startColumn,N=o.endLineNumber,Y=o.endColumn,be=this.getTabSize();let xe="";for(let Ke=a;Ke<=N;Ke++){const Ze=this.model.getLineTokens(Ke),nt=Ze.getLineContent(),Ot=Ke===a?T-1:0,ft=Ke===N?Y-1:nt.length;nt===""?xe+="<br>":xe+=Object(Ya.a)(nt,Ze.inflate(),n,Ot,ft,be,c.i)}return xe}_getColorMap(){let o=Kt.E.getColorMap(),n=["#000000"];if(o)for(let a=1,T=o.length;a<T;a++)n[a]=Wi.a.Format.CSS.formatHex(o[a]);return n}pushStackElement(){this.model.pushStackElement()}getPrimaryCursorState(){return this._cursor.getPrimaryCursorState()}getLastAddedCursorIndex(){return this._cursor.getLastAddedCursorIndex()}getCursorStates(){return this._cursor.getCursorStates()}setCursorStates(o,n,a){this._withViewEventsCollector(T=>this._cursor.setStates(T,o,n,a))}getCursorColumnSelectData(){return this._cursor.getCursorColumnSelectData()}getCursorAutoClosedCharacters(){return this._cursor.getAutoClosedCharacters()}setCursorColumnSelectData(o){this._cursor.setCursorColumnSelectData(o)}getPrevEditOperationType(){return this._cursor.getPrevEditOperationType()}setPrevEditOperationType(o){this._cursor.setPrevEditOperationType(o)}getSelection(){return this._cursor.getSelection()}getSelections(){return this._cursor.getSelections()}getPosition(){return this._cursor.getPrimaryCursorState().modelState.position}setSelections(o,n,a=0){this._withViewEventsCollector(T=>this._cursor.setSelections(T,o,n,a))}saveCursorState(){return this._cursor.saveState()}restoreCursorState(o){this._withViewEventsCollector(n=>this._cursor.restoreState(n,o))}_executeCursorEdit(o){if(this._cursor.context.cursorConfig.readOnly){this._eventDispatcher.emitOutgoingEvent(new Kr);return}this._withViewEventsCollector(o)}executeEdits(o,n,a){this._executeCursorEdit(T=>this._cursor.executeEdits(T,o,n,a))}startComposition(){this._cursor.setIsDoingComposition(!0),this._executeCursorEdit(o=>this._cursor.startComposition(o))}endComposition(o){this._cursor.setIsDoingComposition(!1),this._executeCursorEdit(n=>this._cursor.endComposition(n,o))}type(o,n){this._executeCursorEdit(a=>this._cursor.type(a,o,n))}compositionType(o,n,a,T,N){this._executeCursorEdit(Y=>this._cursor.compositionType(Y,o,n,a,T,N))}paste(o,n,a,T){this._executeCursorEdit(N=>this._cursor.paste(N,o,n,a,T))}cut(o){this._executeCursorEdit(n=>this._cursor.cut(n,o))}executeCommand(o,n){this._executeCursorEdit(a=>this._cursor.executeCommand(a,o,n))}executeCommands(o,n){this._executeCursorEdit(a=>this._cursor.executeCommands(a,o,n))}revealPrimaryCursor(o,n){this._withViewEventsCollector(a=>this._cursor.revealPrimary(a,o,n,0))}revealTopMostCursor(o){const n=this._cursor.getTopMostViewPosition(),a=new se.a(n.lineNumber,n.column,n.lineNumber,n.column);this._withViewEventsCollector(T=>T.emitViewEvent(new Mn(o,a,null,0,!0,0)))}revealBottomMostCursor(o){const n=this._cursor.getBottomMostViewPosition(),a=new se.a(n.lineNumber,n.column,n.lineNumber,n.column);this._withViewEventsCollector(T=>T.emitViewEvent(new Mn(o,a,null,0,!0,0)))}revealRange(o,n,a,T,N){this._withViewEventsCollector(Y=>Y.emitViewEvent(new Mn(o,a,null,T,n,N)))}getVerticalOffsetForLineNumber(o){return this.viewLayout.getVerticalOffsetForLineNumber(o)}getScrollTop(){return this.viewLayout.getCurrentScrollTop()}setScrollTop(o,n){this.viewLayout.setScrollPosition({scrollTop:o},n)}setScrollPosition(o,n){this.viewLayout.setScrollPosition(o,n)}deltaScrollNow(o,n){this.viewLayout.deltaScrollNow(o,n)}changeWhitespace(o){const n=this.viewLayout.changeWhitespace(o);n&&(this._eventDispatcher.emitSingleViewEvent(new pr),this._eventDispatcher.emitOutgoingEvent(new Cs))}setMaxLineWidth(o){this.viewLayout.setMaxLineWidth(o)}_withViewEventsCollector(o){try{const n=this._eventDispatcher.beginEmitViewEvents();o(n)}finally{this._eventDispatcher.endEmitViewEvents()}}normalizePosition(o,n){return this._lines.normalizePosition(o,n)}getLineIndentColumn(o){return this._lines.getLineIndentColumn(o)}}class Ps{constructor(){this._asMap=Object.create(null),this.asArray=[]}accept(o,n,a,T,N){const Y=this._asMap[o];if(Y){const be=Y.data,xe=be[be.length-3],Ke=be[be.length-1];if(xe===N&&Ke+1>=a){T>Ke&&(be[be.length-1]=T);return}be.push(N,a,T)}else{const be=new F.d(o,n,[N,a,T]);this._asMap[o]=be,this.asArray.push(be)}}}var zn=t("nnTU"),Fs=t("T8No"),qr=t("Cg/j"),Bs=t("8HsV"),Ws=t("sM1p"),ea=t("R3nR"),ta=t("MXAL");class oa extends ta.a{constructor(o,n){super(0);for(let a=0;a<o.length;a++)this.set(o.charCodeAt(a),1);for(let a=0;a<n.length;a++)this.set(n.charCodeAt(a),2)}get(o){return o>=0&&o<256?this._asciiMap[o]:o>=12352&&o<=12543||o>=13312&&o<=19903||o>=19968&&o<=40959?3:this._map.get(o)||this._defaultValue}}let Fn=[],Ls=[];class rr{constructor(o,n){this.classifier=new oa(o,n)}static create(o){return new rr(o.get(118),o.get(117))}createLineBreaksComputer(o,n,a,T){n=n|0,a=+a;const N=[],Y=[],be=[];return{addRequest:(xe,Ke,Ze)=>{N.push(xe),Y.push(Ke),be.push(Ze)},finalize:()=>{const xe=o.typicalFullwidthCharacterWidth/o.typicalHalfwidthCharacterWidth;let Ke=[];for(let Ze=0,nt=N.length;Ze<nt;Ze++){const Ot=Y[Ze],ft=be[Ze];ft&&!ft.injectionOptions&&!Ot?Ke[Ze]=ia(this.classifier,ft,N[Ze],n,a,xe,T):Ke[Ze]=na(this.classifier,N[Ze],Ot,n,a,xe,T)}return Fn.length=0,Ls.length=0,Ke}}}}function ia(o,n,a,T,N,Y,be){if(N===-1)return null;const xe=a.length;if(xe<=1)return null;const Ke=n.breakOffsets,Ze=n.breakOffsetsVisibleColumn,nt=lr(a,T,N,Y,be),Ot=N-nt;let ft=Fn,kt=Ls,Gt=0,eo=0,co=0,go=N;const yo=Ke.length;let jo=0;if(jo>=0){let Po=Math.abs(Ze[jo]-go);for(;jo+1<yo;){const ti=Math.abs(Ze[jo+1]-go);if(ti>=Po)break;Po=ti,jo++}}for(;jo<yo;){let Po=jo<0?0:Ke[jo],ti=jo<0?0:Ze[jo];eo>Po&&(Po=eo,ti=co);let oi=0,$o=0,Yo=0,Ei=0;if(ti<=go){let bi=ti,ji=Po===0?0:a.charCodeAt(Po-1),ln=Po===0?0:o.get(ji),Xi=!0;for(let dn=Po;dn<xe;dn++){const Cn=dn,un=a.charCodeAt(dn);let hn,Nn;if(ut.E(un)?(dn++,hn=0,Nn=2):(hn=o.get(un),Nn=ls(un,bi,T,Y)),Cn>eo&&Kn(ji,ln,un,hn)&&(oi=Cn,$o=bi),bi+=Nn,bi>go){Cn>eo?(Yo=Cn,Ei=bi-Nn):(Yo=dn+1,Ei=bi),bi-$o>Ot&&(oi=0),Xi=!1;break}ji=un,ln=hn}if(Xi){Gt>0&&(ft[Gt]=Ke[Ke.length-1],kt[Gt]=Ze[Ke.length-1],Gt++);break}}if(oi===0){let bi=ti,ji=a.charCodeAt(Po),ln=o.get(ji),Xi=!1;for(let dn=Po-1;dn>=eo;dn--){const Cn=dn+1,un=a.charCodeAt(dn);if(un===9){Xi=!0;break}let hn,Nn;if(ut.F(un)?(dn--,hn=0,Nn=2):(hn=o.get(un),Nn=ut.D(un)?Y:1),bi<=go){if(Yo===0&&(Yo=Cn,Ei=bi),bi<=go-Ot)break;if(Kn(un,hn,ji,ln)){oi=Cn,$o=bi;break}}bi-=Nn,ji=un,ln=hn}if(oi!==0){const dn=Ot-(Ei-$o);if(dn<=T){const Cn=a.charCodeAt(Yo);let un;ut.E(Cn)?un=2:un=ls(Cn,Ei,T,Y),dn-un<0&&(oi=0)}}if(Xi){jo--;continue}}if(oi===0&&(oi=Yo,$o=Ei),oi<=eo){const bi=a.charCodeAt(eo);ut.E(bi)?(oi=eo+2,$o=co+2):(oi=eo+1,$o=co+ls(bi,co,T,Y))}for(eo=oi,ft[Gt]=oi,co=$o,kt[Gt]=$o,Gt++,go=$o+Ot;jo<0||jo<yo&&Ze[jo]<$o;)jo++;let Ci=Math.abs(Ze[jo]-go);for(;jo+1<yo;){const bi=Math.abs(Ze[jo+1]-go);if(bi>=Ci)break;Ci=bi,jo++}}return Gt===0?null:(ft.length=Gt,kt.length=Gt,Fn=n.breakOffsets,Ls=n.breakOffsetsVisibleColumn,n.breakOffsets=ft,n.breakOffsetsVisibleColumn=kt,n.wrappedTextIndentLength=nt,n)}function na(o,n,a,T,N,Y,be){const xe=Co.b.applyInjectedText(n,a);let Ke,Ze;if(a&&a.length>0?(Ke=a.map($o=>$o.options),Ze=a.map($o=>$o.column-1)):(Ke=null,Ze=null),N===-1)return Ke?new F.b([xe.length],[],0,Ze,Ke):null;const nt=xe.length;if(nt<=1)return Ke?new F.b([xe.length],[],0,Ze,Ke):null;const Ot=lr(xe,T,N,Y,be),ft=N-Ot;let kt=[],Gt=[],eo=0,co=0,go=0,yo=N,jo=xe.charCodeAt(0),Po=o.get(jo),ti=ls(jo,0,T,Y),oi=1;ut.E(jo)&&(ti+=1,jo=xe.charCodeAt(1),Po=o.get(jo),oi++);for(let $o=oi;$o<nt;$o++){const Yo=$o,Ei=xe.charCodeAt($o);let Ci,bi;ut.E(Ei)?($o++,Ci=0,bi=2):(Ci=o.get(Ei),bi=ls(Ei,ti,T,Y)),Kn(jo,Po,Ei,Ci)&&(co=Yo,go=ti),ti+=bi,ti>yo&&((co===0||ti-go>ft)&&(co=Yo,go=ti-bi),kt[eo]=co,Gt[eo]=go,eo++,yo=go+ft,co=0),jo=Ei,Po=Ci}return eo===0&&(!a||a.length===0)?null:(kt[eo]=nt,Gt[eo]=ti,new F.b(kt,Gt,Ot,Ze,Ke))}function ls(o,n,a,T){return o===9?a-n%a:ut.D(o)||o<32?T:1}function ar(o,n){return n-o%n}function Kn(o,n,a,T){return a!==32&&(n===2||n===3&&T!==2||T===1||T===3&&n!==1)}function lr(o,n,a,T,N){let Y=0;if(N!==0){const be=ut.u(o);if(be!==-1){for(let Ke=0;Ke<be;Ke++){const Ze=o.charCodeAt(Ke)===9?ar(Y,n):1;Y+=Ze}const xe=N===3?2:N===2?1:0;for(let Ke=0;Ke<xe;Ke++){const Ze=ar(Y,n);Y+=Ze}Y+T>a&&(Y=0)}}return Y}var Us;const Qn=(Us=window.trustedTypes)===null||Us===void 0?void 0:Us.createPolicy("domLineBreaksComputer",{createHTML:o=>o});class Gn{static create(){return new Gn}constructor(){}createLineBreaksComputer(o,n,a,T){n=n|0,a=+a;let N=[],Y=[];return{addRequest:(be,xe,Ke)=>{N.push(be),Y.push(xe)},finalize:()=>Sn(N,o,n,a,T,Y)}}}function Sn(o,n,a,T,N,Y){var be;function xe(Yo){const Ei=Y[Yo];if(Ei){const Ci=Co.b.applyInjectedText(o[Yo],Ei),bi=Ei.map(ln=>ln.options),ji=Ei.map(ln=>ln.column-1);return new F.b([Ci.length],[],0,ji,bi)}else return null}if(T===-1){const Yo=[];for(let Ei=0,Ci=o.length;Ei<Ci;Ei++)Yo[Ei]=xe(Ei);return Yo}const Ke=Math.round(T*n.typicalHalfwidthCharacterWidth),Ze=N===3?2:N===2?1:0,nt=Math.round(a*Ze),Ot=Math.ceil(n.spaceWidth*nt),ft=document.createElement("div");L.a.applyFontInfoSlow(ft,n);const kt=Object(qt.a)(1e4),Gt=[],eo=[],co=[],go=[],yo=[];for(let Yo=0;Yo<o.length;Yo++){const Ei=Co.b.applyInjectedText(o[Yo],Y[Yo]);let Ci=0,bi=0,ji=Ke;if(N!==0)if(Ci=ut.u(Ei),Ci===-1)Ci=0;else{for(let Cn=0;Cn<Ci;Cn++){const un=Ei.charCodeAt(Cn)===9?a-bi%a:1;bi+=un}const dn=Math.ceil(n.spaceWidth*bi);dn+n.typicalFullwidthCharacterWidth>Ke?(Ci=0,bi=0):ji=Ke-dn}const ln=Ei.substr(Ci),Xi=Jn(ln,bi,a,ji,kt,Ot);Gt[Yo]=Ci,eo[Yo]=bi,co[Yo]=ln,go[Yo]=Xi[0],yo[Yo]=Xi[1]}const jo=kt.build(),Po=(be=Qn==null?void 0:Qn.createHTML(jo))!==null&&be!==void 0?be:jo;ft.innerHTML=Po,ft.style.position="absolute",ft.style.top="10000",ft.style.wordWrap="break-word",document.body.appendChild(ft);let ti=document.createRange();const oi=Array.prototype.slice.call(ft.children,0);let $o=[];for(let Yo=0;Yo<o.length;Yo++){const Ei=oi[Yo],Ci=sa(ti,Ei,co[Yo],go[Yo]);if(Ci===null){$o[Yo]=xe(Yo);continue}const bi=Gt[Yo],ji=eo[Yo]+nt,ln=yo[Yo],Xi=[];for(let hn=0,Nn=Ci.length;hn<Nn;hn++)Xi[hn]=ln[Ci[hn]];if(bi!==0)for(let hn=0,Nn=Ci.length;hn<Nn;hn++)Ci[hn]+=bi;let dn,Cn;const un=Y[Yo];un?(dn=un.map(hn=>hn.options),Cn=un.map(hn=>hn.column-1)):(dn=null,Cn=null),$o[Yo]=new F.b(Ci,Xi,ji,Cn,dn)}return document.body.removeChild(ft),$o}function Jn(o,n,a,T,N,Y){if(Y!==0){let ft=String(Y);N.appendASCIIString('<div style="text-indent: -'),N.appendASCIIString(ft),N.appendASCIIString("px; padding-left: "),N.appendASCIIString(ft),N.appendASCIIString("px; box-sizing: border-box; width:")}else N.appendASCIIString('<div style="width:');N.appendASCIIString(String(T)),N.appendASCIIString('px;">');const be=o.length;let xe=n,Ke=0,Ze=[],nt=[],Ot=0<be?o.charCodeAt(0):0;N.appendASCIIString("<span>");for(let ft=0;ft<be;ft++){ft!==0&&ft%16384===0&&N.appendASCIIString("</span><span>"),Ze[ft]=Ke,nt[ft]=xe;const kt=Ot;Ot=ft+1<be?o.charCodeAt(ft+1):0;let Gt=1,eo=1;switch(kt){case 9:Gt=a-xe%a,eo=Gt;for(let co=1;co<=Gt;co++)co<Gt?N.write1(160):N.appendASCII(32);break;case 32:Ot===32?N.write1(160):N.appendASCII(32);break;case 60:N.appendASCIIString("<");break;case 62:N.appendASCIIString(">");break;case 38:N.appendASCIIString("&");break;case 0:N.appendASCIIString("�");break;case 65279:case 8232:case 8233:case 133:N.write1(65533);break;default:ut.D(kt)&&eo++,kt<32?N.write1(9216+kt):N.write1(kt)}Ke+=Gt,xe+=eo}return N.appendASCIIString("</span>"),Ze[o.length]=Ke,nt[o.length]=xe,N.appendASCIIString("</div>"),[Ze,nt]}function sa(o,n,a,T){if(a.length<=1)return null;const N=Array.prototype.slice.call(n.children,0),Y=[];try{Hs(o,N,T,0,null,a.length-1,null,Y)}catch(be){return console.log(be),null}return Y.length===0?null:(Y.push(a.length),Y)}function Hs(o,n,a,T,N,Y,be,xe){if(T===Y)return;if(N=N||dr(o,n,a[T],a[T+1]),be=be||dr(o,n,a[Y],a[Y+1]),Math.abs(N[0].top-be[0].top)<=.1)return;if(T+1===Y){xe.push(Y);return}const Ke=T+(Y-T)/2|0,Ze=dr(o,n,a[Ke],a[Ke+1]);Hs(o,n,a,T,N,Ke,Ze,xe),Hs(o,n,a,Ke,Ze,Y,be,xe)}function dr(o,n,a,T){return o.setStart(n[a/16384|0].firstChild,a%16384),o.setEnd(n[T/16384|0].firstChild,T%16384),o.getClientRects()}var ra=t("1I1M"),ds=function(o,n,a,T){var N=arguments.length,Y=N<3?n:T===null?T=Object.getOwnPropertyDescriptor(n,a):T,be;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")Y=Reflect.decorate(o,n,a,T);else for(var xe=o.length-1;xe>=0;xe--)(be=o[xe])&&(Y=(N<3?be(Y):N>3?be(n,a,Y):be(n,a))||Y);return N>3&&Y&&Object.defineProperty(n,a,Y),Y},Rn=function(o,n){return function(a,T){n(a,T,o)}};let Sr=0;class _s{constructor(o,n,a,T,N){this.model=o,this.viewModel=n,this.view=a,this.hasRealView=T,this.listenersToRemove=N}dispose(){Object(d.f)(this.listenersToRemove),this.model.onBeforeDetached(),this.hasRealView&&this.view.dispose(),this.viewModel.dispose()}}let Vs=class o extends d.a{constructor(n,a,T,N,Y,be,xe,Ke,Ze,nt){super();this._onDidDispose=this._register(new m.b),this.onDidDispose=this._onDidDispose.event,this._onDidChangeModelContent=this._register(new m.b),this.onDidChangeModelContent=this._onDidChangeModelContent.event,this._onDidChangeModelLanguage=this._register(new m.b),this.onDidChangeModelLanguage=this._onDidChangeModelLanguage.event,this._onDidChangeModelLanguageConfiguration=this._register(new m.b),this.onDidChangeModelLanguageConfiguration=this._onDidChangeModelLanguageConfiguration.event,this._onDidChangeModelOptions=this._register(new m.b),this.onDidChangeModelOptions=this._onDidChangeModelOptions.event,this._onDidChangeModelDecorations=this._register(new m.b),this.onDidChangeModelDecorations=this._onDidChangeModelDecorations.event,this._onDidChangeConfiguration=this._register(new m.b),this.onDidChangeConfiguration=this._onDidChangeConfiguration.event,this._onDidChangeModel=this._register(new m.b),this.onDidChangeModel=this._onDidChangeModel.event,this._onDidChangeCursorPosition=this._register(new m.b),this.onDidChangeCursorPosition=this._onDidChangeCursorPosition.event,this._onDidChangeCursorSelection=this._register(new m.b),this.onDidChangeCursorSelection=this._onDidChangeCursorSelection.event,this._onDidAttemptReadOnlyEdit=this._register(new m.b),this.onDidAttemptReadOnlyEdit=this._onDidAttemptReadOnlyEdit.event,this._onDidLayoutChange=this._register(new m.b),this.onDidLayoutChange=this._onDidLayoutChange.event,this._editorTextFocus=this._register(new wr),this.onDidFocusEditorText=this._editorTextFocus.onDidChangeToTrue,this.onDidBlurEditorText=this._editorTextFocus.onDidChangeToFalse,this._editorWidgetFocus=this._register(new wr),this.onDidFocusEditorWidget=this._editorWidgetFocus.onDidChangeToTrue,this.onDidBlurEditorWidget=this._editorWidgetFocus.onDidChangeToFalse,this._onWillType=this._register(new m.b),this.onWillType=this._onWillType.event,this._onDidType=this._register(new m.b),this.onDidType=this._onDidType.event,this._onDidCompositionStart=this._register(new m.b),this.onDidCompositionStart=this._onDidCompositionStart.event,this._onDidCompositionEnd=this._register(new m.b),this.onDidCompositionEnd=this._onDidCompositionEnd.event,this._onDidPaste=this._register(new m.b),this.onDidPaste=this._onDidPaste.event,this._onMouseUp=this._register(new m.b),this.onMouseUp=this._onMouseUp.event,this._onMouseDown=this._register(new m.b),this.onMouseDown=this._onMouseDown.event,this._onMouseDrag=this._register(new m.b),this.onMouseDrag=this._onMouseDrag.event,this._onMouseDrop=this._register(new m.b),this.onMouseDrop=this._onMouseDrop.event,this._onMouseDropCanceled=this._register(new m.b),this.onMouseDropCanceled=this._onMouseDropCanceled.event,this._onContextMenu=this._register(new m.b),this.onContextMenu=this._onContextMenu.event,this._onMouseMove=this._register(new m.b),this.onMouseMove=this._onMouseMove.event,this._onMouseLeave=this._register(new m.b),this.onMouseLeave=this._onMouseLeave.event,this._onMouseWheel=this._register(new m.b),this.onMouseWheel=this._onMouseWheel.event,this._onKeyUp=this._register(new m.b),this.onKeyUp=this._onKeyUp.event,this._onKeyDown=this._register(new m.b),this.onKeyDown=this._onKeyDown.event,this._onDidContentSizeChange=this._register(new m.b),this.onDidContentSizeChange=this._onDidContentSizeChange.event,this._onDidScrollChange=this._register(new m.b),this.onDidScrollChange=this._onDidScrollChange.event,this._onDidChangeViewZones=this._register(new m.b),this.onDidChangeViewZones=this._onDidChangeViewZones.event,this._onDidChangeHiddenAreas=this._register(new m.b),this.onDidChangeHiddenAreas=this._onDidChangeHiddenAreas.event;const Ot=Object.assign({},a);this._domElement=n,this._overflowWidgetsDomNode=Ot.overflowWidgetsDomNode,delete Ot.overflowWidgetsDomNode,this._id=++Sr,this._decorationTypeKeysToIds={},this._decorationTypeSubtypes={},this.isSimpleWidget=T.isSimpleWidget||!1,this._telemetryData=T.telemetryData,this._configuration=this._register(this._createConfiguration(Ot,nt)),this._register(this._configuration.onDidChange(kt=>{this._onDidChangeConfiguration.fire(kt);const Gt=this._configuration.options;if(kt.hasChanged(129)){const eo=Gt.get(129);this._onDidLayoutChange.fire(eo)}})),this._contextKeyService=this._register(xe.createScoped(this._domElement)),this._notificationService=Ze,this._codeEditorService=Y,this._commandService=be,this._themeService=Ke,this._register(new aa(this,this._contextKeyService)),this._register(new Ds(this,this._contextKeyService)),this._instantiationService=N.createChild(new Bs.a([Fs.b,this._contextKeyService])),this._modelData=null,this._contributions={},this._actions={},this._focusTracker=new Tn(n),this._register(this._focusTracker.onChange(()=>{this._editorWidgetFocus.setValue(this._focusTracker.hasFocus())})),this._contentWidgets={},this._overlayWidgets={};let ft;Array.isArray(T.contributions)?ft=T.contributions:ft=B.d.getEditorContributions();for(const kt of ft){if(this._contributions[kt.id]){Object(C.f)(new Error(`Cannot have two contributions with the same id ${kt.id}`));continue}try{const Gt=this._instantiationService.createInstance(kt.ctor,this);this._contributions[kt.id]=Gt}catch(Gt){Object(C.f)(Gt)}}B.d.getEditorActions().forEach(kt=>{if(this._actions[kt.id]){Object(C.f)(new Error(`Cannot have two actions with the same id ${kt.id}`));return}const Gt=new Gr.a(kt.id,kt.label,kt.alias,Object($i.p)(kt.precondition),()=>this._instantiationService.invokeFunction(eo=>Promise.resolve(kt.runEditorCommand(eo,this,null))),this._contextKeyService);this._actions[Gt.id]=Gt}),this._codeEditorService.addCodeEditor(this)}_createConfiguration(n,a){return new L.a(this.isSimpleWidget,n,this._domElement,a)}getId(){return this.getEditorType()+":"+this._id}getEditorType(){return Ns.a.ICodeEditor}dispose(){this._codeEditorService.removeCodeEditor(this),this._focusTracker.dispose();const n=Object.keys(this._contributions);for(let a=0,T=n.length;a<T;a++){const N=n[a];this._contributions[N].dispose()}this._contributions={},this._actions={},this._contentWidgets={},this._overlayWidgets={},this._removeDecorationTypes(),this._postDetachModelCleanup(this._detachModel()),this._onDidDispose.fire(),super.dispose()}invokeWithinContext(n){return this._instantiationService.invokeFunction(n)}updateOptions(n){this._configuration.updateOptions(n)}getOptions(){return this._configuration.options}getOption(n){return this._configuration.options.get(n)}getRawOptions(){return this._configuration.getRawOptions()}getOverflowWidgetsDomNode(){return this._overflowWidgetsDomNode}getConfiguredWordAtPosition(n){return this._modelData?ra.a.getWordAtPosition(this._modelData.model,this._configuration.options.get(115),n):null}getValue(n=null){if(!this._modelData)return"";const a=!!(n&&n.preserveBOM);let T=0;return n&&n.lineEnding&&n.lineEnding===`
|
|
|
`?T=1:n&&n.lineEnding&&n.lineEnding===`\r
|
|
|
`&&(T=2),this._modelData.model.getValue(T,a)}setValue(n){if(!this._modelData)return;this._modelData.model.setValue(n)}getModel(){return this._modelData?this._modelData.model:null}setModel(n=null){const a=n;if(this._modelData===null&&a===null)return;if(this._modelData&&this._modelData.model===a)return;const T=this.hasTextFocus(),N=this._detachModel();this._attachModel(a),T&&this.hasModel()&&this.focus();const Y={oldModelUrl:N?N.uri:null,newModelUrl:a?a.uri:null};this._removeDecorationTypes(),this._onDidChangeModel.fire(Y),this._postDetachModelCleanup(N)}_removeDecorationTypes(){if(this._decorationTypeKeysToIds={},this._decorationTypeSubtypes){for(let n in this._decorationTypeSubtypes){const a=this._decorationTypeSubtypes[n];for(let T in a)this._removeDecorationType(n+"-"+T)}this._decorationTypeSubtypes={}}}getVisibleRanges(){return this._modelData?this._modelData.viewModel.getVisibleRanges():[]}getVisibleRangesPlusViewportAboveBelow(){return this._modelData?this._modelData.viewModel.getVisibleRangesPlusViewportAboveBelow():[]}getWhitespaces(){return this._modelData?this._modelData.viewModel.viewLayout.getWhitespaces():[]}static _getVerticalOffsetForPosition(n,a,T){const N=n.model.validatePosition({lineNumber:a,column:T}),Y=n.viewModel.coordinatesConverter.convertModelPositionToViewPosition(N);return n.viewModel.viewLayout.getVerticalOffsetForLineNumber(Y.lineNumber)}getTopForLineNumber(n){return this._modelData?o._getVerticalOffsetForPosition(this._modelData,n,1):-1}getTopForPosition(n,a){return this._modelData?o._getVerticalOffsetForPosition(this._modelData,n,a):-1}setHiddenAreas(n){this._modelData&&this._modelData.viewModel.setHiddenAreas(n.map(a=>se.a.lift(a)))}getVisibleColumnFromPosition(n){if(!this._modelData)return n.column;const a=this._modelData.model.validatePosition(n),T=this._modelData.model.getOptions().tabSize;return je.a.visibleColumnFromColumn(this._modelData.model.getLineContent(a.lineNumber),a.column,T)+1}getPosition(){return this._modelData?this._modelData.viewModel.getPosition():null}setPosition(n){if(!this._modelData)return;if(!U.a.isIPosition(n))throw new Error("Invalid arguments");this._modelData.viewModel.setSelections("api",[{selectionStartLineNumber:n.lineNumber,selectionStartColumn:n.column,positionLineNumber:n.lineNumber,positionColumn:n.column}])}_sendRevealRange(n,a,T,N){if(!this._modelData)return;if(!se.a.isIRange(n))throw new Error("Invalid arguments");const Y=this._modelData.model.validateRange(n),be=this._modelData.viewModel.coordinatesConverter.convertModelRangeToViewRange(Y);this._modelData.viewModel.revealRange("api",T,be,a,N)}revealLine(n,a=0){this._revealLine(n,0,a)}revealLineInCenter(n,a=0){this._revealLine(n,1,a)}revealLineInCenterIfOutsideViewport(n,a=0){this._revealLine(n,2,a)}revealLineNearTop(n,a=0){this._revealLine(n,5,a)}_revealLine(n,a,T){if(typeof n!="number")throw new Error("Invalid arguments");this._sendRevealRange(new se.a(n,1,n,1),a,!1,T)}revealPosition(n,a=0){this._revealPosition(n,0,!0,a)}revealPositionInCenter(n,a=0){this._revealPosition(n,1,!0,a)}revealPositionInCenterIfOutsideViewport(n,a=0){this._revealPosition(n,2,!0,a)}revealPositionNearTop(n,a=0){this._revealPosition(n,5,!0,a)}_revealPosition(n,a,T,N){if(!U.a.isIPosition(n))throw new Error("Invalid arguments");this._sendRevealRange(new se.a(n.lineNumber,n.column,n.lineNumber,n.column),a,T,N)}getSelection(){return this._modelData?this._modelData.viewModel.getSelection():null}getSelections(){return this._modelData?this._modelData.viewModel.getSelections():null}setSelection(n){const a=b.a.isISelection(n),T=se.a.isIRange(n);if(!a&&!T)throw new Error("Invalid arguments");if(a)this._setSelectionImpl(n);else if(T){const N={selectionStartLineNumber:n.startLineNumber,selectionStartColumn:n.startColumn,positionLineNumber:n.endLineNumber,positionColumn:n.endColumn};this._setSelectionImpl(N)}}_setSelectionImpl(n){if(!this._modelData)return;const a=new b.a(n.selectionStartLineNumber,n.selectionStartColumn,n.positionLineNumber,n.positionColumn);this._modelData.viewModel.setSelections("api",[a])}revealLines(n,a,T=0){this._revealLines(n,a,0,T)}revealLinesInCenter(n,a,T=0){this._revealLines(n,a,1,T)}revealLinesInCenterIfOutsideViewport(n,a,T=0){this._revealLines(n,a,2,T)}revealLinesNearTop(n,a,T=0){this._revealLines(n,a,5,T)}_revealLines(n,a,T,N){if(typeof n!="number"||typeof a!="number")throw new Error("Invalid arguments");this._sendRevealRange(new se.a(n,1,a,1),T,!1,N)}revealRange(n,a=0,T=!1,N=!0){this._revealRange(n,T?1:0,N,a)}revealRangeInCenter(n,a=0){this._revealRange(n,1,!0,a)}revealRangeInCenterIfOutsideViewport(n,a=0){this._revealRange(n,2,!0,a)}revealRangeNearTop(n,a=0){this._revealRange(n,5,!0,a)}revealRangeNearTopIfOutsideViewport(n,a=0){this._revealRange(n,6,!0,a)}revealRangeAtTop(n,a=0){this._revealRange(n,3,!0,a)}_revealRange(n,a,T,N){if(!se.a.isIRange(n))throw new Error("Invalid arguments");this._sendRevealRange(se.a.lift(n),a,T,N)}setSelections(n,a="api",T=0){if(!this._modelData)return;if(!n||n.length===0)throw new Error("Invalid arguments");for(let N=0,Y=n.length;N<Y;N++)if(!b.a.isISelection(n[N]))throw new Error("Invalid arguments");this._modelData.viewModel.setSelections(a,n,T)}getContentWidth(){return this._modelData?this._modelData.viewModel.viewLayout.getContentWidth():-1}getScrollWidth(){return this._modelData?this._modelData.viewModel.viewLayout.getScrollWidth():-1}getScrollLeft(){return this._modelData?this._modelData.viewModel.viewLayout.getCurrentScrollLeft():-1}getContentHeight(){return this._modelData?this._modelData.viewModel.viewLayout.getContentHeight():-1}getScrollHeight(){return this._modelData?this._modelData.viewModel.viewLayout.getScrollHeight():-1}getScrollTop(){return this._modelData?this._modelData.viewModel.viewLayout.getCurrentScrollTop():-1}setScrollLeft(n,a=1){if(!this._modelData)return;if(typeof n!="number")throw new Error("Invalid arguments");this._modelData.viewModel.setScrollPosition({scrollLeft:n},a)}setScrollTop(n,a=1){if(!this._modelData)return;if(typeof n!="number")throw new Error("Invalid arguments");this._modelData.viewModel.setScrollPosition({scrollTop:n},a)}setScrollPosition(n,a=1){if(!this._modelData)return;this._modelData.viewModel.setScrollPosition(n,a)}saveViewState(){if(!this._modelData)return null;const n={},a=Object.keys(this._contributions);for(const Y of a){const be=this._contributions[Y];typeof be.saveViewState=="function"&&(n[Y]=be.saveViewState())}const T=this._modelData.viewModel.saveCursorState(),N=this._modelData.viewModel.saveState();return{cursorState:T,viewState:N,contributionsState:n}}restoreViewState(n){if(!this._modelData||!this._modelData.hasRealView)return;const a=n;if(a&&a.cursorState&&a.viewState){const T=a.cursorState;Array.isArray(T)?this._modelData.viewModel.restoreCursorState(T):this._modelData.viewModel.restoreCursorState([T]);const N=a.contributionsState||{},Y=Object.keys(this._contributions);for(let xe=0,Ke=Y.length;xe<Ke;xe++){const Ze=Y[xe],nt=this._contributions[Ze];typeof nt.restoreViewState=="function"&&nt.restoreViewState(N[Ze])}const be=this._modelData.viewModel.reduceRestoreState(a.viewState);this._modelData.view.restoreState(be)}}getContribution(n){return this._contributions[n]||null}getActions(){const n=[],a=Object.keys(this._actions);for(let T=0,N=a.length;T<N;T++){const Y=a[T];n.push(this._actions[Y])}return n}getSupportedActions(){let n=this.getActions();return n=n.filter(a=>a.isSupported()),n}getAction(n){return this._actions[n]||null}trigger(n,a,T){T=T||{};switch(a){case"compositionStart":this._startComposition();return;case"compositionEnd":this._endComposition(n);return;case"type":{const Y=T;this._type(n,Y.text||"");return}case"replacePreviousChar":{const Y=T;this._compositionType(n,Y.text||"",Y.replaceCharCnt||0,0,0);return}case"compositionType":{const Y=T;this._compositionType(n,Y.text||"",Y.replacePrevCharCnt||0,Y.replaceNextCharCnt||0,Y.positionDelta||0);return}case"paste":{const Y=T;this._paste(n,Y.text||"",Y.pasteOnNewLine||!1,Y.multicursorText||null,Y.mode||null);return}case"cut":this._cut(n);return}const N=this.getAction(a);if(N){Promise.resolve(N.run()).then(void 0,C.f);return}if(!this._modelData)return;if(this._triggerEditorCommand(n,a,T))return;this._triggerCommand(a,T)}_triggerCommand(n,a){this._commandService.executeCommand(n,a)}_startComposition(){if(!this._modelData)return;this._modelData.viewModel.startComposition(),this._onDidCompositionStart.fire()}_endComposition(n){if(!this._modelData)return;this._modelData.viewModel.endComposition(n),this._onDidCompositionEnd.fire()}_type(n,a){if(!this._modelData||a.length===0)return;n==="keyboard"&&this._onWillType.fire(a),this._modelData.viewModel.type(a,n),n==="keyboard"&&this._onDidType.fire(a)}_compositionType(n,a,T,N,Y){if(!this._modelData)return;this._modelData.viewModel.compositionType(a,T,N,Y,n)}_paste(n,a,T,N,Y){if(!this._modelData||a.length===0)return;const be=this._modelData.viewModel.getSelection().getStartPosition();this._modelData.viewModel.paste(a,T,N,n);const xe=this._modelData.viewModel.getSelection().getStartPosition();n==="keyboard"&&this._onDidPaste.fire({range:new se.a(be.lineNumber,be.column,xe.lineNumber,xe.column),languageId:Y})}_cut(n){if(!this._modelData)return;this._modelData.viewModel.cut(n)}_triggerEditorCommand(n,a,T){const N=B.d.getEditorCommand(a);return N?(T=T||{},T.source=n,this._instantiationService.invokeFunction(Y=>{Promise.resolve(N.runEditorCommand(Y,this,T)).then(void 0,C.f)}),!0):!1}_getViewModel(){return this._modelData?this._modelData.viewModel:null}pushUndoStop(){return this._modelData?this._configuration.options.get(80)?!1:(this._modelData.model.pushStackElement(),!0):!1}popUndoStop(){return this._modelData?this._configuration.options.get(80)?!1:(this._modelData.model.popStackElement(),!0):!1}executeEdits(n,a,T){if(!this._modelData)return!1;if(this._configuration.options.get(80))return!1;let N;return T?Array.isArray(T)?N=()=>T:N=T:N=()=>null,this._modelData.viewModel.executeEdits(n,a,N),!0}executeCommand(n,a){if(!this._modelData)return;this._modelData.viewModel.executeCommand(a,n)}executeCommands(n,a){if(!this._modelData)return;this._modelData.viewModel.executeCommands(a,n)}changeDecorations(n){return this._modelData?this._modelData.model.changeDecorations(n,this._id):null}getLineDecorations(n){return this._modelData?this._modelData.model.getLineDecorations(n,this._id,Object(Xe.n)(this._configuration.options)):null}deltaDecorations(n,a){return this._modelData?n.length===0&&a.length===0?n:this._modelData.model.deltaDecorations(n,a,this._id):[]}removeDecorations(n){const a=this._decorationTypeKeysToIds[n];a&&this.deltaDecorations(a,[]),this._decorationTypeKeysToIds.hasOwnProperty(n)&&delete this._decorationTypeKeysToIds[n],this._decorationTypeSubtypes.hasOwnProperty(n)&&delete this._decorationTypeSubtypes[n]}getLayoutInfo(){const n=this._configuration.options,a=n.get(129);return a}createOverviewRuler(n){return!this._modelData||!this._modelData.hasRealView?null:this._modelData.view.createOverviewRuler(n)}getContainerDomNode(){return this._domElement}getDomNode(){return!this._modelData||!this._modelData.hasRealView?null:this._modelData.view.domNode.domNode}delegateVerticalScrollbarMouseDown(n){if(!this._modelData||!this._modelData.hasRealView)return;this._modelData.view.delegateVerticalScrollbarMouseDown(n)}layout(n){this._configuration.observeReferenceElement(n),this.render()}focus(){if(!this._modelData||!this._modelData.hasRealView)return;this._modelData.view.focus()}hasTextFocus(){return!this._modelData||!this._modelData.hasRealView?!1:this._modelData.view.isFocused()}hasWidgetFocus(){return this._focusTracker&&this._focusTracker.hasFocus()}addContentWidget(n){const a={widget:n,position:n.getPosition()};this._contentWidgets.hasOwnProperty(n.getId())&&console.warn("Overwriting a content widget with the same id."),this._contentWidgets[n.getId()]=a,this._modelData&&this._modelData.hasRealView&&this._modelData.view.addContentWidget(a)}layoutContentWidget(n){const a=n.getId();if(this._contentWidgets.hasOwnProperty(a)){const T=this._contentWidgets[a];T.position=n.getPosition(),this._modelData&&this._modelData.hasRealView&&this._modelData.view.layoutContentWidget(T)}}removeContentWidget(n){const a=n.getId();if(this._contentWidgets.hasOwnProperty(a)){const T=this._contentWidgets[a];delete this._contentWidgets[a],this._modelData&&this._modelData.hasRealView&&this._modelData.view.removeContentWidget(T)}}addOverlayWidget(n){const a={widget:n,position:n.getPosition()};this._overlayWidgets.hasOwnProperty(n.getId())&&console.warn("Overwriting an overlay widget with the same id."),this._overlayWidgets[n.getId()]=a,this._modelData&&this._modelData.hasRealView&&this._modelData.view.addOverlayWidget(a)}layoutOverlayWidget(n){const a=n.getId();if(this._overlayWidgets.hasOwnProperty(a)){const T=this._overlayWidgets[a];T.position=n.getPosition(),this._modelData&&this._modelData.hasRealView&&this._modelData.view.layoutOverlayWidget(T)}}removeOverlayWidget(n){const a=n.getId();if(this._overlayWidgets.hasOwnProperty(a)){const T=this._overlayWidgets[a];delete this._overlayWidgets[a],this._modelData&&this._modelData.hasRealView&&this._modelData.view.removeOverlayWidget(T)}}changeViewZones(n){if(!this._modelData||!this._modelData.hasRealView)return;this._modelData.view.change(n)}getTargetAtClientPoint(n,a){return!this._modelData||!this._modelData.hasRealView?null:this._modelData.view.getTargetAtClientPoint(n,a)}getScrolledVisiblePosition(n){if(!this._modelData||!this._modelData.hasRealView)return null;const a=this._modelData.model.validatePosition(n),T=this._configuration.options,N=T.get(129),Y=o._getVerticalOffsetForPosition(this._modelData,a.lineNumber,a.column)-this.getScrollTop(),be=this._modelData.view.getOffsetForColumn(a.lineNumber,a.column)+N.glyphMarginWidth+N.lineNumbersWidth+N.decorationsWidth-this.getScrollLeft();return{top:Y,left:be,height:T.get(58)}}getOffsetForColumn(n,a){return!this._modelData||!this._modelData.hasRealView?-1:this._modelData.view.getOffsetForColumn(n,a)}render(n=!1){if(!this._modelData||!this._modelData.hasRealView)return;this._modelData.view.render(!0,n)}setAriaOptions(n){if(!this._modelData||!this._modelData.hasRealView)return;this._modelData.view.setAriaOptions(n)}applyFontInfo(n){L.a.applyFontInfoSlow(n,this._configuration.options.get(43))}_attachModel(n){if(!n){this._modelData=null;return}const a=[];this._domElement.setAttribute("data-mode-id",n.getLanguageId()),this._configuration.setIsDominatedByLongLines(n.isDominatedByLongLines()),this._configuration.setMaxLineNumber(n.getLineCount()),n.onBeforeAttached();const T=new vn(this._id,this._configuration,n,Gn.create(),rr.create(this._configuration.options),be=>v.V(be));a.push(n.onDidChangeDecorations(be=>this._onDidChangeModelDecorations.fire(be))),a.push(n.onDidChangeLanguage(be=>{this._domElement.setAttribute("data-mode-id",n.getLanguageId()),this._onDidChangeModelLanguage.fire(be)})),a.push(n.onDidChangeLanguageConfiguration(be=>this._onDidChangeModelLanguageConfiguration.fire(be))),a.push(n.onDidChangeContent(be=>this._onDidChangeModelContent.fire(be))),a.push(n.onDidChangeOptions(be=>this._onDidChangeModelOptions.fire(be))),a.push(n.onWillDispose(()=>this.setModel(null))),a.push(T.onEvent(be=>{switch(be.kind){case 0:this._onDidContentSizeChange.fire(be);break;case 1:this._editorTextFocus.setValue(be.hasFocus);break;case 2:this._onDidScrollChange.fire(be);break;case 3:this._onDidChangeViewZones.fire();break;case 4:this._onDidChangeHiddenAreas.fire();break;case 5:this._onDidAttemptReadOnlyEdit.fire();break;case 6:{be.reachedMaxCursorCount&&this._notificationService.warn(I.a("cursors.maximum","The number of cursors has been limited to {0}.",Rs.MAX_CURSOR_COUNT));const xe=[];for(let nt=0,Ot=be.selections.length;nt<Ot;nt++)xe[nt]=be.selections[nt].getPosition();const Ke={position:xe[0],secondaryPositions:xe.slice(1),reason:be.reason,source:be.source};this._onDidChangeCursorPosition.fire(Ke);const Ze={selection:be.selections[0],secondarySelections:be.selections.slice(1),modelVersionId:be.modelVersionId,oldSelections:be.oldSelections,oldModelVersionId:be.oldModelVersionId,source:be.source,reason:be.reason};this._onDidChangeCursorSelection.fire(Ze);break}}}));const[N,Y]=this._createView(T);if(Y){this._domElement.appendChild(N.domNode.domNode);let be=Object.keys(this._contentWidgets);for(let xe=0,Ke=be.length;xe<Ke;xe++){const Ze=be[xe];N.addContentWidget(this._contentWidgets[Ze])}be=Object.keys(this._overlayWidgets);for(let xe=0,Ke=be.length;xe<Ke;xe++){const Ze=be[xe];N.addOverlayWidget(this._overlayWidgets[Ze])}N.render(!1,!0),N.domNode.domNode.setAttribute("data-uri",n.uri.toString())}this._modelData=new _s(n,T,N,Y,a)}_createView(n){let a;this.isSimpleWidget?a={paste:(Y,be,xe,Ke)=>{this._paste("keyboard",Y,be,xe,Ke)},type:Y=>{this._type("keyboard",Y)},compositionType:(Y,be,xe,Ke)=>{this._compositionType("keyboard",Y,be,xe,Ke)},startComposition:()=>{this._startComposition()},endComposition:()=>{this._endComposition("keyboard")},cut:()=>{this._cut("keyboard")}}:a={paste:(Y,be,xe,Ke)=>{const Ze={text:Y,pasteOnNewLine:be,multicursorText:xe,mode:Ke};this._commandService.executeCommand("paste",Ze)},type:Y=>{const be={text:Y};this._commandService.executeCommand("type",be)},compositionType:(Y,be,xe,Ke)=>{if(xe||Ke){const Ze={text:Y,replacePrevCharCnt:be,replaceNextCharCnt:xe,positionDelta:Ke};this._commandService.executeCommand("compositionType",Ze)}else{const Ze={text:Y,replaceCharCnt:be};this._commandService.executeCommand("replacePreviousChar",Ze)}},startComposition:()=>{this._commandService.executeCommand("compositionStart",{})},endComposition:()=>{this._commandService.executeCommand("compositionEnd",{})},cut:()=>{this._commandService.executeCommand("cut",{})}};const T=new Qt(n.coordinatesConverter);T.onKeyDown=Y=>this._onKeyDown.fire(Y),T.onKeyUp=Y=>this._onKeyUp.fire(Y),T.onContextMenu=Y=>this._onContextMenu.fire(Y),T.onMouseMove=Y=>this._onMouseMove.fire(Y),T.onMouseLeave=Y=>this._onMouseLeave.fire(Y),T.onMouseDown=Y=>this._onMouseDown.fire(Y),T.onMouseUp=Y=>this._onMouseUp.fire(Y),T.onMouseDrag=Y=>this._onMouseDrag.fire(Y),T.onMouseDrop=Y=>this._onMouseDrop.fire(Y),T.onMouseDropCanceled=Y=>this._onMouseDropCanceled.fire(Y),T.onMouseWheel=Y=>this._onMouseWheel.fire(Y);const N=new Ct(a,this._configuration,this._themeService,n,T,this._overflowWidgetsDomNode);return[N,!0]}_postDetachModelCleanup(n){n&&n.removeAllDecorationsWithOwnerId(this._id)}_detachModel(){if(!this._modelData)return null;const n=this._modelData.model,a=this._modelData.hasRealView?this._modelData.view.domNode.domNode:null;return this._modelData.dispose(),this._modelData=null,this._domElement.removeAttribute("data-mode-id"),a&&this._domElement.contains(a)&&this._domElement.removeChild(a),n}_removeDecorationType(n){this._codeEditorService.removeDecorationType(n)}hasModel(){return this._modelData!==null}};Vs=ds([Rn(3,qr.a),Rn(4,r.a),Rn(5,zn.b),Rn(6,Fs.b),Rn(7,so.b),Rn(8,Ws.a),Rn(9,ea.b)],Vs);class wr extends d.a{constructor(){super();this._onDidChangeToTrue=this._register(new m.b),this.onDidChangeToTrue=this._onDidChangeToTrue.event,this._onDidChangeToFalse=this._register(new m.b),this.onDidChangeToFalse=this._onDidChangeToFalse.event,this._value=0}setValue(o){const n=o?2:1;if(this._value===n)return;this._value=n,this._value===2?this._onDidChangeToTrue.fire():this._value===1&&this._onDidChangeToFalse.fire()}}class aa extends d.a{constructor(o,n){super();this._editor=o,n.createKey("editorId",o.getId()),this._editorSimpleInput=Gi.a.editorSimpleInput.bindTo(n),this._editorFocus=Gi.a.focus.bindTo(n),this._textInputFocus=Gi.a.textInputFocus.bindTo(n),this._editorTextFocus=Gi.a.editorTextFocus.bindTo(n),this._editorTabMovesFocus=Gi.a.tabMovesFocus.bindTo(n),this._editorReadonly=Gi.a.readOnly.bindTo(n),this._inDiffEditor=Gi.a.inDiffEditor.bindTo(n),this._editorColumnSelection=Gi.a.columnSelection.bindTo(n),this._hasMultipleSelections=Gi.a.hasMultipleSelections.bindTo(n),this._hasNonEmptySelection=Gi.a.hasNonEmptySelection.bindTo(n),this._canUndo=Gi.a.canUndo.bindTo(n),this._canRedo=Gi.a.canRedo.bindTo(n),this._register(this._editor.onDidChangeConfiguration(()=>this._updateFromConfig())),this._register(this._editor.onDidChangeCursorSelection(()=>this._updateFromSelection())),this._register(this._editor.onDidFocusEditorWidget(()=>this._updateFromFocus())),this._register(this._editor.onDidBlurEditorWidget(()=>this._updateFromFocus())),this._register(this._editor.onDidFocusEditorText(()=>this._updateFromFocus())),this._register(this._editor.onDidBlurEditorText(()=>this._updateFromFocus())),this._register(this._editor.onDidChangeModel(()=>this._updateFromModel())),this._register(this._editor.onDidChangeConfiguration(()=>this._updateFromModel())),this._updateFromConfig(),this._updateFromSelection(),this._updateFromFocus(),this._updateFromModel(),this._editorSimpleInput.set(this._editor.isSimpleWidget)}_updateFromConfig(){const o=this._editor.getOptions();this._editorTabMovesFocus.set(o.get(128)),this._editorReadonly.set(o.get(80)),this._inDiffEditor.set(o.get(53)),this._editorColumnSelection.set(o.get(18))}_updateFromSelection(){const o=this._editor.getSelections();o?(this._hasMultipleSelections.set(o.length>1),this._hasNonEmptySelection.set(o.some(n=>!n.isEmpty()))):(this._hasMultipleSelections.reset(),this._hasNonEmptySelection.reset())}_updateFromFocus(){this._editorFocus.set(this._editor.hasWidgetFocus()&&!this._editor.isSimpleWidget),this._editorTextFocus.set(this._editor.hasTextFocus()&&!this._editor.isSimpleWidget),this._textInputFocus.set(this._editor.hasTextFocus())}_updateFromModel(){const o=this._editor.getModel();this._canUndo.set(Boolean(o&&o.canUndo())),this._canRedo.set(Boolean(o&&o.canRedo()))}}class Ds extends d.a{constructor(o,n){super();this._editor=o,this._contextKeyService=n,this._langId=Gi.a.languageId.bindTo(n),this._hasCompletionItemProvider=Gi.a.hasCompletionItemProvider.bindTo(n),this._hasCodeActionsProvider=Gi.a.hasCodeActionsProvider.bindTo(n),this._hasCodeLensProvider=Gi.a.hasCodeLensProvider.bindTo(n),this._hasDefinitionProvider=Gi.a.hasDefinitionProvider.bindTo(n),this._hasDeclarationProvider=Gi.a.hasDeclarationProvider.bindTo(n),this._hasImplementationProvider=Gi.a.hasImplementationProvider.bindTo(n),this._hasTypeDefinitionProvider=Gi.a.hasTypeDefinitionProvider.bindTo(n),this._hasHoverProvider=Gi.a.hasHoverProvider.bindTo(n),this._hasDocumentHighlightProvider=Gi.a.hasDocumentHighlightProvider.bindTo(n),this._hasDocumentSymbolProvider=Gi.a.hasDocumentSymbolProvider.bindTo(n),this._hasReferenceProvider=Gi.a.hasReferenceProvider.bindTo(n),this._hasRenameProvider=Gi.a.hasRenameProvider.bindTo(n),this._hasSignatureHelpProvider=Gi.a.hasSignatureHelpProvider.bindTo(n),this._hasInlayHintsProvider=Gi.a.hasInlayHintsProvider.bindTo(n),this._hasDocumentFormattingProvider=Gi.a.hasDocumentFormattingProvider.bindTo(n),this._hasDocumentSelectionFormattingProvider=Gi.a.hasDocumentSelectionFormattingProvider.bindTo(n),this._hasMultipleDocumentFormattingProvider=Gi.a.hasMultipleDocumentFormattingProvider.bindTo(n),this._hasMultipleDocumentSelectionFormattingProvider=Gi.a.hasMultipleDocumentSelectionFormattingProvider.bindTo(n),this._isInWalkThrough=Gi.a.isInWalkThroughSnippet.bindTo(n);const a=()=>this._update();this._register(o.onDidChangeModel(a)),this._register(o.onDidChangeModelLanguage(a)),this._register(Kt.d.onDidChange(a)),this._register(Kt.a.onDidChange(a)),this._register(Kt.b.onDidChange(a)),this._register(Kt.f.onDidChange(a)),this._register(Kt.e.onDidChange(a)),this._register(Kt.q.onDidChange(a)),this._register(Kt.F.onDidChange(a)),this._register(Kt.p.onDidChange(a)),this._register(Kt.i.onDidChange(a)),this._register(Kt.m.onDidChange(a)),this._register(Kt.x.onDidChange(a)),this._register(Kt.y.onDidChange(a)),this._register(Kt.g.onDidChange(a)),this._register(Kt.j.onDidChange(a)),this._register(Kt.A.onDidChange(a)),this._register(Kt.r.onDidChange(a)),a()}dispose(){super.dispose()}reset(){this._contextKeyService.bufferChangeEvents(()=>{this._langId.reset(),this._hasCompletionItemProvider.reset(),this._hasCodeActionsProvider.reset(),this._hasCodeLensProvider.reset(),this._hasDefinitionProvider.reset(),this._hasDeclarationProvider.reset(),this._hasImplementationProvider.reset(),this._hasTypeDefinitionProvider.reset(),this._hasHoverProvider.reset(),this._hasDocumentHighlightProvider.reset(),this._hasDocumentSymbolProvider.reset(),this._hasReferenceProvider.reset(),this._hasRenameProvider.reset(),this._hasDocumentFormattingProvider.reset(),this._hasDocumentSelectionFormattingProvider.reset(),this._hasSignatureHelpProvider.reset(),this._isInWalkThrough.reset()})}_update(){const o=this._editor.getModel();if(!o){this.reset();return}this._contextKeyService.bufferChangeEvents(()=>{this._langId.set(o.getLanguageId()),this._hasCompletionItemProvider.set(Kt.d.has(o)),this._hasCodeActionsProvider.set(Kt.a.has(o)),this._hasCodeLensProvider.set(Kt.b.has(o)),this._hasDefinitionProvider.set(Kt.f.has(o)),this._hasDeclarationProvider.set(Kt.e.has(o)),this._hasImplementationProvider.set(Kt.q.has(o)),this._hasTypeDefinitionProvider.set(Kt.F.has(o)),this._hasHoverProvider.set(Kt.p.has(o)),this._hasDocumentHighlightProvider.set(Kt.i.has(o)),this._hasDocumentSymbolProvider.set(Kt.m.has(o)),this._hasReferenceProvider.set(Kt.x.has(o)),this._hasRenameProvider.set(Kt.y.has(o)),this._hasSignatureHelpProvider.set(Kt.A.has(o)),this._hasInlayHintsProvider.set(Kt.r.has(o)),this._hasDocumentFormattingProvider.set(Kt.g.has(o)||Kt.j.has(o)),this._hasDocumentSelectionFormattingProvider.set(Kt.j.has(o)),this._hasMultipleDocumentFormattingProvider.set(Kt.g.all(o).length+Kt.j.all(o).length>1),this._hasMultipleDocumentSelectionFormattingProvider.set(Kt.j.all(o).length>1),this._isInWalkThrough.set(o.uri.scheme===D.c.walkThroughSnippet)})}}class Tn extends d.a{constructor(o){super();this._onChange=this._register(new m.b),this.onChange=this._onChange.event,this._hasFocus=!1,this._domFocusTracker=this._register(v.Y(o)),this._register(this._domFocusTracker.onDidFocus(()=>{this._hasFocus=!0,this._onChange.fire(void 0)})),this._register(this._domFocusTracker.onDidBlur(()=>{this._hasFocus=!1,this._onChange.fire(void 0)}))}hasFocus(){return this._hasFocus}}const ts=encodeURIComponent("<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 6 3' enable-background='new 0 0 6 3' height='3' width='6'><g fill='"),os=encodeURIComponent("'><polygon points='5.5,0 2.5,3 1.1,3 4.1,0'/><polygon points='4,0 6,2 6,0.6 5.4,0'/><polygon points='0,2 1,3 2.4,3 0,0.6'/></g></svg>");function cr(o){return ts+encodeURIComponent(o.toString())+os}const la=encodeURIComponent('<svg xmlns="http://www.w3.org/2000/svg" height="3" width="12"><g fill="'),da=encodeURIComponent('"><circle cx="1" cy="1" r="1"/><circle cx="5" cy="1" r="1"/><circle cx="9" cy="1" r="1"/></g></svg>');function ca(o){return la+encodeURIComponent(o.toString())+da}Object(so.f)((o,n)=>{const a=o.getColor(ui.t);a&&n.addRule(`.monaco-editor .squiggly-error { border-bottom: 4px double ${a}; }`);const T=o.getColor(ui.u);T&&n.addRule(`.monaco-editor .squiggly-error { background: url("data:image/svg+xml,${cr(T)}") repeat-x bottom left; }`);const N=o.getColor(ui.s);N&&n.addRule(`.monaco-editor .squiggly-error::before { display: block; content: ''; width: 100%; height: 100%; background: ${N}; }`);const Y=o.getColor(ui.U);Y&&n.addRule(`.monaco-editor .squiggly-warning { border-bottom: 4px double ${Y}; }`);const be=o.getColor(ui.V);be&&n.addRule(`.monaco-editor .squiggly-warning { background: url("data:image/svg+xml,${cr(be)}") repeat-x bottom left; }`);const xe=o.getColor(ui.T);xe&&n.addRule(`.monaco-editor .squiggly-warning::before { display: block; content: ''; width: 100%; height: 100%; background: ${xe}; }`);const Ke=o.getColor(ui.L);Ke&&n.addRule(`.monaco-editor .squiggly-info { border-bottom: 4px double ${Ke}; }`);const Ze=o.getColor(ui.M);Ze&&n.addRule(`.monaco-editor .squiggly-info { background: url("data:image/svg+xml,${cr(Ze)}") repeat-x bottom left; }`);const nt=o.getColor(ui.K);nt&&n.addRule(`.monaco-editor .squiggly-info::before { display: block; content: ''; width: 100%; height: 100%; background: ${nt}; }`);const Ot=o.getColor(ui.C);Ot&&n.addRule(`.monaco-editor .squiggly-hint { border-bottom: 2px dotted ${Ot}; }`);const ft=o.getColor(ui.D);ft&&n.addRule(`.monaco-editor .squiggly-hint { background: url("data:image/svg+xml,${ca(ft)}") no-repeat bottom left; }`);const kt=o.getColor(zt.I);kt&&n.addRule(`.monaco-editor.showUnused .squiggly-inline-unnecessary { opacity: ${kt.rgba.a}; }`);const Gt=o.getColor(zt.H);Gt&&n.addRule(`.monaco-editor.showUnused .squiggly-unnecessary { border-bottom: 2px dashed ${Gt}; }`);const eo=o.getColor(ui.B)||"inherit";n.addRule(`.monaco-editor.showDeprecated .squiggly-inline-deprecated { text-decoration: line-through; text-decoration-color: ${eo}}`)})},nD70:function(mt,M,t){"use strict";t.d(M,"a",function(){return g}),t.d(M,"b",function(){return B});class g{constructor(x){this._prefix=x,this._lastId=0}nextId(){return this._prefix+ ++this._lastId}}const B=new g("id#")},nlbu:function(mt,M,t){"use strict";t.d(M,"b",function(){return g}),t.d(M,"d",function(){return B}),t.d(M,"c",function(){return x}),t.d(M,"a",function(){return A});class g{constructor(j){this.value=j}equals(j){return this.value===j.value}contains(j){return this.equals(j)||this.value===""||j.value.startsWith(this.value+g.sep)}intersects(j){return this.contains(j)||j.contains(this)}append(j){return new g(this.value+g.sep+j)}}g.sep=".",g.None=new g("@@none@@"),g.Empty=new g(""),g.QuickFix=new g("quickfix"),g.Refactor=new g("refactor"),g.Source=new g("source"),g.SourceOrganizeImports=g.Source.append("organizeImports"),g.SourceFixAll=g.Source.append("fixAll");function B(j,I){return j.include&&!j.include.intersects(I)||j.excludes&&j.excludes.some(v=>R(I,v,j.include))?!1:!(!j.includeSourceActions&&g.Source.contains(I))}function x(j,I){const v=I.kind?new g(I.kind):void 0;return j.include&&(!v||!j.include.contains(v))||(j.excludes&&(v&&j.excludes.some(C=>R(v,C,j.include)))||!j.includeSourceActions&&(v&&g.Source.contains(v)))?!1:!(j.onlyIncludePreferredActions&&!I.isPreferred)}function R(j,I,v){return I.contains(j)?!(v&&I.contains(v)):!1}class A{constructor(j,I,v){this.kind=j,this.apply=I,this.preferred=v}static fromUser(j,I){return!j||typeof j!="object"?new A(I.kind,I.apply,!1):new A(A.getKindFromUser(j,I.kind),A.getApplyFromUser(j,I.apply),A.getPreferredUser(j))}static getApplyFromUser(j,I){switch(typeof j.apply=="string"?j.apply.toLowerCase():""){case"first":return"first";case"never":return"never";case"ifsingle":return"ifSingle";default:return I}}static getKindFromUser(j,I){return typeof j.kind=="string"?new g(j.kind):I}static getPreferredUser(j){return typeof j.preferred=="boolean"?j.preferred:!1}}},nrBJ:function(mt,M,t){"use strict";t.r(M);var g=t("+hIS");Object(g.a)({id:"vb",extensions:[".vb"],aliases:["Visual Basic","vb"],loader:function(){return t.e(376).then(t.bind(null,"eXtt"))}})},nrhi:function(mt,M,t){"use strict";t.d(M,"a",function(){return j});var g=t("Szf2"),B=t("MNsG"),x=t("nnTU"),R=t("ic2d");class A{constructor(){this._coreKeybindings=[],this._extensionKeybindings=[],this._cachedMergedKeybindings=null}static bindToCurrentPlatform(C){if(B.a===1){if(C&&C.win)return C.win}else if(B.a===2){if(C&&C.mac)return C.mac}else if(C&&C.linux)return C.linux;return C}registerKeybindingRule(C){const m=A.bindToCurrentPlatform(C);if(m&&m.primary){const d=Object(g.e)(m.primary,B.a);d&&this._registerDefaultKeybinding(d,C.id,C.args,C.weight,0,C.when)}if(m&&Array.isArray(m.secondary))for(let d=0,D=m.secondary.length;d<D;d++){const L=m.secondary[d],r=Object(g.e)(L,B.a);r&&this._registerDefaultKeybinding(r,C.id,C.args,C.weight,-d-1,C.when)}}registerCommandAndKeybindingRule(C){this.registerKeybindingRule(C),x.a.registerCommand(C)}static _mightProduceChar(C){return C>=21&&C<=30||C>=31&&C<=56?!0:C===80||C===81||C===82||C===83||C===84||C===85||C===86||C===110||C===111||C===87||C===88||C===89||C===90||C===91||C===92}_assertNoCtrlAlt(C,m){C.ctrlKey&&C.altKey&&!C.metaKey&&(A._mightProduceChar(C.keyCode)&&console.warn("Ctrl+Alt+ keybindings should not be used by default under Windows. Offender: ",C," for ",m))}_registerDefaultKeybinding(C,m,d,D,L,r){B.a===1&&this._assertNoCtrlAlt(C.parts[0],m),this._coreKeybindings.push({keybinding:C.parts,command:m,commandArgs:d,when:r,weight1:D,weight2:L,extensionId:null,isBuiltinExtension:!1}),this._cachedMergedKeybindings=null}getDefaultKeybindings(){return this._cachedMergedKeybindings||(this._cachedMergedKeybindings=[].concat(this._coreKeybindings).concat(this._extensionKeybindings),this._cachedMergedKeybindings.sort(v)),this._cachedMergedKeybindings.slice(0)}}const j=new A,I={EditorModes:"platform.keybindingsRegistry"};R.a.add(I.EditorModes,j);function v(C,m){return C.weight1!==m.weight1?C.weight1-m.weight1:C.command<m.command?-1:C.command>m.command?1:C.weight2-m.weight2}},nuFA:function(mt,M,t){"use strict";t.d(M,"a",function(){return g});var g;(function(B){function x(I,v){if(I.start>=v.end||v.start>=I.end)return{start:0,end:0};const C=Math.max(I.start,v.start),m=Math.min(I.end,v.end);return m-C<=0?{start:0,end:0}:{start:C,end:m}}B.intersect=x;function R(I){return I.end-I.start<=0}B.isEmpty=R;function A(I,v){return!R(x(I,v))}B.intersects=A;function j(I,v){const C=[],m={start:I.start,end:Math.min(v.start,I.end)},d={start:Math.max(v.end,I.start),end:I.end};return R(m)||C.push(m),R(d)||C.push(d),C}B.relativeComplement=j})(g||(g={}))},o39E:function(mt,M,t){"use strict";t.d(M,"a",function(){return B});var g=t("pmY6");class B extends g.a{constructor(x,R,A){super();this.referenceDomElement=x,this.changeCallback=A,this.width=-1,this.height=-1,this.resizeObserver=null,this.measureReferenceDomElementToken=-1,this.measureReferenceDomElement(!1,R)}dispose(){this.stopObserving(),super.dispose()}getWidth(){return this.width}getHeight(){return this.height}startObserving(){typeof ResizeObserver!="undefined"?!this.resizeObserver&&this.referenceDomElement&&(this.resizeObserver=new ResizeObserver(x=>{x&&x[0]&&x[0].contentRect?this.observe({width:x[0].contentRect.width,height:x[0].contentRect.height}):this.observe()}),this.resizeObserver.observe(this.referenceDomElement)):this.measureReferenceDomElementToken===-1&&(this.measureReferenceDomElementToken=setInterval(()=>this.observe(),100))}stopObserving(){this.resizeObserver&&(this.resizeObserver.disconnect(),this.resizeObserver=null),this.measureReferenceDomElementToken!==-1&&(clearInterval(this.measureReferenceDomElementToken),this.measureReferenceDomElementToken=-1)}observe(x){this.measureReferenceDomElement(!0,x)}measureReferenceDomElement(x,R){let A=0,j=0;R?(A=R.width,j=R.height):this.referenceDomElement&&(A=this.referenceDomElement.clientWidth,j=this.referenceDomElement.clientHeight),A=Math.max(5,A),j=Math.max(5,j),(this.width!==A||this.height!==j)&&(this.width=A,this.height=j,x&&this.changeCallback())}}},oAeH:function(mt,M,t){"use strict";t.d(M,"b",function(){return I}),t.d(M,"a",function(){return v});var g=t("746U"),B=t("Ll0s"),x=t("+Fos"),R=t("1I1M"),A=t("cGHE"),j=t("aokT");class I{static addCursorDown(C,m,d){let D=[],L=0;for(let r=0,w=m.length;r<w;r++){const b=m[r];D[L++]=new B.d(b.modelState,b.viewState),d?D[L++]=B.d.fromModelState(x.a.translateDown(C.cursorConfig,C.model,b.modelState)):D[L++]=B.d.fromViewState(x.a.translateDown(C.cursorConfig,C,b.viewState))}return D}static addCursorUp(C,m,d){let D=[],L=0;for(let r=0,w=m.length;r<w;r++){const b=m[r];D[L++]=new B.d(b.modelState,b.viewState),d?D[L++]=B.d.fromModelState(x.a.translateUp(C.cursorConfig,C.model,b.modelState)):D[L++]=B.d.fromViewState(x.a.translateUp(C.cursorConfig,C,b.viewState))}return D}static moveToBeginningOfLine(C,m,d){let D=[];for(let L=0,r=m.length;L<r;L++){const w=m[L];D[L]=this._moveToLineStart(C,w,d)}return D}static _moveToLineStart(C,m,d){const D=m.viewState.position.column,L=m.modelState.position.column,r=D===L,w=m.viewState.position.lineNumber,b=C.getLineFirstNonWhitespaceColumn(w),u=D===b;return!r&&!u?this._moveToLineStartByView(C,m,d):this._moveToLineStartByModel(C,m,d)}static _moveToLineStartByView(C,m,d){return B.d.fromViewState(x.a.moveToBeginningOfLine(C.cursorConfig,C,m.viewState,d))}static _moveToLineStartByModel(C,m,d){return B.d.fromModelState(x.a.moveToBeginningOfLine(C.cursorConfig,C.model,m.modelState,d))}static moveToEndOfLine(C,m,d,D){let L=[];for(let r=0,w=m.length;r<w;r++){const b=m[r];L[r]=this._moveToLineEnd(C,b,d,D)}return L}static _moveToLineEnd(C,m,d,D){const L=m.viewState.position,r=C.getLineMaxColumn(L.lineNumber),w=L.column===r,b=m.modelState.position,u=C.model.getLineMaxColumn(b.lineNumber),c=r-L.column===u-b.column;return w||c?this._moveToLineEndByModel(C,m,d,D):this._moveToLineEndByView(C,m,d,D)}static _moveToLineEndByView(C,m,d,D){return B.d.fromViewState(x.a.moveToEndOfLine(C.cursorConfig,C,m.viewState,d,D))}static _moveToLineEndByModel(C,m,d,D){return B.d.fromModelState(x.a.moveToEndOfLine(C.cursorConfig,C.model,m.modelState,d,D))}static expandLineSelection(C,m){let d=[];for(let D=0,L=m.length;D<L;D++){const r=m[D],w=r.modelState.selection.startLineNumber,b=C.model.getLineCount();let u=r.modelState.selection.endLineNumber,c;u===b?c=C.model.getLineMaxColumn(b):(u++,c=1),d[D]=B.d.fromModelState(new B.f(new j.a(w,1,w,1),0,new A.a(u,c),0))}return d}static moveToBeginningOfBuffer(C,m,d){let D=[];for(let L=0,r=m.length;L<r;L++){const w=m[L];D[L]=B.d.fromModelState(x.a.moveToBeginningOfBuffer(C.cursorConfig,C.model,w.modelState,d))}return D}static moveToEndOfBuffer(C,m,d){let D=[];for(let L=0,r=m.length;L<r;L++){const w=m[L];D[L]=B.d.fromModelState(x.a.moveToEndOfBuffer(C.cursorConfig,C.model,w.modelState,d))}return D}static selectAll(C,m){const d=C.model.getLineCount(),D=C.model.getLineMaxColumn(d);return B.d.fromModelState(new B.f(new j.a(1,1,1,1),0,new A.a(d,D),0))}static line(C,m,d,D,L){const r=C.model.validatePosition(D),w=L?C.coordinatesConverter.validateViewPosition(new A.a(L.lineNumber,L.column),r):C.coordinatesConverter.convertModelPositionToViewPosition(r);if(!d||!m.modelState.hasSelection()){const u=C.model.getLineCount();let c=r.lineNumber+1,p=1;return c>u&&(c=u,p=C.model.getLineMaxColumn(c)),B.d.fromModelState(new B.f(new j.a(r.lineNumber,1,c,p),0,new A.a(c,p),0))}const b=m.modelState.selectionStart.getStartPosition().lineNumber;if(r.lineNumber<b)return B.d.fromViewState(m.viewState.move(m.modelState.hasSelection(),w.lineNumber,1,0));if(r.lineNumber>b){const u=C.getLineCount();let c=w.lineNumber+1,p=1;return c>u&&(c=u,p=C.getLineMaxColumn(c)),B.d.fromViewState(m.viewState.move(m.modelState.hasSelection(),c,p,0))}else{const u=m.modelState.selectionStart.getEndPosition();return B.d.fromModelState(m.modelState.move(m.modelState.hasSelection(),u.lineNumber,u.column,0))}}static word(C,m,d,D){const L=C.model.validatePosition(D);return B.d.fromModelState(R.a.word(C.cursorConfig,C.model,m.modelState,d,L))}static cancelSelection(C,m){if(!m.modelState.hasSelection())return new B.d(m.modelState,m.viewState);const d=m.viewState.position.lineNumber,D=m.viewState.position.column;return B.d.fromViewState(new B.f(new j.a(d,D,d,D),0,new A.a(d,D),0))}static moveTo(C,m,d,D,L){const r=C.model.validatePosition(D),w=L?C.coordinatesConverter.validateViewPosition(new A.a(L.lineNumber,L.column),r):C.coordinatesConverter.convertModelPositionToViewPosition(r);return B.d.fromViewState(m.viewState.move(d,w.lineNumber,w.column,0))}static simpleMove(C,m,d,D,L,r){switch(d){case 0:return r===4?this._moveHalfLineLeft(C,m,D):this._moveLeft(C,m,D,L);case 1:return r===4?this._moveHalfLineRight(C,m,D):this._moveRight(C,m,D,L);case 2:return r===2?this._moveUpByViewLines(C,m,D,L):this._moveUpByModelLines(C,m,D,L);case 3:return r===2?this._moveDownByViewLines(C,m,D,L):this._moveDownByModelLines(C,m,D,L);case 4:return r===2?m.map(w=>B.d.fromViewState(x.a.moveToPrevBlankLine(C.cursorConfig,C,w.viewState,D))):m.map(w=>B.d.fromModelState(x.a.moveToPrevBlankLine(C.cursorConfig,C.model,w.modelState,D)));case 5:return r===2?m.map(w=>B.d.fromViewState(x.a.moveToNextBlankLine(C.cursorConfig,C,w.viewState,D))):m.map(w=>B.d.fromModelState(x.a.moveToNextBlankLine(C.cursorConfig,C.model,w.modelState,D)));case 6:return this._moveToViewMinColumn(C,m,D);case 7:return this._moveToViewFirstNonWhitespaceColumn(C,m,D);case 8:return this._moveToViewCenterColumn(C,m,D);case 9:return this._moveToViewMaxColumn(C,m,D);case 10:return this._moveToViewLastNonWhitespaceColumn(C,m,D);default:return null}}static viewportMove(C,m,d,D,L){const r=C.getCompletelyVisibleViewRange(),w=C.coordinatesConverter.convertViewRangeToModelRange(r);switch(d){case 11:{const b=this._firstLineNumberInRange(C.model,w,L),u=C.model.getLineFirstNonWhitespaceColumn(b);return[this._moveToModelPosition(C,m[0],D,b,u)]}case 13:{const b=this._lastLineNumberInRange(C.model,w,L),u=C.model.getLineFirstNonWhitespaceColumn(b);return[this._moveToModelPosition(C,m[0],D,b,u)]}case 12:{const b=Math.round((w.startLineNumber+w.endLineNumber)/2),u=C.model.getLineFirstNonWhitespaceColumn(b);return[this._moveToModelPosition(C,m[0],D,b,u)]}case 14:{let b=[];for(let u=0,c=m.length;u<c;u++){const p=m[u];b[u]=this.findPositionInViewportIfOutside(C,p,r,D)}return b}default:return null}}static findPositionInViewportIfOutside(C,m,d,D){let L=m.viewState.position.lineNumber;if(d.startLineNumber<=L&&L<=d.endLineNumber-1)return new B.d(m.modelState,m.viewState);{let r;L>d.endLineNumber-1?r=d.endLineNumber-1:L<d.startLineNumber?r=d.startLineNumber:r=L;const w=x.a.vertical(C.cursorConfig,C,L,m.viewState.position.column,m.viewState.leftoverVisibleColumns,r,!1);return B.d.fromViewState(m.viewState.move(D,w.lineNumber,w.column,w.leftoverVisibleColumns))}}static _firstLineNumberInRange(C,m,d){let D=m.startLineNumber;return m.startColumn!==C.getLineMinColumn(D)&&D++,Math.min(m.endLineNumber,D+d-1)}static _lastLineNumberInRange(C,m,d){let D=m.startLineNumber;return m.startColumn!==C.getLineMinColumn(D)&&D++,Math.max(D,m.endLineNumber-d+1)}static _moveLeft(C,m,d,D){return m.map(L=>B.d.fromViewState(x.a.moveLeft(C.cursorConfig,C,L.viewState,d,D)))}static _moveHalfLineLeft(C,m,d){let D=[];for(let L=0,r=m.length;L<r;L++){const w=m[L],b=w.viewState.position.lineNumber,u=Math.round(C.getLineContent(b).length/2);D[L]=B.d.fromViewState(x.a.moveLeft(C.cursorConfig,C,w.viewState,d,u))}return D}static _moveRight(C,m,d,D){return m.map(L=>B.d.fromViewState(x.a.moveRight(C.cursorConfig,C,L.viewState,d,D)))}static _moveHalfLineRight(C,m,d){let D=[];for(let L=0,r=m.length;L<r;L++){const w=m[L],b=w.viewState.position.lineNumber,u=Math.round(C.getLineContent(b).length/2);D[L]=B.d.fromViewState(x.a.moveRight(C.cursorConfig,C,w.viewState,d,u))}return D}static _moveDownByViewLines(C,m,d,D){let L=[];for(let r=0,w=m.length;r<w;r++){const b=m[r];L[r]=B.d.fromViewState(x.a.moveDown(C.cursorConfig,C,b.viewState,d,D))}return L}static _moveDownByModelLines(C,m,d,D){let L=[];for(let r=0,w=m.length;r<w;r++){const b=m[r];L[r]=B.d.fromModelState(x.a.moveDown(C.cursorConfig,C.model,b.modelState,d,D))}return L}static _moveUpByViewLines(C,m,d,D){let L=[];for(let r=0,w=m.length;r<w;r++){const b=m[r];L[r]=B.d.fromViewState(x.a.moveUp(C.cursorConfig,C,b.viewState,d,D))}return L}static _moveUpByModelLines(C,m,d,D){let L=[];for(let r=0,w=m.length;r<w;r++){const b=m[r];L[r]=B.d.fromModelState(x.a.moveUp(C.cursorConfig,C.model,b.modelState,d,D))}return L}static _moveToViewPosition(C,m,d,D,L){return B.d.fromViewState(m.viewState.move(d,D,L,0))}static _moveToModelPosition(C,m,d,D,L){return B.d.fromModelState(m.modelState.move(d,D,L,0))}static _moveToViewMinColumn(C,m,d){let D=[];for(let L=0,r=m.length;L<r;L++){const w=m[L],b=w.viewState.position.lineNumber,u=C.getLineMinColumn(b);D[L]=this._moveToViewPosition(C,w,d,b,u)}return D}static _moveToViewFirstNonWhitespaceColumn(C,m,d){let D=[];for(let L=0,r=m.length;L<r;L++){const w=m[L],b=w.viewState.position.lineNumber,u=C.getLineFirstNonWhitespaceColumn(b);D[L]=this._moveToViewPosition(C,w,d,b,u)}return D}static _moveToViewCenterColumn(C,m,d){let D=[];for(let L=0,r=m.length;L<r;L++){const w=m[L],b=w.viewState.position.lineNumber,u=Math.round((C.getLineMaxColumn(b)+C.getLineMinColumn(b))/2);D[L]=this._moveToViewPosition(C,w,d,b,u)}return D}static _moveToViewMaxColumn(C,m,d){let D=[];for(let L=0,r=m.length;L<r;L++){const w=m[L],b=w.viewState.position.lineNumber,u=C.getLineMaxColumn(b);D[L]=this._moveToViewPosition(C,w,d,b,u)}return D}static _moveToViewLastNonWhitespaceColumn(C,m,d){let D=[];for(let L=0,r=m.length;L<r;L++){const w=m[L],b=w.viewState.position.lineNumber,u=C.getLineLastNonWhitespaceColumn(b);D[L]=this._moveToViewPosition(C,w,d,b,u)}return D}}var v;(function(C){const m=function(D){if(!g.k(D))return!1;let L=D;return g.l(L.to)?!g.m(L.select)&&!g.g(L.select)||!g.m(L.by)&&!g.l(L.by)?!1:!(!g.m(L.value)&&!g.j(L.value)):!1};C.description={description:"Move cursor to a logical position in the view",args:[{name:"Cursor move argument object",description:`Property-value pairs that can be passed through this argument:
|
|
|
* 'to': A mandatory logical position value providing where to move the cursor.
|
|
|
\`\`\`
|
|
|
'left', 'right', 'up', 'down', 'prevBlankLine', 'nextBlankLine',
|
|
|
'wrappedLineStart', 'wrappedLineEnd', 'wrappedLineColumnCenter'
|
|
|
'wrappedLineFirstNonWhitespaceCharacter', 'wrappedLineLastNonWhitespaceCharacter'
|
|
|
'viewPortTop', 'viewPortCenter', 'viewPortBottom', 'viewPortIfOutside'
|
|
|
\`\`\`
|
|
|
* 'by': Unit to move. Default is computed based on 'to' value.
|
|
|
\`\`\`
|
|
|
'line', 'wrappedLine', 'character', 'halfLine'
|
|
|
\`\`\`
|
|
|
* 'value': Number of units to move. Default is '1'.
|
|
|
* 'select': If 'true' makes the selection. Default is 'false'.
|
|
|
`,constraint:m,schema:{type:"object",required:["to"],properties:{to:{type:"string",enum:["left","right","up","down","prevBlankLine","nextBlankLine","wrappedLineStart","wrappedLineEnd","wrappedLineColumnCenter","wrappedLineFirstNonWhitespaceCharacter","wrappedLineLastNonWhitespaceCharacter","viewPortTop","viewPortCenter","viewPortBottom","viewPortIfOutside"]},by:{type:"string",enum:["line","wrappedLine","character","halfLine"]},value:{type:"number",default:1},select:{type:"boolean",default:!1}}}}]},C.RawDirection={Left:"left",Right:"right",Up:"up",Down:"down",PrevBlankLine:"prevBlankLine",NextBlankLine:"nextBlankLine",WrappedLineStart:"wrappedLineStart",WrappedLineFirstNonWhitespaceCharacter:"wrappedLineFirstNonWhitespaceCharacter",WrappedLineColumnCenter:"wrappedLineColumnCenter",WrappedLineEnd:"wrappedLineEnd",WrappedLineLastNonWhitespaceCharacter:"wrappedLineLastNonWhitespaceCharacter",ViewPortTop:"viewPortTop",ViewPortCenter:"viewPortCenter",ViewPortBottom:"viewPortBottom",ViewPortIfOutside:"viewPortIfOutside"},C.RawUnit={Line:"line",WrappedLine:"wrappedLine",Character:"character",HalfLine:"halfLine"};function d(D){if(!D.to)return null;let L;switch(D.to){case C.RawDirection.Left:L=0;break;case C.RawDirection.Right:L=1;break;case C.RawDirection.Up:L=2;break;case C.RawDirection.Down:L=3;break;case C.RawDirection.PrevBlankLine:L=4;break;case C.RawDirection.NextBlankLine:L=5;break;case C.RawDirection.WrappedLineStart:L=6;break;case C.RawDirection.WrappedLineFirstNonWhitespaceCharacter:L=7;break;case C.RawDirection.WrappedLineColumnCenter:L=8;break;case C.RawDirection.WrappedLineEnd:L=9;break;case C.RawDirection.WrappedLineLastNonWhitespaceCharacter:L=10;break;case C.RawDirection.ViewPortTop:L=11;break;case C.RawDirection.ViewPortBottom:L=13;break;case C.RawDirection.ViewPortCenter:L=12;break;case C.RawDirection.ViewPortIfOutside:L=14;break;default:return null}let r=0;switch(D.by){case C.RawUnit.Line:r=1;break;case C.RawUnit.WrappedLine:r=2;break;case C.RawUnit.Character:r=3;break;case C.RawUnit.HalfLine:r=4;break}return{direction:L,unit:r,select:!!D.select,value:D.value||1}}C.parse=d})(v||(v={}))},oFSf:function(mt,M,t){"use strict";t.d(M,"b",function(){return L}),t.d(M,"a",function(){return r});var g=t("3/fG"),B=t("/cxE"),x=t("gCVg"),R=t("bY76"),A=t("5nk5"),j=t("HpOR"),I=t("gslv");function v(w){return w.toString()}class C{constructor(w,b,u,c,p,S,E){this.beforeVersionId=w,this.afterVersionId=b,this.beforeEOL=u,this.afterEOL=c,this.beforeCursorState=p,this.afterCursorState=S,this.changes=E}static create(w,b){const u=w.getAlternativeVersionId(),c=D(w);return new C(u,u,c,c,b,b,[])}append(w,b,u,c,p){b.length>0&&(this.changes=Object(A.b)(this.changes,b)),this.afterEOL=u,this.afterVersionId=c,this.afterCursorState=p}static _writeSelectionsSize(w){return 4+4*4*(w?w.length:0)}static _writeSelections(w,b,u){if(j.f(w,b?b.length:0,u),u+=4,b)for(const c of b)j.f(w,c.selectionStartLineNumber,u),u+=4,j.f(w,c.selectionStartColumn,u),u+=4,j.f(w,c.positionLineNumber,u),u+=4,j.f(w,c.positionColumn,u),u+=4;return u}static _readSelections(w,b,u){const c=j.c(w,b);b+=4;for(let p=0;p<c;p++){const S=j.c(w,b);b+=4;const E=j.c(w,b);b+=4;const y=j.c(w,b);b+=4;const O=j.c(w,b);b+=4,u.push(new x.a(S,E,y,O))}return b}serialize(){let w=4+4+1+1+C._writeSelectionsSize(this.beforeCursorState)+C._writeSelectionsSize(this.afterCursorState)+4;for(const c of this.changes)w+=c.writeSize();const b=new Uint8Array(w);let u=0;j.f(b,this.beforeVersionId,u),u+=4,j.f(b,this.afterVersionId,u),u+=4,j.g(b,this.beforeEOL,u),u+=1,j.g(b,this.afterEOL,u),u+=1,u=C._writeSelections(b,this.beforeCursorState,u),u=C._writeSelections(b,this.afterCursorState,u),j.f(b,this.changes.length,u),u+=4;for(const c of this.changes)u=c.write(b,u);return b.buffer}static deserialize(w){const b=new Uint8Array(w);let u=0;const c=j.c(b,u);u+=4;const p=j.c(b,u);u+=4;const S=j.d(b,u);u+=1;const E=j.d(b,u);u+=1;const y=[];u=C._readSelections(b,u,y);const O=[];u=C._readSelections(b,u,O);const k=j.c(b,u);u+=4;const Q=[];for(let q=0;q<k;q++)u=A.a.read(b,u,Q);return new C(c,p,S,E,y,O,Q)}}class m{constructor(w,b){this.model=w,this._data=C.create(w,b)}get type(){return 0}get resource(){return R.a.isUri(this.model)?this.model:this.model.uri}get label(){return g.a("edit","Typing")}toString(){const w=this._data instanceof C?this._data:C.deserialize(this._data);return w.changes.map(b=>b.toString()).join(", ")}matchesResource(w){const b=R.a.isUri(this.model)?this.model:this.model.uri;return b.toString()===w.toString()}setModel(w){this.model=w}canAppend(w){return this.model===w&&this._data instanceof C}append(w,b,u,c,p){this._data instanceof C&&this._data.append(w,b,u,c,p)}close(){this._data instanceof C&&(this._data=this._data.serialize())}open(){this._data instanceof C||(this._data=C.deserialize(this._data))}undo(){if(R.a.isUri(this.model))throw new Error("Invalid SingleModelEditStackElement");this._data instanceof C&&(this._data=this._data.serialize());const w=C.deserialize(this._data);this.model._applyUndo(w.changes,w.beforeEOL,w.beforeVersionId,w.beforeCursorState)}redo(){if(R.a.isUri(this.model))throw new Error("Invalid SingleModelEditStackElement");this._data instanceof C&&(this._data=this._data.serialize());const w=C.deserialize(this._data);this.model._applyRedo(w.changes,w.afterEOL,w.afterVersionId,w.afterCursorState)}heapSize(){return this._data instanceof C&&(this._data=this._data.serialize()),this._data.byteLength+168}}class d{constructor(w,b){this.type=1,this.label=w,this._isOpen=!0,this._editStackElementsArr=b.slice(0),this._editStackElementsMap=new Map;for(const u of this._editStackElementsArr){const c=v(u.resource);this._editStackElementsMap.set(c,u)}this._delegate=null}get resources(){return this._editStackElementsArr.map(w=>w.resource)}prepareUndoRedo(){if(this._delegate)return this._delegate.prepareUndoRedo(this)}matchesResource(w){const b=v(w);return this._editStackElementsMap.has(b)}setModel(w){const b=v(R.a.isUri(w)?w:w.uri);this._editStackElementsMap.has(b)&&this._editStackElementsMap.get(b).setModel(w)}canAppend(w){if(!this._isOpen)return!1;const b=v(w.uri);if(this._editStackElementsMap.has(b)){const u=this._editStackElementsMap.get(b);return u.canAppend(w)}return!1}append(w,b,u,c,p){const S=v(w.uri),E=this._editStackElementsMap.get(S);E.append(w,b,u,c,p)}close(){this._isOpen=!1}open(){}undo(){this._isOpen=!1;for(const w of this._editStackElementsArr)w.undo()}redo(){for(const w of this._editStackElementsArr)w.redo()}heapSize(w){const b=v(w);if(this._editStackElementsMap.has(b)){const u=this._editStackElementsMap.get(b);return u.heapSize()}return 0}split(){return this._editStackElementsArr}toString(){let w=[];for(const b of this._editStackElementsArr)w.push(`${Object(I.b)(b.resource)}: ${b}`);return`{${w.join(", ")}}`}}function D(w){const b=w.getEOL();return b===`
|
|
|
`?0:1}function L(w){return w?w instanceof m||w instanceof d:!1}class r{constructor(w,b){this._model=w,this._undoRedoService=b}pushStackElement(){const w=this._undoRedoService.getLastElement(this._model.uri);L(w)&&w.close()}popStackElement(){const w=this._undoRedoService.getLastElement(this._model.uri);L(w)&&w.open()}clear(){this._undoRedoService.removeElements(this._model.uri)}_getOrCreateEditStackElement(w){const b=this._undoRedoService.getLastElement(this._model.uri);if(L(b)&&b.canAppend(this._model))return b;const u=new m(this._model,w);return this._undoRedoService.pushElement(u),u}pushEOL(w){const b=this._getOrCreateEditStackElement(null);this._model.setEOL(w),b.append(this._model,[],D(this._model),this._model.getAlternativeVersionId(),null)}pushEditOperation(w,b,u){const c=this._getOrCreateEditStackElement(w),p=this._model.applyEdits(b,!0),S=r._computeCursorState(u,p),E=p.map((y,O)=>({index:O,textChange:y.textChange}));return E.sort((y,O)=>y.textChange.oldPosition===O.textChange.oldPosition?y.index-O.index:y.textChange.oldPosition-O.textChange.oldPosition),c.append(this._model,E.map(y=>y.textChange),D(this._model),this._model.getAlternativeVersionId(),S),S}static _computeCursorState(w,b){try{return w?w(b):null}catch(u){return Object(B.f)(u),null}}}},oKJv:function(mt,M,t){"use strict";t.r(M);var g=t("+hIS");Object(g.a)({id:"pgsql",extensions:[],aliases:["PostgreSQL","postgres","pg","postgre"],loader:function(){return t.e(350).then(t.bind(null,"HGU1"))}})},oQaD:function(mt,M,t){"use strict";t.r(M),t.d(M,"getSelectionSearchString",function(){return Hi}),t.d(M,"CommonFindController",function(){return Oi}),t.d(M,"FindController",function(){return Ii}),t.d(M,"StartFindAction",function(){return Qi}),t.d(M,"StartFindWithSelectionAction",function(){return Li}),t.d(M,"MatchFindAction",function(){return Ui}),t.d(M,"NextMatchFindAction",function(){return fi}),t.d(M,"PreviousMatchFindAction",function(){return $i}),t.d(M,"SelectionMatchFindAction",function(){return rn}),t.d(M,"NextSelectionMatchFindAction",function(){return _i}),t.d(M,"PreviousSelectionMatchFindAction",function(){return Pi}),t.d(M,"StartFindReplaceAction",function(){return gt});var g=t("X+cX"),B=t("pmY6"),x=t("N0LK"),R=t("sswD"),A=t("wQH0"),j=t("6OMU"),I=t("LCkn"),v=t("cGHE"),C=t("aokT"),m=t("gCVg"),d=t("jAJ/"),D=t("M1Kb"),L=t("tX9W"),r=t("MD5Z"),w=t("t9D7");class b{constructor($){this._editor=$,this._decorations=[],this._overviewRulerApproximateDecorations=[],this._findScopeDecorationIds=[],this._rangeHighlightDecorationId=null,this._highlightedDecorationId=null,this._startPosition=this._editor.getPosition()}dispose(){this._editor.deltaDecorations(this._allDecorations(),[]),this._decorations=[],this._overviewRulerApproximateDecorations=[],this._findScopeDecorationIds=[],this._rangeHighlightDecorationId=null,this._highlightedDecorationId=null}reset(){this._decorations=[],this._overviewRulerApproximateDecorations=[],this._findScopeDecorationIds=[],this._rangeHighlightDecorationId=null,this._highlightedDecorationId=null}getCount(){return this._decorations.length}getFindScope(){return this._findScopeDecorationIds[0]?this._editor.getModel().getDecorationRange(this._findScopeDecorationIds[0]):null}getFindScopes(){if(this._findScopeDecorationIds.length){const $=this._findScopeDecorationIds.map(Ee=>this._editor.getModel().getDecorationRange(Ee)).filter(Ee=>!!Ee);if($.length)return $}return null}getStartPosition(){return this._startPosition}setStartPosition($){this._startPosition=$,this.setCurrentFindMatch(null)}_getDecorationIndex($){const Ee=this._decorations.indexOf($);return Ee>=0?Ee+1:1}getCurrentMatchesPosition($){let Ee=this._editor.getModel().getDecorationsInRange($);for(const Ne of Ee){const He=Ne.options;if(He===b._FIND_MATCH_DECORATION||He===b._CURRENT_FIND_MATCH_DECORATION)return this._getDecorationIndex(Ne.id)}return 0}setCurrentFindMatch($){let Ee=null,Ne=0;if($)for(let He=0,at=this._decorations.length;He<at;He++){let vt=this._editor.getModel().getDecorationRange(this._decorations[He]);if($.equalsRange(vt)){Ee=this._decorations[He],Ne=He+1;break}}return(this._highlightedDecorationId!==null||Ee!==null)&&this._editor.changeDecorations(He=>{if(this._highlightedDecorationId!==null&&(He.changeDecorationOptions(this._highlightedDecorationId,b._FIND_MATCH_DECORATION),this._highlightedDecorationId=null),Ee!==null&&(this._highlightedDecorationId=Ee,He.changeDecorationOptions(this._highlightedDecorationId,b._CURRENT_FIND_MATCH_DECORATION)),this._rangeHighlightDecorationId!==null&&(He.removeDecoration(this._rangeHighlightDecorationId),this._rangeHighlightDecorationId=null),Ee!==null){let at=this._editor.getModel().getDecorationRange(Ee);if(at.startLineNumber!==at.endLineNumber&&at.endColumn===1){let vt=at.endLineNumber-1,Xt=this._editor.getModel().getLineMaxColumn(vt);at=new C.a(at.startLineNumber,at.startColumn,vt,Xt)}this._rangeHighlightDecorationId=He.addDecoration(at,b._RANGE_HIGHLIGHT_DECORATION)}}),Ne}set($,Ee){this._editor.changeDecorations(Ne=>{let He=b._FIND_MATCH_DECORATION,at=[];if($.length>1e3){He=b._FIND_MATCH_NO_OVERVIEW_DECORATION;const Xt=this._editor.getModel().getLineCount(),Bt=this._editor.getLayoutInfo().height,Kt=Bt/Xt,ro=Math.max(2,Math.ceil(3/Kt));let F=$[0].range.startLineNumber,te=$[0].range.endLineNumber;for(let Ae=1,Ye=$.length;Ae<Ye;Ae++){const pt=$[Ae].range;te+ro>=pt.startLineNumber?pt.endLineNumber>te&&(te=pt.endLineNumber):(at.push({range:new C.a(F,1,te,1),options:b._FIND_MATCH_ONLY_OVERVIEW_DECORATION}),F=pt.startLineNumber,te=pt.endLineNumber)}at.push({range:new C.a(F,1,te,1),options:b._FIND_MATCH_ONLY_OVERVIEW_DECORATION})}let vt=new Array($.length);for(let Xt=0,Bt=$.length;Xt<Bt;Xt++)vt[Xt]={range:$[Xt].range,options:He};this._decorations=Ne.deltaDecorations(this._decorations,vt),this._overviewRulerApproximateDecorations=Ne.deltaDecorations(this._overviewRulerApproximateDecorations,at),this._rangeHighlightDecorationId&&(Ne.removeDecoration(this._rangeHighlightDecorationId),this._rangeHighlightDecorationId=null),this._findScopeDecorationIds.length&&(this._findScopeDecorationIds.forEach(Xt=>Ne.removeDecoration(Xt)),this._findScopeDecorationIds=[]),(Ee==null?void 0:Ee.length)&&(this._findScopeDecorationIds=Ee.map(Xt=>Ne.addDecoration(Xt,b._FIND_SCOPE_DECORATION)))})}matchBeforePosition($){if(this._decorations.length===0)return null;for(let Ee=this._decorations.length-1;Ee>=0;Ee--){let Ne=this._decorations[Ee],He=this._editor.getModel().getDecorationRange(Ne);if(!He||He.endLineNumber>$.lineNumber)continue;if(He.endLineNumber<$.lineNumber)return He;if(He.endColumn>$.column)continue;return He}return this._editor.getModel().getDecorationRange(this._decorations[this._decorations.length-1])}matchAfterPosition($){if(this._decorations.length===0)return null;for(let Ee=0,Ne=this._decorations.length;Ee<Ne;Ee++){let He=this._decorations[Ee],at=this._editor.getModel().getDecorationRange(He);if(!at||at.startLineNumber<$.lineNumber)continue;if(at.startLineNumber>$.lineNumber)return at;if(at.startColumn<$.column)continue;return at}return this._editor.getModel().getDecorationRange(this._decorations[0])}_allDecorations(){let $=[];return $=$.concat(this._decorations),$=$.concat(this._overviewRulerApproximateDecorations),this._findScopeDecorationIds.length&&$.push(...this._findScopeDecorationIds),this._rangeHighlightDecorationId&&$.push(this._rangeHighlightDecorationId),$}}b._CURRENT_FIND_MATCH_DECORATION=L.b.register({description:"current-find-match",stickiness:1,zIndex:13,className:"currentFindMatch",showIfCollapsed:!0,overviewRuler:{color:Object(w.g)(r.ic),position:D.g.Center},minimap:{color:Object(w.g)(r.Zb),position:D.f.Inline}}),b._FIND_MATCH_DECORATION=L.b.register({description:"find-match",stickiness:1,zIndex:10,className:"findMatch",showIfCollapsed:!0,overviewRuler:{color:Object(w.g)(r.ic),position:D.g.Center},minimap:{color:Object(w.g)(r.Zb),position:D.f.Inline}}),b._FIND_MATCH_NO_OVERVIEW_DECORATION=L.b.register({description:"find-match-no-overview",stickiness:1,className:"findMatch",showIfCollapsed:!0}),b._FIND_MATCH_ONLY_OVERVIEW_DECORATION=L.b.register({description:"find-match-only-overview",stickiness:1,overviewRuler:{color:Object(w.g)(r.ic),position:D.g.Center}}),b._RANGE_HIGHLIGHT_DECORATION=L.b.register({description:"find-range-highlight",stickiness:1,className:"rangeHighlight",isWholeLine:!0}),b._FIND_SCOPE_DECORATION=L.b.register({description:"find-scope",className:"findScope",isWholeLine:!0});class u{constructor($,Ee,Ne){this._editorSelection=$,this._ranges=Ee,this._replaceStrings=Ne,this._trackedEditorSelectionId=null}getEditOperations($,Ee){if(this._ranges.length>0){let Ne=[];for(let vt=0;vt<this._ranges.length;vt++)Ne.push({range:this._ranges[vt],text:this._replaceStrings[vt]});Ne.sort((vt,Xt)=>C.a.compareRangesUsingStarts(vt.range,Xt.range));let He=[],at=Ne[0];for(let vt=1;vt<Ne.length;vt++)at.range.endLineNumber===Ne[vt].range.startLineNumber&&at.range.endColumn===Ne[vt].range.startColumn?(at.range=at.range.plusRange(Ne[vt].range),at.text=at.text+Ne[vt].text):(He.push(at),at=Ne[vt]);He.push(at);for(const vt of He)Ee.addEditOperation(vt.range,vt.text)}this._trackedEditorSelectionId=Ee.trackSelection(this._editorSelection)}computeCursorState($,Ee){return Ee.getTrackedSelection(this._trackedEditorSelectionId)}}function c($,Ee){if($&&$[0]!==""){const Ne=p($,Ee,"-"),He=p($,Ee,"_");return Ne&&!He?S($,Ee,"-"):!Ne&&He?S($,Ee,"_"):$[0].toUpperCase()===$[0]?Ee.toUpperCase():$[0].toLowerCase()===$[0]?Ee.toLowerCase():x.o($[0][0])&&Ee.length>0?Ee[0].toUpperCase()+Ee.substr(1):$[0][0].toUpperCase()!==$[0][0]&&Ee.length>0?Ee[0].toLowerCase()+Ee.substr(1):Ee}else return Ee}function p($,Ee,Ne){const He=$[0].indexOf(Ne)!==-1&&Ee.indexOf(Ne)!==-1;return He&&$[0].split(Ne).length===Ee.split(Ne).length}function S($,Ee,Ne){const He=Ee.split(Ne),at=$[0].split(Ne);let vt="";return He.forEach((Xt,Bt)=>{vt+=c([at[Bt]],Xt)+Ne}),vt.slice(0,-1)}class E{constructor($){this.staticValue=$,this.kind=0}}class y{constructor($){this.pieces=$,this.kind=1}}class O{constructor($){!$||$.length===0?this._state=new E(""):$.length===1&&$[0].staticValue!==null?this._state=new E($[0].staticValue):this._state=new y($)}static fromStaticValue($){return new O([k.staticValue($)])}get hasReplacementPatterns(){return this._state.kind===1}buildReplaceString($,Ee){if(this._state.kind===0)return Ee?c($,this._state.staticValue):this._state.staticValue;let Ne="";for(let He=0,at=this._state.pieces.length;He<at;He++){let vt=this._state.pieces[He];if(vt.staticValue!==null){Ne+=vt.staticValue;continue}let Xt=O._substitute(vt.matchIndex,$);if(vt.caseOps!==null&&vt.caseOps.length>0){let Bt=[],Kt=vt.caseOps.length,ro=0;for(let F=0,te=Xt.length;F<te;F++){if(ro>=Kt){Bt.push(Xt.slice(F));break}switch(vt.caseOps[ro]){case"U":Bt.push(Xt[F].toUpperCase());break;case"u":Bt.push(Xt[F].toUpperCase()),ro++;break;case"L":Bt.push(Xt[F].toLowerCase());break;case"l":Bt.push(Xt[F].toLowerCase()),ro++;break;default:Bt.push(Xt[F])}}Xt=Bt.join("")}Ne+=Xt}return Ne}static _substitute($,Ee){if(Ee===null)return"";if($===0)return Ee[0];let Ne="";for(;$>0;){if($<Ee.length){let He=Ee[$]||"";return He+Ne}Ne=String($%10)+Ne,$=Math.floor($/10)}return"$"+Ne}}class k{constructor($,Ee,Ne){this.staticValue=$,this.matchIndex=Ee,!Ne||Ne.length===0?this.caseOps=null:this.caseOps=Ne.slice(0)}static staticValue($){return new k($,-1,null)}static caseOps($,Ee){return new k(null,$,Ee)}}class Q{constructor($){this._source=$,this._lastCharIndex=0,this._result=[],this._resultLen=0,this._currentStaticPiece=""}emitUnchanged($){this._emitStatic(this._source.substring(this._lastCharIndex,$)),this._lastCharIndex=$}emitStatic($,Ee){this._emitStatic($),this._lastCharIndex=Ee}_emitStatic($){if($.length===0)return;this._currentStaticPiece+=$}emitMatchIndex($,Ee,Ne){this._currentStaticPiece.length!==0&&(this._result[this._resultLen++]=k.staticValue(this._currentStaticPiece),this._currentStaticPiece=""),this._result[this._resultLen++]=k.caseOps($,Ne),this._lastCharIndex=Ee}finalize(){return this.emitUnchanged(this._source.length),this._currentStaticPiece.length!==0&&(this._result[this._resultLen++]=k.staticValue(this._currentStaticPiece),this._currentStaticPiece=""),new O(this._result)}}function q($){if(!$||$.length===0)return new O(null);let Ee=[],Ne=new Q($);for(let He=0,at=$.length;He<at;He++){let vt=$.charCodeAt(He);if(vt===92){if(He++,He>=at)break;let Xt=$.charCodeAt(He);switch(Xt){case 92:Ne.emitUnchanged(He-1),Ne.emitStatic("\\",He+1);break;case 110:Ne.emitUnchanged(He-1),Ne.emitStatic(`
|
|
|
`,He+1);break;case 116:Ne.emitUnchanged(He-1),Ne.emitStatic(" ",He+1);break;case 117:case 85:case 108:case 76:Ne.emitUnchanged(He-1),Ne.emitStatic("",He+1),Ee.push(String.fromCharCode(Xt));break}continue}if(vt===36){if(He++,He>=at)break;let Xt=$.charCodeAt(He);if(Xt===36){Ne.emitUnchanged(He-1),Ne.emitStatic("$",He+1);continue}if(Xt===48||Xt===38){Ne.emitUnchanged(He-1),Ne.emitMatchIndex(0,He+1,Ee),Ee.length=0;continue}if(49<=Xt&&Xt<=57){let Bt=Xt-48;if(He+1<at){let Kt=$.charCodeAt(He+1);if(48<=Kt&&Kt<=57){He++,Bt=Bt*10+(Kt-48),Ne.emitUnchanged(He-2),Ne.emitMatchIndex(Bt,He+1,Ee),Ee.length=0;continue}}Ne.emitUnchanged(He-1),Ne.emitMatchIndex(Bt,He+1,Ee),Ee.length=0;continue}}}return Ne.finalize()}var z=t("T8No");const J=new z.c("findWidgetVisible",!1),re=new z.c("findInputFocussed",!1),Z=new z.c("replaceInputFocussed",!1),ne={primary:512|33,mac:{primary:2048|512|33}},le={primary:512|53,mac:{primary:2048|512|53}},_e={primary:512|48,mac:{primary:2048|512|48}},Ce={primary:512|42,mac:{primary:2048|512|42}},oe={primary:512|46,mac:{primary:2048|512|46}},ae={StartFindAction:"actions.find",StartFindWithSelection:"actions.findWithSelection",NextMatchFindAction:"editor.action.nextMatchFindAction",PreviousMatchFindAction:"editor.action.previousMatchFindAction",NextSelectionMatchFindAction:"editor.action.nextSelectionMatchFindAction",PreviousSelectionMatchFindAction:"editor.action.previousSelectionMatchFindAction",StartFindReplaceAction:"editor.action.startFindReplaceAction",CloseFindWidgetCommand:"closeFindWidget",ToggleCaseSensitiveCommand:"toggleFindCaseSensitive",ToggleWholeWordCommand:"toggleFindWholeWord",ToggleRegexCommand:"toggleFindRegex",ToggleSearchScopeCommand:"toggleFindInSelection",TogglePreserveCaseCommand:"togglePreserveCase",ReplaceOneAction:"editor.action.replaceOne",ReplaceAllAction:"editor.action.replaceAll",SelectAllMatchesAction:"editor.action.selectAllMatches"},V=19999,G=240;class ee{constructor($,Ee){this._toDispose=new B.b,this._editor=$,this._state=Ee,this._isDisposed=!1,this._startSearchingTimer=new g.g,this._decorations=new b($),this._toDispose.add(this._decorations),this._updateDecorationsScheduler=new g.e(()=>this.research(!1),100),this._toDispose.add(this._updateDecorationsScheduler),this._toDispose.add(this._editor.onDidChangeCursorPosition(Ne=>{(Ne.reason===3||Ne.reason===5||Ne.reason===6)&&this._decorations.setStartPosition(this._editor.getPosition())})),this._ignoreModelContentChanged=!1,this._toDispose.add(this._editor.onDidChangeModelContent(Ne=>{if(this._ignoreModelContentChanged)return;Ne.isFlush&&this._decorations.reset(),this._decorations.setStartPosition(this._editor.getPosition()),this._updateDecorationsScheduler.schedule()})),this._toDispose.add(this._state.onFindReplaceStateChange(Ne=>this._onStateChanged(Ne))),this.research(!1,this._state.searchScope)}dispose(){this._isDisposed=!0,Object(B.f)(this._startSearchingTimer),this._toDispose.dispose()}_onStateChanged($){if(this._isDisposed)return;if(!this._editor.hasModel())return;if($.searchString||$.isReplaceRevealed||$.isRegex||$.wholeWord||$.matchCase||$.searchScope){let Ee=this._editor.getModel();Ee.isTooLargeForSyncing()?(this._startSearchingTimer.cancel(),this._startSearchingTimer.setIfNotSet(()=>{$.searchScope?this.research($.moveCursor,this._state.searchScope):this.research($.moveCursor)},G)):$.searchScope?this.research($.moveCursor,this._state.searchScope):this.research($.moveCursor)}}static _getSearchRange($,Ee){return Ee||$.getFullModelRange()}research($,Ee){let Ne=null;typeof Ee!="undefined"?Ee!==null&&(Array.isArray(Ee)?Ne=Ee:Ne=[Ee]):Ne=this._decorations.getFindScopes(),Ne!==null&&(Ne=Ne.map(Xt=>{if(Xt.startLineNumber!==Xt.endLineNumber){let Bt=Xt.endLineNumber;return Xt.endColumn===1&&(Bt=Bt-1),new C.a(Xt.startLineNumber,1,Bt,this._editor.getModel().getLineMaxColumn(Bt))}return Xt}));let He=this._findMatches(Ne,!1,V);this._decorations.set(He,Ne);const at=this._editor.getSelection();let vt=this._decorations.getCurrentMatchesPosition(at);if(vt===0&&He.length>0){const Xt=Object(j.h)(He.map(Bt=>Bt.range),Bt=>C.a.compareRangesUsingStarts(Bt,at)>=0);vt=Xt>0?Xt-1+1:vt}this._state.changeMatchInfo(vt,this._decorations.getCount(),void 0),$&&this._editor.getOption(35).cursorMoveOnType&&this._moveToNextMatch(this._decorations.getStartPosition())}_hasMatches(){return this._state.matchesCount>0}_cannotFind(){if(!this._hasMatches()){let $=this._decorations.getFindScope();return $&&this._editor.revealRangeInCenterIfOutsideViewport($,0),!0}return!1}_setCurrentFindMatch($){let Ee=this._decorations.setCurrentFindMatch($);this._state.changeMatchInfo(Ee,this._decorations.getCount(),$),this._editor.setSelection($),this._editor.revealRangeInCenterIfOutsideViewport($,0)}_prevSearchPosition($){let Ee=this._state.isRegex&&(this._state.searchString.indexOf("^")>=0||this._state.searchString.indexOf("$")>=0),{lineNumber:Ne,column:He}=$,at=this._editor.getModel();return Ee||He===1?(Ne===1?Ne=at.getLineCount():Ne--,He=at.getLineMaxColumn(Ne)):He--,new v.a(Ne,He)}_moveToPrevMatch($,Ee=!1){if(!this._state.canNavigateBack()){const ro=this._decorations.matchAfterPosition($);ro&&this._setCurrentFindMatch(ro);return}if(this._decorations.getCount()<V){let ro=this._decorations.matchBeforePosition($);ro&&ro.isEmpty()&&ro.getStartPosition().equals($)&&($=this._prevSearchPosition($),ro=this._decorations.matchBeforePosition($)),ro&&this._setCurrentFindMatch(ro);return}if(this._cannotFind())return;let Ne=this._decorations.getFindScope(),He=ee._getSearchRange(this._editor.getModel(),Ne);He.getEndPosition().isBefore($)&&($=He.getEndPosition()),$.isBefore(He.getStartPosition())&&($=He.getEndPosition());let{lineNumber:at,column:vt}=$,Xt=this._editor.getModel(),Bt=new v.a(at,vt),Kt=Xt.findPreviousMatch(this._state.searchString,Bt,this._state.isRegex,this._state.matchCase,this._state.wholeWord?this._editor.getOption(115):null,!1);if(Kt&&Kt.range.isEmpty()&&Kt.range.getStartPosition().equals(Bt)&&(Bt=this._prevSearchPosition(Bt),Kt=Xt.findPreviousMatch(this._state.searchString,Bt,this._state.isRegex,this._state.matchCase,this._state.wholeWord?this._editor.getOption(115):null,!1)),!Kt)return;if(!Ee&&!He.containsRange(Kt.range))return this._moveToPrevMatch(Kt.range.getStartPosition(),!0);this._setCurrentFindMatch(Kt.range)}moveToPrevMatch(){this._moveToPrevMatch(this._editor.getSelection().getStartPosition())}_nextSearchPosition($){let Ee=this._state.isRegex&&(this._state.searchString.indexOf("^")>=0||this._state.searchString.indexOf("$")>=0),{lineNumber:Ne,column:He}=$,at=this._editor.getModel();return Ee||He===at.getLineMaxColumn(Ne)?(Ne===at.getLineCount()?Ne=1:Ne++,He=1):He++,new v.a(Ne,He)}_moveToNextMatch($){if(!this._state.canNavigateForward()){const Ne=this._decorations.matchBeforePosition($);Ne&&this._setCurrentFindMatch(Ne);return}if(this._decorations.getCount()<V){let Ne=this._decorations.matchAfterPosition($);Ne&&Ne.isEmpty()&&Ne.getStartPosition().equals($)&&($=this._nextSearchPosition($),Ne=this._decorations.matchAfterPosition($)),Ne&&this._setCurrentFindMatch(Ne);return}let Ee=this._getNextMatch($,!1,!0);Ee&&this._setCurrentFindMatch(Ee.range)}_getNextMatch($,Ee,Ne,He=!1){if(this._cannotFind())return null;let at=this._decorations.getFindScope(),vt=ee._getSearchRange(this._editor.getModel(),at);vt.getEndPosition().isBefore($)&&($=vt.getStartPosition()),$.isBefore(vt.getStartPosition())&&($=vt.getStartPosition());let{lineNumber:Xt,column:Bt}=$,Kt=this._editor.getModel(),ro=new v.a(Xt,Bt),F=Kt.findNextMatch(this._state.searchString,ro,this._state.isRegex,this._state.matchCase,this._state.wholeWord?this._editor.getOption(115):null,Ee);return Ne&&F&&F.range.isEmpty()&&F.range.getStartPosition().equals(ro)&&(ro=this._nextSearchPosition(ro),F=Kt.findNextMatch(this._state.searchString,ro,this._state.isRegex,this._state.matchCase,this._state.wholeWord?this._editor.getOption(115):null,Ee)),F?!He&&!vt.containsRange(F.range)?this._getNextMatch(F.range.getEndPosition(),Ee,Ne,!0):F:null}moveToNextMatch(){this._moveToNextMatch(this._editor.getSelection().getEndPosition())}_getReplacePattern(){return this._state.isRegex?q(this._state.replaceString):O.fromStaticValue(this._state.replaceString)}replace(){if(!this._hasMatches())return;let $=this._getReplacePattern(),Ee=this._editor.getSelection(),Ne=this._getNextMatch(Ee.getStartPosition(),!0,!1);if(Ne)if(Ee.equalsRange(Ne.range)){let He=$.buildReplaceString(Ne.matches,this._state.preserveCase),at=new I.a(Ee,He);this._executeEditorCommand("replace",at),this._decorations.setStartPosition(new v.a(Ee.startLineNumber,Ee.startColumn+He.length)),this.research(!0)}else this._decorations.setStartPosition(this._editor.getPosition()),this._setCurrentFindMatch(Ne.range)}_findMatches($,Ee,Ne){const He=($||[null]).map(at=>ee._getSearchRange(this._editor.getModel(),at));return this._editor.getModel().findMatches(this._state.searchString,He,this._state.isRegex,this._state.matchCase,this._state.wholeWord?this._editor.getOption(115):null,Ee,Ne)}replaceAll(){if(!this._hasMatches())return;const $=this._decorations.getFindScopes();$===null&&this._state.matchesCount>=V?this._largeReplaceAll():this._regularReplaceAll($),this.research(!1)}_largeReplaceAll(){const $=new d.a(this._state.searchString,this._state.isRegex,this._state.matchCase,this._state.wholeWord?this._editor.getOption(115):null),Ee=$.parseSearchRequest();if(!Ee)return;let Ne=Ee.regex;if(!Ne.multiline){let F="mu";Ne.ignoreCase&&(F+="i"),Ne.global&&(F+="g"),Ne=new RegExp(Ne.source,F)}const He=this._editor.getModel(),at=He.getValue(1),vt=He.getFullModelRange(),Xt=this._getReplacePattern();let Bt;const Kt=this._state.preserveCase;Xt.hasReplacementPatterns||Kt?Bt=at.replace(Ne,function(){return Xt.buildReplaceString(arguments,Kt)}):Bt=at.replace(Ne,Xt.buildReplaceString(null,Kt));let ro=new I.b(vt,Bt,this._editor.getSelection());this._executeEditorCommand("replaceAll",ro)}_regularReplaceAll($){const Ee=this._getReplacePattern();let Ne=this._findMatches($,Ee.hasReplacementPatterns||this._state.preserveCase,1073741824),He=[];for(let vt=0,Xt=Ne.length;vt<Xt;vt++)He[vt]=Ee.buildReplaceString(Ne[vt].matches,this._state.preserveCase);let at=new u(this._editor.getSelection(),Ne.map(vt=>vt.range),He);this._executeEditorCommand("replaceAll",at)}selectAllMatches(){if(!this._hasMatches())return;let $=this._decorations.getFindScopes(),Ee=this._findMatches($,!1,1073741824),Ne=Ee.map(at=>new m.a(at.range.startLineNumber,at.range.startColumn,at.range.endLineNumber,at.range.endColumn)),He=this._editor.getSelection();for(let at=0,vt=Ne.length;at<vt;at++){let Xt=Ne[at];if(Xt.equalsRange(He)){Ne=[He].concat(Ne.slice(0,at)).concat(Ne.slice(at+1));break}}this._editor.setSelections(Ne)}_executeEditorCommand($,Ee){try{this._ignoreModelContentChanged=!0,this._editor.pushUndoStop(),this._editor.executeCommand($,Ee),this._editor.pushUndoStop()}finally{this._ignoreModelContentChanged=!1}}}var pe=t("EffR"),Te=t("G300"),Ie=t("Vhoy"),Me=t("zrhQ"),Oe=t("MI8n"),Xe=t("iJk1");const fe={inputActiveOptionBorder:Me.a.fromHex("#007ACC00"),inputActiveOptionForeground:Me.a.fromHex("#FFFFFF"),inputActiveOptionBackground:Me.a.fromHex("#0E639C50")};class Pe extends Te.a{constructor($){super();this._onChange=this._register(new Oe.b),this.onChange=this._onChange.event,this._onKeyDown=this._register(new Oe.b),this.onKeyDown=this._onKeyDown.event,this._opts=Object.assign(Object.assign({},fe),$),this._checked=this._opts.isChecked;const Ee=["monaco-custom-checkbox"];this._opts.icon&&Ee.push(...Ie.a.asClassNameArray(this._opts.icon)),this._opts.actionClassName&&Ee.push(...this._opts.actionClassName.split(" ")),this._checked&&Ee.push("checked"),this.domNode=document.createElement("div"),this.domNode.title=this._opts.title,this.domNode.classList.add(...Ee),this._opts.notFocusable||(this.domNode.tabIndex=0),this.domNode.setAttribute("role","checkbox"),this.domNode.setAttribute("aria-checked",String(this._checked)),this.domNode.setAttribute("aria-label",this._opts.title),this.applyStyles(),this.onclick(this.domNode,Ne=>{this.checked=!this._checked,this._onChange.fire(!1),Ne.preventDefault()}),this.ignoreGesture(this.domNode),this.onkeydown(this.domNode,Ne=>{if(Ne.keyCode===10||Ne.keyCode===3){this.checked=!this._checked,this._onChange.fire(!0),Ne.preventDefault();return}this._onKeyDown.fire(Ne)})}get enabled(){return this.domNode.getAttribute("aria-disabled")!=="true"}focus(){this.domNode.focus()}get checked(){return this._checked}set checked($){this._checked=$,this.domNode.setAttribute("aria-checked",String(this._checked)),this.domNode.classList.toggle("checked",this._checked),this.applyStyles()}width(){return 2+2+2+16}style($){$.inputActiveOptionBorder&&(this._opts.inputActiveOptionBorder=$.inputActiveOptionBorder),$.inputActiveOptionForeground&&(this._opts.inputActiveOptionForeground=$.inputActiveOptionForeground),$.inputActiveOptionBackground&&(this._opts.inputActiveOptionBackground=$.inputActiveOptionBackground),this.applyStyles()}applyStyles(){this.domNode&&(this.domNode.style.borderColor=this._checked&&this._opts.inputActiveOptionBorder?this._opts.inputActiveOptionBorder.toString():"transparent",this.domNode.style.color=this._checked&&this._opts.inputActiveOptionForeground?this._opts.inputActiveOptionForeground.toString():"inherit",this.domNode.style.backgroundColor=this._checked&&this._opts.inputActiveOptionBackground?this._opts.inputActiveOptionBackground.toString():"transparent")}enable(){this.domNode.setAttribute("aria-disabled",String(!1))}disable(){this.domNode.setAttribute("aria-disabled",String(!0))}}var Be=t("3/fG");const Se=Be.a("caseDescription","Match Case"),me=Be.a("wordsDescription","Match Whole Word"),he=Be.a("regexDescription","Use Regular Expression");class Le extends Pe{constructor($){super({icon:Ie.b.caseSensitive,title:Se+$.appendTitle,isChecked:$.isChecked,inputActiveOptionBorder:$.inputActiveOptionBorder,inputActiveOptionForeground:$.inputActiveOptionForeground,inputActiveOptionBackground:$.inputActiveOptionBackground})}}class we extends Pe{constructor($){super({icon:Ie.b.wholeWord,title:me+$.appendTitle,isChecked:$.isChecked,inputActiveOptionBorder:$.inputActiveOptionBorder,inputActiveOptionForeground:$.inputActiveOptionForeground,inputActiveOptionBackground:$.inputActiveOptionBackground})}}class ve extends Pe{constructor($){super({icon:Ie.b.regex,title:he+$.appendTitle,isChecked:$.isChecked,inputActiveOptionBorder:$.inputActiveOptionBorder,inputActiveOptionForeground:$.inputActiveOptionForeground,inputActiveOptionBackground:$.inputActiveOptionBackground})}}class ie extends Te.a{constructor($,Ee,Ne,He){super();this._hideSoon=this._register(new g.e(()=>this._hide(),2e3)),this._isVisible=!1,this._editor=$,this._state=Ee,this._keybindingService=Ne,this._domNode=document.createElement("div"),this._domNode.className="findOptionsWidget",this._domNode.style.display="none",this._domNode.style.top="10px",this._domNode.setAttribute("role","presentation"),this._domNode.setAttribute("aria-hidden","true");const at=He.getColorTheme().getColor(r.fb),vt=He.getColorTheme().getColor(r.gb),Xt=He.getColorTheme().getColor(r.eb);this.caseSensitive=this._register(new Le({appendTitle:this._keybindingLabelFor(ae.ToggleCaseSensitiveCommand),isChecked:this._state.matchCase,inputActiveOptionBorder:at,inputActiveOptionForeground:vt,inputActiveOptionBackground:Xt})),this._domNode.appendChild(this.caseSensitive.domNode),this._register(this.caseSensitive.onChange(()=>{this._state.change({matchCase:this.caseSensitive.checked},!1)})),this.wholeWords=this._register(new we({appendTitle:this._keybindingLabelFor(ae.ToggleWholeWordCommand),isChecked:this._state.wholeWord,inputActiveOptionBorder:at,inputActiveOptionForeground:vt,inputActiveOptionBackground:Xt})),this._domNode.appendChild(this.wholeWords.domNode),this._register(this.wholeWords.onChange(()=>{this._state.change({wholeWord:this.wholeWords.checked},!1)})),this.regex=this._register(new ve({appendTitle:this._keybindingLabelFor(ae.ToggleRegexCommand),isChecked:this._state.isRegex,inputActiveOptionBorder:at,inputActiveOptionForeground:vt,inputActiveOptionBackground:Xt})),this._domNode.appendChild(this.regex.domNode),this._register(this.regex.onChange(()=>{this._state.change({isRegex:this.regex.checked},!1)})),this._editor.addOverlayWidget(this),this._register(this._state.onFindReplaceStateChange(Bt=>{let Kt=!1;Bt.isRegex&&(this.regex.checked=this._state.isRegex,Kt=!0),Bt.wholeWord&&(this.wholeWords.checked=this._state.wholeWord,Kt=!0),Bt.matchCase&&(this.caseSensitive.checked=this._state.matchCase,Kt=!0),!this._state.isRevealed&&Kt&&this._revealTemporarily()})),this._register(pe.j(this._domNode,Bt=>this._onMouseOut())),this._register(pe.i(this._domNode,"mouseover",Bt=>this._onMouseOver())),this._applyTheme(He.getColorTheme()),this._register(He.onDidColorThemeChange(this._applyTheme.bind(this)))}_keybindingLabelFor($){let Ee=this._keybindingService.lookupKeybinding($);return Ee?` (${Ee.getLabel()})`:""}dispose(){this._editor.removeOverlayWidget(this),super.dispose()}getId(){return ie.ID}getDomNode(){return this._domNode}getPosition(){return{preference:0}}highlightFindOptions(){this._revealTemporarily()}_revealTemporarily(){this._show(),this._hideSoon.schedule()}_onMouseOut(){this._hideSoon.schedule()}_onMouseOver(){this._hideSoon.cancel()}_show(){if(this._isVisible)return;this._isVisible=!0,this._domNode.style.display="block"}_hide(){if(!this._isVisible)return;this._isVisible=!1,this._domNode.style.display="none"}_applyTheme($){let Ee={inputActiveOptionBorder:$.getColor(r.fb),inputActiveOptionForeground:$.getColor(r.gb),inputActiveOptionBackground:$.getColor(r.eb)};this.caseSensitive.style(Ee),this.wholeWords.style(Ee),this.regex.style(Ee)}}ie.ID="editor.contrib.findOptionsWidget",Object(w.f)(($,Ee)=>{const Ne=$.getColor(r.W);Ne&&Ee.addRule(`.monaco-editor .findOptionsWidget { background-color: ${Ne}; }`);const He=$.getColor(r.Y);He&&Ee.addRule(`.monaco-editor .findOptionsWidget { color: ${He}; }`);const at=$.getColor(r.Nc);at&&Ee.addRule(`.monaco-editor .findOptionsWidget { box-shadow: 0 0 8px 2px ${at}; }`);const vt=$.getColor(r.h);vt&&Ee.addRule(`.monaco-editor .findOptionsWidget { border: 2px solid ${vt}; }`)});function W($,Ee){return $===1?!0:$===2?!1:Ee}class U extends B.a{constructor(){super();this._onFindReplaceStateChange=this._register(new Oe.b),this.onFindReplaceStateChange=this._onFindReplaceStateChange.event,this._searchString="",this._replaceString="",this._isRevealed=!1,this._isReplaceRevealed=!1,this._isRegex=!1,this._isRegexOverride=0,this._wholeWord=!1,this._wholeWordOverride=0,this._matchCase=!1,this._matchCaseOverride=0,this._preserveCase=!1,this._preserveCaseOverride=0,this._searchScope=null,this._matchesPosition=0,this._matchesCount=0,this._currentMatch=null,this._loop=!0}get searchString(){return this._searchString}get replaceString(){return this._replaceString}get isRevealed(){return this._isRevealed}get isReplaceRevealed(){return this._isReplaceRevealed}get isRegex(){return W(this._isRegexOverride,this._isRegex)}get wholeWord(){return W(this._wholeWordOverride,this._wholeWord)}get matchCase(){return W(this._matchCaseOverride,this._matchCase)}get preserveCase(){return W(this._preserveCaseOverride,this._preserveCase)}get actualIsRegex(){return this._isRegex}get actualWholeWord(){return this._wholeWord}get actualMatchCase(){return this._matchCase}get actualPreserveCase(){return this._preserveCase}get searchScope(){return this._searchScope}get matchesPosition(){return this._matchesPosition}get matchesCount(){return this._matchesCount}get currentMatch(){return this._currentMatch}changeMatchInfo($,Ee,Ne){let He={moveCursor:!1,updateHistory:!1,searchString:!1,replaceString:!1,isRevealed:!1,isReplaceRevealed:!1,isRegex:!1,wholeWord:!1,matchCase:!1,preserveCase:!1,searchScope:!1,matchesPosition:!1,matchesCount:!1,currentMatch:!1,loop:!1},at=!1;Ee===0&&($=0),$>Ee&&($=Ee),this._matchesPosition!==$&&(this._matchesPosition=$,He.matchesPosition=!0,at=!0),this._matchesCount!==Ee&&(this._matchesCount=Ee,He.matchesCount=!0,at=!0),typeof Ne!="undefined"&&(C.a.equalsRange(this._currentMatch,Ne)||(this._currentMatch=Ne,He.currentMatch=!0,at=!0)),at&&this._onFindReplaceStateChange.fire(He)}change($,Ee,Ne=!0){var He;let at={moveCursor:Ee,updateHistory:Ne,searchString:!1,replaceString:!1,isRevealed:!1,isReplaceRevealed:!1,isRegex:!1,wholeWord:!1,matchCase:!1,preserveCase:!1,searchScope:!1,matchesPosition:!1,matchesCount:!1,currentMatch:!1,loop:!1},vt=!1;const Xt=this.isRegex,Bt=this.wholeWord,Kt=this.matchCase,ro=this.preserveCase;typeof $.searchString!="undefined"&&(this._searchString!==$.searchString&&(this._searchString=$.searchString,at.searchString=!0,vt=!0)),typeof $.replaceString!="undefined"&&(this._replaceString!==$.replaceString&&(this._replaceString=$.replaceString,at.replaceString=!0,vt=!0)),typeof $.isRevealed!="undefined"&&(this._isRevealed!==$.isRevealed&&(this._isRevealed=$.isRevealed,at.isRevealed=!0,vt=!0)),typeof $.isReplaceRevealed!="undefined"&&(this._isReplaceRevealed!==$.isReplaceRevealed&&(this._isReplaceRevealed=$.isReplaceRevealed,at.isReplaceRevealed=!0,vt=!0)),typeof $.isRegex!="undefined"&&(this._isRegex=$.isRegex),typeof $.wholeWord!="undefined"&&(this._wholeWord=$.wholeWord),typeof $.matchCase!="undefined"&&(this._matchCase=$.matchCase),typeof $.preserveCase!="undefined"&&(this._preserveCase=$.preserveCase),typeof $.searchScope!="undefined"&&(((He=$.searchScope)===null||He===void 0?void 0:He.every(F=>{var te;return(te=this._searchScope)===null||te===void 0?void 0:te.some(Ae=>!C.a.equalsRange(Ae,F))}))||(this._searchScope=$.searchScope,at.searchScope=!0,vt=!0)),typeof $.loop!="undefined"&&(this._loop!==$.loop&&(this._loop=$.loop,at.loop=!0,vt=!0)),this._isRegexOverride=typeof $.isRegexOverride!="undefined"?$.isRegexOverride:0,this._wholeWordOverride=typeof $.wholeWordOverride!="undefined"?$.wholeWordOverride:0,this._matchCaseOverride=typeof $.matchCaseOverride!="undefined"?$.matchCaseOverride:0,this._preserveCaseOverride=typeof $.preserveCaseOverride!="undefined"?$.preserveCaseOverride:0,Xt!==this.isRegex&&(vt=!0,at.isRegex=!0),Bt!==this.wholeWord&&(vt=!0,at.wholeWord=!0),Kt!==this.matchCase&&(vt=!0,at.matchCase=!0),ro!==this.preserveCase&&(vt=!0,at.preserveCase=!0),vt&&this._onFindReplaceStateChange.fire(at)}canNavigateBack(){return this.canNavigateInLoop()||this.matchesPosition!==1}canNavigateForward(){return this.canNavigateInLoop()||this.matchesPosition<this.matchesCount}canNavigateInLoop(){return this._loop||this.matchesCount>=V}}var se=t("OBOq"),je=t("cMOf"),Re=t("/cxE"),We=t("MNsG"),dt=t("AbCa"),Lt=t("0+8E"),Ht=t("yqFB");const $e=Be.a("defaultLabel","input");class ot extends Te.a{constructor($,Ee,Ne,He){super();this._showOptionButtons=Ne,this.fixFocusOnOptionClickEnabled=!0,this.imeSessionInProgress=!1,this._onDidOptionChange=this._register(new Oe.b),this.onDidOptionChange=this._onDidOptionChange.event,this._onKeyDown=this._register(new Oe.b),this.onKeyDown=this._onKeyDown.event,this._onMouseDown=this._register(new Oe.b),this.onMouseDown=this._onMouseDown.event,this._onInput=this._register(new Oe.b),this._onKeyUp=this._register(new Oe.b),this._onCaseSensitiveKeyDown=this._register(new Oe.b),this.onCaseSensitiveKeyDown=this._onCaseSensitiveKeyDown.event,this._onRegexKeyDown=this._register(new Oe.b),this.onRegexKeyDown=this._onRegexKeyDown.event,this._lastHighlightFindOptions=0,this.contextViewProvider=Ee,this.placeholder=He.placeholder||"",this.validation=He.validation,this.label=He.label||$e,this.inputActiveOptionBorder=He.inputActiveOptionBorder,this.inputActiveOptionForeground=He.inputActiveOptionForeground,this.inputActiveOptionBackground=He.inputActiveOptionBackground,this.inputBackground=He.inputBackground,this.inputForeground=He.inputForeground,this.inputBorder=He.inputBorder,this.inputValidationInfoBorder=He.inputValidationInfoBorder,this.inputValidationInfoBackground=He.inputValidationInfoBackground,this.inputValidationInfoForeground=He.inputValidationInfoForeground,this.inputValidationWarningBorder=He.inputValidationWarningBorder,this.inputValidationWarningBackground=He.inputValidationWarningBackground,this.inputValidationWarningForeground=He.inputValidationWarningForeground,this.inputValidationErrorBorder=He.inputValidationErrorBorder,this.inputValidationErrorBackground=He.inputValidationErrorBackground,this.inputValidationErrorForeground=He.inputValidationErrorForeground;const at=He.appendCaseSensitiveLabel||"",vt=He.appendWholeWordsLabel||"",Xt=He.appendRegexLabel||"",Bt=He.history||[],Kt=!!He.flexibleHeight,ro=!!He.flexibleWidth,F=He.flexibleMaxHeight;this.domNode=document.createElement("div"),this.domNode.classList.add("monaco-findInput"),this.inputBox=this._register(new Lt.a(this.domNode,this.contextViewProvider,{placeholder:this.placeholder||"",ariaLabel:this.label||"",validationOptions:{validation:this.validation},inputBackground:this.inputBackground,inputForeground:this.inputForeground,inputBorder:this.inputBorder,inputValidationInfoBackground:this.inputValidationInfoBackground,inputValidationInfoForeground:this.inputValidationInfoForeground,inputValidationInfoBorder:this.inputValidationInfoBorder,inputValidationWarningBackground:this.inputValidationWarningBackground,inputValidationWarningForeground:this.inputValidationWarningForeground,inputValidationWarningBorder:this.inputValidationWarningBorder,inputValidationErrorBackground:this.inputValidationErrorBackground,inputValidationErrorForeground:this.inputValidationErrorForeground,inputValidationErrorBorder:this.inputValidationErrorBorder,history:Bt,showHistoryHint:He.showHistoryHint,flexibleHeight:Kt,flexibleWidth:ro,flexibleMaxHeight:F})),this.regex=this._register(new ve({appendTitle:Xt,isChecked:!1,inputActiveOptionBorder:this.inputActiveOptionBorder,inputActiveOptionForeground:this.inputActiveOptionForeground,inputActiveOptionBackground:this.inputActiveOptionBackground})),this._register(this.regex.onChange(Ye=>{this._onDidOptionChange.fire(Ye),!Ye&&this.fixFocusOnOptionClickEnabled&&this.inputBox.focus(),this.validate()})),this._register(this.regex.onKeyDown(Ye=>{this._onRegexKeyDown.fire(Ye)})),this.wholeWords=this._register(new we({appendTitle:vt,isChecked:!1,inputActiveOptionBorder:this.inputActiveOptionBorder,inputActiveOptionForeground:this.inputActiveOptionForeground,inputActiveOptionBackground:this.inputActiveOptionBackground})),this._register(this.wholeWords.onChange(Ye=>{this._onDidOptionChange.fire(Ye),!Ye&&this.fixFocusOnOptionClickEnabled&&this.inputBox.focus(),this.validate()})),this.caseSensitive=this._register(new Le({appendTitle:at,isChecked:!1,inputActiveOptionBorder:this.inputActiveOptionBorder,inputActiveOptionForeground:this.inputActiveOptionForeground,inputActiveOptionBackground:this.inputActiveOptionBackground})),this._register(this.caseSensitive.onChange(Ye=>{this._onDidOptionChange.fire(Ye),!Ye&&this.fixFocusOnOptionClickEnabled&&this.inputBox.focus(),this.validate()})),this._register(this.caseSensitive.onKeyDown(Ye=>{this._onCaseSensitiveKeyDown.fire(Ye)})),this._showOptionButtons&&(this.inputBox.paddingRight=this.caseSensitive.width()+this.wholeWords.width()+this.regex.width());let te=[this.caseSensitive.domNode,this.wholeWords.domNode,this.regex.domNode];this.onkeydown(this.domNode,Ye=>{if(Ye.equals(15)||Ye.equals(17)||Ye.equals(9)){let pt=te.indexOf(document.activeElement);if(pt>=0){let Mt=-1;Ye.equals(17)?Mt=(pt+1)%te.length:Ye.equals(15)&&(pt===0?Mt=te.length-1:Mt=pt-1),Ye.equals(9)?(te[pt].blur(),this.inputBox.focus()):Mt>=0&&te[Mt].focus(),pe.c.stop(Ye,!0)}}});let Ae=document.createElement("div");Ae.className="controls",Ae.style.display=this._showOptionButtons?"block":"none",Ae.appendChild(this.caseSensitive.domNode),Ae.appendChild(this.wholeWords.domNode),Ae.appendChild(this.regex.domNode),this.domNode.appendChild(Ae),$&&$.appendChild(this.domNode),this._register(pe.i(this.inputBox.inputElement,"compositionstart",Ye=>{this.imeSessionInProgress=!0})),this._register(pe.i(this.inputBox.inputElement,"compositionend",Ye=>{this.imeSessionInProgress=!1,this._onInput.fire()})),this.onkeydown(this.inputBox.inputElement,Ye=>this._onKeyDown.fire(Ye)),this.onkeyup(this.inputBox.inputElement,Ye=>this._onKeyUp.fire(Ye)),this.oninput(this.inputBox.inputElement,Ye=>this._onInput.fire()),this.onmousedown(this.inputBox.inputElement,Ye=>this._onMouseDown.fire(Ye))}enable(){this.domNode.classList.remove("disabled"),this.inputBox.enable(),this.regex.enable(),this.wholeWords.enable(),this.caseSensitive.enable()}disable(){this.domNode.classList.add("disabled"),this.inputBox.disable(),this.regex.disable(),this.wholeWords.disable(),this.caseSensitive.disable()}setFocusInputOnOptionClick($){this.fixFocusOnOptionClickEnabled=$}setEnabled($){$?this.enable():this.disable()}getValue(){return this.inputBox.value}setValue($){this.inputBox.value!==$&&(this.inputBox.value=$)}style($){this.inputActiveOptionBorder=$.inputActiveOptionBorder,this.inputActiveOptionForeground=$.inputActiveOptionForeground,this.inputActiveOptionBackground=$.inputActiveOptionBackground,this.inputBackground=$.inputBackground,this.inputForeground=$.inputForeground,this.inputBorder=$.inputBorder,this.inputValidationInfoBackground=$.inputValidationInfoBackground,this.inputValidationInfoForeground=$.inputValidationInfoForeground,this.inputValidationInfoBorder=$.inputValidationInfoBorder,this.inputValidationWarningBackground=$.inputValidationWarningBackground,this.inputValidationWarningForeground=$.inputValidationWarningForeground,this.inputValidationWarningBorder=$.inputValidationWarningBorder,this.inputValidationErrorBackground=$.inputValidationErrorBackground,this.inputValidationErrorForeground=$.inputValidationErrorForeground,this.inputValidationErrorBorder=$.inputValidationErrorBorder,this.applyStyles()}applyStyles(){if(this.domNode){const $={inputActiveOptionBorder:this.inputActiveOptionBorder,inputActiveOptionForeground:this.inputActiveOptionForeground,inputActiveOptionBackground:this.inputActiveOptionBackground};this.regex.style($),this.wholeWords.style($),this.caseSensitive.style($);const Ee={inputBackground:this.inputBackground,inputForeground:this.inputForeground,inputBorder:this.inputBorder,inputValidationInfoBackground:this.inputValidationInfoBackground,inputValidationInfoForeground:this.inputValidationInfoForeground,inputValidationInfoBorder:this.inputValidationInfoBorder,inputValidationWarningBackground:this.inputValidationWarningBackground,inputValidationWarningForeground:this.inputValidationWarningForeground,inputValidationWarningBorder:this.inputValidationWarningBorder,inputValidationErrorBackground:this.inputValidationErrorBackground,inputValidationErrorForeground:this.inputValidationErrorForeground,inputValidationErrorBorder:this.inputValidationErrorBorder};this.inputBox.style(Ee)}}select(){this.inputBox.select()}focus(){this.inputBox.focus()}getCaseSensitive(){return this.caseSensitive.checked}setCaseSensitive($){this.caseSensitive.checked=$}getWholeWords(){return this.wholeWords.checked}setWholeWords($){this.wholeWords.checked=$}getRegex(){return this.regex.checked}setRegex($){this.regex.checked=$,this.validate()}focusOnCaseSensitive(){this.caseSensitive.focus()}highlightFindOptions(){this.domNode.classList.remove("highlight-"+this._lastHighlightFindOptions),this._lastHighlightFindOptions=1-this._lastHighlightFindOptions,this.domNode.classList.add("highlight-"+this._lastHighlightFindOptions)}validate(){this.inputBox.validate()}clearMessage(){this.inputBox.hideMessage()}}const ce=Be.a("defaultLabel","input"),Ve=Be.a("label.preserveCaseCheckbox","Preserve Case");class it extends Pe{constructor($){super({icon:Ie.b.preserveCase,title:Ve+$.appendTitle,isChecked:$.isChecked,inputActiveOptionBorder:$.inputActiveOptionBorder,inputActiveOptionForeground:$.inputActiveOptionForeground,inputActiveOptionBackground:$.inputActiveOptionBackground})}}class Et extends Te.a{constructor($,Ee,Ne,He){super();this._showOptionButtons=Ne,this.fixFocusOnOptionClickEnabled=!0,this.cachedOptionsWidth=0,this._onDidOptionChange=this._register(new Oe.b),this.onDidOptionChange=this._onDidOptionChange.event,this._onKeyDown=this._register(new Oe.b),this.onKeyDown=this._onKeyDown.event,this._onMouseDown=this._register(new Oe.b),this._onInput=this._register(new Oe.b),this._onKeyUp=this._register(new Oe.b),this._onPreserveCaseKeyDown=this._register(new Oe.b),this.onPreserveCaseKeyDown=this._onPreserveCaseKeyDown.event,this.contextViewProvider=Ee,this.placeholder=He.placeholder||"",this.validation=He.validation,this.label=He.label||ce,this.inputActiveOptionBorder=He.inputActiveOptionBorder,this.inputActiveOptionForeground=He.inputActiveOptionForeground,this.inputActiveOptionBackground=He.inputActiveOptionBackground,this.inputBackground=He.inputBackground,this.inputForeground=He.inputForeground,this.inputBorder=He.inputBorder,this.inputValidationInfoBorder=He.inputValidationInfoBorder,this.inputValidationInfoBackground=He.inputValidationInfoBackground,this.inputValidationInfoForeground=He.inputValidationInfoForeground,this.inputValidationWarningBorder=He.inputValidationWarningBorder,this.inputValidationWarningBackground=He.inputValidationWarningBackground,this.inputValidationWarningForeground=He.inputValidationWarningForeground,this.inputValidationErrorBorder=He.inputValidationErrorBorder,this.inputValidationErrorBackground=He.inputValidationErrorBackground,this.inputValidationErrorForeground=He.inputValidationErrorForeground;const at=He.appendPreserveCaseLabel||"",vt=He.history||[],Xt=!!He.flexibleHeight,Bt=!!He.flexibleWidth,Kt=He.flexibleMaxHeight;this.domNode=document.createElement("div"),this.domNode.classList.add("monaco-findInput"),this.inputBox=this._register(new Lt.a(this.domNode,this.contextViewProvider,{ariaLabel:this.label||"",placeholder:this.placeholder||"",validationOptions:{validation:this.validation},inputBackground:this.inputBackground,inputForeground:this.inputForeground,inputBorder:this.inputBorder,inputValidationInfoBackground:this.inputValidationInfoBackground,inputValidationInfoForeground:this.inputValidationInfoForeground,inputValidationInfoBorder:this.inputValidationInfoBorder,inputValidationWarningBackground:this.inputValidationWarningBackground,inputValidationWarningForeground:this.inputValidationWarningForeground,inputValidationWarningBorder:this.inputValidationWarningBorder,inputValidationErrorBackground:this.inputValidationErrorBackground,inputValidationErrorForeground:this.inputValidationErrorForeground,inputValidationErrorBorder:this.inputValidationErrorBorder,history:vt,showHistoryHint:He.showHistoryHint,flexibleHeight:Xt,flexibleWidth:Bt,flexibleMaxHeight:Kt})),this.preserveCase=this._register(new it({appendTitle:at,isChecked:!1,inputActiveOptionBorder:this.inputActiveOptionBorder,inputActiveOptionForeground:this.inputActiveOptionForeground,inputActiveOptionBackground:this.inputActiveOptionBackground})),this._register(this.preserveCase.onChange(te=>{this._onDidOptionChange.fire(te),!te&&this.fixFocusOnOptionClickEnabled&&this.inputBox.focus(),this.validate()})),this._register(this.preserveCase.onKeyDown(te=>{this._onPreserveCaseKeyDown.fire(te)})),this._showOptionButtons?this.cachedOptionsWidth=this.preserveCase.width():this.cachedOptionsWidth=0;let ro=[this.preserveCase.domNode];this.onkeydown(this.domNode,te=>{if(te.equals(15)||te.equals(17)||te.equals(9)){let Ae=ro.indexOf(document.activeElement);if(Ae>=0){let Ye=-1;te.equals(17)?Ye=(Ae+1)%ro.length:te.equals(15)&&(Ae===0?Ye=ro.length-1:Ye=Ae-1),te.equals(9)?(ro[Ae].blur(),this.inputBox.focus()):Ye>=0&&ro[Ye].focus(),pe.c.stop(te,!0)}}});let F=document.createElement("div");F.className="controls",F.style.display=this._showOptionButtons?"block":"none",F.appendChild(this.preserveCase.domNode),this.domNode.appendChild(F),$&&$.appendChild(this.domNode),this.onkeydown(this.inputBox.inputElement,te=>this._onKeyDown.fire(te)),this.onkeyup(this.inputBox.inputElement,te=>this._onKeyUp.fire(te)),this.oninput(this.inputBox.inputElement,te=>this._onInput.fire()),this.onmousedown(this.inputBox.inputElement,te=>this._onMouseDown.fire(te))}enable(){this.domNode.classList.remove("disabled"),this.inputBox.enable(),this.preserveCase.enable()}disable(){this.domNode.classList.add("disabled"),this.inputBox.disable(),this.preserveCase.disable()}setEnabled($){$?this.enable():this.disable()}style($){this.inputActiveOptionBorder=$.inputActiveOptionBorder,this.inputActiveOptionForeground=$.inputActiveOptionForeground,this.inputActiveOptionBackground=$.inputActiveOptionBackground,this.inputBackground=$.inputBackground,this.inputForeground=$.inputForeground,this.inputBorder=$.inputBorder,this.inputValidationInfoBackground=$.inputValidationInfoBackground,this.inputValidationInfoForeground=$.inputValidationInfoForeground,this.inputValidationInfoBorder=$.inputValidationInfoBorder,this.inputValidationWarningBackground=$.inputValidationWarningBackground,this.inputValidationWarningForeground=$.inputValidationWarningForeground,this.inputValidationWarningBorder=$.inputValidationWarningBorder,this.inputValidationErrorBackground=$.inputValidationErrorBackground,this.inputValidationErrorForeground=$.inputValidationErrorForeground,this.inputValidationErrorBorder=$.inputValidationErrorBorder,this.applyStyles()}applyStyles(){if(this.domNode){const $={inputActiveOptionBorder:this.inputActiveOptionBorder,inputActiveOptionForeground:this.inputActiveOptionForeground,inputActiveOptionBackground:this.inputActiveOptionBackground};this.preserveCase.style($);const Ee={inputBackground:this.inputBackground,inputForeground:this.inputForeground,inputBorder:this.inputBorder,inputValidationInfoBackground:this.inputValidationInfoBackground,inputValidationInfoForeground:this.inputValidationInfoForeground,inputValidationInfoBorder:this.inputValidationInfoBorder,inputValidationWarningBackground:this.inputValidationWarningBackground,inputValidationWarningForeground:this.inputValidationWarningForeground,inputValidationWarningBorder:this.inputValidationWarningBorder,inputValidationErrorBackground:this.inputValidationErrorBackground,inputValidationErrorForeground:this.inputValidationErrorForeground,inputValidationErrorBorder:this.inputValidationErrorBorder};this.inputBox.style(Ee)}}select(){this.inputBox.select()}focus(){this.inputBox.focus()}getPreserveCase(){return this.preserveCase.checked}setPreserveCase($){this.preserveCase.checked=$}focusOnPreserve(){this.preserveCase.focus()}validate(){this.inputBox&&this.inputBox.validate()}set width($){this.inputBox.paddingRight=this.cachedOptionsWidth,this.inputBox.width=$,this.domNode.style.width=$+"px"}dispose(){super.dispose()}}var It=t("nrhi"),Rt=t("QVNv"),vo=function($,Ee,Ne,He){var at=arguments.length,vt=at<3?Ee:He===null?He=Object.getOwnPropertyDescriptor(Ee,Ne):He,Xt;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")vt=Reflect.decorate($,Ee,Ne,He);else for(var Bt=$.length-1;Bt>=0;Bt--)(Xt=$[Bt])&&(vt=(at<3?Xt(vt):at>3?Xt(Ee,Ne,vt):Xt(Ee,Ne))||vt);return at>3&&vt&&Object.defineProperty(Ee,Ne,vt),vt},Mo=function($,Ee){return function(Ne,He){Ee(Ne,He,$)}};const xo="historyNavigationWidget",Do="historyNavigationForwardsEnabled",Lo="historyNavigationBackwardsEnabled";function To($,Ee,Ne){new z.c(Ne,Ee).bindTo($)}function Vt($,Ee){return $.createScoped(Ee.target)}function xt($,Ee){return $.getContext(document.activeElement).getValue(Ee)}function ze($,Ee){const Ne=Vt($,Ee);To(Ne,Ee,xo);const He=new z.c(Do,!0).bindTo(Ne),at=new z.c(Lo,!0).bindTo(Ne);return{scopedContextKeyService:Ne,historyNavigationForwardsEnablement:He,historyNavigationBackwardsEnablement:at}}let ct=class extends ot{constructor(Ee,Ne,He,at,vt=!1){super(Ee,Ne,vt,He);this._register(ze(at,{target:this.inputBox.element,historyNavigator:this.inputBox}).scopedContextKeyService)}};ct=vo([Mo(3,z.b)],ct);let Ut=class extends Et{constructor(Ee,Ne,He,at,vt=!1){super(Ee,Ne,vt,He);this._register(ze(at,{target:this.inputBox.element,historyNavigator:this.inputBox}).scopedContextKeyService)}};Ut=vo([Mo(3,z.b)],Ut),It.a.registerCommandAndKeybindingRule({id:"history.showPrevious",weight:200,when:z.a.and(z.a.has(xo),z.a.equals(Lo,!0),Rt.b.Visible.isEqualTo(!1)),primary:16,secondary:[512|16],handler:$=>{const Ee=xt($.get(z.b),xo);if(Ee){const Ne=Ee.historyNavigator;Ne.showPreviousValue()}}}),It.a.registerCommandAndKeybindingRule({id:"history.showNext",weight:200,when:z.a.and(z.a.has(xo),z.a.equals(Do,!0),Rt.b.Visible.isEqualTo(!1)),primary:18,secondary:[512|18],handler:$=>{const Ee=xt($.get(z.b),xo);if(Ee){const Ne=Ee.historyNavigator;Ne.showNextValue()}}});function Qe($){var Ee,Ne;return((Ee=$.lookupKeybinding("history.showPrevious"))===null||Ee===void 0?void 0:Ee.getElectronAccelerator())==="Up"&&((Ne=$.lookupKeybinding("history.showNext"))===null||Ne===void 0?void 0:Ne.getElectronAccelerator())==="Down"}var tt=t("v1vZ"),ut=function($,Ee,Ne,He){function at(vt){return vt instanceof Ne?vt:new Ne(function(Xt){Xt(vt)})}return new(Ne||(Ne=Promise))(function(vt,Xt){function Bt(F){try{ro(He.next(F))}catch(te){Xt(te)}}function Kt(F){try{ro(He.throw(F))}catch(te){Xt(te)}}function ro(F){F.done?vt(F.value):at(F.value).then(Bt,Kt)}ro((He=He.apply($,Ee||[])).next())})};const Dt=Object(tt.b)("find-selection",Ie.b.selection,Be.a("findSelectionIcon","Icon for 'Find in Selection' in the editor find widget.")),Pt=Object(tt.b)("find-collapsed",Ie.b.chevronRight,Be.a("findCollapsedIcon","Icon to indicate that the editor find widget is collapsed.")),Wt=Object(tt.b)("find-expanded",Ie.b.chevronDown,Be.a("findExpandedIcon","Icon to indicate that the editor find widget is expanded.")),zt=Object(tt.b)("find-replace",Ie.b.replace,Be.a("findReplaceIcon","Icon for 'Replace' in the editor find widget.")),so=Object(tt.b)("find-replace-all",Ie.b.replaceAll,Be.a("findReplaceAllIcon","Icon for 'Replace All' in the editor find widget.")),wo=Object(tt.b)("find-previous-match",Ie.b.arrowUp,Be.a("findPreviousMatchIcon","Icon for 'Find Previous' in the editor find widget.")),No=Object(tt.b)("find-next-match",Ie.b.arrowDown,Be.a("findNextMatchIcon","Icon for 'Find Next' in the editor find widget.")),di=Be.a("label.find","Find"),_o=Be.a("placeholder.find","Find"),no=Be.a("label.previousMatchButton","Previous Match"),_t=Be.a("label.nextMatchButton","Next Match"),Tt=Be.a("label.toggleSelectionFind","Find in Selection"),Nt=Be.a("label.closeButton","Close"),rt=Be.a("label.replace","Replace"),lt=Be.a("placeholder.replace","Replace"),bt=Be.a("label.replaceButton","Replace"),St=Be.a("label.replaceAllButton","Replace All"),Qt=Be.a("label.toggleReplaceButton","Toggle Replace"),bo=Be.a("title.matchesCountLimit","Only the first {0} results are highlighted, but all find operations work on the entire text.",V),qt=Be.a("label.matchesLocation","{0} of {1}"),Eo=Be.a("label.noResults","No results"),Ro=419,zo=275,Bo=zo-54;let Jt=69;const fo=33,ri="ctrlEnterReplaceAll.windows.donotask",Zo=We.f?256:2048;class ci{constructor($){this.afterLineNumber=$,this.heightInPx=fo,this.suppressMouseDown=!1,this.domNode=document.createElement("div"),this.domNode.className="dock-find-viewzone"}}function ki($,Ee,Ne){const He=!!Ee.match(/\n/);if(Ne&&He&&Ne.selectionStart>0){$.stopPropagation();return}}function wi($,Ee,Ne){const He=!!Ee.match(/\n/);if(Ne&&He&&Ne.selectionEnd<Ne.value.length){$.stopPropagation();return}}class Zi extends Te.a{constructor($,Ee,Ne,He,at,vt,Xt,Bt,Kt){super();this._cachedHeight=null,this._revealTimeouts=[],this._codeEditor=$,this._controller=Ee,this._state=Ne,this._contextViewProvider=He,this._keybindingService=at,this._contextKeyService=vt,this._storageService=Bt,this._notificationService=Kt,this._ctrlEnterReplaceAllWarningPrompted=!!Bt.getBoolean(ri,0),this._isVisible=!1,this._isReplaceVisible=!1,this._ignoreChangeEvent=!1,this._updateHistoryDelayer=new g.a(500),this._register(Object(B.i)(()=>this._updateHistoryDelayer.cancel())),this._register(this._state.onFindReplaceStateChange(ro=>this._onStateChanged(ro))),this._buildDomNode(),this._updateButtons(),this._tryUpdateWidgetWidth(),this._findInput.inputBox.layout(),this._register(this._codeEditor.onDidChangeConfiguration(ro=>{if(ro.hasChanged(80)&&(this._codeEditor.getOption(80)&&this._state.change({isReplaceRevealed:!1},!1),this._updateButtons()),ro.hasChanged(129)&&this._tryUpdateWidgetWidth(),ro.hasChanged(2)&&this.updateAccessibilitySupport(),ro.hasChanged(35)){const F=this._codeEditor.getOption(35).addExtraSpaceOnTop;F&&!this._viewZone&&(this._viewZone=new ci(0),this._showViewZone()),!F&&this._viewZone&&this._removeViewZone()}})),this.updateAccessibilitySupport(),this._register(this._codeEditor.onDidChangeCursorSelection(()=>{this._isVisible&&this._updateToggleSelectionFindButton()})),this._register(this._codeEditor.onDidFocusEditorWidget(()=>ut(this,void 0,void 0,function*(){if(this._isVisible){let ro=yield this._controller.getGlobalBufferTerm();ro&&ro!==this._state.searchString&&(this._state.change({searchString:ro},!1),this._findInput.select())}}))),this._findInputFocused=re.bindTo(vt),this._findFocusTracker=this._register(pe.Y(this._findInput.inputBox.inputElement)),this._register(this._findFocusTracker.onDidFocus(()=>{this._findInputFocused.set(!0),this._updateSearchScope()})),this._register(this._findFocusTracker.onDidBlur(()=>{this._findInputFocused.set(!1)})),this._replaceInputFocused=Z.bindTo(vt),this._replaceFocusTracker=this._register(pe.Y(this._replaceInput.inputBox.inputElement)),this._register(this._replaceFocusTracker.onDidFocus(()=>{this._replaceInputFocused.set(!0),this._updateSearchScope()})),this._register(this._replaceFocusTracker.onDidBlur(()=>{this._replaceInputFocused.set(!1)})),this._codeEditor.addOverlayWidget(this),this._codeEditor.getOption(35).addExtraSpaceOnTop&&(this._viewZone=new ci(0)),this._applyTheme(Xt.getColorTheme()),this._register(Xt.onDidColorThemeChange(this._applyTheme.bind(this))),this._register(this._codeEditor.onDidChangeModel(()=>{if(!this._isVisible)return;this._viewZoneId=void 0})),this._register(this._codeEditor.onDidScrollChange(ro=>{if(ro.scrollTopChanged){this._layoutViewZone();return}setTimeout(()=>{this._layoutViewZone()},0)}))}getId(){return Zi.ID}getDomNode(){return this._domNode}getPosition(){return this._isVisible?{preference:0}:null}_onStateChanged($){if($.searchString){try{this._ignoreChangeEvent=!0,this._findInput.setValue(this._state.searchString)}finally{this._ignoreChangeEvent=!1}this._updateButtons()}if($.replaceString&&(this._replaceInput.inputBox.value=this._state.replaceString),$.isRevealed&&(this._state.isRevealed?this._reveal():this._hide(!0)),$.isReplaceRevealed&&(this._state.isReplaceRevealed?!this._codeEditor.getOption(80)&&!this._isReplaceVisible&&(this._isReplaceVisible=!0,this._replaceInput.width=pe.I(this._findInput.domNode),this._updateButtons(),this._replaceInput.inputBox.layout()):this._isReplaceVisible&&(this._isReplaceVisible=!1,this._updateButtons())),($.isRevealed||$.isReplaceRevealed)&&(this._state.isRevealed||this._state.isReplaceRevealed)&&(this._tryUpdateHeight()&&this._showViewZone()),$.isRegex&&this._findInput.setRegex(this._state.isRegex),$.wholeWord&&this._findInput.setWholeWords(this._state.wholeWord),$.matchCase&&this._findInput.setCaseSensitive(this._state.matchCase),$.preserveCase&&this._replaceInput.setPreserveCase(this._state.preserveCase),$.searchScope&&(this._state.searchScope?this._toggleSelectionFind.checked=!0:this._toggleSelectionFind.checked=!1,this._updateToggleSelectionFindButton()),$.searchString||$.matchesCount||$.matchesPosition){let Ee=this._state.searchString.length>0&&this._state.matchesCount===0;this._domNode.classList.toggle("no-results",Ee),this._updateMatchesCount(),this._updateButtons()}($.searchString||$.currentMatch)&&this._layoutViewZone(),$.updateHistory&&this._delayedUpdateHistory(),$.loop&&this._updateButtons()}_delayedUpdateHistory(){this._updateHistoryDelayer.trigger(this._updateHistory.bind(this)).then(void 0,Re.f)}_updateHistory(){this._state.searchString&&this._findInput.inputBox.addToHistory(),this._state.replaceString&&this._replaceInput.inputBox.addToHistory()}_updateMatchesCount(){this._matchesCount.style.minWidth=Jt+"px",this._state.matchesCount>=V?this._matchesCount.title=bo:this._matchesCount.title="",this._matchesCount.firstChild&&this._matchesCount.removeChild(this._matchesCount.firstChild);let $;if(this._state.matchesCount>0){let Ee=String(this._state.matchesCount);this._state.matchesCount>=V&&(Ee+="+");let Ne=String(this._state.matchesPosition);Ne==="0"&&(Ne="?"),$=x.v(qt,Ne,Ee)}else $=Eo;this._matchesCount.appendChild(document.createTextNode($)),Object(se.a)(this._getAriaLabel($,this._state.currentMatch,this._state.searchString)),Jt=Math.max(Jt,this._matchesCount.clientWidth)}_getAriaLabel($,Ee,Ne){if($===Eo)return Ne===""?Be.a("ariaSearchNoResultEmpty","{0} found",$):Be.a("ariaSearchNoResult","{0} found for '{1}'",$,Ne);if(Ee){const He=Be.a("ariaSearchNoResultWithLineNum","{0} found for '{1}', at {2}",$,Ne,Ee.startLineNumber+":"+Ee.startColumn),at=this._codeEditor.getModel();if(at&&Ee.startLineNumber<=at.getLineCount()&&Ee.startLineNumber>=1){const vt=at.getLineContent(Ee.startLineNumber);return`${vt}, ${He}`}return He}return Be.a("ariaSearchNoResultWithLineNumNoCurrentMatch","{0} found for '{1}'",$,Ne)}_updateToggleSelectionFindButton(){let $=this._codeEditor.getSelection(),Ee=$?$.startLineNumber!==$.endLineNumber||$.startColumn!==$.endColumn:!1,Ne=this._toggleSelectionFind.checked;this._isVisible&&(Ne||Ee)?this._toggleSelectionFind.enable():this._toggleSelectionFind.disable()}_updateButtons(){this._findInput.setEnabled(this._isVisible),this._replaceInput.setEnabled(this._isVisible&&this._isReplaceVisible),this._updateToggleSelectionFindButton(),this._closeBtn.setEnabled(this._isVisible);let $=this._state.searchString.length>0,Ee=!!this._state.matchesCount;this._prevBtn.setEnabled(this._isVisible&&$&&Ee&&this._state.canNavigateBack()),this._nextBtn.setEnabled(this._isVisible&&$&&Ee&&this._state.canNavigateForward()),this._replaceBtn.setEnabled(this._isVisible&&this._isReplaceVisible&&$),this._replaceAllBtn.setEnabled(this._isVisible&&this._isReplaceVisible&&$),this._domNode.classList.toggle("replaceToggled",this._isReplaceVisible),this._toggleReplaceBtn.setExpanded(this._isReplaceVisible);let Ne=!this._codeEditor.getOption(80);this._toggleReplaceBtn.setEnabled(this._isVisible&&Ne)}_reveal(){if(this._revealTimeouts.forEach($=>{clearTimeout($)}),this._revealTimeouts=[],!this._isVisible){this._isVisible=!0;const $=this._codeEditor.getSelection();switch(this._codeEditor.getOption(35).autoFindInSelection){case"always":this._toggleSelectionFind.checked=!0;break;case"never":this._toggleSelectionFind.checked=!1;break;case"multiline":const Ne=!!$&&$.startLineNumber!==$.endLineNumber;this._toggleSelectionFind.checked=Ne;break;default:break}this._tryUpdateWidgetWidth(),this._updateButtons(),this._revealTimeouts.push(setTimeout(()=>{this._domNode.classList.add("visible"),this._domNode.setAttribute("aria-hidden","false")},0)),this._revealTimeouts.push(setTimeout(()=>{this._findInput.validate()},200)),this._codeEditor.layoutOverlayWidget(this);let Ee=!0;if(this._codeEditor.getOption(35).seedSearchStringFromSelection&&$){const Ne=this._codeEditor.getDomNode();if(Ne){const He=pe.D(Ne),at=this._codeEditor.getScrolledVisiblePosition($.getStartPosition()),vt=He.left+(at?at.left:0),Xt=at?at.top:0;if(this._viewZone&&Xt<this._viewZone.heightInPx){$.endLineNumber>$.startLineNumber&&(Ee=!1);const Bt=pe.G(this._domNode).left;vt>Bt&&(Ee=!1);const Kt=this._codeEditor.getScrolledVisiblePosition($.getEndPosition()),ro=He.left+(Kt?Kt.left:0);ro>Bt&&(Ee=!1)}}}this._showViewZone(Ee)}}_hide($){this._revealTimeouts.forEach(Ee=>{clearTimeout(Ee)}),this._revealTimeouts=[],this._isVisible&&(this._isVisible=!1,this._updateButtons(),this._domNode.classList.remove("visible"),this._domNode.setAttribute("aria-hidden","true"),this._findInput.clearMessage(),$&&this._codeEditor.focus(),this._codeEditor.layoutOverlayWidget(this),this._removeViewZone())}_layoutViewZone($){const Ee=this._codeEditor.getOption(35).addExtraSpaceOnTop;if(!Ee){this._removeViewZone();return}if(!this._isVisible)return;const Ne=this._viewZone;if(this._viewZoneId!==void 0||!Ne)return;this._codeEditor.changeViewZones(He=>{Ne.heightInPx=this._getHeight(),this._viewZoneId=He.addZone(Ne),this._codeEditor.setScrollTop($||this._codeEditor.getScrollTop()+Ne.heightInPx)})}_showViewZone($=!0){if(!this._isVisible)return;const Ee=this._codeEditor.getOption(35).addExtraSpaceOnTop;if(!Ee)return;this._viewZone===void 0&&(this._viewZone=new ci(0));const Ne=this._viewZone;this._codeEditor.changeViewZones(He=>{if(this._viewZoneId!==void 0){const at=this._getHeight();if(at===Ne.heightInPx)return;let vt=at-Ne.heightInPx;Ne.heightInPx=at,He.layoutZone(this._viewZoneId),$&&this._codeEditor.setScrollTop(this._codeEditor.getScrollTop()+vt);return}else{let at=this._getHeight();if(at-=this._codeEditor.getOption(74).top,at<=0)return;Ne.heightInPx=at,this._viewZoneId=He.addZone(Ne),$&&this._codeEditor.setScrollTop(this._codeEditor.getScrollTop()+at)}})}_removeViewZone(){this._codeEditor.changeViewZones($=>{this._viewZoneId!==void 0&&($.removeZone(this._viewZoneId),this._viewZoneId=void 0,this._viewZone&&(this._codeEditor.setScrollTop(this._codeEditor.getScrollTop()-this._viewZone.heightInPx),this._viewZone=void 0))})}_applyTheme($){let Ee={inputActiveOptionBorder:$.getColor(r.fb),inputActiveOptionBackground:$.getColor(r.eb),inputActiveOptionForeground:$.getColor(r.gb),inputBackground:$.getColor(r.hb),inputForeground:$.getColor(r.jb),inputBorder:$.getColor(r.ib),inputValidationInfoBackground:$.getColor(r.nb),inputValidationInfoForeground:$.getColor(r.pb),inputValidationInfoBorder:$.getColor(r.ob),inputValidationWarningBackground:$.getColor(r.qb),inputValidationWarningForeground:$.getColor(r.sb),inputValidationWarningBorder:$.getColor(r.rb),inputValidationErrorBackground:$.getColor(r.kb),inputValidationErrorForeground:$.getColor(r.mb),inputValidationErrorBorder:$.getColor(r.lb)};this._findInput.style(Ee),this._replaceInput.style(Ee),this._toggleSelectionFind.style(Ee)}_tryUpdateWidgetWidth(){if(!this._isVisible)return;if(!pe.N(this._domNode))return;const $=this._codeEditor.getLayoutInfo(),Ee=$.contentWidth;if(Ee<=0){this._domNode.classList.add("hiddenEditor");return}else this._domNode.classList.contains("hiddenEditor")&&this._domNode.classList.remove("hiddenEditor");const Ne=$.width,He=$.minimap.minimapWidth;let at=!1,vt=!1,Xt=!1;if(this._resized){let Bt=pe.I(this._domNode);if(Bt>Ro){this._domNode.style.maxWidth=`${Ne-28-He-15}px`,this._replaceInput.width=pe.I(this._findInput.domNode);return}}if(Ro+28+He>=Ne&&(vt=!0),Ro+28+He-Jt>=Ne&&(Xt=!0),Ro+28+He-Jt>=Ne+50&&(at=!0),this._domNode.classList.toggle("collapsed-find-widget",at),this._domNode.classList.toggle("narrow-find-widget",Xt),this._domNode.classList.toggle("reduced-find-widget",vt),!Xt&&!at&&(this._domNode.style.maxWidth=`${Ne-28-He-15}px`),this._resized){this._findInput.inputBox.layout();let Bt=this._findInput.inputBox.element.clientWidth;Bt>0&&(this._replaceInput.width=Bt)}else this._isReplaceVisible&&(this._replaceInput.width=pe.I(this._findInput.domNode))}_getHeight(){let $=0;return $+=4,$+=this._findInput.inputBox.height+2,this._isReplaceVisible&&($+=4,$+=this._replaceInput.inputBox.height+2),$+=4,$}_tryUpdateHeight(){const $=this._getHeight();return this._cachedHeight!==null&&this._cachedHeight===$?!1:(this._cachedHeight=$,this._domNode.style.height=`${$}px`,!0)}focusFindInput(){this._findInput.select(),this._findInput.focus()}focusReplaceInput(){this._replaceInput.select(),this._replaceInput.focus()}highlightFindOptions(){this._findInput.highlightFindOptions()}_updateSearchScope(){if(!this._codeEditor.hasModel())return;if(this._toggleSelectionFind.checked){let $=this._codeEditor.getSelections();$.map(Ee=>{Ee.endColumn===1&&Ee.endLineNumber>Ee.startLineNumber&&(Ee=Ee.setEndPosition(Ee.endLineNumber-1,this._codeEditor.getModel().getLineMaxColumn(Ee.endLineNumber-1)));const Ne=this._state.currentMatch;return Ee.startLineNumber!==Ee.endLineNumber&&!C.a.equalsRange(Ee,Ne)?Ee:null}).filter(Ee=>!!Ee),$.length&&this._state.change({searchScope:$},!0)}}_onFindInputMouseDown($){$.middleButton&&$.stopPropagation()}_onFindInputKeyDown($){if($.equals(Zo|3))if(this._keybindingService.dispatchEvent($,$.target)){$.preventDefault();return}else{this._findInput.inputBox.insertAtCursor(`
|
|
|
`),$.preventDefault();return}if($.equals(2)){this._isReplaceVisible?this._replaceInput.focus():this._findInput.focusOnCaseSensitive(),$.preventDefault();return}if($.equals(2048|18)){this._codeEditor.focus(),$.preventDefault();return}if($.equals(16))return ki($,this._findInput.getValue(),this._findInput.domNode.querySelector("textarea"));if($.equals(18))return wi($,this._findInput.getValue(),this._findInput.domNode.querySelector("textarea"))}_onReplaceInputKeyDown($){if($.equals(Zo|3))if(this._keybindingService.dispatchEvent($,$.target)){$.preventDefault();return}else{We.i&&We.g&&!this._ctrlEnterReplaceAllWarningPrompted&&(this._notificationService.info(Be.a("ctrlEnter.keybindingChanged","Ctrl+Enter now inserts line break instead of replacing all. You can modify the keybinding for editor.action.replaceAll to override this behavior.")),this._ctrlEnterReplaceAllWarningPrompted=!0,this._storageService.store(ri,!0,0,0)),this._replaceInput.inputBox.insertAtCursor(`
|
|
|
`),$.preventDefault();return}if($.equals(2)){this._findInput.focusOnCaseSensitive(),$.preventDefault();return}if($.equals(1024|2)){this._findInput.focus(),$.preventDefault();return}if($.equals(2048|18)){this._codeEditor.focus(),$.preventDefault();return}if($.equals(16))return ki($,this._replaceInput.inputBox.value,this._replaceInput.inputBox.element.querySelector("textarea"));if($.equals(18))return wi($,this._replaceInput.inputBox.value,this._replaceInput.inputBox.element.querySelector("textarea"))}getVerticalSashLeft($){return 0}_keybindingLabelFor($){let Ee=this._keybindingService.lookupKeybinding($);return Ee?` (${Ee.getLabel()})`:""}_buildDomNode(){const $=!0,Ee=!0;this._findInput=this._register(new ct(null,this._contextViewProvider,{width:Bo,label:di,placeholder:_o,appendCaseSensitiveLabel:this._keybindingLabelFor(ae.ToggleCaseSensitiveCommand),appendWholeWordsLabel:this._keybindingLabelFor(ae.ToggleWholeWordCommand),appendRegexLabel:this._keybindingLabelFor(ae.ToggleRegexCommand),validation:Bt=>{if(Bt.length===0||!this._findInput.getRegex())return null;try{return new RegExp(Bt,"gu"),null}catch(Kt){return{content:Kt.message}}},flexibleHeight:$,flexibleWidth:Ee,flexibleMaxHeight:118,showHistoryHint:()=>Qe(this._keybindingService)},this._contextKeyService,!0)),this._findInput.setRegex(!!this._state.isRegex),this._findInput.setCaseSensitive(!!this._state.matchCase),this._findInput.setWholeWords(!!this._state.wholeWord),this._register(this._findInput.onKeyDown(Bt=>this._onFindInputKeyDown(Bt))),this._register(this._findInput.inputBox.onDidChange(()=>{if(this._ignoreChangeEvent)return;this._state.change({searchString:this._findInput.getValue()},!0)})),this._register(this._findInput.onDidOptionChange(()=>{this._state.change({isRegex:this._findInput.getRegex(),wholeWord:this._findInput.getWholeWords(),matchCase:this._findInput.getCaseSensitive()},!0)})),this._register(this._findInput.onCaseSensitiveKeyDown(Bt=>{Bt.equals(1024|2)&&(this._isReplaceVisible&&(this._replaceInput.focus(),Bt.preventDefault()))})),this._register(this._findInput.onRegexKeyDown(Bt=>{Bt.equals(2)&&(this._isReplaceVisible&&(this._replaceInput.focusOnPreserve(),Bt.preventDefault()))})),this._register(this._findInput.inputBox.onDidHeightChange(Bt=>{this._tryUpdateHeight()&&this._showViewZone()})),We.d&&this._register(this._findInput.onMouseDown(Bt=>this._onFindInputMouseDown(Bt))),this._matchesCount=document.createElement("div"),this._matchesCount.className="matchesCount",this._updateMatchesCount(),this._prevBtn=this._register(new Vi({label:no+this._keybindingLabelFor(ae.PreviousMatchFindAction),icon:wo,onTrigger:()=>{this._codeEditor.getAction(ae.PreviousMatchFindAction).run().then(void 0,Re.f)}})),this._nextBtn=this._register(new Vi({label:_t+this._keybindingLabelFor(ae.NextMatchFindAction),icon:No,onTrigger:()=>{this._codeEditor.getAction(ae.NextMatchFindAction).run().then(void 0,Re.f)}}));let Ne=document.createElement("div");Ne.className="find-part",Ne.appendChild(this._findInput.domNode);const He=document.createElement("div");He.className="find-actions",Ne.appendChild(He),He.appendChild(this._matchesCount),He.appendChild(this._prevBtn.domNode),He.appendChild(this._nextBtn.domNode),this._toggleSelectionFind=this._register(new Pe({icon:Dt,title:Tt+this._keybindingLabelFor(ae.ToggleSearchScopeCommand),isChecked:!1})),this._register(this._toggleSelectionFind.onChange(()=>{if(this._toggleSelectionFind.checked){if(this._codeEditor.hasModel()){let Bt=this._codeEditor.getSelections();Bt.map(Kt=>(Kt.endColumn===1&&Kt.endLineNumber>Kt.startLineNumber&&(Kt=Kt.setEndPosition(Kt.endLineNumber-1,this._codeEditor.getModel().getLineMaxColumn(Kt.endLineNumber-1))),Kt.isEmpty()?null:Kt)).filter(Kt=>!!Kt),Bt.length&&this._state.change({searchScope:Bt},!0)}}else this._state.change({searchScope:null},!0)})),He.appendChild(this._toggleSelectionFind.domNode),this._closeBtn=this._register(new Vi({label:Nt+this._keybindingLabelFor(ae.CloseFindWidgetCommand),icon:tt.c,onTrigger:()=>{this._state.change({isRevealed:!1,searchScope:null},!1)},onKeyDown:Bt=>{Bt.equals(2)&&(this._isReplaceVisible&&(this._replaceBtn.isEnabled()?this._replaceBtn.focus():this._codeEditor.focus(),Bt.preventDefault()))}})),He.appendChild(this._closeBtn.domNode),this._replaceInput=this._register(new Ut(null,void 0,{label:rt,placeholder:lt,appendPreserveCaseLabel:this._keybindingLabelFor(ae.TogglePreserveCaseCommand),history:[],flexibleHeight:$,flexibleWidth:Ee,flexibleMaxHeight:118,showHistoryHint:()=>Qe(this._keybindingService)},this._contextKeyService,!0)),this._replaceInput.setPreserveCase(!!this._state.preserveCase),this._register(this._replaceInput.onKeyDown(Bt=>this._onReplaceInputKeyDown(Bt))),this._register(this._replaceInput.inputBox.onDidChange(()=>{this._state.change({replaceString:this._replaceInput.inputBox.value},!1)})),this._register(this._replaceInput.inputBox.onDidHeightChange(Bt=>{this._isReplaceVisible&&this._tryUpdateHeight()&&this._showViewZone()})),this._register(this._replaceInput.onDidOptionChange(()=>{this._state.change({preserveCase:this._replaceInput.getPreserveCase()},!0)})),this._register(this._replaceInput.onPreserveCaseKeyDown(Bt=>{Bt.equals(2)&&(this._prevBtn.isEnabled()?this._prevBtn.focus():this._nextBtn.isEnabled()?this._nextBtn.focus():this._toggleSelectionFind.enabled?this._toggleSelectionFind.focus():this._closeBtn.isEnabled()&&this._closeBtn.focus(),Bt.preventDefault())})),this._replaceBtn=this._register(new Vi({label:bt+this._keybindingLabelFor(ae.ReplaceOneAction),icon:zt,onTrigger:()=>{this._controller.replace()},onKeyDown:Bt=>{Bt.equals(1024|2)&&(this._closeBtn.focus(),Bt.preventDefault())}})),this._replaceAllBtn=this._register(new Vi({label:St+this._keybindingLabelFor(ae.ReplaceAllAction),icon:so,onTrigger:()=>{this._controller.replaceAll()}}));let at=document.createElement("div");at.className="replace-part",at.appendChild(this._replaceInput.domNode);const vt=document.createElement("div");vt.className="replace-actions",at.appendChild(vt),vt.appendChild(this._replaceBtn.domNode),vt.appendChild(this._replaceAllBtn.domNode),this._toggleReplaceBtn=this._register(new Vi({label:Qt,className:"codicon toggle left",onTrigger:()=>{this._state.change({isReplaceRevealed:!this._isReplaceVisible},!1),this._isReplaceVisible&&(this._replaceInput.width=pe.I(this._findInput.domNode),this._replaceInput.inputBox.layout()),this._showViewZone()}})),this._toggleReplaceBtn.setExpanded(this._isReplaceVisible),this._domNode=document.createElement("div"),this._domNode.className="editor-widget find-widget",this._domNode.setAttribute("aria-hidden","true"),this._domNode.style.width=`${Ro}px`,this._domNode.appendChild(this._toggleReplaceBtn.domNode),this._domNode.appendChild(Ne),this._domNode.appendChild(at),this._resizeSash=new je.b(this._domNode,this,{orientation:0,size:2}),this._resized=!1;let Xt=Ro;this._register(this._resizeSash.onDidStart(()=>{Xt=pe.I(this._domNode)})),this._register(this._resizeSash.onDidChange(Bt=>{this._resized=!0;let Kt=Xt+Bt.startX-Bt.currentX;if(Kt<Ro)return;const ro=parseFloat(pe.A(this._domNode).maxWidth)||0;if(Kt>ro)return;this._domNode.style.width=`${Kt}px`,this._isReplaceVisible&&(this._replaceInput.width=pe.I(this._findInput.domNode)),this._findInput.inputBox.layout(),this._tryUpdateHeight()})),this._register(this._resizeSash.onDidReset(()=>{const Bt=pe.I(this._domNode);if(Bt<Ro)return;let Kt=Ro;if(!this._resized||Bt===Ro){const ro=this._codeEditor.getLayoutInfo();Kt=ro.width-28-ro.minimap.minimapWidth-15,this._resized=!0}this._domNode.style.width=`${Kt}px`,this._isReplaceVisible&&(this._replaceInput.width=pe.I(this._findInput.domNode)),this._findInput.inputBox.layout()}))}updateAccessibilitySupport(){const $=this._codeEditor.getOption(2);this._findInput.setFocusInputOnOptionClick($!==2)}}Zi.ID="editor.contrib.findWidget";class Vi extends Te.a{constructor($){super();this._opts=$;let Ee="button";this._opts.className&&(Ee=Ee+" "+this._opts.className),this._opts.icon&&(Ee=Ee+" "+w.d.asClassName(this._opts.icon)),this._domNode=document.createElement("div"),this._domNode.title=this._opts.label,this._domNode.tabIndex=0,this._domNode.className=Ee,this._domNode.setAttribute("role","button"),this._domNode.setAttribute("aria-label",this._opts.label),this.onclick(this._domNode,Ne=>{this._opts.onTrigger(),Ne.preventDefault()}),this.onkeydown(this._domNode,Ne=>{if(Ne.equals(10)||Ne.equals(3)){this._opts.onTrigger(),Ne.preventDefault();return}this._opts.onKeyDown&&this._opts.onKeyDown(Ne)})}get domNode(){return this._domNode}isEnabled(){return this._domNode.tabIndex>=0}focus(){this._domNode.focus()}setEnabled($){this._domNode.classList.toggle("disabled",!$),this._domNode.setAttribute("aria-disabled",String(!$)),this._domNode.tabIndex=$?0:-1}setExpanded($){this._domNode.setAttribute("aria-expanded",String(!!$)),$?(this._domNode.classList.remove(...w.d.asClassNameArray(Pt)),this._domNode.classList.add(...w.d.asClassNameArray(Wt))):(this._domNode.classList.remove(...w.d.asClassNameArray(Wt)),this._domNode.classList.add(...w.d.asClassNameArray(Pt)))}}Object(w.f)(($,Ee)=>{const Ne=(pt,Mt)=>{Mt&&Ee.addRule(`.monaco-editor ${pt} { background-color: ${Mt}; }`)};Ne(".findMatch",$.getColor(r.x)),Ne(".currentFindMatch",$.getColor(r.v)),Ne(".findScope",$.getColor(r.z));const He=$.getColor(r.W);Ne(".find-widget",He);const at=$.getColor(r.Nc);at&&Ee.addRule(`.monaco-editor .find-widget { box-shadow: 0 0 8px 2px ${at}; }`);const vt=$.getColor(r.y);vt&&Ee.addRule(`.monaco-editor .findMatch { border: 1px ${$.type==="hc"?"dotted":"solid"} ${vt}; box-sizing: border-box; }`);const Xt=$.getColor(r.w);Xt&&Ee.addRule(`.monaco-editor .currentFindMatch { border: 2px solid ${Xt}; padding: 1px; box-sizing: border-box; }`);const Bt=$.getColor(r.A);Bt&&Ee.addRule(`.monaco-editor .findScope { border: 1px ${$.type==="hc"?"dashed":"solid"} ${Bt}; }`);const Kt=$.getColor(r.h);Kt&&Ee.addRule(`.monaco-editor .find-widget { border: 1px solid ${Kt}; }`);const ro=$.getColor(r.Y);ro&&Ee.addRule(`.monaco-editor .find-widget { color: ${ro}; }`);const F=$.getColor(r.ab);F&&Ee.addRule(`.monaco-editor .find-widget.no-results .matchesCount { color: ${F}; }`);const te=$.getColor(r.Z);if(te)Ee.addRule(`.monaco-editor .find-widget .monaco-sash { background-color: ${te}; }`);else{const pt=$.getColor(r.X);pt&&Ee.addRule(`.monaco-editor .find-widget .monaco-sash { background-color: ${pt}; }`)}const Ae=$.getColor(r.Kc);Ae&&Ee.addRule(`
|
|
|
.monaco-editor .find-widget .button:not(.disabled):hover,
|
|
|
.monaco-editor .find-widget .codicon-find-selection:hover {
|
|
|
background-color: ${Ae} !important;
|
|
|
}
|
|
|
`);const Ye=$.getColor(r.bb);Ye&&Ee.addRule(`.monaco-editor .find-widget .monaco-inputbox.synthetic-focus { outline-color: ${Ye}; }`)});var vi=t("fjLI"),sn=t("9XeP"),en=t("Uzvx"),on=t("bexQ"),cn=t("sM1p"),Bi=t("A+jI"),zi=function($,Ee,Ne,He){var at=arguments.length,vt=at<3?Ee:He===null?He=Object.getOwnPropertyDescriptor(Ee,Ne):He,Xt;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")vt=Reflect.decorate($,Ee,Ne,He);else for(var Bt=$.length-1;Bt>=0;Bt--)(Xt=$[Bt])&&(vt=(at<3?Xt(vt):at>3?Xt(Ee,Ne,vt):Xt(Ee,Ne))||vt);return at>3&&vt&&Object.defineProperty(Ee,Ne,vt),vt},Ji=function($,Ee){return function(Ne,He){Ee(Ne,He,$)}},ui=function($,Ee,Ne,He){function at(vt){return vt instanceof Ne?vt:new Ne(function(Xt){Xt(vt)})}return new(Ne||(Ne=Promise))(function(vt,Xt){function Bt(F){try{ro(He.next(F))}catch(te){Xt(te)}}function Kt(F){try{ro(He.throw(F))}catch(te){Xt(te)}}function ro(F){F.done?vt(F.value):at(F.value).then(Bt,Kt)}ro((He=He.apply($,Ee||[])).next())})};const pn=524288;function Hi($,Ee="single",Ne=!1){if(!$.hasModel())return null;const He=$.getSelection();if(Ee==="single"&&He.startLineNumber===He.endLineNumber||Ee==="multiple"){if(He.isEmpty()){const at=$.getConfiguredWordAtPosition(He.getStartPosition());if(at&&Ne===!1)return at.word}else if($.getModel().getValueLengthInRange(He)<pn)return $.getModel().getValueInRange(He)}return null}let Oi=class $ extends B.a{constructor(Ee,Ne,He,at){super();this._editor=Ee,this._findWidgetVisible=J.bindTo(Ne),this._contextKeyService=Ne,this._storageService=He,this._clipboardService=at,this._updateHistoryDelayer=new g.a(500),this._state=this._register(new U),this.loadQueryState(),this._register(this._state.onFindReplaceStateChange(vt=>this._onStateChanged(vt))),this._model=null,this._register(this._editor.onDidChangeModel(()=>{let vt=this._editor.getModel()&&this._state.isRevealed;this.disposeModel(),this._state.change({searchScope:null,matchCase:this._storageService.getBoolean("editor.matchCase",1,!1),wholeWord:this._storageService.getBoolean("editor.wholeWord",1,!1),isRegex:this._storageService.getBoolean("editor.isRegex",1,!1),preserveCase:this._storageService.getBoolean("editor.preserveCase",1,!1)},!1),vt&&this._start({forceRevealReplace:!1,seedSearchStringFromSelection:"none",seedSearchStringFromNonEmptySelection:!1,seedSearchStringFromGlobalClipboard:!1,shouldFocus:0,shouldAnimate:!1,updateSearchScope:!1,loop:this._editor.getOption(35).loop})}))}get editor(){return this._editor}static get(Ee){return Ee.getContribution($.ID)}dispose(){this.disposeModel(),super.dispose()}disposeModel(){this._model&&(this._model.dispose(),this._model=null)}_onStateChanged(Ee){this.saveQueryState(Ee),Ee.isRevealed&&(this._state.isRevealed?this._findWidgetVisible.set(!0):(this._findWidgetVisible.reset(),this.disposeModel())),Ee.searchString&&this.setGlobalBufferTerm(this._state.searchString)}saveQueryState(Ee){Ee.isRegex&&this._storageService.store("editor.isRegex",this._state.actualIsRegex,1,0),Ee.wholeWord&&this._storageService.store("editor.wholeWord",this._state.actualWholeWord,1,0),Ee.matchCase&&this._storageService.store("editor.matchCase",this._state.actualMatchCase,1,0),Ee.preserveCase&&this._storageService.store("editor.preserveCase",this._state.actualPreserveCase,1,0)}loadQueryState(){this._state.change({matchCase:this._storageService.getBoolean("editor.matchCase",1,this._state.matchCase),wholeWord:this._storageService.getBoolean("editor.wholeWord",1,this._state.wholeWord),isRegex:this._storageService.getBoolean("editor.isRegex",1,this._state.isRegex),preserveCase:this._storageService.getBoolean("editor.preserveCase",1,this._state.preserveCase)},!1)}isFindInputFocused(){return!!re.getValue(this._contextKeyService)}getState(){return this._state}closeFindWidget(){this._state.change({isRevealed:!1,searchScope:null},!1),this._editor.focus()}toggleCaseSensitive(){this._state.change({matchCase:!this._state.matchCase},!1),this._state.isRevealed||this.highlightFindOptions()}toggleWholeWords(){this._state.change({wholeWord:!this._state.wholeWord},!1),this._state.isRevealed||this.highlightFindOptions()}toggleRegex(){this._state.change({isRegex:!this._state.isRegex},!1),this._state.isRevealed||this.highlightFindOptions()}togglePreserveCase(){this._state.change({preserveCase:!this._state.preserveCase},!1),this._state.isRevealed||this.highlightFindOptions()}toggleSearchScope(){if(this._state.searchScope)this._state.change({searchScope:null},!0);else if(this._editor.hasModel()){let Ee=this._editor.getSelections();Ee.map(Ne=>(Ne.endColumn===1&&Ne.endLineNumber>Ne.startLineNumber&&(Ne=Ne.setEndPosition(Ne.endLineNumber-1,this._editor.getModel().getLineMaxColumn(Ne.endLineNumber-1))),Ne.isEmpty()?null:Ne)).filter(Ne=>!!Ne),Ee.length&&this._state.change({searchScope:Ee},!0)}}setSearchString(Ee){this._state.isRegex&&(Ee=x.t(Ee)),this._state.change({searchString:Ee},!1)}highlightFindOptions(Ee=!1){}_start(Ee){return ui(this,void 0,void 0,function*(){if(this.disposeModel(),!this._editor.hasModel())return;let Ne={isRevealed:!0};if(Ee.seedSearchStringFromSelection==="single"){let He=Hi(this._editor,Ee.seedSearchStringFromSelection,Ee.seedSearchStringFromNonEmptySelection);He&&(this._state.isRegex?Ne.searchString=x.t(He):Ne.searchString=He)}else if(Ee.seedSearchStringFromSelection==="multiple"&&!Ee.updateSearchScope){let He=Hi(this._editor,Ee.seedSearchStringFromSelection);He&&(Ne.searchString=He)}if(!Ne.searchString&&Ee.seedSearchStringFromGlobalClipboard){let He=yield this.getGlobalBufferTerm();if(!this._editor.hasModel())return;He&&(Ne.searchString=He)}if(Ee.forceRevealReplace?Ne.isReplaceRevealed=!0:this._findWidgetVisible.get()||(Ne.isReplaceRevealed=!1),Ee.updateSearchScope){let He=this._editor.getSelections();He.some(at=>!at.isEmpty())&&(Ne.searchScope=He)}Ne.loop=Ee.loop,this._state.change(Ne,!1),this._model||(this._model=new ee(this._editor,this._state))})}start(Ee){return this._start(Ee)}moveToNextMatch(){return this._model?(this._model.moveToNextMatch(),!0):!1}moveToPrevMatch(){return this._model?(this._model.moveToPrevMatch(),!0):!1}replace(){return this._model?(this._model.replace(),!0):!1}replaceAll(){return this._model?(this._model.replaceAll(),!0):!1}selectAllMatches(){return this._model?(this._model.selectAllMatches(),this._editor.focus(),!0):!1}getGlobalBufferTerm(){return ui(this,void 0,void 0,function*(){return this._editor.getOption(35).globalFindClipboard&&this._editor.hasModel()&&!this._editor.getModel().isTooLargeForSyncing()?this._clipboardService.readFindText():""})}setGlobalBufferTerm(Ee){this._editor.getOption(35).globalFindClipboard&&this._editor.hasModel()&&!this._editor.getModel().isTooLargeForSyncing()&&this._clipboardService.writeFindText(Ee)}};Oi.ID="editor.contrib.findController",Oi=zi([Ji(1,z.b),Ji(2,Bi.a),Ji(3,sn.a)],Oi);let Ii=class extends Oi{constructor(Ee,Ne,He,at,vt,Xt,Bt,Kt){super(Ee,He,Bt,Kt);this._contextViewService=Ne,this._keybindingService=at,this._themeService=vt,this._notificationService=Xt,this._widget=null,this._findOptionsWidget=null}_start(Ee){const Ne=Object.create(null,{_start:{get:()=>super._start}});return ui(this,void 0,void 0,function*(){this._widget||this._createFindWidget();const He=this._editor.getSelection();let at=!1;switch(this._editor.getOption(35).autoFindInSelection){case"always":at=!0;break;case"never":at=!1;break;case"multiline":const vt=!!He&&He.startLineNumber!==He.endLineNumber;at=vt;break;default:break}Ee.updateSearchScope=at,yield Ne._start.call(this,Ee),this._widget&&(Ee.shouldFocus===2?this._widget.focusReplaceInput():Ee.shouldFocus===1&&this._widget.focusFindInput())})}highlightFindOptions(Ee=!1){this._widget||this._createFindWidget(),this._state.isRevealed&&!Ee?this._widget.highlightFindOptions():this._findOptionsWidget.highlightFindOptions()}_createFindWidget(){this._widget=this._register(new Zi(this._editor,this,this._state,this._contextViewService,this._keybindingService,this._contextKeyService,this._themeService,this._storageService,this._notificationService)),this._findOptionsWidget=this._register(new ie(this._editor,this._state,this._keybindingService,this._themeService))}};Ii=zi([Ji(1,en.b),Ji(2,z.b),Ji(3,on.a),Ji(4,w.b),Ji(5,cn.a),Ji(6,Bi.a),Ji(7,sn.a)],Ii);const Qi=Object(R.p)(new R.f({id:ae.StartFindAction,label:Be.a("startFindAction","Find"),alias:"Find",precondition:z.a.or(A.a.focus,z.a.has("editorIsOpen")),kbOpts:{kbExpr:null,primary:2048|36,weight:100},menuOpts:{menuId:vi.b.MenubarEditMenu,group:"3_find",title:Be.a({key:"miFind",comment:["&& denotes a mnemonic"]},"&&Find"),order:1}}));Qi.addImplementation(0,($,Ee,Ne)=>{const He=Oi.get(Ee);return He?He.start({forceRevealReplace:!1,seedSearchStringFromSelection:Ee.getOption(35).seedSearchStringFromSelection!=="never"?"single":"none",seedSearchStringFromNonEmptySelection:Ee.getOption(35).seedSearchStringFromSelection==="selection",seedSearchStringFromGlobalClipboard:Ee.getOption(35).globalFindClipboard,shouldFocus:1,shouldAnimate:!0,updateSearchScope:!1,loop:Ee.getOption(35).loop}):!1});class Li extends R.b{constructor(){super({id:ae.StartFindWithSelection,label:Be.a("startFindWithSelectionAction","Find With Selection"),alias:"Find With Selection",precondition:void 0,kbOpts:{kbExpr:null,primary:0,mac:{primary:2048|35},weight:100}})}run($,Ee){return ui(this,void 0,void 0,function*(){let Ne=Oi.get(Ee);Ne&&(yield Ne.start({forceRevealReplace:!1,seedSearchStringFromSelection:"multiple",seedSearchStringFromNonEmptySelection:!1,seedSearchStringFromGlobalClipboard:!1,shouldFocus:0,shouldAnimate:!0,updateSearchScope:!1,loop:Ee.getOption(35).loop}),Ne.setGlobalBufferTerm(Ne.getState().searchString))})}}class Ui extends R.b{run($,Ee){return ui(this,void 0,void 0,function*(){let Ne=Oi.get(Ee);Ne&&!this._run(Ne)&&(yield Ne.start({forceRevealReplace:!1,seedSearchStringFromSelection:Ne.getState().searchString.length===0&&Ee.getOption(35).seedSearchStringFromSelection!=="never"?"single":"none",seedSearchStringFromNonEmptySelection:Ee.getOption(35).seedSearchStringFromSelection==="selection",seedSearchStringFromGlobalClipboard:!0,shouldFocus:0,shouldAnimate:!0,updateSearchScope:!1,loop:Ee.getOption(35).loop}),this._run(Ne))})}}class fi extends Ui{constructor(){super({id:ae.NextMatchFindAction,label:Be.a("findNextMatchAction","Find Next"),alias:"Find Next",precondition:void 0,kbOpts:[{kbExpr:A.a.focus,primary:61,mac:{primary:2048|37,secondary:[61]},weight:100},{kbExpr:z.a.and(A.a.focus,re),primary:3,weight:100}]})}_run($){const Ee=$.moveToNextMatch();return Ee?($.editor.pushUndoStop(),!0):!1}}class $i extends Ui{constructor(){super({id:ae.PreviousMatchFindAction,label:Be.a("findPreviousMatchAction","Find Previous"),alias:"Find Previous",precondition:void 0,kbOpts:[{kbExpr:A.a.focus,primary:1024|61,mac:{primary:2048|1024|37,secondary:[1024|61]},weight:100},{kbExpr:z.a.and(A.a.focus,re),primary:1024|3,weight:100}]})}_run($){return $.moveToPrevMatch()}}class rn extends R.b{run($,Ee){return ui(this,void 0,void 0,function*(){let Ne=Oi.get(Ee);if(!Ne)return;const He=Ee.getOption(35).seedSearchStringFromSelection==="selection";let at=null;Ee.getOption(35).seedSearchStringFromSelection!=="never"&&(at=Hi(Ee,"single",He)),at&&Ne.setSearchString(at),this._run(Ne)||(yield Ne.start({forceRevealReplace:!1,seedSearchStringFromSelection:Ee.getOption(35).seedSearchStringFromSelection!=="never"?"single":"none",seedSearchStringFromNonEmptySelection:He,seedSearchStringFromGlobalClipboard:!1,shouldFocus:0,shouldAnimate:!0,updateSearchScope:!1,loop:Ee.getOption(35).loop}),this._run(Ne))})}}class _i extends rn{constructor(){super({id:ae.NextSelectionMatchFindAction,label:Be.a("nextSelectionMatchFindAction","Find Next Selection"),alias:"Find Next Selection",precondition:void 0,kbOpts:{kbExpr:A.a.focus,primary:2048|61,weight:100}})}_run($){return $.moveToNextMatch()}}class Pi extends rn{constructor(){super({id:ae.PreviousSelectionMatchFindAction,label:Be.a("previousSelectionMatchFindAction","Find Previous Selection"),alias:"Find Previous Selection",precondition:void 0,kbOpts:{kbExpr:A.a.focus,primary:2048|1024|61,weight:100}})}_run($){return $.moveToPrevMatch()}}const gt=Object(R.p)(new R.f({id:ae.StartFindReplaceAction,label:Be.a("startReplace","Replace"),alias:"Replace",precondition:z.a.or(A.a.focus,z.a.has("editorIsOpen")),kbOpts:{kbExpr:null,primary:2048|38,mac:{primary:2048|512|36},weight:100},menuOpts:{menuId:vi.b.MenubarEditMenu,group:"3_find",title:Be.a({key:"miReplace",comment:["&& denotes a mnemonic"]},"&&Replace"),order:2}}));gt.addImplementation(0,($,Ee,Ne)=>{if(!Ee.hasModel()||Ee.getOption(80))return!1;const He=Oi.get(Ee);if(!He)return!1;const at=Ee.getSelection(),vt=He.isFindInputFocused(),Xt=!at.isEmpty()&&at.startLineNumber===at.endLineNumber&&Ee.getOption(35).seedSearchStringFromSelection!=="never"&&!vt,Bt=vt||Xt?2:1;return He.start({forceRevealReplace:!0,seedSearchStringFromSelection:Xt?"single":"none",seedSearchStringFromNonEmptySelection:Ee.getOption(35).seedSearchStringFromSelection==="selection",seedSearchStringFromGlobalClipboard:Ee.getOption(35).seedSearchStringFromSelection!=="never",shouldFocus:Bt,shouldAnimate:!0,updateSearchScope:!1,loop:Ee.getOption(35).loop})}),Object(R.l)(Oi.ID,Ii),Object(R.j)(Li),Object(R.j)(fi),Object(R.j)($i),Object(R.j)(_i),Object(R.j)(Pi);const Ge=R.c.bindToContribution(Oi.get);Object(R.k)(new Ge({id:ae.CloseFindWidgetCommand,precondition:J,handler:$=>$.closeFindWidget(),kbOpts:{weight:100+5,kbExpr:z.a.and(A.a.focus,z.a.not("isComposing")),primary:9,secondary:[1024|9]}})),Object(R.k)(new Ge({id:ae.ToggleCaseSensitiveCommand,precondition:void 0,handler:$=>$.toggleCaseSensitive(),kbOpts:{weight:100+5,kbExpr:A.a.focus,primary:ne.primary,mac:ne.mac,win:ne.win,linux:ne.linux}})),Object(R.k)(new Ge({id:ae.ToggleWholeWordCommand,precondition:void 0,handler:$=>$.toggleWholeWords(),kbOpts:{weight:100+5,kbExpr:A.a.focus,primary:le.primary,mac:le.mac,win:le.win,linux:le.linux}})),Object(R.k)(new Ge({id:ae.ToggleRegexCommand,precondition:void 0,handler:$=>$.toggleRegex(),kbOpts:{weight:100+5,kbExpr:A.a.focus,primary:_e.primary,mac:_e.mac,win:_e.win,linux:_e.linux}})),Object(R.k)(new Ge({id:ae.ToggleSearchScopeCommand,precondition:void 0,handler:$=>$.toggleSearchScope(),kbOpts:{weight:100+5,kbExpr:A.a.focus,primary:Ce.primary,mac:Ce.mac,win:Ce.win,linux:Ce.linux}})),Object(R.k)(new Ge({id:ae.TogglePreserveCaseCommand,precondition:void 0,handler:$=>$.togglePreserveCase(),kbOpts:{weight:100+5,kbExpr:A.a.focus,primary:oe.primary,mac:oe.mac,win:oe.win,linux:oe.linux}})),Object(R.k)(new Ge({id:ae.ReplaceOneAction,precondition:J,handler:$=>$.replace(),kbOpts:{weight:100+5,kbExpr:A.a.focus,primary:2048|1024|22}})),Object(R.k)(new Ge({id:ae.ReplaceOneAction,precondition:J,handler:$=>$.replace(),kbOpts:{weight:100+5,kbExpr:z.a.and(A.a.focus,Z),primary:3}})),Object(R.k)(new Ge({id:ae.ReplaceAllAction,precondition:J,handler:$=>$.replaceAll(),kbOpts:{weight:100+5,kbExpr:A.a.focus,primary:2048|512|3}})),Object(R.k)(new Ge({id:ae.ReplaceAllAction,precondition:J,handler:$=>$.replaceAll(),kbOpts:{weight:100+5,kbExpr:z.a.and(A.a.focus,Z),primary:void 0,mac:{primary:2048|3}}})),Object(R.k)(new Ge({id:ae.SelectAllMatchesAction,precondition:J,handler:$=>$.selectAllMatches(),kbOpts:{weight:100+5,kbExpr:A.a.focus,primary:512|3}}))},oiKk:function(mt,M,t){"use strict";t.r(M),t.d(M,"IPadShowKeyboard",function(){return I});var g=t("ci+S"),B=t.n(g),x=t("EffR"),R=t("pmY6"),A=t("sswD"),j=t("MNsG");class I extends R.a{constructor(C){super();this.editor=C,this.widget=null,j.c&&(this._register(C.onDidChangeConfiguration(()=>this.update())),this.update())}update(){const C=!this.editor.getOption(80);!this.widget&&C?this.widget=new v(this.editor):this.widget&&!C&&(this.widget.dispose(),this.widget=null)}dispose(){super.dispose(),this.widget&&(this.widget.dispose(),this.widget=null)}}I.ID="editor.contrib.iPadShowKeyboard";class v extends R.a{constructor(C){super();this.editor=C,this._domNode=document.createElement("textarea"),this._domNode.className="iPadShowKeyboard",this._register(x.i(this._domNode,"touchstart",m=>{this.editor.focus()})),this._register(x.i(this._domNode,"focus",m=>{this.editor.focus()})),this.editor.addOverlayWidget(this)}dispose(){this.editor.removeOverlayWidget(this),super.dispose()}getId(){return v.ID}getDomNode(){return this._domNode}getPosition(){return{preference:1}}}v.ID="editor.contrib.ShowKeyboardWidget",Object(A.l)(I.ID,I)},p3Ex:function(mt,M,t){"use strict";t.r(M);var g=t("+hIS");Object(g.a)({id:"csharp",extensions:[".cs",".csx",".cake"],aliases:["C#","csharp"],loader:function(){return t.e(328).then(t.bind(null,"/Om3"))}})},p5tG:function(mt,M,t){"use strict";t.r(M),t.d(M,"jsonDefaults",function(){return I});var g=t("M/lh"),B=t.n(g),x=t("CriS"),R=function(){function C(m,d,D){this._onDidChange=new x.Emitter,this._languageId=m,this.setDiagnosticsOptions(d),this.setModeConfiguration(D)}return Object.defineProperty(C.prototype,"onDidChange",{get:function(){return this._onDidChange.event},enumerable:!1,configurable:!0}),Object.defineProperty(C.prototype,"languageId",{get:function(){return this._languageId},enumerable:!1,configurable:!0}),Object.defineProperty(C.prototype,"modeConfiguration",{get:function(){return this._modeConfiguration},enumerable:!1,configurable:!0}),Object.defineProperty(C.prototype,"diagnosticsOptions",{get:function(){return this._diagnosticsOptions},enumerable:!1,configurable:!0}),C.prototype.setDiagnosticsOptions=function(m){this._diagnosticsOptions=m||Object.create(null),this._onDidChange.fire(this)},C.prototype.setModeConfiguration=function(m){this._modeConfiguration=m||Object.create(null),this._onDidChange.fire(this)},C}(),A={validate:!0,allowComments:!0,schemas:[],enableSchemaRequest:!1,schemaRequest:"warning",schemaValidation:"warning",comments:"error",trailingCommas:"error"},j={documentFormattingEdits:!0,documentRangeFormattingEdits:!0,completionItems:!0,hovers:!0,documentSymbols:!0,tokens:!0,colors:!0,foldingRanges:!0,diagnostics:!0,selectionRanges:!0},I=new R("json",A,j);x.languages.json={jsonDefaults:I};function v(){return t.e(320).then(t.bind(null,"R7lK"))}x.languages.register({id:"json",extensions:[".json",".bowerrc",".jshintrc",".jscsrc",".eslintrc",".babelrc",".har"],aliases:["JSON","json"],mimetypes:["application/json"]}),x.languages.onLanguage("json",function(){v().then(function(C){return C.setupMode(I)})})},pAvP:function(mt,M,t){"use strict";t.d(M,"a",function(){return x});var g=t("Cg/j");const B="editorWorkerService",x=Object(g.c)(B)},pI2L:function(mt,M,t){"use strict";t.r(M);var g=t("+hIS");Object(g.a)({id:"redshift",extensions:[],aliases:["Redshift","redshift"],loader:function(){return t.e(360).then(t.bind(null,"KpXS"))}})},pg8w:function(mt,M,t){"use strict";t.d(M,"a",function(){return j}),t.d(M,"b",function(){return I});var g=t("EffR"),B=t("6OMU"),x=t("ZCR3"),R=t("pmY6"),A=function(v,C,m,d){var D=arguments.length,L=D<3?C:d===null?d=Object.getOwnPropertyDescriptor(C,m):d,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")L=Reflect.decorate(v,C,m,d);else for(var w=v.length-1;w>=0;w--)(r=v[w])&&(L=(D<3?r(L):D>3?r(C,m,L):r(C,m))||L);return D>3&&L&&Object.defineProperty(C,m,L),L},j;(function(v){v.Tap="-monaco-gesturetap",v.Change="-monaco-gesturechange",v.Start="-monaco-gesturestart",v.End="-monaco-gesturesend",v.Contextmenu="-monaco-gesturecontextmenu"})(j||(j={}));class I extends R.a{constructor(){super();this.dispatched=!1,this.activeTouches={},this.handle=null,this.targets=[],this.ignoreTargets=[],this._lastSetTapCountTime=0,this._register(g.i(document,"touchstart",v=>this.onTouchStart(v),{passive:!1})),this._register(g.i(document,"touchend",v=>this.onTouchEnd(v))),this._register(g.i(document,"touchmove",v=>this.onTouchMove(v),{passive:!1}))}static addTarget(v){return I.isTouchDevice()?(I.INSTANCE||(I.INSTANCE=new I),I.INSTANCE.targets.push(v),{dispose:()=>{I.INSTANCE.targets=I.INSTANCE.targets.filter(C=>C!==v)}}):R.a.None}static ignoreTarget(v){return I.isTouchDevice()?(I.INSTANCE||(I.INSTANCE=new I),I.INSTANCE.ignoreTargets.push(v),{dispose:()=>{I.INSTANCE.ignoreTargets=I.INSTANCE.ignoreTargets.filter(C=>C!==v)}}):R.a.None}static isTouchDevice(){return"ontouchstart"in window||navigator.maxTouchPoints>0}dispose(){this.handle&&(this.handle.dispose(),this.handle=null),super.dispose()}onTouchStart(v){let C=Date.now();this.handle&&(this.handle.dispose(),this.handle=null);for(let m=0,d=v.targetTouches.length;m<d;m++){let D=v.targetTouches.item(m);this.activeTouches[D.identifier]={id:D.identifier,initialTarget:D.target,initialTimeStamp:C,initialPageX:D.pageX,initialPageY:D.pageY,rollingTimestamps:[C],rollingPageX:[D.pageX],rollingPageY:[D.pageY]};let L=this.newGestureEvent(j.Start,D.target);L.pageX=D.pageX,L.pageY=D.pageY,this.dispatchEvent(L)}this.dispatched&&(v.preventDefault(),v.stopPropagation(),this.dispatched=!1)}onTouchEnd(v){let C=Date.now(),m=Object.keys(this.activeTouches).length;for(let d=0,D=v.changedTouches.length;d<D;d++){let L=v.changedTouches.item(d);if(!this.activeTouches.hasOwnProperty(String(L.identifier))){console.warn("move of an UNKNOWN touch",L);continue}let r=this.activeTouches[L.identifier],w=Date.now()-r.initialTimeStamp;if(w<I.HOLD_DELAY&&Math.abs(r.initialPageX-B.t(r.rollingPageX))<30&&Math.abs(r.initialPageY-B.t(r.rollingPageY))<30){let b=this.newGestureEvent(j.Tap,r.initialTarget);b.pageX=B.t(r.rollingPageX),b.pageY=B.t(r.rollingPageY),this.dispatchEvent(b)}else if(w>=I.HOLD_DELAY&&Math.abs(r.initialPageX-B.t(r.rollingPageX))<30&&Math.abs(r.initialPageY-B.t(r.rollingPageY))<30){let b=this.newGestureEvent(j.Contextmenu,r.initialTarget);b.pageX=B.t(r.rollingPageX),b.pageY=B.t(r.rollingPageY),this.dispatchEvent(b)}else if(m===1){let b=B.t(r.rollingPageX),u=B.t(r.rollingPageY),c=B.t(r.rollingTimestamps)-r.rollingTimestamps[0],p=b-r.rollingPageX[0],S=u-r.rollingPageY[0];const E=this.targets.filter(y=>r.initialTarget instanceof Node&&y.contains(r.initialTarget));this.inertia(E,C,Math.abs(p)/c,p>0?1:-1,b,Math.abs(S)/c,S>0?1:-1,u)}this.dispatchEvent(this.newGestureEvent(j.End,r.initialTarget)),delete this.activeTouches[L.identifier]}this.dispatched&&(v.preventDefault(),v.stopPropagation(),this.dispatched=!1)}newGestureEvent(v,C){let m=document.createEvent("CustomEvent");return m.initEvent(v,!1,!0),m.initialTarget=C,m.tapCount=0,m}dispatchEvent(v){if(v.type===j.Tap){const C=new Date().getTime();let m=0;C-this._lastSetTapCountTime>I.CLEAR_TAP_COUNT_TIME?m=1:m=2,this._lastSetTapCountTime=C,v.tapCount=m}else(v.type===j.Change||v.type===j.Contextmenu)&&(this._lastSetTapCountTime=0);for(let C=0;C<this.ignoreTargets.length;C++)if(v.initialTarget instanceof Node&&this.ignoreTargets[C].contains(v.initialTarget))return;this.targets.forEach(C=>{v.initialTarget instanceof Node&&C.contains(v.initialTarget)&&(C.dispatchEvent(v),this.dispatched=!0)})}inertia(v,C,m,d,D,L,r,w){this.handle=g.V(()=>{let b=Date.now(),u=b-C,c=0,p=0,S=!0;m+=I.SCROLL_FRICTION*u,L+=I.SCROLL_FRICTION*u,m>0&&(S=!1,c=d*m*u),L>0&&(S=!1,p=r*L*u);let E=this.newGestureEvent(j.Change);E.translationX=c,E.translationY=p,v.forEach(y=>y.dispatchEvent(E)),S||this.inertia(v,b,m,d,D+c,L,r,w+p)})}onTouchMove(v){let C=Date.now();for(let m=0,d=v.changedTouches.length;m<d;m++){let D=v.changedTouches.item(m);if(!this.activeTouches.hasOwnProperty(String(D.identifier))){console.warn("end of an UNKNOWN touch",D);continue}let L=this.activeTouches[D.identifier],r=this.newGestureEvent(j.Change,L.initialTarget);r.translationX=D.pageX-B.t(L.rollingPageX),r.translationY=D.pageY-B.t(L.rollingPageY),r.pageX=D.pageX,r.pageY=D.pageY,this.dispatchEvent(r),L.rollingPageX.length>3&&(L.rollingPageX.shift(),L.rollingPageY.shift(),L.rollingTimestamps.shift()),L.rollingPageX.push(D.pageX),L.rollingPageY.push(D.pageY),L.rollingTimestamps.push(C)}this.dispatched&&(v.preventDefault(),v.stopPropagation(),this.dispatched=!1)}}I.SCROLL_FRICTION=-.005,I.HOLD_DELAY=700,I.CLEAR_TAP_COUNT_TIME=400,A([x.a],I,"isTouchDevice",null)},ptcw:function(mt,M,t){"use strict";t.d(M,"d",function(){return B}),t.d(M,"a",function(){return R}),t.d(M,"b",function(){return A}),t.d(M,"e",function(){return j}),t.d(M,"c",function(){return v});var g=t("MD5Z");function B(C,m){const d=Object.create(null);for(let D in m){const L=m[D];L&&(d[D]=Object(g.xc)(L,C))}return d}function x(C,m,d){function D(){const L=B(C.getColorTheme(),m);typeof d=="function"?d(L):d.style(L)}return D(),C.onDidColorThemeChange(D)}function R(C,m,d){return x(m,{badgeBackground:(d==null?void 0:d.badgeBackground)||g.c,badgeForeground:(d==null?void 0:d.badgeForeground)||g.d,badgeBorder:g.h},C)}function A(C,m,d){return x(m,Object.assign(Object.assign({},j),d||{}),C)}const j={listFocusBackground:g.Eb,listFocusForeground:g.Fb,listFocusOutline:g.Hb,listActiveSelectionBackground:g.xb,listActiveSelectionForeground:g.yb,listActiveSelectionIconForeground:g.zb,listFocusAndSelectionBackground:g.xb,listFocusAndSelectionForeground:g.yb,listInactiveSelectionBackground:g.Nb,listInactiveSelectionIconForeground:g.Pb,listInactiveSelectionForeground:g.Ob,listInactiveFocusBackground:g.Lb,listInactiveFocusOutline:g.Mb,listHoverBackground:g.Jb,listHoverForeground:g.Kb,listDropBackground:g.Ab,listSelectionOutline:g.b,listHoverOutline:g.b,listFilterWidgetBackground:g.Bb,listFilterWidgetOutline:g.Db,listFilterWidgetNoMatchesOutline:g.Cb,listMatchesShadow:g.Nc,treeIndentGuidesStroke:g.Mc,tableColumnsBorder:g.Gc},I={shadowColor:g.Nc,borderColor:g.Rb,foregroundColor:g.Sb,backgroundColor:g.Qb,selectionForegroundColor:g.Vb,selectionBackgroundColor:g.Tb,selectionBorderColor:g.Ub,separatorColor:g.Wb};function v(C,m,d){return x(m,Object.assign(Object.assign({},I),d),C)}},"q/I2":function(mt,M,t){},q8qy:function(mt,M,t){"use strict";t.r(M);var g=t("+hIS");Object(g.a)({id:"pascaligo",extensions:[".ligo"],aliases:["Pascaligo","ligo"],loader:function(){return t.e(348).then(t.bind(null,"ywQP"))}})},qNAo:function(mt,M,t){"use strict";t.d(M,"i",function(){return R}),t.d(M,"b",function(){return j}),t.d(M,"c",function(){return v}),t.d(M,"f",function(){return C}),t.d(M,"g",function(){return m}),t.d(M,"a",function(){return d}),t.d(M,"e",function(){return D}),t.d(M,"h",function(){return L}),t.d(M,"d",function(){return r});var g=t("N0LK"),B=t("cGHE"),x=t("aokT");class R{constructor(w,b,u,c){this._viewportBrand=void 0,this.top=w|0,this.left=b|0,this.width=u|0,this.height=c|0}}class A{constructor(w,b){this.outputLineIndex=w,this.outputOffset=b}toString(){return`${this.outputLineIndex}:${this.outputOffset}`}toPosition(w,b){const u=this.outputLineIndex>0?b:0;return new B.a(w+this.outputLineIndex,u+this.outputOffset+1)}}class j{constructor(w,b,u,c,p){this.breakOffsets=w,this.breakOffsetsVisibleColumn=b,this.wrappedTextIndentLength=u,this.injectionOffsets=c,this.injectionOptions=p}getInputOffsetOfOutputPosition(w,b){let u=0;if(w===0?u=b:u=this.breakOffsets[w-1]+b,this.injectionOffsets!==null)for(let c=0;c<this.injectionOffsets.length&&u>this.injectionOffsets[c];c++)u<this.injectionOffsets[c]+this.injectionOptions[c].content.length?u=this.injectionOffsets[c]:u-=this.injectionOptions[c].content.length;return u}getOutputPositionOfInputOffset(w,b=2){let u=0;if(this.injectionOffsets!==null)for(let c=0;c<this.injectionOffsets.length&&!(w<this.injectionOffsets[c]);c++){if(b!==1&&w===this.injectionOffsets[c])break;u+=this.injectionOptions[c].content.length}return w+=u,this.getOutputPositionOfOffsetInUnwrappedLine(w,b)}getOutputPositionOfOffsetInUnwrappedLine(w,b=2){let u=0,c=this.breakOffsets.length-1,p=0,S=0;for(;u<=c;){p=u+(c-u)/2|0;const E=this.breakOffsets[p];if(S=p>0?this.breakOffsets[p-1]:0,b===0)if(w<=S)c=p-1;else if(w>E)u=p+1;else break;else if(w<S)c=p-1;else if(w>=E)u=p+1;else break}return new A(p,w-S)}outputPositionToOffsetInUnwrappedLine(w,b){let u=(w>0?this.breakOffsets[w-1]:0)+b;return w>0&&(u-=this.wrappedTextIndentLength),u}normalizeOffsetAroundInjections(w,b){const u=this.getInjectedTextAtOffset(w);if(!u)return w;if(b===2)return w===u.offsetInUnwrappedLine+u.length?u.offsetInUnwrappedLine+u.length:u.offsetInUnwrappedLine;if(b===1){let S=u.offsetInUnwrappedLine+u.length,E=u.injectedTextIndex;for(;E+1<this.injectionOffsets.length&&this.injectionOffsets[E+1]===this.injectionOffsets[E];)S+=this.injectionOptions[E+1].content.length,E++;return S}let c=u.offsetInUnwrappedLine,p=u.injectedTextIndex;for(;p-1>=0&&this.injectionOffsets[p-1]===this.injectionOffsets[p];)c-=this.injectionOptions[p-1].content.length,p++;return c}getInjectedText(w,b){const u=this.outputPositionToOffsetInUnwrappedLine(w,b),c=this.getInjectedTextAtOffset(u);return c?{options:this.injectionOptions[c.injectedTextIndex]}:null}getInjectedTextAtOffset(w){const b=this.injectionOffsets,u=this.injectionOptions;if(b!==null){let c=0;for(let p=0;p<b.length;p++){const S=u[p].content.length,E=b[p]+c,y=b[p]+c+S;if(E>w)break;if(w<=y)return{injectedTextIndex:p,offsetInUnwrappedLine:E,length:S};c+=S}}return}}class I{constructor(w){this.options=w}}class v{constructor(w,b){this.tabSize=w,this.data=b}}class C{constructor(w,b,u,c,p,S,E){this._viewLineDataBrand=void 0,this.content=w,this.continuesWithWrappedLine=b,this.minColumn=u,this.maxColumn=c,this.startVisibleColumn=p,this.tokens=S,this.inlineDecorations=E}}class m{constructor(w,b,u,c,p,S,E,y,O,k){this.minColumn=w,this.maxColumn=b,this.content=u,this.continuesWithWrappedLine=c,this.isBasicASCII=m.isBasicASCII(u,S),this.containsRTL=m.containsRTL(u,this.isBasicASCII,p),this.tokens=E,this.inlineDecorations=y,this.tabSize=O,this.startVisibleColumn=k}static isBasicASCII(w,b){return b?g.A(w):!0}static containsRTL(w,b,u){return!b&&u?g.m(w):!1}}class d{constructor(w,b,u){this.range=w,this.inlineClassName=b,this.type=u}}class D{constructor(w,b,u,c){this.startOffset=w,this.endOffset=b,this.inlineClassName=u,this.inlineClassNameAffectsLetterSpacing=c}toInlineDecoration(w){return new d(new x.a(w,this.startOffset+1,w,this.endOffset+1),this.inlineClassName,this.inlineClassNameAffectsLetterSpacing?3:0)}}class L{constructor(w,b){this._viewModelDecorationBrand=void 0,this.range=w,this.options=b}}class r{constructor(w,b,u){this.color=w,this.zIndex=b,this.data=u}static cmp(w,b){return w.zIndex===b.zIndex?w.color<b.color?-1:w.color>b.color?1:0:w.zIndex-b.zIndex}}},qj0h:function(mt,M,t){"use strict";t.d(M,"b",function(){return B}),t.d(M,"c",function(){return x}),t.d(M,"a",function(){return A}),t.d(M,"f",function(){return I}),t.d(M,"d",function(){return v}),t.d(M,"e",function(){return C});var g=t("746U");function B(m){if(!m||typeof m!="object")return m;if(m instanceof RegExp)return m;const d=Array.isArray(m)?[]:{};return Object.keys(m).forEach(D=>{m[D]&&typeof m[D]=="object"?d[D]=B(m[D]):d[D]=m[D]}),d}function x(m){if(!m||typeof m!="object")return m;const d=[m];for(;d.length>0;){const D=d.shift();Object.freeze(D);for(const L in D)if(R.call(D,L)){const r=D[L];typeof r=="object"&&!Object.isFrozen(r)&&d.push(r)}}return m}const R=Object.prototype.hasOwnProperty;function A(m,d){return j(m,d,new Set)}function j(m,d,D){if(Object(g.n)(m))return m;const L=d(m);if(typeof L!="undefined")return L;if(Object(g.f)(m)){const r=[];for(const w of m)r.push(j(w,d,D));return r}if(Object(g.k)(m)){if(D.has(m))throw new Error("Cannot clone recursive data-structure");D.add(m);const r={};for(let w in m)R.call(m,w)&&(r[w]=j(m[w],d,D));return D.delete(m),r}return m}function I(m,d,D=!0){return Object(g.k)(m)?(Object(g.k)(d)&&Object.keys(d).forEach(L=>{L in m?D&&(Object(g.k)(m[L])&&Object(g.k)(d[L])?I(m[L],d[L],D):m[L]=d[L]):m[L]=d[L]}),m):d}function v(m,d){if(m===d)return!0;if(m==null||d===null||d===void 0)return!1;if(typeof m!==typeof d)return!1;if(typeof m!="object")return!1;if(Array.isArray(m)!==Array.isArray(d))return!1;let D,L;if(Array.isArray(m)){if(m.length!==d.length)return!1;for(D=0;D<m.length;D++)if(!v(m[D],d[D]))return!1}else{const r=[];for(L in m)r.push(L);r.sort();const w=[];for(L in d)w.push(L);if(w.sort(),!v(r,w))return!1;for(D=0;D<r.length;D++)if(!v(m[r[D]],d[r[D]]))return!1}return!0}function C(m,d,D){const L=d(m);return typeof L=="undefined"?D:L}},qoAC:function(mt,M,t){},r0BQ:function(mt,M,t){"use strict";t.d(M,"a",function(){return g});class g{constructor(B,x=[],R=!1){this.ctor=B,this.staticArguments=x,this.supportsDelayedInstantiation=R}}},r6Ki:function(mt,M,t){},rugR:function(mt,M,t){"use strict";t.r(M),t.d(M,"ModesHoverController",function(){return qo});var g=t("/kV6"),B=t("pmY6"),x=t("sswD"),R=t("aokT"),A=t("wQH0"),j=t("WBhO"),I=t("H4T2"),v=t("EffR"),C=t("GJhM"),m=t("vAKA");const d=v.a;class D extends B.a{constructor(){super();this.containerDomNode=document.createElement("div"),this.containerDomNode.className="monaco-hover",this.containerDomNode.tabIndex=0,this.containerDomNode.setAttribute("role","tooltip"),this.contentsDomNode=document.createElement("div"),this.contentsDomNode.className="monaco-hover-content",this._scrollbar=this._register(new C.a(this.contentsDomNode,{consumeMouseWheelIfScrollbarIsNeeded:!0})),this.containerDomNode.appendChild(this._scrollbar.getDomNode())}onContentsChanged(){this._scrollbar.scanDomNode()}}class L extends B.a{constructor(ke,ue,Fe){super();this.actionContainer=v.q(ke,d("div.action-container")),this.action=v.q(this.actionContainer,d("a.action")),this.action.setAttribute("href","#"),this.action.setAttribute("role","button"),ue.iconClass&&v.q(this.action,d(`span.icon.${ue.iconClass}`));const et=v.q(this.action,d("span"));et.textContent=Fe?`${ue.label} (${Fe})`:ue.label,this._register(v.i(this.actionContainer,v.d.MOUSE_DOWN,f=>{f.stopPropagation(),f.preventDefault(),ue.run(this.actionContainer)})),this.setEnabled(!0)}static render(ke,ue,Fe){return new L(ke,ue,Fe)}setEnabled(ke){ke?(this.actionContainer.classList.remove("disabled"),this.actionContainer.removeAttribute("aria-disabled")):(this.actionContainer.classList.add("disabled"),this.actionContainer.setAttribute("aria-disabled","true"))}}var r=t("G300"),w=t("6OMU"),b=t("cGHE"),u=t("tX9W"),c=t("twdY"),p=t("JQT/"),S=t("zrhQ"),E=t("/cxE"),y=t("bY76"),O=t("G2kB"),k=t("nnTU");function Q(ke,ue){const Fe=[],et=c.c.ordered(ke).reverse(),f=et.map(h=>Promise.resolve(h.provideDocumentColors(ke,ue)).then(_=>{if(Array.isArray(_))for(let K of _)Fe.push({colorInfo:K,provider:h})}));return Promise.all(f).then(()=>Fe)}function q(ke,ue,Fe,et){return Promise.resolve(Fe.provideColorPresentations(ke,ue,et))}k.a.registerCommand("_executeDocumentColorProvider",function(ke,...ue){const[Fe]=ue;if(!(Fe instanceof y.a))throw Object(E.c)();const et=ke.get(O.a).getModel(Fe);if(!et)throw Object(E.c)();const f=[],h=c.c.ordered(et).reverse(),_=h.map(K=>Promise.resolve(K.provideDocumentColors(et,p.a.None)).then(de=>{if(Array.isArray(de))for(let ye of de)f.push({range:ye.range,color:[ye.color.red,ye.color.green,ye.color.blue,ye.color.alpha]})}));return Promise.all(_).then(()=>f)}),k.a.registerCommand("_executeColorPresentationProvider",function(ke,...ue){const[Fe,et]=ue,{uri:f,range:h}=et;if(!(f instanceof y.a)||!Array.isArray(Fe)||Fe.length!==4||!R.a.isIRange(h))throw Object(E.c)();const[_,K,de,ye]=Fe,De=ke.get(O.a).getModel(f);if(!De)throw Object(E.c)();const qe={range:h,color:{red:_,green:K,blue:de,alpha:ye}},ht=[],yt=c.c.ordered(De).reverse(),Ct=yt.map(At=>Promise.resolve(At.provideColorPresentations(De,qe,p.a.None)).then(Ft=>{Array.isArray(Ft)&&ht.push(...Ft)}));return Promise.all(Ct).then(()=>ht)});var z=t("X+cX"),J=t("7afs"),re=t("Vxe3"),Z=t("+7oY"),ne=function(ke,ue,Fe,et){var f=arguments.length,h=f<3?ue:et===null?et=Object.getOwnPropertyDescriptor(ue,Fe):et,_;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")h=Reflect.decorate(ke,ue,Fe,et);else for(var K=ke.length-1;K>=0;K--)(_=ke[K])&&(h=(f<3?_(h):f>3?_(ue,Fe,h):_(ue,Fe))||h);return f>3&&h&&Object.defineProperty(ue,Fe,h),h},le=function(ke,ue){return function(Fe,et){ue(Fe,et,ke)}};const _e=500;let Ce=class ke extends B.a{constructor(ue,Fe,et){super();this._editor=ue,this._codeEditorService=Fe,this._configurationService=et,this._localToDispose=this._register(new B.b),this._decorationsIds=[],this._colorDatas=new Map,this._colorDecoratorIds=[],this._decorationsTypes=new Set,this._register(ue.onDidChangeModel(()=>{this._isEnabled=this.isEnabled(),this.onModelChanged()})),this._register(ue.onDidChangeModelLanguage(()=>this.onModelChanged())),this._register(c.c.onDidChange(()=>this.onModelChanged())),this._register(ue.onDidChangeConfiguration(()=>{let f=this._isEnabled;this._isEnabled=this.isEnabled(),f!==this._isEnabled&&(this._isEnabled?this.onModelChanged():this.removeAllDecorations())})),this._timeoutTimer=null,this._computePromise=null,this._isEnabled=this.isEnabled(),this.onModelChanged()}isEnabled(){const ue=this._editor.getModel();if(!ue)return!1;const Fe=ue.getLanguageId(),et=this._configurationService.getValue(Fe);if(et&&typeof et=="object"){const f=et.colorDecorators;if(f&&f.enable!==void 0&&!f.enable)return f.enable}return this._editor.getOption(17)}static get(ue){return ue.getContribution(this.ID)}dispose(){this.stop(),this.removeAllDecorations(),super.dispose()}onModelChanged(){if(this.stop(),!this._isEnabled)return;const ue=this._editor.getModel();if(!ue||!c.c.has(ue))return;this._localToDispose.add(this._editor.onDidChangeModelContent(()=>{this._timeoutTimer||(this._timeoutTimer=new z.g,this._timeoutTimer.cancelAndSet(()=>{this._timeoutTimer=null,this.beginCompute()},ke.RECOMPUTE_TIME))})),this.beginCompute()}beginCompute(){this._computePromise=Object(z.h)(ue=>{const Fe=this._editor.getModel();return Fe?Q(Fe,ue):Promise.resolve([])}),this._computePromise.then(ue=>{this.updateDecorations(ue),this.updateColorDecorators(ue),this._computePromise=null},E.f)}stop(){this._timeoutTimer&&(this._timeoutTimer.cancel(),this._timeoutTimer=null),this._computePromise&&(this._computePromise.cancel(),this._computePromise=null),this._localToDispose.clear()}updateDecorations(ue){const Fe=ue.map(et=>({range:{startLineNumber:et.colorInfo.range.startLineNumber,startColumn:et.colorInfo.range.startColumn,endLineNumber:et.colorInfo.range.endLineNumber,endColumn:et.colorInfo.range.endColumn},options:u.b.EMPTY}));this._decorationsIds=this._editor.deltaDecorations(this._decorationsIds,Fe),this._colorDatas=new Map,this._decorationsIds.forEach((et,f)=>this._colorDatas.set(et,ue[f]))}updateColorDecorators(ue){let Fe=[],et={};for(let f=0;f<ue.length&&Fe.length<_e;f++){const{red:h,green:_,blue:K,alpha:de}=ue[f].colorInfo.color,ye=new S.c(Math.round(h*255),Math.round(_*255),Math.round(K*255),de);let De=Object(J.c)(`rgba(${ye.r},${ye.g},${ye.b},${ye.a})`).toString(16),qe=`rgba(${ye.r}, ${ye.g}, ${ye.b}, ${ye.a})`,ht="colorBox-"+De;!this._decorationsTypes.has(ht)&&!et[ht]&&this._codeEditorService.registerDecorationType("color-detector-color",ht,{before:{contentText:" ",border:"solid 0.1em #000",margin:"0.1em 0.2em 0 0.2em",width:"0.8em",height:"0.8em",backgroundColor:qe},dark:{before:{border:"solid 0.1em #eee"}}},void 0,this._editor),et[ht]=!0,Fe.push({range:{startLineNumber:ue[f].colorInfo.range.startLineNumber,startColumn:ue[f].colorInfo.range.startColumn,endLineNumber:ue[f].colorInfo.range.endLineNumber,endColumn:ue[f].colorInfo.range.endColumn},options:this._codeEditorService.resolveDecorationOptions(ht,!0)})}this._decorationsTypes.forEach(f=>{et[f]||this._codeEditorService.removeDecorationType(f)}),this._colorDecoratorIds=this._editor.deltaDecorations(this._colorDecoratorIds,Fe)}removeAllDecorations(){this._decorationsIds=this._editor.deltaDecorations(this._decorationsIds,[]),this._colorDecoratorIds=this._editor.deltaDecorations(this._colorDecoratorIds,[]),this._decorationsTypes.forEach(ue=>{this._codeEditorService.removeDecorationType(ue)})}getColorData(ue){const Fe=this._editor.getModel();if(!Fe)return null;const et=Fe.getDecorationsInRange(R.a.fromPositions(ue,ue)).filter(f=>this._colorDatas.has(f.id));return et.length===0?null:this._colorDatas.get(et[0].id)}};Ce.ID="editor.contrib.colorDetector",Ce.RECOMPUTE_TIME=1e3,Ce=ne([le(1,re.a),le(2,Z.a)],Ce),Object(x.l)(Ce.ID,Ce);var oe=t("MI8n");class ae{constructor(ke,ue,Fe){this.presentationIndex=Fe,this._onColorFlushed=new oe.b,this.onColorFlushed=this._onColorFlushed.event,this._onDidChangeColor=new oe.b,this.onDidChangeColor=this._onDidChangeColor.event,this._onDidChangePresentation=new oe.b,this.onDidChangePresentation=this._onDidChangePresentation.event,this.originalColor=ke,this._color=ke,this._colorPresentations=ue}get color(){return this._color}set color(ke){if(this._color.equals(ke))return;this._color=ke,this._onDidChangeColor.fire(ke)}get presentation(){return this.colorPresentations[this.presentationIndex]}get colorPresentations(){return this._colorPresentations}set colorPresentations(ke){this._colorPresentations=ke,this.presentationIndex>ke.length-1&&(this.presentationIndex=0),this._onDidChangePresentation.fire(this.presentation)}selectNextColorPresentation(){this.presentationIndex=(this.presentationIndex+1)%this.colorPresentations.length,this.flushColor(),this._onDidChangePresentation.fire(this.presentation)}guessColorPresentation(ke,ue){for(let Fe=0;Fe<this.colorPresentations.length;Fe++)if(ue.toLowerCase()===this.colorPresentations[Fe].label){this.presentationIndex=Fe,this._onDidChangePresentation.fire(this.presentation);break}}flushColor(){this._onColorFlushed.fire(this._color)}}var V=t("D3Dy"),G=t("AKMP"),ee=t("EPS+"),pe=t("3/fG"),Te=t("MD5Z"),Ie=t("t9D7");const Me=v.a;class Oe extends B.a{constructor(ke,ue,Fe){super();this.model=ue,this.domNode=Me(".colorpicker-header"),v.q(ke,this.domNode),this.pickedColorNode=v.q(this.domNode,Me(".picked-color"));const et=Object(pe.a)("clickToToggleColorOptions","Click to toggle color options (rgb/hsl/hex)");this.pickedColorNode.setAttribute("title",et);const f=v.q(this.domNode,Me(".original-color"));f.style.backgroundColor=S.a.Format.CSS.format(this.model.originalColor)||"",this.backgroundColor=Fe.getColorTheme().getColor(Te.E)||S.a.white,this._register(Object(Ie.f)((h,_)=>{this.backgroundColor=h.getColor(Te.E)||S.a.white})),this._register(v.i(this.pickedColorNode,v.d.CLICK,()=>this.model.selectNextColorPresentation())),this._register(v.i(f,v.d.CLICK,()=>{this.model.color=this.model.originalColor,this.model.flushColor()})),this._register(ue.onDidChangeColor(this.onDidChangeColor,this)),this._register(ue.onDidChangePresentation(this.onDidChangePresentation,this)),this.pickedColorNode.style.backgroundColor=S.a.Format.CSS.format(ue.color)||"",this.pickedColorNode.classList.toggle("light",ue.color.rgba.a<.5?this.backgroundColor.isLighter():ue.color.isLighter())}onDidChangeColor(ke){this.pickedColorNode.style.backgroundColor=S.a.Format.CSS.format(ke)||"",this.pickedColorNode.classList.toggle("light",ke.rgba.a<.5?this.backgroundColor.isLighter():ke.isLighter()),this.onDidChangePresentation()}onDidChangePresentation(){this.pickedColorNode.textContent=this.model.presentation?this.model.presentation.label:"",this.pickedColorNode.prepend(Me(".codicon.codicon-color-mode"))}}class Xe extends B.a{constructor(ke,ue,Fe){super();this.model=ue,this.pixelRatio=Fe,this.domNode=Me(".colorpicker-body"),v.q(ke,this.domNode),this.saturationBox=new fe(this.domNode,this.model,this.pixelRatio),this._register(this.saturationBox),this._register(this.saturationBox.onDidChange(this.onDidSaturationValueChange,this)),this._register(this.saturationBox.onColorFlushed(this.flushColor,this)),this.opacityStrip=new Be(this.domNode,this.model),this._register(this.opacityStrip),this._register(this.opacityStrip.onDidChange(this.onDidOpacityChange,this)),this._register(this.opacityStrip.onColorFlushed(this.flushColor,this)),this.hueStrip=new Se(this.domNode,this.model),this._register(this.hueStrip),this._register(this.hueStrip.onDidChange(this.onDidHueChange,this)),this._register(this.hueStrip.onColorFlushed(this.flushColor,this))}flushColor(){this.model.flushColor()}onDidSaturationValueChange({s:ke,v:ue}){const Fe=this.model.color.hsva;this.model.color=new S.a(new S.b(Fe.h,ke,ue,Fe.a))}onDidOpacityChange(ke){const ue=this.model.color.hsva;this.model.color=new S.a(new S.b(ue.h,ue.s,ue.v,ke))}onDidHueChange(ke){const ue=this.model.color.hsva,Fe=(1-ke)*360;this.model.color=new S.a(new S.b(Fe===360?0:Fe,ue.s,ue.v,ue.a))}layout(){this.saturationBox.layout(),this.opacityStrip.layout(),this.hueStrip.layout()}}class fe extends B.a{constructor(ke,ue,Fe){super();this.model=ue,this.pixelRatio=Fe,this._onDidChange=new oe.b,this.onDidChange=this._onDidChange.event,this._onColorFlushed=new oe.b,this.onColorFlushed=this._onColorFlushed.event,this.domNode=Me(".saturation-wrap"),v.q(ke,this.domNode),this.canvas=document.createElement("canvas"),this.canvas.className="saturation-box",v.q(this.domNode,this.canvas),this.selection=Me(".saturation-selection"),v.q(this.domNode,this.selection),this.layout(),this._register(v.g(this.domNode,et=>this.onMouseDown(et))),this._register(this.model.onDidChangeColor(this.onDidChangeColor,this)),this.monitor=null}onMouseDown(ke){this.monitor=this._register(new G.a);const ue=v.D(this.domNode);ke.target!==this.selection&&this.onDidChangePosition(ke.offsetX,ke.offsetY),this.monitor.startMonitoring(ke.target,ke.buttons,G.b,et=>this.onDidChangePosition(et.posx-ue.left,et.posy-ue.top),()=>null);const Fe=v.h(document,()=>{this._onColorFlushed.fire(),Fe.dispose(),this.monitor&&(this.monitor.stopMonitoring(!0),this.monitor=null)},!0)}onDidChangePosition(ke,ue){const Fe=Math.max(0,Math.min(1,ke/this.width)),et=Math.max(0,Math.min(1,1-ue/this.height));this.paintSelection(Fe,et),this._onDidChange.fire({s:Fe,v:et})}layout(){this.width=this.domNode.offsetWidth,this.height=this.domNode.offsetHeight,this.canvas.width=this.width*this.pixelRatio,this.canvas.height=this.height*this.pixelRatio,this.paint();const ke=this.model.color.hsva;this.paintSelection(ke.s,ke.v)}paint(){const ke=this.model.color.hsva,ue=new S.a(new S.b(ke.h,1,1,1)),Fe=this.canvas.getContext("2d"),et=Fe.createLinearGradient(0,0,this.canvas.width,0);et.addColorStop(0,"rgba(255, 255, 255, 1)"),et.addColorStop(.5,"rgba(255, 255, 255, 0.5)"),et.addColorStop(1,"rgba(255, 255, 255, 0)");const f=Fe.createLinearGradient(0,0,0,this.canvas.height);f.addColorStop(0,"rgba(0, 0, 0, 0)"),f.addColorStop(1,"rgba(0, 0, 0, 1)"),Fe.rect(0,0,this.canvas.width,this.canvas.height),Fe.fillStyle=S.a.Format.CSS.format(ue),Fe.fill(),Fe.fillStyle=et,Fe.fill(),Fe.fillStyle=f,Fe.fill()}paintSelection(ke,ue){this.selection.style.left=`${ke*this.width}px`,this.selection.style.top=`${this.height-ue*this.height}px`}onDidChangeColor(){if(this.monitor&&this.monitor.isMonitoring())return;this.paint()}}class Pe extends B.a{constructor(ke,ue){super();this.model=ue,this._onDidChange=new oe.b,this.onDidChange=this._onDidChange.event,this._onColorFlushed=new oe.b,this.onColorFlushed=this._onColorFlushed.event,this.domNode=v.q(ke,Me(".strip")),this.overlay=v.q(this.domNode,Me(".overlay")),this.slider=v.q(this.domNode,Me(".slider")),this.slider.style.top="0px",this._register(v.g(this.domNode,Fe=>this.onMouseDown(Fe))),this.layout()}layout(){this.height=this.domNode.offsetHeight-this.slider.offsetHeight;const ke=this.getValue(this.model.color);this.updateSliderPosition(ke)}onMouseDown(ke){const ue=this._register(new G.a),Fe=v.D(this.domNode);this.domNode.classList.add("grabbing"),ke.target!==this.slider&&this.onDidChangeTop(ke.offsetY),ue.startMonitoring(ke.target,ke.buttons,G.b,f=>this.onDidChangeTop(f.posy-Fe.top),()=>null);const et=v.h(document,()=>{this._onColorFlushed.fire(),et.dispose(),ue.stopMonitoring(!0),this.domNode.classList.remove("grabbing")},!0)}onDidChangeTop(ke){const ue=Math.max(0,Math.min(1,1-ke/this.height));this.updateSliderPosition(ue),this._onDidChange.fire(ue)}updateSliderPosition(ke){this.slider.style.top=`${(1-ke)*this.height}px`}}class Be extends Pe{constructor(ke,ue){super(ke,ue);this.domNode.classList.add("opacity-strip"),this._register(ue.onDidChangeColor(this.onDidChangeColor,this)),this.onDidChangeColor(this.model.color)}onDidChangeColor(ke){const{r:ue,g:Fe,b:et}=ke.rgba,f=new S.a(new S.c(ue,Fe,et,1)),h=new S.a(new S.c(ue,Fe,et,0));this.overlay.style.background=`linear-gradient(to bottom, ${f} 0%, ${h} 100%)`}getValue(ke){return ke.hsva.a}}class Se extends Pe{constructor(ke,ue){super(ke,ue);this.domNode.classList.add("hue-strip")}getValue(ke){return 1-ke.hsva.h/360}}class me extends r.a{constructor(ke,ue,Fe,et){super();this.model=ue,this.pixelRatio=Fe,this._register(Object(V.l)(()=>this.layout()));const f=Me(".colorpicker-widget");ke.appendChild(f);const h=new Oe(f,this.model,et);this.body=new Xe(f,this.model,this.pixelRatio),this._register(h),this._register(this.body)}layout(){this.body.layout()}}var he=function(ke,ue,Fe,et){var f=arguments.length,h=f<3?ue:et===null?et=Object.getOwnPropertyDescriptor(ue,Fe):et,_;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")h=Reflect.decorate(ke,ue,Fe,et);else for(var K=ke.length-1;K>=0;K--)(_=ke[K])&&(h=(f<3?_(h):f>3?_(ue,Fe,h):_(ue,Fe))||h);return f>3&&h&&Object.defineProperty(ue,Fe,h),h},Le=function(ke,ue){return function(Fe,et){ue(Fe,et,ke)}},we=function(ke,ue,Fe,et){function f(h){return h instanceof Fe?h:new Fe(function(_){_(h)})}return new(Fe||(Fe=Promise))(function(h,_){function K(De){try{ye(et.next(De))}catch(qe){_(qe)}}function de(De){try{ye(et.throw(De))}catch(qe){_(qe)}}function ye(De){De.done?h(De.value):f(De.value).then(K,de)}ye((et=et.apply(ke,ue||[])).next())})};class ve{constructor(ke,ue,Fe,et){this.owner=ke,this.range=ue,this.model=Fe,this.provider=et,this.forceShowAtRange=!0}isValidForHoverAnchor(ke){return ke.type===1&&this.range.startColumn<=ke.range.startColumn&&this.range.endColumn>=ke.range.endColumn}}let ie=class{constructor(ue,Fe,et){this._editor=ue,this._hover=Fe,this._themeService=et}computeSync(ue,Fe){return[]}computeAsync(ue,Fe,et){return we(this,void 0,void 0,function*(){if(!this._editor.hasModel())return[];const f=Ce.get(this._editor);for(const h of Fe){if(h.options.description!=="color-detector-color")continue;const _=f.getColorData(h.range.getStartPosition());if(_){const K=yield this._createColorHover(this._editor.getModel(),_.colorInfo,_.provider);return[K]}}return[]})}_createColorHover(ue,Fe,et){return we(this,void 0,void 0,function*(){const f=ue.getValueInRange(Fe.range),{red:h,green:_,blue:K,alpha:de}=Fe.color,ye=new S.c(Math.round(h*255),Math.round(_*255),Math.round(K*255),de),De=new S.a(ye),qe=yield q(ue,Fe,et,p.a.None),ht=new ae(De,[],0);return ht.colorPresentations=qe||[],ht.guessColorPresentation(De,f),new ve(this,R.a.lift(Fe.range),ht,et)})}renderHoverParts(ue,Fe,et){if(ue.length===0||!this._editor.hasModel())return B.a.None;const f=new B.b,h=ue[0],_=this._editor.getModel(),K=h.model,de=f.add(new me(Fe,K,this._editor.getOption(127),this._themeService));let ye=new R.a(h.range.startLineNumber,h.range.startColumn,h.range.endLineNumber,h.range.endColumn);const De=()=>{let ht,yt;if(K.presentation.textEdit){ht=[K.presentation.textEdit],yt=new R.a(K.presentation.textEdit.range.startLineNumber,K.presentation.textEdit.range.startColumn,K.presentation.textEdit.range.endLineNumber,K.presentation.textEdit.range.endColumn);const Ct=this._editor.getModel()._setTrackedRange(null,yt,3);this._editor.pushUndoStop(),this._editor.executeEdits("colorpicker",ht),yt=this._editor.getModel()._getTrackedRange(Ct)||yt}else ht=[{identifier:null,range:ye,text:K.presentation.label,forceMoveMarkers:!1}],yt=ye.setEndPosition(ye.endLineNumber,ye.startColumn+K.presentation.label.length),this._editor.pushUndoStop(),this._editor.executeEdits("colorpicker",ht);K.presentation.additionalTextEdits&&(ht=[...K.presentation.additionalTextEdits],this._editor.executeEdits("colorpicker",ht),this._hover.hide()),this._editor.pushUndoStop(),ye=yt},qe=ht=>q(_,{range:ye,color:{red:ht.rgba.r/255,green:ht.rgba.g/255,blue:ht.rgba.b/255,alpha:ht.rgba.a}},h.provider,p.a.None).then(yt=>{K.colorPresentations=yt||[]});return f.add(K.onColorFlushed(ht=>{qe(ht).then(De)})),f.add(K.onDidChangeColor(qe)),this._hover.setColorPicker(de),f}};ie=he([Le(2,Ie.b)],ie);class W{constructor(ke,ue,Fe,et,f){this._computer=ke,this._state=0,this._hoverTime=f,this._firstWaitScheduler=new z.e(()=>this._triggerAsyncComputation(),0),this._secondWaitScheduler=new z.e(()=>this._triggerSyncComputation(),0),this._loadingMessageScheduler=new z.e(()=>this._showLoadingMessage(),0),this._asyncComputationPromise=null,this._asyncComputationPromiseDone=!1,this._completeCallback=ue,this._errorCallback=Fe,this._progressCallback=et}setHoverTime(ke){this._hoverTime=ke}_firstWaitTime(){return this._hoverTime/2}_secondWaitTime(){return this._hoverTime/2}_loadingMessageTime(){return 3*this._hoverTime}_triggerAsyncComputation(){this._state=2,this._secondWaitScheduler.schedule(this._secondWaitTime()),this._computer.computeAsync?(this._asyncComputationPromiseDone=!1,this._asyncComputationPromise=Object(z.h)(ke=>this._computer.computeAsync(ke)),this._asyncComputationPromise.then(ke=>{this._asyncComputationPromiseDone=!0,this._withAsyncResult(ke)},ke=>this._onError(ke))):this._asyncComputationPromiseDone=!0}_triggerSyncComputation(){this._computer.computeSync&&this._computer.onResult(this._computer.computeSync(),!0),this._asyncComputationPromiseDone?(this._state=0,this._onComplete(this._computer.getResult())):(this._state=3,this._onProgress(this._computer.getResult()))}_showLoadingMessage(){this._state===3&&this._onProgress(this._computer.getResultWithLoadingMessage())}_withAsyncResult(ke){ke&&this._computer.onResult(ke,!1),this._state===3&&(this._state=0,this._onComplete(this._computer.getResult()))}_onComplete(ke){this._completeCallback(ke)}_onError(ke){this._errorCallback?this._errorCallback(ke):Object(E.f)(ke)}_onProgress(ke){this._progressCallback(ke)}start(ke){if(ke===0)this._state===0&&(this._state=1,this._firstWaitScheduler.schedule(this._firstWaitTime()),this._loadingMessageScheduler.schedule(this._loadingMessageTime()));else switch(this._state){case 0:this._triggerAsyncComputation(),this._secondWaitScheduler.cancel(),this._triggerSyncComputation();break;case 2:this._secondWaitScheduler.cancel(),this._triggerSyncComputation();break}}cancel(){this._loadingMessageScheduler.cancel(),this._state===1&&this._firstWaitScheduler.cancel(),this._state===2&&(this._secondWaitScheduler.cancel(),this._asyncComputationPromise&&(this._asyncComputationPromise.cancel(),this._asyncComputationPromise=null)),this._state===3&&(this._asyncComputationPromise&&(this._asyncComputationPromise.cancel(),this._asyncComputationPromise=null)),this._state=0}}class U{constructor(ke,ue){this.priority=ke,this.range=ue,this.type=1}equals(ke){return ke.type===1&&this.range.equalsRange(ke.range)}canAdoptVisibleHover(ke,ue){return ke.type===1&&ue.lineNumber===this.range.startLineNumber}}class se{constructor(ke,ue,Fe){this.priority=ke,this.owner=ue,this.range=Fe,this.type=2}equals(ke){return ke.type===2&&this.owner===ke.owner}canAdoptVisibleHover(ke,ue){return ke.type===2&&this.owner===ke.owner}}var je=t("eLzo"),Re=t("v6HE");function We(ke,ue,Fe){const et=c.p.ordered(ke),f=et.map(h=>Promise.resolve(h.provideHover(ke,ue,Fe)).then(_=>_&&dt(_)?_:void 0,_=>{Object(E.g)(_);return}));return Promise.all(f).then(w.e)}Object(x.n)("_executeHoverProvider",(ke,ue)=>We(ke,ue,p.a.None));function dt(ke){const ue=typeof ke.range!="undefined",Fe=typeof ke.contents!="undefined"&&ke.contents&&ke.contents.length>0;return ue&&Fe}var Lt=t("W9cx"),Ht=function(ke,ue,Fe,et){var f=arguments.length,h=f<3?ue:et===null?et=Object.getOwnPropertyDescriptor(ue,Fe):et,_;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")h=Reflect.decorate(ke,ue,Fe,et);else for(var K=ke.length-1;K>=0;K--)(_=ke[K])&&(h=(f<3?_(h):f>3?_(ue,Fe,h):_(ue,Fe))||h);return f>3&&h&&Object.defineProperty(ue,Fe,h),h},$e=function(ke,ue){return function(Fe,et){ue(Fe,et,ke)}},ot=function(ke,ue,Fe,et){function f(h){return h instanceof Fe?h:new Fe(function(_){_(h)})}return new(Fe||(Fe=Promise))(function(h,_){function K(De){try{ye(et.next(De))}catch(qe){_(qe)}}function de(De){try{ye(et.throw(De))}catch(qe){_(qe)}}function ye(De){De.done?h(De.value):f(De.value).then(K,de)}ye((et=et.apply(ke,ue||[])).next())})};const ce=v.a;class Ve{constructor(ke,ue,Fe){this.owner=ke,this.range=ue,this.contents=Fe}isValidForHoverAnchor(ke){return ke.type===1&&this.range.startColumn<=ke.range.startColumn&&this.range.endColumn>=ke.range.endColumn}}let it=class{constructor(ue,Fe,et,f,h){this._editor=ue,this._hover=Fe,this._modeService=et,this._openerService=f,this._configurationService=h}createLoadingMessage(ue){return new Ve(this,ue.range,[new je.a().appendText(pe.a("modesContentHover.loading","Loading..."))])}computeSync(ue,Fe){if(!this._editor.hasModel()||ue.type!==1)return[];const et=this._editor.getModel(),f=ue.range.startLineNumber,h=et.getLineMaxColumn(f),_=[];for(const De of Fe){const qe=De.range.startLineNumber===f?De.range.startColumn:1,ht=De.range.endLineNumber===f?De.range.endColumn:h,yt=De.options.hoverMessage;if(!yt||Object(je.b)(yt))continue;const Ct=new R.a(ue.range.startLineNumber,qe,ue.range.startLineNumber,ht);_.push(new Ve(this,Ct,Object(w.c)(yt)))}const K=et.getLineLength(f),de=et.getLanguageIdAtPosition(ue.range.startLineNumber,ue.range.startColumn),ye=this._configurationService.getValue("editor.maxTokenizationLineLength",{overrideIdentifier:de});return typeof ye=="number"&&K>=ye&&_.push(new Ve(this,ue.range,[{value:pe.a("too many characters","Tokenization is skipped for long lines for performance reasons. This can be configured via `editor.maxTokenizationLineLength`.")}])),_}computeAsync(ue,Fe,et){return ot(this,void 0,void 0,function*(){if(!this._editor.hasModel()||ue.type!==1)return Promise.resolve([]);const f=this._editor.getModel();if(!c.p.has(f))return Promise.resolve([]);const h=yield We(f,new b.a(ue.range.startLineNumber,ue.range.startColumn),et),_=[];for(const K of h){if(Object(je.b)(K.contents))continue;const de=K.range?R.a.lift(K.range):ue.range;_.push(new Ve(this,de,K.contents))}return _})}renderHoverParts(ue,Fe,et){const f=new B.b;for(const h of ue)for(const _ of h.contents){if(Object(je.b)(_))continue;const K=ce("div.hover-row.markdown-hover"),de=v.q(K,ce("div.hover-contents")),ye=f.add(new Re.a({editor:this._editor},this._modeService,this._openerService));f.add(ye.onDidRenderAsync(()=>{de.className="hover-contents code-hover-contents",this._hover.onContentsChanged()}));const De=f.add(ye.render(_));de.appendChild(De.element),Fe.appendChild(K)}return f}};it=Ht([$e(2,j.a),$e(3,Lt.a),$e(4,Z.a)],it);var Et=t("gslv"),It=t("79sc"),Rt=t("hJVp"),vo=t("C1Q+"),Mo=t("nlbu"),xo=t("lY/7"),Do=t("tADe"),Lo=t("tTk5"),To=function(ke,ue,Fe,et){var f=arguments.length,h=f<3?ue:et===null?et=Object.getOwnPropertyDescriptor(ue,Fe):et,_;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")h=Reflect.decorate(ke,ue,Fe,et);else for(var K=ke.length-1;K>=0;K--)(_=ke[K])&&(h=(f<3?_(h):f>3?_(ue,Fe,h):_(ue,Fe))||h);return f>3&&h&&Object.defineProperty(ue,Fe,h),h},Vt=function(ke,ue){return function(Fe,et){ue(Fe,et,ke)}};const xt=v.a;class ze{constructor(ke,ue,Fe){this.owner=ke,this.range=ue,this.marker=Fe}isValidForHoverAnchor(ke){return ke.type===1&&this.range.startColumn<=ke.range.startColumn&&this.range.endColumn>=ke.range.endColumn}}const ct={type:1,filter:{include:Mo.b.QuickFix}};let Ut=class{constructor(ue,Fe,et,f){this._editor=ue,this._hover=Fe,this._markerDecorationsService=et,this._openerService=f,this.recentMarkerCodeActionsInfo=void 0}computeSync(ue,Fe){if(!this._editor.hasModel()||ue.type!==1)return[];const et=this._editor.getModel(),f=ue.range.startLineNumber,h=et.getLineMaxColumn(f),_=[];for(const K of Fe){const de=K.range.startLineNumber===f?K.range.startColumn:1,ye=K.range.endLineNumber===f?K.range.endColumn:h,De=this._markerDecorationsService.getMarker(et.uri,K);if(!De)continue;const qe=new R.a(ue.range.startLineNumber,de,ue.range.startLineNumber,ye);_.push(new ze(this,qe,De))}return _}renderHoverParts(ue,Fe,et){if(!ue.length)return B.a.None;const f=new B.b;ue.forEach(_=>Fe.appendChild(this.renderMarkerHover(_,f)));const h=ue.length===1?ue[0]:ue.sort((_,K)=>Do.c.compare(_.marker.severity,K.marker.severity))[0];return this.renderMarkerStatusbar(h,et,f),f}renderMarkerHover(ue,Fe){const et=xt("div.hover-row"),f=v.q(et,xt("div.marker.hover-contents")),{source:h,message:_,code:K,relatedInformation:de}=ue.marker;this._editor.applyFontInfo(f);const ye=v.q(f,xt("span"));if(ye.style.whiteSpace="pre-wrap",ye.innerText=_,h||K)if(K&&typeof K!="string"){const De=xt("span");if(h){const Ct=v.q(De,xt("span"));Ct.innerText=h}const qe=v.q(De,xt("a.code-link"));qe.setAttribute("href",K.target.toString()),Fe.add(v.i(qe,"click",Ct=>{this._openerService.open(K.target,{allowCommands:!0}),Ct.preventDefault(),Ct.stopPropagation()}));const ht=v.q(qe,xt("span"));ht.innerText=K.value;const yt=v.q(f,De);yt.style.opacity="0.6",yt.style.paddingLeft="6px"}else{const De=v.q(f,xt("span"));De.style.opacity="0.6",De.style.paddingLeft="6px",De.innerText=h&&K?`${h}(${K})`:h||`(${K})`}if(Object(w.n)(de))for(const{message:De,resource:qe,startLineNumber:ht,startColumn:yt}of de){const Ct=v.q(f,xt("div"));Ct.style.marginTop="8px";const At=v.q(Ct,xt("a"));At.innerText=`${Object(Et.b)(qe)}(${ht}, ${yt}): `,At.style.cursor="pointer",Fe.add(v.i(At,"click",Zt=>{Zt.stopPropagation(),Zt.preventDefault(),this._openerService&&this._openerService.open(qe,{fromUserGesture:!0,editorOptions:{selection:{startLineNumber:ht,startColumn:yt}}}).catch(E.f)}));const Ft=v.q(Ct,xt("span"));Ft.innerText=De,this._editor.applyFontInfo(Ft)}return et}renderMarkerStatusbar(ue,Fe,et){if((ue.marker.severity===Do.c.Error||ue.marker.severity===Do.c.Warning||ue.marker.severity===Do.c.Info)&&Fe.addAction({label:pe.a("view problem","View Problem"),commandId:xo.NextMarkerAction.ID,run:()=>{this._hover.hide(),xo.MarkerController.get(this._editor).showAtMarker(ue.marker),this._editor.focus()}}),!this._editor.getOption(80)){const f=Fe.append(xt("div"));this.recentMarkerCodeActionsInfo&&(Do.a.makeKey(this.recentMarkerCodeActionsInfo.marker)===Do.a.makeKey(ue.marker)?this.recentMarkerCodeActionsInfo.hasCodeActions||(f.textContent=pe.a("noQuickFixes","No quick fixes available")):this.recentMarkerCodeActionsInfo=void 0);const h=this.recentMarkerCodeActionsInfo&&!this.recentMarkerCodeActionsInfo.hasCodeActions?B.a.None:et.add(Object(z.i)(()=>f.textContent=pe.a("checkingForQuickFixes","Checking for quick fixes..."),200));f.textContent||(f.textContent=String.fromCharCode(160));const _=this.getCodeActions(ue.marker);et.add(Object(B.i)(()=>_.cancel())),_.then(K=>{if(h.dispose(),this.recentMarkerCodeActionsInfo={marker:ue.marker,hasCodeActions:K.validActions.length>0},!this.recentMarkerCodeActionsInfo.hasCodeActions){K.dispose(),f.textContent=pe.a("noQuickFixes","No quick fixes available");return}f.style.display="none";let de=!1;et.add(Object(B.i)(()=>{de||K.dispose()})),Fe.addAction({label:pe.a("quick fixes","Quick Fix..."),commandId:vo.e.Id,run:ye=>{de=!0;const De=vo.f.get(this._editor),qe=v.D(ye);this._hover.hide(),De.showCodeActions(ct,K,{x:qe.left+6,y:qe.top+qe.height+6})}})},E.f)}}getCodeActions(ue){return Object(z.h)(Fe=>Object(Rt.d)(this._editor.getModel(),new R.a(ue.startLineNumber,ue.startColumn,ue.endLineNumber,ue.endColumn),ct,Lo.b.None,Fe))}};Ut=To([Vt(2,It.a),Vt(3,Lt.a)],Ut),Object(Ie.f)((ke,ue)=>{const Fe=ke.getColor(Te.Jc);Fe&&ue.addRule(`.monaco-hover .hover-contents a.code-link span { color: ${Fe}; }`);const et=ke.getColor(Te.Ic);et&&ue.addRule(`.monaco-hover .hover-contents a.code-link span:hover { color: ${et}; }`)});var Qe=t("N0LK"),tt=t("Apug");const ut="editor.action.inlineSuggest.commit";var Dt=t("1YUG"),Pt=t("0/Sa");class Wt{constructor(ke,ue,Fe=0){this.lineNumber=ke,this.parts=ue,this.additionalReservedLineCount=Fe}renderForScreenReader(ke){if(this.parts.length===0)return"";const ue=this.parts[this.parts.length-1],Fe=ke.substr(0,ue.column-1),et=so(Fe,this.parts.map(f=>({range:{startLineNumber:1,endLineNumber:1,startColumn:f.column,endColumn:f.column},text:f.lines.join(`
|
|
|
`)})));return et.substring(this.parts[0].column-1)}}class zt{constructor(ke){this.lineStartOffsetByLineIdx=[],this.lineStartOffsetByLineIdx.push(0);for(let ue=0;ue<ke.length;ue++)ke.charAt(ue)===`
|
|
|
`&&this.lineStartOffsetByLineIdx.push(ue+1)}getOffset(ke){return this.lineStartOffsetByLineIdx[ke.lineNumber-1]+ke.column-1}}function so(ke,ue){const Fe=new zt(ke),et=ue.map(f=>{const h=R.a.lift(f.range);return{startOffset:Fe.getOffset(h.getStartPosition()),endOffset:Fe.getOffset(h.getEndPosition()),text:f.text}});et.sort((f,h)=>h.startOffset-f.startOffset);for(const f of et)ke=ke.substring(0,f.startOffset)+f.text+ke.substring(f.endOffset);return ke}class wo{constructor(ke,ue,Fe){this.column=ke,this.lines=ue,this.preview=Fe}}class No extends B.a{constructor(ke){super();this.editor=ke,this._expanded=void 0,this.onDidChangeEmitter=new oe.b,this.onDidChange=this.onDidChangeEmitter.event,this._register(ke.onDidChangeConfiguration(ue=>{ue.hasChanged(105)&&this._expanded===void 0&&this.onDidChangeEmitter.fire()}))}setExpanded(ke){this._expanded=!0,this.onDidChangeEmitter.fire()}}var di=t("Gw4z");function _o(ke,ue){return ke===ue?!0:!ke||!ue?!1:ke.range.equalsRange(ue.range)&&ke.text===ue.text&&ke.command===ue.command}function no(ke,ue,Fe,et,f=0){if(ke.range.startLineNumber!==ke.range.endLineNumber)return;const h=ue.getLineContent(ke.range.startLineNumber),_=Qe.x(h).length,K=ke.range.startColumn-1<=_;if(K){const yt=Qe.x(ke.text).length,Ct=h.substring(ke.range.startColumn-1,_),At=R.a.fromPositions(ke.range.getStartPosition().delta(0,Ct.length),ke.range.getEndPosition()),Ft=ke.text.startsWith(Ct)?ke.text.substring(Ct.length):ke.text.substring(yt);ke={range:At,text:Ft,command:ke.command}}const de=ue.getValueInRange(ke.range),ye=Tt(de,ke.text);if(!ye)return;const De=ke.range.startLineNumber,qe=new Array;if(Fe==="prefix"){const yt=ye.filter(Ct=>Ct.originalLength===0);if(yt.length>1||yt.length===1&&yt[0].originalStart!==de.length)return}const ht=ke.text.length-f;for(const yt of ye){const Ct=ke.range.startColumn+yt.originalStart+yt.originalLength;if(Fe==="subwordSmart"&&et&&et.lineNumber===ke.range.startLineNumber&&Ct<et.column)return;if(yt.originalLength>0)return;if(yt.modifiedLength===0)continue;const At=yt.modifiedStart+yt.modifiedLength,Ft=Math.max(yt.modifiedStart,Math.min(At,ht)),Zt=ke.text.substring(yt.modifiedStart,Ft),Yt=ke.text.substring(Ft,Math.max(yt.modifiedStart,At));if(Zt.length>0){const ao=Qe.Q(Zt);qe.push(new wo(Ct,ao,!1))}if(Yt.length>0){const ao=Qe.Q(Yt);qe.push(new wo(Ct,ao,!0))}}return new Wt(De,qe,0)}let _t;function Tt(ke,ue){if((_t==null?void 0:_t.originalValue)===ke&&(_t==null?void 0:_t.newValue)===ue)return _t==null?void 0:_t.changes;{const Fe=Nt(ke,ue);return _t={originalValue:ke,newValue:ue,changes:Fe},Fe}}function Nt(ke,ue){if(ke.length>5e3||ue.length>5e3)return;function Fe(de){let ye=0;for(let De=0,qe=de.length;De<qe;De++){const ht=de.charCodeAt(De);ht>ye&&(ye=ht)}return ye}const et=Math.max(Fe(ke),Fe(ue));function f(de){if(de<0)throw new Error("unexpected");return et+de+1}function h(de){let ye=0,De=0;const qe=new Int32Array(de.length);for(let ht=0,yt=de.length;ht<yt;ht++){const Ct=De*100+ye;de[ht]==="("?(qe[ht]=f(2*Ct),ye++):de[ht]===")"?(qe[ht]=f(2*Ct+1),ye===1&&De++,ye=Math.max(ye-1,0)):qe[ht]=de.charCodeAt(ht)}return qe}const _=h(ke),K=h(ue);return new di.a({getElements:()=>_},{getElements:()=>K}).ComputeDiff(!1).changes}var rt=function(ke,ue,Fe,et){var f=arguments.length,h=f<3?ue:et===null?et=Object.getOwnPropertyDescriptor(ue,Fe):et,_;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")h=Reflect.decorate(ke,ue,Fe,et);else for(var K=ke.length-1;K>=0;K--)(_=ke[K])&&(h=(f<3?_(h):f>3?_(ue,Fe,h):_(ue,Fe))||h);return f>3&&h&&Object.defineProperty(ue,Fe,h),h},lt=function(ke,ue){return function(Fe,et){ue(Fe,et,ke)}},bt=function(ke,ue,Fe,et){function f(h){return h instanceof Fe?h:new Fe(function(_){_(h)})}return new(Fe||(Fe=Promise))(function(h,_){function K(De){try{ye(et.next(De))}catch(qe){_(qe)}}function de(De){try{ye(et.throw(De))}catch(qe){_(qe)}}function ye(De){De.done?h(De.value):f(De.value).then(K,de)}ye((et=et.apply(ke,ue||[])).next())})};let St=class extends B.a{constructor(ue,Fe,et){super();this.editor=ue,this.cache=Fe,this.commandService=et,this.onDidChangeEmitter=new oe.b,this.onDidChange=this.onDidChangeEmitter.event,this.completionSession=this._register(new B.d),this.active=!1,this.disposed=!1,this._register(et.onDidExecuteCommand(f=>{const h=new Set([x.i.id,x.g.id,Dt.CoreEditingCommands.Tab.id,Dt.CoreEditingCommands.DeleteLeft.id,Dt.CoreEditingCommands.DeleteRight.id,ut,"acceptSelectedSuggestion"]);h.has(f.commandId)&&ue.hasTextFocus()&&this.handleUserInput()})),this._register(this.editor.onDidType(f=>{this.handleUserInput()})),this._register(this.editor.onDidChangeCursorPosition(f=>{this.session&&!this.session.isValid&&this.hide()})),this._register(Object(B.i)(()=>{this.disposed=!0})),this._register(this.editor.onDidBlurEditorWidget(()=>{this.hide()}))}handleUserInput(){this.session&&!this.session.isValid&&this.hide(),setTimeout(()=>{if(this.disposed)return;this.startSessionIfTriggered()},0)}get session(){return this.completionSession.value}get ghostText(){var ue;return(ue=this.session)===null||ue===void 0?void 0:ue.ghostText}get minReservedLineCount(){return this.session?this.session.minReservedLineCount:0}setExpanded(ue){var Fe;(Fe=this.session)===null||Fe===void 0||Fe.setExpanded(ue)}setActive(ue){var Fe;this.active=ue,ue&&((Fe=this.session)===null||Fe===void 0||Fe.scheduleAutomaticUpdate())}startSessionIfTriggered(){const ue=this.editor.getOption(54);if(!ue.enabled)return;if(this.session&&this.session.isValid)return;this.trigger(c.s.Automatic)}trigger(ue){if(this.completionSession.value){ue===c.s.Explicit&&void this.completionSession.value.ensureUpdateWithExplicitContext();return}this.completionSession.value=new Qt(this.editor,this.editor.getPosition(),()=>this.active,this.commandService,this.cache,ue),this.completionSession.value.takeOwnership(this.completionSession.value.onDidChange(()=>{this.onDidChangeEmitter.fire()}))}hide(){this.completionSession.clear(),this.onDidChangeEmitter.fire()}commitCurrentSuggestion(){var ue;(ue=this.session)===null||ue===void 0||ue.commitCurrentCompletion()}showNext(){var ue;(ue=this.session)===null||ue===void 0||ue.showNextInlineCompletion()}showPrevious(){var ue;(ue=this.session)===null||ue===void 0||ue.showPreviousInlineCompletion()}hasMultipleInlineCompletions(){var ue;return bt(this,void 0,void 0,function*(){const Fe=yield(ue=this.session)===null||ue===void 0?void 0:ue.hasMultipleInlineCompletions();return Fe!==void 0?Fe:!1})}};St=rt([lt(2,k.b)],St);class Qt extends No{constructor(ke,ue,Fe,et,f,h){super(ke);this.triggerPosition=ue,this.shouldUpdate=Fe,this.commandService=et,this.cache=f,this.initialTriggerKind=h,this.minReservedLineCount=0,this.updateOperation=this._register(new B.d),this.updateSoon=this._register(new z.e(()=>{let K=this.initialTriggerKind;return this.initialTriggerKind=c.s.Automatic,this.update(K)},50)),this.currentlySelectedCompletionId=void 0;let _;this._register(this.onDidChange(()=>{const K=this.currentCompletion;if(K&&K.sourceInlineCompletion!==_){_=K.sourceInlineCompletion;const de=K.sourceProvider;de.handleItemDidShow&&de.handleItemDidShow(K.sourceInlineCompletions,_)}})),this._register(Object(B.i)(()=>{this.cache.clear()})),this._register(this.editor.onDidChangeCursorPosition(K=>{this.cache.value&&this.onDidChangeEmitter.fire()})),this._register(this.editor.onDidChangeModelContent(K=>{this.scheduleAutomaticUpdate()})),this._register(c.t.onDidChange(()=>{this.updateSoon.schedule()})),this.scheduleAutomaticUpdate()}fixAndGetIndexOfCurrentSelection(){if(!this.currentlySelectedCompletionId||!this.cache.value)return 0;if(this.cache.value.completions.length===0)return 0;const ke=this.cache.value.completions.findIndex(ue=>ue.semanticId===this.currentlySelectedCompletionId);return ke===-1?(this.currentlySelectedCompletionId=void 0,0):ke}get currentCachedCompletion(){return this.cache.value?this.cache.value.completions[this.fixAndGetIndexOfCurrentSelection()]:void 0}showNextInlineCompletion(){var ke;return bt(this,void 0,void 0,function*(){yield this.ensureUpdateWithExplicitContext();const ue=((ke=this.cache.value)===null||ke===void 0?void 0:ke.completions)||[];if(ue.length>0){const Fe=(this.fixAndGetIndexOfCurrentSelection()+1)%ue.length;this.currentlySelectedCompletionId=ue[Fe].semanticId}else this.currentlySelectedCompletionId=void 0;this.onDidChangeEmitter.fire()})}showPreviousInlineCompletion(){var ke;return bt(this,void 0,void 0,function*(){yield this.ensureUpdateWithExplicitContext();const ue=((ke=this.cache.value)===null||ke===void 0?void 0:ke.completions)||[];if(ue.length>0){const Fe=(this.fixAndGetIndexOfCurrentSelection()+ue.length-1)%ue.length;this.currentlySelectedCompletionId=ue[Fe].semanticId}else this.currentlySelectedCompletionId=void 0;this.onDidChangeEmitter.fire()})}ensureUpdateWithExplicitContext(){var ke;return bt(this,void 0,void 0,function*(){this.updateOperation.value?this.updateOperation.value.triggerKind===c.s.Explicit?yield this.updateOperation.value.promise:yield this.update(c.s.Explicit):((ke=this.cache.value)===null||ke===void 0?void 0:ke.triggerKind)!==c.s.Explicit&&(yield this.update(c.s.Explicit))})}hasMultipleInlineCompletions(){var ke;return bt(this,void 0,void 0,function*(){return yield this.ensureUpdateWithExplicitContext(),(((ke=this.cache.value)===null||ke===void 0?void 0:ke.completions.length)||0)>1})}get ghostText(){const ke=this.currentCompletion,ue=this.editor.getOptions().get(54).mode;return ke?no(ke,this.editor.getModel(),ue,this.editor.getPosition()):void 0}get currentCompletion(){const ke=this.currentCachedCompletion;return ke?ke.toLiveInlineCompletion():void 0}get isValid(){return this.editor.getPosition().lineNumber===this.triggerPosition.lineNumber}scheduleAutomaticUpdate(){this.updateOperation.clear(),this.updateSoon.schedule()}update(ke){return bt(this,void 0,void 0,function*(){if(!this.shouldUpdate())return;const ue=this.editor.getPosition(),Fe=Object(z.h)(f=>bt(this,void 0,void 0,function*(){let h;try{h=yield zo(ue,this.editor.getModel(),{triggerKind:ke,selectedSuggestionInfo:void 0},f)}catch(_){Object(E.f)(_);return}if(f.isCancellationRequested)return;this.cache.setValue(this.editor,h,ke),this.onDidChangeEmitter.fire()})),et=new bo(Fe,ke);this.updateOperation.value=et,yield Fe,this.updateOperation.value===et&&this.updateOperation.clear()})}takeOwnership(ke){this._register(ke)}commitCurrentCompletion(){if(!this.ghostText)return;const ke=this.currentCompletion;ke&&this.commit(ke)}commit(ke){const ue=this.cache.clearAndLeak();this.editor.executeEdits("inlineSuggestion.accept",[Pt.a.replaceMove(ke.range,ke.text)]),ke.command?this.commandService.executeCommand(ke.command.id,...ke.command.arguments||[]).finally(()=>{ue==null||ue.dispose()}).then(void 0,E.g):ue==null||ue.dispose(),this.onDidChangeEmitter.fire()}}class bo{constructor(ke,ue){this.promise=ke,this.triggerKind=ue}dispose(){this.promise.cancel()}}class qt extends B.a{constructor(ke,ue,Fe,et){super();this.triggerKind=et;const f=ke.deltaDecorations([],ue.items.map(h=>({range:h.range,options:{description:"inline-completion-tracking-range"}})));this._register(Object(B.i)(()=>{ke.deltaDecorations(f,[])})),this.completions=ue.items.map((h,_)=>new Eo(h,f[_])),this._register(ke.onDidChangeModelContent(()=>{let h=!1;const _=ke.getModel();for(const K of this.completions){const de=_.getDecorationRange(K.decorationId);if(!de){Object(E.f)(new Error("Decoration has no range"));continue}K.synchronizedRange.equalsRange(de)||(h=!0,K.synchronizedRange=de)}h&&Fe()})),this._register(ue)}}class Eo{constructor(ke,ue){this.inlineCompletion=ke,this.decorationId=ue,this.semanticId=JSON.stringify({text:this.inlineCompletion.text,startLine:this.inlineCompletion.range.startLineNumber,startColumn:this.inlineCompletion.range.startColumn,command:this.inlineCompletion.command}),this.synchronizedRange=ke.range}toLiveInlineCompletion(){return{text:this.inlineCompletion.text,range:this.synchronizedRange,command:this.inlineCompletion.command,sourceProvider:this.inlineCompletion.sourceProvider,sourceInlineCompletions:this.inlineCompletion.sourceInlineCompletions,sourceInlineCompletion:this.inlineCompletion.sourceInlineCompletion}}}function Ro(ke,ue){const Fe=ue.getWordAtPosition(ke),et=ue.getLineMaxColumn(ke.lineNumber);return Fe?new R.a(ke.lineNumber,Fe.startColumn,ke.lineNumber,et):R.a.fromPositions(ke,ke.with(void 0,et))}function zo(ke,ue,Fe,et=p.a.None){return bt(this,void 0,void 0,function*(){const f=Ro(ke,ue),h=c.t.all(ue),_=yield Promise.all(h.map(de=>bt(this,void 0,void 0,function*(){const ye=yield de.provideInlineCompletions(ue,ke,Fe,et);return{completions:ye,provider:de,dispose:()=>{ye&&de.freeInlineCompletions(ye)}}}))),K=new Map;for(const de of _){const ye=de.completions;if(ye)for(const De of ye.items.map(qe=>({text:qe.text,range:qe.range?R.a.lift(qe.range):f,command:qe.command,sourceProvider:de.provider,sourceInlineCompletions:ye,sourceInlineCompletion:qe}))){if(De.range.startLineNumber!==De.range.endLineNumber)continue;K.set(JSON.stringify({text:De.text,range:De.range}),De)}}return{items:[...K.values()],dispose:()=>{for(const de of _)de.dispose()}}})}function Bo(ke,ue){if(!ue)return ue;const Fe=ke.getValueInRange(ue.range),et=Object(Qe.d)(Fe,ue.text),f=ke.getOffsetAt(ue.range.getStartPosition())+et,h=ke.getPositionAt(f),_=Fe.substr(et),K=Object(Qe.e)(_,ue.text),de=ke.getPositionAt(Math.max(f,ke.getOffsetAt(ue.range.getEndPosition())-K));return{range:R.a.fromPositions(h,de),text:ue.text.substr(et,ue.text.length-et-K)}}var Jt=t("uACm"),fo=t("WaSP"),ri=t("ep4t");function Zo(ke,ue){return{object:ke,dispose:()=>ue==null?void 0:ue.dispose()}}function ci(ke,ue){return(Fe,et)=>ue(ke(Fe),ke(et))}function ki(){return(ke,ue)=>ke-ue}function wi(ke,ue){let Fe;for(const et of ke)(Fe===void 0||ue(et,Fe)>0)&&(Fe=et);return Fe}class Zi extends B.a{constructor(ke,ue){super();this.editor=ke,this.suggestControllerPreselector=ue,this.isSuggestWidgetVisible=!1,this.isShiftKeyPressed=!1,this._isActive=!1,this._currentInlineCompletion=void 0,this.onDidChangeEmitter=new oe.b,this.onDidChange=this.onDidChangeEmitter.event,this.setInactiveDelayed=this._register(new z.e(()=>{this.isSuggestWidgetVisible||this._isActive&&(this._isActive=!1,this.onDidChangeEmitter.fire())},100)),this._register(ke.onKeyDown(et=>{et.shiftKey&&!this.isShiftKeyPressed&&(this.isShiftKeyPressed=!0,this.update(this._isActive))})),this._register(ke.onKeyUp(et=>{et.shiftKey&&this.isShiftKeyPressed&&(this.isShiftKeyPressed=!1,this.update(this._isActive))}));const Fe=ri.SuggestController.get(this.editor);if(Fe){this._register(Fe.registerSelector({priority:100,select:(h,_,K)=>{const de=this.editor.getModel(),ye=Bo(de,this.suggestControllerPreselector());if(!ye)return-1;const De=b.a.lift(_),qe=K.map((yt,Ct)=>{const At=vi(Fe,De,yt,this.isShiftKeyPressed),Ft=Bo(de,At);if(!Ft)return;const Zt=Vi(ye.range,Ft.range)&&ye.text.startsWith(Ft.text);return{index:Ct,valid:Zt,prefixLength:Ft.text.length,suggestItem:yt}}).filter(yt=>yt&&yt.valid),ht=wi(qe,ci(yt=>yt.prefixLength,ki()));return ht?ht.index:-1}}));let et=!1;const f=()=>{if(et)return;et=!0,this._register(Fe.widget.value.onDidShow(()=>{this.isSuggestWidgetVisible=!0,this.update(!0)})),this._register(Fe.widget.value.onDidHide(()=>{this.isSuggestWidgetVisible=!1,this.setInactiveDelayed.schedule(),this.update(this._isActive)})),this._register(Fe.widget.value.onDidFocus(()=>{this.isSuggestWidgetVisible=!0,this.update(!0)}))};this._register(oe.c.once(Fe.model.onDidTrigger)(h=>{f()}))}this.update(this._isActive)}get state(){return this._isActive?{selectedItemAsInlineCompletion:this._currentInlineCompletion}:void 0}update(ke){const ue=this.getInlineCompletion();let Fe=!1;_o(this._currentInlineCompletion,ue)||(this._currentInlineCompletion=ue,Fe=!0),this._isActive!==ke&&(this._isActive=ke,Fe=!0),Fe&&this.onDidChangeEmitter.fire()}getInlineCompletion(){const ke=ri.SuggestController.get(this.editor);if(!ke)return;if(!this.isSuggestWidgetVisible)return;const ue=ke.widget.value.getFocusedItem();return ue?vi(ke,this.editor.getPosition(),ue.item,this.isShiftKeyPressed):void 0}stopForceRenderingAbove(){const ke=ri.SuggestController.get(this.editor);ke&&ke.stopForceRenderingAbove()}forceRenderingAbove(){const ke=ri.SuggestController.get(this.editor);ke&&ke.forceRenderingAbove()}}function Vi(ke,ue){return ke.startLineNumber===ue.startLineNumber&&ke.startColumn===ue.startColumn&&(ke.endLineNumber<ue.endLineNumber||ke.endLineNumber===ue.endLineNumber&&ke.endColumn<=ue.endColumn)}function vi(ke,ue,Fe,et){if(Array.isArray(Fe.completion.additionalTextEdits)&&Fe.completion.additionalTextEdits.length>0)return{text:"",range:R.a.fromPositions(ue,ue)};let{insertText:f}=Fe.completion;if(Fe.completion.insertTextRules&4){const _=new Jt.c().parse(f),K=ke.editor.getModel();if(_.children.length>100)return;fo.a.adjustWhitespace(K,ue,_,!0,!0),f=_.toString()}const h=ke.getOverwriteInfo(Fe,et);return{text:f,range:R.a.fromPositions(ue.delta(0,-h.overwriteBefore),ue.delta(0,Math.max(h.overwriteAfter,0)))}}var sn=function(ke,ue,Fe,et){function f(h){return h instanceof Fe?h:new Fe(function(_){_(h)})}return new(Fe||(Fe=Promise))(function(h,_){function K(De){try{ye(et.next(De))}catch(qe){_(qe)}}function de(De){try{ye(et.throw(De))}catch(qe){_(qe)}}function ye(De){De.done?h(De.value):f(De.value).then(K,de)}ye((et=et.apply(ke,ue||[])).next())})};class en extends No{constructor(ke,ue){super(ke);this.cache=ue,this.suggestionInlineCompletionSource=this._register(new Zi(this.editor,()=>{var Fe,et;return(et=(Fe=this.cache.value)===null||Fe===void 0?void 0:Fe.completions[0])===null||et===void 0?void 0:et.toLiveInlineCompletion()})),this.updateOperation=this._register(new B.d),this.updateCacheSoon=this._register(new z.e(()=>this.updateCache(),50)),this.minReservedLineCount=0,this._register(this.suggestionInlineCompletionSource.onDidChange(()=>{this.updateCacheSoon.schedule();const Fe=this.suggestionInlineCompletionSource.state;Fe||(this.minReservedLineCount=0);const et=this.ghostText;et&&(this.minReservedLineCount=Math.max(this.minReservedLineCount,on(et.parts.map(f=>f.lines.length-1)))),this.minReservedLineCount>=1&&this.isSuggestionPreviewEnabled()?this.suggestionInlineCompletionSource.forceRenderingAbove():this.suggestionInlineCompletionSource.stopForceRenderingAbove(),this.onDidChangeEmitter.fire()})),this._register(this.cache.onDidChange(()=>{this.onDidChangeEmitter.fire()})),this._register(this.editor.onDidChangeCursorPosition(Fe=>{this.isSuggestionPreviewEnabled()&&(this.minReservedLineCount=0,this.updateCacheSoon.schedule(),this.onDidChangeEmitter.fire())})),this._register(Object(B.i)(()=>this.suggestionInlineCompletionSource.stopForceRenderingAbove()))}get isActive(){return this.suggestionInlineCompletionSource.state!==void 0}isSuggestionPreviewEnabled(){const ke=this.editor.getOption(105);return ke.preview}updateCache(){return sn(this,void 0,void 0,function*(){const ke=this.suggestionInlineCompletionSource.state;if(!ke||!ke.selectedItemAsInlineCompletion)return;const ue={text:ke.selectedItemAsInlineCompletion.text,range:ke.selectedItemAsInlineCompletion.range},Fe=this.editor.getPosition(),et=Object(z.h)(h=>sn(this,void 0,void 0,function*(){let _;try{_=yield zo(Fe,this.editor.getModel(),{triggerKind:c.s.Automatic,selectedSuggestionInfo:ue},h)}catch(K){Object(E.f)(K);return}if(h.isCancellationRequested)return;this.cache.setValue(this.editor,_,c.s.Automatic),this.onDidChangeEmitter.fire()})),f=new bo(et,c.s.Automatic);this.updateOperation.value=f,yield et,this.updateOperation.value===f&&this.updateOperation.clear()})}get ghostText(){var ke,ue;if(!this.isSuggestionPreviewEnabled())return;const Fe=this.suggestionInlineCompletionSource.state,et=Bo(this.editor.getModel(),Fe==null?void 0:Fe.selectedItemAsInlineCompletion),f=Bo(this.editor.getModel(),(ue=(ke=this.cache.value)===null||ke===void 0?void 0:ke.completions[0])===null||ue===void 0?void 0:ue.toLiveInlineCompletion()),h=f&&et&&f.text.startsWith(et.text)&&f.range.equalsRange(et.range)?f:et||f,_=et?((h==null?void 0:h.text.length)||0)-et.text.length:0,K=ye=>{const De=this.editor.getOptions().get(105).previewMode;return ye?no(ye,this.editor.getModel(),De,this.editor.getPosition(),_)||new Wt(ye.range.endLineNumber,[],this.minReservedLineCount):void 0},de=K(h);return de}}function on(ke){return ke.reduce((ue,Fe)=>ue+Fe,0)}var cn=function(ke,ue,Fe,et){var f=arguments.length,h=f<3?ue:et===null?et=Object.getOwnPropertyDescriptor(ue,Fe):et,_;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")h=Reflect.decorate(ke,ue,Fe,et);else for(var K=ke.length-1;K>=0;K--)(_=ke[K])&&(h=(f<3?_(h):f>3?_(ue,Fe,h):_(ue,Fe))||h);return f>3&&h&&Object.defineProperty(ue,Fe,h),h},Bi=function(ke,ue){return function(Fe,et){ue(Fe,et,ke)}},zi=function(ke,ue,Fe,et){function f(h){return h instanceof Fe?h:new Fe(function(_){_(h)})}return new(Fe||(Fe=Promise))(function(h,_){function K(De){try{ye(et.next(De))}catch(qe){_(qe)}}function de(De){try{ye(et.throw(De))}catch(qe){_(qe)}}function ye(De){De.done?h(De.value):f(De.value).then(K,de)}ye((et=et.apply(ke,ue||[])).next())})};class Ji extends B.a{constructor(){super(...arguments);this.onDidChangeEmitter=new oe.b,this.onDidChange=this.onDidChangeEmitter.event,this.hasCachedGhostText=!1,this.currentModelRef=this._register(new B.d)}get targetModel(){var ke;return(ke=this.currentModelRef.value)===null||ke===void 0?void 0:ke.object}setTargetModel(ke){var ue;if(((ue=this.currentModelRef.value)===null||ue===void 0?void 0:ue.object)===ke)return;this.currentModelRef.clear(),this.currentModelRef.value=ke?Zo(ke,ke.onDidChange(()=>{this.hasCachedGhostText=!1,this.onDidChangeEmitter.fire()})):void 0,this.hasCachedGhostText=!1,this.onDidChangeEmitter.fire()}get ghostText(){var ke,ue;return this.hasCachedGhostText||(this.cachedGhostText=(ue=(ke=this.currentModelRef.value)===null||ke===void 0?void 0:ke.object)===null||ue===void 0?void 0:ue.ghostText,this.hasCachedGhostText=!0),this.cachedGhostText}setExpanded(ke){var ue;(ue=this.targetModel)===null||ue===void 0||ue.setExpanded(ke)}get minReservedLineCount(){return this.targetModel?this.targetModel.minReservedLineCount:0}}let ui=class extends Ji{constructor(ue,Fe){super();this.editor=ue,this.commandService=Fe,this.sharedCache=this._register(new pn),this.suggestWidgetAdapterModel=this._register(new en(this.editor,this.sharedCache)),this.inlineCompletionsModel=this._register(new St(this.editor,this.sharedCache,this.commandService)),this._register(this.suggestWidgetAdapterModel.onDidChange(()=>{this.updateModel()})),this.updateModel()}get activeInlineCompletionsModel(){return this.targetModel===this.inlineCompletionsModel?this.inlineCompletionsModel:void 0}updateModel(){this.setTargetModel(this.suggestWidgetAdapterModel.isActive?this.suggestWidgetAdapterModel:this.inlineCompletionsModel),this.inlineCompletionsModel.setActive(this.targetModel===this.inlineCompletionsModel)}shouldShowHoverAt(ue){var Fe;const et=(Fe=this.activeInlineCompletionsModel)===null||Fe===void 0?void 0:Fe.ghostText;return et?et.parts.some(f=>ue.containsPosition(new b.a(et.lineNumber,f.column))):!1}triggerInlineCompletion(){var ue;(ue=this.activeInlineCompletionsModel)===null||ue===void 0||ue.trigger(c.s.Explicit)}commitInlineCompletion(){var ue;(ue=this.activeInlineCompletionsModel)===null||ue===void 0||ue.commitCurrentSuggestion()}hideInlineCompletion(){var ue;(ue=this.activeInlineCompletionsModel)===null||ue===void 0||ue.hide()}showNextInlineCompletion(){var ue;(ue=this.activeInlineCompletionsModel)===null||ue===void 0||ue.showNext()}showPreviousInlineCompletion(){var ue;(ue=this.activeInlineCompletionsModel)===null||ue===void 0||ue.showPrevious()}hasMultipleInlineCompletions(){var ue;return zi(this,void 0,void 0,function*(){const Fe=yield(ue=this.activeInlineCompletionsModel)===null||ue===void 0?void 0:ue.hasMultipleInlineCompletions();return Fe!==void 0?Fe:!1})}};ui=cn([Bi(1,k.b)],ui);class pn extends B.a{constructor(){super(...arguments);this.onDidChangeEmitter=new oe.b,this.onDidChange=this.onDidChangeEmitter.event,this.cache=this._register(new B.d)}get value(){return this.cache.value}setValue(ke,ue,Fe){this.cache.value=new qt(ke,ue,()=>this.onDidChangeEmitter.fire(),Fe)}clearAndLeak(){return this.cache.clearAndLeak()}clear(){this.cache.clear()}}var Hi=t("qoAC"),Oi=t("HdwC"),Ii=t("/UlZ"),Qi=t("Ll0s"),Li=t("4bUh"),Ui=t("erNZ"),fi=t("kYye"),$i=t("dBaI"),rn=t("baJR"),_i=t("T8No"),Pi=t("Cg/j"),gt=function(ke,ue,Fe,et){var f=arguments.length,h=f<3?ue:et===null?et=Object.getOwnPropertyDescriptor(ue,Fe):et,_;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")h=Reflect.decorate(ke,ue,Fe,et);else for(var K=ke.length-1;K>=0;K--)(_=ke[K])&&(h=(f<3?_(h):f>3?_(ue,Fe,h):_(ue,Fe))||h);return f>3&&h&&Object.defineProperty(ue,Fe,h),h},Ge=function(ke,ue){return function(Fe,et){ue(Fe,et,ke)}},$;const Ee=($=window.trustedTypes)===null||$===void 0?void 0:$.createPolicy("editorGhostText",{createHTML:ke=>ke});let Ne=class extends B.a{constructor(ue,Fe,et,f){super();this.editor=ue,this.model=Fe,this.instantiationService=et,this.modeService=f,this.disposed=!1,this.partsWidget=this._register(this.instantiationService.createInstance(He,this.editor)),this.additionalLinesWidget=this._register(new vt(this.editor,this.modeService.languageIdCodec)),this.viewMoreContentWidget=void 0,this._register(this.editor.onDidChangeConfiguration(h=>{(h.hasChanged(29)||h.hasChanged(104)||h.hasChanged(87)||h.hasChanged(82)||h.hasChanged(44)||h.hasChanged(43)||h.hasChanged(58))&&this.update()})),this._register(Object(B.i)(()=>{var h;this.disposed=!0,this.update(),(h=this.viewMoreContentWidget)===null||h===void 0||h.dispose(),this.viewMoreContentWidget=void 0})),this._register(Fe.onDidChange(()=>{this.update()})),this.update()}shouldShowHoverAtViewZone(ue){return this.additionalLinesWidget.viewZoneId===ue}update(){var ue;const Fe=this.model.ghostText;if(!this.editor.hasModel()||!Fe||this.disposed){this.partsWidget.clear(),this.additionalLinesWidget.clear();return}const et=new Array,f=new Array;function h(ye,De){if(f.length>0){const qe=f[f.length-1];De&&qe.decorations.push(new $i.a(qe.content.length+1,qe.content.length+1+ye[0].length,De,0)),qe.content+=ye[0],ye=ye.slice(1)}for(const qe of ye)f.push({content:qe,decorations:De?[new $i.a(1,qe.length+1,De,0)]:[]})}const _=this.editor.getModel().getLineContent(Fe.lineNumber);this.editor.getModel().getLineTokens(Fe.lineNumber);let K,de=0;for(const ye of Fe.parts){let De=ye.lines;K===void 0?(et.push({column:ye.column,text:De[0],preview:ye.preview}),De=De.slice(1)):h([_.substring(de,ye.column-1)],void 0),De.length>0&&(h(De,"ghost-text"),K===void 0&&ye.column<=_.length&&(K=ye.column)),de=ye.column-1}K!==void 0&&h([_.substring(de)],void 0),this.partsWidget.setParts(Fe.lineNumber,et,K!==void 0?{column:K,length:_.length+1-K}:void 0),this.additionalLinesWidget.updateLines(Fe.lineNumber,f,Fe.additionalReservedLineCount),Fe.parts.some(ye=>ye.lines.length<0)?this.viewMoreContentWidget=this.renderViewMoreLines(new b.a(Fe.lineNumber,this.editor.getModel().getLineMaxColumn(Fe.lineNumber)),"",0):((ue=this.viewMoreContentWidget)===null||ue===void 0||ue.dispose(),this.viewMoreContentWidget=void 0)}renderViewMoreLines(ue,Fe,et){const f=this.editor.getOption(43),h=document.createElement("div");h.className="suggest-preview-additional-widget",Oi.a.applyFontInfoSlow(h,f);const _=document.createElement("span");_.className="content-spacer",_.append(Fe),h.append(_);const K=document.createElement("span");K.className="content-newline suggest-preview-text",K.append("\u23CE "),h.append(K);const de=new B.b,ye=document.createElement("div");return ye.className="button suggest-preview-text",ye.append(`+${et} lines\u2026`),de.add(v.o(ye,"mousedown",De=>{var qe;(qe=this.model)===null||qe===void 0||qe.setExpanded(!0),De.preventDefault(),this.editor.focus()})),h.append(ye),new ro(this.editor,ue,h,de)}};Ne=gt([Ge(2,Pi.a),Ge(3,j.a)],Ne);let He=class{constructor(ue,Fe,et,f){this.editor=ue,this.codeEditorService=Fe,this.themeService=et,this.contextKeyService=f,this.decorationIds=[],this.disposableStore=new B.b}dispose(){this.clear(),this.disposableStore.dispose()}clear(){this.editor.deltaDecorations(this.decorationIds,[]),this.disposableStore.clear()}setParts(ue,Fe,et){this.disposableStore.clear();const f=this.themeService.getColorTheme(),h=f.getColor(fi.K);let _,K;h&&(_=String(h.rgba.a),K=S.a.Format.CSS.format(at(h)));const de=f.getColor(fi.J);let ye;de&&(ye=`2px dashed ${de}`);const De=this.editor.getModel();if(!De)return;const{tabSize:qe}=De.getOptions(),ht=De.getLineContent(ue)||"";let yt=0,Ct="";const At=new Array;et&&At.push({range:R.a.fromPositions(new b.a(ue,et.column),new b.a(ue,et.column+et.length)),options:{inlineClassName:"ghost-text-hidden",description:"ghost-text-hidden"}});const Ft=this.contextKeyService.getContextKeyValue("config.editor.useInjectedText"),Zt=Ft===void 0?!0:!!Ft;this.decorationIds=this.editor.deltaDecorations(this.decorationIds,Fe.map(Yt=>{Ct+=ht.substring(yt,Yt.column-1),yt=Yt.column-1;const ao=Zt?Yt.text:this.renderSingleLineText(Yt.text,Ct,qe,!1),Co=this.disposableStore.add(Kt(this.codeEditorService,"ghost-text","0-ghost-text-",{after:{contentText:ao,opacity:_,color:K,border:ye,fontWeight:Yt.preview?"bold":"normal"}}));return{range:R.a.fromPositions(new b.a(ue,Yt.column)),options:Zt?{description:"ghost-text",after:{content:ao,inlineClassName:Yt.preview?"ghost-text-decoration-preview":"ghost-text-decoration"},showIfCollapsed:!0}:Object.assign({},Co.resolve())}}).concat(At))}renderSingleLineText(ue,Fe,et,f){const h=Fe+ue,_=Qi.a.visibleColumnsByColumns(h,et);let K="",de=Fe.length+1;for(const ye of ue){if(ye===" "){const De=_[de+1]-_[de];if(f){K+="\u2192";for(let qe=1;qe<De;qe++)K+="\xA0"}else for(let qe=0;qe<De;qe++)K+="\xA0"}else ye===" "?f?K+="\xB7":K+="\xA0":K+=ye;de+=1}return K}};He=gt([Ge(1,re.a),Ge(2,Ie.b),Ge(3,_i.b)],He);function at(ke){const{r:ue,b:Fe,g:et}=ke.rgba;return new S.a(new S.c(ue,et,Fe,255))}class vt{constructor(ke,ue){this.editor=ke,this.languageIdCodec=ue,this._viewZoneId=void 0}get viewZoneId(){return this._viewZoneId}dispose(){this.clear()}clear(){this.editor.changeViewZones(ke=>{this._viewZoneId&&(ke.removeZone(this._viewZoneId),this._viewZoneId=void 0)})}updateLines(ke,ue,Fe){const et=this.editor.getModel();if(!et)return;const{tabSize:f}=et.getOptions();this.editor.changeViewZones(h=>{this._viewZoneId&&(h.removeZone(this._viewZoneId),this._viewZoneId=void 0);const _=Math.max(ue.length,Fe);if(_>0){const K=document.createElement("div");Xt(K,f,ue,this.editor.getOptions(),this.languageIdCodec),this._viewZoneId=h.addZone({afterLineNumber:ke,heightInLines:_,domNode:K})}})}}function Xt(ke,ue,Fe,et,f){const h=et.get(29),_=et.get(104),K="none",de=et.get(82),ye=et.get(44),De=et.get(43),qe=et.get(58),ht=Object(Ui.a)(1e4);ht.appendASCIIString('<div class="suggest-preview-text">');for(let At=0,Ft=Fe.length;At<Ft;At++){const Zt=Fe[At],Yt=Zt.content;ht.appendASCIIString('<div class="view-line'),ht.appendASCIIString('" style="top:'),ht.appendASCIIString(String(At*qe)),ht.appendASCIIString('px;width:1000000px;">');const ao=Qe.A(Yt),Co=Qe.m(Yt),ko=Li.a.createEmpty(Yt,f);Object(rn.d)(new rn.c(De.isMonospace&&!h,De.canUseHalfwidthRightwardsArrow,Yt,!1,ao,Co,0,ko,Zt.decorations,ue,0,De.spaceWidth,De.middotWidth,De.wsmiddotWidth,_,K,de,ye!==Ii.e.OFF,null),ht),ht.appendASCIIString("</div>")}ht.appendASCIIString("</div>"),Oi.a.applyFontInfoSlow(ke,De);const yt=ht.build(),Ct=Ee?Ee.createHTML(yt):yt;ke.innerHTML=Ct}let Bt=0;function Kt(ke,ue,Fe,et){const f=Fe+Bt++;return ke.registerDecorationType(ue,f,et),{dispose(){ke.removeDecorationType(f)},resolve(){return ke.resolveDecorationOptions(f,!0)}}}class ro extends B.a{constructor(ke,ue,Fe,et){super();this.editor=ke,this.position=ue,this.domNode=Fe,this.allowEditorOverflow=!1,this.suppressMouseDown=!1,this._register(et),this._register(Object(B.i)(()=>{this.editor.removeContentWidget(this)})),this.editor.addContentWidget(this)}getId(){return"editor.widget.viewMoreLinesWidget"}getDomNode(){return this.domNode}getPosition(){return{position:this.position,preference:[0]}}}Object(Ie.f)((ke,ue)=>{const Fe=ke.getColor(fi.K);if(Fe){const f=String(Fe.rgba.a),h=S.a.Format.CSS.format(at(Fe));ue.addRule(`.monaco-editor .ghost-text-decoration { opacity: ${f} !important; color: ${h} !important; }`),ue.addRule(`.monaco-editor .ghost-text-decoration-preview { color: ${Fe.toString()} !important; }`),ue.addRule(`.monaco-editor .suggest-preview-text .ghost-text { opacity: ${f} !important; color: ${h} !important; }`)}const et=ke.getColor(fi.J);et&&(ue.addRule(`.monaco-editor .suggest-preview-text .ghost-text { border: 1px solid ${et}; }`),ue.addRule(`.monaco-editor .ghost-text-decoration { border: 1px solid ${et}; }`),ue.addRule(`.monaco-editor .ghost-text-decoration-preview { border: 1px solid ${et}; }`))});var F=t("nrhi"),te=function(ke,ue,Fe,et){var f=arguments.length,h=f<3?ue:et===null?et=Object.getOwnPropertyDescriptor(ue,Fe):et,_;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")h=Reflect.decorate(ke,ue,Fe,et);else for(var K=ke.length-1;K>=0;K--)(_=ke[K])&&(h=(f<3?_(h):f>3?_(ue,Fe,h):_(ue,Fe))||h);return f>3&&h&&Object.defineProperty(ue,Fe,h),h},Ae=function(ke,ue){return function(Fe,et){ue(Fe,et,ke)}},Ye=function(ke,ue,Fe,et){function f(h){return h instanceof Fe?h:new Fe(function(_){_(h)})}return new(Fe||(Fe=Promise))(function(h,_){function K(De){try{ye(et.next(De))}catch(qe){_(qe)}}function de(De){try{ye(et.throw(De))}catch(qe){_(qe)}}function ye(De){De.done?h(De.value):f(De.value).then(K,de)}ye((et=et.apply(ke,ue||[])).next())})};let pt=class ke extends B.a{constructor(ue,Fe){super();this.editor=ue,this.instantiationService=Fe,this.triggeredExplicitly=!1,this.activeController=this._register(new B.d),this._register(this.editor.onDidChangeModel(()=>{this.updateModelController()})),this._register(this.editor.onDidChangeConfiguration(et=>{et.hasChanged(105)&&this.updateModelController(),et.hasChanged(54)&&this.updateModelController()})),this.updateModelController()}static get(ue){return ue.getContribution(ke.ID)}get activeModel(){var ue;return(ue=this.activeController.value)===null||ue===void 0?void 0:ue.model}updateModelController(){const ue=this.editor.getOption(105),Fe=this.editor.getOption(54);this.activeController.value=void 0,this.activeController.value=this.editor.hasModel()&&(ue.preview||Fe.enabled||this.triggeredExplicitly)?this.instantiationService.createInstance(jt,this.editor):void 0}shouldShowHoverAt(ue){var Fe;return((Fe=this.activeModel)===null||Fe===void 0?void 0:Fe.shouldShowHoverAt(ue))||!1}shouldShowHoverAtViewZone(ue){var Fe,et;return((et=(Fe=this.activeController.value)===null||Fe===void 0?void 0:Fe.widget)===null||et===void 0?void 0:et.shouldShowHoverAtViewZone(ue))||!1}trigger(){var ue;this.triggeredExplicitly=!0,this.activeController.value||this.updateModelController(),(ue=this.activeModel)===null||ue===void 0||ue.triggerInlineCompletion()}commit(){var ue;(ue=this.activeModel)===null||ue===void 0||ue.commitInlineCompletion()}hide(){var ue;(ue=this.activeModel)===null||ue===void 0||ue.hideInlineCompletion()}showNextInlineCompletion(){var ue;(ue=this.activeModel)===null||ue===void 0||ue.showNextInlineCompletion()}showPreviousInlineCompletion(){var ue;(ue=this.activeModel)===null||ue===void 0||ue.showPreviousInlineCompletion()}hasMultipleInlineCompletions(){var ue;return Ye(this,void 0,void 0,function*(){const Fe=yield(ue=this.activeModel)===null||ue===void 0?void 0:ue.hasMultipleInlineCompletions();return Fe!==void 0?Fe:!1})}};pt.inlineSuggestionVisible=new _i.c("inlineSuggestionVisible",!1,pe.a("inlineSuggestionVisible","Whether an inline suggestion is visible")),pt.inlineSuggestionHasIndentation=new _i.c("inlineSuggestionHasIndentation",!1,pe.a("inlineSuggestionHasIndentation","Whether the inline suggestion starts with whitespace")),pt.inlineSuggestionHasIndentationLessThanTabSize=new _i.c("inlineSuggestionHasIndentationLessThanTabSize",!0,pe.a("inlineSuggestionHasIndentationLessThanTabSize","Whether the inline suggestion starts with whitespace that is less than what would be inserted by tab")),pt.ID="editor.contrib.ghostTextController",pt=te([Ae(1,Pi.a)],pt);class Mt{constructor(ke){this.contextKeyService=ke,this.inlineCompletionVisible=pt.inlineSuggestionVisible.bindTo(this.contextKeyService),this.inlineCompletionSuggestsIndentation=pt.inlineSuggestionHasIndentation.bindTo(this.contextKeyService),this.inlineCompletionSuggestsIndentationLessThanTabSize=pt.inlineSuggestionHasIndentationLessThanTabSize.bindTo(this.contextKeyService)}}let jt=class extends B.a{constructor(ue,Fe,et){super();this.editor=ue,this.instantiationService=Fe,this.contextKeyService=et,this.contextKeys=new Mt(this.contextKeyService),this.model=this._register(this.instantiationService.createInstance(ui,this.editor)),this.widget=this._register(this.instantiationService.createInstance(Ne,this.editor,this.model)),this._register(Object(B.i)(()=>{this.contextKeys.inlineCompletionVisible.set(!1),this.contextKeys.inlineCompletionSuggestsIndentation.set(!1),this.contextKeys.inlineCompletionSuggestsIndentationLessThanTabSize.set(!0)})),this._register(this.model.onDidChange(()=>{this.updateContextKeys()})),this.updateContextKeys()}updateContextKeys(){var ue;this.contextKeys.inlineCompletionVisible.set(((ue=this.model.activeInlineCompletionsModel)===null||ue===void 0?void 0:ue.ghostText)!==void 0);let Fe=!1,et=!0;const f=this.model.inlineCompletionsModel.ghostText;if(!!this.model.activeInlineCompletionsModel&&f&&f.parts.length>0){const{column:h,lines:_}=f.parts[0],K=_[0],de=this.editor.getModel().getLineIndentColumn(f.lineNumber),ye=h<=de;if(ye){let De=Object(Qe.u)(K);De===-1&&(De=K.length-1),Fe=De>0;const qe=this.editor.getModel().getOptions().tabSize,ht=tt.a.visibleColumnFromColumn(K,De+1,qe);et=ht<qe}}this.contextKeys.inlineCompletionSuggestsIndentation.set(Fe),this.contextKeys.inlineCompletionSuggestsIndentationLessThanTabSize.set(et)}};jt=te([Ae(1,Pi.a),Ae(2,_i.b)],jt);const $t=x.c.bindToContribution(pt.get),uo=new $t({id:ut,precondition:pt.inlineSuggestionVisible,handler(ke){ke.commit(),ke.editor.focus()}});Object(x.k)(uo),F.a.registerKeybindingRule({primary:2,weight:200,id:uo.id,when:_i.a.and(uo.precondition,A.a.tabMovesFocus.toNegated(),pt.inlineSuggestionHasIndentationLessThanTabSize)}),Object(x.k)(new $t({id:"editor.action.inlineSuggest.hide",precondition:pt.inlineSuggestionVisible,kbOpts:{weight:100,primary:9},handler(ke){ke.hide()}}));class io extends x.b{constructor(){super({id:io.ID,label:pe.a("action.inlineSuggest.showNext","Show Next Inline Suggestion"),alias:"Show Next Inline Suggestion",precondition:_i.a.and(A.a.writable,pt.inlineSuggestionVisible),kbOpts:{weight:100,primary:512|89}})}run(ke,ue){return Ye(this,void 0,void 0,function*(){const Fe=pt.get(ue);Fe&&(Fe.showNextInlineCompletion(),ue.focus())})}}io.ID="editor.action.inlineSuggest.showNext";class ho extends x.b{constructor(){super({id:ho.ID,label:pe.a("action.inlineSuggest.showPrevious","Show Previous Inline Suggestion"),alias:"Show Previous Inline Suggestion",precondition:_i.a.and(A.a.writable,pt.inlineSuggestionVisible),kbOpts:{weight:100,primary:512|87}})}run(ke,ue){return Ye(this,void 0,void 0,function*(){const Fe=pt.get(ue);Fe&&(Fe.showPreviousInlineCompletion(),ue.focus())})}}ho.ID="editor.action.inlineSuggest.showPrevious";class mo extends x.b{constructor(){super({id:"editor.action.inlineSuggest.trigger",label:pe.a("action.inlineSuggest.trigger","Trigger Inline Suggestion"),alias:"Trigger Inline Suggestion",precondition:A.a.writable})}run(ke,ue){return Ye(this,void 0,void 0,function*(){const Fe=pt.get(ue);Fe&&Fe.trigger()})}}Object(x.l)(pt.ID,pt),Object(x.j)(mo),Object(x.j)(io),Object(x.j)(ho);var Io=t("R3nR"),Ao=t("fjLI"),Oo=function(ke,ue,Fe,et){var f=arguments.length,h=f<3?ue:et===null?et=Object.getOwnPropertyDescriptor(ue,Fe):et,_;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")h=Reflect.decorate(ke,ue,Fe,et);else for(var K=ke.length-1;K>=0;K--)(_=ke[K])&&(h=(f<3?_(h):f>3?_(ue,Fe,h):_(ue,Fe))||h);return f>3&&h&&Object.defineProperty(ue,Fe,h),h},Wo=function(ke,ue){return function(Fe,et){ue(Fe,et,ke)}};class si{constructor(ke,ue,Fe){this.owner=ke,this.range=ue,this.controller=Fe}isValidForHoverAnchor(ke){return ke.type===1&&this.range.startColumn<=ke.range.startColumn&&this.range.endColumn>=ke.range.endColumn}hasMultipleSuggestions(){return this.controller.hasMultipleInlineCompletions()}}let hi=class{constructor(ue,Fe,et,f,h,_,K,de){this._editor=ue,this._hover=Fe,this._commandService=et,this._menuService=f,this._contextKeyService=h,this._modeService=_,this._openerService=K,this.accessibilityService=de}suggestHoverAnchor(ue){const Fe=pt.get(this._editor);if(!Fe)return null;if(ue.target.type===8){const et=ue.target.detail;if(Fe.shouldShowHoverAtViewZone(et.viewZoneId))return new se(1e3,this,R.a.fromPositions(et.positionBefore||et.position,et.positionBefore||et.position))}if(ue.target.type===7&&ue.target.range&&Fe.shouldShowHoverAt(ue.target.range))return new se(1e3,this,ue.target.range);if(ue.target.type===6&&ue.target.range&&ue.target.detail){const et=ue.target.detail.mightBeForeignElement;if(et&&Fe.shouldShowHoverAt(ue.target.range))return new se(1e3,this,ue.target.range)}return null}computeSync(ue,Fe){const et=pt.get(this._editor);return et&&et.shouldShowHoverAt(ue.range)?[new si(this,ue.range,et)]:[]}renderHoverParts(ue,Fe,et){const f=new B.b,h=ue[0];this.accessibilityService.isScreenReaderOptimized()&&this.renderScreenReaderText(h,Fe,f);const _=f.add(this._menuService.createMenu(Ao.b.InlineCompletionsActions,this._contextKeyService)),K=et.addAction({label:pe.a("showNextInlineSuggestion","Next"),commandId:io.ID,run:()=>this._commandService.executeCommand(io.ID)}),de=et.addAction({label:pe.a("showPreviousInlineSuggestion","Previous"),commandId:ho.ID,run:()=>this._commandService.executeCommand(ho.ID)});et.addAction({label:pe.a("acceptInlineSuggestion","Accept"),commandId:uo.id,run:()=>this._commandService.executeCommand(uo.id)});const ye=[K,de];for(const De of ye)De.setEnabled(!1);h.hasMultipleSuggestions().then(De=>{for(const qe of ye)qe.setEnabled(De)});for(const[De,qe]of _.getActions())for(const ht of qe)ht instanceof Ao.c&&et.addAction({label:ht.label,commandId:ht.item.id,run:()=>this._commandService.executeCommand(ht.item.id)});return f}renderScreenReaderText(ue,Fe,et){var f,h;const _=v.a,K=_("div.hover-row.markdown-hover"),de=v.q(K,_("div.hover-contents")),ye=et.add(new Re.a({editor:this._editor},this._modeService,this._openerService)),De=ht=>{et.add(ye.onDidRenderAsync(()=>{de.className="hover-contents code-hover-contents",this._hover.onContentsChanged()}));const yt=pe.a("inlineSuggestionFollows","Suggestion:"),Ct=et.add(ye.render(new je.a().appendText(yt).appendCodeblock("text",ht)));de.replaceChildren(Ct.element)},qe=(h=(f=ue.controller.activeModel)===null||f===void 0?void 0:f.inlineCompletionsModel)===null||h===void 0?void 0:h.ghostText;if(qe){const ht=this._editor.getModel().getLineContent(qe.lineNumber);De(qe.renderForScreenReader(ht))}Fe.appendChild(K)}};hi=Oo([Wo(2,k.b),Wo(3,Ao.a),Wo(4,_i.b),Wo(5,j.a),Wo(6,Lt.a),Wo(7,Io.b)],hi);var Uo=t("bexQ"),mi=t("QVNv"),Ri=function(ke,ue,Fe,et){var f=arguments.length,h=f<3?ue:et===null?et=Object.getOwnPropertyDescriptor(ue,Fe):et,_;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")h=Reflect.decorate(ke,ue,Fe,et);else for(var K=ke.length-1;K>=0;K--)(_=ke[K])&&(h=(f<3?_(h):f>3?_(ue,Fe,h):_(ue,Fe))||h);return f>3&&h&&Object.defineProperty(ue,Fe,h),h},Di=function(ke,ue){return function(Fe,et){ue(Fe,et,ke)}},pi=function(ke,ue,Fe,et){function f(h){return h instanceof Fe?h:new Fe(function(_){_(h)})}return new(Fe||(Fe=Promise))(function(h,_){function K(De){try{ye(et.next(De))}catch(qe){_(qe)}}function de(De){try{ye(et.throw(De))}catch(qe){_(qe)}}function ye(De){De.done?h(De.value):f(De.value).then(K,de)}ye((et=et.apply(ke,ue||[])).next())})};const Wi=v.a;let fn=class extends B.a{constructor(ue){super();this._keybindingService=ue,this._hasContent=!1,this.hoverElement=Wi("div.hover-row.status-bar"),this.actionsElement=v.q(this.hoverElement,Wi("div.actions"))}get hasContent(){return this._hasContent}addAction(ue){const Fe=this._keybindingService.lookupKeybinding(ue.commandId),et=Fe?Fe.getLabel():null;return this._hasContent=!0,this._register(L.render(this.actionsElement,ue,et))}append(ue){const Fe=v.q(this.actionsElement,ue);return this._hasContent=!0,Fe}};fn=Ri([Di(0,Uo.a)],fn);class In{constructor(ke,ue){this._participants=ue,this._editor=ke,this._result=[],this._anchor=null}setAnchor(ke){this._anchor=ke,this._result=[]}clearResult(){this._result=[]}static _getLineDecorations(ke,ue){if(ue.type!==1)return[];const Fe=ke.getModel(),et=ue.range.startLineNumber,f=Fe.getLineMaxColumn(et);return ke.getLineDecorations(et).filter(h=>{if(h.options.isWholeLine)return!0;const _=h.range.startLineNumber===et?h.range.startColumn:1,K=h.range.endLineNumber===et?h.range.endColumn:f;return!(_>ue.range.startColumn||ue.range.endColumn>K)})}computeAsync(ke){return pi(this,void 0,void 0,function*(){const ue=this._anchor;if(!this._editor.hasModel()||!ue)return Promise.resolve([]);const Fe=In._getLineDecorations(this._editor,ue),et=yield Promise.all(this._participants.map(f=>this._computeAsync(f,Fe,ue,ke)));return Object(w.k)(et)})}_computeAsync(ke,ue,Fe,et){return pi(this,void 0,void 0,function*(){return ke.computeAsync?ke.computeAsync(Fe,ue,et):[]})}computeSync(){if(!this._editor.hasModel()||!this._anchor)return[];const ke=In._getLineDecorations(this._editor,this._anchor);let ue=[];for(const Fe of this._participants)ue=ue.concat(Fe.computeSync(this._anchor,ke));return Object(w.e)(ue)}onResult(ke,ue){ue?this._result=ke.concat(this._result):this._result=this._result.concat(ke)}getResult(){return this._result.slice(0)}getResultWithLoadingMessage(){if(this._anchor){for(const ke of this._participants)if(ke.createLoadingMessage){const ue=ke.createLoadingMessage(this._anchor);if(ue)return this._result.slice(0).concat([ue])}}return this._result.slice(0)}}let an=class ke extends r.a{constructor(ue,Fe,et,f,h){super();this._hoverVisibleKey=Fe,this._keybindingService=f,this._contextKeyService=h,this.allowEditorOverflow=!0,this._participants=[et.createInstance(ie,ue,this),et.createInstance(it,ue,this),et.createInstance(hi,ue,this),et.createInstance(Ut,ue,this)],this._editor=ue,this._isVisible=!1,this._stoleFocus=!1,this._renderDisposable=null,this._hover=this._register(new D),this._hover.containerDomNode.classList.toggle("hidden",!this._isVisible),this.onkeydown(this._hover.containerDomNode,_=>{_.equals(9)&&this.hide()}),this._register(this._editor.onDidChangeConfiguration(_=>{_.hasChanged(43)&&this._updateFont()})),this._editor.onDidLayoutChange(()=>this.layout()),this.layout(),this._editor.addContentWidget(this),this._showAtPosition=null,this._showAtRange=null,this._stoleFocus=!1,this._messages=[],this._lastAnchor=null,this._computer=new In(this._editor,this._participants),this._highlightDecorations=[],this._isChangingDecorations=!1,this._shouldFocus=!1,this._colorPicker=null,this._preferAbove=this._editor.getOption(52).above,this._hoverOperation=new W(this._computer,_=>this._withResult(_,!0),null,_=>this._withResult(_,!1),this._editor.getOption(52).delay),this._register(v.o(this.getDomNode(),v.d.FOCUS,()=>{this._colorPicker&&this.getDomNode().classList.add("colorpicker-hover")})),this._register(v.o(this.getDomNode(),v.d.BLUR,()=>{this.getDomNode().classList.remove("colorpicker-hover")})),this._register(ue.onDidChangeConfiguration(()=>{this._hoverOperation.setHoverTime(this._editor.getOption(52).delay),this._preferAbove=this._editor.getOption(52).above})),this._register(c.E.onDidChange(()=>{this._isVisible&&this._lastAnchor&&this._messages.length>0&&(this._hover.contentsDomNode.textContent="",this._renderMessages(this._lastAnchor,this._messages))}))}dispose(){this._hoverOperation.cancel(),this._editor.removeContentWidget(this),super.dispose()}getId(){return ke.ID}getDomNode(){return this._hover.containerDomNode}_shouldShowAt(ue){const Fe=ue.target.type;if(Fe===6)return!0;if(Fe===7){const et=this._editor.getOption(43).typicalHalfwidthCharacterWidth/2,f=ue.target.detail;if(f&&!f.isAfterLines&&typeof f.horizontalDistanceToText=="number"&&f.horizontalDistanceToText<et)return!0}return!1}maybeShowAt(ue){var Fe;const et=[];for(const f of this._participants)if(typeof f.suggestHoverAnchor=="function"){const h=f.suggestHoverAnchor(ue);h&&et.push(h)}if(this._shouldShowAt(ue)&&ue.target.range){const f=[...((Fe=ue.target.element)===null||Fe===void 0?void 0:Fe.classList.values())||[]].find(_=>_.startsWith("ced-colorBox"))&&ue.target.range.endColumn-ue.target.range.startColumn===1,h=f?new R.a(ue.target.range.startLineNumber,ue.target.range.startColumn+1,ue.target.range.endLineNumber,ue.target.range.endColumn+1):ue.target.range;et.push(new U(0,h))}return et.length===0?!1:(et.sort((f,h)=>h.priority-f.priority),this._startShowingAt(et[0],0,!1),!0)}_showAt(ue,Fe,et){this._showAtPosition=ue,this._showAtRange=Fe,this._hoverVisibleKey.set(!0),this._isVisible=!0,this._hover.containerDomNode.classList.toggle("hidden",!this._isVisible),this._editor.layoutContentWidget(this),this._editor.render(),this._stoleFocus=et,et&&this._hover.containerDomNode.focus()}getPosition(){if(this._isVisible){let ue=this._preferAbove;return!ue&&this._contextKeyService.getContextKeyValue(mi.b.Visible.key)&&(ue=!0),{position:this._showAtPosition,range:this._showAtRange,preference:ue?[1,2]:[2,1]}}return null}_updateFont(){const ue=Array.prototype.slice.call(this._hover.contentsDomNode.getElementsByClassName("code"));ue.forEach(Fe=>this._editor.applyFontInfo(Fe))}_updateContents(ue){this._hover.contentsDomNode.textContent="",this._hover.contentsDomNode.appendChild(ue),this._updateFont(),this._editor.layoutContentWidget(this),this._hover.onContentsChanged()}layout(){const ue=Math.max(this._editor.getLayoutInfo().height/4,250),{fontSize:Fe,lineHeight:et}=this._editor.getOption(43);this._hover.contentsDomNode.style.fontSize=`${Fe}px`,this._hover.contentsDomNode.style.lineHeight=`${et/Fe}`,this._hover.contentsDomNode.style.maxHeight=`${ue}px`,this._hover.contentsDomNode.style.maxWidth=`${Math.max(this._editor.getLayoutInfo().width*.66,500)}px`}onModelDecorationsChanged(){if(this._isChangingDecorations)return;this._isVisible&&(this._hoverOperation.cancel(),this._computer.clearResult(),this._colorPicker||this._hoverOperation.start(0))}startShowingAtRange(ue,Fe,et){this._startShowingAt(new U(0,ue),Fe,et)}_startShowingAt(ue,Fe,et){if(this._lastAnchor&&this._lastAnchor.equals(ue))return;if(this._hoverOperation.cancel(),this._isVisible)if(!this._showAtPosition||!this._lastAnchor||!ue.canAdoptVisibleHover(this._lastAnchor,this._showAtPosition))this.hide();else{const f=this._messages.filter(h=>h.isValidForHoverAnchor(ue));if(f.length===0)this.hide();else{if(f.length===this._messages.length)return;this._renderMessages(ue,f)}}this._lastAnchor=ue,this._computer.setAnchor(ue),this._shouldFocus=et,this._hoverOperation.start(Fe)}hide(){this._lastAnchor=null,this._hoverOperation.cancel(),this._isVisible&&(setTimeout(()=>{this._isVisible||this._hoverVisibleKey.set(!1)},0),this._isVisible=!1,this._hover.containerDomNode.classList.toggle("hidden",!this._isVisible),this._editor.layoutContentWidget(this),this._stoleFocus&&this._editor.focus()),this._isChangingDecorations=!0,this._highlightDecorations=this._editor.deltaDecorations(this._highlightDecorations,[]),this._isChangingDecorations=!1,this._renderDisposable&&(this._renderDisposable.dispose(),this._renderDisposable=null),this._colorPicker=null}isColorPickerVisible(){return!!this._colorPicker}setColorPicker(ue){this._colorPicker=ue}onContentsChanged(){this._hover.onContentsChanged()}_withResult(ue,Fe){this._messages=ue,this._lastAnchor&&this._messages.length>0?this._renderMessages(this._lastAnchor,this._messages):Fe&&this.hide()}_renderMessages(ue,Fe){this._renderDisposable&&(this._renderDisposable.dispose(),this._renderDisposable=null),this._colorPicker=null;let et=1073741824,f=Fe[0].range,h=null,_=document.createDocumentFragment();const K=new B.b,de=new Map;for(const De of Fe){et=Math.min(et,De.range.startColumn),f=R.a.plusRange(f,De.range),De.forceShowAtRange&&(h=De.range),de.has(De.owner)||de.set(De.owner,[]);const qe=de.get(De.owner);qe.push(De)}const ye=K.add(new fn(this._keybindingService));for(const[De,qe]of de)K.add(De.renderHoverParts(qe,_,ye));ye.hasContent&&_.appendChild(ye.hoverElement),this._renderDisposable=K,_.hasChildNodes()&&(h?this._showAt(h.getStartPosition(),h,this._shouldFocus):this._showAt(new b.a(ue.range.startLineNumber,et),f,this._shouldFocus),this._updateContents(_)),this._colorPicker&&this._colorPicker.layout(),this._isChangingDecorations=!0,this._highlightDecorations=this._editor.deltaDecorations(this._highlightDecorations,f?[{range:f,options:ke._DECORATION_OPTIONS}]:[]),this._isChangingDecorations=!1}};an.ID="editor.contrib.modesContentHoverWidget",an._DECORATION_OPTIONS=u.b.register({description:"content-hover-highlight",className:"hoverHighlight"}),an=Ri([Di(2,Pi.a),Di(3,Uo.a),Di(4,_i.b)],an);const bn=v.a;class Wn{constructor(ke){this._editor=ke,this._lineNumber=-1,this._result=[]}setLineNumber(ke){this._lineNumber=ke,this._result=[]}clearResult(){this._result=[]}computeSync(){const ke=et=>({value:et}),ue=this._editor.getLineDecorations(this._lineNumber),Fe=[];if(!ue)return Fe;for(const et of ue){if(!et.options.glyphMarginClassName)continue;const f=et.options.glyphMarginHoverMessage;if(!f||Object(je.b)(f))continue;Fe.push(...Object(w.c)(f).map(ke))}return Fe}onResult(ke,ue){this._result=this._result.concat(ke)}getResult(){return this._result}getResultWithLoadingMessage(){return this.getResult()}}class gn extends r.a{constructor(ke,ue,Fe=Lt.b){super();this._renderDisposeables=this._register(new B.b),this._editor=ke,this._isVisible=!1,this._messages=[],this._lastLineNumber=-1,this._hover=this._register(new D),this._hover.containerDomNode.classList.toggle("hidden",!this._isVisible),this._markdownRenderer=this._register(new Re.a({editor:this._editor},ue,Fe)),this._computer=new Wn(this._editor),this._hoverOperation=new W(this._computer,et=>this._withResult(et),void 0,et=>this._withResult(et),300),this._register(this._editor.onDidChangeConfiguration(et=>{et.hasChanged(43)&&this._updateFont()})),this._editor.addOverlayWidget(this)}dispose(){this._hoverOperation.cancel(),this._editor.removeOverlayWidget(this),super.dispose()}getId(){return gn.ID}getDomNode(){return this._hover.containerDomNode}getPosition(){return null}_showAt(ke){this._isVisible||(this._isVisible=!0,this._hover.containerDomNode.classList.toggle("hidden",!this._isVisible));const ue=this._editor.getLayoutInfo(),Fe=this._editor.getTopForLineNumber(ke),et=this._editor.getScrollTop(),f=this._editor.getOption(58),h=this._hover.containerDomNode.clientHeight,_=Fe-et-(h-f)/2;this._hover.containerDomNode.style.left=`${ue.glyphMarginLeft+ue.glyphMarginWidth}px`,this._hover.containerDomNode.style.top=`${Math.max(Math.round(_),0)}px`}_updateFont(){const ke=Array.prototype.slice.call(this._hover.contentsDomNode.getElementsByClassName("code"));ke.forEach(ue=>this._editor.applyFontInfo(ue))}_updateContents(ke){this._hover.contentsDomNode.textContent="",this._hover.contentsDomNode.appendChild(ke),this._updateFont()}onModelDecorationsChanged(){this._isVisible&&(this._hoverOperation.cancel(),this._computer.clearResult(),this._hoverOperation.start(0))}startShowingAt(ke){if(this._lastLineNumber===ke)return;this._hoverOperation.cancel(),this.hide(),this._lastLineNumber=ke,this._computer.setLineNumber(ke),this._hoverOperation.start(0)}hide(){if(this._lastLineNumber=-1,this._hoverOperation.cancel(),!this._isVisible)return;this._isVisible=!1,this._hover.containerDomNode.classList.toggle("hidden",!this._isVisible)}_withResult(ke){this._messages=ke,this._messages.length>0?this._renderMessages(this._lastLineNumber,this._messages):this.hide()}_renderMessages(ke,ue){this._renderDisposeables.clear();const Fe=document.createDocumentFragment();for(const et of ue){const f=bn("div.hover-row.markdown-hover"),h=v.q(f,bn("div.hover-contents")),_=this._renderDisposeables.add(this._markdownRenderer.render(et.value));h.appendChild(_.element),Fe.appendChild(f)}this._updateContents(Fe),this._showAt(ke)}}gn.ID="editor.contrib.modesGlyphHoverWidget";var $n=function(ke,ue,Fe,et){var f=arguments.length,h=f<3?ue:et===null?et=Object.getOwnPropertyDescriptor(ue,Fe):et,_;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")h=Reflect.decorate(ke,ue,Fe,et);else for(var K=ke.length-1;K>=0;K--)(_=ke[K])&&(h=(f<3?_(h):f>3?_(ue,Fe,h):_(ue,Fe))||h);return f>3&&h&&Object.defineProperty(ue,Fe,h),h},Un=function(ke,ue){return function(Fe,et){ue(Fe,et,ke)}};let qo=class ke{constructor(ue,Fe,et,f,h){this._editor=ue,this._instantiationService=Fe,this._openerService=et,this._modeService=f,this._toUnhook=new B.b,this._isMouseDown=!1,this._hoverClicked=!1,this._contentWidget=null,this._glyphWidget=null,this._hookEvents(),this._didChangeConfigurationHandler=this._editor.onDidChangeConfiguration(_=>{_.hasChanged(52)&&(this._unhookEvents(),this._hookEvents())}),this._hoverVisibleKey=A.a.hoverVisible.bindTo(h)}static get(ue){return ue.getContribution(ke.ID)}_hookEvents(){const ue=()=>this._hideWidgets(),Fe=this._editor.getOption(52);this._isHoverEnabled=Fe.enabled,this._isHoverSticky=Fe.sticky,this._isHoverEnabled?(this._toUnhook.add(this._editor.onMouseDown(et=>this._onEditorMouseDown(et))),this._toUnhook.add(this._editor.onMouseUp(et=>this._onEditorMouseUp(et))),this._toUnhook.add(this._editor.onMouseMove(et=>this._onEditorMouseMove(et))),this._toUnhook.add(this._editor.onKeyDown(et=>this._onKeyDown(et))),this._toUnhook.add(this._editor.onDidChangeModelDecorations(()=>this._onModelDecorationsChanged()))):(this._toUnhook.add(this._editor.onMouseMove(et=>this._onEditorMouseMove(et))),this._toUnhook.add(this._editor.onKeyDown(et=>this._onKeyDown(et)))),this._toUnhook.add(this._editor.onMouseLeave(ue)),this._toUnhook.add(this._editor.onDidChangeModel(ue)),this._toUnhook.add(this._editor.onDidScrollChange(et=>this._onEditorScrollChanged(et)))}_unhookEvents(){this._toUnhook.clear()}_onModelDecorationsChanged(){var ue,Fe;(ue=this._contentWidget)===null||ue===void 0||ue.onModelDecorationsChanged(),(Fe=this._glyphWidget)===null||Fe===void 0||Fe.onModelDecorationsChanged()}_onEditorScrollChanged(ue){(ue.scrollTopChanged||ue.scrollLeftChanged)&&this._hideWidgets()}_onEditorMouseDown(ue){this._isMouseDown=!0;const Fe=ue.target.type;if(Fe===9&&ue.target.detail===an.ID){this._hoverClicked=!0;return}if(Fe===12&&ue.target.detail===gn.ID)return;Fe!==12&&ue.target.detail!==gn.ID&&(this._hoverClicked=!1),this._hideWidgets()}_onEditorMouseUp(ue){this._isMouseDown=!1}_onEditorMouseMove(ue){var Fe,et,f,h,_;let K=ue.target.type;if(this._isMouseDown&&this._hoverClicked)return;if(this._isHoverSticky&&K===9&&ue.target.detail===an.ID)return;if(this._isHoverSticky&&!((et=(Fe=ue.event.browserEvent.view)===null||Fe===void 0?void 0:Fe.getSelection())===null||et===void 0?void 0:et.isCollapsed))return;if(!this._isHoverSticky&&K===9&&ue.target.detail===an.ID&&((f=this._contentWidget)===null||f===void 0?void 0:f.isColorPickerVisible()))return;if(this._isHoverSticky&&K===12&&ue.target.detail===gn.ID)return;if(!this._isHoverEnabled){this._hideWidgets();return}const de=this._getOrCreateContentWidget();if(de.maybeShowAt(ue)){(h=this._glyphWidget)===null||h===void 0||h.hide();return}if(K===2&&ue.target.position){(_=this._contentWidget)===null||_===void 0||_.hide(),this._glyphWidget||(this._glyphWidget=new gn(this._editor,this._modeService,this._openerService)),this._glyphWidget.startShowingAt(ue.target.position.lineNumber);return}this._hideWidgets()}_onKeyDown(ue){ue.keyCode!==5&&ue.keyCode!==6&&ue.keyCode!==57&&ue.keyCode!==4&&this._hideWidgets()}_hideWidgets(){var ue,Fe,et;if(this._isMouseDown&&this._hoverClicked&&((ue=this._contentWidget)===null||ue===void 0?void 0:ue.isColorPickerVisible()))return;this._hoverClicked=!1,(Fe=this._glyphWidget)===null||Fe===void 0||Fe.hide(),(et=this._contentWidget)===null||et===void 0||et.hide()}_getOrCreateContentWidget(){return this._contentWidget||(this._contentWidget=this._instantiationService.createInstance(an,this._editor,this._hoverVisibleKey)),this._contentWidget}isColorPickerVisible(){var ue;return((ue=this._contentWidget)===null||ue===void 0?void 0:ue.isColorPickerVisible())||!1}showContentHover(ue,Fe,et){this._getOrCreateContentWidget().startShowingAtRange(ue,Fe,et)}dispose(){var ue,Fe;this._unhookEvents(),this._toUnhook.dispose(),this._didChangeConfigurationHandler.dispose(),(ue=this._glyphWidget)===null||ue===void 0||ue.dispose(),(Fe=this._contentWidget)===null||Fe===void 0||Fe.dispose()}};qo.ID="editor.contrib.hover",qo=$n([Un(1,Pi.a),Un(2,Lt.a),Un(3,j.a),Un(4,_i.b)],qo);class oo extends x.b{constructor(){super({id:"editor.action.showHover",label:pe.a({key:"showHover",comment:["Label for action that will trigger the showing of a hover in the editor.","This allows for users to show the hover without using the mouse."]},"Show Hover"),alias:"Show Hover",precondition:void 0,kbOpts:{kbExpr:A.a.editorTextFocus,primary:Object(g.c)(2048|41,2048|39),weight:100}})}run(ke,ue){if(!ue.hasModel())return;let Fe=qo.get(ue);if(!Fe)return;const et=ue.getPosition(),f=new R.a(et.lineNumber,et.column,et.lineNumber,et.column),h=ue.getOption(2)===2;Fe.showContentHover(f,1,h)}}class So extends x.b{constructor(){super({id:"editor.action.showDefinitionPreviewHover",label:pe.a({key:"showDefinitionPreviewHover",comment:["Label for action that will trigger the showing of definition preview hover in the editor.","This allows for users to show the definition preview hover without using the mouse."]},"Show Definition Preview Hover"),alias:"Show Definition Preview Hover",precondition:void 0})}run(ke,ue){let Fe=qo.get(ue);if(!Fe)return;const et=ue.getPosition();if(!et)return;const f=new R.a(et.lineNumber,et.column,et.lineNumber,et.column),h=I.GotoDefinitionAtPositionEditorContribution.get(ue),_=h.startFindDefinitionFromCursor(et);_.then(()=>{Fe.showContentHover(f,1,!0)})}}Object(x.l)(qo.ID,qo),Object(x.j)(oo),Object(x.j)(So),Object(Ie.f)((ke,ue)=>{const Fe=ke.getColor(Te.H);Fe&&ue.addRule(`.monaco-editor .hoverHighlight { background-color: ${Fe}; }`);const et=ke.getColor(Te.E);et&&ue.addRule(`.monaco-editor .monaco-hover { background-color: ${et}; }`);const f=ke.getColor(Te.F);f&&(ue.addRule(`.monaco-editor .monaco-hover { border: 1px solid ${f}; }`),ue.addRule(`.monaco-editor .monaco-hover .hover-row:not(:first-child):not(:empty) { border-top: 1px solid ${f.transparent(.5)}; }`),ue.addRule(`.monaco-editor .monaco-hover hr { border-top: 1px solid ${f.transparent(.5)}; }`),ue.addRule(`.monaco-editor .monaco-hover hr { border-bottom: 0px solid ${f.transparent(.5)}; }`));const h=ke.getColor(Te.Jc);h&&ue.addRule(`.monaco-editor .monaco-hover a { color: ${h}; }`);const _=ke.getColor(Te.Ic);_&&ue.addRule(`.monaco-editor .monaco-hover a:hover { color: ${_}; }`);const K=ke.getColor(Te.G);K&&ue.addRule(`.monaco-editor .monaco-hover { color: ${K}; }`);const de=ke.getColor(Te.I);de&&ue.addRule(`.monaco-editor .monaco-hover .hover-row .actions { background-color: ${de}; }`);const ye=ke.getColor(Te.Hc);ye&&ue.addRule(`.monaco-editor .monaco-hover code { background-color: ${ye}; }`)})},s7Km:function(mt,M,t){"use strict";t.r(M),t.d(M,"MoveWordCommand",function(){return b}),t.d(M,"WordLeftCommand",function(){return u}),t.d(M,"WordRightCommand",function(){return c}),t.d(M,"CursorWordStartLeft",function(){return p}),t.d(M,"CursorWordEndLeft",function(){return S}),t.d(M,"CursorWordLeft",function(){return E}),t.d(M,"CursorWordStartLeftSelect",function(){return y}),t.d(M,"CursorWordEndLeftSelect",function(){return O}),t.d(M,"CursorWordLeftSelect",function(){return k}),t.d(M,"CursorWordAccessibilityLeft",function(){return Q}),t.d(M,"CursorWordAccessibilityLeftSelect",function(){return q}),t.d(M,"CursorWordStartRight",function(){return z}),t.d(M,"CursorWordEndRight",function(){return J}),t.d(M,"CursorWordRight",function(){return re}),t.d(M,"CursorWordStartRightSelect",function(){return Z}),t.d(M,"CursorWordEndRightSelect",function(){return ne}),t.d(M,"CursorWordRightSelect",function(){return le}),t.d(M,"CursorWordAccessibilityRight",function(){return _e}),t.d(M,"CursorWordAccessibilityRightSelect",function(){return Ce}),t.d(M,"DeleteWordCommand",function(){return oe}),t.d(M,"DeleteWordLeftCommand",function(){return ae}),t.d(M,"DeleteWordRightCommand",function(){return V}),t.d(M,"DeleteWordStartLeft",function(){return G}),t.d(M,"DeleteWordEndLeft",function(){return ee}),t.d(M,"DeleteWordLeft",function(){return pe}),t.d(M,"DeleteWordStartRight",function(){return Te}),t.d(M,"DeleteWordEndRight",function(){return Ie}),t.d(M,"DeleteWordRight",function(){return Me}),t.d(M,"DeleteInsideWord",function(){return Oe});var g=t("sswD"),B=t("LCkn"),x=t("/UlZ"),R=t("Ll0s"),A=t("1I1M"),j=t("5v8Y"),I=t("cGHE"),v=t("aokT"),C=t("gCVg"),m=t("wQH0"),d=t("cMvZ"),D=t("3/fG"),L=t("R3nR"),r=t("T8No"),w=t("FmXZ");class b extends g.c{constructor(Xe){super(Xe);this._inSelectionMode=Xe.inSelectionMode,this._wordNavigationType=Xe.wordNavigationType}runEditorCommand(Xe,fe,Pe){if(!fe.hasModel())return;const Be=Object(j.a)(fe.getOption(115)),Se=fe.getModel(),me=fe.getSelections(),he=me.map(Le=>{const we=new I.a(Le.positionLineNumber,Le.positionColumn),ve=this._move(Be,Se,we,this._wordNavigationType);return this._moveTo(Le,ve,this._inSelectionMode)});if(Se.pushStackElement(),fe._getViewModel().setCursorStates("moveWordCommand",3,he.map(Le=>R.d.fromModelSelection(Le))),he.length===1){const Le=new I.a(he[0].positionLineNumber,he[0].positionColumn);fe.revealPosition(Le,0)}}_moveTo(Xe,fe,Pe){return Pe?new C.a(Xe.selectionStartLineNumber,Xe.selectionStartColumn,fe.lineNumber,fe.column):new C.a(fe.lineNumber,fe.column,fe.lineNumber,fe.column)}}class u extends b{_move(Xe,fe,Pe,Be){return A.a.moveWordLeft(Xe,fe,Pe,Be)}}class c extends b{_move(Xe,fe,Pe,Be){return A.a.moveWordRight(Xe,fe,Pe,Be)}}class p extends u{constructor(){super({inSelectionMode:!1,wordNavigationType:0,id:"cursorWordStartLeft",precondition:void 0})}}class S extends u{constructor(){super({inSelectionMode:!1,wordNavigationType:2,id:"cursorWordEndLeft",precondition:void 0})}}class E extends u{constructor(){var Xe;super({inSelectionMode:!1,wordNavigationType:1,id:"cursorWordLeft",precondition:void 0,kbOpts:{kbExpr:r.a.and(m.a.textInputFocus,(Xe=r.a.and(L.a,w.b))===null||Xe===void 0?void 0:Xe.negate()),primary:2048|15,mac:{primary:512|15},weight:100}})}}class y extends u{constructor(){super({inSelectionMode:!0,wordNavigationType:0,id:"cursorWordStartLeftSelect",precondition:void 0})}}class O extends u{constructor(){super({inSelectionMode:!0,wordNavigationType:2,id:"cursorWordEndLeftSelect",precondition:void 0})}}class k extends u{constructor(){var Xe;super({inSelectionMode:!0,wordNavigationType:1,id:"cursorWordLeftSelect",precondition:void 0,kbOpts:{kbExpr:r.a.and(m.a.textInputFocus,(Xe=r.a.and(L.a,w.b))===null||Xe===void 0?void 0:Xe.negate()),primary:2048|1024|15,mac:{primary:512|1024|15},weight:100}})}}class Q extends u{constructor(){super({inSelectionMode:!1,wordNavigationType:3,id:"cursorWordAccessibilityLeft",precondition:void 0})}_move(Xe,fe,Pe,Be){return super._move(Object(j.a)(x.g.wordSeparators.defaultValue),fe,Pe,Be)}}class q extends u{constructor(){super({inSelectionMode:!0,wordNavigationType:3,id:"cursorWordAccessibilityLeftSelect",precondition:void 0})}_move(Xe,fe,Pe,Be){return super._move(Object(j.a)(x.g.wordSeparators.defaultValue),fe,Pe,Be)}}class z extends c{constructor(){super({inSelectionMode:!1,wordNavigationType:0,id:"cursorWordStartRight",precondition:void 0})}}class J extends c{constructor(){var Xe;super({inSelectionMode:!1,wordNavigationType:2,id:"cursorWordEndRight",precondition:void 0,kbOpts:{kbExpr:r.a.and(m.a.textInputFocus,(Xe=r.a.and(L.a,w.b))===null||Xe===void 0?void 0:Xe.negate()),primary:2048|17,mac:{primary:512|17},weight:100}})}}class re extends c{constructor(){super({inSelectionMode:!1,wordNavigationType:2,id:"cursorWordRight",precondition:void 0})}}class Z extends c{constructor(){super({inSelectionMode:!0,wordNavigationType:0,id:"cursorWordStartRightSelect",precondition:void 0})}}class ne extends c{constructor(){var Xe;super({inSelectionMode:!0,wordNavigationType:2,id:"cursorWordEndRightSelect",precondition:void 0,kbOpts:{kbExpr:r.a.and(m.a.textInputFocus,(Xe=r.a.and(L.a,w.b))===null||Xe===void 0?void 0:Xe.negate()),primary:2048|1024|17,mac:{primary:512|1024|17},weight:100}})}}class le extends c{constructor(){super({inSelectionMode:!0,wordNavigationType:2,id:"cursorWordRightSelect",precondition:void 0})}}class _e extends c{constructor(){super({inSelectionMode:!1,wordNavigationType:3,id:"cursorWordAccessibilityRight",precondition:void 0})}_move(Xe,fe,Pe,Be){return super._move(Object(j.a)(x.g.wordSeparators.defaultValue),fe,Pe,Be)}}class Ce extends c{constructor(){super({inSelectionMode:!0,wordNavigationType:3,id:"cursorWordAccessibilityRightSelect",precondition:void 0})}_move(Xe,fe,Pe,Be){return super._move(Object(j.a)(x.g.wordSeparators.defaultValue),fe,Pe,Be)}}class oe extends g.c{constructor(Xe){super(Xe);this._whitespaceHeuristics=Xe.whitespaceHeuristics,this._wordNavigationType=Xe.wordNavigationType}runEditorCommand(Xe,fe,Pe){if(!fe.hasModel())return;const Be=Object(j.a)(fe.getOption(115)),Se=fe.getModel(),me=fe.getSelections(),he=fe.getOption(5),Le=fe.getOption(8),we=d.b.getAutoClosingPairs(Se.getLanguageId()),ve=fe._getViewModel(),ie=me.map(W=>{const U=this._delete({wordSeparators:Be,model:Se,selection:W,whitespaceHeuristics:this._whitespaceHeuristics,autoClosingDelete:fe.getOption(6),autoClosingBrackets:he,autoClosingQuotes:Le,autoClosingPairs:we,autoClosedCharacters:ve.getCursorAutoClosedCharacters()},this._wordNavigationType);return new B.a(U,"")});fe.pushUndoStop(),fe.executeCommands(this.id,ie),fe.pushUndoStop()}}class ae extends oe{_delete(Xe,fe){let Pe=A.a.deleteWordLeft(Xe,fe);return Pe||new v.a(1,1,1,1)}}class V extends oe{_delete(Xe,fe){let Pe=A.a.deleteWordRight(Xe,fe);if(Pe)return Pe;const Be=Xe.model.getLineCount(),Se=Xe.model.getLineMaxColumn(Be);return new v.a(Be,Se,Be,Se)}}class G extends ae{constructor(){super({whitespaceHeuristics:!1,wordNavigationType:0,id:"deleteWordStartLeft",precondition:m.a.writable})}}class ee extends ae{constructor(){super({whitespaceHeuristics:!1,wordNavigationType:2,id:"deleteWordEndLeft",precondition:m.a.writable})}}class pe extends ae{constructor(){super({whitespaceHeuristics:!0,wordNavigationType:0,id:"deleteWordLeft",precondition:m.a.writable,kbOpts:{kbExpr:m.a.textInputFocus,primary:2048|1,mac:{primary:512|1},weight:100}})}}class Te extends V{constructor(){super({whitespaceHeuristics:!1,wordNavigationType:0,id:"deleteWordStartRight",precondition:m.a.writable})}}class Ie extends V{constructor(){super({whitespaceHeuristics:!1,wordNavigationType:2,id:"deleteWordEndRight",precondition:m.a.writable})}}class Me extends V{constructor(){super({whitespaceHeuristics:!0,wordNavigationType:2,id:"deleteWordRight",precondition:m.a.writable,kbOpts:{kbExpr:m.a.textInputFocus,primary:2048|20,mac:{primary:512|20},weight:100}})}}class Oe extends g.b{constructor(){super({id:"deleteInsideWord",precondition:m.a.writable,label:D.a("deleteInsideWord","Delete Word"),alias:"Delete Word"})}run(Xe,fe,Pe){if(!fe.hasModel())return;const Be=Object(j.a)(fe.getOption(115)),Se=fe.getModel(),me=fe.getSelections(),he=me.map(Le=>{const we=A.a.deleteInsideWord(Be,Se,Le);return new B.a(we,"")});fe.pushUndoStop(),fe.executeCommands(this.id,he),fe.pushUndoStop()}}Object(g.k)(new p),Object(g.k)(new S),Object(g.k)(new E),Object(g.k)(new y),Object(g.k)(new O),Object(g.k)(new k),Object(g.k)(new z),Object(g.k)(new J),Object(g.k)(new re),Object(g.k)(new Z),Object(g.k)(new ne),Object(g.k)(new le),Object(g.k)(new Q),Object(g.k)(new q),Object(g.k)(new _e),Object(g.k)(new Ce),Object(g.k)(new G),Object(g.k)(new ee),Object(g.k)(new pe),Object(g.k)(new Te),Object(g.k)(new Ie),Object(g.k)(new Me),Object(g.j)(Oe)},sFUC:function(mt,M,t){"use strict";t.d(M,"b",function(){return B}),t.d(M,"c",function(){return x}),t.d(M,"a",function(){return R});var g=t("iuje");function B(A){return A&&typeof A.getEditorType=="function"?A.getEditorType()===g.a.ICodeEditor:!1}function x(A){return A&&typeof A.getEditorType=="function"?A.getEditorType()===g.a.IDiffEditor:!1}function R(A){return B(A)?A:x(A)?A.getModifiedEditor():null}},sM1p:function(mt,M,t){"use strict";t.d(M,"a",function(){return R}),t.d(M,"b",function(){return A});var g=t("S3by"),B=t("Cg/j"),x=g.a;const R=Object(B.c)("notificationService");class A{}},sStQ:function(mt,M,t){"use strict";t.r(M);var g=t("+hIS");Object(g.a)({id:"perl",extensions:[".pl"],aliases:["Perl","pl"],loader:function(){return t.e(349).then(t.bind(null,"QKwv"))}})},scqD:function(mt,M,t){"use strict";t.d(M,"a",function(){return B});var g=t("Cg/j");const B=Object(g.c)("themeService")},siPX:function(mt,M,t){},snIX:function(mt,M,t){"use strict";t.d(M,"a",function(){return I});var g=t("N0LK"),B=t("LCkn"),x=t("Ll0s"),R=t("+Fos"),A=t("aokT"),j=t("cGHE");class I{static deleteRight(v,C,m,d){let D=[],L=v!==3;for(let r=0,w=d.length;r<w;r++){const b=d[r];let u=b;if(u.isEmpty()){let c=b.getPosition(),p=R.a.right(C,m,c);u=new A.a(p.lineNumber,p.column,c.lineNumber,c.column)}if(u.isEmpty()){D[r]=null;continue}u.startLineNumber!==u.endLineNumber&&(L=!0),D[r]=new B.a(u,"")}return[L,D]}static isAutoClosingPairDelete(v,C,m,d,D,L,r){if(C==="never"&&m==="never")return!1;if(v==="never")return!1;for(let w=0,b=L.length;w<b;w++){const u=L[w],c=u.getPosition();if(!u.isEmpty())return!1;const p=D.getLineContent(c.lineNumber);if(c.column<2||c.column>=p.length+1)return!1;const S=p.charAt(c.column-2),E=d.get(S);if(!E)return!1;if(Object(x.g)(S)){if(m==="never")return!1}else if(C==="never")return!1;const y=p.charAt(c.column-1);let O=!1;for(const k of E)k.open===S&&k.close===y&&(O=!0);if(!O)return!1;if(v==="auto"){let k=!1;for(let Q=0,q=r.length;Q<q;Q++){const z=r[Q];if(c.lineNumber===z.startLineNumber&&c.column===z.startColumn){k=!0;break}}if(!k)return!1}}return!0}static _runAutoClosingPairDelete(v,C,m){let d=[];for(let D=0,L=m.length;D<L;D++){const r=m[D].getPosition(),w=new A.a(r.lineNumber,r.column-1,r.lineNumber,r.column+1);d[D]=new B.a(w,"")}return[!0,d]}static deleteLeft(v,C,m,d,D){if(this.isAutoClosingPairDelete(C.autoClosingDelete,C.autoClosingBrackets,C.autoClosingQuotes,C.autoClosingPairs.autoClosingPairsOpenByEnd,m,d,D))return this._runAutoClosingPairDelete(C,m,d);const L=[];let r=v!==2;for(let w=0,b=d.length;w<b;w++){let u=I.getDeleteRange(d[w],m,C);if(u.isEmpty()){L[w]=null;continue}u.startLineNumber!==u.endLineNumber&&(r=!0),L[w]=new B.a(u,"")}return[r,L]}static getDeleteRange(v,C,m){if(!v.isEmpty())return v;const d=v.getPosition();if(m.useTabStops&&d.column>1){const D=C.getLineContent(d.lineNumber),L=g.u(D),r=L===-1?D.length+1:L+1;if(d.column<=r){const w=x.a.visibleColumnFromColumn2(m,C,d),b=x.a.prevIndentTabStop(w,m.indentSize),u=x.a.columnFromVisibleColumn2(m,C,d.lineNumber,b);return new A.a(d.lineNumber,u,d.lineNumber,d.column)}}return A.a.fromPositions(I.getPositionAfterDeleteLeft(d,C),d)}static getPositionAfterDeleteLeft(v,C){if(v.column>1){const m=g.y(v.column-1,C.getLineContent(v.lineNumber));return v.with(void 0,m+1)}else if(v.lineNumber>1){const m=v.lineNumber-1;return new j.a(m,C.getLineMaxColumn(m))}else return v}static cut(v,C,m){let d=[],D=null;m.sort((L,r)=>j.a.compare(L.getStartPosition(),r.getEndPosition()));for(let L=0,r=m.length;L<r;L++){const w=m[L];if(w.isEmpty())if(v.emptySelectionClipboard){let b=w.getPosition(),u,c,p,S;b.lineNumber<C.getLineCount()?(u=b.lineNumber,c=1,p=b.lineNumber+1,S=1):b.lineNumber>1&&(D==null?void 0:D.endLineNumber)!==b.lineNumber?(u=b.lineNumber-1,c=C.getLineMaxColumn(b.lineNumber-1),p=b.lineNumber,S=C.getLineMaxColumn(b.lineNumber)):(u=b.lineNumber,c=1,p=b.lineNumber,S=C.getLineMaxColumn(b.lineNumber));let E=new A.a(u,c,p,S);D=E,E.isEmpty()?d[L]=null:d[L]=new B.a(E,"")}else d[L]=null;else d[L]=new B.a(w,"")}return new x.e(0,d,{shouldPushStackElementBefore:!0,shouldPushStackElementAfter:!0})}}},sswD:function(mt,M,t){"use strict";t.d(M,"a",function(){return w}),t.d(M,"e",function(){return b}),t.d(M,"c",function(){return c}),t.d(M,"b",function(){return p}),t.d(M,"f",function(){return S}),t.d(M,"n",function(){return E}),t.d(M,"o",function(){return y}),t.d(M,"k",function(){return O}),t.d(M,"j",function(){return k}),t.d(M,"p",function(){return Q}),t.d(M,"m",function(){return q}),t.d(M,"l",function(){return z}),t.d(M,"d",function(){return J}),t.d(M,"i",function(){return le}),t.d(M,"g",function(){return _e}),t.d(M,"h",function(){return Ce});var g=t("3/fG"),B=t("bY76"),x=t("Vxe3"),R=t("cGHE"),A=t("G2kB"),j=t("t49l"),I=t("fjLI"),v=t("nnTU"),C=t("T8No"),m=t("nrhi"),d=t("ic2d"),D=t("XXUj"),L=t("746U"),r=t("09fa");class w{constructor(oe){this.id=oe.id,this.precondition=oe.precondition,this._kbOpts=oe.kbOpts,this._menuOpts=oe.menuOpts,this._description=oe.description}register(){if(Array.isArray(this._menuOpts)?this._menuOpts.forEach(this._registerMenuItem,this):this._menuOpts&&this._registerMenuItem(this._menuOpts),this._kbOpts){const oe=Array.isArray(this._kbOpts)?this._kbOpts:[this._kbOpts];for(const ae of oe){let V=ae.kbExpr;this.precondition&&(V?V=C.a.and(V,this.precondition):V=this.precondition);const G={id:this.id,weight:ae.weight,args:ae.args,when:V,primary:ae.primary,secondary:ae.secondary,win:ae.win,linux:ae.linux,mac:ae.mac};m.a.registerKeybindingRule(G)}}v.a.registerCommand({id:this.id,handler:(oe,ae)=>this.runCommand(oe,ae),description:this._description})}_registerMenuItem(oe){I.d.appendMenuItem(oe.menuId,{group:oe.group,command:{id:this.id,title:oe.title,icon:oe.icon,precondition:this.precondition},when:oe.when,order:oe.order})}}class b extends w{constructor(){super(...arguments);this._implementations=[]}addImplementation(oe,ae,V){return this._implementations.push({priority:oe,name:ae,implementation:V}),this._implementations.sort((G,ee)=>ee.priority-G.priority),{dispose:()=>{for(let G=0;G<this._implementations.length;G++)if(this._implementations[G].implementation===V){this._implementations.splice(G,1);return}}}}runCommand(oe,ae){const V=oe.get(r.b);V.trace(`Executing Command '${this.id}' which has ${this._implementations.length} bound.`);for(const G of this._implementations){const ee=G.implementation(oe,ae);if(ee)return V.trace(`Command '${this.id}' was handled by '${G.name}'.`),typeof ee=="boolean"?void 0:ee}V.trace(`The Command '${this.id}' was not handled by any implementation.`)}}class u extends w{constructor(oe,ae){super(ae);this.command=oe}runCommand(oe,ae){return this.command.runCommand(oe,ae)}}class c extends w{static bindToContribution(oe){return class extends c{constructor(V){super(V);this._callback=V.handler}runEditorCommand(V,G,ee){const pe=oe(G);pe&&this._callback(oe(G),ee)}}}runCommand(oe,ae){const V=oe.get(x.a),G=V.getFocusedCodeEditor()||V.getActiveCodeEditor();return G?G.invokeWithinContext(ee=>{const pe=ee.get(C.b);return pe.contextMatchesRules(Object(L.p)(this.precondition))?this.runEditorCommand(ee,G,ae):void 0}):void 0}}class p extends c{constructor(oe){super(p.convertOptions(oe));this.label=oe.label,this.alias=oe.alias}static convertOptions(oe){let ae;Array.isArray(oe.menuOpts)?ae=oe.menuOpts:oe.menuOpts?ae=[oe.menuOpts]:ae=[];function V(G){return G.menuId||(G.menuId=I.b.EditorContext),G.title||(G.title=oe.label),G.when=C.a.and(oe.precondition,G.when),G}return Array.isArray(oe.contextMenuOpts)?ae.push(...oe.contextMenuOpts.map(V)):oe.contextMenuOpts&&ae.push(V(oe.contextMenuOpts)),oe.menuOpts=ae,oe}runEditorCommand(oe,ae,V){return this.reportTelemetry(oe,ae),this.run(oe,ae,V||{})}reportTelemetry(oe,ae){oe.get(D.a).publicLog2("editorActionInvoked",{name:this.label,id:this.id})}}class S extends p{constructor(){super(...arguments);this._implementations=[]}addImplementation(oe,ae){return this._implementations.push([oe,ae]),this._implementations.sort((V,G)=>G[0]-V[0]),{dispose:()=>{for(let V=0;V<this._implementations.length;V++)if(this._implementations[V][1]===ae){this._implementations.splice(V,1);return}}}}run(oe,ae,V){for(const G of this._implementations){const ee=G[1](oe,ae,V);if(ee)return typeof ee=="boolean"?void 0:ee}}}function E(oe,ae){v.a.registerCommand(oe,function(V,...G){const[ee,pe]=G;Object(L.c)(B.a.isUri(ee)),Object(L.c)(R.a.isIPosition(pe));const Te=V.get(A.a).getModel(ee);if(Te){const Ie=R.a.lift(pe);return ae(Te,Ie,...G.slice(2))}return V.get(j.a).createModelReference(ee).then(Ie=>new Promise((Me,Oe)=>{try{const Xe=ae(Ie.object.textEditorModel,R.a.lift(pe),G.slice(2));Me(Xe)}catch(Xe){Oe(Xe)}}).finally(()=>{Ie.dispose()}))})}function y(oe,ae){v.a.registerCommand(oe,function(V,...G){const[ee]=G;Object(L.c)(B.a.isUri(ee));const pe=V.get(A.a).getModel(ee);return pe?ae(pe,...G.slice(1)):V.get(j.a).createModelReference(ee).then(Te=>new Promise((Ie,Me)=>{try{const Oe=ae(Te.object.textEditorModel,G.slice(1));Ie(Oe)}catch(Oe){Me(Oe)}}).finally(()=>{Te.dispose()}))})}function O(oe){return Z.INSTANCE.registerEditorCommand(oe),oe}function k(oe){const ae=new oe;return Z.INSTANCE.registerEditorAction(ae),ae}function Q(oe){return Z.INSTANCE.registerEditorAction(oe),oe}function q(oe){Z.INSTANCE.registerEditorAction(oe)}function z(oe,ae){Z.INSTANCE.registerEditorContribution(oe,ae)}var J;(function(oe){function ae(Te){return Z.INSTANCE.getEditorCommand(Te)}oe.getEditorCommand=ae;function V(){return Z.INSTANCE.getEditorActions()}oe.getEditorActions=V;function G(){return Z.INSTANCE.getEditorContributions()}oe.getEditorContributions=G;function ee(Te){return Z.INSTANCE.getEditorContributions().filter(Ie=>Te.indexOf(Ie.id)>=0)}oe.getSomeEditorContributions=ee;function pe(){return Z.INSTANCE.getDiffEditorContributions()}oe.getDiffEditorContributions=pe})(J||(J={}));const re={EditorCommonContributions:"editor.contributions"};class Z{constructor(){this.editorContributions=[],this.diffEditorContributions=[],this.editorActions=[],this.editorCommands=Object.create(null)}registerEditorContribution(oe,ae){this.editorContributions.push({id:oe,ctor:ae})}getEditorContributions(){return this.editorContributions.slice(0)}getDiffEditorContributions(){return this.diffEditorContributions.slice(0)}registerEditorAction(oe){oe.register(),this.editorActions.push(oe)}getEditorActions(){return this.editorActions.slice(0)}registerEditorCommand(oe){oe.register(),this.editorCommands[oe.id]=oe}getEditorCommand(oe){return this.editorCommands[oe]||null}}Z.INSTANCE=new Z,d.a.add(re.EditorCommonContributions,Z.INSTANCE);function ne(oe){return oe.register(),oe}const le=ne(new b({id:"undo",precondition:void 0,kbOpts:{weight:0,primary:2048|56},menuOpts:[{menuId:I.b.MenubarEditMenu,group:"1_do",title:g.a({key:"miUndo",comment:["&& denotes a mnemonic"]},"&&Undo"),order:1},{menuId:I.b.CommandPalette,group:"",title:g.a("undo","Undo"),order:1}]}));ne(new u(le,{id:"default:undo",precondition:void 0}));const _e=ne(new b({id:"redo",precondition:void 0,kbOpts:{weight:0,primary:2048|55,secondary:[2048|1024|56],mac:{primary:2048|1024|56}},menuOpts:[{menuId:I.b.MenubarEditMenu,group:"1_do",title:g.a({key:"miRedo",comment:["&& denotes a mnemonic"]},"&&Redo"),order:2},{menuId:I.b.CommandPalette,group:"",title:g.a("redo","Redo"),order:1}]}));ne(new u(_e,{id:"default:redo",precondition:void 0}));const Ce=ne(new b({id:"editor.action.selectAll",precondition:void 0,kbOpts:{weight:0,kbExpr:null,primary:2048|31},menuOpts:[{menuId:I.b.MenubarSelectionMenu,group:"1_basic",title:g.a({key:"miSelectAll",comment:["&& denotes a mnemonic"]},"&&Select All"),order:1},{menuId:I.b.CommandPalette,group:"",title:g.a("selectAll","Select All"),order:1}]}))},synD:function(mt,M,t){},t49l:function(mt,M,t){"use strict";t.d(M,"a",function(){return B});var g=t("Cg/j");const B=Object(g.c)("textModelService")},tADe:function(mt,M,t){"use strict";t.d(M,"c",function(){return R}),t.d(M,"a",function(){return A}),t.d(M,"b",function(){return j});var g=t("S3by"),B=t("3/fG"),x=t("Cg/j"),R;(function(I){I[I.Hint=1]="Hint",I[I.Info=2]="Info",I[I.Warning=4]="Warning",I[I.Error=8]="Error"})(R||(R={})),function(I){function v(L,r){return r-L}I.compare=v;const C=Object.create(null);C[I.Error]=Object(B.a)("sev.error","Error"),C[I.Warning]=Object(B.a)("sev.warning","Warning"),C[I.Info]=Object(B.a)("sev.info","Info");function m(L){return C[L]||""}I.toString=m;function d(L){switch(L){case g.a.Error:return I.Error;case g.a.Warning:return I.Warning;case g.a.Info:return I.Info;case g.a.Ignore:return I.Hint}}I.fromSeverity=d;function D(L){switch(L){case I.Error:return g.a.Error;case I.Warning:return g.a.Warning;case I.Info:return g.a.Info;case I.Hint:return g.a.Ignore}}I.toSeverity=D}(R||(R={}));var A;(function(I){const v="";function C(d){return m(d,!0)}I.makeKey=C;function m(d,D){let L=[v];return d.source?L.push(d.source.replace("\xA6","\\\xA6")):L.push(v),d.code?typeof d.code=="string"?L.push(d.code.replace("\xA6","\\\xA6")):L.push(d.code.value.replace("\xA6","\\\xA6")):L.push(v),d.severity!==void 0&&d.severity!==null?L.push(R.toString(d.severity)):L.push(v),d.message&&D?L.push(d.message.replace("\xA6","\\\xA6")):L.push(v),d.startLineNumber!==void 0&&d.startLineNumber!==null?L.push(d.startLineNumber.toString()):L.push(v),d.startColumn!==void 0&&d.startColumn!==null?L.push(d.startColumn.toString()):L.push(v),d.endLineNumber!==void 0&&d.endLineNumber!==null?L.push(d.endLineNumber.toString()):L.push(v),d.endColumn!==void 0&&d.endColumn!==null?L.push(d.endColumn.toString()):L.push(v),L.push(v),L.join("\xA6")}I.makeKeyOptionalMessage=m})(A||(A={}));const j=Object(x.c)("markerService")},tTk5:function(mt,M,t){"use strict";t.d(M,"b",function(){return B}),t.d(M,"a",function(){return x});var g=t("Cg/j");class B{constructor(R){this.callback=R}report(R){this._value=R,this.callback(this._value)}}B.None=Object.freeze({report(){}});const x=Object(g.c)("editorProgressService")},tX9W:function(mt,M,t){"use strict";t.d(M,"c",function(){return Wi}),t.d(M,"a",function(){return In}),t.d(M,"b",function(){return So});var g=t("/cxE"),B=t("MI8n"),x=t("pmY6"),R=t("N0LK"),A=t("bY76"),j=t("/UlZ"),I=t("cGHE"),v=t("aokT"),C=t("gCVg"),m=t("M1Kb"),d=t("oFSf");class D{constructor(){this.spacesDiff=0,this.looksLikeAlignment=!1}}function L(f,h,_,K,de){de.spacesDiff=0,de.looksLikeAlignment=!1;let ye;for(ye=0;ye<h&&ye<K;ye++){let Ft=f.charCodeAt(ye),Zt=_.charCodeAt(ye);if(Ft!==Zt)break}let De=0,qe=0;for(let Ft=ye;Ft<h;Ft++){let Zt=f.charCodeAt(Ft);Zt===32?De++:qe++}let ht=0,yt=0;for(let Ft=ye;Ft<K;Ft++){let Zt=_.charCodeAt(Ft);Zt===32?ht++:yt++}if(De>0&&qe>0)return;if(ht>0&&yt>0)return;let Ct=Math.abs(qe-yt),At=Math.abs(De-ht);if(Ct===0){de.spacesDiff=At,At>0&&0<=ht-1&&ht-1<f.length&&ht<_.length&&(_.charCodeAt(ht)!==32&&f.charCodeAt(ht-1)===32&&(f.charCodeAt(f.length-1)===44&&(de.looksLikeAlignment=!0)));return}if(At%Ct===0){de.spacesDiff=At/Ct;return}}function r(f,h,_){const K=Math.min(f.getLineCount(),1e4);let de=0,ye=0,De="",qe=0;const ht=[2,4,6,8,3,5,7],yt=8;let Ct=[0,0,0,0,0,0,0,0,0],At=new D;for(let Yt=1;Yt<=K;Yt++){let ao=f.getLineLength(Yt),Co=f.getLineContent(Yt);const ko=ao<=65536;let Qo=!1,yi=0,Ko=0,li=0;for(let xi=0,Ni=ao;xi<Ni;xi++){let Ti=ko?Co.charCodeAt(xi):f.getLineCharCode(Yt,xi);if(Ti===9)li++;else if(Ti===32)Ko++;else{Qo=!0,yi=xi;break}}if(!Qo)continue;if(li>0?de++:Ko>1&&ye++,L(De,qe,Co,yi,At),At.looksLikeAlignment&&!(_&&h===At.spacesDiff))continue;let Ki=At.spacesDiff;Ki<=yt&&Ct[Ki]++,De=Co,qe=yi}let Ft=_;de!==ye&&(Ft=de<ye);let Zt=h;if(Ft){let Yt=Ft?0:.1*K;ht.forEach(ao=>{let Co=Ct[ao];Co>Yt&&(Yt=Co,Zt=ao)}),Zt===4&&Ct[4]>0&&Ct[2]>0&&Ct[2]>=Ct[4]/2&&(Zt=2)}return{insertSpaces:Ft,tabSize:Zt}}function w(f){return(f.metadata&1)>>>0}function b(f,h){f.metadata=f.metadata&254|h<<0}function u(f){return(f.metadata&2)>>>1===1}function c(f,h){f.metadata=f.metadata&253|(h?1:0)<<1}function p(f){return(f.metadata&4)>>>2===1}function S(f,h){f.metadata=f.metadata&251|(h?1:0)<<2}function E(f){return(f.metadata&24)>>>3}function y(f,h){f.metadata=f.metadata&231|h<<3}function O(f){return(f.metadata&32)>>>5===1}function k(f,h){f.metadata=f.metadata&223|(h?1:0)<<5}class Q{constructor(f,h,_){this.metadata=0,this.parent=this,this.left=this,this.right=this,b(this,1),this.start=h,this.end=_,this.delta=0,this.maxEnd=_,this.id=f,this.ownerId=0,this.options=null,S(this,!1),y(this,1),k(this,!1),this.cachedVersionId=0,this.cachedAbsoluteStart=h,this.cachedAbsoluteEnd=_,this.range=null,c(this,!1)}reset(f,h,_,K){this.start=h,this.end=_,this.maxEnd=_,this.cachedVersionId=f,this.cachedAbsoluteStart=h,this.cachedAbsoluteEnd=_,this.range=K}setOptions(f){this.options=f;let h=this.options.className;S(this,h==="squiggly-error"||h==="squiggly-warning"||h==="squiggly-info"),y(this,this.options.stickiness),k(this,this.options.collapseOnReplaceEdit)}setCachedOffsets(f,h,_){this.cachedVersionId!==_&&(this.range=null),this.cachedVersionId=_,this.cachedAbsoluteStart=f,this.cachedAbsoluteEnd=h}detach(){this.parent=null,this.left=null,this.right=null}}const q=new Q(null,0,0);q.parent=q,q.left=q,q.right=q,b(q,0);class z{constructor(){this.root=q,this.requestNormalizeDelta=!1}intervalSearch(f,h,_,K,de){return this.root===q?[]:ae(this,f,h,_,K,de)}search(f,h,_){return this.root===q?[]:oe(this,f,h,_)}collectNodesFromOwner(f){return _e(this,f)}collectNodesPostOrder(){return Ce(this)}insert(f){V(this,f),this._normalizeDeltaIfNecessary()}delete(f){ee(this,f),this._normalizeDeltaIfNecessary()}resolveNode(f,h){const _=f;let K=0;for(;f!==this.root;)f===f.parent.right&&(K+=f.parent.delta),f=f.parent;const de=_.start+K,ye=_.end+K;_.setCachedOffsets(de,ye,h)}acceptReplace(f,h,_,K){const de=ne(this,f,f+h);for(let ye=0,De=de.length;ye<De;ye++){const qe=de[ye];ee(this,qe)}this._normalizeDeltaIfNecessary(),le(this,f,f+h,_),this._normalizeDeltaIfNecessary();for(let ye=0,De=de.length;ye<De;ye++){const qe=de[ye];qe.start=qe.cachedAbsoluteStart,qe.end=qe.cachedAbsoluteEnd,Z(qe,f,f+h,_,K),qe.maxEnd=qe.end,V(this,qe)}this._normalizeDeltaIfNecessary()}_normalizeDeltaIfNecessary(){if(!this.requestNormalizeDelta)return;this.requestNormalizeDelta=!1,J(this)}}function J(f){let h=f.root,_=0;for(;h!==q;){if(h.left!==q&&!u(h.left)){h=h.left;continue}if(h.right!==q&&!u(h.right)){_+=h.delta,h=h.right;continue}h.start=_+h.start,h.end=_+h.end,h.delta=0,Xe(h),c(h,!0),c(h.left,!1),c(h.right,!1),h===h.parent.right&&(_-=h.parent.delta),h=h.parent}c(f.root,!1)}function re(f,h,_,K){return f<_?!0:f>_||K===1?!1:K===2?!0:h}function Z(f,h,_,K,de){const ye=E(f),De=ye===0||ye===2,qe=ye===1||ye===2,ht=_-h,yt=K,Ct=Math.min(ht,yt),At=f.start;let Ft=!1;const Zt=f.end;let Yt=!1;h<=At&&Zt<=_&&O(f)&&(f.start=h,Ft=!0,f.end=h,Yt=!0);{const Co=de?1:ht>0?2:0;!Ft&&re(At,De,h,Co)&&(Ft=!0),!Yt&&re(Zt,qe,h,Co)&&(Yt=!0)}if(Ct>0&&!de){const Co=ht>yt?2:0;!Ft&&re(At,De,h+Ct,Co)&&(Ft=!0),!Yt&&re(Zt,qe,h+Ct,Co)&&(Yt=!0)}{const Co=de?1:0;!Ft&&re(At,De,_,Co)&&(f.start=h+yt,Ft=!0),!Yt&&re(Zt,qe,_,Co)&&(f.end=h+yt,Yt=!0)}const ao=yt-ht;Ft||(f.start=Math.max(0,At+ao)),Yt||(f.end=Math.max(0,Zt+ao)),f.start>f.end&&(f.end=f.start)}function ne(f,h,_){let K=f.root,de=0,ye=0,De=0,qe=0,ht=[],yt=0;for(;K!==q;){if(u(K)){c(K.left,!1),c(K.right,!1),K===K.parent.right&&(de-=K.parent.delta),K=K.parent;continue}if(!u(K.left)){if(ye=de+K.maxEnd,ye<h){c(K,!0);continue}if(K.left!==q){K=K.left;continue}}if(De=de+K.start,De>_){c(K,!0);continue}if(qe=de+K.end,qe>=h&&(K.setCachedOffsets(De,qe,0),ht[yt++]=K),c(K,!0),K.right!==q&&!u(K.right)){de+=K.delta,K=K.right;continue}}return c(f.root,!1),ht}function le(f,h,_,K){let de=f.root,ye=0,De=0,qe=0;const ht=K-(_-h);for(;de!==q;){if(u(de)){c(de.left,!1),c(de.right,!1),de===de.parent.right&&(ye-=de.parent.delta),Xe(de),de=de.parent;continue}if(!u(de.left)){if(De=ye+de.maxEnd,De<h){c(de,!0);continue}if(de.left!==q){de=de.left;continue}}if(qe=ye+de.start,qe>_){de.start+=ht,de.end+=ht,de.delta+=ht,(de.delta<-1073741824||de.delta>1073741824)&&(f.requestNormalizeDelta=!0),c(de,!0);continue}if(c(de,!0),de.right!==q&&!u(de.right)){ye+=de.delta,de=de.right;continue}}c(f.root,!1)}function _e(f,h){let _=f.root,K=[],de=0;for(;_!==q;){if(u(_)){c(_.left,!1),c(_.right,!1),_=_.parent;continue}if(_.left!==q&&!u(_.left)){_=_.left;continue}if(_.ownerId===h&&(K[de++]=_),c(_,!0),_.right!==q&&!u(_.right)){_=_.right;continue}}return c(f.root,!1),K}function Ce(f){let h=f.root,_=[],K=0;for(;h!==q;){if(u(h)){c(h.left,!1),c(h.right,!1),h=h.parent;continue}if(h.left!==q&&!u(h.left)){h=h.left;continue}if(h.right!==q&&!u(h.right)){h=h.right;continue}_[K++]=h,c(h,!0)}return c(f.root,!1),_}function oe(f,h,_,K){let de=f.root,ye=0,De=0,qe=0,ht=[],yt=0;for(;de!==q;){if(u(de)){c(de.left,!1),c(de.right,!1),de===de.parent.right&&(ye-=de.parent.delta),de=de.parent;continue}if(de.left!==q&&!u(de.left)){de=de.left;continue}De=ye+de.start,qe=ye+de.end,de.setCachedOffsets(De,qe,K);let Ct=!0;if(h&&de.ownerId&&de.ownerId!==h&&(Ct=!1),_&&p(de)&&(Ct=!1),Ct&&(ht[yt++]=de),c(de,!0),de.right!==q&&!u(de.right)){ye+=de.delta,de=de.right;continue}}return c(f.root,!1),ht}function ae(f,h,_,K,de,ye){let De=f.root,qe=0,ht=0,yt=0,Ct=0,At=[],Ft=0;for(;De!==q;){if(u(De)){c(De.left,!1),c(De.right,!1),De===De.parent.right&&(qe-=De.parent.delta),De=De.parent;continue}if(!u(De.left)){if(ht=qe+De.maxEnd,ht<h){c(De,!0);continue}if(De.left!==q){De=De.left;continue}}if(yt=qe+De.start,yt>_){c(De,!0);continue}if(Ct=qe+De.end,Ct>=h){De.setCachedOffsets(yt,Ct,ye);let Zt=!0;K&&De.ownerId&&De.ownerId!==K&&(Zt=!1),de&&p(De)&&(Zt=!1),Zt&&(At[Ft++]=De)}if(c(De,!0),De.right!==q&&!u(De.right)){qe+=De.delta,De=De.right;continue}}return c(f.root,!1),At}function V(f,h){if(f.root===q)return h.parent=q,h.left=q,h.right=q,b(h,0),f.root=h,f.root;G(f,h),fe(h.parent);let _=h;for(;_!==f.root&&w(_.parent)===1;)if(_.parent===_.parent.parent.left){const K=_.parent.parent.right;w(K)===1?(b(_.parent,0),b(K,0),b(_.parent.parent,1),_=_.parent.parent):(_===_.parent.right&&(_=_.parent,Ie(f,_)),b(_.parent,0),b(_.parent.parent,1),Me(f,_.parent.parent))}else{const K=_.parent.parent.left;w(K)===1?(b(_.parent,0),b(K,0),b(_.parent.parent,1),_=_.parent.parent):(_===_.parent.left&&(_=_.parent,Me(f,_)),b(_.parent,0),b(_.parent.parent,1),Ie(f,_.parent.parent))}return b(f.root,0),h}function G(f,h){let _=0,K=f.root;const de=h.start,ye=h.end;for(;;){const De=Pe(de,ye,K.start+_,K.end+_);if(De<0)if(K.left===q){h.start-=_,h.end-=_,h.maxEnd-=_,K.left=h;break}else K=K.left;else if(K.right===q){h.start-=_+K.delta,h.end-=_+K.delta,h.maxEnd-=_+K.delta,K.right=h;break}else _+=K.delta,K=K.right}h.parent=K,h.left=q,h.right=q,b(h,1)}function ee(f,h){let _,K;if(h.left===q?(_=h.right,K=h,_.delta+=h.delta,(_.delta<-1073741824||_.delta>1073741824)&&(f.requestNormalizeDelta=!0),_.start+=h.delta,_.end+=h.delta):h.right===q?(_=h.left,K=h):(K=pe(h.right),_=K.right,_.start+=K.delta,_.end+=K.delta,_.delta+=K.delta,(_.delta<-1073741824||_.delta>1073741824)&&(f.requestNormalizeDelta=!0),K.start+=h.delta,K.end+=h.delta,K.delta=h.delta,(K.delta<-1073741824||K.delta>1073741824)&&(f.requestNormalizeDelta=!0)),K===f.root){f.root=_,b(_,0),h.detach(),Te(),Xe(_),f.root.parent=q;return}let de=w(K)===1;if(K===K.parent.left?K.parent.left=_:K.parent.right=_,K===h?_.parent=K.parent:(K.parent===h?_.parent=K:_.parent=K.parent,K.left=h.left,K.right=h.right,K.parent=h.parent,b(K,w(h)),h===f.root?f.root=K:h===h.parent.left?h.parent.left=K:h.parent.right=K,K.left!==q&&(K.left.parent=K),K.right!==q&&(K.right.parent=K)),h.detach(),de){fe(_.parent),K!==h&&(fe(K),fe(K.parent)),Te();return}fe(_),fe(_.parent),K!==h&&(fe(K),fe(K.parent));let ye;for(;_!==f.root&&w(_)===0;)_===_.parent.left?(ye=_.parent.right,w(ye)===1&&(b(ye,0),b(_.parent,1),Ie(f,_.parent),ye=_.parent.right),w(ye.left)===0&&w(ye.right)===0?(b(ye,1),_=_.parent):(w(ye.right)===0&&(b(ye.left,0),b(ye,1),Me(f,ye),ye=_.parent.right),b(ye,w(_.parent)),b(_.parent,0),b(ye.right,0),Ie(f,_.parent),_=f.root)):(ye=_.parent.left,w(ye)===1&&(b(ye,0),b(_.parent,1),Me(f,_.parent),ye=_.parent.left),w(ye.left)===0&&w(ye.right)===0?(b(ye,1),_=_.parent):(w(ye.left)===0&&(b(ye.right,0),b(ye,1),Ie(f,ye),ye=_.parent.left),b(ye,w(_.parent)),b(_.parent,0),b(ye.left,0),Me(f,_.parent),_=f.root));b(_,0),Te()}function pe(f){for(;f.left!==q;)f=f.left;return f}function Te(){q.parent=q,q.delta=0,q.start=0,q.end=0}function Ie(f,h){const _=h.right;_.delta+=h.delta,(_.delta<-1073741824||_.delta>1073741824)&&(f.requestNormalizeDelta=!0),_.start+=h.delta,_.end+=h.delta,h.right=_.left,_.left!==q&&(_.left.parent=h),_.parent=h.parent,h.parent===q?f.root=_:h===h.parent.left?h.parent.left=_:h.parent.right=_,_.left=h,h.parent=_,Xe(h),Xe(_)}function Me(f,h){const _=h.left;h.delta-=_.delta,(h.delta<-1073741824||h.delta>1073741824)&&(f.requestNormalizeDelta=!0),h.start-=_.delta,h.end-=_.delta,h.left=_.right,_.right!==q&&(_.right.parent=h),_.parent=h.parent,h.parent===q?f.root=_:h===h.parent.right?h.parent.right=_:h.parent.left=_,_.right=h,h.parent=_,Xe(h),Xe(_)}function Oe(f){let h=f.end;if(f.left!==q){const _=f.left.maxEnd;_>h&&(h=_)}if(f.right!==q){const _=f.right.maxEnd+f.delta;_>h&&(h=_)}return h}function Xe(f){f.maxEnd=Oe(f)}function fe(f){for(;f!==q;){const h=Oe(f);if(f.maxEnd===h)return;f.maxEnd=h,f=f.parent}}function Pe(f,h,_,K){return f===_?h-K:f-_}class Be{constructor(f,h){this.piece=f,this.color=h,this.size_left=0,this.lf_left=0,this.parent=this,this.left=this,this.right=this}next(){if(this.right!==Se)return me(this.right);let f=this;for(;f.parent!==Se&&!(f.parent.left===f);)f=f.parent;return f.parent===Se?Se:f.parent}prev(){if(this.left!==Se)return he(this.left);let f=this;for(;f.parent!==Se&&!(f.parent.right===f);)f=f.parent;return f.parent===Se?Se:f.parent}detach(){this.parent=null,this.left=null,this.right=null}}const Se=new Be(null,0);Se.parent=Se,Se.left=Se,Se.right=Se,Se.color=0;function me(f){for(;f.left!==Se;)f=f.left;return f}function he(f){for(;f.right!==Se;)f=f.right;return f}function Le(f){return f===Se?0:f.size_left+f.piece.length+Le(f.right)}function we(f){return f===Se?0:f.lf_left+f.piece.lineFeedCnt+we(f.right)}function ve(){Se.parent=Se}function ie(f,h){let _=h.right;_.size_left+=h.size_left+(h.piece?h.piece.length:0),_.lf_left+=h.lf_left+(h.piece?h.piece.lineFeedCnt:0),h.right=_.left,_.left!==Se&&(_.left.parent=h),_.parent=h.parent,h.parent===Se?f.root=_:h.parent.left===h?h.parent.left=_:h.parent.right=_,_.left=h,h.parent=_}function W(f,h){let _=h.left;h.left=_.right,_.right!==Se&&(_.right.parent=h),_.parent=h.parent,h.size_left-=_.size_left+(_.piece?_.piece.length:0),h.lf_left-=_.lf_left+(_.piece?_.piece.lineFeedCnt:0),h.parent===Se?f.root=_:h===h.parent.right?h.parent.right=_:h.parent.left=_,_.right=h,h.parent=_}function U(f,h){let _,K;if(h.left===Se?(K=h,_=K.right):h.right===Se?(K=h,_=K.left):(K=me(h.right),_=K.right),K===f.root){f.root=_,_.color=0,h.detach(),ve(),f.root.parent=Se;return}let de=K.color===1;if(K===K.parent.left?K.parent.left=_:K.parent.right=_,K===h?(_.parent=K.parent,Re(f,_)):(K.parent===h?_.parent=K:_.parent=K.parent,Re(f,_),K.left=h.left,K.right=h.right,K.parent=h.parent,K.color=h.color,h===f.root?f.root=K:h===h.parent.left?h.parent.left=K:h.parent.right=K,K.left!==Se&&(K.left.parent=K),K.right!==Se&&(K.right.parent=K),K.size_left=h.size_left,K.lf_left=h.lf_left,Re(f,K)),h.detach(),_.parent.left===_){let De=Le(_),qe=we(_);if(De!==_.parent.size_left||qe!==_.parent.lf_left){let ht=De-_.parent.size_left,yt=qe-_.parent.lf_left;_.parent.size_left=De,_.parent.lf_left=qe,je(f,_.parent,ht,yt)}}if(Re(f,_.parent),de){ve();return}let ye;for(;_!==f.root&&_.color===0;)_===_.parent.left?(ye=_.parent.right,ye.color===1&&(ye.color=0,_.parent.color=1,ie(f,_.parent),ye=_.parent.right),ye.left.color===0&&ye.right.color===0?(ye.color=1,_=_.parent):(ye.right.color===0&&(ye.left.color=0,ye.color=1,W(f,ye),ye=_.parent.right),ye.color=_.parent.color,_.parent.color=0,ye.right.color=0,ie(f,_.parent),_=f.root)):(ye=_.parent.left,ye.color===1&&(ye.color=0,_.parent.color=1,W(f,_.parent),ye=_.parent.left),ye.left.color===0&&ye.right.color===0?(ye.color=1,_=_.parent):(ye.left.color===0&&(ye.right.color=0,ye.color=1,ie(f,ye),ye=_.parent.left),ye.color=_.parent.color,_.parent.color=0,ye.left.color=0,W(f,_.parent),_=f.root));_.color=0,ve()}function se(f,h){for(Re(f,h);h!==f.root&&h.parent.color===1;)if(h.parent===h.parent.parent.left){const _=h.parent.parent.right;_.color===1?(h.parent.color=0,_.color=0,h.parent.parent.color=1,h=h.parent.parent):(h===h.parent.right&&(h=h.parent,ie(f,h)),h.parent.color=0,h.parent.parent.color=1,W(f,h.parent.parent))}else{const _=h.parent.parent.left;_.color===1?(h.parent.color=0,_.color=0,h.parent.parent.color=1,h=h.parent.parent):(h===h.parent.left&&(h=h.parent,W(f,h)),h.parent.color=0,h.parent.parent.color=1,ie(f,h.parent.parent))}f.root.color=0}function je(f,h,_,K){for(;h!==f.root&&h!==Se;)h.parent.left===h&&(h.parent.size_left+=_,h.parent.lf_left+=K),h=h.parent}function Re(f,h){let _=0,K=0;if(h===f.root)return;for(;h!==f.root&&h===h.parent.right;)h=h.parent;if(h===f.root)return;for(h=h.parent,_=Le(h.left)-h.size_left,K=we(h.left)-h.lf_left,h.size_left+=_,h.lf_left+=K;h!==f.root&&(_!==0||K!==0);)h.parent.left===h&&(h.parent.size_left+=_,h.parent.lf_left+=K),h=h.parent}var We=t("jAJ/");const dt=65535;function Lt(f){let h;return f[f.length-1]<65536?h=new Uint16Array(f.length):h=new Uint32Array(f.length),h.set(f,0),h}class Ht{constructor(f,h,_,K,de){this.lineStarts=f,this.cr=h,this.lf=_,this.crlf=K,this.isBasicASCII=de}}function $e(f,h=!0){let _=[0],K=1;for(let de=0,ye=f.length;de<ye;de++){const De=f.charCodeAt(de);De===13?de+1<ye&&f.charCodeAt(de+1)===10?(_[K++]=de+2,de++):_[K++]=de+1:De===10&&(_[K++]=de+1)}return h?Lt(_):_}function ot(f,h){f.length=0,f[0]=0;let _=1,K=0,de=0,ye=0,De=!0;for(let ht=0,yt=h.length;ht<yt;ht++){const Ct=h.charCodeAt(ht);Ct===13?ht+1<yt&&h.charCodeAt(ht+1)===10?(ye++,f[_++]=ht+2,ht++):(K++,f[_++]=ht+1):Ct===10?(de++,f[_++]=ht+1):De&&(Ct!==9&&(Ct<32||Ct>126)&&(De=!1))}const qe=new Ht(Lt(f),K,de,ye,De);return f.length=0,qe}class ce{constructor(f,h,_,K,de){this.bufferIndex=f,this.start=h,this.end=_,this.lineFeedCnt=K,this.length=de}}class Ve{constructor(f,h){this.buffer=f,this.lineStarts=h}}class it{constructor(f,h){this._pieces=[],this._tree=f,this._BOM=h,this._index=0,f.root!==Se&&f.iterate(f.root,_=>(_!==Se&&this._pieces.push(_.piece),!0))}read(){return this._pieces.length===0?this._index===0?(this._index++,this._BOM):null:this._index>this._pieces.length-1?null:this._index===0?this._BOM+this._tree.getPieceContent(this._pieces[this._index++]):this._tree.getPieceContent(this._pieces[this._index++])}}class Et{constructor(f){this._limit=f,this._cache=[]}get(f){for(let h=this._cache.length-1;h>=0;h--){let _=this._cache[h];if(_.nodeStartOffset<=f&&_.nodeStartOffset+_.node.piece.length>=f)return _}return null}get2(f){for(let h=this._cache.length-1;h>=0;h--){let _=this._cache[h];if(_.nodeStartLineNumber&&_.nodeStartLineNumber<f&&_.nodeStartLineNumber+_.node.piece.lineFeedCnt>=f)return _}return null}set(f){this._cache.length>=this._limit&&this._cache.shift(),this._cache.push(f)}validate(f){let h=!1,_=this._cache;for(let K=0;K<_.length;K++){let de=_[K];if(de.node.parent===null||de.nodeStartOffset>=f){_[K]=null,h=!0;continue}}if(h){let K=[];for(const de of _)de!==null&&K.push(de);this._cache=K}}}class It{constructor(f,h,_){this.create(f,h,_)}create(f,h,_){this._buffers=[new Ve("",[0])],this._lastChangeBufferPos={line:0,column:0},this.root=Se,this._lineCnt=1,this._length=0,this._EOL=h,this._EOLLength=h.length,this._EOLNormalized=_;let K=null;for(let de=0,ye=f.length;de<ye;de++)if(f[de].buffer.length>0){f[de].lineStarts||(f[de].lineStarts=$e(f[de].buffer));let De=new ce(de+1,{line:0,column:0},{line:f[de].lineStarts.length-1,column:f[de].buffer.length-f[de].lineStarts[f[de].lineStarts.length-1]},f[de].lineStarts.length-1,f[de].buffer.length);this._buffers.push(f[de]),K=this.rbInsertRight(K,De)}this._searchCache=new Et(1),this._lastVisitedLine={lineNumber:0,value:""},this.computeBufferMetadata()}normalizeEOL(f){let h=dt,_=h-Math.floor(h/3),K=_*2,de="",ye=0,De=[];if(this.iterate(this.root,qe=>{let ht=this.getNodeContent(qe),yt=ht.length;if(ye<=_||ye+yt<K)return de+=ht,ye+=yt,!0;let Ct=de.replace(/\r\n|\r|\n/g,f);return De.push(new Ve(Ct,$e(Ct))),de=ht,ye=yt,!0}),ye>0){let qe=de.replace(/\r\n|\r|\n/g,f);De.push(new Ve(qe,$e(qe)))}this.create(De,f,!0)}getEOL(){return this._EOL}setEOL(f){this._EOL=f,this._EOLLength=this._EOL.length,this.normalizeEOL(f)}createSnapshot(f){return new it(this,f)}getOffsetAt(f,h){let _=0,K=this.root;for(;K!==Se;)if(K.left!==Se&&K.lf_left+1>=f)K=K.left;else if(K.lf_left+K.piece.lineFeedCnt+1>=f){_+=K.size_left;let de=this.getAccumulatedValue(K,f-K.lf_left-2);return _+=de+h-1}else f-=K.lf_left+K.piece.lineFeedCnt,_+=K.size_left+K.piece.length,K=K.right;return _}getPositionAt(f){f=Math.floor(f),f=Math.max(0,f);let h=this.root,_=0,K=f;for(;h!==Se;)if(h.size_left!==0&&h.size_left>=f)h=h.left;else if(h.size_left+h.piece.length>=f){let de=this.getIndexOf(h,f-h.size_left);if(_+=h.lf_left+de.index,de.index===0){let ye=this.getOffsetAt(_+1,1),De=K-ye;return new I.a(_+1,De+1)}return new I.a(_+1,de.remainder+1)}else if(f-=h.size_left+h.piece.length,_+=h.lf_left+h.piece.lineFeedCnt,h.right===Se){let de=this.getOffsetAt(_+1,1),ye=K-f-de;return new I.a(_+1,ye+1)}else h=h.right;return new I.a(1,1)}getValueInRange(f,h){if(f.startLineNumber===f.endLineNumber&&f.startColumn===f.endColumn)return"";let _=this.nodeAt2(f.startLineNumber,f.startColumn),K=this.nodeAt2(f.endLineNumber,f.endColumn),de=this.getValueInRange2(_,K);return h?h!==this._EOL||!this._EOLNormalized?de.replace(/\r\n|\r|\n/g,h):h===this.getEOL()&&this._EOLNormalized?(h===`\r
|
|
|
`,de):de.replace(/\r\n|\r|\n/g,h):de}getValueInRange2(f,h){if(f.node===h.node){let De=f.node,qe=this._buffers[De.piece.bufferIndex].buffer,ht=this.offsetInBuffer(De.piece.bufferIndex,De.piece.start);return qe.substring(ht+f.remainder,ht+h.remainder)}let _=f.node,K=this._buffers[_.piece.bufferIndex].buffer,de=this.offsetInBuffer(_.piece.bufferIndex,_.piece.start),ye=K.substring(de+f.remainder,de+_.piece.length);for(_=_.next();_!==Se;){let De=this._buffers[_.piece.bufferIndex].buffer,qe=this.offsetInBuffer(_.piece.bufferIndex,_.piece.start);if(_===h.node){ye+=De.substring(qe,qe+h.remainder);break}else ye+=De.substr(qe,_.piece.length);_=_.next()}return ye}getLinesContent(){let f=[],h=0,_="",K=!1;return this.iterate(this.root,de=>{if(de===Se)return!0;const ye=de.piece;let De=ye.length;if(De===0)return!0;const qe=this._buffers[ye.bufferIndex].buffer,ht=this._buffers[ye.bufferIndex].lineStarts,yt=ye.start.line,Ct=ye.end.line;let At=ht[yt]+ye.start.column;if(K&&(qe.charCodeAt(At)===10&&(At++,De--),f[h++]=_,_="",K=!1,De===0))return!0;if(yt===Ct)return!this._EOLNormalized&&qe.charCodeAt(At+De-1)===13?(K=!0,_+=qe.substr(At,De-1)):_+=qe.substr(At,De),!0;_+=this._EOLNormalized?qe.substring(At,Math.max(At,ht[yt+1]-this._EOLLength)):qe.substring(At,ht[yt+1]).replace(/(\r\n|\r|\n)$/,""),f[h++]=_;for(let Ft=yt+1;Ft<Ct;Ft++)_=this._EOLNormalized?qe.substring(ht[Ft],ht[Ft+1]-this._EOLLength):qe.substring(ht[Ft],ht[Ft+1]).replace(/(\r\n|\r|\n)$/,""),f[h++]=_;return!this._EOLNormalized&&qe.charCodeAt(ht[Ct]+ye.end.column-1)===13?(K=!0,ye.end.column===0?h--:_=qe.substr(ht[Ct],ye.end.column-1)):_=qe.substr(ht[Ct],ye.end.column),!0}),K&&(f[h++]=_,_=""),f[h++]=_,f}getLength(){return this._length}getLineCount(){return this._lineCnt}getLineContent(f){return this._lastVisitedLine.lineNumber===f?this._lastVisitedLine.value:(this._lastVisitedLine.lineNumber=f,f===this._lineCnt?this._lastVisitedLine.value=this.getLineRawContent(f):this._EOLNormalized?this._lastVisitedLine.value=this.getLineRawContent(f,this._EOLLength):this._lastVisitedLine.value=this.getLineRawContent(f).replace(/(\r\n|\r|\n)$/,""),this._lastVisitedLine.value)}_getCharCode(f){if(f.remainder===f.node.piece.length){let h=f.node.next();if(!h)return 0;let _=this._buffers[h.piece.bufferIndex],K=this.offsetInBuffer(h.piece.bufferIndex,h.piece.start);return _.buffer.charCodeAt(K)}else{let h=this._buffers[f.node.piece.bufferIndex],_=this.offsetInBuffer(f.node.piece.bufferIndex,f.node.piece.start),K=_+f.remainder;return h.buffer.charCodeAt(K)}}getLineCharCode(f,h){let _=this.nodeAt2(f,h+1);return this._getCharCode(_)}getLineLength(f){if(f===this.getLineCount()){let h=this.getOffsetAt(f,1);return this.getLength()-h}return this.getOffsetAt(f+1,1)-this.getOffsetAt(f,1)-this._EOLLength}findMatchesInNode(f,h,_,K,de,ye,De,qe,ht,yt,Ct){let At=this._buffers[f.piece.bufferIndex],Ft=this.offsetInBuffer(f.piece.bufferIndex,f.piece.start),Zt=this.offsetInBuffer(f.piece.bufferIndex,de),Yt=this.offsetInBuffer(f.piece.bufferIndex,ye),ao,Co={line:0,column:0},ko,Qo;h._wordSeparators?(ko=At.buffer.substring(Zt,Yt),Qo=yi=>yi+Zt,h.reset(0)):(ko=At.buffer,Qo=yi=>yi,h.reset(Zt));do if(ao=h.next(ko),ao){if(Qo(ao.index)>=Yt)return yt;this.positionInBuffer(f,Qo(ao.index)-Ft,Co);let yi=this.getLineFeedCnt(f.piece.bufferIndex,de,Co),Ko=Co.line===de.line?Co.column-de.column+K:Co.column+1,li=Ko+ao[0].length;if(Ct[yt++]=Object(We.d)(new v.a(_+yi,Ko,_+yi,li),ao,qe),Qo(ao.index)+ao[0].length>=Yt)return yt;if(yt>=ht)return yt}while(ao);return yt}findMatchesLineByLine(f,h,_,K){const de=[];let ye=0;const De=new We.b(h.wordSeparators,h.regex);let qe=this.nodeAt2(f.startLineNumber,f.startColumn);if(qe===null)return[];let ht=this.nodeAt2(f.endLineNumber,f.endColumn);if(ht===null)return[];let yt=this.positionInBuffer(qe.node,qe.remainder),Ct=this.positionInBuffer(ht.node,ht.remainder);if(qe.node===ht.node)return this.findMatchesInNode(qe.node,De,f.startLineNumber,f.startColumn,yt,Ct,h,_,K,ye,de),de;let At=f.startLineNumber,Ft=qe.node;for(;Ft!==ht.node;){let Yt=this.getLineFeedCnt(Ft.piece.bufferIndex,yt,Ft.piece.end);if(Yt>=1){let Co=this._buffers[Ft.piece.bufferIndex].lineStarts,ko=this.offsetInBuffer(Ft.piece.bufferIndex,Ft.piece.start),Qo=Co[yt.line+Yt],yi=At===f.startLineNumber?f.startColumn:1;if(ye=this.findMatchesInNode(Ft,De,At,yi,yt,this.positionInBuffer(Ft,Qo-ko),h,_,K,ye,de),ye>=K)return de;At+=Yt}let ao=At===f.startLineNumber?f.startColumn-1:0;if(At===f.endLineNumber){const Co=this.getLineContent(At).substring(ao,f.endColumn-1);return ye=this._findMatchesInLine(h,De,Co,f.endLineNumber,ao,ye,de,_,K),de}if(ye=this._findMatchesInLine(h,De,this.getLineContent(At).substr(ao),At,ao,ye,de,_,K),ye>=K)return de;At++,qe=this.nodeAt2(At,1),Ft=qe.node,yt=this.positionInBuffer(qe.node,qe.remainder)}if(At===f.endLineNumber){let Yt=At===f.startLineNumber?f.startColumn-1:0;const ao=this.getLineContent(At).substring(Yt,f.endColumn-1);return ye=this._findMatchesInLine(h,De,ao,f.endLineNumber,Yt,ye,de,_,K),de}let Zt=At===f.startLineNumber?f.startColumn:1;return ye=this.findMatchesInNode(ht.node,De,At,Zt,yt,Ct,h,_,K,ye,de),de}_findMatchesInLine(f,h,_,K,de,ye,De,qe,ht){const yt=f.wordSeparators;if(!qe&&f.simpleSearch){const At=f.simpleSearch,Ft=At.length,Zt=_.length;let Yt=-Ft;for(;(Yt=_.indexOf(At,Yt+Ft))!==-1;)if((!yt||Object(We.e)(yt,_,Zt,Yt,Ft))&&(De[ye++]=new m.b(new v.a(K,Yt+1+de,K,Yt+1+Ft+de),null),ye>=ht))return ye;return ye}let Ct;h.reset(0);do if(Ct=h.next(_),Ct&&(De[ye++]=Object(We.d)(new v.a(K,Ct.index+1+de,K,Ct.index+1+Ct[0].length+de),Ct,qe),ye>=ht))return ye;while(Ct);return ye}insert(f,h,_=!1){if(this._EOLNormalized=this._EOLNormalized&&_,this._lastVisitedLine.lineNumber=0,this._lastVisitedLine.value="",this.root!==Se){let{node:K,remainder:de,nodeStartOffset:ye}=this.nodeAt(f),De=K.piece,qe=De.bufferIndex,ht=this.positionInBuffer(K,de);if(K.piece.bufferIndex===0&&De.end.line===this._lastChangeBufferPos.line&&De.end.column===this._lastChangeBufferPos.column&&ye+De.length===f&&h.length<dt){this.appendToNode(K,h),this.computeBufferMetadata();return}if(ye===f)this.insertContentToNodeLeft(h,K),this._searchCache.validate(f);else if(ye+K.piece.length>f){let yt=[],Ct=new ce(De.bufferIndex,ht,De.end,this.getLineFeedCnt(De.bufferIndex,ht,De.end),this.offsetInBuffer(qe,De.end)-this.offsetInBuffer(qe,ht));if(this.shouldCheckCRLF()&&this.endWithCR(h)){let Zt=this.nodeCharCodeAt(K,de);if(Zt===10){let Yt={line:Ct.start.line+1,column:0};Ct=new ce(Ct.bufferIndex,Yt,Ct.end,this.getLineFeedCnt(Ct.bufferIndex,Yt,Ct.end),Ct.length-1),h+=`
|
|
|
`}}if(this.shouldCheckCRLF()&&this.startWithLF(h)){let Zt=this.nodeCharCodeAt(K,de-1);if(Zt===13){let Yt=this.positionInBuffer(K,de-1);this.deleteNodeTail(K,Yt),h="\r"+h,K.piece.length===0&&yt.push(K)}else this.deleteNodeTail(K,ht)}else this.deleteNodeTail(K,ht);let At=this.createNewPieces(h);Ct.length>0&&this.rbInsertRight(K,Ct);let Ft=K;for(let Zt=0;Zt<At.length;Zt++)Ft=this.rbInsertRight(Ft,At[Zt]);this.deleteNodes(yt)}else this.insertContentToNodeRight(h,K)}else{let K=this.createNewPieces(h),de=this.rbInsertLeft(null,K[0]);for(let ye=1;ye<K.length;ye++)de=this.rbInsertRight(de,K[ye])}this.computeBufferMetadata()}delete(f,h){if(this._lastVisitedLine.lineNumber=0,this._lastVisitedLine.value="",h<=0||this.root===Se)return;let _=this.nodeAt(f),K=this.nodeAt(f+h),de=_.node,ye=K.node;if(de===ye){let At=this.positionInBuffer(de,_.remainder),Ft=this.positionInBuffer(de,K.remainder);if(_.nodeStartOffset===f){if(h===de.piece.length){let Zt=de.next();U(this,de),this.validateCRLFWithPrevNode(Zt),this.computeBufferMetadata();return}this.deleteNodeHead(de,Ft),this._searchCache.validate(f),this.validateCRLFWithPrevNode(de),this.computeBufferMetadata();return}if(_.nodeStartOffset+de.piece.length===f+h){this.deleteNodeTail(de,At),this.validateCRLFWithNextNode(de),this.computeBufferMetadata();return}this.shrinkNode(de,At,Ft),this.computeBufferMetadata();return}let De=[],qe=this.positionInBuffer(de,_.remainder);this.deleteNodeTail(de,qe),this._searchCache.validate(f),de.piece.length===0&&De.push(de);let ht=this.positionInBuffer(ye,K.remainder);this.deleteNodeHead(ye,ht),ye.piece.length===0&&De.push(ye);let yt=de.next();for(let At=yt;At!==Se&&At!==ye;At=At.next())De.push(At);let Ct=de.piece.length===0?de.prev():de;this.deleteNodes(De),this.validateCRLFWithNextNode(Ct),this.computeBufferMetadata()}insertContentToNodeLeft(f,h){let _=[];if(this.shouldCheckCRLF()&&this.endWithCR(f)&&this.startWithLF(h)){let ye=h.piece,De={line:ye.start.line+1,column:0},qe=new ce(ye.bufferIndex,De,ye.end,this.getLineFeedCnt(ye.bufferIndex,De,ye.end),ye.length-1);h.piece=qe,f+=`
|
|
|
`,je(this,h,-1,-1),h.piece.length===0&&_.push(h)}let K=this.createNewPieces(f),de=this.rbInsertLeft(h,K[K.length-1]);for(let ye=K.length-2;ye>=0;ye--)de=this.rbInsertLeft(de,K[ye]);this.validateCRLFWithPrevNode(de),this.deleteNodes(_)}insertContentToNodeRight(f,h){this.adjustCarriageReturnFromNext(f,h)&&(f+=`
|
|
|
`);let _=this.createNewPieces(f),K=this.rbInsertRight(h,_[0]),de=K;for(let ye=1;ye<_.length;ye++)de=this.rbInsertRight(de,_[ye]);this.validateCRLFWithPrevNode(K)}positionInBuffer(f,h,_){let K=f.piece,de=f.piece.bufferIndex,ye=this._buffers[de].lineStarts,De=ye[K.start.line]+K.start.column,qe=De+h,ht=K.start.line,yt=K.end.line,Ct=0,At=0,Ft=0;for(;ht<=yt&&!(Ct=ht+(yt-ht)/2|0,Ft=ye[Ct],Ct===yt);)if(At=ye[Ct+1],qe<Ft)yt=Ct-1;else if(qe>=At)ht=Ct+1;else break;return _?(_.line=Ct,_.column=qe-Ft,null):{line:Ct,column:qe-Ft}}getLineFeedCnt(f,h,_){if(_.column===0)return _.line-h.line;let K=this._buffers[f].lineStarts;if(_.line===K.length-1)return _.line-h.line;let de=K[_.line+1],ye=K[_.line]+_.column;if(de>ye+1)return _.line-h.line;let De=ye-1,qe=this._buffers[f].buffer;return qe.charCodeAt(De)===13?_.line-h.line+1:_.line-h.line}offsetInBuffer(f,h){let _=this._buffers[f].lineStarts;return _[h.line]+h.column}deleteNodes(f){for(let h=0;h<f.length;h++)U(this,f[h])}createNewPieces(f){if(f.length>dt){let yt=[];for(;f.length>dt;){const At=f.charCodeAt(dt-1);let Ft;At===13||At>=55296&&At<=56319?(Ft=f.substring(0,dt-1),f=f.substring(dt-1)):(Ft=f.substring(0,dt),f=f.substring(dt));let Zt=$e(Ft);yt.push(new ce(this._buffers.length,{line:0,column:0},{line:Zt.length-1,column:Ft.length-Zt[Zt.length-1]},Zt.length-1,Ft.length)),this._buffers.push(new Ve(Ft,Zt))}let Ct=$e(f);return yt.push(new ce(this._buffers.length,{line:0,column:0},{line:Ct.length-1,column:f.length-Ct[Ct.length-1]},Ct.length-1,f.length)),this._buffers.push(new Ve(f,Ct)),yt}let h=this._buffers[0].buffer.length;const _=$e(f,!1);let K=this._lastChangeBufferPos;if(this._buffers[0].lineStarts[this._buffers[0].lineStarts.length-1]===h&&h!==0&&this.startWithLF(f)&&this.endWithCR(this._buffers[0].buffer)){this._lastChangeBufferPos={line:this._lastChangeBufferPos.line,column:this._lastChangeBufferPos.column+1},K=this._lastChangeBufferPos;for(let yt=0;yt<_.length;yt++)_[yt]+=h+1;this._buffers[0].lineStarts=this._buffers[0].lineStarts.concat(_.slice(1)),this._buffers[0].buffer+="_"+f,h+=1}else{if(h!==0)for(let yt=0;yt<_.length;yt++)_[yt]+=h;this._buffers[0].lineStarts=this._buffers[0].lineStarts.concat(_.slice(1)),this._buffers[0].buffer+=f}const de=this._buffers[0].buffer.length;let ye=this._buffers[0].lineStarts.length-1,De=de-this._buffers[0].lineStarts[ye],qe={line:ye,column:De},ht=new ce(0,K,qe,this.getLineFeedCnt(0,K,qe),de-h);return this._lastChangeBufferPos=qe,[ht]}getLineRawContent(f,h=0){let _=this.root,K="",de=this._searchCache.get2(f);if(de){_=de.node;let ye=this.getAccumulatedValue(_,f-de.nodeStartLineNumber-1),De=this._buffers[_.piece.bufferIndex].buffer,qe=this.offsetInBuffer(_.piece.bufferIndex,_.piece.start);if(de.nodeStartLineNumber+_.piece.lineFeedCnt===f)K=De.substring(qe+ye,qe+_.piece.length);else{let ht=this.getAccumulatedValue(_,f-de.nodeStartLineNumber);return De.substring(qe+ye,qe+ht-h)}}else{let ye=0;const De=f;for(;_!==Se;)if(_.left!==Se&&_.lf_left>=f-1)_=_.left;else if(_.lf_left+_.piece.lineFeedCnt>f-1){let qe=this.getAccumulatedValue(_,f-_.lf_left-2),ht=this.getAccumulatedValue(_,f-_.lf_left-1),yt=this._buffers[_.piece.bufferIndex].buffer,Ct=this.offsetInBuffer(_.piece.bufferIndex,_.piece.start);return ye+=_.size_left,this._searchCache.set({node:_,nodeStartOffset:ye,nodeStartLineNumber:De-(f-1-_.lf_left)}),yt.substring(Ct+qe,Ct+ht-h)}else if(_.lf_left+_.piece.lineFeedCnt===f-1){let qe=this.getAccumulatedValue(_,f-_.lf_left-2),ht=this._buffers[_.piece.bufferIndex].buffer,yt=this.offsetInBuffer(_.piece.bufferIndex,_.piece.start);K=ht.substring(yt+qe,yt+_.piece.length);break}else f-=_.lf_left+_.piece.lineFeedCnt,ye+=_.size_left+_.piece.length,_=_.right}for(_=_.next();_!==Se;){let ye=this._buffers[_.piece.bufferIndex].buffer;if(_.piece.lineFeedCnt>0){let De=this.getAccumulatedValue(_,0),qe=this.offsetInBuffer(_.piece.bufferIndex,_.piece.start);return K+=ye.substring(qe,qe+De-h),K}else{let De=this.offsetInBuffer(_.piece.bufferIndex,_.piece.start);K+=ye.substr(De,_.piece.length)}_=_.next()}return K}computeBufferMetadata(){let f=this.root,h=1,_=0;for(;f!==Se;)h+=f.lf_left+f.piece.lineFeedCnt,_+=f.size_left+f.piece.length,f=f.right;this._lineCnt=h,this._length=_,this._searchCache.validate(this._length)}getIndexOf(f,h){let _=f.piece,K=this.positionInBuffer(f,h),de=K.line-_.start.line;if(this.offsetInBuffer(_.bufferIndex,_.end)-this.offsetInBuffer(_.bufferIndex,_.start)===h){let ye=this.getLineFeedCnt(f.piece.bufferIndex,_.start,K);if(ye!==de)return{index:ye,remainder:0}}return{index:de,remainder:K.column}}getAccumulatedValue(f,h){if(h<0)return 0;let _=f.piece,K=this._buffers[_.bufferIndex].lineStarts,de=_.start.line+h+1;return de>_.end.line?K[_.end.line]+_.end.column-K[_.start.line]-_.start.column:K[de]-K[_.start.line]-_.start.column}deleteNodeTail(f,h){const _=f.piece,K=_.lineFeedCnt,de=this.offsetInBuffer(_.bufferIndex,_.end),ye=h,De=this.offsetInBuffer(_.bufferIndex,ye),qe=this.getLineFeedCnt(_.bufferIndex,_.start,ye),ht=qe-K,yt=De-de,Ct=_.length+yt;f.piece=new ce(_.bufferIndex,_.start,ye,qe,Ct),je(this,f,yt,ht)}deleteNodeHead(f,h){const _=f.piece,K=_.lineFeedCnt,de=this.offsetInBuffer(_.bufferIndex,_.start),ye=h,De=this.getLineFeedCnt(_.bufferIndex,ye,_.end),qe=this.offsetInBuffer(_.bufferIndex,ye),ht=De-K,yt=de-qe,Ct=_.length+yt;f.piece=new ce(_.bufferIndex,ye,_.end,De,Ct),je(this,f,yt,ht)}shrinkNode(f,h,_){const K=f.piece,de=K.start,ye=K.end,De=K.length,qe=K.lineFeedCnt,ht=h,yt=this.getLineFeedCnt(K.bufferIndex,K.start,ht),Ct=this.offsetInBuffer(K.bufferIndex,h)-this.offsetInBuffer(K.bufferIndex,de);f.piece=new ce(K.bufferIndex,K.start,ht,yt,Ct),je(this,f,Ct-De,yt-qe);let At=new ce(K.bufferIndex,_,ye,this.getLineFeedCnt(K.bufferIndex,_,ye),this.offsetInBuffer(K.bufferIndex,ye)-this.offsetInBuffer(K.bufferIndex,_)),Ft=this.rbInsertRight(f,At);this.validateCRLFWithPrevNode(Ft)}appendToNode(f,h){this.adjustCarriageReturnFromNext(h,f)&&(h+=`
|
|
|
`);const _=this.shouldCheckCRLF()&&this.startWithLF(h)&&this.endWithCR(f),K=this._buffers[0].buffer.length;this._buffers[0].buffer+=h;const de=$e(h,!1);for(let Ft=0;Ft<de.length;Ft++)de[Ft]+=K;if(_){let Ft=this._buffers[0].lineStarts[this._buffers[0].lineStarts.length-2];this._buffers[0].lineStarts.pop(),this._lastChangeBufferPos={line:this._lastChangeBufferPos.line-1,column:K-Ft}}this._buffers[0].lineStarts=this._buffers[0].lineStarts.concat(de.slice(1));const ye=this._buffers[0].lineStarts.length-1,De=this._buffers[0].buffer.length-this._buffers[0].lineStarts[ye],qe={line:ye,column:De},ht=f.piece.length+h.length,yt=f.piece.lineFeedCnt,Ct=this.getLineFeedCnt(0,f.piece.start,qe),At=Ct-yt;f.piece=new ce(f.piece.bufferIndex,f.piece.start,qe,Ct,ht),this._lastChangeBufferPos=qe,je(this,f,h.length,At)}nodeAt(f){let h=this.root,_=this._searchCache.get(f);if(_)return{node:_.node,nodeStartOffset:_.nodeStartOffset,remainder:f-_.nodeStartOffset};let K=0;for(;h!==Se;)if(h.size_left>f)h=h.left;else if(h.size_left+h.piece.length>=f){K+=h.size_left;let de={node:h,remainder:f-h.size_left,nodeStartOffset:K};return this._searchCache.set(de),de}else f-=h.size_left+h.piece.length,K+=h.size_left+h.piece.length,h=h.right;return null}nodeAt2(f,h){let _=this.root,K=0;for(;_!==Se;)if(_.left!==Se&&_.lf_left>=f-1)_=_.left;else if(_.lf_left+_.piece.lineFeedCnt>f-1){let de=this.getAccumulatedValue(_,f-_.lf_left-2),ye=this.getAccumulatedValue(_,f-_.lf_left-1);return K+=_.size_left,{node:_,remainder:Math.min(de+h-1,ye),nodeStartOffset:K}}else if(_.lf_left+_.piece.lineFeedCnt===f-1){let de=this.getAccumulatedValue(_,f-_.lf_left-2);if(de+h-1<=_.piece.length)return{node:_,remainder:de+h-1,nodeStartOffset:K};h-=_.piece.length-de;break}else f-=_.lf_left+_.piece.lineFeedCnt,K+=_.size_left+_.piece.length,_=_.right;for(_=_.next();_!==Se;){if(_.piece.lineFeedCnt>0){let de=this.getAccumulatedValue(_,0),ye=this.offsetOfNode(_);return{node:_,remainder:Math.min(h-1,de),nodeStartOffset:ye}}else if(_.piece.length>=h-1){let de=this.offsetOfNode(_);return{node:_,remainder:h-1,nodeStartOffset:de}}else h-=_.piece.length;_=_.next()}return null}nodeCharCodeAt(f,h){if(f.piece.lineFeedCnt<1)return-1;let _=this._buffers[f.piece.bufferIndex],K=this.offsetInBuffer(f.piece.bufferIndex,f.piece.start)+h;return _.buffer.charCodeAt(K)}offsetOfNode(f){if(!f)return 0;let h=f.size_left;for(;f!==this.root;)f.parent.right===f&&(h+=f.parent.size_left+f.parent.piece.length),f=f.parent;return h}shouldCheckCRLF(){return!(this._EOLNormalized&&this._EOL===`
|
|
|
`)}startWithLF(f){if(typeof f=="string")return f.charCodeAt(0)===10;if(f===Se||f.piece.lineFeedCnt===0)return!1;let h=f.piece,_=this._buffers[h.bufferIndex].lineStarts,K=h.start.line,de=_[K]+h.start.column;if(K===_.length-1)return!1;let ye=_[K+1];return ye>de+1?!1:this._buffers[h.bufferIndex].buffer.charCodeAt(de)===10}endWithCR(f){return typeof f=="string"?f.charCodeAt(f.length-1)===13:f===Se||f.piece.lineFeedCnt===0?!1:this.nodeCharCodeAt(f,f.piece.length-1)===13}validateCRLFWithPrevNode(f){if(this.shouldCheckCRLF()&&this.startWithLF(f)){let h=f.prev();this.endWithCR(h)&&this.fixCRLF(h,f)}}validateCRLFWithNextNode(f){if(this.shouldCheckCRLF()&&this.endWithCR(f)){let h=f.next();this.startWithLF(h)&&this.fixCRLF(f,h)}}fixCRLF(f,h){let _=[],K=this._buffers[f.piece.bufferIndex].lineStarts,de;f.piece.end.column===0?de={line:f.piece.end.line-1,column:K[f.piece.end.line]-K[f.piece.end.line-1]-1}:de={line:f.piece.end.line,column:f.piece.end.column-1};const ye=f.piece.length-1,De=f.piece.lineFeedCnt-1;f.piece=new ce(f.piece.bufferIndex,f.piece.start,de,De,ye),je(this,f,-1,-1),f.piece.length===0&&_.push(f);let qe={line:h.piece.start.line+1,column:0};const ht=h.piece.length-1,yt=this.getLineFeedCnt(h.piece.bufferIndex,qe,h.piece.end);h.piece=new ce(h.piece.bufferIndex,qe,h.piece.end,yt,ht),je(this,h,-1,-1),h.piece.length===0&&_.push(h);let Ct=this.createNewPieces(`\r
|
|
|
`);this.rbInsertRight(f,Ct[0]);for(let At=0;At<_.length;At++)U(this,_[At])}adjustCarriageReturnFromNext(f,h){if(this.shouldCheckCRLF()&&this.endWithCR(f)){let _=h.next();if(this.startWithLF(_)){if(f+=`
|
|
|
`,_.piece.length===1)U(this,_);else{const K=_.piece,de={line:K.start.line+1,column:0},ye=K.length-1,De=this.getLineFeedCnt(K.bufferIndex,de,K.end);_.piece=new ce(K.bufferIndex,de,K.end,De,ye),je(this,_,-1,-1)}return!0}}return!1}iterate(f,h){if(f===Se)return h(Se);let _=this.iterate(f.left,h);return _&&(h(f)&&this.iterate(f.right,h))}getNodeContent(f){if(f===Se)return"";let h=this._buffers[f.piece.bufferIndex],_,K=f.piece,de=this.offsetInBuffer(K.bufferIndex,K.start),ye=this.offsetInBuffer(K.bufferIndex,K.end);return _=h.buffer.substring(de,ye),_}getPieceContent(f){let h=this._buffers[f.bufferIndex],_=this.offsetInBuffer(f.bufferIndex,f.start),K=this.offsetInBuffer(f.bufferIndex,f.end),de=h.buffer.substring(_,K);return de}rbInsertRight(f,h){let _=new Be(h,1);_.left=Se,_.right=Se,_.parent=Se,_.size_left=0,_.lf_left=0;let K=this.root;if(K===Se)this.root=_,_.color=0;else if(f.right===Se)f.right=_,_.parent=f;else{let de=me(f.right);de.left=_,_.parent=de}return se(this,_),_}rbInsertLeft(f,h){let _=new Be(h,1);if(_.left=Se,_.right=Se,_.parent=Se,_.size_left=0,_.lf_left=0,this.root===Se)this.root=_,_.color=0;else if(f.left===Se)f.left=_,_.parent=f;else{let K=he(f.left);K.right=_,_.parent=K}return se(this,_),_}}var Rt=t("QRHv"),vo=t("5nk5");class Mo extends x.a{constructor(f,h,_,K,de,ye,De){super();this._onDidChangeContent=this._register(new B.b),this._BOM=h,this._mightContainNonBasicASCII=!ye,this._mightContainRTL=K,this._mightContainUnusualLineTerminators=de,this._pieceTree=new It(f,_,De)}mightContainRTL(){return this._mightContainRTL}mightContainUnusualLineTerminators(){return this._mightContainUnusualLineTerminators}resetMightContainUnusualLineTerminators(){this._mightContainUnusualLineTerminators=!1}mightContainNonBasicASCII(){return this._mightContainNonBasicASCII}getBOM(){return this._BOM}getEOL(){return this._pieceTree.getEOL()}createSnapshot(f){return this._pieceTree.createSnapshot(f?this._BOM:"")}getOffsetAt(f,h){return this._pieceTree.getOffsetAt(f,h)}getPositionAt(f){return this._pieceTree.getPositionAt(f)}getRangeAt(f,h){let _=f+h;const K=this.getPositionAt(f),de=this.getPositionAt(_);return new v.a(K.lineNumber,K.column,de.lineNumber,de.column)}getValueInRange(f,h=0){if(f.isEmpty())return"";const _=this._getEndOfLine(h);return this._pieceTree.getValueInRange(f,_)}getValueLengthInRange(f,h=0){if(f.isEmpty())return 0;if(f.startLineNumber===f.endLineNumber)return f.endColumn-f.startColumn;let _=this.getOffsetAt(f.startLineNumber,f.startColumn),K=this.getOffsetAt(f.endLineNumber,f.endColumn);return K-_}getCharacterCountInRange(f,h=0){if(this._mightContainNonBasicASCII){let _=0;const K=f.startLineNumber,de=f.endLineNumber;for(let ye=K;ye<=de;ye++){const De=this.getLineContent(ye),qe=ye===K?f.startColumn-1:0,ht=ye===de?f.endColumn-1:De.length;for(let yt=qe;yt<ht;yt++)R.E(De.charCodeAt(yt))?(_=_+1,yt=yt+1):_=_+1}return _+=this._getEndOfLine(h).length*(de-K),_}return this.getValueLengthInRange(f,h)}getLength(){return this._pieceTree.getLength()}getLineCount(){return this._pieceTree.getLineCount()}getLinesContent(){return this._pieceTree.getLinesContent()}getLineContent(f){return this._pieceTree.getLineContent(f)}getLineCharCode(f,h){return this._pieceTree.getLineCharCode(f,h)}getLineLength(f){return this._pieceTree.getLineLength(f)}getLineFirstNonWhitespaceColumn(f){const h=R.u(this.getLineContent(f));return h===-1?0:h+1}getLineLastNonWhitespaceColumn(f){const h=R.I(this.getLineContent(f));return h===-1?0:h+2}_getEndOfLine(f){switch(f){case 1:return`
|
|
|
`;case 2:return`\r
|
|
|
`;case 0:return this.getEOL();default:throw new Error("Unknown EOL preference")}}setEOL(f){this._pieceTree.setEOL(f)}applyEdits(f,h,_){let K=this._mightContainRTL,de=this._mightContainUnusualLineTerminators,ye=this._mightContainNonBasicASCII,De=!0,qe=[];for(let Yt=0;Yt<f.length;Yt++){let ao=f[Yt];De&&ao._isTracked&&(De=!1);let Co=ao.range;if(ao.text){let li=!0;ye||(li=!R.A(ao.text),ye=li),!K&&li&&(K=R.m(ao.text)),!de&&li&&(de=R.n(ao.text))}let ko="",Qo=0,yi=0,Ko=0;if(ao.text){let li;[Qo,yi,Ko,li]=Object(Rt.f)(ao.text);const Ki=this.getEOL(),xi=Ki===`\r
|
|
|
`?2:1;li===0||li===xi?ko=ao.text:ko=ao.text.replace(/\r\n|\r|\n/g,Ki)}qe[Yt]={sortIndex:Yt,identifier:ao.identifier||null,range:Co,rangeOffset:this.getOffsetAt(Co.startLineNumber,Co.startColumn),rangeLength:this.getValueLengthInRange(Co),text:ko,eolCount:Qo,firstLineLength:yi,lastLineLength:Ko,forceMoveMarkers:Boolean(ao.forceMoveMarkers),isAutoWhitespaceEdit:ao.isAutoWhitespaceEdit||!1}}qe.sort(Mo._sortOpsAscending);let ht=!1;for(let Yt=0,ao=qe.length-1;Yt<ao;Yt++){let Co=qe[Yt].range.getEndPosition(),ko=qe[Yt+1].range.getStartPosition();if(ko.isBeforeOrEqual(Co)){if(ko.isBefore(Co))throw new Error("Overlapping ranges are not allowed!");ht=!0}}De&&(qe=this._reduceOperations(qe));let yt=_||h?Mo._getInverseEditRanges(qe):[],Ct=[];if(h)for(let Yt=0;Yt<qe.length;Yt++){let ao=qe[Yt],Co=yt[Yt];if(ao.isAutoWhitespaceEdit&&ao.range.isEmpty())for(let ko=Co.startLineNumber;ko<=Co.endLineNumber;ko++){let Qo="";if(ko===Co.startLineNumber&&(Qo=this.getLineContent(ao.range.startLineNumber),R.u(Qo)!==-1))continue;Ct.push({lineNumber:ko,oldContent:Qo})}}let At=null;if(_){let Yt=0;At=[];for(let ao=0;ao<qe.length;ao++){const Co=qe[ao],ko=yt[ao],Qo=this.getValueInRange(Co.range),yi=Co.rangeOffset+Yt;Yt+=Co.text.length-Qo.length,At[ao]={sortIndex:Co.sortIndex,identifier:Co.identifier,range:ko,text:Qo,textChange:new vo.a(Co.rangeOffset,Qo,yi,Co.text)}}ht||At.sort((ao,Co)=>ao.sortIndex-Co.sortIndex)}this._mightContainRTL=K,this._mightContainUnusualLineTerminators=de,this._mightContainNonBasicASCII=ye;const Ft=this._doApplyEdits(qe);let Zt=null;if(h&&Ct.length>0){Ct.sort((Yt,ao)=>ao.lineNumber-Yt.lineNumber),Zt=[];for(let Yt=0,ao=Ct.length;Yt<ao;Yt++){let Co=Ct[Yt].lineNumber;if(Yt>0&&Ct[Yt-1].lineNumber===Co)continue;let ko=Ct[Yt].oldContent,Qo=this.getLineContent(Co);if(Qo.length===0||Qo===ko||R.u(Qo)!==-1)continue;Zt.push(Co)}}return this._onDidChangeContent.fire(),new m.a(At,Ft,Zt)}_reduceOperations(f){return f.length<1e3?f:[this._toSingleEditOperation(f)]}_toSingleEditOperation(f){let h=!1;const _=f[0].range,K=f[f.length-1].range,de=new v.a(_.startLineNumber,_.startColumn,K.endLineNumber,K.endColumn);let ye=_.startLineNumber,De=_.startColumn;const qe=[];for(let Ft=0,Zt=f.length;Ft<Zt;Ft++){const Yt=f[Ft],ao=Yt.range;h=h||Yt.forceMoveMarkers,qe.push(this.getValueInRange(new v.a(ye,De,ao.startLineNumber,ao.startColumn))),Yt.text.length>0&&qe.push(Yt.text),ye=ao.endLineNumber,De=ao.endColumn}const ht=qe.join(""),[yt,Ct,At]=Object(Rt.f)(ht);return{sortIndex:0,identifier:f[0].identifier,range:de,rangeOffset:this.getOffsetAt(de.startLineNumber,de.startColumn),rangeLength:this.getValueLengthInRange(de,0),text:ht,eolCount:yt,firstLineLength:Ct,lastLineLength:At,forceMoveMarkers:h,isAutoWhitespaceEdit:!1}}_doApplyEdits(f){f.sort(Mo._sortOpsDescending);let h=[];for(let _=0;_<f.length;_++){let K=f[_];const de=K.range.startLineNumber,ye=K.range.startColumn,De=K.range.endLineNumber,qe=K.range.endColumn;if(de===De&&ye===qe&&K.text.length===0)continue;K.text?(this._pieceTree.delete(K.rangeOffset,K.rangeLength),this._pieceTree.insert(K.rangeOffset,K.text,!0)):this._pieceTree.delete(K.rangeOffset,K.rangeLength);const ht=new v.a(de,ye,De,qe);h.push({range:ht,rangeLength:K.rangeLength,text:K.text,rangeOffset:K.rangeOffset,forceMoveMarkers:K.forceMoveMarkers})}return h}findMatchesLineByLine(f,h,_,K){return this._pieceTree.findMatchesLineByLine(f,h,_,K)}static _getInverseEditRanges(f){let h=[],_=0,K=0,de=null;for(let ye=0,De=f.length;ye<De;ye++){let qe=f[ye],ht,yt;de?de.range.endLineNumber===qe.range.startLineNumber?(ht=_,yt=K+(qe.range.startColumn-de.range.endColumn)):(ht=_+(qe.range.startLineNumber-de.range.endLineNumber),yt=qe.range.startColumn):(ht=qe.range.startLineNumber,yt=qe.range.startColumn);let Ct;if(qe.text.length>0){const At=qe.eolCount+1;At===1?Ct=new v.a(ht,yt,ht,yt+qe.firstLineLength):Ct=new v.a(ht,yt,ht+At-1,qe.lastLineLength+1)}else Ct=new v.a(ht,yt,ht,yt);_=Ct.endLineNumber,K=Ct.endColumn,h.push(Ct),de=qe}return h}static _sortOpsAscending(f,h){let _=v.a.compareRangesUsingEnds(f.range,h.range);return _===0?f.sortIndex-h.sortIndex:_}static _sortOpsDescending(f,h){let _=v.a.compareRangesUsingEnds(f.range,h.range);return _===0?h.sortIndex-f.sortIndex:-_}}class xo{constructor(f,h,_,K,de,ye,De,qe,ht){this._chunks=f,this._bom=h,this._cr=_,this._lf=K,this._crlf=de,this._containsRTL=ye,this._containsUnusualLineTerminators=De,this._isBasicASCII=qe,this._normalizeEOL=ht}_getEOL(f){const h=this._cr+this._lf+this._crlf,_=this._cr+this._crlf;return h===0?f===1?`
|
|
|
`:`\r
|
|
|
`:_>h/2?`\r
|
|
|
`:`
|
|
|
`}create(f){const h=this._getEOL(f);let _=this._chunks;if(this._normalizeEOL&&(h===`\r
|
|
|
`&&(this._cr>0||this._lf>0)||h===`
|
|
|
`&&(this._cr>0||this._crlf>0)))for(let de=0,ye=_.length;de<ye;de++){let De=_[de].buffer.replace(/\r\n|\r|\n/g,h),qe=$e(De);_[de]=new Ve(De,qe)}const K=new Mo(_,this._bom,h,this._containsRTL,this._containsUnusualLineTerminators,this._isBasicASCII,this._normalizeEOL);return{textBuffer:K,disposable:K}}}class Do{constructor(){this.chunks=[],this.BOM="",this._hasPreviousChar=!1,this._previousChar=0,this._tmpLineStarts=[],this.cr=0,this.lf=0,this.crlf=0,this.containsRTL=!1,this.containsUnusualLineTerminators=!1,this.isBasicASCII=!0}acceptChunk(f){if(f.length===0)return;this.chunks.length===0&&(R.S(f)&&(this.BOM=R.b,f=f.substr(1)));const h=f.charCodeAt(f.length-1);h===13||h>=55296&&h<=56319?(this._acceptChunk1(f.substr(0,f.length-1),!1),this._hasPreviousChar=!0,this._previousChar=h):(this._acceptChunk1(f,!1),this._hasPreviousChar=!1,this._previousChar=h)}_acceptChunk1(f,h){if(!h&&f.length===0)return;this._hasPreviousChar?this._acceptChunk2(String.fromCharCode(this._previousChar)+f):this._acceptChunk2(f)}_acceptChunk2(f){const h=ot(this._tmpLineStarts,f);this.chunks.push(new Ve(f,h.lineStarts)),this.cr+=h.cr,this.lf+=h.lf,this.crlf+=h.crlf,this.isBasicASCII&&(this.isBasicASCII=h.isBasicASCII),!this.isBasicASCII&&!this.containsRTL&&(this.containsRTL=R.m(f)),!this.isBasicASCII&&!this.containsUnusualLineTerminators&&(this.containsUnusualLineTerminators=R.n(f))}finish(f=!0){return this._finish(),new xo(this.chunks,this.BOM,this.cr,this.lf,this.crlf,this.containsRTL,this.containsUnusualLineTerminators,this.isBasicASCII,f)}_finish(){if(this.chunks.length===0&&this._acceptChunk1("",!0),this._hasPreviousChar){this._hasPreviousChar=!1;let f=this.chunks[this.chunks.length-1];f.buffer+=String.fromCharCode(this._previousChar);let h=$e(f.buffer);f.lineStarts=h,this._previousChar===13&&this.cr++}}}var Lo=t("M46C"),To=t("6OMU"),Vt=t("4bUh"),xt=t("twdY"),ze=t("i/Ef"),ct=t("5Y4S"),Ut=t("MNsG");class Qe{constructor(){this._beginState=[],this._valid=[],this._len=0,this._invalidLineStartIndex=0}_reset(f){this._beginState=[],this._valid=[],this._len=0,this._invalidLineStartIndex=0,f&&this._setBeginState(0,f)}flush(f){this._reset(f)}get invalidLineStartIndex(){return this._invalidLineStartIndex}_invalidateLine(f){f<this._len&&(this._valid[f]=!1),f<this._invalidLineStartIndex&&(this._invalidLineStartIndex=f)}_isValid(f){return f<this._len?this._valid[f]:!1}getBeginState(f){return f<this._len?this._beginState[f]:null}_ensureLine(f){for(;f>=this._len;)this._beginState[this._len]=null,this._valid[this._len]=!1,this._len++}_deleteLines(f,h){if(h===0)return;f+h>this._len&&(h=this._len-f),this._beginState.splice(f,h),this._valid.splice(f,h),this._len-=h}_insertLines(f,h){if(h===0)return;const _=[],K=[];for(let de=0;de<h;de++)_[de]=null,K[de]=!1;this._beginState=To.b(this._beginState,f,_),this._valid=To.b(this._valid,f,K),this._len+=h}_setValid(f,h){this._ensureLine(f),this._valid[f]=h}_setBeginState(f,h){this._ensureLine(f),this._beginState[f]=h}setEndState(f,h,_){if(this._setValid(h,!0),this._invalidLineStartIndex=h+1,h===f-1)return;const K=this.getBeginState(h+1);if(K===null||!_.equals(K)){this._setBeginState(h+1,_),this._invalidateLine(h+1);return}let de=h+1;for(;de<f&&this._isValid(de);)de++;this._invalidLineStartIndex=de}setFakeTokens(f){this._setValid(f,!1)}applyEdits(f,h){const _=f.endLineNumber-f.startLineNumber,K=h,de=Math.min(_,K);for(let ye=de;ye>=0;ye--)this._invalidateLine(f.startLineNumber+ye-1);this._acceptDeleteRange(f),this._acceptInsertText(new I.a(f.startLineNumber,f.startColumn),h)}_acceptDeleteRange(f){const h=f.startLineNumber-1;if(h>=this._len)return;this._deleteLines(f.startLineNumber,f.endLineNumber-f.startLineNumber)}_acceptInsertText(f,h){const _=f.lineNumber-1;if(_>=this._len)return;this._insertLines(f.lineNumber,h)}}class tt extends x.a{constructor(f,h){super();this._textModel=f,this._languageIdCodec=h,this._isDisposed=!1,this._tokenizationStateStore=new Qe,this._tokenizationSupport=null,this._register(xt.E.onDidChange(_=>{const K=this._textModel.getLanguageId();if(_.changedLanguages.indexOf(K)===-1)return;this._resetTokenizationState(),this._textModel.clearTokens()})),this._register(this._textModel.onDidChangeContentFast(_=>{if(_.isFlush){this._resetTokenizationState();return}for(let K=0,de=_.changes.length;K<de;K++){const ye=_.changes[K],[De]=Object(Rt.f)(ye.text);this._tokenizationStateStore.applyEdits(ye.range,De)}this._beginBackgroundTokenization()})),this._register(this._textModel.onDidChangeAttached(()=>{this._beginBackgroundTokenization()})),this._register(this._textModel.onDidChangeLanguage(()=>{this._resetTokenizationState(),this._textModel.clearTokens()})),this._resetTokenizationState()}dispose(){this._isDisposed=!0,super.dispose()}_resetTokenizationState(){const[f,h]=ut(this._textModel);this._tokenizationSupport=f,this._tokenizationStateStore.flush(h),this._beginBackgroundTokenization()}_beginBackgroundTokenization(){this._textModel.isAttachedToEditor()&&this._hasLinesToTokenize()&&Ut.j(()=>{if(this._isDisposed)return;this._revalidateTokensNow()})}_revalidateTokensNow(){const f=this._textModel.getLineCount(),h=1,_=new Rt.b,K=ct.a.create(!1);let de=-1;for(;this._hasLinesToTokenize()&&!(K.elapsed()>h);)if(de=this._tokenizeOneInvalidLine(_),de>=f)break;this._beginBackgroundTokenization(),this._textModel.setTokens(_.tokens,!this._hasLinesToTokenize())}tokenizeViewport(f,h){const _=new Rt.b;this._tokenizeViewport(_,f,h),this._textModel.setTokens(_.tokens,!this._hasLinesToTokenize())}reset(){this._resetTokenizationState(),this._textModel.clearTokens()}forceTokenization(f){const h=new Rt.b;this._updateTokensUntilLine(h,f),this._textModel.setTokens(h.tokens,!this._hasLinesToTokenize())}isCheapToTokenize(f){if(!this._tokenizationSupport)return!0;const h=this._tokenizationStateStore.invalidLineStartIndex+1;return f>h?!1:f<h?!0:this._textModel.getLineLength(f)<2048}_hasLinesToTokenize(){return this._tokenizationSupport?this._tokenizationStateStore.invalidLineStartIndex<this._textModel.getLineCount():!1}_tokenizeOneInvalidLine(f){if(!this._hasLinesToTokenize())return this._textModel.getLineCount()+1;const h=this._tokenizationStateStore.invalidLineStartIndex+1;return this._updateTokensUntilLine(f,h),h}_updateTokensUntilLine(f,h){if(!this._tokenizationSupport)return;const _=this._textModel.getLanguageId(),K=this._textModel.getLineCount(),de=h-1;for(let ye=this._tokenizationStateStore.invalidLineStartIndex;ye<=de;ye++){const De=this._textModel.getLineContent(ye+1),qe=this._tokenizationStateStore.getBeginState(ye),ht=Dt(this._languageIdCodec,_,this._tokenizationSupport,De,!0,qe);f.add(ye+1,ht.tokens),this._tokenizationStateStore.setEndState(K,ye,ht.endState),ye=this._tokenizationStateStore.invalidLineStartIndex-1}}_tokenizeViewport(f,h,_){if(!this._tokenizationSupport)return;if(_<=this._tokenizationStateStore.invalidLineStartIndex)return;if(h<=this._tokenizationStateStore.invalidLineStartIndex){this._updateTokensUntilLine(f,_);return}let K=this._textModel.getLineFirstNonWhitespaceColumn(h);const de=[];let ye=null;for(let ht=h-1;K>1&&ht>=1;ht--){const yt=this._textModel.getLineFirstNonWhitespaceColumn(ht);if(yt===0)continue;if(yt<K){if(ye=this._tokenizationStateStore.getBeginState(ht-1),ye)break;de.push(this._textModel.getLineContent(ht)),K=yt}}ye||(ye=this._tokenizationSupport.getInitialState());const De=this._textModel.getLanguageId();let qe=ye;for(let ht=de.length-1;ht>=0;ht--){const yt=Dt(this._languageIdCodec,De,this._tokenizationSupport,de[ht],!1,qe);qe=yt.endState}for(let ht=h;ht<=_;ht++){const yt=this._textModel.getLineContent(ht),Ct=Dt(this._languageIdCodec,De,this._tokenizationSupport,yt,!0,qe);f.add(ht,Ct.tokens),this._tokenizationStateStore.setFakeTokens(ht-1),qe=Ct.endState}}}function ut(f){const h=f.getLanguageId();let _=f.isTooLargeForTokenization()?null:xt.E.get(h),K=null;if(_)try{K=_.getInitialState()}catch(de){Object(g.f)(de),_=null}return[_,K]}function Dt(f,h,_,K,de,ye){let De=null;if(_)try{De=_.tokenize2(K,de,ye.clone(),0)}catch(qe){Object(g.f)(qe)}return De||(De=Object(ze.d)(f.encodeLanguageId(h),K,ye,0)),Vt.a.convertToEndOffset(De.tokens,K.length),De}var Pt=t("0JNc"),Wt=t("cMvZ"),zt=t("BFtn"),so=t("EIAu"),wo=t("zrhQ"),No=t("OAO6");class di{constructor(f,h,_){this.range=f,this.nestingLevel=h,this.isInvalid=_}}class _o{constructor(f,h,_,K){this.range=f,this.openingBracketRange=h,this.closingBracketRange=_,this.nestingLevel=K}}class no extends _o{constructor(f,h,_,K,de){super(f,h,_,K);this.minVisibleColumnIndentation=de}}class _t{constructor(f,h){this.lineCount=f,this.columnCount=h}toString(){return`${this.lineCount},${this.columnCount}`}}function Tt(f,h,_,K){return f!==_?bt(_-f,K):bt(0,K-h)}const Nt=0;function rt(f){return f===0}const lt=Math.pow(2,26);function bt(f,h){return f*lt+h}function St(f){const h=f,_=Math.floor(h/lt),K=h-_*lt;return new _t(_,K)}function Qt(f){return Math.floor(f/lt)}function bo(f){return f}function qt(f,h){return h<lt?f+h:f-f%lt+h}function Eo(f,h){const _=f,K=h,de=K-_;if(de<=0)return Nt;const ye=Math.floor(_/lt),De=Math.floor(K/lt),qe=K-De*lt;if(ye===De){const ht=_-ye*lt;return bt(0,qe-ht)}else return bt(De-ye,qe)}function Ro(f,h){return f<h}function zo(f,h){return f<=h}function Bo(f,h){return f>=h}function Jt(f){return bt(f.lineNumber-1,f.column-1)}function fo(f,h){const _=f,K=Math.floor(_/lt),de=_-K*lt,ye=h,De=Math.floor(ye/lt),qe=ye-De*lt;return new v.a(K+1,de+1,De+1,qe+1)}function ri(f){const h=Object(R.Q)(f);return bt(h.length-1,h[h.length-1].length)}function Zo(f){return f}class ci{constructor(f,h,_){this.startOffset=f,this.endOffset=h,this.newLength=_}}class ki{constructor(f,h){this.documentLength=h,this.nextEditIdx=0,this.deltaOldToNewLineCount=0,this.deltaOldToNewColumnCount=0,this.deltaLineIdxInOld=-1,this.edits=f.map(_=>wi.from(_))}getOffsetBeforeChange(f){return this.adjustNextEdit(f),this.translateCurToOld(f)}getDistanceToNextChange(f){this.adjustNextEdit(f);const h=this.edits[this.nextEditIdx],_=h?this.translateOldToCur(h.offsetObj):this.documentLength;return Eo(f,_)}translateOldToCur(f){return f.lineCount===this.deltaLineIdxInOld?bt(f.lineCount+this.deltaOldToNewLineCount,f.columnCount+this.deltaOldToNewColumnCount):bt(f.lineCount+this.deltaOldToNewLineCount,f.columnCount)}translateCurToOld(f){const h=St(f);return h.lineCount-this.deltaOldToNewLineCount===this.deltaLineIdxInOld?bt(h.lineCount-this.deltaOldToNewLineCount,h.columnCount-this.deltaOldToNewColumnCount):bt(h.lineCount-this.deltaOldToNewLineCount,h.columnCount)}adjustNextEdit(f){for(;this.nextEditIdx<this.edits.length;){const h=this.edits[this.nextEditIdx],_=this.translateOldToCur(h.endOffsetAfterObj);if(zo(_,f)){this.nextEditIdx++;const K=St(_),de=St(this.translateOldToCur(h.endOffsetBeforeObj)),ye=K.lineCount-de.lineCount;this.deltaOldToNewLineCount+=ye;const De=this.deltaLineIdxInOld===h.endOffsetBeforeObj.lineCount?this.deltaOldToNewColumnCount:0,qe=K.columnCount-de.columnCount;this.deltaOldToNewColumnCount=De+qe,this.deltaLineIdxInOld=h.endOffsetBeforeObj.lineCount}else break}}}class wi{constructor(f,h,_){this.endOffsetBeforeObj=St(h),this.endOffsetAfterObj=St(qt(f,_)),this.offsetObj=St(f)}static from(f){return new wi(f.startOffset,f.endOffset,f.newLength)}}var Zi=t("Apug");const Vi=new Array;class vi{constructor(f,h){this.items=f,this.additionalItems=h}static create(f,h){if(f<=128&&h.length===0){let _=vi.cache[f];return _||(_=new vi(f,h),vi.cache[f]=_),_}return new vi(f,h)}static getEmpty(){return this.empty}add(f,h){const _=h.getKey(f);let K=_>>5;if(K===0){const ye=1<<_|this.items;return ye===this.items?this:vi.create(ye,this.additionalItems)}K--;const de=this.additionalItems.slice(0);for(;de.length<K;)de.push(0);return de[K]|=1<<(_&31),vi.create(this.items,de)}merge(f){const h=this.items|f.items;if(this.additionalItems===Vi&&f.additionalItems===Vi)return h===this.items?this:h===f.items?f:vi.create(h,Vi);const _=new Array;for(let K=0;K<Math.max(this.additionalItems.length,f.additionalItems.length);K++){const de=this.additionalItems[K]||0,ye=f.additionalItems[K]||0;_.push(de|ye)}return vi.create(h,_)}intersects(f){if((this.items&f.items)!==0)return!0;for(let h=0;h<Math.min(this.additionalItems.length,f.additionalItems.length);h++)if((this.additionalItems[h]&f.additionalItems[h])!==0)return!0;return!1}}vi.cache=new Array(129),vi.empty=vi.create(0,Vi);const sn={getKey(f){return f}};class en{constructor(){this.items=new Map}getKey(f){let h=this.items.get(f);return h===void 0&&(h=this.items.size,this.items.set(f,h)),h}}class on{constructor(f){this._length=f}get length(){return this._length}}class cn extends on{constructor(f,h,_,K,de){super(f);this.openingBracket=h,this.child=_,this.closingBracket=K,this.missingOpeningBracketIds=de}static create(f,h,_){let K=f.length;return h&&(K=qt(K,h.length)),_&&(K=qt(K,_.length)),new cn(K,f,h,_,h?h.missingOpeningBracketIds:vi.getEmpty())}get kind(){return 2}get listHeight(){return 0}get childrenLength(){return 3}getChild(f){switch(f){case 0:return this.openingBracket;case 1:return this.child;case 2:return this.closingBracket}throw new Error("Invalid child index")}get children(){const f=new Array;return f.push(this.openingBracket),this.child&&f.push(this.child),this.closingBracket&&f.push(this.closingBracket),f}canBeReused(f){return this.closingBracket===null?!1:!f.intersects(this.missingOpeningBracketIds)}deepClone(){return new cn(this.length,this.openingBracket.deepClone(),this.child&&this.child.deepClone(),this.closingBracket&&this.closingBracket.deepClone(),this.missingOpeningBracketIds)}computeMinIndentation(f,h){return this.child?this.child.computeMinIndentation(qt(f,this.openingBracket.length),h):Number.MAX_SAFE_INTEGER}}class Bi extends on{constructor(f,h,_){super(f);this.listHeight=h,this._missingOpeningBracketIds=_,this.cachedMinIndentation=-1}static create23(f,h,_,K=!1){let de=f.length,ye=f.missingOpeningBracketIds;if(f.listHeight!==h.listHeight)throw new Error("Invalid list heights");if(de=qt(de,h.length),ye=ye.merge(h.missingOpeningBracketIds),_){if(f.listHeight!==_.listHeight)throw new Error("Invalid list heights");de=qt(de,_.length),ye=ye.merge(_.missingOpeningBracketIds)}return K?new Ji(de,f.listHeight+1,f,h,_,ye):new zi(de,f.listHeight+1,f,h,_,ye)}static getEmpty(){return new pn(Nt,0,[],vi.getEmpty())}get kind(){return 4}get missingOpeningBracketIds(){return this._missingOpeningBracketIds}throwIfImmutable(){}makeLastElementMutable(){this.throwIfImmutable();const f=this.childrenLength;if(f===0)return;const h=this.getChild(f-1),_=h.kind===4?h.toMutable():h;return h!==_&&this.setChild(f-1,_),_}makeFirstElementMutable(){this.throwIfImmutable();const f=this.childrenLength;if(f===0)return;const h=this.getChild(0),_=h.kind===4?h.toMutable():h;return h!==_&&this.setChild(0,_),_}canBeReused(f){if(f.intersects(this.missingOpeningBracketIds))return!1;let h=this,_;for(;h.kind===4&&(_=h.childrenLength)>0;)h=h.getChild(_-1);return h.canBeReused(f)}handleChildrenChanged(){this.throwIfImmutable();const f=this.childrenLength;let h=this.getChild(0).length,_=this.getChild(0).missingOpeningBracketIds;for(let K=1;K<f;K++){const de=this.getChild(K);h=qt(h,de.length),_=_.merge(de.missingOpeningBracketIds)}this._length=h,this._missingOpeningBracketIds=_,this.cachedMinIndentation=-1}computeMinIndentation(f,h){if(this.cachedMinIndentation!==-1)return this.cachedMinIndentation;let _=Number.MAX_SAFE_INTEGER,K=f;for(let de=0;de<this.childrenLength;de++){const ye=this.getChild(de);ye&&(_=Math.min(_,ye.computeMinIndentation(K,h)),K=qt(K,ye.length))}return this.cachedMinIndentation=_,_}}class zi extends Bi{constructor(f,h,_,K,de,ye){super(f,h,ye);this._item1=_,this._item2=K,this._item3=de}get childrenLength(){return this._item3!==null?3:2}getChild(f){switch(f){case 0:return this._item1;case 1:return this._item2;case 2:return this._item3}throw new Error("Invalid child index")}setChild(f,h){switch(f){case 0:this._item1=h;return;case 1:this._item2=h;return;case 2:this._item3=h;return}throw new Error("Invalid child index")}get children(){return this._item3?[this._item1,this._item2,this._item3]:[this._item1,this._item2]}get item1(){return this._item1}get item2(){return this._item2}get item3(){return this._item3}deepClone(){return new zi(this.length,this.listHeight,this._item1.deepClone(),this._item2.deepClone(),this._item3?this._item3.deepClone():null,this.missingOpeningBracketIds)}appendChildOfSameHeight(f){if(this._item3)throw new Error("Cannot append to a full (2,3) tree node");this.throwIfImmutable(),this._item3=f,this.handleChildrenChanged()}unappendChild(){if(!this._item3)throw new Error("Cannot remove from a non-full (2,3) tree node");this.throwIfImmutable();const f=this._item3;return this._item3=null,this.handleChildrenChanged(),f}prependChildOfSameHeight(f){if(this._item3)throw new Error("Cannot prepend to a full (2,3) tree node");this.throwIfImmutable(),this._item3=this._item2,this._item2=this._item1,this._item1=f,this.handleChildrenChanged()}unprependChild(){if(!this._item3)throw new Error("Cannot remove from a non-full (2,3) tree node");this.throwIfImmutable();const f=this._item1;return this._item1=this._item2,this._item2=this._item3,this._item3=null,this.handleChildrenChanged(),f}toMutable(){return this}}class Ji extends zi{toMutable(){return new zi(this.length,this.listHeight,this.item1,this.item2,this.item3,this.missingOpeningBracketIds)}throwIfImmutable(){throw new Error("this instance is immutable")}}class ui extends Bi{constructor(f,h,_,K){super(f,h,K);this._children=_}get childrenLength(){return this._children.length}getChild(f){return this._children[f]}setChild(f,h){this._children[f]=h}get children(){return this._children}deepClone(){const f=new Array(this._children.length);for(let h=0;h<this._children.length;h++)f[h]=this._children[h].deepClone();return new ui(this.length,this.listHeight,f,this.missingOpeningBracketIds)}appendChildOfSameHeight(f){this.throwIfImmutable(),this._children.push(f),this.handleChildrenChanged()}unappendChild(){this.throwIfImmutable();const f=this._children.pop();return this.handleChildrenChanged(),f}prependChildOfSameHeight(f){this.throwIfImmutable(),this._children.unshift(f),this.handleChildrenChanged()}unprependChild(){this.throwIfImmutable();const f=this._children.shift();return this.handleChildrenChanged(),f}toMutable(){return this}}class pn extends ui{toMutable(){return new ui(this.length,this.listHeight,[...this.children],this.missingOpeningBracketIds)}throwIfImmutable(){throw new Error("this instance is immutable")}}const Hi=[];class Oi extends on{get listHeight(){return 0}get childrenLength(){return 0}getChild(f){return null}get children(){return Hi}deepClone(){return this}}class Ii extends Oi{get kind(){return 0}get missingOpeningBracketIds(){return vi.getEmpty()}canBeReused(f){return!0}computeMinIndentation(f,h){const _=St(f),K=(_.columnCount===0?_.lineCount:_.lineCount+1)+1,de=Qt(qt(f,this.length))+1;let ye=Number.MAX_SAFE_INTEGER;for(let De=K;De<=de;De++){const qe=h.getLineFirstNonWhitespaceColumn(De),ht=h.getLineContent(De);if(qe===0)continue;const yt=Zi.a.visibleColumnFromColumn(ht,qe,h.getOptions().tabSize);ye=Math.min(ye,yt)}return ye}}class Qi extends Oi{constructor(f){super(f)}static create(f){const h=Zo(f),_=Qi.cacheByLength.get(h);if(_)return _;const K=new Qi(f);return Qi.cacheByLength.set(h,K),K}get kind(){return 1}get missingOpeningBracketIds(){return vi.getEmpty()}canBeReused(f){return!1}computeMinIndentation(f,h){return Number.MAX_SAFE_INTEGER}}Qi.cacheByLength=new Map;class Li extends Oi{constructor(f,h){super(h);this.missingOpeningBracketIds=f}get kind(){return 3}canBeReused(f){return!f.intersects(this.missingOpeningBracketIds)}computeMinIndentation(f,h){return Number.MAX_SAFE_INTEGER}}class Ui{constructor(f,h,_,K,de){this.length=f,this.kind=h,this.bracketId=_,this.bracketIds=K,this.astNode=de}}class fi{constructor(f,h){this.textModel=f,this.bracketTokens=h,this.reader=new $i(this.textModel,this.bracketTokens),this._offset=Nt,this.didPeek=!1,this.peeked=null,this.textBufferLineCount=f.getLineCount(),this.textBufferLastLineLength=f.getLineLength(this.textBufferLineCount)}get offset(){return this._offset}get length(){return bt(this.textBufferLineCount,this.textBufferLastLineLength)}skip(f){this.didPeek=!1,this._offset=qt(this._offset,f);const h=St(this._offset);this.reader.setPosition(h.lineCount,h.columnCount)}read(){let f;return this.peeked?(this.didPeek=!1,f=this.peeked):f=this.reader.read(),f&&(this._offset=qt(this._offset,f.length)),f}peek(){return this.didPeek||(this.peeked=this.reader.read(),this.didPeek=!0),this.peeked}}class $i{constructor(f,h){this.textModel=f,this.bracketTokens=h,this.lineIdx=0,this.line=null,this.lineCharOffset=0,this.lineTokens=null,this.lineTokenOffset=0,this.peekedToken=null,this.textBufferLineCount=f.getLineCount(),this.textBufferLastLineLength=f.getLineLength(this.textBufferLineCount)}setPosition(f,h){f===this.lineIdx?(this.lineCharOffset=h,this.lineTokenOffset=this.lineCharOffset===0?0:this.lineTokens.findTokenIndexAtOffset(this.lineCharOffset)):(this.lineIdx=f,this.lineCharOffset=h,this.line=null),this.peekedToken=null}read(){if(this.peekedToken){const de=this.peekedToken;return this.peekedToken=null,this.lineCharOffset+=bo(de.length),de}if(this.lineIdx>this.textBufferLineCount-1||this.lineIdx===this.textBufferLineCount-1&&this.lineCharOffset>=this.textBufferLastLineLength)return null;this.line===null&&(this.lineTokens=this.textModel.getLineTokens(this.lineIdx+1),this.line=this.lineTokens.getLineContent(),this.lineTokenOffset=this.lineCharOffset===0?0:this.lineTokens.findTokenIndexAtOffset(this.lineCharOffset));const f=this.lineIdx,h=this.lineCharOffset;let _=0;for(;;){const de=this.lineTokens,ye=de.getCount();let De=null;if(this.lineTokenOffset<ye){const qe=de.getMetadata(this.lineTokenOffset);for(;this.lineTokenOffset+1<ye&&qe===de.getMetadata(this.lineTokenOffset+1);)this.lineTokenOffset++;const ht=xt.D.getTokenType(qe)===0,yt=de.getEndOffset(this.lineTokenOffset);if(ht&&yt!==this.lineCharOffset){const Ct=de.getLanguageId(this.lineTokenOffset),At=this.line.substring(this.lineCharOffset,yt),Ft=this.bracketTokens.getSingleLanguageBracketTokens(Ct),Zt=Ft.regExpGlobal;if(Zt){Zt.lastIndex=0;const Yt=Zt.exec(At);Yt&&(De=Ft.getToken(Yt[0]),De&&(this.lineCharOffset+=Yt.index))}}if(_+=yt-this.lineCharOffset,De)if(f!==this.lineIdx||h!==this.lineCharOffset){this.peekedToken=De;break}else return this.lineCharOffset+=bo(De.length),De;else this.lineTokenOffset++,this.lineCharOffset=yt}else{if(this.lineIdx===this.textBufferLineCount-1)break;if(this.lineIdx++,this.lineTokens=this.textModel.getLineTokens(this.lineIdx+1),this.lineTokenOffset=0,this.line=this.lineTokens.getLineContent(),this.lineCharOffset=0,_+=33,_>1e3)break}if(_>1500)break}const K=Tt(f,h,this.lineIdx,this.lineCharOffset);return new Ui(K,0,-1,vi.getEmpty(),new Ii(K))}}class rn{constructor(f,h){this.text=f,this._offset=Nt,this.idx=0;const _=h.getRegExpStr(),K=_?new RegExp(h.getRegExpStr()+`|
|
|
|
`,"g"):null,de=[];let ye,De=0,qe=0,ht=0,yt=0;const Ct=new Array;for(let Zt=0;Zt<60;Zt++)Ct.push(new Ui(bt(0,Zt),0,-1,vi.getEmpty(),new Ii(bt(0,Zt))));const At=new Array;for(let Zt=0;Zt<60;Zt++)At.push(new Ui(bt(1,Zt),0,-1,vi.getEmpty(),new Ii(bt(1,Zt))));if(K)for(K.lastIndex=0;(ye=K.exec(f))!==null;){const Zt=ye.index,Yt=ye[0];if(Yt===`
|
|
|
`)De++,qe=Zt+1;else{if(ht!==Zt){let ao;if(yt===De){const Co=Zt-ht;if(Co<Ct.length)ao=Ct[Co];else{const ko=bt(0,Co);ao=new Ui(ko,0,-1,vi.getEmpty(),new Ii(ko))}}else{const Co=De-yt,ko=Zt-qe;if(Co===1&&ko<At.length)ao=At[ko];else{const Qo=bt(Co,ko);ao=new Ui(Qo,0,-1,vi.getEmpty(),new Ii(Qo))}}de.push(ao)}de.push(h.getToken(Yt)),ht=Zt+Yt.length,yt=De}}const Ft=f.length;if(ht!==Ft){const Zt=yt===De?bt(0,Ft-ht):bt(De-yt,Ft-qe);de.push(new Ui(Zt,0,-1,vi.getEmpty(),new Ii(Zt)))}this.length=bt(De,Ft-qe),this.tokens=de}get offset(){return this._offset}read(){return this.tokens[this.idx++]||null}peek(){return this.tokens[this.idx]||null}skip(f){throw new g.a}}class _i{constructor(f){this.map=f,this.hasRegExp=!1,this._regExpGlobal=null}static createFromLanguage(f,h){function _(qe,ht){return h.getKey(`${qe}:::${ht}`)}const K=f.characterPair.getColorizedBrackets(),de=new Map,ye=new Set;for(const[qe,ht]of K){ye.add(qe);let yt=de.get(ht);const Ct=_(f.languageId,qe);yt||(yt={openingBrackets:vi.getEmpty(),first:Ct},de.set(ht,yt)),yt.openingBrackets=yt.openingBrackets.add(Ct,sn)}const De=new Map;for(const[qe,ht]of de){const yt=bt(0,qe.length);De.set(qe,new Ui(yt,2,ht.first,ht.openingBrackets,Qi.create(yt)))}for(const qe of ye){const ht=bt(0,qe.length),yt=_(f.languageId,qe);De.set(qe,new Ui(ht,1,yt,vi.getEmpty().add(yt,sn),Qi.create(ht)))}return new _i(De)}getRegExpStr(){if(this.isEmpty)return null;{const f=[...this.map.keys()];return f.sort(),f.reverse(),f.map(h=>Pi(h)).join("|")}}get regExpGlobal(){if(!this.hasRegExp){const f=this.getRegExpStr();this._regExpGlobal=f?new RegExp(f,"g"):null,this.hasRegExp=!0}return this._regExpGlobal}getToken(f){return this.map.get(f)}get isEmpty(){return this.map.size===0}}function Pi(f){const h=Object(R.t)(f),_=/^[\w ]+$/.test(f);return _?`\\b${h}\\b`:h}class gt{constructor(f,h){this.denseKeyProvider=f,this.getLanguageConfiguration=h,this.languageIdToBracketTokens=new Map}didLanguageChange(f){const h=this.languageIdToBracketTokens.get(f);if(!h)return!1;const _=_i.createFromLanguage(this.getLanguageConfiguration(f),this.denseKeyProvider).getRegExpStr();return h.getRegExpStr()!==_}getSingleLanguageBracketTokens(f){let h=this.languageIdToBracketTokens.get(f);return h||(h=_i.createFromLanguage(this.getLanguageConfiguration(f),this.denseKeyProvider),this.languageIdToBracketTokens.set(f,h)),h}}function Ge(f){if(f.length===0)return null;if(f.length===1)return f[0];let h=0;function _(){if(h>=f.length)return null;const De=h,qe=f[De].listHeight;for(h++;h<f.length&&f[h].listHeight===qe;)h++;return h-De>=2?$(De===0&&h===f.length?f:f.slice(De,h),!1):f[De]}let K=_(),de=_();if(!de)return K;for(let De=_();De;De=_())Ee(K,de)<=Ee(de,De)?(K=Ne(K,de),de=De):de=Ne(de,De);const ye=Ne(K,de);return ye}function $(f,h=!1){if(f.length===0)return null;if(f.length===1)return f[0];let _=f.length;for(;_>3;){const K=_>>1;for(let de=0;de<K;de++){const ye=de<<1;f[de]=Bi.create23(f[ye],f[ye+1],ye+3===_?f[ye+2]:null,h)}_=K}return Bi.create23(f[0],f[1],_>=3?f[2]:null,h)}function Ee(f,h){return Math.abs(f.listHeight-h.listHeight)}function Ne(f,h){return f.listHeight===h.listHeight?Bi.create23(f,h,null,!1):f.listHeight>h.listHeight?He(f,h):at(h,f)}function He(f,h){f=f.toMutable();let _=f;const K=new Array;let de;for(;;){if(h.listHeight===_.listHeight){de=h;break}if(_.kind!==4)throw new Error("unexpected");K.push(_),_=_.makeLastElementMutable()}for(let ye=K.length-1;ye>=0;ye--){const De=K[ye];de?De.childrenLength>=3?de=Bi.create23(De.unappendChild(),de,null,!1):(De.appendChildOfSameHeight(de),de=void 0):De.handleChildrenChanged()}return de?Bi.create23(f,de,null,!1):f}function at(f,h){f=f.toMutable();let _=f;const K=new Array;for(;h.listHeight!==_.listHeight;){if(_.kind!==4)throw new Error("unexpected");K.push(_),_=_.makeFirstElementMutable()}let de=h;for(let ye=K.length-1;ye>=0;ye--){const De=K[ye];de?De.childrenLength>=3?de=Bi.create23(de,De.unprependChild(),null,!1):(De.prependChildOfSameHeight(de),de=void 0):De.handleChildrenChanged()}return de?Bi.create23(de,f,null,!1):f}class vt{constructor(f){this.lastOffset=Nt,this.nextNodes=[f],this.offsets=[Nt],this.idxs=[]}readLongestNodeAt(f,h){if(Ro(f,this.lastOffset))throw new Error("Invalid offset");for(this.lastOffset=f;;){const _=Bt(this.nextNodes);if(!_)return;const K=Bt(this.offsets);if(Ro(f,K))return;if(Ro(K,f))if(qt(K,_.length)<=f)this.nextNodeAfterCurrent();else{const de=Xt(_);de!==-1?(this.nextNodes.push(_.getChild(de)),this.offsets.push(K),this.idxs.push(de)):this.nextNodeAfterCurrent()}else{if(h(_))return this.nextNodeAfterCurrent(),_;{const de=Xt(_);if(de===-1){this.nextNodeAfterCurrent();return}else this.nextNodes.push(_.getChild(de)),this.offsets.push(K),this.idxs.push(de)}}}}nextNodeAfterCurrent(){for(;;){const f=Bt(this.offsets),h=Bt(this.nextNodes);if(this.nextNodes.pop(),this.offsets.pop(),this.idxs.length===0)break;const _=Bt(this.nextNodes),K=Xt(_,this.idxs[this.idxs.length-1]);if(K!==-1){this.nextNodes.push(_.getChild(K)),this.offsets.push(qt(f,h.length)),this.idxs[this.idxs.length-1]=K;break}else this.idxs.pop()}}}function Xt(f,h=-1){for(;;){if(h++,h>=f.childrenLength)return-1;if(f.getChild(h))return h}}function Bt(f){return f.length>0?f[f.length-1]:void 0}function Kt(f,h,_,K){const de=new ro(f,h,_,K);return de.parseDocument()}class ro{constructor(f,h,_,K){if(this.tokenizer=f,this.createImmutableLists=K,this._itemsConstructed=0,this._itemsFromCache=0,_&&K)throw new Error("Not supported");this.oldNodeReader=_?new vt(_):void 0,this.positionMapper=new ki(h,f.length)}parseDocument(){this._itemsConstructed=0,this._itemsFromCache=0;let f=this.parseList(vi.getEmpty());return f||(f=Bi.getEmpty()),f}parseList(f){const h=new Array;for(;;){const K=this.tokenizer.peek();if(!K||K.kind===2&&K.bracketIds.intersects(f))break;const de=this.parseChild(f);if(de.kind===4&&de.childrenLength===0)continue;h.push(de)}const _=this.oldNodeReader?Ge(h):$(h,this.createImmutableLists);return _}parseChild(f){if(this.oldNodeReader){const _=this.positionMapper.getDistanceToNextChange(this.tokenizer.offset);if(!rt(_)){const K=this.oldNodeReader.readLongestNodeAt(this.positionMapper.getOffsetBeforeChange(this.tokenizer.offset),de=>{if(!Ro(de.length,_))return!1;const ye=de.canBeReused(f);return ye});if(K)return this._itemsFromCache++,this.tokenizer.skip(K.length),K}}this._itemsConstructed++;const h=this.tokenizer.read();switch(h.kind){case 2:return new Li(h.bracketIds,h.length);case 0:return h.astNode;case 1:const _=f.merge(h.bracketIds),K=this.parseList(_),de=this.tokenizer.peek();return de&&de.kind===2&&(de.bracketId===h.bracketId||de.bracketIds.intersects(h.bracketIds))?(this.tokenizer.read(),cn.create(h.astNode,K,de.astNode)):cn.create(h.astNode,K,null);default:throw new Error("unexpected")}}}class F extends x.a{constructor(f,h){super();this.textModel=f,this.languageConfigurationService=h,this.cache=this._register(new x.d),this.onDidChangeEmitter=new B.b,this.onDidChange=this.onDidChangeEmitter.event,this.bracketsRequested=!1,this._register(f.onDidChangeOptions(_=>{this.cache.clear(),this.updateCache()})),this._register(f.onDidChangeLanguage(_=>{this.cache.clear(),this.updateCache()})),this._register(this.languageConfigurationService.onDidChange(_=>{var K;(!_.languageId||((K=this.cache.value)===null||K===void 0?void 0:K.object.didLanguageChange(_.languageId)))&&(this.cache.clear(),this.updateCache())}))}get isDocumentSupported(){const f=5e4*100;return this.textModel.getValueLength()<=f}updateCache(){if(this.bracketsRequested&&this.isDocumentSupported){if(!this.cache.value){const f=new x.b;this.cache.value=te(f.add(new Ae(this.textModel,h=>this.languageConfigurationService.getLanguageConfiguration(h))),f),f.add(this.cache.value.object.onDidChange(h=>this.onDidChangeEmitter.fire(h))),this.onDidChangeEmitter.fire()}}else this.cache.clear(),this.onDidChangeEmitter.fire()}handleContentChanged(f){var h;(h=this.cache.value)===null||h===void 0||h.object.handleContentChanged(f)}getBracketPairsInRange(f){var h;return this.bracketsRequested=!0,this.updateCache(),((h=this.cache.value)===null||h===void 0?void 0:h.object.getBracketPairsInRange(f,!1))||[]}getBracketPairsInRangeWithMinIndentation(f){var h;return this.bracketsRequested=!0,this.updateCache(),((h=this.cache.value)===null||h===void 0?void 0:h.object.getBracketPairsInRange(f,!0))||[]}getBracketsInRange(f){var h;return this.bracketsRequested=!0,this.updateCache(),((h=this.cache.value)===null||h===void 0?void 0:h.object.getBracketsInRange(f))||[]}}function te(f,h){return{object:f,dispose:()=>h==null?void 0:h.dispose()}}class Ae extends x.a{constructor(f,h){super();if(this.textModel=f,this.getLanguageConfiguration=h,this.didChangeEmitter=new B.b,this.denseKeyProvider=new en,this.brackets=new gt(this.denseKeyProvider,this.getLanguageConfiguration),this.onDidChange=this.didChangeEmitter.event,this._register(f.onBackgroundTokenizationStateChanged(()=>{if(f.backgroundTokenizationState===2){const _=this.initialAstWithoutTokens===void 0;this.initialAstWithoutTokens=void 0,_||this.didChangeEmitter.fire()}})),this._register(f.onDidChangeTokens(({ranges:_})=>{const K=_.map(de=>new ci(bt(de.fromLineNumber-1,0),bt(de.toLineNumber,0),bt(de.toLineNumber-de.fromLineNumber+1,0)));this.astWithTokens=this.parseDocumentFromTextBuffer(K,this.astWithTokens,!1),this.initialAstWithoutTokens||this.didChangeEmitter.fire()})),f.backgroundTokenizationState===0){const _=this.brackets.getSingleLanguageBracketTokens(this.textModel.getLanguageId()),K=new rn(this.textModel.getValue(),_);this.initialAstWithoutTokens=Kt(K,[],void 0,!0),this.astWithTokens=this.initialAstWithoutTokens}else f.backgroundTokenizationState===2?(this.initialAstWithoutTokens=void 0,this.astWithTokens=this.parseDocumentFromTextBuffer([],void 0,!1)):f.backgroundTokenizationState===1&&(this.initialAstWithoutTokens=this.parseDocumentFromTextBuffer([],void 0,!0),this.astWithTokens=this.initialAstWithoutTokens)}didLanguageChange(f){return this.brackets.didLanguageChange(f)}handleContentChanged(f){const h=f.changes.map(_=>{const K=v.a.lift(_.range);return new ci(Jt(K.getStartPosition()),Jt(K.getEndPosition()),ri(_.text))}).reverse();this.astWithTokens=this.parseDocumentFromTextBuffer(h,this.astWithTokens,!1),this.initialAstWithoutTokens&&(this.initialAstWithoutTokens=this.parseDocumentFromTextBuffer(h,this.initialAstWithoutTokens,!1))}parseDocumentFromTextBuffer(f,h,_){const K=!1,de=K?h==null?void 0:h.deepClone():h,ye=new fi(this.textModel,this.brackets),De=Kt(ye,f,de,_);return De}getBracketsInRange(f){const h=bt(f.startLineNumber-1,f.startColumn-1),_=bt(f.endLineNumber-1,f.endColumn-1),K=new Array,de=this.initialAstWithoutTokens||this.astWithTokens;return Ye(de,Nt,de.length,h,_,K),K}getBracketPairsInRange(f,h){const _=new Array,K=Jt(f.getStartPosition()),de=Jt(f.getEndPosition()),ye=this.initialAstWithoutTokens||this.astWithTokens,De=new pt(_,h,this.textModel);return Mt(ye,Nt,ye.length,K,de,De),_}}function Ye(f,h,_,K,de,ye,De=0){if(f.kind===1){const qe=fo(h,_);ye.push(new di(qe,De-1,!1))}else if(f.kind===3){const qe=fo(h,_);ye.push(new di(qe,De-1,!0))}else if(f.kind===4)for(const qe of f.children)_=qt(h,qe.length),zo(h,de)&&Bo(_,K)&&Ye(qe,h,_,K,de,ye,De),h=_;else if(f.kind===2){De++;{const qe=f.openingBracket;_=qt(h,qe.length),zo(h,de)&&Bo(_,K)&&Ye(qe,h,_,K,de,ye,De),h=_}if(f.child){const qe=f.child;_=qt(h,qe.length),zo(h,de)&&Bo(_,K)&&Ye(qe,h,_,K,de,ye,De),h=_}if(f.closingBracket){const qe=f.closingBracket;_=qt(h,qe.length),zo(h,de)&&Bo(_,K)&&Ye(qe,h,_,K,de,ye,De),h=_}}}class pt{constructor(f,h,_){this.result=f,this.includeMinIndentation=h,this.textModel=_}}function Mt(f,h,_,K,de,ye,De=0){var qe;if(f.kind===2){const yt=qt(h,f.openingBracket.length);let Ct=-1;ye.includeMinIndentation&&(Ct=f.computeMinIndentation(h,ye.textModel)),ye.result.push(new no(fo(h,_),fo(h,yt),f.closingBracket?fo(qt(yt,((qe=f.child)===null||qe===void 0?void 0:qe.length)||Nt),_):void 0,De,Ct)),De++}let ht=h;for(const yt of f.children){const Ct=ht;ht=qt(ht,yt.length),zo(Ct,de)&&zo(K,ht)&&Mt(yt,Ct,ht,K,de,ye,De)}}var jt=t("kYye"),$t=t("t9D7");class uo extends x.a{constructor(f){super();this.textModel=f,this.colorProvider=new io,this.onDidChangeEmitter=new B.b,this.onDidChange=this.onDidChangeEmitter.event,this.colorizationOptions=f.getOptions().bracketPairColorizationOptions,this._register(f.onDidChangeOptions(h=>{this.colorizationOptions=f.getOptions().bracketPairColorizationOptions})),this._register(f.bracketPairs.onDidChange(h=>{this.onDidChangeEmitter.fire()}))}getDecorationsInRange(f,h,_){if(h===void 0)return[];if(!this.colorizationOptions.enabled)return[];const K=new Array,de=this.textModel.bracketPairs.getBracketsInRange(f);for(const ye of de)K.push({id:`bracket${ye.range.toString()}-${ye.nestingLevel}`,options:{description:"BracketPairColorization",inlineClassName:this.colorProvider.getInlineClassName(ye)},ownerId:0,range:ye.range});return K}getAllDecorations(f,h){return f===void 0?[]:this.colorizationOptions.enabled?this.getDecorationsInRange(new v.a(1,1,this.textModel.getLineCount(),1),f,h):[]}}class io{constructor(){this.unexpectedClosingBracketClassName="unexpected-closing-bracket"}getInlineClassName(f){return f.isInvalid?this.unexpectedClosingBracketClassName:this.getInlineClassNameOfLevel(f.nestingLevel)}getInlineClassNameOfLevel(f){return`bracket-highlighting-${f%30}`}}Object($t.f)((f,h)=>{const _=[jt.c,jt.d,jt.e,jt.f,jt.g,jt.h],K=new io;h.addRule(`.monaco-editor .${K.unexpectedClosingBracketClassName} { color: ${f.getColor(jt.i)}; }`);let de=_.map(ye=>f.getColor(ye)).filter(ye=>!!ye).filter(ye=>!ye.isTransparent());for(let ye=0;ye<30;ye++){const De=de[ye%de.length];h.addRule(`.monaco-editor .${K.getInlineClassNameOfLevel(ye)} { color: ${De}; }`)}});var ho=t("WBhO"),mo=function(f,h,_,K){var de=arguments.length,ye=de<3?h:K===null?K=Object.getOwnPropertyDescriptor(h,_):K,De;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")ye=Reflect.decorate(f,h,_,K);else for(var qe=f.length-1;qe>=0;qe--)(De=f[qe])&&(ye=(de<3?De(ye):de>3?De(h,_,ye):De(h,_))||ye);return de>3&&ye&&Object.defineProperty(h,_,ye),ye},Io=function(f,h){return function(_,K){h(_,K,f)}};function Ao(){return new Do}function Oo(f){const h=Ao();return h.acceptChunk(f),h.finish()}function Wo(f,h){const _=typeof f=="string"?Oo(f):f;return _.create(h)}let si=0;const hi=999,Uo=1e4;class mi{constructor(f){this._source=f,this._eos=!1}read(){if(this._eos)return null;let f=[],h=0,_=0;do{let K=this._source.read();if(K===null)return this._eos=!0,h===0?null:f.join("");if(K.length>0&&(f[h++]=K,_+=K.length),_>=64*1024)return f.join("")}while(!0)}}const Ri=()=>{throw new Error("Invalid change accessor")};class Di{constructor(){this._searchCanceledBrand=void 0}}Di.INSTANCE=new Di;function pi(f){return f instanceof Di?null:f}let Wi=class f extends x.a{constructor(h,_,K,de=null,ye,De,qe){super();this._undoRedoService=ye,this._modeService=De,this._languageConfigurationService=qe,this._onWillDispose=this._register(new B.b),this.onWillDispose=this._onWillDispose.event,this._onDidChangeDecorations=this._register(new Fe(Ft=>this.handleBeforeFireDecorationsChangedEvent(Ft))),this.onDidChangeDecorations=this._onDidChangeDecorations.event,this._onDidChangeLanguage=this._register(new B.b),this.onDidChangeLanguage=this._onDidChangeLanguage.event,this._onDidChangeLanguageConfiguration=this._register(new B.b),this.onDidChangeLanguageConfiguration=this._onDidChangeLanguageConfiguration.event,this._onDidChangeTokens=this._register(new B.b),this.onDidChangeTokens=this._onDidChangeTokens.event,this._onDidChangeOptions=this._register(new B.b),this.onDidChangeOptions=this._onDidChangeOptions.event,this._onDidChangeAttached=this._register(new B.b),this.onDidChangeAttached=this._onDidChangeAttached.event,this._onDidChangeContentOrInjectedText=this._register(new B.b),this.onDidChangeContentOrInjectedText=this._onDidChangeContentOrInjectedText.event,this._eventEmitter=this._register(new et),this._backgroundTokenizationState=0,this._onBackgroundTokenizationStateChanged=this._register(new B.b),this.onBackgroundTokenizationStateChanged=this._onBackgroundTokenizationStateChanged.event,this._register(this._eventEmitter.fastEvent(Ft=>{this._onDidChangeContentOrInjectedText.fire(Ft.rawContentChangedEvent)})),si++,this.id="$model"+si,this.isForSimpleWidget=_.isForSimpleWidget,typeof de=="undefined"||de===null?this._associatedResource=A.a.parse("inmemory://model/"+si):this._associatedResource=de,this._attachedEditorCount=0;const{textBuffer:ht,disposable:yt}=Wo(h,_.defaultEOL);this._buffer=ht,this._bufferDisposable=yt,this._options=f.resolveOptions(this._buffer,_);const Ct=this._buffer.getLineCount(),At=this._buffer.getValueLengthInRange(new v.a(1,1,Ct,this._buffer.getLineLength(Ct)+1),0);_.largeFileOptimizations?this._isTooLargeForTokenization=At>f.LARGE_FILE_SIZE_THRESHOLD||Ct>f.LARGE_FILE_LINE_COUNT_THRESHOLD:this._isTooLargeForTokenization=!1,this._isTooLargeForSyncing=At>f.MODEL_SYNC_LIMIT,this._versionId=1,this._alternativeVersionId=1,this._initialUndoRedoSnapshot=null,this._isDisposed=!1,this._isDisposing=!1,this._languageId=K||ze.a,this._languageRegistryListener=this._languageConfigurationService.onDidChange(Ft=>{Ft.affects(this._languageId)&&this._onDidChangeLanguageConfiguration.fire({})}),this._instanceId=R.P(si),this._lastDecorationId=0,this._decorations=Object.create(null),this._decorationsTree=new Wn,this._commandManager=new d.a(this,this._undoRedoService),this._isUndoing=!1,this._isRedoing=!1,this._trimAutoWhitespaceLines=null,this._tokens=new Rt.d(this._modeService.languageIdCodec),this._tokens2=new Rt.e(this._modeService.languageIdCodec),this._tokenization=new tt(this,this._modeService.languageIdCodec),this._bracketPairColorizer=this._register(new F(this,this._languageConfigurationService)),this._decorationProvider=this._register(new uo(this)),this._register(this._decorationProvider.onDidChange(()=>{this._onDidChangeDecorations.beginDeferredEmit(),this._onDidChangeDecorations.fire(),this._onDidChangeDecorations.endDeferredEmit()}))}static resolveOptions(h,_){if(_.detectIndentation){const K=r(h,_.tabSize,_.insertSpaces);return new m.h({tabSize:K.tabSize,indentSize:K.tabSize,insertSpaces:K.insertSpaces,trimAutoWhitespace:_.trimAutoWhitespace,defaultEOL:_.defaultEOL,bracketPairColorizationOptions:_.bracketPairColorizationOptions})}return new m.h({tabSize:_.tabSize,indentSize:_.indentSize,insertSpaces:_.insertSpaces,trimAutoWhitespace:_.trimAutoWhitespace,defaultEOL:_.defaultEOL,bracketPairColorizationOptions:_.bracketPairColorizationOptions})}onDidChangeContentFast(h){return this._eventEmitter.fastEvent(_=>h(_.contentChangedEvent))}onDidChangeContent(h){return this._eventEmitter.slowEvent(_=>h(_.contentChangedEvent))}get bracketPairs(){return this._bracketPairColorizer}get backgroundTokenizationState(){return this._backgroundTokenizationState}handleTokenizationProgress(h){if(this._backgroundTokenizationState===2)return;const _=h?2:1;this._backgroundTokenizationState!==_&&(this._backgroundTokenizationState=_,this._onBackgroundTokenizationStateChanged.fire())}dispose(){this._isDisposing=!0,this._onWillDispose.fire(),this._languageRegistryListener.dispose(),this._tokenization.dispose(),this._isDisposed=!0,super.dispose(),this._bufferDisposable.dispose(),this._isDisposing=!1;const h=new Mo([],"",`
|
|
|
`,!1,!1,!0,!0);h.dispose(),this._buffer=h}_assertNotDisposed(){if(this._isDisposed)throw new Error("Model is disposed!")}_emitContentChangedEvent(h,_){if(this._bracketPairColorizer.handleContentChanged(_),this._isDisposing)return;this._eventEmitter.fire(new Lo.a(h,_))}setValue(h){if(this._assertNotDisposed(),h===null)return;const{textBuffer:_,disposable:K}=Wo(h,this._options.defaultEOL);this._setValueFromTextBuffer(_,K)}_createContentChanged2(h,_,K,de,ye,De,qe){return{changes:[{range:h,rangeOffset:_,rangeLength:K,text:de}],eol:this._buffer.getEOL(),versionId:this.getVersionId(),isUndoing:ye,isRedoing:De,isFlush:qe}}_setValueFromTextBuffer(h,_){this._assertNotDisposed();const K=this.getFullModelRange(),de=this.getValueLengthInRange(K),ye=this.getLineCount(),De=this.getLineMaxColumn(ye);this._buffer=h,this._bufferDisposable.dispose(),this._bufferDisposable=_,this._increaseVersionId(),this._tokens.flush(),this._tokens2.flush(),this._decorations=Object.create(null),this._decorationsTree=new Wn,this._commandManager.clear(),this._trimAutoWhitespaceLines=null,this._emitContentChangedEvent(new Lo.d([new Lo.f],this._versionId,!1,!1),this._createContentChanged2(new v.a(1,1,ye,De),0,de,this.getValue(),!1,!1,!0))}setEOL(h){this._assertNotDisposed();const _=h===1?`\r
|
|
|
`:`
|
|
|
`;if(this._buffer.getEOL()===_)return;const K=this.getFullModelRange(),de=this.getValueLengthInRange(K),ye=this.getLineCount(),De=this.getLineMaxColumn(ye);this._onBeforeEOLChange(),this._buffer.setEOL(_),this._increaseVersionId(),this._onAfterEOLChange(),this._emitContentChangedEvent(new Lo.d([new Lo.e],this._versionId,!1,!1),this._createContentChanged2(new v.a(1,1,ye,De),0,de,this.getValue(),!1,!1,!1))}_onBeforeEOLChange(){this._decorationsTree.ensureAllNodesHaveRanges(this)}_onAfterEOLChange(){const h=this.getVersionId(),_=this._decorationsTree.collectNodesPostOrder();for(let K=0,de=_.length;K<de;K++){const ye=_[K],De=ye.range,qe=ye.cachedAbsoluteStart-ye.start,ht=this._buffer.getOffsetAt(De.startLineNumber,De.startColumn),yt=this._buffer.getOffsetAt(De.endLineNumber,De.endColumn);ye.cachedAbsoluteStart=ht,ye.cachedAbsoluteEnd=yt,ye.cachedVersionId=h,ye.start=ht-qe,ye.end=yt-qe,Xe(ye)}}onBeforeAttached(){this._attachedEditorCount++,this._attachedEditorCount===1&&this._onDidChangeAttached.fire(void 0)}onBeforeDetached(){this._attachedEditorCount--,this._attachedEditorCount===0&&this._onDidChangeAttached.fire(void 0)}isAttachedToEditor(){return this._attachedEditorCount>0}getAttachedEditorCount(){return this._attachedEditorCount}isTooLargeForSyncing(){return this._isTooLargeForSyncing}isTooLargeForTokenization(){return this._isTooLargeForTokenization}isDisposed(){return this._isDisposed}isDominatedByLongLines(){if(this._assertNotDisposed(),this.isTooLargeForTokenization())return!1;let h=0,_=0;const K=this._buffer.getLineCount();for(let de=1;de<=K;de++){const ye=this._buffer.getLineLength(de);ye>=Uo?_+=ye:h+=ye}return _>h}get uri(){return this._associatedResource}getOptions(){return this._assertNotDisposed(),this._options}getFormattingOptions(){return{tabSize:this._options.indentSize,insertSpaces:this._options.insertSpaces}}updateOptions(h){this._assertNotDisposed();let _=typeof h.tabSize!="undefined"?h.tabSize:this._options.tabSize,K=typeof h.indentSize!="undefined"?h.indentSize:this._options.indentSize,de=typeof h.insertSpaces!="undefined"?h.insertSpaces:this._options.insertSpaces,ye=typeof h.trimAutoWhitespace!="undefined"?h.trimAutoWhitespace:this._options.trimAutoWhitespace,De=typeof h.bracketColorizationOptions!="undefined"?h.bracketColorizationOptions:this._options.bracketPairColorizationOptions,qe=new m.h({tabSize:_,indentSize:K,insertSpaces:de,defaultEOL:this._options.defaultEOL,trimAutoWhitespace:ye,bracketPairColorizationOptions:De});if(this._options.equals(qe))return;let ht=this._options.createChangeEvent(qe);this._options=qe,this._onDidChangeOptions.fire(ht)}detectIndentation(h,_){this._assertNotDisposed();let K=r(this._buffer,_,h);this.updateOptions({insertSpaces:K.insertSpaces,tabSize:K.tabSize,indentSize:K.tabSize})}static _normalizeIndentationFromWhitespace(h,_,K){let de=0;for(let De=0;De<h.length;De++)h.charAt(De)===" "?de+=_:de++;let ye="";if(!K){let De=Math.floor(de/_);de=de%_;for(let qe=0;qe<De;qe++)ye+=" "}for(let De=0;De<de;De++)ye+=" ";return ye}static normalizeIndentation(h,_,K){let de=R.u(h);return de===-1&&(de=h.length),f._normalizeIndentationFromWhitespace(h.substring(0,de),_,K)+h.substring(de)}normalizeIndentation(h){return this._assertNotDisposed(),f.normalizeIndentation(h,this._options.indentSize,this._options.insertSpaces)}getVersionId(){return this._assertNotDisposed(),this._versionId}mightContainRTL(){return this._buffer.mightContainRTL()}mightContainUnusualLineTerminators(){return this._buffer.mightContainUnusualLineTerminators()}removeUnusualLineTerminators(h=null){const _=this.findMatches(R.a.source,!1,!0,!1,null,!1,1073741824);this._buffer.resetMightContainUnusualLineTerminators(),this.pushEditOperations(h,_.map(K=>({range:K.range,text:null})),()=>null)}mightContainNonBasicASCII(){return this._buffer.mightContainNonBasicASCII()}getAlternativeVersionId(){return this._assertNotDisposed(),this._alternativeVersionId}getInitialUndoRedoSnapshot(){return this._assertNotDisposed(),this._initialUndoRedoSnapshot}getOffsetAt(h){this._assertNotDisposed();let _=this._validatePosition(h.lineNumber,h.column,0);return this._buffer.getOffsetAt(_.lineNumber,_.column)}getPositionAt(h){this._assertNotDisposed();let _=Math.min(this._buffer.getLength(),Math.max(0,h));return this._buffer.getPositionAt(_)}_increaseVersionId(){this._versionId=this._versionId+1,this._alternativeVersionId=this._versionId}_overwriteVersionId(h){this._versionId=h}_overwriteAlternativeVersionId(h){this._alternativeVersionId=h}_overwriteInitialUndoRedoSnapshot(h){this._initialUndoRedoSnapshot=h}getValue(h,_=!1){this._assertNotDisposed();const K=this.getFullModelRange(),de=this.getValueInRange(K,h);return _?this._buffer.getBOM()+de:de}createSnapshot(h=!1){return new mi(this._buffer.createSnapshot(h))}getValueLength(h,_=!1){this._assertNotDisposed();const K=this.getFullModelRange(),de=this.getValueLengthInRange(K,h);return _?this._buffer.getBOM().length+de:de}getValueInRange(h,_=0){return this._assertNotDisposed(),this._buffer.getValueInRange(this.validateRange(h),_)}getValueLengthInRange(h,_=0){return this._assertNotDisposed(),this._buffer.getValueLengthInRange(this.validateRange(h),_)}getCharacterCountInRange(h,_=0){return this._assertNotDisposed(),this._buffer.getCharacterCountInRange(this.validateRange(h),_)}getLineCount(){return this._assertNotDisposed(),this._buffer.getLineCount()}getLineContent(h){if(this._assertNotDisposed(),h<1||h>this.getLineCount())throw new Error("Illegal value for lineNumber");return this._buffer.getLineContent(h)}getLineLength(h){if(this._assertNotDisposed(),h<1||h>this.getLineCount())throw new Error("Illegal value for lineNumber");return this._buffer.getLineLength(h)}getLinesContent(){return this._assertNotDisposed(),this._buffer.getLinesContent()}getEOL(){return this._assertNotDisposed(),this._buffer.getEOL()}getEndOfLineSequence(){return this._assertNotDisposed(),this._buffer.getEOL()===`
|
|
|
`?0:1}getLineMinColumn(h){return this._assertNotDisposed(),1}getLineMaxColumn(h){if(this._assertNotDisposed(),h<1||h>this.getLineCount())throw new Error("Illegal value for lineNumber");return this._buffer.getLineLength(h)+1}getLineFirstNonWhitespaceColumn(h){if(this._assertNotDisposed(),h<1||h>this.getLineCount())throw new Error("Illegal value for lineNumber");return this._buffer.getLineFirstNonWhitespaceColumn(h)}getLineLastNonWhitespaceColumn(h){if(this._assertNotDisposed(),h<1||h>this.getLineCount())throw new Error("Illegal value for lineNumber");return this._buffer.getLineLastNonWhitespaceColumn(h)}_validateRangeRelaxedNoAllocations(h){const _=this._buffer.getLineCount(),K=h.startLineNumber,de=h.startColumn;let ye=Math.floor(typeof K=="number"&&!isNaN(K)?K:1),De=Math.floor(typeof de=="number"&&!isNaN(de)?de:1);if(ye<1)ye=1,De=1;else if(ye>_)ye=_,De=this.getLineMaxColumn(ye);else if(De<=1)De=1;else{const At=this.getLineMaxColumn(ye);De>=At&&(De=At)}const qe=h.endLineNumber,ht=h.endColumn;let yt=Math.floor(typeof qe=="number"&&!isNaN(qe)?qe:1),Ct=Math.floor(typeof ht=="number"&&!isNaN(ht)?ht:1);if(yt<1)yt=1,Ct=1;else if(yt>_)yt=_,Ct=this.getLineMaxColumn(yt);else if(Ct<=1)Ct=1;else{const At=this.getLineMaxColumn(yt);Ct>=At&&(Ct=At)}return K===ye&&de===De&&qe===yt&&ht===Ct&&h instanceof v.a&&!(h instanceof C.a)?h:new v.a(ye,De,yt,Ct)}_isValidPosition(h,_,K){if(typeof h!="number"||typeof _!="number")return!1;if(isNaN(h)||isNaN(_))return!1;if(h<1||_<1)return!1;if((h|0)!==h||(_|0)!==_)return!1;const de=this._buffer.getLineCount();if(h>de)return!1;if(_===1)return!0;const ye=this.getLineMaxColumn(h);if(_>ye)return!1;if(K===1){const De=this._buffer.getLineCharCode(h,_-2);if(R.E(De))return!1}return!0}_validatePosition(h,_,K){const de=Math.floor(typeof h=="number"&&!isNaN(h)?h:1),ye=Math.floor(typeof _=="number"&&!isNaN(_)?_:1),De=this._buffer.getLineCount();if(de<1)return new I.a(1,1);if(de>De)return new I.a(De,this.getLineMaxColumn(De));if(ye<=1)return new I.a(de,1);const qe=this.getLineMaxColumn(de);if(ye>=qe)return new I.a(de,qe);if(K===1){const ht=this._buffer.getLineCharCode(de,ye-2);if(R.E(ht))return new I.a(de,ye-1)}return new I.a(de,ye)}validatePosition(h){const _=1;return this._assertNotDisposed(),h instanceof I.a&&this._isValidPosition(h.lineNumber,h.column,_)?h:this._validatePosition(h.lineNumber,h.column,_)}_isValidRange(h,_){const K=h.startLineNumber,de=h.startColumn,ye=h.endLineNumber,De=h.endColumn;if(!this._isValidPosition(K,de,0))return!1;if(!this._isValidPosition(ye,De,0))return!1;if(_===1){const qe=de>1?this._buffer.getLineCharCode(K,de-2):0,ht=De>1&&De<=this._buffer.getLineLength(ye)?this._buffer.getLineCharCode(ye,De-2):0,yt=R.E(qe),Ct=R.E(ht);return!yt&&!Ct}return!0}validateRange(h){const _=1;if(this._assertNotDisposed(),h instanceof v.a&&!(h instanceof C.a)&&this._isValidRange(h,_))return h;const K=this._validatePosition(h.startLineNumber,h.startColumn,0),de=this._validatePosition(h.endLineNumber,h.endColumn,0),ye=K.lineNumber,De=K.column,qe=de.lineNumber,ht=de.column;if(_===1){const yt=De>1?this._buffer.getLineCharCode(ye,De-2):0,Ct=ht>1&&ht<=this._buffer.getLineLength(qe)?this._buffer.getLineCharCode(qe,ht-2):0,At=R.E(yt),Ft=R.E(Ct);return!At&&!Ft?new v.a(ye,De,qe,ht):ye===qe&&De===ht?new v.a(ye,De-1,qe,ht-1):At&&Ft?new v.a(ye,De-1,qe,ht+1):At?new v.a(ye,De-1,qe,ht):new v.a(ye,De,qe,ht+1)}return new v.a(ye,De,qe,ht)}modifyPosition(h,_){this._assertNotDisposed();let K=this.getOffsetAt(h)+_;return this.getPositionAt(Math.min(this._buffer.getLength(),Math.max(0,K)))}getFullModelRange(){this._assertNotDisposed();const h=this.getLineCount();return new v.a(1,1,h,this.getLineMaxColumn(h))}findMatchesLineByLine(h,_,K,de){return this._buffer.findMatchesLineByLine(h,_,K,de)}findMatches(h,_,K,de,ye,De,qe=hi){this._assertNotDisposed();let ht=null;_!==null&&(Array.isArray(_)||(_=[_]),_.every(At=>v.a.isIRange(At))&&(ht=_.map(At=>this.validateRange(At)))),ht===null&&(ht=[this.getFullModelRange()]),ht=ht.sort((At,Ft)=>At.startLineNumber-Ft.startLineNumber||At.startColumn-Ft.startColumn);const yt=[];yt.push(ht.reduce((At,Ft)=>v.a.areIntersecting(At,Ft)?At.plusRange(Ft):(yt.push(At),Ft)));let Ct;if(!K&&h.indexOf(`
|
|
|
`)<0){const At=new We.a(h,K,de,ye),Ft=At.parseSearchRequest();if(!Ft)return[];Ct=Zt=>this.findMatchesLineByLine(Zt,Ft,De,qe)}else Ct=At=>We.c.findMatches(this,new We.a(h,K,de,ye),At,De,qe);return yt.map(Ct).reduce((At,Ft)=>At.concat(Ft),[])}findNextMatch(h,_,K,de,ye,De){this._assertNotDisposed();const qe=this.validatePosition(_);if(!K&&h.indexOf(`
|
|
|
`)<0){const ht=new We.a(h,K,de,ye),yt=ht.parseSearchRequest();if(!yt)return null;const Ct=this.getLineCount();let At=new v.a(qe.lineNumber,qe.column,Ct,this.getLineMaxColumn(Ct)),Ft=this.findMatchesLineByLine(At,yt,De,1);return We.c.findNextMatch(this,new We.a(h,K,de,ye),qe,De),Ft.length>0?Ft[0]:(At=new v.a(1,1,qe.lineNumber,this.getLineMaxColumn(qe.lineNumber)),Ft=this.findMatchesLineByLine(At,yt,De,1),Ft.length>0?Ft[0]:null)}return We.c.findNextMatch(this,new We.a(h,K,de,ye),qe,De)}findPreviousMatch(h,_,K,de,ye,De){this._assertNotDisposed();const qe=this.validatePosition(_);return We.c.findPreviousMatch(this,new We.a(h,K,de,ye),qe,De)}pushStackElement(){this._commandManager.pushStackElement()}popStackElement(){this._commandManager.popStackElement()}pushEOL(h){const _=this.getEOL()===`
|
|
|
`?0:1;if(_===h)return;try{this._onDidChangeDecorations.beginDeferredEmit(),this._eventEmitter.beginDeferredEmit(),this._initialUndoRedoSnapshot===null&&(this._initialUndoRedoSnapshot=this._undoRedoService.createSnapshot(this.uri)),this._commandManager.pushEOL(h)}finally{this._eventEmitter.endDeferredEmit(),this._onDidChangeDecorations.endDeferredEmit()}}_validateEditOperation(h){return h instanceof m.i?h:new m.i(h.identifier||null,this.validateRange(h.range),h.text,h.forceMoveMarkers||!1,h.isAutoWhitespaceEdit||!1,h._isTracked||!1)}_validateEditOperations(h){const _=[];for(let K=0,de=h.length;K<de;K++)_[K]=this._validateEditOperation(h[K]);return _}pushEditOperations(h,_,K){try{return this._onDidChangeDecorations.beginDeferredEmit(),this._eventEmitter.beginDeferredEmit(),this._pushEditOperations(h,this._validateEditOperations(_),K)}finally{this._eventEmitter.endDeferredEmit(),this._onDidChangeDecorations.endDeferredEmit()}}_pushEditOperations(h,_,K){if(this._options.trimAutoWhitespace&&this._trimAutoWhitespaceLines){let de=_.map(De=>({range:this.validateRange(De.range),text:De.text})),ye=!0;if(h)for(let De=0,qe=h.length;De<qe;De++){let ht=h[De],yt=!1;for(let Ct=0,At=de.length;Ct<At;Ct++){let Ft=de[Ct].range,Zt=Ft.startLineNumber>ht.endLineNumber,Yt=ht.startLineNumber>Ft.endLineNumber;if(!Zt&&!Yt){yt=!0;break}}if(!yt){ye=!1;break}}if(ye)for(let De=0,qe=this._trimAutoWhitespaceLines.length;De<qe;De++){let ht=this._trimAutoWhitespaceLines[De],yt=this.getLineMaxColumn(ht),Ct=!0;for(let At=0,Ft=de.length;At<Ft;At++){let Zt=de[At].range,Yt=de[At].text;if(ht<Zt.startLineNumber||ht>Zt.endLineNumber)continue;if(ht===Zt.startLineNumber&&Zt.startColumn===yt&&Zt.isEmpty()&&Yt&&Yt.length>0&&Yt.charAt(0)===`
|
|
|
`)continue;if(ht===Zt.startLineNumber&&Zt.startColumn===1&&Zt.isEmpty()&&Yt&&Yt.length>0&&Yt.charAt(Yt.length-1)===`
|
|
|
`)continue;Ct=!1;break}if(Ct){const At=new v.a(ht,1,ht,yt);_.push(new m.i(null,At,null,!1,!1,!1))}}this._trimAutoWhitespaceLines=null}return this._initialUndoRedoSnapshot===null&&(this._initialUndoRedoSnapshot=this._undoRedoService.createSnapshot(this.uri)),this._commandManager.pushEditOperation(h,_,K)}_applyUndo(h,_,K,de){const ye=h.map(De=>{const qe=this.getPositionAt(De.newPosition),ht=this.getPositionAt(De.newEnd);return{range:new v.a(qe.lineNumber,qe.column,ht.lineNumber,ht.column),text:De.oldText}});this._applyUndoRedoEdits(ye,_,!0,!1,K,de)}_applyRedo(h,_,K,de){const ye=h.map(De=>{const qe=this.getPositionAt(De.oldPosition),ht=this.getPositionAt(De.oldEnd);return{range:new v.a(qe.lineNumber,qe.column,ht.lineNumber,ht.column),text:De.newText}});this._applyUndoRedoEdits(ye,_,!1,!0,K,de)}_applyUndoRedoEdits(h,_,K,de,ye,De){try{this._onDidChangeDecorations.beginDeferredEmit(),this._eventEmitter.beginDeferredEmit(),this._isUndoing=K,this._isRedoing=de,this.applyEdits(h,!1),this.setEOL(_),this._overwriteAlternativeVersionId(ye)}finally{this._isUndoing=!1,this._isRedoing=!1,this._eventEmitter.endDeferredEmit(De),this._onDidChangeDecorations.endDeferredEmit()}}applyEdits(h,_=!1){try{this._onDidChangeDecorations.beginDeferredEmit(),this._eventEmitter.beginDeferredEmit();const K=this._validateEditOperations(h);return this._doApplyEdits(K,_)}finally{this._eventEmitter.endDeferredEmit(),this._onDidChangeDecorations.endDeferredEmit()}}_doApplyEdits(h,_){const K=this._buffer.getLineCount(),de=this._buffer.applyEdits(h,this._options.trimAutoWhitespace,_),ye=this._buffer.getLineCount(),De=de.changes;if(this._trimAutoWhitespaceLines=de.trimAutoWhitespaceLineNumbers,De.length!==0){for(let yt=0,Ct=De.length;yt<Ct;yt++){const At=De[yt],[Ft,Zt,Yt]=Object(Rt.f)(At.text);this._tokens.acceptEdit(At.range,Ft,Zt),this._tokens2.acceptEdit(At.range,Ft,Zt,Yt,At.text.length>0?At.text.charCodeAt(0):0),this._decorationsTree.acceptReplace(At.rangeOffset,At.rangeLength,At.text.length,At.forceMoveMarkers)}let qe=[];this._increaseVersionId();let ht=K;for(let yt=0,Ct=De.length;yt<Ct;yt++){const At=De[yt],[Ft]=Object(Rt.f)(At.text);this._onDidChangeDecorations.fire();const Zt=At.range.startLineNumber,Yt=At.range.endLineNumber,ao=Yt-Zt,Co=Ft,ko=Math.min(ao,Co),Qo=Co-ao,yi=ye-ht-Qo+Zt,Ko=yi,li=yi+Co,Ki=this._decorationsTree.getInjectedTextInInterval(this,this.getOffsetAt(new I.a(Ko,1)),this.getOffsetAt(new I.a(li,this.getLineMaxColumn(li))),0),xi=Lo.b.fromDecorations(Ki),Ni=new To.a(xi);for(let Ti=ko;Ti>=0;Ti--){const wn=Zt+Ti,yn=yi+Ti;Ni.takeFromEndWhile(Mn=>Mn.lineNumber>yn);const En=Ni.takeFromEndWhile(Mn=>Mn.lineNumber===yn);qe.push(new Lo.g(wn,this.getLineContent(yn),En))}if(ko<ao){const Ti=Zt+ko;qe.push(new Lo.h(Ti+1,Yt))}if(ko<Co){const Ti=new To.a(xi),wn=Zt+ko,yn=Co-ko,En=ye-ht-yn+wn+1;let Mn=[],Os=[];for(let Yn=0;Yn<yn;Yn++){let vs=En+Yn;Os[Yn]=this.getLineContent(vs),Ti.takeWhile(ns=>ns.lineNumber<vs),Mn[Yn]=Ti.takeWhile(ns=>ns.lineNumber===vs)}qe.push(new Lo.i(wn+1,Zt+Co,Os,Mn))}ht+=Qo}this._emitContentChangedEvent(new Lo.d(qe,this.getVersionId(),this._isUndoing,this._isRedoing),{changes:De,eol:this._buffer.getEOL(),versionId:this.getVersionId(),isUndoing:this._isUndoing,isRedoing:this._isRedoing,isFlush:!1})}return de.reverseEdits===null?void 0:de.reverseEdits}undo(){return this._undoRedoService.undo(this.uri)}canUndo(){return this._undoRedoService.canUndo(this.uri)}redo(){return this._undoRedoService.redo(this.uri)}canRedo(){return this._undoRedoService.canRedo(this.uri)}handleBeforeFireDecorationsChangedEvent(h){if(h===null||h.size===0)return;const _=[...h],K=_.map(de=>new Lo.g(de,this.getLineContent(de),this._getInjectedTextInLine(de)));this._onDidChangeContentOrInjectedText.fire(new Lo.c(K))}changeDecorations(h,_=0){this._assertNotDisposed();try{return this._onDidChangeDecorations.beginDeferredEmit(),this._changeDecorations(_,h)}finally{this._onDidChangeDecorations.endDeferredEmit()}}_changeDecorations(h,_){let K={addDecoration:(ye,De)=>this._deltaDecorationsImpl(h,[],[{range:ye,options:De}])[0],changeDecoration:(ye,De)=>{this._changeDecorationImpl(ye,De)},changeDecorationOptions:(ye,De)=>{this._changeDecorationOptionsImpl(ye,ue(De))},removeDecoration:ye=>{this._deltaDecorationsImpl(h,[ye],[])},deltaDecorations:(ye,De)=>ye.length===0&&De.length===0?[]:this._deltaDecorationsImpl(h,ye,De)},de=null;try{de=_(K)}catch(ye){Object(g.f)(ye)}return K.addDecoration=Ri,K.changeDecoration=Ri,K.changeDecorationOptions=Ri,K.removeDecoration=Ri,K.deltaDecorations=Ri,de}deltaDecorations(h,_,K=0){if(this._assertNotDisposed(),h||(h=[]),h.length===0&&_.length===0)return[];try{return this._onDidChangeDecorations.beginDeferredEmit(),this._deltaDecorationsImpl(K,h,_)}finally{this._onDidChangeDecorations.endDeferredEmit()}}_getTrackedRange(h){return this.getDecorationRange(h)}_setTrackedRange(h,_,K){const de=h?this._decorations[h]:null;if(!de)return _?this._deltaDecorationsImpl(0,[],[{range:_,options:ke[K]}])[0]:null;if(!_)return this._decorationsTree.delete(de),delete this._decorations[de.id],null;const ye=this._validateRangeRelaxedNoAllocations(_),De=this._buffer.getOffsetAt(ye.startLineNumber,ye.startColumn),qe=this._buffer.getOffsetAt(ye.endLineNumber,ye.endColumn);return this._decorationsTree.delete(de),de.reset(this.getVersionId(),De,qe,ye),de.setOptions(ke[K]),this._decorationsTree.insert(de),de.id}removeAllDecorationsWithOwnerId(h){if(this._isDisposed)return;const _=this._decorationsTree.collectNodesFromOwner(h);for(let K=0,de=_.length;K<de;K++){const ye=_[K];this._decorationsTree.delete(ye),delete this._decorations[ye.id]}}getDecorationOptions(h){const _=this._decorations[h];return _?_.options:null}getDecorationRange(h){const _=this._decorations[h];return _?this._decorationsTree.getNodeRange(this,_):null}getLineDecorations(h,_=0,K=!1){return h<1||h>this.getLineCount()?[]:this.getLinesDecorations(h,h,_,K)}getLinesDecorations(h,_,K=0,de=!1){let ye=this.getLineCount(),De=Math.min(ye,Math.max(1,h)),qe=Math.min(ye,Math.max(1,_)),ht=this.getLineMaxColumn(qe);const yt=new v.a(De,1,qe,ht),Ct=this._getDecorationsInRange(yt,K,de);return Ct.push(...this._decorationProvider.getDecorationsInRange(yt,K,de)),Ct}getDecorationsInRange(h,_=0,K=!1){let de=this.validateRange(h);const ye=this._getDecorationsInRange(de,_,K);return ye.push(...this._decorationProvider.getDecorationsInRange(de,_,K)),ye}getOverviewRulerDecorations(h=0,_=!1){return this._decorationsTree.getAll(this,h,_,!0)}getInjectedTextDecorations(h=0){return this._decorationsTree.getAllInjectedText(this,h)}_getInjectedTextInLine(h){const _=this._buffer.getOffsetAt(h,1),K=_+this._buffer.getLineLength(h),de=this._decorationsTree.getInjectedTextInInterval(this,_,K,0);return Lo.b.fromDecorations(de).filter(ye=>ye.lineNumber===h)}getAllDecorations(h=0,_=!1){let K=this._decorationsTree.getAll(this,h,_,!1);return K=K.concat(this._decorationProvider.getAllDecorations(h,_)),K}_getDecorationsInRange(h,_,K){const de=this._buffer.getOffsetAt(h.startLineNumber,h.startColumn),ye=this._buffer.getOffsetAt(h.endLineNumber,h.endColumn);return this._decorationsTree.getAllInInterval(this,de,ye,_,K)}getRangeAt(h,_){return this._buffer.getRangeAt(h,_-h)}_changeDecorationImpl(h,_){const K=this._decorations[h];if(!K)return;if(K.options.after){const qe=this.getDecorationRange(h);this._onDidChangeDecorations.recordLineAffectedByInjectedText(qe.endLineNumber)}if(K.options.before){const qe=this.getDecorationRange(h);this._onDidChangeDecorations.recordLineAffectedByInjectedText(qe.startLineNumber)}const de=this._validateRangeRelaxedNoAllocations(_),ye=this._buffer.getOffsetAt(de.startLineNumber,de.startColumn),De=this._buffer.getOffsetAt(de.endLineNumber,de.endColumn);this._decorationsTree.delete(K),K.reset(this.getVersionId(),ye,De,de),this._decorationsTree.insert(K),this._onDidChangeDecorations.checkAffectedAndFire(K.options),K.options.after&&this._onDidChangeDecorations.recordLineAffectedByInjectedText(de.endLineNumber),K.options.before&&this._onDidChangeDecorations.recordLineAffectedByInjectedText(de.startLineNumber)}_changeDecorationOptionsImpl(h,_){const K=this._decorations[h];if(!K)return;const de=!!(K.options.overviewRuler&&K.options.overviewRuler.color),ye=!!(_.overviewRuler&&_.overviewRuler.color);if(this._onDidChangeDecorations.checkAffectedAndFire(K.options),this._onDidChangeDecorations.checkAffectedAndFire(_),K.options.after||_.after){const De=this._decorationsTree.getNodeRange(this,K);this._onDidChangeDecorations.recordLineAffectedByInjectedText(De.endLineNumber)}if(K.options.before||_.before){const De=this._decorationsTree.getNodeRange(this,K);this._onDidChangeDecorations.recordLineAffectedByInjectedText(De.startLineNumber)}de!==ye?(this._decorationsTree.delete(K),K.setOptions(_),this._decorationsTree.insert(K)):K.setOptions(_)}_deltaDecorationsImpl(h,_,K){const de=this.getVersionId(),ye=_.length;let De=0;const qe=K.length;let ht=0,yt=new Array(qe);for(;De<ye||ht<qe;){let Ct=null;if(De<ye){do Ct=this._decorations[_[De++]];while(!Ct&&De<ye);if(Ct){if(Ct.options.after){const At=this._decorationsTree.getNodeRange(this,Ct);this._onDidChangeDecorations.recordLineAffectedByInjectedText(At.endLineNumber)}if(Ct.options.before){const At=this._decorationsTree.getNodeRange(this,Ct);this._onDidChangeDecorations.recordLineAffectedByInjectedText(At.startLineNumber)}this._decorationsTree.delete(Ct),this._onDidChangeDecorations.checkAffectedAndFire(Ct.options)}}if(ht<qe){if(!Ct){const Co=++this._lastDecorationId,ko=`${this._instanceId};${Co}`;Ct=new Q(ko,0,0),this._decorations[ko]=Ct}const At=K[ht],Ft=this._validateRangeRelaxedNoAllocations(At.range),Zt=ue(At.options),Yt=this._buffer.getOffsetAt(Ft.startLineNumber,Ft.startColumn),ao=this._buffer.getOffsetAt(Ft.endLineNumber,Ft.endColumn);Ct.ownerId=h,Ct.reset(de,Yt,ao,Ft),Ct.setOptions(Zt),Ct.options.after&&this._onDidChangeDecorations.recordLineAffectedByInjectedText(Ft.endLineNumber),Ct.options.before&&this._onDidChangeDecorations.recordLineAffectedByInjectedText(Ft.startLineNumber),this._onDidChangeDecorations.checkAffectedAndFire(Zt),this._decorationsTree.insert(Ct),yt[ht]=Ct.id,ht++}else Ct&&delete this._decorations[Ct.id]}return yt}setTokens(h,_=!1){if(h.length!==0){let K=[];for(let de=0,ye=h.length;de<ye;de++){const De=h[de];let qe=0,ht=0,yt=!1;for(let Ct=0,At=De.tokens.length;Ct<At;Ct++){const Ft=De.startLineNumber+Ct;if(yt)this._tokens.setTokens(this._languageId,Ft-1,this._buffer.getLineLength(Ft),De.tokens[Ct],!1),ht=Ft;else{const Zt=this._tokens.setTokens(this._languageId,Ft-1,this._buffer.getLineLength(Ft),De.tokens[Ct],!0);Zt&&(yt=!0,qe=Ft,ht=Ft)}}yt&&K.push({fromLineNumber:qe,toLineNumber:ht})}K.length>0&&this._emitModelTokensChangedEvent({tokenizationSupportChanged:!1,semanticTokensApplied:!1,ranges:K})}this.handleTokenizationProgress(_)}setSemanticTokens(h,_){this._tokens2.set(h,_),this._emitModelTokensChangedEvent({tokenizationSupportChanged:!1,semanticTokensApplied:h!==null,ranges:[{fromLineNumber:1,toLineNumber:this.getLineCount()}]})}hasCompleteSemanticTokens(){return this._tokens2.isComplete()}hasSomeSemanticTokens(){return!this._tokens2.isEmpty()}setPartialSemanticTokens(h,_){if(this.hasCompleteSemanticTokens())return;const K=this._tokens2.setPartial(h,_);this._emitModelTokensChangedEvent({tokenizationSupportChanged:!1,semanticTokensApplied:!0,ranges:[{fromLineNumber:K.startLineNumber,toLineNumber:K.endLineNumber}]})}tokenizeViewport(h,_){h=Math.max(1,h),_=Math.min(this._buffer.getLineCount(),_),this._tokenization.tokenizeViewport(h,_)}clearTokens(){this._tokens.flush(),this._emitModelTokensChangedEvent({tokenizationSupportChanged:!0,semanticTokensApplied:!1,ranges:[{fromLineNumber:1,toLineNumber:this._buffer.getLineCount()}]})}_emitModelTokensChangedEvent(h){this._isDisposing||this._onDidChangeTokens.fire(h)}resetTokenization(){this._tokenization.reset()}forceTokenization(h){if(h<1||h>this.getLineCount())throw new Error("Illegal value for lineNumber");this._tokenization.forceTokenization(h)}isCheapToTokenize(h){return this._tokenization.isCheapToTokenize(h)}tokenizeIfCheap(h){this.isCheapToTokenize(h)&&this.forceTokenization(h)}getLineTokens(h){if(h<1||h>this.getLineCount())throw new Error("Illegal value for lineNumber");return this._getLineTokens(h)}_getLineTokens(h){const _=this.getLineContent(h),K=this._tokens.getTokens(this._languageId,h-1,_);return this._tokens2.addSemanticTokens(h,K)}getLanguageId(){return this._languageId}setMode(h){if(this._languageId===h)return;let _={oldLanguage:this._languageId,newLanguage:h};this._languageId=h,this._onDidChangeLanguage.fire(_),this._onDidChangeLanguageConfiguration.fire({})}getLanguageIdAtPosition(h,_){const K=this.validatePosition(new I.a(h,_)),de=this.getLineTokens(K.lineNumber);return de.getLanguageId(de.findTokenIndexAtOffset(K.column-1))}getLanguageConfiguration(h){return this._languageConfigurationService.getLanguageConfiguration(h)}getWordAtPosition(h){this._assertNotDisposed();const _=this.validatePosition(h),K=this.getLineContent(_.lineNumber),de=this._getLineTokens(_.lineNumber),ye=de.findTokenIndexAtOffset(_.column-1),[De,qe]=f._findLanguageBoundaries(de,ye),ht=Object(Pt.d)(_.column,this.getLanguageConfiguration(de.getLanguageId(ye)).getWordDefinition(),K.substring(De,qe),De);if(ht&&ht.startColumn<=h.column&&h.column<=ht.endColumn)return ht;if(ye>0&&De===_.column-1){const[yt,Ct]=f._findLanguageBoundaries(de,ye-1),At=Object(Pt.d)(_.column,this.getLanguageConfiguration(de.getLanguageId(ye-1)).getWordDefinition(),K.substring(yt,Ct),yt);if(At&&At.startColumn<=h.column&&h.column<=At.endColumn)return At}return null}static _findLanguageBoundaries(h,_){const K=h.getLanguageId(_);let de=0;for(let De=_;De>=0&&h.getLanguageId(De)===K;De--)de=h.getStartOffset(De);let ye=h.getLineContent().length;for(let De=_,qe=h.getCount();De<qe&&h.getLanguageId(De)===K;De++)ye=h.getEndOffset(De);return[de,ye]}getWordUntilPosition(h){const _=this.getWordAtPosition(h);return _?{word:_.word.substr(0,h.column-_.startColumn),startColumn:_.startColumn,endColumn:h.column}:{word:"",startColumn:h.column,endColumn:h.column}}findMatchingBracketUp(h,_){let K=h.toLowerCase(),de=this.validatePosition(_),ye=this._getLineTokens(de.lineNumber),De=ye.getLanguageId(ye.findTokenIndexAtOffset(de.column-1)),qe=this.getLanguageConfiguration(De).brackets;if(!qe)return null;let ht=qe.textIsBracket[K];return ht?pi(this._findMatchingBracketUp(ht,de,null)):null}matchBracket(h){return this._matchBracket(this.validatePosition(h))}_establishBracketSearchOffsets(h,_,K,de){const ye=_.getCount(),De=_.getLanguageId(de);let qe=Math.max(0,h.column-1-K.maxBracketLength);for(let yt=de-1;yt>=0;yt--){const Ct=_.getEndOffset(yt);if(Ct<=qe)break;if(Object(zt.b)(_.getStandardTokenType(yt))||_.getLanguageId(yt)!==De){qe=Ct;break}}let ht=Math.min(_.getLineContent().length,h.column-1+K.maxBracketLength);for(let yt=de+1;yt<ye;yt++){const Ct=_.getStartOffset(yt);if(Ct>=ht)break;if(Object(zt.b)(_.getStandardTokenType(yt))||_.getLanguageId(yt)!==De){ht=Ct;break}}return{searchStartOffset:qe,searchEndOffset:ht}}_matchBracket(h){const _=h.lineNumber,K=this._getLineTokens(_),de=this._buffer.getLineContent(_),ye=K.findTokenIndexAtOffset(h.column-1);if(ye<0)return null;const De=this.getLanguageConfiguration(K.getLanguageId(ye)).brackets;if(De&&!Object(zt.b)(K.getStandardTokenType(ye))){let{searchStartOffset:qe,searchEndOffset:ht}=this._establishBracketSearchOffsets(h,K,De,ye),yt=null;for(;;){const Ct=so.a.findNextBracketInRange(De.forwardRegex,_,de,qe,ht);if(!Ct)break;if(Ct.startColumn<=h.column&&h.column<=Ct.endColumn){const At=de.substring(Ct.startColumn-1,Ct.endColumn-1).toLowerCase(),Ft=this._matchFoundBracket(Ct,De.textIsBracket[At],De.textIsOpenBracket[At],null);if(Ft){if(Ft instanceof Di)return null;yt=Ft}}qe=Ct.endColumn-1}if(yt)return yt}if(ye>0&&K.getStartOffset(ye)===h.column-1){const qe=ye-1,ht=this.getLanguageConfiguration(K.getLanguageId(qe)).brackets;if(ht&&!Object(zt.b)(K.getStandardTokenType(qe))){let{searchStartOffset:yt,searchEndOffset:Ct}=this._establishBracketSearchOffsets(h,K,ht,qe);const At=so.a.findPrevBracketInRange(ht.reversedRegex,_,de,yt,Ct);if(At&&At.startColumn<=h.column&&h.column<=At.endColumn){const Ft=de.substring(At.startColumn-1,At.endColumn-1).toLowerCase(),Zt=this._matchFoundBracket(At,ht.textIsBracket[Ft],ht.textIsOpenBracket[Ft],null);if(Zt)return Zt instanceof Di?null:Zt}}}return null}_matchFoundBracket(h,_,K,de){if(!_)return null;const ye=K?this._findMatchingBracketDown(_,h.getEndPosition(),de):this._findMatchingBracketUp(_,h.getStartPosition(),de);return ye?ye instanceof Di?ye:[h,ye]:null}_findMatchingBracketUp(h,_,K){const de=h.languageId,ye=h.reversedRegex;let De=-1,qe=0;const ht=(yt,Ct,At,Ft)=>{for(;;){if(K&&++qe%100===0&&!K())return Di.INSTANCE;const Zt=so.a.findPrevBracketInRange(ye,yt,Ct,At,Ft);if(!Zt)break;const Yt=Ct.substring(Zt.startColumn-1,Zt.endColumn-1).toLowerCase();if(h.isOpen(Yt)?De++:h.isClose(Yt)&&De--,De===0)return Zt;Ft=Zt.startColumn-1}return null};for(let yt=_.lineNumber;yt>=1;yt--){const Ct=this._getLineTokens(yt),At=Ct.getCount(),Ft=this._buffer.getLineContent(yt);let Zt=At-1,Yt=Ft.length,ao=Ft.length;yt===_.lineNumber&&(Zt=Ct.findTokenIndexAtOffset(_.column-1),Yt=_.column-1,ao=_.column-1);let Co=!0;for(;Zt>=0;Zt--){const ko=Ct.getLanguageId(Zt)===de&&!Object(zt.b)(Ct.getStandardTokenType(Zt));if(ko)Co?Yt=Ct.getStartOffset(Zt):(Yt=Ct.getStartOffset(Zt),ao=Ct.getEndOffset(Zt));else if(Co&&Yt!==ao){const Qo=ht(yt,Ft,Yt,ao);if(Qo)return Qo}Co=ko}if(Co&&Yt!==ao){const ko=ht(yt,Ft,Yt,ao);if(ko)return ko}}return null}_findMatchingBracketDown(h,_,K){const de=h.languageId,ye=h.forwardRegex;let De=1,qe=0;const ht=(Ct,At,Ft,Zt)=>{for(;;){if(K&&++qe%100===0&&!K())return Di.INSTANCE;const Yt=so.a.findNextBracketInRange(ye,Ct,At,Ft,Zt);if(!Yt)break;const ao=At.substring(Yt.startColumn-1,Yt.endColumn-1).toLowerCase();if(h.isOpen(ao)?De++:h.isClose(ao)&&De--,De===0)return Yt;Ft=Yt.endColumn-1}return null},yt=this.getLineCount();for(let Ct=_.lineNumber;Ct<=yt;Ct++){const At=this._getLineTokens(Ct),Ft=At.getCount(),Zt=this._buffer.getLineContent(Ct);let Yt=0,ao=0,Co=0;Ct===_.lineNumber&&(Yt=At.findTokenIndexAtOffset(_.column-1),ao=_.column-1,Co=_.column-1);let ko=!0;for(;Yt<Ft;Yt++){const Qo=At.getLanguageId(Yt)===de&&!Object(zt.b)(At.getStandardTokenType(Yt));if(Qo)ko||(ao=At.getStartOffset(Yt)),Co=At.getEndOffset(Yt);else if(ko&&ao!==Co){const yi=ht(Ct,Zt,ao,Co);if(yi)return yi}ko=Qo}if(ko&&ao!==Co){const Qo=ht(Ct,Zt,ao,Co);if(Qo)return Qo}}return null}findPrevBracket(h){const _=this.validatePosition(h);let K=null,de=null;for(let ye=_.lineNumber;ye>=1;ye--){const De=this._getLineTokens(ye),qe=De.getCount(),ht=this._buffer.getLineContent(ye);let yt=qe-1,Ct=ht.length,At=ht.length;if(ye===_.lineNumber){yt=De.findTokenIndexAtOffset(_.column-1),Ct=_.column-1,At=_.column-1;const Zt=De.getLanguageId(yt);K!==Zt&&(K=Zt,de=this.getLanguageConfiguration(K).brackets)}let Ft=!0;for(;yt>=0;yt--){const Zt=De.getLanguageId(yt);if(K!==Zt){if(de&&Ft&&Ct!==At){const ao=so.a.findPrevBracketInRange(de.reversedRegex,ye,ht,Ct,At);if(ao)return this._toFoundBracket(de,ao);Ft=!1}K=Zt,de=this.getLanguageConfiguration(K).brackets}const Yt=!!de&&!Object(zt.b)(De.getStandardTokenType(yt));if(Yt)Ft?Ct=De.getStartOffset(yt):(Ct=De.getStartOffset(yt),At=De.getEndOffset(yt));else if(de&&Ft&&Ct!==At){const ao=so.a.findPrevBracketInRange(de.reversedRegex,ye,ht,Ct,At);if(ao)return this._toFoundBracket(de,ao)}Ft=Yt}if(de&&Ft&&Ct!==At){const Zt=so.a.findPrevBracketInRange(de.reversedRegex,ye,ht,Ct,At);if(Zt)return this._toFoundBracket(de,Zt)}}return null}findNextBracket(h){const _=this.validatePosition(h),K=this.getLineCount();let de=null,ye=null;for(let De=_.lineNumber;De<=K;De++){const qe=this._getLineTokens(De),ht=qe.getCount(),yt=this._buffer.getLineContent(De);let Ct=0,At=0,Ft=0;if(De===_.lineNumber){Ct=qe.findTokenIndexAtOffset(_.column-1),At=_.column-1,Ft=_.column-1;const Yt=qe.getLanguageId(Ct);de!==Yt&&(de=Yt,ye=this.getLanguageConfiguration(de).brackets)}let Zt=!0;for(;Ct<ht;Ct++){const Yt=qe.getLanguageId(Ct);if(de!==Yt){if(ye&&Zt&&At!==Ft){const Co=so.a.findNextBracketInRange(ye.forwardRegex,De,yt,At,Ft);if(Co)return this._toFoundBracket(ye,Co);Zt=!1}de=Yt,ye=this.getLanguageConfiguration(de).brackets}const ao=!!ye&&!Object(zt.b)(qe.getStandardTokenType(Ct));if(ao)Zt||(At=qe.getStartOffset(Ct)),Ft=qe.getEndOffset(Ct);else if(ye&&Zt&&At!==Ft){const Co=so.a.findNextBracketInRange(ye.forwardRegex,De,yt,At,Ft);if(Co)return this._toFoundBracket(ye,Co)}Zt=ao}if(ye&&Zt&&At!==Ft){const Yt=so.a.findNextBracketInRange(ye.forwardRegex,De,yt,At,Ft);if(Yt)return this._toFoundBracket(ye,Yt)}}return null}findEnclosingBrackets(h,_){let K;if(typeof _=="undefined")K=null;else{const Zt=Date.now();K=()=>Date.now()-Zt<=_}const de=this.validatePosition(h),ye=this.getLineCount(),De=new Map;let qe=[];const ht=(Zt,Yt)=>{if(!De.has(Zt)){let ao=[];for(let Co=0,ko=Yt?Yt.brackets.length:0;Co<ko;Co++)ao[Co]=0;De.set(Zt,ao)}qe=De.get(Zt)};let yt=0;const Ct=(Zt,Yt,ao,Co,ko)=>{for(;;){if(K&&++yt%100===0&&!K())return Di.INSTANCE;const Qo=so.a.findNextBracketInRange(Zt.forwardRegex,Yt,ao,Co,ko);if(!Qo)break;const yi=ao.substring(Qo.startColumn-1,Qo.endColumn-1).toLowerCase(),Ko=Zt.textIsBracket[yi];if(Ko&&(Ko.isOpen(yi)?qe[Ko.index]++:Ko.isClose(yi)&&qe[Ko.index]--,qe[Ko.index]===-1))return this._matchFoundBracket(Qo,Ko,!1,K);Co=Qo.endColumn-1}return null};let At=null,Ft=null;for(let Zt=de.lineNumber;Zt<=ye;Zt++){const Yt=this._getLineTokens(Zt),ao=Yt.getCount(),Co=this._buffer.getLineContent(Zt);let ko=0,Qo=0,yi=0;if(Zt===de.lineNumber){ko=Yt.findTokenIndexAtOffset(de.column-1),Qo=de.column-1,yi=de.column-1;const li=Yt.getLanguageId(ko);At!==li&&(At=li,Ft=this.getLanguageConfiguration(At).brackets,ht(At,Ft))}let Ko=!0;for(;ko<ao;ko++){const li=Yt.getLanguageId(ko);if(At!==li){if(Ft&&Ko&&Qo!==yi){const xi=Ct(Ft,Zt,Co,Qo,yi);if(xi)return pi(xi);Ko=!1}At=li,Ft=this.getLanguageConfiguration(At).brackets,ht(At,Ft)}const Ki=!!Ft&&!Object(zt.b)(Yt.getStandardTokenType(ko));if(Ki)Ko||(Qo=Yt.getStartOffset(ko)),yi=Yt.getEndOffset(ko);else if(Ft&&Ko&&Qo!==yi){const xi=Ct(Ft,Zt,Co,Qo,yi);if(xi)return pi(xi)}Ko=Ki}if(Ft&&Ko&&Qo!==yi){const li=Ct(Ft,Zt,Co,Qo,yi);if(li)return pi(li)}}return null}_toFoundBracket(h,_){if(!_)return null;let K=this.getValueInRange(_);K=K.toLowerCase();let de=h.textIsBracket[K];return de?{range:_,open:de.open,close:de.close,isOpen:h.textIsOpenBracket[K]}:null}static computeIndentLevel(h,_){let K=0,de=0,ye=h.length;for(;de<ye;){let De=h.charCodeAt(de);if(De===32)K++;else if(De===9)K=K-K%_+_;else break;de++}return de===ye?-1:K}_computeIndentLevel(h){return f.computeIndentLevel(this._buffer.getLineContent(h+1),this._options.tabSize)}getActiveIndentGuide(h,_,K){this._assertNotDisposed();const de=this.getLineCount();if(h<1||h>de)throw new Error("Illegal value for lineNumber");const ye=this.getLanguageConfiguration(this._languageId).foldingRules,De=Boolean(ye&&ye.offSide);let qe=-2,ht=-1,yt=-2,Ct=-1;const At=xi=>{if(qe!==-1&&(qe===-2||qe>xi-1)){qe=-1,ht=-1;for(let Ni=xi-2;Ni>=0;Ni--){let Ti=this._computeIndentLevel(Ni);if(Ti>=0){qe=Ni,ht=Ti;break}}}if(yt===-2){yt=-1,Ct=-1;for(let Ni=xi;Ni<de;Ni++){let Ti=this._computeIndentLevel(Ni);if(Ti>=0){yt=Ni,Ct=Ti;break}}}};let Ft=-2,Zt=-1,Yt=-2,ao=-1;const Co=xi=>{if(Ft===-2){Ft=-1,Zt=-1;for(let Ni=xi-2;Ni>=0;Ni--){let Ti=this._computeIndentLevel(Ni);if(Ti>=0){Ft=Ni,Zt=Ti;break}}}if(Yt!==-1&&(Yt===-2||Yt<xi-1)){Yt=-1,ao=-1;for(let Ni=xi;Ni<de;Ni++){let Ti=this._computeIndentLevel(Ni);if(Ti>=0){Yt=Ni,ao=Ti;break}}}};let ko=0,Qo=!0,yi=0,Ko=!0,li=0,Ki=0;for(let xi=0;Qo||Ko;xi++){const Ni=h-xi,Ti=h+xi;xi>1&&(Ni<1||Ni<_)&&(Qo=!1),xi>1&&(Ti>de||Ti>K)&&(Ko=!1),xi>5e4&&(Qo=!1,Ko=!1);let wn=-1;if(Qo){const En=this._computeIndentLevel(Ni-1);En>=0?(yt=Ni-1,Ct=En,wn=Math.ceil(En/this._options.indentSize)):(At(Ni),wn=this._getIndentLevelForWhitespaceLine(De,ht,Ct))}let yn=-1;if(Ko){const En=this._computeIndentLevel(Ti-1);En>=0?(Ft=Ti-1,Zt=En,yn=Math.ceil(En/this._options.indentSize)):(Co(Ti),yn=this._getIndentLevelForWhitespaceLine(De,Zt,ao))}if(xi===0){Ki=wn;continue}if(xi===1){if(Ti<=de&&yn>=0&&Ki+1===yn){Qo=!1,ko=Ti,yi=Ti,li=yn;continue}if(Ni>=1&&wn>=0&&wn-1===Ki){Ko=!1,ko=Ni,yi=Ni,li=wn;continue}if(ko=h,yi=h,li=Ki,li===0)return{startLineNumber:ko,endLineNumber:yi,indent:li}}Qo&&(wn>=li?ko=Ni:Qo=!1),Ko&&(yn>=li?yi=Ti:Ko=!1)}return{startLineNumber:ko,endLineNumber:yi,indent:li}}getLinesBracketGuides(h,_,K,de){var ye,De,qe,ht,yt;const Ct=[],At=this._bracketPairColorizer.getBracketPairsInRangeWithMinIndentation(new v.a(h,1,_,this.getLineMaxColumn(_)));let Ft;if(K&&At.length>0){const ko=h<=K.lineNumber&&K.lineNumber<=_?At.filter(Qo=>Qo.range.containsPosition(K)):this._bracketPairColorizer.getBracketPairsInRange(v.a.fromPositions(K));Ft=(ye=Object(To.i)(ko,Qo=>Qo.range.startLineNumber!==Qo.range.endLineNumber))===null||ye===void 0?void 0:ye.range}const Zt=new To.a(At),Yt=new Array,ao=new Array,Co=new In;for(let ko=h;ko<=_;ko++){let Qo=new Array;ao.length>0&&(Qo=Qo.concat(ao),ao.length=0),Ct.push(Qo);for(const Ko of Zt.takeWhile(li=>li.openingBracketRange.startLineNumber<=ko)||[]){if(Ko.range.startLineNumber===Ko.range.endLineNumber)continue;const li=Math.min(this.getVisibleColumnFromPosition(Ko.openingBracketRange.getStartPosition()),this.getVisibleColumnFromPosition((qe=(De=Ko.closingBracketRange)===null||De===void 0?void 0:De.getStartPosition())!==null&&qe!==void 0?qe:Ko.range.getEndPosition()),Ko.minVisibleColumnIndentation+1);let Ki=!1;if(Ko.closingBracketRange){const Ti=R.u(this.getLineContent(Ko.closingBracketRange.startLineNumber));Ti<Ko.closingBracketRange.startColumn-1&&(Ki=!0)}const xi=Ko.openingBracketRange.getStartPosition(),Ni=(yt=(ht=Ko.closingBracketRange)===null||ht===void 0?void 0:ht.getStartPosition())!==null&&yt!==void 0?yt:Ko.range.getEndPosition();Ko.closingBracketRange===void 0?Yt[Ko.nestingLevel]=null:Yt[Ko.nestingLevel]={nestingLevel:Ko.nestingLevel,guideVisibleColumn:li,start:xi,visibleStartColumn:this.getVisibleColumnFromPosition(xi),end:Ni,visibleEndColumn:this.getVisibleColumnFromPosition(Ni),bracketPair:Ko,renderHorizontalEndLineAtTheBottom:Ki}}for(const Ko of Yt){if(!Ko)continue;const li=Ft&&Ko.bracketPair.range.equalsRange(Ft),Ki=Co.getInlineClassNameOfLevel(Ko.nestingLevel)+(de.highlightActive&&li?" "+Co.activeClassName:"");(li&&de.horizontalGuides!==m.c.Disabled||de.includeInactive&&de.horizontalGuides===m.c.Enabled)&&(Ko.start.lineNumber===ko&&(Ko.guideVisibleColumn<Ko.visibleStartColumn&&Qo.push(new m.d(Ko.guideVisibleColumn,Ki,new m.e(!1,Ko.start.column)))),Ko.end.lineNumber===ko+1&&(Ko.guideVisibleColumn<Ko.visibleEndColumn&&ao.push(new m.d(Ko.guideVisibleColumn,Ki,new m.e(!Ko.renderHorizontalEndLineAtTheBottom,Ko.end.column)))))}let yi=Number.MAX_SAFE_INTEGER;for(let Ko=Yt.length-1;Ko>=0;Ko--){const li=Yt[Ko];if(!li)continue;const Ki=de.highlightActive&&Ft&&li.bracketPair.range.equalsRange(Ft),xi=Co.getInlineClassNameOfLevel(li.nestingLevel)+(Ki?" "+Co.activeClassName:"");if((Ki||de.includeInactive)&&(li.renderHorizontalEndLineAtTheBottom&&li.end.lineNumber===ko+1&&ao.push(new m.d(li.guideVisibleColumn,xi,null))),li.end.lineNumber<=ko||li.start.lineNumber>=ko)continue;if(li.guideVisibleColumn>=yi&&!Ki)continue;yi=li.guideVisibleColumn,(Ki||de.includeInactive)&&Qo.push(new m.d(li.guideVisibleColumn,xi,null))}Qo.sort((Ko,li)=>Ko.visibleColumn-li.visibleColumn)}return Ct}getVisibleColumnFromPosition(h){return Zi.a.visibleColumnFromColumn(this.getLineContent(h.lineNumber),h.column,this._options.tabSize)+1}getLinesIndentGuides(h,_){this._assertNotDisposed();const K=this.getLineCount();if(h<1||h>K)throw new Error("Illegal value for startLineNumber");if(_<1||_>K)throw new Error("Illegal value for endLineNumber");const de=this.getLanguageConfiguration(this._languageId).foldingRules,ye=Boolean(de&&de.offSide);let De=new Array(_-h+1),qe=-2,ht=-1,yt=-2,Ct=-1;for(let At=h;At<=_;At++){let Ft=At-h;const Zt=this._computeIndentLevel(At-1);if(Zt>=0){qe=At-1,ht=Zt,De[Ft]=Math.ceil(Zt/this._options.indentSize);continue}if(qe===-2){qe=-1,ht=-1;for(let Yt=At-2;Yt>=0;Yt--){let ao=this._computeIndentLevel(Yt);if(ao>=0){qe=Yt,ht=ao;break}}}if(yt!==-1&&(yt===-2||yt<At-1)){yt=-1,Ct=-1;for(let Yt=At;Yt<K;Yt++){let ao=this._computeIndentLevel(Yt);if(ao>=0){yt=Yt,Ct=ao;break}}}De[Ft]=this._getIndentLevelForWhitespaceLine(ye,ht,Ct)}return De}_getIndentLevelForWhitespaceLine(h,_,K){return _===-1||K===-1?0:_<K?1+Math.floor(_/this._options.indentSize):_===K?Math.ceil(K/this._options.indentSize):h?Math.ceil(K/this._options.indentSize):1+Math.floor(K/this._options.indentSize)}normalizePosition(h,_){return h}getLineIndentColumn(h){return fn(this.getLineContent(h))+1}};Wi.MODEL_SYNC_LIMIT=50*1024*1024,Wi.LARGE_FILE_SIZE_THRESHOLD=20*1024*1024,Wi.LARGE_FILE_LINE_COUNT_THRESHOLD=300*1e3,Wi.DEFAULT_CREATION_OPTIONS={isForSimpleWidget:!1,tabSize:j.d.tabSize,indentSize:j.d.indentSize,insertSpaces:j.d.insertSpaces,detectIndentation:!1,defaultEOL:1,trimAutoWhitespace:j.d.trimAutoWhitespace,largeFileOptimizations:j.d.largeFileOptimizations,bracketPairColorizationOptions:j.d.bracketPairColorizationOptions},Wi=mo([Io(4,No.a),Io(5,ho.a),Io(6,Wt.a)],Wi);function fn(f){let h=0;for(const _ of f)if(_===" "||_===" ")h++;else break;return h}class In{constructor(){this.activeClassName="indent-active"}getInlineClassNameOfLevel(f){return`bracket-indent-guide lvl-${f%30}`}}function an(f){return!!(f.options.overviewRuler&&f.options.overviewRuler.color)}function bn(f){return!!f.options.after||!!f.options.before}class Wn{constructor(){this._decorationsTree0=new z,this._decorationsTree1=new z,this._injectedTextDecorationsTree=new z}ensureAllNodesHaveRanges(f){this.getAll(f,0,!1,!1)}_ensureNodesHaveRanges(f,h){for(const _ of h)_.range===null&&(_.range=f.getRangeAt(_.cachedAbsoluteStart,_.cachedAbsoluteEnd));return h}getAllInInterval(f,h,_,K,de){const ye=f.getVersionId(),De=this._intervalSearch(h,_,K,de,ye);return this._ensureNodesHaveRanges(f,De)}_intervalSearch(f,h,_,K,de){const ye=this._decorationsTree0.intervalSearch(f,h,_,K,de),De=this._decorationsTree1.intervalSearch(f,h,_,K,de),qe=this._injectedTextDecorationsTree.intervalSearch(f,h,_,K,de);return ye.concat(De).concat(qe)}getInjectedTextInInterval(f,h,_,K){const de=f.getVersionId(),ye=this._injectedTextDecorationsTree.intervalSearch(h,_,K,!1,de);return this._ensureNodesHaveRanges(f,ye).filter(De=>De.options.showIfCollapsed||!De.range.isEmpty())}getAllInjectedText(f,h){const _=f.getVersionId(),K=this._injectedTextDecorationsTree.search(h,!1,_);return this._ensureNodesHaveRanges(f,K).filter(de=>de.options.showIfCollapsed||!de.range.isEmpty())}getAll(f,h,_,K){const de=f.getVersionId(),ye=this._search(h,_,K,de);return this._ensureNodesHaveRanges(f,ye)}_search(f,h,_,K){if(_)return this._decorationsTree1.search(f,h,K);{const de=this._decorationsTree0.search(f,h,K),ye=this._decorationsTree1.search(f,h,K),De=this._injectedTextDecorationsTree.search(f,h,K);return de.concat(ye).concat(De)}}collectNodesFromOwner(f){const h=this._decorationsTree0.collectNodesFromOwner(f),_=this._decorationsTree1.collectNodesFromOwner(f),K=this._injectedTextDecorationsTree.collectNodesFromOwner(f);return h.concat(_).concat(K)}collectNodesPostOrder(){const f=this._decorationsTree0.collectNodesPostOrder(),h=this._decorationsTree1.collectNodesPostOrder(),_=this._injectedTextDecorationsTree.collectNodesPostOrder();return f.concat(h).concat(_)}insert(f){bn(f)?this._injectedTextDecorationsTree.insert(f):an(f)?this._decorationsTree1.insert(f):this._decorationsTree0.insert(f)}delete(f){bn(f)?this._injectedTextDecorationsTree.delete(f):an(f)?this._decorationsTree1.delete(f):this._decorationsTree0.delete(f)}getNodeRange(f,h){const _=f.getVersionId();return h.cachedVersionId!==_&&this._resolveNode(h,_),h.range===null&&(h.range=f.getRangeAt(h.cachedAbsoluteStart,h.cachedAbsoluteEnd)),h.range}_resolveNode(f,h){bn(f)?this._injectedTextDecorationsTree.resolveNode(f,h):an(f)?this._decorationsTree1.resolveNode(f,h):this._decorationsTree0.resolveNode(f,h)}acceptReplace(f,h,_,K){this._decorationsTree0.acceptReplace(f,h,_,K),this._decorationsTree1.acceptReplace(f,h,_,K),this._injectedTextDecorationsTree.acceptReplace(f,h,_,K)}}function gn(f){return f.replace(/[^a-z0-9\-_]/gi," ")}class $n{constructor(f){this.color=f.color||"",this.darkColor=f.darkColor||""}}class Un extends $n{constructor(f){super(f);this._resolvedColor=null,this.position=typeof f.position=="number"?f.position:m.g.Center}getColor(f){return this._resolvedColor||(f.type!=="light"&&this.darkColor?this._resolvedColor=this._resolveColor(this.darkColor,f):this._resolvedColor=this._resolveColor(this.color,f)),this._resolvedColor}invalidateCachedColor(){this._resolvedColor=null}_resolveColor(f,h){if(typeof f=="string")return f;let _=f?h.getColor(f.id):null;return _?_.toString():""}}class qo extends $n{constructor(f){super(f);this.position=f.position}getColor(f){return this._resolvedColor||(f.type!=="light"&&this.darkColor?this._resolvedColor=this._resolveColor(this.darkColor,f):this._resolvedColor=this._resolveColor(this.color,f)),this._resolvedColor}invalidateCachedColor(){this._resolvedColor=void 0}_resolveColor(f,h){return typeof f=="string"?wo.a.fromHex(f):h.getColor(f.id)}}class oo{constructor(f){this.content=f.content||"",this.inlineClassName=f.inlineClassName||null,this.inlineClassNameAffectsLetterSpacing=f.inlineClassNameAffectsLetterSpacing||!1}static from(f){return f instanceof oo?f:new oo(f)}}class So{constructor(f){this.description=f.description,this.stickiness=f.stickiness||0,this.zIndex=f.zIndex||0,this.className=f.className?gn(f.className):null,this.hoverMessage=f.hoverMessage||null,this.glyphMarginHoverMessage=f.glyphMarginHoverMessage||null,this.isWholeLine=f.isWholeLine||!1,this.showIfCollapsed=f.showIfCollapsed||!1,this.collapseOnReplaceEdit=f.collapseOnReplaceEdit||!1,this.overviewRuler=f.overviewRuler?new Un(f.overviewRuler):null,this.minimap=f.minimap?new qo(f.minimap):null,this.glyphMarginClassName=f.glyphMarginClassName?gn(f.glyphMarginClassName):null,this.linesDecorationsClassName=f.linesDecorationsClassName?gn(f.linesDecorationsClassName):null,this.firstLineDecorationClassName=f.firstLineDecorationClassName?gn(f.firstLineDecorationClassName):null,this.marginClassName=f.marginClassName?gn(f.marginClassName):null,this.inlineClassName=f.inlineClassName?gn(f.inlineClassName):null,this.inlineClassNameAffectsLetterSpacing=f.inlineClassNameAffectsLetterSpacing||!1,this.beforeContentClassName=f.beforeContentClassName?gn(f.beforeContentClassName):null,this.afterContentClassName=f.afterContentClassName?gn(f.afterContentClassName):null,this.after=f.after?oo.from(f.after):null,this.before=f.before?oo.from(f.before):null}static register(f){return new So(f)}static createDynamic(f){return new So(f)}}So.EMPTY=So.register({description:"empty"});const ke=[So.register({description:"tracked-range-always-grows-when-typing-at-edges",stickiness:0}),So.register({description:"tracked-range-never-grows-when-typing-at-edges",stickiness:1}),So.register({description:"tracked-range-grows-only-when-typing-before",stickiness:2}),So.register({description:"tracked-range-grows-only-when-typing-after",stickiness:3})];function ue(f){return f instanceof So?f:So.createDynamic(f)}class Fe extends x.a{constructor(f){super();this.handleBeforeFire=f,this._actual=this._register(new B.b),this.event=this._actual.event,this._affectedInjectedTextLines=null,this._deferredCnt=0,this._shouldFire=!1,this._affectsMinimap=!1,this._affectsOverviewRuler=!1}beginDeferredEmit(){this._deferredCnt++}endDeferredEmit(){var f;if(this._deferredCnt--,this._deferredCnt===0){if(this._shouldFire){this.handleBeforeFire(this._affectedInjectedTextLines);const h={affectsMinimap:this._affectsMinimap,affectsOverviewRuler:this._affectsOverviewRuler};this._shouldFire=!1,this._affectsMinimap=!1,this._affectsOverviewRuler=!1,this._actual.fire(h)}(f=this._affectedInjectedTextLines)===null||f===void 0||f.clear(),this._affectedInjectedTextLines=null}}recordLineAffectedByInjectedText(f){this._affectedInjectedTextLines||(this._affectedInjectedTextLines=new Set),this._affectedInjectedTextLines.add(f)}checkAffectedAndFire(f){this._affectsMinimap||(this._affectsMinimap=!!(f.minimap&&f.minimap.position)),this._affectsOverviewRuler||(this._affectsOverviewRuler=!!(f.overviewRuler&&f.overviewRuler.color)),this._shouldFire=!0}fire(){this._affectsMinimap=!0,this._affectsOverviewRuler=!0,this._shouldFire=!0}}class et extends x.a{constructor(){super();this._fastEmitter=this._register(new B.b),this.fastEvent=this._fastEmitter.event,this._slowEmitter=this._register(new B.b),this.slowEvent=this._slowEmitter.event,this._deferredCnt=0,this._deferredEvent=null}beginDeferredEmit(){this._deferredCnt++}endDeferredEmit(f=null){if(this._deferredCnt--,this._deferredCnt===0&&this._deferredEvent!==null){this._deferredEvent.rawContentChangedEvent.resultingSelection=f;const h=this._deferredEvent;this._deferredEvent=null,this._fastEmitter.fire(h),this._slowEmitter.fire(h)}}fire(f){if(this._deferredCnt>0){this._deferredEvent?this._deferredEvent=this._deferredEvent.merge(f):this._deferredEvent=f;return}this._fastEmitter.fire(f),this._slowEmitter.fire(f)}}},tXSY:function(mt,M,t){"use strict";t.r(M),t.d(M,"SnippetController2",function(){return r});var g=t("pmY6"),B=t("sswD"),x=t("aokT"),R=t("gCVg"),A=t("wQH0"),j=t("QVNv"),I=t("3/fG"),v=t("T8No"),C=t("09fa"),m=t("WaSP"),d=function(b,u,c,p){var S=arguments.length,E=S<3?u:p===null?p=Object.getOwnPropertyDescriptor(u,c):p,y;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")E=Reflect.decorate(b,u,c,p);else for(var O=b.length-1;O>=0;O--)(y=b[O])&&(E=(S<3?y(E):S>3?y(u,c,E):y(u,c))||E);return S>3&&E&&Object.defineProperty(u,c,E),E},D=function(b,u){return function(c,p){u(c,p,b)}};const L={overwriteBefore:0,overwriteAfter:0,undoStopBefore:!0,undoStopAfter:!0,adjustWhitespace:!0,clipboardText:void 0,overtypingCapturer:void 0};let r=class b{constructor(u,c,p){this._editor=u,this._logService=c,this._snippetListener=new g.b,this._modelVersionId=-1,this._inSnippet=b.InSnippetMode.bindTo(p),this._hasNextTabstop=b.HasNextTabstop.bindTo(p),this._hasPrevTabstop=b.HasPrevTabstop.bindTo(p)}static get(u){return u.getContribution(b.ID)}dispose(){var u;this._inSnippet.reset(),this._hasPrevTabstop.reset(),this._hasNextTabstop.reset(),(u=this._session)===null||u===void 0||u.dispose(),this._snippetListener.dispose()}insert(u,c){try{this._doInsert(u,typeof c=="undefined"?L:Object.assign(Object.assign({},L),c))}catch(p){this.cancel(),this._logService.error(p),this._logService.error("snippet_error"),this._logService.error("insert_template=",u),this._logService.error("existing_template=",this._session?this._session._logInfo():"<no_session>")}}_doInsert(u,c){if(!this._editor.hasModel())return;this._snippetListener.clear(),c.undoStopBefore&&this._editor.getModel().pushStackElement(),this._session?this._session.merge(u,c):(this._modelVersionId=this._editor.getModel().getAlternativeVersionId(),this._session=new m.a(this._editor,u,c),this._session.insert()),c.undoStopAfter&&this._editor.getModel().pushStackElement(),this._updateState(),this._snippetListener.add(this._editor.onDidChangeModelContent(p=>p.isFlush&&this.cancel())),this._snippetListener.add(this._editor.onDidChangeModel(()=>this.cancel())),this._snippetListener.add(this._editor.onDidChangeCursorSelection(()=>this._updateState()))}_updateState(){if(!this._session||!this._editor.hasModel())return;if(this._modelVersionId===this._editor.getModel().getAlternativeVersionId())return this.cancel();if(!this._session.hasPlaceholder)return this.cancel();if(this._session.isAtLastPlaceholder||!this._session.isSelectionWithinPlaceholders())return this.cancel();this._inSnippet.set(!0),this._hasPrevTabstop.set(!this._session.isAtFirstPlaceholder),this._hasNextTabstop.set(!this._session.isAtLastPlaceholder),this._handleChoice()}_handleChoice(){if(!this._session||!this._editor.hasModel()){this._currentChoice=void 0;return}const{choice:u}=this._session;if(!u){this._currentChoice=void 0;return}if(this._currentChoice!==u){this._currentChoice=u,this._editor.setSelections(this._editor.getSelections().map(p=>R.a.fromPositions(p.getStartPosition())));const[c]=u.options;Object(j.f)(this._editor,u.options.map((p,S)=>({kind:13,label:p.value,insertText:p.value,sortText:"a".repeat(S+1),range:x.a.fromPositions(this._editor.getPosition(),this._editor.getPosition().delta(0,c.value.length))})))}}finish(){for(;this._inSnippet.get();)this.next()}cancel(u=!1){var c;this._inSnippet.reset(),this._hasPrevTabstop.reset(),this._hasNextTabstop.reset(),this._snippetListener.clear(),(c=this._session)===null||c===void 0||c.dispose(),this._session=void 0,this._modelVersionId=-1,u&&this._editor.setSelections([this._editor.getSelection()])}prev(){this._session&&this._session.prev(),this._updateState()}next(){this._session&&this._session.next(),this._updateState()}isInSnippet(){return Boolean(this._inSnippet.get())}};r.ID="snippetController2",r.InSnippetMode=new v.c("inSnippetMode",!1,Object(I.a)("inSnippetMode","Whether the editor in current in snippet mode")),r.HasNextTabstop=new v.c("hasNextTabstop",!1,Object(I.a)("hasNextTabstop","Whether there is a next tab stop when in snippet mode")),r.HasPrevTabstop=new v.c("hasPrevTabstop",!1,Object(I.a)("hasPrevTabstop","Whether there is a previous tab stop when in snippet mode")),r=d([D(1,C.b),D(2,v.b)],r),Object(B.l)(r.ID,r);const w=B.c.bindToContribution(r.get);Object(B.k)(new w({id:"jumpToNextSnippetPlaceholder",precondition:v.a.and(r.InSnippetMode,r.HasNextTabstop),handler:b=>b.next(),kbOpts:{weight:100+30,kbExpr:A.a.editorTextFocus,primary:2}})),Object(B.k)(new w({id:"jumpToPrevSnippetPlaceholder",precondition:v.a.and(r.InSnippetMode,r.HasPrevTabstop),handler:b=>b.prev(),kbOpts:{weight:100+30,kbExpr:A.a.editorTextFocus,primary:1024|2}})),Object(B.k)(new w({id:"leaveSnippet",precondition:r.InSnippetMode,handler:b=>b.cancel(!0),kbOpts:{weight:100+30,kbExpr:A.a.editorTextFocus,primary:9,secondary:[1024|9]}})),Object(B.k)(new w({id:"acceptSnippet",precondition:r.InSnippetMode,handler:b=>b.finish()}))},tYmi:function(mt,M,t){"use strict";t.d(M,"c",function(){return x}),t.d(M,"b",function(){return A}),t.d(M,"a",function(){return I});var g=t("MNsG"),B=t("bY76"),x;(function(v){v.inMemory="inmemory",v.vscode="vscode",v.internal="private",v.walkThrough="walkThrough",v.walkThroughSnippet="walkThroughSnippet",v.http="http",v.https="https",v.file="file",v.mailto="mailto",v.untitled="untitled",v.data="data",v.command="command",v.vscodeRemote="vscode-remote",v.vscodeRemoteResource="vscode-remote-resource",v.userData="vscode-userdata",v.vscodeCustomEditor="vscode-custom-editor",v.vscodeNotebook="vscode-notebook",v.vscodeNotebookCell="vscode-notebook-cell",v.vscodeNotebookCellMetadata="vscode-notebook-cell-metadata",v.vscodeNotebookCellOutput="vscode-notebook-cell-output",v.vscodeInteractive="vscode-interactive",v.vscodeInteractiveInput="vscode-interactive-input",v.vscodeSettings="vscode-settings",v.vscodeWorkspaceTrust="vscode-workspace-trust",v.vscodeTerminal="vscode-terminal",v.webviewPanel="webview-panel",v.vscodeWebview="vscode-webview",v.extension="extension",v.vscodeFileResource="vscode-file",v.tmp="tmp"})(x||(x={}));class R{constructor(){this._hosts=Object.create(null),this._ports=Object.create(null),this._connectionTokens=Object.create(null),this._preferredWebSchema="http",this._delegate=null}setPreferredWebSchema(v){this._preferredWebSchema=v}rewrite(v){if(this._delegate)return this._delegate(v);const C=v.authority;let m=this._hosts[C];m&&m.indexOf(":")!==-1&&(m=`[${m}]`);const d=this._ports[C],D=this._connectionTokens[C];let L=`path=${encodeURIComponent(v.path)}`;return typeof D=="string"&&(L+=`&tkn=${encodeURIComponent(D)}`),B.a.from({scheme:g.h?this._preferredWebSchema:x.vscodeRemoteResource,authority:`${m}:${d}`,path:"/vscode-remote-resource",query:L})}}const A=new R;class j{asBrowserUri(v,C){const m=this.toUri(v,C);return m.scheme===x.vscodeRemote?A.rewrite(m):m.scheme===x.file&&(g.g||typeof g.b.importScripts=="function"&&g.b.origin===`${x.vscodeFileResource}://${j.FALLBACK_AUTHORITY}`)?m.with({scheme:x.vscodeFileResource,authority:m.authority||j.FALLBACK_AUTHORITY,query:null,fragment:null}):m}toUri(v,C){return B.a.isUri(v)?v:B.a.parse(C.toUrl(v))}}j.FALLBACK_AUTHORITY="vscode-app";const I=new j},ttT4:function(mt,M){/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */M.read=function(t,g,B,x,R){var A,j,I=R*8-x-1,v=(1<<I)-1,C=v>>1,m=-7,d=B?R-1:0,D=B?-1:1,L=t[g+d];for(d+=D,A=L&(1<<-m)-1,L>>=-m,m+=I;m>0;A=A*256+t[g+d],d+=D,m-=8);for(j=A&(1<<-m)-1,A>>=-m,m+=x;m>0;j=j*256+t[g+d],d+=D,m-=8);if(A===0)A=1-C;else{if(A===v)return j?NaN:(L?-1:1)*Infinity;j=j+Math.pow(2,x),A=A-C}return(L?-1:1)*j*Math.pow(2,A-x)},M.write=function(t,g,B,x,R,A){var j,I,v,C=A*8-R-1,m=(1<<C)-1,d=m>>1,D=R===23?Math.pow(2,-24)-Math.pow(2,-77):0,L=x?0:A-1,r=x?1:-1,w=g<0||g===0&&1/g<0?1:0;for(g=Math.abs(g),isNaN(g)||g===Infinity?(I=isNaN(g)?1:0,j=m):(j=Math.floor(Math.log(g)/Math.LN2),g*(v=Math.pow(2,-j))<1&&(j--,v*=2),j+d>=1?g+=D/v:g+=D*Math.pow(2,1-d),g*v>=2&&(j++,v/=2),j+d>=m?(I=0,j=m):j+d>=1?(I=(g*v-1)*Math.pow(2,R),j=j+d):(I=g*Math.pow(2,d-1)*Math.pow(2,R),j=0));R>=8;t[B+L]=I&255,L+=r,I/=256,R-=8);for(j=j<<R|I,C+=R;C>0;t[B+L]=j&255,L+=r,j/=256,C-=8);t[B+L-r]|=w*128}},twdY:function(mt,M,t){"use strict";t.d(M,"D",function(){return v}),t.d(M,"H",function(){return C}),t.d(M,"G",function(){return m}),t.d(M,"s",function(){return d}),t.d(M,"B",function(){return D}),t.d(M,"h",function(){return L}),t.d(M,"I",function(){return r}),t.d(M,"C",function(){return w}),t.d(M,"n",function(){return b}),t.d(M,"x",function(){return c}),t.d(M,"y",function(){return p}),t.d(M,"d",function(){return S}),t.d(M,"t",function(){return E}),t.d(M,"A",function(){return y}),t.d(M,"p",function(){return O}),t.d(M,"m",function(){return k}),t.d(M,"i",function(){return Q}),t.d(M,"v",function(){return q}),t.d(M,"f",function(){return z}),t.d(M,"e",function(){return J}),t.d(M,"q",function(){return re}),t.d(M,"F",function(){return Z}),t.d(M,"b",function(){return ne}),t.d(M,"r",function(){return le}),t.d(M,"a",function(){return _e}),t.d(M,"g",function(){return Ce}),t.d(M,"j",function(){return oe}),t.d(M,"w",function(){return ae}),t.d(M,"u",function(){return V}),t.d(M,"c",function(){return G}),t.d(M,"z",function(){return ee}),t.d(M,"o",function(){return pe}),t.d(M,"l",function(){return Te}),t.d(M,"k",function(){return Ie}),t.d(M,"E",function(){return Me});var g=t("bY76"),B=t("aokT"),x=t("al33"),R=t("MI8n"),A=t("pmY6");class j{constructor(){this._map=new Map,this._promises=new Map,this._onDidChange=new R.b,this.onDidChange=this._onDidChange.event,this._colorMap=null}fire(Oe){this._onDidChange.fire({changedLanguages:Oe,changedColorMap:!1})}register(Oe,Xe){return this._map.set(Oe,Xe),this.fire([Oe]),Object(A.i)(()=>{if(this._map.get(Oe)!==Xe)return;this._map.delete(Oe),this.fire([Oe])})}registerPromise(Oe,Xe){let fe=null,Pe=!1;return this._promises.set(Oe,Xe.then(Be=>{if(this._promises.delete(Oe),Pe||!Be)return;fe=this.register(Oe,Be)})),Object(A.i)(()=>{Pe=!0,fe&&fe.dispose()})}getPromise(Oe){const Xe=this.get(Oe);if(Xe)return Promise.resolve(Xe);const fe=this._promises.get(Oe);return fe?fe.then(Pe=>this.get(Oe)):null}get(Oe){return this._map.get(Oe)||null}setColorMap(Oe){this._colorMap=Oe,this._onDidChange.fire({changedLanguages:Array.from(this._map.keys()),changedColorMap:!0})}getColorMap(){return this._colorMap}getDefaultBackground(){return this._colorMap&&this._colorMap.length>2?this._colorMap[2]:null}}var I=t("Vhoy");class v{static getLanguageId(Oe){return(Oe&255)>>>0}static getTokenType(Oe){return(Oe&1792)>>>8}static getFontStyle(Oe){return(Oe&14336)>>>11}static getForeground(Oe){return(Oe&8372224)>>>14}static getBackground(Oe){return(Oe&4286578688)>>>23}static getClassNameFromMetadata(Oe){let Xe=this.getForeground(Oe),fe="mtk"+Xe,Pe=this.getFontStyle(Oe);return Pe&1&&(fe+=" mtki"),Pe&2&&(fe+=" mtkb"),Pe&4&&(fe+=" mtku"),fe}static getInlineStyleFromMetadata(Oe,Xe){const fe=this.getForeground(Oe),Pe=this.getFontStyle(Oe);let Be=`color: ${Xe[fe]};`;return Pe&1&&(Be+="font-style: italic;"),Pe&2&&(Be+="font-weight: bold;"),Pe&4&&(Be+="text-decoration: underline;"),Be}}const C=function(){let Oe=Object.create(null);return Oe[0]="symbol-method",Oe[1]="symbol-function",Oe[2]="symbol-constructor",Oe[3]="symbol-field",Oe[4]="symbol-variable",Oe[5]="symbol-class",Oe[6]="symbol-struct",Oe[7]="symbol-interface",Oe[8]="symbol-module",Oe[9]="symbol-property",Oe[10]="symbol-event",Oe[11]="symbol-operator",Oe[12]="symbol-unit",Oe[13]="symbol-value",Oe[14]="symbol-constant",Oe[15]="symbol-enum",Oe[16]="symbol-enum-member",Oe[17]="symbol-keyword",Oe[27]="symbol-snippet",Oe[18]="symbol-text",Oe[19]="symbol-color",Oe[20]="symbol-file",Oe[21]="symbol-reference",Oe[22]="symbol-customcolor",Oe[23]="symbol-folder",Oe[24]="symbol-type-parameter",Oe[25]="account",Oe[26]="issues",function(Xe){const fe=Oe[Xe];let Pe=fe&&I.d.get(fe);return Pe||(console.info("No codicon found for CompletionItemKind "+Xe),Pe=I.b.symbolProperty),Pe.classNames}}();let m=function(){let Oe=Object.create(null);return Oe.method=0,Oe.function=1,Oe.constructor=2,Oe.field=3,Oe.variable=4,Oe.class=5,Oe.struct=6,Oe.interface=7,Oe.module=8,Oe.property=9,Oe.event=10,Oe.operator=11,Oe.unit=12,Oe.value=13,Oe.constant=14,Oe.enum=15,Oe["enum-member"]=16,Oe.enumMember=16,Oe.keyword=17,Oe.snippet=27,Oe.text=18,Oe.color=19,Oe.file=20,Oe.reference=21,Oe.customcolor=22,Oe.folder=23,Oe["type-parameter"]=24,Oe.typeParameter=24,Oe.account=25,Oe.issue=26,function(Xe,fe){let Pe=Oe[Xe];return typeof Pe=="undefined"&&!fe&&(Pe=9),Pe}}();var d;(function(Oe){Oe[Oe.Automatic=0]="Automatic",Oe[Oe.Explicit=1]="Explicit"})(d||(d={}));var D;(function(Oe){Oe[Oe.Invoke=1]="Invoke",Oe[Oe.TriggerCharacter=2]="TriggerCharacter",Oe[Oe.ContentChange=3]="ContentChange"})(D||(D={}));var L;(function(Oe){Oe[Oe.Text=0]="Text",Oe[Oe.Read=1]="Read",Oe[Oe.Write=2]="Write"})(L||(L={}));function r(Oe){return Oe&&g.a.isUri(Oe.uri)&&B.a.isIRange(Oe.range)&&(B.a.isIRange(Oe.originSelectionRange)||B.a.isIRange(Oe.targetSelectionRange))}var w;(function(Oe){const Xe=new Map;Xe.set("file",0),Xe.set("module",1),Xe.set("namespace",2),Xe.set("package",3),Xe.set("class",4),Xe.set("method",5),Xe.set("property",6),Xe.set("field",7),Xe.set("constructor",8),Xe.set("enum",9),Xe.set("interface",10),Xe.set("function",11),Xe.set("variable",12),Xe.set("constant",13),Xe.set("string",14),Xe.set("number",15),Xe.set("boolean",16),Xe.set("array",17),Xe.set("object",18),Xe.set("key",19),Xe.set("null",20),Xe.set("enum-member",21),Xe.set("struct",22),Xe.set("event",23),Xe.set("operator",24),Xe.set("type-parameter",25);const fe=new Map;fe.set(0,"file"),fe.set(1,"module"),fe.set(2,"namespace"),fe.set(3,"package"),fe.set(4,"class"),fe.set(5,"method"),fe.set(6,"property"),fe.set(7,"field"),fe.set(8,"constructor"),fe.set(9,"enum"),fe.set(10,"interface"),fe.set(11,"function"),fe.set(12,"variable"),fe.set(13,"constant"),fe.set(14,"string"),fe.set(15,"number"),fe.set(16,"boolean"),fe.set(17,"array"),fe.set(18,"object"),fe.set(19,"key"),fe.set(20,"null"),fe.set(21,"enum-member"),fe.set(22,"struct"),fe.set(23,"event"),fe.set(24,"operator"),fe.set(25,"type-parameter");function Pe(me){return Xe.get(me)}Oe.fromString=Pe;function Be(me){return fe.get(me)}Oe.toString=Be;function Se(me,he){const Le=fe.get(me);let we=Le&&I.d.get("symbol-"+Le);return we||(console.info("No codicon found for SymbolKind "+me),we=I.b.symbolProperty),`${he?"inline":"block"} ${we.classNames}`}Oe.toCssClassName=Se})(w||(w={}));class b{constructor(Oe){this.value=Oe}}b.Comment=new b("comment"),b.Imports=new b("imports"),b.Region=new b("region");var u;(function(Oe){Oe[Oe.Other=0]="Other",Oe[Oe.Type=1]="Type",Oe[Oe.Parameter=2]="Parameter"})(u||(u={}));const c=new x.a,p=new x.a,S=new x.a,E=new x.a,y=new x.a,O=new x.a,k=new x.a,Q=new x.a,q=new x.a,z=new x.a,J=new x.a,re=new x.a,Z=new x.a,ne=new x.a,le=new x.a,_e=new x.a,Ce=new x.a,oe=new x.a,ae=new x.a,V=new x.a,G=new x.a,ee=new x.a,pe=new x.a,Te=new x.a,Ie=new x.a,Me=new j},uACm:function(mt,M,t){"use strict";t.d(M,"d",function(){return x}),t.d(M,"b",function(){return A}),t.d(M,"a",function(){return j}),t.d(M,"c",function(){return D});class g{constructor(){this.value="",this.pos=0}static isDigitCharacter(L){return L>=48&&L<=57}static isVariableCharacter(L){return L===95||L>=97&&L<=122||L>=65&&L<=90}text(L){this.value=L,this.pos=0}tokenText(L){return this.value.substr(L.pos,L.len)}next(){if(this.pos>=this.value.length)return{type:14,pos:this.pos,len:0};let L=this.pos,r=0,w=this.value.charCodeAt(L),b;if(b=g._table[w],typeof b=="number")return this.pos+=1,{type:b,pos:L,len:1};if(g.isDigitCharacter(w)){b=8;do r+=1,w=this.value.charCodeAt(L+r);while(g.isDigitCharacter(w));return this.pos+=r,{type:b,pos:L,len:r}}if(g.isVariableCharacter(w)){b=9;do w=this.value.charCodeAt(L+ ++r);while(g.isVariableCharacter(w)||g.isDigitCharacter(w));return this.pos+=r,{type:b,pos:L,len:r}}b=10;do r+=1,w=this.value.charCodeAt(L+r);while(!isNaN(w)&&typeof g._table[w]=="undefined"&&!g.isDigitCharacter(w)&&!g.isVariableCharacter(w));return this.pos+=r,{type:b,pos:L,len:r}}}g._table={[36]:0,[58]:1,[44]:2,[123]:3,[125]:4,[92]:5,[47]:6,[124]:7,[43]:11,[45]:12,[63]:13};class B{constructor(){this._children=[]}appendChild(L){return L instanceof x&&this._children[this._children.length-1]instanceof x?this._children[this._children.length-1].value+=L.value:(L.parent=this,this._children.push(L)),this}replace(L,r){const{parent:w}=L,b=w.children.indexOf(L),u=w.children.slice(0);u.splice(b,1,...r),w._children=u,function c(p,S){for(const E of p)E.parent=S,c(E.children,E)}(r,w)}get children(){return this._children}get snippet(){let L=this;for(;;){if(!L)return;if(L instanceof d)return L;L=L.parent}}toString(){return this.children.reduce((L,r)=>L+r.toString(),"")}len(){return 0}}class x extends B{constructor(L){super();this.value=L}toString(){return this.value}len(){return this.value.length}clone(){return new x(this.value)}}class R extends B{}class A extends R{constructor(L){super();this.index=L}static compareByIndex(L,r){return L.index===r.index?0:L.isFinalTabstop?1:r.isFinalTabstop||L.index<r.index?-1:L.index>r.index?1:0}get isFinalTabstop(){return this.index===0}get choice(){return this._children.length===1&&this._children[0]instanceof j?this._children[0]:void 0}clone(){let L=new A(this.index);return this.transform&&(L.transform=this.transform.clone()),L._children=this.children.map(r=>r.clone()),L}}class j extends B{constructor(){super(...arguments);this.options=[]}appendChild(L){return L instanceof x&&(L.parent=this,this.options.push(L)),this}toString(){return this.options[0].value}len(){return this.options[0].len()}clone(){let L=new j;return this.options.forEach(L.appendChild,L),L}}class I extends B{constructor(){super(...arguments);this.regexp=new RegExp("")}resolve(L){const r=this;let w=!1,b=L.replace(this.regexp,function(){return w=!0,r._replace(Array.prototype.slice.call(arguments,0,-2))});return!w&&this._children.some(u=>u instanceof v&&Boolean(u.elseValue))&&(b=this._replace([])),b}_replace(L){let r="";for(const w of this._children)if(w instanceof v){let b=L[w.index]||"";b=w.resolve(b),r+=b}else r+=w.toString();return r}toString(){return""}clone(){let L=new I;return L.regexp=new RegExp(this.regexp.source,""+(this.regexp.ignoreCase?"i":"")+(this.regexp.global?"g":"")),L._children=this.children.map(r=>r.clone()),L}}class v extends B{constructor(L,r,w,b){super();this.index=L,this.shorthandName=r,this.ifValue=w,this.elseValue=b}resolve(L){return this.shorthandName==="upcase"?L?L.toLocaleUpperCase():"":this.shorthandName==="downcase"?L?L.toLocaleLowerCase():"":this.shorthandName==="capitalize"?L?L[0].toLocaleUpperCase()+L.substr(1):"":this.shorthandName==="pascalcase"?L?this._toPascalCase(L):"":this.shorthandName==="camelcase"?L?this._toCamelCase(L):"":Boolean(L)&&typeof this.ifValue=="string"?this.ifValue:!Boolean(L)&&typeof this.elseValue=="string"?this.elseValue:L||""}_toPascalCase(L){const r=L.match(/[a-z0-9]+/gi);return r?r.map(w=>w.charAt(0).toUpperCase()+w.substr(1).toLowerCase()).join(""):L}_toCamelCase(L){const r=L.match(/[a-z0-9]+/gi);return r?r.map((w,b)=>b===0?w.toLowerCase():w.charAt(0).toUpperCase()+w.substr(1).toLowerCase()).join(""):L}clone(){let L=new v(this.index,this.shorthandName,this.ifValue,this.elseValue);return L}}class C extends R{constructor(L){super();this.name=L}resolve(L){let r=L.resolve(this);return this.transform&&(r=this.transform.resolve(r||"")),r!==void 0?(this._children=[new x(r)],!0):!1}clone(){const L=new C(this.name);return this.transform&&(L.transform=this.transform.clone()),L._children=this.children.map(r=>r.clone()),L}}function m(L,r){const w=[...L];for(;w.length>0;){const b=w.shift(),u=r(b);if(!u)break;w.unshift(...b.children)}}class d extends B{get placeholderInfo(){if(!this._placeholders){let L=[],r;this.walk(function(w){return w instanceof A&&(L.push(w),r=!r||r.index<w.index?w:r),!0}),this._placeholders={all:L,last:r}}return this._placeholders}get placeholders(){const{all:L}=this.placeholderInfo;return L}offset(L){let r=0,w=!1;return this.walk(b=>b===L?(w=!0,!1):(r+=b.len(),!0)),w?r:-1}fullLen(L){let r=0;return m([L],w=>(r+=w.len(),!0)),r}enclosingPlaceholders(L){let r=[],{parent:w}=L;for(;w;)w instanceof A&&r.push(w),w=w.parent;return r}resolveVariables(L){return this.walk(r=>(r instanceof C&&(r.resolve(L)&&(this._placeholders=void 0)),!0)),this}appendChild(L){return this._placeholders=void 0,super.appendChild(L)}replace(L,r){return this._placeholders=void 0,super.replace(L,r)}clone(){let L=new d;return this._children=this.children.map(r=>r.clone()),L}walk(L){m(this.children,L)}}class D{constructor(){this._scanner=new g,this._token={type:14,pos:0,len:0}}static escape(L){return L.replace(/\$|}|\\/g,"\\$&")}static guessNeedsClipboard(L){return/\${?CLIPBOARD/.test(L)}parse(L,r,w){this._scanner.text(L),this._token=this._scanner.next();const b=new d;for(;this._parse(b););const u=new Map,c=[];let p=0;b.walk(S=>(S instanceof A&&(p+=1,S.isFinalTabstop?u.set(0,void 0):!u.has(S.index)&&S.children.length>0?u.set(S.index,S.children):c.push(S)),!0));for(const S of c){const E=u.get(S.index);if(E){const y=new A(S.index);y.transform=S.transform;for(const O of E)y.appendChild(O.clone());b.replace(S,[y])}}return w||(w=p>0&&r),!u.has(0)&&w&&b.appendChild(new A(0)),b}_accept(L,r){if(L===void 0||this._token.type===L){let w=r?this._scanner.tokenText(this._token):!0;return this._token=this._scanner.next(),w}return!1}_backTo(L){return this._scanner.pos=L.pos+L.len,this._token=L,!1}_until(L){const r=this._token;for(;this._token.type!==L;){if(this._token.type===14)return!1;if(this._token.type===5){const b=this._scanner.next();if(b.type!==0&&b.type!==4&&b.type!==5)return!1}this._token=this._scanner.next()}const w=this._scanner.value.substring(r.pos,this._token.pos).replace(/\\(\$|}|\\)/g,"$1");return this._token=this._scanner.next(),w}_parse(L){return this._parseEscaped(L)||this._parseTabstopOrVariableName(L)||this._parseComplexPlaceholder(L)||this._parseComplexVariable(L)||this._parseAnything(L)}_parseEscaped(L){let r;return(r=this._accept(5,!0))?(r=this._accept(0,!0)||this._accept(4,!0)||this._accept(5,!0)||r,L.appendChild(new x(r)),!0):!1}_parseTabstopOrVariableName(L){let r;const w=this._token,b=this._accept(0)&&(r=this._accept(9,!0)||this._accept(8,!0));return b?(L.appendChild(/^\d+$/.test(r)?new A(Number(r)):new C(r)),!0):this._backTo(w)}_parseComplexPlaceholder(L){let r;const w=this._token,b=this._accept(0)&&this._accept(3)&&(r=this._accept(8,!0));if(!b)return this._backTo(w);const u=new A(Number(r));if(this._accept(1))for(;;){if(this._accept(4))return L.appendChild(u),!0;if(this._parse(u))continue;return L.appendChild(new x("${"+r+":")),u.children.forEach(L.appendChild,L),!0}else if(u.index>0&&this._accept(7)){const c=new j;for(;;){if(this._parseChoiceElement(c)){if(this._accept(2))continue;if(this._accept(7)&&(u.appendChild(c),this._accept(4)))return L.appendChild(u),!0}return this._backTo(w),!1}}else return this._accept(6)?this._parseTransform(u)?(L.appendChild(u),!0):(this._backTo(w),!1):this._accept(4)?(L.appendChild(u),!0):this._backTo(w)}_parseChoiceElement(L){const r=this._token,w=[];for(;!(this._token.type===2||this._token.type===7);){let b;if((b=this._accept(5,!0))?b=this._accept(2,!0)||this._accept(7,!0)||this._accept(5,!0)||b:b=this._accept(void 0,!0),!b)return this._backTo(r),!1;w.push(b)}return w.length===0?(this._backTo(r),!1):(L.appendChild(new x(w.join(""))),!0)}_parseComplexVariable(L){let r;const w=this._token,b=this._accept(0)&&this._accept(3)&&(r=this._accept(9,!0));if(!b)return this._backTo(w);const u=new C(r);if(this._accept(1))for(;;){if(this._accept(4))return L.appendChild(u),!0;if(this._parse(u))continue;return L.appendChild(new x("${"+r+":")),u.children.forEach(L.appendChild,L),!0}else return this._accept(6)?this._parseTransform(u)?(L.appendChild(u),!0):(this._backTo(w),!1):this._accept(4)?(L.appendChild(u),!0):this._backTo(w)}_parseTransform(L){let r=new I,w="",b="";for(;!this._accept(6);){let u;if(u=this._accept(5,!0)){u=this._accept(6,!0)||u,w+=u;continue}if(this._token.type!==14){w+=this._accept(void 0,!0);continue}return!1}for(;!this._accept(6);){let u;if(u=this._accept(5,!0)){u=this._accept(5,!0)||this._accept(6,!0)||u,r.appendChild(new x(u));continue}if(this._parseFormatString(r)||this._parseAnything(r))continue;return!1}for(;!this._accept(4);){if(this._token.type!==14){b+=this._accept(void 0,!0);continue}return!1}try{r.regexp=new RegExp(w,b)}catch(u){return!1}return L.transform=r,!0}_parseFormatString(L){const r=this._token;if(!this._accept(0))return!1;let w=!1;this._accept(3)&&(w=!0);let b=this._accept(8,!0);if(b)if(w){if(this._accept(4))return L.appendChild(new v(Number(b))),!0;if(!this._accept(1))return this._backTo(r),!1}else return L.appendChild(new v(Number(b))),!0;else return this._backTo(r),!1;if(this._accept(6)){let u=this._accept(9,!0);return!u||!this._accept(4)?(this._backTo(r),!1):(L.appendChild(new v(Number(b),u)),!0)}else if(this._accept(11)){let u=this._until(4);if(u)return L.appendChild(new v(Number(b),void 0,u,void 0)),!0}else if(this._accept(12)){let u=this._until(4);if(u)return L.appendChild(new v(Number(b),void 0,void 0,u)),!0}else if(this._accept(13)){let u=this._until(1);if(u){let c=this._until(4);if(c)return L.appendChild(new v(Number(b),void 0,u,c)),!0}}else{let u=this._until(4);if(u)return L.appendChild(new v(Number(b),void 0,void 0,u)),!0}return this._backTo(r),!1}_parseAnything(L){return this._token.type!==14?(L.appendChild(new x(this._scanner.tokenText(this._token))),this._accept(void 0),!0):!1}}},uDWl:function(mt,M,t){"use strict";t.d(M,"a",function(){return m});var g=t("D3Dy"),B=t("/kV6"),x=t("Szf2"),R=t("MNsG");function A(d){if(d.charCode){let L=String.fromCharCode(d.charCode).toUpperCase();return B.d.fromString(L)}const D=d.keyCode;if(D===3)return 7;if(g.g){if(D===59)return 80;if(D===107)return 81;if(D===109)return 83;if(R.f&&D===224)return 57}else if(g.j){if(D===91)return 57;if(R.f&&D===93)return 57;if(!R.f&&D===92)return 57}return B.a[D]||0}const j=R.f?256:2048,I=512,v=1024,C=R.f?2048:256;class m{constructor(d){this._standardKeyboardEventBrand=!0;let D=d;this.browserEvent=D,this.target=D.target,this.ctrlKey=D.ctrlKey,this.shiftKey=D.shiftKey,this.altKey=D.altKey,this.metaKey=D.metaKey,this.keyCode=A(D),this.code=D.code,this.ctrlKey=this.ctrlKey||this.keyCode===5,this.altKey=this.altKey||this.keyCode===6,this.shiftKey=this.shiftKey||this.keyCode===4,this.metaKey=this.metaKey||this.keyCode===57,this._asKeybinding=this._computeKeybinding(),this._asRuntimeKeybinding=this._computeRuntimeKeybinding()}preventDefault(){this.browserEvent&&this.browserEvent.preventDefault&&this.browserEvent.preventDefault()}stopPropagation(){this.browserEvent&&this.browserEvent.stopPropagation&&this.browserEvent.stopPropagation()}toKeybinding(){return this._asRuntimeKeybinding}equals(d){return this._asKeybinding===d}_computeKeybinding(){let d=0;this.keyCode!==5&&this.keyCode!==4&&this.keyCode!==6&&this.keyCode!==57&&(d=this.keyCode);let D=0;return this.ctrlKey&&(D|=j),this.altKey&&(D|=I),this.shiftKey&&(D|=v),this.metaKey&&(D|=C),D|=d,D}_computeRuntimeKeybinding(){let d=0;return this.keyCode!==5&&this.keyCode!==4&&this.keyCode!==6&&this.keyCode!==57&&(d=this.keyCode),new x.d(this.ctrlKey,this.shiftKey,this.altKey,this.metaKey,d)}}},uWgD:function(mt,M,t){},ubTv:function(mt,M,t){"use strict";t.d(M,"a",function(){return j}),t.d(M,"d",function(){return m}),t.d(M,"b",function(){return D}),t.d(M,"c",function(){return L});var g=t("l2gE"),B=t("tYmi"),x=t("MrjW"),R=t("gslv"),A=t("N0LK"),j;(function(b){b.text="text/plain",b.binary="application/octet-stream",b.unknown="application/unknown",b.markdown="text/markdown",b.latex="text/latex"})(j||(j={}));let I=[],v=[],C=[];function m(b,u=!1){const c=d(b);I.push(c),c.userConfigured?C.push(c):v.push(c),u&&!c.userConfigured&&I.forEach(p=>{if(p.mime===c.mime||p.userConfigured)return;c.extension&&p.extension===c.extension&&console.warn(`Overwriting extension <<${c.extension}>> to now point to mime <<${c.mime}>>`),c.filename&&p.filename===c.filename&&console.warn(`Overwriting filename <<${c.filename}>> to now point to mime <<${c.mime}>>`),c.filepattern&&p.filepattern===c.filepattern&&console.warn(`Overwriting filepattern <<${c.filepattern}>> to now point to mime <<${c.mime}>>`),c.firstline&&p.firstline===c.firstline&&console.warn(`Overwriting firstline <<${c.firstline}>> to now point to mime <<${c.mime}>>`)})}function d(b){return{id:b.id,mime:b.mime,filename:b.filename,extension:b.extension,filepattern:b.filepattern,firstline:b.firstline,userConfigured:b.userConfigured,filenameLowercase:b.filename?b.filename.toLowerCase():void 0,extensionLowercase:b.extension?b.extension.toLowerCase():void 0,filepatternLowercase:b.filepattern?Object(g.b)(b.filepattern.toLowerCase()):void 0,filepatternOnPath:b.filepattern?b.filepattern.indexOf(x.e.sep)>=0:!1}}function D(b){b?(I=I.filter(u=>!u.userConfigured),C=[]):(I=[],v=[],C=[])}function L(b,u){let c;if(b)switch(b.scheme){case B.c.file:c=b.fsPath;break;case B.c.data:const y=R.a.parseMetaData(b);c=y.get(R.a.META_DATA_LABEL);break;default:c=b.path}if(!c)return[j.unknown];c=c.toLowerCase();const p=Object(x.a)(c),S=r(c,p,C);if(S)return[S,j.text];const E=r(c,p,v);if(E)return[E,j.text];if(u){const y=w(u);if(y)return[y,j.text]}return[j.unknown]}function r(b,u,c){var p;let S=null,E=null,y=null;for(let O=c.length-1;O>=0;O--){const k=c[O];if(u===k.filenameLowercase){S=k;break}if(k.filepattern&&(!E||k.filepattern.length>E.filepattern.length)){const Q=k.filepatternOnPath?b:u;((p=k.filepatternLowercase)===null||p===void 0?void 0:p.call(k,Q))&&(E=k)}k.extension&&((!y||k.extension.length>y.extension.length)&&(u.endsWith(k.extensionLowercase)&&(y=k)))}return S?S.mime:E?E.mime:y?y.mime:null}function w(b){if(Object(A.S)(b)&&(b=b.substr(1)),b.length>0)for(let u=I.length-1;u>=0;u--){const c=I[u];if(!c.firstline)continue;const p=b.match(c.firstline);if(p&&p.length>0)return c.mime}return null}},udvx:function(mt,M,t){"use strict";t.d(M,"a",function(){return j});var g=t("Vhoy"),B=t("HgMQ"),x=t.n(B),R=t("8tI9"),A=t.n(R);function j(I){let v=I.definition;for(;v instanceof g.b;)v=v.definition;return`.codicon-${I.id}:before { content: '${v.fontCharacter}'; }`}},ufhN:function(mt,M,t){"use strict";t.r(M);var g=t("+hIS");Object(g.a)({id:"st",extensions:[".st",".iecst",".iecplc",".lc3lib"],aliases:["StructuredText","scl","stl"],loader:function(){return t.e(371).then(t.bind(null,"rMIR"))}})},undH:function(mt,M,t){},v0SU:function(mt,M,t){"use strict";var g=t("M/lh"),B=t.n(g);t.o(g,"Emitter")&&t.d(M,"Emitter",function(){return g.Emitter}),t.o(g,"MarkerSeverity")&&t.d(M,"MarkerSeverity",function(){return g.MarkerSeverity}),t.o(g,"MarkerTag")&&t.d(M,"MarkerTag",function(){return g.MarkerTag}),t.o(g,"Range")&&t.d(M,"Range",function(){return g.Range}),t.o(g,"Uri")&&t.d(M,"Uri",function(){return g.Uri}),t.o(g,"editor")&&t.d(M,"editor",function(){return g.editor}),t.o(g,"languages")&&t.d(M,"languages",function(){return g.languages})},v1vZ:function(mt,M,t){"use strict";t.d(M,"b",function(){return d}),t.d(M,"a",function(){return D}),t.d(M,"c",function(){return u});var g=t("X+cX"),B=t("Vhoy"),x=t("MI8n"),R=t("3/fG"),A=t("3Rsk"),j=t("ic2d"),I=t("t9D7");const v={IconContribution:"base.contributions.icons"};class C{constructor(){this._onDidChange=new x.b,this.onDidChange=this._onDidChange.event,this.iconSchema={definitions:{icons:{type:"object",properties:{fontId:{type:"string",description:Object(R.a)("iconDefintion.fontId","The id of the font to use. If not set, the font that is defined first is used.")},fontCharacter:{type:"string",description:Object(R.a)("iconDefintion.fontCharacter","The font character associated with the icon definition.")}},additionalProperties:!1,defaultSnippets:[{body:{fontCharacter:"\\\\e030"}}]}},type:"object",properties:{}},this.iconReferenceSchema={type:"string",pattern:`^${B.a.iconNameExpression}$`,enum:[],enumDescriptions:[]},this.iconsById={},this.iconFontsById={}}registerIcon(c,p,S,E){const y=this.iconsById[c];if(y){if(S&&!y.description){y.description=S,this.iconSchema.properties[c].markdownDescription=`${S} $(${c})`;const Q=this.iconReferenceSchema.enum.indexOf(c);Q!==-1&&(this.iconReferenceSchema.enumDescriptions[Q]=S),this._onDidChange.fire()}return y}let O={id:c,description:S,defaults:p,deprecationMessage:E};this.iconsById[c]=O;let k={$ref:"#/definitions/icons"};return E&&(k.deprecationMessage=E),S&&(k.markdownDescription=`${S}: $(${c})`),this.iconSchema.properties[c]=k,this.iconReferenceSchema.enum.push(c),this.iconReferenceSchema.enumDescriptions.push(S||""),this._onDidChange.fire(),{id:c}}getIcons(){return Object.keys(this.iconsById).map(c=>this.iconsById[c])}getIcon(c){return this.iconsById[c]}getIconSchema(){return this.iconSchema}getIconFont(c){return this.iconFontsById[c]}toString(){const c=(y,O)=>y.id.localeCompare(O.id),p=y=>{for(;I.d.isThemeIcon(y.defaults);)y=this.iconsById[y.defaults.id];return`codicon codicon-${y?y.id:""}`};let S=[];S.push("| preview | identifier | default codicon ID | description"),S.push("| ----------- | --------------------------------- | --------------------------------- | --------------------------------- |");const E=Object.keys(this.iconsById).map(y=>this.iconsById[y]);for(const y of E.filter(O=>!!O.description).sort(c))S.push(`|<i class="${p(y)}"></i>|${y.id}|${I.d.isThemeIcon(y.defaults)?y.defaults.id:y.id}|${y.description||""}|`);S.push("| preview | identifier "),S.push("| ----------- | --------------------------------- |");for(const y of E.filter(O=>!I.d.isThemeIcon(O.defaults)).sort(c))S.push(`|<i class="${p(y)}"></i>|${y.id}|`);return S.join(`
|
|
|
`)}}const m=new C;j.a.add(v.IconContribution,m);function d(c,p,S,E){return m.registerIcon(c,p,S,E)}function D(){return m}function L(){for(const c of B.d.all)m.registerIcon(c.id,c.definition,c.description);B.d.onDidRegister(c=>m.registerIcon(c.id,c.definition,c.description))}L();const r="vscode://schemas/icons";let w=j.a.as(A.a.JSONContribution);w.registerSchema(r,m.getIconSchema());const b=new g.e(()=>w.notifySchemaChanged(r),200);m.onDidChange(()=>{b.isScheduled()||b.schedule()});const u=d("widget-close",B.b.close,Object(R.a)("widgetClose","Icon for the close action in widgets."))},v6HE:function(mt,M,t){"use strict";t.d(M,"a",function(){return _o});var g=t("EffR");/*! @license DOMPurify 2.3.1 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/2.3.1/LICENSE */function B(no){if(Array.isArray(no)){for(var _t=0,Tt=Array(no.length);_t<no.length;_t++)Tt[_t]=no[_t];return Tt}else return Array.from(no)}var x=Object.hasOwnProperty,R=Object.setPrototypeOf,A=Object.isFrozen,j=Object.getPrototypeOf,I=Object.getOwnPropertyDescriptor,v=Object.freeze,C=Object.seal,m=Object.create,d=typeof Reflect!="undefined"&&Reflect,D=d.apply,L=d.construct;D||(D=function(_t,Tt,Nt){return _t.apply(Tt,Nt)}),v||(v=function(_t){return _t}),C||(C=function(_t){return _t}),L||(L=function(_t,Tt){return new(Function.prototype.bind.apply(_t,[null].concat(B(Tt))))});var r=k(Array.prototype.forEach),w=k(Array.prototype.pop),b=k(Array.prototype.push),u=k(String.prototype.toLowerCase),c=k(String.prototype.match),p=k(String.prototype.replace),S=k(String.prototype.indexOf),E=k(String.prototype.trim),y=k(RegExp.prototype.test),O=Q(TypeError);function k(no){return function(_t){for(var Tt=arguments.length,Nt=Array(Tt>1?Tt-1:0),rt=1;rt<Tt;rt++)Nt[rt-1]=arguments[rt];return D(no,_t,Nt)}}function Q(no){return function(){for(var _t=arguments.length,Tt=Array(_t),Nt=0;Nt<_t;Nt++)Tt[Nt]=arguments[Nt];return L(no,Tt)}}function q(no,_t){R&&R(no,null);for(var Tt=_t.length;Tt--;){var Nt=_t[Tt];if(typeof Nt=="string"){var rt=u(Nt);rt!==Nt&&(A(_t)||(_t[Tt]=rt),Nt=rt)}no[Nt]=!0}return no}function z(no){var _t=m(null),Tt=void 0;for(Tt in no)D(x,no,[Tt])&&(_t[Tt]=no[Tt]);return _t}function J(no,_t){for(;no!==null;){var Tt=I(no,_t);if(Tt){if(Tt.get)return k(Tt.get);if(typeof Tt.value=="function")return k(Tt.value)}no=j(no)}function Nt(rt){return console.warn("fallback value for",rt),null}return Nt}var re=v(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","section","select","shadow","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),Z=v(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","filter","font","g","glyph","glyphref","hkern","image","line","lineargradient","marker","mask","metadata","mpath","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),ne=v(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),le=v(["animate","color-profile","cursor","discard","fedropshadow","feimage","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),_e=v(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover"]),Ce=v(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),oe=v(["#text"]),ae=v(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","face","for","headers","height","hidden","high","href","hreflang","id","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","noshade","novalidate","nowrap","open","optimum","pattern","placeholder","playsinline","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","xmlns","slot"]),V=v(["accent-height","accumulate","additive","alignment-baseline","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","targetx","targety","transform","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),G=v(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),ee=v(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),pe=C(/\{\{[\s\S]*|[\s\S]*\}\}/gm),Te=C(/<%[\s\S]*|[\s\S]*%>/gm),Ie=C(/^data-[\-\w.\u00B7-\uFFFF]/),Me=C(/^aria-[\-\w]+$/),Oe=C(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),Xe=C(/^(?:\w+script|data):/i),fe=C(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),Pe=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(no){return typeof no}:function(no){return no&&typeof Symbol=="function"&&no.constructor===Symbol&&no!==Symbol.prototype?"symbol":typeof no};function Be(no){if(Array.isArray(no)){for(var _t=0,Tt=Array(no.length);_t<no.length;_t++)Tt[_t]=no[_t];return Tt}else return Array.from(no)}var Se=function(){return typeof window=="undefined"?null:window},me=function(_t,Tt){if((typeof _t=="undefined"?"undefined":Pe(_t))!=="object"||typeof _t.createPolicy!="function")return null;var Nt=null,rt="data-tt-policy-suffix";Tt.currentScript&&Tt.currentScript.hasAttribute(rt)&&(Nt=Tt.currentScript.getAttribute(rt));var lt="dompurify"+(Nt?"#"+Nt:"");try{return _t.createPolicy(lt,{createHTML:function(St){return St}})}catch(bt){return console.warn("TrustedTypes policy "+lt+" could not be created."),null}};function he(){var no=arguments.length>0&&arguments[0]!==void 0?arguments[0]:Se(),_t=function(oo){return he(oo)};if(_t.version="2.3.1",_t.removed=[],!no||!no.document||no.document.nodeType!==9)return _t.isSupported=!1,_t;var Tt=no.document,Nt=no.document,rt=no.DocumentFragment,lt=no.HTMLTemplateElement,bt=no.Node,St=no.Element,Qt=no.NodeFilter,bo=no.NamedNodeMap,qt=bo===void 0?no.NamedNodeMap||no.MozNamedAttrMap:bo,Eo=no.Text,Ro=no.Comment,zo=no.DOMParser,Bo=no.trustedTypes,Jt=St.prototype,fo=J(Jt,"cloneNode"),ri=J(Jt,"nextSibling"),Zo=J(Jt,"childNodes"),ci=J(Jt,"parentNode");if(typeof lt=="function"){var ki=Nt.createElement("template");ki.content&&ki.content.ownerDocument&&(Nt=ki.content.ownerDocument)}var wi=me(Bo,Tt),Zi=wi&&Bt?wi.createHTML(""):"",Vi=Nt,vi=Vi.implementation,sn=Vi.createNodeIterator,en=Vi.createDocumentFragment,on=Vi.getElementsByTagName,cn=Tt.importNode,Bi={};try{Bi=z(Nt).documentMode?Nt.documentMode:{}}catch(qo){}var zi={};_t.isSupported=typeof ci=="function"&&vi&&typeof vi.createHTMLDocument!="undefined"&&Bi!==9;var Ji=pe,ui=Te,pn=Ie,Hi=Me,Oi=Xe,Ii=fe,Qi=Oe,Li=null,Ui=q({},[].concat(Be(re),Be(Z),Be(ne),Be(_e),Be(oe))),fi=null,$i=q({},[].concat(Be(ae),Be(V),Be(G),Be(ee))),rn=null,_i=null,Pi=!0,gt=!0,Ge=!1,$=!1,Ee=!1,Ne=!1,He=!1,at=!1,vt=!1,Xt=!0,Bt=!1,Kt=!0,ro=!0,F=!1,te={},Ae=null,Ye=q({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]),pt=null,Mt=q({},["audio","video","img","source","image","track"]),jt=null,$t=q({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),uo="http://www.w3.org/1998/Math/MathML",io="http://www.w3.org/2000/svg",ho="http://www.w3.org/1999/xhtml",mo=ho,Io=!1,Ao=null,Oo=Nt.createElement("form"),Wo=function(oo){if(Ao&&Ao===oo)return;(!oo||(typeof oo=="undefined"?"undefined":Pe(oo))!=="object")&&(oo={}),oo=z(oo),Li="ALLOWED_TAGS"in oo?q({},oo.ALLOWED_TAGS):Ui,fi="ALLOWED_ATTR"in oo?q({},oo.ALLOWED_ATTR):$i,jt="ADD_URI_SAFE_ATTR"in oo?q(z($t),oo.ADD_URI_SAFE_ATTR):$t,pt="ADD_DATA_URI_TAGS"in oo?q(z(Mt),oo.ADD_DATA_URI_TAGS):Mt,Ae="FORBID_CONTENTS"in oo?q({},oo.FORBID_CONTENTS):Ye,rn="FORBID_TAGS"in oo?q({},oo.FORBID_TAGS):{},_i="FORBID_ATTR"in oo?q({},oo.FORBID_ATTR):{},te="USE_PROFILES"in oo?oo.USE_PROFILES:!1,Pi=oo.ALLOW_ARIA_ATTR!==!1,gt=oo.ALLOW_DATA_ATTR!==!1,Ge=oo.ALLOW_UNKNOWN_PROTOCOLS||!1,$=oo.SAFE_FOR_TEMPLATES||!1,Ee=oo.WHOLE_DOCUMENT||!1,at=oo.RETURN_DOM||!1,vt=oo.RETURN_DOM_FRAGMENT||!1,Xt=oo.RETURN_DOM_IMPORT!==!1,Bt=oo.RETURN_TRUSTED_TYPE||!1,He=oo.FORCE_BODY||!1,Kt=oo.SANITIZE_DOM!==!1,ro=oo.KEEP_CONTENT!==!1,F=oo.IN_PLACE||!1,Qi=oo.ALLOWED_URI_REGEXP||Qi,mo=oo.NAMESPACE||ho,$&&(gt=!1),vt&&(at=!0),te&&(Li=q({},[].concat(Be(oe))),fi=[],te.html===!0&&(q(Li,re),q(fi,ae)),te.svg===!0&&(q(Li,Z),q(fi,V),q(fi,ee)),te.svgFilters===!0&&(q(Li,ne),q(fi,V),q(fi,ee)),te.mathMl===!0&&(q(Li,_e),q(fi,G),q(fi,ee))),oo.ADD_TAGS&&(Li===Ui&&(Li=z(Li)),q(Li,oo.ADD_TAGS)),oo.ADD_ATTR&&(fi===$i&&(fi=z(fi)),q(fi,oo.ADD_ATTR)),oo.ADD_URI_SAFE_ATTR&&q(jt,oo.ADD_URI_SAFE_ATTR),oo.FORBID_CONTENTS&&(Ae===Ye&&(Ae=z(Ae)),q(Ae,oo.FORBID_CONTENTS)),ro&&(Li["#text"]=!0),Ee&&q(Li,["html","head","body"]),Li.table&&(q(Li,["tbody"]),delete rn.tbody),v&&v(oo),Ao=oo},si=q({},["mi","mo","mn","ms","mtext"]),hi=q({},["foreignobject","desc","title","annotation-xml"]),Uo=q({},Z);q(Uo,ne),q(Uo,le);var mi=q({},_e);q(mi,Ce);var Ri=function(oo){var So=ci(oo);(!So||!So.tagName)&&(So={namespaceURI:ho,tagName:"template"});var ke=u(oo.tagName),ue=u(So.tagName);if(oo.namespaceURI===io)return So.namespaceURI===ho?ke==="svg":So.namespaceURI===uo?ke==="svg"&&(ue==="annotation-xml"||si[ue]):Boolean(Uo[ke]);if(oo.namespaceURI===uo)return So.namespaceURI===ho?ke==="math":So.namespaceURI===io?ke==="math"&&hi[ue]:Boolean(mi[ke]);if(oo.namespaceURI===ho){if(So.namespaceURI===io&&!hi[ue])return!1;if(So.namespaceURI===uo&&!si[ue])return!1;var Fe=q({},["title","style","font","a","script"]);return!mi[ke]&&(Fe[ke]||!Uo[ke])}return!1},Di=function(oo){b(_t.removed,{element:oo});try{oo.parentNode.removeChild(oo)}catch(So){try{oo.outerHTML=Zi}catch(ke){oo.remove()}}},pi=function(oo,So){try{b(_t.removed,{attribute:So.getAttributeNode(oo),from:So})}catch(ke){b(_t.removed,{attribute:null,from:So})}if(So.removeAttribute(oo),oo==="is"&&!fi[oo])if(at||vt)try{Di(So)}catch(ke){}else try{So.setAttribute(oo,"")}catch(ke){}},Wi=function(oo){var So=void 0,ke=void 0;if(He)oo="<remove></remove>"+oo;else{var ue=c(oo,/^[\r\n\t ]+/);ke=ue&&ue[0]}var Fe=wi?wi.createHTML(oo):oo;if(mo===ho)try{So=new zo().parseFromString(Fe,"text/html")}catch(f){}if(!So||!So.documentElement){So=vi.createDocument(mo,"template",null);try{So.documentElement.innerHTML=Io?"":Fe}catch(f){}}var et=So.body||So.documentElement;return oo&&ke&&et.insertBefore(Nt.createTextNode(ke),et.childNodes[0]||null),mo===ho?on.call(So,Ee?"html":"body")[0]:Ee?So.documentElement:et},fn=function(oo){return sn.call(oo.ownerDocument||oo,oo,Qt.SHOW_ELEMENT|Qt.SHOW_COMMENT|Qt.SHOW_TEXT,null,!1)},In=function(oo){return oo instanceof Eo||oo instanceof Ro?!1:typeof oo.nodeName!="string"||typeof oo.textContent!="string"||typeof oo.removeChild!="function"||!(oo.attributes instanceof qt)||typeof oo.removeAttribute!="function"||typeof oo.setAttribute!="function"||typeof oo.namespaceURI!="string"||typeof oo.insertBefore!="function"},an=function(oo){return(typeof bt=="undefined"?"undefined":Pe(bt))==="object"?oo instanceof bt:oo&&(typeof oo=="undefined"?"undefined":Pe(oo))==="object"&&typeof oo.nodeType=="number"&&typeof oo.nodeName=="string"},bn=function(oo,So,ke){if(!zi[oo])return;r(zi[oo],function(ue){ue.call(_t,So,ke,Ao)})},Wn=function(oo){var So=void 0;if(bn("beforeSanitizeElements",oo,null),In(oo))return Di(oo),!0;if(c(oo.nodeName,/[\u0080-\uFFFF]/))return Di(oo),!0;var ke=u(oo.nodeName);if(bn("uponSanitizeElement",oo,{tagName:ke,allowedTags:Li}),!an(oo.firstElementChild)&&(!an(oo.content)||!an(oo.content.firstElementChild))&&y(/<[/\w]/g,oo.innerHTML)&&y(/<[/\w]/g,oo.textContent))return Di(oo),!0;if(ke==="select"&&y(/<template/i,oo.innerHTML))return Di(oo),!0;if(!Li[ke]||rn[ke]){if(ro&&!Ae[ke]){var ue=ci(oo)||oo.parentNode,Fe=Zo(oo)||oo.childNodes;if(Fe&&ue)for(var et=Fe.length,f=et-1;f>=0;--f)ue.insertBefore(fo(Fe[f],!0),ri(oo))}return Di(oo),!0}return oo instanceof St&&!Ri(oo)||(ke==="noscript"||ke==="noembed")&&y(/<\/no(script|embed)/i,oo.innerHTML)?(Di(oo),!0):($&&oo.nodeType===3&&(So=oo.textContent,So=p(So,Ji," "),So=p(So,ui," "),oo.textContent!==So&&(b(_t.removed,{element:oo.cloneNode()}),oo.textContent=So)),bn("afterSanitizeElements",oo,null),!1)},gn=function(oo,So,ke){if(Kt&&(So==="id"||So==="name")&&(ke in Nt||ke in Oo))return!1;if(!(gt&&!_i[So]&&y(pn,So))){if(!(Pi&&y(Hi,So))){if(!fi[So]||_i[So])return!1;if(!jt[So]){if(!y(Qi,p(ke,Ii,""))){if(!((So==="src"||So==="xlink:href"||So==="href")&&oo!=="script"&&S(ke,"data:")===0&&pt[oo])){if(!(Ge&&!y(Oi,p(ke,Ii,"")))){if(ke)return!1}}}}}}return!0},$n=function(oo){var So=void 0,ke=void 0,ue=void 0,Fe=void 0;bn("beforeSanitizeAttributes",oo,null);var et=oo.attributes;if(!et)return;var f={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:fi};for(Fe=et.length;Fe--;){So=et[Fe];var h=So,_=h.name,K=h.namespaceURI;if(ke=E(So.value),ue=u(_),f.attrName=ue,f.attrValue=ke,f.keepAttr=!0,f.forceKeepAttr=void 0,bn("uponSanitizeAttribute",oo,f),ke=f.attrValue,f.forceKeepAttr)continue;if(pi(_,oo),!f.keepAttr)continue;if(y(/\/>/i,ke)){pi(_,oo);continue}$&&(ke=p(ke,Ji," "),ke=p(ke,ui," "));var de=oo.nodeName.toLowerCase();if(!gn(de,ue,ke))continue;try{K?oo.setAttributeNS(K,_,ke):oo.setAttribute(_,ke),w(_t.removed)}catch(ye){}}bn("afterSanitizeAttributes",oo,null)},Un=function qo(oo){var So=void 0,ke=fn(oo);for(bn("beforeSanitizeShadowDOM",oo,null);So=ke.nextNode();){if(bn("uponSanitizeShadowNode",So,null),Wn(So))continue;So.content instanceof rt&&qo(So.content),$n(So)}bn("afterSanitizeShadowDOM",oo,null)};return _t.sanitize=function(qo,oo){var So=void 0,ke=void 0,ue=void 0,Fe=void 0,et=void 0;if(Io=!qo,Io&&(qo="<!-->"),typeof qo!="string"&&!an(qo)){if(typeof qo.toString!="function")throw O("toString is not a function");if(qo=qo.toString(),typeof qo!="string")throw O("dirty is not a string, aborting")}if(!_t.isSupported){if(Pe(no.toStaticHTML)==="object"||typeof no.toStaticHTML=="function"){if(typeof qo=="string")return no.toStaticHTML(qo);if(an(qo))return no.toStaticHTML(qo.outerHTML)}return qo}if(Ne||Wo(oo),_t.removed=[],typeof qo=="string"&&(F=!1),!F)if(qo instanceof bt)So=Wi("<!---->"),ke=So.ownerDocument.importNode(qo,!0),ke.nodeType===1&&ke.nodeName==="BODY"||ke.nodeName==="HTML"?So=ke:So.appendChild(ke);else{if(!at&&!$&&!Ee&&qo.indexOf("<")===-1)return wi&&Bt?wi.createHTML(qo):qo;if(So=Wi(qo),!So)return at?null:Zi}So&&He&&Di(So.firstChild);for(var f=fn(F?qo:So);ue=f.nextNode();){if(ue.nodeType===3&&ue===Fe)continue;if(Wn(ue))continue;ue.content instanceof rt&&Un(ue.content),$n(ue),Fe=ue}if(Fe=null,F)return qo;if(at){if(vt)for(et=en.call(So.ownerDocument);So.firstChild;)et.appendChild(So.firstChild);else et=So;return Xt&&(et=cn.call(Tt,et,!0)),et}var h=Ee?So.outerHTML:So.innerHTML;return $&&(h=p(h,Ji," "),h=p(h,ui," ")),wi&&Bt?wi.createHTML(h):h},_t.setConfig=function(qo){Wo(qo),Ne=!0},_t.clearConfig=function(){Ao=null,Ne=!1},_t.isValidAttribute=function(qo,oo,So){Ao||Wo({});var ke=u(qo),ue=u(oo);return gn(ke,ue,So)},_t.addHook=function(qo,oo){if(typeof oo!="function")return;zi[qo]=zi[qo]||[],b(zi[qo],oo)},_t.removeHook=function(qo){zi[qo]&&w(zi[qo])},_t.removeHooks=function(qo){zi[qo]&&(zi[qo]=[])},_t.removeAllHooks=function(){zi={}},_t}var Le=he(),we=Le;const ve=Le.version,ie=Le.isSupported,W=Le.sanitize,U=Le.setConfig,se=Le.clearConfig,je=Le.isValidAttribute,Re=Le.addHook,We=Le.removeHook,dt=Le.removeHooks,Lt=Le.removeAllHooks;var Ht=t("4y0V"),$e=t("Md8J"),ot=t("XSiN"),ce=t("fdyd"),Ve=t("X+cX"),it=t("JQT/"),Et=t("/cxE"),It=t("MI8n"),Rt=t("eLzo"),vo=t("EJc0"),Mo=t("nD70"),xo=t("pmY6"),Do=t("Ssw4"),Lo=t("Q4rV"),To=t("tYmi"),Vt=t("qj0h"),xt=t("gslv"),ze=t("N0LK"),ct=t("bY76");function Ut(no,_t={},Tt={}){var Nt;const rt=new xo.b;let lt=!1;const bt=rt.add(new it.b),St=Object($e.a)(_t),Qt=function(Jt){let fo;try{fo=Object(Lo.a)(decodeURIComponent(Jt))}catch(ri){}return fo?(fo=Object(Vt.a)(fo,ri=>no.uris&&no.uris[ri]?ct.a.revive(no.uris[ri]):void 0),encodeURIComponent(JSON.stringify(fo))):Jt},bo=function(Jt,fo){const ri=no.uris&&no.uris[Jt];if(!ri)return Jt;let Zo=ct.a.revive(ri);return fo?Jt.startsWith(To.c.data+":")?Jt:To.a.asBrowserUri(Zo).toString(!0):ct.a.parse(Jt).toString()===Zo.toString()?Jt:(Zo.query&&(Zo=Zo.with({query:Qt(Zo.query)})),Zo.toString())};let qt;const Eo=new Promise(Jt=>qt=Jt),Ro=new Do.a;if(Ro.image=(Jt,fo,ri)=>{let Zo=[],ci=[];if(Jt){({href:Jt,dimensions:Zo}=Object(Rt.d)(Jt)),Jt=bo(Jt,!0);try{const ki=ct.a.parse(Jt);_t.baseUrl&&ki.scheme===To.c.file&&(Jt=Object(xt.j)(_t.baseUrl,Jt).toString())}catch(ki){}ci.push(`src="${Jt}"`)}return ri&&ci.push(`alt="${ri}"`),fo&&ci.push(`title="${fo}"`),Zo.length&&(ci=ci.concat(Zo)),"<img "+ci.join(" ")+">"},Ro.link=(Jt,fo,ri)=>{if(Jt===ri&&(ri=Object(Rt.e)(ri)),Jt=bo(Jt,!1),_t.baseUrl){const Zo=/^\w[\w\d+.-]*:/.test(Jt);Zo||(Jt=Object(xt.j)(_t.baseUrl,Jt).toString())}return fo=Object(Rt.e)(fo),Jt=Object(Rt.e)(Jt),!Jt||Jt.match(/^data:|javascript:/i)||Jt.match(/^command:/i)&&!no.isTrusted||Jt.match(/^command:(\/\/\/)?_workbench\.downloadResource/i)?ri:(Jt=Jt.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'"),`<a href="#" data-href="${Jt}" title="${fo||Jt}">${ri}</a>`)},Ro.paragraph=Jt=>`<p>${Jt}</p>`,_t.codeBlockRenderer&&(Ro.code=(Jt,fo)=>{const ri=_t.codeBlockRenderer(fo,Jt),Zo=Mo.b.nextId();return Object(Ve.l)(Promise.all([ri,Eo]),bt.token).then(ci=>{var ki;if(!lt&&ci){const wi=St.querySelector(`div[data-code="${Zo}"]`);wi&&g.R(wi,ci[0]),(ki=_t.asyncRenderCallback)===null||ki===void 0||ki.call(_t)}}).catch(()=>{}),`<div class="code" data-code="${Zo}">${Object(ze.s)(Jt)}</div>`}),_t.actionHandler){const Jt=_t.actionHandler.disposables.add(new Ht.a(St,"click")),fo=_t.actionHandler.disposables.add(new Ht.a(St,"auxclick"));_t.actionHandler.disposables.add(It.c.any(Jt.event,fo.event)(ri=>{const Zo=new ot.a(ri);if(!Zo.leftButton&&!Zo.middleButton)return;let ci=Zo.target;if(ci.tagName!=="A"&&(ci=ci.parentElement,!ci||ci.tagName!=="A"))return;try{const ki=ci.dataset.href;ki&&_t.actionHandler.callback(ki,Zo)}catch(ki){Object(Et.f)(ki)}finally{Zo.preventDefault()}}))}no.supportHtml||(Tt.sanitizer=Jt=>{const fo=no.isTrusted?Jt.match(/^(<span[^>]+>)|(<\/\s*span>)$/):void 0;return fo?Jt:""},Tt.sanitize=!0,Tt.silent=!0),Tt.renderer=Ro;let zo=(Nt=no.value)!==null&&Nt!==void 0?Nt:"";zo.length>1e5&&(zo=`${zo.substr(0,1e5)}\u2026`),no.supportThemeIcons&&(zo=Object(vo.b)(zo));let Bo=Do.b(zo,Tt);if(no.supportThemeIcons){const Jt=Object(ce.a)(Bo);Bo=Jt.map(fo=>typeof fo=="string"?fo:fo.outerHTML).join("")}if(St.innerHTML=Qe(no,Bo),qt(),_t.asyncRenderCallback)for(const Jt of St.getElementsByTagName("img")){const fo=rt.add(g.i(Jt,"load",()=>{fo.dispose(),_t.asyncRenderCallback()}))}return{element:St,dispose:()=>{lt=!0,bt.cancel(),rt.dispose()}}}function Qe(no,_t){const{config:Tt,allowedSchemes:Nt}=tt(no);Re("uponSanitizeAttribute",(lt,bt)=>{if(bt.attrName==="style"||bt.attrName==="class"){if(lt.tagName==="SPAN"){if(bt.attrName==="style"){bt.keepAttr=/^(color\:#[0-9a-fA-F]+;)?(background-color\:#[0-9a-fA-F]+;)?$/.test(bt.attrValue);return}else if(bt.attrName==="class"){bt.keepAttr=/^codicon codicon-[a-z\-]+( codicon-modifier-[a-z\-]+)?$/.test(bt.attrValue);return}}bt.keepAttr=!1;return}});const rt=document.createElement("a");Re("afterSanitizeAttributes",lt=>{for(const bt of["href","src"])lt.hasAttribute(bt)&&(rt.href=lt.getAttribute(bt),Nt.includes(rt.protocol.replace(/:$/,""))||lt.removeAttribute(bt))});try{return W(_t,Object.assign(Object.assign({},Tt),{RETURN_TRUSTED_TYPE:!0}))}finally{We("uponSanitizeAttribute"),We("afterSanitizeAttributes")}}function tt(no){const _t=[To.c.http,To.c.https,To.c.mailto,To.c.data,To.c.file,To.c.vscodeFileResource,To.c.vscodeRemote,To.c.vscodeRemoteResource];return no.isTrusted&&_t.push(To.c.command),{config:{ALLOWED_TAGS:["ul","li","p","b","i","code","blockquote","ol","h1","h2","h3","h4","h5","h6","hr","em","pre","table","thead","tbody","tr","th","td","div","del","a","strong","br","img","span"],ALLOWED_ATTR:["href","data-href","target","title","src","alt","class","style","data-code","width","height","align"],ALLOW_UNKNOWN_PROTOCOLS:!0},allowedSchemes:_t}}var ut=t("W9cx"),Dt=t("WBhO"),Pt=t("TQUy"),Wt=t("twdY"),zt=t("HdwC"),so=function(no,_t,Tt,Nt){var rt=arguments.length,lt=rt<3?_t:Nt===null?Nt=Object.getOwnPropertyDescriptor(_t,Tt):Nt,bt;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")lt=Reflect.decorate(no,_t,Tt,Nt);else for(var St=no.length-1;St>=0;St--)(bt=no[St])&&(lt=(rt<3?bt(lt):rt>3?bt(_t,Tt,lt):bt(_t,Tt))||lt);return rt>3&<&&Object.defineProperty(_t,Tt,lt),lt},wo=function(no,_t){return function(Tt,Nt){_t(Tt,Nt,no)}},No=function(no,_t,Tt,Nt){function rt(lt){return lt instanceof Tt?lt:new Tt(function(bt){bt(lt)})}return new(Tt||(Tt=Promise))(function(lt,bt){function St(qt){try{bo(Nt.next(qt))}catch(Eo){bt(Eo)}}function Qt(qt){try{bo(Nt.throw(qt))}catch(Eo){bt(Eo)}}function bo(qt){qt.done?lt(qt.value):rt(qt.value).then(St,Qt)}bo((Nt=Nt.apply(no,_t||[])).next())})},di;let _o=class no{constructor(_t,Tt,Nt){this._options=_t,this._modeService=Tt,this._openerService=Nt,this._onDidRenderAsync=new It.b,this.onDidRenderAsync=this._onDidRenderAsync.event}dispose(){this._onDidRenderAsync.dispose()}render(_t,Tt,Nt){if(!_t){const bt=document.createElement("span");return{element:bt,dispose:()=>{}}}const rt=new xo.b,lt=rt.add(Ut(_t,Object.assign(Object.assign({},this._getRenderOptions(_t,rt)),Tt),Nt));return{element:lt.element,dispose:()=>rt.dispose()}}_getRenderOptions(_t,Tt){return{baseUrl:this._options.baseUrl,codeBlockRenderer:(Nt,rt)=>No(this,void 0,void 0,function*(){var lt,bt,St,Qt;let bo;Nt?bo=this._modeService.getModeIdForLanguageName(Nt):this._options.editor&&(bo=(lt=this._options.editor.getModel())===null||lt===void 0?void 0:lt.getLanguageId()),bo||(bo="plaintext"),this._modeService.triggerMode(bo);const qt=(bt=yield Wt.E.getPromise(bo))!==null&&bt!==void 0?bt:void 0,Eo=document.createElement("span");if(Eo.innerHTML=(Qt=(St=no._ttpTokenizer)===null||St===void 0?void 0:St.createHTML(rt,this._modeService.languageIdCodec,qt))!==null&&Qt!==void 0?Qt:Object(Pt.b)(rt,this._modeService.languageIdCodec,qt),this._options.editor){const Ro=this._options.editor.getOption(43);zt.a.applyFontInfoSlow(Eo,Ro)}else this._options.codeBlockFontFamily&&(Eo.style.fontFamily=this._options.codeBlockFontFamily);return Eo}),asyncRenderCallback:()=>this._onDidRenderAsync.fire(),actionHandler:{callback:Nt=>this._openerService.open(Nt,{fromUserGesture:!0,allowContributedOpeners:!0,allowCommands:_t.isTrusted}).catch(Et.f),disposables:Tt}}}};_o._ttpTokenizer=(di=window.trustedTypes)===null||di===void 0?void 0:di.createPolicy("tokenizeToString",{createHTML(no,_t,Tt){return Object(Pt.b)(no,_t,Tt)}}),_o=so([wo(1,Dt.a),wo(2,ut.a)],_o)},vAKA:function(mt,M,t){},vATl:function(mt,M,t){"use strict";t.d(M,"a",function(){return r}),t.d(M,"b",function(){return w}),t.d(M,"d",function(){return b}),t.d(M,"c",function(){return u});var g=t("N0LK"),B=t("aokT"),x=t("JQT/"),R=t("pmY6"),A=t("sswD"),j=t("T8No"),I=t("24hK"),v=t("Cg/j"),C=t("9fML"),m=t("3/fG");const d=Object(v.c)("IEditorCancelService"),D=new j.c("cancellableOperation",!1,Object(m.a)("cancellableOperation","Whether the editor runs a cancellable operation, e.g. like 'Peek References'"));Object(C.b)(d,class{constructor(){this._tokens=new WeakMap}add(c,p){let S=this._tokens.get(c);S||(S=c.invokeWithinContext(y=>{const O=D.bindTo(y.get(j.b)),k=new I.a;return{key:O,tokens:k}}),this._tokens.set(c,S));let E;return S.key.set(!0),E=S.tokens.push(p),()=>{E&&(E(),S.key.set(!S.tokens.isEmpty()),E=void 0)}}cancel(c){const p=this._tokens.get(c);if(!p)return;const S=p.tokens.pop();S&&(S.cancel(),p.key.set(!p.tokens.isEmpty()))}},!0);class L extends x.b{constructor(c,p){super(p);this.editor=c,this._unregister=c.invokeWithinContext(S=>S.get(d).add(c,this))}dispose(){this._unregister(),super.dispose()}}Object(A.k)(new class extends A.c{constructor(){super({id:"editor.cancelOperation",kbOpts:{weight:100,primary:9},precondition:D})}runEditorCommand(c,p){c.get(d).cancel(p)}});class r{constructor(c,p){if(this.flags=p,(this.flags&1)!==0){const S=c.getModel();this.modelVersionId=S?g.v("{0}#{1}",S.uri.toString(),S.getVersionId()):null}else this.modelVersionId=null;(this.flags&4)!==0?this.position=c.getPosition():this.position=null,(this.flags&2)!==0?this.selection=c.getSelection():this.selection=null,(this.flags&8)!==0?(this.scrollLeft=c.getScrollLeft(),this.scrollTop=c.getScrollTop()):(this.scrollLeft=-1,this.scrollTop=-1)}_equals(c){if(!(c instanceof r))return!1;const p=c;return this.modelVersionId!==p.modelVersionId||(this.scrollLeft!==p.scrollLeft||this.scrollTop!==p.scrollTop||(!this.position&&p.position||this.position&&!p.position||this.position&&p.position&&!this.position.equals(p.position)))?!1:!(!this.selection&&p.selection||this.selection&&!p.selection||this.selection&&p.selection&&!this.selection.equalsRange(p.selection))}validate(c){return this._equals(new r(c,this.flags))}}class w extends L{constructor(c,p,S,E){super(c,E);this._listener=new R.b,p&4&&this._listener.add(c.onDidChangeCursorPosition(y=>{(!S||!B.a.containsPosition(S,y.position))&&this.cancel()})),p&2&&this._listener.add(c.onDidChangeCursorSelection(y=>{(!S||!B.a.containsRange(S,y.selection))&&this.cancel()})),p&8&&this._listener.add(c.onDidScrollChange(y=>this.cancel())),p&1&&(this._listener.add(c.onDidChangeModel(y=>this.cancel())),this._listener.add(c.onDidChangeModelContent(y=>this.cancel())))}dispose(){this._listener.dispose(),super.dispose()}}class b extends x.b{constructor(c,p){super(p);this._listener=c.onDidChangeContent(()=>this.cancel())}dispose(){this._listener.dispose(),super.dispose()}}class u{constructor(c,p,S){this._visiblePosition=c,this._visiblePositionScrollDelta=p,this._cursorPosition=S}static capture(c){let p=null,S=0;if(c.getScrollTop()!==0){const E=c.getVisibleRanges();if(E.length>0){p=E[0].getStartPosition();const y=c.getTopForPosition(p.lineNumber,p.column);S=c.getScrollTop()-y}}return new u(p,S,c.getPosition())}restore(c){if(this._visiblePosition){const p=c.getTopForPosition(this._visiblePosition.lineNumber,this._visiblePosition.column);c.setScrollTop(p+this._visiblePositionScrollDelta)}}restoreRelativeVerticalPositionOfCursor(c){const p=c.getPosition();if(!this._cursorPosition||!p)return;const S=c.getTopForLineNumber(p.lineNumber)-c.getTopForLineNumber(this._cursorPosition.lineNumber);c.setScrollTop(c.getScrollTop()+S)}}},vRMv:function(mt,M,t){"use strict";t.d(M,"b",function(){return v}),t.d(M,"a",function(){return C}),t.d(M,"c",function(){return m}),t.d(M,"e",function(){return d}),t.d(M,"d",function(){return D});var g=t("JQT/"),B=t("/cxE"),x=t("sswD"),R=t("twdY"),A=t("9o5J"),j=function(r,w,b,u){function c(p){return p instanceof b?p:new b(function(S){S(p)})}return new(b||(b=Promise))(function(p,S){function E(k){try{O(u.next(k))}catch(Q){S(Q)}}function y(k){try{O(u.throw(k))}catch(Q){S(Q)}}function O(k){k.done?p(k.value):c(k.value).then(E,y)}O((u=u.apply(r,w||[])).next())})};function I(r,w,b,u){const c=b.ordered(r),p=c.map(S=>Promise.resolve(u(S,r,w)).then(void 0,E=>{Object(B.g)(E);return}));return Promise.all(p).then(S=>{const E=[];for(let y of S)Array.isArray(y)?E.push(...y):y&&E.push(y);return E})}function v(r,w,b){return I(r,w,R.f,(u,c,p)=>u.provideDefinition(c,p,b))}function C(r,w,b){return I(r,w,R.e,(u,c,p)=>u.provideDeclaration(c,p,b))}function m(r,w,b){return I(r,w,R.q,(u,c,p)=>u.provideImplementation(c,p,b))}function d(r,w,b){return I(r,w,R.F,(u,c,p)=>u.provideTypeDefinition(c,p,b))}function D(r,w,b,u){return I(r,w,R.x,(c,p,S)=>j(this,void 0,void 0,function*(){const E=yield c.provideReferences(p,S,{includeDeclaration:!0},u);if(!b||!E||E.length!==2)return E;const y=yield c.provideReferences(p,S,{includeDeclaration:!1},u);return y&&y.length===1?y:E}))}function L(r){return j(this,void 0,void 0,function*(){const w=yield r(),b=new A.c(w,""),u=b.references.map(c=>c.link);return b.dispose(),u})}Object(x.n)("_executeDefinitionProvider",(r,w)=>L(()=>v(r,w,g.a.None))),Object(x.n)("_executeDeclarationProvider",(r,w)=>L(()=>C(r,w,g.a.None))),Object(x.n)("_executeImplementationProvider",(r,w)=>L(()=>m(r,w,g.a.None))),Object(x.n)("_executeTypeDefinitionProvider",(r,w)=>L(()=>d(r,w,g.a.None))),Object(x.n)("_executeReferenceProvider",(r,w)=>L(()=>D(r,w,!1,g.a.None)))},vVA1:function(mt,M,t){"use strict";t.r(M);var g=t("sswD"),B=t("scqD"),x=t("A9l+");class R extends g.b{constructor(){super({id:"editor.action.toggleHighContrast",label:x.h.toggleHighContrast,alias:"Toggle High Contrast Theme",precondition:void 0});this._originalThemeName=null}run(A,j){const I=A.get(B.a);this._originalThemeName?(I.setTheme(this._originalThemeName),this._originalThemeName=null):(this._originalThemeName=I.getColorTheme().themeName,I.setTheme("hc-black"))}}Object(g.j)(R)},vl9R:function(mt,M,t){"use strict";t.d(M,"b",function(){return B}),t.d(M,"a",function(){return x});const g=Object.prototype.hasOwnProperty;function B(R,A){for(let j in R)if(g.call(R,j)){const I=A({key:j,value:R[j]},function(){delete R[j]});if(I===!1)return}}class x{constructor(){this.map=new Map}add(R,A){let j=this.map.get(R);j||(j=new Set,this.map.set(R,j)),j.add(A)}delete(R,A){const j=this.map.get(R);if(!j)return;j.delete(A),j.size===0&&this.map.delete(R)}forEach(R,A){const j=this.map.get(R);if(!j)return;j.forEach(A)}}},"w29/":function(mt,M,t){"use strict";t.r(M),t.d(M,"CutAction",function(){return b}),t.d(M,"CopyAction",function(){return u}),t.d(M,"PasteAction",function(){return c});var g=t("D3Dy"),B=t("MNsG"),x=t("5TxY"),R=t("sswD"),A=t("Vxe3"),j=t("wQH0"),I=t("3/fG"),v=t("fjLI"),C=t("9XeP"),m=function(E,y,O,k){function Q(q){return q instanceof O?q:new O(function(z){z(q)})}return new(O||(O=Promise))(function(q,z){function J(ne){try{Z(k.next(ne))}catch(le){z(le)}}function re(ne){try{Z(k.throw(ne))}catch(le){z(le)}}function Z(ne){ne.done?q(ne.value):Q(ne.value).then(J,re)}Z((k=k.apply(E,y||[])).next())})};const d="9_cutcopypaste",D=B.g||document.queryCommandSupported("cut"),L=B.g||document.queryCommandSupported("copy"),r=typeof navigator.clipboard=="undefined"||g.g?document.queryCommandSupported("paste"):!0;function w(E){return E.register(),E}const b=D?w(new R.e({id:"editor.action.clipboardCutAction",precondition:void 0,kbOpts:B.g?{primary:2048|54,win:{primary:2048|54,secondary:[1024|20]},weight:100}:void 0,menuOpts:[{menuId:v.b.MenubarEditMenu,group:"2_ccp",title:I.a({key:"miCut",comment:["&& denotes a mnemonic"]},"Cu&&t"),order:1},{menuId:v.b.EditorContext,group:d,title:I.a("actions.clipboard.cutLabel","Cut"),when:j.a.writable,order:1},{menuId:v.b.CommandPalette,group:"",title:I.a("actions.clipboard.cutLabel","Cut"),order:1},{menuId:v.b.SimpleEditorContext,group:d,title:I.a("actions.clipboard.cutLabel","Cut"),when:j.a.writable,order:1}]})):void 0,u=L?w(new R.e({id:"editor.action.clipboardCopyAction",precondition:void 0,kbOpts:B.g?{primary:2048|33,win:{primary:2048|33,secondary:[2048|19]},weight:100}:void 0,menuOpts:[{menuId:v.b.MenubarEditMenu,group:"2_ccp",title:I.a({key:"miCopy",comment:["&& denotes a mnemonic"]},"&&Copy"),order:2},{menuId:v.b.EditorContext,group:d,title:I.a("actions.clipboard.copyLabel","Copy"),order:2},{menuId:v.b.CommandPalette,group:"",title:I.a("actions.clipboard.copyLabel","Copy"),order:1},{menuId:v.b.SimpleEditorContext,group:d,title:I.a("actions.clipboard.copyLabel","Copy"),order:2}]})):void 0;v.d.appendMenuItem(v.b.MenubarEditMenu,{submenu:v.b.MenubarCopy,title:{value:I.a("copy as","Copy As"),original:"Copy As"},group:"2_ccp",order:3}),v.d.appendMenuItem(v.b.EditorContext,{submenu:v.b.EditorContextCopy,title:{value:I.a("copy as","Copy As"),original:"Copy As"},group:d,order:3});const c=r?w(new R.e({id:"editor.action.clipboardPasteAction",precondition:void 0,kbOpts:B.g?{primary:2048|52,win:{primary:2048|52,secondary:[1024|19]},linux:{primary:2048|52,secondary:[1024|19]},weight:100}:void 0,menuOpts:[{menuId:v.b.MenubarEditMenu,group:"2_ccp",title:I.a({key:"miPaste",comment:["&& denotes a mnemonic"]},"&&Paste"),order:4},{menuId:v.b.EditorContext,group:d,title:I.a("actions.clipboard.pasteLabel","Paste"),when:j.a.writable,order:4},{menuId:v.b.CommandPalette,group:"",title:I.a("actions.clipboard.pasteLabel","Paste"),order:1},{menuId:v.b.SimpleEditorContext,group:d,title:I.a("actions.clipboard.pasteLabel","Paste"),when:j.a.writable,order:4}]})):void 0;class p extends R.b{constructor(){super({id:"editor.action.clipboardCopyWithSyntaxHighlightingAction",label:I.a("actions.clipboard.copyWithSyntaxHighlightingLabel","Copy With Syntax Highlighting"),alias:"Copy With Syntax Highlighting",precondition:void 0,kbOpts:{kbExpr:j.a.textInputFocus,primary:0,weight:100}})}run(E,y){if(!y.hasModel())return;const O=y.getOption(32);if(!O&&y.getSelection().isEmpty())return;x.a.forceCopyWithSyntaxHighlighting=!0,y.focus(),document.execCommand("copy"),x.a.forceCopyWithSyntaxHighlighting=!1}}function S(E,y){if(!E)return;E.addImplementation(1e4,"code-editor",(O,k)=>{const Q=O.get(A.a).getFocusedCodeEditor();if(Q&&Q.hasTextFocus()){const q=Q.getOption(32),z=Q.getSelection();return z&&z.isEmpty()&&!q||document.execCommand(y),!0}return!1}),E.addImplementation(0,"generic-dom",(O,k)=>(document.execCommand(y),!0))}S(b,"cut"),S(u,"copy"),c&&(c.addImplementation(1e4,"code-editor",(E,y)=>{const O=E.get(A.a),k=E.get(C.a),Q=O.getFocusedCodeEditor();if(Q&&Q.hasTextFocus()){const q=document.execCommand("paste");return!q&&B.h?(()=>m(void 0,void 0,void 0,function*(){const z=yield k.readText();if(z!==""){const J=x.b.INSTANCE.get(z);let re=!1,Z=null,ne=null;J&&(re=Q.getOption(32)&&!!J.isFromEmptySelection,Z=typeof J.multicursorText!="undefined"?J.multicursorText:null,ne=J.mode),Q.trigger("keyboard","paste",{text:z,pasteOnNewLine:re,multicursorText:Z,mode:ne})}}))():!0}return!1}),c.addImplementation(0,"generic-dom",(E,y)=>(document.execCommand("paste"),!0))),L&&Object(R.j)(p)},w9QG:function(mt,M,t){"use strict";t.r(M);var g=t("+hIS");Object(g.a)({id:"sql",extensions:[".sql"],aliases:["SQL"],loader:function(){return t.e(370).then(t.bind(null,"Czvm"))}})},wQH0:function(mt,M,t){"use strict";t.d(M,"a",function(){return x});var g=t("3/fG"),B=t("T8No"),x;(function(R){R.editorSimpleInput=new B.c("editorSimpleInput",!1,!0),R.editorTextFocus=new B.c("editorTextFocus",!1,g.a("editorTextFocus","Whether the editor text has focus (cursor is blinking)")),R.focus=new B.c("editorFocus",!1,g.a("editorFocus","Whether the editor or an editor widget has focus (e.g. focus is in the find widget)")),R.textInputFocus=new B.c("textInputFocus",!1,g.a("textInputFocus","Whether an editor or a rich text input has focus (cursor is blinking)")),R.readOnly=new B.c("editorReadonly",!1,g.a("editorReadonly","Whether the editor is read only")),R.inDiffEditor=new B.c("inDiffEditor",!1,g.a("inDiffEditor","Whether the context is a diff editor")),R.columnSelection=new B.c("editorColumnSelection",!1,g.a("editorColumnSelection","Whether `editor.columnSelection` is enabled")),R.writable=R.readOnly.toNegated(),R.hasNonEmptySelection=new B.c("editorHasSelection",!1,g.a("editorHasSelection","Whether the editor has text selected")),R.hasOnlyEmptySelection=R.hasNonEmptySelection.toNegated(),R.hasMultipleSelections=new B.c("editorHasMultipleSelections",!1,g.a("editorHasMultipleSelections","Whether the editor has multiple selections")),R.hasSingleSelection=R.hasMultipleSelections.toNegated(),R.tabMovesFocus=new B.c("editorTabMovesFocus",!1,g.a("editorTabMovesFocus","Whether `Tab` will move focus out of the editor")),R.tabDoesNotMoveFocus=R.tabMovesFocus.toNegated(),R.isInWalkThroughSnippet=new B.c("isInEmbeddedEditor",!1,!0),R.canUndo=new B.c("canUndo",!1,!0),R.canRedo=new B.c("canRedo",!1,!0),R.hoverVisible=new B.c("editorHoverVisible",!1,g.a("editorHoverVisible","Whether the editor hover is visible")),R.inCompositeEditor=new B.c("inCompositeEditor",void 0,g.a("inCompositeEditor","Whether the editor is part of a larger editor (e.g. notebooks)")),R.notInCompositeEditor=R.inCompositeEditor.toNegated(),R.languageId=new B.c("editorLangId","",g.a("editorLangId","The language identifier of the editor")),R.hasCompletionItemProvider=new B.c("editorHasCompletionItemProvider",!1,g.a("editorHasCompletionItemProvider","Whether the editor has a completion item provider")),R.hasCodeActionsProvider=new B.c("editorHasCodeActionsProvider",!1,g.a("editorHasCodeActionsProvider","Whether the editor has a code actions provider")),R.hasCodeLensProvider=new B.c("editorHasCodeLensProvider",!1,g.a("editorHasCodeLensProvider","Whether the editor has a code lens provider")),R.hasDefinitionProvider=new B.c("editorHasDefinitionProvider",!1,g.a("editorHasDefinitionProvider","Whether the editor has a definition provider")),R.hasDeclarationProvider=new B.c("editorHasDeclarationProvider",!1,g.a("editorHasDeclarationProvider","Whether the editor has a declaration provider")),R.hasImplementationProvider=new B.c("editorHasImplementationProvider",!1,g.a("editorHasImplementationProvider","Whether the editor has an implementation provider")),R.hasTypeDefinitionProvider=new B.c("editorHasTypeDefinitionProvider",!1,g.a("editorHasTypeDefinitionProvider","Whether the editor has a type definition provider")),R.hasHoverProvider=new B.c("editorHasHoverProvider",!1,g.a("editorHasHoverProvider","Whether the editor has a hover provider")),R.hasDocumentHighlightProvider=new B.c("editorHasDocumentHighlightProvider",!1,g.a("editorHasDocumentHighlightProvider","Whether the editor has a document highlight provider")),R.hasDocumentSymbolProvider=new B.c("editorHasDocumentSymbolProvider",!1,g.a("editorHasDocumentSymbolProvider","Whether the editor has a document symbol provider")),R.hasReferenceProvider=new B.c("editorHasReferenceProvider",!1,g.a("editorHasReferenceProvider","Whether the editor has a reference provider")),R.hasRenameProvider=new B.c("editorHasRenameProvider",!1,g.a("editorHasRenameProvider","Whether the editor has a rename provider")),R.hasSignatureHelpProvider=new B.c("editorHasSignatureHelpProvider",!1,g.a("editorHasSignatureHelpProvider","Whether the editor has a signature help provider")),R.hasInlayHintsProvider=new B.c("editorHasInlayHintsProvider",!1,g.a("editorHasInlayHintsProvider","Whether the editor has an inline hints provider")),R.hasDocumentFormattingProvider=new B.c("editorHasDocumentFormattingProvider",!1,g.a("editorHasDocumentFormattingProvider","Whether the editor has a document formatting provider")),R.hasDocumentSelectionFormattingProvider=new B.c("editorHasDocumentSelectionFormattingProvider",!1,g.a("editorHasDocumentSelectionFormattingProvider","Whether the editor has a document selection formatting provider")),R.hasMultipleDocumentFormattingProvider=new B.c("editorHasMultipleDocumentFormattingProvider",!1,g.a("editorHasMultipleDocumentFormattingProvider","Whether the editor has multiple document formatting providers")),R.hasMultipleDocumentSelectionFormattingProvider=new B.c("editorHasMultipleDocumentSelectionFormattingProvider",!1,g.a("editorHasMultipleDocumentSelectionFormattingProvider","Whether the editor has multiple document selection formatting providers"))})(x||(x={}))},woZy:function(mt,M,t){"use strict";t.r(M);var g=t("+hIS");Object(g.a)({id:"pug",extensions:[".jade",".pug"],aliases:["Pug","Jade","jade"],loader:function(){return t.e(355).then(t.bind(null,"I+Au"))}})},wxcJ:function(mt,M,t){"use strict";(function(g){t.d(M,"a",function(){return R}),t.d(M,"b",function(){return A}),t.d(M,"c",function(){return j});var B=t("MNsG");let x;if(typeof B.b.vscode!="undefined"&&typeof B.b.vscode.process!="undefined"){const I=B.b.vscode.process;x={get platform(){return I.platform},get arch(){return I.arch},get env(){return I.env},cwd(){return I.cwd()},nextTick(v){return Object(B.j)(v)}}}else typeof g!="undefined"?x={get platform(){return g.platform},get arch(){return g.arch},get env(){return Object({NODE_ENV:"production"})},cwd(){return Object({NODE_ENV:"production"}).VSCODE_CWD||g.cwd()},nextTick(I){return g.nextTick(I)}}:x={get platform(){return B.i?"win32":B.f?"darwin":"linux"},get arch(){return},nextTick(I){return Object(B.j)(I)},get env(){return{}},cwd(){return"/"}};const R=x.cwd,A=x.env,j=x.platform}).call(this,t("B0ME"))},"x/UI":function(mt,M,t){"use strict";t.d(M,"a",function(){return R}),t.d(M,"b",function(){return I}),t.d(M,"c",function(){return v});var g=t("Cg/j"),B=t("bY76"),x=t("746U");const R=Object(g.c)("IWorkspaceEditService");function A(m){return Object(x.k)(m)&&(Boolean(m.newUri)||Boolean(m.oldUri))}function j(m){return Object(x.k)(m)&&B.a.isUri(m.resource)&&Object(x.k)(m.edit)}class I{constructor(m){this.metadata=m}static convert(m){return m.edits.map(d=>{if(j(d))return new v(d.resource,d.edit,d.modelVersionId,d.metadata);if(A(d))return new C(d.oldUri,d.newUri,d.options,d.metadata);throw new Error("Unsupported edit")})}}class v extends I{constructor(m,d,D,L){super(L);this.resource=m,this.textEdit=d,this.versionId=D}}class C extends I{constructor(m,d,D,L){super(L);this.oldResource=m,this.newResource=d,this.options=D}}},xONI:function(mt,M,t){"use strict";t.d(M,"a",function(){return u});var g=t("EffR"),B=t("7lZ/"),x=t("X+cX"),R=t("JQT/"),A=t("eLzo"),j=t("pmY6"),I=t("746U"),v=t("3/fG"),C=function(E,y,O,k){function Q(q){return q instanceof O?q:new O(function(z){z(q)})}return new(O||(O=Promise))(function(q,z){function J(ne){try{Z(k.next(ne))}catch(le){z(le)}}function re(ne){try{Z(k.throw(ne))}catch(le){z(le)}}function Z(ne){ne.done?q(ne.value):Q(ne.value).then(J,re)}Z((k=k.apply(E,y||[])).next())})};function m(E,y){Object(I.l)(y)?E.title=y:(y==null?void 0:y.markdownNotSupportedFallback)?E.title=y.markdownNotSupportedFallback:E.removeAttribute("title")}class d{constructor(E,y,O){this.hoverDelegate=E,this.target=y,this.fadeInAnimation=O}update(E,y){var O;return C(this,void 0,void 0,function*(){if(this._cancellationTokenSource&&(this._cancellationTokenSource.dispose(!0),this._cancellationTokenSource=void 0),this.isDisposed)return;let k;if(E===void 0||Object(I.l)(E)||E instanceof HTMLElement)k=E;else if(!Object(I.i)(E.markdown))k=(O=E.markdown)!==null&&O!==void 0?O:E.markdownNotSupportedFallback;else{this._hoverWidget||this.show(Object(v.a)("iconLabel.loading","Loading..."),y),this._cancellationTokenSource=new R.b;const Q=this._cancellationTokenSource.token;if(k=yield E.markdown(Q),this.isDisposed||Q.isCancellationRequested)return}this.show(k,y)})}show(E,y){const O=this._hoverWidget;if(this.hasContent(E)){const k={content:E,target:this.target,showPointer:this.hoverDelegate.placement==="element",hoverPosition:2,skipFadeInAnimation:!this.fadeInAnimation||!!O};this._hoverWidget=this.hoverDelegate.showHover(k,y)}O==null||O.dispose()}hasContent(E){return E?Object(A.c)(E)?!!E.value:!0:!1}get isDisposed(){var E;return(E=this._hoverWidget)===null||E===void 0?void 0:E.isDisposed}dispose(){var E,y;(E=this._hoverWidget)===null||E===void 0||E.dispose(),(y=this._cancellationTokenSource)===null||y===void 0||y.dispose(!0),this._cancellationTokenSource=void 0}}function D(E,y,O){let k,Q;const q=(ne,le)=>{var _e;ne&&(Q==null||Q.dispose(),Q=void 0),le&&(k==null||k.dispose(),k=void 0),(_e=E.onDidHideHover)===null||_e===void 0||_e.call(E)},z=(ne,le,_e)=>new x.g(()=>C(this,void 0,void 0,function*(){(!Q||Q.isDisposed)&&(Q=new d(E,_e||y,ne>0),yield Q.update(O,le))}),ne),J=()=>{if(k)return;const ne=new j.b,le=oe=>q(!1,oe.fromElement===y);ne.add(g.i(y,g.d.MOUSE_LEAVE,le,!0));const _e=()=>q(!0,!0);ne.add(g.i(y,g.d.MOUSE_DOWN,_e,!0));const Ce={targetElements:[y],dispose:()=>{}};if(E.placement===void 0||E.placement==="mouse"){const oe=ae=>Ce.x=ae.x+10;ne.add(g.i(y,g.d.MOUSE_MOVE,oe,!0))}ne.add(z(E.delay,!1,Ce)),k=ne},re=g.i(y,g.d.MOUSE_OVER,J,!0),Z={show:ne=>{q(!1,!0),z(0,ne)},hide:()=>{q(!0,!0)},update:ne=>C(this,void 0,void 0,function*(){O=ne,yield Q==null?void 0:Q.update(O)}),dispose:()=>{re.dispose(),q(!0,!0)}};return Z}var L=t("qj0h"),r=t("nuFA"),w=t("KgQ1");class b{constructor(E){this._element=E}get element(){return this._element}set textContent(E){if(this.disposed||E===this._textContent)return;this._textContent=E,this._element.textContent=E}set className(E){if(this.disposed||E===this._className)return;this._className=E,this._element.className=E}set empty(E){if(this.disposed||E===this._empty)return;this._empty=E,this._element.style.marginLeft=E?"0":""}dispose(){this.disposed=!0}}class u extends j.a{constructor(E,y){super();this.customHovers=new Map,this.domNode=this._register(new b(g.q(E,g.a(".monaco-icon-label")))),this.labelContainer=g.q(this.domNode.element,g.a(".monaco-icon-label-container"));const O=g.q(this.labelContainer,g.a("span.monaco-icon-name-container"));this.descriptionContainer=this._register(new b(g.q(this.labelContainer,g.a("span.monaco-icon-description-container")))),(y==null?void 0:y.supportHighlights)||(y==null?void 0:y.supportIcons)?this.nameNode=new S(O,!!y.supportIcons):this.nameNode=new c(O),(y==null?void 0:y.supportDescriptionHighlights)?this.descriptionNodeFactory=()=>new B.a(g.q(this.descriptionContainer.element,g.a("span.label-description")),!!y.supportIcons):this.descriptionNodeFactory=()=>this._register(new b(g.q(this.descriptionContainer.element,g.a("span.label-description")))),this.hoverDelegate=y==null?void 0:y.hoverDelegate}get element(){return this.domNode.element}setLabel(E,y,O){const k=["monaco-icon-label"];O&&(O.extraClasses&&k.push(...O.extraClasses),O.italic&&k.push("italic"),O.strikethrough&&k.push("strikethrough")),this.domNode.className=k.join(" "),this.setupHover((O==null?void 0:O.descriptionTitle)?this.labelContainer:this.element,O==null?void 0:O.title),this.nameNode.setLabel(E,O),(y||this.descriptionNode)&&(this.descriptionNode||(this.descriptionNode=this.descriptionNodeFactory()),this.descriptionNode instanceof B.a?(this.descriptionNode.set(y||"",O?O.descriptionMatches:void 0),this.setupHover(this.descriptionNode.element,O==null?void 0:O.descriptionTitle)):(this.descriptionNode.textContent=y||"",this.setupHover(this.descriptionNode.element,(O==null?void 0:O.descriptionTitle)||""),this.descriptionNode.empty=!y))}setupHover(E,y){const O=this.customHovers.get(E);if(O&&(O.dispose(),this.customHovers.delete(E)),!y){E.removeAttribute("title");return}if(!this.hoverDelegate)m(E,y);else{const k=D(this.hoverDelegate,E,y);k&&this.customHovers.set(E,k)}}dispose(){super.dispose();for(const E of this.customHovers.values())E.dispose();this.customHovers.clear()}}class c{constructor(E){this.container=E,this.label=void 0,this.singleLabel=void 0}setLabel(E,y){if(this.label===E&&Object(L.d)(this.options,y))return;if(this.label=E,this.options=y,typeof E=="string")this.singleLabel||(this.container.innerText="",this.container.classList.remove("multiple"),this.singleLabel=g.q(this.container,g.a("a.label-name",{id:y==null?void 0:y.domId}))),this.singleLabel.textContent=E;else{this.container.innerText="",this.container.classList.add("multiple"),this.singleLabel=void 0;for(let O=0;O<E.length;O++){const k=E[O],Q=(y==null?void 0:y.domId)&&`${y==null?void 0:y.domId}_${O}`;g.q(this.container,g.a("a.label-name",{id:Q,"data-icon-label-count":E.length,"data-icon-label-index":O,role:"treeitem"},k)),O<E.length-1&&g.q(this.container,g.a("span.label-separator",void 0,(y==null?void 0:y.separator)||"/"))}}}}function p(E,y,O){if(!O)return;let k=0;return E.map(Q=>{const q={start:k,end:k+Q.length},z=O.map(J=>r.a.intersect(q,J)).filter(J=>!r.a.isEmpty(J)).map(({start:J,end:re})=>({start:J-k,end:re-k}));return k=q.end+y.length,z})}class S{constructor(E,y){this.container=E,this.supportIcons=y,this.label=void 0,this.singleLabel=void 0}setLabel(E,y){if(this.label===E&&Object(L.d)(this.options,y))return;if(this.label=E,this.options=y,typeof E=="string")this.singleLabel||(this.container.innerText="",this.container.classList.remove("multiple"),this.singleLabel=new B.a(g.q(this.container,g.a("a.label-name",{id:y==null?void 0:y.domId})),this.supportIcons)),this.singleLabel.set(E,y==null?void 0:y.matches,void 0,y==null?void 0:y.labelEscapeNewLines);else{this.container.innerText="",this.container.classList.add("multiple"),this.singleLabel=void 0;const O=(y==null?void 0:y.separator)||"/",k=p(E,O,y==null?void 0:y.matches);for(let Q=0;Q<E.length;Q++){const q=E[Q],z=k?k[Q]:void 0,J=(y==null?void 0:y.domId)&&`${y==null?void 0:y.domId}_${Q}`,re=g.a("a.label-name",{id:J,"data-icon-label-count":E.length,"data-icon-label-index":Q,role:"treeitem"}),Z=new B.a(g.q(this.container,re),this.supportIcons);Z.set(q,z,void 0,y==null?void 0:y.labelEscapeNewLines),Q<E.length-1&&g.q(re,g.a("span.label-separator",void 0,O))}}}}},xYNL:function(mt,M,t){"use strict";t.r(M);var g=t("+hIS");Object(g.a)({id:"mysql",extensions:[],aliases:["MySQL","mysql"],loader:function(){return t.e(345).then(t.bind(null,"tGOS"))}})},xmOD:function(mt,M,t){"use strict";t.r(M);var g=t("+hIS");Object(g.a)({id:"scheme",extensions:[".scm",".ss",".sch",".rkt"],aliases:["scheme","Scheme"],loader:function(){return t.e(365).then(t.bind(null,"fB/Z"))}})},y3CF:function(mt,M,t){"use strict";t.r(M);var g=t("+hIS");Object(g.a)({id:"postiats",extensions:[".dats",".sats",".hats"],aliases:["ATS","ATS/Postiats"],loader:function(){return t.e(352).then(t.bind(null,"YdqL"))}})},yEoX:function(mt,M,t){},yKqg:function(mt,M,t){"use strict";t.r(M);var g=t("+hIS");Object(g.a)({id:"restructuredtext",extensions:[".rst"],aliases:["reStructuredText","restructuredtext"],loader:function(){return t.e(361).then(t.bind(null,"LdT9"))}})},yqFB:function(mt,M,t){},yrU1:function(mt,M,t){},z3hU:function(mt,M,t){"use strict";t.r(M),t.d(M,"ModuleKind",function(){return R}),t.d(M,"JsxEmit",function(){return A}),t.d(M,"NewLineKind",function(){return j}),t.d(M,"ScriptTarget",function(){return I}),t.d(M,"ModuleResolutionKind",function(){return v}),t.d(M,"typescriptVersion",function(){return m}),t.d(M,"typescriptDefaults",function(){return d}),t.d(M,"javascriptDefaults",function(){return D}),t.d(M,"getTypeScriptWorker",function(){return L}),t.d(M,"getJavaScriptWorker",function(){return r});var g=t("M/lh"),B="4.4.4",x=t("v0SU");"use strict";var R;(function(b){b[b.None=0]="None",b[b.CommonJS=1]="CommonJS",b[b.AMD=2]="AMD",b[b.UMD=3]="UMD",b[b.System=4]="System",b[b.ES2015=5]="ES2015",b[b.ESNext=99]="ESNext"})(R||(R={}));var A;(function(b){b[b.None=0]="None",b[b.Preserve=1]="Preserve",b[b.React=2]="React",b[b.ReactNative=3]="ReactNative",b[b.ReactJSX=4]="ReactJSX",b[b.ReactJSXDev=5]="ReactJSXDev"})(A||(A={}));var j;(function(b){b[b.CarriageReturnLineFeed=0]="CarriageReturnLineFeed",b[b.LineFeed=1]="LineFeed"})(j||(j={}));var I;(function(b){b[b.ES3=0]="ES3",b[b.ES5=1]="ES5",b[b.ES2015=2]="ES2015",b[b.ES2016=3]="ES2016",b[b.ES2017=4]="ES2017",b[b.ES2018=5]="ES2018",b[b.ES2019=6]="ES2019",b[b.ES2020=7]="ES2020",b[b.ESNext=99]="ESNext",b[b.JSON=100]="JSON",b[b.Latest=99]="Latest"})(I||(I={}));var v;(function(b){b[b.Classic=1]="Classic",b[b.NodeJs=2]="NodeJs"})(v||(v={}));var C=function(){function b(u,c,p,S){this._onDidChange=new x.Emitter,this._onDidExtraLibsChange=new x.Emitter,this._extraLibs=Object.create(null),this._removedExtraLibs=Object.create(null),this._eagerModelSync=!1,this.setCompilerOptions(u),this.setDiagnosticsOptions(c),this.setWorkerOptions(p),this.setInlayHintsOptions(S),this._onDidExtraLibsChangeTimeout=-1}return Object.defineProperty(b.prototype,"onDidChange",{get:function(){return this._onDidChange.event},enumerable:!1,configurable:!0}),Object.defineProperty(b.prototype,"onDidExtraLibsChange",{get:function(){return this._onDidExtraLibsChange.event},enumerable:!1,configurable:!0}),Object.defineProperty(b.prototype,"workerOptions",{get:function(){return this._workerOptions},enumerable:!1,configurable:!0}),Object.defineProperty(b.prototype,"inlayHintsOptions",{get:function(){return this._inlayHintsOptions},enumerable:!1,configurable:!0}),b.prototype.getExtraLibs=function(){return this._extraLibs},b.prototype.addExtraLib=function(u,c){var p=this,S;if(typeof c=="undefined"?S="ts:extralib-"+Math.random().toString(36).substring(2,15):S=c,this._extraLibs[S]&&this._extraLibs[S].content===u)return{dispose:function(){}};var E=1;return this._removedExtraLibs[S]&&(E=this._removedExtraLibs[S]+1),this._extraLibs[S]&&(E=this._extraLibs[S].version+1),this._extraLibs[S]={content:u,version:E},this._fireOnDidExtraLibsChangeSoon(),{dispose:function(){var y=p._extraLibs[S];if(!y)return;if(y.version!==E)return;delete p._extraLibs[S],p._removedExtraLibs[S]=E,p._fireOnDidExtraLibsChangeSoon()}}},b.prototype.setExtraLibs=function(u){for(var c in this._extraLibs)this._removedExtraLibs[c]=this._extraLibs[c].version;if(this._extraLibs=Object.create(null),u&&u.length>0)for(var p=0,S=u;p<S.length;p++){var E=S[p],c=E.filePath||"ts:extralib-"+Math.random().toString(36).substring(2,15),y=E.content,O=1;this._removedExtraLibs[c]&&(O=this._removedExtraLibs[c]+1),this._extraLibs[c]={content:y,version:O}}this._fireOnDidExtraLibsChangeSoon()},b.prototype._fireOnDidExtraLibsChangeSoon=function(){var u=this;if(this._onDidExtraLibsChangeTimeout!==-1)return;this._onDidExtraLibsChangeTimeout=setTimeout(function(){u._onDidExtraLibsChangeTimeout=-1,u._onDidExtraLibsChange.fire(void 0)},0)},b.prototype.getCompilerOptions=function(){return this._compilerOptions},b.prototype.setCompilerOptions=function(u){this._compilerOptions=u||Object.create(null),this._onDidChange.fire(void 0)},b.prototype.getDiagnosticsOptions=function(){return this._diagnosticsOptions},b.prototype.setDiagnosticsOptions=function(u){this._diagnosticsOptions=u||Object.create(null),this._onDidChange.fire(void 0)},b.prototype.setWorkerOptions=function(u){this._workerOptions=u||Object.create(null),this._onDidChange.fire(void 0)},b.prototype.setInlayHintsOptions=function(u){this._inlayHintsOptions=u||Object.create(null),this._onDidChange.fire(void 0)},b.prototype.setMaximumWorkerIdleTime=function(u){},b.prototype.setEagerModelSync=function(u){this._eagerModelSync=u},b.prototype.getEagerModelSync=function(){return this._eagerModelSync},b}(),m=B,d=new C({allowNonTsExtensions:!0,target:I.Latest},{noSemanticValidation:!1,noSyntaxValidation:!1,onlyVisible:!1},{},{}),D=new C({allowNonTsExtensions:!0,allowJs:!0,target:I.Latest},{noSemanticValidation:!0,noSyntaxValidation:!1,onlyVisible:!1},{},{}),L=function(){return w().then(function(b){return b.getTypeScriptWorker()})},r=function(){return w().then(function(b){return b.getJavaScriptWorker()})};x.languages.typescript={ModuleKind:R,JsxEmit:A,NewLineKind:j,ScriptTarget:I,ModuleResolutionKind:v,typescriptVersion:m,typescriptDefaults:d,javascriptDefaults:D,getTypeScriptWorker:L,getJavaScriptWorker:r};function w(){return t.e(379).then(t.bind(null,"4yiN"))}x.languages.onLanguage("typescript",function(){return w().then(function(b){return b.setupTypeScript(d)})}),x.languages.onLanguage("javascript",function(){return w().then(function(b){return b.setupJavaScript(D)})})},zN7H:function(mt,M,t){"use strict";t.d(M,"a",function(){return v});var g=t("N0LK"),B=t("Ll0s"),x=t("aokT"),R=t("gCVg"),A=t("cMvZ");const j=Object.create(null);function I(C,m){if(m<=0)return"";j[C]||(j[C]=["",C]);const d=j[C];for(let D=d.length;D<=m;D++)d[D]=d[D-1]+C;return d[m]}class v{constructor(C,m){this._opts=m,this._selection=C,this._selectionId=null,this._useLastEditRangeForCursorEndPosition=!1,this._selectionStartColumnStaysPut=!1}static unshiftIndent(C,m,d,D,L){const r=B.a.visibleColumnFromColumn(C,m,d);if(L){const w=I(" ",D),b=B.a.prevIndentTabStop(r,D),u=b/D;return I(w,u)}else{const w=" ",b=B.a.prevRenderTabStop(r,d),u=b/d;return I(w,u)}}static shiftIndent(C,m,d,D,L){const r=B.a.visibleColumnFromColumn(C,m,d);if(L){const w=I(" ",D),b=B.a.nextIndentTabStop(r,D),u=b/D;return I(w,u)}else{const w=" ",b=B.a.nextRenderTabStop(r,d),u=b/d;return I(w,u)}}_addEditOperation(C,m,d){this._useLastEditRangeForCursorEndPosition?C.addTrackedEditOperation(m,d):C.addEditOperation(m,d)}getEditOperations(C,m){const d=this._selection.startLineNumber;let D=this._selection.endLineNumber;this._selection.endColumn===1&&d!==D&&(D=D-1);const{tabSize:L,indentSize:r,insertSpaces:w}=this._opts,b=d===D;if(this._opts.useTabStops){this._selection.isEmpty()&&(/^\s*$/.test(C.getLineContent(d))&&(this._useLastEditRangeForCursorEndPosition=!0));let u=0,c=0;for(let p=d;p<=D;p++,u=c){c=0;let S=C.getLineContent(p),E=g.u(S);if(this._opts.isUnshift&&(S.length===0||E===0))continue;if(!b&&!this._opts.isUnshift&&S.length===0)continue;if(E===-1&&(E=S.length),p>1){let O=B.a.visibleColumnFromColumn(S,E+1,L);if(O%r!==0&&C.isCheapToTokenize(p-1)){let k=A.b.getEnterAction(this._opts.autoIndent,C,new x.a(p-1,C.getLineMaxColumn(p-1),p-1,C.getLineMaxColumn(p-1)));if(k){if(c=u,k.appendText)for(let Q=0,q=k.appendText.length;Q<q&&c<r&&k.appendText.charCodeAt(Q)===32;Q++)c++;k.removeText&&(c=Math.max(0,c-k.removeText));for(let Q=0;Q<c&&!(E===0||S.charCodeAt(E-1)!==32);Q++)E--}}}if(this._opts.isUnshift&&E===0)continue;let y;this._opts.isUnshift?y=v.unshiftIndent(S,E+1,L,r,w):y=v.shiftIndent(S,E+1,L,r,w),this._addEditOperation(m,new x.a(p,1,p,E+1),y),p===d&&!this._selection.isEmpty()&&(this._selectionStartColumnStaysPut=this._selection.startColumn<=E+1)}}else{!this._opts.isUnshift&&this._selection.isEmpty()&&C.getLineLength(d)===0&&(this._useLastEditRangeForCursorEndPosition=!0);const u=w?I(" ",r):" ";for(let c=d;c<=D;c++){const p=C.getLineContent(c);let S=g.u(p);if(this._opts.isUnshift&&(p.length===0||S===0))continue;if(!b&&!this._opts.isUnshift&&p.length===0)continue;if(S===-1&&(S=p.length),this._opts.isUnshift&&S===0)continue;if(this._opts.isUnshift){S=Math.min(S,r);for(let E=0;E<S;E++){const y=p.charCodeAt(E);if(y===9){S=E+1;break}}this._addEditOperation(m,new x.a(c,1,c,S+1),"")}else this._addEditOperation(m,new x.a(c,1,c,1),u),c===d&&!this._selection.isEmpty()&&(this._selectionStartColumnStaysPut=this._selection.startColumn===1)}}this._selectionId=m.trackSelection(this._selection)}computeCursorState(C,m){if(this._useLastEditRangeForCursorEndPosition){let D=m.getInverseEditOperations()[0];return new R.a(D.range.endLineNumber,D.range.endColumn,D.range.endLineNumber,D.range.endColumn)}const d=m.getTrackedSelection(this._selectionId);if(this._selectionStartColumnStaysPut){let D=this._selection.startColumn,L=d.startColumn;return L<=D?d:d.getDirection()===0?new R.a(d.startLineNumber,D,d.endLineNumber,d.endColumn):new R.a(d.endLineNumber,d.endColumn,d.startLineNumber,D)}return d}}},zQEy:function(mt,M,t){"use strict";t.r(M);var g=t("+hIS");Object(g.a)({id:"ini",extensions:[".ini",".properties",".gitconfig"],filenames:["config",".gitattributes",".gitconfig",".editorconfig"],aliases:["Ini","ini"],loader:function(){return t.e(337).then(t.bind(null,"On+f"))}})},zdb4:function(mt,M,t){"use strict";t.d(M,"b",function(){return g}),t.d(M,"c",function(){return B}),t.d(M,"a",function(){return x});const g={ctrlCmd:!1,alt:!1};var B;(function(R){R[R.Blur=1]="Blur",R[R.Gesture=2]="Gesture",R[R.Other=3]="Other"})(B||(B={}));var x;(function(R){R[R.NONE=0]="NONE",R[R.FIRST=1]="FIRST",R[R.SECOND=2]="SECOND",R[R.LAST=3]="LAST"})(x||(x={}))},zrhQ:function(mt,M,t){"use strict";t.d(M,"c",function(){return B}),t.d(M,"b",function(){return R}),t.d(M,"a",function(){return A});function g(j,I){const v=Math.pow(10,I);return Math.round(j*v)/v}class B{constructor(j,I,v,C=1){this._rgbaBrand=void 0,this.r=Math.min(255,Math.max(0,j))|0,this.g=Math.min(255,Math.max(0,I))|0,this.b=Math.min(255,Math.max(0,v))|0,this.a=g(Math.max(Math.min(1,C),0),3)}static equals(j,I){return j.r===I.r&&j.g===I.g&&j.b===I.b&&j.a===I.a}}class x{constructor(j,I,v,C){this._hslaBrand=void 0,this.h=Math.max(Math.min(360,j),0)|0,this.s=g(Math.max(Math.min(1,I),0),3),this.l=g(Math.max(Math.min(1,v),0),3),this.a=g(Math.max(Math.min(1,C),0),3)}static equals(j,I){return j.h===I.h&&j.s===I.s&&j.l===I.l&&j.a===I.a}static fromRGBA(j){const I=j.r/255,v=j.g/255,C=j.b/255,m=j.a,d=Math.max(I,v,C),D=Math.min(I,v,C);let L=0,r=0;const w=(D+d)/2,b=d-D;if(b>0){r=Math.min(w<=.5?b/(2*w):b/(2-2*w),1);switch(d){case I:L=(v-C)/b+(v<C?6:0);break;case v:L=(C-I)/b+2;break;case C:L=(I-v)/b+4;break}L*=60,L=Math.round(L)}return new x(L,r,w,m)}static _hue2rgb(j,I,v){return v<0&&(v+=1),v>1&&(v-=1),v<1/6?j+(I-j)*6*v:v<1/2?I:v<2/3?j+(I-j)*(2/3-v)*6:j}static toRGBA(j){const I=j.h/360,{s:v,l:C,a:m}=j;let d,D,L;if(v===0)d=D=L=C;else{const r=C<.5?C*(1+v):C+v-C*v,w=2*C-r;d=x._hue2rgb(w,r,I+1/3),D=x._hue2rgb(w,r,I),L=x._hue2rgb(w,r,I-1/3)}return new B(Math.round(d*255),Math.round(D*255),Math.round(L*255),m)}}class R{constructor(j,I,v,C){this._hsvaBrand=void 0,this.h=Math.max(Math.min(360,j),0)|0,this.s=g(Math.max(Math.min(1,I),0),3),this.v=g(Math.max(Math.min(1,v),0),3),this.a=g(Math.max(Math.min(1,C),0),3)}static equals(j,I){return j.h===I.h&&j.s===I.s&&j.v===I.v&&j.a===I.a}static fromRGBA(j){const I=j.r/255,v=j.g/255,C=j.b/255,m=Math.max(I,v,C),d=Math.min(I,v,C),D=m-d,L=m===0?0:D/m;let r;return D===0?r=0:m===I?r=((v-C)/D%6+6)%6:m===v?r=(C-I)/D+2:r=(I-v)/D+4,new R(Math.round(r*60),L,m,j.a)}static toRGBA(j){const{h:I,s:v,v:C,a:m}=j,d=C*v,D=d*(1-Math.abs(I/60%2-1)),L=C-d;let[r,w,b]=[0,0,0];return I<60?(r=d,w=D):I<120?(r=D,w=d):I<180?(w=d,b=D):I<240?(w=D,b=d):I<300?(r=D,b=d):I<=360&&(r=d,b=D),r=Math.round((r+L)*255),w=Math.round((w+L)*255),b=Math.round((b+L)*255),new B(r,w,b,m)}}class A{constructor(j){if(j)if(j instanceof B)this.rgba=j;else if(j instanceof x)this._hsla=j,this.rgba=x.toRGBA(j);else if(j instanceof R)this._hsva=j,this.rgba=R.toRGBA(j);else throw new Error("Invalid color ctor argument");else throw new Error("Color needs a value")}static fromHex(j){return A.Format.CSS.parseHex(j)||A.red}get hsla(){return this._hsla?this._hsla:x.fromRGBA(this.rgba)}get hsva(){return this._hsva?this._hsva:R.fromRGBA(this.rgba)}equals(j){return!!j&&B.equals(this.rgba,j.rgba)&&x.equals(this.hsla,j.hsla)&&R.equals(this.hsva,j.hsva)}getRelativeLuminance(){const j=A._relativeLuminanceForComponent(this.rgba.r),I=A._relativeLuminanceForComponent(this.rgba.g),v=A._relativeLuminanceForComponent(this.rgba.b),C=.2126*j+.7152*I+.0722*v;return g(C,4)}static _relativeLuminanceForComponent(j){const I=j/255;return I<=.03928?I/12.92:Math.pow((I+.055)/1.055,2.4)}isLighter(){const j=(this.rgba.r*299+this.rgba.g*587+this.rgba.b*114)/1e3;return j>=128}isLighterThan(j){const I=this.getRelativeLuminance(),v=j.getRelativeLuminance();return I>v}isDarkerThan(j){const I=this.getRelativeLuminance(),v=j.getRelativeLuminance();return I<v}lighten(j){return new A(new x(this.hsla.h,this.hsla.s,this.hsla.l+this.hsla.l*j,this.hsla.a))}darken(j){return new A(new x(this.hsla.h,this.hsla.s,this.hsla.l-this.hsla.l*j,this.hsla.a))}transparent(j){const{r:I,g:v,b:C,a:m}=this.rgba;return new A(new B(I,v,C,m*j))}isTransparent(){return this.rgba.a===0}isOpaque(){return this.rgba.a===1}opposite(){return new A(new B(255-this.rgba.r,255-this.rgba.g,255-this.rgba.b,this.rgba.a))}toString(){return this._toString||(this._toString=A.Format.CSS.format(this)),this._toString}static getLighterColor(j,I,v){if(j.isLighterThan(I))return j;v=v||.5;const C=j.getRelativeLuminance(),m=I.getRelativeLuminance();return v=v*(m-C)/m,j.lighten(v)}static getDarkerColor(j,I,v){if(j.isDarkerThan(I))return j;v=v||.5;const C=j.getRelativeLuminance(),m=I.getRelativeLuminance();return v=v*(C-m)/C,j.darken(v)}}A.white=new A(new B(255,255,255,1)),A.black=new A(new B(0,0,0,1)),A.red=new A(new B(255,0,0,1)),A.blue=new A(new B(0,0,255,1)),A.cyan=new A(new B(0,255,255,1)),A.lightgrey=new A(new B(211,211,211,1)),A.transparent=new A(new B(0,0,0,0)),function(j){let I;(function(v){let C;(function(m){function d(E){return E.rgba.a===1?`rgb(${E.rgba.r}, ${E.rgba.g}, ${E.rgba.b})`:j.Format.CSS.formatRGBA(E)}m.formatRGB=d;function D(E){return`rgba(${E.rgba.r}, ${E.rgba.g}, ${E.rgba.b}, ${+E.rgba.a.toFixed(2)})`}m.formatRGBA=D;function L(E){return E.hsla.a===1?`hsl(${E.hsla.h}, ${(E.hsla.s*100).toFixed(2)}%, ${(E.hsla.l*100).toFixed(2)}%)`:j.Format.CSS.formatHSLA(E)}m.formatHSL=L;function r(E){return`hsla(${E.hsla.h}, ${(E.hsla.s*100).toFixed(2)}%, ${(E.hsla.l*100).toFixed(2)}%, ${E.hsla.a.toFixed(2)})`}m.formatHSLA=r;function w(E){const y=E.toString(16);return y.length!==2?"0"+y:y}function b(E){return`#${w(E.rgba.r)}${w(E.rgba.g)}${w(E.rgba.b)}`}m.formatHex=b;function u(E,y=!1){return y&&E.rgba.a===1?j.Format.CSS.formatHex(E):`#${w(E.rgba.r)}${w(E.rgba.g)}${w(E.rgba.b)}${w(Math.round(E.rgba.a*255))}`}m.formatHexA=u;function c(E){return E.isOpaque()?j.Format.CSS.formatHex(E):j.Format.CSS.formatRGBA(E)}m.format=c;function p(E){const y=E.length;if(y===0)return null;if(E.charCodeAt(0)!==35)return null;if(y===7){const O=16*S(E.charCodeAt(1))+S(E.charCodeAt(2)),k=16*S(E.charCodeAt(3))+S(E.charCodeAt(4)),Q=16*S(E.charCodeAt(5))+S(E.charCodeAt(6));return new j(new B(O,k,Q,1))}if(y===9){const O=16*S(E.charCodeAt(1))+S(E.charCodeAt(2)),k=16*S(E.charCodeAt(3))+S(E.charCodeAt(4)),Q=16*S(E.charCodeAt(5))+S(E.charCodeAt(6)),q=16*S(E.charCodeAt(7))+S(E.charCodeAt(8));return new j(new B(O,k,Q,q/255))}if(y===4){const O=S(E.charCodeAt(1)),k=S(E.charCodeAt(2)),Q=S(E.charCodeAt(3));return new j(new B(16*O+O,16*k+k,16*Q+Q))}if(y===5){const O=S(E.charCodeAt(1)),k=S(E.charCodeAt(2)),Q=S(E.charCodeAt(3)),q=S(E.charCodeAt(4));return new j(new B(16*O+O,16*k+k,16*Q+Q,(16*q+q)/255))}return null}m.parseHex=p;function S(E){switch(E){case 48:return 0;case 49:return 1;case 50:return 2;case 51:return 3;case 52:return 4;case 53:return 5;case 54:return 6;case 55:return 7;case 56:return 8;case 57:return 9;case 97:return 10;case 65:return 10;case 98:return 11;case 66:return 11;case 99:return 12;case 67:return 12;case 100:return 13;case 68:return 13;case 101:return 14;case 69:return 14;case 102:return 15;case 70:return 15}return 0}})(C=v.CSS||(v.CSS={}))})(I=j.Format||(j.Format={}))}(A||(A={}))}}]);
|