|
|
|
@@ -0,0 +1,881 @@
|
|
|
|
|
var oH=Object.defineProperty;var rH=(s,e,t)=>e in s?oH(s,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):s[e]=t;var Pt=(s,e,t)=>(rH(s,typeof e!="symbol"?e+"":e,t),t);(function(){const e=document.createElement("link").relList;if(e&&e.supports&&e.supports("modulepreload"))return;for(const n of document.querySelectorAll('link[rel="modulepreload"]'))i(n);new MutationObserver(n=>{for(const o of n)if(o.type==="childList")for(const r of o.addedNodes)r.tagName==="LINK"&&r.rel==="modulepreload"&&i(r)}).observe(document,{childList:!0,subtree:!0});function t(n){const o={};return n.integrity&&(o.integrity=n.integrity),n.referrerpolicy&&(o.referrerPolicy=n.referrerpolicy),n.crossorigin==="use-credentials"?o.credentials="include":n.crossorigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function i(n){if(n.ep)return;n.ep=!0;const o=t(n);fetch(n.href,o)}})();function BT(s,e){const t=Object.create(null),i=s.split(",");for(let n=0;n<i.length;n++)t[i[n]]=!0;return e?n=>!!t[n.toLowerCase()]:n=>!!t[n]}const aH="itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly",lH=BT(aH);function _F(s){return!!s||s===""}function WT(s){if(lt(s)){const e={};for(let t=0;t<s.length;t++){const i=s[t],n=Un(i)?uH(i):WT(i);if(n)for(const o in n)e[o]=n[o]}return e}else{if(Un(s))return s;if(Ri(s))return s}}const cH=/;(?![^(]*\))/g,dH=/:(.+)/;function uH(s){const e={};return s.split(cH).forEach(t=>{if(t){const i=t.split(dH);i.length>1&&(e[i[0].trim()]=i[1].trim())}}),e}function VT(s){let e="";if(Un(s))e=s;else if(lt(s))for(let t=0;t<s.length;t++){const i=VT(s[t]);i&&(e+=i+" ")}else if(Ri(s))for(const t in s)s[t]&&(e+=t+" ");return e.trim()}function hH(s,e){if(s.length!==e.length)return!1;let t=!0;for(let i=0;t&&i<s.length;i++)t=Hb(s[i],e[i]);return t}function Hb(s,e){if(s===e)return!0;let t=TM(s),i=TM(e);if(t||i)return t&&i?s.getTime()===e.getTime():!1;if(t=u_(s),i=u_(e),t||i)return s===e;if(t=lt(s),i=lt(e),t||i)return t&&i?hH(s,e):!1;if(t=Ri(s),i=Ri(e),t||i){if(!t||!i)return!1;const n=Object.keys(s).length,o=Object.keys(e).length;if(n!==o)return!1;for(const r in s){const a=s.hasOwnProperty(r),l=e.hasOwnProperty(r);if(a&&!l||!a&&l||!Hb(s[r],e[r]))return!1}}return String(s)===String(e)}function HT(s,e){return s.findIndex(t=>Hb(t,e))}const Wn=s=>Un(s)?s:s==null?"":lt(s)||Ri(s)&&(s.toString===CF||!Lt(s.toString))?JSON.stringify(s,bF,2):String(s),bF=(s,e)=>e&&e.__v_isRef?bF(s,e.value):qf(e)?{[`Map(${e.size})`]:[...e.entries()].reduce((t,[i,n])=>(t[`${i} =>`]=n,t),{})}:up(e)?{[`Set(${e.size})`]:[...e.values()]}:Ri(e)&&!lt(e)&&!wF(e)?String(e):e,wi={},Kf=[],Ar=()=>{},fH=()=>!1,gH=/^on[^a-z]/,Ww=s=>gH.test(s),zT=s=>s.startsWith("onUpdate:"),Bs=Object.assign,$T=(s,e)=>{const t=s.indexOf(e);t>-1&&s.splice(t,1)},pH=Object.prototype.hasOwnProperty,zt=(s,e)=>pH.call(s,e),lt=Array.isArray,qf=s=>zb(s)==="[object Map]",up=s=>zb(s)==="[object Set]",TM=s=>zb(s)==="[object Date]",Lt=s=>typeof s=="function",Un=s=>typeof s=="string",u_=s=>typeof s=="symbol",Ri=s=>s!==null&&typeof s=="object",vF=s=>Ri(s)&&Lt(s.then)&&Lt(s.catch),CF=Object.prototype.toString,zb=s=>CF.call(s),mH=s=>zb(s).slice(8,-1),wF=s=>zb(s)==="[object Object]",UT=s=>Un(s)&&s!=="NaN"&&s[0]!=="-"&&""+parseInt(s,10)===s,tC=BT(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),Vw=s=>{const e=Object.create(null);return t=>e[t]||(e[t]=s(t))},_H=/-(\w)/g,vg=Vw(s=>s.replace(_H,(e,t)=>t?t.toUpperCase():"")),bH=/\B([A-Z])/g,hp=Vw(s=>s.replace(bH,"-$1").toLowerCase()),SF=Vw(s=>s.charAt(0).toUpperCase()+s.slice(1)),Qy=Vw(s=>s?`on${SF(s)}`:""),h_=(s,e)=>!Object.is(s,e),iC=(s,e)=>{for(let t=0;t<s.length;t++)s[t](e)},BC=(s,e,t)=>{Object.defineProperty(s,e,{configurable:!0,enumerable:!1,value:t})},WC=s=>{const e=parseFloat(s);return isNaN(e)?s:e};let NM;const vH=()=>NM||(NM=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{});let sa;class CH{constructor(e=!1){this.active=!0,this.effects=[],this.cleanups=[],!e&&sa&&(this.parent=sa,this.index=(sa.scopes||(sa.scopes=[])).push(this)-1)}run(e){if(this.active){const t=sa;try{return sa=this,e()}finally{sa=t}}}on(){sa=this}off(){sa=this.parent}stop(e){if(this.active){let t,i;for(t=0,i=this.effects.length;t<i;t++)this.effects[t].stop();for(t=0,i=this.cleanups.length;t<i;t++)this.cleanups[t]();if(this.scopes)for(t=0,i=this.scopes.length;t<i;t++)this.scopes[t].stop(!0);if(this.parent&&!e){const n=this.parent.scopes.pop();n&&n!==this&&(this.parent.scopes[this.index]=n,n.index=this.index)}this.active=!1}}}function wH(s,e=sa){e&&e.active&&e.effects.push(s)}const jT=s=>{const e=new Set(s);return e.w=0,e.n=0,e},yF=s=>(s.w&sd)>0,LF=s=>(s.n&sd)>0,SH=({deps:s})=>{if(s.length)for(let e=0;e<s.length;e++)s[e].w|=sd},yH=s=>{const{deps:e}=s;if(e.length){let t=0;for(let i=0;i<e.length;i++){const n=e[i];yF(n)&&!LF(n)?n.delete(s):e[t++]=n,n.w&=~sd,n.n&=~sd}e.length=t}},uD=new WeakMap;let pm=0,sd=1;const hD=30Line truncated
|
|
|
|
|
`,";").replace(";;",";").split(";").forEach(function(o){const r=o.split(":");let a=r[0];const l=r[1];a=a.trim().split("-").reduce(function(d,u,h,f){return h===0&&u!==""||f[0]===""&&h===1?u:d+u.toUpperCase()[0]+u.slice(1)},""),es[s].style[a]=!0;const c=i.canvas;a in c.style&&(c.style[a]=l)})}function P$(s,e){const{mode:t}=e,n=di(s).context;n.globalCompositeOperation=t,es[s].globalCompositeOperation=!0}function F$(s,e){const{data:t}=e,i=di(s);i.context.filter=t,es[s].filter=!0}function B$(s,e){const{shadowBlur:t,shadowColor:i,shadowOffsetX:n,shadowOffsetY:o}=e,a=di(s).context;a.shadowBlur=t,a.shadowColor=i,a.shadowOffsetX=n,a.shadowOffsetY=o,es[s].shadowBlur=!0,es[s].shadowColor=!0,es[s].shadowOffsetX=!0,es[s].shadowOffsetY=!0}function W$(s,e){const{direction:t,textAlign:i,textBaseline:n}=e,r=di(s).context;r.direction=t,r.textAlign=i,r.textBaseline=n,es[s].direction=!0,es[s].textAlign=!0,es[s].textBaseline=!0}function V$(s,e){const t=di(s);core.setAlpha(t.context,e.opacity),es[s].globalAlpha=!0}function H$(s){di(s).context.save()}function z$(s){di(s).context.restore()}function $$(s,e){const{x1:t,y1:i,x2:n,y2:o,lineWidth:r,style:a}=e,l=di(s);core.drawLine(l.context,t,i,n,o,a,r)}function U$(s,e){const{x:t,y:i,r:n,start:o,end:r,stroke:a,style:l,lineWidth:c}=e,d=di(s);a?core.strokeArc(d.context,t,i,n,o,r,l,c):core.fillArc(d.context,t,i,n,o,r,l)}function j$(s,e){const{x:t,y:i,r:n,stroke:o,style:r,lineWidth:a}=e,l=di(s);o?core.strokeCircle(l.context,t,i,n,r,a):core.fillCircle(l.context,t,i,n,r)}function K$(s,e){const{x:t,y:i,w:n,h:o,stroke:r,style:a,lineWidth:l}=e,c=di(s);r?core.strokeRect(c.context,t,i,n,o,a,l):core.fillRect(c.context,t,i,n,o,a)}function q$(s,e){const{x:t,y:i,w:n,h:o,r,stroke:a,style:l,lineWidth:c}=e,d=di(s);a?core.strokeRoundRect(d.context,t,i,n,o,r,l,c):core.fillRoundRect(d.context,t,i,n,o,r,l)}function G$(s,e){const{path:t,stroke:i,style:n,lineWidth:o}=e,r=di(s);i?core.strokePolygon(r.context,t,n,o):core.fillPolygon(r.context,t,n)}function Z$(s,e){const{x:t,y:i,a:n,b:o,angle:r,stroke:a,style:l,lineWidth:c}=e,d=di(s);a?core.strokeEllipse(d.context,t,i,n,o,r,l,c):core.fillEllipse(d.context,t,i,n,o,r,l)}function Y$(s,e){const{x1:t,y1:i,x2:n,y2:o,lineWidth:r,style:a}=e,l=di(s);core.drawArrow(l.context,t,i,n,o,a,r)}function X$(s,e){const{cp1x:t,cp1y:i,cp2x:n,cp2y:o,x:r,y:a,sx:l,sy:c,lineWidth:d,style:u}=e;let f=di(s).context;f.beginPath(),f.lineWidth=d,f.strokeStyle=u,f.moveTo(l,c),f.bezierCurveTo(t,i,n,o,r,a),f.stroke()}function Q$(s,e){const{img:t,sx:i,sy:n,sw:o,sh:r,dx:a,dy:l,dw:c,dh:d}=e,u=di(s);core.drawImage(u.context,t,i,n,o,r,a,l,c,d)}function m7(s,e){const{icon:t,x:i,y:n,w:o,h:r,frame:a}=e,l=di(s);core.drawIcon(l.context,t,i,n,o,r,a)}function J$(s,e){const{img:t,x:i,y:n,w:o,h:r}=e,a=di(s);core.drawWindowSkin(t,a.context,i,n,o.toString(),r.toString())}function eU(s,e){const{str:t,x:i,y:n,italic:o,fontWeight:r,fontSize:a,font:l,lineWidth:c,stroke:d,strokeStyle:u,style:h}=e,f=di(s),g=`${o?"italic":""} ${r!=null?r:""} ${a!=null?a:""} ${l||"sans-serif"}`;f.context.lineWidth=c,d?core.fillBoldText(f.context,t,i,n,h,u,g,void 0,c):core.fillText(f.context,t,i,n,h,g)}function tU(s,e){const{content:t,left:i,top:n,width:o,color:r,align:a,fontSize:l,lineHeight:c,time:d,font:u,letterSpacing:h,bold:f,italic:g}=e,_=di(s);core.drawTextContent(_.context,t,{left:i,top:n,maxWidth:o,color:r,align:a,fontSize:l,lineHeight:c,time:d,font:u,letterSpacing:h,bold:f,italic:g})}const _7=Object.freeze(Object.defineProperty({__proto__:null,resetSprite:Gw,wait:p7,transition:I$,create:rN,del:T$,move:N$,resize:A$,rotate:M$,clear:R$,css:O$,composite:P$,filter:F$,shadow:B$,textInfo:W$,opacity:V$,save:H$,restore:z$,line:$$,arc:U$,circle:j$,rect:K$,roundRect:q$,polygon:G$,ellipse:Z$,arrow:Y$,bezierCurve:X$,image:Q$,icon:m7,winskin:J$,text:eU,textContent:tU},Symbol.toStringTag,{value:"Module"}));async function iU(){for(const s in zn){const e=zn[s];e.setCss("display: none;"),Gw(e)}await new Promise(s=>{setTimeout(s,50)});for(const s of an.value){const e=s.type,t=s.sprite,i=s.data;s.disable||(e==="wait"?await p7(t,i):e==="create"?rN(i.name,i):_7[e](t,i))}}function Iu(){const s=["wait","transition","del"];for(const e in zn){const t=zn[e];t.setCss("display: none;"),Gw(t)}for(const e of an.value){const t=e.type,i=e.sprite,n=e.data;e.disable||s.includes(t)||(t==="create"?rN(n.name,n):_7[t](i,n))}}const an=Xt([]);window.list=an;const Mc=Xt(!1),_o=Xt([]),ha=Xt([]),aN=Xt(!1);document.body.addEventListener("keydown",s=>{s.key==="Control"&&(aN.value=!0)});document.body.addEventListener("keyup",s=>{s.key==="Control"&&(aN.value=!1)});Hl(an,s=>{an.value=s,Iu()});const EM=class{constructor(e){Pt(this,"type");Pt(this,"data");Pt(this,"detailed",!1);Pt(this,"cnt",EM.cnt++);Pt(this,"sprite");Pt(this,"success",!1);Pt(this,"disable",!1);this.type=e;const t=this.generateBaseData();this.sprite=Object.keys(zn)[0],t&&(this.data=t,this.success=!0,this.addSprite())}generateBaseData(){const e={};if(!Object.values(zn)[0]&&this.type!=="create")return core.dra
Line truncated
|
|
|
|
|
- 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(e,t,i){return e.fontInfo.lineHeight}}class GU extends Oi{constructor(){const e={enabled:!0,size:"proportional",side:"right",showSlider:"mouseover",autohide:!1,renderCharacters:!0,maxColumn:120,scale:1};super(67,"minimap",e,{"editor.minimap.enabled":{type:"boolean",default:e.enabled,description:p("minimap.enabled","Controls whether the minimap is shown.")},"editor.minimap.autohide":{type:"boolean",default:e.autohide,description:p("minimap.autohide","Controls whether the minimap is hidden automatically.")},"editor.minimap.size":{type:"string",enum:["proportional","fill","fit"],enumDescriptions:[p("minimap.size.proportional","The minimap has the same size as the editor contents (and might scroll)."),p("minimap.size.fill","The minimap will stretch or shrink as necessary to fill the height of the editor (no scrolling)."),p("minimap.size.fit","The minimap will shrink as necessary to never be larger than the editor (no scrolling).")],default:e.size,description:p("minimap.size","Controls the size of the minimap.")},"editor.minimap.side":{type:"string",enum:["left","right"],default:e.side,description:p("minimap.side","Controls the side where to render the minimap.")},"editor.minimap.showSlider":{type:"string",enum:["always","mouseover"],default:e.showSlider,description:p("minimap.showSlider","Controls when the minimap slider is shown.")},"editor.minimap.scale":{type:"number",default:e.scale,minimum:1,maximum:3,enum:[1,2,3],description:p("minimap.scale","Scale of content drawn in the minimap: 1, 2 or 3.")},"editor.minimap.renderCharacters":{type:"boolean",default:e.renderCharacters,description:p("minimap.renderCharacters","Render the actual characters on a line as opposed to color blocks.")},"editor.minimap.maxColumn":{type:"number",default:e.maxColumn,description:p("minimap.maxColumn","Limit the width of the minimap to render at most a certain number of columns.")}})}validate(e){if(!e||typeof e!="object")return this.defaultValue;const t=e;return{enabled:Ne(t.enabled,this.defaultValue.enabled),autohide:Ne(t.autohide,this.defaultValue.autohide),size:pn(t.size,this.defaultValue.size,["proportional","fill","fit"]),side:pn(t.side,this.defaultValue.side,["right","left"]),showSlider:pn(t.showSlider,this.defaultValue.showSlider,["always","mouseover"]),renderCharacters:Ne(t.renderCharacters,this.defaultValue.renderCharacters),scale:Zt.clampedInt(t.scale,1,1,3),maxColumn:Zt.clampedInt(t.maxColumn,this.defaultValue.maxColumn,1,1e4)}}}function ZU(s){return s==="ctrlCmd"?st?"metaKey":"ctrlKey":"altKey"}class YU extends Oi{constructor(){super(77,"padding",{top:0,bottom:0},{"editor.padding.top":{type:"number",default:0,minimum:0,maximum:1e3,description:p("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:p("padding.bottom","Controls the amount of space between the bottom edge of the editor and the last line.")}})}validate(e){if(!e||typeof e!="object")return this.defaultValue;const t=e;return{top:Zt.clampedInt(t.top,0,0,1e3),bottom:Zt.clampedInt(t.bottom,0,0,1e3)}}}class XU extends Oi{constructor(){const e={enabled:!0,cycle:!1};super(78,"parameterHints",e,{"editor.parameterHints.enabled":{type:"boolean",default:e.enabled,description:p("parameterHints.enabled","Enables a pop-up that shows parameter documentation and type information as you type.")},"editor.parameterHints.cycle":{type:"boolean",default:e.cycle,description:p("parameterHints.cycle","Controls whether the parameter hints menu cycles or closes when reaching the end of the list.")}})}validate(e){if(!e||typeof e!="object")return this.defaultValue;const t=e;return{enabled:Ne(t.enabled,this.defaultValue.enabled),cycle:Ne(t.cycle,this.defaultValue.cycle)}}}class QU extends _p{constructor(){super(131)}compute(e,t,i){return e.pixelRatio}}class JU extends Oi{constructor(){const e={other:"on",comments:"off",strings:"off"},t=[{type:"boolean"},{type:"string",enum:["on","inline","off"],enumDescriptions:[p("on","Quick suggestions show inside the suggest widget"),p("inline","Quick suggestions show as ghost text"),p("off","Quick suggestions are disabled")]}];super(81,"quickSuggestions",e,{type:"object",additionalProperties:!1,properties:{strings:{anyOf:t,default:e.strings,description:p("quickSuggestions.strings","Enable quick suggestions inside strings.")},comments:{anyOf:t,default:e.comments,description:p("quickSuggestions.comments","Enable quick suggestions inside comments.")},other:{anyOf:t,default:e.other,description:p("quickSuggestions.other","Enable quick suggestions outside of strings and comments.")}},default:e,markdownDescription:p("quickSuggestions","Controls whether suggestions should automatically show up while typing. This can be controlled for typing in comments, strings, and other code. Quick suggestion can be configured to show as ghost text or with the sug
Line truncated
|
|
|
|
|
|
|
|
|
|
`+e.stack):new Error(e.message+`
|
|
|
|
|
|
|
|
|
|
`+e.stack):e},0)}}emit(e){this.listeners.forEach(t=>{t(e)})}onUnexpectedError(e){this.unexpectedErrorHandler(e),this.emit(e)}onUnexpectedExternalError(e){this.unexpectedErrorHandler(e)}}const F7=new mj;function $e(s){Ga(s)||F7.onUnexpectedError(s)}function nn(s){Ga(s)||F7.onUnexpectedExternalError(s)}function mR(s){if(s instanceof Error){const{name:e,message:t}=s,i=s.stacktrace||s.stack;return{$isError:!0,name:e,message:t,stack:i,noTelemetry:Lg.isErrorNoTelemetry(s)}}return s}const XC="Canceled";function Ga(s){return s instanceof Id?!0:s instanceof Error&&s.name===XC&&s.message===XC}class Id extends Error{constructor(){super(XC),this.name=this.message}}function B7(){const s=new Error(XC);return s.name=s.message,s}function Or(s){return s?new Error(`Illegal argument: ${s}`):new Error("Illegal argument")}function _j(s){return s?new Error(`Illegal state: ${s}`):new Error("Illegal state")}class bj extends Error{constructor(e){super("NotSupported"),e&&(this.message=e)}}class Lg extends Error{constructor(e){super(e),this.name="ErrorNoTelemetry"}static fromError(e){if(e instanceof Lg)return e;const t=new Lg;return t.message=e.message,t.stack=e.stack,t}static isErrorNoTelemetry(e){return e.name==="ErrorNoTelemetry"}}class gN extends Error{constructor(e){super(e||"An unexpected bug occurred."),Object.setPrototypeOf(this,gN.prototype);debugger}}function Zl(s){const e=this;let t=!1,i;return function(){return t||(t=!0,i=s.apply(e,arguments)),i}}class vj extends Error{constructor(e){super(`Encountered errors while disposing of store. Errors: [${e.join(", ")}]`),this.errors=e}}function pN(s){return typeof s.dispose=="function"&&s.dispose.length===0}function pt(s){if(tt.is(s)){const e=[];for(const t of s)if(t)try{t.dispose()}catch(i){e.push(i)}if(e.length===1)throw e[0];if(e.length>1)throw new vj(e);return Array.isArray(s)?[]:s}else if(s)return s.dispose(),s}function Na(...s){return Ze(()=>pt(s))}function Ze(s){return{dispose:Zl(()=>{s()})}}class ee{constructor(){this._toDispose=new Set,this._isDisposed=!1}dispose(){this._isDisposed||(this._isDisposed=!0,this.clear())}get isDisposed(){return this._isDisposed}clear(){try{pt(this._toDispose.values())}finally{this._toDispose.clear()}}add(e){if(!e)return e;if(e===this)throw new Error("Cannot register a disposable on itself!");return this._isDisposed?ee.DISABLE_DISPOSED_WARNING||console.warn(new Error("Trying to add a disposable to a DisposableStore that has already been disposed of. The added object will be leaked!").stack):this._toDispose.add(e),e}}ee.DISABLE_DISPOSED_WARNING=!1;class q{constructor(){this._store=new ee,this._store}dispose(){this._store.dispose()}_register(e){if(e===this)throw new Error("Cannot register a disposable on itself!");return this._store.add(e)}}q.None=Object.freeze({dispose(){}});class jn{constructor(){this._isDisposed=!1}get value(){return this._isDisposed?void 0:this._value}set value(e){var t;this._isDisposed||e===this._value||((t=this._value)===null||t===void 0||t.dispose(),this._value=e)}clear(){this.value=void 0}dispose(){var e;this._isDisposed=!0,(e=this._value)===null||e===void 0||e.dispose(),this._value=void 0}clearAndLeak(){const e=this._value;return this._value=void 0,e}}class Cj{constructor(e){this._disposable=e,this._counter=1}acquire(){return this._counter++,this}release(){return--this._counter===0&&this._disposable.dispose(),this}}class wj{constructor(){this.dispose=()=>{},this.unset=()=>{},this.isset=()=>!1}set(e){let t=e;return this.unset=()=>t=void 0,this.isset=()=>t!==void 0,this.dispose=()=>{t&&(t(),t=void 0)},this}}class Sj{constructor(e){this.object=e}dispose(){}}const yj=Si.performance&&typeof Si.performance.now=="function";class ys{constructor(e){this._highResolution=yj&&e,this._startTime=this._now(),this._stopTime=-1}static create(e=!0){return new ys(e)}stop(){this._stopTime=this._now()}elapsed(){return this._stopTime!==-1?this._stopTime-this._startTime:this._now()-this._startTime}_now(){return this._highResolution?Si.performance.now():Date.now()}}var ke;(function(s){s.None=()=>q.None;function e(x){return(y,k=null,I)=>{let R=!1,P;return P=x(j=>{if(!R)return P?P.dispose():R=!0,y.call(k,j)},null,I),R&&P.dispose(),P}}s.once=e;function t(x,y,k){return l((I,R=null,P)=>x(j=>I.call(R,y(j)),null,P),k)}s.map=t;function i(x,y,k){return l((I,R=null,P)=>x(j=>{y(j),I.call(R,j)},null,P),k)}s.forEach=i;function n(x,y,k){return l((I,R=null,P)=>x(j=>y(j)&&I.call(R,j),null,P),k)}s.filter=n;function o(x){return x}s.signal=o;function r(...x){return(y,k=null,I)=>Na(...x.map(R=>R(P=>y.call(k,P),null,I)))}s.any=r;function a(x,y,k,I){let R=k;return t(x,P=>(R=y(R,P),R),I)}s.reduce=a;function l(x,y){let k;const I={onFirstListenerAdd(){k=x(R.fire,R)},onLastListenerRemove(){k==null||k.dispose()}},R=new W(I);return y==null||y.add(R),R.event}function c(x,y,k=100,I=!1,R,P){let j,K,ae,ue=0;const we={leakWarningThreshold:R,onFirstListenerAdd(){j=x(Ce=>{ue++,K=y(K,Ce),I&&!ae&&(ve.fire(K),K=void 0),clearTimeout(ae),ae=setTimeout(()=>{const We=K;K=void 0,ae=vo
Line truncated
|
|
|
|
|
`).slice(2).join(`
|
|
|
|
|
`))}}class Lj{constructor(e,t,i){this.callback=e,this.callbackThis=t,this.stack=i,this.subscription=new wj}invoke(e){this.callback.call(this.callbackThis,e)}}class W{constructor(e){var t,i;this._disposed=!1,this._options=e,this._leakageMon=void 0,this._perfMon=!((t=this._options)===null||t===void 0)&&t._profName?new Qw(this._options._profName):void 0,this._deliveryQueue=(i=this._options)===null||i===void 0?void 0:i.deliveryQueue}dispose(){var e,t,i,n;this._disposed||(this._disposed=!0,this._listeners&&this._listeners.clear(),(e=this._deliveryQueue)===null||e===void 0||e.clear(this),(i=(t=this._options)===null||t===void 0?void 0:t.onLastListenerRemove)===null||i===void 0||i.call(t),(n=this._leakageMon)===null||n===void 0||n.dispose())}get event(){return this._event||(this._event=(e,t,i)=>{var n,o,r;this._listeners||(this._listeners=new ts);const a=this._listeners.isEmpty();a&&((n=this._options)===null||n===void 0?void 0:n.onFirstListenerAdd)&&this._options.onFirstListenerAdd(this);let l,c;this._leakageMon&&this._listeners.size>=30&&(c=mN.create(),l=this._leakageMon.check(c,this._listeners.size+1));const d=new Lj(e,t,c),u=this._listeners.push(d);a&&((o=this._options)===null||o===void 0?void 0:o.onFirstListenerDidAdd)&&this._options.onFirstListenerDidAdd(this),!((r=this._options)===null||r===void 0)&&r.onListenerDidAdd&&this._options.onListenerDidAdd(this,e,t);const h=d.subscription.set(()=>{l==null||l(),this._disposed||(u(),this._options&&this._options.onLastListenerRemove&&(this._listeners&&!this._listeners.isEmpty()||this._options.onLastListenerRemove(this)))});return i instanceof ee?i.add(h):Array.isArray(i)&&i.push(h),h}),this._event}fire(e){var t,i;if(this._listeners){this._deliveryQueue||(this._deliveryQueue=new kj);for(const n of this._listeners)this._deliveryQueue.push(this,n,e);(t=this._perfMon)===null||t===void 0||t.start(this._deliveryQueue.size),this._deliveryQueue.deliver(),(i=this._perfMon)===null||i===void 0||i.stop()}}}class W7{constructor(){this._queue=new ts}get size(){return this._queue.size}push(e,t,i){this._queue.push(new Dj(e,t,i))}clear(e){const t=new ts;for(const i of this._queue)i.emitter!==e&&t.push(i);this._queue=t}deliver(){for(;this._queue.size>0;){const e=this._queue.shift();try{e.listener.invoke(e.event)}catch(t){$e(t)}}}}class kj extends W7{clear(e){this._queue.clear()}}class Dj{constructor(e,t,i){this.emitter=e,this.listener=t,this.event=i}}class QC extends W{constructor(e){super(e),this._isPaused=0,this._eventQueue=new ts,this._mergeFn=e==null?void 0:e.merge}pause(){this._isPaused++}resume(){if(this._isPaused!==0&&--this._isPaused===0)if(this._mergeFn){const 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._listeners&&(this._isPaused!==0?this._eventQueue.push(e):super.fire(e))}}class xj extends QC{constructor(e){var t;super(e),this._delay=(t=e.delay)!==null&&t!==void 0?t:100}fire(e){this._handle||(this.pause(),this._handle=setTimeout(()=>{this._handle=void 0,this.resume()},this._delay)),super.fire(e)}}class _N{constructor(){this.buffers=[]}wrapEvent(e){return(t,i,n)=>e(o=>{const r=this.buffers[this.buffers.length-1];r?r.push(()=>t.call(i,o)):t.call(i,o)},void 0,n)}bufferEvents(e){const t=[];this.buffers.push(t);const i=e();return this.buffers.pop(),t.forEach(n=>n()),i}}class _R{constructor(){this.listening=!1,this.inputEvent=ke.None,this.inputEventListener=q.None,this.emitter=new W({onFirstListenerDidAdd:()=>{this.listening=!0,this.inputEventListener=this.inputEvent(this.emitter.fire,this.emitter)},onLastListenerRemove:()=>{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()}}const V7=Object.freeze(function(s,e){const t=setTimeout(s.bind(e),0);return{dispose(){clearTimeout(t)}}});var Qe;(function(s){function e(t){return t===s.None||t===s.Cancelled||t instanceof lC?!0:!t||typeof t!="object"?!1:typeof t.isCancellationRequested=="boolean"&&typeof t.onCancellationRequested=="function"}s.isCancellationToken=e,s.None=Object.freeze({isCancellationRequested:!1,onCancellationRequested:ke.None}),s.Cancelled=Object.freeze({isCancellationRequested:!0,onCancellationRequested:V7})})(Qe||(Qe={}));class lC{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?V7:(this._emitter||(this._emitter=new W),this._emitter.event)}dispose(){this._emitter&&(this._emitter.dispose(),this._emitter=null)}}class Cn{constructor(e){this._token=void 0,this._parentListener=void 0,this._parentListener=e&&e.onCancellationRe
Line truncated
|
|
|
|
|
`;const LR=typeof Buffer<"u";let cL;class sS{constructor(e){this.buffer=e,this.byteLength=this.buffer.byteLength}static wrap(e){return LR&&!Buffer.isBuffer(e)&&(e=Buffer.from(e.buffer,e.byteOffset,e.byteLength)),new sS(e)}toString(){return LR?this.buffer.toString():(cL||(cL=new TextDecoder),cL.decode(this.buffer))}}function AK(s,e){return s[e+0]<<0>>>0|s[e+1]<<8>>>0}function MK(s,e,t){s[t+0]=e&255,e=e>>>8,s[t+1]=e&255}function gr(s,e){return s[e]*Math.pow(2,24)+s[e+1]*Math.pow(2,16)+s[e+2]*Math.pow(2,8)+s[e+3]}function pr(s,e,t){s[t+3]=e,e=e>>>8,s[t+2]=e,e=e>>>8,s[t+1]=e,e=e>>>8,s[t]=e}function kR(s,e){return s[e]}function DR(s,e,t){s[t]=e}let dL;function a3(){return dL||(dL=new TextDecoder("UTF-16LE")),dL}let uL;function RK(){return uL||(uL=new TextDecoder("UTF-16BE")),uL}let hL;function l3(){return hL||(hL=C7()?a3():RK()),hL}const c3=typeof TextDecoder<"u";let ld,Sx;c3?(ld=s=>new PK(s),Sx=OK):(ld=s=>new FK,Sx=d3);function OK(s,e,t){const i=new Uint16Array(s.buffer,e,t);return t>0&&(i[0]===65279||i[0]===65534)?d3(s,e,t):a3().decode(i)}function d3(s,e,t){const i=[];let n=0;for(let o=0;o<t;o++){const r=AK(s,e);e+=2,i[n++]=String.fromCharCode(r)}return i.join("")}class PK{constructor(e){this._capacity=e|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 e=new Uint16Array(this._buffer.buffer,0,this._bufferLength);return l3().decode(e)}_flushBuffer(){const e=this._buildBuffer();this._bufferLength=0,this._completedStrings===null?this._completedStrings=[e]:this._completedStrings[this._completedStrings.length]=e}write1(e){const t=this._capacity-this._bufferLength;t<=1&&(t===0||Ui(e))&&this._flushBuffer(),this._buffer[this._bufferLength++]=e}appendASCII(e){this._bufferLength===this._capacity&&this._flushBuffer(),this._buffer[this._bufferLength++]=e}appendASCIIString(e){const t=e.length;if(this._bufferLength+t>=this._capacity){this._flushBuffer(),this._completedStrings[this._completedStrings.length]=e;return}for(let i=0;i<t;i++)this._buffer[this._bufferLength++]=e.charCodeAt(i)}}class FK{constructor(){this._pieces=[],this._piecesLen=0}reset(){this._pieces=[],this._piecesLen=0}build(){return this._pieces.join("")}write1(e){this._pieces[this._piecesLen++]=String.fromCharCode(e)}appendASCII(e){this._pieces[this._piecesLen++]=String.fromCharCode(e)}appendASCIIString(e){this._pieces[this._piecesLen++]=e}}class o1{constructor(e,t,i,n,o,r){this._richEditBracketBrand=void 0,this.languageId=e,this.index=t,this.open=i,this.close=n,this.forwardRegex=o,this.reversedRegex=r,this._openSet=o1._toSet(this.open),this._closeSet=o1._toSet(this.close)}isOpen(e){return this._openSet.has(e)}isClose(e){return this._closeSet.has(e)}static _toSet(e){const t=new Set;for(const i of e)t.add(i);return t}}function BK(s){const e=s.length;s=s.map(r=>[r[0].toLowerCase(),r[1].toLowerCase()]);const t=[];for(let r=0;r<e;r++)t[r]=r;const i=(r,a)=>{const[l,c]=r,[d,u]=a;return l===d||l===u||c===d||c===u},n=(r,a)=>{const l=Math.min(r,a),c=Math.max(r,a);for(let d=0;d<e;d++)t[d]===c&&(t[d]=l)};for(let r=0;r<e;r++){const a=s[r];for(let l=r+1;l<e;l++){const c=s[l];i(a,c)&&n(t[r],t[l])}}const o=[];for(let r=0;r<e;r++){const a=[],l=[];for(let c=0;c<e;c++)if(t[c]===r){const[d,u]=s[c];a.push(d),l.push(u)}a.length>0&&o.push({open:a,close:l})}return o}class WK{constructor(e,t){this._richEditBracketsBrand=void 0;const i=BK(t);this.brackets=i.map((n,o)=>new o1(e,o,n.open,n.close,VK(n.open,n.close,i,o),HK(n.open,n.close,i,o))),this.forwardRegex=zK(this.brackets),this.reversedRegex=$K(this.brackets),this.textIsBracket={},this.textIsOpenBracket={},this.maxBracketLength=0;for(const n of this.brackets){for(const o of n.open)this.textIsBracket[o]=n,this.textIsOpenBracket[o]=!0,this.maxBracketLength=Math.max(this.maxBracketLength,o.length);for(const o of n.close)this.textIsBracket[o]=n,this.textIsOpenBracket[o]=!1,this.maxBracketLength=Math.max(this.maxBracketLength,o.length)}}}function u3(s,e,t,i){for(let n=0,o=e.length;n<o;n++){if(n===t)continue;const r=e[n];for(const a of r.open)a.indexOf(s)>=0&&i.push(a);for(const a of r.close)a.indexOf(s)>=0&&i.push(a)}}function h3(s,e){return s.length-e.length}function oS(s){if(s.length<=1)return s;const e=[],t=new Set;for(const i of s)t.has(i)||(e.push(i),t.add(i));return e}function VK(s,e,t,i){let n=[];n=n.concat(s),n=n.concat(e);for(let o=0,r=n.length;o<r;o++)u3(n[o],t,i,n);return n=oS(n),n.sort(h3),n.reverse(),rS(n)}function HK(s,e,t,i){let n=[];n=n.concat(s),n=n.concat(e);for(let o=0,r=n.length;o<r;o++)u3(n[o],t,i,n);return n=oS(n),n.sort(h3),n.reverse(),rS(n.map(RN))}function zK(s){let e=[];for(const t of s){for(const i of t.open)e.push(i);for(const i of t.close)e.push(i)}return e=oS(e),rS(e)}function $K(s){let e=[];for(const t of s){for(const i of t.open
Line truncated
|
|
|
|
|
`)>=0;let t=null;try{t=J7(this.searchString,this.isRegex,{matchCase:this.matchCase,wholeWord:!1,multiline:e,global:!0,unicode:!0})}catch{return null}if(!t)return null;let i=!this.isRegex&&!e;return i&&this.searchString.toLowerCase()!==this.searchString.toUpperCase()&&(i=this.matchCase),new xK(t,this.wordSeparators?Po(this.wordSeparators):null,i?this.searchString:null)}}function Xq(s){if(!s||s.length===0)return!1;for(let e=0,t=s.length;e<t;e++){const i=s.charCodeAt(e);if(i===10)return!0;if(i===92){if(e++,e>=t)break;const n=s.charCodeAt(e);if(n===110||n===114||n===87)return!0}}return!1}function ru(s,e,t){if(!t)return new k_(s,null);const i=[];for(let n=0,o=e.length;n<o;n++)i[n]=e[n];return new k_(s,i)}class UR{constructor(e){const t=[];let i=0;for(let n=0,o=e.length;n<o;n++)e.charCodeAt(n)===10&&(t[i++]=n);this._lineFeedsOffsets=t}findLineFeedCountBeforeOffset(e){const t=this._lineFeedsOffsets;let i=0,n=t.length-1;if(n===-1||e<=t[0])return 0;for(;i<n;){const o=i+((n-i)/2>>0);t[o]>=e?n=o-1:t[o+1]>=e?(i=o,n=o):i=o+1}return i+1}}class $0{static findMatches(e,t,i,n,o){const r=t.parseSearchRequest();return r?r.regex.multiline?this._doFindMatchesMultiline(e,i,new xf(r.wordSeparators,r.regex),n,o):this._doFindMatchesLineByLine(e,i,r,n,o):[]}static _getMultilineMatchRange(e,t,i,n,o,r){let a,l=0;n?(l=n.findLineFeedCountBeforeOffset(o),a=t+o+l):a=t+o;let c;if(n){const f=n.findLineFeedCountBeforeOffset(o+r.length)-l;c=a+r.length+f}else c=a+r.length;const d=e.getPositionAt(a),u=e.getPositionAt(c);return new L(d.lineNumber,d.column,u.lineNumber,u.column)}static _doFindMatchesMultiline(e,t,i,n,o){const r=e.getOffsetAt(t.getStartPosition()),a=e.getValueInRange(t,1),l=e.getEOL()===`\r
|
|
|
|
|
`?new UR(a):null,c=[];let d=0,u;for(i.reset(0);u=i.next(a);)if(c[d++]=ru(this._getMultilineMatchRange(e,r,a,l,u.index,u[0]),u,n),d>=o)return c;return c}static _doFindMatchesLineByLine(e,t,i,n,o){const r=[];let a=0;if(t.startLineNumber===t.endLineNumber){const c=e.getLineContent(t.startLineNumber).substring(t.startColumn-1,t.endColumn-1);return a=this._findMatchesInLine(i,c,t.startLineNumber,t.startColumn-1,a,r,n,o),r}const l=e.getLineContent(t.startLineNumber).substring(t.startColumn-1);a=this._findMatchesInLine(i,l,t.startLineNumber,t.startColumn-1,a,r,n,o);for(let c=t.startLineNumber+1;c<t.endLineNumber&&a<o;c++)a=this._findMatchesInLine(i,e.getLineContent(c),c,0,a,r,n,o);if(a<o){const c=e.getLineContent(t.endLineNumber).substring(0,t.endColumn-1);a=this._findMatchesInLine(i,c,t.endLineNumber,0,a,r,n,o)}return r}static _findMatchesInLine(e,t,i,n,o,r,a,l){const c=e.wordSeparators;if(!a&&e.simpleSearch){const h=e.simpleSearch,f=h.length,g=t.length;let _=-f;for(;(_=t.indexOf(h,_+f))!==-1;)if((!c||HN(c,t,g,_,f))&&(r[o++]=new k_(new L(i,_+1+n,i,_+1+f+n),null),o>=l))return o;return o}const d=new xf(e.wordSeparators,e.regex);let u;d.reset(0);do if(u=d.next(t),u&&(r[o++]=ru(new L(i,u.index+1+n,i,u.index+1+u[0].length+n),u,a),o>=l))return o;while(u);return o}static findNextMatch(e,t,i,n){const o=t.parseSearchRequest();if(!o)return null;const r=new xf(o.wordSeparators,o.regex);return o.regex.multiline?this._doFindNextMatchMultiline(e,i,r,n):this._doFindNextMatchLineByLine(e,i,r,n)}static _doFindNextMatchMultiline(e,t,i,n){const o=new H(t.lineNumber,1),r=e.getOffsetAt(o),a=e.getLineCount(),l=e.getValueInRange(new L(o.lineNumber,o.column,a,e.getLineMaxColumn(a)),1),c=e.getEOL()===`\r
|
|
|
|
|
`?new UR(l):null;i.reset(t.column-1);const d=i.next(l);return d?ru(this._getMultilineMatchRange(e,r,l,c,d.index,d[0]),d,n):t.lineNumber!==1||t.column!==1?this._doFindNextMatchMultiline(e,new H(1,1),i,n):null}static _doFindNextMatchLineByLine(e,t,i,n){const o=e.getLineCount(),r=t.lineNumber,a=e.getLineContent(r),l=this._findFirstMatchInLine(i,a,r,t.column,n);if(l)return l;for(let c=1;c<=o;c++){const d=(r+c-1)%o,u=e.getLineContent(d+1),h=this._findFirstMatchInLine(i,u,d+1,1,n);if(h)return h}return null}static _findFirstMatchInLine(e,t,i,n,o){e.reset(n-1);const r=e.next(t);return r?ru(new L(i,r.index+1,i,r.index+1+r[0].length),r,o):null}static findPreviousMatch(e,t,i,n){const o=t.parseSearchRequest();if(!o)return null;const r=new xf(o.wordSeparators,o.regex);return o.regex.multiline?this._doFindPreviousMatchMultiline(e,i,r,n):this._doFindPreviousMatchLineByLine(e,i,r,n)}static _doFindPreviousMatchMultiline(e,t,i,n){const o=this._doFindMatchesMultiline(e,new L(1,1,t.lineNumber,t.column),i,n,10*Yq);if(o.length>0)return o[o.length-1];const r=e.getLineCount();return t.lineNumber!==r||t.column!==e.getLineMaxColumn(r)?this._doFindPreviousMatchMultiline(e,new H(r,e.getLineMaxColumn(r)),i,n):null}static _doFindPreviousMatchLineByLine(e,t,i,n){const o=e.getLineCount(),r=t.lineNumber,a=e.getLineContent(r).substring(0,t.column-1),l=this._findLastMatchInLine(i,a,r,n);if(l)return l;for(let c=1;c<=o;c++){const d=(o+r-c-1)%o,u=e.getLineContent(d+1),h=this._findLastMatchInLine(i,u,d+1,n);if(h)return h}return null}static _findLastMatchInLine(e,t,i,n){let o=null,r;for(e.reset(0);r=e.next(t);)o=ru(new L(i,r.index+1,i,r.index+1+r[0].length),r,n);return o}}function Qq(s,e,t,i,n){if(i===0)return!0;const o=e.charCodeAt(i-1);if(s.get(o)!==0||o===13||o===10)return!0;if(n>0){const r=e.charCodeAt(i);if(s.get(r)!==0)return!0}return!1}function Jq(s,e,t,i,n){if(i+n===t)return!0;const o=e.charCodeAt(i+n);if(s.get(o)!==0||o===13||o===10)return!0;if(n>0){const r=e.charCodeAt(i+n-1);if(s.get(r)!==0)return!0}return!1}function HN(s,e,t,i,n){return Qq(s,e,t,i,n)&&Jq(s,e,t,i,n)}class xf{constructor(e,t){this._wordSeparators=e,this._searchRegex=t,this._prevMatchStartIndex=-1,this._prevMatchLength=0}reset(e){this._searchRegex.lastIndex=e,this._prevMatchStartIndex=-1,this._prevMatchLength=0}next(e){const t=e.length;let i;do{if(this._prevMatchStartIndex+this._prevMatchLength===t||(i=this._searchRegex.exec(e),!i))return null;const n=i.index,o=i[0].length;if(n===this._prevMatchStartIndex&&o===this._prevMatchLength){if(o===0){n1(e,t,this._searchRegex.lastIndex)>65535?this._searchRegex.lastIndex+=2:this._searchRegex.lastIndex+=1;continue}return null}if(this._prevMatchStartIndex=n,this._prevMatchLength=o,!this._wordSeparators||HN(this._wordSeparators,e,t,n,o))return i}while(i);return null}}class zN{static computeUnicodeHighlights(e,t,i){const n=i?i.startLineNumber:1,o=i?i.endLineNumber:e.getLineCount(),r=new jR(t),a=r.getCandidateCodePoints();let l;a==="allNonBasicAscii"?l=new RegExp("[^\\t\\n\\r\\x20-\\x7E]","g"):l=new RegExp(`${eG(Array.from(a))}`,"g");const c=new xf(null,l),d=[];let u=!1,h,f=0,g=0,_=0;e:for(let b=n,v=o;b<=v;b++){const C=e.getLineContent(b),w=C.length;c.reset(0);do if(h=c.next(C),h){let S=h.index,D=h.index+h[0].length;if(S>0){const I=C.charCodeAt(S-1);Ui(I)&&S--}if(D+1<w){const I=C.charCodeAt(D-1);Ui(I)&&D++}const x=C.substring(S,D),y=b_(S+1,dN,C,0),k=r.shouldHighlightNonBasicASCII(x,y?y.word:null);if(k!==0){k===3?f++:k===2?g++:k===1?_++:Yw();const I=1e3;if(d.length>=I){u=!0;break e}d.push(new L(b,S+1,b,D+1))}}while(h)}return{ranges:d,hasMore:u,ambiguousCharacterCount:f,invisibleCharacterCount:g,nonBasicAsciiCharacterCount:_}}static computeUnicodeHighlightReason(e,t){const i=new jR(t);switch(i.shouldHighlightNonBasicASCII(e,null)){case 0:return null;case 2:return{kind:1};case 3:{const o=e.codePointAt(0),r=i.ambiguousCharacters.getPrimaryConfusable(o),a=lr.getLocales().filter(l=>!lr.getInstance(new Set([...t.allowedLocales,l])).isAmbiguous(o));return{kind:0,confusableWith:String.fromCodePoint(r),notAmbiguousInLocales:a}}case 1:return{kind:2}}}}function eG(s,e){return`[${ao(s.map(i=>String.fromCodePoint(i)).join(""))}]`}class jR{constructor(e){this.options=e,this.allowedCodePoints=new Set(e.allowedCodePoints),this.ambiguousCharacters=lr.getInstance(new Set(e.allowedLocales))}getCandidateCodePoints(){if(this.options.nonBasicASCII)return"allNonBasicAscii";const e=new Set;if(this.options.invisibleCharacters)for(const t of Oa.codePoints)KR(String.fromCodePoint(t))||e.add(t);if(this.options.ambiguousCharacters)for(const t of this.ambiguousCharacters.getConfusableCodePoints())e.add(t);for(const t of this.allowedCodePoints)e.delete(t);return e}shouldHighlightNonBasicASCII(e,t){const i=e.codePointAt(0);if(this.allowedCodePoints.has(i))return 0;if(this.options.nonBasicASCII)return 1;let n=!1,o=!1;if(t)for(const r of t){const a=r.codePointAt(0),l=tS(r);n=n||l,!l&&!this.ambiguousCharacters.isAmbiguous(a)&&!Oa.isInvisibleCharacter(a)&&(o=!0)}return!n
Line truncated
|
|
|
|
|
`||s===" "}var Kd=globalThis&&globalThis.__awaiter||function(s,e,t,i){function n(o){return o instanceof t?o:new t(function(r){r(o)})}return new(t||(t=Promise))(function(o,r){function a(d){try{c(i.next(d))}catch(u){r(u)}}function l(d){try{c(i.throw(d))}catch(u){r(u)}}function c(d){d.done?o(d.value):n(d.value).then(a,l)}c((i=i.apply(s,e||[])).next())})};class tG extends zq{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,t){const i=b_(e.column,y7(t),this._lines[e.lineNumber-1],0);return i?new L(e.lineNumber,i.startColumn,e.lineNumber,i.endColumn):null}words(e){const t=this._lines,i=this._wordenize.bind(this);let n=0,o="",r=0,a=[];return{*[Symbol.iterator](){for(;;)if(r<a.length){const l=o.substring(a[r].start,a[r].end);r+=1,yield l}else if(n<t.length)o=t[n],a=i(o,e),r=0,n+=1;else break}}}getLineWords(e,t){const i=this._lines[e-1],n=this._wordenize(i,t),o=[];for(const r of n)o.push({word:i.substring(r.start,r.end),startColumn:r.start+1,endColumn:r.end+1});return o}_wordenize(e,t){const i=[];let n;for(t.lastIndex=0;(n=t.exec(e))&&n[0].length!==0;)i.push({start:n.index,end:n.index+n[0].length});return i}getValueInRange(e){if(e=this._validateRange(e),e.startLineNumber===e.endLineNumber)return this._lines[e.startLineNumber-1].substring(e.startColumn-1,e.endColumn-1);const t=this._eol,i=e.startLineNumber-1,n=e.endLineNumber-1,o=[];o.push(this._lines[i].substring(e.startColumn-1));for(let r=i+1;r<n;r++)o.push(this._lines[r]);return o.push(this._lines[n].substring(0,e.endColumn-1)),o.join(t)}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();const t=this._lineStarts.getIndexOf(e),i=this._lines[t.index].length;return{lineNumber:1+t.index,column:1+Math.min(t.remainder,i)}}_validateRange(e){const t=this._validatePosition({lineNumber:e.startLineNumber,column:e.startColumn}),i=this._validatePosition({lineNumber:e.endLineNumber,column:e.endColumn});return t.lineNumber!==e.startLineNumber||t.column!==e.startColumn||i.lineNumber!==e.endLineNumber||i.column!==e.endColumn?{startLineNumber:t.lineNumber,startColumn:t.column,endLineNumber:i.lineNumber,endColumn:i.column}:e}_validatePosition(e){if(!H.isIPosition(e))throw new Error("bad position");let{lineNumber:t,column:i}=e,n=!1;if(t<1)t=1,i=1,n=!0;else if(t>this._lines.length)t=this._lines.length,i=this._lines[t-1].length+1,n=!0;else{const o=this._lines[t-1].length+1;i<1?(i=1,n=!0):i>o&&(i=o,n=!0)}return n?{lineNumber:t,column:i}:e}}class Gc{constructor(e,t){this._host=e,this._models=Object.create(null),this._foreignModuleFactory=t,this._foreignModule=null}dispose(){this._models=Object.create(null)}_getModel(e){return this._models[e]}_getModels(){const e=[];return Object.keys(this._models).forEach(t=>e.push(this._models[t])),e}acceptNewModel(e){this._models[e.url]=new tG(Ie.parse(e.url),e.lines,e.EOL,e.versionId)}acceptModelChanged(e,t){if(!this._models[e])return;this._models[e].onEvents(t)}acceptRemovedModel(e){!this._models[e]||delete this._models[e]}computeUnicodeHighlights(e,t,i){return Kd(this,void 0,void 0,function*(){const n=this._getModel(e);return n?zN.computeUnicodeHighlights(n,t,i):{ranges:[],hasMore:!1,ambiguousCharacterCount:0,invisibleCharacterCount:0,nonBasicAsciiCharacterCount:0}})}computeDiff(e,t,i,n){return Kd(this,void 0,void 0,function*(){const o=this._getModel(e),r=this._getModel(t);return!o||!r?null:Gc.computeDiff(o,r,i,n)})}static computeDiff(e,t,i,n){const o=e.getLinesContent(),r=t.getLinesContent(),l=new Wq(o,r,{shouldComputeCharChanges:!0,shouldPostProcessCharChanges:!0,shouldIgnoreTrimWhitespace:i,shouldMakePrettyDiff:!0,maxComputationTime:n}).computeDiff(),c=l.changes.length>0?!1:this._modelsAreIdentical(e,t);return{quitEarly:l.quitEarly,identical:c,changes:l.changes}}static _modelsAreIdentical(e,t){const i=e.getLineCount(),n=t.getLineCount();if(i!==n)return!1;for(let o=1;o<=i;o++){const r=e.getLineContent(o),a=t.getLineContent(o);if(r!==a)return!1}return!0}computeMoreMinimalEdits(e,t){return Kd(this,void 0,void 0,function*(){const i=this._getModel(e);if(!i)return t;const n=[];let o;t=t.slice(0).sort((r,a)=>{if(r.range&&a.range)return L.compareRangesUsingStarts(r.range,a.range);const l=r.range?0:1,c=a.range?0:1;return l-c});for(let{range:r,text:a,eol:l}of t){if(typeof l=="number"&&(o=l),L.isEmpty(r)&&!a)continue;const c=i.getValueInRange(r);if(a=a.replace(/\r\n|\n|\r/g,i.eol),c===a)continue;if(Math.max(a.length,c.length)>Gc._diffLimit){n.push({range:r,text:a});continue}const d=Oq(c,a,!1),u=i.offsetAt(L.lift(r).getStartPosition());for(const h of d){const f=i.positionAt(u+h.originalStart),g=i.positionAt(u+h.originalStart+h.originalLength),_={text:a.substr(h.modifiedStart,h.modifiedLength),range:{startLineNumber:f.lineNum
Line truncated
|
|
|
|
|
`:e,l=a.length;let c=i.embeddedLanguageData,d=i.stack,u=0,h=null,f=!0;for(;f||u<l;){const g=u,_=d.depth,b=h?h.groups.length:0,v=d.state;let C=null,w=null,S=null,D=null,x=null;if(h){C=h.matches;const I=h.groups.shift();w=I.matched,S=I.action,D=h.rule,h.groups.length===0&&(h=null)}else{if(!f&&u>=l)break;f=!1;let I=this._lexer.tokenizer[v];if(!I&&(I=U0(this._lexer,v),!I))throw $t(this._lexer,"tokenizer state is not defined: "+v);const R=a.substr(u);for(const P of I)if((u===0||!P.matchOnlyAtLineStart)&&(C=R.match(P.regex),C)){w=C[0],S=P.action;break}}if(C||(C=[""],w=""),S||(u<l&&(C=[a.charAt(u)],w=C[0]),S=this._lexer.defaultToken),w===null)break;for(u+=w.length;DG(S)&&QR(S)&&S.test;)S=S.test(w,C,v,u===l);let y=null;if(typeof S=="string"||Array.isArray(S))y=S;else if(S.group)y=S.group;else if(S.token!==null&&S.token!==void 0){if(S.tokenSubst?y=xc(this._lexer,S.token,w,C,v):y=S.token,S.nextEmbedded)if(S.nextEmbedded==="@pop"){if(!c)throw $t(this._lexer,"cannot pop embedded language if not inside one");c=null}else{if(c)throw $t(this._lexer,"cannot enter embedded language from within an embedded language");x=xc(this._lexer,S.nextEmbedded,w,C,v)}if(S.goBack&&(u=Math.max(0,u-S.goBack)),S.switchTo&&typeof S.switchTo=="string"){let I=xc(this._lexer,S.switchTo,w,C,v);if(I[0]==="@"&&(I=I.substr(1)),U0(this._lexer,I))d=d.switchTo(I);else throw $t(this._lexer,"trying to switch to a state '"+I+"' that is undefined in rule: "+this._safeRuleName(D))}else{if(S.transform&&typeof S.transform=="function")throw $t(this._lexer,"action.transform not supported");if(S.next)if(S.next==="@push"){if(d.depth>=this._lexer.maxStack)throw $t(this._lexer,"maximum tokenizer stack size reached: ["+d.state+","+d.parent.state+",...]");d=d.push(v)}else if(S.next==="@pop"){if(d.depth<=1)throw $t(this._lexer,"trying to pop an empty stack in rule: "+this._safeRuleName(D));d=d.pop()}else if(S.next==="@popall")d=d.popall();else{let I=xc(this._lexer,S.next,w,C,v);if(I[0]==="@"&&(I=I.substr(1)),U0(this._lexer,I))d=d.push(I);else throw $t(this._lexer,"trying to set a next state '"+I+"' that is undefined in rule: "+this._safeRuleName(D))}}S.log&&typeof S.log=="string"&&xG(this._lexer,this._lexer.languageId+": "+xc(this._lexer,S.log,w,C,v))}if(y===null)throw $t(this._lexer,"lexer rule has no well-defined action in rule: "+this._safeRuleName(D));const k=I=>{const R=this._languageService.getLanguageIdByLanguageName(I)||this._languageService.getLanguageIdByMimeType(I)||I,P=this._getNestedEmbeddedLanguageData(R);if(u<l){const j=e.substr(u);return this._nestedTokenize(j,t,Ec.create(d,P),n+u,o)}else return Ec.create(d,P)};if(Array.isArray(y)){if(h&&h.groups.length>0)throw $t(this._lexer,"groups cannot be nested: "+this._safeRuleName(D));if(C.length!==y.length+1)throw $t(this._lexer,"matched number of groups does not match the number of actions in rule: "+this._safeRuleName(D));let I=0;for(let R=1;R<C.length;R++)I+=C[R].length;if(I!==w.length)throw $t(this._lexer,"with groups, all characters should be matched in consecutive groups in rule: "+this._safeRuleName(D));h={rule:D,matches:C,groups:[]};for(let R=0;R<y.length;R++)h.groups[R]={action:y[R],matched:C[R+1]};u-=w.length;continue}else{if(y==="@rematch"&&(u-=w.length,w="",C=null,y="",x!==null))return k(x);if(w.length===0){if(l===0||_!==d.depth||v!==d.state||(h?h.groups.length:0)!==b)continue;throw $t(this._lexer,"no progress in tokenizer in rule: "+this._safeRuleName(D))}let I=null;if(M3(y)&&y.indexOf("@brackets")===0){const R=y.substr(9),P=AG(this._lexer,w);if(!P)throw $t(this._lexer,"@brackets token returned but no bracket defined as: "+w);I=JR(P.token+R)}else{const R=y===""?"":y+this._lexer.tokenPostfix;I=JR(R)}g<r&&o.emit(g+n,I)}if(x!==null)return k(x)}return Ec.create(d,c)}_getNestedEmbeddedLanguageData(e){if(!this._languageService.isRegisteredLanguageId(e))return new Ef(e,Ig);e!==this._languageId&&(ni.getOrCreate(e),this._embeddedLanguages[e]=!0);const t=ni.get(e);return t?new Ef(e,t.getInitialState()):new Ef(e,Ig)}};N_=IG([TG(4,_t)],N_);function AG(s,e){if(!e)return null;e=Zc(s,e);const t=s.brackets;for(const i of t){if(i.open===e)return{token:i.token,bracketType:1};if(i.close===e)return{token:i.token,bracketType:-1}}return null}var MG=globalThis&&globalThis.__awaiter||function(s,e,t,i){function n(o){return o instanceof t?o:new t(function(r){r(o)})}return new(t||(t=Promise))(function(o,r){function a(d){try{c(i.next(d))}catch(u){r(u)}}function l(d){try{c(i.throw(d))}catch(u){r(u)}}function c(d){d.done?o(d.value):n(d.value).then(a,l)}c((i=i.apply(s,e||[])).next())})},bL;const vL=(bL=window.trustedTypes)===null||bL===void 0?void 0:bL.createPolicy("standaloneColorizer",{createHTML:s=>s});class qN{static colorizeElement(e,t,i,n){n=n||{};const o=n.theme||"vs",r=n.mimeType||i.getAttribute("lang")||i.getAttribute("data-lang");if(!r)return console.error("Mode not detected"),Promise.resolve();const a=t.getLanguageIdByMimeType(r)||r;e.setTheme(o);const l=i.firstChild?i.firstChild.nodeValue:"";i.className+=" "+o;cons
Line truncated
|
|
|
|
|
`)}}const kS=new eY;ai.add(h9.ColorContribution,kS);function tY(s){return s===null||typeof s.hcLight>"u"&&(s.hcDark===null||typeof s.hcDark=="string"?s.hcLight=s.hcDark:s.hcLight=s.light),s}function A(s,e,t,i,n){return kS.registerColor(s,tY(e),t,i,n)}const te=A("foreground",{dark:"#CCCCCC",light:"#616161",hcDark:"#FFFFFF",hcLight:"#292929"},p("foreground","Overall foreground color. This color is only used if not overridden by a component."));A("disabledForeground",{dark:"#CCCCCC80",light:"#61616180",hcDark:"#A5A5A5",hcLight:"#7F7F7F"},p("disabledForeground","Overall foreground for disabled elements. This color is only used if not overridden by a component."));const iY=A("errorForeground",{dark:"#F48771",light:"#A1260D",hcDark:"#F48771",hcLight:"#B5200D"},p("errorForeground","Overall foreground color for error messages. This color is only used if not overridden by a component."));A("descriptionForeground",{light:"#717171",dark:De(te,.7),hcDark:De(te,.7),hcLight:De(te,.7)},p("descriptionForeground","Foreground color for description text providing additional information, for example for a label."));const q0=A("icon.foreground",{dark:"#C5C5C5",light:"#424242",hcDark:"#FFFFFF",hcLight:"#292929"},p("iconForeground","The default color for icons in the workbench.")),Eo=A("focusBorder",{dark:"#007FD4",light:"#0090F1",hcDark:"#F38518",hcLight:"#0F4A85"},p("focusBorder","Overall border color for focused elements. This color is only used if not overridden by a component.")),Ye=A("contrastBorder",{light:null,dark:null,hcDark:"#6FC3DF",hcLight:"#0F4A85"},p("contrastBorder","An extra border around elements to separate them from others for greater contrast.")),Jt=A("contrastActiveBorder",{light:null,dark:null,hcDark:Eo,hcLight:Eo},p("activeContrastBorder","An extra border around active elements to separate them from others for greater contrast."));A("selection.background",{light:null,dark:null,hcDark:null,hcLight:null},p("selectionBackground","The background color of text selections in the workbench (e.g. for input fields or text areas). Note that this does not apply to selections within the editor."));A("textSeparator.foreground",{light:"#0000002e",dark:"#ffffff2e",hcDark:$.black,hcLight:"#292929"},p("textSeparatorForeground","Color for text separators."));const DS=A("textLink.foreground",{light:"#006AB1",dark:"#3794FF",hcDark:"#3794FF",hcLight:"#0F4A85"},p("textLinkForeground","Foreground color for links in text.")),xS=A("textLink.activeForeground",{light:"#006AB1",dark:"#3794FF",hcDark:"#3794FF",hcLight:"#0F4A85"},p("textLinkActiveForeground","Foreground color for links in text when clicked on and on mouse hover."));A("textPreformat.foreground",{light:"#A31515",dark:"#D7BA7D",hcDark:"#D7BA7D",hcLight:"#292929"},p("textPreformatForeground","Foreground color for preformatted text segments."));A("textBlockQuote.background",{light:"#7f7f7f1a",dark:"#7f7f7f1a",hcDark:null,hcLight:"#F2F2F2"},p("textBlockQuoteBackground","Background color for block quotes in text."));A("textBlockQuote.border",{light:"#007acc80",dark:"#007acc80",hcDark:$.white,hcLight:"#292929"},p("textBlockQuoteBorder","Border color for block quotes in text."));const f9=A("textCodeBlock.background",{light:"#dcdcdc66",dark:"#0a0a0a66",hcDark:$.black,hcLight:"#F2F2F2"},p("textCodeBlockBackground","Background color for code blocks in text.")),Er=A("widget.shadow",{dark:De($.black,.36),light:De($.black,.16),hcDark:null,hcLight:null},p("widgetShadow","Shadow color of widgets such as find/replace inside the editor.")),ES=A("input.background",{dark:"#3C3C3C",light:$.white,hcDark:$.black,hcLight:$.white},p("inputBoxBackground","Input box background.")),IS=A("input.foreground",{dark:te,light:te,hcDark:te,hcLight:te},p("inputBoxForeground","Input box foreground.")),TS=A("input.border",{dark:null,light:null,hcDark:Ye,hcLight:Ye},p("inputBoxBorder","Input box border.")),C1=A("inputOption.activeBorder",{dark:"#007ACC00",light:"#007ACC00",hcDark:Ye,hcLight:Ye},p("inputBoxActiveOptionBorder","Border color of activated options in input fields."));A("inputOption.hoverBackground",{dark:"#5a5d5e80",light:"#b8b8b850",hcDark:null,hcLight:null},p("inputOption.hoverBackground","Background color of activated options in input fields."));const w1=A("inputOption.activeBackground",{dark:De(Eo,.4),light:De(Eo,.2),hcDark:$.transparent,hcLight:$.transparent},p("inputOption.activeBackground","Background hover color of options in input fields.")),S1=A("inputOption.activeForeground",{dark:$.white,light:$.black,hcDark:null,hcLight:te},p("inputOption.activeForeground","Foreground color of activated options in input fields."));A("input.placeholderForeground",{light:De(te,.5),dark:De(te,.5),hcDark:De(te,.7),hcLight:De(te,.7)},p("inputPlaceholderForeground","Input box foreground color for placeholder text."));const JN=A("inputValidation.infoBackground",{dark:"#063B49",light:"#D6ECF2",hcDark:$.black,hcLight:$.white},p("inputValidationInfoBackground","Input validation background color for informatio
Line truncated
|
|
|
|
|
${MX(n)}: ${r};`}return i+=`
|
|
|
|
|
}`,i}dispose(){this._styleElement.remove()}increaseRefCount(){this._referenceCount++}decreaseRefCount(){this._referenceCount--}hasReferences(){return this._referenceCount>0}}function MX(s){return s.replace(/(^[A-Z])/,([e])=>e.toLowerCase()).replace(/([A-Z])/g,([e])=>`-${e.toLowerCase()}`)}class Qb extends q{constructor(){super(),this._shouldRender=!0}shouldRender(){return this._shouldRender}forceShouldRender(){this._shouldRender=!0}setShouldRender(){this._shouldRender=!0}onDidRender(){this._shouldRender=!1}onCompositionStart(e){return!1}onCompositionEnd(e){return!1}onConfigurationChanged(e){return!1}onCursorStateChanged(e){return!1}onDecorationsChanged(e){return!1}onFlushed(e){return!1}onFocusChanged(e){return!1}onLanguageConfigurationChanged(e){return!1}onLineMappingChanged(e){return!1}onLinesChanged(e){return!1}onLinesDeleted(e){return!1}onLinesInserted(e){return!1}onRevealRangeRequest(e){return!1}onScrollChanged(e){return!1}onThemeChanged(e){return!1}onTokensChanged(e){return!1}onTokensColorsChanged(e){return!1}onZonesChanged(e){return!1}handleEvents(e){let t=!1;for(let i=0,n=e.length;i<n;i++){const o=e[i];switch(o.type){case 0:this.onCompositionStart(o)&&(t=!0);break;case 1:this.onCompositionEnd(o)&&(t=!0);break;case 2:this.onConfigurationChanged(o)&&(t=!0);break;case 3:this.onCursorStateChanged(o)&&(t=!0);break;case 4:this.onDecorationsChanged(o)&&(t=!0);break;case 5:this.onFlushed(o)&&(t=!0);break;case 6:this.onFocusChanged(o)&&(t=!0);break;case 7:this.onLanguageConfigurationChanged(o)&&(t=!0);break;case 8:this.onLineMappingChanged(o)&&(t=!0);break;case 9:this.onLinesChanged(o)&&(t=!0);break;case 10:this.onLinesDeleted(o)&&(t=!0);break;case 11:this.onLinesInserted(o)&&(t=!0);break;case 12:this.onRevealRangeRequest(o)&&(t=!0);break;case 13:this.onScrollChanged(o)&&(t=!0);break;case 15:this.onTokensChanged(o)&&(t=!0);break;case 14:this.onThemeChanged(o)&&(t=!0);break;case 16:this.onTokensColorsChanged(o)&&(t=!0);break;case 17:this.onZonesChanged(o)&&(t=!0);break;default:console.info("View received unknown event: "),console.info(o)}}t&&(this._shouldRender=!0)}}class fo extends Qb{constructor(e){super(),this._context=e,this._context.addEventHandler(this)}dispose(){this._context.removeEventHandler(this),super.dispose()}}class Ha{static write(e,t){e.setAttribute("data-mprt",String(t))}static read(e){const t=e.getAttribute("data-mprt");return t===null?0:parseInt(t,10)}static collect(e,t){const i=[];let n=0;for(;e&&e!==document.body&&e!==t;)e.nodeType===e.ELEMENT_NODE&&(i[n++]=this.read(e)),e=e.parentElement;const o=new Uint8Array(n);for(let r=0;r<n;r++)o[r]=i[n-r-1];return o}}class RX{constructor(e,t){this._restrictedRenderingContextBrand=void 0,this._viewLayout=e,this.viewportData=t,this.scrollWidth=this._viewLayout.getScrollWidth(),this.scrollHeight=this._viewLayout.getScrollHeight(),this.visibleRange=this.viewportData.visibleRange,this.bigNumbersDelta=this.viewportData.bigNumbersDelta;const i=this._viewLayout.getCurrentViewport();this.scrollTop=i.top,this.scrollLeft=i.left,this.viewportWidth=i.width,this.viewportHeight=i.height}getScrolledTopFromAbsoluteTop(e){return e-this.scrollTop}getVerticalOffsetForLineNumber(e){return this._viewLayout.getVerticalOffsetForLineNumber(e)}getDecorationsInViewport(){return this.viewportData.getDecorationsInViewport()}}class OX extends RX{constructor(e,t,i){super(e,t),this._renderingContextBrand=void 0,this._viewLines=i}linesVisibleRangesForRange(e,t){return this._viewLines.linesVisibleRangesForRange(e,t)}visibleRangeForPosition(e){return this._viewLines.visibleRangeForPosition(e)}}class PX{constructor(e,t,i){this.outsideRenderedLine=e,this.lineNumber=t,this.ranges=i}}class AS{constructor(e,t){this._horizontalRangeBrand=void 0,this.left=Math.round(e),this.width=Math.round(t)}static from(e){const t=new Array(e.length);for(let i=0,n=e.length;i<n;i++){const o=e[i];t[i]=new AS(o.left,o.width)}return t}toString(){return`[${this.left},${this.width}]`}}class ng{constructor(e,t){this._floatHorizontalRangeBrand=void 0,this.left=e,this.width=t}toString(){return`[${this.left},${this.width}]`}static compare(e,t){return e.left-t.left}}class FX{constructor(e,t){this.outsideRenderedLine=e,this.originalLeft=t,this.left=Math.round(this.originalLeft)}}class BX{constructor(e,t){this.outsideRenderedLine=e,this.ranges=t}}class TL{static _createRange(){return this._handyReadyRange||(this._handyReadyRange=document.createRange()),this._handyReadyRange}static _detachRange(e,t){e.selectNodeContents(t)}static _readClientRects(e,t,i,n,o){const r=this._createRange();try{return r.setStart(e,t),r.setEnd(i,n),r.getClientRects()}catch{return null}finally{this._detachRange(r,o)}}static _mergeAdjacentRanges(e){if(e.length===1)return e;e.sort(ng.compare);const t=[];let i=0,n=e[0];for(let o=1,r=e.length;o<r;o++){const a=e[o];n.left+n.width+.9>=a.left?n.width=Math.max(n.width,a.left+a.width-n.left):(t[i++]=n,n=a)}return t[i++]=n,t}static _createHorizontalRangesFromClientRects(e,t,i){if(!e||e.length===0)retur
Line truncated
|
|
|
|
|
target: ${this.target?this.target.outerHTML:null}`}_getMouseColumn(e=null){return e&&e.column<this._ctx.viewModel.getLineMaxColumn(e.lineNumber)?Wi.visibleColumnFromColumn(this._ctx.viewModel.getLineContent(e.lineNumber),e.column,this._ctx.viewModel.model.getOptions().tabSize)+1:this.mouseColumn}fulfillUnknown(e=null){return ds.createUnknown(this.target,this._getMouseColumn(e),e)}fulfillTextarea(){return ds.createTextarea(this.target,this._getMouseColumn())}fulfillMargin(e,t,i,n){return ds.createMargin(e,this.target,this._getMouseColumn(t),t,i,n)}fulfillViewZone(e,t,i){return ds.createViewZone(e,this.target,this._getMouseColumn(t),t,i)}fulfillContentText(e,t,i){return ds.createContentText(this.target,this._getMouseColumn(e),e,t,i)}fulfillContentEmpty(e,t){return ds.createContentEmpty(this.target,this._getMouseColumn(e),e,t)}fulfillContentWidget(e){return ds.createContentWidget(this.target,this._getMouseColumn(),e)}fulfillScrollbar(e){return ds.createScrollbar(this.target,this._getMouseColumn(e),e)}fulfillOverlayWidget(e){return ds.createOverlayWidget(this.target,this._getMouseColumn(),e)}withTarget(e){return new p2(this._ctx,this.editorPos,this.pos,this.relativePos,e)}}const EO={isAfterLines:!0};function NL(s){return{isAfterLines:!1,horizontalDistanceToText:s}}class Sn{constructor(e,t){this._context=e,this._viewHelper=t}mouseTargetIsWidget(e){const t=e.target,i=Ha.collect(t,this._viewHelper.viewDomNode);return!!(qo.isChildOfContentWidgets(i)||qo.isChildOfOverflowingContentWidgets(i)||qo.isChildOfOverlayWidgets(i))}createMouseTarget(e,t,i,n,o){const r=new Pg(this._context,this._viewHelper,e),a=new p2(r,t,i,n,o);try{return Sn._createMouseTarget(r,a,!1)}catch{return a.fulfillUnknown()}}static _createMouseTarget(e,t,i){if(t.target===null){if(i)return t.fulfillUnknown();const r=Sn._doHitTest(e,t);return r.type===1?Sn.createMouseTargetFromHitTestPosition(e,t,r.spanNode,r.position,r.injectedText):this._createMouseTarget(e,t.withTarget(r.hitTarget),!0)}const n=t;let o=null;return o=o||Sn._hitTestContentWidget(e,n),o=o||Sn._hitTestOverlayWidget(e,n),o=o||Sn._hitTestMinimap(e,n),o=o||Sn._hitTestScrollbarSlider(e,n),o=o||Sn._hitTestViewZone(e,n),o=o||Sn._hitTestMargin(e,n),o=o||Sn._hitTestViewCursor(e,n),o=o||Sn._hitTestTextArea(e,n),o=o||Sn._hitTestViewLines(e,n,i),o=o||Sn._hitTestScrollbar(e,n),o||t.fulfillUnknown()}static _hitTestContentWidget(e,t){if(qo.isChildOfContentWidgets(t.targetPath)||qo.isChildOfOverflowingContentWidgets(t.targetPath)){const i=e.findAttribute(t.target,"widgetId");return i?t.fulfillContentWidget(i):t.fulfillUnknown()}return null}static _hitTestOverlayWidget(e,t){if(qo.isChildOfOverlayWidgets(t.targetPath)){const i=e.findAttribute(t.target,"widgetId");return i?t.fulfillOverlayWidget(i):t.fulfillUnknown()}return null}static _hitTestViewCursor(e,t){if(t.target){const i=e.lastRenderData.lastViewCursorsRenderData;for(const n of i)if(t.target===n.domNode)return t.fulfillContentText(n.position,null,{mightBeForeignElement:!1,injectedText:null})}if(t.isInContentArea){const i=e.lastRenderData.lastViewCursorsRenderData,n=t.mouseContentHorizontalOffset,o=t.mouseVerticalOffset;for(const r of i){if(n<r.contentLeft||n>r.contentLeft+r.width)continue;const a=e.getVerticalOffsetForLineNumber(r.position.lineNumber);if(a<=o&&o<=a+r.height)return t.fulfillContentText(r.position,null,{mightBeForeignElement:!1,injectedText:null})}}return null}static _hitTestViewZone(e,t){const i=e.getZoneAtCoord(t.mouseVerticalOffset);if(i){const n=t.isInContentArea?8:5;return t.fulfillViewZone(n,i.position,i)}return null}static _hitTestTextArea(e,t){return qo.isTextArea(t.targetPath)?e.lastRenderData.lastTextareaPosition?t.fulfillContentText(e.lastRenderData.lastTextareaPosition,null,{mightBeForeignElement:!1,injectedText:null}):t.fulfillTextarea():null}static _hitTestMargin(e,t){if(t.isInMarginArea){const i=e.getFullLineRangeAtCoord(t.mouseVerticalOffset),n=i.range.getStartPosition();let o=Math.abs(t.relativePos.x);const r={isAfterLines:i.isAfterLines,glyphMarginLeft:e.layoutInfo.glyphMarginLeft,glyphMarginWidth:e.layoutInfo.glyphMarginWidth,lineNumbersWidth:e.layoutInfo.lineNumbersWidth,offsetX:o};return o-=e.layoutInfo.glyphMarginLeft,o<=e.layoutInfo.glyphMarginWidth?t.fulfillMargin(2,n,i.range,r):(o-=e.layoutInfo.glyphMarginWidth,o<=e.layoutInfo.lineNumbersWidth?t.fulfillMargin(3,n,i.range,r):(o-=e.layoutInfo.lineNumbersWidth,t.fulfillMargin(4,n,i.range,r)))}return null}static _hitTestViewLines(e,t,i){if(!qo.isChildOfViewLines(t.targetPath))return null;if(e.isInTopPadding(t.mouseVerticalOffset))return t.fulfillContentEmpty(new H(1,1),EO);if(e.isAfterLines(t.mouseVerticalOffset)||e.isInBottomPadding(t.mouseVerticalOffset)){const o=e.viewModel.getLineCount(),r=e.viewModel.getLineMaxColumn(o);return t.fulfillContentEmpty(new H(o,r),EO)}if(i){if(qo.isStrictChildOfViewLines(t.targetPath)){const o=e.getLineNumberAtVerticalOffset(t.mouseVerticalOffset);if(e.viewModel.getLineLength(o)===0){const a=e.getLineWidth(o),l=NL(t.mouseCon
Line truncated
|
|
|
|
|
`,o+1))!==-1;)n++;return[e,i*t.length,n]}static deduceInput(e,t,i){if(!e)return{text:"",replacePrevCharCnt:0,replaceNextCharCnt:0,positionDelta:0};const n=Math.min(Gu(e.value,t.value),e.selectionStart,t.selectionStart),o=Math.min(L_(e.value,t.value),e.value.length-e.selectionEnd,t.value.length-t.selectionEnd);e.value.substring(n,e.value.length-o);const r=t.value.substring(n,t.value.length-o),a=e.selectionStart-n,l=e.selectionEnd-n,c=t.selectionStart-n,d=t.selectionEnd-n;if(c===d){const h=e.selectionStart-n;return{text:r,replacePrevCharCnt:h,replaceNextCharCnt:0,positionDelta:0}}const u=l-a;return{text:r,replacePrevCharCnt:u,replaceNextCharCnt:0,positionDelta:0}}static deduceAndroidCompositionInput(e,t){if(!e)return{text:"",replacePrevCharCnt:0,replaceNextCharCnt:0,positionDelta:0};if(e.value===t.value)return{text:"",replacePrevCharCnt:0,replaceNextCharCnt:0,positionDelta:t.selectionEnd-e.selectionEnd};const i=Math.min(Gu(e.value,t.value),e.selectionEnd),n=Math.min(L_(e.value,t.value),e.value.length-e.selectionEnd),o=e.value.substring(i,e.value.length-n),r=t.value.substring(i,t.value.length-n);e.selectionStart-i;const a=e.selectionEnd-i;t.selectionStart-i;const l=t.selectionEnd-i;return{text:r,replacePrevCharCnt:a,replaceNextCharCnt:o.length-a,positionDelta:l-r.length}}}hn.EMPTY=new hn("",0,0,null,null);class Pf{static _getPageOfLine(e,t){return Math.floor((e-1)/t)}static _getRangeForPage(e,t){const i=e*t,n=i+1,o=i+t;return new L(n,1,o+1,1)}static fromEditorSelection(e,t,i,n,o){const r=Pf._getPageOfLine(i.startLineNumber,n),a=Pf._getRangeForPage(r,n),l=Pf._getPageOfLine(i.endLineNumber,n),c=Pf._getRangeForPage(l,n),d=a.intersectRanges(new L(1,1,i.startLineNumber,i.startColumn));let u=t.getValueInRange(d,1);const h=t.getLineCount(),f=t.getLineMaxColumn(h),g=c.intersectRanges(new L(i.endLineNumber,i.endColumn,h,f));let _=t.getValueInRange(g,1),b;if(r===l||r+1===l)b=t.getValueInRange(i,1);else{const v=a.intersectRanges(i),C=c.intersectRanges(i);b=t.getValueInRange(v,1)+String.fromCharCode(8230)+t.getValueInRange(C,1)}return o&&(u.length>500&&(u=u.substring(u.length-500,u.length)),_.length>500&&(_=_.substring(0,500)),b.length>2*500&&(b=b.substring(0,500)+String.fromCharCode(8230)+b.substring(b.length-500,b.length))),new hn(u+b+_,u.length,u.length+b.length,new H(i.startLineNumber,i.startColumn),new H(i.endLineNumber,i.endColumn))}}var L1;(function(s){s.Tap="-monaco-textarea-synthetic-tap"})(L1||(L1={}));const qx={forceCopyWithSyntaxHighlighting:!1};class H_{constructor(){this._lastState=null}set(e,t){this._lastState={lastCopiedValue:e,data:t}}get(e){return this._lastState&&this._lastState.lastCopiedValue===e?this._lastState.data:(this._lastState=null,null)}}H_.INSTANCE=new H_;class qX{constructor(){this._lastTypeTextLength=0}handleCompositionUpdate(e){e=e||"";const t={text:e,replacePrevCharCnt:this._lastTypeTextLength,replaceNextCharCnt:0,positionDelta:0};return this._lastTypeTextLength=e.length,t}}class GX extends q{constructor(e,t,i,n){super(),this._host=e,this._textArea=t,this._OS=i,this._browser=n,this._onFocus=this._register(new W),this.onFocus=this._onFocus.event,this._onBlur=this._register(new W),this.onBlur=this._onBlur.event,this._onKeyDown=this._register(new W),this.onKeyDown=this._onKeyDown.event,this._onKeyUp=this._register(new W),this.onKeyUp=this._onKeyUp.event,this._onCut=this._register(new W),this.onCut=this._onCut.event,this._onPaste=this._register(new W),this.onPaste=this._onPaste.event,this._onType=this._register(new W),this.onType=this._onType.event,this._onCompositionStart=this._register(new W),this.onCompositionStart=this._onCompositionStart.event,this._onCompositionUpdate=this._register(new W),this.onCompositionUpdate=this._onCompositionUpdate.event,this._onCompositionEnd=this._register(new W),this.onCompositionEnd=this._onCompositionEnd.event,this._onSelectionChangeRequest=this._register(new W),this.onSelectionChangeRequest=this._onSelectionChangeRequest.event,this._asyncTriggerCut=this._register(new At(()=>this._onCut.fire(),0)),this._asyncFocusGainWriteScreenReaderContent=this._register(new At(()=>this.writeScreenReaderContent("asyncFocusGain"),0)),this._textAreaState=hn.EMPTY,this._selectionChangeListener=null,this.writeScreenReaderContent("ctor"),this._hasFocus=!1,this._currentComposition=null;let o=null;this._register(this._textArea.onKeyDown(r=>{const a=new Qt(r);(a.keyCode===109||this._currentComposition&&a.keyCode===1)&&a.stopPropagation(),a.equals(9)&&a.preventDefault(),o=a,this._onKeyDown.fire(a)})),this._register(this._textArea.onKeyUp(r=>{const a=new Qt(r);this._onKeyUp.fire(a)})),this._register(this._textArea.onCompositionStart(r=>{const a=new qX;if(this._currentComposition){this._currentComposition=a;return}if(this._currentComposition=a,this._OS===2&&o&&o.equals(109)&&this._textAreaState.selectionStart===this._textAreaState.selectionEnd&&this._textAreaState.selectionStart>0&&this._textAreaState.value.substr(this._textAreaState.selectionStart-1,1)===r.data&&(o.code==="ArrowRi
Line truncated
|
|
|
|
|
`):t.text,i),e.preventDefault(),e.clipboardData&&IO.setTextData(e.clipboardData,t.text,t.html,i)}}class IO{static getTextData(e){const t=e.getData(vs.text);let i=null;const n=e.getData("vscode-editor-data");if(typeof n=="string")try{i=JSON.parse(n),i.version!==1&&(i=null)}catch{}return t.length===0&&i===null&&e.files.length>0?[Array.prototype.slice.call(e.files,0).map(r=>r.name).join(`
|
|
|
|
|
`),null]:[t,i]}static setTextData(e,t,i,n){e.setData(vs.text,t),typeof i=="string"&&e.setData("text/html",i),e.setData("vscode-editor-data",JSON.stringify(n))}}class ZX extends q{constructor(e){super(),this._actual=e,this.onKeyDown=this._register(fr(this._actual,"keydown")).event,this.onKeyUp=this._register(fr(this._actual,"keyup")).event,this.onCompositionStart=this._register(fr(this._actual,"compositionstart")).event,this.onCompositionUpdate=this._register(fr(this._actual,"compositionupdate")).event,this.onCompositionEnd=this._register(fr(this._actual,"compositionend")).event,this.onInput=this._register(fr(this._actual,"input")).event,this.onCut=this._register(fr(this._actual,"cut")).event,this.onCopy=this._register(fr(this._actual,"copy")).event,this.onPaste=this._register(fr(this._actual,"paste")).event,this.onFocus=this._register(fr(this._actual,"focus")).event,this.onBlur=this._register(fr(this._actual,"blur")).event,this._onSyntheticTap=this._register(new W),this.onSyntheticTap=this._onSyntheticTap.event,this._ignoreSelectionChangeTime=0,this._register(Q(this._actual,L1.Tap,()=>this._onSyntheticTap.fire()))}hasFocus(){const e=Qu(this._actual);return e?e.activeElement===this._actual:ZN(this._actual)?document.activeElement===this._actual:!1}setIgnoreSelectionChangeTime(e){this._ignoreSelectionChangeTime=Date.now()}getIgnoreSelectionChangeTime(){return this._ignoreSelectionChangeTime}resetSelectionChangeTime(){this._ignoreSelectionChangeTime=0}getValue(){return this._actual.value}setValue(e,t){const i=this._actual;i.value!==t&&(this.setIgnoreSelectionChangeTime("setValue"),i.value=t)}getSelectionStart(){return this._actual.selectionDirection==="backward"?this._actual.selectionEnd:this._actual.selectionStart}getSelectionEnd(){return this._actual.selectionDirection==="backward"?this._actual.selectionStart:this._actual.selectionEnd}setSelectionRange(e,t,i){const n=this._actual;let o=null;const r=Qu(n);r?o=r.activeElement:o=document.activeElement;const a=o===n,l=n.selectionStart,c=n.selectionEnd;if(a&&l===t&&c===i){lo&&window.parent!==window&&n.focus();return}if(a){this.setIgnoreSelectionChangeTime("setSelectionRange"),n.setSelectionRange(t,i),lo&&window.parent!==window&&n.focus();return}try{const d=yZ(n);this.setIgnoreSelectionChangeTime("setSelectionRange"),n.focus(),n.setSelectionRange(t,i),LZ(n,d)}catch{}}}class YX extends m2{constructor(e,t,i){super(e,t,i),this._register(Tt.addTarget(this.viewHelper.linesContentDomNode)),this._register(Q(this.viewHelper.linesContentDomNode,jt.Tap,o=>this.onTap(o))),this._register(Q(this.viewHelper.linesContentDomNode,jt.Change,o=>this.onChange(o))),this._register(Q(this.viewHelper.linesContentDomNode,jt.Contextmenu,o=>this._onContextMenu(new fd(o,!1,this.viewHelper.viewDomNode),!1))),this._lastPointerType="mouse",this._register(Q(this.viewHelper.linesContentDomNode,"pointerdown",o=>{const r=o.pointerType;if(r==="mouse"){this._lastPointerType="mouse";return}else r==="touch"?this._lastPointerType="touch":this._lastPointerType="pen"}));const n=new TX(this.viewHelper.viewDomNode);this._register(n.onPointerMove(this.viewHelper.viewDomNode,o=>this._onMouseMove(o))),this._register(n.onPointerUp(this.viewHelper.viewDomNode,o=>this._onMouseUp(o))),this._register(n.onPointerLeave(this.viewHelper.viewDomNode,o=>this._onMouseLeave(o))),this._register(n.onPointerDown(this.viewHelper.viewDomNode,(o,r)=>this._onMouseDown(o,r)))}onTap(e){if(!e.initialTarget||!this.viewHelper.linesContentDomNode.contains(e.initialTarget))return;e.preventDefault(),this.viewHelper.focusTextArea();const t=this._createMouseTarget(new fd(e,!1,this.viewHelper.viewDomNode),!1);t.position&&this.viewController.dispatchMouse({position:t.position,mouseColumn:t.position.column,startedOnLineNumbers:!1,mouseDownCount:e.tapCount,inSelectionMode:!1,altKey:!1,ctrlKey:!1,metaKey:!1,shiftKey:!1,leftButton:!1,middleButton:!1,onInjectedText:t.type===6&&t.detail.injectedText!==null})}onChange(e){this._lastPointerType==="touch"&&this._context.viewModel.viewLayout.deltaScrollNow(-e.translationX,-e.translationY)}_onMouseDown(e,t){e.browserEvent.pointerType!=="touch"&&super._onMouseDown(e,t)}}class XX extends m2{constructor(e,t,i){super(e,t,i),this._register(Tt.addTarget(this.viewHelper.linesContentDomNode)),this._register(Q(this.viewHelper.linesContentDomNode,jt.Tap,n=>this.onTap(n))),this._register(Q(this.viewHelper.linesContentDomNode,jt.Change,n=>this.onChange(n))),this._register(Q(this.viewHelper.linesContentDomNode,jt.Contextmenu,n=>this._onContextMenu(new fd(n,!1,this.viewHelper.viewDomNode),!1)))}onTap(e){e.preventDefault(),this.viewHelper.focusTextArea();const t=this._createMouseTarget(new fd(e,!1,this.viewHelper.viewDomNode),!1);if(t.position){const i=document.createEvent("CustomEvent");i.initEvent(L1.Tap,!1,!0),this.viewHelper.dispatchTextAreaEvent(i),this.viewController.moveTo(t.position)}}onChange(e){this._context.viewModel.viewLayout.deltaScrollNow(-e.translationX,-e.translationY)}}class QX extends q{constructor(
Line truncated
|
|
|
|
|
`),v=_.substring(b+1),C=v.lastIndexOf(" "),w=v.length-C-1,S=u.getStartPosition(),D=Math.min(S.column-1,w),x=S.column-1-D,y=v.substring(0,v.length-D),k=RQ(y,this._fontInfo);return{distanceToModelLineStart:x,widthOfHiddenTextBefore:k}})(),{distanceToModelLineEnd:g}=(()=>{const _=d.value.substring(Math.max(d.selectionStart,d.selectionEnd)),b=_.indexOf(`
|
|
|
|
|
`),v=b===-1?_:_.substring(0,b),C=v.indexOf(" "),w=C===-1?v.length:v.length-C-1,S=u.getEndPosition(),D=Math.min(this._context.viewModel.model.getLineMaxColumn(S.lineNumber)-S.column,w);return{distanceToModelLineEnd:this._context.viewModel.model.getLineMaxColumn(S.lineNumber)-S.column-D}})();this._context.viewModel.revealRange("keyboard",!0,L.fromPositions(this._selections[0].getStartPosition()),0,1),this._visibleTextArea=new AQ(this._context,u.startLineNumber,h,f,g),this._visibleTextArea.prepareRender(this._visibleRangeProvider),this._render(),this.textArea.setClassName(`inputarea ${Ru} ime-input`),this._viewController.compositionStart(),this._context.viewModel.onCompositionStart()})),this._register(this._textAreaInput.onCompositionUpdate(c=>{!this._visibleTextArea||(this._visibleTextArea.prepareRender(this._visibleRangeProvider),this._render())})),this._register(this._textAreaInput.onCompositionEnd(()=>{this._visibleTextArea=null,this._render(),this.textArea.setClassName(`inputarea ${Ru}`),this._viewController.compositionEnd(),this._context.viewModel.onCompositionEnd()})),this._register(this._textAreaInput.onFocus(()=>{this._context.viewModel.setHasFocus(!0)})),this._register(this._textAreaInput.onBlur(()=>{this._context.viewModel.setHasFocus(!1)}))}dispose(){super.dispose()}_getAndroidWordAtPosition(e){const t='`~!@#$%^&*()-=+[{]}\\|;:",.<>/?',i=this._context.viewModel.getLineContent(e.lineNumber),n=Po(t);let o=!0,r=e.column,a=!0,l=e.column,c=0;for(;c<50&&(o||a);){if(o&&r<=1&&(o=!1),o){const d=i.charCodeAt(r-2);n.get(d)!==0?o=!1:r--}if(a&&l>i.length&&(a=!1),a){const d=i.charCodeAt(l-1);n.get(d)!==0?a=!1:l++}c++}return[i.substring(r-1,l-1),e.column-r]}_getWordBeforePosition(e){const t=this._context.viewModel.getLineContent(e.lineNumber),i=Po(this._context.configuration.options.get(119));let n=e.column,o=0;for(;n>1;){const r=t.charCodeAt(n-2);if(i.get(r)!==0||o>50)return t.substring(n-1,e.column-1);o++,n--}return t.substring(0,e.column-1)}_getCharacterBeforePosition(e){if(e.column>1){const i=this._context.viewModel.getLineContent(e.lineNumber).charAt(e.column-2);if(!Ui(i.charCodeAt(0)))return i}return""}_getAriaLabel(e){return e.get(2)===1?p("accessibilityOffAriaLabel","The editor is not accessible at this time. Press {0} for options.",Mn?"Shift+Alt+F1":"Alt+F1"):e.get(4)}_setAccessibilityOptions(e){this._accessibilitySupport=e.get(2);const t=e.get(3);this._accessibilitySupport===2&&t===jr.accessibilityPageSize.defaultValue?this._accessibilityPageSize=500:this._accessibilityPageSize=t}onConfigurationChanged(e){const t=this._context.configuration.options,i=t.get(133);return this._setAccessibilityOptions(t),this._contentLeft=i.contentLeft,this._contentWidth=i.contentWidth,this._contentHeight=i.height,this._fontInfo=t.get(46),this._lineHeight=t.get(61),this._emptySelectionClipboard=t.get(33),this._copyWithSyntaxHighlighting=t.get(21),this.textArea.setAttribute("aria-label",this._getAriaLabel(t)),this.textArea.setAttribute("tabindex",String(t.get(114))),(e.hasChanged(30)||e.hasChanged(83))&&(t.get(30)&&t.get(83)?this.textArea.setAttribute("readonly","true"):this.textArea.removeAttribute("readonly")),e.hasChanged(2)&&this._textAreaInput.writeScreenReaderContent("strategy changed"),!0}onCursorStateChanged(e){return this._selections=e.selections.slice(0),this._modelSelections=e.modelSelections.slice(0),this._textAreaInput.writeScreenReaderContent("selection changed"),!0}onDecorationsChanged(e){return!0}onFlushed(e){return!0}onLinesChanged(e){return!0}onLinesDeleted(e){return!0}onLinesInserted(e){return!0}onScrollChanged(e){return this._scrollLeft=e.scrollLeft,this._scrollTop=e.scrollTop,!0}onZonesChanged(e){return!0}isFocused(){return this._textAreaInput.isFocused()}focusTextArea(){this._textAreaInput.focusTextArea()}getLastRenderData(){return this._lastRenderPosition}setAriaOptions(e){e.activeDescendant?(this.textArea.setAttribute("aria-haspopup","true"),this.textArea.setAttribute("aria-autocomplete","list"),this.textArea.setAttribute("aria-activedescendant",e.activeDescendant)):(this.textArea.setAttribute("aria-haspopup","false"),this.textArea.setAttribute("aria-autocomplete","both"),this.textArea.removeAttribute("aria-activedescendant")),e.role&&this.textArea.setAttribute("role",e.role)}prepareRender(e){var t;this._primaryCursorPosition=new H(this._selections[0].positionLineNumber,this._selections[0].positionColumn),this._primaryCursorVisibleRange=e.visibleRangeForPosition(this._primaryCursorPosition),(t=this._visibleTextArea)===null||t===void 0||t.prepareRender(e)}render(e){this._textAreaInput.writeScreenReaderContent("render"),this._render()}_render(){if(this._visibleTextArea){const i=this._visibleTextArea.visibleTextareaStart,n=this._visibleTextArea.visibleTextareaEnd,o=this._visibleTextArea.startPosition,r=this._visibleTextArea.endPosition;if(o&&r&&i&&n&&n.left>=this._scrollLeft&&i.left<=this._scrollLeft+this._contentWidth){const a=this._context.viewLayout.getVerticalOffsetForLineNumber(this._primaryCursorPLine truncated
|
|
|
|
|
`,i+1),i===-1)break;t++}while(!0);return t}_renderAtTopLeft(){this._doRender({lastRenderPosition:null,top:0,left:0,width:Xp?0:1,height:Xp?0:1,useCover:!0})}_doRender(e){this._lastRenderPosition=e.lastRenderPosition;const t=this.textArea,i=this.textAreaCover;Tn(t,this._fontInfo),t.setTop(e.top),t.setLeft(e.left),t.setWidth(e.width),t.setHeight(e.height),t.setColor(e.color?$.Format.CSS.formatHex(e.color):""),t.setFontStyle(e.italic?"italic":""),e.bold&&t.setFontWeight("bold"),t.setTextDecoration(`${e.underline?" underline":""}${e.strikethrough?" line-through":""}`),i.setTop(e.useCover?e.top:0),i.setLeft(e.useCover?e.left:0),i.setWidth(e.useCover?e.width:0),i.setHeight(e.useCover?e.height:0);const n=this._context.configuration.options;n.get(52)?i.setClassName("monaco-editor-background textAreaCover "+nh.OUTER_CLASS_NAME):n.get(62).renderType!==0?i.setClassName("monaco-editor-background textAreaCover "+Fg.CLASS_NAME):i.setClassName("monaco-editor-background textAreaCover")}}function RQ(s,e){if(s.length===0)return 0;const t=document.createElement("div");t.style.position="absolute",t.style.top="-50000px",t.style.width="50000px";const i=document.createElement("span");Tn(i,e),i.style.whiteSpace="pre",i.append(s),t.appendChild(i),document.body.appendChild(t);const n=i.offsetWidth;return document.body.removeChild(t),n}function OQ(s,e,t){let i=0;for(let o=0;o<s.length;o++)s.charAt(o)===" "?i=Wi.nextIndentTabStop(i,e):i++;let n="";if(!t){const o=Math.floor(i/e);i=i%e;for(let r=0;r<o;r++)n+=" "}for(let o=0;o<i;o++)n+=" ";return n}function k1(s,e,t){let i=is(s);return i===-1&&(i=s.length),OQ(s.substring(0,i),e,t)+s.substring(i)}const PQ=()=>!0,FQ=()=>!1,BQ=s=>s===" "||s===" ";class Yh{constructor(e,t,i,n){this.languageConfigurationService=n,this._cursorMoveConfigurationBrand=void 0,this._languageId=e;const o=i.options,r=o.get(133);this.readOnly=o.get(83),this.tabSize=t.tabSize,this.indentSize=t.indentSize,this.insertSpaces=t.insertSpaces,this.stickyTabStops=o.get(106),this.lineHeight=o.get(61),this.pageSize=Math.max(1,Math.floor(r.height/this.lineHeight)-2),this.useTabStops=o.get(118),this.wordSeparators=o.get(119),this.emptySelectionClipboard=o.get(33),this.copyWithSyntaxHighlighting=o.get(21),this.multiCursorMergeOverlapping=o.get(71),this.multiCursorPaste=o.get(73),this.autoClosingBrackets=o.get(5),this.autoClosingQuotes=o.get(8),this.autoClosingDelete=o.get(6),this.autoClosingOvertype=o.get(7),this.autoSurround=o.get(11),this.autoIndent=o.get(9),this.surroundingPairs={},this._electricChars=null,this.shouldAutoCloseBefore={quote:this._getShouldAutoClose(e,this.autoClosingQuotes),bracket:this._getShouldAutoClose(e,this.autoClosingBrackets)},this.autoClosingPairs=this.languageConfigurationService.getLanguageConfiguration(e).getAutoClosingPairs();const a=this.languageConfigurationService.getLanguageConfiguration(e).getSurroundingPairs();if(a)for(const l of a)this.surroundingPairs[l.open]=l.close}static shouldRecreate(e){return e.hasChanged(133)||e.hasChanged(119)||e.hasChanged(33)||e.hasChanged(71)||e.hasChanged(73)||e.hasChanged(5)||e.hasChanged(8)||e.hasChanged(6)||e.hasChanged(7)||e.hasChanged(11)||e.hasChanged(118)||e.hasChanged(61)||e.hasChanged(83)}get electricChars(){var e;if(!this._electricChars){this._electricChars={};const t=(e=this.languageConfigurationService.getLanguageConfiguration(this._languageId).electricCharacter)===null||e===void 0?void 0:e.getElectricCharacters();if(t)for(const i of t)this._electricChars[i]=!0}return this._electricChars}onElectricCharacter(e,t,i){const n=iS(t,i-1),o=this.languageConfigurationService.getLanguageConfiguration(n.languageId).electricCharacter;return o?o.onElectricCharacter(e,n,i-n.firstCharOffset):null}normalizeIndentation(e){return k1(e,this.indentSize,this.insertSpaces)}_getShouldAutoClose(e,t){switch(t){case"beforeWhitespace":return BQ;case"languageDefined":return this._getLanguageDefinedShouldAutoClose(e);case"always":return PQ;case"never":return FQ}}_getLanguageDefinedShouldAutoClose(e){const t=this.languageConfigurationService.getLanguageConfiguration(e).getAutoCloseBeforeSet();return i=>t.indexOf(i)!==-1}visibleColumnFromColumn(e,t){return Wi.visibleColumnFromColumn(e.getLineContent(t.lineNumber),t.column,this.tabSize)}columnFromVisibleColumn(e,t,i){const n=Wi.columnFromVisibleColumn(e.getLineContent(t),i,this.tabSize),o=e.getLineMinColumn(t);if(n<o)return o;const r=e.getLineMaxColumn(t);return n>r?r:n}}class et{constructor(e,t){this._cursorStateBrand=void 0,this.modelState=e,this.viewState=t}static fromModelState(e){return new WQ(e)}static fromViewState(e){return new VQ(e)}static fromModelSelection(e){const t=le.liftSelection(e),i=new ln(L.fromPositions(t.getSelectionStart()),0,t.getPosition(),0);return et.fromModelState(i)}static fromModelSelections(e){const t=[];for(let i=0,n=e.length;i<n;i++)t[i]=this.fromModelSelection(e[i]);return t}equals(e){return this.viewState.equals(e.viewState)&&this.modelState.equals(e.modelState)}}class WQ{constructor(e){this.modelSt
Line truncated
|
|
|
|
|
* '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:e,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}}}}]},s.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"},s.RawUnit={Line:"line",WrappedLine:"wrappedLine",Character:"character",HalfLine:"halfLine"};function t(i){if(!i.to)return null;let n;switch(i.to){case s.RawDirection.Left:n=0;break;case s.RawDirection.Right:n=1;break;case s.RawDirection.Up:n=2;break;case s.RawDirection.Down:n=3;break;case s.RawDirection.PrevBlankLine:n=4;break;case s.RawDirection.NextBlankLine:n=5;break;case s.RawDirection.WrappedLineStart:n=6;break;case s.RawDirection.WrappedLineFirstNonWhitespaceCharacter:n=7;break;case s.RawDirection.WrappedLineColumnCenter:n=8;break;case s.RawDirection.WrappedLineEnd:n=9;break;case s.RawDirection.WrappedLineLastNonWhitespaceCharacter:n=10;break;case s.RawDirection.ViewPortTop:n=11;break;case s.RawDirection.ViewPortBottom:n=13;break;case s.RawDirection.ViewPortCenter:n=12;break;case s.RawDirection.ViewPortIfOutside:n=14;break;default:return null}let o=0;switch(i.by){case s.RawUnit.Line:o=1;break;case s.RawUnit.WrappedLine:o=2;break;case s.RawUnit.Character:o=3;break;case s.RawUnit.HalfLine:o=4;break}return{direction:n,unit:o,select:!!i.select,value:i.value||1}}s.parse=t})(D1||(D1={}));function og(s,e,t,i){const n=Jf(e,t.startLineNumber,t.startColumn),o=i.getLanguageConfiguration(n.languageId);if(!o)return null;const r=n.getLineContent(),a=r.substr(0,t.startColumn-1-n.firstCharOffset);let l;t.isEmpty()?l=r.substr(t.startColumn-1-n.firstCharOffset):l=Jf(e,t.endLineNumber,t.endColumn).getLineContent().substr(t.endColumn-1-n.firstCharOffset);let c="";if(t.startLineNumber>1&&n.firstCharOffset===0){const _=Jf(e,t.startLineNumber-1);_.languageId===n.languageId&&(c=_.getLineContent())}const d=o.onEnter(s,c,a,l);if(!d)return null;const u=d.indentAction;let h=d.appendText;const f=d.removeText||0;h?u===Di.Indent&&(h=" "+h):u===Di.Indent||u===Di.IndentOutdent?h=" ":h="";let g=v3(e,t.startLineNumber,t.startColumn);return f&&(g=g.substring(0,g.length-f)),{indentAction:u,appendText:h,removeText:f,indentation:g}}var zQ=globalThis&&globalThis.__decorate||function(s,e,t,i){var n=arguments.length,o=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(s,e,t,i);else for(var a=s.length-1;a>=0;a--)(r=s[a])&&(o=(n<3?r(o):n>3?r(e,t,o):r(e,t))||o);return n>3&&o&&Object.defineProperty(e,t,o),o},$Q=globalThis&&globalThis.__param||function(s,e){return function(t,i){e(t,i,s)}};const ML=Object.create(null);function Gd(s,e){if(e<=0)return"";ML[s]||(ML[s]=["",s]);const t=ML[s];for(let i=t.length;i<=e;i++)t[i]=t[i-1]+s;return t[e]}let yo=class Gx{constructor(e,t,i){this._languageConfigurationService=i,this._opts=t,this._selection=e,this._selectionId=null,this._useLastEditRangeForCursorEndPosition=!1,this._selectionStartColumnStaysPut=!1}static unshiftIndent(e,t,i,n,o){const r=Wi.visibleColumnFromColumn(e,t,i);if(o){const a=Gd(" ",n),c=Wi.prevIndentTabStop(r,n)/n;return Gd(a,c)}else{const a=" ",c=Wi.prevRenderTabStop(r,i)/i;return Gd(a,c)}}static shiftIndent(e,t,i,n,o){const r=Wi.visibleColumnFromColumn(e,t,i);if(o){const a=Gd(" ",n),c=Wi.nextIndentTabStop(r,n)/n;return Gd(a,c)}else{const a=" ",c=Wi.nextRenderTabStop(r,i)/i;return Gd(a,c)}}_addEditOperation(e,t,i){this._useLastEditRangeForCursorEndPosition?e.addTrackedEditOperation(t,i):e.addEditOperation(t,i)}getEditOperations(e,t){const i=this._selection.startLineNumber;let n=this._selection.endLineNumber;this._selection.endColumn===1&&i!==n&&(n=n-1);const{tabSize:o,indentSize:r,insertSpaces:a}=this._opts,l=i===n;if(this._opts.useTabStops){this._selection.isEmpty()&&/^\s*$/.test(e.getLineContent(i))&&(this._useLastEditRangeForCursorEndPosition=!0);let c=0,d=0;for(let u=i;u<=n;u++,c=d){d=0;const h=e.getLineContent(u);let f=is(h);if(this._opts.isUnshift&&(h.length===0||f===0)||!l&&!this._opts.isUnshift&&h.length===0)continue;if(f===-1&&(f=h.length),u>1&&Wi.visibleColumnFromColumn(h,f+1,o)%r!==0&&e.tokenization.isCheapToTokenize(u-1)){const b=og(this._opts.autoIndent,e,new L(u-1,e.getLin
Line truncated
|
|
|
|
|
`)!==n.length-1&&(o=!1),o){const u=new L(d.lineNumber,1,d.lineNumber,1);r[a]=new _2(u,n,c,!0)}else r[a]=new un(c,n)}return new ls(0,r,{shouldPushStackElementBefore:!0,shouldPushStackElementAfter:!0})}static _distributePasteToCursors(e,t,i,n,o){if(n||t.length===1)return null;if(o&&o.length===t.length)return o;if(e.multiCursorPaste==="spread"){i.charCodeAt(i.length-1)===10&&(i=i.substr(0,i.length-1)),i.charCodeAt(i.length-1)===13&&(i=i.substr(0,i.length-1));const r=Wa(i);if(r.length===t.length)return r}return null}static paste(e,t,i,n,o,r){const a=this._distributePasteToCursors(e,i,n,o,r);return a?(i=i.sort(L.compareRangesUsingStarts),this._distributedPaste(e,t,i,a)):this._simplePaste(e,t,i,n,o)}static _goodIndentForLine(e,t,i){let n=null,o="";const r=OS(e.autoIndent,t,i,!1,e.languageConfigurationService);if(r)n=r.action,o=r.indentation;else if(i>1){let a;for(a=i-1;a>=1;a--){const d=t.getLineContent(a);if(Ra(d)>=0)break}if(a<1)return null;const l=t.getLineMaxColumn(a),c=og(e.autoIndent,t,new L(a,l,a,l),e.languageConfigurationService);c&&(o=c.indentation+c.appendText)}return n&&(n===Di.Indent&&(o=ei.shiftIndent(e,o)),n===Di.Outdent&&(o=ei.unshiftIndent(e,o)),o=e.normalizeIndentation(o)),o||null}static _replaceJumpToNextIndent(e,t,i,n){let o="";const r=i.getStartPosition();if(e.insertSpaces){const a=e.visibleColumnFromColumn(t,r),l=e.indentSize,c=l-a%l;for(let d=0;d<c;d++)o+=" "}else o=" ";return new un(i,o,n)}static tab(e,t,i){const n=[];for(let o=0,r=i.length;o<r;o++){const a=i[o];if(a.isEmpty()){const l=t.getLineContent(a.startLineNumber);if(/^\s*$/.test(l)&&t.tokenization.isCheapToTokenize(a.startLineNumber)){let c=this._goodIndentForLine(e,t,a.startLineNumber);c=c||" ";const d=e.normalizeIndentation(c);if(!l.startsWith(d)){n[o]=new un(new L(a.startLineNumber,1,a.startLineNumber,l.length+1),d,!0);continue}}n[o]=this._replaceJumpToNextIndent(e,t,a,!0)}else{if(a.startLineNumber===a.endLineNumber){const l=t.getLineMaxColumn(a.startLineNumber);if(a.startColumn!==1||a.endColumn!==l){n[o]=this._replaceJumpToNextIndent(e,t,a,!1);continue}}n[o]=new yo(a,{isUnshift:!1,tabSize:e.tabSize,indentSize:e.indentSize,insertSpaces:e.insertSpaces,useTabStops:e.useTabStops,autoIndent:e.autoIndent},e.languageConfigurationService)}}return n}static compositionType(e,t,i,n,o,r,a,l){const c=n.map(d=>this._compositionType(i,d,o,r,a,l));return new ls(4,c,{shouldPushStackElementBefore:tv(e,4),shouldPushStackElementAfter:!1})}static _compositionType(e,t,i,n,o,r){if(!t.isEmpty())return null;const a=t.getPosition(),l=Math.max(1,a.column-n),c=Math.min(e.getLineMaxColumn(a.lineNumber),a.column+o),d=new L(a.lineNumber,l,a.lineNumber,c);return e.getValueInRange(d)===i&&r===0?null:new gC(d,i,0,r)}static _typeCommand(e,t,i){return i?new J0(e,t,!0):new un(e,t,!0)}static _enter(e,t,i,n){if(e.autoIndent===0)return ei._typeCommand(n,`
|
|
|
|
|
`,i);if(!t.tokenization.isCheapToTokenize(n.getStartPosition().lineNumber)||e.autoIndent===1){const l=t.getLineContent(n.startLineNumber),c=Mt(l).substring(0,n.startColumn-1);return ei._typeCommand(n,`
|
|
|
|
|
`+e.normalizeIndentation(c),i)}const o=og(e.autoIndent,t,n,e.languageConfigurationService);if(o){if(o.indentAction===Di.None)return ei._typeCommand(n,`
|
|
|
|
|
`+e.normalizeIndentation(o.indentation+o.appendText),i);if(o.indentAction===Di.Indent)return ei._typeCommand(n,`
|
|
|
|
|
`+e.normalizeIndentation(o.indentation+o.appendText),i);if(o.indentAction===Di.IndentOutdent){const l=e.normalizeIndentation(o.indentation),c=e.normalizeIndentation(o.indentation+o.appendText),d=`
|
|
|
|
|
`+c+`
|
|
|
|
|
`+l;return i?new J0(n,d,!0):new gC(n,d,-1,c.length-l.length,!0)}else if(o.indentAction===Di.Outdent){const l=ei.unshiftIndent(e,o.indentation);return ei._typeCommand(n,`
|
|
|
|
|
`+e.normalizeIndentation(l+o.appendText),i)}}const r=t.getLineContent(n.startLineNumber),a=Mt(r).substring(0,n.startColumn-1);if(e.autoIndent>=4){const l=qQ(e.autoIndent,t,n,{unshiftIndent:c=>ei.unshiftIndent(e,c),shiftIndent:c=>ei.shiftIndent(e,c),normalizeIndentation:c=>e.normalizeIndentation(c)},e.languageConfigurationService);if(l){let c=e.visibleColumnFromColumn(t,n.getEndPosition());const d=n.endColumn,u=t.getLineContent(n.endLineNumber),h=is(u);if(h>=0?n=n.setEndPosition(n.endLineNumber,Math.max(n.endColumn,h+1)):n=n.setEndPosition(n.endLineNumber,t.getLineMaxColumn(n.endLineNumber)),i)return new J0(n,`
|
|
|
|
|
`+e.normalizeIndentation(l.afterEnter),!0);{let f=0;return d<=h+1&&(e.insertSpaces||(c=Math.ceil(c/e.indentSize)),f=Math.min(c+1-e.normalizeIndentation(l.afterEnter).length-1,0)),new gC(n,`
|
|
|
|
|
`+e.normalizeIndentation(l.afterEnter),0,f,!0)}}}return ei._typeCommand(n,`
|
|
|
|
|
`+e.normalizeIndentation(a),i)}static _isAutoIndentType(e,t,i){if(e.autoIndent<4)return!1;for(let n=0,o=i.length;n<o;n++)if(!t.tokenization.isCheapToTokenize(i[n].getEndPosition().lineNumber))return!1;return!0}static _runAutoIndentType(e,t,i,n){const o=v3(t,i.startLineNumber,i.startColumn),r=GQ(e.autoIndent,t,i,n,{shiftIndent:a=>ei.shiftIndent(e,a),unshiftIndent:a=>ei.unshiftIndent(e,a)},e.languageConfigurationService);if(r===null)return null;if(r!==e.normalizeIndentation(o)){const a=t.getLineFirstNonWhitespaceColumn(i.startLineNumber);return a===0?ei._typeCommand(new L(i.startLineNumber,1,i.endLineNumber,i.endColumn),e.normalizeIndentation(r)+n,!1):ei._typeCommand(new L(i.startLineNumber,1,i.endLineNumber,i.endColumn),e.normalizeIndentation(r)+t.getLineContent(i.startLineNumber).substring(a-1,i.startColumn-1)+n,!1)}return null}static _isAutoClosingOvertype(e,t,i,n,o){if(e.autoClosingOvertype==="never"||!e.autoClosingPairs.autoClosingPairsCloseSingleChar.has(o))return!1;for(let r=0,a=i.length;r<a;r++){const l=i[r];if(!l.isEmpty())return!1;const c=l.getPosition(),d=t.getLineContent(c.lineNumber);if(d.charAt(c.column-1)!==o)return!1;const h=wc(o);if((c.column>2?d.charCodeAt(c.column-2):0)===92&&h)return!1;if(e.autoClosingOvertype==="auto"){let g=!1;for(let _=0,b=n.length;_<b;_++){const v=n[_];if(c.lineNumber===v.startLineNumber&&c.column===v.startColumn){g=!0;break}}if(!g)return!1}}return!0}static _runAutoClosingOvertype(e,t,i,n,o){const r=[];for(let a=0,l=n.length;a<l;a++){const d=n[a].getPosition(),u=new L(d.lineNumber,d.column,d.lineNumber,d.column+1);r[a]=new un(u,o)}return new ls(4,r,{shouldPushStackElementBefore:tv(e,4),shouldPushStackElementAfter:!1})}static _isBeforeClosingBrace(e,t){const i=t.charAt(0),n=e.autoClosingPairs.autoClosingPairsOpenByStart.get(i)||[],o=e.autoClosingPairs.autoClosingPairsCloseByStart.get(i)||[],r=n.some(l=>t.startsWith(l.open)),a=o.some(l=>t.startsWith(l.close));return!r&&a}static _findAutoClosingPairOpen(e,t,i,n){const o=e.autoClosingPairs.autoClosingPairsOpenByEnd.get(n);if(!o)return null;let r=null;for(const a of o)if(r===null||a.open.length>r.open.length){let l=!0;for(const c of i)if(t.getValueInRange(new L(c.lineNumber,c.column-a.open.length+1,c.lineNumber,c.column))+n!==a.open){l=!1;break}l&&(r=a)}return r}static _findContainedAutoClosingPair(e,t){if(t.open.length<=1)return null;const i=t.close.charAt(t.close.length-1),n=e.autoClosingPairs.autoClosingPairsCloseByEnd.get(i)||[];let o=null;for(const r of n)r.open!==t.open&&t.open.includes(r.open)&&t.close.endsWith(r.close)&&(!o||r.open.length>o.open.length)&&(o=r);return o}static _getAutoClosingPairClose(e,t,i,n,o){const r=wc(n),a=r?e.autoClosingQuotes:e.autoClosingBrackets,l=r?e.shouldAutoCloseBefore.quote:e.shouldAutoCloseBefore.bracket;if(a==="never")return null;for(const g of i)if(!g.isEmpty())return null;const c=i.map(g=>{const _=g.getPosition();return o?{lineNumber:_.lineNumber,beforeColumn:_.column-n.length,afterColumn:_.column}:{lineNumber:_.lineNumber,beforeColumn:_.column,afterColumn:_.column}}),d=this._findAutoClosingPairOpen(e,t,c.map(g=>new H(g.lineNumber,g.beforeColumn)),n);if(!d)return null;const u=this._findContainedAutoClosingPair(e,d),h=u?u.close:"";let f=!0;for(const g of c){const{lineNumber:_,beforeColumn:b,afterColumn:v}=g,C=t.getLineContent(_),w=C.substring(0,b-1),S=C.substring(v-1);if(S.startsWith(h)||(f=!1),S.length>0){const k=S.charAt(0);if(!ei._isBeforeClosingBrace(e,S)&&!l(k))return null}if(d.open.length===1&&(n==="'"||n==='"')&&a!=="always"){const k=Po(e.wordSeparators);if(w.length>0){const I=w.charCodeAt(w.length-1);if(k.get(I)===0)return null}}if(!t.tokenization.isCheapToTokenize(_))return null;t.tokenization.forceTokenization(_);const D=t.tokenization.getLineTokens(_),x=iS(D,b-1);if(!d.shouldAutoClose(x,b-x.firstCharOffset))return null;const y=d.findNeutralCharacter();if(y){const k=t.tokenization.getTokenTypeIfInsertingCharacter(_,b,y);if(!d.isOK(k))return null}}return f?d.close.substring(0,d.close.length-h.length):d.close}static _runAutoClosingOpenCharType(e,t,i,n,o,r,a){const l=[];for(let c=0,d=n.length;c<d;c++){const u=n[c];l[c]=new F9(u,o,!r,a)}return new ls(4,l,{shouldPushStackElementBefore:!0,shouldPushStackElementAfter:!1})}static _shouldSurroundChar(e,t){return wc(t)?e.autoSurround==="quotes"||e.autoSurround==="languageDefined":e.autoSurround==="brackets"||e.autoSurround==="languageDefined"}static _isSurroundSelectionType(e,t,i,n){if(!ei._shouldSurroundChar(e,n)||!e.surroundingPairs.hasOwnProperty(n))return!1;const o=wc(n);for(const r of i){if(r.isEmpty())return!1;let a=!0;for(let l=r.startLineNumber;l<=r.endLineNumber;l++){const c=t.getLineContent(l),d=l===r.startLineNumber?r.startColumn-1:0,u=l===r.endLineNumber?r.endColumn-1:c.length,h=c.substring(d,u);if(/[^ \t]/.test(h)){a=!1;break}}if(a)return!1;if(o&&r.startLineNumber===r.endLineNumber&&r.startColumn+1===r.endColumn){const l=t.getValueInRange(r);if(wc(l))return!1}}return!0}static _runSurroundSelectionType(e,t,i,n,o){const r
Line truncated
|
|
|
|
|
`){const d=[];for(let u=0,h=o.length;u<h;u++)d[u]=ei._enter(i,n,!1,o[u]);return new ls(4,d,{shouldPushStackElementBefore:!0,shouldPushStackElementAfter:!1})}if(!e&&this._isAutoIndentType(i,n,o)){const d=[];let u=!1;for(let h=0,f=o.length;h<f;h++)if(d[h]=this._runAutoIndentType(i,n,o[h],a),!d[h]){u=!0;break}if(!u)return new ls(4,d,{shouldPushStackElementBefore:!0,shouldPushStackElementAfter:!1})}if(this._isAutoClosingOvertype(i,n,o,r,a))return this._runAutoClosingOvertype(t,i,n,o,a);if(!e){const d=this._getAutoClosingPairClose(i,n,o,a,!1);if(d)return this._runAutoClosingOpenCharType(t,i,n,o,a,!1,d)}if(!e&&this._isSurroundSelectionType(i,n,o,a))return this._runSurroundSelectionType(t,i,n,o,a);if(!e&&this._isTypeInterceptorElectricChar(i,n,o)){const d=this._typeInterceptorElectricChar(t,i,n,o[0],a);if(d)return d}const l=[];for(let d=0,u=o.length;d<u;d++)l[d]=new un(o[d],a);const c=RL(a,t);return new ls(c,l,{shouldPushStackElementBefore:tv(t,c),shouldPushStackElementAfter:!1})}static typeWithoutInterceptors(e,t,i,n,o){const r=[];for(let l=0,c=n.length;l<c;l++)r[l]=new un(n[l],o);const a=RL(o,e);return new ls(a,r,{shouldPushStackElementBefore:tv(e,a),shouldPushStackElementAfter:!1})}static lineInsertBefore(e,t,i){if(t===null||i===null)return[];const n=[];for(let o=0,r=i.length;o<r;o++){let a=i[o].positionLineNumber;if(a===1)n[o]=new J0(new L(1,1,1,1),`
|
|
|
|
|
`);else{a--;const l=t.getLineMaxColumn(a);n[o]=this._enter(e,t,!1,new L(a,l,a,l))}}return n}static lineInsertAfter(e,t,i){if(t===null||i===null)return[];const n=[];for(let o=0,r=i.length;o<r;o++){const a=i[o].positionLineNumber,l=t.getLineMaxColumn(a);n[o]=this._enter(e,t,!1,new L(a,l,a,l))}return n}static lineBreakInsert(e,t,i){const n=[];for(let o=0,r=i.length;o<r;o++)n[o]=this._enter(e,t,!0,i[o]);return n}}class F9 extends gC{constructor(e,t,i,n){super(e,(i?t:"")+n,0,-n.length),this._openCharacter=t,this._closeCharacter=n,this.closeCharacterRange=null,this.enclosingRange=null}computeCursorState(e,t){const n=t.getInverseEditOperations()[0].range;return this.closeCharacterRange=new L(n.startLineNumber,n.endColumn-this._closeCharacter.length,n.endLineNumber,n.endColumn),this.enclosingRange=new L(n.startLineNumber,n.endColumn-this._openCharacter.length-this._closeCharacter.length,n.endLineNumber,n.endColumn),super.computeCursorState(e,t)}}class ZQ{constructor(e,t,i,n,o,r){this.deletedText=e,this.deletedSelectionStart=t,this.deletedSelectionEnd=i,this.insertedText=n,this.insertedSelectionStart=o,this.insertedSelectionEnd=r}}function RL(s,e){return s===" "?e===5||e===6?6:5:4}function tv(s,e){return AO(s)&&!AO(e)?!0:s===5?!1:NO(s)!==NO(e)}function NO(s){return s===6||s===5?"space":s}function AO(s){return s===4||s===5||s===6}var N;(function(s){s.editorSimpleInput=new pe("editorSimpleInput",!1,!0),s.editorTextFocus=new pe("editorTextFocus",!1,p("editorTextFocus","Whether the editor text has focus (cursor is blinking)")),s.focus=new pe("editorFocus",!1,p("editorFocus","Whether the editor or an editor widget has focus (e.g. focus is in the find widget)")),s.textInputFocus=new pe("textInputFocus",!1,p("textInputFocus","Whether an editor or a rich text input has focus (cursor is blinking)")),s.readOnly=new pe("editorReadonly",!1,p("editorReadonly","Whether the editor is read only")),s.inDiffEditor=new pe("inDiffEditor",!1,p("inDiffEditor","Whether the context is a diff editor")),s.columnSelection=new pe("editorColumnSelection",!1,p("editorColumnSelection","Whether `editor.columnSelection` is enabled")),s.writable=s.readOnly.toNegated(),s.hasNonEmptySelection=new pe("editorHasSelection",!1,p("editorHasSelection","Whether the editor has text selected")),s.hasOnlyEmptySelection=s.hasNonEmptySelection.toNegated(),s.hasMultipleSelections=new pe("editorHasMultipleSelections",!1,p("editorHasMultipleSelections","Whether the editor has multiple selections")),s.hasSingleSelection=s.hasMultipleSelections.toNegated(),s.tabMovesFocus=new pe("editorTabMovesFocus",!1,p("editorTabMovesFocus","Whether `Tab` will move focus out of the editor")),s.tabDoesNotMoveFocus=s.tabMovesFocus.toNegated(),s.isInWalkThroughSnippet=new pe("isInEmbeddedEditor",!1,!0),s.canUndo=new pe("canUndo",!1,!0),s.canRedo=new pe("canRedo",!1,!0),s.hoverVisible=new pe("editorHoverVisible",!1,p("editorHoverVisible","Whether the editor hover is visible")),s.inCompositeEditor=new pe("inCompositeEditor",void 0,p("inCompositeEditor","Whether the editor is part of a larger editor (e.g. notebooks)")),s.notInCompositeEditor=s.inCompositeEditor.toNegated(),s.languageId=new pe("editorLangId","",p("editorLangId","The language identifier of the editor")),s.hasCompletionItemProvider=new pe("editorHasCompletionItemProvider",!1,p("editorHasCompletionItemProvider","Whether the editor has a completion item provider")),s.hasCodeActionsProvider=new pe("editorHasCodeActionsProvider",!1,p("editorHasCodeActionsProvider","Whether the editor has a code actions provider")),s.hasCodeLensProvider=new pe("editorHasCodeLensProvider",!1,p("editorHasCodeLensProvider","Whether the editor has a code lens provider")),s.hasDefinitionProvider=new pe("editorHasDefinitionProvider",!1,p("editorHasDefinitionProvider","Whether the editor has a definition provider")),s.hasDeclarationProvider=new pe("editorHasDeclarationProvider",!1,p("editorHasDeclarationProvider","Whether the editor has a declaration provider")),s.hasImplementationProvider=new pe("editorHasImplementationProvider",!1,p("editorHasImplementationProvider","Whether the editor has an implementation provider")),s.hasTypeDefinitionProvider=new pe("editorHasTypeDefinitionProvider",!1,p("editorHasTypeDefinitionProvider","Whether the editor has a type definition provider")),s.hasHoverProvider=new pe("editorHasHoverProvider",!1,p("editorHasHoverProvider","Whether the editor has a hover provider")),s.hasDocumentHighlightProvider=new pe("editorHasDocumentHighlightProvider",!1,p("editorHasDocumentHighlightProvider","Whether the editor has a document highlight provider")),s.hasDocumentSymbolProvider=new pe("editorHasDocumentSymbolProvider",!1,p("editorHasDocumentSymbolProvider","Whether the editor has a document symbol provider")),s.hasReferenceProvider=new pe("editorHasReferenceProvider",!1,p("editorHasReferenceProvider","Whether the editor has a reference provider")),s.hasRenameProvider=new pe("editorHasRenameProvider",!1,p("editorHasRenameProvider
Line truncated
|
|
|
|
|
.monaco-scrollable-element > .shadow.top {
|
|
|
|
|
box-shadow: ${t} 0 6px 6px -6px inset;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.monaco-scrollable-element > .shadow.left {
|
|
|
|
|
box-shadow: ${t} 6px 0 6px -6px inset;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.monaco-scrollable-element > .shadow.top.left {
|
|
|
|
|
box-shadow: ${t} 6px 6px 6px -6px inset;
|
|
|
|
|
}
|
|
|
|
|
`);const i=s.getColor(vu);i&&e.addRule(`
|
|
|
|
|
.monaco-scrollable-element > .scrollbar > .slider {
|
|
|
|
|
background: ${i};
|
|
|
|
|
}
|
|
|
|
|
`);const n=s.getColor(Cu);n&&e.addRule(`
|
|
|
|
|
.monaco-scrollable-element > .scrollbar > .slider:hover {
|
|
|
|
|
background: ${n};
|
|
|
|
|
}
|
|
|
|
|
`);const o=s.getColor(wu);o&&e.addRule(`
|
|
|
|
|
.monaco-scrollable-element > .scrollbar > .slider.active {
|
|
|
|
|
background: ${o};
|
|
|
|
|
}
|
|
|
|
|
`)});class I1{constructor(e,t,i){this._decorationToRenderBrand=void 0,this.startLineNumber=+e,this.endLineNumber=+t,this.className=String(i)}}class C2 extends Lp{_render(e,t,i){const n=[];for(let a=e;a<=t;a++){const l=a-e;n[l]=[]}if(i.length===0)return n;i.sort((a,l)=>a.className===l.className?a.startLineNumber===l.startLineNumber?a.endLineNumber-l.endLineNumber:a.startLineNumber-l.startLineNumber:a.className<l.className?-1:1);let o=null,r=0;for(let a=0,l=i.length;a<l;a++){const c=i[a],d=c.className;let u=Math.max(c.startLineNumber,e)-e;const h=Math.min(c.endLineNumber,t)-e;o===d?(u=Math.max(r+1,u),r=Math.max(r,h)):(o=d,r=h);for(let f=u;f<=r;f++)n[f].push(o)}return n}}class vJ extends C2{constructor(e){super(),this._context=e;const t=this._context.configuration.options,i=t.get(133);this._lineHeight=t.get(61),this._glyphMargin=t.get(52),this._glyphMarginLeft=i.glyphMarginLeft,this._glyphMarginWidth=i.glyphMarginWidth,this._renderResult=null,this._context.addEventHandler(this)}dispose(){this._context.removeEventHandler(this),this._renderResult=null,super.dispose()}onConfigurationChanged(e){const t=this._context.configuration.options,i=t.get(133);return this._lineHeight=t.get(61),this._glyphMargin=t.get(52),this._glyphMarginLeft=i.glyphMarginLeft,this._glyphMarginWidth=i.glyphMarginWidth,!0}onDecorationsChanged(e){return!0}onFlushed(e){return!0}onLinesChanged(e){return!0}onLinesDeleted(e){return!0}onLinesInserted(e){return!0}onScrollChanged(e){return e.scrollTopChanged}onZonesChanged(e){return!0}_getDecorations(e){const t=e.getDecorationsInViewport(),i=[];let n=0;for(let o=0,r=t.length;o<r;o++){const a=t[o],l=a.options.glyphMarginClassName;l&&(i[n++]=new I1(a.range.startLineNumber,a.range.endLineNumber,l))}return i}prepareRender(e){if(!this._glyphMargin){this._renderResult=null;return}const t=e.visibleRange.startLineNumber,i=e.visibleRange.endLineNumber,n=this._render(t,i,this._getDecorations(e)),o=this._lineHeight.toString(),r=this._glyphMarginLeft.toString(),a=this._glyphMarginWidth.toString(),l='" style="left:'+r+"px;width:"+a+"px;height:"+o+'px;"></div>',c=[];for(let d=t;d<=i;d++){const u=d-t,h=n[u];h.length===0?c[u]="":c[u]='<div class="cgmr codicon '+h.join(" ")+l}this._renderResult=c}render(e,t){if(!this._renderResult)return"";const i=t-e;return i<0||i>=this._renderResult.length?"":this._renderResult[i]}}class U9 extends q{constructor(){super(...arguments),this._isDisposed=!1}dispose(){super.dispose(),this._isDisposed=!0}assertNotDisposed(){if(this._isDisposed)throw new Error("TextModelPart is disposed!")}}function FS(s,e){let t=0,i=0;const n=s.length;for(;i<n;){const o=s.charCodeAt(i);if(o===32)t++;else if(o===9)t=t-t%e+e;else break;i++}return i===n?-1:t}var Ou;(function(s){s[s.Disabled=0]="Disabled",s[s.EnabledForActive=1]="EnabledForActive",s[s.Enabled=2]="Enabled"})(Ou||(Ou={}));class Lu{constructor(e,t,i,n,o,r){if(this.visibleColumn=e,this.column=t,this.className=i,this.horizontalLine=n,this.forWrappedLinesAfterColumn=o,this.forWrappedLinesBeforeOrAtColumn=r,e!==-1==(t!==-1))throw new Error}}class $m{constructor(e,t){this.top=e,this.endColumn=t}}class CJ extends U9{constructor(e,t){super(),this.textModel=e,this.languageConfigurationService=t}getLanguageConfiguration(e){return this.languageConfigurationService.getLanguageConfiguration(e)}_computeIndentLevel(e){return FS(this.textModel.getLineContent(e+1),this.textModel.getOptions().tabSize)}getActiveIndentGuide(e,t,i){this.assertNotDisposed();const n=this.textModel.getLineCount();if(e<1||e>n)throw new Error("Illegal value for lineNumber");const o=this.getLanguageConfiguration(this.textModel.getLanguageId()).foldingRules,r=Boolean(o&&o.offSide);let a=-2,l=-1,c=-2,d=-1;const u=y=>{if(a!==-1&&(a===-2||a>y-1)){a=-1,l=-1;for(let k=y-2;k>=0;k--){const I=this._computeIndentLevel(k);if(I>=0){a=k,l=I;break}}}if(c===-2){c=-1,d=-1;for(let k=y;k<n;k++){const I=this._computeIndentLevel(k);if(I>=0){c=k,d=I;break}}}};let h=-2,f=-1,g=-2,_=-1;const b=y=>{if(h===-2){h=-1,f=-1;for(let k=y-2;k>=0;k--){const I=this._computeIndentLevel(k);if(I>=0){h=k,f=I;break}}}if(g!==-1&&(g===-2||g<y-1)){g=-1,_=-1;for(let k=y;k<n;k++){const I=this._computeIndentLevel(k);if(I>=0){g=k,_=I;break}}}};let v=0,C=!0,w=0,S=!0,D=0,x=0;for(let y=0;C||S;y++){const k=e-y,I=e+y;y>1&&(k<1||k<t)&&(C=!1),y>1&&(I>n||I>i)&&(S=!1),y>5e4&&(C=!1,S=!1);let R=-1;if(C&&k>=1){const j=this._computeIndentLevel(k-1);j>=0?(c=k-1,d=j,R=Math.ceil(j/this.textModel.getOptions().indentSize)):(u(k),R=this._getIndentLevelForWhitespaceLine(r,l,d))}let P=-1;if(S&&I<=n){const j=this._computeIndentLevel(I-1);j>=0?(h=I-1,f=j,P=Math.ceil(j/this.textModel.getOptions().indentSize)):(b(I),P=this._getIndentLevelForWhitespaceLine(r,f,_))}if(y===0){x=R;continue}if(y===1){if(I<=n&&P>=0&&x+1===P){C=!1,v=I,w=I,D=P;continue}if(k>=1&&R>=0&&R-1===x){S=!1,v=k,w=k,D=R;continue}if(v=e,w=e,D=x,D===0)return{startLineNumber:v,endLineNumber:w,indent:D}}C&&(R>=D?v=k:C=!1),S&&(P>=D?w=I:S=!1)}return{startLineNumber:v,endLineNumber:w,indent:D}}g
Line truncated
|
|
|
|
|
`)>=0)return null;const r=o.text.match(/([)\]}>'"`])([^)\]}>'"`]*)$/);if(!r)return null;const a=r[1],l=this.context.cursorConfig.autoClosingPairs.autoClosingPairsCloseSingleChar.get(a);if(!l||l.length!==1)return null;const c=l[0].open,d=o.text.length-r[2].length-1,u=o.text.lastIndexOf(c,d-1);if(u===-1)return null;t.push([u,d])}return t}executeEdits(e,t,i,n){let o=null;t==="snippet"&&(o=this._findAutoClosingPairs(i)),o&&(i[0]._isTracked=!0);const r=[],a=[],l=this._model.pushEditOperations(this.getSelections(),i,c=>{if(o)for(let u=0,h=o.length;u<h;u++){const[f,g]=o[u],_=c[u],b=_.range.startLineNumber,v=_.range.startColumn-1+f,C=_.range.startColumn-1+g;r.push(new L(b,C+1,b,C+2)),a.push(new L(b,v+1,b,C+2))}const d=n(c);return d&&(this._isHandling=!0),d});l&&(this._isHandling=!1,this.setSelections(e,t,l,0)),r.length>0&&this._pushAutoClosedAction(r,a)}_executeEdit(e,t,i,n=0){if(this.context.cursorConfig.readOnly)return;const o=Km.from(this._model,this);this._cursors.stopTrackingSelections(),this._isHandling=!0;try{this._cursors.ensureValidState(),e()}catch(r){$e(r)}this._isHandling=!1,this._cursors.startTrackingSelections(),this._validateAutoClosedActions(),this._emitStateChangedIfNecessary(t,i,n,o,!1)&&this.revealPrimary(t,i,!1,0,!0,0)}getAutoClosedCharacters(){return GO.getAllAutoClosedCharacters(this._autoClosedActions)}startComposition(e){this._compositionState=new qm(this._model,this.getSelections())}endComposition(e,t){const i=this._compositionState?this._compositionState.deduceOutcome(this._model,this.getSelections()):null;this._compositionState=null,this._executeEdit(()=>{t==="keyboard"&&this._executeEditOperation(ei.compositionEndWithInterceptors(this._prevEditOperationType,this.context.cursorConfig,this._model,i,this.getSelections(),this.getAutoClosedCharacters()))},e,t)}type(e,t,i){this._executeEdit(()=>{if(i==="keyboard"){const n=t.length;let o=0;for(;o<n;){const r=DN(t,o),a=t.substr(o,r);this._executeEditOperation(ei.typeWithInterceptors(!!this._compositionState,this._prevEditOperationType,this.context.cursorConfig,this._model,this.getSelections(),this.getAutoClosedCharacters(),a)),o+=r}}else this._executeEditOperation(ei.typeWithoutInterceptors(this._prevEditOperationType,this.context.cursorConfig,this._model,this.getSelections(),t))},e,i)}compositionType(e,t,i,n,o,r){if(t.length===0&&i===0&&n===0){if(o!==0){const a=this.getSelections().map(l=>{const c=l.getPosition();return new le(c.lineNumber,c.column+o,c.lineNumber,c.column+o)});this.setSelections(e,r,a,0)}return}this._executeEdit(()=>{this._executeEditOperation(ei.compositionType(this._prevEditOperationType,this.context.cursorConfig,this._model,this.getSelections(),t,i,n,o))},e,r)}paste(e,t,i,n,o){this._executeEdit(()=>{this._executeEditOperation(ei.paste(this.context.cursorConfig,this._model,this.getSelections(),t,i,n||[]))},e,o,4)}cut(e,t){this._executeEdit(()=>{this._executeEditOperation(sh.cut(this.context.cursorConfig,this._model,this.getSelections()))},e,t)}executeCommand(e,t,i){this._executeEdit(()=>{this._cursors.killSecondaryCursors(),this._executeEditOperation(new ls(0,[t],{shouldPushStackElementBefore:!1,shouldPushStackElementAfter:!1}))},e,i)}executeCommands(e,t,i){this._executeEdit(()=>{this._executeEditOperation(new ls(0,t,{shouldPushStackElementBefore:!1,shouldPushStackElementAfter:!1}))},e,i)}}Wg.MAX_CURSOR_COUNT=1e4;class Km{constructor(e,t){this.modelVersionId=e,this.cursorState=t}static from(e,t){return new Km(e.getVersionId(),t.getCursorStates())}equals(e){if(!e||this.modelVersionId!==e.modelVersionId||this.cursorState.length!==e.cursorState.length)return!1;for(let t=0,i=this.cursorState.length;t<i;t++)if(!this.cursorState[t].equals(e.cursorState[t]))return!1;return!0}}class GO{constructor(e,t,i){this._model=e,this._autoClosedCharactersDecorations=t,this._autoClosedEnclosingDecorations=i}static getAllAutoClosedCharacters(e){let t=[];for(const i of e)t=t.concat(i.getAutoClosedCharactersRanges());return t}dispose(){this._autoClosedCharactersDecorations=this._model.deltaDecorations(this._autoClosedCharactersDecorations,[]),this._autoClosedEnclosingDecorations=this._model.deltaDecorations(this._autoClosedEnclosingDecorations,[])}getAutoClosedCharactersRanges(){const e=[];for(let t=0;t<this._autoClosedCharactersDecorations.length;t++){const i=this._model.getDecorationRange(this._autoClosedCharactersDecorations[t]);i&&e.push(i)}return e}isValid(e){const t=[];for(let i=0;i<this._autoClosedEnclosingDecorations.length;i++){const n=this._model.getDecorationRange(this._autoClosedEnclosingDecorations[i]);if(n&&(t.push(n),n.startLineNumber!==n.endLineNumber))return!1}t.sort(L.compareRangesUsingStarts),e.sort(L.compareRangesUsingStarts);for(let i=0;i<e.length;i++)if(i>=t.length||!t[i].strictContainsRange(e[i]))return!1;return!0}}class yee{static executeCommands(e,t,i){const n={model:e,selectionsBefore:t,trackedRanges:[],trackedRangesDirection:[]},o=this._innerExecuteCommands(n,i);for(let r=0,a=n.trackedRanges.length;r<a;r++)n.model._setTrLine truncated
|
|
|
|
|
`,"gi"):null,o=[];let r,a=0,l=0,c=0,d=0;const u=new Array;for(let g=0;g<60;g++)u.push(new Tc(Ci(0,g),0,-1,Ni.getEmpty(),new _f(Ci(0,g))));const h=new Array;for(let g=0;g<60;g++)h.push(new Tc(Ci(1,g),0,-1,Ni.getEmpty(),new _f(Ci(1,g))));if(n)for(n.lastIndex=0;(r=n.exec(e))!==null;){const g=r.index,_=r[0];if(_===`
|
|
|
|
|
`)a++,l=g+1;else{if(c!==g){let b;if(d===a){const v=g-c;if(v<u.length)b=u[v];else{const C=Ci(0,v);b=new Tc(C,0,-1,Ni.getEmpty(),new _f(C))}}else{const v=a-d,C=g-l;if(v===1&&C<h.length)b=h[C];else{const w=Ci(v,C);b=new Tc(w,0,-1,Ni.getEmpty(),new _f(w))}}o.push(b)}o.push(t.getToken(_)),c=g+_.length,d=a}}const f=e.length;if(c!==f){const g=d===a?Ci(0,f-c):Ci(a-d,f-l);o.push(new Tc(g,0,-1,Ni.getEmpty(),new _f(g)))}this.length=Ci(a,f-l),this.tokens=o}get offset(){return this._offset}read(){return this.tokens[this.idx++]||null}peek(){return this.tokens[this.idx]||null}skip(e){throw new bj}}class E2{constructor(e){this.map=e,this.hasRegExp=!1,this._regExpGlobal=null}static createFromLanguage(e,t){function i(o){return t.getKey(`${o.languageId}:::${o.bracketText}`)}const n=new Map;for(const o of e.bracketsNew.openingBrackets){const r=Ci(0,o.bracketText.length),a=i(o),l=Ni.getEmpty().add(a,YO);n.set(o.bracketText,new Tc(r,1,a,l,O1.create(r,o,l)))}for(const o of e.bracketsNew.closingBrackets){const r=Ci(0,o.bracketText.length);let a=Ni.getEmpty();const l=o.getClosedBrackets();for(const c of l)a=a.add(i(c),YO);n.set(o.bracketText,new Tc(r,2,i(l[0]),a,O1.create(r,o,a)))}return new E2(n)}getRegExpStr(){if(this.isEmpty)return null;{const e=[...this.map.keys()];return e.sort(),e.reverse(),e.map(t=>Wee(t)).join("|")}}get regExpGlobal(){if(!this.hasRegExp){const e=this.getRegExpStr();this._regExpGlobal=e?new RegExp(e,"gi"):null,this.hasRegExp=!0}return this._regExpGlobal}getToken(e){return this.map.get(e.toLowerCase())}findClosingTokenText(e){for(const[t,i]of this.map)if(i.kind===2&&i.bracketIds.intersects(e))return t}get isEmpty(){return this.map.size===0}}function Wee(s){let e=ao(s);return/^[\w ]+/.test(s)&&(e=`\\b${e}`),/[\w ]+$/.test(s)&&(e=`${e}\\b`),e}class X9{constructor(e,t){this.denseKeyProvider=e,this.getLanguageConfiguration=t,this.languageIdToBracketTokens=new Map}didLanguageChange(e){return this.languageIdToBracketTokens.has(e)}getSingleLanguageBracketTokens(e){let t=this.languageIdToBracketTokens.get(e);return t||(t=E2.createFromLanguage(this.getLanguageConfiguration(e),this.denseKeyProvider),this.languageIdToBracketTokens.set(e,t)),t}}function Vee(s){if(s.length===0)return null;if(s.length===1)return s[0];let e=0;function t(){if(e>=s.length)return null;const r=e,a=s[r].listHeight;for(e++;e<s.length&&s[e].listHeight===a;)e++;return e-r>=2?Q9(r===0&&e===s.length?s:s.slice(r,e),!1):s[r]}let i=t(),n=t();if(!n)return i;for(let r=t();r;r=t())XO(i,n)<=XO(n,r)?(i=WL(i,n),n=r):n=WL(n,r);return WL(i,n)}function Q9(s,e=!1){if(s.length===0)return null;if(s.length===1)return s[0];let t=s.length;for(;t>3;){const i=t>>1;for(let n=0;n<i;n++){const o=n<<1;s[n]=za.create23(s[o],s[o+1],o+3===t?s[o+2]:null,e)}t=i}return za.create23(s[0],s[1],t>=3?s[2]:null,e)}function XO(s,e){return Math.abs(s.listHeight-e.listHeight)}function WL(s,e){return s.listHeight===e.listHeight?za.create23(s,e,null,!1):s.listHeight>e.listHeight?Hee(s,e):zee(e,s)}function Hee(s,e){s=s.toMutable();let t=s;const i=new Array;let n;for(;;){if(e.listHeight===t.listHeight){n=e;break}if(t.kind!==4)throw new Error("unexpected");i.push(t),t=t.makeLastElementMutable()}for(let o=i.length-1;o>=0;o--){const r=i[o];n?r.childrenLength>=3?n=za.create23(r.unappendChild(),n,null,!1):(r.appendChildOfSameHeight(n),n=void 0):r.handleChildrenChanged()}return n?za.create23(s,n,null,!1):s}function zee(s,e){s=s.toMutable();let t=s;const i=new Array;for(;e.listHeight!==t.listHeight;){if(t.kind!==4)throw new Error("unexpected");i.push(t),t=t.makeFirstElementMutable()}let n=e;for(let o=i.length-1;o>=0;o--){const r=i[o];n?r.childrenLength>=3?n=za.create23(n,r.unprependChild(),null,!1):(r.prependChildOfSameHeight(n),n=void 0):r.handleChildrenChanged()}return n?za.create23(n,s,null,!1):s}class $ee{constructor(e){this.lastOffset=ir,this.nextNodes=[e],this.offsets=[ir],this.idxs=[]}readLongestNodeAt(e,t){if(lg(e,this.lastOffset))throw new Error("Invalid offset");for(this.lastOffset=e;;){const i=Jp(this.nextNodes);if(!i)return;const n=Jp(this.offsets);if(lg(e,n))return;if(lg(n,e))if(_i(n,i.length)<=e)this.nextNodeAfterCurrent();else{const o=VL(i);o!==-1?(this.nextNodes.push(i.getChild(o)),this.offsets.push(n),this.idxs.push(o)):this.nextNodeAfterCurrent()}else{if(t(i))return this.nextNodeAfterCurrent(),i;{const o=VL(i);if(o===-1){this.nextNodeAfterCurrent();return}else this.nextNodes.push(i.getChild(o)),this.offsets.push(n),this.idxs.push(o)}}}}nextNodeAfterCurrent(){for(;;){const e=Jp(this.offsets),t=Jp(this.nextNodes);if(this.nextNodes.pop(),this.offsets.pop(),this.idxs.length===0)break;const i=Jp(this.nextNodes),n=VL(i,this.idxs[this.idxs.length-1]);if(n!==-1){this.nextNodes.push(i.getChild(n)),this.offsets.push(_i(e,t.length)),this.idxs[this.idxs.length-1]=n;break}else this.idxs.pop()}}}function VL(s,e=-1){for(;;){if(e++,e>=s.childrenLength)return-1;if(s.getChild(e))return e}}function Jp(s){return s.length>0?s[s.length-1]:void 0}function eE(s,e,t,i){return new Uee(s,e,t,i).parseDocumen
Line truncated
|
|
|
|
|
`?0:1}function Cl(s){return s?s instanceof o8||s instanceof ste:!1}class T2{constructor(e,t){this._model=e,this._undoRedoService=t}pushStackElement(){const e=this._undoRedoService.getLastElement(this._model.uri);Cl(e)&&e.close()}popStackElement(){const e=this._undoRedoService.getLastElement(this._model.uri);Cl(e)&&e.open()}clear(){this._undoRedoService.removeElements(this._model.uri)}_getOrCreateEditStackElement(e){const t=this._undoRedoService.getLastElement(this._model.uri);if(Cl(t)&&t.canAppend(this._model))return t;const i=new o8(p("edit","Typing"),"undoredo.textBufferEdit",this._model,e);return this._undoRedoService.pushElement(i),i}pushEOL(e){const t=this._getOrCreateEditStackElement(null);this._model.setEOL(e),t.append(this._model,[],sE(this._model),this._model.getAlternativeVersionId(),null)}pushEditOperation(e,t,i){const n=this._getOrCreateEditStackElement(e),o=this._model.applyEdits(t,!0),r=T2._computeCursorState(i,o),a=o.map((l,c)=>({index:c,textChange:l.textChange}));return a.sort((l,c)=>l.textChange.oldPosition===c.textChange.oldPosition?l.index-c.index:l.textChange.oldPosition-c.textChange.oldPosition),n.append(this._model,a.map(l=>l.textChange),sE(this._model),this._model.getAlternativeVersionId(),r),r}static _computeCursorState(e,t){try{return e?e(t):null}catch(i){return $e(i),null}}}class ote{constructor(){this.spacesDiff=0,this.looksLikeAlignment=!1}}function rte(s,e,t,i,n){n.spacesDiff=0,n.looksLikeAlignment=!1;let o;for(o=0;o<e&&o<i;o++){const h=s.charCodeAt(o),f=t.charCodeAt(o);if(h!==f)break}let r=0,a=0;for(let h=o;h<e;h++)s.charCodeAt(h)===32?r++:a++;let l=0,c=0;for(let h=o;h<i;h++)t.charCodeAt(h)===32?l++:c++;if(r>0&&a>0||l>0&&c>0)return;const d=Math.abs(a-c),u=Math.abs(r-l);if(d===0){n.spacesDiff=u,u>0&&0<=l-1&&l-1<s.length&&l<t.length&&t.charCodeAt(l)!==32&&s.charCodeAt(l-1)===32&&s.charCodeAt(s.length-1)===44&&(n.looksLikeAlignment=!0);return}if(u%d===0){n.spacesDiff=u/d;return}}function iP(s,e,t){const i=Math.min(s.getLineCount(),1e4);let n=0,o=0,r="",a=0;const l=[2,4,6,8,3,5,7],c=8,d=[0,0,0,0,0,0,0,0,0],u=new ote;for(let g=1;g<=i;g++){const _=s.getLineLength(g),b=s.getLineContent(g),v=_<=65536;let C=!1,w=0,S=0,D=0;for(let y=0,k=_;y<k;y++){const I=v?b.charCodeAt(y):s.getLineCharCode(g,y);if(I===9)D++;else if(I===32)S++;else{C=!0,w=y;break}}if(!C||(D>0?n++:S>1&&o++,rte(r,a,b,w,u),u.looksLikeAlignment&&!(t&&e===u.spacesDiff)))continue;const x=u.spacesDiff;x<=c&&d[x]++,r=b,a=w}let h=t;n!==o&&(h=n<o);let f=e;if(h){let g=h?0:.1*i;l.forEach(_=>{const b=d[_];b>g&&(g=b,f=_)}),f===4&&d[4]>0&&d[2]>0&&d[2]>=d[4]/2&&(f=2)}return{insertSpaces:h,tabSize:f}}function cs(s){return(s.metadata&1)>>>0}function Ht(s,e){s.metadata=s.metadata&254|e<<0}function bn(s){return(s.metadata&2)>>>1===1}function Vt(s,e){s.metadata=s.metadata&253|(e?1:0)<<1}function r8(s){return(s.metadata&4)>>>2===1}function nP(s,e){s.metadata=s.metadata&251|(e?1:0)<<2}function ate(s){return(s.metadata&24)>>>3}function sP(s,e){s.metadata=s.metadata&231|e<<3}function lte(s){return(s.metadata&32)>>>5===1}function oP(s,e){s.metadata=s.metadata&223|(e?1:0)<<5}class a8{constructor(e,t,i){this.metadata=0,this.parent=this,this.left=this,this.right=this,Ht(this,1),this.start=t,this.end=i,this.delta=0,this.maxEnd=i,this.id=e,this.ownerId=0,this.options=null,nP(this,!1),sP(this,1),oP(this,!1),this.cachedVersionId=0,this.cachedAbsoluteStart=t,this.cachedAbsoluteEnd=i,this.range=null,Vt(this,!1)}reset(e,t,i,n){this.start=t,this.end=i,this.maxEnd=i,this.cachedVersionId=e,this.cachedAbsoluteStart=t,this.cachedAbsoluteEnd=i,this.range=n}setOptions(e){this.options=e;const t=this.options.className;nP(this,t==="squiggly-error"||t==="squiggly-warning"||t==="squiggly-info"),sP(this,this.options.stickiness),oP(this,this.options.collapseOnReplaceEdit)}setCachedOffsets(e,t,i){this.cachedVersionId!==i&&(this.range=null),this.cachedVersionId=i,this.cachedAbsoluteStart=e,this.cachedAbsoluteEnd=t}detach(){this.parent=null,this.left=null,this.right=null}}const Ge=new a8(null,0,0);Ge.parent=Ge;Ge.left=Ge;Ge.right=Ge;Ht(Ge,0);class zL{constructor(){this.root=Ge,this.requestNormalizeDelta=!1}intervalSearch(e,t,i,n,o){return this.root===Ge?[]:mte(this,e,t,i,n,o)}search(e,t,i){return this.root===Ge?[]:pte(this,e,t,i)}collectNodesFromOwner(e){return fte(this,e)}collectNodesPostOrder(){return gte(this)}insert(e){rP(this,e),this._normalizeDeltaIfNecessary()}delete(e){aP(this,e),this._normalizeDeltaIfNecessary()}resolveNode(e,t){const i=e;let n=0;for(;e!==this.root;)e===e.parent.right&&(n+=e.parent.delta),e=e.parent;const o=i.start+n,r=i.end+n;i.setCachedOffsets(o,r,t)}acceptReplace(e,t,i,n){const o=ute(this,e,e+t);for(let r=0,a=o.length;r<a;r++){const l=o[r];aP(this,l)}this._normalizeDeltaIfNecessary(),hte(this,e,e+t,i),this._normalizeDeltaIfNecessary();for(let r=0,a=o.length;r<a;r++){const l=o[r];l.start=l.cachedAbsoluteStart,l.end=l.cachedAbsoluteEnd,dte(l,e,e+t,i,n),l.maxEnd=l.end,rP(this,l)}this._normalizeDeltaIfNecessary()}_normalizeDeltaIfNecessary(){!this
Line truncated
|
|
|
|
|
`}if(this.shouldCheckCRLF()&&this.startWithLF(t))if(this.nodeCharCodeAt(n,o-1)===13){const _=this.positionInBuffer(n,o-1);this.deleteNodeTail(n,_),t="\r"+t,n.piece.length===0&&d.push(n)}else this.deleteNodeTail(n,c);else this.deleteNodeTail(n,c);const h=this.createNewPieces(t);u.length>0&&this.rbInsertRight(n,u);let f=n;for(let g=0;g<h.length;g++)f=this.rbInsertRight(f,h[g]);this.deleteNodes(d)}else this.insertContentToNodeRight(t,n)}else{const n=this.createNewPieces(t);let o=this.rbInsertLeft(null,n[0]);for(let r=1;r<n.length;r++)o=this.rbInsertRight(o,n[r])}this.computeBufferMetadata()}delete(e,t){if(this._lastVisitedLine.lineNumber=0,this._lastVisitedLine.value="",t<=0||this.root===Fe)return;const i=this.nodeAt(e),n=this.nodeAt(e+t),o=i.node,r=n.node;if(o===r){const h=this.positionInBuffer(o,i.remainder),f=this.positionInBuffer(o,n.remainder);if(i.nodeStartOffset===e){if(t===o.piece.length){const g=o.next();cv(this,o),this.validateCRLFWithPrevNode(g),this.computeBufferMetadata();return}this.deleteNodeHead(o,f),this._searchCache.validate(e),this.validateCRLFWithPrevNode(o),this.computeBufferMetadata();return}if(i.nodeStartOffset+o.piece.length===e+t){this.deleteNodeTail(o,h),this.validateCRLFWithNextNode(o),this.computeBufferMetadata();return}this.shrinkNode(o,h,f),this.computeBufferMetadata();return}const a=[],l=this.positionInBuffer(o,i.remainder);this.deleteNodeTail(o,l),this._searchCache.validate(e),o.piece.length===0&&a.push(o);const c=this.positionInBuffer(r,n.remainder);this.deleteNodeHead(r,c),r.piece.length===0&&a.push(r);const d=o.next();for(let h=d;h!==Fe&&h!==r;h=h.next())a.push(h);const u=o.piece.length===0?o.prev():o;this.deleteNodes(a),this.validateCRLFWithNextNode(u),this.computeBufferMetadata()}insertContentToNodeLeft(e,t){const i=[];if(this.shouldCheckCRLF()&&this.endWithCR(e)&&this.startWithLF(t)){const r=t.piece,a={line:r.start.line+1,column:0},l=new Ds(r.bufferIndex,a,r.end,this.getLineFeedCnt(r.bufferIndex,a,r.end),r.length-1);t.piece=l,e+=`
|
|
|
|
|
`,cl(this,t,-1,-1),t.piece.length===0&&i.push(t)}const n=this.createNewPieces(e);let o=this.rbInsertLeft(t,n[n.length-1]);for(let r=n.length-2;r>=0;r--)o=this.rbInsertLeft(o,n[r]);this.validateCRLFWithPrevNode(o),this.deleteNodes(i)}insertContentToNodeRight(e,t){this.adjustCarriageReturnFromNext(e,t)&&(e+=`
|
|
|
|
|
`);const i=this.createNewPieces(e),n=this.rbInsertRight(t,i[0]);let o=n;for(let r=1;r<i.length;r++)o=this.rbInsertRight(o,i[r]);this.validateCRLFWithPrevNode(n)}positionInBuffer(e,t,i){const n=e.piece,o=e.piece.bufferIndex,r=this._buffers[o].lineStarts,l=r[n.start.line]+n.start.column+t;let c=n.start.line,d=n.end.line,u=0,h=0,f=0;for(;c<=d&&(u=c+(d-c)/2|0,f=r[u],u!==d);)if(h=r[u+1],l<f)d=u-1;else if(l>=h)c=u+1;else break;return i?(i.line=u,i.column=l-f,null):{line:u,column:l-f}}getLineFeedCnt(e,t,i){if(i.column===0)return i.line-t.line;const n=this._buffers[e].lineStarts;if(i.line===n.length-1)return i.line-t.line;const o=n[i.line+1],r=n[i.line]+i.column;if(o>r+1)return i.line-t.line;const a=r-1;return this._buffers[e].buffer.charCodeAt(a)===13?i.line-t.line+1:i.line-t.line}offsetInBuffer(e,t){return this._buffers[e].lineStarts[t.line]+t.column}deleteNodes(e){for(let t=0;t<e.length;t++)cv(this,e[t])}createNewPieces(e){if(e.length>il){const d=[];for(;e.length>il;){const h=e.charCodeAt(il-1);let f;h===13||h>=55296&&h<=56319?(f=e.substring(0,il-1),e=e.substring(il-1)):(f=e.substring(0,il),e=e.substring(il));const g=gl(f);d.push(new Ds(this._buffers.length,{line:0,column:0},{line:g.length-1,column:f.length-g[g.length-1]},g.length-1,f.length)),this._buffers.push(new uu(f,g))}const u=gl(e);return d.push(new Ds(this._buffers.length,{line:0,column:0},{line:u.length-1,column:e.length-u[u.length-1]},u.length-1,e.length)),this._buffers.push(new uu(e,u)),d}let t=this._buffers[0].buffer.length;const i=gl(e,!1);let n=this._lastChangeBufferPos;if(this._buffers[0].lineStarts[this._buffers[0].lineStarts.length-1]===t&&t!==0&&this.startWithLF(e)&&this.endWithCR(this._buffers[0].buffer)){this._lastChangeBufferPos={line:this._lastChangeBufferPos.line,column:this._lastChangeBufferPos.column+1},n=this._lastChangeBufferPos;for(let d=0;d<i.length;d++)i[d]+=t+1;this._buffers[0].lineStarts=this._buffers[0].lineStarts.concat(i.slice(1)),this._buffers[0].buffer+="_"+e,t+=1}else{if(t!==0)for(let d=0;d<i.length;d++)i[d]+=t;this._buffers[0].lineStarts=this._buffers[0].lineStarts.concat(i.slice(1)),this._buffers[0].buffer+=e}const o=this._buffers[0].buffer.length,r=this._buffers[0].lineStarts.length-1,a=o-this._buffers[0].lineStarts[r],l={line:r,column:a},c=new Ds(0,n,l,this.getLineFeedCnt(0,n,l),o-t);return this._lastChangeBufferPos=l,[c]}getLineRawContent(e,t=0){let i=this.root,n="";const o=this._searchCache.get2(e);if(o){i=o.node;const r=this.getAccumulatedValue(i,e-o.nodeStartLineNumber-1),a=this._buffers[i.piece.bufferIndex].buffer,l=this.offsetInBuffer(i.piece.bufferIndex,i.piece.start);if(o.nodeStartLineNumber+i.piece.lineFeedCnt===e)n=a.substring(l+r,l+i.piece.length);else{const c=this.getAccumulatedValue(i,e-o.nodeStartLineNumber);return a.substring(l+r,l+c-t)}}else{let r=0;const a=e;for(;i!==Fe;)if(i.left!==Fe&&i.lf_left>=e-1)i=i.left;else if(i.lf_left+i.piece.lineFeedCnt>e-1){const l=this.getAccumulatedValue(i,e-i.lf_left-2),c=this.getAccumulatedValue(i,e-i.lf_left-1),d=this._buffers[i.piece.bufferIndex].buffer,u=this.offsetInBuffer(i.piece.bufferIndex,i.piece.start);return r+=i.size_left,this._searchCache.set({node:i,nodeStartOffset:r,nodeStartLineNumber:a-(e-1-i.lf_left)}),d.substring(u+l,u+c-t)}else if(i.lf_left+i.piece.lineFeedCnt===e-1){const l=this.getAccumulatedValue(i,e-i.lf_left-2),c=this._buffers[i.piece.bufferIndex].buffer,d=this.offsetInBuffer(i.piece.bufferIndex,i.piece.start);n=c.substring(d+l,d+i.piece.length);break}else e-=i.lf_left+i.piece.lineFeedCnt,r+=i.size_left+i.piece.length,i=i.right}for(i=i.next();i!==Fe;){const r=this._buffers[i.piece.bufferIndex].buffer;if(i.piece.lineFeedCnt>0){const a=this.getAccumulatedValue(i,0),l=this.offsetInBuffer(i.piece.bufferIndex,i.piece.start);return n+=r.substring(l,l+a-t),n}else{const a=this.offsetInBuffer(i.piece.bufferIndex,i.piece.start);n+=r.substr(a,i.piece.length)}i=i.next()}return n}computeBufferMetadata(){let e=this.root,t=1,i=0;for(;e!==Fe;)t+=e.lf_left+e.piece.lineFeedCnt,i+=e.size_left+e.piece.length,e=e.right;this._lineCnt=t,this._length=i,this._searchCache.validate(this._length)}getIndexOf(e,t){const i=e.piece,n=this.positionInBuffer(e,t),o=n.line-i.start.line;if(this.offsetInBuffer(i.bufferIndex,i.end)-this.offsetInBuffer(i.bufferIndex,i.start)===t){const r=this.getLineFeedCnt(e.piece.bufferIndex,i.start,n);if(r!==o)return{index:r,remainder:0}}return{index:o,remainder:n.column}}getAccumulatedValue(e,t){if(t<0)return 0;const i=e.piece,n=this._buffers[i.bufferIndex].lineStarts,o=i.start.line+t+1;return o>i.end.line?n[i.end.line]+i.end.column-n[i.start.line]-i.start.column:n[o]-n[i.start.line]-i.start.column}deleteNodeTail(e,t){const i=e.piece,n=i.lineFeedCnt,o=this.offsetInBuffer(i.bufferIndex,i.end),r=t,a=this.offsetInBuffer(i.bufferIndex,r),l=this.getLineFeedCnt(i.bufferIndex,i.start,r),c=l-n,d=a-o,u=i.length+d;e.piece=new Ds(i.bufferIndex,i.start,r,l,u),cl(this,e,d,c)}deleteNodeHead(e,t){const i=e.piece,n=i.lineFeedCnt,o=this.offsetInBuffer(i.bufferIndex,
Line truncated
|
|
|
|
|
`);const i=this.shouldCheckCRLF()&&this.startWithLF(t)&&this.endWithCR(e),n=this._buffers[0].buffer.length;this._buffers[0].buffer+=t;const o=gl(t,!1);for(let f=0;f<o.length;f++)o[f]+=n;if(i){const f=this._buffers[0].lineStarts[this._buffers[0].lineStarts.length-2];this._buffers[0].lineStarts.pop(),this._lastChangeBufferPos={line:this._lastChangeBufferPos.line-1,column:n-f}}this._buffers[0].lineStarts=this._buffers[0].lineStarts.concat(o.slice(1));const r=this._buffers[0].lineStarts.length-1,a=this._buffers[0].buffer.length-this._buffers[0].lineStarts[r],l={line:r,column:a},c=e.piece.length+t.length,d=e.piece.lineFeedCnt,u=this.getLineFeedCnt(0,e.piece.start,l),h=u-d;e.piece=new Ds(e.piece.bufferIndex,e.piece.start,l,u,c),this._lastChangeBufferPos=l,cl(this,e,t.length,h)}nodeAt(e){let t=this.root;const i=this._searchCache.get(e);if(i)return{node:i.node,nodeStartOffset:i.nodeStartOffset,remainder:e-i.nodeStartOffset};let n=0;for(;t!==Fe;)if(t.size_left>e)t=t.left;else if(t.size_left+t.piece.length>=e){n+=t.size_left;const o={node:t,remainder:e-t.size_left,nodeStartOffset:n};return this._searchCache.set(o),o}else e-=t.size_left+t.piece.length,n+=t.size_left+t.piece.length,t=t.right;return null}nodeAt2(e,t){let i=this.root,n=0;for(;i!==Fe;)if(i.left!==Fe&&i.lf_left>=e-1)i=i.left;else if(i.lf_left+i.piece.lineFeedCnt>e-1){const o=this.getAccumulatedValue(i,e-i.lf_left-2),r=this.getAccumulatedValue(i,e-i.lf_left-1);return n+=i.size_left,{node:i,remainder:Math.min(o+t-1,r),nodeStartOffset:n}}else if(i.lf_left+i.piece.lineFeedCnt===e-1){const o=this.getAccumulatedValue(i,e-i.lf_left-2);if(o+t-1<=i.piece.length)return{node:i,remainder:o+t-1,nodeStartOffset:n};t-=i.piece.length-o;break}else e-=i.lf_left+i.piece.lineFeedCnt,n+=i.size_left+i.piece.length,i=i.right;for(i=i.next();i!==Fe;){if(i.piece.lineFeedCnt>0){const o=this.getAccumulatedValue(i,0),r=this.offsetOfNode(i);return{node:i,remainder:Math.min(t-1,o),nodeStartOffset:r}}else if(i.piece.length>=t-1){const o=this.offsetOfNode(i);return{node:i,remainder:t-1,nodeStartOffset:o}}else t-=i.piece.length;i=i.next()}return null}nodeCharCodeAt(e,t){if(e.piece.lineFeedCnt<1)return-1;const i=this._buffers[e.piece.bufferIndex],n=this.offsetInBuffer(e.piece.bufferIndex,e.piece.start)+t;return i.buffer.charCodeAt(n)}offsetOfNode(e){if(!e)return 0;let t=e.size_left;for(;e!==this.root;)e.parent.right===e&&(t+=e.parent.size_left+e.parent.piece.length),e=e.parent;return t}shouldCheckCRLF(){return!(this._EOLNormalized&&this._EOL===`
|
|
|
|
|
`)}startWithLF(e){if(typeof e=="string")return e.charCodeAt(0)===10;if(e===Fe||e.piece.lineFeedCnt===0)return!1;const t=e.piece,i=this._buffers[t.bufferIndex].lineStarts,n=t.start.line,o=i[n]+t.start.column;return n===i.length-1||i[n+1]>o+1?!1:this._buffers[t.bufferIndex].buffer.charCodeAt(o)===10}endWithCR(e){return typeof e=="string"?e.charCodeAt(e.length-1)===13:e===Fe||e.piece.lineFeedCnt===0?!1:this.nodeCharCodeAt(e,e.piece.length-1)===13}validateCRLFWithPrevNode(e){if(this.shouldCheckCRLF()&&this.startWithLF(e)){const t=e.prev();this.endWithCR(t)&&this.fixCRLF(t,e)}}validateCRLFWithNextNode(e){if(this.shouldCheckCRLF()&&this.endWithCR(e)){const t=e.next();this.startWithLF(t)&&this.fixCRLF(e,t)}}fixCRLF(e,t){const i=[],n=this._buffers[e.piece.bufferIndex].lineStarts;let o;e.piece.end.column===0?o={line:e.piece.end.line-1,column:n[e.piece.end.line]-n[e.piece.end.line-1]-1}:o={line:e.piece.end.line,column:e.piece.end.column-1};const r=e.piece.length-1,a=e.piece.lineFeedCnt-1;e.piece=new Ds(e.piece.bufferIndex,e.piece.start,o,a,r),cl(this,e,-1,-1),e.piece.length===0&&i.push(e);const l={line:t.piece.start.line+1,column:0},c=t.piece.length-1,d=this.getLineFeedCnt(t.piece.bufferIndex,l,t.piece.end);t.piece=new Ds(t.piece.bufferIndex,l,t.piece.end,d,c),cl(this,t,-1,-1),t.piece.length===0&&i.push(t);const u=this.createNewPieces(`\r
|
|
|
|
|
`);this.rbInsertRight(e,u[0]);for(let h=0;h<i.length;h++)cv(this,i[h])}adjustCarriageReturnFromNext(e,t){if(this.shouldCheckCRLF()&&this.endWithCR(e)){const i=t.next();if(this.startWithLF(i)){if(e+=`
|
|
|
|
|
`,i.piece.length===1)cv(this,i);else{const n=i.piece,o={line:n.start.line+1,column:0},r=n.length-1,a=this.getLineFeedCnt(n.bufferIndex,o,n.end);i.piece=new Ds(n.bufferIndex,o,n.end,a,r),cl(this,i,-1,-1)}return!0}}return!1}iterate(e,t){if(e===Fe)return t(Fe);const i=this.iterate(e.left,t);return i&&t(e)&&this.iterate(e.right,t)}getNodeContent(e){if(e===Fe)return"";const t=this._buffers[e.piece.bufferIndex],i=e.piece,n=this.offsetInBuffer(i.bufferIndex,i.start),o=this.offsetInBuffer(i.bufferIndex,i.end);return t.buffer.substring(n,o)}getPieceContent(e){const t=this._buffers[e.bufferIndex],i=this.offsetInBuffer(e.bufferIndex,e.start),n=this.offsetInBuffer(e.bufferIndex,e.end);return t.buffer.substring(i,n)}rbInsertRight(e,t){const i=new oE(t,1);if(i.left=Fe,i.right=Fe,i.parent=Fe,i.size_left=0,i.lf_left=0,this.root===Fe)this.root=i,i.color=0;else if(e.right===Fe)e.right=i,i.parent=e;else{const o=N2(e.right);o.left=i,i.parent=o}return lP(this,i),i}rbInsertLeft(e,t){const i=new oE(t,1);if(i.left=Fe,i.right=Fe,i.parent=Fe,i.size_left=0,i.lf_left=0,this.root===Fe)this.root=i,i.color=0;else if(e.left===Fe)e.left=i,i.parent=e;else{const n=c8(e.left);n.right=i,i.parent=n}return lP(this,i),i}}class cg extends q{constructor(e,t,i,n,o,r,a){super(),this._onDidChangeContent=this._register(new W),this._BOM=t,this._mightContainNonBasicASCII=!r,this._mightContainRTL=n,this._mightContainUnusualLineTerminators=o,this._pieceTree=new Lte(e,i,a)}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(e){return this._pieceTree.createSnapshot(e?this._BOM:"")}getOffsetAt(e,t){return this._pieceTree.getOffsetAt(e,t)}getPositionAt(e){return this._pieceTree.getPositionAt(e)}getRangeAt(e,t){const i=e+t,n=this.getPositionAt(e),o=this.getPositionAt(i);return new L(n.lineNumber,n.column,o.lineNumber,o.column)}getValueInRange(e,t=0){if(e.isEmpty())return"";const i=this._getEndOfLine(t);return this._pieceTree.getValueInRange(e,i)}getValueLengthInRange(e,t=0){if(e.isEmpty())return 0;if(e.startLineNumber===e.endLineNumber)return e.endColumn-e.startColumn;const i=this.getOffsetAt(e.startLineNumber,e.startColumn);return this.getOffsetAt(e.endLineNumber,e.endColumn)-i}getCharacterCountInRange(e,t=0){if(this._mightContainNonBasicASCII){let i=0;const n=e.startLineNumber,o=e.endLineNumber;for(let r=n;r<=o;r++){const a=this.getLineContent(r),l=r===n?e.startColumn-1:0,c=r===o?e.endColumn-1:a.length;for(let d=l;d<c;d++)Ui(a.charCodeAt(d))?(i=i+1,d=d+1):i=i+1}return i+=this._getEndOfLine(t).length*(o-n),i}return this.getValueLengthInRange(e,t)}getLength(){return this._pieceTree.getLength()}getLineCount(){return this._pieceTree.getLineCount()}getLinesContent(){return this._pieceTree.getLinesContent()}getLineContent(e){return this._pieceTree.getLineContent(e)}getLineCharCode(e,t){return this._pieceTree.getLineCharCode(e,t)}getLineLength(e){return this._pieceTree.getLineLength(e)}getLineFirstNonWhitespaceColumn(e){const t=is(this.getLineContent(e));return t===-1?0:t+1}getLineLastNonWhitespaceColumn(e){const t=Ra(this.getLineContent(e));return t===-1?0:t+2}_getEndOfLine(e){switch(e){case 1:return`
|
|
|
|
|
`;case 2:return`\r
|
|
|
|
|
`;case 0:return this.getEOL();default:throw new Error("Unknown EOL preference")}}setEOL(e){this._pieceTree.setEOL(e)}applyEdits(e,t,i){let n=this._mightContainRTL,o=this._mightContainUnusualLineTerminators,r=this._mightContainNonBasicASCII,a=!0,l=[];for(let _=0;_<e.length;_++){const b=e[_];a&&b._isTracked&&(a=!1);const v=b.range;if(b.text){let x=!0;r||(x=!tS(b.text),r=x),!n&&x&&(n=Dg(b.text)),!o&&x&&(o=i3(b.text))}let C="",w=0,S=0,D=0;if(b.text){let x;[w,S,D,x]=oh(b.text);const y=this.getEOL();x===0||x===(y===`\r
|
|
|
|
|
`?2:1)?C=b.text:C=b.text.replace(/\r\n|\r|\n/g,y)}l[_]={sortIndex:_,identifier:b.identifier||null,range:v,rangeOffset:this.getOffsetAt(v.startLineNumber,v.startColumn),rangeLength:this.getValueLengthInRange(v),text:C,eolCount:w,firstLineLength:S,lastLineLength:D,forceMoveMarkers:Boolean(b.forceMoveMarkers),isAutoWhitespaceEdit:b.isAutoWhitespaceEdit||!1}}l.sort(cg._sortOpsAscending);let c=!1;for(let _=0,b=l.length-1;_<b;_++){const v=l[_].range.getEndPosition(),C=l[_+1].range.getStartPosition();if(C.isBeforeOrEqual(v)){if(C.isBefore(v))throw new Error("Overlapping ranges are not allowed!");c=!0}}a&&(l=this._reduceOperations(l));const d=i||t?cg._getInverseEditRanges(l):[],u=[];if(t)for(let _=0;_<l.length;_++){const b=l[_],v=d[_];if(b.isAutoWhitespaceEdit&&b.range.isEmpty())for(let C=v.startLineNumber;C<=v.endLineNumber;C++){let w="";C===v.startLineNumber&&(w=this.getLineContent(b.range.startLineNumber),is(w)!==-1)||u.push({lineNumber:C,oldContent:w})}}let h=null;if(i){let _=0;h=[];for(let b=0;b<l.length;b++){const v=l[b],C=d[b],w=this.getValueInRange(v.range),S=v.rangeOffset+_;_+=v.text.length-w.length,h[b]={sortIndex:v.sortIndex,identifier:v.identifier,range:C,text:w,textChange:new fn(v.rangeOffset,w,S,v.text)}}c||h.sort((b,v)=>b.sortIndex-v.sortIndex)}this._mightContainRTL=n,this._mightContainUnusualLineTerminators=o,this._mightContainNonBasicASCII=r;const f=this._doApplyEdits(l);let g=null;if(t&&u.length>0){u.sort((_,b)=>b.lineNumber-_.lineNumber),g=[];for(let _=0,b=u.length;_<b;_++){const v=u[_].lineNumber;if(_>0&&u[_-1].lineNumber===v)continue;const C=u[_].oldContent,w=this.getLineContent(v);w.length===0||w===C||is(w)!==-1||g.push(v)}}return this._onDidChangeContent.fire(),new EK(h,f,g)}_reduceOperations(e){return e.length<1e3?e:[this._toSingleEditOperation(e)]}_toSingleEditOperation(e){let t=!1;const i=e[0].range,n=e[e.length-1].range,o=new L(i.startLineNumber,i.startColumn,n.endLineNumber,n.endColumn);let r=i.startLineNumber,a=i.startColumn;const l=[];for(let f=0,g=e.length;f<g;f++){const _=e[f],b=_.range;t=t||_.forceMoveMarkers,l.push(this.getValueInRange(new L(r,a,b.startLineNumber,b.startColumn))),_.text.length>0&&l.push(_.text),r=b.endLineNumber,a=b.endColumn}const c=l.join(""),[d,u,h]=oh(c);return{sortIndex:0,identifier:e[0].identifier,range:o,rangeOffset:this.getOffsetAt(o.startLineNumber,o.startColumn),rangeLength:this.getValueLengthInRange(o,0),text:c,eolCount:d,firstLineLength:u,lastLineLength:h,forceMoveMarkers:t,isAutoWhitespaceEdit:!1}}_doApplyEdits(e){e.sort(cg._sortOpsDescending);const t=[];for(let i=0;i<e.length;i++){const n=e[i],o=n.range.startLineNumber,r=n.range.startColumn,a=n.range.endLineNumber,l=n.range.endColumn;if(o===a&&r===l&&n.text.length===0)continue;n.text?(this._pieceTree.delete(n.rangeOffset,n.rangeLength),this._pieceTree.insert(n.rangeOffset,n.text,!0)):this._pieceTree.delete(n.rangeOffset,n.rangeLength);const c=new L(o,r,a,l);t.push({range:c,rangeLength:n.rangeLength,text:n.text,rangeOffset:n.rangeOffset,forceMoveMarkers:n.forceMoveMarkers})}return t}findMatchesLineByLine(e,t,i,n){return this._pieceTree.findMatchesLineByLine(e,t,i,n)}static _getInverseEditRanges(e){const t=[];let i=0,n=0,o=null;for(let r=0,a=e.length;r<a;r++){const l=e[r];let c,d;o?o.range.endLineNumber===l.range.startLineNumber?(c=i,d=n+(l.range.startColumn-o.range.endColumn)):(c=i+(l.range.startLineNumber-o.range.endLineNumber),d=l.range.startColumn):(c=l.range.startLineNumber,d=l.range.startColumn);let u;if(l.text.length>0){const h=l.eolCount+1;h===1?u=new L(c,d,c,d+l.firstLineLength):u=new L(c,d,c+h-1,l.lastLineLength+1)}else u=new L(c,d,c,d);i=u.endLineNumber,n=u.endColumn,t.push(u),o=l}return t}static _sortOpsAscending(e,t){const i=L.compareRangesUsingEnds(e.range,t.range);return i===0?e.sortIndex-t.sortIndex:i}static _sortOpsDescending(e,t){const i=L.compareRangesUsingEnds(e.range,t.range);return i===0?t.sortIndex-e.sortIndex:-i}}class kte{constructor(e,t,i,n,o,r,a,l,c){this._chunks=e,this._bom=t,this._cr=i,this._lf=n,this._crlf=o,this._containsRTL=r,this._containsUnusualLineTerminators=a,this._isBasicASCII=l,this._normalizeEOL=c}_getEOL(e){const t=this._cr+this._lf+this._crlf,i=this._cr+this._crlf;return t===0?e===1?`
|
|
|
|
|
`:`\r
|
|
|
|
|
`:i>t/2?`\r
|
|
|
|
|
`:`
|
|
|
|
|
`}create(e){const t=this._getEOL(e),i=this._chunks;if(this._normalizeEOL&&(t===`\r
|
|
|
|
|
`&&(this._cr>0||this._lf>0)||t===`
|
|
|
|
|
`&&(this._cr>0||this._crlf>0)))for(let o=0,r=i.length;o<r;o++){const a=i[o].buffer.replace(/\r\n|\r|\n/g,t),l=gl(a);i[o]=new uu(a,l)}const n=new cg(i,this._bom,t,this._containsRTL,this._containsUnusualLineTerminators,this._isBasicASCII,this._normalizeEOL);return{textBuffer:n,disposable:n}}}class u8{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(e){if(e.length===0)return;this.chunks.length===0&&EN(e)&&(this.BOM=rK,e=e.substr(1));const t=e.charCodeAt(e.length-1);t===13||t>=55296&&t<=56319?(this._acceptChunk1(e.substr(0,e.length-1),!1),this._hasPreviousChar=!0,this._previousChar=t):(this._acceptChunk1(e,!1),this._hasPreviousChar=!1,this._previousChar=t)}_acceptChunk1(e,t){!t&&e.length===0||(this._hasPreviousChar?this._acceptChunk2(String.fromCharCode(this._previousChar)+e):this._acceptChunk2(e))}_acceptChunk2(e){const t=wte(this._tmpLineStarts,e);this.chunks.push(new uu(e,t.lineStarts)),this.cr+=t.cr,this.lf+=t.lf,this.crlf+=t.crlf,this.isBasicASCII&&(this.isBasicASCII=t.isBasicASCII),!this.isBasicASCII&&!this.containsRTL&&(this.containsRTL=Dg(e)),!this.isBasicASCII&&!this.containsUnusualLineTerminators&&(this.containsUnusualLineTerminators=i3(e))}finish(e=!0){return this._finish(),new kte(this.chunks,this.BOM,this.cr,this.lf,this.crlf,this.containsRTL,this.containsUnusualLineTerminators,this.isBasicASCII,e)}_finish(){if(this.chunks.length===0&&this._acceptChunk1("",!0),this._hasPreviousChar){this._hasPreviousChar=!1;const e=this.chunks[this.chunks.length-1];e.buffer+=String.fromCharCode(this._previousChar);const t=gl(e.buffer);e.lineStarts=t,this._previousChar===13&&this.cr++}}}class Dte{constructor(e,t){this._startLineNumber=e,this._tokens=t}get startLineNumber(){return this._startLineNumber}get endLineNumber(){return this._startLineNumber+this._tokens.length-1}getLineTokens(e){return this._tokens[e-this._startLineNumber]}appendLineTokens(e){this._tokens.push(e)}}class jL{constructor(){this._tokens=[]}add(e,t){if(this._tokens.length>0){const i=this._tokens[this._tokens.length-1];if(i.endLineNumber+1===e){i.appendLineTokens(t);return}}this._tokens.push(new Dte(e,[t]))}finalize(){return this._tokens}}class cP{constructor(e){this._default=e,this._store=[]}get(e){return e<this._store.length?this._store[e]:this._default}set(e,t){for(;e>=this._store.length;)this._store[this._store.length]=this._default;this._store[e]=t}delete(e,t){t===0||e>=this._store.length||this._store.splice(e,t)}insert(e,t){if(t===0||e>=this._store.length)return;const i=[];for(let n=0;n<t;n++)i[n]=this._default;this._store=Zw(this._store,e,i)}}class xte{constructor(e,t){this.tokenizationSupport=e,this.initialState=t,this._lineBeginState=new cP(null),this._lineNeedsTokenization=new cP(!0),this._firstLineNeedsTokenization=0,this._lineBeginState.set(0,this.initialState)}get invalidLineStartIndex(){return this._firstLineNeedsTokenization}markMustBeTokenized(e){this._lineNeedsTokenization.set(e,!0),this._firstLineNeedsTokenization=Math.min(this._firstLineNeedsTokenization,e)}getBeginState(e){return this._lineBeginState.get(e)}setEndState(e,t,i){if(this._lineNeedsTokenization.set(t,!1),this._firstLineNeedsTokenization=t+1,t===e-1)return;const n=this._lineBeginState.get(t+1);if(n===null||!i.equals(n)){this._lineBeginState.set(t+1,i),this.markMustBeTokenized(t+1);return}let o=t+1;for(;o<e&&!this._lineNeedsTokenization.get(o);)o++;this._firstLineNeedsTokenization=o}applyEdits(e,t){this.markMustBeTokenized(e.startLineNumber-1),this._lineBeginState.delete(e.startLineNumber,e.endLineNumber-e.startLineNumber),this._lineNeedsTokenization.delete(e.startLineNumber,e.endLineNumber-e.startLineNumber),this._lineBeginState.insert(e.startLineNumber,t),this._lineNeedsTokenization.insert(e.startLineNumber,t)}}class Ete extends q{constructor(e,t,i){super(),this._textModel=e,this._tokenizationPart=t,this._languageIdCodec=i,this._isScheduled=!1,this._isDisposed=!1,this._tokenizationStateStore=null,this._register(ni.onDidChange(n=>{const o=this._textModel.getLanguageId();n.changedLanguages.indexOf(o)!==-1&&(this._resetTokenizationState(),this._tokenizationPart.clearTokens())})),this._resetTokenizationState()}dispose(){this._isDisposed=!0,super.dispose()}handleDidChangeContent(e){if(e.isFlush){this._resetTokenizationState();return}if(this._tokenizationStateStore)for(let t=0,i=e.changes.length;t<i;t++){const n=e.changes[t],[o]=oh(n.text);this._tokenizationStateStore.applyEdits(n.range,o)}this._beginBackgroundTokenization()}handleDidChangeAttached(){this._beginBackgroundTokenization()}handleDidChangeLanguage(e){this._resetTokenizationState(),this._tokenizationPart.clearTokens()}_resetTokenizationState(){const[e,t]=Ite(this._textModel,this._tokenizationPart);e&&t?this._tokenizationStateStore=new xte(e,t):this._tokenizationStateStore=null,this._beginBackgroundTokenization()}_beginBackgroun
Line truncated
|
|
|
|
|
`,!1,!1,!0,!0);e.dispose(),this._buffer=e,this._bufferDisposable=q.None}_assertNotDisposed(){if(this._isDisposed)throw new Error("Model is disposed!")}_emitContentChangedEvent(e,t){this.__isDisposing||(this._tokenizationTextModelPart.handleDidChangeContent(t),this._bracketPairs.handleDidChangeContent(t),this._eventEmitter.fire(new Pu(e,t)))}setValue(e){if(this._assertNotDisposed(),e===null)return;const{textBuffer:t,disposable:i}=uP(e,this._options.defaultEOL);this._setValueFromTextBuffer(t,i)}_createContentChanged2(e,t,i,n,o,r,a){return{changes:[{range:e,rangeOffset:t,rangeLength:i,text:n}],eol:this._buffer.getEOL(),versionId:this.getVersionId(),isUndoing:o,isRedoing:r,isFlush:a}}_setValueFromTextBuffer(e,t){this._assertNotDisposed();const i=this.getFullModelRange(),n=this.getValueLengthInRange(i),o=this.getLineCount(),r=this.getLineMaxColumn(o);this._buffer=e,this._bufferDisposable.dispose(),this._bufferDisposable=t,this._increaseVersionId(),this._tokenizationTextModelPart.flush(),this._decorations=Object.create(null),this._decorationsTree=new hP,this._commandManager.clear(),this._trimAutoWhitespaceLines=null,this._emitContentChangedEvent(new ag([new XJ],this._versionId,!1,!1),this._createContentChanged2(new L(1,1,o,r),0,n,this.getValue(),!1,!1,!0))}setEOL(e){this._assertNotDisposed();const t=e===1?`\r
|
|
|
|
|
`:`
|
|
|
|
|
`;if(this._buffer.getEOL()===t)return;const i=this.getFullModelRange(),n=this.getValueLengthInRange(i),o=this.getLineCount(),r=this.getLineMaxColumn(o);this._onBeforeEOLChange(),this._buffer.setEOL(t),this._increaseVersionId(),this._onAfterEOLChange(),this._emitContentChangedEvent(new ag([new eee],this._versionId,!1,!1),this._createContentChanged2(new L(1,1,o,r),0,n,this.getValue(),!1,!1,!1))}_onBeforeEOLChange(){this._decorationsTree.ensureAllNodesHaveRanges(this)}_onAfterEOLChange(){const e=this.getVersionId(),t=this._decorationsTree.collectNodesPostOrder();for(let i=0,n=t.length;i<n;i++){const o=t[i],r=o.range,a=o.cachedAbsoluteStart-o.start,l=this._buffer.getOffsetAt(r.startLineNumber,r.startColumn),c=this._buffer.getOffsetAt(r.endLineNumber,r.endColumn);o.cachedAbsoluteStart=l,o.cachedAbsoluteEnd=c,o.cachedVersionId=e,o.start=l-a,o.end=c-a,pd(o)}}onBeforeAttached(){this._attachedEditorCount++,this._attachedEditorCount===1&&(this._tokenizationTextModelPart.handleDidChangeAttached(),this._onDidChangeAttached.fire(void 0))}onBeforeDetached(){this._attachedEditorCount--,this._attachedEditorCount===0&&(this._tokenizationTextModelPart.handleDidChangeAttached(),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 e=0,t=0;const i=this._buffer.getLineCount();for(let n=1;n<=i;n++){const o=this._buffer.getLineLength(n);o>=Rte?t+=o:e+=o}return t>e}get uri(){return this._associatedResource}getOptions(){return this._assertNotDisposed(),this._options}getFormattingOptions(){return{tabSize:this._options.indentSize,insertSpaces:this._options.insertSpaces}}updateOptions(e){this._assertNotDisposed();const t=typeof e.tabSize<"u"?e.tabSize:this._options.tabSize,i=typeof e.indentSize<"u"?e.indentSize:this._options.indentSize,n=typeof e.insertSpaces<"u"?e.insertSpaces:this._options.insertSpaces,o=typeof e.trimAutoWhitespace<"u"?e.trimAutoWhitespace:this._options.trimAutoWhitespace,r=typeof e.bracketColorizationOptions<"u"?e.bracketColorizationOptions:this._options.bracketPairColorizationOptions,a=new dC({tabSize:t,indentSize:i,insertSpaces:n,defaultEOL:this._options.defaultEOL,trimAutoWhitespace:o,bracketPairColorizationOptions:r});if(this._options.equals(a))return;const l=this._options.createChangeEvent(a);this._options=a,this._bracketPairs.handleDidChangeOptions(l),this._decorationProvider.handleDidChangeOptions(l),this._onDidChangeOptions.fire(l)}detectIndentation(e,t){this._assertNotDisposed();const i=iP(this._buffer,t,e);this.updateOptions({insertSpaces:i.insertSpaces,tabSize:i.tabSize,indentSize:i.tabSize})}normalizeIndentation(e){return this._assertNotDisposed(),k1(e,this._options.indentSize,this._options.insertSpaces)}getVersionId(){return this._assertNotDisposed(),this._versionId}mightContainRTL(){return this._buffer.mightContainRTL()}mightContainUnusualLineTerminators(){return this._buffer.mightContainUnusualLineTerminators()}removeUnusualLineTerminators(e=null){const t=this.findMatches(t3.source,!1,!0,!1,null,!1,1073741824);this._buffer.resetMightContainUnusualLineTerminators(),this.pushEditOperations(e,t.map(i=>({range:i.range,text:null})),()=>null)}mightContainNonBasicASCII(){return this._buffer.mightContainNonBasicASCII()}getAlternativeVersionId(){return this._assertNotDisposed(),this._alternativeVersionId}getInitialUndoRedoSnapshot(){return this._assertNotDisposed(),this._initialUndoRedoSnapshot}getOffsetAt(e){this._assertNotDisposed();const t=this._validatePosition(e.lineNumber,e.column,0);return this._buffer.getOffsetAt(t.lineNumber,t.column)}getPositionAt(e){this._assertNotDisposed();const t=Math.min(this._buffer.getLength(),Math.max(0,e));return this._buffer.getPositionAt(t)}_increaseVersionId(){this._versionId=this._versionId+1,this._alternativeVersionId=this._versionId}_overwriteVersionId(e){this._versionId=e}_overwriteAlternativeVersionId(e){this._alternativeVersionId=e}_overwriteInitialUndoRedoSnapshot(e){this._initialUndoRedoSnapshot=e}getValue(e,t=!1){this._assertNotDisposed();const i=this.getFullModelRange(),n=this.getValueInRange(i,e);return t?this._buffer.getBOM()+n:n}createSnapshot(e=!1){return new Ote(this._buffer.createSnapshot(e))}getValueLength(e,t=!1){this._assertNotDisposed();const i=this.getFullModelRange(),n=this.getValueLengthInRange(i,e);return t?this._buffer.getBOM().length+n:n}getValueInRange(e,t=0){return this._assertNotDisposed(),this._buffer.getValueInRange(this.validateRange(e),t)}getValueLengthInRange(e,t=0){return this._assertNotDisposed(),this._buffer.getValueLengthInRange(this.validateRange(e),t)}getCharacterCountInRange(e,t=0){return this._assertNotDisposed(),this._buffer.getCharacterCountInRange(this.validateRange(e),t)
Line truncated
|
|
|
|
|
`?0:1}getLineMinColumn(e){return this._assertNotDisposed(),1}getLineMaxColumn(e){if(this._assertNotDisposed(),e<1||e>this.getLineCount())throw new Error("Illegal value for lineNumber");return this._buffer.getLineLength(e)+1}getLineFirstNonWhitespaceColumn(e){if(this._assertNotDisposed(),e<1||e>this.getLineCount())throw new Error("Illegal value for lineNumber");return this._buffer.getLineFirstNonWhitespaceColumn(e)}getLineLastNonWhitespaceColumn(e){if(this._assertNotDisposed(),e<1||e>this.getLineCount())throw new Error("Illegal value for lineNumber");return this._buffer.getLineLastNonWhitespaceColumn(e)}_validateRangeRelaxedNoAllocations(e){const t=this._buffer.getLineCount(),i=e.startLineNumber,n=e.startColumn;let o=Math.floor(typeof i=="number"&&!isNaN(i)?i:1),r=Math.floor(typeof n=="number"&&!isNaN(n)?n:1);if(o<1)o=1,r=1;else if(o>t)o=t,r=this.getLineMaxColumn(o);else if(r<=1)r=1;else{const u=this.getLineMaxColumn(o);r>=u&&(r=u)}const a=e.endLineNumber,l=e.endColumn;let c=Math.floor(typeof a=="number"&&!isNaN(a)?a:1),d=Math.floor(typeof l=="number"&&!isNaN(l)?l:1);if(c<1)c=1,d=1;else if(c>t)c=t,d=this.getLineMaxColumn(c);else if(d<=1)d=1;else{const u=this.getLineMaxColumn(c);d>=u&&(d=u)}return i===o&&n===r&&a===c&&l===d&&e instanceof L&&!(e instanceof le)?e:new L(o,r,c,d)}_isValidPosition(e,t,i){if(typeof e!="number"||typeof t!="number"||isNaN(e)||isNaN(t)||e<1||t<1||(e|0)!==e||(t|0)!==t)return!1;const n=this._buffer.getLineCount();if(e>n)return!1;if(t===1)return!0;const o=this.getLineMaxColumn(e);if(t>o)return!1;if(i===1){const r=this._buffer.getLineCharCode(e,t-2);if(Ui(r))return!1}return!0}_validatePosition(e,t,i){const n=Math.floor(typeof e=="number"&&!isNaN(e)?e:1),o=Math.floor(typeof t=="number"&&!isNaN(t)?t:1),r=this._buffer.getLineCount();if(n<1)return new H(1,1);if(n>r)return new H(r,this.getLineMaxColumn(r));if(o<=1)return new H(n,1);const a=this.getLineMaxColumn(n);if(o>=a)return new H(n,a);if(i===1){const l=this._buffer.getLineCharCode(n,o-2);if(Ui(l))return new H(n,o-1)}return new H(n,o)}validatePosition(e){return this._assertNotDisposed(),e instanceof H&&this._isValidPosition(e.lineNumber,e.column,1)?e:this._validatePosition(e.lineNumber,e.column,1)}_isValidRange(e,t){const i=e.startLineNumber,n=e.startColumn,o=e.endLineNumber,r=e.endColumn;if(!this._isValidPosition(i,n,0)||!this._isValidPosition(o,r,0))return!1;if(t===1){const a=n>1?this._buffer.getLineCharCode(i,n-2):0,l=r>1&&r<=this._buffer.getLineLength(o)?this._buffer.getLineCharCode(o,r-2):0,c=Ui(a),d=Ui(l);return!c&&!d}return!0}validateRange(e){if(this._assertNotDisposed(),e instanceof L&&!(e instanceof le)&&this._isValidRange(e,1))return e;const i=this._validatePosition(e.startLineNumber,e.startColumn,0),n=this._validatePosition(e.endLineNumber,e.endColumn,0),o=i.lineNumber,r=i.column,a=n.lineNumber,l=n.column;{const c=r>1?this._buffer.getLineCharCode(o,r-2):0,d=l>1&&l<=this._buffer.getLineLength(a)?this._buffer.getLineCharCode(a,l-2):0,u=Ui(c),h=Ui(d);return!u&&!h?new L(o,r,a,l):o===a&&r===l?new L(o,r-1,a,l-1):u&&h?new L(o,r-1,a,l+1):u?new L(o,r-1,a,l):new L(o,r,a,l+1)}}modifyPosition(e,t){this._assertNotDisposed();const i=this.getOffsetAt(e)+t;return this.getPositionAt(Math.min(this._buffer.getLength(),Math.max(0,i)))}getFullModelRange(){this._assertNotDisposed();const e=this.getLineCount();return new L(1,1,e,this.getLineMaxColumn(e))}findMatchesLineByLine(e,t,i,n){return this._buffer.findMatchesLineByLine(e,t,i,n)}findMatches(e,t,i,n,o,r,a=Mte){this._assertNotDisposed();let l=null;t!==null&&(Array.isArray(t)||(t=[t]),t.every(u=>L.isIRange(u))&&(l=t.map(u=>this.validateRange(u)))),l===null&&(l=[this.getFullModelRange()]),l=l.sort((u,h)=>u.startLineNumber-h.startLineNumber||u.startColumn-h.startColumn);const c=[];c.push(l.reduce((u,h)=>L.areIntersecting(u,h)?u.plusRange(h):(c.push(u),h)));let d;if(!i&&e.indexOf(`
|
|
|
|
|
`)<0){const h=new eu(e,i,n,o).parseSearchRequest();if(!h)return[];d=f=>this.findMatchesLineByLine(f,h,r,a)}else d=u=>$0.findMatches(this,new eu(e,i,n,o),u,r,a);return c.map(d).reduce((u,h)=>u.concat(h),[])}findNextMatch(e,t,i,n,o,r){this._assertNotDisposed();const a=this.validatePosition(t);if(!i&&e.indexOf(`
|
|
|
|
|
`)<0){const c=new eu(e,i,n,o).parseSearchRequest();if(!c)return null;const d=this.getLineCount();let u=new L(a.lineNumber,a.column,d,this.getLineMaxColumn(d)),h=this.findMatchesLineByLine(u,c,r,1);return $0.findNextMatch(this,new eu(e,i,n,o),a,r),h.length>0||(u=new L(1,1,a.lineNumber,this.getLineMaxColumn(a.lineNumber)),h=this.findMatchesLineByLine(u,c,r,1),h.length>0)?h[0]:null}return $0.findNextMatch(this,new eu(e,i,n,o),a,r)}findPreviousMatch(e,t,i,n,o,r){this._assertNotDisposed();const a=this.validatePosition(t);return $0.findPreviousMatch(this,new eu(e,i,n,o),a,r)}pushStackElement(){this._commandManager.pushStackElement()}popStackElement(){this._commandManager.popStackElement()}pushEOL(e){if((this.getEOL()===`
|
|
|
|
|
`?0:1)!==e)try{this._onDidChangeDecorations.beginDeferredEmit(),this._eventEmitter.beginDeferredEmit(),this._initialUndoRedoSnapshot===null&&(this._initialUndoRedoSnapshot=this._undoRedoService.createSnapshot(this.uri)),this._commandManager.pushEOL(e)}finally{this._eventEmitter.endDeferredEmit(),this._onDidChangeDecorations.endDeferredEmit()}}_validateEditOperation(e){return e instanceof aL?e:new aL(e.identifier||null,this.validateRange(e.range),e.text,e.forceMoveMarkers||!1,e.isAutoWhitespaceEdit||!1,e._isTracked||!1)}_validateEditOperations(e){const t=[];for(let i=0,n=e.length;i<n;i++)t[i]=this._validateEditOperation(e[i]);return t}pushEditOperations(e,t,i){try{return this._onDidChangeDecorations.beginDeferredEmit(),this._eventEmitter.beginDeferredEmit(),this._pushEditOperations(e,this._validateEditOperations(t),i)}finally{this._eventEmitter.endDeferredEmit(),this._onDidChangeDecorations.endDeferredEmit()}}_pushEditOperations(e,t,i){if(this._options.trimAutoWhitespace&&this._trimAutoWhitespaceLines){const n=t.map(r=>({range:this.validateRange(r.range),text:r.text}));let o=!0;if(e)for(let r=0,a=e.length;r<a;r++){const l=e[r];let c=!1;for(let d=0,u=n.length;d<u;d++){const h=n[d].range,f=h.startLineNumber>l.endLineNumber,g=l.startLineNumber>h.endLineNumber;if(!f&&!g){c=!0;break}}if(!c){o=!1;break}}if(o)for(let r=0,a=this._trimAutoWhitespaceLines.length;r<a;r++){const l=this._trimAutoWhitespaceLines[r],c=this.getLineMaxColumn(l);let d=!0;for(let u=0,h=n.length;u<h;u++){const f=n[u].range,g=n[u].text;if(!(l<f.startLineNumber||l>f.endLineNumber)&&!(l===f.startLineNumber&&f.startColumn===c&&f.isEmpty()&&g&&g.length>0&&g.charAt(0)===`
|
|
|
|
|
`)&&!(l===f.startLineNumber&&f.startColumn===1&&f.isEmpty()&&g&&g.length>0&&g.charAt(g.length-1)===`
|
|
|
|
|
`)){d=!1;break}}if(d){const u=new L(l,1,l,c);t.push(new aL(null,u,null,!1,!1,!1))}}this._trimAutoWhitespaceLines=null}return this._initialUndoRedoSnapshot===null&&(this._initialUndoRedoSnapshot=this._undoRedoService.createSnapshot(this.uri)),this._commandManager.pushEditOperation(e,t,i)}_applyUndo(e,t,i,n){const o=e.map(r=>{const a=this.getPositionAt(r.newPosition),l=this.getPositionAt(r.newEnd);return{range:new L(a.lineNumber,a.column,l.lineNumber,l.column),text:r.oldText}});this._applyUndoRedoEdits(o,t,!0,!1,i,n)}_applyRedo(e,t,i,n){const o=e.map(r=>{const a=this.getPositionAt(r.oldPosition),l=this.getPositionAt(r.oldEnd);return{range:new L(a.lineNumber,a.column,l.lineNumber,l.column),text:r.newText}});this._applyUndoRedoEdits(o,t,!1,!0,i,n)}_applyUndoRedoEdits(e,t,i,n,o,r){try{this._onDidChangeDecorations.beginDeferredEmit(),this._eventEmitter.beginDeferredEmit(),this._isUndoing=i,this._isRedoing=n,this.applyEdits(e,!1),this.setEOL(t),this._overwriteAlternativeVersionId(o)}finally{this._isUndoing=!1,this._isRedoing=!1,this._eventEmitter.endDeferredEmit(r),this._onDidChangeDecorations.endDeferredEmit()}}applyEdits(e,t=!1){try{this._onDidChangeDecorations.beginDeferredEmit(),this._eventEmitter.beginDeferredEmit();const i=this._validateEditOperations(e);return this._doApplyEdits(i,t)}finally{this._eventEmitter.endDeferredEmit(),this._onDidChangeDecorations.endDeferredEmit()}}_doApplyEdits(e,t){const i=this._buffer.getLineCount(),n=this._buffer.applyEdits(e,this._options.trimAutoWhitespace,t),o=this._buffer.getLineCount(),r=n.changes;if(this._trimAutoWhitespaceLines=n.trimAutoWhitespaceLineNumbers,r.length!==0){for(let c=0,d=r.length;c<d;c++){const u=r[c],[h,f,g]=oh(u.text);this._tokenizationTextModelPart.acceptEdit(u.range,u.text,h,f,g),this._decorationsTree.acceptReplace(u.rangeOffset,u.rangeLength,u.text.length,u.forceMoveMarkers)}const a=[];this._increaseVersionId();let l=i;for(let c=0,d=r.length;c<d;c++){const u=r[c],[h]=oh(u.text);this._onDidChangeDecorations.fire();const f=u.range.startLineNumber,g=u.range.endLineNumber,_=g-f,b=h,v=Math.min(_,b),C=b-_,w=o-l-C+f,S=w,D=w+b,x=this._decorationsTree.getInjectedTextInInterval(this,this.getOffsetAt(new H(S,1)),this.getOffsetAt(new H(D,this.getLineMaxColumn(D))),0),y=zr.fromDecorations(x),k=new v_(y);for(let I=v;I>=0;I--){const R=f+I,P=w+I;k.takeFromEndWhile(K=>K.lineNumber>P);const j=k.takeFromEndWhile(K=>K.lineNumber===P);a.push(new qO(R,this.getLineContent(P),j))}if(v<_){const I=f+v;a.push(new QJ(I+1,g))}if(v<b){const I=new v_(y),R=f+v,P=b-v,j=o-l-P+R+1,K=[],ae=[];for(let ue=0;ue<P;ue++){const we=j+ue;ae[ue]=this.getLineContent(we),I.takeWhile(ve=>ve.lineNumber<we),K[ue]=I.takeWhile(ve=>ve.lineNumber===we)}a.push(new JJ(R+1,f+b,ae,K))}l+=C}this._emitContentChangedEvent(new ag(a,this.getVersionId(),this._isUndoing,this._isRedoing),{changes:r,eol:this._buffer.getEOL(),versionId:this.getVersionId(),isUndoing:this._isUndoing,isRedoing:this._isRedoing,isFlush:!1})}return n.reverseEdits===null?void 0:n.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(e){if(e===null||e.size===0)return;const i=Array.from(e).map(n=>new qO(n,this.getLineContent(n),this._getInjectedTextInLine(n)));this._onDidChangeInjectedText.fire(new K9(i))}changeDecorations(e,t=0){this._assertNotDisposed();try{return this._onDidChangeDecorations.beginDeferredEmit(),this._changeDecorations(t,e)}finally{this._onDidChangeDecorations.endDeferredEmit()}}_changeDecorations(e,t){const i={addDecoration:(o,r)=>this._deltaDecorationsImpl(e,[],[{range:o,options:r}])[0],changeDecoration:(o,r)=>{this._changeDecorationImpl(o,r)},changeDecorationOptions:(o,r)=>{this._changeDecorationOptionsImpl(o,gP(r))},removeDecoration:o=>{this._deltaDecorationsImpl(e,[o],[])},deltaDecorations:(o,r)=>o.length===0&&r.length===0?[]:this._deltaDecorationsImpl(e,o,r)};let n=null;try{n=t(i)}catch(o){$e(o)}return i.addDecoration=tm,i.changeDecoration=tm,i.changeDecorationOptions=tm,i.removeDecoration=tm,i.deltaDecorations=tm,n}deltaDecorations(e,t,i=0){if(this._assertNotDisposed(),e||(e=[]),e.length===0&&t.length===0)return[];try{return this._deltaDecorationCallCnt++,this._deltaDecorationCallCnt>1&&(console.warn("Invoking deltaDecorations recursively could lead to leaking decorations."),$e(new Error("Invoking deltaDecorations recursively could lead to leaking decorations."))),this._onDidChangeDecorations.beginDeferredEmit(),this._deltaDecorationsImpl(i,e,t)}finally{this._onDidChangeDecorations.endDeferredEmit(),this._deltaDecorationCallCnt--}}_getTrackedRange(e){return this.getDecorationRange(e)}_setTrackedRange(e,t,i){const n=e?this._decorations[e]:null;if(!n)return t?this._deltaDecorationsImpl(0,[],[{range:t,options:fP[i]}])[0]:null;if(!t)return this._decorationsTree.delete(n),delete this._decorations[n.id],null;c
Line truncated
|
|
|
|
|
`:this.model.getEOL();e=e.slice(0),e.sort(L.compareRangesUsingStarts);let o=!1,r=!1;for(const l of e)l.isEmpty()?o=!0:r=!0;if(!r){if(!t)return"";const l=e.map(d=>d.startLineNumber);let c="";for(let d=0;d<l.length;d++)d>0&&l[d-1]===l[d]||(c+=this.model.getLineContent(l[d])+n);return c}if(o&&t){const l=[];let c=0;for(const d of e){const u=d.startLineNumber;d.isEmpty()?u!==c&&l.push(this.model.getLineContent(u)):l.push(this.model.getValueInRange(d,i?2:0)),c=u}return l.length===1?l[0]:l}const a=[];for(const l of e)l.isEmpty()||a.push(this.model.getValueInRange(l,i?2:0));return a.length===1?a[0]:a}getRichTextToCopy(e,t){const i=this.model.getLanguageId();if(i===Ao||e.length!==1)return null;let n=e[0];if(n.isEmpty()){if(!t)return null;const d=n.startLineNumber;n=new L(d,this.model.getLineMinColumn(d),d,this.model.getLineMaxColumn(d))}const o=this._configuration.options.get(46),r=this._getColorMap(),l=/[:;\\\/<>]/.test(o.fontFamily)||o.fontFamily===Os.fontFamily;let c;return l?c=Os.fontFamily:(c=o.fontFamily,c=c.replace(/"/g,"'"),/[,']/.test(c)||/[+ ]/.test(c)&&(c=`'${c}'`),c=`${c}, ${Os.fontFamily}`),{mode:i,html:`<div style="color: ${r[1]};background-color: ${r[2]};font-family: ${c};font-weight: ${o.fontWeight};font-size: ${o.fontSize}px;line-height: ${o.lineHeight}px;white-space: pre;">`+this._getHTMLToCopy(n,r)+"</div>"}}_getHTMLToCopy(e,t){const i=e.startLineNumber,n=e.startColumn,o=e.endLineNumber,r=e.endColumn,a=this.getTabSize();let l="";for(let c=i;c<=o;c++){const d=this.model.tokenization.getLineTokens(c),u=d.getLineContent(),h=c===i?n-1:0,f=c===o?r-1:u.length;u===""?l+="<br>":l+=$te(u,d.inflate(),t,h,f,a,vn)}return l}_getColorMap(){const e=ni.getColorMap(),t=["#000000"];if(e)for(let i=1,n=e.length;i<n;i++)t[i]=$.Format.CSS.formatHex(e[i]);return t}getPrimaryCursorState(){return this._cursor.getPrimaryCursorState()}getLastAddedCursorIndex(){return this._cursor.getLastAddedCursorIndex()}getCursorStates(){return this._cursor.getCursorStates()}setCursorStates(e,t,i){return this._withViewEventsCollector(n=>this._cursor.setStates(n,e,t,i))}getCursorColumnSelectData(){return this._cursor.getCursorColumnSelectData()}getCursorAutoClosedCharacters(){return this._cursor.getAutoClosedCharacters()}setCursorColumnSelectData(e){this._cursor.setCursorColumnSelectData(e)}getPrevEditOperationType(){return this._cursor.getPrevEditOperationType()}setPrevEditOperationType(e){this._cursor.setPrevEditOperationType(e)}getSelection(){return this._cursor.getSelection()}getSelections(){return this._cursor.getSelections()}getPosition(){return this._cursor.getPrimaryCursorState().modelState.position}setSelections(e,t,i=0){this._withViewEventsCollector(n=>this._cursor.setSelections(n,e,t,i))}saveCursorState(){return this._cursor.saveState()}restoreCursorState(e){this._withViewEventsCollector(t=>this._cursor.restoreState(t,e))}_executeCursorEdit(e){if(this._cursor.context.cursorConfig.readOnly){this._eventDispatcher.emitOutgoingEvent(new mee);return}this._withViewEventsCollector(e)}executeEdits(e,t,i){this._executeCursorEdit(n=>this._cursor.executeEdits(n,e,t,i))}startComposition(){this._executeCursorEdit(e=>this._cursor.startComposition(e))}endComposition(e){this._executeCursorEdit(t=>this._cursor.endComposition(t,e))}type(e,t){this._executeCursorEdit(i=>this._cursor.type(i,e,t))}compositionType(e,t,i,n,o){this._executeCursorEdit(r=>this._cursor.compositionType(r,e,t,i,n,o))}paste(e,t,i,n){this._executeCursorEdit(o=>this._cursor.paste(o,e,t,i,n))}cut(e){this._executeCursorEdit(t=>this._cursor.cut(t,e))}executeCommand(e,t){this._executeCursorEdit(i=>this._cursor.executeCommand(i,e,t))}executeCommands(e,t){this._executeCursorEdit(i=>this._cursor.executeCommands(i,e,t))}revealPrimaryCursor(e,t,i=!1){this._withViewEventsCollector(n=>this._cursor.revealPrimary(n,e,i,0,t,0))}revealTopMostCursor(e){const t=this._cursor.getTopMostViewPosition(),i=new L(t.lineNumber,t.column,t.lineNumber,t.column);this._withViewEventsCollector(n=>n.emitViewEvent(new pC(e,!1,i,null,0,!0,0)))}revealBottomMostCursor(e){const t=this._cursor.getBottomMostViewPosition(),i=new L(t.lineNumber,t.column,t.lineNumber,t.column);this._withViewEventsCollector(n=>n.emitViewEvent(new pC(e,!1,i,null,0,!0,0)))}revealRange(e,t,i,n,o){this._withViewEventsCollector(r=>r.emitViewEvent(new pC(e,!1,i,null,n,t,o)))}changeWhitespace(e){this.viewLayout.changeWhitespace(e)&&(this._eventDispatcher.emitSingleViewEvent(new uee),this._eventDispatcher.emitOutgoingEvent(new gee))}_withViewEventsCollector(e){try{const t=this._eventDispatcher.beginEmitViewEvents();return e(t)}finally{this._eventDispatcher.endEmitViewEvents()}}normalizePosition(e,t){return this._lines.normalizePosition(e,t)}getLineIndentColumn(e){return this._lines.getLineIndentColumn(e)}}class B2{constructor(e,t,i,n,o){this._model=e,this._viewLineNumber=t,this._isValid=i,this._modelTrackedRange=n,this._startLineDelta=o}static create(e){const t=e._setTrackedRange(null,new L(1,1,1,1),1);return new B2(e,1,!1,t,0)}get viewLineNum
Line truncated
|
|
|
|
|
`?i=1:e&&e.lineEnding&&e.lineEnding===`\r
|
|
|
|
|
`&&(i=2),this._modelData.model.getValue(i,t)}setValue(e){!this._modelData||this._modelData.model.setValue(e)}getModel(){return this._modelData?this._modelData.model:null}setModel(e=null){const t=e;if(this._modelData===null&&t===null||this._modelData&&this._modelData.model===t)return;const i=this.hasTextFocus(),n=this._detachModel();this._attachModel(t),i&&this.hasModel()&&this.focus();const o={oldModelUrl:n?n.uri:null,newModelUrl:t?t.uri:null};this._removeDecorationTypes(),this._onDidChangeModel.fire(o),this._postDetachModelCleanup(n)}_removeDecorationTypes(){if(this._decorationTypeKeysToIds={},this._decorationTypeSubtypes){for(const e in this._decorationTypeSubtypes){const t=this._decorationTypeSubtypes[e];for(const i in t)this._removeDecorationType(e+"-"+i)}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 _getVerticalOffsetAfterPosition(e,t,i,n){const o=e.model.validatePosition({lineNumber:t,column:i}),r=e.viewModel.coordinatesConverter.convertModelPositionToViewPosition(o);return e.viewModel.viewLayout.getVerticalOffsetAfterLineNumber(r.lineNumber,n)}getTopForLineNumber(e,t=!1){return this._modelData?bf._getVerticalOffsetForPosition(this._modelData,e,1,t):-1}getTopForPosition(e,t){return this._modelData?bf._getVerticalOffsetForPosition(this._modelData,e,t,!1):-1}static _getVerticalOffsetForPosition(e,t,i,n=!1){const o=e.model.validatePosition({lineNumber:t,column:i}),r=e.viewModel.coordinatesConverter.convertModelPositionToViewPosition(o);return e.viewModel.viewLayout.getVerticalOffsetForLineNumber(r.lineNumber,n)}getBottomForLineNumber(e,t=!1){return this._modelData?bf._getVerticalOffsetAfterPosition(this._modelData,e,1,t):-1}setHiddenAreas(e){var t;(t=this._modelData)===null||t===void 0||t.viewModel.setHiddenAreas(e.map(i=>L.lift(i)))}getVisibleColumnFromPosition(e){if(!this._modelData)return e.column;const t=this._modelData.model.validatePosition(e),i=this._modelData.model.getOptions().tabSize;return Wi.visibleColumnFromColumn(this._modelData.model.getLineContent(t.lineNumber),t.column,i)+1}getPosition(){return this._modelData?this._modelData.viewModel.getPosition():null}setPosition(e,t="api"){if(!!this._modelData){if(!H.isIPosition(e))throw new Error("Invalid arguments");this._modelData.viewModel.setSelections(t,[{selectionStartLineNumber:e.lineNumber,selectionStartColumn:e.column,positionLineNumber:e.lineNumber,positionColumn:e.column}])}}_sendRevealRange(e,t,i,n){if(!this._modelData)return;if(!L.isIRange(e))throw new Error("Invalid arguments");const o=this._modelData.model.validateRange(e),r=this._modelData.viewModel.coordinatesConverter.convertModelRangeToViewRange(o);this._modelData.viewModel.revealRange("api",i,r,t,n)}revealLine(e,t=0){this._revealLine(e,0,t)}revealLineInCenter(e,t=0){this._revealLine(e,1,t)}revealLineInCenterIfOutsideViewport(e,t=0){this._revealLine(e,2,t)}revealLineNearTop(e,t=0){this._revealLine(e,5,t)}_revealLine(e,t,i){if(typeof e!="number")throw new Error("Invalid arguments");this._sendRevealRange(new L(e,1,e,1),t,!1,i)}revealPosition(e,t=0){this._revealPosition(e,0,!0,t)}revealPositionInCenter(e,t=0){this._revealPosition(e,1,!0,t)}revealPositionInCenterIfOutsideViewport(e,t=0){this._revealPosition(e,2,!0,t)}revealPositionNearTop(e,t=0){this._revealPosition(e,5,!0,t)}_revealPosition(e,t,i,n){if(!H.isIPosition(e))throw new Error("Invalid arguments");this._sendRevealRange(new L(e.lineNumber,e.column,e.lineNumber,e.column),t,i,n)}getSelection(){return this._modelData?this._modelData.viewModel.getSelection():null}getSelections(){return this._modelData?this._modelData.viewModel.getSelections():null}setSelection(e,t="api"){const i=le.isISelection(e),n=L.isIRange(e);if(!i&&!n)throw new Error("Invalid arguments");if(i)this._setSelectionImpl(e,t);else if(n){const o={selectionStartLineNumber:e.startLineNumber,selectionStartColumn:e.startColumn,positionLineNumber:e.endLineNumber,positionColumn:e.endColumn};this._setSelectionImpl(o,t)}}_setSelectionImpl(e,t){if(!this._modelData)return;const i=new le(e.selectionStartLineNumber,e.selectionStartColumn,e.positionLineNumber,e.positionColumn);this._modelData.viewModel.setSelections(t,[i])}revealLines(e,t,i=0){this._revealLines(e,t,0,i)}revealLinesInCenter(e,t,i=0){this._revealLines(e,t,1,i)}revealLinesInCenterIfOutsideViewport(e,t,i=0){this._revealLines(e,t,2,i)}revealLinesNearTop(e,t,i=0){this._revealLines(e,t,5,i)}_revealLines(e,t,i,n){if(typeof e!="number"||typeof t!="number")throw new Error("Invalid arguments");this._sendRevealRange(new L(e,1,t,1),i,!1,n)}revealRange(e,t=0,i=!1,n=!0){this._revealRange(e,i?1:0,n,t)}revealRangeInCenter(e,t=0){this._revealRange(e,1,!0,t)}revealRangeInCenterIfOutsideViewport(e,t=0){this._revealRange(
Line truncated
|
|
|
|
|
`:`
|
|
|
|
|
|
|
|
|
|
`),this}appendMarkdown(e){return this.value+=e,this}appendCodeblock(e,t){return this.value+="\n```",this.value+=e,this.value+=`
|
|
|
|
|
`,this.value+=t,this.value+="\n```\n",this}appendLink(e,t,i){return this.value+="[",this.value+=this._escape(t,"]"),this.value+="](",this.value+=this._escape(String(e),")"),i&&(this.value+=` "${this._escape(this._escape(i,'"'),")")}"`),this.value+=")",this}_escape(e,t){const i=new RegExp(ao(t),"g");return e.replace(i,(n,o)=>e.charAt(o-1)!=="\\"?`\\${n}`:n)}}function $g(s){return E8(s)?!s.value:Array.isArray(s)?s.every($g):!0}function E8(s){return s instanceof gs?!0:s&&typeof s=="object"?typeof s.value=="string"&&(typeof s.isTrusted=="boolean"||s.isTrusted===void 0)&&(typeof s.supportThemeIcons=="boolean"||s.supportThemeIcons===void 0):!1}function sne(s){return s.replace(/[\\`*_{}[\]()#+\-!]/g,"\\$&")}function mv(s){return s.replace(/"/g,""")}function tk(s){return s&&s.replace(/\\([\\`*_{}[\]()#+\-.!])/g,"$1")}function one(s){const e=[],t=s.split("|").map(n=>n.trim());s=t[0];const i=t[1];if(i){const n=/height=(\d+)/.exec(i),o=/width=(\d+)/.exec(i),r=n?n[1]:"",a=o?o[1]:"",l=isFinite(parseInt(a)),c=isFinite(parseInt(r));l&&e.push(`width="${a}"`),c&&e.push(`height="${r}"`)}return{href:s,dimensions:e}}var pE=globalThis&&globalThis.__awaiter||function(s,e,t,i){function n(o){return o instanceof t?o:new t(function(r){r(o)})}return new(t||(t=Promise))(function(o,r){function a(d){try{c(i.next(d))}catch(u){r(u)}}function l(d){try{c(i.throw(d))}catch(u){r(u)}}function c(d){d.done?o(d.value):n(d.value).then(a,l)}c((i=i.apply(s,e||[])).next())})};function rne(s,e){Ss(e)?s.title=Y2(e):e!=null&&e.markdownNotSupportedFallback?s.title=e.markdownNotSupportedFallback:s.removeAttribute("title")}class ane{constructor(e,t,i){this.hoverDelegate=e,this.target=t,this.fadeInAnimation=i}update(e,t,i){var n;return pE(this,void 0,void 0,function*(){if(this._cancellationTokenSource&&(this._cancellationTokenSource.dispose(!0),this._cancellationTokenSource=void 0),this.isDisposed)return;let o;if(e===void 0||Ss(e)||e instanceof HTMLElement)o=e;else if(!ZC(e.markdown))o=(n=e.markdown)!==null&&n!==void 0?n:e.markdownNotSupportedFallback;else{this._hoverWidget||this.show(p("iconLabel.loading","Loading..."),t),this._cancellationTokenSource=new Cn;const r=this._cancellationTokenSource.token;if(o=yield e.markdown(r),o===void 0&&(o=e.markdownNotSupportedFallback),this.isDisposed||r.isCancellationRequested)return}this.show(o,t,i)})}show(e,t,i){const n=this._hoverWidget;if(this.hasContent(e)){const o=Object.assign({content:e,target:this.target,showPointer:this.hoverDelegate.placement==="element",hoverPosition:2,skipFadeInAnimation:!this.fadeInAnimation||!!n},i);this._hoverWidget=this.hoverDelegate.showHover(o,t)}n==null||n.dispose()}hasContent(e){return e?E8(e)?!!e.value:!0:!1}get isDisposed(){var e;return(e=this._hoverWidget)===null||e===void 0?void 0:e.isDisposed}dispose(){var e,t;(e=this._hoverWidget)===null||e===void 0||e.dispose(),(t=this._cancellationTokenSource)===null||t===void 0||t.dispose(!0),this._cancellationTokenSource=void 0}}function I8(s,e,t,i){let n,o;const r=(u,h)=>{var f;u&&(o==null||o.dispose(),o=void 0),h&&(n==null||n.dispose(),n=void 0),(f=s.onDidHideHover)===null||f===void 0||f.call(s)},a=(u,h,f)=>new ho(()=>pE(this,void 0,void 0,function*(){(!o||o.isDisposed)&&(o=new ane(s,f||e,u>0),yield o.update(t,h,i))}),u),l=()=>{if(n)return;const u=new ee,h=_=>r(!1,_.fromElement===e);u.add(Q(e,fe.MOUSE_LEAVE,h,!0));const f=()=>r(!0,!0);u.add(Q(e,fe.MOUSE_DOWN,f,!0));const g={targetElements:[e],dispose:()=>{}};if(s.placement===void 0||s.placement==="mouse"){const _=b=>{g.x=b.x+10,b.target instanceof HTMLElement&&b.target.classList.contains("action-label")&&r(!0,!0)};u.add(Q(e,fe.MOUSE_MOVE,_,!0))}u.add(a(s.delay,!1,g)),n=u},c=Q(e,fe.MOUSE_OVER,l,!0);return{show:u=>{r(!1,!0),a(0,u)},hide:()=>{r(!0,!0)},update:(u,h)=>pE(this,void 0,void 0,function*(){t=u,yield o==null?void 0:o.update(t,void 0,h)}),dispose:()=>{c.dispose(),r(!0,!0)}}}class ma extends q{constructor(e,t,i={}){super(),this.options=i,this._context=e||this,this._action=t,t instanceof Ps&&this._register(t.onDidChange(n=>{!this.element||this.handleActionChangeEvent(n)}))}get action(){return this._action}handleActionChangeEvent(e){e.enabled!==void 0&&this.updateEnabled(),e.checked!==void 0&&this.updateChecked(),e.class!==void 0&&this.updateClass(),e.label!==void 0&&(this.updateLabel(),this.updateTooltip()),e.tooltip!==void 0&&this.updateTooltip()}get actionRunner(){return this._actionRunner||(this._actionRunner=this._register(new Ng)),this._actionRunner}set actionRunner(e){this._actionRunner=e}getAction(){return this._action}isEnabled(){return this._action.enabled}setActionContext(e){this._context=e}render(e){const t=this.element=e;this._register(Tt.addTarget(e));const i=this.options&&this.options.draggable;i&&(e.draggable=!0,lo&&this._register(Q(e,fe.DRAG_START,n=>{var o;return(o=n.dataTransfer)===null||o===void 0?void 0:o.setData(s0.TEXT,this._action.label)}))),this._register(Q(t,jt.Tap,n=>this.onClick(n,!0))),this._register(Q(t,fe.MOUSE_DOWN,n=>{i||kt.stop(n,!0),this._actioLine truncated
|
|
|
|
|
`)}}const Ph=new dne;ai.add(cne.IconContribution,Ph);function Fi(s,e,t,i){return Ph.registerIcon(s,e,t,i)}function T8(){return Ph}function une(){for(const s of m.getAll())Ph.registerIcon(s.id,s.definition,s.description)}une();const N8="vscode://schemas/icons",A8=ai.as(aS.JSONContribution);A8.registerSchema(N8,Ph.getIconSchema());const AP=new At(()=>A8.notifySchemaChanged(N8),200);Ph.onDidChange(()=>{AP.isScheduled()||AP.schedule()});const M8=Fi("widget-close",m.close,p("widgetClose","Icon for the close action in widgets."));Fi("goto-previous-location",m.arrowUp,p("previousChangeIcon","Icon for goto previous editor location."));Fi("goto-next-location",m.arrowDown,p("nextChangeIcon","Icon for goto next editor location."));vt.modify(m.sync,"spin");vt.modify(m.loading,"spin");var hne=globalThis&&globalThis.__decorate||function(s,e,t,i){var n=arguments.length,o=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(s,e,t,i);else for(var a=s.length-1;a>=0;a--)(r=s[a])&&(o=(n<3?r(o):n>3?r(e,t,o):r(e,t))||o);return n>3&&o&&Object.defineProperty(e,t,o),o},fne=globalThis&&globalThis.__param||function(s,e){return function(t,i){e(t,i,s)}},gne=globalThis&&globalThis.__awaiter||function(s,e,t,i){function n(o){return o instanceof t?o:new t(function(r){r(o)})}return new(t||(t=Promise))(function(o,r){function a(d){try{c(i.next(d))}catch(u){r(u)}}function l(d){try{c(i.throw(d))}catch(u){r(u)}}function c(d){d.done?o(d.value):n(d.value).then(a,l)}c((i=i.apply(s,e||[])).next())})},ik;const _v=3;class im{constructor(e,t,i,n){this.originalLineStart=e,this.originalLineEnd=t,this.modifiedLineStart=i,this.modifiedLineEnd=n}getType(){return this.originalLineStart===0?1:this.modifiedLineStart===0?2:0}}class nk{constructor(e){this.entries=e}}const pne=Fi("diff-review-insert",m.add,p("diffReviewInsertIcon","Icon for 'Insert' in diff review.")),mne=Fi("diff-review-remove",m.remove,p("diffReviewRemoveIcon","Icon for 'Remove' in diff review.")),_ne=Fi("diff-review-close",m.close,p("diffReviewCloseIcon","Icon for 'Close' in diff review."));let $1=class iu extends q{constructor(e,t){super(),this._languageService=t,this._width=0,this._diffEditor=e,this._isVisible=!1,this.shadow=dt(document.createElement("div")),this.shadow.setClassName("diff-review-shadow"),this.actionBarContainer=dt(document.createElement("div")),this.actionBarContainer.setClassName("diff-review-actions"),this._actionBar=this._register(new $a(this.actionBarContainer.domNode)),this._actionBar.push(new Ps("diffreview.close",p("label.close","Close"),"close-diff-review "+vt.asClassName(_ne),!0,()=>gne(this,void 0,void 0,function*(){return this.hide()})),{label:!1,icon:!0}),this.domNode=dt(document.createElement("div")),this.domNode.setClassName("diff-review monaco-editor-background"),this._content=dt(document.createElement("div")),this._content.setClassName("diff-review-content"),this._content.setAttribute("role","code"),this.scrollbar=this._register(new i0(this._content.domNode,{})),this.domNode.domNode.appendChild(this.scrollbar.getDomNode()),this._register(e.onDidUpdateDiff(()=>{!this._isVisible||(this._diffs=this._compute(),this._render())})),this._register(e.getModifiedEditor().onDidChangeCursorPosition(()=>{!this._isVisible||this._render()})),this._register(Ki(this.domNode.domNode,"click",i=>{i.preventDefault();const n=K3(i.target,"diff-review-row");n&&this._goToRow(n)})),this._register(Ki(this.domNode.domNode,"keydown",i=>{(i.equals(18)||i.equals(2066)||i.equals(530))&&(i.preventDefault(),this._goToRow(this._getNextRow())),(i.equals(16)||i.equals(2064)||i.equals(528))&&(i.preventDefault(),this._goToRow(this._getPrevRow())),(i.equals(9)||i.equals(2057)||i.equals(521)||i.equals(1033))&&(i.preventDefault(),this.hide()),(i.equals(10)||i.equals(3))&&(i.preventDefault(),this.accept())})),this._diffs=[],this._currentDiff=null}prev(){let e=0;if(this._isVisible||(this._diffs=this._compute()),this._isVisible){let i=-1;for(let n=0,o=this._diffs.length;n<o;n++)if(this._diffs[n]===this._currentDiff){i=n;break}e=this._diffs.length+i-1}else e=this._findDiffIndex(this._diffEditor.getPosition());if(this._diffs.length===0)return;e=e%this._diffs.length;const t=this._diffs[e].entries;this._diffEditor.setPosition(new H(t[0].modifiedLineStart,1)),this._diffEditor.setSelection({startColumn:1,startLineNumber:t[0].modifiedLineStart,endColumn:1073741824,endLineNumber:t[t.length-1].modifiedLineEnd}),this._isVisible=!0,this._diffEditor.doLayout(),this._render(),this._goToRow(this._getNextRow())}next(){let e=0;if(this._isVisible||(this._diffs=this._compute()),this._isVisible){let i=-1;for(let n=0,o=this._diffs.length;n<o;n++)if(this._diffs[n]===this._currentDiff){i=n;break}e=i+1}else e=this._findDiffIndex(this._diffEditor.getPosition());if(this._diffs.length===0)return;e=e%this._diffs.length;const t=this._diffs[e].entries;this._diffEditor.setPosition(new H(t[0].modifiedLineStart,1)),this._diffEditor.setSelection({
Line truncated
|
|
|
|
|
`:`\r
|
|
|
|
|
`)}else yield this._clipboardService.writeText(_)})),c.push(h)),i.getOption(83)||c.push(new Ps("diff.inline.revertChange",p("diff.inline.revertChange.label","Revert this change"),void 0,!0,()=>sk(this,void 0,void 0,function*(){const _=new L(n.originalStartLineNumber,1,n.originalEndLineNumber,n.originalModel.getLineMaxColumn(n.originalEndLineNumber)),b=n.originalModel.getValueInRange(_);if(n.modifiedEndLineNumber===0){const v=i.getModel().getLineMaxColumn(n.modifiedStartLineNumber);i.executeEdits("diffEditor",[{range:new L(n.modifiedStartLineNumber,v,n.modifiedStartLineNumber,v),text:l+b}])}else{const v=i.getModel().getLineMaxColumn(n.modifiedEndLineNumber);i.executeEdits("diffEditor",[{range:new L(n.modifiedStartLineNumber,1,n.modifiedEndLineNumber,v),text:b}])}})));const g=(_,b)=>{this._contextMenuService.showContextMenu({getAnchor:()=>({x:_,y:b}),getActions:()=>(h&&(h.label=d?p("diff.clipboard.copyDeletedLineContent.label","Copy deleted line ({0})",n.originalStartLineNumber+u):p("diff.clipboard.copyChangedLineContent.label","Copy changed line ({0})",n.originalStartLineNumber+u)),c),autoSelectFirstItem:!0})};this._register(Ki(this._diffActions,"mousedown",_=>{const{top:b,height:v}=En(this._diffActions),C=Math.floor(a/3);_.preventDefault(),g(_.posx,b+v+C)})),this._register(i.onMouseMove(_=>{_.target.type===8||_.target.type===5?_.target.detail.viewZoneId===this._viewZoneId?(this.visibility=!0,u=this._updateLightBulbPosition(this._marginDomNode,_.event.browserEvent.y,a)):this.visibility=!1:this.visibility=!1})),this._register(i.onMouseDown(_=>{!_.event.rightButton||(_.target.type===8||_.target.type===5)&&_.target.detail.viewZoneId===this._viewZoneId&&(_.event.preventDefault(),u=this._updateLightBulbPosition(this._marginDomNode,_.event.browserEvent.y,a),g(_.event.posx,_.event.posy+a))}))}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,t,i){const{top:n}=En(e),o=t-n,r=Math.floor(o/i),a=r*i;if(this._diffActions.style.top=`${a}px`,this.diff.viewLineCounts){let l=0;for(let c=0;c<this.diff.viewLineCounts.length;c++)if(l+=this.diff.viewLineCounts[c],r<l)return c}return r}}const ac=rt("clipboardService"),O8=rt("progressService");Object.freeze({total(){},worked(){},done(){}});class Bh{constructor(e){this.callback=e}report(e){this._value=e,this.callback(this._value)}}Bh.None=Object.freeze({report(){}});const Ad=rt("editorProgressService");var Sne=globalThis&&globalThis.__decorate||function(s,e,t,i){var n=arguments.length,o=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(s,e,t,i);else for(var a=s.length-1;a>=0;a--)(r=s[a])&&(o=(n<3?r(o):n>3?r(e,t,o):r(e,t))||o);return n>3&&o&&Object.defineProperty(e,t,o),o},rl=globalThis&&globalThis.__param||function(s,e){return function(t,i){e(t,i,s)}},ok;class MP{constructor(e,t){this._contextMenuService=e,this._clipboardService=t,this._zones=[],this._inlineDiffMargins=[],this._zonesMap={},this._decorations=[]}getForeignViewZones(e){return e.filter(t=>!this._zonesMap[String(t.id)])}clean(e){this._zones.length>0&&e.changeViewZones(t=>{for(const i of this._zones)t.removeZone(i)}),this._zones=[],this._zonesMap={},e.changeDecorations(t=>{this._decorations=t.deltaDecorations(this._decorations,[])})}apply(e,t,i,n){const o=n?md.capture(e):null;e.changeViewZones(r=>{var a;for(const l of this._zones)r.removeZone(l);for(const l of this._inlineDiffMargins)l.dispose();this._zones=[],this._zonesMap={},this._inlineDiffMargins=[];for(let l=0,c=i.zones.length;l<c;l++){const d=i.zones[l];d.suppressMouseDown=!0;const u=r.addZone(d);this._zones.push(u),this._zonesMap[String(u)]=!0,i.zones[l].diff&&d.marginDomNode&&(d.suppressMouseDown=!1,((a=i.zones[l].diff)===null||a===void 0?void 0:a.originalModel.getValueLength())!==0&&this._inlineDiffMargins.push(new wne(u,d.marginDomNode,e,i.zones[l].diff,this._contextMenuService,this._clipboardService)))}}),o==null||o.restore(e),e.changeDecorations(r=>{this._decorations=r.deltaDecorations(this._decorations,i.decorations)}),t==null||t.setZones(i.overviewZones)}}let yne=0;const Lne=Fi("diff-insert",m.add,p("diffInsertIcon","Line decoration for inserts in the diff editor.")),P8=Fi("diff-remove",m.remove,p("diffRemoveIcon","Line decoration for removals in the diff editor.")),RP=(ok=window.trustedTypes)===null||ok===void 0?void 0:ok.createPolicy("diffEditorWidget",{createHTML:s=>s});let _d=class wn extends q{constructor(e,t,i,n,o,r,a,l,c,d,u,h){super(),this._editorProgressService=h,this._onDidDispose=this._register(new W),this.onDidDispose=this._onDidDispose.event,this._onDidUpdateDiff=this._register(new W),this.onDidUpdateDiff=this._onDidUpdateDiff.event,this._onDidContentSizeChange=this._register(new W),this._lastOriginalWarning=null,this._lastModifiedWarning=null,this._editorWorkerService=o,this._codeEdit
Line truncated
|
|
|
|
|
.monaco-diff-editor .diffViewport {
|
|
|
|
|
background: ${h};
|
|
|
|
|
}
|
|
|
|
|
`);const f=s.getColor(Cu);f&&e.addRule(`
|
|
|
|
|
.monaco-diff-editor .diffViewport:hover {
|
|
|
|
|
background: ${f};
|
|
|
|
|
}
|
|
|
|
|
`);const g=s.getColor(wu);g&&e.addRule(`
|
|
|
|
|
.monaco-diff-editor .diffViewport:active {
|
|
|
|
|
background: ${g};
|
|
|
|
|
}
|
|
|
|
|
`);const _=s.getColor(zY);e.addRule(`
|
|
|
|
|
.monaco-editor .diagonal-fill {
|
|
|
|
|
background-image: linear-gradient(
|
|
|
|
|
-45deg,
|
|
|
|
|
${_} 12.5%,
|
|
|
|
|
#0000 12.5%, #0000 50%,
|
|
|
|
|
${_} 50%, ${_} 62.5%,
|
|
|
|
|
#0000 62.5%, #0000 100%
|
|
|
|
|
);
|
|
|
|
|
background-size: 8px 8px;
|
|
|
|
|
}
|
|
|
|
|
`)});var Tne=globalThis&&globalThis.__decorate||function(s,e,t,i){var n=arguments.length,o=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(s,e,t,i);else for(var a=s.length-1;a>=0;a--)(r=s[a])&&(o=(n<3?r(o):n>3?r(e,t,o):r(e,t))||o);return n>3&&o&&Object.defineProperty(e,t,o),o},Nne=globalThis&&globalThis.__param||function(s,e){return function(t,i){e(t,i,s)}},Ane=globalThis&&globalThis.__awaiter||function(s,e,t,i){function n(o){return o instanceof t?o:new t(function(r){r(o)})}return new(t||(t=Promise))(function(o,r){function a(d){try{c(i.next(d))}catch(u){r(u)}}function l(d){try{c(i.throw(d))}catch(u){r(u)}}function c(d){d.done?o(d.value):n(d.value).then(a,l)}c((i=i.apply(s,e||[])).next())})};let mE=class extends q{constructor(e){super(),this._themeService=e,this._onCodeEditorAdd=this._register(new W),this.onCodeEditorAdd=this._onCodeEditorAdd.event,this._onCodeEditorRemove=this._register(new W),this.onCodeEditorRemove=this._onCodeEditorRemove.event,this._onDiffEditorAdd=this._register(new W),this.onDiffEditorAdd=this._onDiffEditorAdd.event,this._onDiffEditorRemove=this._register(new W),this.onDiffEditorRemove=this._onDiffEditorRemove.event,this._decorationOptionProviders=new Map,this._codeEditorOpenHandlers=new ts,this._modelProperties=new Map,this._codeEditors=Object.create(null),this._diffEditors=Object.create(null),this._globalStyleSheet=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 t=this.listCodeEditors();for(const i of t){if(i.hasTextFocus())return i;i.hasWidgetFocus()&&(e=i)}return e}removeDecorationType(e){const t=this._decorationOptionProviders.get(e);t&&(t.refCount--,t.refCount<=0&&(this._decorationOptionProviders.delete(e),t.dispose(),this.listCodeEditors().forEach(i=>i.removeDecorationsByType(e))))}setModelProperty(e,t,i){const n=e.toString();let o;this._modelProperties.has(n)?o=this._modelProperties.get(n):(o=new Map,this._modelProperties.set(n,o)),o.set(t,i)}getModelProperty(e,t){const i=e.toString();if(this._modelProperties.has(i))return this._modelProperties.get(i).get(t)}openCodeEditor(e,t,i){return Ane(this,void 0,void 0,function*(){for(const n of this._codeEditorOpenHandlers){const o=yield n(e,t,i);if(o!==null)return o}return null})}registerCodeEditorOpenHandler(e){const t=this._codeEditorOpenHandlers.unshift(e);return Ze(t)}};mE=Tne([Nne(0,Wt)],mE);var Mne=globalThis&&globalThis.__decorate||function(s,e,t,i){var n=arguments.length,o=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(s,e,t,i);else for(var a=s.length-1;a>=0;a--)(r=s[a])&&(o=(n<3?r(o):n>3?r(e,t,o):r(e,t))||o);return n>3&&o&&Object.defineProperty(e,t,o),o},BP=globalThis&&globalThis.__param||function(s,e){return function(t,i){e(t,i,s)}},Rne=globalThis&&globalThis.__awaiter||function(s,e,t,i){function n(o){return o instanceof t?o:new t(function(r){r(o)})}return new(t||(t=Promise))(function(o,r){function a(d){try{c(i.next(d))}catch(u){r(u)}}function l(d){try{c(i.throw(d))}catch(u){r(u)}}function c(d){d.done?o(d.value):n(d.value).then(a,l)}c((i=i.apply(s,e||[])).next())})};let K1=class extends mE{constructor(e,t){super(t),this.onCodeEditorAdd(()=>this._checkContextKey()),this.onCodeEditorRemove(()=>this._checkContextKey()),this._editorIsOpen=e.createKey("editorIsOpen",!1),this._activeCodeEditor=null,this.registerCodeEditorOpenHandler((i,n,o)=>Rne(this,void 0,void 0,function*(){return n?this.doOpenEditor(n,i):null}))}_checkContextKey(){let e=!1;for(const t of this.listCodeEditors())if(!t.isSimpleWidget){e=!0;break}this._editorIsOpen.set(e)}setActiveCodeEditor(e){this._activeCodeEditor=e}getActiveCodeEditor(){return this._activeCodeEditor}doOpenEditor(e,t){if(!this.findModel(e,t.resource)){if(t.resource){const o=t.resource.scheme;if(o===Ke.http||o===Ke.https)return X3(t.resource.toString()),e}return null}const n=t.options?t.options.selection:null;if(n)if(typeof n.endLineNumber=="number"&&typeof n.endColumn=="number")e.setSelection(n),e.revealRangeInCenter(n,1);else{const o={lineNumber:n.startLineNumber,column:n.startColumn};e.setPosition(o),e.revealPositionInCenter(o,1)}return e}findModel(e,t){const i=e.getModel();return i&&i.uri.toString()!==t.toString()?null:i}};K1=Mne([BP(0,Be),BP(1,Wt)],K1);ut(wt,K1);const xp=rt("layoutService");var H8=globalThis&&globalThis.__decorate||function(s,e,t,i){var n=arguments.length,o=n<3?e:i===null?i=Object.getOwnPropert
Line truncated
|
|
|
|
|
`)}get size(){return this.elements.size}has(e){return this.elements.has(e)}set(e,t){this.elements.set(e,t)}delete(e){return this.elements.delete(e)}}class Pne{constructor(e,t,i,n,o,r,a){this.id=++$8,this.type=1,this.actual=e,this.label=e.label,this.confirmBeforeUndo=e.confirmBeforeUndo||!1,this.resourceLabels=t,this.strResources=i,this.groupId=n,this.groupOrder=o,this.sourceId=r,this.sourceOrder=a,this.removedResources=null,this.invalidatedResources=null}canSplit(){return typeof this.actual.split=="function"}removeResource(e,t,i){this.removedResources||(this.removedResources=new HP),this.removedResources.has(t)||this.removedResources.set(t,new VP(e,i))}setValid(e,t,i){i?this.invalidatedResources&&(this.invalidatedResources.delete(t),this.invalidatedResources.size===0&&(this.invalidatedResources=null)):(this.invalidatedResources||(this.invalidatedResources=new HP),this.invalidatedResources.has(t)||this.invalidatedResources.set(t,new VP(e,0)))}toString(){return`[id:${this.id}] [group:${this.groupId}] [${this.invalidatedResources?"INVALID":" VALID"}] ${this.actual.constructor.name} - ${this.actual}`}}class U8{constructor(e,t){this.resourceLabel=e,this.strResource=t,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(){const e=[];e.push(`* ${this.strResource}:`);for(let t=0;t<this._past.length;t++)e.push(` * [UNDO] ${this._past[t]}`);for(let t=this._future.length-1;t>=0;t--)e.push(` * [REDO] ${this._future[t]}`);return e.join(`
|
|
|
|
|
`)}flushAllElements(){this._past=[],this._future=[],this.versionId++}_setElementValidFlag(e,t){e.type===1?e.setValid(this.resourceLabel,this.strResource,t):e.setValid(t)}setElementsValidFlag(e,t){for(const i of this._past)t(i.actual)&&this._setElementValidFlag(i,e);for(const i of this._future)t(i.actual)&&this._setElementValidFlag(i,e)}pushElement(e){for(const t of this._future)t.type===1&&t.removeResource(this.resourceLabel,this.strResource,1);this._future=[],this._past.push(e),this.versionId++}createSnapshot(e){const t=[];for(let i=0,n=this._past.length;i<n;i++)t.push(this._past[i].id);for(let i=this._future.length-1;i>=0;i--)t.push(this._future[i].id);return new h8(e,t)}restoreSnapshot(e){const t=e.elements.length;let i=!0,n=0,o=-1;for(let a=0,l=this._past.length;a<l;a++,n++){const c=this._past[a];i&&(n>=t||c.id!==e.elements[n])&&(i=!1,o=0),!i&&c.type===1&&c.removeResource(this.resourceLabel,this.strResource,0)}let r=-1;for(let a=this._future.length-1;a>=0;a--,n++){const l=this._future[a];i&&(n>=t||l.id!==e.elements[n])&&(i=!1,r=a),!i&&l.type===1&&l.removeResource(this.resourceLabel,this.strResource,0)}o!==-1&&(this._past=this._past.slice(0,o)),r!==-1&&(this._future=this._future.slice(r+1)),this.versionId++}getElements(){const e=[],t=[];for(const i of this._past)e.push(i.actual);for(const i of this._future)t.push(i.actual);return{past:e,future:t}}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,t){for(let i=this._past.length-1;i>=0;i--)if(this._past[i]===e){t.has(this.strResource)?this._past[i]=t.get(this.strResource):this._past.splice(i,1);break}this.versionId++}splitFutureWorkspaceElement(e,t){for(let i=this._future.length-1;i>=0;i--)if(this._future[i]===e){t.has(this.strResource)?this._future[i]=t.get(this.strResource):this._future.splice(i,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 rk{constructor(e){this.editStacks=e,this._versionIds=[];for(let t=0,i=this.editStacks.length;t<i;t++)this._versionIds[t]=this.editStacks[t].versionId}isValid(){for(let e=0,t=this.editStacks.length;e<t;e++)if(this._versionIds[e]!==this.editStacks[e].versionId)return!1;return!0}}const j8=new U8("","");j8.locked=!0;let bE=class{constructor(e,t){this._dialogService=e,this._notificationService=t,this._editStacks=new Map,this._uriComparisonKeyComputers=[]}getUriComparisonKey(e){for(const t of this._uriComparisonKeyComputers)if(t[0]===e.scheme)return t[1].getComparisonKey(e);return e.toString()}_print(e){console.log("------------------------------------"),console.log(`AFTER ${e}: `);const t=[];for(const i of this._editStacks)t.push(i[1].toString());console.log(t.join(`
|
|
|
|
|
`))}pushElement(e,t=Vg.None,i=wa.None){if(e.type===0){const n=vv(e.resource),o=this.getUriComparisonKey(e.resource);this._pushElement(new Cv(e,n,o,t.id,t.nextOrder(),i.id,i.nextOrder()))}else{const n=new Set,o=[],r=[];for(const a of e.resources){const l=vv(a),c=this.getUriComparisonKey(a);n.has(c)||(n.add(c),o.push(l),r.push(c))}o.length===1?this._pushElement(new Cv(e,o[0],r[0],t.id,t.nextOrder(),i.id,i.nextOrder())):this._pushElement(new Pne(e,o,r,t.id,t.nextOrder(),i.id,i.nextOrder()))}}_pushElement(e){for(let t=0,i=e.strResources.length;t<i;t++){const n=e.resourceLabels[t],o=e.strResources[t];let r;this._editStacks.has(o)?r=this._editStacks.get(o):(r=new U8(n,o),this._editStacks.set(o,r)),r.pushElement(e)}}getLastElement(e){const t=this.getUriComparisonKey(e);if(this._editStacks.has(t)){const i=this._editStacks.get(t);if(i.hasFutureElements())return null;const n=i.getClosestPastElement();return n?n.actual:null}return null}_splitPastWorkspaceElement(e,t){const i=e.actual.split(),n=new Map;for(const o of i){const r=vv(o.resource),a=this.getUriComparisonKey(o.resource),l=new Cv(o,r,a,0,0,0,0);n.set(l.strResource,l)}for(const o of e.strResources){if(t&&t.has(o))continue;this._editStacks.get(o).splitPastWorkspaceElement(e,n)}}_splitFutureWorkspaceElement(e,t){const i=e.actual.split(),n=new Map;for(const o of i){const r=vv(o.resource),a=this.getUriComparisonKey(o.resource),l=new Cv(o,r,a,0,0,0,0);n.set(l.strResource,l)}for(const o of e.strResources){if(t&&t.has(o))continue;this._editStacks.get(o).splitFutureWorkspaceElement(e,n)}}removeElements(e){const t=typeof e=="string"?e:this.getUriComparisonKey(e);this._editStacks.has(t)&&(this._editStacks.get(t).dispose(),this._editStacks.delete(t))}setElementsValidFlag(e,t,i){const n=this.getUriComparisonKey(e);this._editStacks.has(n)&&this._editStacks.get(n).setElementsValidFlag(t,i)}createSnapshot(e){const t=this.getUriComparisonKey(e);return this._editStacks.has(t)?this._editStacks.get(t).createSnapshot(e):new h8(e,[])}restoreSnapshot(e){const t=this.getUriComparisonKey(e.resource);if(this._editStacks.has(t)){const i=this._editStacks.get(t);i.restoreSnapshot(e),!i.hasPastElements()&&!i.hasFutureElements()&&(i.dispose(),this._editStacks.delete(t))}}getElements(e){const t=this.getUriComparisonKey(e);return this._editStacks.has(t)?this._editStacks.get(t).getElements():{past:[],future:[]}}_findClosestUndoElementWithSource(e){if(!e)return[null,null];let t=null,i=null;for(const[n,o]of this._editStacks){const r=o.getClosestPastElement();!r||r.sourceId===e&&(!t||r.sourceOrder>t.sourceOrder)&&(t=r,i=n)}return[t,i]}canUndo(e){if(e instanceof wa){const[,i]=this._findClosestUndoElementWithSource(e.id);return!!i}const t=this.getUriComparisonKey(e);return this._editStacks.has(t)?this._editStacks.get(t).hasPastElements():!1}_onError(e,t){$e(e);for(const i of t.strResources)this.removeElements(i);this._notificationService.error(e)}_acquireLocks(e){for(const t of e.editStacks)if(t.locked)throw new Error("Cannot acquire edit stack lock");for(const t of e.editStacks)t.locked=!0;return()=>{for(const t of e.editStacks)t.locked=!1}}_safeInvokeWithLocks(e,t,i,n,o){const r=this._acquireLocks(i);let a;try{a=t()}catch(l){return r(),n.dispose(),this._onError(l,e)}return a?a.then(()=>(r(),n.dispose(),o()),l=>(r(),n.dispose(),this._onError(l,e))):(r(),n.dispose(),o())}_invokeWorkspacePrepare(e){return bv(this,void 0,void 0,function*(){if(typeof e.actual.prepareUndoRedo>"u")return q.None;const t=e.actual.prepareUndoRedo();return typeof t>"u"?q.None:t})}_invokeResourcePrepare(e,t){if(e.actual.type!==1||typeof e.actual.prepareUndoRedo>"u")return t(q.None);const i=e.actual.prepareUndoRedo();return i?pN(i)?t(i):i.then(n=>t(n)):t(q.None)}_getAffectedEditStacks(e){const t=[];for(const i of e.strResources)t.push(this._editStacks.get(i)||j8);return new rk(t)}_tryToSplitAndUndo(e,t,i,n){if(t.canSplit())return this._splitPastWorkspaceElement(t,i),this._notificationService.warn(n),new wv(this._undo(e,0,!0));for(const o of t.strResources)this.removeElements(o);return this._notificationService.warn(n),new wv}_checkWorkspaceUndo(e,t,i,n){if(t.removedResources)return this._tryToSplitAndUndo(e,t,t.removedResources,p({key:"cannotWorkspaceUndo",comment:["{0} is a label for an operation. {1} is another message."]},"Could not undo '{0}' across all files. {1}",t.label,t.removedResources.createMessage()));if(n&&t.invalidatedResources)return this._tryToSplitAndUndo(e,t,t.invalidatedResources,p({key:"cannotWorkspaceUndo",comment:["{0} is a label for an operation. {1} is another message."]},"Could not undo '{0}' across all files. {1}",t.label,t.invalidatedResources.createMessage()));const o=[];for(const a of i.editStacks)a.getClosestPastElement()!==t&&o.push(a.resourceLabel);if(o.length>0)return this._tryToSplitAndUndo(e,t,null,p({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}",t.labe
Line truncated
|
|
|
|
|
: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 ise=globalThis&&globalThis.__decorate||function(s,e,t,i){var n=arguments.length,o=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(s,e,t,i);else for(var a=s.length-1;a>=0;a--)(r=s[a])&&(o=(n<3?r(o):n>3?r(e,t,o):r(e,t))||o);return n>3&&o&&Object.defineProperty(e,t,o),o},nse=globalThis&&globalThis.__param||function(s,e){return function(t,i){e(t,i,s)}};let DE=class extends q{constructor(e){super(),this.layoutService=e,this.currentViewDisposable=q.None,this.container=e.hasContainer?e.container:null,this.contextView=this._register(new jg(this.container,1)),this.layout(),this._register(e.onDidLayout(()=>this.layout()))}setContainer(e,t){this.contextView.setContainer(e,t||1)}showContextView(e,t,i){t?(t!==this.container||this.shadowRoot!==i)&&(this.container=t,this.setContainer(t,i?3:2)):this.layoutService.hasContainer&&this.container!==this.layoutService.container&&(this.container=this.layoutService.container,this.setContainer(this.container,1)),this.shadowRoot=i,this.contextView.show(e);const n=Ze(()=>{this.currentViewDisposable===n&&this.hideContextView()});return this.currentViewDisposable=n,n}getContextViewElement(){return this.contextView.getViewElement()}layout(){this.contextView.layout()}hideContextView(e){this.contextView.hide(e)}};DE=ise([nse(0,xp)],DE);var GP=globalThis&&globalThis.__awaiter||function(s,e,t,i){function n(o){return o instanceof t?o:new t(function(r){r(o)})}return new(t||(t=Promise))(function(o,r){function a(d){try{c(i.next(d))}catch(u){r(u)}}function l(d){try{c(i.throw(d))}catch(u){r(u)}}function c(d){d.done?o(d.value):n(d.value).then(a,l)}c((i=i.apply(s,e||[])).next())})};const yv="**",ZP="/",bC="[/\\\\]",vC="[^/\\\\]",sse=/\//g;function YP(s,e){switch(s){case 0:return"";case 1:return`${vC}*?`;default:return`(?:${bC}|${vC}+${bC}${e?`|${bC}${vC}+`:""})*?`}}function XP(s,e){if(!s)return[];const t=[];let i=!1,n=!1,o="";for(const r of s){switch(r){case e:if(!i&&!n){t.push(o),o="";continue}break;case"{":i=!0;break;case"}":i=!1;break;case"[":n=!0;break;case"]":n=!1;break}o+=r}return o&&t.push(o),t}function Y8(s){if(!s)return"";let e="";const t=XP(s,ZP);if(t.every(i=>i===yv))e=".*";else{let i=!1;t.forEach((n,o)=>{if(n===yv){if(i)return;e+=YP(2,o===t.length-1)}else{let r=!1,a="",l=!1,c="";for(const d of n){if(d!=="}"&&r){a+=d;continue}if(l&&(d!=="]"||!c)){let u;d==="-"?u=d:(d==="^"||d==="!")&&!c?u="^":d===ZP?u="":u=ao(d),c+=u;continue}switch(d){case"{":r=!0;continue;case"[":l=!0;continue;case"}":{e+=`(?:${XP(a,",").map(f=>Y8(f)).join("|")})`,r=!1,a="";break}case"]":{e+="["+c+"]",l=!1,c="";break}case"?":e+=vC;continue;case"*":e+=YP(1);continue;default:e+=ao(d)}}o<t.length-1&&(t[o+1]!==yv||o+2<t.length)&&(e+=bC)}i=n===yv})}return e}const ose=/^\*\*\/\*\.[\w\.-]+$/,rse=/^\*\*\/([\w\.-]+)\/?$/,ase=/^{\*\*\/\*?[\w\.-]+\/?(,\*\*\/\*?[\w\.-]+\/?)*}$/,lse=/^{\*\*\/\*?[\w\.-]+(\/(\*\*)?)?(,\*\*\/\*?[\w\.-]+(\/(\*\*)?)?)*}$/,cse=/^\*\*((\/[\w\.-]+)+)\/?$/,dse=/^([\w\.-]+(\/[\w\.-]+)*)\/?$/,QP=new Nd(1e4),JP=function(){return!1},Pa=function(){return null};function eA(s,e){if(!s)return Pa;let t;typeof s!="string"?t=s.pattern:t=s,t=t.trim();const i=`${t}_${!!e.trimForExclusions}`;let n=QP.get(i);if(n)return e4(n,s);let o;return ose.test(t)?n=use(t.substr(4),t):(o=rse.exec(ak(t,e)))?n=hse(o[1],t):(e.trimForExclusions?lse:ase).test(t)?n=fse(t,e):(o=cse.exec(ak(t,e)))?n=t4(o[1].substr(1),t,!0):(o=dse.exec(ak(t,e)))?n=t4(o[1],t,!1):n=gse(t),QP.set(i,n),e4(n,s)}function e4(s,e){if(typeof e=="string")return s;const t=function(i,n){return nE(i,e.base,!Mn)?s(i.substr(e.base.length+1),n):null};return t.allBasenames=s.allBasenames,t.allPaths=s.allPaths,t.basenames=s.basenames,t.patterns=s.patterns,t}function ak(s,e){return e.trimForExclusions&&s.endsWith("/**")?s.substr(0,s.length-2):s}function use(s,e){return function(t,i){return typeof t=="string"&&t.endsWith(s)?e:null}}function hse(s,e){const t=`/${s}`,i=`\\${s}`,n=function(r,a){return typeof r!="string"?null:a?a===s?e:null:r===s||r.endsWith(t)||r.endsWith(i)?e:null},o=[s];return n.basenames=o,n.patterns=[e],n.allBasenames=o,n}function fse(s,e){const t=Q8(s.slice(1,-1).split(",").map(a=>eA(a,e)).filter(a=>a!==Pa),s),i=t.length;if(!i)return Pa;if(i===1)return t[0];const n=function(a,l){for(let c=0,d=t.length;c<d;c++)if(t[c](a,l))return s;return null},o=t.find(a=>!!a.allBasenames);o&&(n.allBasenames=o.allBasenames);const r=t.reduce((a,l)=>l.allPaths?a.concat(l.allPaths):a,[]);return r.length&&(n.allPaths=r),n}function t4(s,e,t){const i=Aa===Mi.sep,n=i?s:s.replace(sse,Aa),o=Aa+n,r=Mi.sep+s;let a;return t?a=function(l,c){return typeof l=="string"&&(l===n||l.endsWith(o)||!i&&(l===s||l.endsWith(r)))?e:null}:a=function(l,c){return typeof l=="string"&&(l===n||!i&&l===s)?e:null},a.allPaths=[(t?"*/":"./")+s],a}function gse(s){try{const e=new RegExp(`^${Y8(s)}$`);return function(t){return e.lastIndex=0,typeof t=="string"&&e.test(t)?s:null}}catch{return Pa}}function pse(s,e,t){r
Line truncated
|
|
|
|
|
.monaco-menu {
|
|
|
|
|
font-size: 13px;
|
|
|
|
|
border-radius: 5px;
|
|
|
|
|
min-width: 160px;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
${o4(m.menuSelection)}
|
|
|
|
|
${o4(m.menuSubmenu)}
|
|
|
|
|
|
|
|
|
|
.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 {
|
|
|
|
|
color: var(--vscode-disabledForeground);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/* 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 var(--vscode-menu-separatorBackground);
|
|
|
|
|
padding-top: 1px;
|
|
|
|
|
padding: 30px;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.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-menu-item:hover .keybinding,
|
|
|
|
|
.monaco-menu .monaco-action-bar.vertical .action-menu-item:focus .keybinding {
|
|
|
|
|
opacity: unset;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.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 {
|
|
|
|
|
width: 100%;
|
|
|
|
|
height: 0px !important;
|
|
|
|
|
opacity: 1;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.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;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.hc-black .context-view.monaco-menu-container,
|
|
|
|
|
.hc-light .context-view.monaco-menu-container,
|
|
|
|
|
:host-context(.hc-black) .context-view.monaco-menu-container,
|
|
|
|
|
:host-context(.hc-light) .context-view.monaco-menu-container {
|
|
|
|
|
box-shadow: none;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.hc-black .monaco-menu .monaco-action-bar.vertical .action-item.focused,
|
|
|
|
|
.hc-light .monaco-menu .monaco-action-bar.vertical .action-item.focused,
|
|
|
|
|
:host-context(.hc-black) .monaco-menu .monaco-action-bar.vertical .action-item.focused,
|
|
|
|
|
:host-context(.hc-light) .monaco-menu .monaco-action-bar.vertical .action-item.focused {
|
|
|
|
|
background: none;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/* Vertical Action Bar Styles */
|
|
|
|
|
|
|
|
|
|
.monaco-menu .monaco-action-bar.vertical {
|
|
|
|
|
padding: .6em 0;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.monaco-menu .monaco-action-bar.vertical .action-menu-item {
|
|
|
|
|
height: 2em;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.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;
|
|
|
|
|
margin: 5px 0 !important;
|
|
|
|
|
padding: 0;
|
|
|
|
|
border-radius: 0;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.linux .monaco-menu .monaco-action-bar.vertical .action-label.separator,
|
|
|
|
|
: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;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.linux .monaco-menu .monaco-action-bar.vertical .submenu-indicator {
|
|
|
|
|
: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;
|
|
|
|
|
}`;if(e){t+=`
|
|
|
|
|
/* 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%;
|
|
|
|
|
}
|
|
|
|
|
.monaco-scrollable-element > .shadow.left {
|
|
|
|
|
display: block;
|
|
|
|
|
top: 3px;
|
|
|
|
|
left: 0;
|
|
|
|
|
height: 100%;
|
|
|
|
|
width: 3px;
|
|
|
|
|
}
|
|
|
|
|
.monaco-scrollable-element > .shadow.top-left-corner {
|
|
|
|
|
display: block;
|
|
|
|
|
top: 0;
|
|
|
|
|
left: 0;
|
|
|
|
|
height: 3px;
|
|
|
|
|
width: 3px;
|
|
|
|
|
}
|
|
|
|
|
`;const i=s.scrollbarShadow;i&&(t+=`
|
|
|
|
|
.monaco-scrollable-element > .shadow.top {
|
|
|
|
|
box-shadow: ${i} 0 6px 6px -6px inset;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.monaco-scrollable-element > .shadow.left {
|
|
|
|
|
box-shadow: ${i} 6px 0 6px -6px inset;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.monaco-scrollable-element > .shadow.top.left {
|
|
|
|
|
box-shadow: ${i} 6px 6px 6px -6px inset;
|
|
|
|
|
}
|
|
|
|
|
`);const n=s.scrollbarSliderBackground;n&&(t+=`
|
|
|
|
|
.monaco-scrollable-element > .scrollbar > .slider {
|
|
|
|
|
background: ${n};
|
|
|
|
|
}
|
|
|
|
|
`);const o=s.scrollbarSliderHoverBackground;o&&(t+=`
|
|
|
|
|
.monaco-scrollable-element > .scrollbar > .slider:hover {
|
|
|
|
|
background: ${o};
|
|
|
|
|
}
|
|
|
|
|
`);const r=s.scrollbarSliderActiveBackground;r&&(t+=`
|
|
|
|
|
.monaco-scrollable-element > .scrollbar > .slider.active {
|
|
|
|
|
background: ${r};
|
|
|
|
|
}
|
|
|
|
|
`)}return t}function _r(s,e){const t=Object.create(null);for(const i in e){const n=e[i];n&&(t[i]=fl(n,s))}return t}function iA(s,e,t){function i(){const n=_r(s.getColorTheme(),e);typeof t=="function"?t(n):t.style(n)}return i(),s.onDidColorThemeChange(i)}function Ese(s,e,t){return iA(e,{badgeBackground:(t==null?void 0:t.badgeBackground)||Tf,badgeForeground:(t==null?void 0:t.badgeForeground)||Nf,badgeBorder:Ye},s)}function ah(s,e,t){return iA(e,Object.assign(Object.assign({},qS),t||{}),s)}const qS={listFocusBackground:$Y,listFocusForeground:UY,listFocusOutline:jY,listActiveSelectionBackground:Fl,listActiveSelectionForeground:Ia,listActiveSelectionIconForeground:Cm,listFocusAndSelectionOutline:KY,listFocusAndSelectionBackground:Fl,listFocusAndSelectionForeground:Ia,listInactiveSelectionBackground:qY,listInactiveSelectionIconForeground:ZY,listInactiveSelectionForeground:GY,listInactiveFocusBackground:YY,listInactiveFocusOutline:XY,listHoverBackground:QY,listHoverForeground:JY,listDropBackground:eX,listSelectionOutline:Jt,listHoverOutline:Jt,listFilterWidgetBackground:tX,listFilterWidgetOutline:iX,listFilterWidgetNoMatchesOutline:nX,listFilterWidgetShadow:sX,treeIndentGuidesStroke:oX,tableColumnsBorder:rX,tableOddRowsBackgroundColor:aX,inputActiveOptionBorder:C1,inputActiveOptionForeground:S1,inputActiveOptionBackground:w1,inputBackground:ES,inputForeground:IS,inputBorder:TS,inputValidationInfoBackground:JN,inputValidationInfoForeground:e2,inputValidationInfoBorder:t2,inputValidationWarningBackground:i2,inputValidationWarningForeground:n2,inputValidationWarningBorder:s2,inputValidationErrorBackground:o2,inputValidationErrorForeground:r2,inputValidationErrorBorder:a2},Ise={shadowColor:Er,borderColor:lX,foregroundColor:cX,backgroundColor:dX,selectionForegroundColor:uX,selectionBackgroundColor:hX,selectionBorderColor:fX,separatorColor:gX,scrollbarShadow:yp,scrollbarSliderBackground:vu,scrollbarSliderHoverBackground:Cu,scrollbarSliderActiveBackground:wu};function Tse(s,e,t){return iA(e,Object.assign(Object.assign({},Ise),t),s)}class Nse{constructor(e,t,i,n,o){this.contextViewService=e,this.telemetryService=t,this.notificationService=i,this.keybindingService=n,this.themeService=o,this.focusToReturn=null,this.block=null,this.options={blockMouse:!0}}configure(e){this.options=e}showContextMenu(e){const t=e.getActions();if(!t.length)return;this.focusToReturn=document.activeElement;let i;const n=Z3(e.domForShadowRoot)?e.domForShadowRoot:void 0;this.contextViewService.showContextView({getAnchor:()=>e.getAnchor(),canRelayout:!1,anchorAlignment:e.anchorAlignment,anchorAxisAlignment:e.anchorAxisAlignment,render:o=>{const r=e.getMenuClassName?e.getMenuClassName():"";r&&(o.className+=" "+r),this.options.blockMouse&&(this.block=o.appendChild(ie(".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",Q(this.block,fe.MOUSE_DOWN,c=>c.stopPropagation()));const a=new ee,l=e.actionRunner||new Ng;return l.onBeforeRun(this.onActionRun,this,a),l.onDidRun(this.onDidActionRun,this,a),i=new hg(o,t,{actionViewItemProvider:e.getActionViewItem,context:e.getActionsContext?e.getActionsContext():null,actionRunner:l,getKeyBinding:e.getKeyBinding?e.getKeyBinding:c=>this.keybindingService.lookupKeybinding(c.id)}),a.add(Tse(i,this.themeService)),i.onDidCancel(()=>this.contextViewService.hideContextView(!0),null,a),i.onDidBlur(()=>this.contextViewService.hideContextView(!0),null,a),a.add(Q(window,fe.BLUR,()=>this.contextViewService.hideContextView(!0))),a.add(Q(window,fe.MOUSE_DOWN,c=>{if(c.defaultPrevented)return;const d=new Da(c);let u=d.target;if(!d.rightButton){for(;u;){if(u===o)return;u=u.parentElement}this.contextViewService.hideContextView(!0)}})),Na(a,i)},focus:()=>{i==null||i.focus(!!e.autoSelectFirstItem)},onHide:o=>{var r;(r=e.onHide)===null||r===void 0||r.call(e,!!o),this.block&&(this.block.remove(),this.block=null),this.focusToReturn&&this.focusToReturn.focus()}},n,!!n)}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&&!Ga(e.error)&&this.notificationService.error(e.error)}}var Ase=globalThis&&globalThis.__decorate||function(s,e,t,i){var n=arguments.length,o=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(s,e,t,i);else for(var a=s.length-1;a>=0;a--)(r=s[a])&&(o=(n<3?r(o):n>3?r(e,t,o):r(e,t))||o);return n>3&&o&&Object.defineProperty(e,t,o),o},nm=globalThis&&globalThis.__param||function(s,e){return function(t,i){e(t,i,s)}};let IE=class extends q{constructor(e,t,i,n,o){super(),this._onDidShowContextMenu=new W,this._onDidHideContextMenu=new W,this.contextMenuHandler=new Nse(i,e,t,n,o)}configure(e){
Line truncated
|
|
|
|
|
`?a=2:l===`
|
|
|
|
|
`&&(a=1);let c=Dn.trimAutoWhitespace;e.editor&&typeof e.editor.trimAutoWhitespace<"u"&&(c=e.editor.trimAutoWhitespace==="false"?!1:Boolean(e.editor.trimAutoWhitespace));let d=Dn.detectIndentation;e.editor&&typeof e.editor.detectIndentation<"u"&&(d=e.editor.detectIndentation==="false"?!1:Boolean(e.editor.detectIndentation));let u=Dn.largeFileOptimizations;e.editor&&typeof e.editor.largeFileOptimizations<"u"&&(u=e.editor.largeFileOptimizations==="false"?!1:Boolean(e.editor.largeFileOptimizations));let h=Dn.bracketPairColorizationOptions;return((i=e.editor)===null||i===void 0?void 0:i.bracketPairColorization)&&typeof e.editor.bracketPairColorization=="object"&&(h={enabled:!!e.editor.bracketPairColorization.enabled,independentColorPoolPerBracketType:!!e.editor.bracketPairColorization.independentColorPoolPerBracketType}),{isForSimpleWidget:t,tabSize:n,indentSize:o,insertSpaces:r,detectIndentation:d,defaultEOL:a,trimAutoWhitespace:c,largeFileOptimizations:u,bracketPairColorizationOptions:h}}_getEOL(e,t){if(e)return this._resourcePropertiesService.getEOL(e,t);const i=this._configurationService.getValue("files.eol",{overrideIdentifier:t});return i&&typeof i=="string"&&i!=="auto"?i:Co===3||Co===2?`
|
|
|
|
|
`:`\r
|
|
|
|
|
`}_shouldRestoreUndoStack(){const e=this._configurationService.getValue("files.restoreUndoStack");return typeof e=="boolean"?e:!0}getCreationOptions(e,t,i){let n=this._modelCreationOptionsByLanguageAndResource[e+t];if(!n){const o=this._configurationService.getValue("editor",{overrideIdentifier:e,resource:t}),r=this._getEOL(t,e);n=Em._readModelOptions({editor:o,eol:r},i),this._modelCreationOptionsByLanguageAndResource[e+t]=n}return n}_updateModelOptions(){const e=this._modelCreationOptionsByLanguageAndResource;this._modelCreationOptionsByLanguageAndResource=Object.create(null);const t=Object.keys(this._models);for(let i=0,n=t.length;i<n;i++){const o=t[i],r=this._models[o],a=r.model.getLanguageId(),l=r.model.uri,c=e[a+l],d=this.getCreationOptions(a,l,r.model.isForSimpleWidget);Em._setModelOptionsForModel(r.model,d,c)}}static _setModelOptionsForModel(e,t,i){i&&i.defaultEOL!==t.defaultEOL&&e.getLineCount()===1&&e.setEOL(t.defaultEOL===1?0:1),!(i&&i.detectIndentation===t.detectIndentation&&i.insertSpaces===t.insertSpaces&&i.tabSize===t.tabSize&&i.indentSize===t.indentSize&&i.trimAutoWhitespace===t.trimAutoWhitespace&&To(i.bracketPairColorizationOptions,t.bracketPairColorizationOptions))&&(t.detectIndentation?(e.detectIndentation(t.insertSpaces,t.tabSize),e.updateOptions({trimAutoWhitespace:t.trimAutoWhitespace,bracketColorizationOptions:t.bracketPairColorizationOptions})):e.updateOptions({insertSpaces:t.insertSpaces,tabSize:t.tabSize,indentSize:t.indentSize,trimAutoWhitespace:t.trimAutoWhitespace,bracketColorizationOptions:t.bracketPairColorizationOptions}))}_insertDisposedModel(e){this._disposedModels.set(pc(e.uri),e),this._disposedModelsHeapSize+=e.heapSize}_removeDisposedModel(e){const t=this._disposedModels.get(pc(e));return t&&(this._disposedModelsHeapSize-=t.heapSize),this._disposedModels.delete(pc(e)),t}_ensureDisposedModelsHeapSize(e){if(this._disposedModelsHeapSize>e){const t=[];for(this._disposedModels.forEach(i=>{i.sharesUndoRedoStack||t.push(i)}),t.sort((i,n)=>i.time-n.time);t.length>0&&this._disposedModelsHeapSize>e;){const i=t.shift();this._removeDisposedModel(i.uri),i.initialUndoRedoSnapshot!==null&&this._undoRedoService.restoreSnapshot(i.initialUndoRedoSnapshot)}}}_createModelData(e,t,i,n){const o=this.getCreationOptions(t,i,n),r=new Jl(e,t,o,i,this._undoRedoService,this._languageService,this._languageConfigurationService);if(i&&this._disposedModels.has(pc(i))){const c=this._removeDisposedModel(i),d=this._undoRedoService.getElements(i),u=c4(r)===c.sha1;if(u||c.sharesUndoRedoStack){for(const h of d.past)Cl(h)&&h.matchesResource(i)&&h.setModel(r);for(const h of d.future)Cl(h)&&h.matchesResource(i)&&h.setModel(r);this._undoRedoService.setElementsValidFlag(i,!0,h=>Cl(h)&&h.matchesResource(i)),u&&(r._overwriteVersionId(c.versionId),r._overwriteAlternativeVersionId(c.alternativeVersionId),r._overwriteInitialUndoRedoSnapshot(c.initialUndoRedoSnapshot))}else c.initialUndoRedoSnapshot!==null&&this._undoRedoService.restoreSnapshot(c.initialUndoRedoSnapshot)}const a=pc(r.uri);if(this._models[a])throw new Error("ModelService: Cannot add model because it already exists!");const l=new jse(r,c=>this._onWillDispose(c),(c,d)=>this._onDidChangeLanguage(c,d));return this._models[a]=l,l}createModel(e,t,i,n=!1){let o;return t?(o=this._createModelData(e,t.languageId,i,n),this.setMode(o.model,t)):o=this._createModelData(e,Ao,i,n),this._onModelAdded.fire(o.model),o.model}setMode(e,t){if(!t)return;const i=this._models[pc(e.uri)];!i||i.setLanguage(t)}getModels(){const e=[],t=Object.keys(this._models);for(let i=0,n=t.length;i<n;i++){const o=t[i];e.push(this._models[o].model)}return e}getModel(e){const t=pc(e),i=this._models[t];return i?i.model:null}getSemanticTokensProviderStyling(e){return this._semanticStyling.get(e)}_schemaShouldMaintainUndoRedoElements(e){return e.scheme===Ke.file||e.scheme===Ke.vscodeRemote||e.scheme===Ke.vscodeUserData||e.scheme===Ke.vscodeNotebookCell||e.scheme==="fake-fs"}_onWillDispose(e){const t=pc(e.uri),i=this._models[t],n=this._undoRedoService.getUriComparisonKey(e.uri)!==e.uri.toString();let o=!1,r=0;if(n||this._shouldRestoreUndoStack()&&this._schemaShouldMaintainUndoRedoElements(e.uri)){const l=this._undoRedoService.getElements(e.uri);if(l.past.length>0||l.future.length>0){for(const c of l.past)Cl(c)&&c.matchesResource(e.uri)&&(o=!0,r+=c.heapSize(e.uri),c.setModel(e.uri));for(const c of l.future)Cl(c)&&c.matchesResource(e.uri)&&(o=!0,r+=c.heapSize(e.uri),c.setModel(e.uri))}}const a=Em.MAX_MEMORY_FOR_CLOSED_FILES_UNDO_STACK;if(o)if(!n&&r>a){const l=i.model.getInitialUndoRedoSnapshot();l!==null&&this._undoRedoService.restoreSnapshot(l)}else this._ensureDisposedModelsHeapSize(a-r),this._undoRedoService.setElementsValidFlag(e.uri,!1,l=>Cl(l)&&l.matchesResource(e.uri)),this._insertDisposedModel(new qse(e.uri,i.model.getInitialUndoRedoSnapshot(),Date.now(),n,r,c4(e),e.getVersionId(),e.getAlternativeVersionId()));else if(!n){const l=i.model.getInitialUndoRedoSnapshot();l!==null&&this._undoRedoServ
Line truncated
|
|
|
|
|
`)n.type===2&&(n=o.pop()),n.children.push({type:8});else if(n.type!==2){const c={type:2,content:a};n.children.push(c),o.push(n),n=c}else n.content+=a}return n.type===2&&(n=o.pop()),t}function roe(s,e){return VE(s,e)!==0}function VE(s,e){switch(s){case"*":return 3;case"_":return 4;case"[":return 5;case"]":return 6;case"`":return e?7:0;default:return 0}}class aoe{constructor(e,t=0,i=e.length,n=t-1){this.items=e,this.start=t,this.end=i,this.index=n}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 loe{constructor(e=[],t=10){this._initialize(e),this._limit=t,this._onChange()}getHistory(){return this._elements}add(e){this._history.delete(e),this._history.add(e),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(e){return this._history.has(e)}_onChange(){this._reduceToLimit();const e=this._elements;this._navigator=new aoe(e,0,e.length,e.length)}_reduceToLimit(){const e=this._elements;e.length>this._limit&&this._initialize(e.slice(e.length-this._limit))}_currentPosition(){const e=this._navigator.current();return e?this._elements.indexOf(e):-1}_initialize(e){this._history=new Set;for(const t of e)this._history.add(t)}get _elements(){const e=[];return this._history.forEach(t=>e.push(t)),e}}const sm=ie,coe={inputBackground:$.fromHex("#3C3C3C"),inputForeground:$.fromHex("#CCCCCC"),inputValidationInfoBorder:$.fromHex("#55AAFF"),inputValidationInfoBackground:$.fromHex("#063B49"),inputValidationWarningBorder:$.fromHex("#B89500"),inputValidationWarningBackground:$.fromHex("#352A05"),inputValidationErrorBorder:$.fromHex("#BE1100"),inputValidationErrorBackground:$.fromHex("#5A1D1D")};class c6 extends dr{constructor(e,t,i){var n;super(),this.state="idle",this.maxHeight=Number.POSITIVE_INFINITY,this._onDidChange=this._register(new W),this.onDidChange=this._onDidChange.event,this._onDidHeightChange=this._register(new W),this.onDidHeightChange=this._onDidHeightChange.event,this.contextViewProvider=t,this.options=i||Object.create(null),qa(this.options,coe,!1),this.message=null,this.placeholder=this.options.placeholder||"",this.tooltip=(n=this.options.tooltip)!==null&&n!==void 0?n: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=X(e,sm(".monaco-inputbox.idle"));const o=this.options.flexibleHeight?"textarea":"input",r=X(this.element,sm(".ibwrapper"));if(this.input=X(r,sm(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=X(r,sm("div.mirror")),this.mirror.innerText="\xA0",this.scrollableElement=new $9(this.element,{vertical:1}),this.options.flexibleWidth&&(this.input.setAttribute("wrap","off"),this.mirror.style.whiteSpace="pre",this.mirror.style.wordWrap="initial"),X(e,this.scrollableElement.getDomNode()),this._register(this.scrollableElement),this._register(this.scrollableElement.onScroll(c=>this.input.scrollTop=c.scrollTop));const a=this._register(new Ft(document,"selectionchange")),l=ke.filter(a.event,()=>{const c=document.getSelection();return(c==null?void 0:c.anchorNode)===r});this._register(l(this.updateScrollDimensions,this)),this._register(this.onDidHeightChange(this.updateScrollDimensions,this))}else this.input.tLine truncated
|
|
|
|
|
`?-1:0,r+=i;for(const a of t)a.end<=r||(a.start>=r&&(a.start+=n),a.end>=r&&(a.end+=n));return i+=n,"\u23CE"})}}class gk{constructor(e){this._element=e}get element(){return this._element}set textContent(e){this.disposed||e===this._textContent||(this._textContent=e,this._element.textContent=e)}set className(e){this.disposed||e===this._className||(this._className=e,this._element.className=e)}set empty(e){this.disposed||e===this._empty||(this._empty=e,this._element.style.marginLeft=e?"0":"")}dispose(){this.disposed=!0}}class rw extends q{constructor(e,t){super(),this.customHovers=new Map,this.domNode=this._register(new gk(X(e,ie(".monaco-icon-label")))),this.labelContainer=X(this.domNode.element,ie(".monaco-icon-label-container"));const i=X(this.labelContainer,ie("span.monaco-icon-name-container"));this.descriptionContainer=this._register(new gk(X(this.labelContainer,ie("span.monaco-icon-description-container")))),(t==null?void 0:t.supportHighlights)||(t==null?void 0:t.supportIcons)?this.nameNode=new goe(i,!!t.supportIcons):this.nameNode=new hoe(i),t!=null&&t.supportDescriptionHighlights?this.descriptionNodeFactory=()=>new lh(X(this.descriptionContainer.element,ie("span.label-description")),{supportIcons:!!t.supportIcons}):this.descriptionNodeFactory=()=>this._register(new gk(X(this.descriptionContainer.element,ie("span.label-description")))),this.hoverDelegate=t==null?void 0:t.hoverDelegate}get element(){return this.domNode.element}setLabel(e,t,i){const n=["monaco-icon-label"];i&&(i.extraClasses&&n.push(...i.extraClasses),i.italic&&n.push("italic"),i.strikethrough&&n.push("strikethrough")),this.domNode.className=n.join(" "),this.setupHover(i!=null&&i.descriptionTitle?this.labelContainer:this.element,i==null?void 0:i.title),this.nameNode.setLabel(e,i),(t||this.descriptionNode)&&(this.descriptionNode||(this.descriptionNode=this.descriptionNodeFactory()),this.descriptionNode instanceof lh?(this.descriptionNode.set(t||"",i?i.descriptionMatches:void 0),this.setupHover(this.descriptionNode.element,i==null?void 0:i.descriptionTitle)):(this.descriptionNode.textContent=t||"",this.setupHover(this.descriptionNode.element,(i==null?void 0:i.descriptionTitle)||""),this.descriptionNode.empty=!t))}setupHover(e,t){const i=this.customHovers.get(e);if(i&&(i.dispose(),this.customHovers.delete(e)),!t){e.removeAttribute("title");return}if(!this.hoverDelegate)rne(e,t);else{const n=I8(this.hoverDelegate,e,t);n&&this.customHovers.set(e,n)}}dispose(){super.dispose();for(const e of this.customHovers.values())e.dispose();this.customHovers.clear()}}class hoe{constructor(e){this.container=e,this.label=void 0,this.singleLabel=void 0}setLabel(e,t){if(!(this.label===e&&To(this.options,t)))if(this.label=e,this.options=t,typeof e=="string")this.singleLabel||(this.container.innerText="",this.container.classList.remove("multiple"),this.singleLabel=X(this.container,ie("a.label-name",{id:t==null?void 0:t.domId}))),this.singleLabel.textContent=e;else{this.container.innerText="",this.container.classList.add("multiple"),this.singleLabel=void 0;for(let i=0;i<e.length;i++){const n=e[i],o=(t==null?void 0:t.domId)&&`${t==null?void 0:t.domId}_${i}`;X(this.container,ie("a.label-name",{id:o,"data-icon-label-count":e.length,"data-icon-label-index":i,role:"treeitem"},n)),i<e.length-1&&X(this.container,ie("span.label-separator",void 0,(t==null?void 0:t.separator)||"/"))}}}}function foe(s,e,t){if(!t)return;let i=0;return s.map(n=>{const o={start:i,end:i+n.length},r=t.map(a=>yn.intersect(o,a)).filter(a=>!yn.isEmpty(a)).map(({start:a,end:l})=>({start:a-i,end:l-i}));return i=o.end+e.length,r})}class goe{constructor(e,t){this.container=e,this.supportIcons=t,this.label=void 0,this.singleLabel=void 0}setLabel(e,t){if(!(this.label===e&&To(this.options,t)))if(this.label=e,this.options=t,typeof e=="string")this.singleLabel||(this.container.innerText="",this.container.classList.remove("multiple"),this.singleLabel=new lh(X(this.container,ie("a.label-name",{id:t==null?void 0:t.domId})),{supportIcons:this.supportIcons})),this.singleLabel.set(e,t==null?void 0:t.matches,void 0,t==null?void 0:t.labelEscapeNewLines);else{this.container.innerText="",this.container.classList.add("multiple"),this.singleLabel=void 0;const i=(t==null?void 0:t.separator)||"/",n=foe(e,i,t==null?void 0:t.matches);for(let o=0;o<e.length;o++){const r=e[o],a=n?n[o]:void 0,l=(t==null?void 0:t.domId)&&`${t==null?void 0:t.domId}_${o}`,c=ie("a.label-name",{id:l,"data-icon-label-count":e.length,"data-icon-label-index":o,role:"treeitem"});new lh(X(this.container,c),{supportIcons:this.supportIcons}).set(r,a,void 0,t==null?void 0:t.labelEscapeNewLines),o<e.length-1&&X(c,ie("span.label-separator",void 0,i))}}}}const Dv=ie;class cA{constructor(e,t,i){this.os=t,this.keyElements=new Set,this.options=i||Object.create(null),this.labelBackground=this.options.keybindingLabelBackground,this.labelForeground=this.options.keybindingLabelForeground,this.labelBorder=this.options.keybindingLabelBorder,this.labelBottomBorder=thi
Line truncated
|
|
|
|
|
`);a!==this.ui.styleSheet.textContent&&(this.ui.styleSheet.textContent=a)}}}XS.MAX_WIDTH=600;class Loe{constructor(e){this.spliceables=e}splice(e,t,i){this.spliceables.forEach(n=>n.splice(e,t,i))}}class nf extends Error{constructor(e,t){super(`ListError [${e}] ${t}`)}}function _4(s,e){const t=[];for(const i of e){if(s.start>=i.range.end)continue;if(s.end<i.range.start)break;const n=yn.intersect(s,i.range);yn.isEmpty(n)||t.push({range:n,size:i.size})}return t}function zE({start:s,end:e},t){return{start:s+t,end:e+t}}function koe(s){const e=[];let t=null;for(const i of s){const n=i.range.start,o=i.range.end,r=i.size;if(t&&r===t.size){t.range.end=o;continue}t={range:{start:n,end:o},size:r},e.push(t)}return e}function Doe(...s){return koe(s.reduce((e,t)=>e.concat(t),[]))}class b4{constructor(){this.groups=[],this._size=0}splice(e,t,i=[]){const n=i.length-t,o=_4({start:0,end:e},this.groups),r=_4({start:e+t,end:Number.POSITIVE_INFINITY},this.groups).map(l=>({range:zE(l.range,n),size:l.size})),a=i.map((l,c)=>({range:{start:e+c,end:e+c+1},size:l.size}));this.groups=Doe(o,a,r),this._size=this.groups.reduce((l,c)=>l+c.size*(c.range.end-c.range.start),0)}get count(){const e=this.groups.length;return e?this.groups[e-1].range.end:0}get size(){return this._size}indexAt(e){if(e<0)return-1;let t=0,i=0;for(const n of this.groups){const o=n.range.end-n.range.start,r=i+o*n.size;if(e<r)return t+Math.floor((e-i)/n.size);t+=o,i=r}return t}indexAfter(e){return Math.min(this.indexAt(e)+1,this.count)}positionAt(e){if(e<0)return-1;let t=0,i=0;for(const n of this.groups){const o=n.range.end-n.range.start,r=i+o;if(e<r)return t+(e-i)*n.size;t+=o*n.size,i=r}return-1}}function xoe(s){var e;try{(e=s.parentElement)===null||e===void 0||e.removeChild(s)}catch{}}class Eoe{constructor(e){this.renderers=e,this.cache=new Map}alloc(e){let t=this.getTemplateCache(e).pop();if(!t){const i=ie(".monaco-list-row"),o=this.getRenderer(e).renderTemplate(i);t={domNode:i,templateId:e,templateData:o}}return t}release(e){!e||this.releaseRow(e)}releaseRow(e){const{domNode:t,templateId:i}=e;t&&(t.classList.remove("scrolling"),xoe(t)),this.getTemplateCache(i).push(e)}getTemplateCache(e){let t=this.cache.get(e);return t||(t=[],this.cache.set(e,t)),t}dispose(){this.cache.forEach((e,t)=>{for(const i of e)this.getRenderer(t).disposeTemplate(i.templateData),i.templateData=null}),this.cache.clear()}getRenderer(e){const t=this.renderers.get(e);if(!t)throw new Error(`No renderer found for ${e}`);return t}}var Md=globalThis&&globalThis.__decorate||function(s,e,t,i){var n=arguments.length,o=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(s,e,t,i);else for(var a=s.length-1;a>=0;a--)(r=s[a])&&(o=(n<3?r(o):n>3?r(e,t,o):r(e,t))||o);return n>3&&o&&Object.defineProperty(e,t,o),o};const ta={useShadows:!0,verticalScrollMode:1,setRowLineHeight:!0,setRowHeight:!0,supportDynamicHeights:!1,dnd:{getDragElements(s){return[s]},getDragURI(){return null},onDragStart(){},onDragOver(){return!1},drop(){}},horizontalScrolling:!1,transformOptimization:!0,alwaysConsumeMouseWheel:!0};class l0{constructor(e){this.elements=e}update(){}getData(){return this.elements}}class Ioe{constructor(e){this.elements=e}update(){}getData(){return this.elements}}class Toe{constructor(){this.types=[],this.files=[]}update(e){if(e.types&&this.types.splice(0,this.types.length,...e.types),e.files){this.files.splice(0,this.files.length);for(let t=0;t<e.files.length;t++){const i=e.files.item(t);i&&(i.size||i.type)&&this.files.push(i)}}}getData(){return{types:this.types,files:this.files}}}function Noe(s,e){return Array.isArray(s)&&Array.isArray(e)?ro(s,e):s===e}class Aoe{constructor(e){e!=null&&e.getSetSize?this.getSetSize=e.getSetSize.bind(e):this.getSetSize=(t,i,n)=>n,e!=null&&e.getPosInSet?this.getPosInSet=e.getPosInSet.bind(e):this.getPosInSet=(t,i)=>i+1,e!=null&&e.getRole?this.getRole=e.getRole.bind(e):this.getRole=t=>"listitem",e!=null&&e.isChecked?this.isChecked=e.isChecked.bind(e):this.isChecked=t=>{}}}class ur{constructor(e,t,i,n=ta){var o,r,a,l,c,d,u,h,f,g;if(this.virtualDelegate=t,this.domId=`list_id_${++ur.InstanceCount}`,this.renderers=new Map,this.renderWidth=0,this._scrollHeight=0,this.scrollableElementUpdateDisposable=null,this.scrollableElementWidthDelayer=new Va(50),this.splicing=!1,this.dragOverAnimationStopDisposable=q.None,this.dragOverMouseY=0,this.canDrop=!1,this.currentDragFeedbackDisposable=q.None,this.onDragLeaveTimeout=q.None,this.disposables=new ee,this._onDidChangeContentHeight=new W,this._horizontalScrolling=!1,n.horizontalScrolling&&n.supportDynamicHeights)throw new Error("Horizontal scrolling and dynamic heights not supported simultaneously");this.items=[],this.itemId=0,this.rangeMap=new b4;for(const b of i)this.renderers.set(b.templateId,b);this.cache=this.disposables.add(new Eoe(this.renderers)),this.lastRenderTop=0,this.lastRenderHeight=0,this.domNode=document.createElement("div"),this.domNode
Line truncated
|
|
|
|
|
.monaco-drag-image,
|
|
|
|
|
.monaco-list${t}:focus .monaco-list-row.selected.focused { background-color: ${e.listFocusAndSelectionBackground}; }
|
|
|
|
|
`),e.listFocusAndSelectionForeground&&i.push(`
|
|
|
|
|
.monaco-drag-image,
|
|
|
|
|
.monaco-list${t}:focus .monaco-list-row.selected.focused { color: ${e.listFocusAndSelectionForeground}; }
|
|
|
|
|
`),e.listInactiveFocusForeground&&(i.push(`.monaco-list${t} .monaco-list-row.focused { color: ${e.listInactiveFocusForeground}; }`),i.push(`.monaco-list${t} .monaco-list-row.focused:hover { color: ${e.listInactiveFocusForeground}; }`)),e.listInactiveSelectionIconForeground&&i.push(`.monaco-list${t} .monaco-list-row.focused .codicon { color: ${e.listInactiveSelectionIconForeground}; }`),e.listInactiveFocusBackground&&(i.push(`.monaco-list${t} .monaco-list-row.focused { background-color: ${e.listInactiveFocusBackground}; }`),i.push(`.monaco-list${t} .monaco-list-row.focused:hover { background-color: ${e.listInactiveFocusBackground}; }`)),e.listInactiveSelectionBackground&&(i.push(`.monaco-list${t} .monaco-list-row.selected { background-color: ${e.listInactiveSelectionBackground}; }`),i.push(`.monaco-list${t} .monaco-list-row.selected:hover { background-color: ${e.listInactiveSelectionBackground}; }`)),e.listInactiveSelectionForeground&&i.push(`.monaco-list${t} .monaco-list-row.selected { color: ${e.listInactiveSelectionForeground}; }`),e.listHoverBackground&&i.push(`.monaco-list${t}:not(.drop-target) .monaco-list-row:hover:not(.selected):not(.focused) { background-color: ${e.listHoverBackground}; }`),e.listHoverForeground&&i.push(`.monaco-list${t} .monaco-list-row:hover:not(.selected):not(.focused) { color: ${e.listHoverForeground}; }`),e.listSelectionOutline&&i.push(`.monaco-list${t} .monaco-list-row.selected { outline: 1px dotted ${e.listSelectionOutline}; outline-offset: -1px; }`),e.listFocusOutline&&i.push(`
|
|
|
|
|
.monaco-drag-image,
|
|
|
|
|
.monaco-list${t}:focus .monaco-list-row.focused { outline: 1px solid ${e.listFocusOutline}; outline-offset: -1px; }
|
|
|
|
|
.monaco-workbench.context-menu-visible .monaco-list${t}.last-focused .monaco-list-row.focused { outline: 1px solid ${e.listFocusOutline}; outline-offset: -1px; }
|
|
|
|
|
`),e.listInactiveFocusOutline&&i.push(`.monaco-list${t} .monaco-list-row.focused { outline: 1px dotted ${e.listInactiveFocusOutline}; outline-offset: -1px; }`),e.listHoverOutline&&i.push(`.monaco-list${t} .monaco-list-row:hover { outline: 1px dashed ${e.listHoverOutline}; outline-offset: -1px; }`),e.listDropBackground&&i.push(`
|
|
|
|
|
.monaco-list${t}.drop-target,
|
|
|
|
|
.monaco-list${t} .monaco-list-rows.drop-target,
|
|
|
|
|
.monaco-list${t} .monaco-list-row.drop-target { background-color: ${e.listDropBackground} !important; color: inherit !important; }
|
|
|
|
|
`),e.tableColumnsBorder&&i.push(`
|
|
|
|
|
.monaco-table:hover > .monaco-split-view2,
|
|
|
|
|
.monaco-table:hover > .monaco-split-view2 .monaco-sash.vertical::before {
|
|
|
|
|
border-color: ${e.tableColumnsBorder};
|
|
|
|
|
}`),e.tableOddRowsBackgroundColor&&i.push(`
|
|
|
|
|
.monaco-table .monaco-list-row[data-parity=odd]:not(.focused):not(.selected):not(:hover) .monaco-table-tr,
|
|
|
|
|
.monaco-table .monaco-list:not(:focus) .monaco-list-row[data-parity=odd].focused:not(.selected):not(:hover) .monaco-table-tr,
|
|
|
|
|
.monaco-table .monaco-list:not(.focused) .monaco-list-row[data-parity=odd].focused:not(.selected):not(:hover) .monaco-table-tr {
|
|
|
|
|
background-color: ${e.tableOddRowsBackgroundColor};
|
|
|
|
|
}
|
|
|
|
|
`),this.styleElement.textContent=i.join(`
|
|
|
|
|
`)}}const Woe={listFocusBackground:$.fromHex("#7FB0D0"),listActiveSelectionBackground:$.fromHex("#0E639C"),listActiveSelectionForeground:$.fromHex("#FFFFFF"),listActiveSelectionIconForeground:$.fromHex("#FFFFFF"),listFocusAndSelectionOutline:$.fromHex("#90C2F9"),listFocusAndSelectionBackground:$.fromHex("#094771"),listFocusAndSelectionForeground:$.fromHex("#FFFFFF"),listInactiveSelectionBackground:$.fromHex("#3F3F46"),listInactiveSelectionIconForeground:$.fromHex("#FFFFFF"),listHoverBackground:$.fromHex("#2A2D2E"),listDropBackground:$.fromHex("#383B3D"),treeIndentGuidesStroke:$.fromHex("#a9a9a9"),tableColumnsBorder:$.fromHex("#cccccc").transparent(.2),tableOddRowsBackgroundColor:$.fromHex("#cccccc").transparent(.04)},Voe={keyboardSupport:!0,mouseSupport:!0,multipleSelectionSupport:!0,dnd:{getDragURI(){return null},onDragStart(){},onDragOver(){return!1},drop(){}}};function Hoe(s,e){const t=s.indexOf(e);if(t===-1)return[];const i=[];let n=t-1;for(;n>=0&&s[n]===e-(t-n);)i.push(s[n--]);for(i.reverse(),n=t;n<s.length&&s[n]===e+(n-t);)i.push(s[n++]);return i}function $E(s,e){const t=[];let i=0,n=0;for(;i<s.length||n<e.length;)if(i>=s.length)t.push(e[n++]);else if(n>=e.length)t.push(s[i++]);else if(s[i]===e[n]){t.push(s[i]),i++,n++;continue}else s[i]<e[n]?t.push(s[i++]):t.push(e[n++]);return t}function zoe(s,e){const t=[];let i=0,n=0;for(;i<s.length||n<e.length;)if(i>=s.length)t.push(e[n++]);else if(n>=e.length)t.push(s[i++]);else if(s[i]===e[n]){i++,n++;continue}else s[i]<e[n]?t.push(s[i++]):n++;return t}const w4=(s,e)=>s-e;class $oe{constructor(e,t){this._templateId=e,this.renderers=t}get templateId(){return this._templateId}renderTemplate(e){return this.renderers.map(t=>t.renderTemplate(e))}renderElement(e,t,i,n){let o=0;for(const r of this.renderers)r.renderElement(e,t,i[o++],n)}disposeElement(e,t,i,n){var o;let r=0;for(const a of this.renderers)(o=a.disposeElement)===null||o===void 0||o.call(a,e,t,i[r],n),r+=1}disposeTemplate(e){let t=0;for(const i of this.renderers)i.disposeTemplate(e[t++])}}class Uoe{constructor(e){this.accessibilityProvider=e,this.templateId="a18n"}renderTemplate(e){return e}renderElement(e,t,i){const n=this.accessibilityProvider.getAriaLabel(e);n?i.setAttribute("aria-label",n):i.removeAttribute("aria-label");const o=this.accessibilityProvider.getAriaLevel&&this.accessibilityProvider.getAriaLevel(e);typeof o=="number"?i.setAttribute("aria-level",`${o}`):i.removeAttribute("aria-level")}disposeTemplate(e){}}class joe{constructor(e,t){this.list=e,this.dnd=t}getDragElements(e){const t=this.list.getSelectedElements();return t.indexOf(e)>-1?t:[e]}getDragURI(e){return this.dnd.getDragURI(e)}getDragLabel(e,t){if(this.dnd.getDragLabel)return this.dnd.getDragLabel(e,t)}onDragStart(e,t){var i,n;(n=(i=this.dnd).onDragStart)===null||n===void 0||n.call(i,e,t)}onDragOver(e,t,i,n){return this.dnd.onDragOver(e,t,i,n)}onDragLeave(e,t,i,n){var o,r;(r=(o=this.dnd).onDragLeave)===null||r===void 0||r.call(o,e,t,i,n)}onDragEnd(e){var t,i;(i=(t=this.dnd).onDragEnd)===null||i===void 0||i.call(t,e)}drop(e,t,i,n){this.dnd.drop(e,t,i,n)}}class Gr{constructor(e,t,i,n,o=Voe){var r,a,l,c;this.user=e,this._options=o,this.focus=new aw("focused"),this.anchor=new aw("anchor"),this.eventBufferer=new _N,this._ariaLabel="",this.disposables=new ee,this._onDidDispose=new W,this.onDidDispose=this._onDidDispose.event;const d=this._options.accessibilityProvider&&this._options.accessibilityProvider.getWidgetRole?(r=this._options.accessibilityProvider)===null||r===void 0?void 0:r.getWidgetRole():"list";this.selection=new Roe(d!=="listbox"),qa(o,Woe,!1);const u=[this.focus.renderer,this.selection.renderer];this.accessibilityProvider=o.accessibilityProvider,this.accessibilityProvider&&(u.push(new Uoe(this.accessibilityProvider)),(l=(a=this.accessibilityProvider).onDidChangeActiveDescendant)===null||l===void 0||l.call(a,this.onDidChangeActiveDescendant,this,this.disposables)),n=n.map(f=>new $oe(f.templateId,[...u,f]));const h=Object.assign(Object.assign({},o),{dnd:o.dnd&&new joe(this,o.dnd)});if(this.view=new ur(t,i,n,h),this.view.domNode.setAttribute("role",d),o.styleController)this.styleController=o.styleController(this.view.domId);else{const f=Fo(this.view.domNode);this.styleController=new _6(f,this.view.domId)}if(this.spliceable=new Loe([new pk(this.focus,this.view,o.identityProvider),new pk(this.selection,this.view,o.identityProvider),new pk(this.anchor,this.view,o.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 Foe(this,this.view)),(typeof o.keyboardSupport!="boolean"||o.keyboardSupport)&&(this.keyboardController=new f6(this,this.view,o),this.disposables.add(this.keyboardController)),o.keyboardNavigationLabelProvider){const f=o.keyboardNavigationDelegate||Ooe;this.typeNavigationController=new Poe(this,this.view,o.keyboardNavigationLabelProvider,(c=o
Line truncated
|
|
|
|
|
top: ${this.virtualDelegate.headerRowHeight+1}px;
|
|
|
|
|
height: calc(100% - ${this.virtualDelegate.headerRowHeight}px);
|
|
|
|
|
}`),this.styleElement.textContent=t.join(`
|
|
|
|
|
`),this.list.style(e)}getSelectedElements(){return this.list.getSelectedElements()}getSelection(){return this.list.getSelection()}getFocus(){return this.list.getFocus()}dispose(){this.disposables.dispose()}}QS.InstanceCount=0;const tre={inputActiveOptionBorder:$.fromHex("#007ACC00"),inputActiveOptionForeground:$.fromHex("#FFFFFF"),inputActiveOptionBackground:$.fromHex("#0E639C50")};class d0 extends dr{constructor(e){super(),this._onChange=this._register(new W),this.onChange=this._onChange.event,this._onKeyDown=this._register(new W),this.onKeyDown=this._onKeyDown.event,this._opts=Object.assign(Object.assign({},tre),e),this._checked=this._opts.isChecked;const t=["monaco-custom-toggle"];this._opts.icon&&(this._icon=this._opts.icon,t.push(...Jn.asClassNameArray(this._icon))),this._opts.actionClassName&&t.push(...this._opts.actionClassName.split(" ")),this._checked&&t.push("checked"),this.domNode=document.createElement("div"),this.domNode.title=this._opts.title,this.domNode.classList.add(...t),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,i=>{this.enabled&&(this.checked=!this._checked,this._onChange.fire(!1),i.preventDefault())}),this.ignoreGesture(this.domNode),this.onkeydown(this.domNode,i=>{if(i.keyCode===10||i.keyCode===3){this.checked=!this._checked,this._onChange.fire(!0),i.preventDefault(),i.stopPropagation();return}this._onKeyDown.fire(i)})}get enabled(){return this.domNode.getAttribute("aria-disabled")!=="true"}focus(){this.domNode.focus()}get checked(){return this._checked}set checked(e){this._checked=e,this.domNode.setAttribute("aria-checked",String(this._checked)),this.domNode.classList.toggle("checked",this._checked),this.applyStyles()}width(){return 2+2+2+16}style(e){e.inputActiveOptionBorder&&(this._opts.inputActiveOptionBorder=e.inputActiveOptionBorder),e.inputActiveOptionForeground&&(this._opts.inputActiveOptionForeground=e.inputActiveOptionForeground),e.inputActiveOptionBackground&&(this._opts.inputActiveOptionBackground=e.inputActiveOptionBackground),this.applyStyles()}applyStyles(){this.domNode&&(this.domNode.style.borderColor=this._checked&&this._opts.inputActiveOptionBorder?this._opts.inputActiveOptionBorder.toString():"",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():"")}enable(){this.domNode.setAttribute("aria-disabled",String(!1))}disable(){this.domNode.setAttribute("aria-disabled",String(!0))}}const ire=p("caseDescription","Match Case"),nre=p("wordsDescription","Match Whole Word"),sre=p("regexDescription","Use Regular Expression");class C6 extends d0{constructor(e){super({icon:m.caseSensitive,title:ire+e.appendTitle,isChecked:e.isChecked,inputActiveOptionBorder:e.inputActiveOptionBorder,inputActiveOptionForeground:e.inputActiveOptionForeground,inputActiveOptionBackground:e.inputActiveOptionBackground})}}class w6 extends d0{constructor(e){super({icon:m.wholeWord,title:nre+e.appendTitle,isChecked:e.isChecked,inputActiveOptionBorder:e.inputActiveOptionBorder,inputActiveOptionForeground:e.inputActiveOptionForeground,inputActiveOptionBackground:e.inputActiveOptionBackground})}}class S6 extends d0{constructor(e){super({icon:m.regex,title:sre+e.appendTitle,isChecked:e.isChecked,inputActiveOptionBorder:e.inputActiveOptionBorder,inputActiveOptionForeground:e.inputActiveOptionForeground,inputActiveOptionBackground:e.inputActiveOptionBackground})}}const ore=p("defaultLabel","input");class rre extends dr{constructor(e,t,i,n){var o;super(),this._showOptionButtons=i,this.fixFocusOnOptionClickEnabled=!0,this.imeSessionInProgress=!1,this.additionalToggles=[],this._onDidOptionChange=this._register(new W),this.onDidOptionChange=this._onDidOptionChange.event,this._onKeyDown=this._register(new W),this.onKeyDown=this._onKeyDown.event,this._onMouseDown=this._register(new W),this.onMouseDown=this._onMouseDown.event,this._onInput=this._register(new W),this._onKeyUp=this._register(new W),this._onCaseSensitiveKeyDown=this._register(new W),this.onCaseSensitiveKeyDown=this._onCaseSensitiveKeyDown.event,this._onRegexKeyDown=this._register(new W),this.onRegexKeyDown=this._onRegexKeyDown.event,this._lastHighlightFindOptions=0,this.contextViewProvider=t,this.placeholder=n.placeholder||"",this.validation=n.validation,this.label=n.label||ore,this.inputActiveOptionBorder=n.inputActiveOptionBorder,this.inputActiveOptionForeground=n.inputActiveOptionForeground,this.inputActiveOptionBackground=n.inputActiveOptionBackground,this.inputBackground=n.inputBackground,this.inputForeground=n.inputForeground,this.inputBorder=n.inputBorder,this.inputValidationInfoBorder=n.inputValidationInfoBor
Line truncated
|
|
|
|
|
`),(t=this.findController)===null||t===void 0||t.style(e),this.view.style(e)}getParentElement(e){const t=this.model.getParentNodeLocation(e);return this.model.getNode(t).element}getFirstElementChild(e){return this.model.getFirstElementChild(e)}getNode(e){return this.model.getNode(e)}collapse(e,t=!1){return this.model.setCollapsed(e,!0,t)}expand(e,t=!1){return this.model.setCollapsed(e,!1,t)}isCollapsible(e){return this.model.isCollapsible(e)}setCollapsible(e,t){return this.model.setCollapsible(e,t)}isCollapsed(e){return this.model.isCollapsed(e)}refilter(){this._onWillRefilter.fire(void 0),this.model.refilter()}setSelection(e,t){const i=e.map(o=>this.model.getNode(o));this.selection.set(i,t);const n=e.map(o=>this.model.getListIndex(o)).filter(o=>o>-1);this.view.setSelection(n,t,!0)}getSelection(){return this.selection.get()}setFocus(e,t){const i=e.map(o=>this.model.getNode(o));this.focus.set(i,t);const n=e.map(o=>this.model.getListIndex(o)).filter(o=>o>-1);this.view.setFocus(n,t,!0)}getFocus(){return this.focus.get()}reveal(e,t){this.model.expandTo(e);const i=this.model.getListIndex(e);i!==-1&&this.view.reveal(i,t)}onLeftArrow(e){e.preventDefault(),e.stopPropagation();const t=this.view.getFocusedElements();if(t.length===0)return;const i=t[0],n=this.model.getNodeLocation(i);if(!this.model.setCollapsed(n,!0)){const r=this.model.getParentNodeLocation(n);if(!r)return;const a=this.model.getListIndex(r);this.view.reveal(a),this.view.setFocus([a])}}onRightArrow(e){e.preventDefault(),e.stopPropagation();const t=this.view.getFocusedElements();if(t.length===0)return;const i=t[0],n=this.model.getNodeLocation(i);if(!this.model.setCollapsed(n,!1)){if(!i.children.some(l=>l.visible))return;const[r]=this.view.getFocus(),a=r+1;this.view.reveal(a),this.view.setFocus([a])}}onSpace(e){e.preventDefault(),e.stopPropagation();const t=this.view.getFocusedElements();if(t.length===0)return;const i=t[0],n=this.model.getNodeLocation(i),o=e.browserEvent.altKey;this.model.setCollapsed(n,void 0,o)}dispose(){pt(this.disposables),this.view.dispose()}}class gA{constructor(e,t,i={}){this.user=e,this.rootRef=null,this.nodes=new Map,this.nodesByIdentity=new Map,this.model=new are(e,t,null,i),this.onDidSplice=this.model.onDidSplice,this.onDidChangeCollapseState=this.model.onDidChangeCollapseState,this.onDidChangeRenderNodeCount=this.model.onDidChangeRenderNodeCount,i.sorter&&(this.sorter={compare(n,o){return i.sorter.compare(n.element,o.element)}}),this.identityProvider=i.identityProvider}setChildren(e,t=tt.empty(),i={}){const n=this.getElementLocation(e);this._setChildren(n,this.preserveCollapseState(t),i)}_setChildren(e,t=tt.empty(),i){const n=new Set,o=new Set,r=l=>{var c;if(l.element===null)return;const d=l;if(n.add(d.element),this.nodes.set(d.element,d),this.identityProvider){const u=this.identityProvider.getId(d.element).toString();o.add(u),this.nodesByIdentity.set(u,d)}(c=i.onDidCreateNode)===null||c===void 0||c.call(i,d)},a=l=>{var c;if(l.element===null)return;const d=l;if(n.has(d.element)||this.nodes.delete(d.element),this.identityProvider){const u=this.identityProvider.getId(d.element).toString();o.has(u)||this.nodesByIdentity.delete(u)}(c=i.onDidDeleteNode)===null||c===void 0||c.call(i,d)};this.model.splice([...e,0],Number.MAX_VALUE,t,Object.assign(Object.assign({},i),{onDidCreateNode:r,onDidDeleteNode:a}))}preserveCollapseState(e=tt.empty()){return this.sorter&&(e=[...e].sort(this.sorter.compare.bind(this.sorter))),tt.map(e,t=>{let i=this.nodes.get(t.element);if(!i&&this.identityProvider){const r=this.identityProvider.getId(t.element).toString();i=this.nodesByIdentity.get(r)}if(!i)return Object.assign(Object.assign({},t),{children:this.preserveCollapseState(t.children)});const n=typeof t.collapsible=="boolean"?t.collapsible:i.collapsible,o=typeof t.collapsed<"u"?t.collapsed:i.collapsed;return Object.assign(Object.assign({},t),{collapsible:n,collapsed:o,children:this.preserveCollapseState(t.children)})})}rerender(e){const t=this.getElementLocation(e);this.model.rerender(t)}getFirstElementChild(e=null){const t=this.getElementLocation(e);return this.model.getFirstElementChild(t)}has(e){return this.nodes.has(e)}getListIndex(e){const t=this.getElementLocation(e);return this.model.getListIndex(t)}getListRenderCount(e){const t=this.getElementLocation(e);return this.model.getListRenderCount(t)}isCollapsible(e){const t=this.getElementLocation(e);return this.model.isCollapsible(t)}setCollapsible(e,t){const i=this.getElementLocation(e);return this.model.setCollapsible(i,t)}isCollapsed(e){const t=this.getElementLocation(e);return this.model.isCollapsed(t)}setCollapsed(e,t,i){const n=this.getElementLocation(e);return this.model.setCollapsed(n,t,i)}expandTo(e){const t=this.getElementLocation(e);this.model.expandTo(t)}refilter(){this.model.refilter()}getNode(e=null){if(e===null)return this.model.getNode(this.model.rootRef);const t=this.nodes.get(e);if(!t)throw new Lo(this.user,`Tree element not found: ${e}`);return t}getNodeLocation(e){return e.e
Line truncated
|
|
|
|
|
`)}const tae={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:{[Vi]:"#FFFFFE",[so]:"#000000",[l2]:"#E5EBF1",[Jb]:"#D3D3D3",[e0]:"#939393",[c2]:"#ADD6FF4D"}},iae={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:{[Vi]:"#1E1E1E",[so]:"#D4D4D4",[l2]:"#3A3D41",[Jb]:"#404040",[e0]:"#707070",[c2]:"#ADD6FF26"}},nae={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:"m
Line truncated
|
|
|
|
|
`)}}}class B6{getIcon(e){const t=T8();let i=e.defaults;for(;vt.isThemeIcon(i);){const n=t.getIcon(i.id);if(!n)return;i=n.defaults}return i}}const El="vs",fg="vs-dark",Wu="hc-black",Vu="hc-light",W6=ai.as(h9.ColorContribution),rae=ai.as(t9.ThemingContribution);class V6{constructor(e,t){this.semanticHighlighting=!1,this.themeData=t;const i=t.base;e.length>0?(yC(e)?this.id=e:this.id=i+" "+e,this.themeName=e):(this.id=i,this.themeName=i),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(const t in this.themeData.colors)e.set(t,$.fromHex(this.themeData.colors[t]));if(this.themeData.inherit){const t=iI(this.themeData.base);for(const i in t.colors)e.has(i)||e.set(i,$.fromHex(t.colors[i]))}this.colors=e}return this.colors}getColor(e,t){const i=this.getColors().get(e);if(i)return i;if(t!==!1)return this.getDefault(e)}getDefault(e){let t=this.defaultColors[e];return t||(t=W6.resolveDefaultColor(e,this),this.defaultColors[e]=t,t)}defines(e){return Object.prototype.hasOwnProperty.call(this.getColors(),e)}get type(){switch(this.base){case El:return xo.LIGHT;case Wu:return xo.HIGH_CONTRAST_DARK;case Vu:return xo.HIGH_CONTRAST_LIGHT;default:return xo.DARK}}get tokenTheme(){if(!this._tokenTheme){let e=[],t=[];if(this.themeData.inherit){const o=iI(this.themeData.base);e=o.rules,o.encodedTokensColors&&(t=o.encodedTokensColors)}const i=this.themeData.colors["editor.foreground"],n=this.themeData.colors["editor.background"];if(i||n){const o={token:""};i&&(o.foreground=i),n&&(o.background=n),e.push(o)}e=e.concat(this.themeData.rules),this.themeData.encodedTokensColors&&(t=this.themeData.encodedTokensColors),this._tokenTheme=F6.createFromRawTokenTheme(e,t)}return this._tokenTheme}getTokenStyleMetadata(e,t,i){const o=this.tokenTheme._match([e].concat(t).join(".")).metadata,r=mn.getForeground(o),a=mn.getFontStyle(o);return{foreground:r,italic:Boolean(a&1),bold:Boolean(a&2),underline:Boolean(a&4),strikethrough:Boolean(a&8)}}}function yC(s){return s===El||s===fg||s===Wu||s===Vu}function iI(s){switch(s){case El:return tae;case fg:return iae;case Wu:return nae;case Vu:return sae}}function xv(s){const e=iI(s);return new V6(s,e)}class aae extends q{constructor(){super(),this._onColorThemeChange=this._register(new W),this.onDidColorThemeChange=this._onColorThemeChange.event,this._onProductIconThemeChange=this._register(new W),this.onDidProductIconThemeChange=this._onProductIconThemeChange.event,this._environment=Object.create(null),this._builtInProductIconTheme=new B6,this._autoDetectHighContrast=!0,this._knownThemes=new Map,this._knownThemes.set(El,xv(El)),this._knownThemes.set(fg,xv(fg)),this._knownThemes.set(Wu,xv(Wu)),this._knownThemes.set(Vu,xv(Vu));const e=oae(this);this._codiconCSS=e.getCSS(),this._themeCSS="",this._allCSS=`${this._codiconCSS}
|
|
|
|
|
${this._themeCSS}`,this._globalStyleElement=null,this._styleElements=[],this._colorMapOverride=null,this.setTheme(El),this._onOSSchemeChanged(),e.onDidChange(()=>{this._codiconCSS=e.getCSS(),this._updateCSS()}),IN("(forced-colors: active)",()=>{this._onOSSchemeChanged()})}registerEditorContainer(e){return M_(e)?this._registerShadowDomContainer(e):this._registerRegularEditorContainer()}_registerRegularEditorContainer(){return this._globalStyleElement||(this._globalStyleElement=Fo(),this._globalStyleElement.className="monaco-colors",this._globalStyleElement.textContent=this._allCSS,this._styleElements.push(this._globalStyleElement)),q.None}_registerShadowDomContainer(e){const t=Fo(e);return t.className="monaco-colors",t.textContent=this._allCSS,this._styleElements.push(t),{dispose:()=>{for(let i=0;i<this._styleElements.length;i++)if(this._styleElements[i]===t){this._styleElements.splice(i,1);return}}}}defineTheme(e,t){if(!/^[a-z0-9\-]+$/i.test(e))throw new Error("Illegal theme name!");if(!yC(t.base)&&!yC(e))throw new Error("Illegal theme base!");this._knownThemes.set(e,new V6(e,t)),yC(e)&&this._knownThemes.forEach(i=>{i.base===e&&i.notifyBaseUpdated()}),this._theme.themeName===e&&this.setTheme(e)}getColorTheme(){return this._theme}setColorMapOverride(e){this._colorMapOverride=e,this._updateThemeOrColorMap()}setTheme(e){let t;this._knownThemes.has(e)?t=this._knownThemes.get(e):t=this._knownThemes.get(El),this._updateActualTheme(t)}_updateActualTheme(e){!e||this._theme===e||(this._theme=e,this._updateThemeOrColorMap())}_onOSSchemeChanged(){if(this._autoDetectHighContrast){const e=window.matchMedia("(forced-colors: active)").matches;if(e!==An(this._theme.type)){let t;F_(this._theme.type)?t=e?Wu:fg:t=e?Vu:El,this._updateActualTheme(this._knownThemes.get(t))}}}setAutoDetectHighContrast(e){this._autoDetectHighContrast=e,this._onOSSchemeChanged()}_updateThemeOrColorMap(){const e=[],t={},i={addRule:r=>{t[r]||(e.push(r),t[r]=!0)}};rae.getThemingParticipants().forEach(r=>r(this._theme,i,this._environment));const n=[];for(const r of W6.getColors()){const a=this._theme.getColor(r.id,!0);a&&n.push(`${u9(r.id)}: ${a.toString()};`)}i.addRule(`.monaco-editor { ${n.join(`
|
|
|
|
|
`)} }`);const o=this._colorMapOverride||this._theme.tokenTheme.getColorMap();i.addRule(eae(o)),this._themeCSS=e.join(`
|
|
|
|
|
`),this._updateCSS(),ni.setColorMap(o),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}}getProductIconTheme(){return this._builtInProductIconTheme}}const go=rt("themeService");var lae=globalThis&&globalThis.__decorate||function(s,e,t,i){var n=arguments.length,o=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(s,e,t,i);else for(var a=s.length-1;a>=0;a--)(r=s[a])&&(o=(n<3?r(o):n>3?r(e,t,o):r(e,t))||o);return n>3&&o&&Object.defineProperty(e,t,o),o},wk=globalThis&&globalThis.__param||function(s,e){return function(t,i){e(t,i,s)}};let nI=class extends q{constructor(e,t,i){super(),this._contextKeyService=e,this._layoutService=t,this._configurationService=i,this._accessibilitySupport=0,this._onDidChangeScreenReaderOptimized=new W,this._onDidChangeReducedMotion=new W,this._accessibilityModeEnabledContext=Yb.bindTo(this._contextKeyService);const n=()=>this._accessibilityModeEnabledContext.set(this.isScreenReaderOptimized());this._register(this._configurationService.onDidChangeConfiguration(r=>{r.affectsConfiguration("editor.accessibilitySupport")&&(n(),this._onDidChangeScreenReaderOptimized.fire()),r.affectsConfiguration("workbench.reduceMotion")&&(this._configMotionReduced=this._configurationService.getValue("workbench.reduceMotion"),this._onDidChangeReducedMotion.fire())})),n(),this._register(this.onDidChangeScreenReaderOptimized(()=>n()));const o=window.matchMedia("(prefers-reduced-motion: reduce)");this._systemMotionReduced=o.matches,this._configMotionReduced=this._configurationService.getValue("workbench.reduceMotion"),this.initReducedMotionListeners(o)}initReducedMotionListeners(e){if(!this._layoutService.hasContainer)return;this._register(Q(e,"change",()=>{this._systemMotionReduced=e.matches,this._configMotionReduced==="auto"&&this._onDidChangeReducedMotion.fire()}));const t=()=>{const i=this.isMotionReduced();this._layoutService.container.classList.toggle("reduce-motion",i),this._layoutService.container.classList.toggle("enable-motion",!i)};t(),this._register(this.onDidChangeReducedMotion(()=>t()))}get onDidChangeScreenReaderOptimized(){return this._onDidChangeScreenReaderOptimized.event}isScreenReaderOptimized(){const e=this._configurationService.getValue("editor.accessibilitySupport");return e==="on"||e==="auto"&&this._accessibilitySupport===2}get onDidChangeReducedMotion(){return this._onDidChangeReducedMotion.event}isMotionReduced(){const e=this._configMotionReduced;return e==="on"||e==="auto"&&this._systemMotionReduced}getAccessibilitySupport(){return this._accessibilitySupport}};nI=lae([wk(0,Be),wk(1,xp),wk(2,_t)],nI);var Im=globalThis&&globalThis.__awaiter||function(s,e,t,i){function n(o){return o instanceof t?o:new t(function(r){r(o)})}return new(t||(t=Promise))(function(o,r){function a(d){try{c(i.next(d))}catch(u){r(u)}}function l(d){try{c(i.throw(d))}catch(u){r(u)}}function c(d){d.done?o(d.value):n(d.value).then(a,l)}c((i=i.apply(s,e||[])).next())})},zf;(function(s){s[s.None=0]="None",s[s.Initialized=1]="Initialized",s[s.Closed=2]="Closed"})(zf||(zf={}));class gg extends q{constructor(e,t=Object.create(null)){super(),this.database=e,this.options=t,this._onDidChangeStorage=this._register(new W),this.onDidChangeStorage=this._onDidChangeStorage.event,this.state=zf.None,this.cache=new Map,this.flushDelayer=new _q(gg.DEFAULT_FLUSH_DELAY),this.pendingDeletes=new Set,this.pendingInserts=new Map,this.whenFlushedCallbacks=[],this.registerListeners()}registerListeners(){this._register(this.database.onDidChangeItemsExternal(e=>this.onDidChangeItemsExternal(e)))}onDidChangeItemsExternal(e){var t,i;(t=e.changed)===null||t===void 0||t.forEach((n,o)=>this.accept(o,n)),(i=e.deleted)===null||i===void 0||i.forEach(n=>this.accept(n,void 0))}accept(e,t){if(this.state===zf.Closed)return;let i=!1;eo(t)?i=this.cache.delete(e):this.cache.get(e)!==t&&(this.cache.set(e,t),i=!0),i&&this._onDidChangeStorage.fire(e)}get(e,t){const i=this.cache.get(e);return eo(i)?t:i}getBoolean(e,t){const i=this.get(e);return eo(i)?t:i==="true"}getNumber(e,t){const i=this.get(e);return eo(i)?t:parseInt(i,10)}set(e,t){return Im(this,void 0,void 0,function*(){if(this.state===zf.Closed)return;if(eo(t))return this.delete(e);const i=String(t);if(this.cache.get(e)!==i)return this.cache.set(e,i),this.pendingInserts.set(e,i),this.pendingDeletes.delete(e),this._onDidChangeStorage.fire(e),this.doFlush()})}delete(e){return Im(this,void 0,void 0,function*(){if(!(this.state===zf.Closed||!this.cache.delete(e)))return this.pendingDeletes.has(e)||this.pendingDeletes.add(e),this.pendingInserts.delete(e),this._onDidChangeStorage.fire(e),this.doFlush()})}get hasPending(){return this.pendingInserts.size>0||this.pendingDeletes.size>0}flushPending(){return Im(this,void 0,void 0,function*(){if(!this.hasPending)return;const e={insert:this.pendingInserts,delete:this.pendingDeletes};return this.pendingDel
Line truncated
|
|
|
|
|
`)}findCycleSlow(){for(const[e,t]of this._nodes){const i=new Set([e]),n=this._findCycle(t,i);if(n)return n}}_findCycle(e,t){for(const[i,n]of e.outgoing){if(t.has(i))return[...t,i].join(" -> ");t.add(i);const o=this._findCycle(n,t);if(o)return o;t.delete(i)}}}class P4 extends Error{constructor(e){var t;super("cyclic dependency between services"),this.message=(t=e.findCycleSlow())!==null&&t!==void 0?t:`UNABLE to detect cycle, dumping graph:
|
|
|
|
|
${e.toString()}`}}class NA{constructor(e=new HS,t=!1,i){this._activeInstantiations=new Set,this._services=e,this._strict=t,this._parent=i,this._services.set(Ue,this)}createChild(e){return new NA(e,this._strict,this)}invokeFunction(e,...t){const i=Qo.traceInvocation(e);let n=!1;try{return e({get:r=>{if(n)throw _j("service accessor is only valid during the invocation of its target method");const a=this._getOrCreateServiceInstance(r,i);if(!a)throw new Error(`[invokeFunction] unknown service '${r}'`);return a}},...t)}finally{n=!0,i.stop()}}createInstance(e,...t){let i,n;return e instanceof ga?(i=Qo.traceCreation(e.ctor),n=this._createInstance(e.ctor,e.staticArguments.concat(t),i)):(i=Qo.traceCreation(e),n=this._createInstance(e,t,i)),i.stop(),n}_createInstance(e,t=[],i){const n=kr.getServiceDependencies(e).sort((a,l)=>a.index-l.index),o=[];for(const a of n){const l=this._getOrCreateServiceInstance(a.id,i);l||this._throwIfStrict(`[createInstance] ${e.name} depends on UNKNOWN service ${a.id}.`,!1),o.push(l)}const r=n.length>0?n[0].index:t.length;if(t.length!==r){console.trace(`[createInstance] First service dependency of ${e.name} at position ${r+1} conflicts with ${t.length} static arguments`);const a=r-t.length;a>0?t=t.concat(new Array(a)):t=t.slice(0,r)}return new e(...t,...o)}_setServiceInstance(e,t){if(this._services.get(e)instanceof ga)this._services.set(e,t);else if(this._parent)this._parent._setServiceInstance(e,t);else throw new Error("illegalState - setting UNKNOWN service instance")}_getServiceInstanceOrDescriptor(e){const t=this._services.get(e);return!t&&this._parent?this._parent._getServiceInstanceOrDescriptor(e):t}_getOrCreateServiceInstance(e,t){const i=this._getServiceInstanceOrDescriptor(e);return i instanceof ga?this._safeCreateAndCacheServiceInstance(e,i,t.branch(e,!0)):(t.branch(e,!1),i)}_safeCreateAndCacheServiceInstance(e,t,i){if(this._activeInstantiations.has(e))throw new Error(`illegal state - RECURSIVELY instantiating service '${e}'`);this._activeInstantiations.add(e);try{return this._createAndCacheServiceInstance(e,t,i)}finally{this._activeInstantiations.delete(e)}}_createAndCacheServiceInstance(e,t,i){const n=new Sae(a=>a.id.toString());let o=0;const r=[{id:e,desc:t,_trace:i}];for(;r.length;){const a=r.pop();if(n.lookupOrInsertNode(a),o++>1e3)throw new P4(n);for(const l of kr.getServiceDependencies(a.desc.ctor)){const c=this._getServiceInstanceOrDescriptor(l.id);if(c||this._throwIfStrict(`[createInstance] ${e} depends on ${l.id} which is NOT registered.`,!0),c instanceof ga){const d={id:l.id,desc:c,_trace:a._trace.branch(l.id,!0)};n.insertEdge(a,d),r.push(d)}}}for(;;){const a=n.roots();if(a.length===0){if(!n.isEmpty())throw new P4(n);break}for(const{data:l}of a){if(this._getServiceInstanceOrDescriptor(l.id)instanceof ga){const d=this._createServiceInstanceWithOwner(l.id,l.desc.ctor,l.desc.staticArguments,l.desc.supportsDelayedInstantiation,l._trace);this._setServiceInstance(l.id,d)}n.removeNode(l)}}return this._getServiceInstanceOrDescriptor(e)}_createServiceInstanceWithOwner(e,t,i=[],n,o){if(this._services.get(e)instanceof ga)return this._createServiceInstance(t,i,n,o);if(this._parent)return this._parent._createServiceInstanceWithOwner(e,t,i,n,o);throw new Error(`illegalState - creating UNKNOWN service instance ${t.name}`)}_createServiceInstance(e,t=[],i,n){if(i){const o=new qc(()=>this._createInstance(e,t,n));return new Proxy(Object.create(null),{get(r,a){if(a in r)return r[a];const l=o.value;let c=l[a];return typeof c!="function"||(c=c.bind(l),r[a]=c),c},set(r,a,l){return o.value[a]=l,!0}})}else return this._createInstance(e,t,n)}_throwIfStrict(e,t){if(t&&console.warn(e),this._strict)throw new Error(e)}}class Qo{constructor(e,t){this.type=e,this.name=t,this._start=Date.now(),this._dep=[]}static traceInvocation(e){return Qo._None}static traceCreation(e){return Qo._None}branch(e,t){const i=new Qo(2,e.toString());return this._dep.push([e,t,i]),i}stop(){const e=Date.now()-this._start;Qo._totals+=e;let t=!1;function i(o,r){const a=[],l=new Array(o+1).join(" ");for(const[c,d,u]of r._dep)if(d&&u){t=!0,a.push(`${l}CREATES -> ${c}`);const h=i(o+1,u);h&&a.push(h)}else a.push(`${l}uses -> ${c}`);return a.join(`
|
|
|
|
|
`)}const n=[`${this.type===0?"CREATE":"CALL"} ${this.name}`,`${i(1,this)}`,`DONE, took ${e.toFixed(2)}ms (grand total ${Qo._totals.toFixed(2)}ms)`];(e>2||t)&&console.log(n.join(`
|
|
|
|
|
`))}}Qo._None=new class extends Qo{constructor(){super(-1,null)}stop(){}branch(){return this}};Qo._totals=0;class yae{constructor(){this._byResource=new $n,this._byOwner=new Map}set(e,t,i){let n=this._byResource.get(e);n||(n=new Map,this._byResource.set(e,n)),n.set(t,i);let o=this._byOwner.get(t);o||(o=new $n,this._byOwner.set(t,o)),o.set(e,i)}get(e,t){const i=this._byResource.get(e);return i==null?void 0:i.get(t)}delete(e,t){let i=!1,n=!1;const o=this._byResource.get(e);o&&(i=o.delete(t));const r=this._byOwner.get(t);if(r&&(n=r.delete(e)),i!==n)throw new Error("illegal state");return i&&n}values(e){var t,i,n,o;return typeof e=="string"?(i=(t=this._byOwner.get(e))===null||t===void 0?void 0:t.values())!==null&&i!==void 0?i:tt.empty():Ie.isUri(e)?(o=(n=this._byResource.get(e))===null||n===void 0?void 0:n.values())!==null&&o!==void 0?o:tt.empty():tt.map(tt.concat(...this._byOwner.values()),r=>r[1])}}class Lae{constructor(e){this.errors=0,this.infos=0,this.warnings=0,this.unknowns=0,this._data=new $n,this._service=e,this._subscription=e.onMarkerChanged(this._update,this)}dispose(){this._subscription.dispose()}_update(e){for(const t of e){const i=this._data.get(t);i&&this._substract(i);const n=this._resourceStats(t);this._add(n),this._data.set(t,n)}}_resourceStats(e){const t={errors:0,warnings:0,infos:0,unknowns:0};if(e.scheme===Ke.inMemory||e.scheme===Ke.walkThrough||e.scheme===Ke.walkThroughSnippet||e.scheme===Ke.vscodeSourceControl)return t;for(const{severity:i}of this._service.read({resource:e}))i===si.Error?t.errors+=1:i===si.Warning?t.warnings+=1:i===si.Info?t.infos+=1:t.unknowns+=1;return t}_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 Lc{constructor(){this._onMarkerChanged=new xj({delay:0,merge:Lc._merge}),this.onMarkerChanged=this._onMarkerChanged.event,this._data=new yae,this._stats=new Lae(this)}dispose(){this._stats.dispose(),this._onMarkerChanged.dispose()}remove(e,t){for(const i of t||[])this.changeOne(e,i,[])}changeOne(e,t,i){if(D7(i))this._data.delete(t,e)&&this._onMarkerChanged.fire([t]);else{const n=[];for(const o of i){const r=Lc._toMarker(e,t,o);r&&n.push(r)}this._data.set(t,e,n),this._onMarkerChanged.fire([t])}}static _toMarker(e,t,i){let{code:n,severity:o,message:r,source:a,startLineNumber:l,startColumn:c,endLineNumber:d,endColumn:u,relatedInformation:h,tags:f}=i;if(!!r)return l=l>0?l:1,c=c>0?c:1,d=d>=l?d:l,u=u>0?u:c,{resource:t,owner:e,code:n,severity:o,message:r,source:a,startLineNumber:l,startColumn:c,endLineNumber:d,endColumn:u,relatedInformation:h,tags:f}}changeAll(e,t){const i=[],n=this._data.values(e);if(n)for(const o of n){const r=tt.first(o);r&&(i.push(r.resource),this._data.delete(r.resource,e))}if(In(t)){const o=new $n;for(const{resource:r,marker:a}of t){const l=Lc._toMarker(e,r,a);if(!l)continue;const c=o.get(r);c?c.push(l):(o.set(r,[l]),i.push(r))}for(const[r,a]of o)this._data.set(r,e,a)}i.length>0&&this._onMarkerChanged.fire(i)}read(e=Object.create(null)){let{owner:t,resource:i,severities:n,take:o}=e;if((!o||o<0)&&(o=-1),t&&i){const r=this._data.get(i,t);if(r){const a=[];for(const l of r)if(Lc._accept(l,n)){const c=a.push(l);if(o>0&&c===o)break}return a}else return[]}else if(!t&&!i){const r=[];for(const a of this._data.values())for(const l of a)if(Lc._accept(l,n)){const c=r.push(l);if(o>0&&c===o)return r}return r}else{const r=this._data.values(i!=null?i:t),a=[];for(const l of r)for(const c of l)if(Lc._accept(c,n)){const d=a.push(c);if(o>0&&d===o)return a}return a}}static _accept(e,t){return t===void 0||(t&e.severity)===e.severity}static _merge(e){const t=new $n;for(const i of e)for(const n of i)t.set(n,!0);return Array.from(t.keys())}}function z6(s,e,t,i,n,o){if(Array.isArray(s)){let r=0;for(const a of s){const l=z6(a,e,t,i,n,o);if(l===10)return l;l>r&&(r=l)}return r}else{if(typeof s=="string")return i?s==="*"?5:s===t?10:0:0;if(s){const{language:r,pattern:a,scheme:l,hasAccessToAllModels:c,notebookType:d}=s;if(!i&&!c)return 0;d&&n&&(e=n);let u=0;if(l)if(l===e.scheme)u=10;else if(l==="*")u=5;else return 0;if(r)if(r===t)u=10;else if(r==="*")u=Math.max(u,5);else return 0;if(d)if(d===o)u=10;else if(d==="*"&&o!==void 0)u=Math.max(u,5);else return 0;if(a){let h;if(typeof a=="string"?h=a:h=Object.assign(Object.assign({},a),{base:U7(a.base)}),h===e.fsPath||pse(h,e.fsPath))u=10;else return 0}return u}else return 0}}function $6(s){return typeof s=="string"?!1:Array.isArray(s)?s.every($6):!!s.exclusive}class F4{constructor(e,t,i,n){this.uri=e,this.languageId=t,this.notebookUri=i,this.notebookType=n}equals(e){var t,i;return this.notebookType===e.notebookType&&this.languageId===e.languageId&&this.uri.toString()===e.uri.toString()&&((t=this.notebookUri)===null||t===void 0?void 0:t.toString())===((i=e.notebookUri)===null||i===void 0?void 0:i.toString())}}class ci{constructor(e){this._notebookInfoResolver=e,this._clock=0,thi
Line truncated
|
|
|
|
|
|
|
|
|
|
`+e.detail),Promise.resolve(window.confirm(t))}show(e,t,i,n){return Promise.resolve({choice:0})}}class ay{info(e){return this.notify({severity:ii.Info,message:e})}warn(e){return this.notify({severity:ii.Warning,message:e})}error(e){return this.notify({severity:ii.Error,message:e})}notify(e){switch(e.severity){case ii.Error:console.error(e.message);break;case ii.Warning:console.warn(e.message);break;default:console.log(e.message);break}return ay.NO_OP}status(e,t){return q.None}}ay.NO_OP=new oie;let cI=class{constructor(e){this._onWillExecuteCommand=new W,this._onDidExecuteCommand=new W,this.onWillExecuteCommand=this._onWillExecuteCommand.event,this.onDidExecuteCommand=this._onDidExecuteCommand.event,this._instantiationService=e}executeCommand(e,...t){const i=ht.getCommand(e);if(!i)return Promise.reject(new Error(`command '${e}' not found`));try{this._onWillExecuteCommand.fire({commandId:e,args:t});const n=this._instantiationService.invokeFunction.apply(this._instantiationService,[i.handler,...t]);return this._onDidExecuteCommand.fire({commandId:e,args:t}),Promise.resolve(n)}catch(n){return Promise.reject(n)}}};cI=Rd([Vn(0,Ue)],cI);let fw=class extends Gne{constructor(e,t,i,n,o,r){super(e,t,i,n,o),this._cachedResolver=null,this._dynamicKeybindings=[],this._domNodeListeners=[];const a=f=>{const g=new ee;g.add(Q(f,fe.KEY_DOWN,_=>{const b=new Qt(_);this._dispatch(b,b.target)&&(b.preventDefault(),b.stopPropagation())})),g.add(Q(f,fe.KEY_UP,_=>{const b=new Qt(_);this._singleModifierDispatch(b,b.target)&&b.preventDefault()})),this._domNodeListeners.push(new Tae(f,g))},l=f=>{for(let g=0;g<this._domNodeListeners.length;g++){const _=this._domNodeListeners[g];_.domNode===f&&(this._domNodeListeners.splice(g,1),_.dispose())}},c=f=>{f.getOption(56)||a(f.getContainerDomNode())},d=f=>{f.getOption(56)||l(f.getContainerDomNode())};this._register(r.onCodeEditorAdd(c)),this._register(r.onCodeEditorRemove(d)),r.listCodeEditors().forEach(c);const u=f=>{a(f.getContainerDomNode())},h=f=>{l(f.getContainerDomNode())};this._register(r.onDiffEditorAdd(u)),this._register(r.onDiffEditorRemove(h)),r.listDiffEditors().forEach(u)}addDynamicKeybinding(e,t,i,n){const o=Rx(t,Co),r=new ee;return o&&(this._dynamicKeybindings.push({keybinding:o.parts,command:e,when:n,weight1:1e3,weight2:0,extensionId:null,isBuiltinExtension:!1}),r.add(Ze(()=>{for(let a=0;a<this._dynamicKeybindings.length;a++)if(this._dynamicKeybindings[a].command===e){this._dynamicKeybindings.splice(a,1),this.updateResolver();return}}))),r.add(ht.registerCommand(e,i)),this.updateResolver(),r}updateResolver(){this._cachedResolver=null,this._onDidUpdateKeybindings.fire()}_getResolver(){if(!this._cachedResolver){const e=this._toNormalizedKeybindingItems(zs.getDefaultKeybindings(),!0),t=this._toNormalizedKeybindingItems(this._dynamicKeybindings,!1);this._cachedResolver=new t_(e,t,i=>this._log(i))}return this._cachedResolver}_documentHasFocus(){return document.hasFocus()}_toNormalizedKeybindingItems(e,t){const i=[];let n=0;for(const o of e){const r=o.when||void 0,a=o.keybinding;if(!a)i[n++]=new KP(void 0,o.command,o.commandArgs,r,t,null,!1);else{const l=tb.resolveUserBinding(a,Co);for(const c of l)i[n++]=new KP(c,o.command,o.commandArgs,r,t,null,!1)}}return i}resolveKeyboardEvent(e){const t=new Xu(e.ctrlKey,e.shiftKey,e.altKey,e.metaKey,e.keyCode).toChord();return new tb(t,Co)}};fw=Rd([Vn(0,Be),Vn(1,Ei),Vn(2,Kr),Vn(3,Ii),Vn(4,cr),Vn(5,wt)],fw);class Tae extends q{constructor(e,t){super(),this.domNode=e,this._register(t)}}function B4(s){return s&&typeof s=="object"&&(!s.overrideIdentifier||typeof s.overrideIdentifier=="string")&&(!s.resource||s.resource instanceof Ie)}class j6{constructor(){this._onDidChangeConfiguration=new W,this.onDidChangeConfiguration=this._onDidChangeConfiguration.event,this._configuration=new jS(new Dae,new Ns,new Ns,new Ns)}getValue(e,t){const i=typeof e=="string"?e:void 0,n=B4(e)?e:B4(t)?t:{};return this._configuration.getValue(i,n,void 0)}updateValues(e){const t={data:this._configuration.toData()},i=[];for(const n of e){const[o,r]=n;this.getValue(o)!==r&&(this._configuration.updateValue(o,r),i.push(o))}if(i.length>0){const n=new Kne({keys:i,overrides:[]},t,this._configuration);n.source=8,n.sourceConfig=null,this._onDidChangeConfiguration.fire(n)}return Promise.resolve()}updateValue(e,t,i,n){return this.updateValues([[e,t]])}inspect(e,t={}){return this._configuration.inspect(e,t,void 0)}}let dI=class{constructor(e){this.configurationService=e,this._onDidChangeConfiguration=new W,this.configurationService.onDidChangeConfiguration(t=>{this._onDidChangeConfiguration.fire({affectedKeys:t.affectedKeys,affectsConfiguration:(i,n)=>t.affectsConfiguration(n)})})}getValue(e,t,i){const o=(H.isIPosition(t)?t:null)?typeof i=="string"?i:void 0:typeof t=="string"?t:void 0;return typeof o>"u"?this.configurationService.getValue():this.configurationService.getValue(o)}};dI=Rd([Vn(0,_t)],dI);let uI=class{constructor(e){this.configurationService=e}getEOL(e,t){const i=this.config
Line truncated
|
|
|
|
|
`:`\r
|
|
|
|
|
`}};uI=Rd([Vn(0,_t)],uI);class Nae{publicLog(e,t){return Promise.resolve(void 0)}publicLog2(e,t){return this.publicLog(e,t)}}class gb{constructor(){const e=Ie.from({scheme:gb.SCHEME,authority:"model",path:"/"});this.workspace={id:"4064f6ec-cb38-4ad0-af64-ee6467e63c82",folders:[new ese({uri:e,name:"",index:0})]}}getWorkspace(){return this.workspace}getWorkspaceFolder(e){return e&&e.scheme===gb.SCHEME?this.workspace.folders[0]:null}}gb.SCHEME="inmemory";function gw(s,e,t){if(!e||!(s instanceof j6))return;const i=[];Object.keys(e).forEach(n=>{$ne(n)&&i.push([`editor.${n}`,e[n]]),t&&Une(n)&&i.push([`diffEditor.${n}`,e[n]])}),i.length>0&&s.updateValues(i)}let hI=class{constructor(e){this._modelService=e}hasPreviewHandler(){return!1}apply(e,t){return U6(this,void 0,void 0,function*(){const i=new Map;for(const r of e){if(!(r instanceof Fu))throw new Error("bad edit - only text edits are supported");const a=this._modelService.getModel(r.resource);if(!a)throw new Error("bad edit - model not found");if(typeof r.versionId=="number"&&a.getVersionId()!==r.versionId)throw new Error("bad state - model changed in the meantime");let l=i.get(a);l||(l=[],i.set(a,l)),l.push(ti.replaceMove(L.lift(r.textEdit.range),r.textEdit.text))}let n=0,o=0;for(const[r,a]of i)r.pushStackElement(),r.pushEditOperations([],a,()=>[]),r.pushStackElement(),o+=1,n+=a.length;return{ariaSummary:Do(kE.bulkEditServiceSummary,n,o)}})}};hI=Rd([Vn(0,li)],hI);class Aae{getUriLabel(e,t){return e.scheme==="file"?e.fsPath:e.path}getUriBasenameLabel(e){return Wo(e)}}let fI=class extends DE{constructor(e,t){super(e),this._codeEditorService=t}showContextView(e,t,i){if(!t){const n=this._codeEditorService.getFocusedCodeEditor()||this._codeEditorService.getActiveCodeEditor();n&&(t=n.getContainerDomNode())}return super.showContextView(e,t,i)}};fI=Rd([Vn(0,xp),Vn(1,wt)],fI);class Mae{constructor(){this._neverEmitter=new W,this.onDidChangeTrust=this._neverEmitter.event}isWorkspaceTrusted(){return!0}}class Rae extends ob{constructor(){super()}}class Oae extends sG{constructor(){super(new nG)}}let gI=class extends IE{constructor(e,t,i,n,o){super(e,t,i,n,o),this.configure({blockMouse:!1})}};gI=Rd([Vn(0,Kr),Vn(1,Ii),Vn(2,Fh),Vn(3,qi),Vn(4,Wt)],gI);ut(_t,j6);ut($N,dI);ut(x3,uI);ut(ib,gb);ut(Ug,Aae);ut(Kr,Nae);ut(o0,Iae);ut(Ii,ay);ut(Xa,Lc);ut(ri,Rae);ut(go,aae);ut(cr,Oae);ut(li,ow);ut(YN,RE);ut(Be,aI);ut(O8,Eae);ut(Ad,ry);ut(hr,cae);ut(Ho,Ax);ut(r0,hI);ut(Z8,Mae);ut(ks,lI);ut(oc,nI);ut(Uo,qE);ut(Ei,cI);ut(qi,fw);ut(lc,tI);ut(Fh,fI);ut(zo,ME);ut(ac,rI);ut(rc,gI);ut(Mh,sI);var Oe;(function(s){const e=new HS;for(const[r,a]of ER())e.set(r,a);const t=new NA(e,!0);e.set(Ue,t);function i(r){const a=e.get(r);if(!a)throw new Error("Missing service "+r);return a instanceof ga?t.invokeFunction(l=>l.get(r)):a}s.get=i;let n=!1;function o(r){if(n)return t;n=!0;for(const[a,l]of ER())e.get(a)||e.set(a,l);for(const a in r)if(r.hasOwnProperty(a)){const l=rt(a);e.get(l)instanceof ga&&e.set(l,r[a])}return t}s.initialize=o})(Oe||(Oe={}));var AA=globalThis&&globalThis.__decorate||function(s,e,t,i){var n=arguments.length,o=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(s,e,t,i);else for(var a=s.length-1;a>=0;a--)(r=s[a])&&(o=(n<3?r(o):n>3?r(e,t,o):r(e,t))||o);return n>3&&o&&Object.defineProperty(e,t,o),o},Yt=globalThis&&globalThis.__param||function(s,e){return function(t,i){e(t,i,s)}};let Pae=0,W4=!1;function Fae(s){if(!s){if(W4)return;W4=!0}NZ(s||document.body)}let pw=class extends Hg{constructor(e,t,i,n,o,r,a,l,c,d,u,h){const f=Object.assign({},t);f.ariaLabel=f.ariaLabel||Q1.editorViewAccessibleLabel,f.ariaLabel=f.ariaLabel+";"+Q1.accessibilityHelpMessage,super(e,f,{},i,n,o,r,l,c,d,u,h),a instanceof fw?this._standaloneKeybindingService=a:this._standaloneKeybindingService=null,Fae(f.ariaContainerElement)}addCommand(e,t,i){if(!this._standaloneKeybindingService)return console.warn("Cannot add command because the editor is configured with an unrecognized KeybindingService"),null;const n="DYNAMIC_"+ ++Pae,o=ce.deserialize(i);return this._standaloneKeybindingService.addDynamicKeybinding(n,e,t,o),n}createContextKey(e,t){return this._contextKeyService.createKey(e,t)}addAction(e){if(typeof e.id!="string"||typeof e.label!="string"||typeof e.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"),q.None;const t=e.id,i=e.label,n=ce.and(ce.equals("editorId",this.getId()),ce.deserialize(e.precondition)),o=e.keybindings,r=ce.and(n,ce.deserialize(e.keybindingContext)),a=e.contextMenuGroupId||null,l=e.contextMenuOrder||0,c=(f,...g)=>Promise.resolve(e.run(this,...g)),d=new ee,u=this.getId()+":"+t;if(d.add(ht.registerCommand(u,c)),a){const f={command:{id:u,title:i},when:n,group:a,order:l};d.add(sr.appendMenuItem
Line truncated
|
|
|
|
|
`);let r=t;return o!==-1&&(r=t.substring(0,o)),V4(s,t,e.createByFilepathOrFirstLine(n||null,r),n)}return V4(s,t,e.createById(i),n)}function V4(s,e,t,i){return s.createModel(e,t,i)}function Bae(s,e,t){return Oe.initialize(t||{}).createInstance(pI,s,e)}function Wae(s){return Oe.get(wt).onCodeEditorAdd(t=>{s(t)})}function Vae(s){return Oe.get(wt).onDiffEditorAdd(t=>{s(t)})}function Hae(){return Oe.get(wt).listCodeEditors()}function zae(){return Oe.get(wt).listDiffEditors()}function $ae(s,e,t){return Oe.initialize(t||{}).createInstance(mI,s,e)}function Uae(s,e){return new kK(s,e)}function jae(s,e,t){const i=Oe.get(ri),n=i.getLanguageIdByMimeType(e)||e;return K6(Oe.get(li),i,s,n,t)}function Kae(s,e){const t=Oe.get(ri);Oe.get(li).setMode(s,t.createById(e))}function qae(s,e,t){s&&Oe.get(Xa).changeOne(e,s.uri,t)}function Gae(s){Oe.get(Xa).changeAll(s,[])}function Zae(s){return Oe.get(Xa).read(s)}function Yae(s){return Oe.get(Xa).onMarkerChanged(s)}function Xae(s){return Oe.get(li).getModel(s)}function Qae(){return Oe.get(li).getModels()}function Jae(s){return Oe.get(li).onModelAdded(s)}function ele(s){return Oe.get(li).onModelRemoved(s)}function tle(s){return Oe.get(li).onModelLanguageChanged(t=>{s({model:t.model,oldLanguage:t.oldLanguageId})})}function ile(s){return cG(Oe.get(li),Oe.get(yi),s)}function nle(s,e){const t=Oe.get(ri),i=Oe.get(go);return i.registerEditorContainer(s),qN.colorizeElement(i,t,s,e)}function sle(s,e,t){const i=Oe.get(ri);return Oe.get(go).registerEditorContainer(document.body),qN.colorize(i,s,e,t)}function ole(s,e,t=4){return Oe.get(go).registerEditorContainer(document.body),qN.colorizeModelLine(s,e,t)}function rle(s){const e=ni.get(s);return e||{getInitialState:()=>Ig,tokenize:(t,i,n)=>PN(s,n)}}function ale(s,e){ni.getOrCreate(e);const t=rle(e),i=Wa(s),n=[];let o=t.getInitialState();for(let r=0,a=i.length;r<a;r++){const l=i[r],c=t.tokenize(l,!0,o);n[r]=c.tokens,o=c.endState}return n}function lle(s,e){Oe.get(go).defineTheme(s,e)}function cle(s){Oe.get(go).setTheme(s)}function dle(){wx.clearAllFontInfos()}function ule(s,e){return ht.registerCommand({id:s,handler:e})}function hle(){return{create:Bae,getEditors:Hae,getDiffEditors:zae,onDidCreateEditor:Wae,onDidCreateDiffEditor:Vae,createDiffEditor:$ae,createDiffNavigator:Uae,createModel:jae,setModelLanguage:Kae,setModelMarkers:qae,getModelMarkers:Zae,removeAllMarkers:Gae,onDidChangeMarkers:Yae,getModels:Qae,getModel:Xae,onDidCreateModel:Jae,onWillDisposeModel:ele,onDidChangeModelLanguage:tle,createWebWorker:ile,colorizeElement:nle,colorize:sle,colorizeModelLine:ole,tokenize:ale,defineTheme:lle,setTheme:cle,remeasureFonts:dle,registerCommand:ule,AccessibilitySupport:RD,ContentWidgetPositionPreference:WD,CursorChangeReason:VD,DefaultEndOfLine:HD,EditorAutoIndentStrategy:$D,EditorOption:UD,EndOfLinePreference:jD,EndOfLineSequence:KD,MinimapPosition:ex,MouseTargetType:tx,OverlayWidgetPositionPreference:ix,OverviewRulerLane:nx,RenderLineNumbersType:ox,RenderMinimap:rx,ScrollbarVisibility:lx,ScrollType:ax,TextEditorCursorBlinkingStyle:fx,TextEditorCursorStyle:gx,TrackedRangeStickiness:px,WrappingIndent:mx,InjectedTextCursorStops:GD,PositionAffinity:sx,ConfigurationChangedEvent:O7,BareFontInfo:Au,FontInfo:Cx,TextModelResolvedOptions:dC,FindMatch:k_,ApplyUpdateResult:Fm,EditorType:Kb,EditorOptions:jr}}function fle(s,e){if(!e||!Array.isArray(e))return!1;for(const t of e)if(!s(t))return!1;return!0}function Iv(s,e){return typeof s=="boolean"?s:e}function H4(s,e){return typeof s=="string"?s:e}function gle(s){const e={};for(const t of s)e[t]=!0;return e}function z4(s,e=!1){e&&(s=s.map(function(i){return i.toLowerCase()}));const t=gle(s);return e?function(i){return t[i.toLowerCase()]!==void 0&&t.hasOwnProperty(i.toLowerCase())}:function(i){return t[i]!==void 0&&t.hasOwnProperty(i)}}function _I(s,e){e=e.replace(/@@/g,"");let t=0,i;do i=!1,e=e.replace(/@(\w+)/g,function(o,r){i=!0;let a="";if(typeof s[r]=="string")a=s[r];else if(s[r]&&s[r]instanceof RegExp)a=s[r].source;else throw s[r]===void 0?$t(s,"language definition does not contain attribute '"+r+"', used at: "+e):$t(s,"attribute reference '"+r+"' must be a string, used at: "+e);return mf(a)?"":"(?:"+a+")"}),t++;while(i&&t<5);e=e.replace(/\x01/g,"@");const n=(s.ignoreCase?"i":"")+(s.unicode?"u":"");return new RegExp(e,n)}function ple(s,e,t,i){if(i<0)return s;if(i<e.length)return e[i];if(i>=100){i=i-100;const n=t.split(".");if(n.unshift(t),i<n.length)return n[i]}return null}function mle(s,e,t,i){let n=-1,o=t,r=t.match(/^\$(([sS]?)(\d\d?)|#)(.*)$/);r&&(r[3]&&(n=parseInt(r[3]),r[2]&&(n=n+100)),o=r[4]);let a="~",l=o;!o||o.length===0?(a="!=",l=""):/^\w*$/.test(l)?a="==":(r=o.match(/^(@|!@|~|!~|==|!=)(.*)$/),r&&(a=r[1],l=r[2]));let c;if((a==="~"||a==="!~")&&/^(\w|\|)*$/.test(l)){const d=z4(l.split("|"),s.ignoreCase);c=function(u){return a==="~"?d(u):!d(u)}}else if(a==="@"||a==="!@"){const d=s[l];if(!d)throw $t(s,"the @ match target '"+l+"' is not defined, in rule: "+e);if(!fle(function(h){return typeof h=="str
Line truncated
|
|
|
|
|
hint: use the 'bracket' attribute if matching on equal brackets is required.`);if(typeof a.open=="string"&&typeof a.token=="string"&&typeof a.close=="string")o.push({token:a.token+t.tokenPostfix,open:Zc(t,a.open),close:Zc(t,a.close)});else throw $t(t,"every element in the 'brackets' array must be a '{open,close,token}' object or array")}return t.brackets=o,t.noThrow=!0,t}var ble=globalThis&&globalThis.__awaiter||function(s,e,t,i){function n(o){return o instanceof t?o:new t(function(r){r(o)})}return new(t||(t=Promise))(function(o,r){function a(d){try{c(i.next(d))}catch(u){r(u)}}function l(d){try{c(i.throw(d))}catch(u){r(u)}}function c(d){d.done?o(d.value):n(d.value).then(a,l)}c((i=i.apply(s,e||[])).next())})};function vle(s){Eg.registerLanguage(s)}function Cle(){let s=[];return s=s.concat(Eg.getLanguages()),s}function wle(s){return Oe.get(ri).languageIdCodec.encodeLanguageId(s)}function Sle(s,e){const i=Oe.get(ri).onDidEncounterLanguage(n=>{n===s&&(i.dispose(),e())});return i}function yle(s,e){if(!Oe.get(ri).isRegisteredLanguageId(s))throw new Error(`Cannot set configuration for unknown language ${s}`);return Oe.get(yi).register(s,e,100)}class Lle{constructor(e,t){this._languageId=e,this._actual=t}getInitialState(){return this._actual.getInitialState()}tokenize(e,t,i){if(typeof this._actual.tokenize=="function")return pb.adaptTokenize(this._languageId,this._actual,e,i);throw new Error("Not supported!")}tokenizeEncoded(e,t,i){const n=this._actual.tokenizeEncoded(e,i);return new Jw(n.tokens,n.endState)}}class pb{constructor(e,t,i,n){this._languageId=e,this._actual=t,this._languageService=i,this._standaloneThemeService=n}getInitialState(){return this._actual.getInitialState()}static _toClassicTokens(e,t){const i=[];let n=0;for(let o=0,r=e.length;o<r;o++){const a=e[o];let l=a.startIndex;o===0?l=0:l<n&&(l=n),i[o]=new C_(l,a.scopes,t),n=l}return i}static adaptTokenize(e,t,i,n){const o=t.tokenize(i,n),r=pb._toClassicTokens(o.tokens,e);let a;return o.endState.equals(n)?a=n:a=o.endState,new CN(r,a)}tokenize(e,t,i){return pb.adaptTokenize(this._languageId,this._actual,e,i)}_toBinaryTokens(e,t){const i=e.encodeLanguageId(this._languageId),n=this._standaloneThemeService.getColorTheme().tokenTheme,o=[];let r=0,a=0;for(let c=0,d=t.length;c<d;c++){const u=t[c],h=n.match(i,u.scopes);if(r>0&&o[r-1]===h)continue;let f=u.startIndex;c===0?f=0:f<a&&(f=a),o[r++]=f,o[r++]=h,a=f}const l=new Uint32Array(r);for(let c=0;c<r;c++)l[c]=o[c];return l}tokenizeEncoded(e,t,i){const n=this._actual.tokenize(e,i),o=this._toBinaryTokens(this._languageService.languageIdCodec,n.tokens);let r;return n.endState.equals(i)?r=i:r=n.endState,new Jw(o,r)}}function kle(s){return typeof s.getInitialState=="function"}function Dle(s){return"tokenizeEncoded"in s}function G6(s){return s&&typeof s.then=="function"}function xle(s){const e=Oe.get(go);if(s){const t=[null];for(let i=1,n=s.length;i<n;i++)t[i]=$.fromHex(s[i]);e.setColorMapOverride(t)}else e.setColorMapOverride(null)}function Z6(s,e){return Dle(e)?new Lle(s,e):new pb(s,e,Oe.get(ri),Oe.get(go))}function MA(s,e){const t={createTokenizationSupport:()=>ble(this,void 0,void 0,function*(){const i=yield Promise.resolve(e.create());return i?kle(i)?Z6(s,i):new N_(Oe.get(ri),Oe.get(go),s,q6(s,i),Oe.get(_t)):null})};return ni.registerFactory(s,t)}function Ele(s,e){if(!Oe.get(ri).isRegisteredLanguageId(s))throw new Error(`Cannot set tokens provider for unknown language ${s}`);return G6(e)?MA(s,{create:()=>e}):ni.register(s,Z6(s,e))}function Ile(s,e){const t=i=>new N_(Oe.get(ri),Oe.get(go),s,q6(s,i),Oe.get(_t));return G6(e)?MA(s,{create:()=>e}):ni.register(s,t(e))}function Tle(s,e){return Oe.get(be).referenceProvider.register(s,e)}function Nle(s,e){return Oe.get(be).renameProvider.register(s,e)}function Ale(s,e){return Oe.get(be).signatureHelpProvider.register(s,e)}function Mle(s,e){return Oe.get(be).hoverProvider.register(s,{provideHover:(i,n,o)=>{const r=i.getWordAtPosition(n);return Promise.resolve(e.provideHover(i,n,o)).then(a=>{if(!!a)return!a.range&&r&&(a.range=new L(n.lineNumber,r.startColumn,n.lineNumber,r.endColumn)),a.range||(a.range=new L(n.lineNumber,n.column,n.lineNumber,n.column)),a})}})}function Rle(s,e){return Oe.get(be).documentSymbolProvider.register(s,e)}function Ole(s,e){return Oe.get(be).documentHighlightProvider.register(s,e)}function Ple(s,e){return Oe.get(be).linkedEditingRangeProvider.register(s,e)}function Fle(s,e){return Oe.get(be).definitionProvider.register(s,e)}function Ble(s,e){return Oe.get(be).implementationProvider.register(s,e)}function Wle(s,e){return Oe.get(be).typeDefinitionProvider.register(s,e)}function Vle(s,e){return Oe.get(be).codeLensProvider.register(s,e)}function Hle(s,e,t){return Oe.get(be).codeActionProvider.register(s,{providedCodeActionKinds:t==null?void 0:t.providedCodeActionKinds,documentation:t==null?void 0:t.documentation,provideCodeActions:(n,o,r,a)=>{const c=Oe.get(Xa).read({resource:n.uri}).filter(d=>L.areIntersectingOrTouching(d,o));return e.provideCodeAc
Line truncated
|
|
|
|
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
|
|
|
* Version: 0.34.0(9d278685b078158491964f8fd7ac9628fffa0f30)
|
|
|
|
|
* Released under the MIT license
|
|
|
|
|
* https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt
|
|
|
|
|
*-----------------------------------------------------------------------------*/var Cce=Object.defineProperty,wce=Object.getOwnPropertyDescriptor,Sce=Object.getOwnPropertyNames,yce=Object.prototype.hasOwnProperty,$4=(s,e,t,i)=>{if(e&&typeof e=="object"||typeof e=="function")for(let n of Sce(e))!yce.call(s,n)&&n!==t&&Cce(s,n,{get:()=>e[n],enumerable:!(i=wce(e,n))||i.enumerable});return s},Lce=(s,e,t)=>($4(s,e,"default"),t&&$4(t,e,"default")),Nm={};Lce(Nm,h0);var nB={},kk={},sB=class{constructor(s){Pt(this,"_languageId");Pt(this,"_loadingTriggered");Pt(this,"_lazyLoadPromise");Pt(this,"_lazyLoadPromiseResolve");Pt(this,"_lazyLoadPromiseReject");this._languageId=s,this._loadingTriggered=!1,this._lazyLoadPromise=new Promise((e,t)=>{this._lazyLoadPromiseResolve=e,this._lazyLoadPromiseReject=t})}static getOrCreate(s){return kk[s]||(kk[s]=new sB(s)),kk[s]}load(){return this._loadingTriggered||(this._loadingTriggered=!0,nB[this._languageId].loader().then(s=>this._lazyLoadPromiseResolve(s),s=>this._lazyLoadPromiseReject(s))),this._lazyLoadPromise}};function xe(s){const e=s.id;nB[e]=s,Nm.languages.register(s);const t=sB.getOrCreate(e);Nm.languages.registerTokensProviderFactory(e,{create:async()=>(await t.load()).language}),Nm.languages.onLanguage(e,async()=>{const i=await t.load();Nm.languages.setLanguageConfiguration(e,i.conf)})}xe({id:"abap",extensions:[".abap"],aliases:["abap","ABAP"],loader:()=>ye(()=>import("./abap.cb146686.js"),[])});xe({id:"apex",extensions:[".cls"],aliases:["Apex","apex"],mimetypes:["text/x-apex-source","text/x-apex"],loader:()=>ye(()=>import("./apex.64a5deda.js"),[])});xe({id:"azcli",extensions:[".azcli"],aliases:["Azure CLI","azcli"],loader:()=>ye(()=>import("./azcli.4596305a.js"),[])});xe({id:"bat",extensions:[".bat",".cmd"],aliases:["Batch","bat"],loader:()=>ye(()=>import("./bat.d925da83.js"),[])});xe({id:"bicep",extensions:[".bicep"],aliases:["Bicep"],loader:()=>ye(()=>import("./bicep.c23fb5aa.js"),[])});xe({id:"cameligo",extensions:[".mligo"],aliases:["Cameligo"],loader:()=>ye(()=>import("./cameligo.ab1d4003.js"),[])});xe({id:"clojure",extensions:[".clj",".cljs",".cljc",".edn"],aliases:["clojure","Clojure"],loader:()=>ye(()=>import("./clojure.a4327248.js"),[])});xe({id:"coffeescript",extensions:[".coffee"],aliases:["CoffeeScript","coffeescript","coffee"],mimetypes:["text/x-coffeescript","text/coffeescript"],loader:()=>ye(()=>import("./coffee.ad0ae610.js"),[])});xe({id:"c",extensions:[".c",".h"],aliases:["C","c"],loader:()=>ye(()=>import("./cpp.e6457f6d.js"),[])});xe({id:"cpp",extensions:[".cpp",".cc",".cxx",".hpp",".hh",".hxx"],aliases:["C++","Cpp","cpp"],loader:()=>ye(()=>import("./cpp.e6457f6d.js"),[])});xe({id:"csharp",extensions:[".cs",".csx",".cake"],aliases:["C#","csharp"],loader:()=>ye(()=>import("./csharp.6ac5f127.js"),[])});xe({id:"csp",extensions:[],aliases:["CSP","csp"],loader:()=>ye(()=>import("./csp.158a213a.js"),[])});xe({id:"css",extensions:[".css"],aliases:["CSS","css"],mimetypes:["text/css"],loader:()=>ye(()=>import("./css.3eb100b6.js"),[])});xe({id:"cypher",extensions:[".cypher",".cyp"],aliases:["Cypher","OpenCypher"],loader:()=>ye(()=>import("./cypher.d7048001.js"),[])});xe({id:"dart",extensions:[".dart"],aliases:["Dart","dart"],mimetypes:["text/x-dart-source","text/x-dart"],loader:()=>ye(()=>import("./dart.137068e8.js"),[])});xe({id:"dockerfile",extensions:[".dockerfile"],filenames:["Dockerfile"],aliases:["Dockerfile"],loader:()=>ye(()=>import("./dockerfile.7ed77caa.js"),[])});xe({id:"ecl",extensions:[".ecl"],aliases:["ECL","Ecl","ecl"],loader:()=>ye(()=>import("./ecl.48807a73.js"),[])});xe({id:"elixir",extensions:[".ex",".exs"],aliases:["Elixir","elixir","ex"],loader:()=>ye(()=>import("./elixir.39ff2f85.js"),[])});xe({id:"flow9",extensions:[".flow"],aliases:["Flow9","Flow","flow9","flow"],loader:()=>ye(()=>import("./flow9.298204ab.js"),[])});xe({id:"fsharp",extensions:[".fs",".fsi",".ml",".mli",".fsx",".fsscript"],aliases:["F#","FSharp","fsharp"],loader:()=>ye(()=>import("./fsharp.fb7cf1ff.js"),[])});xe({id:"freemarker2",extensions:[".ftl",".ftlh",".ftlx"],aliases:["FreeMarker2","Apache FreeMarker2"],loader:()=>ye(()=>import("./freemarker2.3734d3d7.js"),[]).then(s=>s.TagAutoInterpolationDollar)});xe({id:"freemarker2.tag-angle.interpolation-dollar",aliases:["FreeMarker2 (Angle/Dollar)","Apache FreeMarker2 (Angle/Dollar)"],loader:()=>ye(()=>import("./freemarker2.3734d3d7.js"),[]).then(s=>s.TagAngleInterpolationDollar)});xe({id:"freemarker2.tag-bracket.interpolation-dollar",aliases:["FreeMarker2 (Bracket/Dollar)","Apache FreeMarker2 (Bracket/Dollar)"],loader:()=>ye(()=>import("./freemarker2.3734d3d7.js"),[]).then(s=>s.TagBracketInterpolationDollar)});xe({id:"freemarker2.tag-angle.interpolation-bracket",aliases:["FreeMarker2 (Angle/Bracket)","Apache FreeMarker2 (Angle/Bracket)"],loader:()=>ye(()=>import("./freemarker2.3734d3d7.js"),[]).then(s=>s.TagAngleInterpolationBracket)});xe({id:"freemarker2.tag-bracket.interpolation-bracket",aliases:["FreeMarker2 (Bracket/BrackeLine truncated
|
|
|
|
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
|
|
|
* Version: 0.34.0(9d278685b078158491964f8fd7ac9628fffa0f30)
|
|
|
|
|
* Released under the MIT license
|
|
|
|
|
* https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt
|
|
|
|
|
*-----------------------------------------------------------------------------*/var kce=Object.defineProperty,Dce=Object.getOwnPropertyDescriptor,xce=Object.getOwnPropertyNames,Ece=Object.prototype.hasOwnProperty,U4=(s,e,t,i)=>{if(e&&typeof e=="object"||typeof e=="function")for(let n of xce(e))!Ece.call(s,n)&&n!==t&&kce(s,n,{get:()=>e[n],enumerable:!(i=Dce(e,n))||i.enumerable});return s},Ice=(s,e,t)=>(U4(s,e,"default"),t&&U4(t,e,"default")),Ip={};Ice(Ip,h0);var FA=class{constructor(s,e,t){Pt(this,"_onDidChange",new Ip.Emitter);Pt(this,"_options");Pt(this,"_modeConfiguration");Pt(this,"_languageId");this._languageId=s,this.setOptions(e),this.setModeConfiguration(t)}get onDidChange(){return this._onDidChange.event}get languageId(){return this._languageId}get modeConfiguration(){return this._modeConfiguration}get diagnosticsOptions(){return this.options}get options(){return this._options}setOptions(s){this._options=s||Object.create(null),this._onDidChange.fire(this)}setDiagnosticsOptions(s){this.setOptions(s)}setModeConfiguration(s){this._modeConfiguration=s||Object.create(null),this._onDidChange.fire(this)}},BA={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},format:{newlineBetweenSelectors:!0,newlineBetweenRules:!0,spaceAroundSelectorSeparator:!1,braceStyle:"collapse",maxPreserveNewLines:void 0,preserveNewLines:!0}},WA={completionItems:!0,hovers:!0,documentSymbols:!0,definitions:!0,references:!0,documentHighlights:!0,rename:!0,colors:!0,foldingRanges:!0,diagnostics:!0,selectionRanges:!0,documentFormattingEdits:!0,documentRangeFormattingEdits:!0},oB=new FA("css",BA,WA),rB=new FA("scss",BA,WA),aB=new FA("less",BA,WA);Ip.languages.css={cssDefaults:oB,lessDefaults:aB,scssDefaults:rB};function VA(){return ye(()=>import("./cssMode.9ab445cf.js"),[])}Ip.languages.onLanguage("less",()=>{VA().then(s=>s.setupMode(aB))});Ip.languages.onLanguage("scss",()=>{VA().then(s=>s.setupMode(rB))});Ip.languages.onLanguage("css",()=>{VA().then(s=>s.setupMode(oB))});/*!-----------------------------------------------------------------------------
|
|
|
|
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
|
|
|
* Version: 0.34.0(9d278685b078158491964f8fd7ac9628fffa0f30)
|
|
|
|
|
* Released under the MIT license
|
|
|
|
|
* https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt
|
|
|
|
|
*-----------------------------------------------------------------------------*/var Tce=Object.defineProperty,Nce=Object.getOwnPropertyDescriptor,Ace=Object.getOwnPropertyNames,Mce=Object.prototype.hasOwnProperty,j4=(s,e,t,i)=>{if(e&&typeof e=="object"||typeof e=="function")for(let n of Ace(e))!Mce.call(s,n)&&n!==t&&Tce(s,n,{get:()=>e[n],enumerable:!(i=Nce(e,n))||i.enumerable});return s},Rce=(s,e,t)=>(j4(s,e,"default"),t&&j4(t,e,"default")),cy={};Rce(cy,h0);var Oce=class{constructor(s,e,t){Pt(this,"_onDidChange",new cy.Emitter);Pt(this,"_options");Pt(this,"_modeConfiguration");Pt(this,"_languageId");this._languageId=s,this.setOptions(e),this.setModeConfiguration(t)}get onDidChange(){return this._onDidChange.event}get languageId(){return this._languageId}get options(){return this._options}get modeConfiguration(){return this._modeConfiguration}setOptions(s){this._options=s||Object.create(null),this._onDidChange.fire(this)}setModeConfiguration(s){this._modeConfiguration=s||Object.create(null),this._onDidChange.fire(this)}},Pce={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:void 0,indentHandlebars:!1,endWithNewline:!1,extraLiners:"head, body, /html",wrapAttributes:"auto"},dy={format:Pce,suggest:{},data:{useDefaultDataProvider:!0}};function uy(s){return{completionItems:!0,hovers:!0,documentSymbols:!0,links:!0,documentHighlights:!0,rename:!0,colors:!0,foldingRanges:!0,selectionRanges:!0,diagnostics:s===s_,documentFormattingEdits:s===s_,documentRangeFormattingEdits:s===s_}}var s_="html",K4="handlebars",q4="razor",lB=hy(s_,dy,uy(s_)),Fce=lB.defaults,cB=hy(K4,dy,uy(K4)),Bce=cB.defaults,dB=hy(q4,dy,uy(q4)),Wce=dB.defaults;cy.languages.html={htmlDefaults:Fce,razorDefaults:Wce,handlebarDefaults:Bce,htmlLanguageService:lB,handlebarLanguageService:cB,razorLanguageService:dB,registerHTMLLanguageService:hy};function Vce(){return ye(()=>import("./htmlMode.b0a58fa6.js"),[])}function hy(s,e=dy,t=uy(s)){const i=new Oce(s,e,t);let n;const o=cy.languages.onLanguage(s,async()=>{n=(await Vce()).setupMode(i)});return{defaults:i,dispose(){o.dispose(),n==null||n.dispose(),n=void 0}}}/*!-----------------------------------------------------------------------------
|
|
|
|
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
|
|
|
* Version: 0.34.0(9d278685b078158491964f8fd7ac9628fffa0f30)
|
|
|
|
|
* Released under the MIT license
|
|
|
|
|
* https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt
|
|
|
|
|
*-----------------------------------------------------------------------------*/var Hce=Object.defineProperty,zce=Object.getOwnPropertyDescriptor,$ce=Object.getOwnPropertyNames,Uce=Object.prototype.hasOwnProperty,G4=(s,e,t,i)=>{if(e&&typeof e=="object"||typeof e=="function")for(let n of $ce(e))!Uce.call(s,n)&&n!==t&&Hce(s,n,{get:()=>e[n],enumerable:!(i=zce(e,n))||i.enumerable});return s},jce=(s,e,t)=>(G4(s,e,"default"),t&&G4(t,e,"default")),f0={};jce(f0,h0);var Kce=class{constructor(s,e,t){Pt(this,"_onDidChange",new f0.Emitter);Pt(this,"_diagnosticsOptions");Pt(this,"_modeConfiguration");Pt(this,"_languageId");this._languageId=s,this.setDiagnosticsOptions(e),this.setModeConfiguration(t)}get onDidChange(){return this._onDidChange.event}get languageId(){return this._languageId}get modeConfiguration(){return this._modeConfiguration}get diagnosticsOptions(){return this._diagnosticsOptions}setDiagnosticsOptions(s){this._diagnosticsOptions=s||Object.create(null),this._onDidChange.fire(this)}setModeConfiguration(s){this._modeConfiguration=s||Object.create(null),this._onDidChange.fire(this)}},qce={validate:!0,allowComments:!0,schemas:[],enableSchemaRequest:!1,schemaRequest:"warning",schemaValidation:"warning",comments:"error",trailingCommas:"error"},Gce={documentFormattingEdits:!0,documentRangeFormattingEdits:!0,completionItems:!0,hovers:!0,documentSymbols:!0,tokens:!0,colors:!0,foldingRanges:!0,diagnostics:!0,selectionRanges:!0},uB=new Kce("json",qce,Gce);f0.languages.json={jsonDefaults:uB};function Zce(){return ye(()=>import("./jsonMode.b1a285a7.js"),[])}f0.languages.register({id:"json",extensions:[".json",".bowerrc",".jshintrc",".jscsrc",".eslintrc",".babelrc",".har"],aliases:["JSON","json"],mimetypes:["application/json"]});f0.languages.onLanguage("json",()=>{Zce().then(s=>s.setupMode(uB))});/*!-----------------------------------------------------------------------------
|
|
|
|
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
|
|
|
* Version: 0.34.0(9d278685b078158491964f8fd7ac9628fffa0f30)
|
|
|
|
|
* Released under the MIT license
|
|
|
|
|
* https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt
|
|
|
|
|
*-----------------------------------------------------------------------------*/var Yce=Object.defineProperty,Xce=Object.getOwnPropertyDescriptor,Qce=Object.getOwnPropertyNames,Jce=Object.prototype.hasOwnProperty,Z4=(s,e,t,i)=>{if(e&&typeof e=="object"||typeof e=="function")for(let n of Qce(e))!Jce.call(s,n)&&n!==t&&Yce(s,n,{get:()=>e[n],enumerable:!(i=Xce(e,n))||i.enumerable});return s},ede=(s,e,t)=>(Z4(s,e,"default"),t&&Z4(t,e,"default")),tde="4.5.5",Yg={};ede(Yg,h0);var hB=(s=>(s[s.None=0]="None",s[s.CommonJS=1]="CommonJS",s[s.AMD=2]="AMD",s[s.UMD=3]="UMD",s[s.System=4]="System",s[s.ES2015=5]="ES2015",s[s.ESNext=99]="ESNext",s))(hB||{}),fB=(s=>(s[s.None=0]="None",s[s.Preserve=1]="Preserve",s[s.React=2]="React",s[s.ReactNative=3]="ReactNative",s[s.ReactJSX=4]="ReactJSX",s[s.ReactJSXDev=5]="ReactJSXDev",s))(fB||{}),gB=(s=>(s[s.CarriageReturnLineFeed=0]="CarriageReturnLineFeed",s[s.LineFeed=1]="LineFeed",s))(gB||{}),pB=(s=>(s[s.ES3=0]="ES3",s[s.ES5=1]="ES5",s[s.ES2015=2]="ES2015",s[s.ES2016=3]="ES2016",s[s.ES2017=4]="ES2017",s[s.ES2018=5]="ES2018",s[s.ES2019=6]="ES2019",s[s.ES2020=7]="ES2020",s[s.ESNext=99]="ESNext",s[s.JSON=100]="JSON",s[s.Latest=99]="Latest",s))(pB||{}),mB=(s=>(s[s.Classic=1]="Classic",s[s.NodeJs=2]="NodeJs",s))(mB||{}),_B=class{constructor(s,e,t,i){Pt(this,"_onDidChange",new Yg.Emitter);Pt(this,"_onDidExtraLibsChange",new Yg.Emitter);Pt(this,"_extraLibs");Pt(this,"_removedExtraLibs");Pt(this,"_eagerModelSync");Pt(this,"_compilerOptions");Pt(this,"_diagnosticsOptions");Pt(this,"_workerOptions");Pt(this,"_onDidExtraLibsChangeTimeout");Pt(this,"_inlayHintsOptions");this._extraLibs=Object.create(null),this._removedExtraLibs=Object.create(null),this._eagerModelSync=!1,this.setCompilerOptions(s),this.setDiagnosticsOptions(e),this.setWorkerOptions(t),this.setInlayHintsOptions(i),this._onDidExtraLibsChangeTimeout=-1}get onDidChange(){return this._onDidChange.event}get onDidExtraLibsChange(){return this._onDidExtraLibsChange.event}get workerOptions(){return this._workerOptions}get inlayHintsOptions(){return this._inlayHintsOptions}getExtraLibs(){return this._extraLibs}addExtraLib(s,e){let t;if(typeof e>"u"?t=`ts:extralib-${Math.random().toString(36).substring(2,15)}`:t=e,this._extraLibs[t]&&this._extraLibs[t].content===s)return{dispose:()=>{}};let i=1;return this._removedExtraLibs[t]&&(i=this._removedExtraLibs[t]+1),this._extraLibs[t]&&(i=this._extraLibs[t].version+1),this._extraLibs[t]={content:s,version:i},this._fireOnDidExtraLibsChangeSoon(),{dispose:()=>{let n=this._extraLibs[t];!n||n.version===i&&(delete this._extraLibs[t],this._removedExtraLibs[t]=i,this._fireOnDidExtraLibsChangeSoon())}}}setExtraLibs(s){for(const e in this._extraLibs)this._removedExtraLibs[e]=this._extraLibs[e].version;if(this._extraLibs=Object.create(null),s&&s.length>0)for(const e of s){const t=e.filePath||`ts:extralib-${Math.random().toString(36).substring(2,15)}`,i=e.content;let n=1;this._removedExtraLibs[t]&&(n=this._removedExtraLibs[t]+1),this._extraLibs[t]={content:i,version:n}}this._fireOnDidExtraLibsChangeSoon()}_fireOnDidExtraLibsChangeSoon(){this._onDidExtraLibsChangeTimeout===-1&&(this._onDidExtraLibsChangeTimeout=window.setTimeout(()=>{this._onDidExtraLibsChangeTimeout=-1,this._onDidExtraLibsChange.fire(void 0)},0))}getCompilerOptions(){return this._compilerOptions}setCompilerOptions(s){this._compilerOptions=s||Object.create(null),this._onDidChange.fire(void 0)}getDiagnosticsOptions(){return this._diagnosticsOptions}setDiagnosticsOptions(s){this._diagnosticsOptions=s||Object.create(null),this._onDidChange.fire(void 0)}setWorkerOptions(s){this._workerOptions=s||Object.create(null),this._onDidChange.fire(void 0)}setInlayHintsOptions(s){this._inlayHintsOptions=s||Object.create(null),this._onDidChange.fire(void 0)}setMaximumWorkerIdleTime(s){}setEagerModelSync(s){this._eagerModelSync=s}getEagerModelSync(){return this._eagerModelSync}},ide=tde,bB=new _B({allowNonTsExtensions:!0,target:99},{noSemanticValidation:!1,noSyntaxValidation:!1,onlyVisible:!1},{},{}),vB=new _B({allowNonTsExtensions:!0,allowJs:!0,target:99},{noSemanticValidation:!0,noSyntaxValidation:!1,onlyVisible:!1},{},{}),nde=()=>fy().then(s=>s.getTypeScriptWorker()),sde=()=>fy().then(s=>s.getJavaScriptWorker());Yg.languages.typescript={ModuleKind:hB,JsxEmit:fB,NewLineKind:gB,ScriptTarget:pB,ModuleResolutionKind:mB,typescriptVersion:ide,typescriptDefaults:bB,javascriptDefaults:vB,getTypeScriptWorker:nde,getJavaScriptWorker:sde};function fy(){return ye(()=>import("./tsMode.9aab1c1b.js"),[])}Yg.languages.onLanguage("typescript",()=>fy().then(s=>s.setupTypeScript(bB)));Yg.languages.onLanguage("javascript",()=>fy().then(s=>s.setupJavaScript(vB)));var ode=globalThis&&globalThis.__decorate||function(s,e,t,i){var n=arguments.length,o=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(s,e,t,i);else for(var a=s.length-1;a>=0;a--)(r=s[a])&&(o=(n<3?r(o):n>3?r(e,t,o):r(e,t))|Line truncated
|
|
|
|
|
.monaco-editor .contentWidgets ${m.lightBulb.cssSelector} {
|
|
|
|
|
color: ${n};
|
|
|
|
|
background-color: ${i};
|
|
|
|
|
}`);const o=s.getColor(AY);o&&e.addRule(`
|
|
|
|
|
.monaco-editor .contentWidgets ${m.lightbulbAutofix.cssSelector} {
|
|
|
|
|
color: ${o};
|
|
|
|
|
background-color: ${i};
|
|
|
|
|
}`)});var Bde=globalThis&&globalThis.__decorate||function(s,e,t,i){var n=arguments.length,o=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(s,e,t,i);else for(var a=s.length-1;a>=0;a--)(r=s[a])&&(o=(n<3?r(o):n>3?r(e,t,o):r(e,t))||o);return n>3&&o&&Object.defineProperty(e,t,o),o},Wde=globalThis&&globalThis.__param||function(s,e){return function(t,i){e(t,i,s)}},Ik=globalThis&&globalThis.__awaiter||function(s,e,t,i){function n(o){return o instanceof t?o:new t(function(r){r(o)})}return new(t||(t=Promise))(function(o,r){function a(d){try{c(i.next(d))}catch(u){r(u)}}function l(d){try{c(i.throw(d))}catch(u){r(u)}}function c(d){d.done?o(d.value):n(d.value).then(a,l)}c((i=i.apply(s,e||[])).next())})},Vde=globalThis&&globalThis.__classPrivateFieldSet||function(s,e,t,i,n){if(i==="m")throw new TypeError("Private method is not writable");if(i==="a"&&!n)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?s!==e||!n:!e.has(s))throw new TypeError("Cannot write private member to an object whose class did not declare it");return i==="a"?n.call(s,t):n?n.value=t:e.set(s,t),t},Hde=globalThis&&globalThis.__classPrivateFieldGet||function(s,e,t,i){if(t==="a"&&!i)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?s!==e||!i:!e.has(s))throw new TypeError("Cannot read private member from an object whose class did not declare it");return t==="m"?i:t==="a"?i.call(s):i?i.value:e.get(s)},LC;let SI=class extends q{constructor(e,t,i,n,o){super(),this._editor=e,this.delegate=n,this._activeCodeActions=this._register(new jn),this.previewOn=!1,LC.set(this,!1),this._codeActionWidget=new kg(()=>this._register(o.createInstance(mw,this._editor,{onSelectCodeAction:(r,a)=>Ik(this,void 0,void 0,function*(){this.previewOn?this.delegate.applyCodeAction(r,!0,Boolean(this.previewOn)):this.delegate.applyCodeAction(r,!0,Boolean(a.preview)),this.previewOn=!1})}))),this._lightBulbWidget=new kg(()=>{const r=this._register(o.createInstance(_w,this._editor,t,i));return this._register(r.onClick(a=>this.showCodeActionList(a.trigger,a.actions,a,{includeDisabledActions:!1,fromLightbulb:!0}))),r})}dispose(){Vde(this,LC,!0,"f"),super.dispose()}hideCodeActionWidget(){this._codeActionWidget.hasValue()&&this._codeActionWidget.getValue().hideCodeActionWidget()}onEnter(){this._codeActionWidget.hasValue()&&this._codeActionWidget.getValue().onEnterSet()}onPreviewEnter(){this.previewOn=!0,this.onEnter()}navigateList(e){this._codeActionWidget.hasValue()&&(e?this._codeActionWidget.getValue().navigateListWithKeysUp():this._codeActionWidget.getValue().navigateListWithKeysDown())}update(e){var t,i,n,o,r;return Ik(this,void 0,void 0,function*(){if(e.type!==1){(t=this._lightBulbWidget.rawValue)===null||t===void 0||t.hide();return}let a;try{a=yield e.actions}catch(l){$e(l);return}if(!Hde(this,LC,"f"))if(this._lightBulbWidget.getValue().update(a,e.trigger,e.position),e.trigger.type===1){if(!((i=e.trigger.filter)===null||i===void 0)&&i.include){const c=this.tryGetValidActionToApply(e.trigger,a);if(c){try{this._lightBulbWidget.getValue().hide(),yield this.delegate.applyCodeAction(c,!1,!1)}finally{a.dispose()}return}if(e.trigger.context){const d=this.getInvalidActionThatWouldHaveBeenApplied(e.trigger,a);if(d&&d.action.disabled){(n=Vs.get(this._editor))===null||n===void 0||n.showMessage(d.action.disabled,e.trigger.context.position),a.dispose();return}}}const l=!!(!((o=e.trigger.filter)===null||o===void 0)&&o.include);if(e.trigger.context&&(!a.allActions.length||!l&&!a.validActions.length)){(r=Vs.get(this._editor))===null||r===void 0||r.showMessage(e.trigger.context.notAvailableMessage,e.trigger.context.position),this._activeCodeActions.value=a,a.dispose();return}this._activeCodeActions.value=a,this._codeActionWidget.getValue().show(e.trigger,a,e.position,{includeDisabledActions:l,fromLightbulb:!1})}else this._codeActionWidget.getValue().isVisible?a.dispose():this._activeCodeActions.value=a})}getInvalidActionThatWouldHaveBeenApplied(e,t){if(!!t.allActions.length&&(e.autoApply==="first"&&t.validActions.length===0||e.autoApply==="ifSingle"&&t.allActions.length===1))return t.allActions.find(({action:i})=>i.disabled)}tryGetValidActionToApply(e,t){if(!!t.validActions.length&&(e.autoApply==="first"&&t.validActions.length>0||e.autoApply==="ifSingle"&&t.validActions.length===1))return t.validActions[0]}showCodeActionList(e,t,i,n){return Ik(this,void 0,void 0,function*(){this._codeActionWidget.getValue().show(e,t,i,n)})}};LC=new WeakMap;SI=Bde([Wde(4,Ue)],SI);var Tk=globalThis&&globalThis.__classPrivateFieldGet||function(s,e,t,i){if(t==="a"&&!i)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?s!==e||!i:!e.has(s))throw new TypeError("Cannot read private member from an object whose class did not declare it");return t==="m"?i:t==="a"?i.call(s):i?i.value:e.get(s)},zde=globalThis&&glob
Line truncated
|
|
|
|
|
.monaco-editor .codelens-decoration.${this._styleClassName} { line-height: ${e}px; font-size: ${t}px; padding-right: ${Math.round(t*.5)}px; font-feature-settings: var(${r}) }
|
|
|
|
|
.monaco-editor .codelens-decoration.${this._styleClassName} span.codicon { line-height: ${e}px; font-size: ${t}px; }
|
|
|
|
|
`;i&&(a+=`.monaco-editor .codelens-decoration.${this._styleClassName} { font-family: var(${o}), ${Os.fontFamily}}`),this._styleElement.textContent=a,this._editor.getContainerDomNode().style.setProperty(o,i!=null?i:"inherit"),this._editor.getContainerDomNode().style.setProperty(r,n.fontFeatureSettings),this._editor.changeViewZones(l=>{for(const c of this._lenses)c.updateHeight(e,l)})}_localDispose(){var e,t,i;(e=this._getCodeLensModelPromise)===null||e===void 0||e.cancel(),this._getCodeLensModelPromise=void 0,(t=this._resolveCodeLensesPromise)===null||t===void 0||t.cancel(),this._resolveCodeLensesPromise=void 0,this._localToDispose.clear(),this._oldCodeLensModels.clear(),(i=this._currentCodeLensModel)===null||i===void 0||i.dispose()}_onModelChange(){this._localDispose();const e=this._editor.getModel();if(!e||!this._editor.getOption(14))return;const t=this._codeLensCache.get(e);if(t&&this._renderCodeLensSymbols(t),!this._languageFeaturesService.codeLensProvider.has(e)){t&&this._localToDispose.add(Yu(()=>{const n=this._codeLensCache.get(e);t===n&&(this._codeLensCache.delete(e),this._onModelChange())},30*1e3));return}for(const n of this._languageFeaturesService.codeLensProvider.all(e))if(typeof n.onDidChange=="function"){const o=n.onDidChange(()=>i.schedule());this._localToDispose.add(o)}const i=new At(()=>{var n;const o=Date.now();(n=this._getCodeLensModelPromise)===null||n===void 0||n.cancel(),this._getCodeLensModelPromise=en(r=>OB(this._languageFeaturesService.codeLensProvider,e,r)),this._getCodeLensModelPromise.then(r=>{this._currentCodeLensModel&&this._oldCodeLensModels.add(this._currentCodeLensModel),this._currentCodeLensModel=r,this._codeLensCache.put(e,r);const a=this._provideCodeLensDebounce.update(e,Date.now()-o);i.delay=a,this._renderCodeLensSymbols(r),this._resolveCodeLensesInViewportSoon()},$e)},this._provideCodeLensDebounce.get(e));this._localToDispose.add(i),this._localToDispose.add(Ze(()=>this._resolveCodeLensesScheduler.cancel())),this._localToDispose.add(this._editor.onDidChangeModelContent(()=>{this._editor.changeDecorations(n=>{this._editor.changeViewZones(o=>{const r=[];let a=-1;this._lenses.forEach(c=>{!c.isValid()||a===c.getLineNumber()?r.push(c):(c.update(o),a=c.getLineNumber())});const l=new Nk;r.forEach(c=>{c.dispose(l,o),this._lenses.splice(this._lenses.indexOf(c),1)}),l.commit(n)})}),i.schedule()})),this._localToDispose.add(this._editor.onDidFocusEditorWidget(()=>{i.schedule()})),this._localToDispose.add(this._editor.onDidScrollChange(n=>{n.scrollTopChanged&&this._lenses.length>0&&this._resolveCodeLensesInViewportSoon()})),this._localToDispose.add(this._editor.onDidLayoutChange(()=>{this._resolveCodeLensesInViewportSoon()})),this._localToDispose.add(Ze(()=>{if(this._editor.getModel()){const n=md.capture(this._editor);this._editor.changeDecorations(o=>{this._editor.changeViewZones(r=>{this._disposeAllLenses(o,r)})}),n.restore(this._editor)}else this._disposeAllLenses(void 0,void 0)})),this._localToDispose.add(this._editor.onMouseDown(n=>{if(n.target.type!==9)return;let o=n.target.element;if((o==null?void 0:o.tagName)==="SPAN"&&(o=o.parentElement),(o==null?void 0:o.tagName)==="A")for(const r of this._lenses){const a=r.getCommand(o);if(a){this._commandService.executeCommand(a.id,...a.arguments||[]).catch(l=>this._notificationService.error(l));break}}})),i.schedule()}_disposeAllLenses(e,t){const i=new Nk;for(const n of this._lenses)n.dispose(i,t);e&&i.commit(e),this._lenses.length=0}_renderCodeLensSymbols(e){if(!this._editor.hasModel())return;const t=this._editor.getModel().getLineCount(),i=[];let n;for(const a of e.lenses){const l=a.symbol.range.startLineNumber;l<1||l>t||(n&&n[n.length-1].symbol.range.startLineNumber===l?n.push(a):(n=[a],i.push(n)))}const o=md.capture(this._editor),r=this._getLayoutInfo();this._editor.changeDecorations(a=>{this._editor.changeViewZones(l=>{const c=new Nk;let d=0,u=0;for(;u<i.length&&d<this._lenses.length;){const h=i[u][0].symbol.range.startLineNumber,f=this._lenses[d].getLineNumber();f<h?(this._lenses[d].dispose(c,l),this._lenses.splice(d,1)):f===h?(this._lenses[d].updateCodeLensSymbols(i[u],c),u++,d++):(this._lenses.splice(d,0,new e5(i[u],this._editor,this._styleClassName,c,l,r.codeLensHeight,()=>this._resolveCodeLensesInViewportSoon())),d++,u++)}for(;d<this._lenses.length;)this._lenses[d].dispose(c,l),this._lenses.splice(d,1);for(;u<i.length;)this._lenses.push(new e5(i[u],this._editor,this._styleClassName,c,l,r.codeLensHeight,()=>this._resolveCodeLensesInViewportSoon())),u++;c.commit(a)})}),o.restore(this._editor)}_resolveCodeLensesInViewportSoon(){this._editor.getModel()&&this._resolveCodeLensesScheduler.schedule()}_resolveCodeLensesInViewport(){var e;(e=this._resolveCodeLensesPromise)===null||e===void 0||e.cancel(),this._resolveCodeLensesPromise=void 0;const t=this._editor.getModel();if(!t)return;const i=[],n=[];if(this._lenses.forEach(a=>{const l=a.computeIfNecessary(t);l&&(i.push(l),n.push(a))}),i.length===0)return;const o=Date.now(),r=en(a=>{co
Line truncated
|
|
|
|
|
[{1}] {2}`,o,J2.modifierLabels[Co].altKey,c)}return o}updateClass(){this.options.icon&&(this._commandAction!==this._menuItemAction?this._menuItemAction.alt&&this._updateItemClass(this._menuItemAction.alt.item):this._updateItemClass(this._menuItemAction.item))}_updateItemClass(e){var t;this._itemClassDispose.value=void 0;const{element:i,label:n}=this;if(!i||!n)return;const o=this._commandAction.checked&&((t=e.toggled)===null||t===void 0?void 0:t.icon)?e.toggled.icon:e.icon;if(!!o)if(vt.isThemeIcon(o)){const r=vt.asClassNameArray(o);n.classList.add(...r),this._itemClassDispose.value=Ze(()=>{n.classList.remove(...r)})}else n.style.backgroundImage=F_(this._themeService.getColorTheme().type)?eh(o.dark):eh(o.light),n.classList.add("icon"),this._itemClassDispose.value=Na(Ze(()=>{n.style.backgroundImage="",n.classList.remove("icon")}),this._themeService.onDidColorThemeChange(()=>{this.updateClass()}))}};Qg=GA([vo(2,qi),vo(3,Ii),vo(4,Be),vo(5,Wt),vo(6,rc)],Qg);let EI=class extends VB{constructor(e,t,i,n){var o,r;const a=Object.assign({},t!=null?t:Object.create(null),{menuAsChild:(o=t==null?void 0:t.menuAsChild)!==null&&o!==void 0?o:!1,classNames:(r=t==null?void 0:t.classNames)!==null&&r!==void 0?r:vt.isThemeIcon(e.item.icon)?vt.asClassName(e.item.icon):void 0});super(e,{getActions:()=>e.actions},i,a),this._contextMenuService=i,this._themeService=n}render(e){super.render(e),Nt(this.element),e.classList.add("menu-entry");const t=this._action,{icon:i}=t.item;if(i&&!vt.isThemeIcon(i)){this.element.classList.add("icon");const n=()=>{this.element&&(this.element.style.backgroundImage=F_(this._themeService.getColorTheme().type)?eh(i.dark):eh(i.light))};n(),this._register(this._themeService.onDidColorThemeChange(()=>{n()}))}}};EI=GA([vo(2,rc),vo(3,Wt)],EI);let II=class extends ma{constructor(e,t,i,n,o,r,a,l){var c,d,u;super(null,e),this._keybindingService=i,this._notificationService=n,this._contextMenuService=o,this._menuService=r,this._instaService=a,this._storageService=l,this._container=null,this._options=t,this._storageKey=`${e.item.submenu.id}_lastActionId`;let h;const f=l.get(this._storageKey,1);f&&(h=e.actions.find(_=>f===_.id)),h||(h=e.actions[0]),this._defaultAction=this._instaService.createInstance(Qg,h,{keybinding:this._getDefaultActionKeybindingLabel(h)});const g=Object.assign({},t!=null?t:Object.create(null),{menuAsChild:(c=t==null?void 0:t.menuAsChild)!==null&&c!==void 0?c:!0,classNames:(d=t==null?void 0:t.classNames)!==null&&d!==void 0?d:["codicon","codicon-chevron-down"],actionRunner:(u=t==null?void 0:t.actionRunner)!==null&&u!==void 0?u:new Ng});this._dropdown=new VB(e,e.actions,this._contextMenuService,g),this._dropdown.actionRunner.onDidRun(_=>{_.action instanceof hd&&this.update(_.action)})}update(e){this._storageService.store(this._storageKey,e.id,1,0),this._defaultAction.dispose(),this._defaultAction=this._instaService.createInstance(Qg,e,{keybinding:this._getDefaultActionKeybindingLabel(e)}),this._defaultAction.actionRunner=new class extends Ng{runAction(t,i){return HB(this,void 0,void 0,function*(){yield t.run(void 0)})}},this._container&&this._defaultAction.render(kZ(this._container,ie(".action-container")))}_getDefaultActionKeybindingLabel(e){var t;let i;if(!((t=this._options)===null||t===void 0)&&t.renderKeybindingWithDefaultActionLabel){const n=this._keybindingService.lookupKeybinding(e.id);n&&(i=`(${n.getLabel()})`)}return i}setActionContext(e){super.setActionContext(e),this._defaultAction.setActionContext(e),this._dropdown.setActionContext(e)}render(e){this._container=e,super.render(this._container),this._container.classList.add("monaco-dropdown-with-default");const t=ie(".action-container");this._defaultAction.render(X(this._container,t)),this._register(Q(t,fe.KEY_DOWN,n=>{const o=new Qt(n);o.equals(17)&&(this._defaultAction.element.tabIndex=-1,this._dropdown.focus(),o.stopPropagation())}));const i=ie(".dropdown-action-container");this._dropdown.render(X(this._container,i)),this._register(Q(i,fe.KEY_DOWN,n=>{var o;const r=new Qt(n);r.equals(15)&&(this._defaultAction.element.tabIndex=0,this._dropdown.setFocusable(!1),(o=this._defaultAction.element)===null||o===void 0||o.focus(),r.stopPropagation())}))}focus(e){e?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(e){e?this._defaultAction.element.tabIndex=0:(this._defaultAction.element.tabIndex=-1,this._dropdown.setFocusable(!1))}dispose(){this._defaultAction.dispose(),this._dropdown.dispose(),super.dispose()}};II=GA([vo(2,qi),vo(3,Ii),vo(4,rc),vo(5,Mh),vo(6,Ue),vo(7,hr)],II);function Nue(s,e,t){return e instanceof hd?s.createInstance(Qg,e,t):e instanceof QN?e.item.rememberDefaultAction?s.createInstance(II,e,t):s.createInstance(EI,e,t):void 0}var zB=globalThis&&globalThis.__decorate||function(s,e,t,i){var n=arguments.length,o=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Re
Line truncated
|
|
|
|
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function a(){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}}e.defaults=a();function l(z){e.defaults=z}var c=/[&<>"']/,d=/[&<>"']/g,u=/[<>"']|&(?!#?\w+;)/,h=/[<>"']|&(?!#?\w+;)/g,f={"&":"&","<":"<",">":">",'"':""","'":"'"},g=function(V){return f[V]};function _(z,V){if(V){if(c.test(z))return z.replace(d,g)}else if(u.test(z))return z.replace(h,g);return z}var b=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig;function v(z){return z.replace(b,function(V,B){return B=B.toLowerCase(),B==="colon"?":":B.charAt(0)==="#"?B.charAt(1)==="x"?String.fromCharCode(parseInt(B.substring(2),16)):String.fromCharCode(+B.substring(1)):""})}var C=/(^|[^\[])\^/g;function w(z,V){z=typeof z=="string"?z:z.source,V=V||"";var B={replace:function(T,F){return F=F.source||F,F=F.replace(C,"$1"),z=z.replace(T,F),B},getRegex:function(){return new RegExp(z,V)}};return B}var S=/[^\w:]/g,D=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;function x(z,V,B){if(z){var E;try{E=decodeURIComponent(v(B)).replace(S,"").toLowerCase()}catch{return null}if(E.indexOf("javascript:")===0||E.indexOf("vbscript:")===0||E.indexOf("data:")===0)return null}V&&!D.test(B)&&(B=P(V,B));try{B=encodeURI(B).replace(/%25/g,"%")}catch{return null}return B}var y={},k=/^[^:]+:\/*[^/]*$/,I=/^([^:]+:)[\s\S]*$/,R=/^([^:]+:\/*[^/]*)[\s\S]*$/;function P(z,V){y[" "+z]||(k.test(z)?y[" "+z]=z+"/":y[" "+z]=ue(z,"/",!0)),z=y[" "+z];var B=z.indexOf(":")===-1;return V.substring(0,2)==="//"?B?V:z.replace(I,"$1")+V:V.charAt(0)==="/"?B?V:z.replace(R,"$1")+V:z+V}var j={exec:function(){}};function K(z){for(var V=1,B,E;V<arguments.length;V++){B=arguments[V];for(E in B)Object.prototype.hasOwnProperty.call(B,E)&&(z[E]=B[E])}return z}function ae(z,V){var B=z.replace(/\|/g,function(F,O,Z){for(var J=!1,_e=O;--_e>=0&&Z[_e]==="\\";)J=!J;return J?"|":" |"}),E=B.split(/ \|/),T=0;if(E[0].trim()||E.shift(),E.length>0&&!E[E.length-1].trim()&&E.pop(),E.length>V)E.splice(V);else for(;E.length<V;)E.push("");for(;T<E.length;T++)E[T]=E[T].trim().replace(/\\\|/g,"|");return E}function ue(z,V,B){var E=z.length;if(E===0)return"";for(var T=0;T<E;){var F=z.charAt(E-T-1);if(F===V&&!B)T++;else if(F!==V&&B)T++;else break}return z.slice(0,E-T)}function we(z,V){if(z.indexOf(V[1])===-1)return-1;for(var B=z.length,E=0,T=0;T<B;T++)if(z[T]==="\\")T++;else if(z[T]===V[0])E++;else if(z[T]===V[1]&&(E--,E<0))return T;return-1}function ve(z){z&&z.sanitize&&!z.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 Ce(z,V){if(V<1)return"";for(var B="";V>1;)V&1&&(B+=z),V>>=1,z+=z;return B+z}function We(z,V,B,E){var T=V.href,F=V.title?_(V.title):null,O=z[1].replace(/\\([\[\]])/g,"$1");if(z[0].charAt(0)!=="!"){E.state.inLink=!0;var Z={type:"link",raw:B,href:T,title:F,text:O,tokens:E.inlineTokens(O,[])};return E.state.inLink=!1,Z}return{type:"image",raw:B,href:T,title:F,text:_(O)}}function Rt(z,V){var B=z.match(/^(\s+)(?:```)/);if(B===null)return V;var E=B[1];return V.split(`
|
|
|
|
|
`).map(function(T){var F=T.match(/^\s+/);if(F===null)return T;var O=F[0];return O.length>=E.length?T.slice(E.length):T}).join(`
|
|
|
|
|
`)}var yt=function(){function z(B){this.options=B||e.defaults}var V=z.prototype;return V.space=function(E){var T=this.rules.block.newline.exec(E);if(T&&T[0].length>0)return{type:"space",raw:T[0]}},V.code=function(E){var T=this.rules.block.code.exec(E);if(T){var F=T[0].replace(/^ {1,4}/gm,"");return{type:"code",raw:T[0],codeBlockStyle:"indented",text:this.options.pedantic?F:ue(F,`
|
|
|
|
|
`)}}},V.fences=function(E){var T=this.rules.block.fences.exec(E);if(T){var F=T[0],O=Rt(F,T[3]||"");return{type:"code",raw:F,lang:T[2]?T[2].trim():T[2],text:O}}},V.heading=function(E){var T=this.rules.block.heading.exec(E);if(T){var F=T[2].trim();if(/#$/.test(F)){var O=ue(F,"#");(this.options.pedantic||!O||/ $/.test(O))&&(F=O.trim())}var Z={type:"heading",raw:T[0],depth:T[1].length,text:F,tokens:[]};return this.lexer.inline(Z.text,Z.tokens),Z}},V.hr=function(E){var T=this.rules.block.hr.exec(E);if(T)return{type:"hr",raw:T[0]}},V.blockquote=function(E){var T=this.rules.block.blockquote.exec(E);if(T){var F=T[0].replace(/^ *>[ \t]?/gm,"");return{type:"blockquote",raw:T[0],tokens:this.lexer.blockTokens(F,[]),text:F}}},V.list=function(E){var T=this.rules.block.list.exec(E);if(T){var F,O,Z,J,_e,ge,Pe,Ve,Dt,ct,Re,xt,Et=T[1].trim(),ss=Et.length>1,ui={type:"list",raw:"",ordered:ss,start:ss?+Et.slice(0,-1):"",loose:!1,items:[]};Et=ss?"\\d{1,9}\\"+Et.slice(-1):"\\"+Et,this.options.pedantic&&(Et=ss?Et:"[*+-]");for(var on=new RegExp("^( {0,3}"+Et+")((?:[ ][^\\n]*)?(?:\\n|$))");E&&(xt=!1,!(!(T=on.exec(E))||this.rules.block.hr.test(E)));){if(F=T[0],E=E.substring(F.length),Ve=T[2].split(`
|
|
|
|
|
`,1)[0],Dt=E.split(`
|
|
|
|
|
`,1)[0],this.options.pedantic?(J=2,Re=Ve.trimLeft()):(J=T[2].search(/[^ ]/),J=J>4?1:J,Re=Ve.slice(J),J+=T[1].length),ge=!1,!Ve&&/^ *$/.test(Dt)&&(F+=Dt+`
|
|
|
|
|
`,E=E.substring(Dt.length+1),xt=!0),!xt)for(var Hd=new RegExp("^ {0,"+Math.min(3,J-1)+"}(?:[*+-]|\\d{1,9}[.)])((?: [^\\n]*)?(?:\\n|$))"),Ks=new RegExp("^ {0,"+Math.min(3,J-1)+"}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)");E&&(ct=E.split(`
|
|
|
|
|
`,1)[0],Ve=ct,this.options.pedantic&&(Ve=Ve.replace(/^ {1,4}(?=( {4})*[^ ])/g," ")),!(Hd.test(Ve)||Ks.test(E)));){if(Ve.search(/[^ ]/)>=J||!Ve.trim())Re+=`
|
|
|
|
|
`+Ve.slice(J);else if(!ge)Re+=`
|
|
|
|
|
`+Ve;else break;!ge&&!Ve.trim()&&(ge=!0),F+=ct+`
|
|
|
|
|
`,E=E.substring(ct.length+1)}ui.loose||(Pe?ui.loose=!0:/\n *\n *$/.test(F)&&(Pe=!0)),this.options.gfm&&(O=/^\[[ xX]\] /.exec(Re),O&&(Z=O[0]!=="[ ] ",Re=Re.replace(/^\[[ xX]\] +/,""))),ui.items.push({type:"list_item",raw:F,task:!!O,checked:Z,loose:!1,text:Re}),ui.raw+=F}ui.items[ui.items.length-1].raw=F.trimRight(),ui.items[ui.items.length-1].text=Re.trimRight(),ui.raw=ui.raw.trimRight();var Xr=ui.items.length;for(_e=0;_e<Xr;_e++){this.lexer.state.top=!1,ui.items[_e].tokens=this.lexer.blockTokens(ui.items[_e].text,[]);var Ja=ui.items[_e].tokens.filter(function(cc){return cc.type==="space"}),zd=Ja.every(function(cc){for(var $d=cc.raw.split(""),Ko=0,T0=r($d),Vp;!(Vp=T0()).done;){var N0=Vp.value;if(N0===`
|
|
|
|
|
`&&(Ko+=1),Ko>1)return!0}return!1});!ui.loose&&Ja.length&&zd&&(ui.loose=!0,ui.items[_e].loose=!0)}return ui}},V.html=function(E){var T=this.rules.block.html.exec(E);if(T){var F={type:"html",raw:T[0],pre:!this.options.sanitizer&&(T[1]==="pre"||T[1]==="script"||T[1]==="style"),text:T[0]};return this.options.sanitize&&(F.type="paragraph",F.text=this.options.sanitizer?this.options.sanitizer(T[0]):_(T[0]),F.tokens=[],this.lexer.inline(F.text,F.tokens)),F}},V.def=function(E){var T=this.rules.block.def.exec(E);if(T){T[3]&&(T[3]=T[3].substring(1,T[3].length-1));var F=T[1].toLowerCase().replace(/\s+/g," ");return{type:"def",tag:F,raw:T[0],href:T[2],title:T[3]}}},V.table=function(E){var T=this.rules.block.table.exec(E);if(T){var F={type:"table",header:ae(T[1]).map(function(Pe){return{text:Pe}}),align:T[2].replace(/^ *|\| *$/g,"").split(/ *\| */),rows:T[3]&&T[3].trim()?T[3].replace(/\n[ \t]*$/,"").split(`
|
|
|
|
|
`):[]};if(F.header.length===F.align.length){F.raw=T[0];var O=F.align.length,Z,J,_e,ge;for(Z=0;Z<O;Z++)/^ *-+: *$/.test(F.align[Z])?F.align[Z]="right":/^ *:-+: *$/.test(F.align[Z])?F.align[Z]="center":/^ *:-+ *$/.test(F.align[Z])?F.align[Z]="left":F.align[Z]=null;for(O=F.rows.length,Z=0;Z<O;Z++)F.rows[Z]=ae(F.rows[Z],F.header.length).map(function(Pe){return{text:Pe}});for(O=F.header.length,J=0;J<O;J++)F.header[J].tokens=[],this.lexer.inline(F.header[J].text,F.header[J].tokens);for(O=F.rows.length,J=0;J<O;J++)for(ge=F.rows[J],_e=0;_e<ge.length;_e++)ge[_e].tokens=[],this.lexer.inline(ge[_e].text,ge[_e].tokens);return F}}},V.lheading=function(E){var T=this.rules.block.lheading.exec(E);if(T){var F={type:"heading",raw:T[0],depth:T[2].charAt(0)==="="?1:2,text:T[1],tokens:[]};return this.lexer.inline(F.text,F.tokens),F}},V.paragraph=function(E){var T=this.rules.block.paragraph.exec(E);if(T){var F={type:"paragraph",raw:T[0],text:T[1].charAt(T[1].length-1)===`
|
|
|
|
|
`?T[1].slice(0,-1):T[1],tokens:[]};return this.lexer.inline(F.text,F.tokens),F}},V.text=function(E){var T=this.rules.block.text.exec(E);if(T){var F={type:"text",raw:T[0],text:T[0],tokens:[]};return this.lexer.inline(F.text,F.tokens),F}},V.escape=function(E){var T=this.rules.inline.escape.exec(E);if(T)return{type:"escape",raw:T[0],text:_(T[1])}},V.tag=function(E){var T=this.rules.inline.tag.exec(E);if(T)return!this.lexer.state.inLink&&/^<a /i.test(T[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&/^<\/a>/i.test(T[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&/^<(pre|code|kbd|script)(\s|>)/i.test(T[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&/^<\/(pre|code|kbd|script)(\s|>)/i.test(T[0])&&(this.lexer.state.inRawBlock=!1),{type:this.options.sanitize?"text":"html",raw:T[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,text:this.options.sanitize?this.options.sanitizer?this.options.sanitizer(T[0]):_(T[0]):T[0]}},V.link=function(E){var T=this.rules.inline.link.exec(E);if(T){var F=T[2].trim();if(!this.options.pedantic&&/^</.test(F)){if(!/>$/.test(F))return;var O=ue(F.slice(0,-1),"\\");if((F.length-O.length)%2===0)return}else{var Z=we(T[2],"()");if(Z>-1){var J=T[0].indexOf("!")===0?5:4,_e=J+T[1].length+Z;T[2]=T[2].substring(0,Z),T[0]=T[0].substring(0,_e).trim(),T[3]=""}}var ge=T[2],Pe="";if(this.options.pedantic){var Ve=/^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(ge);Ve&&(ge=Ve[1],Pe=Ve[3])}else Pe=T[3]?T[3].slice(1,-1):"";return ge=ge.trim(),/^</.test(ge)&&(this.options.pedantic&&!/>$/.test(F)?ge=ge.slice(1):ge=ge.slice(1,-1)),We(T,{href:ge&&ge.replace(this.rules.inline._escapes,"$1"),title:Pe&&Pe.replace(this.rules.inline._escapes,"$1")},T[0],this.lexer)}},V.reflink=function(E,T){var F;if((F=this.rules.inline.reflink.exec(E))||(F=this.rules.inline.nolink.exec(E))){var O=(F[2]||F[1]).replace(/\s+/g," ");if(O=T[O.toLowerCase()],!O||!O.href){var Z=F[0].charAt(0);return{type:"text",raw:Z,text:Z}}return We(F,O,F[0],this.lexer)}},V.emStrong=function(E,T,F){F===void 0&&(F="");var O=this.rules.inline.emStrong.lDelim.exec(E);if(!!O&&!(O[3]&&F.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\u0870-\u0887\u0889-\u088E\u08A0-\u08C9\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\u0C5D\u0C60\u0C61\u0C66-\u0C6F\u0C78-\u0C7E\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDD\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-\u1711\u171F-\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-\u1B4C\u1B50-\u1B59\u1B83-\u1BA0\u1BAE-\u1BE5\u1C00-\u1C23\u1C40-\u1C49\u1C4D-\u1C7D\u1C80-\u1C88\u1C90-\u1CBA\u1CBD-\u1CBF\u1CE9-\u1CEC\u1CEE-\uLine truncated
|
|
|
|
|
]`).replace("lheading",Ee.lheading).replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").getRegex()});var Se={escape:/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,autolink:/^<(scheme:[^\s\x00-\x1f<>]*|email)>/,url:j,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)\]\[(ref)\]/,nolink:/^!?\[(ref)\](?:\[\])?/,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:j,text:/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,punctuation:/^([\spunctuation])/};Se._punctuation="!\"#$%&'()+\\-.,/:;<=>?@\\[\\]`^{|}~",Se.punctuation=w(Se.punctuation).replace(/punctuation/g,Se._punctuation).getRegex(),Se.blockSkip=/\[[^\]]*?\]\([^\)]*?\)|`[^`]*?`|<[^>]*?>/g,Se.escapedEmSt=/\\\*|\\_/g,Se._comment=w(Ee._comment).replace("(?:-->|$)","-->").getRegex(),Se.emStrong.lDelim=w(Se.emStrong.lDelim).replace(/punct/g,Se._punctuation).getRegex(),Se.emStrong.rDelimAst=w(Se.emStrong.rDelimAst,"g").replace(/punct/g,Se._punctuation).getRegex(),Se.emStrong.rDelimUnd=w(Se.emStrong.rDelimUnd,"g").replace(/punct/g,Se._punctuation).getRegex(),Se._escapes=/\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/g,Se._scheme=/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/,Se._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])?)+(?![-_])/,Se.autolink=w(Se.autolink).replace("scheme",Se._scheme).replace("email",Se._email).getRegex(),Se._attribute=/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/,Se.tag=w(Se.tag).replace("comment",Se._comment).replace("attribute",Se._attribute).getRegex(),Se._label=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,Se._href=/<(?:\\.|[^\n<>\\])+>|[^\s\x00-\x1f]*/,Se._title=/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/,Se.link=w(Se.link).replace("label",Se._label).replace("href",Se._href).replace("title",Se._title).getRegex(),Se.reflink=w(Se.reflink).replace("label",Se._label).replace("ref",Ee._label).getRegex(),Se.nolink=w(Se.nolink).replace("ref",Ee._label).getRegex(),Se.reflinkSearch=w(Se.reflinkSearch,"g").replace("reflink",Se.reflink).replace("nolink",Se.nolink).getRegex(),Se.normal=K({},Se),Se.pedantic=K({},Se.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:w(/^!?\[(label)\]\((.*?)\)/).replace("label",Se._label).getRegex(),reflink:w(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",Se._label).getRegex()}),Se.gfm=K({},Se.normal,{escape:w(Se.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.!#$%&'*+\/=?_`{\|}~-]+@)))/}),Se.gfm.url=w(Se.gfm.url,"i").replace("email",Se.gfm._extended_email).getRegex(),Se.breaks=K({},Se.gfm,{br:w(Se.br).replace("{2,}","*").getRegex(),text:w(Se.gfm.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()});function Ot(z){return z.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 $i(z){var V="",B,E,T=z.length;for(B=0;B<T;B++)E=z.charCodeAt(B),Math.random()>.5&&(E="x"+E.toString(16)),V+="&#"+E+";";return V}var Pn=function(){function z(B){this.tokens=[],this.tokens.links=Object.create(null),this.options=B||e.defaults,this.options.tokenizer=this.options.tokenizer||new yt,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 E={block:Ee.normal,inline:Se.normal};this.options.pedantic?(ELine truncated
|
|
|
|
|
`),this.blockTokens(E,this.tokens);for(var T;T=this.inlineQueue.shift();)this.inlineTokens(T.src,T.tokens);return this.tokens},V.blockTokens=function(E,T){var F=this;T===void 0&&(T=[]),this.options.pedantic?E=E.replace(/\t/g," ").replace(/^ +$/gm,""):E=E.replace(/^( *)(\t+)/gm,function(Pe,Ve,Dt){return Ve+" ".repeat(Dt.length)});for(var O,Z,J,_e;E;)if(!(this.options.extensions&&this.options.extensions.block&&this.options.extensions.block.some(function(Pe){return(O=Pe.call({lexer:F},E,T))?(E=E.substring(O.raw.length),T.push(O),!0):!1}))){if(O=this.tokenizer.space(E)){E=E.substring(O.raw.length),O.raw.length===1&&T.length>0?T[T.length-1].raw+=`
|
|
|
|
|
`:T.push(O);continue}if(O=this.tokenizer.code(E)){E=E.substring(O.raw.length),Z=T[T.length-1],Z&&(Z.type==="paragraph"||Z.type==="text")?(Z.raw+=`
|
|
|
|
|
`+O.raw,Z.text+=`
|
|
|
|
|
`+O.text,this.inlineQueue[this.inlineQueue.length-1].src=Z.text):T.push(O);continue}if(O=this.tokenizer.fences(E)){E=E.substring(O.raw.length),T.push(O);continue}if(O=this.tokenizer.heading(E)){E=E.substring(O.raw.length),T.push(O);continue}if(O=this.tokenizer.hr(E)){E=E.substring(O.raw.length),T.push(O);continue}if(O=this.tokenizer.blockquote(E)){E=E.substring(O.raw.length),T.push(O);continue}if(O=this.tokenizer.list(E)){E=E.substring(O.raw.length),T.push(O);continue}if(O=this.tokenizer.html(E)){E=E.substring(O.raw.length),T.push(O);continue}if(O=this.tokenizer.def(E)){E=E.substring(O.raw.length),Z=T[T.length-1],Z&&(Z.type==="paragraph"||Z.type==="text")?(Z.raw+=`
|
|
|
|
|
`+O.raw,Z.text+=`
|
|
|
|
|
`+O.raw,this.inlineQueue[this.inlineQueue.length-1].src=Z.text):this.tokens.links[O.tag]||(this.tokens.links[O.tag]={href:O.href,title:O.title});continue}if(O=this.tokenizer.table(E)){E=E.substring(O.raw.length),T.push(O);continue}if(O=this.tokenizer.lheading(E)){E=E.substring(O.raw.length),T.push(O);continue}if(J=E,this.options.extensions&&this.options.extensions.startBlock&&function(){var Pe=1/0,Ve=E.slice(1),Dt=void 0;F.options.extensions.startBlock.forEach(function(ct){Dt=ct.call({lexer:this},Ve),typeof Dt=="number"&&Dt>=0&&(Pe=Math.min(Pe,Dt))}),Pe<1/0&&Pe>=0&&(J=E.substring(0,Pe+1))}(),this.state.top&&(O=this.tokenizer.paragraph(J))){Z=T[T.length-1],_e&&Z.type==="paragraph"?(Z.raw+=`
|
|
|
|
|
`+O.raw,Z.text+=`
|
|
|
|
|
`+O.text,this.inlineQueue.pop(),this.inlineQueue[this.inlineQueue.length-1].src=Z.text):T.push(O),_e=J.length!==E.length,E=E.substring(O.raw.length);continue}if(O=this.tokenizer.text(E)){E=E.substring(O.raw.length),Z=T[T.length-1],Z&&Z.type==="text"?(Z.raw+=`
|
|
|
|
|
`+O.raw,Z.text+=`
|
|
|
|
|
`+O.text,this.inlineQueue.pop(),this.inlineQueue[this.inlineQueue.length-1].src=Z.text):T.push(O);continue}if(E){var ge="Infinite loop on byte: "+E.charCodeAt(0);if(this.options.silent){console.error(ge);break}else throw new Error(ge)}}return this.state.top=!0,T},V.inline=function(E,T){this.inlineQueue.push({src:E,tokens:T})},V.inlineTokens=function(E,T){var F=this;T===void 0&&(T=[]);var O,Z,J,_e=E,ge,Pe,Ve;if(this.tokens.links){var Dt=Object.keys(this.tokens.links);if(Dt.length>0)for(;(ge=this.tokenizer.rules.inline.reflinkSearch.exec(_e))!=null;)Dt.includes(ge[0].slice(ge[0].lastIndexOf("[")+1,-1))&&(_e=_e.slice(0,ge.index)+"["+Ce("a",ge[0].length-2)+"]"+_e.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(ge=this.tokenizer.rules.inline.blockSkip.exec(_e))!=null;)_e=_e.slice(0,ge.index)+"["+Ce("a",ge[0].length-2)+"]"+_e.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);for(;(ge=this.tokenizer.rules.inline.escapedEmSt.exec(_e))!=null;)_e=_e.slice(0,ge.index)+"++"+_e.slice(this.tokenizer.rules.inline.escapedEmSt.lastIndex);for(;E;)if(Pe||(Ve=""),Pe=!1,!(this.options.extensions&&this.options.extensions.inline&&this.options.extensions.inline.some(function(Re){return(O=Re.call({lexer:F},E,T))?(E=E.substring(O.raw.length),T.push(O),!0):!1}))){if(O=this.tokenizer.escape(E)){E=E.substring(O.raw.length),T.push(O);continue}if(O=this.tokenizer.tag(E)){E=E.substring(O.raw.length),Z=T[T.length-1],Z&&O.type==="text"&&Z.type==="text"?(Z.raw+=O.raw,Z.text+=O.text):T.push(O);continue}if(O=this.tokenizer.link(E)){E=E.substring(O.raw.length),T.push(O);continue}if(O=this.tokenizer.reflink(E,this.tokens.links)){E=E.substring(O.raw.length),Z=T[T.length-1],Z&&O.type==="text"&&Z.type==="text"?(Z.raw+=O.raw,Z.text+=O.text):T.push(O);continue}if(O=this.tokenizer.emStrong(E,_e,Ve)){E=E.substring(O.raw.length),T.push(O);continue}if(O=this.tokenizer.codespan(E)){E=E.substring(O.raw.length),T.push(O);continue}if(O=this.tokenizer.br(E)){E=E.substring(O.raw.length),T.push(O);continue}if(O=this.tokenizer.del(E)){E=E.substring(O.raw.length),T.push(O);continue}if(O=this.tokenizer.autolink(E,$i)){E=E.substring(O.raw.length),T.push(O);continue}if(!this.state.inLink&&(O=this.tokenizer.url(E,$i))){E=E.substring(O.raw.length),T.push(O);continue}if(J=E,this.options.extensions&&this.options.extensions.startInline&&function(){var Re=1/0,xt=E.slice(1),Et=void 0;F.options.extensions.startInline.forEach(function(ss){Et=ss.call({lexer:this},xt),typeof Et=="number"&&Et>=0&&(Re=Math.min(Re,Et))}),Re<1/0&&Re>=0&&(J=E.substring(0,Re+1))}(),O=this.tokenizer.inlineText(J,Ot)){E=E.substring(O.raw.length),O.raw.slice(-1)!=="_"&&(Ve=O.raw.slice(-1)),Pe=!0,Z=T[T.length-1],Z&&Z.type==="text"?(Z.raw+=O.raw,Z.text+=O.text):T.push(O);continue}if(E){var ct="Infinite loop on byte: "+E.charCodeAt(0);if(this.options.silent){console.error(ct);break}else throw new Error(ct)}}return T},i(z,null,[{key:"rules",get:function(){return{block:Ee,inline:Se}}}]),z}(),sn=function(){function z(B){this.options=B||e.defaults}var V=z.prototype;return V.code=function(E,T,F){var O=(T||"").match(/\S*/)[0];if(this.options.highlight){var Z=this.options.highlight(E,O);Z!=null&&Z!==E&&(F=!0,E=Z)}return E=E.replace(/\n$/,"")+`
|
|
|
|
|
`,O?'<pre><code class="'+this.options.langPrefix+_(O,!0)+'">'+(F?E:_(E,!0))+`</code></pre>
|
|
|
|
|
`:"<pre><code>"+(F?E:_(E,!0))+`</code></pre>
|
|
|
|
|
`},V.blockquote=function(E){return`<blockquote>
|
|
|
|
|
`+E+`</blockquote>
|
|
|
|
|
`},V.html=function(E){return E},V.heading=function(E,T,F,O){if(this.options.headerIds){var Z=this.options.headerPrefix+O.slug(F);return"<h"+T+' id="'+Z+'">'+E+"</h"+T+`>
|
|
|
|
|
`}return"<h"+T+">"+E+"</h"+T+`>
|
|
|
|
|
`},V.hr=function(){return this.options.xhtml?`<hr/>
|
|
|
|
|
`:`<hr>
|
|
|
|
|
`},V.list=function(E,T,F){var O=T?"ol":"ul",Z=T&&F!==1?' start="'+F+'"':"";return"<"+O+Z+`>
|
|
|
|
|
`+E+"</"+O+`>
|
|
|
|
|
`},V.listitem=function(E){return"<li>"+E+`</li>
|
|
|
|
|
`},V.checkbox=function(E){return"<input "+(E?'checked="" ':"")+'disabled="" type="checkbox"'+(this.options.xhtml?" /":"")+"> "},V.paragraph=function(E){return"<p>"+E+`</p>
|
|
|
|
|
`},V.table=function(E,T){return T&&(T="<tbody>"+T+"</tbody>"),`<table>
|
|
|
|
|
<thead>
|
|
|
|
|
`+E+`</thead>
|
|
|
|
|
`+T+`</table>
|
|
|
|
|
`},V.tablerow=function(E){return`<tr>
|
|
|
|
|
`+E+`</tr>
|
|
|
|
|
`},V.tablecell=function(E,T){var F=T.header?"th":"td",O=T.align?"<"+F+' align="'+T.align+'">':"<"+F+">";return O+E+("</"+F+`>
|
|
|
|
|
`)},V.strong=function(E){return"<strong>"+E+"</strong>"},V.em=function(E){return"<em>"+E+"</em>"},V.codespan=function(E){return"<code>"+E+"</code>"},V.br=function(){return this.options.xhtml?"<br/>":"<br>"},V.del=function(E){return"<del>"+E+"</del>"},V.link=function(E,T,F){if(E=x(this.options.sanitize,this.options.baseUrl,E),E===null)return F;var O='<a href="'+_(E)+'"';return T&&(O+=' title="'+T+'"'),O+=">"+F+"</a>",O},V.image=function(E,T,F){if(E=x(this.options.sanitize,this.options.baseUrl,E),E===null)return F;var O='<img src="'+E+'" alt="'+F+'"';return T&&(O+=' title="'+T+'"'),O+=this.options.xhtml?"/>":">",O},V.text=function(E){return E},z}(),Us=function(){function z(){}var V=z.prototype;return V.strong=function(E){return E},V.em=function(E){return E},V.codespan=function(E){return E},V.del=function(E){return E},V.html=function(E){return E},V.text=function(E){return E},V.link=function(E,T,F){return""+F},V.image=function(E,T,F){return""+F},V.br=function(){return""},z}(),js=function(){function z(){this.seen={}}var V=z.prototype;return V.serialize=function(E){return E.toLowerCase().trim().replace(/<[!\/a-z].*?>/ig,"").replace(/[\u2000-\u206F\u2E00-\u2E7F\\'!"#$%&()*+,./:;<=>?@[\]^`{|}~]/g,"").replace(/\s/g,"-")},V.getNextSafeSlug=function(E,T){var F=E,O=0;if(this.seen.hasOwnProperty(F)){O=this.seen[E];do O++,F=E+"-"+O;while(this.seen.hasOwnProperty(F))}return T||(this.seen[E]=O,this.seen[F]=0),F},V.slug=function(E,T){T===void 0&&(T={});var F=this.serialize(E);return this.getNextSafeSlug(F,T.dryrun)},z}(),Gn=function(){function z(B){this.options=B||e.defaults,this.options.renderer=this.options.renderer||new sn,this.renderer=this.options.renderer,this.renderer.options=this.options,this.textRenderer=new Us,this.slugger=new js}z.parse=function(E,T){var F=new z(T);return F.parse(E)},z.parseInline=function(E,T){var F=new z(T);return F.parseInline(E)};var V=z.prototype;return V.parse=function(E,T){T===void 0&&(T=!0);var F="",O,Z,J,_e,ge,Pe,Ve,Dt,ct,Re,xt,Et,ss,ui,on,Hd,Ks,Xr,Ja,zd=E.length;for(O=0;O<zd;O++){if(Re=E[O],this.options.extensions&&this.options.extensions.renderers&&this.options.extensions.renderers[Re.type]&&(Ja=this.options.extensions.renderers[Re.type].call({parser:this},Re),Ja!==!1||!["space","hr","heading","code","table","blockquote","list","html","paragraph","text"].includes(Re.type))){F+=Ja||"";continue}switch(Re.type){case"space":continue;case"hr":{F+=this.renderer.hr();continue}case"heading":{F+=this.renderer.heading(this.parseInline(Re.tokens),Re.depth,v(this.parseInline(Re.tokens,this.textRenderer)),this.slugger);continue}case"code":{F+=this.renderer.code(Re.text,Re.lang,Re.escaped);continue}case"table":{for(Dt="",Ve="",_e=Re.header.length,Z=0;Z<_e;Z++)Ve+=this.renderer.tablecell(this.parseInline(Re.header[Z].tokens),{header:!0,align:Re.align[Z]});for(Dt+=this.renderer.tablerow(Ve),ct="",_e=Re.rows.length,Z=0;Z<_e;Z++){for(Pe=Re.rows[Z],Ve="",ge=Pe.length,J=0;J<ge;J++)Ve+=this.renderer.tablecell(this.parseInline(Pe[J].tokens),{header:!1,align:Re.align[J]});ct+=this.renderer.tablerow(Ve)}F+=this.renderer.table(Dt,ct);continue}case"blockquote":{ct=this.parse(Re.tokens),F+=this.renderer.blockquote(ct);continue}case"list":{for(xt=Re.ordered,Et=Re.start,ss=Re.loose,_e=Re.items.length,ct="",Z=0;Z<_e;Z++)on=Re.items[Z],Hd=on.checked,Ks=on.task,ui="",on.task&&(Xr=this.renderer.checkbox(Hd),ss?on.tokens.length>0&&on.tokens[0].type==="paragraph"?(on.tokens[0].text=Xr+" "+on.tokens[0].text,on.tokens[0].tokens&&on.tokens[0].tokens.length>0&&on.tokens[0].tokens[0].type==="text"&&(on.tokens[0].tokens[0].text=Xr+" "+on.tokens[0].tokens[0].text)):on.tokens.unshift({type:"text",text:Xr}):ui+=Xr),ui+=this.parse(on.tokens,ss),ct+=this.renderer.listitem(ui,Ks,Hd);F+=this.renderer.list(ct,xt,Et);continue}case"html":{F+=this.renderer.html(Re.text);continue}case"paragraph":{F+=this.renderer.paragraph(this.parseInline(Re.tokens));continue}case"text":{for(ct=Re.tokens?this.parseInline(Re.tokens):Re.text;O+1<zd&&E[O+1].type==="text";)Re=E[++O],ct+=`
|
|
|
|
|
`+(Re.tokens?this.parseInline(Re.tokens):Re.text);F+=T?this.renderer.paragraph(ct):ct;continue}default:{var cc='Token with "'+Re.type+'" type was not found.';if(this.options.silent){console.error(cc);return}else throw new Error(cc)}}}return F},V.parseInline=function(E,T){T=T||this.renderer;var F="",O,Z,J,_e=E.length;for(O=0;O<_e;O++){if(Z=E[O],this.options.extensions&&this.options.extensions.renderers&&this.options.extensions.renderers[Z.type]&&(J=this.options.extensions.renderers[Z.type].call({parser:this},Z),J!==!1||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(Z.type))){F+=J||"";continue}switch(Z.type){case"escape":{F+=T.text(Z.text);break}case"html":{F+=T.html(Z.text);break}case"link":{F+=T.link(Z.href,Z.title,this.parseInline(Z.tokens,T));break}case"image":{F+=T.image(Z.href,Z.title,Z.text);break}case"strong":{F+=T.strong(this.parseInline(Z.tokens,T));break}case"em":{F+=T.em(this.parseInline(Z.tokens,T));break}case"codespan":{F+=T.codespan(Z.text);break}case"br":{F+=T.br();break}case"del":{F+=T.del(this.parseInline(Z.tokens,T));break}case"text":{F+=T.text(Z.text);break}default:{var ge='Token with "'+Z.type+'" type was not found.';if(this.options.silent){console.error(ge);return}else throw new Error(ge)}}}return F},z}();function je(z,V,B){if(typeof z>"u"||z===null)throw new Error("marked(): input parameter is undefined or null");if(typeof z!="string")throw new Error("marked(): input parameter is of type "+Object.prototype.toString.call(z)+", string expected");if(typeof V=="function"&&(B=V,V=null),V=K({},je.defaults,V||{}),ve(V),B){var E=V.highlight,T;try{T=Pn.lex(z,V)}catch(J){return B(J)}var F=function(_e){var ge;if(!_e)try{V.walkTokens&&je.walkTokens(T,V.walkTokens),ge=Gn.parse(T,V)}catch(Pe){_e=Pe}return V.highlight=E,_e?B(_e):B(null,ge)};if(!E||E.length<3||(delete V.highlight,!T.length))return F();var O=0;je.walkTokens(T,function(J){J.type==="code"&&(O++,setTimeout(function(){E(J.text,J.lang,function(_e,ge){if(_e)return F(_e);ge!=null&&ge!==J.text&&(J.text=ge,J.escaped=!0),O--,O===0&&F()})},0))}),O===0&&F();return}try{var Z=Pn.lex(z,V);return V.walkTokens&&je.walkTokens(Z,V.walkTokens),Gn.parse(Z,V)}catch(J){if(J.message+=`
|
|
|
|
|
Please report this to https://github.com/markedjs/marked.`,V.silent)return"<p>An error occurred:</p><pre>"+_(J.message+"",!0)+"</pre>";throw J}}je.options=je.setOptions=function(z){return K(je.defaults,z),l(je.defaults),je},je.getDefaults=a,je.defaults=e.defaults,je.use=function(){for(var z=arguments.length,V=new Array(z),B=0;B<z;B++)V[B]=arguments[B];var E=K.apply(void 0,[{}].concat(V)),T=je.defaults.extensions||{renderers:{},childTokens:{}},F;V.forEach(function(O){if(O.extensions&&(F=!0,O.extensions.forEach(function(J){if(!J.name)throw new Error("extension name required");if(J.renderer){var _e=T.renderers?T.renderers[J.name]:null;_e?T.renderers[J.name]=function(){for(var ge=arguments.length,Pe=new Array(ge),Ve=0;Ve<ge;Ve++)Pe[Ve]=arguments[Ve];var Dt=J.renderer.apply(this,Pe);return Dt===!1&&(Dt=_e.apply(this,Pe)),Dt}:T.renderers[J.name]=J.renderer}if(J.tokenizer){if(!J.level||J.level!=="block"&&J.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");T[J.level]?T[J.level].unshift(J.tokenizer):T[J.level]=[J.tokenizer],J.start&&(J.level==="block"?T.startBlock?T.startBlock.push(J.start):T.startBlock=[J.start]:J.level==="inline"&&(T.startInline?T.startInline.push(J.start):T.startInline=[J.start]))}J.childTokens&&(T.childTokens[J.name]=J.childTokens)})),O.renderer&&function(){var J=je.defaults.renderer||new sn,_e=function(Ve){var Dt=J[Ve];J[Ve]=function(){for(var ct=arguments.length,Re=new Array(ct),xt=0;xt<ct;xt++)Re[xt]=arguments[xt];var Et=O.renderer[Ve].apply(J,Re);return Et===!1&&(Et=Dt.apply(J,Re)),Et}};for(var ge in O.renderer)_e(ge);E.renderer=J}(),O.tokenizer&&function(){var J=je.defaults.tokenizer||new yt,_e=function(Ve){var Dt=J[Ve];J[Ve]=function(){for(var ct=arguments.length,Re=new Array(ct),xt=0;xt<ct;xt++)Re[xt]=arguments[xt];var Et=O.tokenizer[Ve].apply(J,Re);return Et===!1&&(Et=Dt.apply(J,Re)),Et}};for(var ge in O.tokenizer)_e(ge);E.tokenizer=J}(),O.walkTokens){var Z=je.defaults.walkTokens;E.walkTokens=function(J){O.walkTokens.call(this,J),Z&&Z.call(this,J)}}F&&(E.extensions=T),je.setOptions(E)})},je.walkTokens=function(z,V){for(var B=function(){var O=T.value;switch(V.call(je,O),O.type){case"table":{for(var Z=r(O.header),J;!(J=Z()).done;){var _e=J.value;je.walkTokens(_e.tokens,V)}for(var ge=r(O.rows),Pe;!(Pe=ge()).done;)for(var Ve=Pe.value,Dt=r(Ve),ct;!(ct=Dt()).done;){var Re=ct.value;je.walkTokens(Re.tokens,V)}break}case"list":{je.walkTokens(O.items,V);break}default:je.defaults.extensions&&je.defaults.extensions.childTokens&&je.defaults.extensions.childTokens[O.type]?je.defaults.extensions.childTokens[O.type].forEach(function(xt){je.walkTokens(O[xt],V)}):O.tokens&&je.walkTokens(O.tokens,V)}},E=r(z),T;!(T=E()).done;)B()},je.parseInline=function(z,V){if(typeof z>"u"||z===null)throw new Error("marked.parseInline(): input parameter is undefined or null");if(typeof z!="string")throw new Error("marked.parseInline(): input parameter is of type "+Object.prototype.toString.call(z)+", string expected");V=K({},je.defaults,V||{}),ve(V);try{var B=Pn.lexInline(z,V);return V.walkTokens&&je.walkTokens(B,V.walkTokens),Gn.parseInline(B,V)}catch(E){if(E.message+=`
|
|
|
|
|
Please report this to https://github.com/markedjs/marked.`,V.silent)return"<p>An error occurred:</p><pre>"+_(E.message+"",!0)+"</pre>";throw E}},je.Parser=Gn,je.parser=Gn.parse,je.Renderer=sn,je.TextRenderer=Us,je.Lexer=Pn,je.lexer=Pn.lex,je.Tokenizer=yt,je.Slugger=js,je.parse=je;var jo=je.options,U=je.setOptions,G=je.use,re=je.walkTokens,de=je.parseInline,he=je,Le=Gn.parse,Ae=Pn.lex;e.Lexer=Pn,e.Parser=Gn,e.Renderer=sn,e.Slugger=js,e.TextRenderer=Us,e.Tokenizer=yt,e.getDefaults=a,e.lexer=Ae,e.marked=je,e.options=jo,e.parse=he,e.parseInline=de,e.parser=Le,e.setOptions=U,e.use=G,e.walkTokens=re,Object.defineProperty(e,"__esModule",{value:!0})})})();var d5=CW||exports;function dhe(s,e={},t={}){var i;const n=new ee;let o=!1;const r=lA(e),a=function(_){let b;try{b=ew(decodeURIComponent(_))}catch{}return b?(b=R7(b,v=>{if(s.uris&&s.uris[v])return Ie.revive(s.uris[v])}),encodeURIComponent(JSON.stringify(b))):_},l=function(_,b){const v=s.uris&&s.uris[_];let C=Ie.revive(v);return b?_.startsWith(Ke.data+":")?_:(C||(C=Ie.parse(_)),H3.asBrowserUri(C).toString(!0)):!C||Ie.parse(_).toString()===C.toString()?_:(C.query&&(C=C.with({query:a(C.query)})),C.toString())},c=new d5.Renderer;c.image=(_,b,v)=>{let C=[],w=[];return _&&({href:_,dimensions:C}=one(_),w.push(`src="${mv(_)}"`)),v&&w.push(`alt="${mv(v)}"`),b&&w.push(`title="${mv(b)}"`),C.length&&(w=w.concat(C)),"<img "+w.join(" ")+">"},c.link=(_,b,v)=>typeof _!="string"?"":(_===v&&(v=tk(v)),b=typeof b=="string"?mv(tk(b)):"",_=tk(_),_=_.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'"),`<a href="${_}" title="${b||_}">${v}</a>`),c.paragraph=_=>`<p>${_}</p>`;const d=[];if(e.codeBlockRenderer&&(c.code=(_,b)=>{const v=r6.nextId(),C=e.codeBlockRenderer(b!=null?b:"",_);return d.push(C.then(w=>[v,w])),`<div class="code" data-code="${v}">${wN(_)}</div>`}),e.actionHandler){const _=e.actionHandler.disposables.add(new Ft(r,"click")),b=e.actionHandler.disposables.add(new Ft(r,"auxclick"));e.actionHandler.disposables.add(ke.any(_.event,b.event)(v=>{const C=new Da(v);if(!C.leftButton&&!C.middleButton)return;let w=C.target;if(!(w.tagName!=="A"&&(w=w.parentElement,!w||w.tagName!=="A")))try{let S=w.dataset.href;S&&(s.baseUri&&(S=Uk(Ie.from(s.baseUri),S)),e.actionHandler.callback(S,C))}catch(S){$e(S)}finally{C.preventDefault()}}))}s.supportHtml||(t.sanitizer=_=>(s.isTrusted?_.match(/^(<span[^>]+>)|(<\/\s*span>)$/):void 0)?_:"",t.sanitize=!0,t.silent=!0),t.renderer=c;let u=(i=s.value)!==null&&i!==void 0?i:"";u.length>1e5&&(u=`${u.substr(0,1e5)}\u2026`),s.supportThemeIcons&&(u=tne(u));let h=d5.parse(u,t);s.supportThemeIcons&&(h=Bu(h).map(b=>typeof b=="string"?b:b.outerHTML).join(""));const g=new DOMParser().parseFromString(u5(s,h),"text/html");if(g.body.querySelectorAll("img").forEach(_=>{const b=_.getAttribute("src");if(b){let v=b;try{s.baseUri&&(v=Uk(Ie.from(s.baseUri),v))}catch{}_.src=l(v,!0)}}),g.body.querySelectorAll("a").forEach(_=>{const b=_.getAttribute("href");if(_.setAttribute("href",""),!b||/^data:|javascript:/i.test(b)||/^command:/i.test(b)&&!s.isTrusted||/^command:(\/\/\/)?_workbench\.downloadResource/i.test(b))_.replaceWith(..._.childNodes);else{let v=l(b,!1);s.baseUri&&(v=Uk(Ie.from(s.baseUri),b)),_.dataset.href=v}}),r.innerHTML=u5(s,g.body.innerHTML),d.length>0&&Promise.all(d).then(_=>{var b,v;if(o)return;const C=new Map(_),w=r.querySelectorAll("div[data-code]");for(const S of w){const D=C.get((b=S.dataset.code)!==null&&b!==void 0?b:"");D&&dd(S,D)}(v=e.asyncRenderCallback)===null||v===void 0||v.call(e)}),e.asyncRenderCallback)for(const _ of r.getElementsByTagName("img")){const b=n.add(Q(_,"load",()=>{b.dispose(),e.asyncRenderCallback()}))}return{element:r,dispose:()=>{o=!0,n.dispose()}}}function Uk(s,e){return/^\w[\w\d+.-]*:/.test(e)?e:s.path.endsWith("/")?JO(s,e).toString():JO(WS(s),e).toString()}function u5(s,e){const{config:t,allowedSchemes:i}=uhe(s);B3("uponSanitizeAttribute",(o,r)=>{if(r.attrName==="style"||r.attrName==="class"){if(o.tagName==="SPAN"){if(r.attrName==="style"){r.keepAttr=/^(color\:#[0-9a-fA-F]+;)?(background-color\:#[0-9a-fA-F]+;)?$/.test(r.attrValue);return}else if(r.attrName==="class"){r.keepAttr=/^codicon codicon-[a-z\-]+( codicon-modifier-[a-z\-]+)?$/.test(r.attrValue);return}}r.keepAttr=!1;return}});const n=IZ(i);try{return hZ(e,Object.assign(Object.assign({},t),{RETURN_TRUSTED_TYPE:!0}))}finally{W3("uponSanitizeAttribute"),n.dispose()}}function uhe(s){const e=[Ke.http,Ke.https,Ke.mailto,Ke.data,Ke.file,Ke.vscodeFileResource,Ke.vscodeRemote,Ke.vscodeRemoteResource];return s.isTrusted&&e.push(Ke.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:e}}var hhe=globalThis&&globalThis.__de
Line truncated
|
|
|
|
|
.monaco-editor .zone-widget ${o},
|
|
|
|
|
.markers-panel .marker-icon${o},
|
|
|
|
|
.text-search-provider-messages .providerMessage ${o},
|
|
|
|
|
.extensions-viewlet > .extensions ${o} {
|
|
|
|
|
color: ${t};
|
|
|
|
|
}
|
|
|
|
|
`)}const i=s.getColor(yX);if(i){const o=m.warning.cssSelector;e.addRule(`
|
|
|
|
|
.monaco-editor .zone-widget ${o},
|
|
|
|
|
.markers-panel .marker-icon${o},
|
|
|
|
|
.extensions-viewlet > .extensions ${o},
|
|
|
|
|
.extension-editor ${o},
|
|
|
|
|
.text-search-provider-messages .providerMessage ${o},
|
|
|
|
|
.preferences-editor ${o} {
|
|
|
|
|
color: ${i};
|
|
|
|
|
}
|
|
|
|
|
`)}const n=s.getColor(LX);if(n){const o=m.info.cssSelector;e.addRule(`
|
|
|
|
|
.monaco-editor .zone-widget ${o},
|
|
|
|
|
.markers-panel .marker-icon${o},
|
|
|
|
|
.extensions-viewlet > .extensions ${o},
|
|
|
|
|
.text-search-provider-messages .providerMessage ${o},
|
|
|
|
|
.extension-editor ${o} {
|
|
|
|
|
color: ${n};
|
|
|
|
|
}
|
|
|
|
|
`)}});var whe=globalThis&&globalThis.__decorate||function(s,e,t,i){var n=arguments.length,o=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(s,e,t,i);else for(var a=s.length-1;a>=0;a--)(r=s[a])&&(o=(n<3?r(o):n>3?r(e,t,o):r(e,t))||o);return n>3&&o&&Object.defineProperty(e,t,o),o},rf=globalThis&&globalThis.__param||function(s,e){return function(t,i){e(t,i,s)}};class She{constructor(e,t,i,n,o){this._openerService=n,this._labelService=o,this._lines=0,this._longestLineLength=0,this._relatedDiagnostics=new WeakMap,this._disposables=new ee,this._editor=t;const r=document.createElement("div");r.className="descriptioncontainer",this._messageBlock=document.createElement("div"),this._messageBlock.classList.add("message"),this._messageBlock.setAttribute("aria-live","assertive"),this._messageBlock.setAttribute("role","alert"),r.appendChild(this._messageBlock),this._relatedBlock=document.createElement("div"),r.appendChild(this._relatedBlock),this._disposables.add(Ki(this._relatedBlock,"click",a=>{a.preventDefault();const l=this._relatedDiagnostics.get(a.target);l&&i(l)})),this._scrollable=new $9(r,{horizontal:1,vertical:1,useShadows:!1,horizontalScrollbarSize:6,verticalScrollbarSize:6}),e.appendChild(this._scrollable.getDomNode()),this._disposables.add(this._scrollable.onScroll(a=>{r.style.left=`-${a.scrollLeft}px`,r.style.top=`-${a.scrollTop}px`})),this._disposables.add(this._scrollable)}dispose(){pt(this._disposables)}update(e){const{source:t,message:i,relatedInformation:n,code:o}=e;let r=((t==null?void 0:t.length)||0)+2;o&&(typeof o=="string"?r+=o.length:r+=o.value.length);const a=Wa(i);this._lines=a.length,this._longestLineLength=0;for(const h of a)this._longestLineLength=Math.max(h.length+r,this._longestLineLength);Hi(this._messageBlock),this._messageBlock.setAttribute("aria-label",this.getAriaLabel(e)),this._editor.applyFontInfo(this._messageBlock);let l=this._messageBlock;for(const h of a)l=document.createElement("div"),l.innerText=h,h===""&&(l.style.height=this._messageBlock.style.lineHeight),this._messageBlock.appendChild(l);if(t||o){const h=document.createElement("span");if(h.classList.add("details"),l.appendChild(h),t){const f=document.createElement("span");f.innerText=t,f.classList.add("source"),h.appendChild(f)}if(o)if(typeof o=="string"){const f=document.createElement("span");f.innerText=`(${o})`,f.classList.add("code"),h.appendChild(f)}else{this._codeLink=ie("a.code-link"),this._codeLink.setAttribute("href",`${o.target.toString()}`),this._codeLink.onclick=g=>{this._openerService.open(o.target,{allowCommands:!0}),g.preventDefault(),g.stopPropagation()};const f=X(this._codeLink,ie("span"));f.innerText=o.value,h.appendChild(this._codeLink)}}if(Hi(this._relatedBlock),this._editor.applyFontInfo(this._relatedBlock),In(n)){const h=this._relatedBlock.appendChild(document.createElement("div"));h.style.paddingTop=`${Math.floor(this._editor.getOption(61)*.66)}px`,this._lines+=1;for(const f of n){const g=document.createElement("div"),_=document.createElement("a");_.classList.add("filename"),_.innerText=`${this._labelService.getUriBasenameLabel(f.resource)}(${f.startLineNumber}, ${f.startColumn}): `,_.title=this._labelService.getUriLabel(f.resource),this._relatedDiagnostics.set(_,f);const b=document.createElement("span");b.innerText=f.message,g.appendChild(_),g.appendChild(b),this._lines+=1,h.appendChild(g)}}const c=this._editor.getOption(46),d=Math.ceil(c.typicalFullwidthCharacterWidth*this._longestLineLength*.75),u=c.lineHeight*this._lines;this._scrollable.setScrollDimensions({scrollWidth:d,scrollHeight:u})}layout(e,t){this._scrollable.getDomNode().style.height=`${e}px`,this._scrollable.getDomNode().style.width=`${t}px`,this._scrollable.setScrollDimensions({width:t,height:e})}getHeightInLines(){return Math.min(17,this._lines)}getAriaLabel(e){let t="";switch(e.severity){case si.Error:t=p("Error","Error");break;case si.Warning:t=p("Warning","Warning");break;case si.Info:t=p("Info","Info");break;case si.Hint:t=p("Hint","Hint");break}let i=p("marker aria","{0} at {1}. ",t,e.startLineNumber+":"+e.startColumn);const n=this._editor.getModel();return n&&e.startLineNumber<=n.getLineCount()&&e.startLineNumber>=1&&(i=`${n.getLineContent(e.startLineNumber)}, ${i}`),i}}let Jg=class kW extends bw{constructor(e,t,i,n,o,r,a){super(e,{showArrow:!0,showFrame:!0,isAccessible:!0,frameWidth:1},o),this._themeService=t,this._openerService=i,this._menuService=n,this._contextKeyService=r,this._labelService=a,this._callOnDispose=new ee,this._onDidSelectRelatedInformation=new W,this.onDidSelectRelatedInformation=this._onDidSelectRelatedInformation.event,this._severity=si.Warning,this._backgroundColor=$.white,this._applyTheme(t.getColorTheme()),this._callOnDispose.add(t.onDidColorThemeChange(this._applyTheme.bind(this))),this.create()}_applyTheme(e){this._backgroundColor=e.getColor(Dhe);let t=qI,i=yhe;this._severity===si.Warning?(t=xC,i=Lhe):this._se
Line truncated
|
|
|
|
|
`),parse:s=>s.split(`\r
|
|
|
|
|
`).filter(e=>!e.startsWith("#"))});function C5(s,e=vn){return Qee(s,e)?s.charAt(0).toUpperCase()+s.slice(1):s}var Uhe=globalThis&&globalThis.__decorate||function(s,e,t,i){var n=arguments.length,o=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(s,e,t,i);else for(var a=s.length-1;a>=0;a--)(r=s[a])&&(o=(n<3?r(o):n>3?r(e,t,o):r(e,t))||o);return n>3&&o&&Object.defineProperty(e,t,o),o},jhe=globalThis&&globalThis.__param||function(s,e){return function(t,i){e(t,i,s)}};Object.freeze({CURRENT_YEAR:!0,CURRENT_YEAR_SHORT:!0,CURRENT_MONTH:!0,CURRENT_DATE:!0,CURRENT_HOUR:!0,CURRENT_MINUTE:!0,CURRENT_SECOND:!0,CURRENT_DAY_NAME:!0,CURRENT_DAY_NAME_SHORT:!0,CURRENT_MONTH_NAME:!0,CURRENT_MONTH_NAME_SHORT:!0,CURRENT_SECONDS_UNIX:!0,SELECTION:!0,CLIPBOARD:!0,TM_SELECTED_TEXT:!0,TM_CURRENT_LINE:!0,TM_CURRENT_WORD:!0,TM_LINE_INDEX:!0,TM_LINE_NUMBER:!0,TM_FILENAME:!0,TM_FILENAME_BASE:!0,TM_DIRECTORY:!0,TM_FILEPATH:!0,CURSOR_INDEX:!0,CURSOR_NUMBER:!0,RELATIVE_FILEPATH:!0,BLOCK_COMMENT_START:!0,BLOCK_COMMENT_END:!0,LINE_COMMENT:!0,WORKSPACE_NAME:!0,WORKSPACE_FOLDER:!0,RANDOM:!0,RANDOM_HEX:!0,UUID:!0});class w5{constructor(e){this._delegates=e}resolve(e){for(const t of this._delegates){const i=t.resolve(e);if(i!==void 0)return i}}}class S5{constructor(e,t,i,n){this._model=e,this._selection=t,this._selectionIdx=i,this._overtypingCapturer=n}resolve(e){const{name:t}=e;if(t==="SELECTION"||t==="TM_SELECTED_TEXT"){let i=this._model.getValueInRange(this._selection)||void 0,n=this._selection.startLineNumber!==this._selection.endLineNumber;if(!i&&this._overtypingCapturer){const o=this._overtypingCapturer.getLastOvertypedInfo(this._selectionIdx);o&&(i=o.value,n=o.multiline)}if(i&&n&&e.snippet){const o=this._model.getLineContent(this._selection.startLineNumber),r=Mt(o,0,this._selection.startColumn-1);let a=r;e.snippet.walk(c=>c===e?!1:(c instanceof ps&&(a=Mt(Wa(c.value).pop())),!0));const l=Gu(a,r);i=i.replace(/(\r\n|\r|\n)(.*)/g,(c,d,u)=>`${d}${a.substr(l)}${u}`)}return i}else{if(t==="TM_CURRENT_LINE")return this._model.getLineContent(this._selection.positionLineNumber);if(t==="TM_CURRENT_WORD"){const i=this._model.getWordAtPosition({lineNumber:this._selection.positionLineNumber,column:this._selection.positionColumn});return i&&i.word||void 0}else{if(t==="TM_LINE_INDEX")return String(this._selection.positionLineNumber-1);if(t==="TM_LINE_NUMBER")return String(this._selection.positionLineNumber);if(t==="CURSOR_INDEX")return String(this._selectionIdx);if(t==="CURSOR_NUMBER")return String(this._selectionIdx+1)}}}}class y5{constructor(e,t){this._labelService=e,this._model=t}resolve(e){const{name:t}=e;if(t==="TM_FILENAME")return Nu(this._model.uri.fsPath);if(t==="TM_FILENAME_BASE"){const i=Nu(this._model.uri.fsPath),n=i.lastIndexOf(".");return n<=0?i:i.slice(0,n)}else{if(t==="TM_DIRECTORY")return j7(this._model.uri.fsPath)==="."?"":this._labelService.getUriLabel(WS(this._model.uri));if(t==="TM_FILEPATH")return this._labelService.getUriLabel(this._model.uri);if(t==="RELATIVE_FILEPATH")return this._labelService.getUriLabel(this._model.uri,{relative:!0,noPrefix:!0})}}}class L5{constructor(e,t,i,n){this._readClipboardText=e,this._selectionIdx=t,this._selectionCount=i,this._spread=n}resolve(e){if(e.name!=="CLIPBOARD")return;const t=this._readClipboardText();if(!!t){if(this._spread){const i=t.split(/\r\n|\n|\r/).filter(n=>!X7(n));if(i.length===this._selectionCount)return i[this._selectionIdx]}return t}}}let kw=class{constructor(e,t,i){this._model=e,this._selection=t,this._languageConfigurationService=i}resolve(e){const{name:t}=e,i=this._model.getLanguageIdAtPosition(this._selection.selectionStartLineNumber,this._selection.selectionStartColumn),n=this._languageConfigurationService.getLanguageConfiguration(i).comments;if(!!n){if(t==="LINE_COMMENT")return n.lineCommentToken||void 0;if(t==="BLOCK_COMMENT_START")return n.blockCommentStartToken||void 0;if(t==="BLOCK_COMMENT_END")return n.blockCommentEndToken||void 0}}};kw=Uhe([jhe(2,yi)],kw);class Nr{constructor(){this._date=new Date}resolve(e){const{name:t}=e;if(t==="CURRENT_YEAR")return String(this._date.getFullYear());if(t==="CURRENT_YEAR_SHORT")return String(this._date.getFullYear()).slice(-2);if(t==="CURRENT_MONTH")return String(this._date.getMonth().valueOf()+1).padStart(2,"0");if(t==="CURRENT_DATE")return String(this._date.getDate().valueOf()).padStart(2,"0");if(t==="CURRENT_HOUR")return String(this._date.getHours().valueOf()).padStart(2,"0");if(t==="CURRENT_MINUTE")return String(this._date.getMinutes().valueOf()).padStart(2,"0");if(t==="CURRENT_SECOND")return String(this._date.getSeconds().valueOf()).padStart(2,"0");if(t==="CURRENT_DAY_NAME")return Nr.dayNames[this._date.getDay()];if(t==="CURRENT_DAY_NAME_SHORT")return Nr.dayNamesShort[this._date.getDay()];if(t==="CURRENT_MONTH_NAME")return Nr.monthNames[this._date.getMonth()];if(t==="CURRENT_MONTH_NAME_SHORT")return Nr.monthNamesShort[this._date.getMonth()];
Line truncated
|
|
|
|
|
`),this._selectionId=t.trackSelection(i);return}i.startLineNumber<i.endLineNumber&&i.endColumn===1&&(this._moveEndPositionDown=!0,i=i.setEndPosition(i.endLineNumber-1,e.getLineMaxColumn(i.endLineNumber-1)));const n=_l._gatherPreflightData(this._type,this._insertSpace,e,i.startLineNumber,i.endLineNumber,this._ignoreEmptyLines,this._ignoreFirstLine,this.languageConfigurationService);return n.supported?this._executeLineComments(e,t,n,i):this._executeBlockComment(e,t,i)}computeCursorState(e,t){let i=t.getTrackedSelection(this._selectionId);return this._moveEndPositionDown&&(i=i.setEndPosition(i.endLineNumber+1,1)),new le(i.selectionStartLineNumber,i.selectionStartColumn+this._deltaColumn,i.positionLineNumber,i.positionColumn+this._deltaColumn)}static _createRemoveLineCommentsOperations(e,t){const i=[];for(let n=0,o=e.length;n<o;n++){const r=e[n];r.ignore||i.push(ti.delete(new L(t+n,r.commentStrOffset+1,t+n,r.commentStrOffset+r.commentStrLength+1)))}return i}_createAddLineCommentsOperations(e,t){const i=[],n=this._insertSpace?" ":"";for(let o=0,r=e.length;o<r;o++){const a=e[o];a.ignore||i.push(ti.insert(new H(t+o,a.commentStrOffset+1),a.commentStr+n))}return i}static nextVisibleColumn(e,t,i,n){return i?e+(t-e%t):e+n}static _normalizeInsertionPoint(e,t,i,n){let o=1073741824,r,a;for(let l=0,c=t.length;l<c;l++){if(t[l].ignore)continue;const d=e.getLineContent(i+l);let u=0;for(let h=0,f=t[l].commentStrOffset;u<o&&h<f;h++)u=_l.nextVisibleColumn(u,n,d.charCodeAt(h)===9,1);u<o&&(o=u)}o=Math.floor(o/n)*n;for(let l=0,c=t.length;l<c;l++){if(t[l].ignore)continue;const d=e.getLineContent(i+l);let u=0;for(r=0,a=t[l].commentStrOffset;u<o&&r<a;r++)u=_l.nextVisibleColumn(u,n,d.charCodeAt(r)===9,1);u>o?t[l].commentStrOffset=r-1:t[l].commentStrOffset=r}}}class aM extends me{constructor(e,t){super(t),this._type=e}run(e,t){const i=e.get(yi);if(!t.hasModel())return;const n=t.getModel(),o=[],r=n.getOptions(),a=t.getOption(19),l=t.getSelections().map((d,u)=>({selection:d,index:u,ignoreFirstLine:!1}));l.sort((d,u)=>L.compareRangesUsingStarts(d.selection,u.selection));let c=l[0];for(let d=1;d<l.length;d++){const u=l[d];c.selection.endLineNumber===u.selection.startLineNumber&&(c.index<u.index?u.ignoreFirstLine=!0:(c.ignoreFirstLine=!0,c=u))}for(const d of l)o.push(new _l(i,d.selection,r.tabSize,this._type,a.insertSpace,a.ignoreEmptyLines,d.ignoreFirstLine));t.pushUndoStop(),t.executeCommands(this.id,o),t.pushUndoStop()}}class Yhe extends aM{constructor(){super(0,{id:"editor.action.commentLine",label:p("comment.line","Toggle Line Comment"),alias:"Toggle Line Comment",precondition:N.writable,kbOpts:{kbExpr:N.editorTextFocus,primary:2133,weight:100},menuOpts:{menuId:M.MenubarEditMenu,group:"5_insert",title:p({key:"miToggleLineComment",comment:["&& denotes a mnemonic"]},"&&Toggle Line Comment"),order:1}})}}class Xhe extends aM{constructor(){super(1,{id:"editor.action.addCommentLine",label:p("comment.line.add","Add Line Comment"),alias:"Add Line Comment",precondition:N.writable,kbOpts:{kbExpr:N.editorTextFocus,primary:zi(2089,2081),weight:100}})}}class Qhe extends aM{constructor(){super(2,{id:"editor.action.removeCommentLine",label:p("comment.line.remove","Remove Line Comment"),alias:"Remove Line Comment",precondition:N.writable,kbOpts:{kbExpr:N.editorTextFocus,primary:zi(2089,2099),weight:100}})}}class Jhe extends me{constructor(){super({id:"editor.action.blockComment",label:p("comment.block","Toggle Block Comment"),alias:"Toggle Block Comment",precondition:N.writable,kbOpts:{kbExpr:N.editorTextFocus,primary:1567,linux:{primary:3103},weight:100},menuOpts:{menuId:M.MenubarEditMenu,group:"5_insert",title:p({key:"miToggleBlockComment",comment:["&& denotes a mnemonic"]},"Toggle &&Block Comment"),order:2}})}run(e,t){const i=e.get(yi);if(!t.hasModel())return;const n=t.getOption(19),o=[],r=t.getSelections();for(const a of r)o.push(new Hc(a,n.insertSpace,i));t.pushUndoStop(),t.executeCommands(this.id,o),t.pushUndoStop()}}oe(Yhe);oe(Xhe);oe(Qhe);oe(Jhe);var efe=globalThis&&globalThis.__decorate||function(s,e,t,i){var n=arguments.length,o=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(s,e,t,i);else for(var a=s.length-1;a>=0;a--)(r=s[a])&&(o=(n<3?r(o):n>3?r(e,t,o):r(e,t))||o);return n>3&&o&&Object.defineProperty(e,t,o),o},af=globalThis&&globalThis.__param||function(s,e){return function(t,i){e(t,i,s)}};let ep=class RW{constructor(e,t,i,n,o,r,a){this._contextMenuService=t,this._contextViewService=i,this._contextKeyService=n,this._keybindingService=o,this._menuService=r,this._configurationService=a,this._toDispose=new ee,this._contextMenuIsBeingShownCount=0,this._editor=e,this._toDispose.add(this._editor.onContextMenu(l=>this._onContextMenu(l))),this._toDispose.add(this._editor.onMouseWheel(l=>{if(this._contextMenuIsBeingShownCount>0){const c=this._contextViewService.getContextViewElement(),d=l.srcElement;d.shadowRoot&&Qu(c)===d.shadowRoot||this._contextViewSer
Line truncated
|
|
|
|
|
`,i+1);break;case 116:t.emitUnchanged(i-1),t.emitStatic(" ",i+1);break;case 117:case 85:case 108:case 76:t.emitUnchanged(i-1),t.emitStatic("",i+1),e.push(String.fromCharCode(r));break}continue}if(o===36){if(i++,i>=n)break;const r=s.charCodeAt(i);if(r===36){t.emitUnchanged(i-1),t.emitStatic("$",i+1);continue}if(r===48||r===38){t.emitUnchanged(i-1),t.emitMatchIndex(0,i+1,e),e.length=0;continue}if(49<=r&&r<=57){let a=r-48;if(i+1<n){const l=s.charCodeAt(i+1);if(48<=l&&l<=57){i++,a=a*10+(l-48),t.emitUnchanged(i-2),t.emitMatchIndex(a,i+1,e),e.length=0;continue}}t.emitUnchanged(i-1),t.emitMatchIndex(a,i+1,e),e.length=0;continue}}}return t.finalize()}const Od=new pe("findWidgetVisible",!1);Od.toNegated();const xy=new pe("findInputFocussed",!1),lM=new pe("replaceInputFocussed",!1),Vv={primary:545,mac:{primary:2593}},Hv={primary:565,mac:{primary:2613}},zv={primary:560,mac:{primary:2608}},$v={primary:554,mac:{primary:2602}},Uv={primary:558,mac:{primary:2606}},Ut={StartFindAction:"actions.find",StartFindWithSelection:"actions.findWithSelection",StartFindWithArgs:"editor.actions.findWithArgs",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"},zc=19999,cfe=240;class a_{constructor(e,t){this._toDispose=new ee,this._editor=e,this._state=t,this._isDisposed=!1,this._startSearchingTimer=new ho,this._decorations=new Bn(e),this._toDispose.add(this._decorations),this._updateDecorationsScheduler=new At(()=>this.research(!1),100),this._toDispose.add(this._updateDecorationsScheduler),this._toDispose.add(this._editor.onDidChangeCursorPosition(i=>{(i.reason===3||i.reason===5||i.reason===6)&&this._decorations.setStartPosition(this._editor.getPosition())})),this._ignoreModelContentChanged=!1,this._toDispose.add(this._editor.onDidChangeModelContent(i=>{this._ignoreModelContentChanged||(i.isFlush&&this._decorations.reset(),this._decorations.setStartPosition(this._editor.getPosition()),this._updateDecorationsScheduler.schedule())})),this._toDispose.add(this._state.onFindReplaceStateChange(i=>this._onStateChanged(i))),this.research(!1,this._state.searchScope)}dispose(){this._isDisposed=!0,pt(this._startSearchingTimer),this._toDispose.dispose()}_onStateChanged(e){this._isDisposed||!this._editor.hasModel()||(e.searchString||e.isReplaceRevealed||e.isRegex||e.wholeWord||e.matchCase||e.searchScope)&&(this._editor.getModel().isTooLargeForSyncing()?(this._startSearchingTimer.cancel(),this._startSearchingTimer.setIfNotSet(()=>{e.searchScope?this.research(e.moveCursor,this._state.searchScope):this.research(e.moveCursor)},cfe)):e.searchScope?this.research(e.moveCursor,this._state.searchScope):this.research(e.moveCursor))}static _getSearchRange(e,t){return t||e.getFullModelRange()}research(e,t){let i=null;typeof t<"u"?t!==null&&(Array.isArray(t)?i=t:i=[t]):i=this._decorations.getFindScopes(),i!==null&&(i=i.map(a=>{if(a.startLineNumber!==a.endLineNumber){let l=a.endLineNumber;return a.endColumn===1&&(l=l-1),new L(a.startLineNumber,1,l,this._editor.getModel().getLineMaxColumn(l))}return a}));const n=this._findMatches(i,!1,zc);this._decorations.set(n,i);const o=this._editor.getSelection();let r=this._decorations.getCurrentMatchesPosition(o);if(r===0&&n.length>0){const a=k7(n.map(l=>l.range),l=>L.compareRangesUsingStarts(l,o)>=0);r=a>0?a-1+1:r}this._state.changeMatchInfo(r,this._decorations.getCount(),void 0),e&&this._editor.getOption(37).cursorMoveOnType&&this._moveToNextMatch(this._decorations.getStartPosition())}_hasMatches(){return this._state.matchesCount>0}_cannotFind(){if(!this._hasMatches()){const e=this._decorations.getFindScope();return e&&this._editor.revealRangeInCenterIfOutsideViewport(e,0),!0}return!1}_setCurrentFindMatch(e){const t=this._decorations.setCurrentFindMatch(e);this._state.changeMatchInfo(t,this._decorations.getCount(),e),this._editor.setSelection(e),this._editor.revealRangeInCenterIfOutsideViewport(e,0)}_prevSearchPosition(e){const t=this._state.isRegex&&(this._state.searchString.indexOf("^")>=0||this._state.searchString.indexOf("$")>=0);let{lineNumber:i,column:n}=e;const o=this._editor.getModel();return t||n===1?(i===1?i=o.getLineCount():i--,n=o.getLineMaxColumn(i)):n--,new H(i,n)}_moveToPrevMatch(e,t=!1){if(!this._state.canNavigateBack()){const d=this._decorations.matchAfterPosition(e);d&&this._setCurrentFindMatch(d);return}if(this._d
Line truncated
|
|
|
|
|
`),e.preventDefault();return}if(e.equals(2)){this._isReplaceVisible?this._replaceInput.focus():this._findInput.focusOnCaseSensitive(),e.preventDefault();return}if(e.equals(2066)){this._codeEditor.focus(),e.preventDefault();return}if(e.equals(16))return B5(e,this._findInput.getValue(),this._findInput.domNode.querySelector("textarea"));if(e.equals(18))return W5(e,this._findInput.getValue(),this._findInput.domNode.querySelector("textarea"))}_onReplaceInputKeyDown(e){if(e.equals(F5|3))if(this._keybindingService.dispatchEvent(e,e.target)){e.preventDefault();return}else{vn&&Rr&&!this._ctrlEnterReplaceAllWarningPrompted&&(this._notificationService.info(p("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(P5,!0,0,0)),this._replaceInput.inputBox.insertAtCursor(`
|
|
|
|
|
`),e.preventDefault();return}if(e.equals(2)){this._findInput.focusOnCaseSensitive(),e.preventDefault();return}if(e.equals(1026)){this._findInput.focus(),e.preventDefault();return}if(e.equals(2066)){this._codeEditor.focus(),e.preventDefault();return}if(e.equals(16))return B5(e,this._replaceInput.inputBox.value,this._replaceInput.inputBox.element.querySelector("textarea"));if(e.equals(18))return W5(e,this._replaceInput.inputBox.value,this._replaceInput.inputBox.element.querySelector("textarea"))}getVerticalSashLeft(e){return 0}_keybindingLabelFor(e){const t=this._keybindingService.lookupKeybinding(e);return t?` (${t.getLabel()})`:""}_buildDomNode(){this._findInput=this._register(new VI(null,this._contextViewProvider,{width:Nfe,label:_fe,placeholder:bfe,appendCaseSensitiveLabel:this._keybindingLabelFor(Ut.ToggleCaseSensitiveCommand),appendWholeWordsLabel:this._keybindingLabelFor(Ut.ToggleWholeWordCommand),appendRegexLabel:this._keybindingLabelFor(Ut.ToggleRegexCommand),validation:l=>{if(l.length===0||!this._findInput.getRegex())return null;try{return new RegExp(l,"gu"),null}catch(c){return{content:c.message}}},flexibleHeight:!0,flexibleWidth:!0,flexibleMaxHeight:118,showHistoryHint:()=>A5(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(l=>this._onFindInputKeyDown(l))),this._register(this._findInput.inputBox.onDidChange(()=>{this._ignoreChangeEvent||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(l=>{l.equals(1026)&&this._isReplaceVisible&&(this._replaceInput.focus(),l.preventDefault())})),this._register(this._findInput.onRegexKeyDown(l=>{l.equals(2)&&this._isReplaceVisible&&(this._replaceInput.focusOnPreserve(),l.preventDefault())})),this._register(this._findInput.inputBox.onDidHeightChange(l=>{this._tryUpdateHeight()&&this._showViewZone()})),Mn&&this._register(this._findInput.onMouseDown(l=>this._onFindInputMouseDown(l))),this._matchesCount=document.createElement("div"),this._matchesCount.className="matchesCount",this._updateMatchesCount(),this._prevBtn=this._register(new cf({label:vfe+this._keybindingLabelFor(Ut.PreviousMatchFindAction),icon:pfe,onTrigger:()=>{this._codeEditor.getAction(Ut.PreviousMatchFindAction).run().then(void 0,$e)}})),this._nextBtn=this._register(new cf({label:Cfe+this._keybindingLabelFor(Ut.NextMatchFindAction),icon:mfe,onTrigger:()=>{this._codeEditor.getAction(Ut.NextMatchFindAction).run().then(void 0,$e)}}));const i=document.createElement("div");i.className="find-part",i.appendChild(this._findInput.domNode);const n=document.createElement("div");n.className="find-actions",i.appendChild(n),n.appendChild(this._matchesCount),n.appendChild(this._prevBtn.domNode),n.appendChild(this._nextBtn.domNode),this._toggleSelectionFind=this._register(new d0({icon:hfe,title:wfe+this._keybindingLabelFor(Ut.ToggleSearchScopeCommand),isChecked:!1})),this._register(this._toggleSelectionFind.onChange(()=>{if(this._toggleSelectionFind.checked){if(this._codeEditor.hasModel()){const l=this._codeEditor.getSelections();l.map(c=>(c.endColumn===1&&c.endLineNumber>c.startLineNumber&&(c=c.setEndPosition(c.endLineNumber-1,this._codeEditor.getModel().getLineMaxColumn(c.endLineNumber-1))),c.isEmpty()?null:c)).filter(c=>!!c),l.length&&this._state.change({searchScope:l},!0)}}else this._state.change({searchScope:null},!0)})),n.appendChild(this._toggleSelectionFind.domNode),this._closeBtn=this._register(new cf({label:Sfe+this._keybindingLabelFor(Ut.CloseFindWidgetCommand),icon:M8,onTrigger:()=>{this._state.change({isRevealed:!1,searchScope:null},!1)},onKeyDown:l=>{l.equals(2)&&this._isReplaceVisible&&(this._replaceBtn.isEnabled()?this._replaceBtn.focus():this._codeEditor.focus(),l.preventDefault())}})),n.appendChild(this._closeBtn.domNode),this._replaceInput=this._register(new HI(null,void 0,{label:yfe,placeholder:Lfe,appendPreserveCaseLabel:this._keybindingLabelFor(Ut.TogglePreserveCaseCommand),history:[],flexibleHeight:!0,flexibleWidth:!0,flexibleMaxHeight:118,showHistoryHint:()=>A5(this._keybindingService)},this._contextKeyService,!0)),this._replaceInput.setPreserveCase(!!this._state.preserveCase),this._register(this._replaceInput.onKeyDown(l=>this._onReplaceInputKeyDown(l))),this._register(this._replaceInput.inputBox.onDidChange(()=>{this._state.change({replaceString:this._replaceInput.inputBox.value},!1)})),this._register(this._replaceInput.inputBox.onDidHeightChange(l=>{this._isReplaceVisible&&this._tryUpdateHeight()&&this._showViewZone()})),this._register(this._replaceInput.onDidOptionChange(()=>{this._state.change({preserveCase:this._r
Line truncated
|
|
|
|
|
.monaco-editor .find-widget .button:not(.disabled):hover,
|
|
|
|
|
.monaco-editor .find-widget .codicon-find-selection:hover {
|
|
|
|
|
background-color: ${h} !important;
|
|
|
|
|
}
|
|
|
|
|
`);const f=s.getColor(Eo);f&&e.addRule(`.monaco-editor .find-widget .monaco-inputbox.synthetic-focus { outline-color: ${f}; }`)});var FW=globalThis&&globalThis.__decorate||function(s,e,t,i){var n=arguments.length,o=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(s,e,t,i);else for(var a=s.length-1;a>=0;a--)(r=s[a])&&(o=(n<3?r(o):n>3?r(e,t,o):r(e,t))||o);return n>3&&o&&Object.defineProperty(e,t,o),o},da=globalThis&&globalThis.__param||function(s,e){return function(t,i){e(t,i,s)}},bh=globalThis&&globalThis.__awaiter||function(s,e,t,i){function n(o){return o instanceof t?o:new t(function(r){r(o)})}return new(t||(t=Promise))(function(o,r){function a(d){try{c(i.next(d))}catch(u){r(u)}}function l(d){try{c(i.throw(d))}catch(u){r(u)}}function c(d){d.done?o(d.value):n(d.value).then(a,l)}c((i=i.apply(s,e||[])).next())})};const Mfe=524288;function JI(s,e="single",t=!1){if(!s.hasModel())return null;const i=s.getSelection();if(e==="single"&&i.startLineNumber===i.endLineNumber||e==="multiple"){if(i.isEmpty()){const n=s.getConfiguredWordAtPosition(i.getStartPosition());if(n&&t===!1)return n.word}else if(s.getModel().getValueLengthInRange(i)<Mfe)return s.getModel().getValueInRange(i)}return null}let Hs=class BW extends q{constructor(e,t,i,n){super(),this._editor=e,this._findWidgetVisible=Od.bindTo(t),this._contextKeyService=t,this._storageService=i,this._clipboardService=n,this._updateHistoryDelayer=new Va(500),this._state=this._register(new dfe),this.loadQueryState(),this._register(this._state.onFindReplaceStateChange(o=>this._onStateChanged(o))),this._model=null,this._register(this._editor.onDidChangeModel(()=>{const o=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),o&&this._start({forceRevealReplace:!1,seedSearchStringFromSelection:"none",seedSearchStringFromNonEmptySelection:!1,seedSearchStringFromGlobalClipboard:!1,shouldFocus:0,shouldAnimate:!1,updateSearchScope:!1,loop:this._editor.getOption(37).loop})}))}get editor(){return this._editor}static get(e){return e.getContribution(BW.ID)}dispose(){this.disposeModel(),super.dispose()}disposeModel(){this._model&&(this._model.dispose(),this._model=null)}_onStateChanged(e){this.saveQueryState(e),e.isRevealed&&(this._state.isRevealed?this._findWidgetVisible.set(!0):(this._findWidgetVisible.reset(),this.disposeModel())),e.searchString&&this.setGlobalBufferTerm(this._state.searchString)}saveQueryState(e){e.isRegex&&this._storageService.store("editor.isRegex",this._state.actualIsRegex,1,0),e.wholeWord&&this._storageService.store("editor.wholeWord",this._state.actualWholeWord,1,0),e.matchCase&&this._storageService.store("editor.matchCase",this._state.actualMatchCase,1,0),e.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!!xy.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()){const e=this._editor.getSelections();e.map(t=>(t.endColumn===1&&t.endLineNumber>t.startLineNumber&&(t=t.setEndPosition(t.endLineNumber-1,this._editor.getModel().getLineMaxColumn(t.endLineNumber-1))),t.isEmpty()?null:t)).filter(t=>!!t),e.length&&this._state.change({searchScope:e},!0)}}setSearchString(e){this._state.isRegex&&(e=ao(e)),this._state.change({searchString:e},!1)}highlightFindOptions(e=!1){}_start(e,t){return bh(this,void 0,void 0,function*(){if(this.disposeModel(),!this._editor.hasModel())return;const i=Object.assign(Object.assign({},t),{isRevealed:!0});if(e.seedSearchStringFromSelection==
Line truncated
|
|
|
|
|
The flag will not be saved for the future.
|
|
|
|
|
0: Do Nothing
|
|
|
|
|
1: True
|
|
|
|
|
2: False`)},wholeWord:{type:"boolean"},wholeWordOverride:{type:"number",description:p("actions.find.wholeWordOverride",`Overrides "Match Whole Word" flag.
|
|
|
|
|
The flag will not be saved for the future.
|
|
|
|
|
0: Do Nothing
|
|
|
|
|
1: True
|
|
|
|
|
2: False`)},matchCase:{type:"boolean"},matchCaseOverride:{type:"number",description:p("actions.find.matchCaseOverride",`Overrides "Math Case" flag.
|
|
|
|
|
The flag will not be saved for the future.
|
|
|
|
|
0: Do Nothing
|
|
|
|
|
1: True
|
|
|
|
|
2: False`)},preserveCase:{type:"boolean"},preserveCaseOverride:{type:"number",description:p("actions.find.preserveCaseOverride",`Overrides "Preserve Case" flag.
|
|
|
|
|
The flag will not be saved for the future.
|
|
|
|
|
0: Do Nothing
|
|
|
|
|
1: True
|
|
|
|
|
2: False`)},findInSelection:{type:"boolean"}}}}]};class Pfe extends me{constructor(){super({id:Ut.StartFindWithArgs,label:p("startFindWithArgsAction","Find With Arguments"),alias:"Find With Arguments",precondition:void 0,kbOpts:{kbExpr:null,primary:0,weight:100},description:Ofe})}run(e,t,i){return bh(this,void 0,void 0,function*(){const n=Hs.get(t);if(n){const o=i?{searchString:i.searchString,replaceString:i.replaceString,isReplaceRevealed:i.replaceString!==void 0,isRegex:i.isRegex,wholeWord:i.matchWholeWord,matchCase:i.isCaseSensitive,preserveCase:i.preserveCase}:{};yield n.start({forceRevealReplace:!1,seedSearchStringFromSelection:n.getState().searchString.length===0&&t.getOption(37).seedSearchStringFromSelection!=="never"?"single":"none",seedSearchStringFromNonEmptySelection:t.getOption(37).seedSearchStringFromSelection==="selection",seedSearchStringFromGlobalClipboard:!0,shouldFocus:1,shouldAnimate:!0,updateSearchScope:(i==null?void 0:i.findInSelection)||!1,loop:t.getOption(37).loop},o),n.setGlobalBufferTerm(n.getState().searchString)}})}}class Ffe extends me{constructor(){super({id:Ut.StartFindWithSelection,label:p("startFindWithSelectionAction","Find With Selection"),alias:"Find With Selection",precondition:void 0,kbOpts:{kbExpr:null,primary:0,mac:{primary:2083},weight:100}})}run(e,t){return bh(this,void 0,void 0,function*(){const i=Hs.get(t);i&&(yield i.start({forceRevealReplace:!1,seedSearchStringFromSelection:"multiple",seedSearchStringFromNonEmptySelection:!1,seedSearchStringFromGlobalClipboard:!1,shouldFocus:0,shouldAnimate:!0,updateSearchScope:!1,loop:t.getOption(37).loop}),i.setGlobalBufferTerm(i.getState().searchString))})}}class WW extends me{run(e,t){return bh(this,void 0,void 0,function*(){const i=Hs.get(t);i&&!this._run(i)&&(yield i.start({forceRevealReplace:!1,seedSearchStringFromSelection:i.getState().searchString.length===0&&t.getOption(37).seedSearchStringFromSelection!=="never"?"single":"none",seedSearchStringFromNonEmptySelection:t.getOption(37).seedSearchStringFromSelection==="selection",seedSearchStringFromGlobalClipboard:!0,shouldFocus:0,shouldAnimate:!0,updateSearchScope:!1,loop:t.getOption(37).loop}),this._run(i))})}}class Bfe extends WW{constructor(){super({id:Ut.NextMatchFindAction,label:p("findNextMatchAction","Find Next"),alias:"Find Next",precondition:void 0,kbOpts:[{kbExpr:N.focus,primary:61,mac:{primary:2085,secondary:[61]},weight:100},{kbExpr:ce.and(N.focus,xy),primary:3,weight:100}]})}_run(e){return e.moveToNextMatch()?(e.editor.pushUndoStop(),!0):!1}}class Wfe extends WW{constructor(){super({id:Ut.PreviousMatchFindAction,label:p("findPreviousMatchAction","Find Previous"),alias:"Find Previous",precondition:void 0,kbOpts:[{kbExpr:N.focus,primary:1085,mac:{primary:3109,secondary:[1085]},weight:100},{kbExpr:ce.and(N.focus,xy),primary:1027,weight:100}]})}_run(e){return e.moveToPrevMatch()}}class VW extends me{run(e,t){return bh(this,void 0,void 0,function*(){const i=Hs.get(t);if(!i)return;const n=t.getOption(37).seedSearchStringFromSelection==="selection";let o=null;t.getOption(37).seedSearchStringFromSelection!=="never"&&(o=JI(t,"single",n)),o&&i.setSearchString(o),this._run(i)||(yield i.start({forceRevealReplace:!1,seedSearchStringFromSelection:t.getOption(37).seedSearchStringFromSelection!=="never"?"single":"none",seedSearchStringFromNonEmptySelection:n,seedSearchStringFromGlobalClipboard:!1,shouldFocus:0,shouldAnimate:!0,updateSearchScope:!1,loop:t.getOption(37).loop}),this._run(i))})}}class Vfe extends VW{constructor(){super({id:Ut.NextSelectionMatchFindAction,label:p("nextSelectionMatchFindAction","Find Next Selection"),alias:"Find Next Selection",precondition:void 0,kbOpts:{kbExpr:N.focus,primary:2109,weight:100}})}_run(e){return e.moveToNextMatch()}}class Hfe extends VW{constructor(){super({id:Ut.PreviousSelectionMatchFindAction,label:p("previousSelectionMatchFindAction","Find Previous Selection"),alias:"Find Previous Selection",precondition:void 0,kbOpts:{kbExpr:N.focus,primary:3133,weight:100}})}_run(e){return e.moveToPrevMatch()}}const zfe=r9(new o9({id:Ut.StartFindReplaceAction,label:p("startReplace","Replace"),alias:"Replace",precondition:ce.or(N.focus,ce.has("editorIsOpen")),kbOpts:{kbExpr:null,primary:2086,mac:{primary:2596},weight:100},menuOpts:{menuId:M.MenubarEditMenu,group:"3_find",title:p({key:"miReplace",comment:["&& denotes a mnemonic"]},"&&Replace"),order:2}}));zfe.addImplementation(0,(s,e,t)=>{if(!e.hasModel()||e.getOption(83))return!1;const i=Hs.get(e);if(!i)return!1;const n=e.getSelection(),o=i.isFindInputFocused(),r=!n.isEmpty()&&n.startLineNumber===n.endLineNumber&&e.getOption(37).seedSearchStringFromSelection!=="never"&&!o,a=o||r?2:1;return i.start({forceRevealReplace:!0,seedSearchStringFromSelection:r?"single":"none",seedSearchStringFromNonEmptySelection:e.getOption(37).seedSearchStringFromSelection==="selection",seedSearchStringFromGlobalClipboard:e.getOption(37).seedSearchStringFromSelection!=="never",shouldFocus:a,shouldAnimate:!0,updateSea
Line truncated
|
|
|
|
|
* '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': Array of 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:jW,schema:{type:"object",properties:{levels:{type:"number",default:1},direction:{type:"string",enum:["up","down"],default:"down"},selectionLines:{type:"array",items:{type:"number"}}}}}]}})}invoke(e,t,i,n){const o=n&&n.levels||1,r=this.getLineNumbers(n,i);n&&n.direction==="up"?HW(t,!1,o,r):Rp(t,!1,o,r)}}class hge extends qn{constructor(){super({id:"editor.unfoldRecursively",label:p("unFoldRecursivelyAction.label","Unfold Recursively"),alias:"Unfold Recursively",precondition:On,kbOpts:{kbExpr:N.editorTextFocus,primary:zi(2089,2137),weight:100}})}invoke(e,t,i,n){Rp(t,!1,Number.MAX_VALUE,this.getSelectedLines(i))}}class fge extends qn{constructor(){super({id:"editor.fold",label:p("foldAction.label","Fold"),alias:"Fold",precondition:On,kbOpts:{kbExpr:N.editorTextFocus,primary:3159,mac:{primary:2647},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': Array of 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:jW,schema:{type:"object",properties:{levels:{type:"number"},direction:{type:"string",enum:["up","down"]},selectionLines:{type:"array",items:{type:"number"}}}}}]}})}invoke(e,t,i,n){const o=this.getLineNumbers(n,i),r=n&&n.levels,a=n&&n.direction;typeof r!="number"&&typeof a!="string"?Kfe(t,!0,o):a==="up"?HW(t,!0,r||1,o):Rp(t,!0,r||1,o)}}class gge extends qn{constructor(){super({id:"editor.toggleFold",label:p("toggleFoldAction.label","Toggle Fold"),alias:"Toggle Fold",precondition:On,kbOpts:{kbExpr:N.editorTextFocus,primary:zi(2089,2090),weight:100}})}invoke(e,t,i){const n=this.getSelectedLines(i);jfe(t,1,n)}}class pge extends qn{constructor(){super({id:"editor.foldRecursively",label:p("foldRecursivelyAction.label","Fold Recursively"),alias:"Fold Recursively",precondition:On,kbOpts:{kbExpr:N.editorTextFocus,primary:zi(2089,2135),weight:100}})}invoke(e,t,i){const n=this.getSelectedLines(i);Rp(t,!0,Number.MAX_VALUE,n)}}class mge extends qn{constructor(){super({id:"editor.foldAllBlockComments",label:p("foldAllBlockComments.label","Fold All Block Comments"),alias:"Fold All Block Comments",precondition:On,kbOpts:{kbExpr:N.editorTextFocus,primary:zi(2089,2133),weight:100}})}invoke(e,t,i,n,o){if(t.regions.hasTypes())dM(t,Wr.Comment.value,!0);else{const r=i.getModel();if(!r)return;const a=o.getLanguageConfiguration(r.getLanguageId()).comments;if(a&&a.blockCommentStartToken){const l=new RegExp("^\\s*"+ao(a.blockCommentStartToken));cM(t,l,!0)}}}}class _ge extends qn{constructor(){super({id:"editor.foldAllMarkerRegions",label:p("foldAllMarkerRegions.label","Fold All Regions"),alias:"Fold All Regions",precondition:On,kbOpts:{kbExpr:N.editorTextFocus,primary:zi(2089,2077),weight:100}})}invoke(e,t,i,n,o){if(t.regions.hasTypes())dM(t,Wr.Region.value,!0);else{const r=i.getModel();if(!r)return;const a=o.getLanguageConfiguration(r.getLanguageId()).foldingRules;if(a&&a.markers&&a.markers.start){const l=new RegExp(a.markers.start);cM(t,l,!0)}}}}class bge extends qn{constructor(){super({id:"editor.unfoldAllMarkerRegions",label:p("unfoldAllMarkerRegions.label","Unfold All Regions"),alias:"Unfold All Regions",precondition:On,kbOpts:{kbExpr:N.editorTextFocus,primary:zi(2089,2078),weight:100}})}invoke(e,t,i,n,o){if(t.regions.hasTypes())dM(t,Wr.Region.value,!1);else{const r=i.getModel();if(!r)return;const a=o.getLanguageConfiguration(r.getLanguageId()).foldingRules;if(a&&a.markers&&a.markers.start){const l=new RegExp(a.markers.start);cM(t,l,!1)}}}}class vge extends qn{constructor(){super({id:"editor.foldAllExcept",label:p("foldAllExcept.label","Fold All Regions Except Selected"),alias:"Fold All Regions Except Selected",precondition:On,kbOpts:{kbExpr:N.editorTextFocus,primary:zi(2089,2131),weight:100}})}invoke(e,t,i){const n=this.getSelectedLines(i);zW(t,!0,n)}}class Cge extends qn{constructor(){super({id:"editor.unfoldAllExcept",label:p("unfoldAllExcept.label","Unfold All Regions Except Selected"),alias:"Unfold All Regions Except Selected",precondition:On,kbOpts:{kbExpr:N.editorTextFocus,primary:zi(2089,2129),weight:100}})}invoke(e,t,i){const n=this.getSelectedLines(i);zW(t,!1,n)}}class wge extends qn{constructor(){super({id:"editor.foldAll",label:p("foldAllAction.label","Fold All"),alias:"Fold All",precondition:On,kbOpts:{kbExpr:N.editorTextFocus,primary:zi(2089,2069),weight:100}})}invoke(e,t,i){Rp(t,!0)}}class Sge extends qn{constructor(){super({id:"editor.unfoldAll",label:p("unfoldAllAction.label","Unfold All"),alias:"Unfold All",precondition:On,kbOpts:{kbExpr:N.editorTextFocus,primary:zi(2089,2088),weight:100}})}invoke(e,t,i){Rp(t,!1)}}class vh extends qn{getFoldingLevel(){return parseInt(this.id.substr(vh.ID_PREFIX.length))}invoke(e,t,i){qfe(t,this.getFoldingLevel(),!0,this.getSelectedLines(i))}}vh.ID_PREFIX="editor.foldLevel";vh.ID=s=>vh.ID_PREFIX+s;class yge extends qn{constructor(){super({id:"editor.gotoParentFold",label:p("gotoParentFold.label","Go to Parent Fold"),alias:"Go to Parent Fold",precondition:On,kbOpts:{kbExpr:N.editorTextFocus,weight:100}})}invoke(e,t,i){const n=this.getSelectedLines(i);if(n.length>0){const o=Gfe(n[0],t);o!==null&&i.setSelection({startLineNumber:o,startColumn:1,endLineNumber:o,endColumn:1})}}}class Lge extends qn{constructor(){super({id:"editor.gotoPreviousFold",label:p("gotoPreviousFold.label","Go to Previous Folding Range"),alias:"Go to Previous Folding Range",precondition:On,kbOpts:{kbExpr:N.editorTextFocus,weight:100}})}invoke(e,t,i){const n=this.getSelectedLines(i);if(n.length>0){const o=Zfe(n[0],t);o!==null&&i.setSelection({startLineNumber:o,startColumn:1,endLineNumber:o,endColumn:1})}}}class kge extends qn{constructor(){super({id:"editor.gotoNextFold",label:p("gotoNextFold.label","Go to Next Folding Range"),alias:"Go to Next Folding Range",precondition:On,kbOpts:{kbExpr:N.editorTextFocus,weight:100}})}invoke(e,t,i){const n=this.getSelectedLines(i);if(n.length>0){const o=Yfe(n[0],t);o!==null&&i.setSelection({startLineNumber:o,startColumn:1,endLineNumber:o,endColumn:1})}}}c
Line truncated
|
|
|
|
|
.monaco-editor .cldr${vt.asCSSSelector(y0)},
|
|
|
|
|
.monaco-editor .cldr${vt.asCSSSelector(Ty)},
|
|
|
|
|
.monaco-editor .cldr${vt.asCSSSelector(uM)},
|
|
|
|
|
.monaco-editor .cldr${vt.asCSSSelector($W)} {
|
|
|
|
|
color: ${i} !important;
|
|
|
|
|
}
|
|
|
|
|
`)});class Tge extends me{constructor(){super({id:"editor.action.fontZoomIn",label:p("EditorFontZoomIn.label","Editor Font Zoom In"),alias:"Editor Font Zoom In",precondition:void 0})}run(e,t){Xl.setZoomLevel(Xl.getZoomLevel()+1)}}class Nge extends me{constructor(){super({id:"editor.action.fontZoomOut",label:p("EditorFontZoomOut.label","Editor Font Zoom Out"),alias:"Editor Font Zoom Out",precondition:void 0})}run(e,t){Xl.setZoomLevel(Xl.getZoomLevel()-1)}}class Age extends me{constructor(){super({id:"editor.action.fontZoomReset",label:p("EditorFontZoomReset.label","Editor Font Zoom Reset"),alias:"Editor Font Zoom Reset",precondition:void 0})}run(e,t){Xl.setZoomLevel(0)}}oe(Tge);oe(Nge);oe(Age);var KW=globalThis&&globalThis.__decorate||function(s,e,t,i){var n=arguments.length,o=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(s,e,t,i);else for(var a=s.length-1;a>=0;a--)(r=s[a])&&(o=(n<3?r(o):n>3?r(e,t,o):r(e,t))||o);return n>3&&o&&Object.defineProperty(e,t,o),o},xw=globalThis&&globalThis.__param||function(s,e){return function(t,i){e(t,i,s)}},hM=globalThis&&globalThis.__awaiter||function(s,e,t,i){function n(o){return o instanceof t?o:new t(function(r){r(o)})}return new(t||(t=Promise))(function(o,r){function a(d){try{c(i.next(d))}catch(u){r(u)}}function l(d){try{c(i.throw(d))}catch(u){r(u)}}function c(d){d.done?o(d.value):n(d.value).then(a,l)}c((i=i.apply(s,e||[])).next())})};let Db=class{constructor(e,t,i){this._editor=e,this._languageFeaturesService=t,this._workerService=i,this._disposables=new ee,this._sessionDisposables=new ee,this._disposables.add(t.onTypeFormattingEditProvider.onDidChange(this._update,this)),this._disposables.add(e.onDidChangeModel(()=>this._update())),this._disposables.add(e.onDidChangeModelLanguage(()=>this._update())),this._disposables.add(e.onDidChangeConfiguration(n=>{n.hasChanged(51)&&this._update()}))}dispose(){this._disposables.dispose(),this._sessionDisposables.dispose()}_update(){if(this._sessionDisposables.clear(),!this._editor.getOption(51)||!this._editor.hasModel())return;const e=this._editor.getModel(),[t]=this._languageFeaturesService.onTypeFormattingEditProvider.ordered(e);if(!t||!t.autoFormatTriggerCharacters)return;const i=new Df;for(const n of t.autoFormatTriggerCharacters)i.add(n.charCodeAt(0));this._sessionDisposables.add(this._editor.onDidType(n=>{const o=n.charCodeAt(n.length-1);i.has(o)&&this._trigger(String.fromCharCode(o))}))}_trigger(e){if(!this._editor.hasModel()||this._editor.getSelections().length>1||!this._editor.getSelection().isEmpty())return;const t=this._editor.getModel(),i=this._editor.getPosition(),n=new Cn,o=this._editor.onDidChangeModelContent(r=>{if(r.isFlush){n.cancel(),o.dispose();return}for(let a=0,l=r.changes.length;a<l;a++)if(r.changes[a].range.endLineNumber<=i.lineNumber){n.cancel(),o.dispose();return}});tB(this._workerService,this._languageFeaturesService,t,i,e,t.getFormattingOptions(),n.token).then(r=>{n.token.isCancellationRequested||In(r)&&(Zg.execute(this._editor,r,!0),PA(r))}).finally(()=>{o.dispose()})}};Db.ID="editor.contrib.autoFormat";Db=KW([xw(1,be),xw(2,Ho)],Db);let xb=class{constructor(e,t,i){this.editor=e,this._languageFeaturesService=t,this._instantiationService=i,this._callOnDispose=new ee,this._callOnModel=new ee,this._callOnDispose.add(e.onDidChangeConfiguration(()=>this._update())),this._callOnDispose.add(e.onDidChangeModel(()=>this._update())),this._callOnDispose.add(e.onDidChangeModelLanguage(()=>this._update())),this._callOnDispose.add(t.documentRangeFormattingEditProvider.onDidChange(this._update,this))}dispose(){this._callOnDispose.dispose(),this._callOnModel.dispose()}_update(){this._callOnModel.clear(),this.editor.getOption(50)&&(!this.editor.hasModel()||!this._languageFeaturesService.documentRangeFormattingEditProvider.has(this.editor.getModel())||this._callOnModel.add(this.editor.onDidPaste(({range:e})=>this._trigger(e))))}_trigger(e){!this.editor.hasModel()||this.editor.getSelections().length>1||this._instantiationService.invokeFunction(eB,this.editor,e,2,Bh.None,Qe.None).catch($e)}};xb.ID="editor.contrib.formatOnPaste";xb=KW([xw(1,be),xw(2,Ue)],xb);class Mge extends me{constructor(){super({id:"editor.action.formatDocument",label:p("formatDocument.label","Format Document"),alias:"Format Document",precondition:ce.and(N.notInCompositeEditor,N.writable,N.hasDocumentFormattingProvider),kbOpts:{kbExpr:N.editorTextFocus,primary:1572,linux:{primary:3111},weight:100},contextMenuOpts:{group:"1_modification",order:1.3}})}run(e,t){return hM(this,void 0,void 0,function*(){if(t.hasModel()){const i=e.get(Ue);yield e.get(Ad).showWhile(i.invokeFunction(sce,t,1,Bh.None,Qe.None),250)}})}}class Rge extends me{constructor(){super({id:"editor.action.formatSelection",label:p("formatSelection.label","Format Selection"),alias:"Format Selection",precondition:ce.and(N.writable,N.hasDocumentSelectionFormattingProvider),kbOpts:{kbExpr:N.editorTextF
Line truncated
|
|
|
|
|
`&&this.lineStartOffsetByLineIdx.push(t+1)}getOffset(e){return this.lineStartOffsetByLineIdx[e.lineNumber-1]+e.column-1}}const zge=[];function $ge(){return zge}class qW{constructor(e,t,i=0){this.lineNumber=e,this.parts=t,this.additionalReservedLineCount=i}renderForScreenReader(e){if(this.parts.length===0)return"";const t=this.parts[this.parts.length-1],i=e.substr(0,t.column-1);return Vge(i,this.parts.map(o=>({range:{startLineNumber:1,endLineNumber:1,startColumn:o.column,endColumn:o.column},text:o.lines.join(`
|
|
|
|
|
`)}))).substring(this.parts[0].column-1)}isEmpty(){return this.parts.every(e=>e.lines.length===0)}}class iT{constructor(e,t,i){this.column=e,this.lines=t,this.preview=i}}class GW{constructor(e,t,i,n,o=0){this.lineNumber=e,this.columnStart=t,this.length=i,this.newLines=n,this.additionalReservedLineCount=o,this.parts=[new iT(this.columnStart+this.length,this.newLines,!1)]}renderForScreenReader(e){return this.newLines.join(`
|
|
|
|
|
`)}}class ZW extends q{constructor(e){super(),this.editor=e,this._expanded=void 0,this.onDidChangeEmitter=new W,this.onDidChange=this.onDidChangeEmitter.event,this._register(e.onDidChangeConfiguration(t=>{t.hasChanged(108)&&this._expanded===void 0&&this.onDidChangeEmitter.fire()}))}setExpanded(e){this._expanded=!0,this.onDidChangeEmitter.fire()}}function Tw(s,e){if(!e)return e;const t=s.getValueInRange(e.range),i=Gu(t,e.insertText),n=s.getOffsetAt(e.range.getStartPosition())+i,o=s.getPositionAt(n),r=t.substr(i),a=L_(r,e.insertText),l=s.getPositionAt(Math.max(n,s.getOffsetAt(e.range.getEndPosition())-a));return{range:L.fromPositions(o,l),insertText:e.insertText.substr(i,e.insertText.length-i-a),snippetInfo:e.snippetInfo,filterText:e.filterText,additionalTextEdits:e.additionalTextEdits}}function Uge(s,e){return s===e?!0:!s||!e?!1:s.range.equalsRange(e.range)&&s.insertText===e.insertText&&s.command===e.command}function YW(s,e,t,i,n=0){if(s.range.startLineNumber!==s.range.endLineNumber)return;const o=e.getLineContent(s.range.startLineNumber),r=Mt(o).length;if(s.range.startColumn-1<=r){const f=Mt(s.insertText).length,g=o.substring(s.range.startColumn-1,r),_=L.fromPositions(s.range.getStartPosition().delta(0,g.length),s.range.getEndPosition()),b=s.insertText.startsWith(g)?s.insertText.substring(g.length):s.insertText.substring(f);s={range:_,insertText:b,command:s.command,snippetInfo:void 0,filterText:s.filterText,additionalTextEdits:s.additionalTextEdits}}const l=e.getValueInRange(s.range),c=jge(l,s.insertText);if(!c)return;const d=s.range.startLineNumber,u=new Array;if(t==="prefix"){const f=c.filter(g=>g.originalLength===0);if(f.length>1||f.length===1&&f[0].originalStart!==l.length)return}const h=s.insertText.length-n;for(const f of c){const g=s.range.startColumn+f.originalStart+f.originalLength;if(t==="subwordSmart"&&i&&i.lineNumber===s.range.startLineNumber&&g<i.column||f.originalLength>0)return;if(f.modifiedLength===0)continue;const _=f.modifiedStart+f.modifiedLength,b=Math.max(f.modifiedStart,Math.min(_,h)),v=s.insertText.substring(f.modifiedStart,b),C=s.insertText.substring(b,Math.max(f.modifiedStart,_));if(v.length>0){const w=Wa(v);u.push(new iT(g,w,!1))}if(C.length>0){const w=Wa(C);u.push(new iT(g,w,!0))}}return new qW(d,u,0)}let na;function jge(s,e){if((na==null?void 0:na.originalValue)===s&&(na==null?void 0:na.newValue)===e)return na==null?void 0:na.changes;{let t=U5(s,e,!0);if(t){const i=$5(t);if(i>0){const n=U5(s,e,!1);n&&$5(n)<i&&(t=n)}}return na={originalValue:s,newValue:e,changes:t},t}}function $5(s){let e=0;for(const t of s)e+=Math.max(t.originalLength-t.modifiedLength,0);return e}function U5(s,e,t){if(s.length>5e3||e.length>5e3)return;function i(c){let d=0;for(let u=0,h=c.length;u<h;u++){const f=c.charCodeAt(u);f>d&&(d=f)}return d}const n=Math.max(i(s),i(e));function o(c){if(c<0)throw new Error("unexpected");return n+c+1}function r(c){let d=0,u=0;const h=new Int32Array(c.length);for(let f=0,g=c.length;f<g;f++)if(t&&c[f]==="("){const _=u*100+d;h[f]=o(2*_),d++}else if(t&&c[f]===")"){d=Math.max(d-1,0);const _=u*100+d;h[f]=o(2*_+1),d===0&&u++}else h[f]=c.charCodeAt(f);return h}const a=r(s),l=r(e);return new va({getElements:()=>a},{getElements:()=>l}).ComputeDiff(!1).changes}function Kge(s,e){const t=new Z9,i=new X9(t,c=>e.getLanguageConfiguration(c)),n=new Y9(new qge([s]),i),o=eE(n,[],void 0,!0);let r="";const a=s.getLineContent();function l(c,d){if(c.kind===2)l(c.openingBracket,d),d=_i(d,c.openingBracket.length),c.child&&(l(c.child,d),d=_i(d,c.child.length)),c.closingBracket?(l(c.closingBracket,d),d=_i(d,c.closingBracket.length)):r+=i.getSingleLanguageBracketTokens(c.openingBracket.languageId).findClosingTokenText(c.openingBracket.bracketIds);else if(c.kind!==3){if(c.kind===0||c.kind===1)r+=a.substring(d,_i(d,c.length));else if(c.kind===4)for(const u of c.children)l(u,d),d=_i(d,u.length)}}return l(o,ir),r}class qge{constructor(e){this.lines=e,this.tokenization={getLineTokens:t=>this.lines[t-1]}}getLineCount(){return this.lines.length}getLineLength(e){return this.lines[e-1].getLineContent().length}}var Gge=globalThis&&globalThis.__decorate||function(s,e,t,i){var n=arguments.length,o=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(s,e,t,i);else for(var a=s.length-1;a>=0;a--)(r=s[a])&&(o=(n<3?r(o):n>3?r(e,t,o):r(e,t))||o);return n>3&&o&&Object.defineProperty(e,t,o),o},dm=globalThis&&globalThis.__param||function(s,e){return function(t,i){e(t,i,s)}},Ll=globalThis&&globalThis.__awaiter||function(s,e,t,i){function n(o){return o instanceof t?o:new t(function(r){r(o)})}return new(t||(t=Promise))(function(o,r){function a(d){try{c(i.next(d))}catch(u){r(u)}}function l(d){try{c(i.throw(d))}catch(u){r(u)}}function c(d){d.done?o(d.value):n(d.value).then(a,l)}c((i=i.apply(s,e||[])).next())})};let nT=class extends q{constructor(e,t,i,n,o,r,a){super(),this.editor=e,this.cache=t,this.commandService=i,this.languageConfigurati
Line truncated
|
|
|
|
|
`),0)}get currentCompletion(){const e=this.currentCachedCompletion;if(!!e)return e.toLiveInlineCompletion()}get isValid(){return this.editor.getPosition().lineNumber===this.triggerPosition.lineNumber}scheduleAutomaticUpdate(){this.updateOperation.clear(),this.updateSoon.schedule(this.debounce.get(this.editor.getModel()))}update(e){return Ll(this,void 0,void 0,function*(){if(!this.shouldUpdate())return;const t=this.editor.getPosition(),i=new Date,n=en(r=>Ll(this,void 0,void 0,function*(){let a;try{a=yield QW(this.registry,t,this.editor.getModel(),{triggerKind:e,selectedSuggestionInfo:void 0},r,this.languageConfigurationService);const l=new Date;this.debounce.update(this.editor.getModel(),l.getTime()-i.getTime())}catch(l){$e(l);return}r.isCancellationRequested||(this.cache.setValue(this.editor,a,e),this.updateFilteredInlineCompletions(),this.onDidChangeEmitter.fire())})),o=new XW(n,e);this.updateOperation.value=o,yield n,this.updateOperation.value===o&&this.updateOperation.clear()})}takeOwnership(e){this._register(e)}commitCurrentCompletion(){if(!this.ghostText)return;const t=this.currentCompletion;t&&this.commit(t)}commit(e){var t;const i=this.cache.clearAndLeak();e.snippetInfo?(this.editor.executeEdits("inlineSuggestion.accept",[ti.replaceMove(e.range,""),...e.additionalTextEdits]),this.editor.setPosition(e.snippetInfo.range.getStartPosition()),(t=tn.get(this.editor))===null||t===void 0||t.insert(e.snippetInfo.snippet)):this.editor.executeEdits("inlineSuggestion.accept",[ti.replaceMove(e.range,e.insertText),...e.additionalTextEdits]),e.command?this.commandService.executeCommand(e.command.id,...e.command.arguments||[]).finally(()=>{i==null||i.dispose()}).then(void 0,nn):i==null||i.dispose(),this.onDidChangeEmitter.fire()}get commands(){var e;return[...new Set(((e=this.cache.value)===null||e===void 0?void 0:e.completions.map(i=>i.inlineCompletion.sourceInlineCompletions))||[])].flatMap(i=>i.commands||[])}}class XW{constructor(e,t){this.promise=e,this.triggerKind=t}dispose(){this.promise.cancel()}}class Yge extends q{constructor(e,t,i,n){super(),this.editor=t,this.onChange=i,this.triggerKind=n,this.isDisposing=!1;const o=t.changeDecorations(r=>r.deltaDecorations([],e.items.map(a=>({range:a.range,options:{description:"inline-completion-tracking-range"}}))));this._register(Ze(()=>{this.isDisposing=!0,t.removeDecorations(o)})),this.completions=e.items.map((r,a)=>new Xge(r,o[a])),this._register(t.onDidChangeModelContent(()=>{this.updateRanges()})),this._register(e)}updateRanges(){if(this.isDisposing)return;let e=!1;const t=this.editor.getModel();for(const i of this.completions){const n=t.getDecorationRange(i.decorationId);if(!n){$e(new Error("Decoration has no range"));continue}i.synchronizedRange.equalsRange(n)||(e=!0,i.synchronizedRange=n)}e&&this.onChange()}}class Xge{constructor(e,t){this.inlineCompletion=e,this.decorationId=t,this.semanticId=JSON.stringify({text:this.inlineCompletion.insertText,abbreviation:this.inlineCompletion.filterText,startLine:this.inlineCompletion.range.startLineNumber,startColumn:this.inlineCompletion.range.startColumn,command:this.inlineCompletion.command}),this.synchronizedRange=e.range}toLiveInlineCompletion(){return{insertText:this.inlineCompletion.insertText,range:this.synchronizedRange,command:this.inlineCompletion.command,sourceProvider:this.inlineCompletion.sourceProvider,sourceInlineCompletions:this.inlineCompletion.sourceInlineCompletions,sourceInlineCompletion:this.inlineCompletion.sourceInlineCompletion,snippetInfo:this.inlineCompletion.snippetInfo,filterText:this.inlineCompletion.filterText,additionalTextEdits:this.inlineCompletion.additionalTextEdits}}}function QW(s,e,t,i,n=Qe.None,o){return Ll(this,void 0,void 0,function*(){const r=Qge(e,t),a=s.all(t),l=yield Promise.all(a.map(d=>Ll(this,void 0,void 0,function*(){const u=yield Promise.resolve(d.provideInlineCompletions(t,e,i,n)).catch(nn);return{completions:u,provider:d,dispose:()=>{u&&d.freeInlineCompletions(u)}}}))),c=new Map;for(const d of l){const u=d.completions;if(!!u)for(const h of u.items){let f=h.range?L.lift(h.range):r;if(f.startLineNumber!==f.endLineNumber)continue;let g,_;if(typeof h.insertText=="string"){if(g=h.insertText,o&&h.completeBracketPairs){g=Jge(g,f.getStartPosition(),t,o);const v=g.length-h.insertText.length;v!==0&&(f=new L(f.startLineNumber,f.startColumn,f.endLineNumber,f.endColumn+v))}_=void 0}else"snippet"in h.insertText?(g=new Sd().parse(h.insertText.snippet).toString(),_={snippet:h.insertText.snippet,range:f}):Yw(h.insertText);const b={insertText:g,snippetInfo:_,range:f,command:h.command,sourceProvider:d.provider,sourceInlineCompletions:u,sourceInlineCompletion:h,filterText:h.filterText||g,additionalTextEdits:h.additionalTextEdits||$ge()};c.set(JSON.stringify({insertText:g,range:h.range}),b)}}return{items:[...c.values()],dispose:()=>{for(const d of l)d.dispose()}}})}function Qge(s,e){const t=e.getWordAtPosition(s),i=e.getLineMaxColumn(s.lineNumber);return t?new L(s.lineNumber,t.startColumn,s
Line truncated
|
|
|
|
|
${m.symbolValue.cssSelector},${m.symbolEnum.cssSelector} { color: ${c}; }`);const d=s.getColor(Spe);d&&e.addRule(`${m.symbolEnumMember.cssSelector} { color: ${d}; }`);const u=s.getColor(ype);u&&e.addRule(`${m.symbolEvent.cssSelector} { color: ${u}; }`);const h=s.getColor(Lpe);h&&e.addRule(`${m.symbolField.cssSelector} { color: ${h}; }`);const f=s.getColor(kpe);f&&e.addRule(`${m.symbolFile.cssSelector} { color: ${f}; }`);const g=s.getColor(Dpe);g&&e.addRule(`${m.symbolFolder.cssSelector} { color: ${g}; }`);const _=s.getColor(xpe);_&&e.addRule(`${m.symbolFunction.cssSelector} { color: ${_}; }`);const b=s.getColor(Epe);b&&e.addRule(`${m.symbolInterface.cssSelector} { color: ${b}; }`);const v=s.getColor(Ipe);v&&e.addRule(`${m.symbolKey.cssSelector} { color: ${v}; }`);const C=s.getColor(Tpe);C&&e.addRule(`${m.symbolKeyword.cssSelector} { color: ${C}; }`);const w=s.getColor(Ape);w&&e.addRule(`${m.symbolModule.cssSelector} { color: ${w}; }`);const S=s.getColor(Mpe);S&&e.addRule(`${m.symbolNamespace.cssSelector} { color: ${S}; }`);const D=s.getColor(Rpe);D&&e.addRule(`${m.symbolNull.cssSelector} { color: ${D}; }`);const x=s.getColor(Ope);x&&e.addRule(`${m.symbolNumber.cssSelector} { color: ${x}; }`);const y=s.getColor(Ppe);y&&e.addRule(`${m.symbolObject.cssSelector} { color: ${y}; }`);const k=s.getColor(Fpe);k&&e.addRule(`${m.symbolOperator.cssSelector} { color: ${k}; }`);const I=s.getColor(Bpe);I&&e.addRule(`${m.symbolPackage.cssSelector} { color: ${I}; }`);const R=s.getColor(Wpe);R&&e.addRule(`${m.symbolProperty.cssSelector} { color: ${R}; }`);const P=s.getColor(Vpe);P&&e.addRule(`${m.symbolReference.cssSelector} { color: ${P}; }`);const j=s.getColor(Hpe);j&&e.addRule(`${m.symbolSnippet.cssSelector} { color: ${j}; }`);const K=s.getColor(zpe);K&&e.addRule(`${m.symbolString.cssSelector} { color: ${K}; }`);const ae=s.getColor($pe);ae&&e.addRule(`${m.symbolStruct.cssSelector} { color: ${ae}; }`);const ue=s.getColor(Upe);ue&&e.addRule(`${m.symbolText.cssSelector} { color: ${ue}; }`);const we=s.getColor(jpe);we&&e.addRule(`${m.symbolTypeParameter.cssSelector} { color: ${we}; }`);const ve=s.getColor(Kpe);ve&&e.addRule(`${m.symbolUnit.cssSelector} { color: ${ve}; }`);const Ce=s.getColor(qpe);Ce&&e.addRule(`${m.symbolVariable.cssSelector} { color: ${Ce}; }`)});class iV{constructor(){this._onDidWillResize=new W,this.onDidWillResize=this._onDidWillResize.event,this._onDidResize=new W,this.onDidResize=this._onDidResize.event,this._sashListener=new ee,this._size=new Bt(0,0),this._minSize=new Bt(0,0),this._maxSize=new Bt(Number.MAX_SAFE_INTEGER,Number.MAX_SAFE_INTEGER),this.domNode=document.createElement("div"),this._eastSash=new Ln(this.domNode,{getVerticalSashLeft:()=>this._size.width},{orientation:0}),this._westSash=new Ln(this.domNode,{getVerticalSashLeft:()=>0},{orientation:0}),this._northSash=new Ln(this.domNode,{getHorizontalSashTop:()=>0},{orientation:1,orthogonalEdge:V1.North}),this._southSash=new Ln(this.domNode,{getHorizontalSashTop:()=>this._size.height},{orientation:1,orthogonalEdge:V1.South}),this._northSash.orthogonalStartSash=this._westSash,this._northSash.orthogonalEndSash=this._eastSash,this._southSash.orthogonalStartSash=this._westSash,this._southSash.orthogonalEndSash=this._eastSash;let e,t=0,i=0;this._sashListener.add(ke.any(this._northSash.onDidStart,this._eastSash.onDidStart,this._southSash.onDidStart,this._westSash.onDidStart)(()=>{e===void 0&&(this._onDidWillResize.fire(),e=this._size,t=0,i=0)})),this._sashListener.add(ke.any(this._northSash.onDidEnd,this._eastSash.onDidEnd,this._southSash.onDidEnd,this._westSash.onDidEnd)(()=>{e!==void 0&&(e=void 0,t=0,i=0,this._onDidResize.fire({dimension:this._size,done:!0}))})),this._sashListener.add(this._eastSash.onDidChange(n=>{e&&(i=n.currentX-n.startX,this.layout(e.height+t,e.width+i),this._onDidResize.fire({dimension:this._size,done:!1,east:!0}))})),this._sashListener.add(this._westSash.onDidChange(n=>{e&&(i=-(n.currentX-n.startX),this.layout(e.height+t,e.width+i),this._onDidResize.fire({dimension:this._size,done:!1,west:!0}))})),this._sashListener.add(this._northSash.onDidChange(n=>{e&&(t=-(n.currentY-n.startY),this.layout(e.height+t,e.width+i),this._onDidResize.fire({dimension:this._size,done:!1,north:!0}))})),this._sashListener.add(this._southSash.onDidChange(n=>{e&&(t=n.currentY-n.startY,this.layout(e.height+t,e.width+i),this._onDidResize.fire({dimension:this._size,done:!1,south:!0}))})),this._sashListener.add(ke.any(this._eastSash.onDidReset,this._westSash.onDidReset)(n=>{this._preferredSize&&(this.layout(this._size.height,this._preferredSize.width),this._onDidResize.fire({dimension:this._size,done:!0}))})),this._sashListener.add(ke.any(this._northSash.onDidReset,this._southSash.onDidReset)(n=>{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._sash
Line truncated
|
|
|
|
|
`,a+=`prefix: ${(i=e.word)!==null&&i!==void 0?i:"(no prefix)"}
|
|
|
|
|
`,a+=`word: ${e.completion.filterText?e.completion.filterText+" (filterText)":e.textLabel}
|
|
|
|
|
`,a+=`distance: ${e.distance} (localityBonus-setting)
|
|
|
|
|
`,a+=`index: ${e.idx}, based on ${e.completion.sortText&&`sortText: "${e.completion.sortText}"`||"label"}
|
|
|
|
|
`,a+=`commit_chars: ${(n=e.completion.commitCharacters)===null||n===void 0?void 0:n.join("")}
|
|
|
|
|
`,r=new gs().appendCodeblock("empty",a),o=`Provider: ${e.provider._debugDisplayName}`}if(!t&&!pM(e)){this.clearContents();return}if(this.domNode.classList.remove("no-docs","no-type"),o){const a=o.length>1e5?`${o.substr(0,1e5)}\u2026`:o;this._type.textContent=a,this._type.title=a,io(this._type),this._type.classList.toggle("auto-wrap",!/\r?\n^\s+/gmi.test(a))}else Hi(this._type),this._type.title="",hs(this._type),this.domNode.classList.add("no-type");if(Hi(this._docs),typeof r=="string")this._docs.classList.remove("markdown-docs"),this._docs.textContent=r;else if(r){this._docs.classList.add("markdown-docs"),Hi(this._docs);const a=this._markdownRenderer.render(r);this._docs.appendChild(a.element),this._renderDisposeable.add(a),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=a=>{a.preventDefault(),a.stopPropagation()},this._close.onclick=a=>{a.preventDefault(),a.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(e,t){const i=new Bt(e,t);Bt.equals(i,this._size)||(this._size=i,vZ(this.domNode,e,t)),this._scrollbar.scanDomNode()}scrollDown(e=8){this._body.scrollTop+=e}scrollUp(e=8){this._body.scrollTop-=e}scrollTop(){this._body.scrollTop=0}scrollBottom(){this._body.scrollTop=this._body.scrollHeight}pageDown(){this.scrollDown(80)}pageUp(){this.scrollUp(80)}set borderWidth(e){this._borderWidth=e}get borderWidth(){return this._borderWidth}};rT=Gpe([Zpe(1,Ue)],rT);class Ype{constructor(e,t){this.widget=e,this._editor=t,this._disposables=new ee,this._added=!1,this._preferAlignAtTop=!0,this._resizable=new iV,this._resizable.domNode.classList.add("suggest-details-container"),this._resizable.domNode.appendChild(e.domNode),this._resizable.enableSashes(!1,!0,!0,!1);let i,n,o=0,r=0;this._disposables.add(this._resizable.onDidWillResize(()=>{i=this._topLeft,n=this._resizable.size})),this._disposables.add(this._resizable.onDidResize(a=>{if(i&&n){this.widget.layout(a.dimension.width,a.dimension.height);let l=!1;a.west&&(r=n.width-a.dimension.width,l=!0),a.north&&(o=n.height-a.dimension.height,l=!0),l&&this._applyTopLeft({top:i.top+o,left:i.left+r})}a.done&&(i=void 0,n=void 0,o=0,r=0,this._userSize=a.dimension)})),this._disposables.add(this.widget.onDidChangeContents(()=>{var a;this._anchorBox&&this._placeAtAnchor(this._anchorBox,(a=this._userSize)!==null&&a!==void 0?a:this.widget.size,this._preferAlignAtTop)}))}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(e=!1){this._resizable.clearSashHoverState(),this._added&&(this._editor.removeOverlayWidget(this),this._added=!1,this._anchorBox=void 0,this._topLeft=void 0),e&&(this._userSize=void 0,this.widget.clearContents())}placeAtAnchor(e,t){var i;const n=e.getBoundingClientRect();this._anchorBox=n,this._preferAlignAtTop=t,this._placeAtAnchor(this._anchorBox,(i=this._userSize)!==null&&i!==void 0?i:this.widget.size,t)}_placeAtAnchor(e,t,i){var n;const o=gS(document.body),r=this.widget.getLayoutInfo(),a=new Bt(220,2*r.lineHeight),l=e.top,c=function(){const w=o.width-(e.left+e.width+r.borderWidth+r.horizontalPadding),S=-r.borderWidth+e.left+e.width,D=new Bt(w,o.height-e.top-r.borderHeight-r.verticalPadding),x=D.with(void 0,e.top+e.height-r.borderHeight-r.verticalPadding);return{top:l,left:S,fit:w-t.width,maxSizeTop:D,maxSizeBottom:x,minSize:a.with(Math.min(w,a.width))}}(),d=function(){const w=e.left-r.borderWidth-r.horizontalPadding,S=Math.max(r.horizontalPadding,e.left-t.width-r.borderWidth),D=new Bt(w,o.height-e.top-r.borderHeight-r.verticalPadding),x=D.with(void 0,e.top+e.height-r.borderHeight-r.verticalPadding);return{top:l,left:S,fit:w-t.width,maxSizeTop:D,maxSizeBottom:x,minSize:a.with(Math.min(w,a.width))}}(),u=function(){const w=e.left,S=-r.borderWidth+e.top+e.height,D=new Bt(e.width-r.borderHeight,o.height-e.top-e.height-r.verticalPadding);return{top:S,left:w,fit:D.height-t.height,maxSizeBottom:D,maxSizeTop:D,minSize:a.with(D.width)}}(),h=[c,d,u],f=(n=h.find(w=>w.fit>=0))!==null&&n!==void 0?n:h.sort((w,S)=>S.fit-w.fit)[0],g=e.top+e.height-r.borderHeight;let _,b=t.height;const v=Math.max(f.maxSizeTop.height,f.maxSizeBottom.height);b>v&&(b=v);let C;i?b<=f.maxSizeTop.height?(_=!0,C=f.maxSizeTop):(_=!1,C=f.maxSizeBottom):b<=f.maxSizeBottom.height?(_=!1,C=f.maxSizeBottom):(_=!0,C=f.maxSizeTop),this._applyTopLeft({left:f.left,top:_?f.top:g-b}),this.
Line truncated
|
|
|
|
|
`);o===""&&this._isCopyingDown&&(this._startLineNumberDelta++,this._endLineNumberDelta++),this._noop?t.addEditOperation(new L(i.endLineNumber,e.getLineMaxColumn(i.endLineNumber),i.endLineNumber+1,1),i.endLineNumber===e.getLineCount()?"":`
|
|
|
|
|
`):this._isCopyingDown?t.addEditOperation(new L(i.startLineNumber,1,i.startLineNumber,1),o+`
|
|
|
|
|
`):t.addEditOperation(new L(i.endLineNumber,e.getLineMaxColumn(i.endLineNumber),i.endLineNumber,e.getLineMaxColumn(i.endLineNumber)),`
|
|
|
|
|
`+o),this._selectionId=t.trackSelection(i),this._selectionDirection=this._selection.getDirection()}computeCursorState(e,t){let i=t.getTrackedSelection(this._selectionId);if(this._startLineNumberDelta!==0||this._endLineNumberDelta!==0){let n=i.startLineNumber,o=i.startColumn,r=i.endLineNumber,a=i.endColumn;this._startLineNumberDelta!==0&&(n=n+this._startLineNumberDelta,o=1),this._endLineNumberDelta!==0&&(r=r+this._endLineNumberDelta,a=1),i=le.createWithDirection(n,o,r,a,this._selectionDirection)}return i}}var e_e=globalThis&&globalThis.__decorate||function(s,e,t,i){var n=arguments.length,o=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(s,e,t,i);else for(var a=s.length-1;a>=0;a--)(r=s[a])&&(o=(n<3?r(o):n>3?r(e,t,o):r(e,t))||o);return n>3&&o&&Object.defineProperty(e,t,o),o},t_e=globalThis&&globalThis.__param||function(s,e){return function(t,i){e(t,i,s)}};let CT=class{constructor(e,t,i,n){this._languageConfigurationService=n,this._selection=e,this._isMovingDown=t,this._autoIndent=i,this._selectionId=null,this._moveEndLineSelectionShrink=!1}getEditOperations(e,t){const i=e.getLineCount();if(this._isMovingDown&&this._selection.endLineNumber===i){this._selectionId=t.trackSelection(this._selection);return}if(!this._isMovingDown&&this._selection.startLineNumber===1){this._selectionId=t.trackSelection(this._selection);return}this._moveEndPositionDown=!1;let n=this._selection;n.startLineNumber<n.endLineNumber&&n.endColumn===1&&(this._moveEndPositionDown=!0,n=n.setEndPosition(n.endLineNumber-1,e.getLineMaxColumn(n.endLineNumber-1)));const{tabSize:o,indentSize:r,insertSpaces:a}=e.getOptions(),l=this.buildIndentConverter(o,r,a),c={tokenization:{getLineTokens:d=>e.tokenization.getLineTokens(d),getLanguageId:()=>e.getLanguageId(),getLanguageIdAtPosition:(d,u)=>e.getLanguageIdAtPosition(d,u)},getLineContent:null};if(n.startLineNumber===n.endLineNumber&&e.getLineMaxColumn(n.startLineNumber)===1){const d=n.startLineNumber,u=this._isMovingDown?d+1:d-1;e.getLineMaxColumn(u)===1?t.addEditOperation(new L(1,1,1,1),null):(t.addEditOperation(new L(d,1,d,1),e.getLineContent(u)),t.addEditOperation(new L(u,1,u,e.getLineMaxColumn(u)),null)),n=new le(u,1,u,1)}else{let d,u;if(this._isMovingDown){d=n.endLineNumber+1,u=e.getLineContent(d),t.addEditOperation(new L(d-1,e.getLineMaxColumn(d-1),d,e.getLineMaxColumn(d)),null);let h=u;if(this.shouldAutoIndent(e,n)){const f=this.matchEnterRule(e,l,o,d,n.startLineNumber-1);if(f!==null){const _=Mt(e.getLineContent(d)),b=f+Es(_,o);h=l_(b,o,a)+this.trimLeft(u)}else{c.getLineContent=b=>b===n.startLineNumber?e.getLineContent(d):e.getLineContent(b);const _=zm(this._autoIndent,c,e.getLanguageIdAtPosition(d,1),n.startLineNumber,l,this._languageConfigurationService);if(_!==null){const b=Mt(e.getLineContent(d)),v=Es(_,o),C=Es(b,o);v!==C&&(h=l_(v,o,a)+this.trimLeft(u))}}t.addEditOperation(new L(n.startLineNumber,1,n.startLineNumber,1),h+`
|
|
|
|
|
`);const g=this.matchEnterRuleMovingDown(e,l,o,n.startLineNumber,d,h);if(g!==null)g!==0&&this.getIndentEditsOfMovingBlock(e,t,n,o,a,g);else{c.getLineContent=b=>b===n.startLineNumber?h:b>=n.startLineNumber+1&&b<=n.endLineNumber+1?e.getLineContent(b-1):e.getLineContent(b);const _=zm(this._autoIndent,c,e.getLanguageIdAtPosition(d,1),n.startLineNumber+1,l,this._languageConfigurationService);if(_!==null){const b=Mt(e.getLineContent(n.startLineNumber)),v=Es(_,o),C=Es(b,o);if(v!==C){const w=v-C;this.getIndentEditsOfMovingBlock(e,t,n,o,a,w)}}}}else t.addEditOperation(new L(n.startLineNumber,1,n.startLineNumber,1),h+`
|
|
|
|
|
`)}else if(d=n.startLineNumber-1,u=e.getLineContent(d),t.addEditOperation(new L(d,1,d+1,1),null),t.addEditOperation(new L(n.endLineNumber,e.getLineMaxColumn(n.endLineNumber),n.endLineNumber,e.getLineMaxColumn(n.endLineNumber)),`
|
|
|
|
|
`+u),this.shouldAutoIndent(e,n)){c.getLineContent=f=>f===d?e.getLineContent(n.startLineNumber):e.getLineContent(f);const h=this.matchEnterRule(e,l,o,n.startLineNumber,n.startLineNumber-2);if(h!==null)h!==0&&this.getIndentEditsOfMovingBlock(e,t,n,o,a,h);else{const f=zm(this._autoIndent,c,e.getLanguageIdAtPosition(n.startLineNumber,1),d,l,this._languageConfigurationService);if(f!==null){const g=Mt(e.getLineContent(n.startLineNumber)),_=Es(f,o),b=Es(g,o);if(_!==b){const v=_-b;this.getIndentEditsOfMovingBlock(e,t,n,o,a,v)}}}}}this._selectionId=t.trackSelection(n)}buildIndentConverter(e,t,i){return{shiftIndent:n=>yo.shiftIndent(n,n.length+1,e,t,i),unshiftIndent:n=>yo.unshiftIndent(n,n.length+1,e,t,i)}}parseEnterResult(e,t,i,n,o){if(o){let r=o.indentation;o.indentAction===Di.None||o.indentAction===Di.Indent?r=o.indentation+o.appendText:o.indentAction===Di.IndentOutdent?r=o.indentation:o.indentAction===Di.Outdent&&(r=t.unshiftIndent(o.indentation)+o.appendText);const a=e.getLineContent(n);if(this.trimLeft(a).indexOf(this.trimLeft(r))>=0){const l=Mt(e.getLineContent(n));let c=Mt(r);const d=P9(e,n,this._languageConfigurationService);d!==null&&d&2&&(c=t.unshiftIndent(c));const u=Es(c,i),h=Es(l,i);return u-h}}return null}matchEnterRuleMovingDown(e,t,i,n,o,r){if(Ra(r)>=0){const a=e.getLineMaxColumn(o),l=og(this._autoIndent,e,new L(o,a,o,a),this._languageConfigurationService);return this.parseEnterResult(e,t,i,n,l)}else{let a=n-1;for(;a>=1;){const d=e.getLineContent(a);if(Ra(d)>=0)break;a--}if(a<1||n>e.getLineCount())return null;const l=e.getLineMaxColumn(a),c=og(this._autoIndent,e,new L(a,l,a,l),this._languageConfigurationService);return this.parseEnterResult(e,t,i,n,c)}}matchEnterRule(e,t,i,n,o,r){let a=o;for(;a>=1;){let d;if(a===o&&r!==void 0?d=r:d=e.getLineContent(a),Ra(d)>=0)break;a--}if(a<1||n>e.getLineCount())return null;const l=e.getLineMaxColumn(a),c=og(this._autoIndent,e,new L(a,l,a,l),this._languageConfigurationService);return this.parseEnterResult(e,t,i,n,c)}trimLeft(e){return e.replace(/^\s+/,"")}shouldAutoIndent(e,t){if(this._autoIndent<4||!e.tokenization.isCheapToTokenize(t.startLineNumber))return!1;const i=e.getLanguageIdAtPosition(t.startLineNumber,1),n=e.getLanguageIdAtPosition(t.endLineNumber,1);return!(i!==n||this._languageConfigurationService.getLanguageConfiguration(i).indentRulesSupport===null)}getIndentEditsOfMovingBlock(e,t,i,n,o,r){for(let a=i.startLineNumber;a<=i.endLineNumber;a++){const l=e.getLineContent(a),c=Mt(l),u=Es(c,n)+r,h=l_(u,n,o);h!==c&&(t.addEditOperation(new L(a,1,a,c.length+1),h),a===i.endLineNumber&&i.endColumn<=c.length+1&&h===""&&(this._moveEndLineSelectionShrink=!0))}}computeCursorState(e,t){let i=t.getTrackedSelection(this._selectionId);return this._moveEndPositionDown&&(i=i.setEndPosition(i.endLineNumber+1,1)),this._moveEndLineSelectionShrink&&i.startLineNumber<i.endLineNumber&&(i=i.setEndPosition(i.endLineNumber,2)),i}};CT=e_e([t_e(3,yi)],CT);class id{constructor(e,t){this.selection=e,this.descending=t,this.selectionId=null}static getCollator(){return id._COLLATOR||(id._COLLATOR=new Intl.Collator),id._COLLATOR}getEditOperations(e,t){const i=i_e(e,this.selection,this.descending);i&&t.addEditOperation(i.range,i.text),this.selectionId=t.trackSelection(this.selection)}computeCursorState(e,t){return t.getTrackedSelection(this.selectionId)}static canRun(e,t,i){if(e===null)return!1;const n=gV(e,t,i);if(!n)return!1;for(let o=0,r=n.before.length;o<r;o++)if(n.before[o]!==n.after[o])return!0;return!1}}id._COLLATOR=null;function gV(s,e,t){const i=e.startLineNumber;let n=e.endLineNumber;if(e.endColumn===1&&n--,i>=n)return null;const o=[];for(let a=i;a<=n;a++)o.push(s.getLineContent(a));let r=o.slice(0);return r.sort(id.getCollator().compare),t===!0&&(r=r.reverse()),{startLineNumber:i,endLineNumber:n,before:o,after:r}}function i_e(s,e,t){const i=gV(s,e,t);return i?ti.replace(new L(i.startLineNumber,1,i.endLineNumber,s.getLineMaxColumn(i.endLineNumber)),i.after.join(`
|
|
|
|
|
`)):null}class pV extends me{constructor(e,t){super(t),this.down=e}run(e,t){if(!t.hasModel())return;const i=t.getSelections().map((r,a)=>({selection:r,index:a,ignore:!1}));i.sort((r,a)=>L.compareRangesUsingStarts(r.selection,a.selection));let n=i[0];for(let r=1;r<i.length;r++){const a=i[r];n.selection.endLineNumber===a.selection.startLineNumber&&(n.index<a.index?a.ignore=!0:(n.ignore=!0,n=a))}const o=[];for(const r of i)o.push(new fV(r.selection,this.down,r.ignore));t.pushUndoStop(),t.executeCommands(this.id,o),t.pushUndoStop()}}class n_e extends pV{constructor(){super(!1,{id:"editor.action.copyLinesUpAction",label:p("lines.copyUp","Copy Line Up"),alias:"Copy Line Up",precondition:N.writable,kbOpts:{kbExpr:N.editorTextFocus,primary:1552,linux:{primary:3600},weight:100},menuOpts:{menuId:M.MenubarSelectionMenu,group:"2_line",title:p({key:"miCopyLinesUp",comment:["&& denotes a mnemonic"]},"&&Copy Line Up"),order:1}})}}class s_e extends pV{constructor(){super(!0,{id:"editor.action.copyLinesDownAction",label:p("lines.copyDown","Copy Line Down"),alias:"Copy Line Down",precondition:N.writable,kbOpts:{kbExpr:N.editorTextFocus,primary:1554,linux:{primary:3602},weight:100},menuOpts:{menuId:M.MenubarSelectionMenu,group:"2_line",title:p({key:"miCopyLinesDown",comment:["&& denotes a mnemonic"]},"Co&&py Line Down"),order:2}})}}class o_e extends me{constructor(){super({id:"editor.action.duplicateSelection",label:p("duplicateSelection","Duplicate Selection"),alias:"Duplicate Selection",precondition:N.writable,menuOpts:{menuId:M.MenubarSelectionMenu,group:"2_line",title:p({key:"miDuplicateSelection",comment:["&& denotes a mnemonic"]},"&&Duplicate Selection"),order:5}})}run(e,t,i){if(!t.hasModel())return;const n=[],o=t.getSelections(),r=t.getModel();for(const a of o)if(a.isEmpty())n.push(new fV(a,!0));else{const l=new le(a.endLineNumber,a.endColumn,a.endLineNumber,a.endColumn);n.push(new HQ(l,r.getValueInRange(a)))}t.pushUndoStop(),t.executeCommands(this.id,n),t.pushUndoStop()}}class mV extends me{constructor(e,t){super(t),this.down=e}run(e,t){const i=e.get(yi),n=[],o=t.getSelections()||[],r=t.getOption(9);for(const a of o)n.push(new CT(a,this.down,r,i));t.pushUndoStop(),t.executeCommands(this.id,n),t.pushUndoStop()}}class r_e extends mV{constructor(){super(!1,{id:"editor.action.moveLinesUpAction",label:p("lines.moveUp","Move Line Up"),alias:"Move Line Up",precondition:N.writable,kbOpts:{kbExpr:N.editorTextFocus,primary:528,linux:{primary:528},weight:100},menuOpts:{menuId:M.MenubarSelectionMenu,group:"2_line",title:p({key:"miMoveLinesUp",comment:["&& denotes a mnemonic"]},"Mo&&ve Line Up"),order:3}})}}class a_e extends mV{constructor(){super(!0,{id:"editor.action.moveLinesDownAction",label:p("lines.moveDown","Move Line Down"),alias:"Move Line Down",precondition:N.writable,kbOpts:{kbExpr:N.editorTextFocus,primary:530,linux:{primary:530},weight:100},menuOpts:{menuId:M.MenubarSelectionMenu,group:"2_line",title:p({key:"miMoveLinesDown",comment:["&& denotes a mnemonic"]},"Move &&Line Down"),order:4}})}}class _V extends me{constructor(e,t){super(t),this.descending=e}run(e,t){const i=t.getSelections()||[];for(const o of i)if(!id.canRun(t.getModel(),o,this.descending))return;const n=[];for(let o=0,r=i.length;o<r;o++)n[o]=new id(i[o],this.descending);t.pushUndoStop(),t.executeCommands(this.id,n),t.pushUndoStop()}}class l_e extends _V{constructor(){super(!1,{id:"editor.action.sortLinesAscending",label:p("lines.sortAscending","Sort Lines Ascending"),alias:"Sort Lines Ascending",precondition:N.writable})}}class c_e extends _V{constructor(){super(!0,{id:"editor.action.sortLinesDescending",label:p("lines.sortDescending","Sort Lines Descending"),alias:"Sort Lines Descending",precondition:N.writable})}}class d_e extends me{constructor(){super({id:"editor.action.removeDuplicateLines",label:p("lines.deleteDuplicates","Delete Duplicate Lines"),alias:"Delete Duplicate Lines",precondition:N.writable})}run(e,t){if(!t.hasModel())return;const i=t.getModel();if(i.getLineCount()===1&&i.getLineMaxColumn(1)===1)return;const n=[],o=[];let r=0;for(const a of t.getSelections()){const l=new Set,c=[];for(let f=a.startLineNumber;f<=a.endLineNumber;f++){const g=i.getLineContent(f);l.has(g)||(c.push(g),l.add(g))}const d=new le(a.startLineNumber,1,a.endLineNumber,i.getLineMaxColumn(a.endLineNumber)),u=a.startLineNumber-r,h=new le(u,1,u+c.length-1,c[c.length-1].length);n.push(ti.replace(d,c.join(`
|
|
|
|
|
`))),o.push(h),r+=a.endLineNumber-a.startLineNumber+1-c.length}t.pushUndoStop(),t.executeEdits(this.id,n,o),t.pushUndoStop()}}class Vy extends me{constructor(){super({id:Vy.ID,label:p("lines.trimTrailingWhitespace","Trim Trailing Whitespace"),alias:"Trim Trailing Whitespace",precondition:N.writable,kbOpts:{kbExpr:N.editorTextFocus,primary:zi(2089,2102),weight:100}})}run(e,t,i){let n=[];i.reason==="auto-save"&&(n=(t.getSelections()||[]).map(a=>new H(a.positionLineNumber,a.positionColumn)));const o=t.getSelection();if(o===null)return;const r=new Qme(o,n);t.pushUndoStop(),t.executeCommands(this.id,[r]),t.pushUndoStop()}}Vy.ID="editor.action.trimTrailingWhitespace";class u_e extends me{constructor(){super({id:"editor.action.deleteLines",label:p("lines.delete","Delete Line"),alias:"Delete Line",precondition:N.writable,kbOpts:{kbExpr:N.textInputFocus,primary:3113,weight:100}})}run(e,t){if(!t.hasModel())return;const i=this._getLinesToRemove(t),n=t.getModel();if(n.getLineCount()===1&&n.getLineMaxColumn(1)===1)return;let o=0;const r=[],a=[];for(let l=0,c=i.length;l<c;l++){const d=i[l];let u=d.startLineNumber,h=d.endLineNumber,f=1,g=n.getLineMaxColumn(h);h<n.getLineCount()?(h+=1,g=1):u>1&&(u-=1,f=n.getLineMaxColumn(u)),r.push(ti.replace(new le(u,f,h,g),"")),a.push(new le(u-o,d.positionColumn,u-o,d.positionColumn)),o+=d.endLineNumber-d.startLineNumber+1}t.pushUndoStop(),t.executeEdits(this.id,r,a),t.pushUndoStop()}_getLinesToRemove(e){const t=e.getSelections().map(o=>{let r=o.endLineNumber;return o.startLineNumber<o.endLineNumber&&o.endColumn===1&&(r-=1),{startLineNumber:o.startLineNumber,selectionStartColumn:o.selectionStartColumn,endLineNumber:r,positionColumn:o.positionColumn}});t.sort((o,r)=>o.startLineNumber===r.startLineNumber?o.endLineNumber-r.endLineNumber:o.startLineNumber-r.startLineNumber);const i=[];let n=t[0];for(let o=1;o<t.length;o++)n.endLineNumber+1>=t[o].startLineNumber?n.endLineNumber=t[o].endLineNumber:(i.push(n),n=t[o]);return i.push(n),i}}class h_e extends me{constructor(){super({id:"editor.action.indentLines",label:p("lines.indent","Indent Line"),alias:"Indent Line",precondition:N.writable,kbOpts:{kbExpr:N.editorTextFocus,primary:2137,weight:100}})}run(e,t){const i=t._getViewModel();!i||(t.pushUndoStop(),t.executeCommands(this.id,ei.indent(i.cursorConfig,t.getModel(),t.getSelections())),t.pushUndoStop())}}class f_e extends me{constructor(){super({id:"editor.action.outdentLines",label:p("lines.outdent","Outdent Line"),alias:"Outdent Line",precondition:N.writable,kbOpts:{kbExpr:N.editorTextFocus,primary:2135,weight:100}})}run(e,t){rg.Outdent.runEditorCommand(e,t,null)}}class g_e extends me{constructor(){super({id:"editor.action.insertLineBefore",label:p("lines.insertBefore","Insert Line Above"),alias:"Insert Line Above",precondition:N.writable,kbOpts:{kbExpr:N.editorTextFocus,primary:3075,weight:100}})}run(e,t){const i=t._getViewModel();!i||(t.pushUndoStop(),t.executeCommands(this.id,ei.lineInsertBefore(i.cursorConfig,t.getModel(),t.getSelections())))}}class p_e extends me{constructor(){super({id:"editor.action.insertLineAfter",label:p("lines.insertAfter","Insert Line Below"),alias:"Insert Line Below",precondition:N.writable,kbOpts:{kbExpr:N.editorTextFocus,primary:2051,weight:100}})}run(e,t){const i=t._getViewModel();!i||(t.pushUndoStop(),t.executeCommands(this.id,ei.lineInsertAfter(i.cursorConfig,t.getModel(),t.getSelections())))}}class bV extends me{run(e,t){if(!t.hasModel())return;const i=t.getSelection(),n=this._getRangesToDelete(t),o=[];for(let l=0,c=n.length-1;l<c;l++){const d=n[l],u=n[l+1];L.intersectRanges(d,u)===null?o.push(d):n[l+1]=L.plusRange(d,u)}o.push(n[n.length-1]);const r=this._getEndCursorState(i,o),a=o.map(l=>ti.replace(l,""));t.pushUndoStop(),t.executeEdits(this.id,a,r),t.pushUndoStop()}}class m_e extends bV{constructor(){super({id:"deleteAllLeft",label:p("lines.deleteAllLeft","Delete All Left"),alias:"Delete All Left",precondition:N.writable,kbOpts:{kbExpr:N.textInputFocus,primary:0,mac:{primary:2049},weight:100}})}_getEndCursorState(e,t){let i=null;const n=[];let o=0;return t.forEach(r=>{let a;if(r.endColumn===1&&o>0){const l=r.startLineNumber-o;a=new le(l,r.startColumn,l,r.startColumn)}else a=new le(r.startLineNumber,r.startColumn,r.startLineNumber,r.startColumn);o+=r.endLineNumber-r.startLineNumber,r.intersectRanges(e)?i=a:n.push(a)}),i&&n.unshift(i),n}_getRangesToDelete(e){const t=e.getSelections();if(t===null)return[];let i=t;const n=e.getModel();return n===null?[]:(i.sort(L.compareRangesUsingStarts),i=i.map(o=>{if(o.isEmpty())if(o.startColumn===1){const r=Math.max(1,o.startLineNumber-1),a=o.startLineNumber===1?1:n.getLineContent(r).length+1;return new L(r,a,o.startLineNumber,1)}else return new L(o.startLineNumber,1,o.startLineNumber,o.startColumn);else return new L(o.startLineNumber,1,o.endLineNumber,o.endColumn)}),i)}}class __e extends bV{constructor(){super({id:"deleteAllRight",label:p("lines.deleteAllRight","Delete All Right"),alias:"Delete All Right",precondition:N
Line truncated
|
|
|
|
|
`);return new Rb(e,t,n,c,o,r,d)}addSelectionToNextFindMatch(){if(!this._editor.hasModel())return null;const e=this._getNextMatch();if(!e)return null;const t=this._editor.getSelections();return new Qv(t.concat(e),e,0)}moveSelectionToNextFindMatch(){if(!this._editor.hasModel())return null;const e=this._getNextMatch();if(!e)return null;const t=this._editor.getSelections();return new Qv(t.slice(0,t.length-1).concat(e),e,0)}_getNextMatch(){if(!this._editor.hasModel())return null;if(this.currentMatch){const n=this.currentMatch;return this.currentMatch=null,n}this.findController.highlightFindOptions();const e=this._editor.getSelections(),t=e[e.length-1],i=this._editor.getModel().findNextMatch(this.searchText,t.getEndPosition(),!1,this.matchCase,this.wholeWord?this._editor.getOption(119):null,!1);return i?new le(i.range.startLineNumber,i.range.startColumn,i.range.endLineNumber,i.range.endColumn):null}addSelectionToPreviousFindMatch(){if(!this._editor.hasModel())return null;const e=this._getPreviousMatch();if(!e)return null;const t=this._editor.getSelections();return new Qv(t.concat(e),e,0)}moveSelectionToPreviousFindMatch(){if(!this._editor.hasModel())return null;const e=this._getPreviousMatch();if(!e)return null;const t=this._editor.getSelections();return new Qv(t.slice(0,t.length-1).concat(e),e,0)}_getPreviousMatch(){if(!this._editor.hasModel())return null;if(this.currentMatch){const n=this.currentMatch;return this.currentMatch=null,n}this.findController.highlightFindOptions();const e=this._editor.getSelections(),t=e[e.length-1],i=this._editor.getModel().findPreviousMatch(this.searchText,t.getStartPosition(),!1,this.matchCase,this.wholeWord?this._editor.getOption(119):null,!1);return i?new le(i.range.startLineNumber,i.range.startColumn,i.range.endLineNumber,i.range.endColumn):null}selectAll(e){if(!this._editor.hasModel())return[];this.findController.highlightFindOptions();const t=this._editor.getModel();return e?t.findMatches(this.searchText,e,!1,this.matchCase,this.wholeWord?this._editor.getOption(119):null,!1,1073741824):t.findMatches(this.searchText,!0,!1,this.matchCase,this.wholeWord?this._editor.getOption(119):null,!1,1073741824)}}class Sh extends q{constructor(e){super(),this._sessionDispose=this._register(new ee),this._editor=e,this._ignoreSelectionChange=!1,this._session=null}static get(e){return e.getContribution(Sh.ID)}dispose(){this._endSession(),super.dispose()}_beginSessionIfNeeded(e){if(!this._session){const t=Rb.create(this._editor,e);if(!t)return;this._session=t;const i={searchString:this._session.searchText};this._session.isDisconnectedFromFindController&&(i.wholeWordOverride=1,i.matchCaseOverride=1,i.isRegexOverride=2),e.getState().change(i,!1),this._sessionDispose.add(this._editor.onDidChangeCursorSelection(n=>{this._ignoreSelectionChange||this._endSession()})),this._sessionDispose.add(this._editor.onDidBlurEditorText(()=>{this._endSession()})),this._sessionDispose.add(e.getState().onFindReplaceStateChange(n=>{(n.matchCase||n.wholeWord)&&this._endSession()}))}}_endSession(){if(this._sessionDispose.clear(),this._session&&this._session.isDisconnectedFromFindController){const e={wholeWordOverride:0,matchCaseOverride:0,isRegexOverride:0};this._session.findController.getState().change(e,!1)}this._session=null}_setSelections(e){this._ignoreSelectionChange=!0,this._editor.setSelections(e),this._ignoreSelectionChange=!1}_expandEmptyToWord(e,t){if(!t.isEmpty())return t;const i=this._editor.getConfiguredWordAtPosition(t.getStartPosition());return i?new le(t.startLineNumber,i.startColumn,t.startLineNumber,i.endColumn):t}_applySessionResult(e){!e||(this._setSelections(e.selections),e.revealRange&&this._editor.revealRangeInCenterIfOutsideViewport(e.revealRange,e.revealScrollType))}getSession(e){return this._session}addSelectionToNextFindMatch(e){if(!!this._editor.hasModel()){if(!this._session){const t=this._editor.getSelections();if(t.length>1){const n=e.getState().matchCase;if(!kV(this._editor.getModel(),t,n)){const r=this._editor.getModel(),a=[];for(let l=0,c=t.length;l<c;l++)a[l]=this._expandEmptyToWord(r,t[l]);this._editor.setSelections(a);return}}}this._beginSessionIfNeeded(e),this._session&&this._applySessionResult(this._session.addSelectionToNextFindMatch())}}addSelectionToPreviousFindMatch(e){this._beginSessionIfNeeded(e),this._session&&this._applySessionResult(this._session.addSelectionToPreviousFindMatch())}moveSelectionToNextFindMatch(e){this._beginSessionIfNeeded(e),this._session&&this._applySessionResult(this._session.moveSelectionToNextFindMatch())}moveSelectionToPreviousFindMatch(e){this._beginSessionIfNeeded(e),this._session&&this._applySessionResult(this._session.moveSelectionToPreviousFindMatch())}selectAll(e){if(!this._editor.hasModel())return;let t=null;const i=e.getState();if(i.isRevealed&&i.searchString.length>0&&i.isRegex){const n=this._editor.getModel();i.searchScope?t=n.findMatches(i.searchString,i.searchScope,i.isRegex,i.matchCase,i.wholeWord?this._editor.getOption(119):null,!1,10
Line truncated
|
|
|
|
|
`):void 0}:{range:L.fromPositions(this.position),text:"",rejectReason:t.length>0?t.join(`
|
|
|
|
|
`):void 0}})}provideRenameEdits(e,t){return ju(this,void 0,void 0,function*(){return this._provideRenameEdits(e,this._providerRenameIdx,[],t)})}_provideRenameEdits(e,t,i,n){return ju(this,void 0,void 0,function*(){const o=this._providers[t];if(!o)return{edits:[],rejectReason:i.join(`
|
|
|
|
|
`)};const r=yield o.provideRenameEdits(this.model,this.position,e,n);if(r){if(r.rejectReason)return this._provideRenameEdits(e,t+1,i.concat(r.rejectReason),n)}else return this._provideRenameEdits(e,t+1,i.concat(p("no result","No result.")),n);return r})}}function sbe(s,e,t,i){return ju(this,void 0,void 0,function*(){const n=new vM(e,t,s),o=yield n.resolveRenameLocation(Qe.None);return o!=null&&o.rejectReason?{edits:[],rejectReason:o.rejectReason}:n.provideRenameEdits(i,Qe.None)})}let Dh=class TV{constructor(e,t,i,n,o,r,a,l){this.editor=e,this._instaService=t,this._notificationService=i,this._bulkEditService=n,this._progressService=o,this._logService=r,this._configService=a,this._languageFeaturesService=l,this._disposableStore=new ee,this._cts=new Cn,this._renameInputField=this._disposableStore.add(new qc(()=>this._disposableStore.add(this._instaService.createInstance(yT,this.editor,["acceptRenameInput","acceptRenameInputWithPreview"]))))}static get(e){return e.getContribution(TV.ID)}dispose(){this._disposableStore.dispose(),this._cts.dispose(!0)}run(){var e,t;return ju(this,void 0,void 0,function*(){if(this._cts.dispose(!0),!this.editor.hasModel())return;const i=this.editor.getPosition(),n=new vM(this.editor.getModel(),i,this._languageFeaturesService.renameProvider);if(!n.hasProvider())return;this._cts=new uh(this.editor,5);let o;try{const h=n.resolveRenameLocation(this._cts.token);this._progressService.showWhile(h,250),o=yield h}catch(h){(e=Vs.get(this.editor))===null||e===void 0||e.showMessage(h||p("resolveRenameLocationFailed","An unknown error occurred while resolving rename location"),i);return}if(!o)return;if(o.rejectReason){(t=Vs.get(this.editor))===null||t===void 0||t.showMessage(o.rejectReason,i);return}if(this._cts.token.isCancellationRequested)return;this._cts.dispose(),this._cts=new uh(this.editor,5,o.range);const r=this.editor.getSelection();let a=0,l=o.text.length;!L.isEmpty(r)&&!L.spansMultipleLines(r)&&L.containsRange(o.range,r)&&(a=Math.max(0,r.startColumn-o.range.startColumn),l=Math.min(o.range.endColumn,r.endColumn)-o.range.startColumn);const c=this._bulkEditService.hasPreviewHandler()&&this._configService.getValue(this.editor.getModel().uri,"editor.rename.enablePreview"),d=yield this._renameInputField.value.getInput(o.range,o.text,a,l,c,this._cts.token);if(typeof d=="boolean"){d&&this.editor.focus();return}this.editor.focus();const u=FN(n.provideRenameEdits(d.newName,this._cts.token),this._cts.token).then(h=>ju(this,void 0,void 0,function*(){if(!(!h||!this.editor.hasModel())){if(h.rejectReason){this._notificationService.info(h.rejectReason);return}this.editor.setSelection(L.fromPositions(this.editor.getSelection().getPosition())),this._bulkEditService.apply(Ep.convert(h),{editor:this.editor,showPreview:d.wantsPreview,label:p("label","Renaming '{0}' to '{1}'",o==null?void 0:o.text,d.newName),code:"undoredo.rename",quotableLabel:p("quotableLabel","Renaming {0} to {1}",o==null?void 0:o.text,d.newName),respectAutoSaveConfig:!0}).then(f=>{f.ariaSummary&&_n(p("aria","Successfully renamed '{0}' to '{1}'. Summary: {2}",o.text,d.newName,f.ariaSummary))}).catch(f=>{this._notificationService.error(p("rename.failedApply","Rename failed to apply edits")),this._logService.error(f)})}}),h=>{this._notificationService.error(p("rename.failed","Rename failed to compute edits")),this._logService.error(h)});return this._progressService.showWhile(u,250),u})}acceptRenameInput(e){this._renameInputField.value.acceptInput(e)}cancelRenameInput(){this._renameInputField.value.cancelInput(!0)}};Dh.ID="editor.contrib.renameController";Dh=nbe([Qd(1,Ue),Qd(2,Ii),Qd(3,r0),Qd(4,Ad),Qd(5,cr),Qd(6,$N),Qd(7,be)],Dh);class obe extends me{constructor(){super({id:"editor.action.rename",label:p("rename.label","Rename Symbol"),alias:"Rename Symbol",precondition:ce.and(N.writable,N.hasRenameProvider),kbOpts:{kbExpr:N.editorTextFocus,primary:60,weight:100},contextMenuOpts:{group:"1_modification",order:1.1}})}runCommand(e,t){const i=e.get(wt),[n,o]=Array.isArray(t)&&t||[void 0,void 0];return Ie.isUri(n)&&H.isIPosition(o)?i.openCodeEditor({resource:n},i.getActiveCodeEditor()).then(r=>{!r||(r.setPosition(o),r.invokeWithinContext(a=>(this.reportTelemetry(a,r),this.run(a,r))))},$e):super.runCommand(e,t)}run(e,t){const i=Dh.get(t);return i?i.run():Promise.resolve()}}ft(Dh.ID,Dh);oe(obe);const CM=dn.bindToContribution(Dh.get);ne(new CM({id:"acceptRenameInput",precondition:zy,handler:s=>s.acceptRenameInput(!1),kbOpts:{weight:100+99,kbExpr:N.focus,primary:3}}));ne(new CM({id:"acceptRenameInputWithPreview",precondition:ce.and(zy,ce.has("config.editor.rename.enablePreview")),handler:s=>s.acceptRenameInput(!0),kbOpts:{weight:100+99,kbExpr:N.focus,primary:1024+3}}));ne(new CM({id:"cancelRenameInput",precondition:zy,handler:s=>s.cancelRenameInput(),kbOpts:{weight:100+99,kbExpr:N.focus,primary:9,secondary:[1033]}}));Ya("_executeDocumentRenameProvider",function(s,e,t,...i){const[n]=i;Nt(typeof n=="string");const{renameProvider:o}=s.get(be);return
Line truncated
|
|
|
|
|
|
|
|
|
|
- `+o;break;case 2:n+=`
|
|
|
|
|
|
|
|
|
|
- `+Ti.auto_on;break;case 1:n+=`
|
|
|
|
|
|
|
|
|
|
- `+Ti.auto_off,n+=" "+o;break}e.get(132)?n+=`
|
|
|
|
|
|
|
|
|
|
- `+this._descriptionForCommand(ap.ID,Ti.tabFocusModeOnMsg,Ti.tabFocusModeOnMsgNoKb):n+=`
|
|
|
|
|
|
|
|
|
|
- `+this._descriptionForCommand(ap.ID,Ti.tabFocusModeOffMsg,Ti.tabFocusModeOffMsgNoKb);const r=st?Ti.openDocMac:Ti.openDocWinLinux;n+=`
|
|
|
|
|
|
|
|
|
|
- `+r,n+=`
|
|
|
|
|
|
|
|
|
|
`+Ti.outroMsg,this._contentDomNode.domNode.appendChild(a6(n)),this._contentDomNode.domNode.setAttribute("aria-label",n)}hide(){!this._isVisible||(this._isVisible=!1,this._isVisibleKey.reset(),this._domNode.setDisplay("none"),this._domNode.setAttribute("aria-hidden","true"),this._contentDomNode.domNode.tabIndex=-1,Hi(this._contentDomNode.domNode),this._editor.focus())}_layout(){const e=this._editor.getLayoutInfo(),t=Math.max(5,Math.min(OC.WIDTH,e.width-40)),i=Math.max(5,Math.min(OC.HEIGHT,e.height-40));this._domNode.setWidth(t),this._domNode.setHeight(i);const n=Math.round((e.height-i)/2);this._domNode.setTop(n);const o=Math.round((e.width-t)/2);this._domNode.setLeft(o)}};cp.ID="editor.contrib.accessibilityHelpWidget";cp.WIDTH=500;cp.HEIGHT=300;cp=UV([RC(1,Be),RC(2,qi),RC(3,zo)],cp);class y0e extends me{constructor(){super({id:"editor.action.showAccessibilityHelp",label:Ti.showAccessibilityHelpAction,alias:"Show Accessibility Help",precondition:void 0,kbOpts:{primary:571,weight:100,linux:{primary:1595,secondary:[571]}}})}run(e,t){const i=Eh.get(t);i&&i.show()}}ft(Eh.ID,Eh);oe(y0e);const L0e=dn.bindToContribution(Eh.get);ne(new L0e({id:"closeAccessibilityHelp",precondition:jV,handler:s=>s.hide(),kbOpts:{weight:100+100,kbExpr:N.focus,primary:9,secondary:[1033]}}));qt((s,e)=>{const t=s.getColor(xi);t&&e.addRule(`.monaco-editor .accessibilityHelpWidget { background-color: ${t}; }`);const i=s.getColor(Ir);i&&e.addRule(`.monaco-editor .accessibilityHelpWidget { color: ${i}; }`);const n=s.getColor(Er);n&&e.addRule(`.monaco-editor .accessibilityHelpWidget { box-shadow: 0 2px 8px ${n}; }`);const o=s.getColor(Ye);o&&e.addRule(`.monaco-editor .accessibilityHelpWidget { border: 2px solid ${o}; }`)});class MT extends q{constructor(e){super(),this.editor=e,this.widget=null,Fa&&(this._register(e.onDidChangeConfiguration(()=>this.update())),this.update())}update(){const e=!this.editor.getOption(83);!this.widget&&e?this.widget=new qy(this.editor):this.widget&&!e&&(this.widget.dispose(),this.widget=null)}dispose(){super.dispose(),this.widget&&(this.widget.dispose(),this.widget=null)}}MT.ID="editor.contrib.iPadShowKeyboard";class qy extends q{constructor(e){super(),this.editor=e,this._domNode=document.createElement("textarea"),this._domNode.className="iPadShowKeyboard",this._register(Q(this._domNode,"touchstart",t=>{this.editor.focus()})),this._register(Q(this._domNode,"focus",t=>{this.editor.focus()})),this.editor.addOverlayWidget(this)}dispose(){this.editor.removeOverlayWidget(this),super.dispose()}getId(){return qy.ID}getDomNode(){return this._domNode}getPosition(){return{preference:1}}}qy.ID="editor.contrib.ShowKeyboardWidget";ft(MT.ID,MT);var k0e=globalThis&&globalThis.__decorate||function(s,e,t,i){var n=arguments.length,o=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(s,e,t,i);else for(var a=s.length-1;a>=0;a--)(r=s[a])&&(o=(n<3?r(o):n>3?r(e,t,o):r(e,t))||o);return n>3&&o&&Object.defineProperty(e,t,o),o},aF=globalThis&&globalThis.__param||function(s,e){return function(t,i){e(t,i,s)}};let dp=class qV extends q{constructor(e,t,i){super(),this._editor=e,this._languageService=i,this._widget=null,this._register(this._editor.onDidChangeModel(n=>this.stop())),this._register(this._editor.onDidChangeModelLanguage(n=>this.stop())),this._register(ni.onDidChange(n=>this.stop())),this._register(this._editor.onKeyUp(n=>n.keyCode===9&&this.stop()))}static get(e){return e.getContribution(qV.ID)}dispose(){this.stop(),super.dispose()}launch(){this._widget||!this._editor.hasModel()||(this._widget=new Gy(this._editor,this._languageService))}stop(){this._widget&&(this._widget.dispose(),this._widget=null)}};dp.ID="editor.contrib.inspectTokens";dp=k0e([aF(1,go),aF(2,ri)],dp);class D0e extends me{constructor(){super({id:"editor.action.inspectTokens",label:SE.inspectTokensAction,alias:"Developer: Inspect Tokens",precondition:void 0})}run(e,t){const i=dp.get(t);i&&i.launch()}}function x0e(s){let e="";for(let t=0,i=s.length;t<i;t++){const n=s.charCodeAt(t);switch(n){case 9:e+="\u2192";break;case 32:e+="\xB7";break;default:e+=String.fromCharCode(n)}}return e}function E0e(s,e){const t=ni.get(e);if(t)return t;const i=s.encodeLanguageId(e);return{getInitialState:()=>Ig,tokenize:(n,o,r)=>PN(e,r),tokenizeEncoded:(n,o,r)=>lS(i,r)}}class Gy extends q{constructor(e,t){super(),this.allowEditorOverflow=!0,this._editor=e,this._languageService=t,this._model=this._editor.getModel(),this._domNode=document.createElement("div"),this._domNode.className="tokens-inspect-widget",this._tokenizationSupport=E0e(this._languageService.languageIdCodec,this._model.getLanguageId()),this._compute(this._editor.getPosition()),this._register(this._editor.onDidChangeCursorPosition(i=>this._compute(this._editor.getPosition()))),this._editor.addContentWidget(this)}dispose(){this._editor.removeContentWidget(this),super.dispose()}getId(){return Gy._ID}_compute(e){const t=this._getTokensAtLi
Line truncated
|
|
|
|
|
`):s}function gF(s){return typeof s.code=="string"&&typeof s.errno=="number"&&typeof s.syscall=="string"?p("nodeExceptionMessage","A system error occurred ({0})",s.message):s.message||p("error.defaultMessage","An unknown error occurred. Please consult the log for more details.")}function QV(s=null,e=!1){if(!s)return p("error.defaultMessage","An unknown error occurred. Please consult the log for more details.");if(Array.isArray(s)){const t=$b(s),i=QV(t[0],e);return t.length>1?p("error.moreErrors","{0} ({1} errors in total)",i,t.length):i}if(Ss(s))return s;if(s.detail){const t=s.detail;if(t.error)return cD(t.error,e);if(t.exception)return cD(t.exception,e)}return s.stack?cD(s,e):s.message?s.message:p("error.defaultMessage","An unknown error occurred. Please consult the log for more details.")}var eC=globalThis&&globalThis.__awaiter||function(s,e,t,i){function n(o){return o instanceof t?o:new t(function(r){r(o)})}return new(t||(t=Promise))(function(o,r){function a(d){try{c(i.next(d))}catch(u){r(u)}}function l(d){try{c(i.throw(d))}catch(u){r(u)}}function c(d){d.done?o(d.value):n(d.value).then(a,l)}c((i=i.apply(s,e||[])).next())})},jf;(function(s){s[s.NO_ACTION=0]="NO_ACTION",s[s.CLOSE_PICKER=1]="CLOSE_PICKER",s[s.REFRESH_PICKER=2]="REFRESH_PICKER",s[s.REMOVE_ITEM=3]="REMOVE_ITEM"})(jf||(jf={}));function dD(s){const e=s;return Array.isArray(e.items)}function F0e(s){const e=s;return!!e.picks&&e.additionalPicks instanceof Promise}class Yy extends q{constructor(e,t){super(),this.prefix=e,this.options=t}provide(e,t){var i;const n=new ee;e.canAcceptInBackground=!!(!((i=this.options)===null||i===void 0)&&i.canAcceptInBackground),e.matchOnLabel=e.matchOnDescription=e.matchOnDetail=e.sortByLabel=!1;let o;const r=n.add(new jn),a=()=>eC(this,void 0,void 0,function*(){const l=r.value=new ee;o==null||o.dispose(!0),e.busy=!1,o=new Cn(t);const c=o.token,d=e.value.substr(this.prefix.length).trim(),u=this._getPicks(d,l,c),h=(f,g)=>{var _;let b,v;if(dD(f)?(b=f.items,v=f.active):b=f,b.length===0){if(g)return!1;d.length>0&&((_=this.options)===null||_===void 0?void 0:_.noResultsPick)&&(b=[this.options.noResultsPick])}return e.items=b,v&&(e.activeItems=[v]),!0};if(u!==null)if(F0e(u)){let f=!1,g=!1;yield Promise.all([(()=>eC(this,void 0,void 0,function*(){yield cd(Yy.FAST_PICKS_RACE_DELAY),!c.isCancellationRequested&&(g||(f=h(u.picks,!0)))}))(),(()=>eC(this,void 0,void 0,function*(){e.busy=!0;try{const _=yield u.additionalPicks;if(c.isCancellationRequested)return;let b,v;dD(u.picks)?(b=u.picks.items,v=u.picks.active):b=u.picks;let C,w;if(dD(_)?(C=_.items,w=_.active):C=_,C.length>0||!f){let S;if(!v&&!w){const D=e.activeItems[0];D&&b.indexOf(D)!==-1&&(S=D)}h({items:[...b,...C],active:v||w||S})}}finally{c.isCancellationRequested||(e.busy=!1),g=!0}}))()])}else if(!(u instanceof Promise))h(u);else{e.busy=!0;try{const f=yield u;if(c.isCancellationRequested)return;h(f)}finally{c.isCancellationRequested||(e.busy=!1)}}});return n.add(e.onDidChangeValue(()=>a())),a(),n.add(e.onDidAccept(l=>{const[c]=e.selectedItems;typeof(c==null?void 0:c.accept)=="function"&&(l.inBackground||e.hide(),c.accept(e.keyMods,l))})),n.add(e.onDidTriggerItemButton(({button:l,item:c})=>eC(this,void 0,void 0,function*(){var d,u;if(typeof c.trigger=="function"){const h=(u=(d=c.buttons)===null||d===void 0?void 0:d.indexOf(l))!==null&&u!==void 0?u:-1;if(h>=0){const f=c.trigger(h,e.keyMods),g=typeof f=="number"?f:yield f;if(t.isCancellationRequested)return;switch(g){case jf.NO_ACTION:break;case jf.CLOSE_PICKER:e.hide();break;case jf.REFRESH_PICKER:a();break;case jf.REMOVE_ITEM:{const _=e.items.indexOf(c);if(_!==-1){const b=e.items.slice(),v=b.splice(_,1),C=e.activeItems.filter(S=>S!==v[0]),w=e.keepScrollPosition;e.keepScrollPosition=!0,e.items=b,C&&(e.activeItems=C),e.keepScrollPosition=w}break}}}}}))),n}}Yy.FAST_PICKS_RACE_DELAY=200;var JV=globalThis&&globalThis.__decorate||function(s,e,t,i){var n=arguments.length,o=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(s,e,t,i);else for(var a=s.length-1;a>=0;a--)(r=s[a])&&(o=(n<3?r(o):n>3?r(e,t,o):r(e,t))||o);return n>3&&o&&Object.defineProperty(e,t,o),o},pu=globalThis&&globalThis.__param||function(s,e){return function(t,i){e(t,i,s)}},pF=globalThis&&globalThis.__awaiter||function(s,e,t,i){function n(o){return o instanceof t?o:new t(function(r){r(o)})}return new(t||(t=Promise))(function(o,r){function a(d){try{c(i.next(d))}catch(u){r(u)}}function l(d){try{c(i.throw(d))}catch(u){r(u)}}function c(d){d.done?o(d.value):n(d.value).then(a,l)}c((i=i.apply(s,e||[])).next())})};let Wb=class FC extends Yy{constructor(e,t,i,n,o,r){super(FC.PREFIX,e),this.instantiationService=t,this.keybindingService=i,this.commandService=n,this.telemetryService=o,this.dialogService=r,this.commandsHistory=this._register(this.instantiationService.createInstance(Ih)),this.options=e}_getPicks(e,t,i){return pF(this,void 0,void 0,function*(){const n=yield this.getComman
Line truncated
|
|
|
|
|
This won't affect your normal use, but lack of template type support.
|
|
|
|
|
\u672A\u6210\u529F\u52A0\u8F7Druntime.d.ts\uFF0C\u8BF7\u68C0\u67E5\u4F60\u7684\u672C\u5730\u670D\u52A1\u5668\uFF0C\u8FD9\u4E0D\u4F1A\u5F71\u54CD\u4F60\u7684\u6B63\u5E38\u4F7F\u7528\uFF0C\u4F46\u662F\u4F1A\u8BA9\u6837\u677F\u7684\u7C7B\u578B\u6807\u6CE8\u5931\u6548\u3002
|
|
|
|
|
Error info: ${s}`);iB.typescript.javascriptDefaults.addExtraLib(LZString.decompressFromBase64(e))}),fs.mkdir("_ui",s=>{s&&alert("\u81EA\u52A8\u521B\u5EFA_ui\u6587\u4EF6\u5939\u5931\u8D25\uFF0C\u8BF7\u81EA\u884C\u5728\u6837\u677F\u6839\u76EE\u5F55\u521B\u5EFA\u540D\u4E3A_ui\u7684\u6587\u4EF6\u5939")})});ly.defineTheme("light-plus",Z0e);ly.defineTheme("dark-plus",eve);const Bw={},tve=["selected"],ive=["id"],nve={key:2,id:"now"},sve=["src"],ove=xd({__name:"imgOption",props:{name:null,selected:null,type:null},emits:["select"],setup(s,{emit:e}){var r;const t=s,i=(r=core.getBlockInfo(t.name))!=null?r:{image:core.statusBar.icons[t.name],posX:0,posY:0,height:32},n=Xt(!1);tN(()=>{if(t.type!=="string_icon")return;const a=document.getElementById(`icon-${t.name}`);a.style.width="32px",a.style.height=`${i.height}px`,a.width=32,a.height=i.height;const l=a.getContext("2d");core.drawIcon(l,t.name,0,0)});function o(){e("select",t.name)}return(a,l)=>(He(),Xe(Ai,null,[Me("div",{id:"img-option",selected:s.selected===s.name},[Me("button",{onClick:o},"\u9009\u62E9"),s.type==="string_icon"?(He(),Xe("canvas",{key:0,id:`icon-${s.name}`,ref_key:"icon",ref:m7},null,8,ive)):Hn("",!0),s.type==="string_img"?(He(),Xe("button",{key:1,id:"preview",onClick:l[0]||(l[0]=c=>n.value=!n.value)},"\u9884\u89C8")):Hn("",!0),Me("span",null,Wn(s.name),1),s.selected===s.name?(He(),Xe("span",nve,"\u5F53\u524D\u9009\u4E2D")):Hn("",!0)],8,tve),s.type==="string_img"&&n.value?(He(),Xe("img",{key:0,src:`project/images/${s.name}`},null,8,sve)):Hn("",!0)],64))}});const Vd=(s,e)=>{const t=s.__vccOpts||s;for(const[i,n]of e)t[i]=n;return t},rve=Vd(ove,[["__scopeId","data-v-eab3044b"]]),DM=s=>(pp("data-v-59d45894"),s=s(),mp(),s),ave={id:"img-selector"},lve={id:"img-tools"},cve={key:0,id:"type"},dve=DM(()=>Me("span",{id:"arrow"},"\u25B2",-1)),uve=DM(()=>Me("span",{id:"s-type"},"\u9009\u62E9\u7C7B\u578B",-1)),hve=[dve,uve],fve={key:0,id:"type-all"},gve={class:"type-one"},pve=["value","checked"],mve={class:""},_ve=DM(()=>Me("hr",null,null,-1)),bve={id:"options"},vve=xd({__name:"imgSelector",props:{type:null,selected:null},emits:["select","close"],setup(s,{emit:e}){const t=s,i=t.selected,n=Xt(""),o=Xt(core.materials.slice(0,-1).concat(["status"]));let r;const a=Xt(!1),l=core.materials.slice(0,-1).concat(["status",...Object.keys(core.material.images.tilesets).map(w=>w.slice(0,-4))]);let c=Xt(d());function d(){if(t.type==="string_img")return main.images.filter(h);{let w=[];o.value.includes("status")&&w.push(...Object.keys(core.statusBar.icons).filter(h));for(const D of core.materials){if(!o.value.includes(D))continue;const x=core.material.icons[D];if(!x)throw new ReferenceError(`Unexpected undeclration of icons in core.material.icons.
|
|
|
|
|
Type: ${D}.`);w.push(...Object.keys(x).filter(y=>!w.includes(y)).filter(h))}const S=Object.keys(core.material.images.tilesets);for(let D=0;D<S.length;D++){const x=S[D];!o.value.includes(x.slice(0,-4))||w.push(...u(x,D).filter(h))}return w}}function u(w,S){const D=core.material.images.tilesets[w],x=~~(D.width/32),y=~~(D.height/32);return new Array(x*y).fill(0).map((k,I)=>`X${(S+1)*1e4+I+1}`)}function h(w){if(/^\/[^]+\/[a-zA-Z]*$/.test(n.value)){const S=n.value.split("/");try{return new RegExp(S[1],S[2]).test(w)}catch{}}else return w.toLowerCase().includes(n.value.toLowerCase())}Hl(n,w=>{clearTimeout(r),r=window.setTimeout(()=>{n.value=w,c.value=d(),f()},300)});function f(){document.getElementById("options").scrollTo(0,0)}function g(w){e("select",w)}function _(){e("select",i),b()}function b(){e("close")}function v(w){const S=w.currentTarget,D=S.children[0];S.style.borderBottomLeftRadius=`${a.value?5:0}px`,S.style.borderBottomRightRadius=`${a.value?5:0}px`,D.style.transform=`rotate(${a.value?90:180}deg)`,a.value=!a.value}function C(w){const S=w.currentTarget,D=S.value;S.checked?o.value.push(D):o.value=o.value.filter(x=>x!==D),c.value=d(),f()}return(w,S)=>(He(),Xe("div",ave,[Me("div",lve,[Me("button",{id:"img-confirm",onClick:b},"\u786E\u5B9A"),Me("button",{id:"img-cancel",onClick:_},"\u53D6\u6D88"),Ac(Me("input",{id:"search-input","onUpdate:modelValue":S[0]||(S[0]=D=>n.value=D),placeholder:"\u8F93\u5165\u5B57\u7B26\u6216\u4F7F\u7528 /RegExp/ \u7684\u5F62\u5F0F\u4F7F\u7528\u6B63\u5219\u8868\u8FBE\u5F0F\u641C\u7D22"},null,512),[[jC,n.value,void 0,{trim:!0}]]),s.type==="string_icon"?(He(),Xe("div",cve,[Me("div",{id:"type-description",onClick:S[1]||(S[1]=D=>v(D))},hve),a.value?(He(),Xe("div",fve,[(He(!0),Xe(Ai,null,ko(Gt(l),D=>(He(),Xe("div",gve,[Me("input",{value:D,type:"checkbox",onChange:S[2]||(S[2]=x=>C(x)),checked:o.value.includes(D)},null,40,pve),Me("span",mve,Wn(D),1)]))),256))])):Hn("",!0)])):Hn("",!0)]),_ve,Me("div",bve,[(He(!0),Xe(Ai,null,ko(Gt(c),D=>(He(),od(rve,{name:D,key:D,type:s.type,selected:s.selected,onSelect:S[3]||(S[3]=x=>g(x))},null,8,["name","type","selected"]))),128))])]))}});const Cve=Vd(vve,[["__scopeId","data-v-59d45894"]]),wve={id:"attr"},Sve={key:0,id:"description"},yve={key:2,id:"readonly"},Lve={key:6,id:"img"},kve={id:"img-display"},Dve={key:7,id:"array"},xve={id:"array-info"},Eve={id:"description"},Ive={key:0,id:"array-detail"},Tve={id:"array-one-info"},Nve={id:"array-one-index"},Ave=["onClick"],Mve={class:"array-one-attr"},Rve=["onBlur","onUpdate:modelValue"],Ove=xd({__name:"attr",props:{value:null,name:null,id:null},emits:["openEditor","change"],setup(s,{expose:e,emit:t}){const i=s,n=Xt(!1),o=oC[i.id][i.name][1],r=["string","number_u","number","number_time"],a=["string_img","string_icon"],l=/^Array<[\u4e00-\u9fa5a-zA-Z,]+>$/.test(o),c=o.includes("|")&&o.split("|"),d=Xt(!1),u=l&&o.slice(6,-1).split(",")||[];let h=Xt(i.value);e({text:r,select:a,value:h,type:o,multiCallback:f,selectImg:d,arrayDetail:n,arrayInfo:u});function f(y){h.value=y}Hl(h,y=>{t("change",y),Mc.value=!1});function g(){o==="number_u"?(/[0-9]+/.test(h.value)||(h.value="0px"),E$.some(y=>h.value.endsWith(y))||(h.value=`${parseFloat(h.value)}px`)):o==="number"?h.value=parseFloat(h.value)||0:o==="number_time"&&(/[0-9]+/.test(h.value)||(h.value="0ms"),["s","ms"].some(y=>h.value.endsWith(y))||(h.value=`${parseFloat(h.value)}ms`))}function _(y){o==="string_multi"&&(Bw.callback=f),t("openEditor",{value:y,lang:"txt"})}function b(){d.value=!0,main.editorOpened=!0}function v(y){h.value=y}function C(){d.value=!1}function w(y,k,I){const P=I.currentTarget.value;h.value[y][k]=parseFloat(P)}function S(y){const k=y.currentTarget;k.style.transform=`rotate(${n.value?90:180}deg)`,n.value=!n.value}function D(){h.value.push(new Array(u.length).fill(0))}function x(y){h.value.splice(y,1)}return(y,k)=>(He(),Xe(Ai,null,[Me("div",wve,[Gt(l)?Hn("",!0):(He(),Xe("span",Sve,Wn(Gt(oC)[s.id][s.name][0]),1)),r.includes(Gt(o))?Ac((He(),Xe("input",{key:1,id:"input",onBlur:g,"onUpdate:modelValue":k[0]||(k[0]=I=>xn(h)?h.value=I:h=I)},null,544)),[[jC,Gt(h),void 0,{trim:!0}]]):Gt(o)==="readonly"?(He(),Xe("span",yve,Wn(Gt(h)),1)):Gt(o)==="string_multi"?(He(),Xe("button",{key:3,id:"multi",onClick:k[1]||(k[1]=I=>_(Gt(h)))},"\u7F16\u8F91")):Gt(o)==="boolean"?Ac((He(),Xe("input",{key:4,id:"check",type:"checkbox","onUpdate:modelValue":k[2]||(k[2]=I=>xn(h)?h.value=I:h=I)},null,512)),[[u7,Gt(h)]]):Gt(o).includes("|")?Ac((He(),Xe("select",{key:5,id:"select","onUpdate:modelValue":k[3]||(k[3]=I=>xn(h)?h.value=I:h=I)},[(He(!0),Xe(Ai,null,ko(Gt(c),I=>(He(),Xe("option",null,Wn(I),1))),256))],512)),[[h7,Gt(h)]]):a.includes(Gt(o))?(He(),Xe("div",Lve,[Me("button",{id:"select-img",onClick:b},"\u9009\u62E9"),Me("span",kve,Wn(Gt(h)||"\u65E0"),1)])):Gt(l)?(He(),Xe("div",Dve,[Me("div",xve,[Me("span",{id:"array-arrow",onClick:k[4]||(k[4]=I=>S(I))},"\u25B2"),Me("span",Eve,Wn(Gt(oC)[s.id][s.name][0]),1)]),n.value?(He(),Xe("div",Ive,[(He(!0),Xe(Ai,null,ko(Gt(h),(I,R)=>(He(),Xe("di
Line truncated
|
|
|
|
|
// \u4F7F\u7528\u6848\u4F8B\uFF1A
|
|
|
|
|
/*
|
|
|
|
|
\u63D2\u4EF6\u4E2D\uFF1A
|
|
|
|
|
this.showMyUi = function () {
|
|
|
|
|
\u51FD\u6570\u5185\u5BB9
|
|
|
|
|
}
|
|
|
|
|
\u8C03\u7528\u65F6\uFF1A
|
|
|
|
|
core.showMyUi();
|
|
|
|
|
*/
|
|
|
|
|
`,e="",t="",i="";const n=xM=mCe();return await new Promise((o,r)=>{e+=`action_${n[0][0]}_${n[0].at(-1)}();
|
|
|
|
|
`;for(let a=0;a<n.length;a++){const l=n[a],{head:c,func:d}=bCe(l,a);s+=c,i+=d}t+=`function final() {
|
|
|
|
|
`;for(const a in d_)d_[a]===!0&&(t+=`${a}.destroy();
|
|
|
|
|
`);t+=`}
|
|
|
|
|
`,o("success")}),`${s}
|
|
|
|
|
${e}
|
|
|
|
|
${i}
|
|
|
|
|
${t}`}function mCe(){var e;const s=[[]];for(let t=0;t<an.value.length;t++)(e=s.at(-1))==null||e.push(t),an.value[t].type==="wait"&&s.push([]);return s}function _Ce(s){const e=iH(s.name),t=`var ${e} = new Sprite(${s.x}, ${s.y}, ${s.w}, ${s.h}, ${s.z}, 'game', '${e}');
|
|
|
|
|
${e}.setCss('display: none;');
|
|
|
|
|
`,i=`${e}.setCss('display: block;');
|
|
|
|
|
${e}.move(${s.x}, ${s.y});
|
|
|
|
|
${e}.resize(${s.w}, ${s.h});
|
|
|
|
|
${e}.canvas.style.zIndex = '${s.z}';
|
|
|
|
|
`;return d_[e]=!1,{head:t,body:i}}function iH(s){return!s||/^\d?[^\w\s]$/.test(s)?`sprite_${gCe++}`:s.trim().replace(/\s+/g,"_")}function bCe(s,e){const t=`function action_${s[0]}_${s.at(-1)} () {
|
|
|
|
|
`,i=`}
|
|
|
|
|
`;let n="",o="";for(let r=0;r<s.length;r++){const a=an.value[s[r]],l=iH(a.sprite),c=vCe(a.type,l,a.data,e);n+=c.body,o+=c.head}return xM[e+1]||(n+=`final();
|
|
|
|
|
`),{head:o,func:t+n+i}}function vCe(s,e,t,i){var a,l,c,d,u,h;let n="",o="";const r=f=>f!=null;if(s==="wait")o=`setTimeout(${CCe(i)}, ${t.time});
|
|
|
|
|
`;else if(s==="transition"){const f=t,g=`${f.style} ${f.time} ${f.mode} ${f.delay}`;o=`var res = ${e}.canvas.style.transition;
|
|
|
|
|
if (res !== '') res += ', ';
|
|
|
|
|
res += '${g.trim()}';
|
|
|
|
|
${e}.canvas.style.transition = res;
|
|
|
|
|
`}else if(s==="create"){const f=_Ce(t);n=f.head,o=f.body}else if(s==="del")o=`${e}.setCss('display: none');
|
|
|
|
|
`,d_[e]=!0;else if(s==="move"){const f=t;o=`${e}.move(${f.x}, ${f.y}, ${f.isDelta});
|
|
|
|
|
`}else if(s==="resize"){const f=t;o=`${e}.resize(${f.w}, ${f.h}, ${f.styleOnly});
|
|
|
|
|
`}else if(s==="rotate"){const f=t;o=`${e}.rotate(${f.angle}, ${f.cx}, ${f.cy});
|
|
|
|
|
`}else if(s==="clear"){const f=t;o=`${e}.clear(${(a=f.x)!=null?a:""}, ${(l=f.y)!=null?l:""}, ${(c=f.w)!=null?c:""}, ${(d=f.h)!=null?d:""});
|
|
|
|
|
`}else if(s==="css")o=`${e}.setCss('${t.data}');
|
|
|
|
|
`;else if(s==="composite")o=`${e}.context.globalCompositeOperation = '${t.mode}';
|
|
|
|
|
`;else if(s==="filter")o=`${e}.context.filter = '${t.data}';
|
|
|
|
|
`;else if(s==="shadow"){const f=t;f.shadowBlur&&(o+=`${e}.context.shadowBlur = ${f.shadowBlur};
|
|
|
|
|
`),f.shadowColor&&(o+=`${e}.context.shadowColor = '${f.shadowColor}';
|
|
|
|
|
`),f.shadowOffsetX&&(o+=`${e}.context.shadowOffsetX = ${f.shadowOffsetX};
|
|
|
|
|
`),f.shadowOffsetY&&(o+=`${e}.context.shadowOffsetY = ${f.shadowOffsetY};
|
|
|
|
|
`)}else if(s==="textInfo"){const f=t;f.direction&&(o+=`${e}.context.direction = '${f.direction}';
|
|
|
|
|
`),f.textAlign&&(o+=`${e}.context.textAlign = '${f.textAlign}';
|
|
|
|
|
`),f.textBaseline&&(o+=`${e}.context.textBaseline = '${f.textBaseline}';
|
|
|
|
|
`)}else if(s==="save")o=`${e}.context.save();
|
|
|
|
|
`;else if(s==="restore")o=`${e}.context.restore();
|
|
|
|
|
`;else if(s==="line"){const f=t;o=`core.drawLine(${e}.context, ${f.x1}, ${f.y1}, ${f.x2}, ${f.y2}, '${f.style}', ${f.lineWidth});
|
|
|
|
|
`}else if(s==="arc"){const f=t;f.stroke?o=`core.strokeArc(${e}.context, ${f.x}, ${f.y}, ${f.r}, ${f.start}, ${f.end}, '${f.style}', ${f.lineWidth});
|
|
|
|
|
`:o=`core.fillArc(${e}.context, ${f.x}, ${f.y}, ${f.r}, ${f.start}, ${f.end}, '${f.style}');
|
|
|
|
|
`}else if(s==="circle"){const f=t;f.stroke?o=`core.strokeCircle(${e}.context, ${f.x}, ${f.y}, ${f.r}, '${f.style}', ${f.lineWidth});
|
|
|
|
|
`:o=`core.fillCircle(${e}.context, ${f.x}, ${f.y}, ${f.r}, '${f.style}');
|
|
|
|
|
`}else if(s==="rect"){const f=t;f.stroke?o=`core.strokeRect(${e}.context, ${f.x}, ${f.y}, ${f.w}, ${f.h}, '${f.style}', ${f.lineWidth});
|
|
|
|
|
`:o=`core.fillRect(${e}.context, ${f.x}, ${f.y}, ${f.w}, ${f.h}, '${f.style}');
|
|
|
|
|
`}else if(s==="roundRect"){const f=t;f.stroke?o=`core.strokeRoundRect(${e}.context, ${f.x}, ${f.y}, ${f.w}, ${f.h}, ${f.r}, '${f.style}', ${f.lineWidth});
|
|
|
|
|
`:o=`core.fillRoundRect(${e}.context, ${f.x}, ${f.y}, ${f.w}, ${f.h}, ${f.r}, '${f.style}');
|
|
|
|
|
`}else if(s==="polygon"){const f=t,g="["+f.path.reduce((_,b,v)=>`${_}${v===0?"":", "}[${b[0]}, ${b[1]}]`,"")+"]";f.stroke?o=`core.strokePolygon(${e}.context, ${g}, '${f.style}', ${f.lineWidth});
|
|
|
|
|
`:o=`core.fillPolygon(${e}.context, ${g}, '${f.style}');
|
|
|
|
|
`}else if(s==="ellipse"){const f=t;f.stroke?o=`core.strokeEllipse(${e}.context, ${f.x}, ${f.y}, ${f.a}, ${f.b}, 0, '${f.style}', ${f.lineWidth});
|
|
|
|
|
`:o=`core.fillEllipse(${e}.context, ${f.x}, ${f.y}, ${f.a}, ${f.b}, 0, '${f.style}');
|
|
|
|
|
`}else if(s==="arrow"){const f=t;o=`core.drawArrow(${e}.context, ${f.x1}, ${f.y1}, ${f.x2}, ${f.y2}, '${f.style}', ${f.lineWidth});
|
|
|
|
|
`}else if(s==="bezierCurve"){const f=t;o=`var ctx = ${e}.context;
|
|
|
|
|
ctx.beginPath();
|
|
|
|
|
ctx.moveTo(${f.sx}, ${f.sy});
|
|
|
|
|
ctx.bezierCurveTo(${f.cp1x}, ${f.cp1y}, ${f.cp2x}, ${f.cp2y}, ${f.x}, ${f.y});
|
|
|
|
|
ctx.strokeStyle = '${f.style}';
|
|
|
|
|
ctx.lineWidth = ${f.lineWidth};
|
|
|
|
|
ctx.stroke();
|
|
|
|
|
`}else if(s==="image"){const f=t;o=`core.drawImage(${e}.context, '${f.img}', `;const g=`${f.dx}, ${f.dh}, `,_=`${f.dw}, ${f.dh}`,b=`${f.sx}, ${f.sy}, ${f.sw}, ${f.sh}, `,v=`);
|
|
|
|
|
`;[f.sx,f.sy,f.dw,f.dh].every(C=>r(C))&&(o+=b),o+=g,r(f.dh)&&r(f.dw)&&(o+=_),o+=v}else if(s==="icon"){const f=t;o=`core.drawIcon(${e}.context, '${f.icon}', ${f.x}, ${f.y}`,r(f.w)&&r(f.h)&&(o+=`, ${f.w}, ${f.h}`),(!r(f.w)||!r(f.h))&&r(f.frame)&&(o+=", void 0, void 0"),r(f.frame)&&(o+=`, ${f.frame}`),o+=`);
|
|
|
|
|
`}else if(s==="winskin"){const f=t;o=`core.drawWindowSkin('${f.img}', ${e}.context, ${f.x}, ${f.y}, ${f.w}, ${f.h});
|
|
|
|
|
`}else if(s==="text"){const f=t,g=`${e}.context, '${f.str}', ${f.x}, ${f.y}, '${f.style}'`,b=`'${`${f.italic?"italic":""} ${(u=f.fontWeight)!=null?u:""} ${(h=f.fontSize)!=null?h:""} ${f.font||"sans-serif"}`.trim()}', ${f.maxWidth}`;f.stroke?o=`core.fillBoldText(${g}, '${f.strokeStyle}', ${b});
|
|
|
|
|
`:o=`core.fillText(${g}, ${b});
|
|
|
|
|
`}else if(s==="textContent"){const f=t;let g="{";["left","top","maxWidth","color","align","fontSize","lineHeight","time","font","letterSpacing","bold","italic"].forEach(_=>{_==="color"||_==="font"||_==="align"?r(f[_])&&(g+=`
|
|
|
|
|
${_}: '${f[_]}',`):r(f[_])&&(g+=`
|
|
|
|
|
${_}: ${f[_]},`)}),g+=`
|
|
|
|
|
}`,o=`core.drawTextContent(${e}.context, \`${f.content}\`, ${g});
|
|
|
|
|
`}else s==="opacity"&&(o=`core.setAlpha(${e}.context, ${t.opacity});
|
|
|
|
|
`);return{head:n,body:o}}function CCe(s){const e=xM[s+1];return`action_${e[0]}_${e.at(-1)}`}async function wCe(s,e){const t=[];for(const n of e){const o=n.type;t.push(Object.assign({},{type:o,sprite:n.sprite},n.data))}const i=LZString.compressToBase64(JSON.stringify(t));await new Promise((n,o)=>fs.writeFile(`_ui/${s}.h5ui`,i,"utf-8",r=>{if(r){console.error(r),o("error");return}n("success")})).then(()=>{console.log(`\u4FDD\u5B58\u6210\u529F\uFF0Cid:${s}`)},()=>{alert("\u4FDD\u5B58\u5931\u8D25\uFF0C\u9519\u8BEF\u4FE1\u606F\u8BF7\u5728\u63A7\u5236\u53F0\u67E5\u770B")})}async function SCe(s){let e=[];return await new Promise((t,i)=>{fs.readFile(`_ui/${s}.h5ui`,"utf-8",(n,o)=>{if(n||o===void 0||o===null){console.error(n),alert("\u8BFB\u53D6\u5931\u8D25\uFF0C\u9519\u8BEF\u4FE1\u606F\u8BF7\u5728\u63A7\u5236\u53F0\u67E5\u770B"),i("error");return}const r=JSON.parse(LZString.decompressFromBase64(o));for(const a in r){const l=r[a],c=new Tu(l.type);if(!c.success)throw new ReferenceError(`Unexpected fail on construct BaseAction. index: ${a}`);c.sprite=l.sprite,c.data={};for(const d in l)d==="sprite"||d==="type"||(c.data[d]=l[d]);e.push(c)}t("success")})}),e}async function yCe(){let s=[];return await new Promise((e,t)=>{fs.readdir("_ui",(i,n)=>{if(i||!n){console.error(i),alert("\u52A0\u8F7D\u5DF2\u6709ui\u5217\u8868\u5931\u8D25\uFF0C\u9519\u8BEF\u4FE1\u606F\u8BF7\u5728\u63A7\u5236\u53F0\u67E5\u770B"),t("error");return}s=n.map(o=>o.slice(0,-5)),e("success")})}),s}async function LCe(s){if(s==="")return alert("ui\u540D\u79F0\u4E0D\u80FD\u4E3A\u7A7A!");await new Promise((e,t)=>{fs.writeFile(`_ui/${s}.h5ui`,LZString.compressToBase64("{}"),"utf-8",i=>{if(i){console.error(i),alert("\u521B\u5EFAui\u51FA\u9519\uFF0C\u8BF7\u5728\u63A7\u5236\u53F0\u67E5\u770B\u62A5\u9519\u4FE1\u606F"),t("error");return}e("success")})})}async function kCe(s){await new Promise((e,t)=>{fs.deleteFile(`_ui/${s}.h5ui`,i=>{i&&(console.error(i),alert("\u5220\u9664ui\u51FA\u9519\uFF0C\u9519\u8BEF\u4FE1\u606F\u8BF7\u5728\u63A7\u5236\u53F0\u67E5\u770B"),t("error")),e("success")})})}const DCe=s=>(pp("data-v-e4a664c4"),s=s(),mp(),s),xCe={key:0,id:"loading"},ECe={key:1},ICe={class:"list"},TCe=["onClick"],NCe=["onClick"],ACe={key:0,class:"list"},MCe=DCe(()=>Me("span",null,"ui\u540D\u79F0",-1)),RCe=xd({__name:"list",emits:["edit"],setup(s,{emit:e}){const t=Xt(!1),i=Xt([]),n=Xt(!1),o=Xt("");r();async function r(){const d=await yCe();t.value=!0,i.value=d}async function a(d){if(i.value.includes(d))return alert("ui\u540D\u79F0\u4E0D\u80FD\u91CD\u590D\uFF01");await LCe(d),n.value=!1,i.value.push(d)}async function l(d){await kCe(d),i.value.splice(i.value.findIndex(u=>u===d),1)}async function c(d){if(!core.isPlaying())return alert("\u8BF7\u5148\u5F00\u59CB\u6E38\u620F");e("edit",d),o.value=d}return(d,u)=>t.value?(He(),Xe("div",ECe,[(He(!0),Xe(Ai,null,ko(i.value,h=>(He(),Xe("div",ICe,[Me("button",{class:"ui-tools",onClick:f=>c(h)},"\u7F16\u8F91",8,TCe),Me("span",null,Wn(h),1),Me("span",{id:"del",onClick:f=>l(h)},"\u2716",8,NCe)]))),256)),Me("button",{id:"create",onClick:u[0]||(u[0]=h=>n.value=!n.value)},"\u521B\u5EFA\u65B0ui"),n.value?(He(),Xe("div",ACe,[MCe,Ac(Me("input",{"onUpdate:modelValue":u[1]||(u[1]=h=>o.value=h)},null,512),[[jC,o.value,void 0,{trim:!0}]]),Me("button",{class:"ui-tools",onClick:u[2]||(u[2]=h=>a(o.value))},"\u521B\u5EFA")])):Hn("",!0)])):(He(),Xe("span",xCe,"\u52A0\u8F7D\u4E2D..."))}});const OCe=Vd(RCe,[["__scopeId","data-v-e4a664c4"]]),PCe=s=>(pp("data-v-59a546a5"),s=s(),mp(),s),FCe={id:"root"},BCe={id:"mode"},WCe=["status","onClick"],VCe={id:"now"},HCe=sN("\u5F53\u524Dui"),zCe=PCe(()=>Me("br",null,null,-1)),$Ce=xd({__name:"App",setup(s,{expose:e}){const t=Xt("list"),i=[["list","\u5217\u8868"],["edit","\u7F16\u8F91"]],n=Xt(""),o=Xt("\u4FDD\u5B58"),r=Xt(mF);let a=!0;e({mode:t,list:i,editing:n,saveText:o}),Hl(Mc,g=>{const _=document.getElementById("save");g===!1?_.style.backgroundColor="rgb(255, 212, 40)":_.style.backgroundColor="rgb(79, 199, 255)"});function l(){const g=document.getElementById("root"),_=document.getElementById("mode");g.style.left=a?"0px":"-300px",_.style.left=a?"300px":"230px",a=!a,main.editorOpened=!a;const b=a?"none":"block";Object.values(zn).forEach(v=>v.setCss(`display: ${b};`))}function c(g){if(g==="edit"&&!n.value)return alert("\u8BF7\u5148\u9009\u62E9ui");g==="list"&&!Mc.value&&!confirm("\u60A8\u5C1A\u672A\u4FDD\u5B58ui\uFF0C\u786E\u5B9A\u8981\u5207\u6362\u5230ui\u5217\u8868\u5417\uFF1F")||(t.value=g)}async function d(){if(t.value==="list")return alert("\u8BF7\u5728\u7F16\u8F91\u6A21\u5F0F\u4E0B\u7F16\u8BD1");const g=await pCe();r.value.openEditor(g,"javascript"),Bw.callback=_=>{}}async function u(g){for(const b in zn)zn[b].destroy(),delete zn[b];Tu.cnt=0;const _=await SCe(g);an.value=_,t.value="edit",n.value=g,Mc.value=!0}async function h(){if(!n.value)return alert("\u8BF7\u5148\u9009\u62E9ui");if(o.value!=="\u4FDD\u5B58")return;o.value="\u4FDD\u5B58\u4E2D",await wCe(n.value,an.value),o.value="\u6210\u529F";const g=document
Line truncated
|