diff --git a/plugins/diff-explorer/app.tsx b/plugins/diff-explorer/app.tsx index 3b156776..99ddaee5 100644 --- a/plugins/diff-explorer/app.tsx +++ b/plugins/diff-explorer/app.tsx @@ -53,7 +53,7 @@ function loadMonaco(baseUrl: string): Promise { link.rel = "stylesheet"; link.href = `${baseUrl}/editor.css`; document.head.appendChild(link); - (globalThis as any).MonacoEnvironment = { + (globalThis as any).DiffExplorerMonacoEnvironment = { getWorker: () => new Worker(new URL(`${baseUrl}/editor.worker.js`, window.location.origin), { type: "module" }), }; const bundle: Bundle = await import(/* @vite-ignore */ `${baseUrl}/editor.js`); diff --git a/plugins/diff-explorer/monaco/editor.js b/plugins/diff-explorer/monaco/editor.js index fb01c7ba..d12cdab6 100644 --- a/plugins/diff-explorer/monaco/editor.js +++ b/plugins/diff-explorer/monaco/editor.js @@ -7,7 +7,7 @@ var EOe=Object.defineProperty;var x=(o,e,t)=>()=>{if(t)throw t[0];try{return o&& `))}},zM=class o extends Error{constructor(e,t,i,n,s){super(s?`[${s}] potential listener LEAK detected, ${e}`:`potential listener LEAK detected, ${e}`),this.name="ListenerLeakError",this.kind=e,this.listenerCount=n,this.details=t,this.stack=i}static is(e){return e instanceof o||e instanceof Error&&typeof e.kind=="string"&&typeof e.listenerCount=="number"}},tj=class extends zM{constructor(e,t,i,n,s){super(e,t,i,n,s),this.name="ListenerRefusalError"}},BI=class{constructor(e){this.value=e}},HOe=2,N=class{constructor(e){this._size=0,this._options=e,this._leakageMon=this._options?.leakWarningThreshold?new ej(e?.onListenerError??De,this._options?.leakWarningThreshold??WOe,this._options?.leakWarningName):void 0,this._perfMon=this._options?._profName?new Jq(this._options._profName):void 0,this._deliveryQueue=this._options?.deliveryQueue}dispose(){this._disposed||(this._disposed=!0,this._deliveryQueue?.current===this&&this._deliveryQueue.reset(),this._listeners&&(this._listeners=void 0,this._size=0),this._options?.onDidRemoveLastListener?.(),this._leakageMon?.dispose())}get event(){return this._event??=(e,t,i)=>{if(this._leakageMon&&this._size>this._leakageMon.threshold**2){let a=`[${this._leakageMon.name}] REFUSES to accept new listeners because it exceeded its threshold by far (${this._size} vs ${this._leakageMon.threshold})`;console.warn(a);let l=this._leakageMon.getMostFrequentStack()??["UNKNOWN stack",-1],c=l[1]/this._size>.3?"dominated":"popular",d=new tj(c,`${a}. HINT: Stack shows most frequent listener (${l[1]}-times)`,l[0],this._size,this._options?.leakWarningName);return(this._options?.onListenerError||De)(d),T.None}if(this._disposed)return T.None;t&&(e=e.bind(t));let n=new BI(e),s;this._leakageMon&&this._size>=Math.ceil(this._leakageMon.threshold*.2)&&(n.stack=VM.create(),s=this._leakageMon.check(n.stack,this._size+1)),this._listeners?this._listeners instanceof BI?(this._deliveryQueue??=new UM,this._listeners=[this._listeners,n]):this._listeners.push(n):(this._options?.onWillAddFirstListener?.(this),this._listeners=n,this._options?.onDidAddFirstListener?.(this)),this._options?.onDidAddListener?.(this),this._size++;let r=ne(()=>{s?.(),this._removeListener(n)});return ij(r,i),r},this._event}_removeListener(e){if(this._options?.onWillRemoveListener?.(this),!this._listeners)return;if(this._size===1){this._listeners=void 0,this._options?.onDidRemoveLastListener?.(this),this._size=0;return}let t=this._listeners,i=t.indexOf(e);if(i===-1)throw console.log("disposed?",this._disposed),console.log("size?",this._size),console.log("arr?",JSON.stringify(this._listeners)),new Error("Attempted to dispose unknown listener");this._size--,t[i]=void 0;let n=this._deliveryQueue.current===this;if(this._size*HOe<=t.length){let s=0;for(let r=0;r0}},Zfe=()=>new UM,UM=class{constructor(){this.i=-1,this.end=0}enqueue(e,t,i){this.i=0,this.end=i,this.current=e,this.value=t}reset(){this.i=this.end,this.current=void 0,this.value=void 0}},Ed=class extends N{constructor(e){super(e),this._isPaused=0,this._eventQueue=new In,this._mergeFn=e?.merge}pause(){this._isPaused++}resume(){if(this._isPaused!==0&&--this._isPaused===0)if(this._mergeFn){if(this._eventQueue.size>0){let e=Array.from(this._eventQueue);this._eventQueue.clear(),super.fire(this._mergeFn(e))}}else for(;!this._isPaused&&this._eventQueue.size!==0;)super.fire(this._eventQueue.shift())}fire(e){this._size&&(this._isPaused!==0?this._eventQueue.push(e):super.fire(e))}},$M=class extends Ed{constructor(e){super(e),this._delay=e.delay??100}fire(e){this._handle||(this.pause(),this._handle=setTimeout(()=>{this._handle=void 0,this.resume()},this._delay)),super.fire(e)}},ox=class extends N{constructor(e){super(e),this._queuedEvents=[],this._mergeFn=e?.merge}fire(e){this.hasListeners()&&(this._queuedEvents.push(e),this._queuedEvents.length===1&&queueMicrotask(()=>{this._mergeFn?super.fire(this._mergeFn(this._queuedEvents)):this._queuedEvents.forEach(t=>super.fire(t)),this._queuedEvents=[]}))}},qM=class{constructor(){this.hasListeners=!1,this.events=[],this.emitter=new N({onWillAddFirstListener:()=>this.onFirstListenerAdd(),onDidRemoveLastListener:()=>this.onLastListenerRemove()})}get event(){return this.emitter.event}add(e){let t={event:e,listener:null};return this.events.push(t),this.hasListeners&&this.hook(t),ne(Id(()=>{this.hasListeners&&this.unhook(t);let n=this.events.indexOf(t);this.events.splice(n,1)}))}onFirstListenerAdd(){this.hasListeners=!0,this.events.forEach(e=>this.hook(e))}onLastListenerRemove(){this.hasListeners=!1,this.events.forEach(e=>this.unhook(e))}hook(e){e.listener=e.event(t=>this.emitter.fire(t))}unhook(e){e.listener?.dispose(),e.listener=null}dispose(){this.emitter.dispose();for(let e of this.events)e.listener?.dispose();this.events=[]}},wh=class{constructor(){this.data=[]}wrapEvent(e,t,i){return(n,s,r)=>e(a=>{let l=this.data[this.data.length-1];if(!t){l?l.buffers.push(()=>n.call(s,a)):n.call(s,a);return}let c=l;if(!c){n.call(s,t(i,a));return}c.items??=[],c.items.push(a),c.buffers.length===0&&l.buffers.push(()=>{c.reducedResult??=i?c.items.reduce(t,i):c.items.reduce(t),n.call(s,c.reducedResult)})},void 0,r)}bufferEvents(e){let t={buffers:new Array};this.data.push(t);let i=e();return this.data.pop(),t.buffers.forEach(n=>n()),i}},w_=class{constructor(){this.listening=!1,this.inputEvent=Q.None,this.inputEventListener=T.None,this.emitter=new N({onDidAddFirstListener:()=>{this.listening=!0,this.inputEventListener=this.inputEvent(this.emitter.fire,this.emitter)},onDidRemoveLastListener:()=>{this.listening=!1,this.inputEventListener.dispose()}}),this.event=this.emitter.event}set input(e){this.inputEvent=e,this.listening&&(this.inputEventListener.dispose(),this.inputEventListener=e(this.emitter.fire,this.emitter))}dispose(){this.inputEventListener.dispose(),this.emitter.dispose()}}});var Ia,sx=x(()=>{ae();Ia=new class{constructor(){this._zoomLevel=0,this._onDidChangeZoomLevel=new N,this.onDidChangeZoomLevel=this._onDidChangeZoomLevel.event}getZoomLevel(){return this._zoomLevel}setZoomLevel(o){o=Math.min(Math.max(-5,o),20),this._zoomLevel!==o&&(this._zoomLevel=o,this._onDidChangeZoomLevel.fire(this._zoomLevel))}}});var VOe,nj,C_,zOe,wm,oj,sj,UOe,$Oe,qOe,_r,Cm=x(()=>{rt();sx();VOe=Ye?1.5:1.35,nj=8,C_=class o{static _create(e,t,i,n,s,r,a,l,c){r===0?r=VOe*i:r{_s={tabSize:4,indentSize:4,insertSpaces:!0,detectIndentation:!0,trimAutoWhitespace:!0,largeFileOptimizations:!0,bracketPairColorizationOptions:{enabled:!0,independentColorPoolPerBracketType:!1}}});function jOe(o=""){let e="(-?\\d*\\.\\d\\w*)|([^";for(let t of rx)o.indexOf(t)>=0||(e+="\\"+t);return e+="\\s]+)",new RegExp(e,"g")}function VI(o){let e=HI;if(o&&o instanceof RegExp)if(o.global)e=o;else{let t="g";o.ignoreCase&&(t+="i"),o.multiline&&(t+="m"),o.unicode&&(t+="u"),e=new RegExp(o.source,t)}return e.lastIndex=0,e}function y_(o,e,t,i,n){if(e=VI(e),n||(n=ut.first(Xfe)),t.length>n.maxLen){let c=o-n.maxLen/2;return c<0?c=0:i+=c,t=t.substring(c,o+n.maxLen/2),y_(o,e,t,i,n)}let s=Date.now(),r=o-1-i,a=-1,l=null;for(let c=1;!(Date.now()-s>=n.timeBudget);c++){let d=r-n.windowSize*c;e.lastIndex=Math.max(0,d);let h=KOe(e,t,r,a);if(!h&&l||(l=h,d<=0))break;a=d}if(l){let c={word:l[0],startColumn:i+1+l.index,endColumn:i+1+l.index+l[0].length};return e.lastIndex=0,c}return null}function KOe(o,e,t,i){let n;for(;n=o.exec(e);){let s=n.index||0;if(s<=t&&o.lastIndex>=t)return n;if(i>0&&s>i)return null}return null}var rx,HI,Xfe,_w=x(()=>{oa();tc();rx="`~!@#$%^&*()-=+[{]}\\|;:'\",.<>/?";HI=jOe();Xfe=new In;Xfe.unshift({maxLen:1e3,windowSize:15,timeBudget:150})});function jM(o,e){if(typeof o!="object"||typeof e!="object"||!o||!e)return new S_(e,o!==e);if(Array.isArray(o)||Array.isArray(e)){let i=Array.isArray(o)&&Array.isArray(e)&&Bt(o,e);return new S_(e,!i)}let t=!1;for(let i in e)if(e.hasOwnProperty(i)){let n=jM(o[i],e[i]);n.didChange&&(o[i]=n.newValue,t=!0)}return new S_(o,t)}function We(o,e){return typeof o>"u"?e:o==="false"?!1:!!o}function mu(o,e,t,i){if(typeof o=="string"&&(o=parseInt(o,10)),typeof o!="number"||isNaN(o))return e;let n=o;return n=Math.max(t,n),n=Math.min(i,n),n|0}function ege(o,e,t,i){if(typeof o>"u")return e;let n=Sl.float(o,e);return Sl.clamp(n,t,i)}function dn(o,e,t,i){return typeof o!="string"?e:i&&o in i?i[o]:t.indexOf(o)===-1?e:o}function GOe(o){switch(o){case"none":return 0;case"keep":return 1;case"brackets":return 2;case"advanced":return 3;case"full":return 4}}function YOe(o){switch(o){case"blink":return 1;case"smooth":return 2;case"phase":return 3;case"expand":return 4;case"solid":return 5}}function Qfe(o){switch(o){case"line":return rs.Line;case"block":return rs.Block;case"underline":return rs.Underline;case"line-thin":return rs.LineThin;case"block-outline":return rs.BlockOutline;case"underline-thin":return rs.UnderlineThin}}function ZOe(o){return o==="ctrlCmd"?Ye?"metaKey":"ctrlKey":"altKey"}function vw(o){let e=o.get(112);return e==="editable"?o.get(104):e!=="on"}function ww(o){return!o.get(172)}function Jfe(o,e){if(typeof o!="string")return e;switch(o){case"hidden":return 2;case"visible":return 3;default:return 1}}function ax(o,e,t){let i=t.indexOf(o);return i===-1?e:t[i]}function ge(o){return k_[o.id]=o,o}var gu,lx,zI,Tn,S_,bf,x_,kt,Pi,Sl,Ea,En,bw,rj,aj,rs,lj,cj,dj,nc,hj,uj,fj,gj,mj,pj,_j,bj,vj,UI,wj,yl,Cj,yj,Sj,xj,kj,Lj,Ij,Ej,Tj,Dj,Nj,Rj,Aj,Mj,Oj,ic,ja,Pj,Fj,Bj,Wj,Hj,Vj,zj,Uj,$j,qj,jj,k_,bs,Uo=x(()=>{qe();$a();rt();Cm();WI();_w();le();gu=8,lx=class{constructor(e){this._values=e}hasChanged(e){return this._values[e]}},zI=class{constructor(){this.stableMinimapLayoutInput=null,this.stableFitMaxMinimapScale=0,this.stableFitRemainingWidth=0}},Tn=class{constructor(e,t,i,n){this.id=e,this.name=t,this.defaultValue=i,this.schema=n}applyUpdate(e,t){return jM(e,t)}compute(e,t,i){return i}},S_=class{constructor(e,t){this.newValue=e,this.didChange=t}};bf=class{constructor(e,t){this.schema=void 0,this.id=e,this.name="_never_",this.defaultValue=t}applyUpdate(e,t){return jM(e,t)}validate(e){return this.defaultValue}},x_=class{constructor(e,t,i,n){this.id=e,this.name=t,this.defaultValue=i,this.schema=n}applyUpdate(e,t){return jM(e,t)}compute(e,t,i){return i}};kt=class extends x_{constructor(e,t,i,n=void 0){typeof n<"u"&&(n.type="boolean",n.default=i),super(e,t,i,n)}validate(e){return We(e,this.defaultValue)}};Pi=class o extends x_{static clampedInt(e,t,i,n){return mu(e,t,i,n)}constructor(e,t,i,n,s,r=void 0){typeof r<"u"&&(r.type="integer",r.default=i,r.minimum=n,r.maximum=s),super(e,t,i,r),this.minimum=n,this.maximum=s}validate(e){return o.clampedInt(e,this.defaultValue,this.minimum,this.maximum)}};Sl=class o extends x_{static clamp(e,t,i){return ei?i:e}static float(e,t){return typeof e=="string"&&(e=parseFloat(e)),typeof e!="number"||isNaN(e)?t:e}constructor(e,t,i,n,s,r,a){typeof s<"u"&&(s.type="number",s.default=i,s.minimum=r,s.maximum=a),super(e,t,i,s),this.validationFn=n,this.minimum=r,this.maximum=a}validate(e){return this.validationFn(o.float(e,this.defaultValue))}},Ea=class o extends x_{static string(e,t){return typeof e!="string"?t:e}constructor(e,t,i,n=void 0){typeof n<"u"&&(n.type="string",n.default=i),super(e,t,i,n)}validate(e){return o.string(e,this.defaultValue)}};En=class extends x_{constructor(e,t,i,n,s=void 0){typeof s<"u"&&(s.type="string",s.enum=n.slice(0),s.default=i),super(e,t,i,s),this._allowedValues=n}validate(e){return dn(e,this.defaultValue,this._allowedValues)}},bw=class extends Tn{constructor(e,t,i,n,s,r,a=void 0){typeof a<"u"&&(a.type="string",a.enum=s,a.default=n),super(e,t,i,a),this._allowedValues=s,this._convert=r}validate(e){return typeof e!="string"?this.defaultValue:this._allowedValues.indexOf(e)===-1?this.defaultValue:this._convert(e)}};rj=class extends Tn{constructor(){super(2,"accessibilitySupport",0,{type:"string",enum:["auto","on","off"],enumDescriptions:[m(220,"Use platform APIs to detect when a Screen Reader is attached."),m(221,"Optimize for usage with a Screen Reader."),m(222,"Assume a screen reader is not attached.")],default:"auto",tags:["accessibility"],description:m(223,"Controls if the UI should run in a mode where it is optimized for screen readers.")})}validate(e){switch(e){case"auto":return 0;case"off":return 1;case"on":return 2}return this.defaultValue}compute(e,t,i){return i===0?e.accessibilitySupport:i}},aj=class extends Tn{constructor(){let e={insertSpace:!0,ignoreEmptyLines:!0};super(29,"comments",e,{"editor.comments.insertSpace":{type:"boolean",default:e.insertSpace,description:m(224,"Controls whether a space character is inserted when commenting.")},"editor.comments.ignoreEmptyLines":{type:"boolean",default:e.ignoreEmptyLines,description:m(225,"Controls if empty lines should be ignored with toggle, add or remove actions for line comments.")}})}validate(e){if(!e||typeof e!="object")return this.defaultValue;let t=e;return{insertSpace:We(t.insertSpace,this.defaultValue.insertSpace),ignoreEmptyLines:We(t.ignoreEmptyLines,this.defaultValue.ignoreEmptyLines)}}};(function(o){o[o.Line=1]="Line",o[o.Block=2]="Block",o[o.Underline=3]="Underline",o[o.LineThin=4]="LineThin",o[o.BlockOutline=5]="BlockOutline",o[o.UnderlineThin=6]="UnderlineThin"})(rs||(rs={}));lj=class extends bf{constructor(){super(162,"")}compute(e,t,i){let n=["monaco-editor"];return t.get(48)&&n.push(t.get(48)),e.extraEditorClassName&&n.push(e.extraEditorClassName),t.get(82)==="default"?n.push("mouse-default"):t.get(82)==="copy"&&n.push("mouse-copy"),t.get(127)&&n.push("showUnused"),t.get(157)&&n.push("showDeprecated"),n.join(" ")}},cj=class extends kt{constructor(){super(45,"emptySelectionClipboard",!0,{description:m(226,"Controls whether copying without a selection copies the current line.")})}compute(e,t,i){return i&&e.emptySelectionClipboard}},dj=class extends Tn{constructor(){let e={cursorMoveOnType:!0,findOnType:!0,seedSearchStringFromSelection:"always",autoFindInSelection:"never",globalFindClipboard:!1,addExtraSpaceOnTop:!0,loop:!0,closeOnResult:!1,history:"workspace",replaceHistory:"workspace"};super(50,"find",e,{"editor.find.cursorMoveOnType":{type:"boolean",default:e.cursorMoveOnType,description:m(227,"Controls whether the cursor should jump to find matches while typing.")},"editor.find.seedSearchStringFromSelection":{type:"string",enum:["never","always","selection"],default:e.seedSearchStringFromSelection,enumDescriptions:[m(228,"Never seed search string from the editor selection."),m(229,"Always seed search string from the editor selection, including word at cursor position."),m(230,"Only seed search string from the editor selection.")],description:m(231,"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:e.autoFindInSelection,enumDescriptions:[m(232,"Never turn on Find in Selection automatically (default)."),m(233,"Always turn on Find in Selection automatically."),m(234,"Turn on Find in Selection automatically when multiple lines of content are selected.")],description:m(235,"Controls the condition for turning on Find in Selection automatically.")},"editor.find.globalFindClipboard":{type:"boolean",default:e.globalFindClipboard,description:m(236,"Controls whether the Find Widget should read or modify the shared find clipboard on macOS."),included:Ye},"editor.find.addExtraSpaceOnTop":{type:"boolean",default:e.addExtraSpaceOnTop,description:m(237,"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:e.loop,description:m(238,"Controls whether the search automatically restarts from the beginning (or the end) when no further matches can be found.")},"editor.find.closeOnResult":{type:"boolean",default:e.closeOnResult,description:m(239,"Controls whether the Find Widget closes after an explicit find navigation command lands on a result.")},"editor.find.history":{type:"string",enum:["never","workspace"],default:"workspace",enumDescriptions:[m(240,"Do not store search history from the find widget."),m(241,"Store search history across the active workspace")],description:m(242,"Controls how the find widget history should be stored")},"editor.find.replaceHistory":{type:"string",enum:["never","workspace"],default:"workspace",enumDescriptions:[m(243,"Do not store history from the replace widget."),m(244,"Store replace history across the active workspace")],description:m(245,"Controls how the replace widget history should be stored")},"editor.find.findOnType":{type:"boolean",default:e.findOnType,description:m(246,"Controls whether the Find Widget should search as you type.")}})}validate(e){if(!e||typeof e!="object")return this.defaultValue;let t=e;return{cursorMoveOnType:We(t.cursorMoveOnType,this.defaultValue.cursorMoveOnType),findOnType:We(t.findOnType,this.defaultValue.findOnType),seedSearchStringFromSelection:typeof t.seedSearchStringFromSelection=="boolean"?t.seedSearchStringFromSelection?"always":"never":dn(t.seedSearchStringFromSelection,this.defaultValue.seedSearchStringFromSelection,["never","always","selection"]),autoFindInSelection:typeof t.autoFindInSelection=="boolean"?t.autoFindInSelection?"always":"never":dn(t.autoFindInSelection,this.defaultValue.autoFindInSelection,["never","always","multiline"]),globalFindClipboard:We(t.globalFindClipboard,this.defaultValue.globalFindClipboard),addExtraSpaceOnTop:We(t.addExtraSpaceOnTop,this.defaultValue.addExtraSpaceOnTop),loop:We(t.loop,this.defaultValue.loop),closeOnResult:We(t.closeOnResult,this.defaultValue.closeOnResult),history:dn(t.history,this.defaultValue.history,["never","workspace"]),replaceHistory:dn(t.replaceHistory,this.defaultValue.replaceHistory,["never","workspace"])}}},nc=class o extends Tn{static{this.OFF='"liga" off, "calt" off'}static{this.ON='"liga" on, "calt" on'}constructor(){super(60,"fontLigatures",o.OFF,{anyOf:[{type:"boolean",description:m(247,"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:m(248,"Explicit 'font-feature-settings' CSS property. A boolean can be passed instead if one only needs to turn on/off ligatures.")}],description:m(249,"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(e){return typeof e>"u"?this.defaultValue:typeof e=="string"?e==="false"||e.length===0?o.OFF:e==="true"?o.ON:e:e?o.ON:o.OFF}},hj=class o extends Tn{static{this.OFF=oj}static{this.TRANSLATE=sj}constructor(){super(63,"fontVariations",o.OFF,{anyOf:[{type:"boolean",description:m(250,"Enables/Disables the translation from font-weight to font-variation-settings. Change this to a string for fine-grained control of the 'font-variation-settings' CSS property.")},{type:"string",description:m(251,"Explicit 'font-variation-settings' CSS property. A boolean can be passed instead if one only needs to translate font-weight to font-variation-settings.")}],description:m(252,"Configures font variations. Can be either a boolean to enable/disable the translation from font-weight to font-variation-settings or a string for the value of the CSS 'font-variation-settings' property."),default:!1})}validate(e){return typeof e>"u"?this.defaultValue:typeof e=="string"?e==="false"?o.OFF:e==="true"?o.TRANSLATE:e:e?o.TRANSLATE:o.OFF}compute(e,t,i){return e.fontInfo.fontVariationSettings}},uj=class extends bf{constructor(){super(59,new wm({pixelRatio:0,fontFamily:"",fontWeight:"",fontSize:0,fontFeatureSettings:"",fontVariationSettings:"",lineHeight:0,letterSpacing:0,isMonospace:!1,typicalHalfwidthCharacterWidth:0,typicalFullwidthCharacterWidth:0,canUseHalfwidthRightwardsArrow:!1,spaceWidth:0,middotWidth:0,wsmiddotWidth:0,maxDigitWidth:0},!1))}compute(e,t,i){return e.fontInfo}},fj=class extends bf{constructor(){super(161,rs.Line)}compute(e,t,i){return e.inputMode==="overtype"?t.get(92):t.get(34)}},gj=class extends bf{constructor(){super(170,!1)}compute(e,t){return e.editContextSupported&&t.get(44)}},mj=class extends bf{constructor(){super(172,!1)}compute(e,t){return e.accessibilitySupport===2?t.get(7):t.get(6)}},pj=class extends x_{constructor(){super(61,"fontSize",_r.fontSize,{type:"number",minimum:6,maximum:100,default:_r.fontSize,description:m(253,"Controls the font size in pixels.")})}validate(e){let t=Sl.float(e,this.defaultValue);return t===0?_r.fontSize:Sl.clamp(t,6,100)}compute(e,t,i){return e.fontInfo.fontSize}},_j=class o extends Tn{static{this.SUGGESTION_VALUES=["normal","bold","100","200","300","400","500","600","700","800","900"]}static{this.MINIMUM_VALUE=1}static{this.MAXIMUM_VALUE=1e3}constructor(){super(62,"fontWeight",_r.fontWeight,{anyOf:[{type:"number",minimum:o.MINIMUM_VALUE,maximum:o.MAXIMUM_VALUE,errorMessage:m(254,'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:o.SUGGESTION_VALUES}],default:_r.fontWeight,description:m(255,'Controls the font weight. Accepts "normal" and "bold" keywords or numbers between 1 and 1000.')})}validate(e){return e==="normal"||e==="bold"?e:String(Pi.clampedInt(e,_r.fontWeight,o.MINIMUM_VALUE,o.MAXIMUM_VALUE))}},bj=class extends Tn{constructor(){let e={multiple:"peek",multipleDefinitions:"peek",multipleTypeDefinitions:"peek",multipleDeclarations:"peek",multipleImplementations:"peek",multipleReferences:"peek",multipleTests:"peek",alternativeDefinitionCommand:"editor.action.goToReferences",alternativeTypeDefinitionCommand:"editor.action.goToReferences",alternativeDeclarationCommand:"editor.action.goToReferences",alternativeImplementationCommand:"",alternativeReferenceCommand:"",alternativeTestsCommand:""},t={type:"string",enum:["peek","gotoAndPeek","goto"],default:e.multiple,enumDescriptions:[m(256,"Show Peek view of the results (default)"),m(257,"Go to the primary result and show a Peek view"),m(258,"Go to the primary result and enable Peek-less navigation to others")]},i=["","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(67,"gotoLocation",e,{"editor.gotoLocation.multiple":{deprecationMessage:m(259,"This setting is deprecated, please use separate settings like 'editor.editor.gotoLocation.multipleDefinitions' or 'editor.editor.gotoLocation.multipleImplementations' instead.")},"editor.gotoLocation.multipleDefinitions":{description:m(260,"Controls the behavior the 'Go to Definition'-command when multiple target locations exist."),...t},"editor.gotoLocation.multipleTypeDefinitions":{description:m(261,"Controls the behavior the 'Go to Type Definition'-command when multiple target locations exist."),...t},"editor.gotoLocation.multipleDeclarations":{description:m(262,"Controls the behavior the 'Go to Declaration'-command when multiple target locations exist."),...t},"editor.gotoLocation.multipleImplementations":{description:m(263,"Controls the behavior the 'Go to Implementations'-command when multiple target locations exist."),...t},"editor.gotoLocation.multipleReferences":{description:m(264,"Controls the behavior the 'Go to References'-command when multiple target locations exist."),...t},"editor.gotoLocation.alternativeDefinitionCommand":{type:"string",default:e.alternativeDefinitionCommand,enum:i,description:m(265,"Alternative command id that is being executed when the result of 'Go to Definition' is the current location.")},"editor.gotoLocation.alternativeTypeDefinitionCommand":{type:"string",default:e.alternativeTypeDefinitionCommand,enum:i,description:m(266,"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:e.alternativeDeclarationCommand,enum:i,description:m(267,"Alternative command id that is being executed when the result of 'Go to Declaration' is the current location.")},"editor.gotoLocation.alternativeImplementationCommand":{type:"string",default:e.alternativeImplementationCommand,enum:i,description:m(268,"Alternative command id that is being executed when the result of 'Go to Implementation' is the current location.")},"editor.gotoLocation.alternativeReferenceCommand":{type:"string",default:e.alternativeReferenceCommand,enum:i,description:m(269,"Alternative command id that is being executed when the result of 'Go to Reference' is the current location.")}})}validate(e){if(!e||typeof e!="object")return this.defaultValue;let t=e;return{multiple:dn(t.multiple,this.defaultValue.multiple,["peek","gotoAndPeek","goto"]),multipleDefinitions:dn(t.multipleDefinitions,"peek",["peek","gotoAndPeek","goto"]),multipleTypeDefinitions:dn(t.multipleTypeDefinitions,"peek",["peek","gotoAndPeek","goto"]),multipleDeclarations:dn(t.multipleDeclarations,"peek",["peek","gotoAndPeek","goto"]),multipleImplementations:dn(t.multipleImplementations,"peek",["peek","gotoAndPeek","goto"]),multipleReferences:dn(t.multipleReferences,"peek",["peek","gotoAndPeek","goto"]),multipleTests:dn(t.multipleTests,"peek",["peek","gotoAndPeek","goto"]),alternativeDefinitionCommand:Ea.string(t.alternativeDefinitionCommand,this.defaultValue.alternativeDefinitionCommand),alternativeTypeDefinitionCommand:Ea.string(t.alternativeTypeDefinitionCommand,this.defaultValue.alternativeTypeDefinitionCommand),alternativeDeclarationCommand:Ea.string(t.alternativeDeclarationCommand,this.defaultValue.alternativeDeclarationCommand),alternativeImplementationCommand:Ea.string(t.alternativeImplementationCommand,this.defaultValue.alternativeImplementationCommand),alternativeReferenceCommand:Ea.string(t.alternativeReferenceCommand,this.defaultValue.alternativeReferenceCommand),alternativeTestsCommand:Ea.string(t.alternativeTestsCommand,this.defaultValue.alternativeTestsCommand)}}},vj=class extends Tn{constructor(){let e={enabled:"on",delay:300,hidingDelay:300,sticky:!0,above:!0,showLongLineWarning:!0};super(69,"hover",e,{"editor.hover.enabled":{type:"string",enum:["on","off","onKeyboardModifier"],default:e.enabled,markdownEnumDescriptions:[m(270,"Hover is enabled."),m(271,"Hover is disabled."),m(272,"Hover is shown when holding `{0}` or `Alt` (the opposite modifier of `#editor.multiCursorModifier#`)",Ye?"Command":"Control")],description:m(273,"Controls whether the hover is shown."),keywords:["hint","info","tooltip"]},"editor.hover.delay":{type:"number",default:e.delay,minimum:0,maximum:1e4,description:m(274,"Controls the delay in milliseconds after which the hover is shown.")},"editor.hover.sticky":{type:"boolean",default:e.sticky,description:m(275,"Controls whether the hover should remain visible when mouse is moved over it.")},"editor.hover.hidingDelay":{type:"integer",minimum:0,default:e.hidingDelay,markdownDescription:m(276,"Controls the delay in milliseconds after which the hover is hidden. Requires `#editor.hover.sticky#` to be enabled.")},"editor.hover.above":{type:"boolean",default:e.above,description:m(277,"Prefer showing hovers above the line, if there's space.")},"editor.hover.showLongLineWarning":{type:"boolean",default:e.showLongLineWarning,description:m(278,"Controls whether long line warning hovers are shown, such as when tokenization is skipped or rendering is paused.")}})}validate(e){if(!e||typeof e!="object")return this.defaultValue;let t=e;return{enabled:dn(t.enabled,this.defaultValue.enabled,["on","off","onKeyboardModifier"]),delay:Pi.clampedInt(t.delay,this.defaultValue.delay,0,1e4),sticky:We(t.sticky,this.defaultValue.sticky),hidingDelay:Pi.clampedInt(t.hidingDelay,this.defaultValue.hidingDelay,0,6e5),above:We(t.above,this.defaultValue.above),showLongLineWarning:We(t.showLongLineWarning,this.defaultValue.showLongLineWarning)}}},UI=class o extends bf{constructor(){super(165,{width:0,height:0,glyphMarginLeft:0,glyphMarginWidth:0,glyphMarginDecorationLaneCount:0,lineNumbersLeft:0,lineNumbersWidth:0,decorationsLeft:0,decorationsWidth:0,contentLeft:0,contentWidth:0,minimap:{renderMinimap:0,minimapLeft:0,minimapWidth:0,minimapHeightIsEditorHeight:!1,minimapIsSampling:!1,minimapScale:1,minimapLineHeight:1,minimapCanvasInnerWidth:0,minimapCanvasInnerHeight:0,minimapCanvasOuterWidth:0,minimapCanvasOuterHeight:0},viewportColumn:0,isWordWrapMinified:!1,isViewportWrapping:!1,wrappingColumn:-1,verticalScrollbarWidth:0,horizontalScrollbarHeight:0,overviewRuler:{top:0,width:0,height:0,right:0}})}compute(e,t,i){return o.computeLayout(t,{memory:e.memory,outerWidth:e.outerWidth,outerHeight:e.outerHeight,isDominatedByLongLines:e.isDominatedByLongLines,lineHeight:e.fontInfo.lineHeight,viewLineCount:e.viewLineCount,lineNumbersDigitCount:e.lineNumbersDigitCount,typicalHalfwidthCharacterWidth:e.fontInfo.typicalHalfwidthCharacterWidth,maxDigitWidth:e.fontInfo.maxDigitWidth,pixelRatio:e.pixelRatio,glyphMarginDecorationLaneCount:e.glyphMarginDecorationLaneCount})}static computeContainedMinimapLineCount(e){let t=e.height/e.lineHeight,i=Math.floor(e.paddingTop/e.lineHeight),n=Math.floor(e.paddingBottom/e.lineHeight);e.scrollBeyondLastLine&&(n=Math.max(n,t-1));let s=(i+e.viewLineCount+n)/(e.pixelRatio*e.height),r=Math.floor(e.viewLineCount/s);return{typicalViewportLineCount:t,extraLinesBeforeFirstLine:i,extraLinesBeyondLastLine:n,desiredRatio:s,minimapLineCount:r}}static _computeMinimapLayout(e,t){let i=e.outerWidth,n=e.outerHeight,s=e.pixelRatio;if(!e.minimap.enabled)return{renderMinimap:0,minimapLeft:0,minimapWidth:0,minimapHeightIsEditorHeight:!1,minimapIsSampling:!1,minimapScale:1,minimapLineHeight:1,minimapCanvasInnerWidth:0,minimapCanvasInnerHeight:Math.floor(s*n),minimapCanvasOuterWidth:0,minimapCanvasOuterHeight:n};let r=t.stableMinimapLayoutInput,a=r&&e.outerHeight===r.outerHeight&&e.lineHeight===r.lineHeight&&e.typicalHalfwidthCharacterWidth===r.typicalHalfwidthCharacterWidth&&e.pixelRatio===r.pixelRatio&&e.scrollBeyondLastLine===r.scrollBeyondLastLine&&e.paddingTop===r.paddingTop&&e.paddingBottom===r.paddingBottom&&e.minimap.enabled===r.minimap.enabled&&e.minimap.side===r.minimap.side&&e.minimap.size===r.minimap.size&&e.minimap.showSlider===r.minimap.showSlider&&e.minimap.renderCharacters===r.minimap.renderCharacters&&e.minimap.maxColumn===r.minimap.maxColumn&&e.minimap.scale===r.minimap.scale&&e.verticalScrollbarWidth===r.verticalScrollbarWidth&&e.isViewportWrapping===r.isViewportWrapping,l=e.lineHeight,c=e.typicalHalfwidthCharacterWidth,d=e.scrollBeyondLastLine,h=e.minimap.renderCharacters,u=s>=2?Math.round(e.minimap.scale*2):e.minimap.scale,f=e.minimap.maxColumn,g=e.minimap.size,p=e.minimap.side,_=e.verticalScrollbarWidth,b=e.viewLineCount,v=e.remainingWidth,w=e.isViewportWrapping,C=h?2:3,y=Math.floor(s*n),k=y/s,I=!1,E=!1,D=C*u,O=u/s,P=1;if(g==="fill"||g==="fit"){let{typicalViewportLineCount:he,extraLinesBeforeFirstLine:ce,extraLinesBeyondLastLine:Be,desiredRatio:Ge,minimapLineCount:tt}=o.computeContainedMinimapLineCount({viewLineCount:b,scrollBeyondLastLine:d,paddingTop:e.paddingTop,paddingBottom:e.paddingBottom,height:n,lineHeight:l,pixelRatio:s});if(b/tt>1)I=!0,E=!0,u=1,D=1,O=u/s;else{let mt=!1,Pt=u+1;if(g==="fit"){let ct=Math.ceil((ce+b+Be)*D);w&&a&&v<=t.stableFitRemainingWidth?(mt=!0,Pt=t.stableFitMaxMinimapScale):mt=ct>y}if(g==="fill"||mt){I=!0;let ct=u;D=Math.min(l*s,Math.max(1,Math.floor(1/Ge))),w&&a&&v<=t.stableFitRemainingWidth&&(Pt=t.stableFitMaxMinimapScale),u=Math.min(Pt,Math.max(1,Math.floor(D/C))),u>ct&&(P=Math.min(2,u/ct)),O=u/s/P,y=Math.ceil(Math.max(he,ce+b+Be)*D),w?(t.stableMinimapLayoutInput=e,t.stableFitRemainingWidth=v,t.stableFitMaxMinimapScale=u):(t.stableMinimapLayoutInput=null,t.stableFitRemainingWidth=0)}}}let H=Math.floor(f*O),z=Math.min(H,Math.max(0,Math.floor((v-_-2)*O/(c+O)))+gu),Y=Math.floor(s*z),Z=Y/s;Y=Math.floor(Y*P);let te=h?1:2,se=p==="left"?0:i-z-_;return{renderMinimap:te,minimapLeft:se,minimapWidth:z,minimapHeightIsEditorHeight:I,minimapIsSampling:E,minimapScale:u,minimapLineHeight:D,minimapCanvasInnerWidth:Y,minimapCanvasInnerHeight:y,minimapCanvasOuterWidth:Z,minimapCanvasOuterHeight:k}}static computeLayout(e,t){let i=t.outerWidth|0,n=t.outerHeight|0,s=t.lineHeight|0,r=t.lineNumbersDigitCount|0,a=t.typicalHalfwidthCharacterWidth,l=t.maxDigitWidth,c=t.pixelRatio,d=t.viewLineCount,h=e.get(154),u=h==="inherit"?e.get(153):h,f=u==="inherit"?e.get(149):u,g=e.get(152),p=t.isDominatedByLongLines,_=e.get(66),b=e.get(76).renderType!==0,v=e.get(77),w=e.get(119),C=e.get(96),y=e.get(81),k=e.get(117),I=k.verticalScrollbarSize,E=k.verticalHasArrows,D=k.arrowSize,O=k.horizontalScrollbarSize,P=e.get(52),H=e.get(126)!=="never",z=e.get(74);P&&H&&(z+=16);let Y=0;if(b){let di=Math.max(r,v);Y=Math.round(di*l)}let Z=0;_&&(Z=s*t.glyphMarginDecorationLaneCount);let te=0,se=te+Z,he=se+Y,ce=he+z,Be=i-Z-Y-z,Ge=!1,tt=!1,Nt=-1;e.get(2)===2&&u==="inherit"&&p?(Ge=!0,tt=!0):f==="on"||f==="bounded"?tt=!0:f==="wordWrapColumn"&&(Nt=g);let mt=o._computeMinimapLayout({outerWidth:i,outerHeight:n,lineHeight:s,typicalHalfwidthCharacterWidth:a,pixelRatio:c,scrollBeyondLastLine:w,paddingTop:C.top,paddingBottom:C.bottom,minimap:y,verticalScrollbarWidth:I,viewLineCount:d,remainingWidth:Be,isViewportWrapping:tt},t.memory||new zI);mt.renderMinimap!==0&&mt.minimapLeft===0&&(te+=mt.minimapWidth,se+=mt.minimapWidth,he+=mt.minimapWidth,ce+=mt.minimapWidth);let Pt=Be-mt.minimapWidth,ct=Math.max(1,Math.floor((Pt-I-2)/a)),Fn=E?D:0;return tt&&(Nt=Math.max(1,ct),f==="bounded"&&(Nt=Math.min(Nt,g))),{width:i,height:n,glyphMarginLeft:te,glyphMarginWidth:Z,glyphMarginDecorationLaneCount:t.glyphMarginDecorationLaneCount,lineNumbersLeft:se,lineNumbersWidth:Y,decorationsLeft:he,decorationsWidth:z,contentLeft:ce,contentWidth:Pt,minimap:mt,viewportColumn:ct,isWordWrapMinified:Ge,isViewportWrapping:tt,wrappingColumn:Nt,verticalScrollbarWidth:I,horizontalScrollbarHeight:O,overviewRuler:{top:Fn,width:I,height:n-2*Fn,right:0}}}},wj=class extends Tn{constructor(){super(156,"wrappingStrategy","simple",{"editor.wrappingStrategy":{enumDescriptions:[m(279,"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."),m(280,"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.")],type:"string",enum:["simple","advanced"],default:"simple",description:m(281,"Controls the algorithm that computes wrapping points. Note that when in accessibility mode, advanced will be used for the best experience.")}})}validate(e){return dn(e,"simple",["simple","advanced"])}compute(e,t,i){return t.get(2)===2?"advanced":i}};(function(o){o.Off="off",o.OnCode="onCode",o.On="on"})(yl||(yl={}));Cj=class extends Tn{constructor(){let e={enabled:yl.OnCode};super(73,"lightbulb",e,{"editor.lightbulb.enabled":{type:"string",enum:[yl.Off,yl.OnCode,yl.On],default:e.enabled,enumDescriptions:[m(282,"Disable the code action menu."),m(283,"Show the code action menu when the cursor is on lines with code."),m(284,"Show the code action menu when the cursor is on lines with code or on empty lines.")],description:m(285,"Enables the Code Action lightbulb in the editor.")}})}validate(e){return!e||typeof e!="object"?this.defaultValue:{enabled:dn(e.enabled,this.defaultValue.enabled,[yl.Off,yl.OnCode,yl.On])}}},yj=class extends Tn{constructor(){let e={enabled:!0,maxLineCount:5,defaultModel:"outlineModel",scrollWithEditor:!0};super(131,"stickyScroll",e,{"editor.stickyScroll.enabled":{type:"boolean",default:e.enabled,description:m(286,"Shows the nested current scopes during the scroll at the top of the editor.")},"editor.stickyScroll.maxLineCount":{type:"number",default:e.maxLineCount,minimum:1,maximum:20,description:m(287,"Defines the maximum number of sticky lines to show.")},"editor.stickyScroll.defaultModel":{type:"string",enum:["outlineModel","foldingProviderModel","indentationModel"],default:e.defaultModel,description:m(288,"Defines the model to use for determining which lines to stick. If the outline model does not exist, it will fall back on the folding provider model which falls back on the indentation model. This order is respected in all three cases.")},"editor.stickyScroll.scrollWithEditor":{type:"boolean",default:e.scrollWithEditor,description:m(289,"Enable scrolling of Sticky Scroll with the editor's horizontal scrollbar.")}})}validate(e){if(!e||typeof e!="object")return this.defaultValue;let t=e;return{enabled:We(t.enabled,this.defaultValue.enabled),maxLineCount:Pi.clampedInt(t.maxLineCount,this.defaultValue.maxLineCount,1,20),defaultModel:dn(t.defaultModel,this.defaultValue.defaultModel,["outlineModel","foldingProviderModel","indentationModel"]),scrollWithEditor:We(t.scrollWithEditor,this.defaultValue.scrollWithEditor)}}},Sj=class extends Tn{constructor(){let e={enabled:"on",fontSize:0,fontFamily:"",padding:!1,maximumLength:43};super(159,"inlayHints",e,{"editor.inlayHints.enabled":{type:"string",default:e.enabled,description:m(290,"Enables the inlay hints in the editor."),enum:["on","onUnlessPressed","offUnlessPressed","off"],markdownEnumDescriptions:[m(291,"Inlay hints are enabled"),m(292,"Inlay hints are showing by default and hide when holding {0}",Ye?"Ctrl+Option":"Ctrl+Alt"),m(293,"Inlay hints are hidden by default and show when holding {0}",Ye?"Ctrl+Option":"Ctrl+Alt"),m(294,"Inlay hints are disabled")]},"editor.inlayHints.fontSize":{type:"number",default:e.fontSize,markdownDescription:m(295,"Controls font size of inlay hints in the editor. As default the {0} is used when the configured value is less than {1} or greater than the editor font size.","`#editor.fontSize#`","`5`")},"editor.inlayHints.fontFamily":{type:"string",default:e.fontFamily,markdownDescription:m(296,"Controls font family of inlay hints in the editor. When set to empty, the {0} is used.","`#editor.fontFamily#`")},"editor.inlayHints.padding":{type:"boolean",default:e.padding,description:m(297,"Enables the padding around the inlay hints in the editor.")},"editor.inlayHints.maximumLength":{type:"number",default:e.maximumLength,markdownDescription:m(298,"Maximum overall length of inlay hints, for a single line, before they get truncated by the editor. Set to `0` to never truncate")}})}validate(e){if(!e||typeof e!="object")return this.defaultValue;let t=e;return typeof t.enabled=="boolean"&&(t.enabled=t.enabled?"on":"off"),{enabled:dn(t.enabled,this.defaultValue.enabled,["on","off","offUnlessPressed","onUnlessPressed"]),fontSize:Pi.clampedInt(t.fontSize,this.defaultValue.fontSize,0,100),fontFamily:Ea.string(t.fontFamily,this.defaultValue.fontFamily),padding:We(t.padding,this.defaultValue.padding),maximumLength:Pi.clampedInt(t.maximumLength,this.defaultValue.maximumLength,0,Number.MAX_SAFE_INTEGER)}}},xj=class extends Tn{constructor(){super(74,"lineDecorationsWidth",10)}validate(e){return typeof e=="string"&&/^\d+(\.\d+)?ch$/.test(e)?-parseFloat(e.substring(0,e.length-2)):Pi.clampedInt(e,this.defaultValue,0,1e3)}compute(e,t,i){return i<0?Pi.clampedInt(-i*e.fontInfo.typicalHalfwidthCharacterWidth,this.defaultValue,0,1e3):i}},kj=class extends Sl{constructor(){super(75,"lineHeight",_r.lineHeight,e=>Sl.clamp(e,0,150),{markdownDescription:m(299,`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.`)},0,150)}compute(e,t,i){return e.fontInfo.lineHeight}},Lj=class extends Tn{constructor(){let e={enabled:!0,size:"proportional",side:"right",showSlider:"mouseover",autohide:"none",renderCharacters:!0,maxColumn:120,scale:1,showRegionSectionHeaders:!0,showMarkSectionHeaders:!0,markSectionHeaderRegex:"\\bMARK:\\s*(?-?)\\s*(?